@sysvale/cuida 3.0.0-beta.105 → 3.0.0-beta.106
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.
|
@@ -13416,7 +13416,7 @@ const eb = /* @__PURE__ */ Az("bar", bc), $z = "#f3fcf8", Iz = "#e2f8ef", Ez = "
|
|
|
13416
13416
|
for (let r = 0; r < s.length; r++) {
|
|
13417
13417
|
s[r] = s[r].replace("[", ""), s[r] = s[r].replace("]", "");
|
|
13418
13418
|
let a = s[r].split(",");
|
|
13419
|
-
n.colorName = a[0].trim().replace(/"/g, ""), n.variantName = a[1].trim().replace(/"/g, ""), n.colorShades = [], n.colorTokens = [], n.colorData = [];
|
|
13419
|
+
n.colorName = a[0].trim().replace(/"/g, ""), n.variantName = a[1].trim().replace(/"/g, ""), n.color400 = a[6], n.colorShades = [], n.colorTokens = [], n.colorData = [];
|
|
13420
13420
|
let l = !1;
|
|
13421
13421
|
for (let c = 2, d = 2; c < a.length; c++, d++)
|
|
13422
13422
|
a[c].includes("#") ? (n.colorShades.push(a[c].trim()), n.colorData[d - 2] = {}, n.colorData[d - 2].shade = a[c].trim()) : a[c].includes("$") && (n.colorTokens.push(a[c].trim().replace(/"/g, "")), n.colorData[d - 2].token = a[c].trim().replace(/"/g, "")), !l && a[c + 1].includes("$") && (d = 1, l = !0);
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
* Released under the MIT License
|
|
40
40
|
*/class L9{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(t,n,i,s){const a=n.listeners[s],o=n.duration;a.forEach(l=>l({chart:t,initial:n.initial,numSteps:o,currentStep:Math.min(i-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((i,s)=>{if(!i.running||!i.items.length)return;const a=i.items;let o=a.length-1,l=!1,d;for(;o>=0;--o)d=a[o],d._active?(d._total>i.duration&&(i.duration=d._total),d.tick(t),l=!0):(a[o]=a[a.length-1],a.pop());l&&(s.draw(),this._notify(s,i,t,"progress")),a.length||(i.running=!1,this._notify(s,i,t,"complete"),i.initial=!1),n+=a.length}),this._lastDate=t,n===0&&(this._running=!1)}_getAnims(t){const n=this._charts;let i=n.get(t);return i||(i={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},n.set(t,i)),i}listen(t,n,i){this._getAnims(t).listeners[n].push(i)}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((i,s)=>Math.max(i,s._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 i=n.items;let s=i.length-1;for(;s>=0;--s)i[s].cancel();n.items=[],this._notify(t,n,Date.now(),"complete")}remove(t){return this._charts.delete(t)}}var Cs=new L9;const yg="transparent",F9={boolean(e,t,n){return n>.5?t:e},color(e,t,n){const i=Zm(e||yg),s=i.valid&&Zm(t||yg);return s&&s.valid?s.mix(i,n).hexString():t},number(e,t,n){return e+(t-e)*n}};class R9{constructor(t,n,i,s){const a=n[i];s=pl([t.to,s,a,t.from]);const o=pl([t.from,a,s]);this._active=!0,this._fn=t.fn||F9[t.type||typeof o],this._easing=dl[t.easing]||dl.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=i,this._from=o,this._to=s,this._promises=void 0}active(){return this._active}update(t,n,i){if(this._active){this._notify(!1);const s=this._target[this._prop],a=i-this._start,o=this._duration-a;this._start=i,this._duration=Math.floor(Math.max(o,t.duration)),this._total+=a,this._loop=!!t.loop,this._to=pl([t.to,n,s,t.from]),this._from=pl([t.from,s,n])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(t){const n=t-this._start,i=this._duration,s=this._prop,a=this._from,o=this._loop,l=this._to;let d;if(this._active=a!==l&&(o||n<i),!this._active){this._target[s]=l,this._notify(!0);return}if(n<0){this._target[s]=a;return}d=n/i%2,d=o&&d>1?2-d:d,d=this._easing(Math.min(1,Math.max(0,d))),this._target[s]=this._fn(a,l,d)}wait(){const t=this._promises||(this._promises=[]);return new Promise((n,i)=>{t.push({res:n,rej:i})})}_notify(t){const n=t?"res":"rej",i=this._promises||[];for(let s=0;s<i.length;s++)i[s][n]()}}class bg{constructor(t,n){this._chart=t,this._properties=new Map,this.configure(n)}configure(t){if(!Kt(t))return;const n=Object.keys(ze.animation),i=this._properties;Object.getOwnPropertyNames(t).forEach(s=>{const a=t[s];if(!Kt(a))return;const o={};for(const l of n)o[l]=a[l];(Se(a.properties)&&a.properties||[s]).forEach(l=>{(l===s||!i.has(l))&&i.set(l,o)})})}_animateOptions(t,n){const i=n.options,s=W9(t,i);if(!s)return[];const a=this._createAnimations(s,i);return i.$shared&&H9(t.options.$animations,i).then(()=>{t.options=i},()=>{}),a}_createAnimations(t,n){const i=this._properties,s=[],a=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"){s.push(...this._animateOptions(t,n));continue}const f=n[h];let m=a[h];const v=i.get(h);if(m)if(v&&m.active()){m.update(v,f,l);continue}else m.cancel();if(!v||!v.duration){t[h]=f;continue}a[h]=m=new R9(v,t,h,f),s.push(m)}return s}update(t,n){if(this._properties.size===0){Object.assign(t,n);return}const i=this._createAnimations(t,n);if(i.length)return Cs.add(this._chart,i),!0}}function H9(e,t){const n=[],i=Object.keys(t);for(let s=0;s<i.length;s++){const a=e[i[s]];a&&a.active()&&n.push(a.wait())}return Promise.all(n)}function W9(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 wg(e,t){const n=e&&e.options||{},i=n.reverse,s=n.min===void 0?t:0,a=n.max===void 0?t:0;return{start:i?a:s,end:i?s:a}}function Y9(e,t,n){if(n===!1)return!1;const i=wg(e,n),s=wg(t,n);return{top:s.end,right:i.end,bottom:s.start,left:i.start}}function j9(e){let t,n,i,s;return Kt(e)?(t=e.top,n=e.right,i=e.bottom,s=e.left):t=n=i=s=e,{top:t,right:n,bottom:i,left:s,disabled:e===!1}}function xg(e,t){const n=[],i=e._getSortedDatasetMetas(t);let s,a;for(s=0,a=i.length;s<a;++s)n.push(i[s].index);return n}function Sg(e,t,n,i={}){const s=e.keys,a=i.mode==="single";let o,l,d,h;if(t!==null){for(o=0,l=s.length;o<l;++o){if(d=+s[o],d===n){if(i.all)continue;break}h=e.values[d],Pe(h)&&(a||t===0||os(t)===os(h))&&(t+=h)}return t}}function U9(e){const t=Object.keys(e),n=new Array(t.length);let i,s,a;for(i=0,s=t.length;i<s;++i)a=t[i],n[i]={x:a,y:e[a]};return n}function kg(e,t){const n=e&&e.options.stacked;return n||n===void 0&&t.stack!==void 0}function G9(e,t,n){return`${e.id}.${t.id}.${n.stack||n.type}`}function K9(e){const{min:t,max:n,minDefined:i,maxDefined:s}=e.getUserBounds();return{min:i?t:Number.NEGATIVE_INFINITY,max:s?n:Number.POSITIVE_INFINITY}}function Z9(e,t,n){const i=e[t]||(e[t]={});return i[n]||(i[n]={})}function Cg(e,t,n,i){for(const s of t.getMatchingVisibleMetas(i).reverse()){const a=e[s.index];if(n&&a>0||!n&&a<0)return s.index}return null}function Og(e,t){const{chart:n,_cachedMeta:i}=e,s=n._stacks||(n._stacks={}),{iScale:a,vScale:o,index:l}=i,d=a.axis,h=o.axis,f=G9(a,o,i),m=t.length;let v;for(let y=0;y<m;++y){const w=t[y],{[d]:x,[h]:k}=w,D=w._stacks||(w._stacks={});v=D[h]=Z9(s,f,x),v[l]=k,v._top=Cg(v,o,!0,i.type),v._bottom=Cg(v,o,!1,i.type);const E=v._visualValues||(v._visualValues={});E[l]=k}}function ph(e,t){const n=e.scales;return Object.keys(n).filter(i=>n[i].axis===t).shift()}function X9(e,t){return ia(e,{active:!1,dataset:void 0,datasetIndex:t,index:t,mode:"default",type:"dataset"})}function J9(e,t,n){return ia(e,{active:!1,dataIndex:t,parsed:void 0,raw:void 0,element:n,index:t,mode:"default",type:"data"})}function ml(e,t){const n=e.controller.index,i=e.vScale&&e.vScale.axis;if(!!i){t=t||e._parsed;for(const s of t){const a=s._stacks;if(!a||a[i]===void 0||a[i][n]===void 0)return;delete a[i][n],a[i]._visualValues!==void 0&&a[i]._visualValues[n]!==void 0&&delete a[i]._visualValues[n]}}}const mh=e=>e==="reset"||e==="none",Mg=(e,t)=>t?e:Object.assign({},e),Q9=(e,t,n)=>e&&!t.hidden&&t._stacked&&{keys:xg(n,!0),values:null};class Fi{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=kg(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&&ml(this._cachedMeta),this.index=t}linkScales(){const t=this.chart,n=this._cachedMeta,i=this.getDataset(),s=(m,v,y,w)=>m==="x"?v:m==="r"?w:y,a=n.xAxisID=Vt(i.xAxisID,ph(t,"x")),o=n.yAxisID=Vt(i.yAxisID,ph(t,"y")),l=n.rAxisID=Vt(i.rAxisID,ph(t,"r")),d=n.indexAxis,h=n.iAxisID=s(d,a,o,l),f=n.vAxisID=s(d,o,a,l);n.xScale=this.getScaleForId(a),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&&ml(t)}_dataCheck(){const t=this.getDataset(),n=t.data||(t.data=[]),i=this._data;if(Kt(n))this._data=U9(n);else if(i!==n){if(i){Rm(i,this);const s=this._cachedMeta;ml(s),s._parsed=[]}n&&Object.isExtensible(n)&&Nw(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,i=this.getDataset();let s=!1;this._dataCheck();const a=n._stacked;n._stacked=kg(n.vScale,n),n.stack!==i.stack&&(s=!0,ml(n),n.stack=i.stack),this._resyncElements(t),(s||a!==n._stacked)&&Og(this,n._parsed)}configure(){const t=this.chart.config,n=t.datasetScopeKeys(this._type),i=t.getOptionScopes(this.getDataset(),n,!0);this.options=t.createResolver(i,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(t,n){const{_cachedMeta:i,_data:s}=this,{iScale:a,_stacked:o}=i,l=a.axis;let d=t===0&&n===s.length?!0:i._sorted,h=t>0&&i._parsed[t-1],f,m,v;if(this._parsing===!1)i._parsed=s,i._sorted=!0,v=s;else{Se(s[t])?v=this.parseArrayData(i,s,t,n):Kt(s[t])?v=this.parseObjectData(i,s,t,n):v=this.parsePrimitiveData(i,s,t,n);const y=()=>m[l]===null||h&&m[l]<h[l];for(f=0;f<n;++f)i._parsed[f+t]=m=v[f],d&&(y()&&(d=!1),h=m);i._sorted=d}o&&Og(this,v)}parsePrimitiveData(t,n,i,s){const{iScale:a,vScale:o}=t,l=a.axis,d=o.axis,h=a.getLabels(),f=a===o,m=new Array(s);let v,y,w;for(v=0,y=s;v<y;++v)w=v+i,m[v]={[l]:f||a.parse(h[w],w),[d]:o.parse(n[w],w)};return m}parseArrayData(t,n,i,s){const{xScale:a,yScale:o}=t,l=new Array(s);let d,h,f,m;for(d=0,h=s;d<h;++d)f=d+i,m=n[f],l[d]={x:a.parse(m[0],f),y:o.parse(m[1],f)};return l}parseObjectData(t,n,i,s){const{xScale:a,yScale:o}=t,{xAxisKey:l="x",yAxisKey:d="y"}=this._parsing,h=new Array(s);let f,m,v,y;for(f=0,m=s;f<m;++f)v=f+i,y=n[v],h[f]={x:a.parse(ta(y,l),v),y:o.parse(ta(y,d),v)};return h}getParsed(t){return this._cachedMeta._parsed[t]}getDataElement(t){return this._cachedMeta.data[t]}applyStack(t,n,i){const s=this.chart,a=this._cachedMeta,o=n[t.axis],l={keys:xg(s,!0),values:n._stacks[t.axis]._visualValues};return Sg(l,o,a.index,{mode:i})}updateRangeFromParsed(t,n,i,s){const a=i[n.axis];let o=a===null?NaN:a;const l=s&&i._stacks[n.axis];s&&l&&(s.values=l,o=Sg(s,a,this._cachedMeta.index)),t.min=Math.min(t.min,o),t.max=Math.max(t.max,o)}getMinMax(t,n){const i=this._cachedMeta,s=i._parsed,a=i._sorted&&t===i.iScale,o=s.length,l=this._getOtherScale(t),d=Q9(n,i,this.chart),h={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:f,max:m}=K9(l);let v,y;function w(){y=s[v];const x=y[l.axis];return!Pe(y[t.axis])||f>x||m<x}for(v=0;v<o&&!(!w()&&(this.updateRangeFromParsed(h,t,y,d),a));++v);if(a){for(v=o-1;v>=0;--v)if(!w()){this.updateRangeFromParsed(h,t,y,d);break}}return h}getAllParsedValues(t){const n=this._cachedMeta._parsed,i=[];let s,a,o;for(s=0,a=n.length;s<a;++s)o=n[s][t.axis],Pe(o)&&i.push(o);return i}getMaxOverflow(){return!1}getLabelAndValue(t){const n=this._cachedMeta,i=n.iScale,s=n.vScale,a=this.getParsed(t);return{label:i?""+i.getLabelForValue(a[i.axis]):"",value:s?""+s.getLabelForValue(a[s.axis]):""}}_update(t){const n=this._cachedMeta;this.update(t||"default"),n._clip=j9(Vt(this.options.clip,Y9(n.xScale,n.yScale,this.getMaxOverflow())))}update(t){}draw(){const t=this._ctx,n=this.chart,i=this._cachedMeta,s=i.data||[],a=n.chartArea,o=[],l=this._drawStart||0,d=this._drawCount||s.length-l,h=this.options.drawActiveElementsOnTop;let f;for(i.dataset&&i.dataset.draw(t,a,l,d),f=l;f<l+d;++f){const m=s[f];m.hidden||(m.active&&h?o.push(m):m.draw(t,a))}for(f=0;f<o.length;++f)o[f].draw(t,a)}getStyle(t,n){const i=n?"active":"default";return t===void 0&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(i):this.resolveDataElementOptions(t||0,i)}getContext(t,n,i){const s=this.getDataset();let a;if(t>=0&&t<this._cachedMeta.data.length){const o=this._cachedMeta.data[t];a=o.$context||(o.$context=J9(this.getContext(),t,o)),a.parsed=this.getParsed(t),a.raw=s.data[t],a.index=a.dataIndex=t}else a=this.$context||(this.$context=X9(this.chart.getContext(),this.index)),a.dataset=s,a.index=a.datasetIndex=this.index;return a.active=!!n,a.mode=i,a}resolveDatasetElementOptions(t){return this._resolveElementOptions(this.datasetElementType.id,t)}resolveDataElementOptions(t,n){return this._resolveElementOptions(this.dataElementType.id,n,t)}_resolveElementOptions(t,n="default",i){const s=n==="active",a=this._cachedDataOpts,o=t+"-"+n,l=a[o],d=this.enableOptionSharing&&rl(i);if(l)return Mg(l,d);const h=this.chart.config,f=h.datasetElementScopeKeys(this._type,t),m=s?[`${t}Hover`,"hover",t,""]:[t,""],v=h.getOptionScopes(this.getDataset(),f),y=Object.keys(ze.elements[t]),w=()=>this.getContext(i,s,n),x=h.resolveNamedOptions(v,y,w,m);return x.$shared&&(x.$shared=d,a[o]=Object.freeze(Mg(x,d))),x}_resolveAnimations(t,n,i){const s=this.chart,a=this._cachedDataOpts,o=`animation-${n}`,l=a[o];if(l)return l;let d;if(s.options.animation!==!1){const f=this.chart.config,m=f.datasetAnimationScopeKeys(this._type,n),v=f.getOptionScopes(this.getDataset(),m);d=f.createResolver(v,this.getContext(t,i,n))}const h=new bg(s,d&&d.animations);return d&&d._cacheable&&(a[o]=Object.freeze(h)),h}getSharedOptions(t){if(!!t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,n){return!n||mh(t)||this.chart._animationsDisabled}_getSharedOptions(t,n){const i=this.resolveDataElementOptions(t,n),s=this._sharedOptions,a=this.getSharedOptions(i),o=this.includeOptions(n,a)||a!==s;return this.updateSharedOptions(a,n,i),{sharedOptions:a,includeOptions:o}}updateElement(t,n,i,s){mh(s)?Object.assign(t,i):this._resolveAnimations(n,s).update(t,i)}updateSharedOptions(t,n,i){t&&!mh(n)&&this._resolveAnimations(void 0,n).update(t,i)}_setStyle(t,n,i,s){t.active=s;const a=this.getStyle(n,s);this._resolveAnimations(n,i,s).update(t,{options:!s&&this.getSharedOptions(a)||a})}removeHoverStyle(t,n,i){this._setStyle(t,i,"active",!1)}setHoverStyle(t,n,i){this._setStyle(t,i,"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,i=this._cachedMeta.data;for(const[l,d,h]of this._syncList)this[l](d,h);this._syncList=[];const s=i.length,a=n.length,o=Math.min(a,s);o&&this.parse(0,o),a>s?this._insertElements(s,a-s,t):a<s&&this._removeElements(a,s-a)}_insertElements(t,n,i=!0){const s=this._cachedMeta,a=s.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(a),l=t;l<o;++l)a[l]=new this.dataElementType;this._parsing&&d(s._parsed),this.parse(t,n),i&&this.updateElements(a,t,n,"reset")}updateElements(t,n,i,s){}_removeElements(t,n){const i=this._cachedMeta;if(this._parsing){const s=i._parsed.splice(t,n);i._stacked&&ml(i,s)}i.data.splice(t,n)}_sync(t){if(this._parsing)this._syncList.push(t);else{const[n,i,s]=t;this[n](i,s)}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 i=arguments.length-2;i&&this._sync(["_insertElements",t,i])}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length])}}nt(Fi,"defaults",{}),nt(Fi,"datasetElementType",null),nt(Fi,"dataElementType",null);function q9(e,t){if(!e._cache.$bar){const n=e.getMatchingVisibleMetas(t);let i=[];for(let s=0,a=n.length;s<a;s++)i=i.concat(n[s].controller.getAllParsedValues(e));e._cache.$bar=Hm(i.sort((s,a)=>s-a))}return e._cache.$bar}function $9(e){const t=e.iScale,n=q9(t,e.type);let i=t._length,s,a,o,l;const d=()=>{o===32767||o===-32768||(rl(l)&&(i=Math.min(i,Math.abs(o-l)||i)),l=o)};for(s=0,a=n.length;s<a;++s)o=t.getPixelForValue(n[s]),d();for(l=void 0,s=0,a=t.ticks.length;s<a;++s)o=t.getPixelForTick(s),d();return i}function tx(e,t,n,i){const s=n.barThickness;let a,o;return ee(s)?(a=t.min*n.categoryPercentage,o=n.barPercentage):(a=s*i,o=1),{chunk:a/i,ratio:o,start:t.pixels[e]-a/2}}function ex(e,t,n,i){const s=t.pixels,a=s[e];let o=e>0?s[e-1]:null,l=e<s.length-1?s[e+1]:null;const d=n.categoryPercentage;o===null&&(o=a-(l===null?t.end-t.start:l-a)),l===null&&(l=a+a-o);const h=a-(a-Math.min(o,l))/2*d;return{chunk:Math.abs(l-o)/2*d/i,ratio:n.barPercentage,start:h}}function nx(e,t,n,i){const s=n.parse(e[0],i),a=n.parse(e[1],i),o=Math.min(s,a),l=Math.max(s,a);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:s,end:a,min:o,max:l}}function Dg(e,t,n,i){return Se(e)?nx(e,t,n,i):t[n.axis]=n.parse(e,i),t}function Eg(e,t,n,i){const s=e.iScale,a=e.vScale,o=s.getLabels(),l=s===a,d=[];let h,f,m,v;for(h=n,f=n+i;h<f;++h)v=t[h],m={},m[s.axis]=l||s.parse(o[h],h),d.push(Dg(v,m,a,h));return d}function gh(e){return e&&e.barStart!==void 0&&e.barEnd!==void 0}function ix(e,t,n){return e!==0?os(e):(t.isHorizontal()?1:-1)*(t.min>=n?1:-1)}function sx(e){let t,n,i,s,a;return e.horizontal?(t=e.base>e.x,n="left",i="right"):(t=e.base<e.y,n="bottom",i="top"),t?(s="end",a="start"):(s="start",a="end"),{start:n,end:i,reverse:t,top:s,bottom:a}}function ax(e,t,n,i){let s=t.borderSkipped;const a={};if(!s){e.borderSkipped=a;return}if(s===!0){e.borderSkipped={top:!0,right:!0,bottom:!0,left:!0};return}const{start:o,end:l,reverse:d,top:h,bottom:f}=sx(e);s==="middle"&&n&&(e.enableBorderRadius=!0,(n._top||0)===i?s=h:(n._bottom||0)===i?s=f:(a[Tg(f,o,l,d)]=!0,s=h)),a[Tg(s,o,l,d)]=!0,e.borderSkipped=a}function Tg(e,t,n,i){return i?(e=ox(e,t,n),e=Ig(e,n,t)):e=Ig(e,t,n),e}function ox(e,t,n){return e===t?n:e===n?t:e}function Ig(e,t,n){return e==="start"?t:e==="end"?n:e}function rx(e,{inflateAmount:t},n){e.inflateAmount=t==="auto"?n===1?.33:0:t}class gl extends Fi{parsePrimitiveData(t,n,i,s){return Eg(t,n,i,s)}parseArrayData(t,n,i,s){return Eg(t,n,i,s)}parseObjectData(t,n,i,s){const{iScale:a,vScale:o}=t,{xAxisKey:l="x",yAxisKey:d="y"}=this._parsing,h=a.axis==="x"?l:d,f=o.axis==="x"?l:d,m=[];let v,y,w,x;for(v=i,y=i+s;v<y;++v)x=n[v],w={},w[a.axis]=a.parse(ta(x,h),v),m.push(Dg(ta(x,f),w,o,v));return m}updateRangeFromParsed(t,n,i,s){super.updateRangeFromParsed(t,n,i,s);const a=i._custom;a&&n===this._cachedMeta.vScale&&(t.min=Math.min(t.min,a.min),t.max=Math.max(t.max,a.max))}getMaxOverflow(){return 0}getLabelAndValue(t){const n=this._cachedMeta,{iScale:i,vScale:s}=n,a=this.getParsed(t),o=a._custom,l=gh(o)?"["+o.start+", "+o.end+"]":""+s.getLabelForValue(a[s.axis]);return{label:""+i.getLabelForValue(a[i.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,i,s){const a=s==="reset",{index:o,_cachedMeta:{vScale:l}}=this,d=l.getBasePixel(),h=l.isHorizontal(),f=this._getRuler(),{sharedOptions:m,includeOptions:v}=this._getSharedOptions(n,s);for(let y=n;y<n+i;y++){const w=this.getParsed(y),x=a||ee(w[l.axis])?{base:d,head:d}:this._calculateBarValuePixels(y),k=this._calculateBarIndexPixels(y,f),D=(w._stacks||{})[l.axis],E={horizontal:h,base:x.base,enableBorderRadius:!D||gh(w._custom)||o===D._top||o===D._bottom,x:h?x.head:k.center,y:h?k.center:x.head,height:h?k.size:Math.abs(x.size),width:h?Math.abs(x.size):k.size};v&&(E.options=m||this.resolveDataElementOptions(y,t[y].active?"active":s));const B=E.options||t[y].options;ax(E,B,D,o),rx(E,B,f.ratio),this.updateElement(t[y],y,E,s)}}_getStacks(t,n){const{iScale:i}=this._cachedMeta,s=i.getMatchingVisibleMetas(this._type).filter(d=>d.controller.options.grouped),a=i.options.stacked,o=[],l=d=>{const h=d.controller.getParsed(n),f=h&&h[d.vScale.axis];if(ee(f)||isNaN(f))return!0};for(const d of s)if(!(n!==void 0&&l(d))&&((a===!1||o.indexOf(d.stack)===-1||a===void 0&&d.stack===void 0)&&o.push(d.stack),d.index===t))break;return o.length||o.push(void 0),o}_getStackCount(t){return this._getStacks(void 0,t).length}_getStackIndex(t,n,i){const s=this._getStacks(t,i),a=n!==void 0?s.indexOf(n):-1;return a===-1?s.length-1:a}_getRuler(){const t=this.options,n=this._cachedMeta,i=n.iScale,s=[];let a,o;for(a=0,o=n.data.length;a<o;++a)s.push(i.getPixelForValue(this.getParsed(a)[i.axis],a));const l=t.barThickness;return{min:l||$9(n),pixels:s,start:i._startPixel,end:i._endPixel,stackCount:this._getStackCount(),scale:i,grouped:t.grouped,ratio:l?1:t.categoryPercentage*t.barPercentage}}_calculateBarValuePixels(t){const{_cachedMeta:{vScale:n,_stacked:i,index:s},options:{base:a,minBarLength:o}}=this,l=a||0,d=this.getParsed(t),h=d._custom,f=gh(h);let m=d[n.axis],v=0,y=i?this.applyStack(n,d,i):m,w,x;y!==m&&(v=y-m,y=m),f&&(m=h.barStart,y=h.barEnd-h.barStart,m!==0&&os(m)!==os(h.barEnd)&&(v=0),v+=m);const k=!ee(a)&&!f?a:v;let D=n.getPixelForValue(k);if(this.chart.getDataVisibility(t)?w=n.getPixelForValue(v+y):w=D,x=w-D,Math.abs(x)<o){x=ix(x,n,l)*o,m===l&&(D-=x/2);const E=n.getPixelForDecimal(0),B=n.getPixelForDecimal(1),S=Math.min(E,B),A=Math.max(E,B);D=Math.max(Math.min(D,A),S),w=D+x,i&&!f&&(d._stacks[n.axis]._visualValues[s]=n.getValueForPixel(w)-n.getValueForPixel(D))}if(D===n.getPixelForValue(l)){const E=os(x)*n.getLineWidthForValue(l)/2;D+=E,x-=E}return{size:x,base:D,head:w,center:w+x/2}}_calculateBarIndexPixels(t,n){const i=n.scale,s=this.options,a=s.skipNull,o=Vt(s.maxBarThickness,1/0);let l,d;if(n.grouped){const h=a?this._getStackCount(t):n.stackCount,f=s.barThickness==="flex"?ex(t,n,s,h):tx(t,n,s,h),m=this._getStackIndex(this.index,this._cachedMeta.stack,a?t:void 0);l=f.start+f.chunk*m+f.chunk/2,d=Math.min(o,f.chunk*f.ratio)}else l=i.getPixelForValue(this.getParsed(t)[i.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,i=t.data,s=i.length;let a=0;for(;a<s;++a)this.getParsed(a)[n.axis]!==null&&i[a].draw(this._ctx)}}nt(gl,"id","bar"),nt(gl,"defaults",{datasetElementType:!1,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}}),nt(gl,"overrides",{scales:{_index_:{type:"category",offset:!0,grid:{offset:!0}},_value_:{type:"linear",beginAtZero:!0}}});class gd extends Fi{initialize(){this.enableOptionSharing=!0,super.initialize()}parsePrimitiveData(t,n,i,s){const a=super.parsePrimitiveData(t,n,i,s);for(let o=0;o<a.length;o++)a[o]._custom=this.resolveDataElementOptions(o+i).radius;return a}parseArrayData(t,n,i,s){const a=super.parseArrayData(t,n,i,s);for(let o=0;o<a.length;o++){const l=n[i+o];a[o]._custom=Vt(l[2],this.resolveDataElementOptions(o+i).radius)}return a}parseObjectData(t,n,i,s){const a=super.parseObjectData(t,n,i,s);for(let o=0;o<a.length;o++){const l=n[i+o];a[o]._custom=Vt(l&&l.r&&+l.r,this.resolveDataElementOptions(o+i).radius)}return a}getMaxOverflow(){const t=this._cachedMeta.data;let n=0;for(let i=t.length-1;i>=0;--i)n=Math.max(n,t[i].size(this.resolveDataElementOptions(i))/2);return n>0&&n}getLabelAndValue(t){const n=this._cachedMeta,i=this.chart.data.labels||[],{xScale:s,yScale:a}=n,o=this.getParsed(t),l=s.getLabelForValue(o.x),d=a.getLabelForValue(o.y),h=o._custom;return{label:i[t]||"",value:"("+l+", "+d+(h?", "+h:"")+")"}}update(t){const n=this._cachedMeta.data;this.updateElements(n,0,n.length,t)}updateElements(t,n,i,s){const a=s==="reset",{iScale:o,vScale:l}=this._cachedMeta,{sharedOptions:d,includeOptions:h}=this._getSharedOptions(n,s),f=o.axis,m=l.axis;for(let v=n;v<n+i;v++){const y=t[v],w=!a&&this.getParsed(v),x={},k=x[f]=a?o.getPixelForDecimal(.5):o.getPixelForValue(w[f]),D=x[m]=a?l.getBasePixel():l.getPixelForValue(w[m]);x.skip=isNaN(k)||isNaN(D),h&&(x.options=d||this.resolveDataElementOptions(v,y.active?"active":s),a&&(x.options.radius=0)),this.updateElement(y,v,x,s)}}resolveDataElementOptions(t,n){const i=this.getParsed(t);let s=super.resolveDataElementOptions(t,n);s.$shared&&(s=Object.assign({},s,{$shared:!1}));const a=s.radius;return n!=="active"&&(s.radius=0),s.radius+=Vt(i&&i._custom,a),s}}nt(gd,"id","bubble"),nt(gd,"defaults",{datasetElementType:!1,dataElementType:"point",animations:{numbers:{type:"number",properties:["x","y","borderWidth","radius"]}}}),nt(gd,"overrides",{scales:{x:{type:"linear"},y:{type:"linear"}}});function lx(e,t,n){let i=1,s=1,a=0,o=0;if(t<ke){const l=e,d=l+t,h=Math.cos(l),f=Math.sin(l),m=Math.cos(d),v=Math.sin(d),y=(B,S,A)=>cl(B,l,d,!0)?1:Math.max(S,S*n,A,A*n),w=(B,S,A)=>cl(B,l,d,!0)?-1:Math.min(S,S*n,A,A*n),x=y(0,h,m),k=y(Ne,f,v),D=w(De,h,m),E=w(De+Ne,f,v);i=(x-D)/2,s=(k-E)/2,a=-(x+D)/2,o=-(k+E)/2}return{ratioX:i,ratioY:s,offsetX:a,offsetY:o}}class Ua extends Fi{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 i=this.getDataset().data,s=this._cachedMeta;if(this._parsing===!1)s._parsed=i;else{let a=d=>+i[d];if(Kt(i[t])){const{key:d="value"}=this._parsing;a=h=>+ta(i[h],d)}let o,l;for(o=t,l=t+n;o<l;++o)s._parsed[o]=a(o)}}_getRotation(){return Li(this.options.rotation-90)}_getCircumference(){return Li(this.options.circumference)}_getRotationExtents(){let t=ke,n=-ke;for(let i=0;i<this.chart.data.datasets.length;++i)if(this.chart.isDatasetVisible(i)&&this.chart.getDatasetMeta(i).type===this._type){const s=this.chart.getDatasetMeta(i).controller,a=s._getRotation(),o=s._getCircumference();t=Math.min(t,a),n=Math.max(n,a+o)}return{rotation:t,circumference:n-t}}update(t){const n=this.chart,{chartArea:i}=n,s=this._cachedMeta,a=s.data,o=this.getMaxBorderWidth()+this.getMaxOffset(a)+this.options.spacing,l=Math.max((Math.min(i.width,i.height)-o)/2,0),d=Math.min(xw(this.options.cutout,l),1),h=this._getRingWeight(this.index),{circumference:f,rotation:m}=this._getRotationExtents(),{ratioX:v,ratioY:y,offsetX:w,offsetY:x}=lx(m,f,d),k=(i.width-o)/v,D=(i.height-o)/y,E=Math.max(Math.min(k,D)/2,0),B=Tm(this.options.radius,E),S=Math.max(B*d,0),A=(B-S)/this._getVisibleDatasetWeightTotal();this.offsetX=w*B,this.offsetY=x*B,s.total=this.calculateTotal(),this.outerRadius=B-A*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-A*h,0),this.updateElements(a,0,a.length,t)}_circumference(t,n){const i=this.options,s=this._cachedMeta,a=this._getCircumference();return n&&i.animation.animateRotate||!this.chart.getDataVisibility(t)||s._parsed[t]===null||s.data[t].hidden?0:this.calculateCircumference(s._parsed[t]*a/ke)}updateElements(t,n,i,s){const a=s==="reset",o=this.chart,l=o.chartArea,h=o.options.animation,f=(l.left+l.right)/2,m=(l.top+l.bottom)/2,v=a&&h.animateScale,y=v?0:this.innerRadius,w=v?0:this.outerRadius,{sharedOptions:x,includeOptions:k}=this._getSharedOptions(n,s);let D=this._getRotation(),E;for(E=0;E<n;++E)D+=this._circumference(E,a);for(E=n;E<n+i;++E){const B=this._circumference(E,a),S=t[E],A={x:f+this.offsetX,y:m+this.offsetY,startAngle:D,endAngle:D+B,circumference:B,outerRadius:w,innerRadius:y};k&&(A.options=x||this.resolveDataElementOptions(E,S.active?"active":s)),D+=B,this.updateElement(S,E,A,s)}}calculateTotal(){const t=this._cachedMeta,n=t.data;let i=0,s;for(s=0;s<n.length;s++){const a=t._parsed[s];a!==null&&!isNaN(a)&&this.chart.getDataVisibility(s)&&!n[s].hidden&&(i+=Math.abs(a))}return i}calculateCircumference(t){const n=this._cachedMeta.total;return n>0&&!isNaN(t)?ke*(Math.abs(t)/n):0}getLabelAndValue(t){const n=this._cachedMeta,i=this.chart,s=i.data.labels||[],a=ul(n._parsed[t],i.options.locale);return{label:s[t]||"",value:a}}getMaxBorderWidth(t){let n=0;const i=this.chart;let s,a,o,l,d;if(!t){for(s=0,a=i.data.datasets.length;s<a;++s)if(i.isDatasetVisible(s)){o=i.getDatasetMeta(s),t=o.data,l=o.controller;break}}if(!t)return 0;for(s=0,a=t.length;s<a;++s)d=l.resolveDataElementOptions(s),d.borderAlign!=="inner"&&(n=Math.max(n,d.borderWidth||0,d.hoverBorderWidth||0));return n}getMaxOffset(t){let n=0;for(let i=0,s=t.length;i<s;++i){const a=this.resolveDataElementOptions(i);n=Math.max(n,a.offset||0,a.hoverOffset||0)}return n}_getRingWeightOffset(t){let n=0;for(let i=0;i<t;++i)this.chart.isDatasetVisible(i)&&(n+=this._getRingWeight(i));return n}_getRingWeight(t){return Math.max(Vt(this.chart.data.datasets[t].weight,1),0)}_getVisibleDatasetWeightTotal(){return this._getRingWeightOffset(this.chart.data.datasets.length)||1}}nt(Ua,"id","doughnut"),nt(Ua,"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"}),nt(Ua,"descriptors",{_scriptable:t=>t!=="spacing",_indexable:t=>t!=="spacing"&&!t.startsWith("borderDash")&&!t.startsWith("hoverBorderDash")}),nt(Ua,"overrides",{aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const n=t.data;if(n.labels.length&&n.datasets.length){const{labels:{pointStyle:i,color:s}}=t.legend.options;return n.labels.map((a,o)=>{const d=t.getDatasetMeta(0).controller.getStyle(o);return{text:a,fillStyle:d.backgroundColor,strokeStyle:d.borderColor,fontColor:s,lineWidth:d.borderWidth,pointStyle:i,hidden:!t.getDataVisibility(o),index:o}})}return[]}},onClick(t,n,i){i.chart.toggleDataVisibility(n.index),i.chart.update()}}}});class vd extends Fi{initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(t){const n=this._cachedMeta,{dataset:i,data:s=[],_dataset:a}=n,o=this.chart._animationsDisabled;let{start:l,count:d}=jm(n,s,o);this._drawStart=l,this._drawCount=d,Um(n)&&(l=0,d=s.length),i._chart=this.chart,i._datasetIndex=this.index,i._decimated=!!a._decimated,i.points=s;const h=this.resolveDatasetElementOptions(t);this.options.showLine||(h.borderWidth=0),h.segment=this.options.segment,this.updateElement(i,void 0,{animated:!o,options:h},t),this.updateElements(s,l,d,t)}updateElements(t,n,i,s){const a=s==="reset",{iScale:o,vScale:l,_stacked:d,_dataset:h}=this._cachedMeta,{sharedOptions:f,includeOptions:m}=this._getSharedOptions(n,s),v=o.axis,y=l.axis,{spanGaps:w,segment:x}=this.options,k=No(w)?w:Number.POSITIVE_INFINITY,D=this.chart._animationsDisabled||a||s==="none",E=n+i,B=t.length;let S=n>0&&this.getParsed(n-1);for(let A=0;A<B;++A){const I=t[A],F=D?I:{};if(A<n||A>=E){F.skip=!0;continue}const L=this.getParsed(A),W=ee(L[y]),X=F[v]=o.getPixelForValue(L[v],A),Z=F[y]=a||W?l.getBasePixel():l.getPixelForValue(d?this.applyStack(l,L,d):L[y],A);F.skip=isNaN(X)||isNaN(Z)||W,F.stop=A>0&&Math.abs(L[v]-S[v])>k,x&&(F.parsed=L,F.raw=h.data[A]),m&&(F.options=f||this.resolveDataElementOptions(A,I.active?"active":s)),D||this.updateElement(I,A,F,s),S=L}}getMaxOverflow(){const t=this._cachedMeta,n=t.dataset,i=n.options&&n.options.borderWidth||0,s=t.data||[];if(!s.length)return i;const a=s[0].size(this.resolveDataElementOptions(0)),o=s[s.length-1].size(this.resolveDataElementOptions(s.length-1));return Math.max(i,a,o)/2}draw(){const t=this._cachedMeta;t.dataset.updateControlPoints(this.chart.chartArea,t.iScale.axis),super.draw()}}nt(vd,"id","line"),nt(vd,"defaults",{datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1}),nt(vd,"overrides",{scales:{_index_:{type:"category"},_value_:{type:"linear"}}});class vl extends Fi{constructor(t,n){super(t,n),this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(t){const n=this._cachedMeta,i=this.chart,s=i.data.labels||[],a=ul(n._parsed[t].r,i.options.locale);return{label:s[t]||"",value:a}}parseObjectData(t,n,i,s){return og.bind(this)(t,n,i,s)}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((i,s)=>{const a=this.getParsed(s).r;!isNaN(a)&&this.chart.getDataVisibility(s)&&(a<n.min&&(n.min=a),a>n.max&&(n.max=a))}),n}_updateRadius(){const t=this.chart,n=t.chartArea,i=t.options,s=Math.min(n.right-n.left,n.bottom-n.top),a=Math.max(s/2,0),o=Math.max(i.cutoutPercentage?a/100*i.cutoutPercentage:1,0),l=(a-o)/t.getVisibleDatasetCount();this.outerRadius=a-l*this.index,this.innerRadius=this.outerRadius-l}updateElements(t,n,i,s){const a=s==="reset",o=this.chart,d=o.options.animation,h=this._cachedMeta.rScale,f=h.xCenter,m=h.yCenter,v=h.getIndexAngle(0)-.5*De;let y=v,w;const x=360/this.countVisibleElements();for(w=0;w<n;++w)y+=this._computeAngle(w,s,x);for(w=n;w<n+i;w++){const k=t[w];let D=y,E=y+this._computeAngle(w,s,x),B=o.getDataVisibility(w)?h.getDistanceFromCenterForValue(this.getParsed(w).r):0;y=E,a&&(d.animateScale&&(B=0),d.animateRotate&&(D=E=v));const S={x:f,y:m,innerRadius:0,outerRadius:B,startAngle:D,endAngle:E,options:this.resolveDataElementOptions(w,k.active?"active":s)};this.updateElement(k,w,S,s)}}countVisibleElements(){const t=this._cachedMeta;let n=0;return t.data.forEach((i,s)=>{!isNaN(this.getParsed(s).r)&&this.chart.getDataVisibility(s)&&n++}),n}_computeAngle(t,n,i){return this.chart.getDataVisibility(t)?Li(this.resolveDataElementOptions(t,n).angle||i):0}}nt(vl,"id","polarArea"),nt(vl,"defaults",{dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0}),nt(vl,"overrides",{aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const n=t.data;if(n.labels.length&&n.datasets.length){const{labels:{pointStyle:i,color:s}}=t.legend.options;return n.labels.map((a,o)=>{const d=t.getDatasetMeta(0).controller.getStyle(o);return{text:a,fillStyle:d.backgroundColor,strokeStyle:d.borderColor,fontColor:s,lineWidth:d.borderWidth,pointStyle:i,hidden:!t.getDataVisibility(o),index:o}})}return[]}},onClick(t,n,i){i.chart.toggleDataVisibility(n.index),i.chart.update()}}},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}});class vh extends Ua{}nt(vh,"id","pie"),nt(vh,"defaults",{cutout:0,rotation:0,circumference:360,radius:"100%"});class _d extends Fi{getLabelAndValue(t){const n=this._cachedMeta.vScale,i=this.getParsed(t);return{label:n.getLabels()[t],value:""+n.getLabelForValue(i[n.axis])}}parseObjectData(t,n,i,s){return og.bind(this)(t,n,i,s)}update(t){const n=this._cachedMeta,i=n.dataset,s=n.data||[],a=n.iScale.getLabels();if(i.points=s,t!=="resize"){const o=this.resolveDatasetElementOptions(t);this.options.showLine||(o.borderWidth=0);const l={_loop:!0,_fullLoop:a.length===s.length,options:o};this.updateElement(i,void 0,l,t)}this.updateElements(s,0,s.length,t)}updateElements(t,n,i,s){const a=this._cachedMeta.rScale,o=s==="reset";for(let l=n;l<n+i;l++){const d=t[l],h=this.resolveDataElementOptions(l,d.active?"active":s),f=a.getPointPositionForValue(l,this.getParsed(l).r),m=o?a.xCenter:f.x,v=o?a.yCenter:f.y,y={x:m,y:v,angle:f.angle,skip:isNaN(m)||isNaN(v),options:h};this.updateElement(d,l,y,s)}}}nt(_d,"id","radar"),nt(_d,"defaults",{datasetElementType:"line",dataElementType:"point",indexAxis:"r",showLine:!0,elements:{line:{fill:"start"}}}),nt(_d,"overrides",{aspectRatio:1,scales:{r:{type:"radialLinear"}}});class yd extends Fi{getLabelAndValue(t){const n=this._cachedMeta,i=this.chart.data.labels||[],{xScale:s,yScale:a}=n,o=this.getParsed(t),l=s.getLabelForValue(o.x),d=a.getLabelForValue(o.y);return{label:i[t]||"",value:"("+l+", "+d+")"}}update(t){const n=this._cachedMeta,{data:i=[]}=n,s=this.chart._animationsDisabled;let{start:a,count:o}=jm(n,i,s);if(this._drawStart=a,this._drawCount=o,Um(n)&&(a=0,o=i.length),this.options.showLine){const{dataset:l,_dataset:d}=n;l._chart=this.chart,l._datasetIndex=this.index,l._decimated=!!d._decimated,l.points=i;const h=this.resolveDatasetElementOptions(t);h.segment=this.options.segment,this.updateElement(l,void 0,{animated:!s,options:h},t)}this.updateElements(i,a,o,t)}addElements(){const{showLine:t}=this.options;!this.datasetElementType&&t&&(this.datasetElementType=this.chart.registry.getElement("line")),super.addElements()}updateElements(t,n,i,s){const a=s==="reset",{iScale:o,vScale:l,_stacked:d,_dataset:h}=this._cachedMeta,f=this.resolveDataElementOptions(n,s),m=this.getSharedOptions(f),v=this.includeOptions(s,m),y=o.axis,w=l.axis,{spanGaps:x,segment:k}=this.options,D=No(x)?x:Number.POSITIVE_INFINITY,E=this.chart._animationsDisabled||a||s==="none";let B=n>0&&this.getParsed(n-1);for(let S=n;S<n+i;++S){const A=t[S],I=this.getParsed(S),F=E?A:{},L=ee(I[w]),W=F[y]=o.getPixelForValue(I[y],S),X=F[w]=a||L?l.getBasePixel():l.getPixelForValue(d?this.applyStack(l,I,d):I[w],S);F.skip=isNaN(W)||isNaN(X)||L,F.stop=S>0&&Math.abs(I[y]-B[y])>D,k&&(F.parsed=I,F.raw=h.data[S]),v&&(F.options=m||this.resolveDataElementOptions(S,A.active?"active":s)),E||this.updateElement(A,S,F,s),B=I}this.updateSharedOptions(m,s,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 i=t.dataset,s=i.options&&i.options.borderWidth||0;if(!n.length)return s;const a=n[0].size(this.resolveDataElementOptions(0)),o=n[n.length-1].size(this.resolveDataElementOptions(n.length-1));return Math.max(s,a,o)/2}}nt(yd,"id","scatter"),nt(yd,"defaults",{datasetElementType:!1,dataElementType:"point",showLine:!1,fill:!1}),nt(yd,"overrides",{interaction:{mode:"point"},scales:{x:{type:"linear"},y:{type:"linear"}}});var cx=Object.freeze({__proto__:null,BarController:gl,BubbleController:gd,DoughnutController:Ua,LineController:vd,PieController:vh,PolarAreaController:vl,RadarController:_d,ScatterController:yd});function Ga(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class _h{constructor(t){nt(this,"options");this.options=t||{}}static override(t){Object.assign(_h.prototype,t)}init(){}formats(){return Ga()}parse(){return Ga()}format(){return Ga()}add(){return Ga()}diff(){return Ga()}startOf(){return Ga()}endOf(){return Ga()}}var dx={_date:_h};function ux(e,t,n,i){const{controller:s,data:a,_sorted:o}=e,l=s._cachedMeta.iScale;if(l&&t===l.axis&&t!=="r"&&o&&a.length){const d=l._reversePixels?Bw:Ss;if(i){if(s._sharedOptions){const h=a[0],f=typeof h.getRange=="function"&&h.getRange(t);if(f){const m=d(a,t,n-f),v=d(a,t,n+f);return{lo:m.lo,hi:v.hi}}}}else return d(a,t,n)}return{lo:0,hi:a.length-1}}function _l(e,t,n,i,s){const a=e.getSortedVisibleDatasetMetas(),o=n[t];for(let l=0,d=a.length;l<d;++l){const{index:h,data:f}=a[l],{lo:m,hi:v}=ux(a[l],t,o,s);for(let y=m;y<=v;++y){const w=f[y];w.skip||i(w,h,y)}}}function hx(e){const t=e.indexOf("x")!==-1,n=e.indexOf("y")!==-1;return function(i,s){const a=t?Math.abs(i.x-s.x):0,o=n?Math.abs(i.y-s.y):0;return Math.sqrt(Math.pow(a,2)+Math.pow(o,2))}}function yh(e,t,n,i,s){const a=[];return!s&&!e.isPointInArea(t)||_l(e,n,t,function(l,d,h){!s&&!ks(l,e.chartArea,0)||l.inRange(t.x,t.y,i)&&a.push({element:l,datasetIndex:d,index:h})},!0),a}function fx(e,t,n,i){let s=[];function a(o,l,d){const{startAngle:h,endAngle:f}=o.getProps(["startAngle","endAngle"],i),{angle:m}=Lm(o,{x:t.x,y:t.y});cl(m,h,f)&&s.push({element:o,datasetIndex:l,index:d})}return _l(e,n,t,a),s}function px(e,t,n,i,s,a){let o=[];const l=hx(n);let d=Number.POSITIVE_INFINITY;function h(f,m,v){const y=f.inRange(t.x,t.y,s);if(i&&!y)return;const w=f.getCenterPoint(s);if(!(!!a||e.isPointInArea(w))&&!y)return;const k=l(t,w);k<d?(o=[{element:f,datasetIndex:m,index:v}],d=k):k===d&&o.push({element:f,datasetIndex:m,index:v})}return _l(e,n,t,h),o}function bh(e,t,n,i,s,a){return!a&&!e.isPointInArea(t)?[]:n==="r"&&!i?fx(e,t,n,s):px(e,t,n,i,s,a)}function Ag(e,t,n,i,s){const a=[],o=n==="x"?"inXRange":"inYRange";let l=!1;return _l(e,n,t,(d,h,f)=>{d[o](t[n],s)&&(a.push({element:d,datasetIndex:h,index:f}),l=l||d.inRange(t.x,t.y,s))}),i&&!l?[]:a}var mx={evaluateInteractionItems:_l,modes:{index(e,t,n,i){const s=Ya(t,e),a=n.axis||"x",o=n.includeInvisible||!1,l=n.intersect?yh(e,s,a,i,o):bh(e,s,a,!1,i,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,i){const s=Ya(t,e),a=n.axis||"xy",o=n.includeInvisible||!1;let l=n.intersect?yh(e,s,a,i,o):bh(e,s,a,!1,i,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,i){const s=Ya(t,e),a=n.axis||"xy",o=n.includeInvisible||!1;return yh(e,s,a,i,o)},nearest(e,t,n,i){const s=Ya(t,e),a=n.axis||"xy",o=n.includeInvisible||!1;return bh(e,s,a,n.intersect,i,o)},x(e,t,n,i){const s=Ya(t,e);return Ag(e,s,"x",n.intersect,i)},y(e,t,n,i){const s=Ya(t,e);return Ag(e,s,"y",n.intersect,i)}}};const Vg=["left","top","right","bottom"];function yl(e,t){return e.filter(n=>n.pos===t)}function Bg(e,t){return e.filter(n=>Vg.indexOf(n.pos)===-1&&n.box.axis===t)}function bl(e,t){return e.sort((n,i)=>{const s=t?i:n,a=t?n:i;return s.weight===a.weight?s.index-a.index:s.weight-a.weight})}function gx(e){const t=[];let n,i,s,a,o,l;for(n=0,i=(e||[]).length;n<i;++n)s=e[n],{position:a,options:{stack:o,stackWeight:l=1}}=s,t.push({index:n,box:s,pos:a,horizontal:s.isHorizontal(),weight:s.weight,stack:o&&a+o,stackWeight:l});return t}function vx(e){const t={};for(const n of e){const{stack:i,pos:s,stackWeight:a}=n;if(!i||!Vg.includes(s))continue;const o=t[i]||(t[i]={count:0,placed:0,weight:0,size:0});o.count++,o.weight+=a}return t}function _x(e,t){const n=vx(e),{vBoxMaxWidth:i,hBoxMaxHeight:s}=t;let a,o,l;for(a=0,o=e.length;a<o;++a){l=e[a];const{fullSize:d}=l.box,h=n[l.stack],f=h&&l.stackWeight/h.weight;l.horizontal?(l.width=f?f*i:d&&t.availableWidth,l.height=s):(l.width=i,l.height=f?f*s:d&&t.availableHeight)}return n}function yx(e){const t=gx(e),n=bl(t.filter(h=>h.box.fullSize),!0),i=bl(yl(t,"left"),!0),s=bl(yl(t,"right")),a=bl(yl(t,"top"),!0),o=bl(yl(t,"bottom")),l=Bg(t,"x"),d=Bg(t,"y");return{fullSize:n,leftAndTop:i.concat(a),rightAndBottom:s.concat(d).concat(o).concat(l),chartArea:yl(t,"chartArea"),vertical:i.concat(s).concat(d),horizontal:a.concat(o).concat(l)}}function Pg(e,t,n,i){return Math.max(e[n],t[n])+Math.max(e[i],t[i])}function Ng(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 bx(e,t,n,i){const{pos:s,box:a}=n,o=e.maxPadding;if(!Kt(s)){n.size&&(e[s]-=n.size);const m=i[n.stack]||{size:0,count:1};m.size=Math.max(m.size,n.horizontal?a.height:a.width),n.size=m.size/m.count,e[s]+=n.size}a.getPadding&&Ng(o,a.getPadding());const l=Math.max(0,t.outerWidth-Pg(o,e,"left","right")),d=Math.max(0,t.outerHeight-Pg(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 wx(e){const t=e.maxPadding;function n(i){const s=Math.max(t[i]-e[i],0);return e[i]+=s,s}e.y+=n("top"),e.x+=n("left"),n("right"),n("bottom")}function xx(e,t){const n=t.maxPadding;function i(s){const a={left:0,top:0,right:0,bottom:0};return s.forEach(o=>{a[o]=Math.max(t[o],n[o])}),a}return i(e?["left","right"]:["top","bottom"])}function wl(e,t,n,i){const s=[];let a,o,l,d,h,f;for(a=0,o=e.length,h=0;a<o;++a){l=e[a],d=l.box,d.update(l.width||t.w,l.height||t.h,xx(l.horizontal,t));const{same:m,other:v}=bx(t,n,l,i);h|=m&&s.length,f=f||v,d.fullSize||s.push(l)}return h&&wl(s,t,n,i)||f}function bd(e,t,n,i,s){e.top=n,e.left=t,e.right=t+i,e.bottom=n+s,e.width=i,e.height=s}function zg(e,t,n,i){const s=n.padding;let{x:a,y:o}=t;for(const l of e){const d=l.box,h=i[l.stack]||{count:1,placed:0,weight:1},f=l.stackWeight/h.weight||1;if(l.horizontal){const m=t.w*f,v=h.size||d.height;rl(h.start)&&(o=h.start),d.fullSize?bd(d,s.left,o,n.outerWidth-s.right-s.left,v):bd(d,t.left+h.placed,o,m,v),h.start=o,h.placed+=m,o=d.bottom}else{const m=t.h*f,v=h.size||d.width;rl(h.start)&&(a=h.start),d.fullSize?bd(d,a,s.top,v,n.outerHeight-s.bottom-s.top):bd(d,a,t.top+h.placed,v,m),h.start=a,h.placed+=m,a=d.right}}t.x=a,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,i){if(!e)return;const s=pn(e.options.layout.padding),a=Math.max(t-s.width,0),o=Math.max(n-s.height,0),l=yx(e.boxes),d=l.vertical,h=l.horizontal;ue(e.boxes,x=>{typeof x.beforeLayout=="function"&&x.beforeLayout()});const f=d.reduce((x,k)=>k.box.options&&k.box.options.display===!1?x:x+1,0)||1,m=Object.freeze({outerWidth:t,outerHeight:n,padding:s,availableWidth:a,availableHeight:o,vBoxMaxWidth:a/2/f,hBoxMaxHeight:o/2}),v=Object.assign({},s);Ng(v,pn(i));const y=Object.assign({maxPadding:v,w:a,h:o,x:s.left,y:s.top},s),w=_x(d.concat(h),m);wl(l.fullSize,y,m,w),wl(d,y,m,w),wl(h,y,m,w)&&wl(d,y,m,w),wx(y),zg(l.leftAndTop,y,m,w),y.x+=y.w,y.y+=y.h,zg(l.rightAndBottom,y,m,w),e.chartArea={left:y.left,top:y.top,right:y.left+y.w,bottom:y.top+y.h,height:y.h,width:y.w},ue(l.chartArea,x=>{const k=x.box;Object.assign(k,e.chartArea),k.update(y.w,y.h,{left:0,top:0,right:0,bottom:0})})}};class Lg{acquireContext(t,n){}releaseContext(t){return!1}addEventListener(t,n,i){}removeEventListener(t,n,i){}getDevicePixelRatio(){return 1}getMaximumSize(t,n,i,s){return n=Math.max(0,n||t.width),i=i||t.height,{width:n,height:Math.max(0,s?Math.floor(n/s):i)}}isAttached(t){return!0}updateConfig(t){}}class Sx extends Lg{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=!1}}const wd="$chartjs",kx={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},Fg=e=>e===null||e==="";function Cx(e,t){const n=e.style,i=e.getAttribute("height"),s=e.getAttribute("width");if(e[wd]={initial:{height:i,width:s,style:{display:n.display,height:n.height,width:n.width}}},n.display=n.display||"block",n.boxSizing=n.boxSizing||"border-box",Fg(s)){const a=dg(e,"width");a!==void 0&&(e.width=a)}if(Fg(i))if(e.style.height==="")e.height=e.width/(t||2);else{const a=dg(e,"height");a!==void 0&&(e.height=a)}return e}const Rg=M9?{passive:!0}:!1;function Ox(e,t,n){e.addEventListener(t,n,Rg)}function Mx(e,t,n){e.canvas.removeEventListener(t,n,Rg)}function Dx(e,t){const n=kx[e.type]||e.type,{x:i,y:s}=Ya(e,t);return{type:n,chart:t,native:e,x:i!==void 0?i:null,y:s!==void 0?s:null}}function xd(e,t){for(const n of e)if(n===t||n.contains(t))return!0}function Ex(e,t,n){const i=e.canvas,s=new MutationObserver(a=>{let o=!1;for(const l of a)o=o||xd(l.addedNodes,i),o=o&&!xd(l.removedNodes,i);o&&n()});return s.observe(document,{childList:!0,subtree:!0}),s}function Tx(e,t,n){const i=e.canvas,s=new MutationObserver(a=>{let o=!1;for(const l of a)o=o||xd(l.removedNodes,i),o=o&&!xd(l.addedNodes,i);o&&n()});return s.observe(document,{childList:!0,subtree:!0}),s}const xl=new Map;let Hg=0;function Wg(){const e=window.devicePixelRatio;e!==Hg&&(Hg=e,xl.forEach((t,n)=>{n.currentDevicePixelRatio!==e&&t()}))}function Ix(e,t){xl.size||window.addEventListener("resize",Wg),xl.set(e,t)}function Ax(e){xl.delete(e),xl.size||window.removeEventListener("resize",Wg)}function Vx(e,t,n){const i=e.canvas,s=i&&fh(i);if(!s)return;const a=Ym((l,d)=>{const h=s.clientWidth;n(l,d),h<s.clientWidth&&n()},window),o=new ResizeObserver(l=>{const d=l[0],h=d.contentRect.width,f=d.contentRect.height;h===0&&f===0||a(h,f)});return o.observe(s),Ix(e,a),o}function wh(e,t,n){n&&n.disconnect(),t==="resize"&&Ax(e)}function Bx(e,t,n){const i=e.canvas,s=Ym(a=>{e.ctx!==null&&n(Dx(a,e))},e);return Ox(i,t,s),s}class Px extends Lg{acquireContext(t,n){const i=t&&t.getContext&&t.getContext("2d");return i&&i.canvas===t?(Cx(t,n),i):null}releaseContext(t){const n=t.canvas;if(!n[wd])return!1;const i=n[wd].initial;["height","width"].forEach(a=>{const o=i[a];ee(o)?n.removeAttribute(a):n.setAttribute(a,o)});const s=i.style||{};return Object.keys(s).forEach(a=>{n.style[a]=s[a]}),n.width=n.width,delete n[wd],!0}addEventListener(t,n,i){this.removeEventListener(t,n);const s=t.$proxies||(t.$proxies={}),o={attach:Ex,detach:Tx,resize:Vx}[n]||Bx;s[n]=o(t,n,i)}removeEventListener(t,n){const i=t.$proxies||(t.$proxies={}),s=i[n];if(!s)return;({attach:wh,detach:wh,resize:wh}[n]||Mx)(t,n,s),i[n]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,n,i,s){return O9(t,n,i,s)}isAttached(t){const n=fh(t);return!!(n&&n.isConnected)}}function Nx(e){return!lg()||typeof OffscreenCanvas<"u"&&e instanceof OffscreenCanvas?Sx:Px}class Ri{constructor(){nt(this,"x");nt(this,"y");nt(this,"active",!1);nt(this,"options");nt(this,"$animations")}tooltipPosition(t){const{x:n,y:i}=this.getProps(["x","y"],t);return{x:n,y:i}}hasValue(){return No(this.x)&&No(this.y)}getProps(t,n){const i=this.$animations;if(!n||!i)return this;const s={};return t.forEach(a=>{s[a]=i[a]&&i[a].active()?i[a]._to:this[a]}),s}}nt(Ri,"defaults",{}),nt(Ri,"defaultRoutes");function zx(e,t){const n=e.options.ticks,i=Lx(e),s=Math.min(n.maxTicksLimit||i,i),a=n.major.enabled?Rx(t):[],o=a.length,l=a[0],d=a[o-1],h=[];if(o>s)return Hx(t,h,a,o/s),h;const f=Fx(a,t,s);if(o>0){let m,v;const y=o>1?Math.round((d-l)/(o-1)):null;for(Sd(t,h,f,ee(y)?0:l-y,l),m=0,v=o-1;m<v;m++)Sd(t,h,f,a[m],a[m+1]);return Sd(t,h,f,d,ee(y)?t.length:d+y),h}return Sd(t,h,f),h}function Lx(e){const t=e.options.offset,n=e._tickSize(),i=e._length/n+(t?0:1),s=e._maxLength/n;return Math.floor(Math.min(i,s))}function Fx(e,t,n){const i=Wx(e),s=t.length/n;if(!i)return Math.max(s,1);const a=Tw(i);for(let o=0,l=a.length-1;o<l;o++){const d=a[o];if(d>s)return d}return Math.max(s,1)}function Rx(e){const t=[];let n,i;for(n=0,i=e.length;n<i;n++)e[n].major&&t.push(n);return t}function Hx(e,t,n,i){let s=0,a=n[0],o;for(i=Math.ceil(i),o=0;o<e.length;o++)o===a&&(t.push(e[o]),s++,a=n[s*i])}function Sd(e,t,n,i,s){const a=Vt(i,0),o=Math.min(Vt(s,e.length),e.length);let l=0,d,h,f;for(n=Math.ceil(n),s&&(d=s-i,n=d/Math.floor(d/n)),f=a;f<0;)l++,f=Math.round(a+l*n);for(h=Math.max(a,0);h<o;h++)h===f&&(t.push(e[h]),l++,f=Math.round(a+l*n))}function Wx(e){const t=e.length;let n,i;if(t<2)return!1;for(i=e[0],n=1;n<t;++n)if(e[n]-e[n-1]!==i)return!1;return i}const Yx=e=>e==="left"?"right":e==="right"?"left":e,Yg=(e,t,n)=>t==="top"||t==="left"?e[t]+n:e[t]-n,jg=(e,t)=>Math.min(t||e,e);function Ug(e,t){const n=[],i=e.length/t,s=e.length;let a=0;for(;a<s;a+=i)n.push(e[Math.floor(a)]);return n}function jx(e,t,n){const i=e.ticks.length,s=Math.min(t,i-1),a=e._startPixel,o=e._endPixel,l=1e-6;let d=e.getPixelForTick(s),h;if(!(n&&(i===1?h=Math.max(d-a,o-d):t===0?h=(e.getPixelForTick(1)-d)/2:h=(d-e.getPixelForTick(s-1))/2,d+=s<t?h:-h,d<a-l||d>o+l)))return d}function Ux(e,t){ue(e,n=>{const i=n.gc,s=i.length/2;let a;if(s>t){for(a=0;a<s;++a)delete n.data[i[a]];i.splice(0,s)}})}function Sl(e){return e.drawTicks?e.tickLength:0}function Gg(e,t){if(!e.display)return 0;const n=$e(e.font,t),i=pn(e.padding);return(Se(e.text)?e.text.length:1)*n.lineHeight+i.height}function Gx(e,t){return ia(e,{scale:t,type:"scale"})}function Kx(e,t,n){return ia(e,{tick:n,index:t,type:"tick"})}function Zx(e,t,n){let i=ih(e);return(n&&t!=="right"||!n&&t==="right")&&(i=Yx(i)),i}function Xx(e,t,n,i){const{top:s,left:a,bottom:o,right:l,chart:d}=e,{chartArea:h,scales:f}=d;let m=0,v,y,w;const x=o-s,k=l-a;if(e.isHorizontal()){if(y=fn(i,a,l),Kt(n)){const D=Object.keys(n)[0],E=n[D];w=f[D].getPixelForValue(E)+x-t}else n==="center"?w=(h.bottom+h.top)/2+x-t:w=Yg(e,n,t);v=l-a}else{if(Kt(n)){const D=Object.keys(n)[0],E=n[D];y=f[D].getPixelForValue(E)-k+t}else n==="center"?y=(h.left+h.right)/2-k+t:y=Yg(e,n,t);w=fn(i,o,s),m=n==="left"?-Ne:Ne}return{titleX:y,titleY:w,maxWidth:v,rotation:m}}class Ka extends Ri{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:i,_suggestedMax:s}=this;return t=Gn(t,Number.POSITIVE_INFINITY),n=Gn(n,Number.NEGATIVE_INFINITY),i=Gn(i,Number.POSITIVE_INFINITY),s=Gn(s,Number.NEGATIVE_INFINITY),{min:Gn(t,i),max:Gn(n,s),minDefined:Pe(t),maxDefined:Pe(n)}}getMinMax(t){let{min:n,max:i,minDefined:s,maxDefined:a}=this.getUserBounds(),o;if(s&&a)return{min:n,max:i};const l=this.getMatchingVisibleMetas();for(let d=0,h=l.length;d<h;++d)o=l[d].controller.getMinMax(this,t),s||(n=Math.min(n,o.min)),a||(i=Math.max(i,o.max));return n=a&&n>i?i:n,i=s&&n>i?n:i,{min:Gn(n,Gn(i,n)),max:Gn(i,Gn(n,i))}}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(){we(this.options.beforeUpdate,[this])}update(t,n,i){const{beginAtZero:s,grace:a,ticks:o}=this.options,l=o.sampleSize;this.beforeUpdate(),this.maxWidth=t,this.maxHeight=n,this._margins=i=Object.assign({left:0,right:0,top:0,bottom:0},i),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+i.left+i.right:this.height+i.top+i.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=s9(this,a,s),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const d=l<this.ticks.length;this._convertTicksToLabels(d?Ug(this.ticks,l):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),o.display&&(o.autoSkip||o.source==="auto")&&(this.ticks=zx(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,i;this.isHorizontal()?(n=this.left,i=this.right):(n=this.top,i=this.bottom,t=!t),this._startPixel=n,this._endPixel=i,this._reversePixels=t,this._length=i-n,this._alignToPixels=this.options.alignToPixels}afterUpdate(){we(this.options.afterUpdate,[this])}beforeSetDimensions(){we(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(){we(this.options.afterSetDimensions,[this])}_callHooks(t){this.chart.notifyPlugins(t,this.getContext()),we(this.options[t],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){we(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(t){const n=this.options.ticks;let i,s,a;for(i=0,s=t.length;i<s;i++)a=t[i],a.label=we(n.callback,[a.value,i,t],this)}afterTickToLabelConversion(){we(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){we(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){const t=this.options,n=t.ticks,i=jg(this.ticks.length,t.ticks.maxTicksLimit),s=n.minRotation||0,a=n.maxRotation;let o=s,l,d,h;if(!this._isVisible()||!n.display||s>=a||i<=1||!this.isHorizontal()){this.labelRotation=s;return}const f=this._getLabelSizes(),m=f.widest.width,v=f.highest.height,y=an(this.chart.width-m,0,this.maxWidth);l=t.offset?this.maxWidth/i:y/(i-1),m+6>l&&(l=y/(i-(t.offset?.5:1)),d=this.maxHeight-Sl(t.grid)-n.padding-Gg(t.title,this.chart.options.font),h=Math.sqrt(m*m+v*v),o=th(Math.min(Math.asin(an((f.highest.height+6)/l,-1,1)),Math.asin(an(d/h,-1,1))-Math.asin(an(v/h,-1,1)))),o=Math.max(s,Math.min(a,o))),this.labelRotation=o}afterCalculateLabelRotation(){we(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){we(this.options.beforeFit,[this])}fit(){const t={width:0,height:0},{chart:n,options:{ticks:i,title:s,grid:a}}=this,o=this._isVisible(),l=this.isHorizontal();if(o){const d=Gg(s,n.options.font);if(l?(t.width=this.maxWidth,t.height=Sl(a)+d):(t.height=this.maxHeight,t.width=Sl(a)+d),i.display&&this.ticks.length){const{first:h,last:f,widest:m,highest:v}=this._getLabelSizes(),y=i.padding*2,w=Li(this.labelRotation),x=Math.cos(w),k=Math.sin(w);if(l){const D=i.mirror?0:k*m.width+x*v.height;t.height=Math.min(this.maxHeight,t.height+D+y)}else{const D=i.mirror?0:x*m.width+k*v.height;t.width=Math.min(this.maxWidth,t.width+D+y)}this._calculatePadding(h,f,k,x)}}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,i,s){const{ticks:{align:a,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 v=0,y=0;d?h?(v=s*t.width,y=i*n.height):(v=i*t.height,y=s*n.width):a==="start"?y=n.width:a==="end"?v=t.width:a!=="inner"&&(v=t.width/2,y=n.width/2),this.paddingLeft=Math.max((v-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;a==="start"?(f=0,m=t.height):a==="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(){we(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,i;for(n=0,i=t.length;n<i;n++)ee(t[n].label)&&(t.splice(n,1),i--,n--);this.afterTickToLabelConversion()}_getLabelSizes(){let t=this._labelSizes;if(!t){const n=this.options.ticks.sampleSize;let i=this.ticks;n<i.length&&(i=Ug(i,n)),this._labelSizes=t=this._computeLabelSizes(i,i.length,this.options.ticks.maxTicksLimit)}return t}_computeLabelSizes(t,n,i){const{ctx:s,_longestTextCache:a}=this,o=[],l=[],d=Math.floor(n/jg(n,i));let h=0,f=0,m,v,y,w,x,k,D,E,B,S,A;for(m=0;m<n;m+=d){if(w=t[m].label,x=this._resolveTickFontOptions(m),s.font=k=x.string,D=a[k]=a[k]||{data:{},gc:[]},E=x.lineHeight,B=S=0,!ee(w)&&!Se(w))B=cd(s,D.data,D.gc,B,w),S=E;else if(Se(w))for(v=0,y=w.length;v<y;++v)A=w[v],!ee(A)&&!Se(A)&&(B=cd(s,D.data,D.gc,B,A),S+=E);o.push(B),l.push(S),h=Math.max(B,h),f=Math.max(S,f)}Ux(a,n);const I=o.indexOf(h),F=l.indexOf(f),L=W=>({width:o[W]||0,height:l[W]||0});return{first:L(0),last:L(n-1),widest:L(I),highest:L(F),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 Vw(this._alignToPixels?Fa(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 i=n[t];return i.$context||(i.$context=Kx(this.getContext(),t,i))}return this.$context||(this.$context=Gx(this.chart.getContext(),this))}_tickSize(){const t=this.options.ticks,n=Li(this.labelRotation),i=Math.abs(Math.cos(n)),s=Math.abs(Math.sin(n)),a=this._getLabelSizes(),o=t.autoSkipPadding||0,l=a?a.widest.width+o:0,d=a?a.highest.height+o:0;return this.isHorizontal()?d*i>l*s?l/i:d/s:d*s<l*i?d/i:l/s}_isVisible(){const t=this.options.display;return t!=="auto"?!!t:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(t){const n=this.axis,i=this.chart,s=this.options,{grid:a,position:o,border:l}=s,d=a.offset,h=this.isHorizontal(),m=this.ticks.length+(d?1:0),v=Sl(a),y=[],w=l.setContext(this.getContext()),x=w.display?w.width:0,k=x/2,D=function(ft){return Fa(i,ft,x)};let E,B,S,A,I,F,L,W,X,Z,Q,et;if(o==="top")E=D(this.bottom),F=this.bottom-v,W=E-k,Z=D(t.top)+k,et=t.bottom;else if(o==="bottom")E=D(this.top),Z=t.top,et=D(t.bottom)-k,F=E+k,W=this.top+v;else if(o==="left")E=D(this.right),I=this.right-v,L=E-k,X=D(t.left)+k,Q=t.right;else if(o==="right")E=D(this.left),X=t.left,Q=D(t.right)-k,I=E+k,L=this.left+v;else if(n==="x"){if(o==="center")E=D((t.top+t.bottom)/2+.5);else if(Kt(o)){const ft=Object.keys(o)[0],lt=o[ft];E=D(this.chart.scales[ft].getPixelForValue(lt))}Z=t.top,et=t.bottom,F=E+k,W=F+v}else if(n==="y"){if(o==="center")E=D((t.left+t.right)/2);else if(Kt(o)){const ft=Object.keys(o)[0],lt=o[ft];E=D(this.chart.scales[ft].getPixelForValue(lt))}I=E-k,L=I-v,X=t.left,Q=t.right}const gt=Vt(s.ticks.maxTicksLimit,m),at=Math.max(1,Math.ceil(m/gt));for(B=0;B<m;B+=at){const ft=this.getContext(B),lt=a.setContext(ft),vt=l.setContext(ft),xt=lt.lineWidth,ct=lt.color,R=vt.dash||[],q=vt.dashOffset,ot=lt.tickWidth,pt=lt.tickColor,$=lt.tickBorderDash||[],_t=lt.tickBorderDashOffset;S=jx(this,B,d),S!==void 0&&(A=Fa(i,S,xt),h?I=L=X=Q=A:F=W=Z=et=A,y.push({tx1:I,ty1:F,tx2:L,ty2:W,x1:X,y1:Z,x2:Q,y2:et,width:xt,color:ct,borderDash:R,borderDashOffset:q,tickWidth:ot,tickColor:pt,tickBorderDash:$,tickBorderDashOffset:_t}))}return this._ticksLength=m,this._borderValue=E,y}_computeLabelItems(t){const n=this.axis,i=this.options,{position:s,ticks:a}=i,o=this.isHorizontal(),l=this.ticks,{align:d,crossAlign:h,padding:f,mirror:m}=a,v=Sl(i.grid),y=v+f,w=m?-f:y,x=-Li(this.labelRotation),k=[];let D,E,B,S,A,I,F,L,W,X,Z,Q,et="middle";if(s==="top")I=this.bottom-w,F=this._getXAxisLabelAlignment();else if(s==="bottom")I=this.top+w,F=this._getXAxisLabelAlignment();else if(s==="left"){const at=this._getYAxisLabelAlignment(v);F=at.textAlign,A=at.x}else if(s==="right"){const at=this._getYAxisLabelAlignment(v);F=at.textAlign,A=at.x}else if(n==="x"){if(s==="center")I=(t.top+t.bottom)/2+y;else if(Kt(s)){const at=Object.keys(s)[0],ft=s[at];I=this.chart.scales[at].getPixelForValue(ft)+y}F=this._getXAxisLabelAlignment()}else if(n==="y"){if(s==="center")A=(t.left+t.right)/2-y;else if(Kt(s)){const at=Object.keys(s)[0],ft=s[at];A=this.chart.scales[at].getPixelForValue(ft)}F=this._getYAxisLabelAlignment(v).textAlign}n==="y"&&(d==="start"?et="top":d==="end"&&(et="bottom"));const gt=this._getLabelSizes();for(D=0,E=l.length;D<E;++D){B=l[D],S=B.label;const at=a.setContext(this.getContext(D));L=this.getPixelForTick(D)+a.labelOffset,W=this._resolveTickFontOptions(D),X=W.lineHeight,Z=Se(S)?S.length:1;const ft=Z/2,lt=at.color,vt=at.textStrokeColor,xt=at.textStrokeWidth;let ct=F;o?(A=L,F==="inner"&&(D===E-1?ct=this.options.reverse?"left":"right":D===0?ct=this.options.reverse?"right":"left":ct="center"),s==="top"?h==="near"||x!==0?Q=-Z*X+X/2:h==="center"?Q=-gt.highest.height/2-ft*X+X:Q=-gt.highest.height+X/2:h==="near"||x!==0?Q=X/2:h==="center"?Q=gt.highest.height/2-ft*X:Q=gt.highest.height-Z*X,m&&(Q*=-1),x!==0&&!at.showLabelBackdrop&&(A+=X/2*Math.sin(x))):(I=L,Q=(1-Z)*X/2);let R;if(at.showLabelBackdrop){const q=pn(at.backdropPadding),ot=gt.heights[D],pt=gt.widths[D];let $=Q-q.top,_t=0-q.left;switch(et){case"middle":$-=ot/2;break;case"bottom":$-=ot;break}switch(F){case"center":_t-=pt/2;break;case"right":_t-=pt;break}R={left:_t,top:$,width:pt+q.width,height:ot+q.height,color:at.backdropColor}}k.push({label:S,font:W,textOffset:Q,options:{rotation:x,color:lt,strokeColor:vt,strokeWidth:xt,textAlign:ct,textBaseline:et,translation:[A,I],backdrop:R}})}return k}_getXAxisLabelAlignment(){const{position:t,ticks:n}=this.options;if(-Li(this.labelRotation))return t==="top"?"left":"right";let s="center";return n.align==="start"?s="left":n.align==="end"?s="right":n.align==="inner"&&(s="inner"),s}_getYAxisLabelAlignment(t){const{position:n,ticks:{crossAlign:i,mirror:s,padding:a}}=this.options,o=this._getLabelSizes(),l=t+a,d=o.widest.width;let h,f;return n==="left"?s?(f=this.right+a,i==="near"?h="left":i==="center"?(h="center",f+=d/2):(h="right",f+=d)):(f=this.right-l,i==="near"?h="right":i==="center"?(h="center",f-=d/2):(h="left",f=this.left)):n==="right"?s?(f=this.left+a,i==="near"?h="right":i==="center"?(h="center",f-=d/2):(h="left",f-=d)):(f=this.left+l,i==="near"?h="left":i==="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:i,top:s,width:a,height:o}=this;n&&(t.save(),t.fillStyle=n,t.fillRect(i,s,a,o),t.restore())}getLineWidthForValue(t){const n=this.options.grid;if(!this._isVisible()||!n.display)return 0;const s=this.ticks.findIndex(a=>a.value===t);return s>=0?n.setContext(this.getContext(s)).lineWidth:0}drawGrid(t){const n=this.options.grid,i=this.ctx,s=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(t));let a,o;const l=(d,h,f)=>{!f.width||!f.color||(i.save(),i.lineWidth=f.width,i.strokeStyle=f.color,i.setLineDash(f.borderDash||[]),i.lineDashOffset=f.borderDashOffset,i.beginPath(),i.moveTo(d.x,d.y),i.lineTo(h.x,h.y),i.stroke(),i.restore())};if(n.display)for(a=0,o=s.length;a<o;++a){const d=s[a];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:i,grid:s}}=this,a=i.setContext(this.getContext()),o=i.display?a.width:0;if(!o)return;const l=s.setContext(this.getContext(0)).lineWidth,d=this._borderValue;let h,f,m,v;this.isHorizontal()?(h=Fa(t,this.left,o)-o/2,f=Fa(t,this.right,l)+l/2,m=v=d):(m=Fa(t,this.top,o)-o/2,v=Fa(t,this.bottom,l)+l/2,h=f=d),n.save(),n.lineWidth=a.width,n.strokeStyle=a.color,n.beginPath(),n.moveTo(h,m),n.lineTo(f,v),n.stroke(),n.restore()}drawLabels(t){if(!this.options.ticks.display)return;const i=this.ctx,s=this._computeLabelArea();s&&dd(i,s);const a=this.getLabelItems(t);for(const o of a){const l=o.options,d=o.font,h=o.label,f=o.textOffset;Ra(i,h,0,f,d,l)}s&&ud(i)}drawTitle(){const{ctx:t,options:{position:n,title:i,reverse:s}}=this;if(!i.display)return;const a=$e(i.font),o=pn(i.padding),l=i.align;let d=a.lineHeight/2;n==="bottom"||n==="center"||Kt(n)?(d+=o.bottom,Se(i.text)&&(d+=a.lineHeight*(i.text.length-1))):d+=o.top;const{titleX:h,titleY:f,maxWidth:m,rotation:v}=Xx(this,d,n,l);Ra(t,i.text,0,0,a,{color:i.color,maxWidth:m,rotation:v,textAlign:Zx(l,n,s),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,i=Vt(t.grid&&t.grid.z,-1),s=Vt(t.border&&t.border.z,0);return!this._isVisible()||this.draw!==Ka.prototype.draw?[{z:n,draw:a=>{this.draw(a)}}]:[{z:i,draw:a=>{this.drawBackground(),this.drawGrid(a),this.drawTitle()}},{z:s,draw:()=>{this.drawBorder()}},{z:n,draw:a=>{this.drawLabels(a)}}]}getMatchingVisibleMetas(t){const n=this.chart.getSortedVisibleDatasetMetas(),i=this.axis+"AxisID",s=[];let a,o;for(a=0,o=n.length;a<o;++a){const l=n[a];l[i]===this.id&&(!t||l.type===t)&&s.push(l)}return s}_resolveTickFontOptions(t){const n=this.options.ticks.setContext(this.getContext(t));return $e(n.font)}_maxDigits(){const t=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/t}}class kd{constructor(t,n,i){this.type=t,this.scope=n,this.override=i,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 i;qx(n)&&(i=this.register(n));const s=this.items,a=t.id,o=this.scope+"."+a;if(!a)throw new Error("class does not have id: "+t);return a in s||(s[a]=t,Jx(t,o,i),this.override&&ze.override(t.id,t.overrides)),o}get(t){return this.items[t]}unregister(t){const n=this.items,i=t.id,s=this.scope;i in n&&delete n[i],s&&i in ze[s]&&(delete ze[s][i],this.override&&delete La[i])}}function Jx(e,t,n){const i=al(Object.create(null),[n?ze.get(n):{},ze.get(t),e.defaults]);ze.set(t,i),e.defaultRoutes&&Qx(t,e.defaultRoutes),e.descriptors&&ze.describe(t,e.descriptors)}function Qx(e,t){Object.keys(t).forEach(n=>{const i=n.split("."),s=i.pop(),a=[e].concat(i).join("."),o=t[n].split("."),l=o.pop(),d=o.join(".");ze.route(a,s,d,l)})}function qx(e){return"id"in e&&"defaults"in e}class $x{constructor(){this.controllers=new kd(Fi,"datasets",!0),this.elements=new kd(Ri,"elements"),this.plugins=new kd(Object,"plugins"),this.scales=new kd(Ka,"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,i){[...n].forEach(s=>{const a=i||this._getRegistryForType(s);i||a.isForType(s)||a===this.plugins&&s.id?this._exec(t,a,s):ue(s,o=>{const l=i||this._getRegistryForType(o);this._exec(t,l,o)})})}_exec(t,n,i){const s=$1(t);we(i["before"+s],[],i),n[t](i),we(i["after"+s],[],i)}_getRegistryForType(t){for(let n=0;n<this._typedRegistries.length;n++){const i=this._typedRegistries[n];if(i.isForType(t))return i}return this.plugins}_get(t,n,i){const s=n.get(t);if(s===void 0)throw new Error('"'+t+'" is not a registered '+i+".");return s}}var rs=new $x;class tS{constructor(){this._init=[]}notify(t,n,i,s){n==="beforeInit"&&(this._init=this._createDescriptors(t,!0),this._notify(this._init,t,"install"));const a=s?this._descriptors(t).filter(s):this._descriptors(t),o=this._notify(a,t,n,i);return n==="afterDestroy"&&(this._notify(a,t,"stop"),this._notify(this._init,t,"uninstall")),o}_notify(t,n,i,s){s=s||{};for(const a of t){const o=a.plugin,l=o[i],d=[n,s,a.options];if(we(l,d,o)===!1&&s.cancelable)return!1}return!0}invalidate(){ee(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 i=t&&t.config,s=Vt(i.options&&i.options.plugins,{}),a=eS(i);return s===!1&&!n?[]:iS(t,a,s,n)}_notifyStateChanges(t){const n=this._oldCache||[],i=this._cache,s=(a,o)=>a.filter(l=>!o.some(d=>l.plugin.id===d.plugin.id));this._notify(s(n,i),t,"stop"),this._notify(s(i,n),t,"start")}}function eS(e){const t={},n=[],i=Object.keys(rs.plugins.items);for(let a=0;a<i.length;a++)n.push(rs.getPlugin(i[a]));const s=e.plugins||[];for(let a=0;a<s.length;a++){const o=s[a];n.indexOf(o)===-1&&(n.push(o),t[o.id]=!0)}return{plugins:n,localIds:t}}function nS(e,t){return!t&&e===!1?null:e===!0?{}:e}function iS(e,{plugins:t,localIds:n},i,s){const a=[],o=e.getContext();for(const l of t){const d=l.id,h=nS(i[d],s);h!==null&&a.push({plugin:l,options:sS(e.config,{plugin:l,local:n[d]},h,o)})}return a}function sS(e,{plugin:t,local:n},i,s){const a=e.pluginScopeKeys(t),o=e.getOptionScopes(i,a);return n&&t.defaults&&o.push(t.defaults),e.createResolver(o,s,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function xh(e,t){const n=ze.datasets[e]||{};return((t.datasets||{})[e]||{}).indexAxis||t.indexAxis||n.indexAxis||"x"}function aS(e,t){let n=e;return e==="_index_"?n=t:e==="_value_"&&(n=t==="x"?"y":"x"),n}function oS(e,t){return e===t?"_index_":"_value_"}function Kg(e){if(e==="x"||e==="y"||e==="r")return e}function rS(e){if(e==="top"||e==="bottom")return"x";if(e==="left"||e==="right")return"y"}function Sh(e,...t){if(Kg(e))return e;for(const n of t){const i=n.axis||rS(n.position)||e.length>1&&Kg(e[0].toLowerCase());if(i)return i}throw new Error(`Cannot determine type of '${e}' axis. Please provide 'axis' or 'position' option.`)}function Zg(e,t,n){if(n[t+"AxisID"]===e)return{axis:t}}function lS(e,t){if(t.data&&t.data.datasets){const n=t.data.datasets.filter(i=>i.xAxisID===e||i.yAxisID===e);if(n.length)return Zg(e,"x",n[0])||Zg(e,"y",n[0])}return{}}function cS(e,t){const n=La[e.type]||{scales:{}},i=t.scales||{},s=xh(e.type,t),a=Object.create(null);return Object.keys(i).forEach(o=>{const l=i[o];if(!Kt(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=Sh(o,l,lS(o,e),ze.scales[l.type]),h=oS(d,s),f=n.scales||{};a[o]=ol(Object.create(null),[{axis:d},l,f[d],f[h]])}),e.data.datasets.forEach(o=>{const l=o.type||e.type,d=o.indexAxis||xh(l,t),f=(La[l]||{}).scales||{};Object.keys(f).forEach(m=>{const v=aS(m,d),y=o[v+"AxisID"]||v;a[y]=a[y]||Object.create(null),ol(a[y],[{axis:v},i[y],f[m]])})}),Object.keys(a).forEach(o=>{const l=a[o];ol(l,[ze.scales[l.type],ze.scale])}),a}function Xg(e){const t=e.options||(e.options={});t.plugins=Vt(t.plugins,{}),t.scales=cS(e,t)}function Jg(e){return e=e||{},e.datasets=e.datasets||[],e.labels=e.labels||[],e}function dS(e){return e=e||{},e.data=Jg(e.data),Xg(e),e}const Qg=new Map,qg=new Set;function Cd(e,t){let n=Qg.get(e);return n||(n=t(),Qg.set(e,n),qg.add(n)),n}const kl=(e,t,n)=>{const i=ta(t,n);i!==void 0&&e.add(i)};class uS{constructor(t){this._config=dS(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=Jg(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(),Xg(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return Cd(t,()=>[[`datasets.${t}`,""]])}datasetAnimationScopeKeys(t,n){return Cd(`${t}.transition.${n}`,()=>[[`datasets.${t}.transitions.${n}`,`transitions.${n}`],[`datasets.${t}`,""]])}datasetElementScopeKeys(t,n){return Cd(`${t}-${n}`,()=>[[`datasets.${t}.elements.${n}`,`datasets.${t}`,`elements.${n}`,""]])}pluginScopeKeys(t){const n=t.id,i=this.type;return Cd(`${i}-plugin-${n}`,()=>[[`plugins.${n}`,...t.additionalOptionScopes||[]]])}_cachedScopes(t,n){const i=this._scopeCache;let s=i.get(t);return(!s||n)&&(s=new Map,i.set(t,s)),s}getOptionScopes(t,n,i){const{options:s,type:a}=this,o=this._cachedScopes(t,i),l=o.get(n);if(l)return l;const d=new Set;n.forEach(f=>{t&&(d.add(t),f.forEach(m=>kl(d,t,m))),f.forEach(m=>kl(d,s,m)),f.forEach(m=>kl(d,La[a]||{},m)),f.forEach(m=>kl(d,ze,m)),f.forEach(m=>kl(d,oh,m))});const h=Array.from(d);return h.length===0&&h.push(Object.create(null)),qg.has(n)&&o.set(n,h),h}chartOptionScopes(){const{options:t,type:n}=this;return[t,La[n]||{},ze.datasets[n]||{},{type:n},ze,oh]}resolveNamedOptions(t,n,i,s=[""]){const a={$shared:!0},{resolver:o,subPrefixes:l}=$g(this._resolverCache,t,s);let d=o;if(fS(o,n)){a.$shared=!1,i=ea(i)?i():i;const h=this.createResolver(t,i,l);d=zo(o,i,h)}for(const h of n)a[h]=d[h];return a}createResolver(t,n,i=[""],s){const{resolver:a}=$g(this._resolverCache,t,i);return Kt(n)?zo(a,n,void 0,s):a}}function $g(e,t,n){let i=e.get(t);i||(i=new Map,e.set(t,i));const s=n.join();let a=i.get(s);return a||(a={resolver:dh(t,n),subPrefixes:n.filter(l=>!l.toLowerCase().includes("hover"))},i.set(s,a)),a}const hS=e=>Kt(e)&&Object.getOwnPropertyNames(e).reduce((t,n)=>t||ea(e[n]),!1);function fS(e,t){const{isScriptable:n,isIndexable:i}=tg(e);for(const s of t){const a=n(s),o=i(s),l=(o||a)&&e[s];if(a&&(ea(l)||hS(l))||o&&Se(l))return!0}return!1}var pS="4.3.0";const mS=["top","bottom","left","right","chartArea"];function t2(e,t){return e==="top"||e==="bottom"||mS.indexOf(e)===-1&&t==="x"}function e2(e,t){return function(n,i){return n[e]===i[e]?n[t]-i[t]:n[e]-i[e]}}function n2(e){const t=e.chart,n=t.options.animation;t.notifyPlugins("afterRender"),we(n&&n.onComplete,[e],t)}function gS(e){const t=e.chart,n=t.options.animation;we(n&&n.onProgress,[e],t)}function i2(e){return lg()&&typeof e=="string"?e=document.getElementById(e):e&&e.length&&(e=e[0]),e&&e.canvas&&(e=e.canvas),e}const Od={},s2=e=>{const t=i2(e);return Object.values(Od).filter(n=>n.canvas===t).pop()};function vS(e,t,n){const i=Object.keys(e);for(const s of i){const a=+s;if(a>=t){const o=e[s];delete e[s],(n>0||a>t)&&(e[a+n]=o)}}}function _S(e,t,n,i){return!n||e.type==="mouseout"?null:i?t:e}function yS(e){const{xScale:t,yScale:n}=e;if(t&&n)return{left:t.left,right:t.right,top:n.top,bottom:n.bottom}}class Hi{static register(...t){rs.add(...t),a2()}static unregister(...t){rs.remove(...t),a2()}constructor(t,n){const i=this.config=new uS(n),s=i2(t),a=s2(s);if(a)throw new Error("Canvas is already in use. Chart with ID '"+a.id+"' must be destroyed before the canvas with ID '"+a.canvas.id+"' can be reused.");const o=i.createResolver(i.chartOptionScopes(),this.getContext());this.platform=new(i.platform||Nx(s)),this.platform.updateConfig(i);const l=this.platform.acquireContext(s,o.aspectRatio),d=l&&l.canvas,h=d&&d.height,f=d&&d.width;if(this.id=ww(),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 tS,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=zw(m=>this.update(m),o.resizeDelay||0),this._dataChanges=[],Od[this.id]=this,!l||!d){console.error("Failed to create chart: can't acquire context from the given item");return}Cs.listen(this,"complete",n2),Cs.listen(this,"progress",gS),this._initialize(),this.attached&&this.update()}get aspectRatio(){const{options:{aspectRatio:t,maintainAspectRatio:n},width:i,height:s,_aspectRatio:a}=this;return ee(t)?n&&a?a:s?i/s: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 rs}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():cg(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return Qm(this.canvas,this.ctx),this}stop(){return Cs.stop(this),this}resize(t,n){Cs.running(this)?this._resizeBeforeDraw={width:t,height:n}:this._resize(t,n)}_resize(t,n){const i=this.options,s=this.canvas,a=i.maintainAspectRatio&&this.aspectRatio,o=this.platform.getMaximumSize(s,t,n,a),l=i.devicePixelRatio||this.platform.getDevicePixelRatio(),d=this.width?"resize":"attach";this.width=o.width,this.height=o.height,this._aspectRatio=this.aspectRatio,cg(this,l,!0)&&(this.notifyPlugins("resize",{size:o}),we(i.onResize,[this,o],this),this.attached&&this._doResize(d)&&this.render())}ensureScalesHaveIDs(){const n=this.options.scales||{};ue(n,(i,s)=>{i.id=s})}buildOrUpdateScales(){const t=this.options,n=t.scales,i=this.scales,s=Object.keys(i).reduce((o,l)=>(o[l]=!1,o),{});let a=[];n&&(a=a.concat(Object.keys(n).map(o=>{const l=n[o],d=Sh(o,l),h=d==="r",f=d==="x";return{options:l,dposition:h?"chartArea":f?"bottom":"left",dtype:h?"radialLinear":f?"category":"linear"}}))),ue(a,o=>{const l=o.options,d=l.id,h=Sh(d,l),f=Vt(l.type,o.dtype);(l.position===void 0||t2(l.position,h)!==t2(o.dposition))&&(l.position=o.dposition),s[d]=!0;let m=null;if(d in i&&i[d].type===f)m=i[d];else{const v=rs.getScale(f);m=new v({id:d,type:f,ctx:this.ctx,chart:this}),i[m.id]=m}m.init(l,t)}),ue(s,(o,l)=>{o||delete i[l]}),ue(i,o=>{mn.configure(this,o,o.options),mn.addBox(this,o)})}_updateMetasets(){const t=this._metasets,n=this.data.datasets.length,i=t.length;if(t.sort((s,a)=>s.index-a.index),i>n){for(let s=n;s<i;++s)this._destroyDatasetMeta(s);t.splice(n,i-n)}this._sortedMetasets=t.slice(0).sort(e2("order","index"))}_removeUnreferencedMetasets(){const{_metasets:t,data:{datasets:n}}=this;t.length>n.length&&delete this._stacks,t.forEach((i,s)=>{n.filter(a=>a===i._dataset).length===0&&this._destroyDatasetMeta(s)})}buildOrUpdateControllers(){const t=[],n=this.data.datasets;let i,s;for(this._removeUnreferencedMetasets(),i=0,s=n.length;i<s;i++){const a=n[i];let o=this.getDatasetMeta(i);const l=a.type||this.config.type;if(o.type&&o.type!==l&&(this._destroyDatasetMeta(i),o=this.getDatasetMeta(i)),o.type=l,o.indexAxis=a.indexAxis||xh(l,this.options),o.order=a.order||0,o.index=i,o.label=""+a.label,o.visible=this.isDatasetVisible(i),o.controller)o.controller.updateIndex(i),o.controller.linkScales();else{const d=rs.getController(l),{datasetElementType:h,dataElementType:f}=ze.datasets[l];Object.assign(d,{dataElementType:rs.getElement(f),datasetElementType:h&&rs.getElement(h)}),o.controller=new d(this,i),t.push(o.controller)}}return this._updateMetasets(),t}_resetElements(){ue(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 i=this._options=n.createResolver(n.chartOptionScopes(),this.getContext()),s=this._animationsDisabled=!i.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),this.notifyPlugins("beforeUpdate",{mode:t,cancelable:!0})===!1)return;const a=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),v=!s&&a.indexOf(m)===-1;m.buildOrUpdateElements(v),o=Math.max(+m.getMaxOverflow(),o)}o=this._minPadding=i.layout.autoPadding?o:0,this._updateLayout(o),s||ue(a,h=>{h.reset()}),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(e2("z","_idx"));const{_active:l,_lastEvent:d}=this;d?this._eventHandler(d,!0):l.length&&this._updateHoverStyles(l,l,!0),this.render()}_updateScales(){ue(this.scales,t=>{mn.removeBox(this,t)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const t=this.options,n=new Set(Object.keys(this._listeners)),i=new Set(t.events);(!Vm(n,i)||!!this._responsiveListeners!==t.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:t}=this,n=this._getUniformDataChanges()||[];for(const{method:i,start:s,count:a}of n){const o=i==="_removeElements"?-a:a;vS(t,s,o)}}_getUniformDataChanges(){const t=this._dataChanges;if(!t||!t.length)return;this._dataChanges=[];const n=this.data.datasets.length,i=a=>new Set(t.filter(o=>o[0]===a).map((o,l)=>l+","+o.splice(1).join(","))),s=i(0);for(let a=1;a<n;a++)if(!Vm(s,i(a)))return;return Array.from(s).map(a=>a.split(",")).map(a=>({method:a[1],start:+a[2],count:+a[3]}))}_updateLayout(t){if(this.notifyPlugins("beforeLayout",{cancelable:!0})===!1)return;mn.update(this,this.width,this.height,t);const n=this.chartArea,i=n.width<=0||n.height<=0;this._layers=[],ue(this.boxes,s=>{i&&s.position==="chartArea"||(s.configure&&s.configure(),this._layers.push(...s._layers()))},this),this._layers.forEach((s,a)=>{s._idx=a}),this.notifyPlugins("afterLayout")}_updateDatasets(t){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:t,cancelable:!0})!==!1){for(let n=0,i=this.data.datasets.length;n<i;++n)this.getDatasetMeta(n).controller.configure();for(let n=0,i=this.data.datasets.length;n<i;++n)this._updateDataset(n,ea(t)?t({datasetIndex:n}):t);this.notifyPlugins("afterDatasetsUpdate",{mode:t})}}_updateDataset(t,n){const i=this.getDatasetMeta(t),s={meta:i,index:t,mode:n,cancelable:!0};this.notifyPlugins("beforeDatasetUpdate",s)!==!1&&(i.controller._update(n),s.cancelable=!1,this.notifyPlugins("afterDatasetUpdate",s))}render(){this.notifyPlugins("beforeRender",{cancelable:!0})!==!1&&(Cs.has(this)?this.attached&&!Cs.running(this)&&Cs.start(this):(this.draw(),n2({chart:this})))}draw(){let t;if(this._resizeBeforeDraw){const{width:i,height:s}=this._resizeBeforeDraw;this._resize(i,s),this._resizeBeforeDraw=null}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,i=[];let s,a;for(s=0,a=n.length;s<a;++s){const o=n[s];(!t||o.visible)&&i.push(o)}return i}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,i=t._clip,s=!i.disabled,a=yS(t)||this.chartArea,o={meta:t,index:t.index,cancelable:!0};this.notifyPlugins("beforeDatasetDraw",o)!==!1&&(s&&dd(n,{left:i.left===!1?0:a.left-i.left,right:i.right===!1?this.width:a.right+i.right,top:i.top===!1?0:a.top-i.top,bottom:i.bottom===!1?this.height:a.bottom+i.bottom}),t.controller.draw(),s&&ud(n),o.cancelable=!1,this.notifyPlugins("afterDatasetDraw",o))}isPointInArea(t){return ks(t,this.chartArea,this._minPadding)}getElementsAtEventForMode(t,n,i,s){const a=mx.modes[n];return typeof a=="function"?a(this,t,i,s):[]}getDatasetMeta(t){const n=this.data.datasets[t],i=this._metasets;let s=i.filter(a=>a&&a._dataset===n).pop();return s||(s={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},i.push(s)),s}getContext(){return this.$context||(this.$context=ia(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){const n=this.data.datasets[t];if(!n)return!1;const i=this.getDatasetMeta(t);return typeof i.hidden=="boolean"?!i.hidden:!n.hidden}setDatasetVisibility(t,n){const i=this.getDatasetMeta(t);i.hidden=!n}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateVisibility(t,n,i){const s=i?"show":"hide",a=this.getDatasetMeta(t),o=a.controller._resolveAnimations(void 0,s);rl(n)?(a.data[n].hidden=!i,this.update()):(this.setDatasetVisibility(t,i),o.update(a,{visible:i}),this.update(l=>l.datasetIndex===t?s: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(),Cs.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(),Qm(t,n),this.platform.releaseContext(n),this.canvas=null,this.ctx=null),delete Od[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,i=(a,o)=>{n.addEventListener(this,a,o),t[a]=o},s=(a,o,l)=>{a.offsetX=o,a.offsetY=l,this._eventHandler(a)};ue(this.options.events,a=>i(a,s))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const t=this._responsiveListeners,n=this.platform,i=(d,h)=>{n.addEventListener(this,d,h),t[d]=h},s=(d,h)=>{t[d]&&(n.removeEventListener(this,d,h),delete t[d])},a=(d,h)=>{this.canvas&&this.resize(d,h)};let o;const l=()=>{s("attach",l),this.attached=!0,this.resize(),i("resize",a),i("detach",o)};o=()=>{this.attached=!1,s("resize",a),this._stop(),this._resize(0,0),i("attach",l)},n.isAttached(this.canvas)?l():o()}unbindEvents(){ue(this._listeners,(t,n)=>{this.platform.removeEventListener(this,n,t)}),this._listeners={},ue(this._responsiveListeners,(t,n)=>{this.platform.removeEventListener(this,n,t)}),this._responsiveListeners=void 0}updateHoverStyle(t,n,i){const s=i?"set":"remove";let a,o,l,d;for(n==="dataset"&&(a=this.getDatasetMeta(t[0].datasetIndex),a.controller["_"+s+"DatasetHoverStyle"]()),l=0,d=t.length;l<d;++l){o=t[l];const h=o&&this.getDatasetMeta(o.datasetIndex).controller;h&&h[s+"HoverStyle"](o.element,o.datasetIndex,o.index)}}getActiveElements(){return this._active||[]}setActiveElements(t){const n=this._active||[],i=t.map(({datasetIndex:a,index:o})=>{const l=this.getDatasetMeta(a);if(!l)throw new Error("No dataset found at index "+a);return{datasetIndex:a,element:l.data[o],index:o}});!sd(i,n)&&(this._active=i,this._lastEvent=null,this._updateHoverStyles(i,n))}notifyPlugins(t,n,i){return this._plugins.notify(this,t,n,i)}isPluginEnabled(t){return this._plugins._cache.filter(n=>n.plugin.id===t).length===1}_updateHoverStyles(t,n,i){const s=this.options.hover,a=(d,h)=>d.filter(f=>!h.some(m=>f.datasetIndex===m.datasetIndex&&f.index===m.index)),o=a(n,t),l=i?t:a(t,n);o.length&&this.updateHoverStyle(o,s.mode,!1),l.length&&s.mode&&this.updateHoverStyle(l,s.mode,!0)}_eventHandler(t,n){const i={event:t,replay:n,cancelable:!0,inChartArea:this.isPointInArea(t)},s=o=>(o.options.events||this.options.events).includes(t.native.type);if(this.notifyPlugins("beforeEvent",i,s)===!1)return;const a=this._handleEvent(t,n,i.inChartArea);return i.cancelable=!1,this.notifyPlugins("afterEvent",i,s),(a||i.changed)&&this.render(),this}_handleEvent(t,n,i){const{_active:s=[],options:a}=this,o=n,l=this._getActiveElements(t,s,i,o),d=Mw(t),h=_S(t,this._lastEvent,i,d);i&&(this._lastEvent=null,we(a.onHover,[t,l,this],this),d&&we(a.onClick,[t,l,this],this));const f=!sd(l,s);return(f||n)&&(this._active=l,this._updateHoverStyles(l,s,n)),this._lastEvent=h,f}_getActiveElements(t,n,i,s){if(t.type==="mouseout")return[];if(!i)return n;const a=this.options.hover;return this.getElementsAtEventForMode(t,a.mode,a,s)}}nt(Hi,"defaults",ze),nt(Hi,"instances",Od),nt(Hi,"overrides",La),nt(Hi,"registry",rs),nt(Hi,"version",pS),nt(Hi,"getChart",s2);function a2(){return ue(Hi.instances,e=>e._plugins.invalidate())}function bS(e,t,n){const{startAngle:i,pixelMargin:s,x:a,y:o,outerRadius:l,innerRadius:d}=t;let h=s/l;e.beginPath(),e.arc(a,o,l,i-h,n+h),d>s?(h=s/d,e.arc(a,o,d,n+h,i-h,!0)):e.arc(a,o,s,n+Ne,i-Ne),e.closePath(),e.clip()}function wS(e){return ch(e,["outerStart","outerEnd","innerStart","innerEnd"])}function xS(e,t,n,i){const s=wS(e.options.borderRadius),a=(n-t)/2,o=Math.min(a,i*t/2),l=d=>{const h=(n-Math.min(a,d))*i/2;return an(d,0,Math.min(a,h))};return{outerStart:l(s.outerStart),outerEnd:l(s.outerEnd),innerStart:an(s.innerStart,0,o),innerEnd:an(s.innerEnd,0,o)}}function Ro(e,t,n,i){return{x:n+e*Math.cos(t),y:i+e*Math.sin(t)}}function Md(e,t,n,i,s,a){const{x:o,y:l,startAngle:d,pixelMargin:h,innerRadius:f}=t,m=Math.max(t.outerRadius+i+n-h,0),v=f>0?f+i+n+h:0;let y=0;const w=s-d;if(i){const at=f>0?f-i:0,ft=m>0?m-i:0,lt=(at+ft)/2,vt=lt!==0?w*lt/(lt+i):w;y=(w-vt)/2}const x=Math.max(.001,w*m-n/De)/m,k=(w-x)/2,D=d+k+y,E=s-k-y,{outerStart:B,outerEnd:S,innerStart:A,innerEnd:I}=xS(t,v,m,E-D),F=m-B,L=m-S,W=D+B/F,X=E-S/L,Z=v+A,Q=v+I,et=D+A/Z,gt=E-I/Q;if(e.beginPath(),a){const at=(W+X)/2;if(e.arc(o,l,m,W,at),e.arc(o,l,m,at,X),S>0){const xt=Ro(L,X,o,l);e.arc(xt.x,xt.y,S,X,E+Ne)}const ft=Ro(Q,E,o,l);if(e.lineTo(ft.x,ft.y),I>0){const xt=Ro(Q,gt,o,l);e.arc(xt.x,xt.y,I,E+Ne,gt+Math.PI)}const lt=(E-I/v+(D+A/v))/2;if(e.arc(o,l,v,E-I/v,lt,!0),e.arc(o,l,v,lt,D+A/v,!0),A>0){const xt=Ro(Z,et,o,l);e.arc(xt.x,xt.y,A,et+Math.PI,D-Ne)}const vt=Ro(F,D,o,l);if(e.lineTo(vt.x,vt.y),B>0){const xt=Ro(F,W,o,l);e.arc(xt.x,xt.y,B,D-Ne,W)}}else{e.moveTo(o,l);const at=Math.cos(W)*m+o,ft=Math.sin(W)*m+l;e.lineTo(at,ft);const lt=Math.cos(X)*m+o,vt=Math.sin(X)*m+l;e.lineTo(lt,vt)}e.closePath()}function SS(e,t,n,i,s){const{fullCircles:a,startAngle:o,circumference:l}=t;let d=t.endAngle;if(a){Md(e,t,n,i,d,s);for(let h=0;h<a;++h)e.fill();isNaN(l)||(d=o+(l%ke||ke))}return Md(e,t,n,i,d,s),e.fill(),d}function kS(e,t,n,i,s){const{fullCircles:a,startAngle:o,circumference:l,options:d}=t,{borderWidth:h,borderJoinStyle:f,borderDash:m,borderDashOffset:v}=d,y=d.borderAlign==="inner";if(!h)return;e.setLineDash(m||[]),e.lineDashOffset=v,y?(e.lineWidth=h*2,e.lineJoin=f||"round"):(e.lineWidth=h,e.lineJoin=f||"bevel");let w=t.endAngle;if(a){Md(e,t,n,i,w,s);for(let x=0;x<a;++x)e.stroke();isNaN(l)||(w=o+(l%ke||ke))}y&&bS(e,t,w),a||(Md(e,t,n,i,w,s),e.stroke())}class Cl extends Ri{constructor(n){super();nt(this,"circumference");nt(this,"endAngle");nt(this,"fullCircles");nt(this,"innerRadius");nt(this,"outerRadius");nt(this,"pixelMargin");nt(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,i,s){const a=this.getProps(["x","y"],s),{angle:o,distance:l}=Lm(a,{x:n,y:i}),{startAngle:d,endAngle:h,innerRadius:f,outerRadius:m,circumference:v}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],s),y=(this.options.spacing+this.options.borderWidth)/2,x=Vt(v,h-d)>=ke||cl(o,d,h),k=xs(l,f+y,m+y);return x&&k}getCenterPoint(n){const{x:i,y:s,startAngle:a,endAngle:o,innerRadius:l,outerRadius:d}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius"],n),{offset:h,spacing:f}=this.options,m=(a+o)/2,v=(l+d+f+h)/2;return{x:i+Math.cos(m)*v,y:s+Math.sin(m)*v}}tooltipPosition(n){return this.getCenterPoint(n)}draw(n){const{options:i,circumference:s}=this,a=(i.offset||0)/4,o=(i.spacing||0)/2,l=i.circular;if(this.pixelMargin=i.borderAlign==="inner"?.33:0,this.fullCircles=s>ke?Math.floor(s/ke):0,s===0||this.innerRadius<0||this.outerRadius<0)return;n.save();const d=(this.startAngle+this.endAngle)/2;n.translate(Math.cos(d)*a,Math.sin(d)*a);const h=1-Math.sin(Math.min(De,s||0)),f=a*h;n.fillStyle=i.backgroundColor,n.strokeStyle=i.borderColor,SS(n,this,f,o,l),kS(n,this,f,o,l),n.restore()}}nt(Cl,"id","arc"),nt(Cl,"defaults",{borderAlign:"center",borderColor:"#fff",borderDash:[],borderDashOffset:0,borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0}),nt(Cl,"defaultRoutes",{backgroundColor:"backgroundColor"}),nt(Cl,"descriptors",{_scriptable:!0,_indexable:n=>n!=="borderDash"});function o2(e,t,n=t){e.lineCap=Vt(n.borderCapStyle,t.borderCapStyle),e.setLineDash(Vt(n.borderDash,t.borderDash)),e.lineDashOffset=Vt(n.borderDashOffset,t.borderDashOffset),e.lineJoin=Vt(n.borderJoinStyle,t.borderJoinStyle),e.lineWidth=Vt(n.borderWidth,t.borderWidth),e.strokeStyle=Vt(n.borderColor,t.borderColor)}function CS(e,t,n){e.lineTo(n.x,n.y)}function OS(e){return e.stepped?Xw:e.tension||e.cubicInterpolationMode==="monotone"?Jw:CS}function r2(e,t,n={}){const i=e.length,{start:s=0,end:a=i-1}=n,{start:o,end:l}=t,d=Math.max(s,o),h=Math.min(a,l),f=s<o&&a<o||s>l&&a>l;return{count:i,start:d,loop:t.loop,ilen:h<d&&!f?i+h-d:h-d}}function MS(e,t,n,i){const{points:s,options:a}=t,{count:o,start:l,loop:d,ilen:h}=r2(s,n,i),f=OS(a);let{move:m=!0,reverse:v}=i||{},y,w,x;for(y=0;y<=h;++y)w=s[(l+(v?h-y:y))%o],!w.skip&&(m?(e.moveTo(w.x,w.y),m=!1):f(e,x,w,v,a.stepped),x=w);return d&&(w=s[(l+(v?h:0))%o],f(e,x,w,v,a.stepped)),!!d}function DS(e,t,n,i){const s=t.points,{count:a,start:o,ilen:l}=r2(s,n,i),{move:d=!0,reverse:h}=i||{};let f=0,m=0,v,y,w,x,k,D;const E=S=>(o+(h?l-S:S))%a,B=()=>{x!==k&&(e.lineTo(f,k),e.lineTo(f,x),e.lineTo(f,D))};for(d&&(y=s[E(0)],e.moveTo(y.x,y.y)),v=0;v<=l;++v){if(y=s[E(v)],y.skip)continue;const S=y.x,A=y.y,I=S|0;I===w?(A<x?x=A:A>k&&(k=A),f=(m*f+S)/++m):(B(),e.lineTo(S,A),w=I,m=0,x=k=A),D=A}B()}function kh(e){const t=e.options,n=t.borderDash&&t.borderDash.length;return!e._decimated&&!e._loop&&!t.tension&&t.cubicInterpolationMode!=="monotone"&&!t.stepped&&!n?DS:MS}function ES(e){return e.stepped?D9:e.tension||e.cubicInterpolationMode==="monotone"?E9:ja}function TS(e,t,n,i){let s=t._path;s||(s=t._path=new Path2D,t.path(s,n,i)&&s.closePath()),o2(e,t.options),e.stroke(s)}function IS(e,t,n,i){const{segments:s,options:a}=t,o=kh(t);for(const l of s)o2(e,a,l.style),e.beginPath(),o(e,t,l,{start:n,end:n+i-1})&&e.closePath(),e.stroke()}const AS=typeof Path2D=="function";function VS(e,t,n,i){AS&&!t.options.segment?TS(e,t,n,i):IS(e,t,n,i)}class sa extends Ri{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 i=this.options;if((i.tension||i.cubicInterpolationMode==="monotone")&&!i.stepped&&!this._pointsUpdated){const s=i.spanGaps?this._loop:this._fullLoop;b9(this._points,i,t,s,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=P9(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,i=t.length;return i&&n[t[i-1].end]}interpolate(t,n){const i=this.options,s=t[n],a=this.points,o=gg(this,{property:n,start:s,end:s});if(!o.length)return;const l=[],d=ES(i);let h,f;for(h=0,f=o.length;h<f;++h){const{start:m,end:v}=o[h],y=a[m],w=a[v];if(y===w){l.push(y);continue}const x=Math.abs((s-y[n])/(w[n]-y[n])),k=d(y,w,x,i.stepped);k[n]=t[n],l.push(k)}return l.length===1?l[0]:l}pathSegment(t,n,i){return kh(this)(t,this,n,i)}path(t,n,i){const s=this.segments,a=kh(this);let o=this._loop;n=n||0,i=i||this.points.length-n;for(const l of s)o&=a(t,this,l,{start:n,end:n+i-1});return!!o}draw(t,n,i,s){const a=this.options||{};(this.points||[]).length&&a.borderWidth&&(t.save(),VS(t,this,i,s),t.restore()),this.animated&&(this._pointsUpdated=!1,this._path=void 0)}}nt(sa,"id","line"),nt(sa,"defaults",{borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0}),nt(sa,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"}),nt(sa,"descriptors",{_scriptable:!0,_indexable:t=>t!=="borderDash"&&t!=="fill"});function l2(e,t,n,i){const s=e.options,{[n]:a}=e.getProps([n],i);return Math.abs(t-a)<s.radius+s.hitRadius}class Dd extends Ri{constructor(n){super();nt(this,"parsed");nt(this,"skip");nt(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,i,s){const a=this.options,{x:o,y:l}=this.getProps(["x","y"],s);return Math.pow(n-o,2)+Math.pow(i-l,2)<Math.pow(a.hitRadius+a.radius,2)}inXRange(n,i){return l2(this,n,"x",i)}inYRange(n,i){return l2(this,n,"y",i)}getCenterPoint(n){const{x:i,y:s}=this.getProps(["x","y"],n);return{x:i,y:s}}size(n){n=n||this.options||{};let i=n.radius||0;i=Math.max(i,i&&n.hoverRadius||0);const s=i&&n.borderWidth||0;return(i+s)*2}draw(n,i){const s=this.options;this.skip||s.radius<.1||!ks(this,i,this.size(s)/2)||(n.strokeStyle=s.borderColor,n.lineWidth=s.borderWidth,n.fillStyle=s.backgroundColor,lh(n,s,this.x,this.y))}getRange(){const n=this.options||{};return n.radius+n.hitRadius}}nt(Dd,"id","point"),nt(Dd,"defaults",{borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0}),nt(Dd,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"});function c2(e,t){const{x:n,y:i,base:s,width:a,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,s),d=Math.max(n,s),h=i-m,f=i+m):(m=a/2,l=n-m,d=n+m,h=Math.min(i,s),f=Math.max(i,s)),{left:l,top:h,right:d,bottom:f}}function aa(e,t,n,i){return e?0:an(t,n,i)}function BS(e,t,n){const i=e.options.borderWidth,s=e.borderSkipped,a=$m(i);return{t:aa(s.top,a.top,0,n),r:aa(s.right,a.right,0,t),b:aa(s.bottom,a.bottom,0,n),l:aa(s.left,a.left,0,t)}}function PS(e,t,n){const{enableBorderRadius:i}=e.getProps(["enableBorderRadius"]),s=e.options.borderRadius,a=Ha(s),o=Math.min(t,n),l=e.borderSkipped,d=i||Kt(s);return{topLeft:aa(!d||l.top||l.left,a.topLeft,0,o),topRight:aa(!d||l.top||l.right,a.topRight,0,o),bottomLeft:aa(!d||l.bottom||l.left,a.bottomLeft,0,o),bottomRight:aa(!d||l.bottom||l.right,a.bottomRight,0,o)}}function NS(e){const t=c2(e),n=t.right-t.left,i=t.bottom-t.top,s=BS(e,n/2,i/2),a=PS(e,n/2,i/2);return{outer:{x:t.left,y:t.top,w:n,h:i,radius:a},inner:{x:t.left+s.l,y:t.top+s.t,w:n-s.l-s.r,h:i-s.t-s.b,radius:{topLeft:Math.max(0,a.topLeft-Math.max(s.t,s.l)),topRight:Math.max(0,a.topRight-Math.max(s.t,s.r)),bottomLeft:Math.max(0,a.bottomLeft-Math.max(s.b,s.l)),bottomRight:Math.max(0,a.bottomRight-Math.max(s.b,s.r))}}}}function Ch(e,t,n,i){const s=t===null,a=n===null,l=e&&!(s&&a)&&c2(e,i);return l&&(s||xs(t,l.left,l.right))&&(a||xs(n,l.top,l.bottom))}function zS(e){return e.topLeft||e.topRight||e.bottomLeft||e.bottomRight}function LS(e,t){e.rect(t.x,t.y,t.w,t.h)}function Oh(e,t,n={}){const i=e.x!==n.x?-t:0,s=e.y!==n.y?-t:0,a=(e.x+e.w!==n.x+n.w?t:0)-i,o=(e.y+e.h!==n.y+n.h?t:0)-s;return{x:e.x+i,y:e.y+s,w:e.w+a,h:e.h+o,radius:e.radius}}class Ed extends Ri{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:i,backgroundColor:s}}=this,{inner:a,outer:o}=NS(this),l=zS(o.radius)?fl:LS;t.save(),(o.w!==a.w||o.h!==a.h)&&(t.beginPath(),l(t,Oh(o,n,a)),t.clip(),l(t,Oh(a,-n,o)),t.fillStyle=i,t.fill("evenodd")),t.beginPath(),l(t,Oh(a,n)),t.fillStyle=s,t.fill(),t.restore()}inRange(t,n,i){return Ch(this,t,n,i)}inXRange(t,n){return Ch(this,t,null,n)}inYRange(t,n){return Ch(this,null,t,n)}getCenterPoint(t){const{x:n,y:i,base:s,horizontal:a}=this.getProps(["x","y","base","horizontal"],t);return{x:a?(n+s)/2:n,y:a?i:(i+s)/2}}getRange(t){return t==="x"?this.width/2:this.height/2}}nt(Ed,"id","bar"),nt(Ed,"defaults",{borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0}),nt(Ed,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"});var FS=Object.freeze({__proto__:null,ArcElement:Cl,BarElement:Ed,LineElement:sa,PointElement:Dd});const Mh=["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)"],d2=Mh.map(e=>e.replace("rgb(","rgba(").replace(")",", 0.5)"));function u2(e){return Mh[e%Mh.length]}function h2(e){return d2[e%d2.length]}function RS(e,t){return e.borderColor=u2(t),e.backgroundColor=h2(t),++t}function HS(e,t){return e.backgroundColor=e.data.map(()=>u2(t++)),t}function WS(e,t){return e.backgroundColor=e.data.map(()=>h2(t++)),t}function YS(e){let t=0;return(n,i)=>{const s=e.getDatasetMeta(i).controller;s instanceof Ua?t=HS(n,t):s instanceof vl?t=WS(n,t):s&&(t=RS(n,t))}}function f2(e){let t;for(t in e)if(e[t].borderColor||e[t].backgroundColor)return!0;return!1}function jS(e){return e&&(e.borderColor||e.backgroundColor)}var US={id:"colors",defaults:{enabled:!0,forceOverride:!1},beforeLayout(e,t,n){if(!n.enabled)return;const{data:{datasets:i},options:s}=e.config,{elements:a}=s;if(!n.forceOverride&&(f2(i)||jS(s)||a&&f2(a)))return;const o=YS(e);i.forEach(o)}};function GS(e,t,n,i,s){const a=s.samples||i;if(a>=n)return e.slice(t,t+n);const o=[],l=(n-2)/(a-2);let d=0;const h=t+n-1;let f=t,m,v,y,w,x;for(o[d++]=e[f],m=0;m<a-2;m++){let k=0,D=0,E;const B=Math.floor((m+1)*l)+1+t,S=Math.min(Math.floor((m+2)*l)+1,n)+t,A=S-B;for(E=B;E<S;E++)k+=e[E].x,D+=e[E].y;k/=A,D/=A;const I=Math.floor(m*l)+1+t,F=Math.min(Math.floor((m+1)*l)+1,n)+t,{x:L,y:W}=e[f];for(y=w=-1,E=I;E<F;E++)w=.5*Math.abs((L-k)*(e[E].y-W)-(L-e[E].x)*(D-W)),w>y&&(y=w,v=e[E],x=E);o[d++]=v,f=x}return o[d++]=e[h],o}function KS(e,t,n,i){let s=0,a=0,o,l,d,h,f,m,v,y,w,x;const k=[],D=t+n-1,E=e[t].x,S=e[D].x-E;for(o=t;o<t+n;++o){l=e[o],d=(l.x-E)/S*i,h=l.y;const A=d|0;if(A===f)h<w?(w=h,m=o):h>x&&(x=h,v=o),s=(a*s+l.x)/++a;else{const I=o-1;if(!ee(m)&&!ee(v)){const F=Math.min(m,v),L=Math.max(m,v);F!==y&&F!==I&&k.push({...e[F],x:s}),L!==y&&L!==I&&k.push({...e[L],x:s})}o>0&&I!==y&&k.push(e[I]),k.push(l),f=A,a=0,w=x=h,m=v=y=o}}return k}function p2(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 m2(e){e.data.datasets.forEach(t=>{p2(t)})}function ZS(e,t){const n=t.length;let i=0,s;const{iScale:a}=e,{min:o,max:l,minDefined:d,maxDefined:h}=a.getUserBounds();return d&&(i=an(Ss(t,a.axis,o).lo,0,n-1)),h?s=an(Ss(t,a.axis,l).hi+1,i,n)-i:s=n-i,{start:i,count:s}}var XS={id:"decimation",defaults:{algorithm:"min-max",enabled:!1},beforeElementsUpdate:(e,t,n)=>{if(!n.enabled){m2(e);return}const i=e.width;e.data.datasets.forEach((s,a)=>{const{_data:o,indexAxis:l}=s,d=e.getDatasetMeta(a),h=o||s.data;if(pl([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:v}=ZS(d,h);const y=n.threshold||4*i;if(v<=y){p2(s);return}ee(o)&&(s._data=h,delete s.data,Object.defineProperty(s,"data",{configurable:!0,enumerable:!0,get:function(){return this._decimated},set:function(x){this._data=x}}));let w;switch(n.algorithm){case"lttb":w=GS(h,m,v,i,n);break;case"min-max":w=KS(h,m,v,i);break;default:throw new Error(`Unsupported decimation algorithm '${n.algorithm}'`)}s._decimated=w})},destroy(e){m2(e)}};function JS(e,t,n){const i=e.segments,s=e.points,a=t.points,o=[];for(const l of i){let{start:d,end:h}=l;h=Eh(d,h,s);const f=Dh(n,s[d],s[h],l.loop);if(!t.segments){o.push({source:l,target:f,start:s[d],end:s[h]});continue}const m=gg(t,f);for(const v of m){const y=Dh(n,a[v.start],a[v.end],v.loop),w=mg(l,s,y);for(const x of w)o.push({source:x,target:v,start:{[n]:g2(f,y,"start",Math.max)},end:{[n]:g2(f,y,"end",Math.min)}})}}return o}function Dh(e,t,n,i){if(i)return;let s=t[e],a=n[e];return e==="angle"&&(s=Kn(s),a=Kn(a)),{property:e,start:s,end:a}}function QS(e,t){const{x:n=null,y:i=null}=e||{},s=t.points,a=[];return t.segments.forEach(({start:o,end:l})=>{l=Eh(o,l,s);const d=s[o],h=s[l];i!==null?(a.push({x:d.x,y:i}),a.push({x:h.x,y:i})):n!==null&&(a.push({x:n,y:d.y}),a.push({x:n,y:h.y}))}),a}function Eh(e,t,n){for(;t>e;t--){const i=n[t];if(!isNaN(i.x)&&!isNaN(i.y))break}return t}function g2(e,t,n,i){return e&&t?i(e[n],t[n]):e?e[n]:t?t[n]:0}function v2(e,t){let n=[],i=!1;return Se(e)?(i=!0,n=e):n=QS(e,t),n.length?new sa({points:n,options:{tension:0},_loop:i,_fullLoop:i}):null}function _2(e){return e&&e.fill!==!1}function qS(e,t,n){let s=e[t].fill;const a=[t];let o;if(!n)return s;for(;s!==!1&&a.indexOf(s)===-1;){if(!Pe(s))return s;if(o=e[s],!o)return!1;if(o.visible)return s;a.push(s),s=o.fill}return!1}function $S(e,t,n){const i=ik(e);if(Kt(i))return isNaN(i.value)?!1:i;let s=parseFloat(i);return Pe(s)&&Math.floor(s)===s?tk(i[0],t,s,n):["origin","start","end","stack","shape"].indexOf(i)>=0&&i}function tk(e,t,n,i){return(e==="-"||e==="+")&&(n=t+n),n===t||n<0||n>=i?!1:n}function ek(e,t){let n=null;return e==="start"?n=t.bottom:e==="end"?n=t.top:Kt(e)?n=t.getPixelForValue(e.value):t.getBasePixel&&(n=t.getBasePixel()),n}function nk(e,t,n){let i;return e==="start"?i=n:e==="end"?i=t.options.reverse?t.min:t.max:Kt(e)?i=e.value:i=t.getBaseValue(),i}function ik(e){const t=e.options,n=t.fill;let i=Vt(n&&n.target,n);return i===void 0&&(i=!!t.backgroundColor),i===!1||i===null?!1:i===!0?"origin":i}function sk(e){const{scale:t,index:n,line:i}=e,s=[],a=i.segments,o=i.points,l=ak(t,n);l.push(v2({x:null,y:t.bottom},i));for(let d=0;d<a.length;d++){const h=a[d];for(let f=h.start;f<=h.end;f++)ok(s,o[f],l)}return new sa({points:s,options:{}})}function ak(e,t){const n=[],i=e.getMatchingVisibleMetas("line");for(let s=0;s<i.length;s++){const a=i[s];if(a.index===t)break;a.hidden||n.unshift(a.dataset)}return n}function ok(e,t,n){const i=[];for(let s=0;s<n.length;s++){const a=n[s],{first:o,last:l,point:d}=rk(a,t,"x");if(!(!d||o&&l)){if(o)i.unshift(d);else if(e.push(d),!l)break}}e.push(...i)}function rk(e,t,n){const i=e.interpolate(t,n);if(!i)return{};const s=i[n],a=e.segments,o=e.points;let l=!1,d=!1;for(let h=0;h<a.length;h++){const f=a[h],m=o[f.start][n],v=o[f.end][n];if(xs(s,m,v)){l=s===m,d=s===v;break}}return{first:l,last:d,point:i}}class y2{constructor(t){this.x=t.x,this.y=t.y,this.radius=t.radius}pathSegment(t,n,i){const{x:s,y:a,radius:o}=this;return n=n||{start:0,end:ke},t.arc(s,a,o,n.end,n.start,!0),!i.bounds}interpolate(t){const{x:n,y:i,radius:s}=this,a=t.angle;return{x:n+Math.cos(a)*s,y:i+Math.sin(a)*s,angle:a}}}function lk(e){const{chart:t,fill:n,line:i}=e;if(Pe(n))return ck(t,n);if(n==="stack")return sk(e);if(n==="shape")return!0;const s=dk(e);return s instanceof y2?s:v2(s,i)}function ck(e,t){const n=e.getDatasetMeta(t);return n&&e.isDatasetVisible(t)?n.dataset:null}function dk(e){return(e.scale||{}).getPointPositionForValue?hk(e):uk(e)}function uk(e){const{scale:t={},fill:n}=e,i=ek(n,t);if(Pe(i)){const s=t.isHorizontal();return{x:s?i:null,y:s?null:i}}return null}function hk(e){const{scale:t,fill:n}=e,i=t.options,s=t.getLabels().length,a=i.reverse?t.max:t.min,o=nk(n,t,a),l=[];if(i.grid.circular){const d=t.getPointPositionForValue(0,a);return new y2({x:d.x,y:d.y,radius:t.getDistanceFromCenterForValue(o)})}for(let d=0;d<s;++d)l.push(t.getPointPositionForValue(d,o));return l}function Th(e,t,n){const i=lk(t),{line:s,scale:a,axis:o}=t,l=s.options,d=l.fill,h=l.backgroundColor,{above:f=h,below:m=h}=d||{};i&&s.points.length&&(dd(e,n),fk(e,{line:s,target:i,above:f,below:m,area:n,scale:a,axis:o}),ud(e))}function fk(e,t){const{line:n,target:i,above:s,below:a,area:o,scale:l}=t,d=n._loop?"angle":t.axis;e.save(),d==="x"&&a!==s&&(b2(e,i,o.top),w2(e,{line:n,target:i,color:s,scale:l,property:d}),e.restore(),e.save(),b2(e,i,o.bottom)),w2(e,{line:n,target:i,color:a,scale:l,property:d}),e.restore()}function b2(e,t,n){const{segments:i,points:s}=t;let a=!0,o=!1;e.beginPath();for(const l of i){const{start:d,end:h}=l,f=s[d],m=s[Eh(d,h,s)];a?(e.moveTo(f.x,f.y),a=!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 w2(e,t){const{line:n,target:i,property:s,color:a,scale:o}=t,l=JS(n,i,s);for(const{source:d,target:h,start:f,end:m}of l){const{style:{backgroundColor:v=a}={}}=d,y=i!==!0;e.save(),e.fillStyle=v,pk(e,o,y&&Dh(s,f,m)),e.beginPath();const w=!!n.pathSegment(e,d);let x;if(y){w?e.closePath():x2(e,i,m,s);const k=!!i.pathSegment(e,h,{move:w,reverse:!0});x=w&&k,x||x2(e,i,f,s)}e.closePath(),e.fill(x?"evenodd":"nonzero"),e.restore()}}function pk(e,t,n){const{top:i,bottom:s}=t.chart.chartArea,{property:a,start:o,end:l}=n||{};a==="x"&&(e.beginPath(),e.rect(o,i,l-o,s-i),e.clip())}function x2(e,t,n,i){const s=t.interpolate(n,i);s&&e.lineTo(s.x,s.y)}var mk={id:"filler",afterDatasetsUpdate(e,t,n){const i=(e.data.datasets||[]).length,s=[];let a,o,l,d;for(o=0;o<i;++o)a=e.getDatasetMeta(o),l=a.dataset,d=null,l&&l.options&&l instanceof sa&&(d={visible:e.isDatasetVisible(o),index:o,fill:$S(l,o,i),chart:e,axis:a.controller.options.indexAxis,scale:a.vScale,line:l}),a.$filler=d,s.push(d);for(o=0;o<i;++o)d=s[o],!(!d||d.fill===!1)&&(d.fill=qS(s,o,n.propagate))},beforeDraw(e,t,n){const i=n.drawTime==="beforeDraw",s=e.getSortedVisibleDatasetMetas(),a=e.chartArea;for(let o=s.length-1;o>=0;--o){const l=s[o].$filler;!l||(l.line.updateControlPoints(a,l.axis),i&&l.fill&&Th(e.ctx,l,a))}},beforeDatasetsDraw(e,t,n){if(n.drawTime!=="beforeDatasetsDraw")return;const i=e.getSortedVisibleDatasetMetas();for(let s=i.length-1;s>=0;--s){const a=i[s].$filler;_2(a)&&Th(e.ctx,a,e.chartArea)}},beforeDatasetDraw(e,t,n){const i=t.meta.$filler;!_2(i)||n.drawTime!=="beforeDatasetDraw"||Th(e.ctx,i,e.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};const S2=(e,t)=>{let{boxHeight:n=t,boxWidth:i=t}=e;return e.usePointStyle&&(n=Math.min(n,t),i=e.pointStyleWidth||Math.min(i,t)),{boxWidth:i,boxHeight:n,itemHeight:Math.max(t,n)}},gk=(e,t)=>e!==null&&t!==null&&e.datasetIndex===t.datasetIndex&&e.index===t.index;class k2 extends Ri{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,i){this.maxWidth=t,this.maxHeight=n,this._margins=i,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=we(t.generateLabels,[this.chart],this)||[];t.filter&&(n=n.filter(i=>t.filter(i,this.chart.data))),t.sort&&(n=n.sort((i,s)=>t.sort(i,s,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 i=t.labels,s=$e(i.font),a=s.size,o=this._computeTitleHeight(),{boxWidth:l,itemHeight:d}=S2(i,a);let h,f;n.font=s.string,this.isHorizontal()?(h=this.maxWidth,f=this._fitRows(o,a,l,d)+10):(f=this.maxHeight,h=this._fitCols(o,s,l,d)+10),this.width=Math.min(h,t.maxWidth||this.maxWidth),this.height=Math.min(f,t.maxHeight||this.maxHeight)}_fitRows(t,n,i,s){const{ctx:a,maxWidth:o,options:{labels:{padding:l}}}=this,d=this.legendHitBoxes=[],h=this.lineWidths=[0],f=s+l;let m=t;a.textAlign="left",a.textBaseline="middle";let v=-1,y=-f;return this.legendItems.forEach((w,x)=>{const k=i+n/2+a.measureText(w.text).width;(x===0||h[h.length-1]+k+2*l>o)&&(m+=f,h[h.length-(x>0?0:1)]=0,y+=f,v++),d[x]={left:0,top:y,row:v,width:k,height:s},h[h.length-1]+=k+l}),m}_fitCols(t,n,i,s){const{ctx:a,maxHeight:o,options:{labels:{padding:l}}}=this,d=this.legendHitBoxes=[],h=this.columnSizes=[],f=o-t;let m=l,v=0,y=0,w=0,x=0;return this.legendItems.forEach((k,D)=>{const{itemWidth:E,itemHeight:B}=vk(i,n,a,k,s);D>0&&y+B+2*l>f&&(m+=v+l,h.push({width:v,height:y}),w+=v+l,x++,v=y=0),d[D]={left:w,top:y,col:x,width:E,height:B},v=Math.max(v,E),y+=B+l}),m+=v,h.push({width:v,height:y}),m}adjustHitBoxes(){if(!this.options.display)return;const t=this._computeTitleHeight(),{legendHitBoxes:n,options:{align:i,labels:{padding:s},rtl:a}}=this,o=Fo(a,this.left,this.width);if(this.isHorizontal()){let l=0,d=fn(i,this.left+s,this.right-this.lineWidths[l]);for(const h of n)l!==h.row&&(l=h.row,d=fn(i,this.left+s,this.right-this.lineWidths[l])),h.top+=this.top+t+s,h.left=o.leftForLtr(o.x(d),h.width),d+=h.width+s}else{let l=0,d=fn(i,this.top+t+s,this.bottom-this.columnSizes[l].height);for(const h of n)h.col!==l&&(l=h.col,d=fn(i,this.top+t+s,this.bottom-this.columnSizes[l].height)),h.top=d,h.left+=this.left+s,h.left=o.leftForLtr(o.x(h.left),h.width),d+=h.height+s}}isHorizontal(){return this.options.position==="top"||this.options.position==="bottom"}draw(){if(this.options.display){const t=this.ctx;dd(t,this),this._draw(),ud(t)}}_draw(){const{options:t,columnSizes:n,lineWidths:i,ctx:s}=this,{align:a,labels:o}=t,l=ze.color,d=Fo(t.rtl,this.left,this.width),h=$e(o.font),{padding:f}=o,m=h.size,v=m/2;let y;this.drawTitle(),s.textAlign=d.textAlign("left"),s.textBaseline="middle",s.lineWidth=.5,s.font=h.string;const{boxWidth:w,boxHeight:x,itemHeight:k}=S2(o,m),D=function(I,F,L){if(isNaN(w)||w<=0||isNaN(x)||x<0)return;s.save();const W=Vt(L.lineWidth,1);if(s.fillStyle=Vt(L.fillStyle,l),s.lineCap=Vt(L.lineCap,"butt"),s.lineDashOffset=Vt(L.lineDashOffset,0),s.lineJoin=Vt(L.lineJoin,"miter"),s.lineWidth=W,s.strokeStyle=Vt(L.strokeStyle,l),s.setLineDash(Vt(L.lineDash,[])),o.usePointStyle){const X={radius:x*Math.SQRT2/2,pointStyle:L.pointStyle,rotation:L.rotation,borderWidth:W},Z=d.xPlus(I,w/2),Q=F+v;qm(s,X,Z,Q,o.pointStyleWidth&&w)}else{const X=F+Math.max((m-x)/2,0),Z=d.leftForLtr(I,w),Q=Ha(L.borderRadius);s.beginPath(),Object.values(Q).some(et=>et!==0)?fl(s,{x:Z,y:X,w,h:x,radius:Q}):s.rect(Z,X,w,x),s.fill(),W!==0&&s.stroke()}s.restore()},E=function(I,F,L){Ra(s,L.text,I,F+k/2,h,{strikethrough:L.hidden,textAlign:d.textAlign(L.textAlign)})},B=this.isHorizontal(),S=this._computeTitleHeight();B?y={x:fn(a,this.left+f,this.right-i[0]),y:this.top+f+S,line:0}:y={x:this.left+f,y:fn(a,this.top+S+f,this.bottom-n[0].height),line:0},ug(this.ctx,t.textDirection);const A=k+f;this.legendItems.forEach((I,F)=>{s.strokeStyle=I.fontColor,s.fillStyle=I.fontColor;const L=s.measureText(I.text).width,W=d.textAlign(I.textAlign||(I.textAlign=o.textAlign)),X=w+v+L;let Z=y.x,Q=y.y;d.setWidth(this.width),B?F>0&&Z+X+f>this.right&&(Q=y.y+=A,y.line++,Z=y.x=fn(a,this.left+f,this.right-i[y.line])):F>0&&Q+A>this.bottom&&(Z=y.x=Z+n[y.line].width+f,y.line++,Q=y.y=fn(a,this.top+S+f,this.bottom-n[y.line].height));const et=d.x(Z);if(D(et,Q,I),Z=Lw(W,Z+w+v,B?Z+X:this.right,t.rtl),E(d.x(Z),Q,I),B)y.x+=X+f;else if(typeof I.text!="string"){const gt=h.lineHeight;y.y+=C2(I,gt)}else y.y+=A}),hg(this.ctx,t.textDirection)}drawTitle(){const t=this.options,n=t.title,i=$e(n.font),s=pn(n.padding);if(!n.display)return;const a=Fo(t.rtl,this.left,this.width),o=this.ctx,l=n.position,d=i.size/2,h=s.top+d;let f,m=this.left,v=this.width;if(this.isHorizontal())v=Math.max(...this.lineWidths),f=this.top+h,m=fn(t.align,m,this.right-v);else{const w=this.columnSizes.reduce((x,k)=>Math.max(x,k.height),0);f=h+fn(t.align,this.top,this.bottom-w-t.labels.padding-this._computeTitleHeight())}const y=fn(l,m,m+v);o.textAlign=a.textAlign(ih(l)),o.textBaseline="middle",o.strokeStyle=n.color,o.fillStyle=n.color,o.font=i.string,Ra(o,n.text,y,f,i)}_computeTitleHeight(){const t=this.options.title,n=$e(t.font),i=pn(t.padding);return t.display?n.lineHeight+i.height:0}_getLegendItemAt(t,n){let i,s,a;if(xs(t,this.left,this.right)&&xs(n,this.top,this.bottom)){for(a=this.legendHitBoxes,i=0;i<a.length;++i)if(s=a[i],xs(t,s.left,s.left+s.width)&&xs(n,s.top,s.top+s.height))return this.legendItems[i]}return null}handleEvent(t){const n=this.options;if(!bk(t.type,n))return;const i=this._getLegendItemAt(t.x,t.y);if(t.type==="mousemove"||t.type==="mouseout"){const s=this._hoveredItem,a=gk(s,i);s&&!a&&we(n.onLeave,[t,s,this],this),this._hoveredItem=i,i&&!a&&we(n.onHover,[t,i,this],this)}else i&&we(n.onClick,[t,i,this],this)}}function vk(e,t,n,i,s){const a=_k(i,e,t,n),o=yk(s,i,t.lineHeight);return{itemWidth:a,itemHeight:o}}function _k(e,t,n,i){let s=e.text;return s&&typeof s!="string"&&(s=s.reduce((a,o)=>a.length>o.length?a:o)),t+n.size/2+i.measureText(s).width}function yk(e,t,n){let i=e;return typeof t.text!="string"&&(i=C2(t,n)),i}function C2(e,t){const n=e.text?e.text.length+.5:0;return t*n}function bk(e,t){return!!((e==="mousemove"||e==="mouseout")&&(t.onHover||t.onLeave)||t.onClick&&(e==="click"||e==="mouseup"))}var wk={id:"legend",_element:k2,start(e,t,n){const i=e.legend=new k2({ctx:e.ctx,options:n,chart:e});mn.configure(e,i,n),mn.addBox(e,i)},stop(e){mn.removeBox(e,e.legend),delete e.legend},beforeUpdate(e,t,n){const i=e.legend;mn.configure(e,i,n),i.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 i=t.datasetIndex,s=n.chart;s.isDatasetVisible(i)?(s.hide(i),t.hidden=!0):(s.show(i),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:i,textAlign:s,color:a,useBorderRadius:o,borderRadius:l}}=e.legend.options;return e._getSortedDatasetMetas().map(d=>{const h=d.controller.getStyle(n?0:void 0),f=pn(h.borderWidth);return{text:t[d.index].label,fillStyle:h.backgroundColor,fontColor:a,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:i||h.pointStyle,rotation:h.rotation,textAlign:s||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 Ih extends Ri{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 i=this.options;if(this.left=0,this.top=0,!i.display){this.width=this.height=this.right=this.bottom=0;return}this.width=this.right=t,this.height=this.bottom=n;const s=Se(i.text)?i.text.length:1;this._padding=pn(i.padding);const a=s*$e(i.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=a:this.width=a}isHorizontal(){const t=this.options.position;return t==="top"||t==="bottom"}_drawArgs(t){const{top:n,left:i,bottom:s,right:a,options:o}=this,l=o.align;let d=0,h,f,m;return this.isHorizontal()?(f=fn(l,i,a),m=n+t,h=a-i):(o.position==="left"?(f=i+t,m=fn(l,s,n),d=De*-.5):(f=a-t,m=fn(l,n,s),d=De*.5),h=s-n),{titleX:f,titleY:m,maxWidth:h,rotation:d}}draw(){const t=this.ctx,n=this.options;if(!n.display)return;const i=$e(n.font),a=i.lineHeight/2+this._padding.top,{titleX:o,titleY:l,maxWidth:d,rotation:h}=this._drawArgs(a);Ra(t,n.text,0,0,i,{color:n.color,maxWidth:d,rotation:h,textAlign:ih(n.align),textBaseline:"middle",translation:[o,l]})}}function xk(e,t){const n=new Ih({ctx:e.ctx,options:t,chart:e});mn.configure(e,n,t),mn.addBox(e,n),e.titleBlock=n}var Sk={id:"title",_element:Ih,start(e,t,n){xk(e,n)},stop(e){const t=e.titleBlock;mn.removeBox(e,t),delete e.titleBlock},beforeUpdate(e,t,n){const i=e.titleBlock;mn.configure(e,i,n),i.options=n},defaults:{align:"center",display:!1,font:{weight:"bold"},fullSize:!0,padding:10,position:"top",text:"",weight:2e3},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const Td=new WeakMap;var kk={id:"subtitle",start(e,t,n){const i=new Ih({ctx:e.ctx,options:n,chart:e});mn.configure(e,i,n),mn.addBox(e,i),Td.set(e,i)},stop(e){mn.removeBox(e,Td.get(e)),Td.delete(e)},beforeUpdate(e,t,n){const i=Td.get(e);mn.configure(e,i,n),i.options=n},defaults:{align:"center",display:!1,font:{weight:"normal"},fullSize:!0,padding:0,position:"top",text:"",weight:1500},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const Ol={average(e){if(!e.length)return!1;let t,n,i=0,s=0,a=0;for(t=0,n=e.length;t<n;++t){const o=e[t].element;if(o&&o.hasValue()){const l=o.tooltipPosition();i+=l.x,s+=l.y,++a}}return{x:i/a,y:s/a}},nearest(e,t){if(!e.length)return!1;let n=t.x,i=t.y,s=Number.POSITIVE_INFINITY,a,o,l;for(a=0,o=e.length;a<o;++a){const d=e[a].element;if(d&&d.hasValue()){const h=d.getCenterPoint(),f=eh(t,h);f<s&&(s=f,l=d)}}if(l){const d=l.tooltipPosition();n=d.x,i=d.y}return{x:n,y:i}}};function ls(e,t){return t&&(Se(t)?Array.prototype.push.apply(e,t):e.push(t)),e}function Os(e){return(typeof e=="string"||e instanceof String)&&e.indexOf(`
|
|
41
41
|
`)>-1?e.split(`
|
|
42
|
-
`):e}function Ck(e,t){const{element:n,datasetIndex:i,index:s}=t,a=e.getDatasetMeta(i).controller,{label:o,value:l}=a.getLabelAndValue(s);return{chart:e,label:o,parsed:a.getParsed(s),raw:e.data.datasets[i].data[s],formattedValue:l,dataset:a.getDataset(),dataIndex:s,datasetIndex:i,element:n}}function O2(e,t){const n=e.chart.ctx,{body:i,footer:s,title:a}=e,{boxWidth:o,boxHeight:l}=t,d=$e(t.bodyFont),h=$e(t.titleFont),f=$e(t.footerFont),m=a.length,v=s.length,y=i.length,w=pn(t.padding);let x=w.height,k=0,D=i.reduce((S,A)=>S+A.before.length+A.lines.length+A.after.length,0);if(D+=e.beforeBody.length+e.afterBody.length,m&&(x+=m*h.lineHeight+(m-1)*t.titleSpacing+t.titleMarginBottom),D){const S=t.displayColors?Math.max(l,d.lineHeight):d.lineHeight;x+=y*S+(D-y)*d.lineHeight+(D-1)*t.bodySpacing}v&&(x+=t.footerMarginTop+v*f.lineHeight+(v-1)*t.footerSpacing);let E=0;const B=function(S){k=Math.max(k,n.measureText(S).width+E)};return n.save(),n.font=h.string,ue(e.title,B),n.font=d.string,ue(e.beforeBody.concat(e.afterBody),B),E=t.displayColors?o+2+t.boxPadding:0,ue(i,S=>{ue(S.before,B),ue(S.lines,B),ue(S.after,B)}),E=0,n.font=f.string,ue(e.footer,B),n.restore(),k+=w.width,{width:k,height:x}}function Ok(e,t){const{y:n,height:i}=t;return n<i/2?"top":n>e.height-i/2?"bottom":"center"}function Mk(e,t,n,i){const{x:s,width:a}=i,o=n.caretSize+n.caretPadding;if(e==="left"&&s+a+o>t.width||e==="right"&&s-a-o<0)return!0}function Dk(e,t,n,i){const{x:s,width:a}=n,{width:o,chartArea:{left:l,right:d}}=e;let h="center";return i==="center"?h=s<=(l+d)/2?"left":"right":s<=a/2?h="left":s>=o-a/2&&(h="right"),Mk(h,e,t,n)&&(h="center"),h}function M2(e,t,n){const i=n.yAlign||t.yAlign||Ok(e,n);return{xAlign:n.xAlign||t.xAlign||Dk(e,t,n,i),yAlign:i}}function Ek(e,t){let{x:n,width:i}=e;return t==="right"?n-=i:t==="center"&&(n-=i/2),n}function Tk(e,t,n){let{y:i,height:s}=e;return t==="top"?i+=n:t==="bottom"?i-=s+n:i-=s/2,i}function D2(e,t,n,i){const{caretSize:s,caretPadding:a,cornerRadius:o}=e,{xAlign:l,yAlign:d}=n,h=s+a,{topLeft:f,topRight:m,bottomLeft:v,bottomRight:y}=Ha(o);let w=Ek(t,l);const x=Tk(t,d,h);return d==="center"?l==="left"?w+=h:l==="right"&&(w-=h):l==="left"?w-=Math.max(f,v)+s:l==="right"&&(w+=Math.max(m,y)+s),{x:an(w,0,i.width-t.width),y:an(x,0,i.height-t.height)}}function Id(e,t,n){const i=pn(n.padding);return t==="center"?e.x+e.width/2:t==="right"?e.x+e.width-i.right:e.x+i.left}function E2(e){return ls([],Os(e))}function Ik(e,t,n){return ia(e,{tooltip:t,tooltipItems:n,type:"tooltip"})}function T2(e,t){const n=t&&t.dataset&&t.dataset.tooltip&&t.dataset.tooltip.callbacks;return n?e.override(n):e}const I2={beforeTitle:ws,title(e){if(e.length>0){const t=e[0],n=t.chart.data.labels,i=n?n.length:0;if(this&&this.options&&this.options.mode==="dataset")return t.dataset.label||"";if(t.label)return t.label;if(i>0&&t.dataIndex<i)return n[t.dataIndex]}return""},afterTitle:ws,beforeBody:ws,beforeLabel:ws,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 ee(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:ws,afterBody:ws,beforeFooter:ws,footer:ws,afterFooter:ws};function Bn(e,t,n,i){const s=e[t].call(n,i);return typeof s>"u"?I2[t].call(n,i):s}class Ah extends Ri{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,i=this.options.setContext(this.getContext()),s=i.enabled&&n.options.animation&&i.animations,a=new bg(this.chart,s);return s._cacheable&&(this._cachedAnimations=Object.freeze(a)),a}getContext(){return this.$context||(this.$context=Ik(this.chart.getContext(),this,this._tooltipItems))}getTitle(t,n){const{callbacks:i}=n,s=Bn(i,"beforeTitle",this,t),a=Bn(i,"title",this,t),o=Bn(i,"afterTitle",this,t);let l=[];return l=ls(l,Os(s)),l=ls(l,Os(a)),l=ls(l,Os(o)),l}getBeforeBody(t,n){return E2(Bn(n.callbacks,"beforeBody",this,t))}getBody(t,n){const{callbacks:i}=n,s=[];return ue(t,a=>{const o={before:[],lines:[],after:[]},l=T2(i,a);ls(o.before,Os(Bn(l,"beforeLabel",this,a))),ls(o.lines,Bn(l,"label",this,a)),ls(o.after,Os(Bn(l,"afterLabel",this,a))),s.push(o)}),s}getAfterBody(t,n){return E2(Bn(n.callbacks,"afterBody",this,t))}getFooter(t,n){const{callbacks:i}=n,s=Bn(i,"beforeFooter",this,t),a=Bn(i,"footer",this,t),o=Bn(i,"afterFooter",this,t);let l=[];return l=ls(l,Os(s)),l=ls(l,Os(a)),l=ls(l,Os(o)),l}_createItems(t){const n=this._active,i=this.chart.data,s=[],a=[],o=[];let l=[],d,h;for(d=0,h=n.length;d<h;++d)l.push(Ck(this.chart,n[d]));return t.filter&&(l=l.filter((f,m,v)=>t.filter(f,m,v,i))),t.itemSort&&(l=l.sort((f,m)=>t.itemSort(f,m,i))),ue(l,f=>{const m=T2(t.callbacks,f);s.push(Bn(m,"labelColor",this,f)),a.push(Bn(m,"labelPointStyle",this,f)),o.push(Bn(m,"labelTextColor",this,f))}),this.labelColors=s,this.labelPointStyles=a,this.labelTextColors=o,this.dataPoints=l,l}update(t,n){const i=this.options.setContext(this.getContext()),s=this._active;let a,o=[];if(!s.length)this.opacity!==0&&(a={opacity:0});else{const l=Ol[i.position].call(this,s,this._eventPosition);o=this._createItems(i),this.title=this.getTitle(o,i),this.beforeBody=this.getBeforeBody(o,i),this.body=this.getBody(o,i),this.afterBody=this.getAfterBody(o,i),this.footer=this.getFooter(o,i);const d=this._size=O2(this,i),h=Object.assign({},l,d),f=M2(this.chart,i,h),m=D2(i,h,f,this.chart);this.xAlign=f.xAlign,this.yAlign=f.yAlign,a={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,a&&this._resolveAnimations().update(this,a),t&&i.external&&i.external.call(this,{chart:this.chart,tooltip:this,replay:n})}drawCaret(t,n,i,s){const a=this.getCaretPosition(t,i,s);n.lineTo(a.x1,a.y1),n.lineTo(a.x2,a.y2),n.lineTo(a.x3,a.y3)}getCaretPosition(t,n,i){const{xAlign:s,yAlign:a}=this,{caretSize:o,cornerRadius:l}=i,{topLeft:d,topRight:h,bottomLeft:f,bottomRight:m}=Ha(l),{x:v,y}=t,{width:w,height:x}=n;let k,D,E,B,S,A;return a==="center"?(S=y+x/2,s==="left"?(k=v,D=k-o,B=S+o,A=S-o):(k=v+w,D=k+o,B=S-o,A=S+o),E=k):(s==="left"?D=v+Math.max(d,f)+o:s==="right"?D=v+w-Math.max(h,m)-o:D=this.caretX,a==="top"?(B=y,S=B-o,k=D-o,E=D+o):(B=y+x,S=B+o,k=D+o,E=D-o),A=B),{x1:k,x2:D,x3:E,y1:B,y2:S,y3:A}}drawTitle(t,n,i){const s=this.title,a=s.length;let o,l,d;if(a){const h=Fo(i.rtl,this.x,this.width);for(t.x=Id(this,i.titleAlign,i),n.textAlign=h.textAlign(i.titleAlign),n.textBaseline="middle",o=$e(i.titleFont),l=i.titleSpacing,n.fillStyle=i.titleColor,n.font=o.string,d=0;d<a;++d)n.fillText(s[d],h.x(t.x),t.y+o.lineHeight/2),t.y+=o.lineHeight+l,d+1===a&&(t.y+=i.titleMarginBottom-l)}}_drawColorBox(t,n,i,s,a){const o=this.labelColors[i],l=this.labelPointStyles[i],{boxHeight:d,boxWidth:h}=a,f=$e(a.bodyFont),m=Id(this,"left",a),v=s.x(m),y=d<f.lineHeight?(f.lineHeight-d)/2:0,w=n.y+y;if(a.usePointStyle){const x={radius:Math.min(h,d)/2,pointStyle:l.pointStyle,rotation:l.rotation,borderWidth:1},k=s.leftForLtr(v,h)+h/2,D=w+d/2;t.strokeStyle=a.multiKeyBackground,t.fillStyle=a.multiKeyBackground,lh(t,x,k,D),t.strokeStyle=o.borderColor,t.fillStyle=o.backgroundColor,lh(t,x,k,D)}else{t.lineWidth=Kt(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 x=s.leftForLtr(v,h),k=s.leftForLtr(s.xPlus(v,1),h-2),D=Ha(o.borderRadius);Object.values(D).some(E=>E!==0)?(t.beginPath(),t.fillStyle=a.multiKeyBackground,fl(t,{x,y:w,w:h,h:d,radius:D}),t.fill(),t.stroke(),t.fillStyle=o.backgroundColor,t.beginPath(),fl(t,{x:k,y:w+1,w:h-2,h:d-2,radius:D}),t.fill()):(t.fillStyle=a.multiKeyBackground,t.fillRect(x,w,h,d),t.strokeRect(x,w,h,d),t.fillStyle=o.backgroundColor,t.fillRect(k,w+1,h-2,d-2))}t.fillStyle=this.labelTextColors[i]}drawBody(t,n,i){const{body:s}=this,{bodySpacing:a,bodyAlign:o,displayColors:l,boxHeight:d,boxWidth:h,boxPadding:f}=i,m=$e(i.bodyFont);let v=m.lineHeight,y=0;const w=Fo(i.rtl,this.x,this.width),x=function(L){n.fillText(L,w.x(t.x+y),t.y+v/2),t.y+=v+a},k=w.textAlign(o);let D,E,B,S,A,I,F;for(n.textAlign=o,n.textBaseline="middle",n.font=m.string,t.x=Id(this,k,i),n.fillStyle=i.bodyColor,ue(this.beforeBody,x),y=l&&k!=="right"?o==="center"?h/2+f:h+2+f:0,S=0,I=s.length;S<I;++S){for(D=s[S],E=this.labelTextColors[S],n.fillStyle=E,ue(D.before,x),B=D.lines,l&&B.length&&(this._drawColorBox(n,t,S,w,i),v=Math.max(m.lineHeight,d)),A=0,F=B.length;A<F;++A)x(B[A]),v=m.lineHeight;ue(D.after,x)}y=0,v=m.lineHeight,ue(this.afterBody,x),t.y-=a}drawFooter(t,n,i){const s=this.footer,a=s.length;let o,l;if(a){const d=Fo(i.rtl,this.x,this.width);for(t.x=Id(this,i.footerAlign,i),t.y+=i.footerMarginTop,n.textAlign=d.textAlign(i.footerAlign),n.textBaseline="middle",o=$e(i.footerFont),n.fillStyle=i.footerColor,n.font=o.string,l=0;l<a;++l)n.fillText(s[l],d.x(t.x),t.y+o.lineHeight/2),t.y+=o.lineHeight+i.footerSpacing}}drawBackground(t,n,i,s){const{xAlign:a,yAlign:o}=this,{x:l,y:d}=t,{width:h,height:f}=i,{topLeft:m,topRight:v,bottomLeft:y,bottomRight:w}=Ha(s.cornerRadius);n.fillStyle=s.backgroundColor,n.strokeStyle=s.borderColor,n.lineWidth=s.borderWidth,n.beginPath(),n.moveTo(l+m,d),o==="top"&&this.drawCaret(t,n,i,s),n.lineTo(l+h-v,d),n.quadraticCurveTo(l+h,d,l+h,d+v),o==="center"&&a==="right"&&this.drawCaret(t,n,i,s),n.lineTo(l+h,d+f-w),n.quadraticCurveTo(l+h,d+f,l+h-w,d+f),o==="bottom"&&this.drawCaret(t,n,i,s),n.lineTo(l+y,d+f),n.quadraticCurveTo(l,d+f,l,d+f-y),o==="center"&&a==="left"&&this.drawCaret(t,n,i,s),n.lineTo(l,d+m),n.quadraticCurveTo(l,d,l+m,d),n.closePath(),n.fill(),s.borderWidth>0&&n.stroke()}_updateAnimationTarget(t){const n=this.chart,i=this.$animations,s=i&&i.x,a=i&&i.y;if(s||a){const o=Ol[t.position].call(this,this._active,this._eventPosition);if(!o)return;const l=this._size=O2(this,t),d=Object.assign({},o,this._size),h=M2(n,t,d),f=D2(t,d,h,n);(s._to!==f.x||a._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 i=this.opacity;if(!i)return;this._updateAnimationTarget(n);const s={width:this.width,height:this.height},a={x:this.x,y:this.y};i=Math.abs(i)<.001?0:i;const o=pn(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=i,this.drawBackground(a,t,s,n),ug(t,n.textDirection),a.y+=o.top,this.drawTitle(a,t,n),this.drawBody(a,t,n),this.drawFooter(a,t,n),hg(t,n.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,n){const i=this._active,s=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}}),a=!sd(i,s),o=this._positionChanged(s,n);(a||o)&&(this._active=s,this._eventPosition=n,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(t,n,i=!0){if(n&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const s=this.options,a=this._active||[],o=this._getActiveElements(t,a,n,i),l=this._positionChanged(o,t),d=n||!sd(o,a)||l;return d&&(this._active=o,(s.enabled||s.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,n))),d}_getActiveElements(t,n,i,s){const a=this.options;if(t.type==="mouseout")return[];if(!s)return n;const o=this.chart.getElementsAtEventForMode(t,a.mode,a,i);return a.reverse&&o.reverse(),o}_positionChanged(t,n){const{caretX:i,caretY:s,options:a}=this,o=Ol[a.position].call(this,t,n);return o!==!1&&(i!==o.x||s!==o.y)}}nt(Ah,"positioners",Ol);var Ak={id:"tooltip",_element:Ah,positioners:Ol,afterInit(e,t,n){n&&(e.tooltip=new Ah({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:I2},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"]},Vk=Object.freeze({__proto__:null,Colors:US,Decimation:XS,Filler:mk,Legend:wk,SubTitle:kk,Title:Sk,Tooltip:Ak});const Bk=(e,t,n,i)=>(typeof t=="string"?(n=e.push(t)-1,i.unshift({index:n,label:t})):isNaN(t)&&(n=null),n);function Pk(e,t,n,i){const s=e.indexOf(t);if(s===-1)return Bk(e,t,n,i);const a=e.lastIndexOf(t);return s!==a?n:s}const Nk=(e,t)=>e===null?null:an(Math.round(e),0,t);function A2(e){const t=this.getLabels();return e>=0&&e<t.length?t[e]:e}class Vh extends Ka{constructor(t){super(t),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(t){const n=this._addedLabels;if(n.length){const i=this.getLabels();for(const{index:s,label:a}of n)i[s]===a&&i.splice(s,1);this._addedLabels=[]}super.init(t)}parse(t,n){if(ee(t))return null;const i=this.getLabels();return n=isFinite(n)&&i[n]===t?n:Pk(i,t,Vt(n,t),this._addedLabels),Nk(n,i.length-1)}determineDataLimits(){const{minDefined:t,maxDefined:n}=this.getUserBounds();let{min:i,max:s}=this.getMinMax(!0);this.options.bounds==="ticks"&&(t||(i=0),n||(s=this.getLabels().length-1)),this.min=i,this.max=s}buildTicks(){const t=this.min,n=this.max,i=this.options.offset,s=[];let a=this.getLabels();a=t===0&&n===a.length-1?a:a.slice(t,n+1),this._valueRange=Math.max(a.length-(i?0:1),1),this._startValue=this.min-(i?.5:0);for(let o=t;o<=n;o++)s.push({value:o});return s}getLabelForValue(t){return A2.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}}nt(Vh,"id","category"),nt(Vh,"defaults",{ticks:{callback:A2}});function zk(e,t){const n=[],{bounds:s,step:a,min:o,max:l,precision:d,count:h,maxTicks:f,maxDigits:m,includeBounds:v}=e,y=a||1,w=f-1,{min:x,max:k}=t,D=!ee(o),E=!ee(l),B=!ee(h),S=(k-x)/(m+1);let A=Pm((k-x)/w/y)*y,I,F,L,W;if(A<1e-14&&!D&&!E)return[{value:x},{value:k}];W=Math.ceil(k/A)-Math.floor(x/A),W>w&&(A=Pm(W*A/w/y)*y),ee(d)||(I=Math.pow(10,d),A=Math.ceil(A*I)/I),s==="ticks"?(F=Math.floor(x/A)*A,L=Math.ceil(k/A)*A):(F=x,L=k),D&&E&&a&&Iw((l-o)/a,A/1e3)?(W=Math.round(Math.min((l-o)/A,f)),A=(l-o)/W,F=o,L=l):B?(F=D?o:F,L=E?l:L,W=h-1,A=(L-F)/W):(W=(L-F)/A,ll(W,Math.round(W),A/1e3)?W=Math.round(W):W=Math.ceil(W));const X=Math.max(zm(A),zm(F));I=Math.pow(10,ee(d)?X:d),F=Math.round(F*I)/I,L=Math.round(L*I)/I;let Z=0;for(D&&(v&&F!==o?(n.push({value:o}),F<o&&Z++,ll(Math.round((F+Z*A)*I)/I,o,V2(o,S,e))&&Z++):F<o&&Z++);Z<W;++Z){const Q=Math.round((F+Z*A)*I)/I;if(E&&Q>l)break;n.push({value:Q})}return E&&v&&L!==l?n.length&&ll(n[n.length-1].value,l,V2(l,S,e))?n[n.length-1].value=l:n.push({value:l}):(!E||L===l)&&n.push({value:L}),n}function V2(e,t,{horizontal:n,minRotation:i}){const s=Li(i),a=(n?Math.sin(s):Math.cos(s))||.001,o=.75*t*(""+e).length;return Math.min(t/a,o)}class Ad extends Ka{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 ee(t)||(typeof t=="number"||t instanceof Number)&&!isFinite(+t)?null:+t}handleTickRangeOptions(){const{beginAtZero:t}=this.options,{minDefined:n,maxDefined:i}=this.getUserBounds();let{min:s,max:a}=this;const o=d=>s=n?s:d,l=d=>a=i?a:d;if(t){const d=os(s),h=os(a);d<0&&h<0?l(0):d>0&&h>0&&o(0)}if(s===a){let d=a===0?1:Math.abs(a*.05);l(a+d),t||o(s-d)}this.min=s,this.max=a}getTickLimit(){const t=this.options.ticks;let{maxTicksLimit:n,stepSize:i}=t,s;return i?(s=Math.ceil(this.max/i)-Math.floor(this.min/i)+1,s>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${i} would result generating up to ${s} ticks. Limiting to 1000.`),s=1e3)):(s=this.computeTickLimit(),n=n||11),n&&(s=Math.min(n,s)),s}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const t=this.options,n=t.ticks;let i=this.getTickLimit();i=Math.max(2,i);const s={maxTicks:i,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},a=this._range||this,o=zk(s,a);return t.bounds==="ticks"&&Nm(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,i=this.max;if(super.configure(),this.options.offset&&t.length){const s=(i-n)/Math.max(t.length-1,1)/2;n-=s,i+=s}this._startValue=n,this._endValue=i,this._valueRange=i-n}getLabelForValue(t){return ul(t,this.chart.options.locale,this.options.ticks.format)}}class Bh extends Ad{determineDataLimits(){const{min:t,max:n}=this.getMinMax(!0);this.min=Pe(t)?t:0,this.max=Pe(n)?n:1,this.handleTickRangeOptions()}computeTickLimit(){const t=this.isHorizontal(),n=t?this.width:this.height,i=Li(this.options.ticks.minRotation),s=(t?Math.sin(i):Math.cos(i))||.001,a=this._resolveTickFontOptions(0);return Math.ceil(n/Math.min(40,a.lineHeight/s))}getPixelForValue(t){return t===null?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getValueForPixel(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange}}nt(Bh,"id","linear"),nt(Bh,"defaults",{ticks:{callback:ld.formatters.numeric}});const Ml=e=>Math.floor(na(e)),Za=(e,t)=>Math.pow(10,Ml(e)+t);function B2(e){return e/Math.pow(10,Ml(e))===1}function P2(e,t,n){const i=Math.pow(10,n),s=Math.floor(e/i);return Math.ceil(t/i)-s}function Lk(e,t){const n=t-e;let i=Ml(n);for(;P2(e,t,i)>10;)i++;for(;P2(e,t,i)<10;)i--;return Math.min(i,Ml(e))}function Fk(e,{min:t,max:n}){t=Gn(e.min,t);const i=[],s=Ml(t);let a=Lk(t,n),o=a<0?Math.pow(10,Math.abs(a)):1;const l=Math.pow(10,a),d=s>a?Math.pow(10,s):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,a)),v=Gn(e.min,Math.round((d+f+m*Math.pow(10,a))*o)/o);for(;v<n;)i.push({value:v,major:B2(v),significand:m}),m>=10?m=m<15?15:20:m++,m>=20&&(a++,m=2,o=a>=0?1:o),v=Math.round((d+f+m*Math.pow(10,a))*o)/o;const y=Gn(e.max,v);return i.push({value:y,major:B2(y),significand:m}),i}class Ph extends Ka{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(t,n){const i=Ad.prototype.parse.apply(this,[t,n]);if(i===0){this._zero=!0;return}return Pe(i)&&i>0?i:null}determineDataLimits(){const{min:t,max:n}=this.getMinMax(!0);this.min=Pe(t)?Math.max(0,t):null,this.max=Pe(n)?Math.max(0,n):null,this.options.beginAtZero&&(this._zero=!0),this._zero&&this.min!==this._suggestedMin&&!Pe(this._userMin)&&(this.min=t===Za(this.min,0)?Za(this.min,-1):Za(this.min,0)),this.handleTickRangeOptions()}handleTickRangeOptions(){const{minDefined:t,maxDefined:n}=this.getUserBounds();let i=this.min,s=this.max;const a=l=>i=t?i:l,o=l=>s=n?s:l;i===s&&(i<=0?(a(1),o(10)):(a(Za(i,-1)),o(Za(s,1)))),i<=0&&a(Za(s,-1)),s<=0&&o(Za(i,1)),this.min=i,this.max=s}buildTicks(){const t=this.options,n={min:this._userMin,max:this._userMax},i=Fk(n,this);return t.bounds==="ticks"&&Nm(i,this,"value"),t.reverse?(i.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),i}getLabelForValue(t){return t===void 0?"0":ul(t,this.chart.options.locale,this.options.ticks.format)}configure(){const t=this.min;super.configure(),this._startValue=na(t),this._valueRange=na(this.max)-na(t)}getPixelForValue(t){return(t===void 0||t===0)&&(t=this.min),t===null||isNaN(t)?NaN:this.getPixelForDecimal(t===this.min?0:(na(t)-this._startValue)/this._valueRange)}getValueForPixel(t){const n=this.getDecimalForPixel(t);return Math.pow(10,this._startValue+n*this._valueRange)}}nt(Ph,"id","logarithmic"),nt(Ph,"defaults",{ticks:{callback:ld.formatters.logarithmic,major:{enabled:!0}}});function Nh(e){const t=e.ticks;if(t.display&&e.display){const n=pn(t.backdropPadding);return Vt(t.font&&t.font.size,ze.font.size)+n.height}return 0}function Rk(e,t,n){return n=Se(n)?n:[n],{w:Zw(e,t.string,n),h:n.length*t.lineHeight}}function N2(e,t,n,i,s){return e===i||e===s?{start:t-n/2,end:t+n/2}:e<i||e>s?{start:t-n,end:t}:{start:t,end:t+n}}function Hk(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),i=[],s=[],a=e._pointLabels.length,o=e.options.pointLabels,l=o.centerPointLabels?De/a:0;for(let d=0;d<a;d++){const h=o.setContext(e.getPointLabelContext(d));s[d]=h.padding;const f=e.getPointPosition(d,e.drawingArea+s[d],l),m=$e(h.font),v=Rk(e.ctx,m,e._pointLabels[d]);i[d]=v;const y=Kn(e.getIndexAngle(d)+l),w=Math.round(th(y)),x=N2(w,f.x,v.w,0,180),k=N2(w,f.y,v.h,90,270);Wk(n,t,y,x,k)}e.setCenterPoint(t.l-n.l,n.r-t.r,t.t-n.t,n.b-t.b),e._pointLabelItems=Uk(e,i,s)}function Wk(e,t,n,i,s){const a=Math.abs(Math.sin(n)),o=Math.abs(Math.cos(n));let l=0,d=0;i.start<t.l?(l=(t.l-i.start)/a,e.l=Math.min(e.l,t.l-l)):i.end>t.r&&(l=(i.end-t.r)/a,e.r=Math.max(e.r,t.r+l)),s.start<t.t?(d=(t.t-s.start)/o,e.t=Math.min(e.t,t.t-d)):s.end>t.b&&(d=(s.end-t.b)/o,e.b=Math.max(e.b,t.b+d))}function Yk(e,t,n){const i=e.drawingArea,{extra:s,additionalAngle:a,padding:o,size:l}=n,d=e.getPointPosition(t,i+s+o,a),h=Math.round(th(Kn(d.angle+Ne))),f=Zk(d.y,l.h,h),m=Gk(h),v=Kk(d.x,l.w,m);return{visible:!0,x:d.x,y:f,textAlign:m,left:v,top:f,right:v+l.w,bottom:f+l.h}}function jk(e,t){if(!t)return!0;const{left:n,top:i,right:s,bottom:a}=e;return!(ks({x:n,y:i},t)||ks({x:n,y:a},t)||ks({x:s,y:i},t)||ks({x:s,y:a},t))}function Uk(e,t,n){const i=[],s=e._pointLabels.length,a=e.options,{centerPointLabels:o,display:l}=a.pointLabels,d={extra:Nh(a)/2,additionalAngle:o?De/s:0};let h;for(let f=0;f<s;f++){d.padding=n[f],d.size=t[f];const m=Yk(e,f,d);i.push(m),l==="auto"&&(m.visible=jk(m,h),m.visible&&(h=m))}return i}function Gk(e){return e===0||e===180?"center":e<180?"left":"right"}function Kk(e,t,n){return n==="right"?e-=t:n==="center"&&(e-=t/2),e}function Zk(e,t,n){return n===90||n===270?e-=t/2:(n>270||n<90)&&(e-=t),e}function Xk(e,t,n){const{left:i,top:s,right:a,bottom:o}=n,{backdropColor:l}=t;if(!ee(l)){const d=Ha(t.borderRadius),h=pn(t.backdropPadding);e.fillStyle=l;const f=i-h.left,m=s-h.top,v=a-i+h.width,y=o-s+h.height;Object.values(d).some(w=>w!==0)?(e.beginPath(),fl(e,{x:f,y:m,w:v,h:y,radius:d}),e.fill()):e.fillRect(f,m,v,y)}}function Jk(e,t){const{ctx:n,options:{pointLabels:i}}=e;for(let s=t-1;s>=0;s--){const a=e._pointLabelItems[s];if(!a.visible)continue;const o=i.setContext(e.getPointLabelContext(s));Xk(n,o,a);const l=$e(o.font),{x:d,y:h,textAlign:f}=a;Ra(n,e._pointLabels[s],d,h+l.lineHeight/2,l,{color:o.color,textAlign:f,textBaseline:"middle"})}}function z2(e,t,n,i){const{ctx:s}=e;if(n)s.arc(e.xCenter,e.yCenter,t,0,ke);else{let a=e.getPointPosition(0,t);s.moveTo(a.x,a.y);for(let o=1;o<i;o++)a=e.getPointPosition(o,t),s.lineTo(a.x,a.y)}}function Qk(e,t,n,i,s){const a=e.ctx,o=t.circular,{color:l,lineWidth:d}=t;!o&&!i||!l||!d||n<0||(a.save(),a.strokeStyle=l,a.lineWidth=d,a.setLineDash(s.dash),a.lineDashOffset=s.dashOffset,a.beginPath(),z2(e,n,o,i),a.closePath(),a.stroke(),a.restore())}function qk(e,t,n){return ia(e,{label:n,index:t,type:"pointLabel"})}class Dl extends Ad{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=pn(Nh(this.options)/2),n=this.width=this.maxWidth-t.width,i=this.height=this.maxHeight-t.height;this.xCenter=Math.floor(this.left+n/2+t.left),this.yCenter=Math.floor(this.top+i/2+t.top),this.drawingArea=Math.floor(Math.min(n,i)/2)}determineDataLimits(){const{min:t,max:n}=this.getMinMax(!1);this.min=Pe(t)&&!isNaN(t)?t:0,this.max=Pe(n)&&!isNaN(n)?n:0,this.handleTickRangeOptions()}computeTickLimit(){return Math.ceil(this.drawingArea/Nh(this.options))}generateTickLabels(t){Ad.prototype.generateTickLabels.call(this,t),this._pointLabels=this.getLabels().map((n,i)=>{const s=we(this.options.pointLabels.callback,[n,i],this);return s||s===0?s:""}).filter((n,i)=>this.chart.getDataVisibility(i))}fit(){const t=this.options;t.display&&t.pointLabels.display?Hk(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(t,n,i,s){this.xCenter+=Math.floor((t-n)/2),this.yCenter+=Math.floor((i-s)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(t,n,i,s))}getIndexAngle(t){const n=ke/(this._pointLabels.length||1),i=this.options.startAngle||0;return Kn(t*n+Li(i))}getDistanceFromCenterForValue(t){if(ee(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(ee(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 i=n[t];return qk(this.getContext(),t,i)}}getPointPosition(t,n,i=0){const s=this.getIndexAngle(t)-Ne+i;return{x:Math.cos(s)*n+this.xCenter,y:Math.sin(s)*n+this.yCenter,angle:s}}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:i,right:s,bottom:a}=this._pointLabelItems[t];return{left:n,top:i,right:s,bottom:a}}drawBackground(){const{backgroundColor:t,grid:{circular:n}}=this.options;if(t){const i=this.ctx;i.save(),i.beginPath(),z2(this,this.getDistanceFromCenterForValue(this._endValue),n,this._pointLabels.length),i.closePath(),i.fillStyle=t,i.fill(),i.restore()}}drawGrid(){const t=this.ctx,n=this.options,{angleLines:i,grid:s,border:a}=n,o=this._pointLabels.length;let l,d,h;if(n.pointLabels.display&&Jk(this,o),s.display&&this.ticks.forEach((f,m)=>{if(m!==0){d=this.getDistanceFromCenterForValue(f.value);const v=this.getContext(m),y=s.setContext(v),w=a.setContext(v);Qk(this,y,d,o,w)}}),i.display){for(t.save(),l=o-1;l>=0;l--){const f=i.setContext(this.getPointLabelContext(l)),{color:m,lineWidth:v}=f;!v||!m||(t.lineWidth=v,t.strokeStyle=m,t.setLineDash(f.borderDash),t.lineDashOffset=f.borderDashOffset,d=this.getDistanceFromCenterForValue(n.ticks.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,i=n.ticks;if(!i.display)return;const s=this.getIndexAngle(0);let a,o;t.save(),t.translate(this.xCenter,this.yCenter),t.rotate(s),t.textAlign="center",t.textBaseline="middle",this.ticks.forEach((l,d)=>{if(d===0&&!n.reverse)return;const h=i.setContext(this.getContext(d)),f=$e(h.font);if(a=this.getDistanceFromCenterForValue(this.ticks[d].value),h.showLabelBackdrop){t.font=f.string,o=t.measureText(l.label).width,t.fillStyle=h.backdropColor;const m=pn(h.backdropPadding);t.fillRect(-o/2-m.left,-a-f.size/2-m.top,o+m.width,f.size+m.height)}Ra(t,l.label,0,-a,f,{color:h.color})}),t.restore()}drawTitle(){}}nt(Dl,"id","radialLinear"),nt(Dl,"defaults",{display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:ld.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback(t){return t},padding:5,centerPointLabels:!1}}),nt(Dl,"defaultRoutes",{"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"}),nt(Dl,"descriptors",{angleLines:{_fallback:"grid"}});const Vd={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}},Pn=Object.keys(Vd);function $k(e,t){return e-t}function L2(e,t){if(ee(t))return null;const n=e._adapter,{parser:i,round:s,isoWeekday:a}=e._parseOpts;let o=t;return typeof i=="function"&&(o=i(o)),Pe(o)||(o=typeof i=="string"?n.parse(o,i):n.parse(o)),o===null?null:(s&&(o=s==="week"&&(No(a)||a===!0)?n.startOf(o,"isoWeek",a):n.startOf(o,s)),+o)}function F2(e,t,n,i){const s=Pn.length;for(let a=Pn.indexOf(e);a<s-1;++a){const o=Vd[Pn[a]],l=o.steps?o.steps:Number.MAX_SAFE_INTEGER;if(o.common&&Math.ceil((n-t)/(l*o.size))<=i)return Pn[a]}return Pn[s-1]}function tC(e,t,n,i,s){for(let a=Pn.length-1;a>=Pn.indexOf(n);a--){const o=Pn[a];if(Vd[o].common&&e._adapter.diff(s,i,o)>=t-1)return o}return Pn[n?Pn.indexOf(n):0]}function eC(e){for(let t=Pn.indexOf(e)+1,n=Pn.length;t<n;++t)if(Vd[Pn[t]].common)return Pn[t]}function R2(e,t,n){if(!n)e[t]=!0;else if(n.length){const{lo:i,hi:s}=nh(n,t),a=n[i]>=t?n[i]:n[s];e[a]=!0}}function nC(e,t,n,i){const s=e._adapter,a=+s.startOf(t[0].value,i),o=t[t.length-1].value;let l,d;for(l=a;l<=o;l=+s.add(l,1,i))d=n[l],d>=0&&(t[d].major=!0);return t}function H2(e,t,n){const i=[],s={},a=t.length;let o,l;for(o=0;o<a;++o)l=t[o],s[l]=o,i.push({value:l,major:!1});return a===0||!n?i:nC(e,i,s,n)}class El extends Ka{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 i=t.time||(t.time={}),s=this._adapter=new dx._date(t.adapters.date);s.init(n),ol(i.displayFormats,s.formats()),this._parseOpts={parser:i.parser,round:i.round,isoWeekday:i.isoWeekday},super.init(t),this._normalized=n.normalized}parse(t,n){return t===void 0?null:L2(this,t)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const t=this.options,n=this._adapter,i=t.time.unit||"day";let{min:s,max:a,minDefined:o,maxDefined:l}=this.getUserBounds();function d(h){!o&&!isNaN(h.min)&&(s=Math.min(s,h.min)),!l&&!isNaN(h.max)&&(a=Math.max(a,h.max))}(!o||!l)&&(d(this._getLabelBounds()),(t.bounds!=="ticks"||t.ticks.source!=="labels")&&d(this.getMinMax(!1))),s=Pe(s)&&!isNaN(s)?s:+n.startOf(Date.now(),i),a=Pe(a)&&!isNaN(a)?a:+n.endOf(Date.now(),i)+1,this.min=Math.min(s,a-1),this.max=Math.max(s+1,a)}_getLabelBounds(){const t=this.getLabelTimestamps();let n=Number.POSITIVE_INFINITY,i=Number.NEGATIVE_INFINITY;return t.length&&(n=t[0],i=t[t.length-1]),{min:n,max:i}}buildTicks(){const t=this.options,n=t.time,i=t.ticks,s=i.source==="labels"?this.getLabelTimestamps():this._generate();t.bounds==="ticks"&&s.length&&(this.min=this._userMin||s[0],this.max=this._userMax||s[s.length-1]);const a=this.min,o=this.max,l=Pw(s,a,o);return this._unit=n.unit||(i.autoSkip?F2(n.minUnit,this.min,this.max,this._getLabelCapacity(a)):tC(this,l.length,n.minUnit,this.min,this.max)),this._majorUnit=!i.major.enabled||this._unit==="year"?void 0:eC(this._unit),this.initOffsets(s),t.reverse&&l.reverse(),H2(this,l,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map(t=>+t.value))}initOffsets(t=[]){let n=0,i=0,s,a;this.options.offset&&t.length&&(s=this.getDecimalForValue(t[0]),t.length===1?n=1-s:n=(this.getDecimalForValue(t[1])-s)/2,a=this.getDecimalForValue(t[t.length-1]),t.length===1?i=a:i=(a-this.getDecimalForValue(t[t.length-2]))/2);const o=t.length<3?.5:.25;n=an(n,0,o),i=an(i,0,o),this._offsets={start:n,end:i,factor:1/(n+1+i)}}_generate(){const t=this._adapter,n=this.min,i=this.max,s=this.options,a=s.time,o=a.unit||F2(a.minUnit,n,i,this._getLabelCapacity(n)),l=Vt(s.ticks.stepSize,1),d=o==="week"?a.isoWeekday:!1,h=No(d)||d===!0,f={};let m=n,v,y;if(h&&(m=+t.startOf(m,"isoWeek",d)),m=+t.startOf(m,h?"day":o),t.diff(i,n,o)>1e5*l)throw new Error(n+" and "+i+" are too far apart with stepSize of "+l+" "+o);const w=s.ticks.source==="data"&&this.getDataTimestamps();for(v=m,y=0;v<i;v=+t.add(v,l,o),y++)R2(f,v,w);return(v===i||s.bounds==="ticks"||y===1)&&R2(f,v,w),Object.keys(f).sort((x,k)=>x-k).map(x=>+x)}getLabelForValue(t){const n=this._adapter,i=this.options.time;return i.tooltipFormat?n.format(t,i.tooltipFormat):n.format(t,i.displayFormats.datetime)}format(t,n){const s=this.options.time.displayFormats,a=this._unit,o=n||s[a];return this._adapter.format(t,o)}_tickFormatFunction(t,n,i,s){const a=this.options,o=a.ticks.callback;if(o)return we(o,[t,n,i],this);const l=a.time.displayFormats,d=this._unit,h=this._majorUnit,f=d&&l[d],m=h&&l[h],v=i[n],y=h&&m&&v&&v.major;return this._adapter.format(t,s||(y?m:f))}generateTickLabels(t){let n,i,s;for(n=0,i=t.length;n<i;++n)s=t[n],s.label=this._tickFormatFunction(s.value,n,t)}getDecimalForValue(t){return t===null?NaN:(t-this.min)/(this.max-this.min)}getPixelForValue(t){const n=this._offsets,i=this.getDecimalForValue(t);return this.getPixelForDecimal((n.start+i)*n.factor)}getValueForPixel(t){const n=this._offsets,i=this.getDecimalForPixel(t)/n.factor-n.end;return this.min+i*(this.max-this.min)}_getLabelSize(t){const n=this.options.ticks,i=this.ctx.measureText(t).width,s=Li(this.isHorizontal()?n.maxRotation:n.minRotation),a=Math.cos(s),o=Math.sin(s),l=this._resolveTickFontOptions(0).size;return{w:i*a+l*o,h:i*o+l*a}}_getLabelCapacity(t){const n=this.options.time,i=n.displayFormats,s=i[n.unit]||i.millisecond,a=this._tickFormatFunction(t,0,H2(this,[t],this._majorUnit),s),o=this._getLabelSize(a),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,i;if(t.length)return t;const s=this.getMatchingVisibleMetas();if(this._normalized&&s.length)return this._cache.data=s[0].controller.getAllParsedValues(this);for(n=0,i=s.length;n<i;++n)t=t.concat(s[n].controller.getAllParsedValues(this));return this._cache.data=this.normalize(t)}getLabelTimestamps(){const t=this._cache.labels||[];let n,i;if(t.length)return t;const s=this.getLabels();for(n=0,i=s.length;n<i;++n)t.push(L2(this,s[n]));return this._cache.labels=this._normalized?t:this.normalize(t)}normalize(t){return Hm(t.sort($k))}}nt(El,"id","time"),nt(El,"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 Bd(e,t,n){let i=0,s=e.length-1,a,o,l,d;n?(t>=e[i].pos&&t<=e[s].pos&&({lo:i,hi:s}=Ss(e,"pos",t)),{pos:a,time:l}=e[i],{pos:o,time:d}=e[s]):(t>=e[i].time&&t<=e[s].time&&({lo:i,hi:s}=Ss(e,"time",t)),{time:a,pos:l}=e[i],{time:o,pos:d}=e[s]);const h=o-a;return h?l+(d-l)*(t-a)/h:l}class zh extends El{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=Bd(n,this.min),this._tableRange=Bd(n,this.max)-this._minPos,super.initOffsets(t)}buildLookupTable(t){const{min:n,max:i}=this,s=[],a=[];let o,l,d,h,f;for(o=0,l=t.length;o<l;++o)h=t[o],h>=n&&h<=i&&s.push(h);if(s.length<2)return[{time:n,pos:0},{time:i,pos:1}];for(o=0,l=s.length;o<l;++o)f=s[o+1],d=s[o-1],h=s[o],Math.round((f+d)/2)!==h&&a.push({time:h,pos:o/(l-1)});return a}_getTimestampsForTable(){let t=this._cache.all||[];if(t.length)return t;const n=this.getDataTimestamps(),i=this.getLabelTimestamps();return n.length&&i.length?t=this.normalize(n.concat(i)):t=n.length?n:i,t=this._cache.all=t,t}getDecimalForValue(t){return(Bd(this._table,t)-this._minPos)/this._tableRange}getValueForPixel(t){const n=this._offsets,i=this.getDecimalForPixel(t)/n.factor-n.end;return Bd(this._table,i*this._tableRange+this._minPos,!0)}}nt(zh,"id","timeseries"),nt(zh,"defaults",El.defaults);var iC=Object.freeze({__proto__:null,CategoryScale:Vh,LinearScale:Bh,LogarithmicScale:Ph,RadialLinearScale:Dl,TimeScale:El,TimeSeriesScale:zh});const W2=[cx,FS,Vk,iC],Y2={data:{type:Object,required:!0},options:{type:Object,default:()=>({})},plugins:{type:Array,default:()=>[]},datasetIdKey:{type:String,default:"label"},updateMode:{type:String,default:void 0}},sC={type:{type:String,required:!0},...Y2},aC=c.version[0]==="2"?(e,t)=>Object.assign(e,{attrs:t}):(e,t)=>Object.assign(e,t);function Ho(e){return c.isProxy(e)?c.toRaw(e):e}function oC(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:e;return c.isProxy(t)?new Proxy(e,{}):e}function rC(e,t){const n=e.options;n&&t&&Object.assign(n,t)}function j2(e,t){e.labels=t}function U2(e,t,n){const i=[];e.datasets=t.map(s=>{const a=e.datasets.find(o=>o[n]===s[n]);return!a||!s.data||i.includes(a)?{...s}:(i.push(a),Object.assign(a,s),a)})}function lC(e,t){const n={labels:[],datasets:[]};return j2(n,e.labels),U2(n,e.datasets,t),n}const cC=c.defineComponent({props:sC,setup(e,t){let{expose:n}=t;const i=c.ref(null),s=c.shallowRef(null);n({chart:s});const a=()=>{if(!i.value)return;const{type:d,data:h,options:f,plugins:m,datasetIdKey:v}=e,y=lC(h,v),w=oC(y,h);s.value=new Hi(i.value,{type:d,data:w,options:{...f},plugins:m})},o=()=>{const d=c.toRaw(s.value);d&&(d.destroy(),s.value=null)},l=d=>{d.update(e.updateMode)};return c.onMounted(a),c.onBeforeUnmount(o),c.watch([()=>e.options,()=>e.data],(d,h)=>{let[f,m]=d,[v,y]=h;const w=c.toRaw(s.value);if(!w)return;let x=!1;if(f){const k=Ho(f),D=Ho(v);k&&k!==D&&(rC(w,k),x=!0)}if(m){const k=Ho(m.labels),D=Ho(y.labels),E=Ho(m.datasets),B=Ho(y.datasets);k!==D&&(j2(w.config.data,k),x=!0),E&&E!==B&&(U2(w.config.data,E,e.datasetIdKey),x=!0)}x&&l(w)},{deep:!0}),()=>c.h("canvas",{ref:i})}});function dC(e,t){return Hi.register(t),c.defineComponent({props:Y2,setup(n,i){let{expose:s}=i;const a=c.shallowRef(null),o=l=>{a.value=l==null?void 0:l.chart};return s({chart:a}),()=>c.h(cC,aC({ref:o},{type:e,...n}))}})}const G2=dC("bar",gl),Tl={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"]'},Lh=e=>{let t=[],n={};const i=/(\[[^[\]]*\])/g,s=e.match(i);for(let a=0;a<s.length;a++){s[a]=s[a].replace("[",""),s[a]=s[a].replace("]","");let o=s[a].split(",");n.colorName=o[0].trim().replace(/"/g,""),n.variantName=o[1].trim().replace(/"/g,""),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},$ut="";Hi.register(...W2);const uC={components:{Bar:G2},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:()=>[]},barWidth:{type:Number,default:1}},data(){return{sassColorVariables:Tl,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}},methods:{paleteBuilder:Lh,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(i=>{i.datasets.forEach(s=>{const a={label:s.label,data:s.data,name:s.name,borderRadius:6};t.datasets.push(a)})}),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(i=>{const s=i.name;let a;e.length===1&&(a=2,n[s]=t[a],this.chartOptions.plugins.legend.display=!1),n[s]||(a=Object.keys(n).length%t.length,n[s]=t[a]),i.backgroundColor=n[s],i.borderRadius=6})}}},hC={class:"responsive-container"};function fC(e,t,n,i,s,a){const o=c.resolveComponent("Bar");return c.openBlock(),c.createElementBlock("span",null,[c.createElementVNode("div",hC,[c.createVNode(o,{is:"bar",data:s.localChartData,options:s.chartOptions},null,8,["data","options"])])])}const pC=rt(uC,[["render",fC],["__scopeId","data-v-1e55dea1"]]),t1t="";Hi.register(...W2);const mC={components:{Bar:G2},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:()=>[]},barWidth:{type:Number,default:1}},data(){return{sassColorVariables:Tl,localChartData:{},localLabels:[],palletColors:[],deleteFirstTwoColors:!1,chartOptions:{scales:{x:{stacked:!0},y:{stacked:!0}},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}},methods:{paleteBuilder:Lh,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(i=>{i.datasets.forEach(s=>{const a={label:s.label,data:s.data,name:s.name,borderRadius:6};t.datasets.push(a)})}),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(i=>{const s=i.name;let a;e.length===1&&(a=2,n[s]=t[a],this.chartOptions.plugins.legend.display=!1),n[s]||(a=Object.keys(n).length%t.length,n[s]=t[a]),i.backgroundColor=n[s],i.borderRadius=6})}}},gC={class:"responsive-container"};function vC(e,t,n,i,s,a){const o=c.resolveComponent("Bar");return c.openBlock(),c.createElementBlock("span",null,[c.createElementVNode("div",gC,[c.createVNode(o,{is:"bar",data:s.localChartData,options:s.chartOptions},null,8,["data","options"])])])}const _C=rt(mC,[["render",vC],["__scopeId","data-v-ed4bef4e"]]),e1t="",Fh={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}}},K2=()=>{c.useCssVars(e=>({"6d4c0f4d":e.marginBottomResolver,d6616fae:e.marginLeftResolver,"0baf3274":e.marginRightResolver,"7c666dff":e.marginTopResolver,"561264d4":e.paddingBottomResolver,17295920:e.paddingLeftResolver,e3e47742:e.paddingRightResolver,"9def4450":e.paddingTopResolver}))},Z2=Fh.setup;Fh.setup=Z2?(e,t)=>(K2(),Z2(e,t)):K2;const yC=Fh,bC={class:"spacer"};function wC(e,t,n,i,s,a){return c.openBlock(),c.createElementBlock("div",bC,[c.renderSlot(e.$slots,"default",{},void 0,!0)])}const Pd=rt(yC,[["render",wC],["__scopeId","data-v-5aebf225"]]);function Rh(e,t=24){let n=e/8,i=n%4;return`${n>t?t:n-i+4}px`}const n1t="",Hh={components:{CdsSpacer:Pd,CdsClickable:Qs},props:{elevated:{type:Boolean,default:!1},fluid:{type:Boolean,default:!1},padding:{type:[Number,String],default:4,validator:e=>e<=12},clickable:{type:Boolean,default:!1},variant:{type:String,default:"gray"}},data(){return{width:0}},computed:{widthResolver(){return this.fluid?"100%":"fit-content"},borderRadiusResolver(){return this.rounder(this.width,12)}},mounted(){this.width=this.$refs["cds-box"].getBoundingClientRect().width},methods:{rounder:Rh,handleClick(){this.clickable&&this.$emit("boxClick",!0)}}},X2=()=>{c.useCssVars(e=>({"8bf1f4e6":e.widthResolver,"337f1943":e.borderRadiusResolver}))},J2=Hh.setup;Hh.setup=J2?(e,t)=>(X2(),J2(e,t)):X2;const xC=Hh;function SC(e,t,n,i,s,a){const o=c.resolveComponent("cds-spacer"),l=c.resolveComponent("cds-clickable");return c.openBlock(),c.createElementBlock("div",{ref:"cds-box",class:c.normalizeClass(n.elevated?"box--elevated":`box--${n.variant}`)},[c.createVNode(l,{class:"box__container",clickable:n.clickable,onClick:a.handleClick},{default:c.withCtx(()=>[c.createVNode(o,{"padding-top":n.padding,"padding-right":n.padding,"padding-bottom":n.padding,"padding-left":n.padding},{default:c.withCtx(()=>[c.renderSlot(e.$slots,"default",{},void 0,!0)]),_:3},8,["padding-top","padding-right","padding-bottom","padding-left"])]),_:3},8,["clickable","onClick"])],2)}const Il=rt(xC,[["render",SC],["__scopeId","data-v-34f9c778"]]);var Wh={exports:{}};(function(e,t){var n=9007199254740991,i="[object Arguments]",s="[object Function]",a="[object GeneratorFunction]",o="[object Map]",l="[object Object]",d="[object Promise]",h="[object Set]",f="[object WeakMap]",m="[object DataView]",v=/[\\^$.*+?()[\]{}|]/g,y=/^\[object .+?Constructor\]$/,w=typeof qe=="object"&&qe&&qe.Object===Object&&qe,x=typeof self=="object"&&self&&self.Object===Object&&self,k=w||x||Function("return this")(),D=t&&!t.nodeType&&t,E=D&&!0&&e&&!e.nodeType&&e,B=E&&E.exports===D;function S(tt,Ht){return tt==null?void 0:tt[Ht]}function A(tt){var Ht=!1;if(tt!=null&&typeof tt.toString!="function")try{Ht=!!(tt+"")}catch{}return Ht}function I(tt,Ht){return function(oe){return tt(Ht(oe))}}var F=Function.prototype,L=Object.prototype,W=k["__core-js_shared__"],X=function(){var tt=/[^.]+$/.exec(W&&W.keys&&W.keys.IE_PROTO||"");return tt?"Symbol(src)_1."+tt:""}(),Z=F.toString,Q=L.hasOwnProperty,et=L.toString,gt=RegExp("^"+Z.call(Q).replace(v,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),at=B?k.Buffer:void 0,ft=L.propertyIsEnumerable,lt=at?at.isBuffer:void 0,vt=I(Object.keys,Object),xt=Nt(k,"DataView"),ct=Nt(k,"Map"),R=Nt(k,"Promise"),q=Nt(k,"Set"),ot=Nt(k,"WeakMap"),pt=!ft.call({valueOf:1},"valueOf"),$=$t(xt),_t=$t(ct),Mt=$t(R),ut=$t(q),Bt=$t(ot);function Lt(tt){return et.call(tt)}function Pt(tt){if(!Xe(tt)||le(tt))return!1;var Ht=Ke(tt)||A(tt)?gt:y;return Ht.test($t(tt))}function Nt(tt,Ht){var oe=S(tt,Ht);return Pt(oe)?oe:void 0}var Yt=Lt;(xt&&Yt(new xt(new ArrayBuffer(1)))!=m||ct&&Yt(new ct)!=o||R&&Yt(R.resolve())!=d||q&&Yt(new q)!=h||ot&&Yt(new ot)!=f)&&(Yt=function(tt){var Ht=et.call(tt),oe=Ht==l?tt.constructor:void 0,$n=oe?$t(oe):void 0;if($n)switch($n){case $:return m;case _t:return o;case Mt:return d;case ut:return h;case Bt:return f}return Ht});function le(tt){return!!X&&X in tt}function he(tt){var Ht=tt&&tt.constructor,oe=typeof Ht=="function"&&Ht.prototype||L;return tt===oe}function $t(tt){if(tt!=null){try{return Z.call(tt)}catch{}try{return tt+""}catch{}}return""}function Et(tt){return Ee(tt)&&Q.call(tt,"callee")&&(!ft.call(tt,"callee")||et.call(tt)==i)}var ve=Array.isArray;function Ge(tt){return tt!=null&&Ze(tt.length)&&!Ke(tt)}function Ee(tt){return Si(tt)&&Ge(tt)}var _e=lt||Je;function on(tt){if(Ge(tt)&&(ve(tt)||typeof tt=="string"||typeof tt.splice=="function"||_e(tt)||Et(tt)))return!tt.length;var Ht=Yt(tt);if(Ht==o||Ht==h)return!tt.size;if(pt||he(tt))return!vt(tt).length;for(var oe in tt)if(Q.call(tt,oe))return!1;return!0}function Ke(tt){var Ht=Xe(tt)?et.call(tt):"";return Ht==s||Ht==a}function Ze(tt){return typeof tt=="number"&&tt>-1&&tt%1==0&&tt<=n}function Xe(tt){var Ht=typeof tt;return!!tt&&(Ht=="object"||Ht=="function")}function Si(tt){return!!tt&&typeof tt=="object"}function Je(){return!1}e.exports=on})(Wh,Wh.exports);const We=Wh.exports,i1t="",kC={components:{CdsIcon:Me,CdsSpacer:Pd,CdsClickable:Qs},props:{items:{type:Array,default:()=>[],required:!0}},methods:{resolveRoute({route:e,path:t}){const n=We(e)?t:e;return n instanceof String?{path:n}:n},routerPushTo(e){return this.resolveRoute(e)?this.resolveRoute(e).path:null}}},CC={class:"breadcrumb"};function OC(e,t,n,i,s,a){const o=c.resolveComponent("cds-icon"),l=c.resolveComponent("cds-spacer"),d=c.resolveComponent("router-link"),h=c.resolveComponent("cds-clickable");return c.openBlock(),c.createElementBlock("nav",null,[c.createElementVNode("ul",CC,[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(n.items,(f,m)=>(c.openBlock(),c.createElementBlock("li",{key:`${m}-${f.name}-item`,role:"presentation"},[m===0?(c.openBlock(),c.createBlock(h,{key:0,clickable:""},{default:c.withCtx(()=>[c.createVNode(d,{to:a.routerPushTo(f),class:"breadcrumb__link"},{default:c.withCtx(()=>[n.items.length<=2?(c.openBlock(),c.createBlock(o,{key:0,height:"16",width:"16",name:"arrow-left-outline"})):(c.openBlock(),c.createBlock(o,{key:1,height:"15",width:"15",name:"home-outline"})),c.createVNode(l,{"margin-left":"2"},{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(f.label),1)]),_:2},1024)]),_:2},1032,["to"])]),_:2},1024)):(c.openBlock(),c.createBlock(l,{key:1,class:"breadcrumb__item","margin-right":"1","margin-left":"1"},{default:c.withCtx(()=>[c.createVNode(o,{height:"16",width:"16",name:"caret-right-outline",class:"breadcrumb__separator"}),c.createVNode(d,{to:a.routerPushTo(f),class:"breadcrumb__link"},{default:c.withCtx(()=>[c.createVNode(h,{clickable:""},{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(f.label),1)]),_:2},1024)]),_:2},1032,["to"])]),_:2},1024))]))),128))])])}const MC=rt(kC,[["render",OC],["__scopeId","data-v-c2046c1c"]]),s1t="",Yh={props:{src:{type:String,required:!0},fallbackSrc:{type:String,required:!1},width:{type:[Number,String],default:null},height:{type:[Number,String],default:null},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}},data(){return{innerSrc:this.src}},computed:{heightResolver(){return this.height?`${this.height}px`:"auto"},widthResolver(){return this.width?`${this.width}px`:"auto"},opacityResolver(){return this.width?`${this.width}px`:"auto"},radiusResolver(){return this.roundedCorners?Rh(this.width):"0px"},grayScaleResolver(){return this.blackAndWhite?"grayscale(100%)":this.dimmed?"grayscale(35%)":"grayscale(0%)"}},methods:{rounder:Rh,imageSrcResolver(){this.innerSrc=this.fallbackSrc}}},Q2=()=>{c.useCssVars(e=>({"21136de6":e.radiusResolver,e10ed842:e.grayScaleResolver,"31ae2d7b":e.heightResolver,"1e7f7c9d":e.opacity,"775376fe":e.widthResolver}))},q2=Yh.setup;Yh.setup=q2?(e,t)=>(Q2(),q2(e,t)):Q2;const DC=Yh,EC=["src","alt"];function TC(e,t,n,i,s,a){return c.openBlock(),c.createElementBlock("img",c.mergeProps(e.$attrs,{src:s.innerSrc,alt:n.alt,class:"cds__image",onError:t[0]||(t[0]=(...o)=>a.imageSrcResolver&&a.imageSrcResolver(...o))}),null,16,EC)}const $2=rt(DC,[["render",TC],["__scopeId","data-v-79754f28"]]),jh=(e,t)=>Object.keys(e).some(n=>n===t),a1t="",Uh={components:{CdsBox:Il,CdsImage:$2},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}},computed:{imageWidthResolver(){return this.horizontal?"fit-content":`${this.imageWidth}px`},bodyWidthResolver(){return`${this.bodyWidth}px`}},methods:{hasSlot:jh,handleClick(){this.clickable&&this.$emit("cardClick",!0)}}},tv=()=>{c.useCssVars(e=>({"8d304056":e.bodyWidthResolver,"4730bd46":e.imageWidthResolver}))},ev=Uh.setup;Uh.setup=ev?(e,t)=>(tv(),ev(e,t)):tv;const IC=Uh,AC={class:"card__extra-container"},VC={class:"card__extra"},BC={key:0},PC={key:1,class:"card__image"},NC={key:2,class:"card__icon"},zC={class:"card__spacer"},LC={key:0,class:"card__header"},FC={key:1},RC={class:"card__header"},HC={key:2,class:"card__body"},WC={key:3},YC={class:"card__body"},jC={key:4,class:"card__footer"};function UC(e,t,n,i,s,a){const o=c.resolveComponent("cds-image"),l=c.resolveComponent("cds-box");return c.openBlock(),c.createBlock(l,{padding:"0",clickable:n.clickable,onBoxClick:a.handleClick},{default:c.withCtx(()=>[c.createElementVNode("div",AC,[c.createElementVNode("div",VC,[c.renderSlot(e.$slots,"extra",{},void 0,!0)])]),c.createElementVNode("div",{class:c.normalizeClass({"card--horizontal":this.horizontal})},[a.hasSlot(e.$slots,"image")?(c.openBlock(),c.createElementBlock("div",BC,[c.renderSlot(e.$slots,"image",{},void 0,!0)])):n.imageSrc?(c.openBlock(),c.createElementBlock("div",PC,[c.createVNode(o,{src:n.imageSrc,width:n.imageWidth,height:n.imageHeight,alt:n.imageAlt},null,8,["src","width","height","alt"])])):a.hasSlot(e.$slots,"icon")?(c.openBlock(),c.createElementBlock("div",NC,[c.renderSlot(e.$slots,"icon",{},void 0,!0)])):c.createCommentVNode("",!0),c.createElementVNode("div",zC,[a.hasSlot(e.$slots,"header")?(c.openBlock(),c.createElementBlock("div",LC,[c.renderSlot(e.$slots,"header",{},void 0,!0)])):(c.openBlock(),c.createElementBlock("div",FC,[c.createElementVNode("p",RC,c.toDisplayString(n.title),1)])),a.hasSlot(e.$slots,"body")?(c.openBlock(),c.createElementBlock("div",HC,[c.renderSlot(e.$slots,"body",{},void 0,!0)])):(c.openBlock(),c.createElementBlock("div",WC,[c.createElementVNode("p",YC,c.toDisplayString(n.content),1)])),a.hasSlot(e.$slots,"footer")?(c.openBlock(),c.createElementBlock("div",jC,[c.renderSlot(e.$slots,"footer",{},void 0,!0)])):c.createCommentVNode("",!0)])],2)]),_:3},8,["clickable","onBoxClick"])}const GC=rt(IC,[["render",UC],["__scopeId","data-v-ef799654"]]),o1t="",KC={components:{CdsButton:Bo},props:{title:{type:String,default:"T\xEDtulo do AlertCard",required:!0},text:{type:String,default:"Subt\xEDtulo 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}}},ZC={id:"callout-card"},XC={class:"image__container"},JC=["src","alt"],QC={class:"content__title"},qC={class:"content__text"};function $C(e,t,n,i,s,a){const o=c.resolveComponent("cds-button");return c.openBlock(),c.createElementBlock("span",ZC,[c.createElementVNode("div",{class:c.normalizeClass(a.resolveClass("callout-card__container"))},[c.createElementVNode("div",XC,[c.createElementVNode("img",{class:c.normalizeClass(a.resolveClass("image__content")),src:n.image,alt:n.imageDescription},null,10,JC)]),c.createElementVNode("div",{class:c.normalizeClass(a.resolveClass("content__container"))},[c.createElementVNode("div",{class:c.normalizeClass(a.resolveClass("content"))},[c.createElementVNode("p",QC,c.toDisplayString(n.title),1),c.createElementVNode("span",qC,[c.renderSlot(e.$slots,"text",{},()=>[c.createTextVNode(c.toDisplayString(n.text),1)])])],2),c.createElementVNode("div",null,[c.renderSlot(e.$slots,"action",{},()=>[c.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 tO=rt(KC,[["render",$C]]),r1t="",eO={props:{propertyName:{type:String,default:"Dados",required:!1},perPage:{type:Number,required:!0},total:{type:Number,required:!0},simple:{type:Boolean,default:!1,required:!1},fluid:{type:Boolean,default:!1,required:!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}))}}}},nO={key:0,class:"carousel-controller__text"},iO={key:1,class:"carousel-controller__text"},sO={class:"carousel-controller__property"};function aO(e,t,n,i,s,a){return c.openBlock(),c.createElementBlock("div",null,[c.createElementVNode("div",{class:c.normalizeClass(["carousel-controller",{"carousel-controller--fluid":n.fluid}])},[c.createElementVNode("span",{class:c.normalizeClass({"carousel-controller__previous-button--disabled":a.disabledBack,"carousel-controller__previous-button":!a.disabledBack}),onClick:t[0]||(t[0]=(...o)=>a.handleClickBack&&a.handleClickBack(...o))},null,2),c.createElementVNode("div",null,[n.simple?(c.openBlock(),c.createElementBlock("span",iO,c.toDisplayString(s.currentNumberOfItemsMin)+" de "+c.toDisplayString(a.numberOfPages),1)):(c.openBlock(),c.createElementBlock("span",nO,c.toDisplayString(s.currentNumberOfItemsMin)+"-"+c.toDisplayString(s.currentNumberOfItemsMax)+" de "+c.toDisplayString(n.total),1)),c.createElementVNode("span",sO,c.toDisplayString(n.propertyName),1)]),c.createElementVNode("span",{class:c.normalizeClass({"carousel-controller__next-button--disabled":a.disabledForward,"carousel-controller__next-button":!a.disabledForward}),onClick:t[1]||(t[1]=(...o)=>a.handleClickForward&&a.handleClickForward(...o))},null,2)],2)])}const oO=rt(eO,[["render",aO],["__scopeId","data-v-fcb19a0a"]]);function nv(e,t){return`${e}--${t}`}const l1t="",rO={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=nv("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))}}},lO={class:"cds-checkbox__container"},cO={class:"cds-checkbox__input"},dO=["id","value","name","disabled"],uO=["for"],hO=["for"];function fO(e,t,n,i,s,a){return c.openBlock(),c.createElementBlock("div",lO,[c.createElementVNode("div",cO,[c.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,dO),c.createElementVNode("label",{for:e.$attrs.id||"cds-checkbox-option-input",class:c.normalizeClass(a.resolveCheckboxClass),onClick:t[0]||(t[0]=(...o)=>a.toggleValue&&a.toggleValue(...o))},null,10,uO)]),c.createElementVNode("label",{class:c.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)=>a.toggleValue&&a.toggleValue(...o))},c.toDisplayString(n.label),11,hO)])}const Gh=rt(rO,[["render",fO],["__scopeId","data-v-0758b096"]]),c1t="",pO={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}}},mO={id:"collapsible-container"},gO={class:"collapsible-container__title"},vO={key:0,class:"collapsible-container__content"};function _O(e,t,n,i,s,a){return c.openBlock(),c.createElementBlock("span",mO,[c.createElementVNode("div",{class:"collapsible-container__item",onClick:t[0]||(t[0]=(...o)=>a.triggerExpanded&&a.triggerExpanded(...o))},[c.createElementVNode("span",{class:c.normalizeClass(s.internalValue?"collapsible-container__chevron--opened":"collapsible-container__chevron--closed")},null,2),c.renderSlot(e.$slots,"title",{},()=>[c.createElementVNode("span",gO,c.toDisplayString(n.title),1)])]),s.internalValue?(c.openBlock(),c.createElementBlock("div",vO,[c.renderSlot(e.$slots,"default")])):c.createCommentVNode("",!0)])}const yO=rt(pO,[["render",_O]]),Kh=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},bO=.2126,wO=.7152,xO=.0722,SO=2.4,kO={POOR:3,GOOD:4.5,VERYGOOD:7,SUPER:12},CO=(e,t,n="GOOD")=>{let i=Kh(e),s=Kh(t);var a=iv(...i),o=iv(...s),l=Math.max(a,o),d=Math.min(a,o);return(l+.05)/(d+.05)>=kO[n]};function iv(e,t,n){var i=[e,t,n].map(s=>(s/=255,s<=.03928?s/12.92:Math.pow((s+.055)/1.055,SO)));return i[0]*bO+i[1]*wO+i[2]*xO}const d1t="",Zh={components:{CdsPopover:U1,CdsIcon:Me},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:Tl,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:Lh,ContrastChecker:CO,SwatchSelection(e){let t="";this.selectedColor=this.sassColorVariables[e.replace(/-|\$/gi,"")],this.palete.forEach(n=>{n.colorTokens.find(i=>i===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,"")]}}},sv=()=>{c.useCssVars(e=>({f73e5680:e.selectedColor}))},av=Zh.setup;Zh.setup=av?(e,t)=>(sv(),av(e,t)):sv;const OO=Zh,MO=e=>(c.pushScopeId("data-v-a4ff5e3b"),e=e(),c.popScopeId(),e),DO={key:0},EO={class:"color-picker__label"},TO=["onClick"],IO={key:1},AO=[MO(()=>c.createElementVNode("div",{class:"color-picker__preview"},null,-1))],VO=["onClick"];function BO(e,t,n,i,s,a){const o=c.resolveComponent("cds-icon"),l=c.resolveComponent("cds-popover");return n.inline?(c.openBlock(),c.createElementBlock("div",DO,[c.createElementVNode("div",EO,c.toDisplayString(n.label),1),(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(n.swatch,(d,h)=>(c.openBlock(),c.createElementBlock("div",{key:h,class:"color-picker__container"},[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(d,(f,m)=>(c.openBlock(),c.createElementBlock("div",{key:m},[c.createElementVNode("div",{class:c.normalizeClass(`color-picker__swatch--${f.replace("$","")}`),onClick:v=>a.SwatchSelection(f)},[a.isCurrentColorSelected(f)?(c.openBlock(),c.createBlock(o,{key:0,height:"22",width:"22",name:"check-outline",class:c.normalizeClass(["swatch__icon",a.iconColorResolver])},null,8,["class"])):c.createCommentVNode("",!0)],10,TO)]))),128))]))),128))])):(c.openBlock(),c.createElementBlock("div",IO,[c.createElementVNode("div",{id:"color-picker",class:"color-picker__trigger",onClick:t[0]||(t[0]=c.withModifiers(d=>s.showPopover=!s.showPopover,["stop"]))},AO),c.createVNode(l,{modelValue:s.showPopover,"onUpdate:modelValue":t[1]||(t[1]=d=>s.showPopover=d),"right-aligned":!1,"target-id":"color-picker",height:n.popoverHeight,"fit-content-width":""},{default:c.withCtx(()=>[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(n.swatch,(d,h)=>(c.openBlock(),c.createElementBlock("div",{key:h,class:"popover__container"},[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(d,(f,m)=>(c.openBlock(),c.createElementBlock("div",{key:m},[c.createElementVNode("div",{class:c.normalizeClass(`color-picker__swatch--${f.replace("$","")}`),onClick:v=>a.SwatchSelection(f)},[a.isCurrentColorSelected(f)?(c.openBlock(),c.createBlock(o,{key:0,height:"22",width:"22",name:"check-outline",class:c.normalizeClass(["swatch__icon",a.iconColorResolver])},null,8,["class"])):c.createCommentVNode("",!0)],10,VO)]))),128))]))),128))]),_:1},8,["modelValue","height"])]))}const PO=rt(OO,[["render",BO],["__scopeId","data-v-a4ff5e3b"]]),h1t="",NO={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}}},zO={class:"dashboard-card"},LO={class:"dashboard-card__header"},FO={key:0,class:"dashboard-card__title"},RO={key:1,class:"dashboard-card__title"},HO={key:0,class:"dashboard-card__description"},WO={key:1,class:"dashboard-card__description"},YO={key:0};function jO(e,t,n,i,s,a){return c.openBlock(),c.createElementBlock("div",zO,[c.createElementVNode("div",null,[c.createElementVNode("div",LO,[n.title.length>0?(c.openBlock(),c.createElementBlock("p",FO,c.toDisplayString(n.title),1)):(c.openBlock(),c.createElementBlock("p",RO,[c.renderSlot(e.$slots,"title-slot",{},void 0,!0)])),c.createElementVNode("div",null,[c.renderSlot(e.$slots,"status-slot",{},void 0,!0)])]),n.description.length>0?(c.openBlock(),c.createElementBlock("p",HO,c.toDisplayString(n.description),1)):(c.openBlock(),c.createElementBlock("p",WO,[c.renderSlot(e.$slots,"description-slot",{},void 0,!0)]))]),c.createElementVNode("div",{class:"dashboard-card__action",onClick:t[0]||(t[0]=o=>e.$emit("action-button-click"))},[c.renderSlot(e.$slots,"action-slot",{},()=>[n.showAction?(c.openBlock(),c.createElementBlock("div",YO,c.toDisplayString(n.action),1)):c.createCommentVNode("",!0)],!0)])])}const UO=rt(NO,[["render",jO],["__scopeId","data-v-cd0db219"]]);class Xa extends Error{}class GO extends Xa{constructor(t){super(`Invalid DateTime: ${t.toMessage()}`)}}class KO extends Xa{constructor(t){super(`Invalid Interval: ${t.toMessage()}`)}}class ZO extends Xa{constructor(t){super(`Invalid Duration: ${t.toMessage()}`)}}class Al extends Xa{}class ov extends Xa{constructor(t){super(`Invalid unit ${t}`)}}class fi extends Xa{}class oa extends Xa{constructor(){super("Zone is an abstract class")}}const it="numeric",Wi="short",Zn="long",Nd={year:it,month:it,day:it},rv={year:it,month:Wi,day:it},XO={year:it,month:Wi,day:it,weekday:Wi},lv={year:it,month:Zn,day:it},cv={year:it,month:Zn,day:it,weekday:Zn},dv={hour:it,minute:it},uv={hour:it,minute:it,second:it},hv={hour:it,minute:it,second:it,timeZoneName:Wi},fv={hour:it,minute:it,second:it,timeZoneName:Zn},pv={hour:it,minute:it,hourCycle:"h23"},mv={hour:it,minute:it,second:it,hourCycle:"h23"},gv={hour:it,minute:it,second:it,hourCycle:"h23",timeZoneName:Wi},vv={hour:it,minute:it,second:it,hourCycle:"h23",timeZoneName:Zn},_v={year:it,month:it,day:it,hour:it,minute:it},yv={year:it,month:it,day:it,hour:it,minute:it,second:it},bv={year:it,month:Wi,day:it,hour:it,minute:it},wv={year:it,month:Wi,day:it,hour:it,minute:it,second:it},JO={year:it,month:Wi,day:it,weekday:Wi,hour:it,minute:it},xv={year:it,month:Zn,day:it,hour:it,minute:it,timeZoneName:Wi},Sv={year:it,month:Zn,day:it,hour:it,minute:it,second:it,timeZoneName:Wi},kv={year:it,month:Zn,day:it,weekday:Zn,hour:it,minute:it,timeZoneName:Zn},Cv={year:it,month:Zn,day:it,weekday:Zn,hour:it,minute:it,second:it,timeZoneName:Zn};class Vl{get type(){throw new oa}get name(){throw new oa}get ianaName(){return this.name}get isUniversal(){throw new oa}offsetName(t,n){throw new oa}formatOffset(t,n){throw new oa}offset(t){throw new oa}equals(t){throw new oa}get isValid(){throw new oa}}let Xh=null;class zd extends Vl{static get instance(){return Xh===null&&(Xh=new zd),Xh}get type(){return"system"}get name(){return new Intl.DateTimeFormat().resolvedOptions().timeZone}get isUniversal(){return!1}offsetName(t,{format:n,locale:i}){return Nv(t,n,i)}formatOffset(t,n){return zl(this.offset(t),n)}offset(t){return-new Date(t).getTimezoneOffset()}equals(t){return t.type==="system"}get isValid(){return!0}}let Ld={};function QO(e){return Ld[e]||(Ld[e]=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"})),Ld[e]}const qO={year:0,month:1,day:2,era:3,hour:4,minute:5,second:6};function $O(e,t){const n=e.format(t).replace(/\u200E/g,""),i=/(\d+)\/(\d+)\/(\d+) (AD|BC),? (\d+):(\d+):(\d+)/.exec(n),[,s,a,o,l,d,h,f]=i;return[o,s,a,l,d,h,f]}function tM(e,t){const n=e.formatToParts(t),i=[];for(let s=0;s<n.length;s++){const{type:a,value:o}=n[s],l=qO[a];a==="era"?i[l]=o:Qt(l)||(i[l]=parseInt(o,10))}return i}let Fd={};class Ms extends Vl{static create(t){return Fd[t]||(Fd[t]=new Ms(t)),Fd[t]}static resetCache(){Fd={},Ld={}}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=Ms.isValidZone(t)}get type(){return"iana"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(t,{format:n,locale:i}){return Nv(t,n,i,this.name)}formatOffset(t,n){return zl(this.offset(t),n)}offset(t){const n=new Date(t);if(isNaN(n))return NaN;const i=QO(this.name);let[s,a,o,l,d,h,f]=i.formatToParts?tM(i,n):$O(i,n);l==="BC"&&(s=-Math.abs(s)+1);const v=sf({year:s,month:a,day:o,hour:d===24?0:d,minute:h,second:f,millisecond:0});let y=+n;const w=y%1e3;return y-=w>=0?w:1e3+w,(v-y)/(60*1e3)}equals(t){return t.type==="iana"&&t.name===this.name}get isValid(){return this.valid}}let Ov={};function eM(e,t={}){const n=JSON.stringify([e,t]);let i=Ov[n];return i||(i=new Intl.ListFormat(e,t),Ov[n]=i),i}let Jh={};function Qh(e,t={}){const n=JSON.stringify([e,t]);let i=Jh[n];return i||(i=new Intl.DateTimeFormat(e,t),Jh[n]=i),i}let qh={};function nM(e,t={}){const n=JSON.stringify([e,t]);let i=qh[n];return i||(i=new Intl.NumberFormat(e,t),qh[n]=i),i}let $h={};function iM(e,t={}){const{base:n,...i}=t,s=JSON.stringify([e,i]);let a=$h[s];return a||(a=new Intl.RelativeTimeFormat(e,t),$h[s]=a),a}let Bl=null;function sM(){return Bl||(Bl=new Intl.DateTimeFormat().resolvedOptions().locale,Bl)}function aM(e){const t=e.indexOf("-x-");t!==-1&&(e=e.substring(0,t));const n=e.indexOf("-u-");if(n===-1)return[e];{let i,s;try{i=Qh(e).resolvedOptions(),s=e}catch{const d=e.substring(0,n);i=Qh(d).resolvedOptions(),s=d}const{numberingSystem:a,calendar:o}=i;return[s,a,o]}}function oM(e,t,n){return(n||t)&&(e.includes("-u-")||(e+="-u"),n&&(e+=`-ca-${n}`),t&&(e+=`-nu-${t}`)),e}function rM(e){const t=[];for(let n=1;n<=12;n++){const i=St.utc(2016,n,1);t.push(e(i))}return t}function lM(e){const t=[];for(let n=1;n<=7;n++){const i=St.utc(2016,11,13+n);t.push(e(i))}return t}function Rd(e,t,n,i,s){const a=e.listingMode(n);return a==="error"?null:a==="en"?i(t):s(t)}function cM(e){return e.numberingSystem&&e.numberingSystem!=="latn"?!1:e.numberingSystem==="latn"||!e.locale||e.locale.startsWith("en")||new Intl.DateTimeFormat(e.intl).resolvedOptions().numberingSystem==="latn"}class dM{constructor(t,n,i){this.padTo=i.padTo||0,this.floor=i.floor||!1;const{padTo:s,floor:a,...o}=i;if(!n||Object.keys(o).length>0){const l={useGrouping:!1,...i};i.padTo>0&&(l.minimumIntegerDigits=i.padTo),this.inf=nM(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):nf(t,3);return je(n,this.padTo)}}}class uM{constructor(t,n,i){this.opts=i;let s;if(t.zone.isUniversal){const o=-1*(t.offset/60),l=o>=0?`Etc/GMT+${o}`:`Etc/GMT${o}`;t.offset!==0&&Ms.create(l).valid?(s=l,this.dt=t):(s="UTC",i.timeZoneName?this.dt=t:this.dt=t.offset===0?t:St.fromMillis(t.ts+t.offset*60*1e3))}else t.zone.type==="system"?this.dt=t:(this.dt=t,s=t.zone.name);const a={...this.opts};a.timeZone=a.timeZone||s,this.dtf=Qh(n,a)}format(){return this.dtf.format(this.dt.toJSDate())}formatToParts(){return this.dtf.formatToParts(this.dt.toJSDate())}resolvedOptions(){return this.dtf.resolvedOptions()}}class hM{constructor(t,n,i){this.opts={style:"long",...i},!n&&Bv()&&(this.rtf=iM(t,i))}format(t,n){return this.rtf?this.rtf.format(t,n):EM(n,t,this.opts.numeric,this.opts.style!=="long")}formatToParts(t,n){return this.rtf?this.rtf.formatToParts(t,n):[]}}class Ce{static fromOpts(t){return Ce.create(t.locale,t.numberingSystem,t.outputCalendar,t.defaultToEN)}static create(t,n,i,s=!1){const a=t||Ye.defaultLocale,o=a||(s?"en-US":sM()),l=n||Ye.defaultNumberingSystem,d=i||Ye.defaultOutputCalendar;return new Ce(o,l,d,a)}static resetCache(){Bl=null,Jh={},qh={},$h={}}static fromObject({locale:t,numberingSystem:n,outputCalendar:i}={}){return Ce.create(t,n,i)}constructor(t,n,i,s){const[a,o,l]=aM(t);this.locale=a,this.numberingSystem=n||o||null,this.outputCalendar=i||l||null,this.intl=oM(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=cM(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:Ce.create(t.locale||this.specifiedLocale,t.numberingSystem||this.numberingSystem,t.outputCalendar||this.outputCalendar,t.defaultToEN||!1)}redefaultToEN(t={}){return this.clone({...t,defaultToEN:!0})}redefaultToSystem(t={}){return this.clone({...t,defaultToEN:!1})}months(t,n=!1,i=!0){return Rd(this,t,i,Fv,()=>{const s=n?{month:t,day:"numeric"}:{month:t},a=n?"format":"standalone";return this.monthsCache[a][t]||(this.monthsCache[a][t]=rM(o=>this.extract(o,s,"month"))),this.monthsCache[a][t]})}weekdays(t,n=!1,i=!0){return Rd(this,t,i,Wv,()=>{const s=n?{weekday:t,year:"numeric",month:"long",day:"numeric"}:{weekday:t},a=n?"format":"standalone";return this.weekdaysCache[a][t]||(this.weekdaysCache[a][t]=lM(o=>this.extract(o,s,"weekday"))),this.weekdaysCache[a][t]})}meridiems(t=!0){return Rd(this,void 0,t,()=>Yv,()=>{if(!this.meridiemCache){const n={hour:"numeric",hourCycle:"h12"};this.meridiemCache=[St.utc(2016,11,13,9),St.utc(2016,11,13,19)].map(i=>this.extract(i,n,"dayperiod"))}return this.meridiemCache})}eras(t,n=!0){return Rd(this,t,n,jv,()=>{const i={era:t};return this.eraCache[t]||(this.eraCache[t]=[St.utc(-40,1,1),St.utc(2017,1,1)].map(s=>this.extract(s,i,"era"))),this.eraCache[t]})}extract(t,n,i){const s=this.dtFormatter(t,n),a=s.formatToParts(),o=a.find(l=>l.type.toLowerCase()===i);return o?o.value:null}numberFormatter(t={}){return new dM(this.intl,t.forceSimple||this.fastNumbers,t)}dtFormatter(t,n={}){return new uM(t,this.intl,n)}relFormatter(t={}){return new hM(this.intl,this.isEnglish(),t)}listFormatter(t={}){return eM(this.intl,t)}isEnglish(){return this.locale==="en"||this.locale.toLowerCase()==="en-us"||new Intl.DateTimeFormat(this.intl).resolvedOptions().locale.startsWith("en-us")}equals(t){return this.locale===t.locale&&this.numberingSystem===t.numberingSystem&&this.outputCalendar===t.outputCalendar}}let tf=null;class xn extends Vl{static get utcInstance(){return tf===null&&(tf=new xn(0)),tf}static instance(t){return t===0?xn.utcInstance:new xn(t)}static parseSpecifier(t){if(t){const n=t.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(n)return new xn(jd(n[1],n[2]))}return null}constructor(t){super(),this.fixed=t}get type(){return"fixed"}get name(){return this.fixed===0?"UTC":`UTC${zl(this.fixed,"narrow")}`}get ianaName(){return this.fixed===0?"Etc/UTC":`Etc/GMT${zl(-this.fixed,"narrow")}`}offsetName(){return this.name}formatOffset(t,n){return zl(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 fM extends Vl{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 ra(e,t){if(Qt(e)||e===null)return t;if(e instanceof Vl)return e;if(pM(e)){const n=e.toLowerCase();return n==="default"?t:n==="local"||n==="system"?zd.instance:n==="utc"||n==="gmt"?xn.utcInstance:xn.parseSpecifier(n)||Ms.create(e)}else return Ja(e)?xn.instance(e):typeof e=="object"&&e.offset&&typeof e.offset=="number"?e:new fM(e)}let Mv=()=>Date.now(),Dv="system",Ev=null,Tv=null,Iv=null,Av=60,Vv;class Ye{static get now(){return Mv}static set now(t){Mv=t}static set defaultZone(t){Dv=t}static get defaultZone(){return ra(Dv,zd.instance)}static get defaultLocale(){return Ev}static set defaultLocale(t){Ev=t}static get defaultNumberingSystem(){return Tv}static set defaultNumberingSystem(t){Tv=t}static get defaultOutputCalendar(){return Iv}static set defaultOutputCalendar(t){Iv=t}static get twoDigitCutoffYear(){return Av}static set twoDigitCutoffYear(t){Av=t%100}static get throwOnInvalid(){return Vv}static set throwOnInvalid(t){Vv=t}static resetCaches(){Ce.resetCache(),Ms.resetCache()}}function Qt(e){return typeof e>"u"}function Ja(e){return typeof e=="number"}function Hd(e){return typeof e=="number"&&e%1===0}function pM(e){return typeof e=="string"}function mM(e){return Object.prototype.toString.call(e)==="[object Date]"}function Bv(){try{return typeof Intl<"u"&&!!Intl.RelativeTimeFormat}catch{return!1}}function gM(e){return Array.isArray(e)?e:[e]}function Pv(e,t,n){if(e.length!==0)return e.reduce((i,s)=>{const a=[t(s),s];return i&&n(i[0],a[0])===i[0]?i:a},null)[1]}function vM(e,t){return t.reduce((n,i)=>(n[i]=e[i],n),{})}function Wo(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function Ds(e,t,n){return Hd(e)&&e>=t&&e<=n}function _M(e,t){return e-t*Math.floor(e/t)}function je(e,t=2){const n=e<0;let i;return n?i="-"+(""+-e).padStart(t,"0"):i=(""+e).padStart(t,"0"),i}function la(e){if(!(Qt(e)||e===null||e===""))return parseInt(e,10)}function Qa(e){if(!(Qt(e)||e===null||e===""))return parseFloat(e)}function ef(e){if(!(Qt(e)||e===null||e==="")){const t=parseFloat("0."+e)*1e3;return Math.floor(t)}}function nf(e,t,n=!1){const i=10**t;return(n?Math.trunc:Math.round)(e*i)/i}function Pl(e){return e%4===0&&(e%100!==0||e%400===0)}function Nl(e){return Pl(e)?366:365}function Wd(e,t){const n=_M(t-1,12)+1,i=e+(t-n)/12;return n===2?Pl(i)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][n-1]}function sf(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(t.getUTCFullYear()-1900)),+t}function Yd(e){const t=(e+Math.floor(e/4)-Math.floor(e/100)+Math.floor(e/400))%7,n=e-1,i=(n+Math.floor(n/4)-Math.floor(n/100)+Math.floor(n/400))%7;return t===4||i===3?53:52}function af(e){return e>99?e:e>Ye.twoDigitCutoffYear?1900+e:2e3+e}function Nv(e,t,n,i=null){const s=new Date(e),a={hourCycle:"h23",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};i&&(a.timeZone=i);const o={timeZoneName:t,...a},l=new Intl.DateTimeFormat(n,o).formatToParts(s).find(d=>d.type.toLowerCase()==="timezonename");return l?l.value:null}function jd(e,t){let n=parseInt(e,10);Number.isNaN(n)&&(n=0);const i=parseInt(t,10)||0,s=n<0||Object.is(n,-0)?-i:i;return n*60+s}function zv(e){const t=Number(e);if(typeof e=="boolean"||e===""||Number.isNaN(t))throw new fi(`Invalid unit value ${e}`);return t}function Ud(e,t){const n={};for(const i in e)if(Wo(e,i)){const s=e[i];if(s==null)continue;n[t(i)]=zv(s)}return n}function zl(e,t){const n=Math.trunc(Math.abs(e/60)),i=Math.trunc(Math.abs(e%60)),s=e>=0?"+":"-";switch(t){case"short":return`${s}${je(n,2)}:${je(i,2)}`;case"narrow":return`${s}${n}${i>0?`:${i}`:""}`;case"techie":return`${s}${je(n,2)}${je(i,2)}`;default:throw new RangeError(`Value format ${t} is out of range for property format`)}}function Gd(e){return vM(e,["hour","minute","second","millisecond"])}const yM=["January","February","March","April","May","June","July","August","September","October","November","December"],Lv=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],bM=["J","F","M","A","M","J","J","A","S","O","N","D"];function Fv(e){switch(e){case"narrow":return[...bM];case"short":return[...Lv];case"long":return[...yM];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 Rv=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],Hv=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],wM=["M","T","W","T","F","S","S"];function Wv(e){switch(e){case"narrow":return[...wM];case"short":return[...Hv];case"long":return[...Rv];case"numeric":return["1","2","3","4","5","6","7"];default:return null}}const Yv=["AM","PM"],xM=["Before Christ","Anno Domini"],SM=["BC","AD"],kM=["B","A"];function jv(e){switch(e){case"narrow":return[...kM];case"short":return[...SM];case"long":return[...xM];default:return null}}function CM(e){return Yv[e.hour<12?0:1]}function OM(e,t){return Wv(t)[e.weekday-1]}function MM(e,t){return Fv(t)[e.month-1]}function DM(e,t){return jv(t)[e.year<0?0:1]}function EM(e,t,n="always",i=!1){const s={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."]},a=["hours","minutes","seconds"].indexOf(e)===-1;if(n==="auto"&&a){const m=e==="days";switch(t){case 1:return m?"tomorrow":`next ${s[e][0]}`;case-1:return m?"yesterday":`last ${s[e][0]}`;case 0:return m?"today":`this ${s[e][0]}`}}const o=Object.is(t,-0)||t<0,l=Math.abs(t),d=l===1,h=s[e],f=i?d?h[1]:h[2]||h[1]:d?s[e][0]:e;return o?`${l} ${f} ago`:`in ${l} ${f}`}function Uv(e,t){let n="";for(const i of e)i.literal?n+=i.val:n+=t(i.val);return n}const TM={D:Nd,DD:rv,DDD:lv,DDDD:cv,t:dv,tt:uv,ttt:hv,tttt:fv,T:pv,TT:mv,TTT:gv,TTTT:vv,f:_v,ff:bv,fff:xv,ffff:kv,F:yv,FF:wv,FFF:Sv,FFFF:Cv};class gn{static create(t,n={}){return new gn(t,n)}static parseFormat(t){let n=null,i="",s=!1;const a=[];for(let o=0;o<t.length;o++){const l=t.charAt(o);l==="'"?(i.length>0&&a.push({literal:s,val:i}),n=null,i="",s=!s):s||l===n?i+=l:(i.length>0&&a.push({literal:!1,val:i}),i=l,n=l)}return i.length>0&&a.push({literal:s,val:i}),a}static macroTokenToFormatOpts(t){return TM[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()}formatDateTime(t,n={}){return this.loc.dtFormatter(t,{...this.opts,...n}).format()}formatDateTimeParts(t,n={}){return this.loc.dtFormatter(t,{...this.opts,...n}).formatToParts()}formatInterval(t,n={}){return this.loc.dtFormatter(t.start,{...this.opts,...n}).dtf.formatRange(t.start.toJSDate(),t.end.toJSDate())}resolvedOptions(t,n={}){return this.loc.dtFormatter(t,{...this.opts,...n}).resolvedOptions()}num(t,n=0){if(this.opts.forceSimple)return je(t,n);const i={...this.opts};return n>0&&(i.padTo=n),this.loc.numberFormatter(i).format(t)}formatDateTimeFromString(t,n){const i=this.loc.listingMode()==="en",s=this.loc.outputCalendar&&this.loc.outputCalendar!=="gregory",a=(y,w)=>this.loc.extract(t,y,w),o=y=>t.isOffsetFixed&&t.offset===0&&y.allowZ?"Z":t.isValid?t.zone.formatOffset(t.ts,y.format):"",l=()=>i?CM(t):a({hour:"numeric",hourCycle:"h12"},"dayperiod"),d=(y,w)=>i?MM(t,y):a(w?{month:y}:{month:y,day:"numeric"},"month"),h=(y,w)=>i?OM(t,y):a(w?{weekday:y}:{weekday:y,month:"long",day:"numeric"},"weekday"),f=y=>{const w=gn.macroTokenToFormatOpts(y);return w?this.formatWithSystemDefault(t,w):y},m=y=>i?DM(t,y):a({era:y},"era"),v=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 s?a({day:"numeric"},"day"):this.num(t.day);case"dd":return s?a({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 s?a({month:"numeric",day:"numeric"},"month"):this.num(t.month);case"LL":return s?a({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 s?a({month:"numeric"},"month"):this.num(t.month);case"MM":return s?a({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 s?a({year:"numeric"},"year"):this.num(t.year);case"yy":return s?a({year:"2-digit"},"year"):this.num(t.year.toString().slice(-2),2);case"yyyy":return s?a({year:"numeric"},"year"):this.num(t.year,4);case"yyyyyy":return s?a({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"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 Uv(gn.parseFormat(n),v)}formatDurationFromString(t,n){const i=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}},s=d=>h=>{const f=i(h);return f?this.num(d.get(f),h.length):h},a=gn.parseFormat(n),o=a.reduce((d,{literal:h,val:f})=>h?d:d.concat(f),[]),l=t.shiftTo(...o.map(i).filter(d=>d));return Uv(a,s(l))}}class Yi{constructor(t,n){this.reason=t,this.explanation=n}toMessage(){return this.explanation?`${this.reason}: ${this.explanation}`:this.reason}}const Gv=/[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/;function Yo(...e){const t=e.reduce((n,i)=>n+i.source,"");return RegExp(`^${t}$`)}function jo(...e){return t=>e.reduce(([n,i,s],a)=>{const[o,l,d]=a(t,s);return[{...n,...o},l||i,d]},[{},null,1]).slice(0,2)}function Uo(e,...t){if(e==null)return[null,null];for(const[n,i]of t){const s=n.exec(e);if(s)return i(s)}return[null,null]}function Kv(...e){return(t,n)=>{const i={};let s;for(s=0;s<e.length;s++)i[e[s]]=la(t[n+s]);return[i,null,n+s]}}const Zv=/(?:(Z)|([+-]\d\d)(?::?(\d\d))?)/,IM=`(?:${Zv.source}?(?:\\[(${Gv.source})\\])?)?`,of=/(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,30}))?)?)?/,Xv=RegExp(`${of.source}${IM}`),rf=RegExp(`(?:T${Xv.source})?`),AM=/([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/,VM=/(\d{4})-?W(\d\d)(?:-?(\d))?/,BM=/(\d{4})-?(\d{3})/,PM=Kv("weekYear","weekNumber","weekDay"),NM=Kv("year","ordinal"),zM=/(\d{4})-(\d\d)-(\d\d)/,Jv=RegExp(`${of.source} ?(?:${Zv.source}|(${Gv.source}))?`),LM=RegExp(`(?: ${Jv.source})?`);function Go(e,t,n){const i=e[t];return Qt(i)?n:la(i)}function FM(e,t){return[{year:Go(e,t),month:Go(e,t+1,1),day:Go(e,t+2,1)},null,t+3]}function Ko(e,t){return[{hours:Go(e,t,0),minutes:Go(e,t+1,0),seconds:Go(e,t+2,0),milliseconds:ef(e[t+3])},null,t+4]}function Ll(e,t){const n=!e[t]&&!e[t+1],i=jd(e[t+1],e[t+2]),s=n?null:xn.instance(i);return[{},s,t+3]}function Fl(e,t){const n=e[t]?Ms.create(e[t]):null;return[{},n,t+1]}const RM=RegExp(`^T?${of.source}$`),HM=/^-?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 WM(e){const[t,n,i,s,a,o,l,d,h]=e,f=t[0]==="-",m=d&&d[0]==="-",v=(y,w=!1)=>y!==void 0&&(w||y&&f)?-y:y;return[{years:v(Qa(n)),months:v(Qa(i)),weeks:v(Qa(s)),days:v(Qa(a)),hours:v(Qa(o)),minutes:v(Qa(l)),seconds:v(Qa(d),d==="-0"),milliseconds:v(ef(h),m)}]}const YM={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 lf(e,t,n,i,s,a,o){const l={year:t.length===2?af(la(t)):la(t),month:Lv.indexOf(n)+1,day:la(i),hour:la(s),minute:la(a)};return o&&(l.second=la(o)),e&&(l.weekday=e.length>3?Rv.indexOf(e)+1:Hv.indexOf(e)+1),l}const jM=/^(?:(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 UM(e){const[,t,n,i,s,a,o,l,d,h,f,m]=e,v=lf(t,s,i,n,a,o,l);let y;return d?y=YM[d]:h?y=0:y=jd(f,m),[v,new xn(y)]}function GM(e){return e.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}const KM=/^(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$/,ZM=/^(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$/,XM=/^(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 Qv(e){const[,t,n,i,s,a,o,l]=e;return[lf(t,s,i,n,a,o,l),xn.utcInstance]}function JM(e){const[,t,n,i,s,a,o,l]=e;return[lf(t,l,n,i,s,a,o),xn.utcInstance]}const QM=Yo(AM,rf),qM=Yo(VM,rf),$M=Yo(BM,rf),tD=Yo(Xv),qv=jo(FM,Ko,Ll,Fl),eD=jo(PM,Ko,Ll,Fl),nD=jo(NM,Ko,Ll,Fl),iD=jo(Ko,Ll,Fl);function sD(e){return Uo(e,[QM,qv],[qM,eD],[$M,nD],[tD,iD])}function aD(e){return Uo(GM(e),[jM,UM])}function oD(e){return Uo(e,[KM,Qv],[ZM,Qv],[XM,JM])}function rD(e){return Uo(e,[HM,WM])}const lD=jo(Ko);function cD(e){return Uo(e,[RM,lD])}const dD=Yo(zM,LM),uD=Yo(Jv),hD=jo(Ko,Ll,Fl);function fD(e){return Uo(e,[dD,qv],[uD,hD])}const pD="Invalid Duration",$v={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}},mD={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},...$v},pi=146097/400,Zo=146097/4800,gD={years:{quarters:4,months:12,weeks:pi/7,days:pi,hours:pi*24,minutes:pi*24*60,seconds:pi*24*60*60,milliseconds:pi*24*60*60*1e3},quarters:{months:3,weeks:pi/28,days:pi/4,hours:pi*24/4,minutes:pi*24*60/4,seconds:pi*24*60*60/4,milliseconds:pi*24*60*60*1e3/4},months:{weeks:Zo/7,days:Zo,hours:Zo*24,minutes:Zo*24*60,seconds:Zo*24*60*60,milliseconds:Zo*24*60*60*1e3},...$v},qa=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],vD=qa.slice(0).reverse();function ca(e,t,n=!1){const i={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 ne(i)}function _D(e){return e<0?Math.floor(e):Math.ceil(e)}function t3(e,t,n,i,s){const a=e[s][n],o=t[n]/a,l=Math.sign(o)===Math.sign(i[s]),d=!l&&i[s]!==0&&Math.abs(o)<=1?_D(o):Math.trunc(o);i[s]+=d,t[n]-=d*a}function yD(e,t){vD.reduce((n,i)=>Qt(t[i])?n:(n&&t3(e,t,n,t,i),i),null)}function bD(e){const t={};for(const[n,i]of Object.entries(e))i!==0&&(t[n]=i);return t}class ne{constructor(t){const n=t.conversionAccuracy==="longterm"||!1;let i=n?gD:mD;t.matrix&&(i=t.matrix),this.values=t.values,this.loc=t.loc||Ce.create(),this.conversionAccuracy=n?"longterm":"casual",this.invalid=t.invalid||null,this.matrix=i,this.isLuxonDuration=!0}static fromMillis(t,n){return ne.fromObject({milliseconds:t},n)}static fromObject(t,n={}){if(t==null||typeof t!="object")throw new fi(`Duration.fromObject: argument expected to be an object, got ${t===null?"null":typeof t}`);return new ne({values:Ud(t,ne.normalizeUnit),loc:Ce.fromObject(n),conversionAccuracy:n.conversionAccuracy,matrix:n.matrix})}static fromDurationLike(t){if(Ja(t))return ne.fromMillis(t);if(ne.isDuration(t))return t;if(typeof t=="object")return ne.fromObject(t);throw new fi(`Unknown duration argument ${t} of type ${typeof t}`)}static fromISO(t,n){const[i]=rD(t);return i?ne.fromObject(i,n):ne.invalid("unparsable",`the input "${t}" can't be parsed as ISO 8601`)}static fromISOTime(t,n){const[i]=cD(t);return i?ne.fromObject(i,n):ne.invalid("unparsable",`the input "${t}" can't be parsed as ISO 8601`)}static invalid(t,n=null){if(!t)throw new fi("need to specify a reason the Duration is invalid");const i=t instanceof Yi?t:new Yi(t,n);if(Ye.throwOnInvalid)throw new ZO(i);return new ne({invalid:i})}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 ov(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 i={...n,floor:n.round!==!1&&n.floor!==!1};return this.isValid?gn.create(this.loc,i).formatDurationFromString(this,t):pD}toHuman(t={}){const n=qa.map(i=>{const s=this.values[i];return Qt(s)?null:this.loc.numberFormatter({style:"unit",unitDisplay:"long",...t,unit:i.slice(0,-1)}).format(s)}).filter(i=>i);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+=nf(this.seconds+this.milliseconds/1e3,3)+"S"),t==="P"&&(t+="T0S"),t}toISOTime(t={}){if(!this.isValid)return null;const n=this.toMillis();if(n<0||n>=864e5)return null;t={suppressMilliseconds:!1,suppressSeconds:!1,includePrefix:!1,format:"extended",...t};const i=this.shiftTo("hours","minutes","seconds","milliseconds");let s=t.format==="basic"?"hhmm":"hh:mm";(!t.suppressSeconds||i.seconds!==0||i.milliseconds!==0)&&(s+=t.format==="basic"?"ss":":ss",(!t.suppressMilliseconds||i.milliseconds!==0)&&(s+=".SSS"));let a=i.toFormat(s);return t.includePrefix&&(a="T"+a),a}toJSON(){return this.toISO()}toString(){return this.toISO()}toMillis(){return this.as("milliseconds")}valueOf(){return this.toMillis()}plus(t){if(!this.isValid)return this;const n=ne.fromDurationLike(t),i={};for(const s of qa)(Wo(n.values,s)||Wo(this.values,s))&&(i[s]=n.get(s)+this.get(s));return ca(this,{values:i},!0)}minus(t){if(!this.isValid)return this;const n=ne.fromDurationLike(t);return this.plus(n.negate())}mapUnits(t){if(!this.isValid)return this;const n={};for(const i of Object.keys(this.values))n[i]=zv(t(this.values[i],i));return ca(this,{values:n},!0)}get(t){return this[ne.normalizeUnit(t)]}set(t){if(!this.isValid)return this;const n={...this.values,...Ud(t,ne.normalizeUnit)};return ca(this,{values:n})}reconfigure({locale:t,numberingSystem:n,conversionAccuracy:i,matrix:s}={}){const o={loc:this.loc.clone({locale:t,numberingSystem:n}),matrix:s,conversionAccuracy:i};return ca(this,o)}as(t){return this.isValid?this.shiftTo(t).get(t):NaN}normalize(){if(!this.isValid)return this;const t=this.toObject();return yD(this.matrix,t),ca(this,{values:t},!0)}rescale(){if(!this.isValid)return this;const t=bD(this.normalize().shiftToAll().toObject());return ca(this,{values:t},!0)}shiftTo(...t){if(!this.isValid)return this;if(t.length===0)return this;t=t.map(o=>ne.normalizeUnit(o));const n={},i={},s=this.toObject();let a;for(const o of qa)if(t.indexOf(o)>=0){a=o;let l=0;for(const h in i)l+=this.matrix[h][o]*i[h],i[h]=0;Ja(s[o])&&(l+=s[o]);const d=Math.trunc(l);n[o]=d,i[o]=(l*1e3-d*1e3)/1e3;for(const h in s)qa.indexOf(h)>qa.indexOf(o)&&t3(this.matrix,s,h,n,o)}else Ja(s[o])&&(i[o]=s[o]);for(const o in i)i[o]!==0&&(n[a]+=o===a?i[o]:i[o]/this.matrix[a][o]);return ca(this,{values:n},!0).normalize()}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 ca(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(i,s){return i===void 0||i===0?s===void 0||s===0:i===s}for(const i of qa)if(!n(this.values[i],t.values[i]))return!1;return!0}}const Xo="Invalid Interval";function wD(e,t){return!e||!e.isValid?Ae.invalid("missing or invalid start"):!t||!t.isValid?Ae.invalid("missing or invalid end"):t<e?Ae.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 Ae{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 fi("need to specify a reason the Interval is invalid");const i=t instanceof Yi?t:new Yi(t,n);if(Ye.throwOnInvalid)throw new KO(i);return new Ae({invalid:i})}static fromDateTimes(t,n){const i=Wl(t),s=Wl(n),a=wD(i,s);return a??new Ae({start:i,end:s})}static after(t,n){const i=ne.fromDurationLike(n),s=Wl(t);return Ae.fromDateTimes(s,s.plus(i))}static before(t,n){const i=ne.fromDurationLike(n),s=Wl(t);return Ae.fromDateTimes(s.minus(i),s)}static fromISO(t,n){const[i,s]=(t||"").split("/",2);if(i&&s){let a,o;try{a=St.fromISO(i,n),o=a.isValid}catch{o=!1}let l,d;try{l=St.fromISO(s,n),d=l.isValid}catch{d=!1}if(o&&d)return Ae.fromDateTimes(a,l);if(o){const h=ne.fromISO(s,n);if(h.isValid)return Ae.after(a,h)}else if(d){const h=ne.fromISO(i,n);if(h.isValid)return Ae.before(l,h)}}return Ae.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 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"){if(!this.isValid)return NaN;const n=this.start.startOf(t),i=this.end.startOf(t);return Math.floor(i.diff(n,t).get(t))+1}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?Ae.fromDateTimes(t||this.s,n||this.e):this}splitAt(...t){if(!this.isValid)return[];const n=t.map(Wl).filter(o=>this.contains(o)).sort(),i=[];let{s}=this,a=0;for(;s<this.e;){const o=n[a]||this.e,l=+o>+this.e?this.e:o;i.push(Ae.fromDateTimes(s,l)),s=l,a+=1}return i}splitBy(t){const n=ne.fromDurationLike(t);if(!this.isValid||!n.isValid||n.as("milliseconds")===0)return[];let{s:i}=this,s=1,a;const o=[];for(;i<this.e;){const l=this.start.plus(n.mapUnits(d=>d*s));a=+l>+this.e?this.e:l,o.push(Ae.fromDateTimes(i,a)),i=a,s+=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,i=this.e<t.e?this.e:t.e;return n>=i?null:Ae.fromDateTimes(n,i)}union(t){if(!this.isValid)return this;const n=this.s<t.s?this.s:t.s,i=this.e>t.e?this.e:t.e;return Ae.fromDateTimes(n,i)}static merge(t){const[n,i]=t.sort((s,a)=>s.s-a.s).reduce(([s,a],o)=>a?a.overlaps(o)||a.abutsStart(o)?[s,a.union(o)]:[s.concat([a]),o]:[s,o],[[],null]);return i&&n.push(i),n}static xor(t){let n=null,i=0;const s=[],a=t.map(d=>[{time:d.s,type:"s"},{time:d.e,type:"e"}]),o=Array.prototype.concat(...a),l=o.sort((d,h)=>d.time-h.time);for(const d of l)i+=d.type==="s"?1:-1,i===1?n=d.time:(n&&+n!=+d.time&&s.push(Ae.fromDateTimes(n,d.time)),n=null);return Ae.merge(s)}difference(...t){return Ae.xor([this].concat(t)).map(n=>this.intersection(n)).filter(n=>n&&!n.isEmpty())}toString(){return this.isValid?`[${this.s.toISO()} \u2013 ${this.e.toISO()})`:Xo}toLocaleString(t=Nd,n={}){return this.isValid?gn.create(this.s.loc.clone(n),t).formatInterval(this):Xo}toISO(t){return this.isValid?`${this.s.toISO(t)}/${this.e.toISO(t)}`:Xo}toISODate(){return this.isValid?`${this.s.toISODate()}/${this.e.toISODate()}`:Xo}toISOTime(t){return this.isValid?`${this.s.toISOTime(t)}/${this.e.toISOTime(t)}`:Xo}toFormat(t,{separator:n=" \u2013 "}={}){return this.isValid?`${this.s.toFormat(t)}${n}${this.e.toFormat(t)}`:Xo}toDuration(t,n){return this.isValid?this.e.diff(this.s,t,n):ne.invalid(this.invalidReason)}mapEndpoints(t){return Ae.fromDateTimes(t(this.s),t(this.e))}}class Kd{static hasDST(t=Ye.defaultZone){const n=St.now().setZone(t).set({month:12});return!t.isUniversal&&n.offset!==n.set({month:6}).offset}static isValidIANAZone(t){return Ms.isValidZone(t)}static normalizeZone(t){return ra(t,Ye.defaultZone)}static months(t="long",{locale:n=null,numberingSystem:i=null,locObj:s=null,outputCalendar:a="gregory"}={}){return(s||Ce.create(n,i,a)).months(t)}static monthsFormat(t="long",{locale:n=null,numberingSystem:i=null,locObj:s=null,outputCalendar:a="gregory"}={}){return(s||Ce.create(n,i,a)).months(t,!0)}static weekdays(t="long",{locale:n=null,numberingSystem:i=null,locObj:s=null}={}){return(s||Ce.create(n,i,null)).weekdays(t)}static weekdaysFormat(t="long",{locale:n=null,numberingSystem:i=null,locObj:s=null}={}){return(s||Ce.create(n,i,null)).weekdays(t,!0)}static meridiems({locale:t=null}={}){return Ce.create(t).meridiems()}static eras(t="short",{locale:n=null}={}){return Ce.create(n,null,"gregory").eras(t)}static features(){return{relative:Bv()}}}function e3(e,t){const n=s=>s.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf(),i=n(t)-n(e);return Math.floor(ne.fromMillis(i).as("days"))}function xD(e,t,n){const i=[["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=e3(d,h);return(f-f%7)/7}],["days",e3]],s={},a=e;let o,l;for(const[d,h]of i)n.indexOf(d)>=0&&(o=d,s[d]=h(e,t),l=a.plus(s),l>t?(s[d]--,e=a.plus(s)):e=l);return[e,s,l,o]}function SD(e,t,n,i){let[s,a,o,l]=xD(e,t,n);const d=t-s,h=n.filter(m=>["hours","minutes","seconds","milliseconds"].indexOf(m)>=0);h.length===0&&(o<t&&(o=s.plus({[l]:1})),o!==s&&(a[l]=(a[l]||0)+d/(o-s)));const f=ne.fromObject(a,i);return h.length>0?ne.fromMillis(d,i).shiftTo(...h).plus(f):f}const cf={arab:"[\u0660-\u0669]",arabext:"[\u06F0-\u06F9]",bali:"[\u1B50-\u1B59]",beng:"[\u09E6-\u09EF]",deva:"[\u0966-\u096F]",fullwide:"[\uFF10-\uFF19]",gujr:"[\u0AE6-\u0AEF]",hanidec:"[\u3007|\u4E00|\u4E8C|\u4E09|\u56DB|\u4E94|\u516D|\u4E03|\u516B|\u4E5D]",khmr:"[\u17E0-\u17E9]",knda:"[\u0CE6-\u0CEF]",laoo:"[\u0ED0-\u0ED9]",limb:"[\u1946-\u194F]",mlym:"[\u0D66-\u0D6F]",mong:"[\u1810-\u1819]",mymr:"[\u1040-\u1049]",orya:"[\u0B66-\u0B6F]",tamldec:"[\u0BE6-\u0BEF]",telu:"[\u0C66-\u0C6F]",thai:"[\u0E50-\u0E59]",tibt:"[\u0F20-\u0F29]",latn:"\\d"},n3={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]},kD=cf.hanidec.replace(/[\[|\]]/g,"").split("");function CD(e){let t=parseInt(e,10);if(isNaN(t)){t="";for(let n=0;n<e.length;n++){const i=e.charCodeAt(n);if(e[n].search(cf.hanidec)!==-1)t+=kD.indexOf(e[n]);else for(const s in n3){const[a,o]=n3[s];i>=a&&i<=o&&(t+=i-a)}}return parseInt(t,10)}else return t}function ji({numberingSystem:e},t=""){return new RegExp(`${cf[e||"latn"]}${t}`)}const OD="missing Intl.DateTimeFormat.formatToParts support";function se(e,t=n=>n){return{regex:e,deser:([n])=>t(CD(n))}}const i3=`[ ${String.fromCharCode(160)}]`,s3=new RegExp(i3,"g");function MD(e){return e.replace(/\./g,"\\.?").replace(s3,i3)}function a3(e){return e.replace(/\./g,"").replace(s3," ").toLowerCase()}function Ui(e,t){return e===null?null:{regex:RegExp(e.map(MD).join("|")),deser:([n])=>e.findIndex(i=>a3(n)===a3(i))+t}}function o3(e,t){return{regex:e,deser:([,n,i])=>jd(n,i),groups:t}}function df(e){return{regex:e,deser:([t])=>t}}function DD(e){return e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function ED(e,t){const n=ji(t),i=ji(t,"{2}"),s=ji(t,"{3}"),a=ji(t,"{4}"),o=ji(t,"{6}"),l=ji(t,"{1,2}"),d=ji(t,"{1,3}"),h=ji(t,"{1,6}"),f=ji(t,"{1,9}"),m=ji(t,"{2,4}"),v=ji(t,"{4,6}"),y=k=>({regex:RegExp(DD(k.val)),deser:([D])=>D,literal:!0}),x=(k=>{if(e.literal)return y(k);switch(k.val){case"G":return Ui(t.eras("short",!1),0);case"GG":return Ui(t.eras("long",!1),0);case"y":return se(h);case"yy":return se(m,af);case"yyyy":return se(a);case"yyyyy":return se(v);case"yyyyyy":return se(o);case"M":return se(l);case"MM":return se(i);case"MMM":return Ui(t.months("short",!0,!1),1);case"MMMM":return Ui(t.months("long",!0,!1),1);case"L":return se(l);case"LL":return se(i);case"LLL":return Ui(t.months("short",!1,!1),1);case"LLLL":return Ui(t.months("long",!1,!1),1);case"d":return se(l);case"dd":return se(i);case"o":return se(d);case"ooo":return se(s);case"HH":return se(i);case"H":return se(l);case"hh":return se(i);case"h":return se(l);case"mm":return se(i);case"m":return se(l);case"q":return se(l);case"qq":return se(i);case"s":return se(l);case"ss":return se(i);case"S":return se(d);case"SSS":return se(s);case"u":return df(f);case"uu":return df(l);case"uuu":return se(n);case"a":return Ui(t.meridiems(),0);case"kkkk":return se(a);case"kk":return se(m,af);case"W":return se(l);case"WW":return se(i);case"E":case"c":return se(n);case"EEE":return Ui(t.weekdays("short",!1,!1),1);case"EEEE":return Ui(t.weekdays("long",!1,!1),1);case"ccc":return Ui(t.weekdays("short",!0,!1),1);case"cccc":return Ui(t.weekdays("long",!0,!1),1);case"Z":case"ZZ":return o3(new RegExp(`([+-]${l.source})(?::(${i.source}))?`),2);case"ZZZ":return o3(new RegExp(`([+-]${l.source})(${i.source})?`),2);case"z":return df(/[a-z_+-/]{1,256}?/i);default:return y(k)}})(e)||{invalidReason:OD};return x.token=e,x}const TD={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",hour:{numeric:"h","2-digit":"hh"},minute:{numeric:"m","2-digit":"mm"},second:{numeric:"s","2-digit":"ss"},timeZoneName:{long:"ZZZZZ",short:"ZZZ"}};function ID(e,t){const{type:n,value:i}=e;if(n==="literal")return{literal:!0,val:i};const s=t[n];let a=TD[n];if(typeof a=="object"&&(a=a[s]),a)return{literal:!1,val:a}}function AD(e){return[`^${e.map(n=>n.regex).reduce((n,i)=>`${n}(${i.source})`,"")}$`,e]}function VD(e,t,n){const i=e.match(t);if(i){const s={};let a=1;for(const o in n)if(Wo(n,o)){const l=n[o],d=l.groups?l.groups+1:1;!l.literal&&l.token&&(s[l.token.val[0]]=l.deser(i.slice(a,a+d))),a+=d}return[i,s]}else return[i,{}]}function BD(e){const t=a=>{switch(a){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,i;return Qt(e.z)||(n=Ms.create(e.z)),Qt(e.Z)||(n||(n=new xn(e.Z)),i=e.Z),Qt(e.q)||(e.M=(e.q-1)*3+1),Qt(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),Qt(e.u)||(e.S=ef(e.u)),[Object.keys(e).reduce((a,o)=>{const l=t(o);return l&&(a[l]=e[o]),a},{}),n,i]}let uf=null;function PD(){return uf||(uf=St.fromMillis(1555555555555)),uf}function ND(e,t){if(e.literal)return e;const n=gn.macroTokenToFormatOpts(e.val),i=c3(n,t);return i==null||i.includes(void 0)?e:i}function r3(e,t){return Array.prototype.concat(...e.map(n=>ND(n,t)))}function l3(e,t,n){const i=r3(gn.parseFormat(n),e),s=i.map(o=>ED(o,e)),a=s.find(o=>o.invalidReason);if(a)return{input:t,tokens:i,invalidReason:a.invalidReason};{const[o,l]=AD(s),d=RegExp(o,"i"),[h,f]=VD(t,d,l),[m,v,y]=f?BD(f):[null,null,void 0];if(Wo(f,"a")&&Wo(f,"H"))throw new Al("Can't include meridiem when specifying 24-hour format");return{input:t,tokens:i,regex:d,rawMatches:h,matches:f,result:m,zone:v,specificOffset:y}}}function zD(e,t,n){const{result:i,zone:s,specificOffset:a,invalidReason:o}=l3(e,t,n);return[i,s,a,o]}function c3(e,t){return e?gn.create(t,e).formatDateTimeParts(PD()).map(s=>ID(s,e)):null}const d3=[0,31,59,90,120,151,181,212,243,273,304,334],u3=[0,31,60,91,121,152,182,213,244,274,305,335];function mi(e,t){return new Yi("unit out of range",`you specified ${t} (of type ${typeof t}) as a ${e}, which is invalid`)}function h3(e,t,n){const i=new Date(Date.UTC(e,t-1,n));e<100&&e>=0&&i.setUTCFullYear(i.getUTCFullYear()-1900);const s=i.getUTCDay();return s===0?7:s}function f3(e,t,n){return n+(Pl(e)?u3:d3)[t-1]}function p3(e,t){const n=Pl(e)?u3:d3,i=n.findIndex(a=>a<t),s=t-n[i];return{month:i+1,day:s}}function hf(e){const{year:t,month:n,day:i}=e,s=f3(t,n,i),a=h3(t,n,i);let o=Math.floor((s-a+10)/7),l;return o<1?(l=t-1,o=Yd(l)):o>Yd(t)?(l=t+1,o=1):l=t,{weekYear:l,weekNumber:o,weekday:a,...Gd(e)}}function m3(e){const{weekYear:t,weekNumber:n,weekday:i}=e,s=h3(t,1,4),a=Nl(t);let o=n*7+i-s-3,l;o<1?(l=t-1,o+=Nl(l)):o>a?(l=t+1,o-=Nl(t)):l=t;const{month:d,day:h}=p3(l,o);return{year:l,month:d,day:h,...Gd(e)}}function ff(e){const{year:t,month:n,day:i}=e,s=f3(t,n,i);return{year:t,ordinal:s,...Gd(e)}}function g3(e){const{year:t,ordinal:n}=e,{month:i,day:s}=p3(t,n);return{year:t,month:i,day:s,...Gd(e)}}function LD(e){const t=Hd(e.weekYear),n=Ds(e.weekNumber,1,Yd(e.weekYear)),i=Ds(e.weekday,1,7);return t?n?i?!1:mi("weekday",e.weekday):mi("week",e.week):mi("weekYear",e.weekYear)}function FD(e){const t=Hd(e.year),n=Ds(e.ordinal,1,Nl(e.year));return t?n?!1:mi("ordinal",e.ordinal):mi("year",e.year)}function v3(e){const t=Hd(e.year),n=Ds(e.month,1,12),i=Ds(e.day,1,Wd(e.year,e.month));return t?n?i?!1:mi("day",e.day):mi("month",e.month):mi("year",e.year)}function _3(e){const{hour:t,minute:n,second:i,millisecond:s}=e,a=Ds(t,0,23)||t===24&&n===0&&i===0&&s===0,o=Ds(n,0,59),l=Ds(i,0,59),d=Ds(s,0,999);return a?o?l?d?!1:mi("millisecond",s):mi("second",i):mi("minute",n):mi("hour",t)}const pf="Invalid DateTime",y3=864e13;function Zd(e){return new Yi("unsupported zone",`the zone "${e.name}" is not supported`)}function mf(e){return e.weekData===null&&(e.weekData=hf(e.c)),e.weekData}function Rl(e,t){const n={ts:e.ts,zone:e.zone,c:e.c,o:e.o,loc:e.loc,invalid:e.invalid};return new St({...n,...t,old:n})}function b3(e,t,n){let i=e-t*60*1e3;const s=n.offset(i);if(t===s)return[i,t];i-=(s-t)*60*1e3;const a=n.offset(i);return s===a?[i,s]:[e-Math.min(s,a)*60*1e3,Math.max(s,a)]}function w3(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 Xd(e,t,n){return b3(sf(e),t,n)}function x3(e,t){const n=e.o,i=e.c.year+Math.trunc(t.years),s=e.c.month+Math.trunc(t.months)+Math.trunc(t.quarters)*3,a={...e.c,year:i,month:s,day:Math.min(e.c.day,Wd(i,s))+Math.trunc(t.days)+Math.trunc(t.weeks)*7},o=ne.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=sf(a);let[d,h]=b3(l,n,e.zone);return o!==0&&(d+=o,h=e.zone.offset(d)),{ts:d,o:h}}function Hl(e,t,n,i,s,a){const{setZone:o,zone:l}=n;if(e&&Object.keys(e).length!==0){const d=t||l,h=St.fromObject(e,{...n,zone:d,specificOffset:a});return o?h:h.setZone(l)}else return St.invalid(new Yi("unparsable",`the input "${s}" can't be parsed as ${i}`))}function Jd(e,t,n=!0){return e.isValid?gn.create(Ce.create("en-US"),{allowZ:n,forceSimple:!0}).formatDateTimeFromString(e,t):null}function gf(e,t){const n=e.c.year>9999||e.c.year<0;let i="";return n&&e.c.year>=0&&(i+="+"),i+=je(e.c.year,n?6:4),t?(i+="-",i+=je(e.c.month),i+="-",i+=je(e.c.day)):(i+=je(e.c.month),i+=je(e.c.day)),i}function S3(e,t,n,i,s,a){let o=je(e.c.hour);return t?(o+=":",o+=je(e.c.minute),(e.c.second!==0||!n)&&(o+=":")):o+=je(e.c.minute),(e.c.second!==0||!n)&&(o+=je(e.c.second),(e.c.millisecond!==0||!i)&&(o+=".",o+=je(e.c.millisecond,3))),s&&(e.isOffsetFixed&&e.offset===0&&!a?o+="Z":e.o<0?(o+="-",o+=je(Math.trunc(-e.o/60)),o+=":",o+=je(Math.trunc(-e.o%60))):(o+="+",o+=je(Math.trunc(e.o/60)),o+=":",o+=je(Math.trunc(e.o%60)))),a&&(o+="["+e.zone.ianaName+"]"),o}const k3={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},RD={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},HD={ordinal:1,hour:0,minute:0,second:0,millisecond:0},C3=["year","month","day","hour","minute","second","millisecond"],WD=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],YD=["year","ordinal","hour","minute","second","millisecond"];function O3(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 ov(e);return t}function M3(e,t){const n=ra(t.zone,Ye.defaultZone),i=Ce.fromObject(t),s=Ye.now();let a,o;if(Qt(e.year))a=s;else{for(const h of C3)Qt(e[h])&&(e[h]=k3[h]);const l=v3(e)||_3(e);if(l)return St.invalid(l);const d=n.offset(s);[a,o]=Xd(e,d,n)}return new St({ts:a,zone:n,loc:i,o})}function D3(e,t,n){const i=Qt(n.round)?!0:n.round,s=(o,l)=>(o=nf(o,i||n.calendary?0:2,!0),t.loc.clone(n).relFormatter(n).format(o,l)),a=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 s(a(n.unit),n.unit);for(const o of n.units){const l=a(o);if(Math.abs(l)>=1)return s(l,o)}return s(e>t?-0:0,n.units[n.units.length-1])}function E3(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]}class St{constructor(t){const n=t.zone||Ye.defaultZone;let i=t.invalid||(Number.isNaN(t.ts)?new Yi("invalid input"):null)||(n.isValid?null:Zd(n));this.ts=Qt(t.ts)?Ye.now():t.ts;let s=null,a=null;if(!i)if(t.old&&t.old.ts===this.ts&&t.old.zone.equals(n))[s,a]=[t.old.c,t.old.o];else{const l=n.offset(this.ts);s=w3(this.ts,l),i=Number.isNaN(s.year)?new Yi("invalid input"):null,s=i?null:s,a=i?null:l}this._zone=n,this.loc=t.loc||Ce.create(),this.invalid=i,this.weekData=null,this.c=s,this.o=a,this.isLuxonDateTime=!0}static now(){return new St({})}static local(){const[t,n]=E3(arguments),[i,s,a,o,l,d,h]=n;return M3({year:i,month:s,day:a,hour:o,minute:l,second:d,millisecond:h},t)}static utc(){const[t,n]=E3(arguments),[i,s,a,o,l,d,h]=n;return t.zone=xn.utcInstance,M3({year:i,month:s,day:a,hour:o,minute:l,second:d,millisecond:h},t)}static fromJSDate(t,n={}){const i=mM(t)?t.valueOf():NaN;if(Number.isNaN(i))return St.invalid("invalid input");const s=ra(n.zone,Ye.defaultZone);return s.isValid?new St({ts:i,zone:s,loc:Ce.fromObject(n)}):St.invalid(Zd(s))}static fromMillis(t,n={}){if(Ja(t))return t<-y3||t>y3?St.invalid("Timestamp out of range"):new St({ts:t,zone:ra(n.zone,Ye.defaultZone),loc:Ce.fromObject(n)});throw new fi(`fromMillis requires a numerical input, but received a ${typeof t} with value ${t}`)}static fromSeconds(t,n={}){if(Ja(t))return new St({ts:t*1e3,zone:ra(n.zone,Ye.defaultZone),loc:Ce.fromObject(n)});throw new fi("fromSeconds requires a numerical input")}static fromObject(t,n={}){t=t||{};const i=ra(n.zone,Ye.defaultZone);if(!i.isValid)return St.invalid(Zd(i));const s=Ye.now(),a=Qt(n.specificOffset)?i.offset(s):n.specificOffset,o=Ud(t,O3),l=!Qt(o.ordinal),d=!Qt(o.year),h=!Qt(o.month)||!Qt(o.day),f=d||h,m=o.weekYear||o.weekNumber,v=Ce.fromObject(n);if((f||l)&&m)throw new Al("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(h&&l)throw new Al("Can't mix ordinal dates with month/day");const y=m||o.weekday&&!f;let w,x,k=w3(s,a);y?(w=WD,x=RD,k=hf(k)):l?(w=YD,x=HD,k=ff(k)):(w=C3,x=k3);let D=!1;for(const L of w){const W=o[L];Qt(W)?D?o[L]=x[L]:o[L]=k[L]:D=!0}const E=y?LD(o):l?FD(o):v3(o),B=E||_3(o);if(B)return St.invalid(B);const S=y?m3(o):l?g3(o):o,[A,I]=Xd(S,a,i),F=new St({ts:A,zone:i,o:I,loc:v});return o.weekday&&f&&t.weekday!==F.weekday?St.invalid("mismatched weekday",`you can't specify both a weekday of ${o.weekday} and a date of ${F.toISO()}`):F}static fromISO(t,n={}){const[i,s]=sD(t);return Hl(i,s,n,"ISO 8601",t)}static fromRFC2822(t,n={}){const[i,s]=aD(t);return Hl(i,s,n,"RFC 2822",t)}static fromHTTP(t,n={}){const[i,s]=oD(t);return Hl(i,s,n,"HTTP",n)}static fromFormat(t,n,i={}){if(Qt(t)||Qt(n))throw new fi("fromFormat requires an input string and a format");const{locale:s=null,numberingSystem:a=null}=i,o=Ce.fromOpts({locale:s,numberingSystem:a,defaultToEN:!0}),[l,d,h,f]=zD(o,t,n);return f?St.invalid(f):Hl(l,d,i,`format ${n}`,t,h)}static fromString(t,n,i={}){return St.fromFormat(t,n,i)}static fromSQL(t,n={}){const[i,s]=fD(t);return Hl(i,s,n,"SQL",t)}static invalid(t,n=null){if(!t)throw new fi("need to specify a reason the DateTime is invalid");const i=t instanceof Yi?t:new Yi(t,n);if(Ye.throwOnInvalid)throw new GO(i);return new St({invalid:i})}static isDateTime(t){return t&&t.isLuxonDateTime||!1}static parseFormatForOpts(t,n={}){const i=c3(t,Ce.fromObject(n));return i?i.map(s=>s?s.val:null).join(""):null}static expandFormat(t,n={}){return r3(gn.parseFormat(t),Ce.fromObject(n)).map(s=>s.val).join("")}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?mf(this).weekYear:NaN}get weekNumber(){return this.isValid?mf(this).weekNumber:NaN}get weekday(){return this.isValid?mf(this).weekday:NaN}get ordinal(){return this.isValid?ff(this.c).ordinal:NaN}get monthShort(){return this.isValid?Kd.months("short",{locObj:this.loc})[this.month-1]:null}get monthLong(){return this.isValid?Kd.months("long",{locObj:this.loc})[this.month-1]:null}get weekdayShort(){return this.isValid?Kd.weekdays("short",{locObj:this.loc})[this.weekday-1]:null}get weekdayLong(){return this.isValid?Kd.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}get isInLeapYear(){return Pl(this.year)}get daysInMonth(){return Wd(this.year,this.month)}get daysInYear(){return this.isValid?Nl(this.year):NaN}get weeksInWeekYear(){return this.isValid?Yd(this.weekYear):NaN}resolvedLocaleOptions(t={}){const{locale:n,numberingSystem:i,calendar:s}=gn.create(this.loc.clone(t),t).resolvedOptions(this);return{locale:n,numberingSystem:i,outputCalendar:s}}toUTC(t=0,n={}){return this.setZone(xn.instance(t),n)}toLocal(){return this.setZone(Ye.defaultZone)}setZone(t,{keepLocalTime:n=!1,keepCalendarTime:i=!1}={}){if(t=ra(t,Ye.defaultZone),t.equals(this.zone))return this;if(t.isValid){let s=this.ts;if(n||i){const a=t.offset(this.ts),o=this.toObject();[s]=Xd(o,a,t)}return Rl(this,{ts:s,zone:t})}else return St.invalid(Zd(t))}reconfigure({locale:t,numberingSystem:n,outputCalendar:i}={}){const s=this.loc.clone({locale:t,numberingSystem:n,outputCalendar:i});return Rl(this,{loc:s})}setLocale(t){return this.reconfigure({locale:t})}set(t){if(!this.isValid)return this;const n=Ud(t,O3),i=!Qt(n.weekYear)||!Qt(n.weekNumber)||!Qt(n.weekday),s=!Qt(n.ordinal),a=!Qt(n.year),o=!Qt(n.month)||!Qt(n.day),l=a||o,d=n.weekYear||n.weekNumber;if((l||s)&&d)throw new Al("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(o&&s)throw new Al("Can't mix ordinal dates with month/day");let h;i?h=m3({...hf(this.c),...n}):Qt(n.ordinal)?(h={...this.toObject(),...n},Qt(n.day)&&(h.day=Math.min(Wd(h.year,h.month),h.day))):h=g3({...ff(this.c),...n});const[f,m]=Xd(h,this.o,this.zone);return Rl(this,{ts:f,o:m})}plus(t){if(!this.isValid)return this;const n=ne.fromDurationLike(t);return Rl(this,x3(this,n))}minus(t){if(!this.isValid)return this;const n=ne.fromDurationLike(t).negate();return Rl(this,x3(this,n))}startOf(t){if(!this.isValid)return this;const n={},i=ne.normalizeUnit(t);switch(i){case"years":n.month=1;case"quarters":case"months":n.day=1;case"weeks":case"days":n.hour=0;case"hours":n.minute=0;case"minutes":n.second=0;case"seconds":n.millisecond=0;break}if(i==="weeks"&&(n.weekday=1),i==="quarters"){const s=Math.ceil(this.month/3);n.month=(s-1)*3+1}return this.set(n)}endOf(t){return this.isValid?this.plus({[t]:1}).startOf(t).minus(1):this}toFormat(t,n={}){return this.isValid?gn.create(this.loc.redefaultToEN(n)).formatDateTimeFromString(this,t):pf}toLocaleString(t=Nd,n={}){return this.isValid?gn.create(this.loc.clone(n),t).formatDateTime(this):pf}toLocaleParts(t={}){return this.isValid?gn.create(this.loc.clone(t),t).formatDateTimeParts(this):[]}toISO({format:t="extended",suppressSeconds:n=!1,suppressMilliseconds:i=!1,includeOffset:s=!0,extendedZone:a=!1}={}){if(!this.isValid)return null;const o=t==="extended";let l=gf(this,o);return l+="T",l+=S3(this,o,n,i,s,a),l}toISODate({format:t="extended"}={}){return this.isValid?gf(this,t==="extended"):null}toISOWeekDate(){return Jd(this,"kkkk-'W'WW-c")}toISOTime({suppressMilliseconds:t=!1,suppressSeconds:n=!1,includeOffset:i=!0,includePrefix:s=!1,extendedZone:a=!1,format:o="extended"}={}){return this.isValid?(s?"T":"")+S3(this,o==="extended",n,t,i,a):null}toRFC2822(){return Jd(this,"EEE, dd LLL yyyy HH:mm:ss ZZZ",!1)}toHTTP(){return Jd(this.toUTC(),"EEE, dd LLL yyyy HH:mm:ss 'GMT'")}toSQLDate(){return this.isValid?gf(this,!0):null}toSQLTime({includeOffset:t=!0,includeZone:n=!1,includeOffsetSpace:i=!0}={}){let s="HH:mm:ss.SSS";return(n||t)&&(i&&(s+=" "),n?s+="z":t&&(s+="ZZ")),Jd(this,s,!0)}toSQL(t={}){return this.isValid?`${this.toSQLDate()} ${this.toSQLTime(t)}`:null}toString(){return this.isValid?this.toISO():pf}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",i={}){if(!this.isValid||!t.isValid)return ne.invalid("created by diffing an invalid DateTime");const s={locale:this.locale,numberingSystem:this.numberingSystem,...i},a=gM(n).map(ne.normalizeUnit),o=t.valueOf()>this.valueOf(),l=o?this:t,d=o?t:this,h=SD(l,d,a,s);return o?h.negate():h}diffNow(t="milliseconds",n={}){return this.diff(St.now(),t,n)}until(t){return this.isValid?Ae.fromDateTimes(this,t):this}hasSame(t,n){if(!this.isValid)return!1;const i=t.valueOf(),s=this.setZone(t.zone,{keepLocalTime:!0});return s.startOf(n)<=i&&i<=s.endOf(n)}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||St.fromObject({},{zone:this.zone}),i=t.padding?this<n?-t.padding:t.padding:0;let s=["years","months","days","hours","minutes","seconds"],a=t.unit;return Array.isArray(t.unit)&&(s=t.unit,a=void 0),D3(n,this.plus(i),{...t,numeric:"always",units:s,unit:a})}toRelativeCalendar(t={}){return this.isValid?D3(t.base||St.fromObject({},{zone:this.zone}),this,{...t,numeric:"auto",units:["years","months","days"],calendary:!0}):null}static min(...t){if(!t.every(St.isDateTime))throw new fi("min requires all arguments be DateTimes");return Pv(t,n=>n.valueOf(),Math.min)}static max(...t){if(!t.every(St.isDateTime))throw new fi("max requires all arguments be DateTimes");return Pv(t,n=>n.valueOf(),Math.max)}static fromFormatExplain(t,n,i={}){const{locale:s=null,numberingSystem:a=null}=i,o=Ce.fromOpts({locale:s,numberingSystem:a,defaultToEN:!0});return l3(o,t,n)}static fromStringExplain(t,n,i={}){return St.fromFormatExplain(t,n,i)}static get DATE_SHORT(){return Nd}static get DATE_MED(){return rv}static get DATE_MED_WITH_WEEKDAY(){return XO}static get DATE_FULL(){return lv}static get DATE_HUGE(){return cv}static get TIME_SIMPLE(){return dv}static get TIME_WITH_SECONDS(){return uv}static get TIME_WITH_SHORT_OFFSET(){return hv}static get TIME_WITH_LONG_OFFSET(){return fv}static get TIME_24_SIMPLE(){return pv}static get TIME_24_WITH_SECONDS(){return mv}static get TIME_24_WITH_SHORT_OFFSET(){return gv}static get TIME_24_WITH_LONG_OFFSET(){return vv}static get DATETIME_SHORT(){return _v}static get DATETIME_SHORT_WITH_SECONDS(){return yv}static get DATETIME_MED(){return bv}static get DATETIME_MED_WITH_SECONDS(){return wv}static get DATETIME_MED_WITH_WEEKDAY(){return JO}static get DATETIME_FULL(){return xv}static get DATETIME_FULL_WITH_SECONDS(){return Sv}static get DATETIME_HUGE(){return kv}static get DATETIME_HUGE_WITH_SECONDS(){return Cv}}function Wl(e){if(St.isDateTime(e))return e;if(e&&e.valueOf&&Ja(e.valueOf()))return St.fromJSDate(e);if(e&&typeof e=="object")return St.fromObject(e);throw new fi(`Unknown datetime argument: ${e}, of type ${typeof e}`)}function Yl(e){var t=e.getBoundingClientRect();return{width:t.width,height:t.height,top:t.top,right:t.right,bottom:t.bottom,left:t.left,x:t.left,y:t.top}}function gi(e){if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t?t.defaultView:window}return e}function vf(e){var t=gi(e),n=t.pageXOffset,i=t.pageYOffset;return{scrollLeft:n,scrollTop:i}}function jl(e){var t=gi(e).Element;return e instanceof t||e instanceof Element}function Gi(e){var t=gi(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function jD(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function UD(e){return e===gi(e)||!Gi(e)?vf(e):jD(e)}function Es(e){return e?(e.nodeName||"").toLowerCase():null}function da(e){return(jl(e)?e.ownerDocument:e.document).documentElement}function T3(e){return Yl(da(e)).left+vf(e).scrollLeft}function $a(e){return gi(e).getComputedStyle(e)}function _f(e){var t=$a(e),n=t.overflow,i=t.overflowX,s=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+s+i)}function I3(e,t,n){n===void 0&&(n=!1);var i=da(t),s=Yl(e),a={scrollLeft:0,scrollTop:0},o={x:0,y:0};return n||((Es(t)!=="body"||_f(i))&&(a=UD(t)),Gi(t)?(o=Yl(t),o.x+=t.clientLeft,o.y+=t.clientTop):i&&(o.x=T3(i))),{x:s.left+a.scrollLeft-o.x,y:s.top+a.scrollTop-o.y,width:s.width,height:s.height}}function yf(e){return{x:e.offsetLeft,y:e.offsetTop,width:e.offsetWidth,height:e.offsetHeight}}function A3(e){return Es(e)==="html"?e:e.assignedSlot||e.parentNode||e.host||da(e)}function V3(e){return["html","body","#document"].indexOf(Es(e))>=0?e.ownerDocument.body:Gi(e)&&_f(e)?e:V3(A3(e))}function Ul(e,t){t===void 0&&(t=[]);var n=V3(e),i=Es(n)==="body",s=gi(n),a=i?[s].concat(s.visualViewport||[],_f(n)?n:[]):n,o=t.concat(a);return i?o:o.concat(Ul(A3(a)))}function GD(e){return["table","td","th"].indexOf(Es(e))>=0}function B3(e){return!Gi(e)||$a(e).position==="fixed"?null:e.offsetParent}function Gl(e){for(var t=gi(e),n=B3(e);n&&GD(n);)n=B3(n);return n&&Es(n)==="body"&&$a(n).position==="static"?t:n||t}var vi="top",Ki="bottom",Zi="right",_i="left",Qd="auto",Kl=[vi,Ki,Zi,_i],Jo="start",bf="end",KD="clippingParents",P3="viewport",Zl="popper",ZD="reference",N3=Kl.reduce(function(e,t){return e.concat([t+"-"+Jo,t+"-"+bf])},[]),z3=[].concat(Kl,[Qd]).reduce(function(e,t){return e.concat([t,t+"-"+Jo,t+"-"+bf])},[]),XD="beforeRead",JD="read",QD="afterRead",qD="beforeMain",$D="main",tE="afterMain",eE="beforeWrite",nE="write",iE="afterWrite",wf=[XD,JD,QD,qD,$D,tE,eE,nE,iE];function sE(e){var t=new Map,n=new Set,i=[];e.forEach(function(a){t.set(a.name,a)});function s(a){n.add(a.name);var o=[].concat(a.requires||[],a.requiresIfExists||[]);o.forEach(function(l){if(!n.has(l)){var d=t.get(l);d&&s(d)}}),i.push(a)}return e.forEach(function(a){n.has(a.name)||s(a)}),i}function aE(e){var t=sE(e);return wf.reduce(function(n,i){return n.concat(t.filter(function(s){return s.phase===i}))},[])}function oE(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function ua(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];return[].concat(n).reduce(function(s,a){return s.replace(/%s/,a)},e)}var to='Popper: modifier "%s" provided an invalid %s property, expected %s but got %s',rE='Popper: modifier "%s" requires "%s", but "%s" modifier is not available',lE=["name","enabled","phase","fn","effect","requires","options"];function cE(e){e.forEach(function(t){Object.keys(t).forEach(function(n){switch(n){case"name":typeof t.name!="string"&&console.error(ua(to,String(t.name),'"name"','"string"','"'+String(t.name)+'"'));break;case"enabled":typeof t.enabled!="boolean"&&console.error(ua(to,t.name,'"enabled"','"boolean"','"'+String(t.enabled)+'"'));case"phase":wf.indexOf(t.phase)<0&&console.error(ua(to,t.name,'"phase"',"either "+wf.join(", "),'"'+String(t.phase)+'"'));break;case"fn":typeof t.fn!="function"&&console.error(ua(to,t.name,'"fn"','"function"','"'+String(t.fn)+'"'));break;case"effect":typeof t.effect!="function"&&console.error(ua(to,t.name,'"effect"','"function"','"'+String(t.fn)+'"'));break;case"requires":Array.isArray(t.requires)||console.error(ua(to,t.name,'"requires"','"array"','"'+String(t.requires)+'"'));break;case"requiresIfExists":Array.isArray(t.requiresIfExists)||console.error(ua(to,t.name,'"requiresIfExists"','"array"','"'+String(t.requiresIfExists)+'"'));break;case"options":case"data":break;default:console.error('PopperJS: an invalid property has been provided to the "'+t.name+'" modifier, valid properties are '+lE.map(function(i){return'"'+i+'"'}).join(", ")+'; but "'+n+'" was provided.')}t.requires&&t.requires.forEach(function(i){e.find(function(s){return s.name===i})==null&&console.error(ua(rE,String(t.name),i,i))})})})}function dE(e,t){var n=new Set;return e.filter(function(i){var s=t(i);if(!n.has(s))return n.add(s),!0})}function Xi(e){return e.split("-")[0]}function uE(e){var t=e.reduce(function(n,i){var s=n[i.name];return n[i.name]=s?Object.assign({},s,{},i,{options:Object.assign({},s.options,{},i.options),data:Object.assign({},s.data,{},i.data)}):i,n},{});return Object.keys(t).map(function(n){return t[n]})}var L3="Popper: Invalid reference or popper argument provided. They must be either a DOM element or virtual element.",hE="Popper: An infinite loop in the modifiers cycle has been detected! The cycle has been interrupted to prevent a browser crash.",F3={placement:"bottom",modifiers:[],strategy:"absolute"};function R3(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return!t.some(function(i){return!(i&&typeof i.getBoundingClientRect=="function")})}function fE(e){e===void 0&&(e={});var t=e,n=t.defaultModifiers,i=n===void 0?[]:n,s=t.defaultOptions,a=s===void 0?F3:s;return function(l,d,h){h===void 0&&(h=a);var f={placement:"bottom",orderedModifiers:[],options:Object.assign({},F3,{},a),modifiersData:{},elements:{reference:l,popper:d},attributes:{},styles:{}},m=[],v=!1,y={state:f,setOptions:function(D){x(),f.options=Object.assign({},a,{},f.options,{},D),f.scrollParents={reference:jl(l)?Ul(l):l.contextElement?Ul(l.contextElement):[],popper:Ul(d)};var E=aE(uE([].concat(i,f.options.modifiers)));if(f.orderedModifiers=E.filter(function(X){return X.enabled}),process.env.NODE_ENV!=="production"){var B=dE([].concat(E,f.options.modifiers),function(X){var Z=X.name;return Z});if(cE(B),Xi(f.options.placement)===Qd){var S=f.orderedModifiers.find(function(X){var Z=X.name;return Z==="flip"});S||console.error(['Popper: "auto" placements require the "flip" modifier be',"present and enabled to work."].join(" "))}var A=$a(d),I=A.marginTop,F=A.marginRight,L=A.marginBottom,W=A.marginLeft;[I,F,L,W].some(function(X){return parseFloat(X)})&&console.warn(['Popper: CSS "margin" styles cannot be used to apply padding',"between the popper and its reference element or boundary.","To replicate margin, use the `offset` modifier, as well as","the `padding` option in the `preventOverflow` and `flip`","modifiers."].join(" "))}return w(),y.update()},forceUpdate:function(){if(!v){var D=f.elements,E=D.reference,B=D.popper;if(!R3(E,B)){process.env.NODE_ENV!=="production"&&console.error(L3);return}f.rects={reference:I3(E,Gl(B),f.options.strategy==="fixed"),popper:yf(B)},f.reset=!1,f.placement=f.options.placement,f.orderedModifiers.forEach(function(Z){return f.modifiersData[Z.name]=Object.assign({},Z.data)});for(var S=0,A=0;A<f.orderedModifiers.length;A++){if(process.env.NODE_ENV!=="production"&&(S+=1,S>100)){console.error(hE);break}if(f.reset===!0){f.reset=!1,A=-1;continue}var I=f.orderedModifiers[A],F=I.fn,L=I.options,W=L===void 0?{}:L,X=I.name;typeof F=="function"&&(f=F({state:f,options:W,name:X,instance:y})||f)}}},update:oE(function(){return new Promise(function(k){y.forceUpdate(),k(f)})}),destroy:function(){x(),v=!0}};if(!R3(l,d))return process.env.NODE_ENV!=="production"&&console.error(L3),y;y.setOptions(h).then(function(k){!v&&h.onFirstUpdate&&h.onFirstUpdate(k)});function w(){f.orderedModifiers.forEach(function(k){var D=k.name,E=k.options,B=E===void 0?{}:E,S=k.effect;if(typeof S=="function"){var A=S({state:f,name:D,instance:y,options:B}),I=function(){};m.push(A||I)}})}function x(){m.forEach(function(k){return k()}),m=[]}return y}}var qd={passive:!0};function pE(e){var t=e.state,n=e.instance,i=e.options,s=i.scroll,a=s===void 0?!0:s,o=i.resize,l=o===void 0?!0:o,d=gi(t.elements.popper),h=[].concat(t.scrollParents.reference,t.scrollParents.popper);return a&&h.forEach(function(f){f.addEventListener("scroll",n.update,qd)}),l&&d.addEventListener("resize",n.update,qd),function(){a&&h.forEach(function(f){f.removeEventListener("scroll",n.update,qd)}),l&&d.removeEventListener("resize",n.update,qd)}}const mE={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:pE,data:{}};function Xl(e){return e.split("-")[1]}function xf(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function H3(e){var t=e.reference,n=e.element,i=e.placement,s=i?Xi(i):null,a=i?Xl(i):null,o=t.x+t.width/2-n.width/2,l=t.y+t.height/2-n.height/2,d;switch(s){case vi:d={x:o,y:t.y-n.height};break;case Ki:d={x:o,y:t.y+t.height};break;case Zi:d={x:t.x+t.width,y:l};break;case _i:d={x:t.x-n.width,y:l};break;default:d={x:t.x,y:t.y}}var h=s?xf(s):null;if(h!=null){var f=h==="y"?"height":"width";switch(a){case Jo:d[h]=Math.floor(d[h])-Math.floor(t[f]/2-n[f]/2);break;case bf:d[h]=Math.floor(d[h])+Math.ceil(t[f]/2-n[f]/2);break}}return d}function gE(e){var t=e.state,n=e.name;t.modifiersData[n]=H3({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}const vE={name:"popperOffsets",enabled:!0,phase:"read",fn:gE,data:{}};var _E={top:"auto",right:"auto",bottom:"auto",left:"auto"};function yE(e){var t=e.x,n=e.y,i=window,s=i.devicePixelRatio||1;return{x:Math.round(t*s)/s||0,y:Math.round(n*s)/s||0}}function W3(e){var t,n=e.popper,i=e.popperRect,s=e.placement,a=e.offsets,o=e.position,l=e.gpuAcceleration,d=e.adaptive,h=yE(a),f=h.x,m=h.y,v=a.hasOwnProperty("x"),y=a.hasOwnProperty("y"),w=_i,x=vi,k=window;if(d){var D=Gl(n);D===gi(n)&&(D=da(n)),s===vi&&(x=Ki,m-=D.clientHeight-i.height,m*=l?1:-1),s===_i&&(w=Zi,f-=D.clientWidth-i.width,f*=l?1:-1)}var E=Object.assign({position:o},d&&_E);if(l){var B;return Object.assign({},E,(B={},B[x]=y?"0":"",B[w]=v?"0":"",B.transform=(k.devicePixelRatio||1)<2?"translate("+f+"px, "+m+"px)":"translate3d("+f+"px, "+m+"px, 0)",B))}return Object.assign({},E,(t={},t[x]=y?m+"px":"",t[w]=v?f+"px":"",t.transform="",t))}function bE(e){var t=e.state,n=e.options,i=n.gpuAcceleration,s=i===void 0?!0:i,a=n.adaptive,o=a===void 0?!0:a;if(process.env.NODE_ENV!=="production"){var l=$a(t.elements.popper).transitionProperty||"";o&&["transform","top","right","bottom","left"].some(function(h){return l.indexOf(h)>=0})&&console.warn(["Popper: Detected CSS transitions on at least one of the following",'CSS properties: "transform", "top", "right", "bottom", "left".',`
|
|
42
|
+
`):e}function Ck(e,t){const{element:n,datasetIndex:i,index:s}=t,a=e.getDatasetMeta(i).controller,{label:o,value:l}=a.getLabelAndValue(s);return{chart:e,label:o,parsed:a.getParsed(s),raw:e.data.datasets[i].data[s],formattedValue:l,dataset:a.getDataset(),dataIndex:s,datasetIndex:i,element:n}}function O2(e,t){const n=e.chart.ctx,{body:i,footer:s,title:a}=e,{boxWidth:o,boxHeight:l}=t,d=$e(t.bodyFont),h=$e(t.titleFont),f=$e(t.footerFont),m=a.length,v=s.length,y=i.length,w=pn(t.padding);let x=w.height,k=0,D=i.reduce((S,A)=>S+A.before.length+A.lines.length+A.after.length,0);if(D+=e.beforeBody.length+e.afterBody.length,m&&(x+=m*h.lineHeight+(m-1)*t.titleSpacing+t.titleMarginBottom),D){const S=t.displayColors?Math.max(l,d.lineHeight):d.lineHeight;x+=y*S+(D-y)*d.lineHeight+(D-1)*t.bodySpacing}v&&(x+=t.footerMarginTop+v*f.lineHeight+(v-1)*t.footerSpacing);let E=0;const B=function(S){k=Math.max(k,n.measureText(S).width+E)};return n.save(),n.font=h.string,ue(e.title,B),n.font=d.string,ue(e.beforeBody.concat(e.afterBody),B),E=t.displayColors?o+2+t.boxPadding:0,ue(i,S=>{ue(S.before,B),ue(S.lines,B),ue(S.after,B)}),E=0,n.font=f.string,ue(e.footer,B),n.restore(),k+=w.width,{width:k,height:x}}function Ok(e,t){const{y:n,height:i}=t;return n<i/2?"top":n>e.height-i/2?"bottom":"center"}function Mk(e,t,n,i){const{x:s,width:a}=i,o=n.caretSize+n.caretPadding;if(e==="left"&&s+a+o>t.width||e==="right"&&s-a-o<0)return!0}function Dk(e,t,n,i){const{x:s,width:a}=n,{width:o,chartArea:{left:l,right:d}}=e;let h="center";return i==="center"?h=s<=(l+d)/2?"left":"right":s<=a/2?h="left":s>=o-a/2&&(h="right"),Mk(h,e,t,n)&&(h="center"),h}function M2(e,t,n){const i=n.yAlign||t.yAlign||Ok(e,n);return{xAlign:n.xAlign||t.xAlign||Dk(e,t,n,i),yAlign:i}}function Ek(e,t){let{x:n,width:i}=e;return t==="right"?n-=i:t==="center"&&(n-=i/2),n}function Tk(e,t,n){let{y:i,height:s}=e;return t==="top"?i+=n:t==="bottom"?i-=s+n:i-=s/2,i}function D2(e,t,n,i){const{caretSize:s,caretPadding:a,cornerRadius:o}=e,{xAlign:l,yAlign:d}=n,h=s+a,{topLeft:f,topRight:m,bottomLeft:v,bottomRight:y}=Ha(o);let w=Ek(t,l);const x=Tk(t,d,h);return d==="center"?l==="left"?w+=h:l==="right"&&(w-=h):l==="left"?w-=Math.max(f,v)+s:l==="right"&&(w+=Math.max(m,y)+s),{x:an(w,0,i.width-t.width),y:an(x,0,i.height-t.height)}}function Id(e,t,n){const i=pn(n.padding);return t==="center"?e.x+e.width/2:t==="right"?e.x+e.width-i.right:e.x+i.left}function E2(e){return ls([],Os(e))}function Ik(e,t,n){return ia(e,{tooltip:t,tooltipItems:n,type:"tooltip"})}function T2(e,t){const n=t&&t.dataset&&t.dataset.tooltip&&t.dataset.tooltip.callbacks;return n?e.override(n):e}const I2={beforeTitle:ws,title(e){if(e.length>0){const t=e[0],n=t.chart.data.labels,i=n?n.length:0;if(this&&this.options&&this.options.mode==="dataset")return t.dataset.label||"";if(t.label)return t.label;if(i>0&&t.dataIndex<i)return n[t.dataIndex]}return""},afterTitle:ws,beforeBody:ws,beforeLabel:ws,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 ee(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:ws,afterBody:ws,beforeFooter:ws,footer:ws,afterFooter:ws};function Bn(e,t,n,i){const s=e[t].call(n,i);return typeof s>"u"?I2[t].call(n,i):s}class Ah extends Ri{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,i=this.options.setContext(this.getContext()),s=i.enabled&&n.options.animation&&i.animations,a=new bg(this.chart,s);return s._cacheable&&(this._cachedAnimations=Object.freeze(a)),a}getContext(){return this.$context||(this.$context=Ik(this.chart.getContext(),this,this._tooltipItems))}getTitle(t,n){const{callbacks:i}=n,s=Bn(i,"beforeTitle",this,t),a=Bn(i,"title",this,t),o=Bn(i,"afterTitle",this,t);let l=[];return l=ls(l,Os(s)),l=ls(l,Os(a)),l=ls(l,Os(o)),l}getBeforeBody(t,n){return E2(Bn(n.callbacks,"beforeBody",this,t))}getBody(t,n){const{callbacks:i}=n,s=[];return ue(t,a=>{const o={before:[],lines:[],after:[]},l=T2(i,a);ls(o.before,Os(Bn(l,"beforeLabel",this,a))),ls(o.lines,Bn(l,"label",this,a)),ls(o.after,Os(Bn(l,"afterLabel",this,a))),s.push(o)}),s}getAfterBody(t,n){return E2(Bn(n.callbacks,"afterBody",this,t))}getFooter(t,n){const{callbacks:i}=n,s=Bn(i,"beforeFooter",this,t),a=Bn(i,"footer",this,t),o=Bn(i,"afterFooter",this,t);let l=[];return l=ls(l,Os(s)),l=ls(l,Os(a)),l=ls(l,Os(o)),l}_createItems(t){const n=this._active,i=this.chart.data,s=[],a=[],o=[];let l=[],d,h;for(d=0,h=n.length;d<h;++d)l.push(Ck(this.chart,n[d]));return t.filter&&(l=l.filter((f,m,v)=>t.filter(f,m,v,i))),t.itemSort&&(l=l.sort((f,m)=>t.itemSort(f,m,i))),ue(l,f=>{const m=T2(t.callbacks,f);s.push(Bn(m,"labelColor",this,f)),a.push(Bn(m,"labelPointStyle",this,f)),o.push(Bn(m,"labelTextColor",this,f))}),this.labelColors=s,this.labelPointStyles=a,this.labelTextColors=o,this.dataPoints=l,l}update(t,n){const i=this.options.setContext(this.getContext()),s=this._active;let a,o=[];if(!s.length)this.opacity!==0&&(a={opacity:0});else{const l=Ol[i.position].call(this,s,this._eventPosition);o=this._createItems(i),this.title=this.getTitle(o,i),this.beforeBody=this.getBeforeBody(o,i),this.body=this.getBody(o,i),this.afterBody=this.getAfterBody(o,i),this.footer=this.getFooter(o,i);const d=this._size=O2(this,i),h=Object.assign({},l,d),f=M2(this.chart,i,h),m=D2(i,h,f,this.chart);this.xAlign=f.xAlign,this.yAlign=f.yAlign,a={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,a&&this._resolveAnimations().update(this,a),t&&i.external&&i.external.call(this,{chart:this.chart,tooltip:this,replay:n})}drawCaret(t,n,i,s){const a=this.getCaretPosition(t,i,s);n.lineTo(a.x1,a.y1),n.lineTo(a.x2,a.y2),n.lineTo(a.x3,a.y3)}getCaretPosition(t,n,i){const{xAlign:s,yAlign:a}=this,{caretSize:o,cornerRadius:l}=i,{topLeft:d,topRight:h,bottomLeft:f,bottomRight:m}=Ha(l),{x:v,y}=t,{width:w,height:x}=n;let k,D,E,B,S,A;return a==="center"?(S=y+x/2,s==="left"?(k=v,D=k-o,B=S+o,A=S-o):(k=v+w,D=k+o,B=S-o,A=S+o),E=k):(s==="left"?D=v+Math.max(d,f)+o:s==="right"?D=v+w-Math.max(h,m)-o:D=this.caretX,a==="top"?(B=y,S=B-o,k=D-o,E=D+o):(B=y+x,S=B+o,k=D+o,E=D-o),A=B),{x1:k,x2:D,x3:E,y1:B,y2:S,y3:A}}drawTitle(t,n,i){const s=this.title,a=s.length;let o,l,d;if(a){const h=Fo(i.rtl,this.x,this.width);for(t.x=Id(this,i.titleAlign,i),n.textAlign=h.textAlign(i.titleAlign),n.textBaseline="middle",o=$e(i.titleFont),l=i.titleSpacing,n.fillStyle=i.titleColor,n.font=o.string,d=0;d<a;++d)n.fillText(s[d],h.x(t.x),t.y+o.lineHeight/2),t.y+=o.lineHeight+l,d+1===a&&(t.y+=i.titleMarginBottom-l)}}_drawColorBox(t,n,i,s,a){const o=this.labelColors[i],l=this.labelPointStyles[i],{boxHeight:d,boxWidth:h}=a,f=$e(a.bodyFont),m=Id(this,"left",a),v=s.x(m),y=d<f.lineHeight?(f.lineHeight-d)/2:0,w=n.y+y;if(a.usePointStyle){const x={radius:Math.min(h,d)/2,pointStyle:l.pointStyle,rotation:l.rotation,borderWidth:1},k=s.leftForLtr(v,h)+h/2,D=w+d/2;t.strokeStyle=a.multiKeyBackground,t.fillStyle=a.multiKeyBackground,lh(t,x,k,D),t.strokeStyle=o.borderColor,t.fillStyle=o.backgroundColor,lh(t,x,k,D)}else{t.lineWidth=Kt(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 x=s.leftForLtr(v,h),k=s.leftForLtr(s.xPlus(v,1),h-2),D=Ha(o.borderRadius);Object.values(D).some(E=>E!==0)?(t.beginPath(),t.fillStyle=a.multiKeyBackground,fl(t,{x,y:w,w:h,h:d,radius:D}),t.fill(),t.stroke(),t.fillStyle=o.backgroundColor,t.beginPath(),fl(t,{x:k,y:w+1,w:h-2,h:d-2,radius:D}),t.fill()):(t.fillStyle=a.multiKeyBackground,t.fillRect(x,w,h,d),t.strokeRect(x,w,h,d),t.fillStyle=o.backgroundColor,t.fillRect(k,w+1,h-2,d-2))}t.fillStyle=this.labelTextColors[i]}drawBody(t,n,i){const{body:s}=this,{bodySpacing:a,bodyAlign:o,displayColors:l,boxHeight:d,boxWidth:h,boxPadding:f}=i,m=$e(i.bodyFont);let v=m.lineHeight,y=0;const w=Fo(i.rtl,this.x,this.width),x=function(L){n.fillText(L,w.x(t.x+y),t.y+v/2),t.y+=v+a},k=w.textAlign(o);let D,E,B,S,A,I,F;for(n.textAlign=o,n.textBaseline="middle",n.font=m.string,t.x=Id(this,k,i),n.fillStyle=i.bodyColor,ue(this.beforeBody,x),y=l&&k!=="right"?o==="center"?h/2+f:h+2+f:0,S=0,I=s.length;S<I;++S){for(D=s[S],E=this.labelTextColors[S],n.fillStyle=E,ue(D.before,x),B=D.lines,l&&B.length&&(this._drawColorBox(n,t,S,w,i),v=Math.max(m.lineHeight,d)),A=0,F=B.length;A<F;++A)x(B[A]),v=m.lineHeight;ue(D.after,x)}y=0,v=m.lineHeight,ue(this.afterBody,x),t.y-=a}drawFooter(t,n,i){const s=this.footer,a=s.length;let o,l;if(a){const d=Fo(i.rtl,this.x,this.width);for(t.x=Id(this,i.footerAlign,i),t.y+=i.footerMarginTop,n.textAlign=d.textAlign(i.footerAlign),n.textBaseline="middle",o=$e(i.footerFont),n.fillStyle=i.footerColor,n.font=o.string,l=0;l<a;++l)n.fillText(s[l],d.x(t.x),t.y+o.lineHeight/2),t.y+=o.lineHeight+i.footerSpacing}}drawBackground(t,n,i,s){const{xAlign:a,yAlign:o}=this,{x:l,y:d}=t,{width:h,height:f}=i,{topLeft:m,topRight:v,bottomLeft:y,bottomRight:w}=Ha(s.cornerRadius);n.fillStyle=s.backgroundColor,n.strokeStyle=s.borderColor,n.lineWidth=s.borderWidth,n.beginPath(),n.moveTo(l+m,d),o==="top"&&this.drawCaret(t,n,i,s),n.lineTo(l+h-v,d),n.quadraticCurveTo(l+h,d,l+h,d+v),o==="center"&&a==="right"&&this.drawCaret(t,n,i,s),n.lineTo(l+h,d+f-w),n.quadraticCurveTo(l+h,d+f,l+h-w,d+f),o==="bottom"&&this.drawCaret(t,n,i,s),n.lineTo(l+y,d+f),n.quadraticCurveTo(l,d+f,l,d+f-y),o==="center"&&a==="left"&&this.drawCaret(t,n,i,s),n.lineTo(l,d+m),n.quadraticCurveTo(l,d,l+m,d),n.closePath(),n.fill(),s.borderWidth>0&&n.stroke()}_updateAnimationTarget(t){const n=this.chart,i=this.$animations,s=i&&i.x,a=i&&i.y;if(s||a){const o=Ol[t.position].call(this,this._active,this._eventPosition);if(!o)return;const l=this._size=O2(this,t),d=Object.assign({},o,this._size),h=M2(n,t,d),f=D2(t,d,h,n);(s._to!==f.x||a._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 i=this.opacity;if(!i)return;this._updateAnimationTarget(n);const s={width:this.width,height:this.height},a={x:this.x,y:this.y};i=Math.abs(i)<.001?0:i;const o=pn(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=i,this.drawBackground(a,t,s,n),ug(t,n.textDirection),a.y+=o.top,this.drawTitle(a,t,n),this.drawBody(a,t,n),this.drawFooter(a,t,n),hg(t,n.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,n){const i=this._active,s=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}}),a=!sd(i,s),o=this._positionChanged(s,n);(a||o)&&(this._active=s,this._eventPosition=n,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(t,n,i=!0){if(n&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const s=this.options,a=this._active||[],o=this._getActiveElements(t,a,n,i),l=this._positionChanged(o,t),d=n||!sd(o,a)||l;return d&&(this._active=o,(s.enabled||s.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,n))),d}_getActiveElements(t,n,i,s){const a=this.options;if(t.type==="mouseout")return[];if(!s)return n;const o=this.chart.getElementsAtEventForMode(t,a.mode,a,i);return a.reverse&&o.reverse(),o}_positionChanged(t,n){const{caretX:i,caretY:s,options:a}=this,o=Ol[a.position].call(this,t,n);return o!==!1&&(i!==o.x||s!==o.y)}}nt(Ah,"positioners",Ol);var Ak={id:"tooltip",_element:Ah,positioners:Ol,afterInit(e,t,n){n&&(e.tooltip=new Ah({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:I2},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"]},Vk=Object.freeze({__proto__:null,Colors:US,Decimation:XS,Filler:mk,Legend:wk,SubTitle:kk,Title:Sk,Tooltip:Ak});const Bk=(e,t,n,i)=>(typeof t=="string"?(n=e.push(t)-1,i.unshift({index:n,label:t})):isNaN(t)&&(n=null),n);function Pk(e,t,n,i){const s=e.indexOf(t);if(s===-1)return Bk(e,t,n,i);const a=e.lastIndexOf(t);return s!==a?n:s}const Nk=(e,t)=>e===null?null:an(Math.round(e),0,t);function A2(e){const t=this.getLabels();return e>=0&&e<t.length?t[e]:e}class Vh extends Ka{constructor(t){super(t),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(t){const n=this._addedLabels;if(n.length){const i=this.getLabels();for(const{index:s,label:a}of n)i[s]===a&&i.splice(s,1);this._addedLabels=[]}super.init(t)}parse(t,n){if(ee(t))return null;const i=this.getLabels();return n=isFinite(n)&&i[n]===t?n:Pk(i,t,Vt(n,t),this._addedLabels),Nk(n,i.length-1)}determineDataLimits(){const{minDefined:t,maxDefined:n}=this.getUserBounds();let{min:i,max:s}=this.getMinMax(!0);this.options.bounds==="ticks"&&(t||(i=0),n||(s=this.getLabels().length-1)),this.min=i,this.max=s}buildTicks(){const t=this.min,n=this.max,i=this.options.offset,s=[];let a=this.getLabels();a=t===0&&n===a.length-1?a:a.slice(t,n+1),this._valueRange=Math.max(a.length-(i?0:1),1),this._startValue=this.min-(i?.5:0);for(let o=t;o<=n;o++)s.push({value:o});return s}getLabelForValue(t){return A2.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}}nt(Vh,"id","category"),nt(Vh,"defaults",{ticks:{callback:A2}});function zk(e,t){const n=[],{bounds:s,step:a,min:o,max:l,precision:d,count:h,maxTicks:f,maxDigits:m,includeBounds:v}=e,y=a||1,w=f-1,{min:x,max:k}=t,D=!ee(o),E=!ee(l),B=!ee(h),S=(k-x)/(m+1);let A=Pm((k-x)/w/y)*y,I,F,L,W;if(A<1e-14&&!D&&!E)return[{value:x},{value:k}];W=Math.ceil(k/A)-Math.floor(x/A),W>w&&(A=Pm(W*A/w/y)*y),ee(d)||(I=Math.pow(10,d),A=Math.ceil(A*I)/I),s==="ticks"?(F=Math.floor(x/A)*A,L=Math.ceil(k/A)*A):(F=x,L=k),D&&E&&a&&Iw((l-o)/a,A/1e3)?(W=Math.round(Math.min((l-o)/A,f)),A=(l-o)/W,F=o,L=l):B?(F=D?o:F,L=E?l:L,W=h-1,A=(L-F)/W):(W=(L-F)/A,ll(W,Math.round(W),A/1e3)?W=Math.round(W):W=Math.ceil(W));const X=Math.max(zm(A),zm(F));I=Math.pow(10,ee(d)?X:d),F=Math.round(F*I)/I,L=Math.round(L*I)/I;let Z=0;for(D&&(v&&F!==o?(n.push({value:o}),F<o&&Z++,ll(Math.round((F+Z*A)*I)/I,o,V2(o,S,e))&&Z++):F<o&&Z++);Z<W;++Z){const Q=Math.round((F+Z*A)*I)/I;if(E&&Q>l)break;n.push({value:Q})}return E&&v&&L!==l?n.length&&ll(n[n.length-1].value,l,V2(l,S,e))?n[n.length-1].value=l:n.push({value:l}):(!E||L===l)&&n.push({value:L}),n}function V2(e,t,{horizontal:n,minRotation:i}){const s=Li(i),a=(n?Math.sin(s):Math.cos(s))||.001,o=.75*t*(""+e).length;return Math.min(t/a,o)}class Ad extends Ka{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 ee(t)||(typeof t=="number"||t instanceof Number)&&!isFinite(+t)?null:+t}handleTickRangeOptions(){const{beginAtZero:t}=this.options,{minDefined:n,maxDefined:i}=this.getUserBounds();let{min:s,max:a}=this;const o=d=>s=n?s:d,l=d=>a=i?a:d;if(t){const d=os(s),h=os(a);d<0&&h<0?l(0):d>0&&h>0&&o(0)}if(s===a){let d=a===0?1:Math.abs(a*.05);l(a+d),t||o(s-d)}this.min=s,this.max=a}getTickLimit(){const t=this.options.ticks;let{maxTicksLimit:n,stepSize:i}=t,s;return i?(s=Math.ceil(this.max/i)-Math.floor(this.min/i)+1,s>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${i} would result generating up to ${s} ticks. Limiting to 1000.`),s=1e3)):(s=this.computeTickLimit(),n=n||11),n&&(s=Math.min(n,s)),s}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const t=this.options,n=t.ticks;let i=this.getTickLimit();i=Math.max(2,i);const s={maxTicks:i,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},a=this._range||this,o=zk(s,a);return t.bounds==="ticks"&&Nm(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,i=this.max;if(super.configure(),this.options.offset&&t.length){const s=(i-n)/Math.max(t.length-1,1)/2;n-=s,i+=s}this._startValue=n,this._endValue=i,this._valueRange=i-n}getLabelForValue(t){return ul(t,this.chart.options.locale,this.options.ticks.format)}}class Bh extends Ad{determineDataLimits(){const{min:t,max:n}=this.getMinMax(!0);this.min=Pe(t)?t:0,this.max=Pe(n)?n:1,this.handleTickRangeOptions()}computeTickLimit(){const t=this.isHorizontal(),n=t?this.width:this.height,i=Li(this.options.ticks.minRotation),s=(t?Math.sin(i):Math.cos(i))||.001,a=this._resolveTickFontOptions(0);return Math.ceil(n/Math.min(40,a.lineHeight/s))}getPixelForValue(t){return t===null?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getValueForPixel(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange}}nt(Bh,"id","linear"),nt(Bh,"defaults",{ticks:{callback:ld.formatters.numeric}});const Ml=e=>Math.floor(na(e)),Za=(e,t)=>Math.pow(10,Ml(e)+t);function B2(e){return e/Math.pow(10,Ml(e))===1}function P2(e,t,n){const i=Math.pow(10,n),s=Math.floor(e/i);return Math.ceil(t/i)-s}function Lk(e,t){const n=t-e;let i=Ml(n);for(;P2(e,t,i)>10;)i++;for(;P2(e,t,i)<10;)i--;return Math.min(i,Ml(e))}function Fk(e,{min:t,max:n}){t=Gn(e.min,t);const i=[],s=Ml(t);let a=Lk(t,n),o=a<0?Math.pow(10,Math.abs(a)):1;const l=Math.pow(10,a),d=s>a?Math.pow(10,s):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,a)),v=Gn(e.min,Math.round((d+f+m*Math.pow(10,a))*o)/o);for(;v<n;)i.push({value:v,major:B2(v),significand:m}),m>=10?m=m<15?15:20:m++,m>=20&&(a++,m=2,o=a>=0?1:o),v=Math.round((d+f+m*Math.pow(10,a))*o)/o;const y=Gn(e.max,v);return i.push({value:y,major:B2(y),significand:m}),i}class Ph extends Ka{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(t,n){const i=Ad.prototype.parse.apply(this,[t,n]);if(i===0){this._zero=!0;return}return Pe(i)&&i>0?i:null}determineDataLimits(){const{min:t,max:n}=this.getMinMax(!0);this.min=Pe(t)?Math.max(0,t):null,this.max=Pe(n)?Math.max(0,n):null,this.options.beginAtZero&&(this._zero=!0),this._zero&&this.min!==this._suggestedMin&&!Pe(this._userMin)&&(this.min=t===Za(this.min,0)?Za(this.min,-1):Za(this.min,0)),this.handleTickRangeOptions()}handleTickRangeOptions(){const{minDefined:t,maxDefined:n}=this.getUserBounds();let i=this.min,s=this.max;const a=l=>i=t?i:l,o=l=>s=n?s:l;i===s&&(i<=0?(a(1),o(10)):(a(Za(i,-1)),o(Za(s,1)))),i<=0&&a(Za(s,-1)),s<=0&&o(Za(i,1)),this.min=i,this.max=s}buildTicks(){const t=this.options,n={min:this._userMin,max:this._userMax},i=Fk(n,this);return t.bounds==="ticks"&&Nm(i,this,"value"),t.reverse?(i.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),i}getLabelForValue(t){return t===void 0?"0":ul(t,this.chart.options.locale,this.options.ticks.format)}configure(){const t=this.min;super.configure(),this._startValue=na(t),this._valueRange=na(this.max)-na(t)}getPixelForValue(t){return(t===void 0||t===0)&&(t=this.min),t===null||isNaN(t)?NaN:this.getPixelForDecimal(t===this.min?0:(na(t)-this._startValue)/this._valueRange)}getValueForPixel(t){const n=this.getDecimalForPixel(t);return Math.pow(10,this._startValue+n*this._valueRange)}}nt(Ph,"id","logarithmic"),nt(Ph,"defaults",{ticks:{callback:ld.formatters.logarithmic,major:{enabled:!0}}});function Nh(e){const t=e.ticks;if(t.display&&e.display){const n=pn(t.backdropPadding);return Vt(t.font&&t.font.size,ze.font.size)+n.height}return 0}function Rk(e,t,n){return n=Se(n)?n:[n],{w:Zw(e,t.string,n),h:n.length*t.lineHeight}}function N2(e,t,n,i,s){return e===i||e===s?{start:t-n/2,end:t+n/2}:e<i||e>s?{start:t-n,end:t}:{start:t,end:t+n}}function Hk(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),i=[],s=[],a=e._pointLabels.length,o=e.options.pointLabels,l=o.centerPointLabels?De/a:0;for(let d=0;d<a;d++){const h=o.setContext(e.getPointLabelContext(d));s[d]=h.padding;const f=e.getPointPosition(d,e.drawingArea+s[d],l),m=$e(h.font),v=Rk(e.ctx,m,e._pointLabels[d]);i[d]=v;const y=Kn(e.getIndexAngle(d)+l),w=Math.round(th(y)),x=N2(w,f.x,v.w,0,180),k=N2(w,f.y,v.h,90,270);Wk(n,t,y,x,k)}e.setCenterPoint(t.l-n.l,n.r-t.r,t.t-n.t,n.b-t.b),e._pointLabelItems=Uk(e,i,s)}function Wk(e,t,n,i,s){const a=Math.abs(Math.sin(n)),o=Math.abs(Math.cos(n));let l=0,d=0;i.start<t.l?(l=(t.l-i.start)/a,e.l=Math.min(e.l,t.l-l)):i.end>t.r&&(l=(i.end-t.r)/a,e.r=Math.max(e.r,t.r+l)),s.start<t.t?(d=(t.t-s.start)/o,e.t=Math.min(e.t,t.t-d)):s.end>t.b&&(d=(s.end-t.b)/o,e.b=Math.max(e.b,t.b+d))}function Yk(e,t,n){const i=e.drawingArea,{extra:s,additionalAngle:a,padding:o,size:l}=n,d=e.getPointPosition(t,i+s+o,a),h=Math.round(th(Kn(d.angle+Ne))),f=Zk(d.y,l.h,h),m=Gk(h),v=Kk(d.x,l.w,m);return{visible:!0,x:d.x,y:f,textAlign:m,left:v,top:f,right:v+l.w,bottom:f+l.h}}function jk(e,t){if(!t)return!0;const{left:n,top:i,right:s,bottom:a}=e;return!(ks({x:n,y:i},t)||ks({x:n,y:a},t)||ks({x:s,y:i},t)||ks({x:s,y:a},t))}function Uk(e,t,n){const i=[],s=e._pointLabels.length,a=e.options,{centerPointLabels:o,display:l}=a.pointLabels,d={extra:Nh(a)/2,additionalAngle:o?De/s:0};let h;for(let f=0;f<s;f++){d.padding=n[f],d.size=t[f];const m=Yk(e,f,d);i.push(m),l==="auto"&&(m.visible=jk(m,h),m.visible&&(h=m))}return i}function Gk(e){return e===0||e===180?"center":e<180?"left":"right"}function Kk(e,t,n){return n==="right"?e-=t:n==="center"&&(e-=t/2),e}function Zk(e,t,n){return n===90||n===270?e-=t/2:(n>270||n<90)&&(e-=t),e}function Xk(e,t,n){const{left:i,top:s,right:a,bottom:o}=n,{backdropColor:l}=t;if(!ee(l)){const d=Ha(t.borderRadius),h=pn(t.backdropPadding);e.fillStyle=l;const f=i-h.left,m=s-h.top,v=a-i+h.width,y=o-s+h.height;Object.values(d).some(w=>w!==0)?(e.beginPath(),fl(e,{x:f,y:m,w:v,h:y,radius:d}),e.fill()):e.fillRect(f,m,v,y)}}function Jk(e,t){const{ctx:n,options:{pointLabels:i}}=e;for(let s=t-1;s>=0;s--){const a=e._pointLabelItems[s];if(!a.visible)continue;const o=i.setContext(e.getPointLabelContext(s));Xk(n,o,a);const l=$e(o.font),{x:d,y:h,textAlign:f}=a;Ra(n,e._pointLabels[s],d,h+l.lineHeight/2,l,{color:o.color,textAlign:f,textBaseline:"middle"})}}function z2(e,t,n,i){const{ctx:s}=e;if(n)s.arc(e.xCenter,e.yCenter,t,0,ke);else{let a=e.getPointPosition(0,t);s.moveTo(a.x,a.y);for(let o=1;o<i;o++)a=e.getPointPosition(o,t),s.lineTo(a.x,a.y)}}function Qk(e,t,n,i,s){const a=e.ctx,o=t.circular,{color:l,lineWidth:d}=t;!o&&!i||!l||!d||n<0||(a.save(),a.strokeStyle=l,a.lineWidth=d,a.setLineDash(s.dash),a.lineDashOffset=s.dashOffset,a.beginPath(),z2(e,n,o,i),a.closePath(),a.stroke(),a.restore())}function qk(e,t,n){return ia(e,{label:n,index:t,type:"pointLabel"})}class Dl extends Ad{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=pn(Nh(this.options)/2),n=this.width=this.maxWidth-t.width,i=this.height=this.maxHeight-t.height;this.xCenter=Math.floor(this.left+n/2+t.left),this.yCenter=Math.floor(this.top+i/2+t.top),this.drawingArea=Math.floor(Math.min(n,i)/2)}determineDataLimits(){const{min:t,max:n}=this.getMinMax(!1);this.min=Pe(t)&&!isNaN(t)?t:0,this.max=Pe(n)&&!isNaN(n)?n:0,this.handleTickRangeOptions()}computeTickLimit(){return Math.ceil(this.drawingArea/Nh(this.options))}generateTickLabels(t){Ad.prototype.generateTickLabels.call(this,t),this._pointLabels=this.getLabels().map((n,i)=>{const s=we(this.options.pointLabels.callback,[n,i],this);return s||s===0?s:""}).filter((n,i)=>this.chart.getDataVisibility(i))}fit(){const t=this.options;t.display&&t.pointLabels.display?Hk(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(t,n,i,s){this.xCenter+=Math.floor((t-n)/2),this.yCenter+=Math.floor((i-s)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(t,n,i,s))}getIndexAngle(t){const n=ke/(this._pointLabels.length||1),i=this.options.startAngle||0;return Kn(t*n+Li(i))}getDistanceFromCenterForValue(t){if(ee(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(ee(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 i=n[t];return qk(this.getContext(),t,i)}}getPointPosition(t,n,i=0){const s=this.getIndexAngle(t)-Ne+i;return{x:Math.cos(s)*n+this.xCenter,y:Math.sin(s)*n+this.yCenter,angle:s}}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:i,right:s,bottom:a}=this._pointLabelItems[t];return{left:n,top:i,right:s,bottom:a}}drawBackground(){const{backgroundColor:t,grid:{circular:n}}=this.options;if(t){const i=this.ctx;i.save(),i.beginPath(),z2(this,this.getDistanceFromCenterForValue(this._endValue),n,this._pointLabels.length),i.closePath(),i.fillStyle=t,i.fill(),i.restore()}}drawGrid(){const t=this.ctx,n=this.options,{angleLines:i,grid:s,border:a}=n,o=this._pointLabels.length;let l,d,h;if(n.pointLabels.display&&Jk(this,o),s.display&&this.ticks.forEach((f,m)=>{if(m!==0){d=this.getDistanceFromCenterForValue(f.value);const v=this.getContext(m),y=s.setContext(v),w=a.setContext(v);Qk(this,y,d,o,w)}}),i.display){for(t.save(),l=o-1;l>=0;l--){const f=i.setContext(this.getPointLabelContext(l)),{color:m,lineWidth:v}=f;!v||!m||(t.lineWidth=v,t.strokeStyle=m,t.setLineDash(f.borderDash),t.lineDashOffset=f.borderDashOffset,d=this.getDistanceFromCenterForValue(n.ticks.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,i=n.ticks;if(!i.display)return;const s=this.getIndexAngle(0);let a,o;t.save(),t.translate(this.xCenter,this.yCenter),t.rotate(s),t.textAlign="center",t.textBaseline="middle",this.ticks.forEach((l,d)=>{if(d===0&&!n.reverse)return;const h=i.setContext(this.getContext(d)),f=$e(h.font);if(a=this.getDistanceFromCenterForValue(this.ticks[d].value),h.showLabelBackdrop){t.font=f.string,o=t.measureText(l.label).width,t.fillStyle=h.backdropColor;const m=pn(h.backdropPadding);t.fillRect(-o/2-m.left,-a-f.size/2-m.top,o+m.width,f.size+m.height)}Ra(t,l.label,0,-a,f,{color:h.color})}),t.restore()}drawTitle(){}}nt(Dl,"id","radialLinear"),nt(Dl,"defaults",{display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:ld.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback(t){return t},padding:5,centerPointLabels:!1}}),nt(Dl,"defaultRoutes",{"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"}),nt(Dl,"descriptors",{angleLines:{_fallback:"grid"}});const Vd={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}},Pn=Object.keys(Vd);function $k(e,t){return e-t}function L2(e,t){if(ee(t))return null;const n=e._adapter,{parser:i,round:s,isoWeekday:a}=e._parseOpts;let o=t;return typeof i=="function"&&(o=i(o)),Pe(o)||(o=typeof i=="string"?n.parse(o,i):n.parse(o)),o===null?null:(s&&(o=s==="week"&&(No(a)||a===!0)?n.startOf(o,"isoWeek",a):n.startOf(o,s)),+o)}function F2(e,t,n,i){const s=Pn.length;for(let a=Pn.indexOf(e);a<s-1;++a){const o=Vd[Pn[a]],l=o.steps?o.steps:Number.MAX_SAFE_INTEGER;if(o.common&&Math.ceil((n-t)/(l*o.size))<=i)return Pn[a]}return Pn[s-1]}function tC(e,t,n,i,s){for(let a=Pn.length-1;a>=Pn.indexOf(n);a--){const o=Pn[a];if(Vd[o].common&&e._adapter.diff(s,i,o)>=t-1)return o}return Pn[n?Pn.indexOf(n):0]}function eC(e){for(let t=Pn.indexOf(e)+1,n=Pn.length;t<n;++t)if(Vd[Pn[t]].common)return Pn[t]}function R2(e,t,n){if(!n)e[t]=!0;else if(n.length){const{lo:i,hi:s}=nh(n,t),a=n[i]>=t?n[i]:n[s];e[a]=!0}}function nC(e,t,n,i){const s=e._adapter,a=+s.startOf(t[0].value,i),o=t[t.length-1].value;let l,d;for(l=a;l<=o;l=+s.add(l,1,i))d=n[l],d>=0&&(t[d].major=!0);return t}function H2(e,t,n){const i=[],s={},a=t.length;let o,l;for(o=0;o<a;++o)l=t[o],s[l]=o,i.push({value:l,major:!1});return a===0||!n?i:nC(e,i,s,n)}class El extends Ka{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 i=t.time||(t.time={}),s=this._adapter=new dx._date(t.adapters.date);s.init(n),ol(i.displayFormats,s.formats()),this._parseOpts={parser:i.parser,round:i.round,isoWeekday:i.isoWeekday},super.init(t),this._normalized=n.normalized}parse(t,n){return t===void 0?null:L2(this,t)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const t=this.options,n=this._adapter,i=t.time.unit||"day";let{min:s,max:a,minDefined:o,maxDefined:l}=this.getUserBounds();function d(h){!o&&!isNaN(h.min)&&(s=Math.min(s,h.min)),!l&&!isNaN(h.max)&&(a=Math.max(a,h.max))}(!o||!l)&&(d(this._getLabelBounds()),(t.bounds!=="ticks"||t.ticks.source!=="labels")&&d(this.getMinMax(!1))),s=Pe(s)&&!isNaN(s)?s:+n.startOf(Date.now(),i),a=Pe(a)&&!isNaN(a)?a:+n.endOf(Date.now(),i)+1,this.min=Math.min(s,a-1),this.max=Math.max(s+1,a)}_getLabelBounds(){const t=this.getLabelTimestamps();let n=Number.POSITIVE_INFINITY,i=Number.NEGATIVE_INFINITY;return t.length&&(n=t[0],i=t[t.length-1]),{min:n,max:i}}buildTicks(){const t=this.options,n=t.time,i=t.ticks,s=i.source==="labels"?this.getLabelTimestamps():this._generate();t.bounds==="ticks"&&s.length&&(this.min=this._userMin||s[0],this.max=this._userMax||s[s.length-1]);const a=this.min,o=this.max,l=Pw(s,a,o);return this._unit=n.unit||(i.autoSkip?F2(n.minUnit,this.min,this.max,this._getLabelCapacity(a)):tC(this,l.length,n.minUnit,this.min,this.max)),this._majorUnit=!i.major.enabled||this._unit==="year"?void 0:eC(this._unit),this.initOffsets(s),t.reverse&&l.reverse(),H2(this,l,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map(t=>+t.value))}initOffsets(t=[]){let n=0,i=0,s,a;this.options.offset&&t.length&&(s=this.getDecimalForValue(t[0]),t.length===1?n=1-s:n=(this.getDecimalForValue(t[1])-s)/2,a=this.getDecimalForValue(t[t.length-1]),t.length===1?i=a:i=(a-this.getDecimalForValue(t[t.length-2]))/2);const o=t.length<3?.5:.25;n=an(n,0,o),i=an(i,0,o),this._offsets={start:n,end:i,factor:1/(n+1+i)}}_generate(){const t=this._adapter,n=this.min,i=this.max,s=this.options,a=s.time,o=a.unit||F2(a.minUnit,n,i,this._getLabelCapacity(n)),l=Vt(s.ticks.stepSize,1),d=o==="week"?a.isoWeekday:!1,h=No(d)||d===!0,f={};let m=n,v,y;if(h&&(m=+t.startOf(m,"isoWeek",d)),m=+t.startOf(m,h?"day":o),t.diff(i,n,o)>1e5*l)throw new Error(n+" and "+i+" are too far apart with stepSize of "+l+" "+o);const w=s.ticks.source==="data"&&this.getDataTimestamps();for(v=m,y=0;v<i;v=+t.add(v,l,o),y++)R2(f,v,w);return(v===i||s.bounds==="ticks"||y===1)&&R2(f,v,w),Object.keys(f).sort((x,k)=>x-k).map(x=>+x)}getLabelForValue(t){const n=this._adapter,i=this.options.time;return i.tooltipFormat?n.format(t,i.tooltipFormat):n.format(t,i.displayFormats.datetime)}format(t,n){const s=this.options.time.displayFormats,a=this._unit,o=n||s[a];return this._adapter.format(t,o)}_tickFormatFunction(t,n,i,s){const a=this.options,o=a.ticks.callback;if(o)return we(o,[t,n,i],this);const l=a.time.displayFormats,d=this._unit,h=this._majorUnit,f=d&&l[d],m=h&&l[h],v=i[n],y=h&&m&&v&&v.major;return this._adapter.format(t,s||(y?m:f))}generateTickLabels(t){let n,i,s;for(n=0,i=t.length;n<i;++n)s=t[n],s.label=this._tickFormatFunction(s.value,n,t)}getDecimalForValue(t){return t===null?NaN:(t-this.min)/(this.max-this.min)}getPixelForValue(t){const n=this._offsets,i=this.getDecimalForValue(t);return this.getPixelForDecimal((n.start+i)*n.factor)}getValueForPixel(t){const n=this._offsets,i=this.getDecimalForPixel(t)/n.factor-n.end;return this.min+i*(this.max-this.min)}_getLabelSize(t){const n=this.options.ticks,i=this.ctx.measureText(t).width,s=Li(this.isHorizontal()?n.maxRotation:n.minRotation),a=Math.cos(s),o=Math.sin(s),l=this._resolveTickFontOptions(0).size;return{w:i*a+l*o,h:i*o+l*a}}_getLabelCapacity(t){const n=this.options.time,i=n.displayFormats,s=i[n.unit]||i.millisecond,a=this._tickFormatFunction(t,0,H2(this,[t],this._majorUnit),s),o=this._getLabelSize(a),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,i;if(t.length)return t;const s=this.getMatchingVisibleMetas();if(this._normalized&&s.length)return this._cache.data=s[0].controller.getAllParsedValues(this);for(n=0,i=s.length;n<i;++n)t=t.concat(s[n].controller.getAllParsedValues(this));return this._cache.data=this.normalize(t)}getLabelTimestamps(){const t=this._cache.labels||[];let n,i;if(t.length)return t;const s=this.getLabels();for(n=0,i=s.length;n<i;++n)t.push(L2(this,s[n]));return this._cache.labels=this._normalized?t:this.normalize(t)}normalize(t){return Hm(t.sort($k))}}nt(El,"id","time"),nt(El,"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 Bd(e,t,n){let i=0,s=e.length-1,a,o,l,d;n?(t>=e[i].pos&&t<=e[s].pos&&({lo:i,hi:s}=Ss(e,"pos",t)),{pos:a,time:l}=e[i],{pos:o,time:d}=e[s]):(t>=e[i].time&&t<=e[s].time&&({lo:i,hi:s}=Ss(e,"time",t)),{time:a,pos:l}=e[i],{time:o,pos:d}=e[s]);const h=o-a;return h?l+(d-l)*(t-a)/h:l}class zh extends El{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=Bd(n,this.min),this._tableRange=Bd(n,this.max)-this._minPos,super.initOffsets(t)}buildLookupTable(t){const{min:n,max:i}=this,s=[],a=[];let o,l,d,h,f;for(o=0,l=t.length;o<l;++o)h=t[o],h>=n&&h<=i&&s.push(h);if(s.length<2)return[{time:n,pos:0},{time:i,pos:1}];for(o=0,l=s.length;o<l;++o)f=s[o+1],d=s[o-1],h=s[o],Math.round((f+d)/2)!==h&&a.push({time:h,pos:o/(l-1)});return a}_getTimestampsForTable(){let t=this._cache.all||[];if(t.length)return t;const n=this.getDataTimestamps(),i=this.getLabelTimestamps();return n.length&&i.length?t=this.normalize(n.concat(i)):t=n.length?n:i,t=this._cache.all=t,t}getDecimalForValue(t){return(Bd(this._table,t)-this._minPos)/this._tableRange}getValueForPixel(t){const n=this._offsets,i=this.getDecimalForPixel(t)/n.factor-n.end;return Bd(this._table,i*this._tableRange+this._minPos,!0)}}nt(zh,"id","timeseries"),nt(zh,"defaults",El.defaults);var iC=Object.freeze({__proto__:null,CategoryScale:Vh,LinearScale:Bh,LogarithmicScale:Ph,RadialLinearScale:Dl,TimeScale:El,TimeSeriesScale:zh});const W2=[cx,FS,Vk,iC],Y2={data:{type:Object,required:!0},options:{type:Object,default:()=>({})},plugins:{type:Array,default:()=>[]},datasetIdKey:{type:String,default:"label"},updateMode:{type:String,default:void 0}},sC={type:{type:String,required:!0},...Y2},aC=c.version[0]==="2"?(e,t)=>Object.assign(e,{attrs:t}):(e,t)=>Object.assign(e,t);function Ho(e){return c.isProxy(e)?c.toRaw(e):e}function oC(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:e;return c.isProxy(t)?new Proxy(e,{}):e}function rC(e,t){const n=e.options;n&&t&&Object.assign(n,t)}function j2(e,t){e.labels=t}function U2(e,t,n){const i=[];e.datasets=t.map(s=>{const a=e.datasets.find(o=>o[n]===s[n]);return!a||!s.data||i.includes(a)?{...s}:(i.push(a),Object.assign(a,s),a)})}function lC(e,t){const n={labels:[],datasets:[]};return j2(n,e.labels),U2(n,e.datasets,t),n}const cC=c.defineComponent({props:sC,setup(e,t){let{expose:n}=t;const i=c.ref(null),s=c.shallowRef(null);n({chart:s});const a=()=>{if(!i.value)return;const{type:d,data:h,options:f,plugins:m,datasetIdKey:v}=e,y=lC(h,v),w=oC(y,h);s.value=new Hi(i.value,{type:d,data:w,options:{...f},plugins:m})},o=()=>{const d=c.toRaw(s.value);d&&(d.destroy(),s.value=null)},l=d=>{d.update(e.updateMode)};return c.onMounted(a),c.onBeforeUnmount(o),c.watch([()=>e.options,()=>e.data],(d,h)=>{let[f,m]=d,[v,y]=h;const w=c.toRaw(s.value);if(!w)return;let x=!1;if(f){const k=Ho(f),D=Ho(v);k&&k!==D&&(rC(w,k),x=!0)}if(m){const k=Ho(m.labels),D=Ho(y.labels),E=Ho(m.datasets),B=Ho(y.datasets);k!==D&&(j2(w.config.data,k),x=!0),E&&E!==B&&(U2(w.config.data,E,e.datasetIdKey),x=!0)}x&&l(w)},{deep:!0}),()=>c.h("canvas",{ref:i})}});function dC(e,t){return Hi.register(t),c.defineComponent({props:Y2,setup(n,i){let{expose:s}=i;const a=c.shallowRef(null),o=l=>{a.value=l==null?void 0:l.chart};return s({chart:a}),()=>c.h(cC,aC({ref:o},{type:e,...n}))}})}const G2=dC("bar",gl),Tl={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"]'},Lh=e=>{let t=[],n={};const i=/(\[[^[\]]*\])/g,s=e.match(i);for(let a=0;a<s.length;a++){s[a]=s[a].replace("[",""),s[a]=s[a].replace("]","");let o=s[a].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},$ut="";Hi.register(...W2);const uC={components:{Bar:G2},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:()=>[]},barWidth:{type:Number,default:1}},data(){return{sassColorVariables:Tl,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}},methods:{paleteBuilder:Lh,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(i=>{i.datasets.forEach(s=>{const a={label:s.label,data:s.data,name:s.name,borderRadius:6};t.datasets.push(a)})}),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(i=>{const s=i.name;let a;e.length===1&&(a=2,n[s]=t[a],this.chartOptions.plugins.legend.display=!1),n[s]||(a=Object.keys(n).length%t.length,n[s]=t[a]),i.backgroundColor=n[s],i.borderRadius=6})}}},hC={class:"responsive-container"};function fC(e,t,n,i,s,a){const o=c.resolveComponent("Bar");return c.openBlock(),c.createElementBlock("span",null,[c.createElementVNode("div",hC,[c.createVNode(o,{is:"bar",data:s.localChartData,options:s.chartOptions},null,8,["data","options"])])])}const pC=rt(uC,[["render",fC],["__scopeId","data-v-1e55dea1"]]),t1t="";Hi.register(...W2);const mC={components:{Bar:G2},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:()=>[]},barWidth:{type:Number,default:1}},data(){return{sassColorVariables:Tl,localChartData:{},localLabels:[],palletColors:[],deleteFirstTwoColors:!1,chartOptions:{scales:{x:{stacked:!0},y:{stacked:!0}},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}},methods:{paleteBuilder:Lh,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(i=>{i.datasets.forEach(s=>{const a={label:s.label,data:s.data,name:s.name,borderRadius:6};t.datasets.push(a)})}),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(i=>{const s=i.name;let a;e.length===1&&(a=2,n[s]=t[a],this.chartOptions.plugins.legend.display=!1),n[s]||(a=Object.keys(n).length%t.length,n[s]=t[a]),i.backgroundColor=n[s],i.borderRadius=6})}}},gC={class:"responsive-container"};function vC(e,t,n,i,s,a){const o=c.resolveComponent("Bar");return c.openBlock(),c.createElementBlock("span",null,[c.createElementVNode("div",gC,[c.createVNode(o,{is:"bar",data:s.localChartData,options:s.chartOptions},null,8,["data","options"])])])}const _C=rt(mC,[["render",vC],["__scopeId","data-v-ed4bef4e"]]),e1t="",Fh={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}}},K2=()=>{c.useCssVars(e=>({"6d4c0f4d":e.marginBottomResolver,d6616fae:e.marginLeftResolver,"0baf3274":e.marginRightResolver,"7c666dff":e.marginTopResolver,"561264d4":e.paddingBottomResolver,17295920:e.paddingLeftResolver,e3e47742:e.paddingRightResolver,"9def4450":e.paddingTopResolver}))},Z2=Fh.setup;Fh.setup=Z2?(e,t)=>(K2(),Z2(e,t)):K2;const yC=Fh,bC={class:"spacer"};function wC(e,t,n,i,s,a){return c.openBlock(),c.createElementBlock("div",bC,[c.renderSlot(e.$slots,"default",{},void 0,!0)])}const Pd=rt(yC,[["render",wC],["__scopeId","data-v-5aebf225"]]);function Rh(e,t=24){let n=e/8,i=n%4;return`${n>t?t:n-i+4}px`}const n1t="",Hh={components:{CdsSpacer:Pd,CdsClickable:Qs},props:{elevated:{type:Boolean,default:!1},fluid:{type:Boolean,default:!1},padding:{type:[Number,String],default:4,validator:e=>e<=12},clickable:{type:Boolean,default:!1},variant:{type:String,default:"gray"}},data(){return{width:0}},computed:{widthResolver(){return this.fluid?"100%":"fit-content"},borderRadiusResolver(){return this.rounder(this.width,12)}},mounted(){this.width=this.$refs["cds-box"].getBoundingClientRect().width},methods:{rounder:Rh,handleClick(){this.clickable&&this.$emit("boxClick",!0)}}},X2=()=>{c.useCssVars(e=>({"8bf1f4e6":e.widthResolver,"337f1943":e.borderRadiusResolver}))},J2=Hh.setup;Hh.setup=J2?(e,t)=>(X2(),J2(e,t)):X2;const xC=Hh;function SC(e,t,n,i,s,a){const o=c.resolveComponent("cds-spacer"),l=c.resolveComponent("cds-clickable");return c.openBlock(),c.createElementBlock("div",{ref:"cds-box",class:c.normalizeClass(n.elevated?"box--elevated":`box--${n.variant}`)},[c.createVNode(l,{class:"box__container",clickable:n.clickable,onClick:a.handleClick},{default:c.withCtx(()=>[c.createVNode(o,{"padding-top":n.padding,"padding-right":n.padding,"padding-bottom":n.padding,"padding-left":n.padding},{default:c.withCtx(()=>[c.renderSlot(e.$slots,"default",{},void 0,!0)]),_:3},8,["padding-top","padding-right","padding-bottom","padding-left"])]),_:3},8,["clickable","onClick"])],2)}const Il=rt(xC,[["render",SC],["__scopeId","data-v-34f9c778"]]);var Wh={exports:{}};(function(e,t){var n=9007199254740991,i="[object Arguments]",s="[object Function]",a="[object GeneratorFunction]",o="[object Map]",l="[object Object]",d="[object Promise]",h="[object Set]",f="[object WeakMap]",m="[object DataView]",v=/[\\^$.*+?()[\]{}|]/g,y=/^\[object .+?Constructor\]$/,w=typeof qe=="object"&&qe&&qe.Object===Object&&qe,x=typeof self=="object"&&self&&self.Object===Object&&self,k=w||x||Function("return this")(),D=t&&!t.nodeType&&t,E=D&&!0&&e&&!e.nodeType&&e,B=E&&E.exports===D;function S(tt,Ht){return tt==null?void 0:tt[Ht]}function A(tt){var Ht=!1;if(tt!=null&&typeof tt.toString!="function")try{Ht=!!(tt+"")}catch{}return Ht}function I(tt,Ht){return function(oe){return tt(Ht(oe))}}var F=Function.prototype,L=Object.prototype,W=k["__core-js_shared__"],X=function(){var tt=/[^.]+$/.exec(W&&W.keys&&W.keys.IE_PROTO||"");return tt?"Symbol(src)_1."+tt:""}(),Z=F.toString,Q=L.hasOwnProperty,et=L.toString,gt=RegExp("^"+Z.call(Q).replace(v,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),at=B?k.Buffer:void 0,ft=L.propertyIsEnumerable,lt=at?at.isBuffer:void 0,vt=I(Object.keys,Object),xt=Nt(k,"DataView"),ct=Nt(k,"Map"),R=Nt(k,"Promise"),q=Nt(k,"Set"),ot=Nt(k,"WeakMap"),pt=!ft.call({valueOf:1},"valueOf"),$=$t(xt),_t=$t(ct),Mt=$t(R),ut=$t(q),Bt=$t(ot);function Lt(tt){return et.call(tt)}function Pt(tt){if(!Xe(tt)||le(tt))return!1;var Ht=Ke(tt)||A(tt)?gt:y;return Ht.test($t(tt))}function Nt(tt,Ht){var oe=S(tt,Ht);return Pt(oe)?oe:void 0}var Yt=Lt;(xt&&Yt(new xt(new ArrayBuffer(1)))!=m||ct&&Yt(new ct)!=o||R&&Yt(R.resolve())!=d||q&&Yt(new q)!=h||ot&&Yt(new ot)!=f)&&(Yt=function(tt){var Ht=et.call(tt),oe=Ht==l?tt.constructor:void 0,$n=oe?$t(oe):void 0;if($n)switch($n){case $:return m;case _t:return o;case Mt:return d;case ut:return h;case Bt:return f}return Ht});function le(tt){return!!X&&X in tt}function he(tt){var Ht=tt&&tt.constructor,oe=typeof Ht=="function"&&Ht.prototype||L;return tt===oe}function $t(tt){if(tt!=null){try{return Z.call(tt)}catch{}try{return tt+""}catch{}}return""}function Et(tt){return Ee(tt)&&Q.call(tt,"callee")&&(!ft.call(tt,"callee")||et.call(tt)==i)}var ve=Array.isArray;function Ge(tt){return tt!=null&&Ze(tt.length)&&!Ke(tt)}function Ee(tt){return Si(tt)&&Ge(tt)}var _e=lt||Je;function on(tt){if(Ge(tt)&&(ve(tt)||typeof tt=="string"||typeof tt.splice=="function"||_e(tt)||Et(tt)))return!tt.length;var Ht=Yt(tt);if(Ht==o||Ht==h)return!tt.size;if(pt||he(tt))return!vt(tt).length;for(var oe in tt)if(Q.call(tt,oe))return!1;return!0}function Ke(tt){var Ht=Xe(tt)?et.call(tt):"";return Ht==s||Ht==a}function Ze(tt){return typeof tt=="number"&&tt>-1&&tt%1==0&&tt<=n}function Xe(tt){var Ht=typeof tt;return!!tt&&(Ht=="object"||Ht=="function")}function Si(tt){return!!tt&&typeof tt=="object"}function Je(){return!1}e.exports=on})(Wh,Wh.exports);const We=Wh.exports,i1t="",kC={components:{CdsIcon:Me,CdsSpacer:Pd,CdsClickable:Qs},props:{items:{type:Array,default:()=>[],required:!0}},methods:{resolveRoute({route:e,path:t}){const n=We(e)?t:e;return n instanceof String?{path:n}:n},routerPushTo(e){return this.resolveRoute(e)?this.resolveRoute(e).path:null}}},CC={class:"breadcrumb"};function OC(e,t,n,i,s,a){const o=c.resolveComponent("cds-icon"),l=c.resolveComponent("cds-spacer"),d=c.resolveComponent("router-link"),h=c.resolveComponent("cds-clickable");return c.openBlock(),c.createElementBlock("nav",null,[c.createElementVNode("ul",CC,[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(n.items,(f,m)=>(c.openBlock(),c.createElementBlock("li",{key:`${m}-${f.name}-item`,role:"presentation"},[m===0?(c.openBlock(),c.createBlock(h,{key:0,clickable:""},{default:c.withCtx(()=>[c.createVNode(d,{to:a.routerPushTo(f),class:"breadcrumb__link"},{default:c.withCtx(()=>[n.items.length<=2?(c.openBlock(),c.createBlock(o,{key:0,height:"16",width:"16",name:"arrow-left-outline"})):(c.openBlock(),c.createBlock(o,{key:1,height:"15",width:"15",name:"home-outline"})),c.createVNode(l,{"margin-left":"2"},{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(f.label),1)]),_:2},1024)]),_:2},1032,["to"])]),_:2},1024)):(c.openBlock(),c.createBlock(l,{key:1,class:"breadcrumb__item","margin-right":"1","margin-left":"1"},{default:c.withCtx(()=>[c.createVNode(o,{height:"16",width:"16",name:"caret-right-outline",class:"breadcrumb__separator"}),c.createVNode(d,{to:a.routerPushTo(f),class:"breadcrumb__link"},{default:c.withCtx(()=>[c.createVNode(h,{clickable:""},{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(f.label),1)]),_:2},1024)]),_:2},1032,["to"])]),_:2},1024))]))),128))])])}const MC=rt(kC,[["render",OC],["__scopeId","data-v-c2046c1c"]]),s1t="",Yh={props:{src:{type:String,required:!0},fallbackSrc:{type:String,required:!1},width:{type:[Number,String],default:null},height:{type:[Number,String],default:null},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}},data(){return{innerSrc:this.src}},computed:{heightResolver(){return this.height?`${this.height}px`:"auto"},widthResolver(){return this.width?`${this.width}px`:"auto"},opacityResolver(){return this.width?`${this.width}px`:"auto"},radiusResolver(){return this.roundedCorners?Rh(this.width):"0px"},grayScaleResolver(){return this.blackAndWhite?"grayscale(100%)":this.dimmed?"grayscale(35%)":"grayscale(0%)"}},methods:{rounder:Rh,imageSrcResolver(){this.innerSrc=this.fallbackSrc}}},Q2=()=>{c.useCssVars(e=>({"21136de6":e.radiusResolver,e10ed842:e.grayScaleResolver,"31ae2d7b":e.heightResolver,"1e7f7c9d":e.opacity,"775376fe":e.widthResolver}))},q2=Yh.setup;Yh.setup=q2?(e,t)=>(Q2(),q2(e,t)):Q2;const DC=Yh,EC=["src","alt"];function TC(e,t,n,i,s,a){return c.openBlock(),c.createElementBlock("img",c.mergeProps(e.$attrs,{src:s.innerSrc,alt:n.alt,class:"cds__image",onError:t[0]||(t[0]=(...o)=>a.imageSrcResolver&&a.imageSrcResolver(...o))}),null,16,EC)}const $2=rt(DC,[["render",TC],["__scopeId","data-v-79754f28"]]),jh=(e,t)=>Object.keys(e).some(n=>n===t),a1t="",Uh={components:{CdsBox:Il,CdsImage:$2},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}},computed:{imageWidthResolver(){return this.horizontal?"fit-content":`${this.imageWidth}px`},bodyWidthResolver(){return`${this.bodyWidth}px`}},methods:{hasSlot:jh,handleClick(){this.clickable&&this.$emit("cardClick",!0)}}},tv=()=>{c.useCssVars(e=>({"8d304056":e.bodyWidthResolver,"4730bd46":e.imageWidthResolver}))},ev=Uh.setup;Uh.setup=ev?(e,t)=>(tv(),ev(e,t)):tv;const IC=Uh,AC={class:"card__extra-container"},VC={class:"card__extra"},BC={key:0},PC={key:1,class:"card__image"},NC={key:2,class:"card__icon"},zC={class:"card__spacer"},LC={key:0,class:"card__header"},FC={key:1},RC={class:"card__header"},HC={key:2,class:"card__body"},WC={key:3},YC={class:"card__body"},jC={key:4,class:"card__footer"};function UC(e,t,n,i,s,a){const o=c.resolveComponent("cds-image"),l=c.resolveComponent("cds-box");return c.openBlock(),c.createBlock(l,{padding:"0",clickable:n.clickable,onBoxClick:a.handleClick},{default:c.withCtx(()=>[c.createElementVNode("div",AC,[c.createElementVNode("div",VC,[c.renderSlot(e.$slots,"extra",{},void 0,!0)])]),c.createElementVNode("div",{class:c.normalizeClass({"card--horizontal":this.horizontal})},[a.hasSlot(e.$slots,"image")?(c.openBlock(),c.createElementBlock("div",BC,[c.renderSlot(e.$slots,"image",{},void 0,!0)])):n.imageSrc?(c.openBlock(),c.createElementBlock("div",PC,[c.createVNode(o,{src:n.imageSrc,width:n.imageWidth,height:n.imageHeight,alt:n.imageAlt},null,8,["src","width","height","alt"])])):a.hasSlot(e.$slots,"icon")?(c.openBlock(),c.createElementBlock("div",NC,[c.renderSlot(e.$slots,"icon",{},void 0,!0)])):c.createCommentVNode("",!0),c.createElementVNode("div",zC,[a.hasSlot(e.$slots,"header")?(c.openBlock(),c.createElementBlock("div",LC,[c.renderSlot(e.$slots,"header",{},void 0,!0)])):(c.openBlock(),c.createElementBlock("div",FC,[c.createElementVNode("p",RC,c.toDisplayString(n.title),1)])),a.hasSlot(e.$slots,"body")?(c.openBlock(),c.createElementBlock("div",HC,[c.renderSlot(e.$slots,"body",{},void 0,!0)])):(c.openBlock(),c.createElementBlock("div",WC,[c.createElementVNode("p",YC,c.toDisplayString(n.content),1)])),a.hasSlot(e.$slots,"footer")?(c.openBlock(),c.createElementBlock("div",jC,[c.renderSlot(e.$slots,"footer",{},void 0,!0)])):c.createCommentVNode("",!0)])],2)]),_:3},8,["clickable","onBoxClick"])}const GC=rt(IC,[["render",UC],["__scopeId","data-v-ef799654"]]),o1t="",KC={components:{CdsButton:Bo},props:{title:{type:String,default:"T\xEDtulo do AlertCard",required:!0},text:{type:String,default:"Subt\xEDtulo 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}}},ZC={id:"callout-card"},XC={class:"image__container"},JC=["src","alt"],QC={class:"content__title"},qC={class:"content__text"};function $C(e,t,n,i,s,a){const o=c.resolveComponent("cds-button");return c.openBlock(),c.createElementBlock("span",ZC,[c.createElementVNode("div",{class:c.normalizeClass(a.resolveClass("callout-card__container"))},[c.createElementVNode("div",XC,[c.createElementVNode("img",{class:c.normalizeClass(a.resolveClass("image__content")),src:n.image,alt:n.imageDescription},null,10,JC)]),c.createElementVNode("div",{class:c.normalizeClass(a.resolveClass("content__container"))},[c.createElementVNode("div",{class:c.normalizeClass(a.resolveClass("content"))},[c.createElementVNode("p",QC,c.toDisplayString(n.title),1),c.createElementVNode("span",qC,[c.renderSlot(e.$slots,"text",{},()=>[c.createTextVNode(c.toDisplayString(n.text),1)])])],2),c.createElementVNode("div",null,[c.renderSlot(e.$slots,"action",{},()=>[c.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 tO=rt(KC,[["render",$C]]),r1t="",eO={props:{propertyName:{type:String,default:"Dados",required:!1},perPage:{type:Number,required:!0},total:{type:Number,required:!0},simple:{type:Boolean,default:!1,required:!1},fluid:{type:Boolean,default:!1,required:!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}))}}}},nO={key:0,class:"carousel-controller__text"},iO={key:1,class:"carousel-controller__text"},sO={class:"carousel-controller__property"};function aO(e,t,n,i,s,a){return c.openBlock(),c.createElementBlock("div",null,[c.createElementVNode("div",{class:c.normalizeClass(["carousel-controller",{"carousel-controller--fluid":n.fluid}])},[c.createElementVNode("span",{class:c.normalizeClass({"carousel-controller__previous-button--disabled":a.disabledBack,"carousel-controller__previous-button":!a.disabledBack}),onClick:t[0]||(t[0]=(...o)=>a.handleClickBack&&a.handleClickBack(...o))},null,2),c.createElementVNode("div",null,[n.simple?(c.openBlock(),c.createElementBlock("span",iO,c.toDisplayString(s.currentNumberOfItemsMin)+" de "+c.toDisplayString(a.numberOfPages),1)):(c.openBlock(),c.createElementBlock("span",nO,c.toDisplayString(s.currentNumberOfItemsMin)+"-"+c.toDisplayString(s.currentNumberOfItemsMax)+" de "+c.toDisplayString(n.total),1)),c.createElementVNode("span",sO,c.toDisplayString(n.propertyName),1)]),c.createElementVNode("span",{class:c.normalizeClass({"carousel-controller__next-button--disabled":a.disabledForward,"carousel-controller__next-button":!a.disabledForward}),onClick:t[1]||(t[1]=(...o)=>a.handleClickForward&&a.handleClickForward(...o))},null,2)],2)])}const oO=rt(eO,[["render",aO],["__scopeId","data-v-fcb19a0a"]]);function nv(e,t){return`${e}--${t}`}const l1t="",rO={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=nv("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))}}},lO={class:"cds-checkbox__container"},cO={class:"cds-checkbox__input"},dO=["id","value","name","disabled"],uO=["for"],hO=["for"];function fO(e,t,n,i,s,a){return c.openBlock(),c.createElementBlock("div",lO,[c.createElementVNode("div",cO,[c.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,dO),c.createElementVNode("label",{for:e.$attrs.id||"cds-checkbox-option-input",class:c.normalizeClass(a.resolveCheckboxClass),onClick:t[0]||(t[0]=(...o)=>a.toggleValue&&a.toggleValue(...o))},null,10,uO)]),c.createElementVNode("label",{class:c.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)=>a.toggleValue&&a.toggleValue(...o))},c.toDisplayString(n.label),11,hO)])}const Gh=rt(rO,[["render",fO],["__scopeId","data-v-0758b096"]]),c1t="",pO={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}}},mO={id:"collapsible-container"},gO={class:"collapsible-container__title"},vO={key:0,class:"collapsible-container__content"};function _O(e,t,n,i,s,a){return c.openBlock(),c.createElementBlock("span",mO,[c.createElementVNode("div",{class:"collapsible-container__item",onClick:t[0]||(t[0]=(...o)=>a.triggerExpanded&&a.triggerExpanded(...o))},[c.createElementVNode("span",{class:c.normalizeClass(s.internalValue?"collapsible-container__chevron--opened":"collapsible-container__chevron--closed")},null,2),c.renderSlot(e.$slots,"title",{},()=>[c.createElementVNode("span",gO,c.toDisplayString(n.title),1)])]),s.internalValue?(c.openBlock(),c.createElementBlock("div",vO,[c.renderSlot(e.$slots,"default")])):c.createCommentVNode("",!0)])}const yO=rt(pO,[["render",_O]]),Kh=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},bO=.2126,wO=.7152,xO=.0722,SO=2.4,kO={POOR:3,GOOD:4.5,VERYGOOD:7,SUPER:12},CO=(e,t,n="GOOD")=>{let i=Kh(e),s=Kh(t);var a=iv(...i),o=iv(...s),l=Math.max(a,o),d=Math.min(a,o);return(l+.05)/(d+.05)>=kO[n]};function iv(e,t,n){var i=[e,t,n].map(s=>(s/=255,s<=.03928?s/12.92:Math.pow((s+.055)/1.055,SO)));return i[0]*bO+i[1]*wO+i[2]*xO}const d1t="",Zh={components:{CdsPopover:U1,CdsIcon:Me},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:Tl,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:Lh,ContrastChecker:CO,SwatchSelection(e){let t="";this.selectedColor=this.sassColorVariables[e.replace(/-|\$/gi,"")],this.palete.forEach(n=>{n.colorTokens.find(i=>i===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,"")]}}},sv=()=>{c.useCssVars(e=>({f73e5680:e.selectedColor}))},av=Zh.setup;Zh.setup=av?(e,t)=>(sv(),av(e,t)):sv;const OO=Zh,MO=e=>(c.pushScopeId("data-v-a4ff5e3b"),e=e(),c.popScopeId(),e),DO={key:0},EO={class:"color-picker__label"},TO=["onClick"],IO={key:1},AO=[MO(()=>c.createElementVNode("div",{class:"color-picker__preview"},null,-1))],VO=["onClick"];function BO(e,t,n,i,s,a){const o=c.resolveComponent("cds-icon"),l=c.resolveComponent("cds-popover");return n.inline?(c.openBlock(),c.createElementBlock("div",DO,[c.createElementVNode("div",EO,c.toDisplayString(n.label),1),(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(n.swatch,(d,h)=>(c.openBlock(),c.createElementBlock("div",{key:h,class:"color-picker__container"},[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(d,(f,m)=>(c.openBlock(),c.createElementBlock("div",{key:m},[c.createElementVNode("div",{class:c.normalizeClass(`color-picker__swatch--${f.replace("$","")}`),onClick:v=>a.SwatchSelection(f)},[a.isCurrentColorSelected(f)?(c.openBlock(),c.createBlock(o,{key:0,height:"22",width:"22",name:"check-outline",class:c.normalizeClass(["swatch__icon",a.iconColorResolver])},null,8,["class"])):c.createCommentVNode("",!0)],10,TO)]))),128))]))),128))])):(c.openBlock(),c.createElementBlock("div",IO,[c.createElementVNode("div",{id:"color-picker",class:"color-picker__trigger",onClick:t[0]||(t[0]=c.withModifiers(d=>s.showPopover=!s.showPopover,["stop"]))},AO),c.createVNode(l,{modelValue:s.showPopover,"onUpdate:modelValue":t[1]||(t[1]=d=>s.showPopover=d),"right-aligned":!1,"target-id":"color-picker",height:n.popoverHeight,"fit-content-width":""},{default:c.withCtx(()=>[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(n.swatch,(d,h)=>(c.openBlock(),c.createElementBlock("div",{key:h,class:"popover__container"},[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(d,(f,m)=>(c.openBlock(),c.createElementBlock("div",{key:m},[c.createElementVNode("div",{class:c.normalizeClass(`color-picker__swatch--${f.replace("$","")}`),onClick:v=>a.SwatchSelection(f)},[a.isCurrentColorSelected(f)?(c.openBlock(),c.createBlock(o,{key:0,height:"22",width:"22",name:"check-outline",class:c.normalizeClass(["swatch__icon",a.iconColorResolver])},null,8,["class"])):c.createCommentVNode("",!0)],10,VO)]))),128))]))),128))]),_:1},8,["modelValue","height"])]))}const PO=rt(OO,[["render",BO],["__scopeId","data-v-a4ff5e3b"]]),h1t="",NO={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}}},zO={class:"dashboard-card"},LO={class:"dashboard-card__header"},FO={key:0,class:"dashboard-card__title"},RO={key:1,class:"dashboard-card__title"},HO={key:0,class:"dashboard-card__description"},WO={key:1,class:"dashboard-card__description"},YO={key:0};function jO(e,t,n,i,s,a){return c.openBlock(),c.createElementBlock("div",zO,[c.createElementVNode("div",null,[c.createElementVNode("div",LO,[n.title.length>0?(c.openBlock(),c.createElementBlock("p",FO,c.toDisplayString(n.title),1)):(c.openBlock(),c.createElementBlock("p",RO,[c.renderSlot(e.$slots,"title-slot",{},void 0,!0)])),c.createElementVNode("div",null,[c.renderSlot(e.$slots,"status-slot",{},void 0,!0)])]),n.description.length>0?(c.openBlock(),c.createElementBlock("p",HO,c.toDisplayString(n.description),1)):(c.openBlock(),c.createElementBlock("p",WO,[c.renderSlot(e.$slots,"description-slot",{},void 0,!0)]))]),c.createElementVNode("div",{class:"dashboard-card__action",onClick:t[0]||(t[0]=o=>e.$emit("action-button-click"))},[c.renderSlot(e.$slots,"action-slot",{},()=>[n.showAction?(c.openBlock(),c.createElementBlock("div",YO,c.toDisplayString(n.action),1)):c.createCommentVNode("",!0)],!0)])])}const UO=rt(NO,[["render",jO],["__scopeId","data-v-cd0db219"]]);class Xa extends Error{}class GO extends Xa{constructor(t){super(`Invalid DateTime: ${t.toMessage()}`)}}class KO extends Xa{constructor(t){super(`Invalid Interval: ${t.toMessage()}`)}}class ZO extends Xa{constructor(t){super(`Invalid Duration: ${t.toMessage()}`)}}class Al extends Xa{}class ov extends Xa{constructor(t){super(`Invalid unit ${t}`)}}class fi extends Xa{}class oa extends Xa{constructor(){super("Zone is an abstract class")}}const it="numeric",Wi="short",Zn="long",Nd={year:it,month:it,day:it},rv={year:it,month:Wi,day:it},XO={year:it,month:Wi,day:it,weekday:Wi},lv={year:it,month:Zn,day:it},cv={year:it,month:Zn,day:it,weekday:Zn},dv={hour:it,minute:it},uv={hour:it,minute:it,second:it},hv={hour:it,minute:it,second:it,timeZoneName:Wi},fv={hour:it,minute:it,second:it,timeZoneName:Zn},pv={hour:it,minute:it,hourCycle:"h23"},mv={hour:it,minute:it,second:it,hourCycle:"h23"},gv={hour:it,minute:it,second:it,hourCycle:"h23",timeZoneName:Wi},vv={hour:it,minute:it,second:it,hourCycle:"h23",timeZoneName:Zn},_v={year:it,month:it,day:it,hour:it,minute:it},yv={year:it,month:it,day:it,hour:it,minute:it,second:it},bv={year:it,month:Wi,day:it,hour:it,minute:it},wv={year:it,month:Wi,day:it,hour:it,minute:it,second:it},JO={year:it,month:Wi,day:it,weekday:Wi,hour:it,minute:it},xv={year:it,month:Zn,day:it,hour:it,minute:it,timeZoneName:Wi},Sv={year:it,month:Zn,day:it,hour:it,minute:it,second:it,timeZoneName:Wi},kv={year:it,month:Zn,day:it,weekday:Zn,hour:it,minute:it,timeZoneName:Zn},Cv={year:it,month:Zn,day:it,weekday:Zn,hour:it,minute:it,second:it,timeZoneName:Zn};class Vl{get type(){throw new oa}get name(){throw new oa}get ianaName(){return this.name}get isUniversal(){throw new oa}offsetName(t,n){throw new oa}formatOffset(t,n){throw new oa}offset(t){throw new oa}equals(t){throw new oa}get isValid(){throw new oa}}let Xh=null;class zd extends Vl{static get instance(){return Xh===null&&(Xh=new zd),Xh}get type(){return"system"}get name(){return new Intl.DateTimeFormat().resolvedOptions().timeZone}get isUniversal(){return!1}offsetName(t,{format:n,locale:i}){return Nv(t,n,i)}formatOffset(t,n){return zl(this.offset(t),n)}offset(t){return-new Date(t).getTimezoneOffset()}equals(t){return t.type==="system"}get isValid(){return!0}}let Ld={};function QO(e){return Ld[e]||(Ld[e]=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"})),Ld[e]}const qO={year:0,month:1,day:2,era:3,hour:4,minute:5,second:6};function $O(e,t){const n=e.format(t).replace(/\u200E/g,""),i=/(\d+)\/(\d+)\/(\d+) (AD|BC),? (\d+):(\d+):(\d+)/.exec(n),[,s,a,o,l,d,h,f]=i;return[o,s,a,l,d,h,f]}function tM(e,t){const n=e.formatToParts(t),i=[];for(let s=0;s<n.length;s++){const{type:a,value:o}=n[s],l=qO[a];a==="era"?i[l]=o:Qt(l)||(i[l]=parseInt(o,10))}return i}let Fd={};class Ms extends Vl{static create(t){return Fd[t]||(Fd[t]=new Ms(t)),Fd[t]}static resetCache(){Fd={},Ld={}}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=Ms.isValidZone(t)}get type(){return"iana"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(t,{format:n,locale:i}){return Nv(t,n,i,this.name)}formatOffset(t,n){return zl(this.offset(t),n)}offset(t){const n=new Date(t);if(isNaN(n))return NaN;const i=QO(this.name);let[s,a,o,l,d,h,f]=i.formatToParts?tM(i,n):$O(i,n);l==="BC"&&(s=-Math.abs(s)+1);const v=sf({year:s,month:a,day:o,hour:d===24?0:d,minute:h,second:f,millisecond:0});let y=+n;const w=y%1e3;return y-=w>=0?w:1e3+w,(v-y)/(60*1e3)}equals(t){return t.type==="iana"&&t.name===this.name}get isValid(){return this.valid}}let Ov={};function eM(e,t={}){const n=JSON.stringify([e,t]);let i=Ov[n];return i||(i=new Intl.ListFormat(e,t),Ov[n]=i),i}let Jh={};function Qh(e,t={}){const n=JSON.stringify([e,t]);let i=Jh[n];return i||(i=new Intl.DateTimeFormat(e,t),Jh[n]=i),i}let qh={};function nM(e,t={}){const n=JSON.stringify([e,t]);let i=qh[n];return i||(i=new Intl.NumberFormat(e,t),qh[n]=i),i}let $h={};function iM(e,t={}){const{base:n,...i}=t,s=JSON.stringify([e,i]);let a=$h[s];return a||(a=new Intl.RelativeTimeFormat(e,t),$h[s]=a),a}let Bl=null;function sM(){return Bl||(Bl=new Intl.DateTimeFormat().resolvedOptions().locale,Bl)}function aM(e){const t=e.indexOf("-x-");t!==-1&&(e=e.substring(0,t));const n=e.indexOf("-u-");if(n===-1)return[e];{let i,s;try{i=Qh(e).resolvedOptions(),s=e}catch{const d=e.substring(0,n);i=Qh(d).resolvedOptions(),s=d}const{numberingSystem:a,calendar:o}=i;return[s,a,o]}}function oM(e,t,n){return(n||t)&&(e.includes("-u-")||(e+="-u"),n&&(e+=`-ca-${n}`),t&&(e+=`-nu-${t}`)),e}function rM(e){const t=[];for(let n=1;n<=12;n++){const i=St.utc(2016,n,1);t.push(e(i))}return t}function lM(e){const t=[];for(let n=1;n<=7;n++){const i=St.utc(2016,11,13+n);t.push(e(i))}return t}function Rd(e,t,n,i,s){const a=e.listingMode(n);return a==="error"?null:a==="en"?i(t):s(t)}function cM(e){return e.numberingSystem&&e.numberingSystem!=="latn"?!1:e.numberingSystem==="latn"||!e.locale||e.locale.startsWith("en")||new Intl.DateTimeFormat(e.intl).resolvedOptions().numberingSystem==="latn"}class dM{constructor(t,n,i){this.padTo=i.padTo||0,this.floor=i.floor||!1;const{padTo:s,floor:a,...o}=i;if(!n||Object.keys(o).length>0){const l={useGrouping:!1,...i};i.padTo>0&&(l.minimumIntegerDigits=i.padTo),this.inf=nM(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):nf(t,3);return je(n,this.padTo)}}}class uM{constructor(t,n,i){this.opts=i;let s;if(t.zone.isUniversal){const o=-1*(t.offset/60),l=o>=0?`Etc/GMT+${o}`:`Etc/GMT${o}`;t.offset!==0&&Ms.create(l).valid?(s=l,this.dt=t):(s="UTC",i.timeZoneName?this.dt=t:this.dt=t.offset===0?t:St.fromMillis(t.ts+t.offset*60*1e3))}else t.zone.type==="system"?this.dt=t:(this.dt=t,s=t.zone.name);const a={...this.opts};a.timeZone=a.timeZone||s,this.dtf=Qh(n,a)}format(){return this.dtf.format(this.dt.toJSDate())}formatToParts(){return this.dtf.formatToParts(this.dt.toJSDate())}resolvedOptions(){return this.dtf.resolvedOptions()}}class hM{constructor(t,n,i){this.opts={style:"long",...i},!n&&Bv()&&(this.rtf=iM(t,i))}format(t,n){return this.rtf?this.rtf.format(t,n):EM(n,t,this.opts.numeric,this.opts.style!=="long")}formatToParts(t,n){return this.rtf?this.rtf.formatToParts(t,n):[]}}class Ce{static fromOpts(t){return Ce.create(t.locale,t.numberingSystem,t.outputCalendar,t.defaultToEN)}static create(t,n,i,s=!1){const a=t||Ye.defaultLocale,o=a||(s?"en-US":sM()),l=n||Ye.defaultNumberingSystem,d=i||Ye.defaultOutputCalendar;return new Ce(o,l,d,a)}static resetCache(){Bl=null,Jh={},qh={},$h={}}static fromObject({locale:t,numberingSystem:n,outputCalendar:i}={}){return Ce.create(t,n,i)}constructor(t,n,i,s){const[a,o,l]=aM(t);this.locale=a,this.numberingSystem=n||o||null,this.outputCalendar=i||l||null,this.intl=oM(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=cM(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:Ce.create(t.locale||this.specifiedLocale,t.numberingSystem||this.numberingSystem,t.outputCalendar||this.outputCalendar,t.defaultToEN||!1)}redefaultToEN(t={}){return this.clone({...t,defaultToEN:!0})}redefaultToSystem(t={}){return this.clone({...t,defaultToEN:!1})}months(t,n=!1,i=!0){return Rd(this,t,i,Fv,()=>{const s=n?{month:t,day:"numeric"}:{month:t},a=n?"format":"standalone";return this.monthsCache[a][t]||(this.monthsCache[a][t]=rM(o=>this.extract(o,s,"month"))),this.monthsCache[a][t]})}weekdays(t,n=!1,i=!0){return Rd(this,t,i,Wv,()=>{const s=n?{weekday:t,year:"numeric",month:"long",day:"numeric"}:{weekday:t},a=n?"format":"standalone";return this.weekdaysCache[a][t]||(this.weekdaysCache[a][t]=lM(o=>this.extract(o,s,"weekday"))),this.weekdaysCache[a][t]})}meridiems(t=!0){return Rd(this,void 0,t,()=>Yv,()=>{if(!this.meridiemCache){const n={hour:"numeric",hourCycle:"h12"};this.meridiemCache=[St.utc(2016,11,13,9),St.utc(2016,11,13,19)].map(i=>this.extract(i,n,"dayperiod"))}return this.meridiemCache})}eras(t,n=!0){return Rd(this,t,n,jv,()=>{const i={era:t};return this.eraCache[t]||(this.eraCache[t]=[St.utc(-40,1,1),St.utc(2017,1,1)].map(s=>this.extract(s,i,"era"))),this.eraCache[t]})}extract(t,n,i){const s=this.dtFormatter(t,n),a=s.formatToParts(),o=a.find(l=>l.type.toLowerCase()===i);return o?o.value:null}numberFormatter(t={}){return new dM(this.intl,t.forceSimple||this.fastNumbers,t)}dtFormatter(t,n={}){return new uM(t,this.intl,n)}relFormatter(t={}){return new hM(this.intl,this.isEnglish(),t)}listFormatter(t={}){return eM(this.intl,t)}isEnglish(){return this.locale==="en"||this.locale.toLowerCase()==="en-us"||new Intl.DateTimeFormat(this.intl).resolvedOptions().locale.startsWith("en-us")}equals(t){return this.locale===t.locale&&this.numberingSystem===t.numberingSystem&&this.outputCalendar===t.outputCalendar}}let tf=null;class xn extends Vl{static get utcInstance(){return tf===null&&(tf=new xn(0)),tf}static instance(t){return t===0?xn.utcInstance:new xn(t)}static parseSpecifier(t){if(t){const n=t.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(n)return new xn(jd(n[1],n[2]))}return null}constructor(t){super(),this.fixed=t}get type(){return"fixed"}get name(){return this.fixed===0?"UTC":`UTC${zl(this.fixed,"narrow")}`}get ianaName(){return this.fixed===0?"Etc/UTC":`Etc/GMT${zl(-this.fixed,"narrow")}`}offsetName(){return this.name}formatOffset(t,n){return zl(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 fM extends Vl{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 ra(e,t){if(Qt(e)||e===null)return t;if(e instanceof Vl)return e;if(pM(e)){const n=e.toLowerCase();return n==="default"?t:n==="local"||n==="system"?zd.instance:n==="utc"||n==="gmt"?xn.utcInstance:xn.parseSpecifier(n)||Ms.create(e)}else return Ja(e)?xn.instance(e):typeof e=="object"&&e.offset&&typeof e.offset=="number"?e:new fM(e)}let Mv=()=>Date.now(),Dv="system",Ev=null,Tv=null,Iv=null,Av=60,Vv;class Ye{static get now(){return Mv}static set now(t){Mv=t}static set defaultZone(t){Dv=t}static get defaultZone(){return ra(Dv,zd.instance)}static get defaultLocale(){return Ev}static set defaultLocale(t){Ev=t}static get defaultNumberingSystem(){return Tv}static set defaultNumberingSystem(t){Tv=t}static get defaultOutputCalendar(){return Iv}static set defaultOutputCalendar(t){Iv=t}static get twoDigitCutoffYear(){return Av}static set twoDigitCutoffYear(t){Av=t%100}static get throwOnInvalid(){return Vv}static set throwOnInvalid(t){Vv=t}static resetCaches(){Ce.resetCache(),Ms.resetCache()}}function Qt(e){return typeof e>"u"}function Ja(e){return typeof e=="number"}function Hd(e){return typeof e=="number"&&e%1===0}function pM(e){return typeof e=="string"}function mM(e){return Object.prototype.toString.call(e)==="[object Date]"}function Bv(){try{return typeof Intl<"u"&&!!Intl.RelativeTimeFormat}catch{return!1}}function gM(e){return Array.isArray(e)?e:[e]}function Pv(e,t,n){if(e.length!==0)return e.reduce((i,s)=>{const a=[t(s),s];return i&&n(i[0],a[0])===i[0]?i:a},null)[1]}function vM(e,t){return t.reduce((n,i)=>(n[i]=e[i],n),{})}function Wo(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function Ds(e,t,n){return Hd(e)&&e>=t&&e<=n}function _M(e,t){return e-t*Math.floor(e/t)}function je(e,t=2){const n=e<0;let i;return n?i="-"+(""+-e).padStart(t,"0"):i=(""+e).padStart(t,"0"),i}function la(e){if(!(Qt(e)||e===null||e===""))return parseInt(e,10)}function Qa(e){if(!(Qt(e)||e===null||e===""))return parseFloat(e)}function ef(e){if(!(Qt(e)||e===null||e==="")){const t=parseFloat("0."+e)*1e3;return Math.floor(t)}}function nf(e,t,n=!1){const i=10**t;return(n?Math.trunc:Math.round)(e*i)/i}function Pl(e){return e%4===0&&(e%100!==0||e%400===0)}function Nl(e){return Pl(e)?366:365}function Wd(e,t){const n=_M(t-1,12)+1,i=e+(t-n)/12;return n===2?Pl(i)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][n-1]}function sf(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(t.getUTCFullYear()-1900)),+t}function Yd(e){const t=(e+Math.floor(e/4)-Math.floor(e/100)+Math.floor(e/400))%7,n=e-1,i=(n+Math.floor(n/4)-Math.floor(n/100)+Math.floor(n/400))%7;return t===4||i===3?53:52}function af(e){return e>99?e:e>Ye.twoDigitCutoffYear?1900+e:2e3+e}function Nv(e,t,n,i=null){const s=new Date(e),a={hourCycle:"h23",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};i&&(a.timeZone=i);const o={timeZoneName:t,...a},l=new Intl.DateTimeFormat(n,o).formatToParts(s).find(d=>d.type.toLowerCase()==="timezonename");return l?l.value:null}function jd(e,t){let n=parseInt(e,10);Number.isNaN(n)&&(n=0);const i=parseInt(t,10)||0,s=n<0||Object.is(n,-0)?-i:i;return n*60+s}function zv(e){const t=Number(e);if(typeof e=="boolean"||e===""||Number.isNaN(t))throw new fi(`Invalid unit value ${e}`);return t}function Ud(e,t){const n={};for(const i in e)if(Wo(e,i)){const s=e[i];if(s==null)continue;n[t(i)]=zv(s)}return n}function zl(e,t){const n=Math.trunc(Math.abs(e/60)),i=Math.trunc(Math.abs(e%60)),s=e>=0?"+":"-";switch(t){case"short":return`${s}${je(n,2)}:${je(i,2)}`;case"narrow":return`${s}${n}${i>0?`:${i}`:""}`;case"techie":return`${s}${je(n,2)}${je(i,2)}`;default:throw new RangeError(`Value format ${t} is out of range for property format`)}}function Gd(e){return vM(e,["hour","minute","second","millisecond"])}const yM=["January","February","March","April","May","June","July","August","September","October","November","December"],Lv=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],bM=["J","F","M","A","M","J","J","A","S","O","N","D"];function Fv(e){switch(e){case"narrow":return[...bM];case"short":return[...Lv];case"long":return[...yM];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 Rv=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],Hv=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],wM=["M","T","W","T","F","S","S"];function Wv(e){switch(e){case"narrow":return[...wM];case"short":return[...Hv];case"long":return[...Rv];case"numeric":return["1","2","3","4","5","6","7"];default:return null}}const Yv=["AM","PM"],xM=["Before Christ","Anno Domini"],SM=["BC","AD"],kM=["B","A"];function jv(e){switch(e){case"narrow":return[...kM];case"short":return[...SM];case"long":return[...xM];default:return null}}function CM(e){return Yv[e.hour<12?0:1]}function OM(e,t){return Wv(t)[e.weekday-1]}function MM(e,t){return Fv(t)[e.month-1]}function DM(e,t){return jv(t)[e.year<0?0:1]}function EM(e,t,n="always",i=!1){const s={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."]},a=["hours","minutes","seconds"].indexOf(e)===-1;if(n==="auto"&&a){const m=e==="days";switch(t){case 1:return m?"tomorrow":`next ${s[e][0]}`;case-1:return m?"yesterday":`last ${s[e][0]}`;case 0:return m?"today":`this ${s[e][0]}`}}const o=Object.is(t,-0)||t<0,l=Math.abs(t),d=l===1,h=s[e],f=i?d?h[1]:h[2]||h[1]:d?s[e][0]:e;return o?`${l} ${f} ago`:`in ${l} ${f}`}function Uv(e,t){let n="";for(const i of e)i.literal?n+=i.val:n+=t(i.val);return n}const TM={D:Nd,DD:rv,DDD:lv,DDDD:cv,t:dv,tt:uv,ttt:hv,tttt:fv,T:pv,TT:mv,TTT:gv,TTTT:vv,f:_v,ff:bv,fff:xv,ffff:kv,F:yv,FF:wv,FFF:Sv,FFFF:Cv};class gn{static create(t,n={}){return new gn(t,n)}static parseFormat(t){let n=null,i="",s=!1;const a=[];for(let o=0;o<t.length;o++){const l=t.charAt(o);l==="'"?(i.length>0&&a.push({literal:s,val:i}),n=null,i="",s=!s):s||l===n?i+=l:(i.length>0&&a.push({literal:!1,val:i}),i=l,n=l)}return i.length>0&&a.push({literal:s,val:i}),a}static macroTokenToFormatOpts(t){return TM[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()}formatDateTime(t,n={}){return this.loc.dtFormatter(t,{...this.opts,...n}).format()}formatDateTimeParts(t,n={}){return this.loc.dtFormatter(t,{...this.opts,...n}).formatToParts()}formatInterval(t,n={}){return this.loc.dtFormatter(t.start,{...this.opts,...n}).dtf.formatRange(t.start.toJSDate(),t.end.toJSDate())}resolvedOptions(t,n={}){return this.loc.dtFormatter(t,{...this.opts,...n}).resolvedOptions()}num(t,n=0){if(this.opts.forceSimple)return je(t,n);const i={...this.opts};return n>0&&(i.padTo=n),this.loc.numberFormatter(i).format(t)}formatDateTimeFromString(t,n){const i=this.loc.listingMode()==="en",s=this.loc.outputCalendar&&this.loc.outputCalendar!=="gregory",a=(y,w)=>this.loc.extract(t,y,w),o=y=>t.isOffsetFixed&&t.offset===0&&y.allowZ?"Z":t.isValid?t.zone.formatOffset(t.ts,y.format):"",l=()=>i?CM(t):a({hour:"numeric",hourCycle:"h12"},"dayperiod"),d=(y,w)=>i?MM(t,y):a(w?{month:y}:{month:y,day:"numeric"},"month"),h=(y,w)=>i?OM(t,y):a(w?{weekday:y}:{weekday:y,month:"long",day:"numeric"},"weekday"),f=y=>{const w=gn.macroTokenToFormatOpts(y);return w?this.formatWithSystemDefault(t,w):y},m=y=>i?DM(t,y):a({era:y},"era"),v=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 s?a({day:"numeric"},"day"):this.num(t.day);case"dd":return s?a({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 s?a({month:"numeric",day:"numeric"},"month"):this.num(t.month);case"LL":return s?a({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 s?a({month:"numeric"},"month"):this.num(t.month);case"MM":return s?a({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 s?a({year:"numeric"},"year"):this.num(t.year);case"yy":return s?a({year:"2-digit"},"year"):this.num(t.year.toString().slice(-2),2);case"yyyy":return s?a({year:"numeric"},"year"):this.num(t.year,4);case"yyyyyy":return s?a({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"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 Uv(gn.parseFormat(n),v)}formatDurationFromString(t,n){const i=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}},s=d=>h=>{const f=i(h);return f?this.num(d.get(f),h.length):h},a=gn.parseFormat(n),o=a.reduce((d,{literal:h,val:f})=>h?d:d.concat(f),[]),l=t.shiftTo(...o.map(i).filter(d=>d));return Uv(a,s(l))}}class Yi{constructor(t,n){this.reason=t,this.explanation=n}toMessage(){return this.explanation?`${this.reason}: ${this.explanation}`:this.reason}}const Gv=/[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/;function Yo(...e){const t=e.reduce((n,i)=>n+i.source,"");return RegExp(`^${t}$`)}function jo(...e){return t=>e.reduce(([n,i,s],a)=>{const[o,l,d]=a(t,s);return[{...n,...o},l||i,d]},[{},null,1]).slice(0,2)}function Uo(e,...t){if(e==null)return[null,null];for(const[n,i]of t){const s=n.exec(e);if(s)return i(s)}return[null,null]}function Kv(...e){return(t,n)=>{const i={};let s;for(s=0;s<e.length;s++)i[e[s]]=la(t[n+s]);return[i,null,n+s]}}const Zv=/(?:(Z)|([+-]\d\d)(?::?(\d\d))?)/,IM=`(?:${Zv.source}?(?:\\[(${Gv.source})\\])?)?`,of=/(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,30}))?)?)?/,Xv=RegExp(`${of.source}${IM}`),rf=RegExp(`(?:T${Xv.source})?`),AM=/([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/,VM=/(\d{4})-?W(\d\d)(?:-?(\d))?/,BM=/(\d{4})-?(\d{3})/,PM=Kv("weekYear","weekNumber","weekDay"),NM=Kv("year","ordinal"),zM=/(\d{4})-(\d\d)-(\d\d)/,Jv=RegExp(`${of.source} ?(?:${Zv.source}|(${Gv.source}))?`),LM=RegExp(`(?: ${Jv.source})?`);function Go(e,t,n){const i=e[t];return Qt(i)?n:la(i)}function FM(e,t){return[{year:Go(e,t),month:Go(e,t+1,1),day:Go(e,t+2,1)},null,t+3]}function Ko(e,t){return[{hours:Go(e,t,0),minutes:Go(e,t+1,0),seconds:Go(e,t+2,0),milliseconds:ef(e[t+3])},null,t+4]}function Ll(e,t){const n=!e[t]&&!e[t+1],i=jd(e[t+1],e[t+2]),s=n?null:xn.instance(i);return[{},s,t+3]}function Fl(e,t){const n=e[t]?Ms.create(e[t]):null;return[{},n,t+1]}const RM=RegExp(`^T?${of.source}$`),HM=/^-?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 WM(e){const[t,n,i,s,a,o,l,d,h]=e,f=t[0]==="-",m=d&&d[0]==="-",v=(y,w=!1)=>y!==void 0&&(w||y&&f)?-y:y;return[{years:v(Qa(n)),months:v(Qa(i)),weeks:v(Qa(s)),days:v(Qa(a)),hours:v(Qa(o)),minutes:v(Qa(l)),seconds:v(Qa(d),d==="-0"),milliseconds:v(ef(h),m)}]}const YM={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 lf(e,t,n,i,s,a,o){const l={year:t.length===2?af(la(t)):la(t),month:Lv.indexOf(n)+1,day:la(i),hour:la(s),minute:la(a)};return o&&(l.second=la(o)),e&&(l.weekday=e.length>3?Rv.indexOf(e)+1:Hv.indexOf(e)+1),l}const jM=/^(?:(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 UM(e){const[,t,n,i,s,a,o,l,d,h,f,m]=e,v=lf(t,s,i,n,a,o,l);let y;return d?y=YM[d]:h?y=0:y=jd(f,m),[v,new xn(y)]}function GM(e){return e.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}const KM=/^(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$/,ZM=/^(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$/,XM=/^(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 Qv(e){const[,t,n,i,s,a,o,l]=e;return[lf(t,s,i,n,a,o,l),xn.utcInstance]}function JM(e){const[,t,n,i,s,a,o,l]=e;return[lf(t,l,n,i,s,a,o),xn.utcInstance]}const QM=Yo(AM,rf),qM=Yo(VM,rf),$M=Yo(BM,rf),tD=Yo(Xv),qv=jo(FM,Ko,Ll,Fl),eD=jo(PM,Ko,Ll,Fl),nD=jo(NM,Ko,Ll,Fl),iD=jo(Ko,Ll,Fl);function sD(e){return Uo(e,[QM,qv],[qM,eD],[$M,nD],[tD,iD])}function aD(e){return Uo(GM(e),[jM,UM])}function oD(e){return Uo(e,[KM,Qv],[ZM,Qv],[XM,JM])}function rD(e){return Uo(e,[HM,WM])}const lD=jo(Ko);function cD(e){return Uo(e,[RM,lD])}const dD=Yo(zM,LM),uD=Yo(Jv),hD=jo(Ko,Ll,Fl);function fD(e){return Uo(e,[dD,qv],[uD,hD])}const pD="Invalid Duration",$v={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}},mD={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},...$v},pi=146097/400,Zo=146097/4800,gD={years:{quarters:4,months:12,weeks:pi/7,days:pi,hours:pi*24,minutes:pi*24*60,seconds:pi*24*60*60,milliseconds:pi*24*60*60*1e3},quarters:{months:3,weeks:pi/28,days:pi/4,hours:pi*24/4,minutes:pi*24*60/4,seconds:pi*24*60*60/4,milliseconds:pi*24*60*60*1e3/4},months:{weeks:Zo/7,days:Zo,hours:Zo*24,minutes:Zo*24*60,seconds:Zo*24*60*60,milliseconds:Zo*24*60*60*1e3},...$v},qa=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],vD=qa.slice(0).reverse();function ca(e,t,n=!1){const i={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 ne(i)}function _D(e){return e<0?Math.floor(e):Math.ceil(e)}function t3(e,t,n,i,s){const a=e[s][n],o=t[n]/a,l=Math.sign(o)===Math.sign(i[s]),d=!l&&i[s]!==0&&Math.abs(o)<=1?_D(o):Math.trunc(o);i[s]+=d,t[n]-=d*a}function yD(e,t){vD.reduce((n,i)=>Qt(t[i])?n:(n&&t3(e,t,n,t,i),i),null)}function bD(e){const t={};for(const[n,i]of Object.entries(e))i!==0&&(t[n]=i);return t}class ne{constructor(t){const n=t.conversionAccuracy==="longterm"||!1;let i=n?gD:mD;t.matrix&&(i=t.matrix),this.values=t.values,this.loc=t.loc||Ce.create(),this.conversionAccuracy=n?"longterm":"casual",this.invalid=t.invalid||null,this.matrix=i,this.isLuxonDuration=!0}static fromMillis(t,n){return ne.fromObject({milliseconds:t},n)}static fromObject(t,n={}){if(t==null||typeof t!="object")throw new fi(`Duration.fromObject: argument expected to be an object, got ${t===null?"null":typeof t}`);return new ne({values:Ud(t,ne.normalizeUnit),loc:Ce.fromObject(n),conversionAccuracy:n.conversionAccuracy,matrix:n.matrix})}static fromDurationLike(t){if(Ja(t))return ne.fromMillis(t);if(ne.isDuration(t))return t;if(typeof t=="object")return ne.fromObject(t);throw new fi(`Unknown duration argument ${t} of type ${typeof t}`)}static fromISO(t,n){const[i]=rD(t);return i?ne.fromObject(i,n):ne.invalid("unparsable",`the input "${t}" can't be parsed as ISO 8601`)}static fromISOTime(t,n){const[i]=cD(t);return i?ne.fromObject(i,n):ne.invalid("unparsable",`the input "${t}" can't be parsed as ISO 8601`)}static invalid(t,n=null){if(!t)throw new fi("need to specify a reason the Duration is invalid");const i=t instanceof Yi?t:new Yi(t,n);if(Ye.throwOnInvalid)throw new ZO(i);return new ne({invalid:i})}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 ov(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 i={...n,floor:n.round!==!1&&n.floor!==!1};return this.isValid?gn.create(this.loc,i).formatDurationFromString(this,t):pD}toHuman(t={}){const n=qa.map(i=>{const s=this.values[i];return Qt(s)?null:this.loc.numberFormatter({style:"unit",unitDisplay:"long",...t,unit:i.slice(0,-1)}).format(s)}).filter(i=>i);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+=nf(this.seconds+this.milliseconds/1e3,3)+"S"),t==="P"&&(t+="T0S"),t}toISOTime(t={}){if(!this.isValid)return null;const n=this.toMillis();if(n<0||n>=864e5)return null;t={suppressMilliseconds:!1,suppressSeconds:!1,includePrefix:!1,format:"extended",...t};const i=this.shiftTo("hours","minutes","seconds","milliseconds");let s=t.format==="basic"?"hhmm":"hh:mm";(!t.suppressSeconds||i.seconds!==0||i.milliseconds!==0)&&(s+=t.format==="basic"?"ss":":ss",(!t.suppressMilliseconds||i.milliseconds!==0)&&(s+=".SSS"));let a=i.toFormat(s);return t.includePrefix&&(a="T"+a),a}toJSON(){return this.toISO()}toString(){return this.toISO()}toMillis(){return this.as("milliseconds")}valueOf(){return this.toMillis()}plus(t){if(!this.isValid)return this;const n=ne.fromDurationLike(t),i={};for(const s of qa)(Wo(n.values,s)||Wo(this.values,s))&&(i[s]=n.get(s)+this.get(s));return ca(this,{values:i},!0)}minus(t){if(!this.isValid)return this;const n=ne.fromDurationLike(t);return this.plus(n.negate())}mapUnits(t){if(!this.isValid)return this;const n={};for(const i of Object.keys(this.values))n[i]=zv(t(this.values[i],i));return ca(this,{values:n},!0)}get(t){return this[ne.normalizeUnit(t)]}set(t){if(!this.isValid)return this;const n={...this.values,...Ud(t,ne.normalizeUnit)};return ca(this,{values:n})}reconfigure({locale:t,numberingSystem:n,conversionAccuracy:i,matrix:s}={}){const o={loc:this.loc.clone({locale:t,numberingSystem:n}),matrix:s,conversionAccuracy:i};return ca(this,o)}as(t){return this.isValid?this.shiftTo(t).get(t):NaN}normalize(){if(!this.isValid)return this;const t=this.toObject();return yD(this.matrix,t),ca(this,{values:t},!0)}rescale(){if(!this.isValid)return this;const t=bD(this.normalize().shiftToAll().toObject());return ca(this,{values:t},!0)}shiftTo(...t){if(!this.isValid)return this;if(t.length===0)return this;t=t.map(o=>ne.normalizeUnit(o));const n={},i={},s=this.toObject();let a;for(const o of qa)if(t.indexOf(o)>=0){a=o;let l=0;for(const h in i)l+=this.matrix[h][o]*i[h],i[h]=0;Ja(s[o])&&(l+=s[o]);const d=Math.trunc(l);n[o]=d,i[o]=(l*1e3-d*1e3)/1e3;for(const h in s)qa.indexOf(h)>qa.indexOf(o)&&t3(this.matrix,s,h,n,o)}else Ja(s[o])&&(i[o]=s[o]);for(const o in i)i[o]!==0&&(n[a]+=o===a?i[o]:i[o]/this.matrix[a][o]);return ca(this,{values:n},!0).normalize()}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 ca(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(i,s){return i===void 0||i===0?s===void 0||s===0:i===s}for(const i of qa)if(!n(this.values[i],t.values[i]))return!1;return!0}}const Xo="Invalid Interval";function wD(e,t){return!e||!e.isValid?Ae.invalid("missing or invalid start"):!t||!t.isValid?Ae.invalid("missing or invalid end"):t<e?Ae.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 Ae{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 fi("need to specify a reason the Interval is invalid");const i=t instanceof Yi?t:new Yi(t,n);if(Ye.throwOnInvalid)throw new KO(i);return new Ae({invalid:i})}static fromDateTimes(t,n){const i=Wl(t),s=Wl(n),a=wD(i,s);return a??new Ae({start:i,end:s})}static after(t,n){const i=ne.fromDurationLike(n),s=Wl(t);return Ae.fromDateTimes(s,s.plus(i))}static before(t,n){const i=ne.fromDurationLike(n),s=Wl(t);return Ae.fromDateTimes(s.minus(i),s)}static fromISO(t,n){const[i,s]=(t||"").split("/",2);if(i&&s){let a,o;try{a=St.fromISO(i,n),o=a.isValid}catch{o=!1}let l,d;try{l=St.fromISO(s,n),d=l.isValid}catch{d=!1}if(o&&d)return Ae.fromDateTimes(a,l);if(o){const h=ne.fromISO(s,n);if(h.isValid)return Ae.after(a,h)}else if(d){const h=ne.fromISO(i,n);if(h.isValid)return Ae.before(l,h)}}return Ae.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 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"){if(!this.isValid)return NaN;const n=this.start.startOf(t),i=this.end.startOf(t);return Math.floor(i.diff(n,t).get(t))+1}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?Ae.fromDateTimes(t||this.s,n||this.e):this}splitAt(...t){if(!this.isValid)return[];const n=t.map(Wl).filter(o=>this.contains(o)).sort(),i=[];let{s}=this,a=0;for(;s<this.e;){const o=n[a]||this.e,l=+o>+this.e?this.e:o;i.push(Ae.fromDateTimes(s,l)),s=l,a+=1}return i}splitBy(t){const n=ne.fromDurationLike(t);if(!this.isValid||!n.isValid||n.as("milliseconds")===0)return[];let{s:i}=this,s=1,a;const o=[];for(;i<this.e;){const l=this.start.plus(n.mapUnits(d=>d*s));a=+l>+this.e?this.e:l,o.push(Ae.fromDateTimes(i,a)),i=a,s+=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,i=this.e<t.e?this.e:t.e;return n>=i?null:Ae.fromDateTimes(n,i)}union(t){if(!this.isValid)return this;const n=this.s<t.s?this.s:t.s,i=this.e>t.e?this.e:t.e;return Ae.fromDateTimes(n,i)}static merge(t){const[n,i]=t.sort((s,a)=>s.s-a.s).reduce(([s,a],o)=>a?a.overlaps(o)||a.abutsStart(o)?[s,a.union(o)]:[s.concat([a]),o]:[s,o],[[],null]);return i&&n.push(i),n}static xor(t){let n=null,i=0;const s=[],a=t.map(d=>[{time:d.s,type:"s"},{time:d.e,type:"e"}]),o=Array.prototype.concat(...a),l=o.sort((d,h)=>d.time-h.time);for(const d of l)i+=d.type==="s"?1:-1,i===1?n=d.time:(n&&+n!=+d.time&&s.push(Ae.fromDateTimes(n,d.time)),n=null);return Ae.merge(s)}difference(...t){return Ae.xor([this].concat(t)).map(n=>this.intersection(n)).filter(n=>n&&!n.isEmpty())}toString(){return this.isValid?`[${this.s.toISO()} \u2013 ${this.e.toISO()})`:Xo}toLocaleString(t=Nd,n={}){return this.isValid?gn.create(this.s.loc.clone(n),t).formatInterval(this):Xo}toISO(t){return this.isValid?`${this.s.toISO(t)}/${this.e.toISO(t)}`:Xo}toISODate(){return this.isValid?`${this.s.toISODate()}/${this.e.toISODate()}`:Xo}toISOTime(t){return this.isValid?`${this.s.toISOTime(t)}/${this.e.toISOTime(t)}`:Xo}toFormat(t,{separator:n=" \u2013 "}={}){return this.isValid?`${this.s.toFormat(t)}${n}${this.e.toFormat(t)}`:Xo}toDuration(t,n){return this.isValid?this.e.diff(this.s,t,n):ne.invalid(this.invalidReason)}mapEndpoints(t){return Ae.fromDateTimes(t(this.s),t(this.e))}}class Kd{static hasDST(t=Ye.defaultZone){const n=St.now().setZone(t).set({month:12});return!t.isUniversal&&n.offset!==n.set({month:6}).offset}static isValidIANAZone(t){return Ms.isValidZone(t)}static normalizeZone(t){return ra(t,Ye.defaultZone)}static months(t="long",{locale:n=null,numberingSystem:i=null,locObj:s=null,outputCalendar:a="gregory"}={}){return(s||Ce.create(n,i,a)).months(t)}static monthsFormat(t="long",{locale:n=null,numberingSystem:i=null,locObj:s=null,outputCalendar:a="gregory"}={}){return(s||Ce.create(n,i,a)).months(t,!0)}static weekdays(t="long",{locale:n=null,numberingSystem:i=null,locObj:s=null}={}){return(s||Ce.create(n,i,null)).weekdays(t)}static weekdaysFormat(t="long",{locale:n=null,numberingSystem:i=null,locObj:s=null}={}){return(s||Ce.create(n,i,null)).weekdays(t,!0)}static meridiems({locale:t=null}={}){return Ce.create(t).meridiems()}static eras(t="short",{locale:n=null}={}){return Ce.create(n,null,"gregory").eras(t)}static features(){return{relative:Bv()}}}function e3(e,t){const n=s=>s.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf(),i=n(t)-n(e);return Math.floor(ne.fromMillis(i).as("days"))}function xD(e,t,n){const i=[["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=e3(d,h);return(f-f%7)/7}],["days",e3]],s={},a=e;let o,l;for(const[d,h]of i)n.indexOf(d)>=0&&(o=d,s[d]=h(e,t),l=a.plus(s),l>t?(s[d]--,e=a.plus(s)):e=l);return[e,s,l,o]}function SD(e,t,n,i){let[s,a,o,l]=xD(e,t,n);const d=t-s,h=n.filter(m=>["hours","minutes","seconds","milliseconds"].indexOf(m)>=0);h.length===0&&(o<t&&(o=s.plus({[l]:1})),o!==s&&(a[l]=(a[l]||0)+d/(o-s)));const f=ne.fromObject(a,i);return h.length>0?ne.fromMillis(d,i).shiftTo(...h).plus(f):f}const cf={arab:"[\u0660-\u0669]",arabext:"[\u06F0-\u06F9]",bali:"[\u1B50-\u1B59]",beng:"[\u09E6-\u09EF]",deva:"[\u0966-\u096F]",fullwide:"[\uFF10-\uFF19]",gujr:"[\u0AE6-\u0AEF]",hanidec:"[\u3007|\u4E00|\u4E8C|\u4E09|\u56DB|\u4E94|\u516D|\u4E03|\u516B|\u4E5D]",khmr:"[\u17E0-\u17E9]",knda:"[\u0CE6-\u0CEF]",laoo:"[\u0ED0-\u0ED9]",limb:"[\u1946-\u194F]",mlym:"[\u0D66-\u0D6F]",mong:"[\u1810-\u1819]",mymr:"[\u1040-\u1049]",orya:"[\u0B66-\u0B6F]",tamldec:"[\u0BE6-\u0BEF]",telu:"[\u0C66-\u0C6F]",thai:"[\u0E50-\u0E59]",tibt:"[\u0F20-\u0F29]",latn:"\\d"},n3={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]},kD=cf.hanidec.replace(/[\[|\]]/g,"").split("");function CD(e){let t=parseInt(e,10);if(isNaN(t)){t="";for(let n=0;n<e.length;n++){const i=e.charCodeAt(n);if(e[n].search(cf.hanidec)!==-1)t+=kD.indexOf(e[n]);else for(const s in n3){const[a,o]=n3[s];i>=a&&i<=o&&(t+=i-a)}}return parseInt(t,10)}else return t}function ji({numberingSystem:e},t=""){return new RegExp(`${cf[e||"latn"]}${t}`)}const OD="missing Intl.DateTimeFormat.formatToParts support";function se(e,t=n=>n){return{regex:e,deser:([n])=>t(CD(n))}}const i3=`[ ${String.fromCharCode(160)}]`,s3=new RegExp(i3,"g");function MD(e){return e.replace(/\./g,"\\.?").replace(s3,i3)}function a3(e){return e.replace(/\./g,"").replace(s3," ").toLowerCase()}function Ui(e,t){return e===null?null:{regex:RegExp(e.map(MD).join("|")),deser:([n])=>e.findIndex(i=>a3(n)===a3(i))+t}}function o3(e,t){return{regex:e,deser:([,n,i])=>jd(n,i),groups:t}}function df(e){return{regex:e,deser:([t])=>t}}function DD(e){return e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function ED(e,t){const n=ji(t),i=ji(t,"{2}"),s=ji(t,"{3}"),a=ji(t,"{4}"),o=ji(t,"{6}"),l=ji(t,"{1,2}"),d=ji(t,"{1,3}"),h=ji(t,"{1,6}"),f=ji(t,"{1,9}"),m=ji(t,"{2,4}"),v=ji(t,"{4,6}"),y=k=>({regex:RegExp(DD(k.val)),deser:([D])=>D,literal:!0}),x=(k=>{if(e.literal)return y(k);switch(k.val){case"G":return Ui(t.eras("short",!1),0);case"GG":return Ui(t.eras("long",!1),0);case"y":return se(h);case"yy":return se(m,af);case"yyyy":return se(a);case"yyyyy":return se(v);case"yyyyyy":return se(o);case"M":return se(l);case"MM":return se(i);case"MMM":return Ui(t.months("short",!0,!1),1);case"MMMM":return Ui(t.months("long",!0,!1),1);case"L":return se(l);case"LL":return se(i);case"LLL":return Ui(t.months("short",!1,!1),1);case"LLLL":return Ui(t.months("long",!1,!1),1);case"d":return se(l);case"dd":return se(i);case"o":return se(d);case"ooo":return se(s);case"HH":return se(i);case"H":return se(l);case"hh":return se(i);case"h":return se(l);case"mm":return se(i);case"m":return se(l);case"q":return se(l);case"qq":return se(i);case"s":return se(l);case"ss":return se(i);case"S":return se(d);case"SSS":return se(s);case"u":return df(f);case"uu":return df(l);case"uuu":return se(n);case"a":return Ui(t.meridiems(),0);case"kkkk":return se(a);case"kk":return se(m,af);case"W":return se(l);case"WW":return se(i);case"E":case"c":return se(n);case"EEE":return Ui(t.weekdays("short",!1,!1),1);case"EEEE":return Ui(t.weekdays("long",!1,!1),1);case"ccc":return Ui(t.weekdays("short",!0,!1),1);case"cccc":return Ui(t.weekdays("long",!0,!1),1);case"Z":case"ZZ":return o3(new RegExp(`([+-]${l.source})(?::(${i.source}))?`),2);case"ZZZ":return o3(new RegExp(`([+-]${l.source})(${i.source})?`),2);case"z":return df(/[a-z_+-/]{1,256}?/i);default:return y(k)}})(e)||{invalidReason:OD};return x.token=e,x}const TD={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",hour:{numeric:"h","2-digit":"hh"},minute:{numeric:"m","2-digit":"mm"},second:{numeric:"s","2-digit":"ss"},timeZoneName:{long:"ZZZZZ",short:"ZZZ"}};function ID(e,t){const{type:n,value:i}=e;if(n==="literal")return{literal:!0,val:i};const s=t[n];let a=TD[n];if(typeof a=="object"&&(a=a[s]),a)return{literal:!1,val:a}}function AD(e){return[`^${e.map(n=>n.regex).reduce((n,i)=>`${n}(${i.source})`,"")}$`,e]}function VD(e,t,n){const i=e.match(t);if(i){const s={};let a=1;for(const o in n)if(Wo(n,o)){const l=n[o],d=l.groups?l.groups+1:1;!l.literal&&l.token&&(s[l.token.val[0]]=l.deser(i.slice(a,a+d))),a+=d}return[i,s]}else return[i,{}]}function BD(e){const t=a=>{switch(a){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,i;return Qt(e.z)||(n=Ms.create(e.z)),Qt(e.Z)||(n||(n=new xn(e.Z)),i=e.Z),Qt(e.q)||(e.M=(e.q-1)*3+1),Qt(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),Qt(e.u)||(e.S=ef(e.u)),[Object.keys(e).reduce((a,o)=>{const l=t(o);return l&&(a[l]=e[o]),a},{}),n,i]}let uf=null;function PD(){return uf||(uf=St.fromMillis(1555555555555)),uf}function ND(e,t){if(e.literal)return e;const n=gn.macroTokenToFormatOpts(e.val),i=c3(n,t);return i==null||i.includes(void 0)?e:i}function r3(e,t){return Array.prototype.concat(...e.map(n=>ND(n,t)))}function l3(e,t,n){const i=r3(gn.parseFormat(n),e),s=i.map(o=>ED(o,e)),a=s.find(o=>o.invalidReason);if(a)return{input:t,tokens:i,invalidReason:a.invalidReason};{const[o,l]=AD(s),d=RegExp(o,"i"),[h,f]=VD(t,d,l),[m,v,y]=f?BD(f):[null,null,void 0];if(Wo(f,"a")&&Wo(f,"H"))throw new Al("Can't include meridiem when specifying 24-hour format");return{input:t,tokens:i,regex:d,rawMatches:h,matches:f,result:m,zone:v,specificOffset:y}}}function zD(e,t,n){const{result:i,zone:s,specificOffset:a,invalidReason:o}=l3(e,t,n);return[i,s,a,o]}function c3(e,t){return e?gn.create(t,e).formatDateTimeParts(PD()).map(s=>ID(s,e)):null}const d3=[0,31,59,90,120,151,181,212,243,273,304,334],u3=[0,31,60,91,121,152,182,213,244,274,305,335];function mi(e,t){return new Yi("unit out of range",`you specified ${t} (of type ${typeof t}) as a ${e}, which is invalid`)}function h3(e,t,n){const i=new Date(Date.UTC(e,t-1,n));e<100&&e>=0&&i.setUTCFullYear(i.getUTCFullYear()-1900);const s=i.getUTCDay();return s===0?7:s}function f3(e,t,n){return n+(Pl(e)?u3:d3)[t-1]}function p3(e,t){const n=Pl(e)?u3:d3,i=n.findIndex(a=>a<t),s=t-n[i];return{month:i+1,day:s}}function hf(e){const{year:t,month:n,day:i}=e,s=f3(t,n,i),a=h3(t,n,i);let o=Math.floor((s-a+10)/7),l;return o<1?(l=t-1,o=Yd(l)):o>Yd(t)?(l=t+1,o=1):l=t,{weekYear:l,weekNumber:o,weekday:a,...Gd(e)}}function m3(e){const{weekYear:t,weekNumber:n,weekday:i}=e,s=h3(t,1,4),a=Nl(t);let o=n*7+i-s-3,l;o<1?(l=t-1,o+=Nl(l)):o>a?(l=t+1,o-=Nl(t)):l=t;const{month:d,day:h}=p3(l,o);return{year:l,month:d,day:h,...Gd(e)}}function ff(e){const{year:t,month:n,day:i}=e,s=f3(t,n,i);return{year:t,ordinal:s,...Gd(e)}}function g3(e){const{year:t,ordinal:n}=e,{month:i,day:s}=p3(t,n);return{year:t,month:i,day:s,...Gd(e)}}function LD(e){const t=Hd(e.weekYear),n=Ds(e.weekNumber,1,Yd(e.weekYear)),i=Ds(e.weekday,1,7);return t?n?i?!1:mi("weekday",e.weekday):mi("week",e.week):mi("weekYear",e.weekYear)}function FD(e){const t=Hd(e.year),n=Ds(e.ordinal,1,Nl(e.year));return t?n?!1:mi("ordinal",e.ordinal):mi("year",e.year)}function v3(e){const t=Hd(e.year),n=Ds(e.month,1,12),i=Ds(e.day,1,Wd(e.year,e.month));return t?n?i?!1:mi("day",e.day):mi("month",e.month):mi("year",e.year)}function _3(e){const{hour:t,minute:n,second:i,millisecond:s}=e,a=Ds(t,0,23)||t===24&&n===0&&i===0&&s===0,o=Ds(n,0,59),l=Ds(i,0,59),d=Ds(s,0,999);return a?o?l?d?!1:mi("millisecond",s):mi("second",i):mi("minute",n):mi("hour",t)}const pf="Invalid DateTime",y3=864e13;function Zd(e){return new Yi("unsupported zone",`the zone "${e.name}" is not supported`)}function mf(e){return e.weekData===null&&(e.weekData=hf(e.c)),e.weekData}function Rl(e,t){const n={ts:e.ts,zone:e.zone,c:e.c,o:e.o,loc:e.loc,invalid:e.invalid};return new St({...n,...t,old:n})}function b3(e,t,n){let i=e-t*60*1e3;const s=n.offset(i);if(t===s)return[i,t];i-=(s-t)*60*1e3;const a=n.offset(i);return s===a?[i,s]:[e-Math.min(s,a)*60*1e3,Math.max(s,a)]}function w3(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 Xd(e,t,n){return b3(sf(e),t,n)}function x3(e,t){const n=e.o,i=e.c.year+Math.trunc(t.years),s=e.c.month+Math.trunc(t.months)+Math.trunc(t.quarters)*3,a={...e.c,year:i,month:s,day:Math.min(e.c.day,Wd(i,s))+Math.trunc(t.days)+Math.trunc(t.weeks)*7},o=ne.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=sf(a);let[d,h]=b3(l,n,e.zone);return o!==0&&(d+=o,h=e.zone.offset(d)),{ts:d,o:h}}function Hl(e,t,n,i,s,a){const{setZone:o,zone:l}=n;if(e&&Object.keys(e).length!==0){const d=t||l,h=St.fromObject(e,{...n,zone:d,specificOffset:a});return o?h:h.setZone(l)}else return St.invalid(new Yi("unparsable",`the input "${s}" can't be parsed as ${i}`))}function Jd(e,t,n=!0){return e.isValid?gn.create(Ce.create("en-US"),{allowZ:n,forceSimple:!0}).formatDateTimeFromString(e,t):null}function gf(e,t){const n=e.c.year>9999||e.c.year<0;let i="";return n&&e.c.year>=0&&(i+="+"),i+=je(e.c.year,n?6:4),t?(i+="-",i+=je(e.c.month),i+="-",i+=je(e.c.day)):(i+=je(e.c.month),i+=je(e.c.day)),i}function S3(e,t,n,i,s,a){let o=je(e.c.hour);return t?(o+=":",o+=je(e.c.minute),(e.c.second!==0||!n)&&(o+=":")):o+=je(e.c.minute),(e.c.second!==0||!n)&&(o+=je(e.c.second),(e.c.millisecond!==0||!i)&&(o+=".",o+=je(e.c.millisecond,3))),s&&(e.isOffsetFixed&&e.offset===0&&!a?o+="Z":e.o<0?(o+="-",o+=je(Math.trunc(-e.o/60)),o+=":",o+=je(Math.trunc(-e.o%60))):(o+="+",o+=je(Math.trunc(e.o/60)),o+=":",o+=je(Math.trunc(e.o%60)))),a&&(o+="["+e.zone.ianaName+"]"),o}const k3={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},RD={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},HD={ordinal:1,hour:0,minute:0,second:0,millisecond:0},C3=["year","month","day","hour","minute","second","millisecond"],WD=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],YD=["year","ordinal","hour","minute","second","millisecond"];function O3(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 ov(e);return t}function M3(e,t){const n=ra(t.zone,Ye.defaultZone),i=Ce.fromObject(t),s=Ye.now();let a,o;if(Qt(e.year))a=s;else{for(const h of C3)Qt(e[h])&&(e[h]=k3[h]);const l=v3(e)||_3(e);if(l)return St.invalid(l);const d=n.offset(s);[a,o]=Xd(e,d,n)}return new St({ts:a,zone:n,loc:i,o})}function D3(e,t,n){const i=Qt(n.round)?!0:n.round,s=(o,l)=>(o=nf(o,i||n.calendary?0:2,!0),t.loc.clone(n).relFormatter(n).format(o,l)),a=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 s(a(n.unit),n.unit);for(const o of n.units){const l=a(o);if(Math.abs(l)>=1)return s(l,o)}return s(e>t?-0:0,n.units[n.units.length-1])}function E3(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]}class St{constructor(t){const n=t.zone||Ye.defaultZone;let i=t.invalid||(Number.isNaN(t.ts)?new Yi("invalid input"):null)||(n.isValid?null:Zd(n));this.ts=Qt(t.ts)?Ye.now():t.ts;let s=null,a=null;if(!i)if(t.old&&t.old.ts===this.ts&&t.old.zone.equals(n))[s,a]=[t.old.c,t.old.o];else{const l=n.offset(this.ts);s=w3(this.ts,l),i=Number.isNaN(s.year)?new Yi("invalid input"):null,s=i?null:s,a=i?null:l}this._zone=n,this.loc=t.loc||Ce.create(),this.invalid=i,this.weekData=null,this.c=s,this.o=a,this.isLuxonDateTime=!0}static now(){return new St({})}static local(){const[t,n]=E3(arguments),[i,s,a,o,l,d,h]=n;return M3({year:i,month:s,day:a,hour:o,minute:l,second:d,millisecond:h},t)}static utc(){const[t,n]=E3(arguments),[i,s,a,o,l,d,h]=n;return t.zone=xn.utcInstance,M3({year:i,month:s,day:a,hour:o,minute:l,second:d,millisecond:h},t)}static fromJSDate(t,n={}){const i=mM(t)?t.valueOf():NaN;if(Number.isNaN(i))return St.invalid("invalid input");const s=ra(n.zone,Ye.defaultZone);return s.isValid?new St({ts:i,zone:s,loc:Ce.fromObject(n)}):St.invalid(Zd(s))}static fromMillis(t,n={}){if(Ja(t))return t<-y3||t>y3?St.invalid("Timestamp out of range"):new St({ts:t,zone:ra(n.zone,Ye.defaultZone),loc:Ce.fromObject(n)});throw new fi(`fromMillis requires a numerical input, but received a ${typeof t} with value ${t}`)}static fromSeconds(t,n={}){if(Ja(t))return new St({ts:t*1e3,zone:ra(n.zone,Ye.defaultZone),loc:Ce.fromObject(n)});throw new fi("fromSeconds requires a numerical input")}static fromObject(t,n={}){t=t||{};const i=ra(n.zone,Ye.defaultZone);if(!i.isValid)return St.invalid(Zd(i));const s=Ye.now(),a=Qt(n.specificOffset)?i.offset(s):n.specificOffset,o=Ud(t,O3),l=!Qt(o.ordinal),d=!Qt(o.year),h=!Qt(o.month)||!Qt(o.day),f=d||h,m=o.weekYear||o.weekNumber,v=Ce.fromObject(n);if((f||l)&&m)throw new Al("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(h&&l)throw new Al("Can't mix ordinal dates with month/day");const y=m||o.weekday&&!f;let w,x,k=w3(s,a);y?(w=WD,x=RD,k=hf(k)):l?(w=YD,x=HD,k=ff(k)):(w=C3,x=k3);let D=!1;for(const L of w){const W=o[L];Qt(W)?D?o[L]=x[L]:o[L]=k[L]:D=!0}const E=y?LD(o):l?FD(o):v3(o),B=E||_3(o);if(B)return St.invalid(B);const S=y?m3(o):l?g3(o):o,[A,I]=Xd(S,a,i),F=new St({ts:A,zone:i,o:I,loc:v});return o.weekday&&f&&t.weekday!==F.weekday?St.invalid("mismatched weekday",`you can't specify both a weekday of ${o.weekday} and a date of ${F.toISO()}`):F}static fromISO(t,n={}){const[i,s]=sD(t);return Hl(i,s,n,"ISO 8601",t)}static fromRFC2822(t,n={}){const[i,s]=aD(t);return Hl(i,s,n,"RFC 2822",t)}static fromHTTP(t,n={}){const[i,s]=oD(t);return Hl(i,s,n,"HTTP",n)}static fromFormat(t,n,i={}){if(Qt(t)||Qt(n))throw new fi("fromFormat requires an input string and a format");const{locale:s=null,numberingSystem:a=null}=i,o=Ce.fromOpts({locale:s,numberingSystem:a,defaultToEN:!0}),[l,d,h,f]=zD(o,t,n);return f?St.invalid(f):Hl(l,d,i,`format ${n}`,t,h)}static fromString(t,n,i={}){return St.fromFormat(t,n,i)}static fromSQL(t,n={}){const[i,s]=fD(t);return Hl(i,s,n,"SQL",t)}static invalid(t,n=null){if(!t)throw new fi("need to specify a reason the DateTime is invalid");const i=t instanceof Yi?t:new Yi(t,n);if(Ye.throwOnInvalid)throw new GO(i);return new St({invalid:i})}static isDateTime(t){return t&&t.isLuxonDateTime||!1}static parseFormatForOpts(t,n={}){const i=c3(t,Ce.fromObject(n));return i?i.map(s=>s?s.val:null).join(""):null}static expandFormat(t,n={}){return r3(gn.parseFormat(t),Ce.fromObject(n)).map(s=>s.val).join("")}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?mf(this).weekYear:NaN}get weekNumber(){return this.isValid?mf(this).weekNumber:NaN}get weekday(){return this.isValid?mf(this).weekday:NaN}get ordinal(){return this.isValid?ff(this.c).ordinal:NaN}get monthShort(){return this.isValid?Kd.months("short",{locObj:this.loc})[this.month-1]:null}get monthLong(){return this.isValid?Kd.months("long",{locObj:this.loc})[this.month-1]:null}get weekdayShort(){return this.isValid?Kd.weekdays("short",{locObj:this.loc})[this.weekday-1]:null}get weekdayLong(){return this.isValid?Kd.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}get isInLeapYear(){return Pl(this.year)}get daysInMonth(){return Wd(this.year,this.month)}get daysInYear(){return this.isValid?Nl(this.year):NaN}get weeksInWeekYear(){return this.isValid?Yd(this.weekYear):NaN}resolvedLocaleOptions(t={}){const{locale:n,numberingSystem:i,calendar:s}=gn.create(this.loc.clone(t),t).resolvedOptions(this);return{locale:n,numberingSystem:i,outputCalendar:s}}toUTC(t=0,n={}){return this.setZone(xn.instance(t),n)}toLocal(){return this.setZone(Ye.defaultZone)}setZone(t,{keepLocalTime:n=!1,keepCalendarTime:i=!1}={}){if(t=ra(t,Ye.defaultZone),t.equals(this.zone))return this;if(t.isValid){let s=this.ts;if(n||i){const a=t.offset(this.ts),o=this.toObject();[s]=Xd(o,a,t)}return Rl(this,{ts:s,zone:t})}else return St.invalid(Zd(t))}reconfigure({locale:t,numberingSystem:n,outputCalendar:i}={}){const s=this.loc.clone({locale:t,numberingSystem:n,outputCalendar:i});return Rl(this,{loc:s})}setLocale(t){return this.reconfigure({locale:t})}set(t){if(!this.isValid)return this;const n=Ud(t,O3),i=!Qt(n.weekYear)||!Qt(n.weekNumber)||!Qt(n.weekday),s=!Qt(n.ordinal),a=!Qt(n.year),o=!Qt(n.month)||!Qt(n.day),l=a||o,d=n.weekYear||n.weekNumber;if((l||s)&&d)throw new Al("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(o&&s)throw new Al("Can't mix ordinal dates with month/day");let h;i?h=m3({...hf(this.c),...n}):Qt(n.ordinal)?(h={...this.toObject(),...n},Qt(n.day)&&(h.day=Math.min(Wd(h.year,h.month),h.day))):h=g3({...ff(this.c),...n});const[f,m]=Xd(h,this.o,this.zone);return Rl(this,{ts:f,o:m})}plus(t){if(!this.isValid)return this;const n=ne.fromDurationLike(t);return Rl(this,x3(this,n))}minus(t){if(!this.isValid)return this;const n=ne.fromDurationLike(t).negate();return Rl(this,x3(this,n))}startOf(t){if(!this.isValid)return this;const n={},i=ne.normalizeUnit(t);switch(i){case"years":n.month=1;case"quarters":case"months":n.day=1;case"weeks":case"days":n.hour=0;case"hours":n.minute=0;case"minutes":n.second=0;case"seconds":n.millisecond=0;break}if(i==="weeks"&&(n.weekday=1),i==="quarters"){const s=Math.ceil(this.month/3);n.month=(s-1)*3+1}return this.set(n)}endOf(t){return this.isValid?this.plus({[t]:1}).startOf(t).minus(1):this}toFormat(t,n={}){return this.isValid?gn.create(this.loc.redefaultToEN(n)).formatDateTimeFromString(this,t):pf}toLocaleString(t=Nd,n={}){return this.isValid?gn.create(this.loc.clone(n),t).formatDateTime(this):pf}toLocaleParts(t={}){return this.isValid?gn.create(this.loc.clone(t),t).formatDateTimeParts(this):[]}toISO({format:t="extended",suppressSeconds:n=!1,suppressMilliseconds:i=!1,includeOffset:s=!0,extendedZone:a=!1}={}){if(!this.isValid)return null;const o=t==="extended";let l=gf(this,o);return l+="T",l+=S3(this,o,n,i,s,a),l}toISODate({format:t="extended"}={}){return this.isValid?gf(this,t==="extended"):null}toISOWeekDate(){return Jd(this,"kkkk-'W'WW-c")}toISOTime({suppressMilliseconds:t=!1,suppressSeconds:n=!1,includeOffset:i=!0,includePrefix:s=!1,extendedZone:a=!1,format:o="extended"}={}){return this.isValid?(s?"T":"")+S3(this,o==="extended",n,t,i,a):null}toRFC2822(){return Jd(this,"EEE, dd LLL yyyy HH:mm:ss ZZZ",!1)}toHTTP(){return Jd(this.toUTC(),"EEE, dd LLL yyyy HH:mm:ss 'GMT'")}toSQLDate(){return this.isValid?gf(this,!0):null}toSQLTime({includeOffset:t=!0,includeZone:n=!1,includeOffsetSpace:i=!0}={}){let s="HH:mm:ss.SSS";return(n||t)&&(i&&(s+=" "),n?s+="z":t&&(s+="ZZ")),Jd(this,s,!0)}toSQL(t={}){return this.isValid?`${this.toSQLDate()} ${this.toSQLTime(t)}`:null}toString(){return this.isValid?this.toISO():pf}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",i={}){if(!this.isValid||!t.isValid)return ne.invalid("created by diffing an invalid DateTime");const s={locale:this.locale,numberingSystem:this.numberingSystem,...i},a=gM(n).map(ne.normalizeUnit),o=t.valueOf()>this.valueOf(),l=o?this:t,d=o?t:this,h=SD(l,d,a,s);return o?h.negate():h}diffNow(t="milliseconds",n={}){return this.diff(St.now(),t,n)}until(t){return this.isValid?Ae.fromDateTimes(this,t):this}hasSame(t,n){if(!this.isValid)return!1;const i=t.valueOf(),s=this.setZone(t.zone,{keepLocalTime:!0});return s.startOf(n)<=i&&i<=s.endOf(n)}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||St.fromObject({},{zone:this.zone}),i=t.padding?this<n?-t.padding:t.padding:0;let s=["years","months","days","hours","minutes","seconds"],a=t.unit;return Array.isArray(t.unit)&&(s=t.unit,a=void 0),D3(n,this.plus(i),{...t,numeric:"always",units:s,unit:a})}toRelativeCalendar(t={}){return this.isValid?D3(t.base||St.fromObject({},{zone:this.zone}),this,{...t,numeric:"auto",units:["years","months","days"],calendary:!0}):null}static min(...t){if(!t.every(St.isDateTime))throw new fi("min requires all arguments be DateTimes");return Pv(t,n=>n.valueOf(),Math.min)}static max(...t){if(!t.every(St.isDateTime))throw new fi("max requires all arguments be DateTimes");return Pv(t,n=>n.valueOf(),Math.max)}static fromFormatExplain(t,n,i={}){const{locale:s=null,numberingSystem:a=null}=i,o=Ce.fromOpts({locale:s,numberingSystem:a,defaultToEN:!0});return l3(o,t,n)}static fromStringExplain(t,n,i={}){return St.fromFormatExplain(t,n,i)}static get DATE_SHORT(){return Nd}static get DATE_MED(){return rv}static get DATE_MED_WITH_WEEKDAY(){return XO}static get DATE_FULL(){return lv}static get DATE_HUGE(){return cv}static get TIME_SIMPLE(){return dv}static get TIME_WITH_SECONDS(){return uv}static get TIME_WITH_SHORT_OFFSET(){return hv}static get TIME_WITH_LONG_OFFSET(){return fv}static get TIME_24_SIMPLE(){return pv}static get TIME_24_WITH_SECONDS(){return mv}static get TIME_24_WITH_SHORT_OFFSET(){return gv}static get TIME_24_WITH_LONG_OFFSET(){return vv}static get DATETIME_SHORT(){return _v}static get DATETIME_SHORT_WITH_SECONDS(){return yv}static get DATETIME_MED(){return bv}static get DATETIME_MED_WITH_SECONDS(){return wv}static get DATETIME_MED_WITH_WEEKDAY(){return JO}static get DATETIME_FULL(){return xv}static get DATETIME_FULL_WITH_SECONDS(){return Sv}static get DATETIME_HUGE(){return kv}static get DATETIME_HUGE_WITH_SECONDS(){return Cv}}function Wl(e){if(St.isDateTime(e))return e;if(e&&e.valueOf&&Ja(e.valueOf()))return St.fromJSDate(e);if(e&&typeof e=="object")return St.fromObject(e);throw new fi(`Unknown datetime argument: ${e}, of type ${typeof e}`)}function Yl(e){var t=e.getBoundingClientRect();return{width:t.width,height:t.height,top:t.top,right:t.right,bottom:t.bottom,left:t.left,x:t.left,y:t.top}}function gi(e){if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t?t.defaultView:window}return e}function vf(e){var t=gi(e),n=t.pageXOffset,i=t.pageYOffset;return{scrollLeft:n,scrollTop:i}}function jl(e){var t=gi(e).Element;return e instanceof t||e instanceof Element}function Gi(e){var t=gi(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function jD(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function UD(e){return e===gi(e)||!Gi(e)?vf(e):jD(e)}function Es(e){return e?(e.nodeName||"").toLowerCase():null}function da(e){return(jl(e)?e.ownerDocument:e.document).documentElement}function T3(e){return Yl(da(e)).left+vf(e).scrollLeft}function $a(e){return gi(e).getComputedStyle(e)}function _f(e){var t=$a(e),n=t.overflow,i=t.overflowX,s=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+s+i)}function I3(e,t,n){n===void 0&&(n=!1);var i=da(t),s=Yl(e),a={scrollLeft:0,scrollTop:0},o={x:0,y:0};return n||((Es(t)!=="body"||_f(i))&&(a=UD(t)),Gi(t)?(o=Yl(t),o.x+=t.clientLeft,o.y+=t.clientTop):i&&(o.x=T3(i))),{x:s.left+a.scrollLeft-o.x,y:s.top+a.scrollTop-o.y,width:s.width,height:s.height}}function yf(e){return{x:e.offsetLeft,y:e.offsetTop,width:e.offsetWidth,height:e.offsetHeight}}function A3(e){return Es(e)==="html"?e:e.assignedSlot||e.parentNode||e.host||da(e)}function V3(e){return["html","body","#document"].indexOf(Es(e))>=0?e.ownerDocument.body:Gi(e)&&_f(e)?e:V3(A3(e))}function Ul(e,t){t===void 0&&(t=[]);var n=V3(e),i=Es(n)==="body",s=gi(n),a=i?[s].concat(s.visualViewport||[],_f(n)?n:[]):n,o=t.concat(a);return i?o:o.concat(Ul(A3(a)))}function GD(e){return["table","td","th"].indexOf(Es(e))>=0}function B3(e){return!Gi(e)||$a(e).position==="fixed"?null:e.offsetParent}function Gl(e){for(var t=gi(e),n=B3(e);n&&GD(n);)n=B3(n);return n&&Es(n)==="body"&&$a(n).position==="static"?t:n||t}var vi="top",Ki="bottom",Zi="right",_i="left",Qd="auto",Kl=[vi,Ki,Zi,_i],Jo="start",bf="end",KD="clippingParents",P3="viewport",Zl="popper",ZD="reference",N3=Kl.reduce(function(e,t){return e.concat([t+"-"+Jo,t+"-"+bf])},[]),z3=[].concat(Kl,[Qd]).reduce(function(e,t){return e.concat([t,t+"-"+Jo,t+"-"+bf])},[]),XD="beforeRead",JD="read",QD="afterRead",qD="beforeMain",$D="main",tE="afterMain",eE="beforeWrite",nE="write",iE="afterWrite",wf=[XD,JD,QD,qD,$D,tE,eE,nE,iE];function sE(e){var t=new Map,n=new Set,i=[];e.forEach(function(a){t.set(a.name,a)});function s(a){n.add(a.name);var o=[].concat(a.requires||[],a.requiresIfExists||[]);o.forEach(function(l){if(!n.has(l)){var d=t.get(l);d&&s(d)}}),i.push(a)}return e.forEach(function(a){n.has(a.name)||s(a)}),i}function aE(e){var t=sE(e);return wf.reduce(function(n,i){return n.concat(t.filter(function(s){return s.phase===i}))},[])}function oE(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function ua(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];return[].concat(n).reduce(function(s,a){return s.replace(/%s/,a)},e)}var to='Popper: modifier "%s" provided an invalid %s property, expected %s but got %s',rE='Popper: modifier "%s" requires "%s", but "%s" modifier is not available',lE=["name","enabled","phase","fn","effect","requires","options"];function cE(e){e.forEach(function(t){Object.keys(t).forEach(function(n){switch(n){case"name":typeof t.name!="string"&&console.error(ua(to,String(t.name),'"name"','"string"','"'+String(t.name)+'"'));break;case"enabled":typeof t.enabled!="boolean"&&console.error(ua(to,t.name,'"enabled"','"boolean"','"'+String(t.enabled)+'"'));case"phase":wf.indexOf(t.phase)<0&&console.error(ua(to,t.name,'"phase"',"either "+wf.join(", "),'"'+String(t.phase)+'"'));break;case"fn":typeof t.fn!="function"&&console.error(ua(to,t.name,'"fn"','"function"','"'+String(t.fn)+'"'));break;case"effect":typeof t.effect!="function"&&console.error(ua(to,t.name,'"effect"','"function"','"'+String(t.fn)+'"'));break;case"requires":Array.isArray(t.requires)||console.error(ua(to,t.name,'"requires"','"array"','"'+String(t.requires)+'"'));break;case"requiresIfExists":Array.isArray(t.requiresIfExists)||console.error(ua(to,t.name,'"requiresIfExists"','"array"','"'+String(t.requiresIfExists)+'"'));break;case"options":case"data":break;default:console.error('PopperJS: an invalid property has been provided to the "'+t.name+'" modifier, valid properties are '+lE.map(function(i){return'"'+i+'"'}).join(", ")+'; but "'+n+'" was provided.')}t.requires&&t.requires.forEach(function(i){e.find(function(s){return s.name===i})==null&&console.error(ua(rE,String(t.name),i,i))})})})}function dE(e,t){var n=new Set;return e.filter(function(i){var s=t(i);if(!n.has(s))return n.add(s),!0})}function Xi(e){return e.split("-")[0]}function uE(e){var t=e.reduce(function(n,i){var s=n[i.name];return n[i.name]=s?Object.assign({},s,{},i,{options:Object.assign({},s.options,{},i.options),data:Object.assign({},s.data,{},i.data)}):i,n},{});return Object.keys(t).map(function(n){return t[n]})}var L3="Popper: Invalid reference or popper argument provided. They must be either a DOM element or virtual element.",hE="Popper: An infinite loop in the modifiers cycle has been detected! The cycle has been interrupted to prevent a browser crash.",F3={placement:"bottom",modifiers:[],strategy:"absolute"};function R3(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return!t.some(function(i){return!(i&&typeof i.getBoundingClientRect=="function")})}function fE(e){e===void 0&&(e={});var t=e,n=t.defaultModifiers,i=n===void 0?[]:n,s=t.defaultOptions,a=s===void 0?F3:s;return function(l,d,h){h===void 0&&(h=a);var f={placement:"bottom",orderedModifiers:[],options:Object.assign({},F3,{},a),modifiersData:{},elements:{reference:l,popper:d},attributes:{},styles:{}},m=[],v=!1,y={state:f,setOptions:function(D){x(),f.options=Object.assign({},a,{},f.options,{},D),f.scrollParents={reference:jl(l)?Ul(l):l.contextElement?Ul(l.contextElement):[],popper:Ul(d)};var E=aE(uE([].concat(i,f.options.modifiers)));if(f.orderedModifiers=E.filter(function(X){return X.enabled}),process.env.NODE_ENV!=="production"){var B=dE([].concat(E,f.options.modifiers),function(X){var Z=X.name;return Z});if(cE(B),Xi(f.options.placement)===Qd){var S=f.orderedModifiers.find(function(X){var Z=X.name;return Z==="flip"});S||console.error(['Popper: "auto" placements require the "flip" modifier be',"present and enabled to work."].join(" "))}var A=$a(d),I=A.marginTop,F=A.marginRight,L=A.marginBottom,W=A.marginLeft;[I,F,L,W].some(function(X){return parseFloat(X)})&&console.warn(['Popper: CSS "margin" styles cannot be used to apply padding',"between the popper and its reference element or boundary.","To replicate margin, use the `offset` modifier, as well as","the `padding` option in the `preventOverflow` and `flip`","modifiers."].join(" "))}return w(),y.update()},forceUpdate:function(){if(!v){var D=f.elements,E=D.reference,B=D.popper;if(!R3(E,B)){process.env.NODE_ENV!=="production"&&console.error(L3);return}f.rects={reference:I3(E,Gl(B),f.options.strategy==="fixed"),popper:yf(B)},f.reset=!1,f.placement=f.options.placement,f.orderedModifiers.forEach(function(Z){return f.modifiersData[Z.name]=Object.assign({},Z.data)});for(var S=0,A=0;A<f.orderedModifiers.length;A++){if(process.env.NODE_ENV!=="production"&&(S+=1,S>100)){console.error(hE);break}if(f.reset===!0){f.reset=!1,A=-1;continue}var I=f.orderedModifiers[A],F=I.fn,L=I.options,W=L===void 0?{}:L,X=I.name;typeof F=="function"&&(f=F({state:f,options:W,name:X,instance:y})||f)}}},update:oE(function(){return new Promise(function(k){y.forceUpdate(),k(f)})}),destroy:function(){x(),v=!0}};if(!R3(l,d))return process.env.NODE_ENV!=="production"&&console.error(L3),y;y.setOptions(h).then(function(k){!v&&h.onFirstUpdate&&h.onFirstUpdate(k)});function w(){f.orderedModifiers.forEach(function(k){var D=k.name,E=k.options,B=E===void 0?{}:E,S=k.effect;if(typeof S=="function"){var A=S({state:f,name:D,instance:y,options:B}),I=function(){};m.push(A||I)}})}function x(){m.forEach(function(k){return k()}),m=[]}return y}}var qd={passive:!0};function pE(e){var t=e.state,n=e.instance,i=e.options,s=i.scroll,a=s===void 0?!0:s,o=i.resize,l=o===void 0?!0:o,d=gi(t.elements.popper),h=[].concat(t.scrollParents.reference,t.scrollParents.popper);return a&&h.forEach(function(f){f.addEventListener("scroll",n.update,qd)}),l&&d.addEventListener("resize",n.update,qd),function(){a&&h.forEach(function(f){f.removeEventListener("scroll",n.update,qd)}),l&&d.removeEventListener("resize",n.update,qd)}}const mE={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:pE,data:{}};function Xl(e){return e.split("-")[1]}function xf(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function H3(e){var t=e.reference,n=e.element,i=e.placement,s=i?Xi(i):null,a=i?Xl(i):null,o=t.x+t.width/2-n.width/2,l=t.y+t.height/2-n.height/2,d;switch(s){case vi:d={x:o,y:t.y-n.height};break;case Ki:d={x:o,y:t.y+t.height};break;case Zi:d={x:t.x+t.width,y:l};break;case _i:d={x:t.x-n.width,y:l};break;default:d={x:t.x,y:t.y}}var h=s?xf(s):null;if(h!=null){var f=h==="y"?"height":"width";switch(a){case Jo:d[h]=Math.floor(d[h])-Math.floor(t[f]/2-n[f]/2);break;case bf:d[h]=Math.floor(d[h])+Math.ceil(t[f]/2-n[f]/2);break}}return d}function gE(e){var t=e.state,n=e.name;t.modifiersData[n]=H3({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}const vE={name:"popperOffsets",enabled:!0,phase:"read",fn:gE,data:{}};var _E={top:"auto",right:"auto",bottom:"auto",left:"auto"};function yE(e){var t=e.x,n=e.y,i=window,s=i.devicePixelRatio||1;return{x:Math.round(t*s)/s||0,y:Math.round(n*s)/s||0}}function W3(e){var t,n=e.popper,i=e.popperRect,s=e.placement,a=e.offsets,o=e.position,l=e.gpuAcceleration,d=e.adaptive,h=yE(a),f=h.x,m=h.y,v=a.hasOwnProperty("x"),y=a.hasOwnProperty("y"),w=_i,x=vi,k=window;if(d){var D=Gl(n);D===gi(n)&&(D=da(n)),s===vi&&(x=Ki,m-=D.clientHeight-i.height,m*=l?1:-1),s===_i&&(w=Zi,f-=D.clientWidth-i.width,f*=l?1:-1)}var E=Object.assign({position:o},d&&_E);if(l){var B;return Object.assign({},E,(B={},B[x]=y?"0":"",B[w]=v?"0":"",B.transform=(k.devicePixelRatio||1)<2?"translate("+f+"px, "+m+"px)":"translate3d("+f+"px, "+m+"px, 0)",B))}return Object.assign({},E,(t={},t[x]=y?m+"px":"",t[w]=v?f+"px":"",t.transform="",t))}function bE(e){var t=e.state,n=e.options,i=n.gpuAcceleration,s=i===void 0?!0:i,a=n.adaptive,o=a===void 0?!0:a;if(process.env.NODE_ENV!=="production"){var l=$a(t.elements.popper).transitionProperty||"";o&&["transform","top","right","bottom","left"].some(function(h){return l.indexOf(h)>=0})&&console.warn(["Popper: Detected CSS transitions on at least one of the following",'CSS properties: "transform", "top", "right", "bottom", "left".',`
|
|
43
43
|
|
|
44
44
|
`,'Disable the "computeStyles" modifier\'s `adaptive` option to allow',"for smooth transitions, or remove these properties from the CSS","transition declaration on the popper element if only transitioning","opacity or background-color for example.",`
|
|
45
45
|
|