@deskhero/dh_ui 1.41.6 → 1.41.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/dh_ui.es.js
CHANGED
|
@@ -27227,13 +27227,12 @@ const _sfc_main$6 = defineComponent({
|
|
|
27227
27227
|
zIndex: {
|
|
27228
27228
|
type: Number,
|
|
27229
27229
|
default: 2
|
|
27230
|
+
},
|
|
27231
|
+
show: {
|
|
27232
|
+
type: Boolean,
|
|
27233
|
+
default: false
|
|
27230
27234
|
}
|
|
27231
27235
|
},
|
|
27232
|
-
data() {
|
|
27233
|
-
return {
|
|
27234
|
-
show: true
|
|
27235
|
-
};
|
|
27236
|
-
},
|
|
27237
27236
|
mounted() {
|
|
27238
27237
|
if (this.dismissible && ["toast", "bottom-message"].includes(this.notificationType)) {
|
|
27239
27238
|
setTimeout(() => {
|
|
@@ -27244,7 +27243,6 @@ const _sfc_main$6 = defineComponent({
|
|
|
27244
27243
|
emits: ["action"],
|
|
27245
27244
|
methods: {
|
|
27246
27245
|
close(confirmation = false) {
|
|
27247
|
-
this.show = false;
|
|
27248
27246
|
this.$emit("action", confirmation);
|
|
27249
27247
|
},
|
|
27250
27248
|
limitTitle(_title, _type) {
|
package/dist/dh_ui.umd.js
CHANGED
|
@@ -16,4 +16,4 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
16
16
|
* Released under the MIT License
|
|
17
17
|
*/class t0{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(e,n,i,a){const r=n.listeners[a],s=n.duration;r.forEach(M=>M({chart:e,initial:n.initial,numSteps:s,currentStep:Math.min(i-n.start,s)}))}_refresh(){this._request||(this._running=!0,this._request=tc.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(e=Date.now()){let n=0;this._charts.forEach((i,a)=>{if(!i.running||!i.items.length)return;const r=i.items;let s=r.length-1,M=!1,l;for(;s>=0;--s)l=r[s],l._active?(l._total>i.duration&&(i.duration=l._total),l.tick(e),M=!0):(r[s]=r[r.length-1],r.pop());M&&(a.draw(),this._notify(a,i,e,"progress")),r.length||(i.running=!1,this._notify(a,i,e,"complete"),i.initial=!1),n+=r.length}),this._lastDate=e,n===0&&(this._running=!1)}_getAnims(e){const n=this._charts;let i=n.get(e);return i||(i={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},n.set(e,i)),i}listen(e,n,i){this._getAnims(e).listeners[n].push(i)}add(e,n){!n||!n.length||this._getAnims(e).items.push(...n)}has(e){return this._getAnims(e).items.length>0}start(e){const n=this._charts.get(e);!n||(n.running=!0,n.start=Date.now(),n.duration=n.items.reduce((i,a)=>Math.max(i,a._duration),0),this._refresh())}running(e){if(!this._running)return!1;const n=this._charts.get(e);return!(!n||!n.running||!n.items.length)}stop(e){const n=this._charts.get(e);if(!n||!n.items.length)return;const i=n.items;let a=i.length-1;for(;a>=0;--a)i[a].cancel();n.items=[],this._notify(e,n,Date.now(),"complete")}remove(e){return this._charts.delete(e)}}var Ct=new t0;const Yc="transparent",n0={boolean(t,e,n){return n>.5?e:t},color(t,e,n){const i=Ic(t||Yc),a=i.valid&&Ic(e||Yc);return a&&a.valid?a.mix(i,n).hexString():e},number(t,e,n){return t+(e-t)*n}};class i0{constructor(e,n,i,a){const r=n[i];a=qa([e.to,a,r,e.from]);const s=qa([e.from,r,a]);this._active=!0,this._fn=e.fn||n0[e.type||typeof s],this._easing=Bn[e.easing]||Bn.linear,this._start=Math.floor(Date.now()+(e.delay||0)),this._duration=this._total=Math.floor(e.duration),this._loop=!!e.loop,this._target=n,this._prop=i,this._from=s,this._to=a,this._promises=void 0}active(){return this._active}update(e,n,i){if(this._active){this._notify(!1);const a=this._target[this._prop],r=i-this._start,s=this._duration-r;this._start=i,this._duration=Math.floor(Math.max(s,e.duration)),this._total+=r,this._loop=!!e.loop,this._to=qa([e.to,n,a,e.from]),this._from=qa([e.from,a,n])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(e){const n=e-this._start,i=this._duration,a=this._prop,r=this._from,s=this._loop,M=this._to;let l;if(this._active=r!==M&&(s||n<i),!this._active){this._target[a]=M,this._notify(!0);return}if(n<0){this._target[a]=r;return}l=n/i%2,l=s&&l>1?2-l:l,l=this._easing(Math.min(1,Math.max(0,l))),this._target[a]=this._fn(r,M,l)}wait(){const e=this._promises||(this._promises=[]);return new Promise((n,i)=>{e.push({res:n,rej:i})})}_notify(e){const n=e?"res":"rej",i=this._promises||[];for(let a=0;a<i.length;a++)i[a][n]()}}const a0=["x","y","borderWidth","radius","tension"],r0=["color","borderColor","backgroundColor"];oe.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0});const o0=Object.keys(oe.animation);oe.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:t=>t!=="onProgress"&&t!=="onComplete"&&t!=="fn"}),oe.set("animations",{colors:{type:"color",properties:r0},numbers:{type:"number",properties:a0}}),oe.describe("animations",{_fallback:"animation"}),oe.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:t=>t|0}}}});class Uc{constructor(e,n){this._chart=e,this._properties=new Map,this.configure(n)}configure(e){if(!Me(e))return;const n=this._properties;Object.getOwnPropertyNames(e).forEach(i=>{const a=e[i];if(!Me(a))return;const r={};for(const s of o0)r[s]=a[s];(pe(a.properties)&&a.properties||[i]).forEach(s=>{(s===i||!n.has(s))&&n.set(s,r)})})}_animateOptions(e,n){const i=n.options,a=M0(e,i);if(!a)return[];const r=this._createAnimations(a,i);return i.$shared&&s0(e.options.$animations,i).then(()=>{e.options=i},()=>{}),r}_createAnimations(e,n){const i=this._properties,a=[],r=e.$animations||(e.$animations={}),s=Object.keys(n),M=Date.now();let l;for(l=s.length-1;l>=0;--l){const u=s[l];if(u.charAt(0)==="$")continue;if(u==="options"){a.push(...this._animateOptions(e,n));continue}const c=n[u];let g=r[u];const y=i.get(u);if(g)if(y&&g.active()){g.update(y,c,M);continue}else g.cancel();if(!y||!y.duration){e[u]=c;continue}r[u]=g=new i0(y,e,u,c),a.push(g)}return a}update(e,n){if(this._properties.size===0){Object.assign(e,n);return}const i=this._createAnimations(e,n);if(i.length)return Ct.add(this._chart,i),!0}}function s0(t,e){const n=[],i=Object.keys(e);for(let a=0;a<i.length;a++){const r=t[i[a]];r&&r.active()&&n.push(r.wait())}return Promise.all(n)}function M0(t,e){if(!e)return;let n=t.options;if(!n){t.options=e;return}return n.$shared&&(t.options=n=Object.assign({},n,{$shared:!1,$animations:{}})),n}function Pc(t,e){const n=t&&t.options||{},i=n.reverse,a=n.min===void 0?e:0,r=n.max===void 0?e:0;return{start:i?r:a,end:i?a:r}}function l0(t,e,n){if(n===!1)return!1;const i=Pc(t,n),a=Pc(e,n);return{top:a.end,right:i.end,bottom:a.start,left:i.start}}function u0(t){let e,n,i,a;return Me(t)?(e=t.top,n=t.right,i=t.bottom,a=t.left):e=n=i=a=t,{top:e,right:n,bottom:i,left:a,disabled:t===!1}}function Bc(t,e){const n=[],i=t._getSortedDatasetMetas(e);let a,r;for(a=0,r=i.length;a<r;++a)n.push(i[a].index);return n}function Rc(t,e,n,i={}){const a=t.keys,r=i.mode==="single";let s,M,l,u;if(e!==null){for(s=0,M=a.length;s<M;++s){if(l=+a[s],l===n){if(i.all)continue;break}u=t.values[l],Be(u)&&(r||e===0||ht(e)===ht(u))&&(e+=u)}return e}}function c0(t){const e=Object.keys(t),n=new Array(e.length);let i,a,r;for(i=0,a=e.length;i<a;++i)r=e[i],n[i]={x:r,y:t[r]};return n}function Zc(t,e){const n=t&&t.options.stacked;return n||n===void 0&&e.stack!==void 0}function g0(t,e,n){return`${t.id}.${e.id}.${n.stack||n.type}`}function N0(t){const{min:e,max:n,minDefined:i,maxDefined:a}=t.getUserBounds();return{min:i?e:Number.NEGATIVE_INFINITY,max:a?n:Number.POSITIVE_INFINITY}}function y0(t,e,n){const i=t[e]||(t[e]={});return i[n]||(i[n]={})}function Vc(t,e,n,i){for(const a of e.getMatchingVisibleMetas(i).reverse()){const r=t[a.index];if(n&&r>0||!n&&r<0)return a.index}return null}function Gc(t,e){const{chart:n,_cachedMeta:i}=t,a=n._stacks||(n._stacks={}),{iScale:r,vScale:s,index:M}=i,l=r.axis,u=s.axis,c=g0(r,s,i),g=e.length;let y;for(let j=0;j<g;++j){const d=e[j],{[l]:D,[u]:f}=d,N=d._stacks||(d._stacks={});y=N[u]=y0(a,c,D),y[M]=f,y._top=Vc(y,s,!0,i.type),y._bottom=Vc(y,s,!1,i.type)}}function $s(t,e){const n=t.scales;return Object.keys(n).filter(i=>n[i].axis===e).shift()}function j0(t,e){return Gt(t,{active:!1,dataset:void 0,datasetIndex:e,index:e,mode:"default",type:"dataset"})}function d0(t,e,n){return Gt(t,{active:!1,dataIndex:e,parsed:void 0,raw:void 0,element:n,index:e,mode:"default",type:"data"})}function $n(t,e){const n=t.controller.index,i=t.vScale&&t.vScale.axis;if(!!i){e=e||t._parsed;for(const a of e){const r=a._stacks;if(!r||r[i]===void 0||r[i][n]===void 0)return;delete r[i][n]}}}const Hs=t=>t==="reset"||t==="none",Wc=(t,e)=>e?t:Object.assign({},t),I0=(t,e,n)=>t&&!e.hidden&&e._stacked&&{keys:Bc(n,!0),values:null};class Nt{constructor(e,n){this.chart=e,this._ctx=e.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.initialize()}initialize(){const e=this._cachedMeta;this.configure(),this.linkScales(),e._stacked=Zc(e.vScale,e),this.addElements()}updateIndex(e){this.index!==e&&$n(this._cachedMeta),this.index=e}linkScales(){const e=this.chart,n=this._cachedMeta,i=this.getDataset(),a=(g,y,j,d)=>g==="x"?y:g==="r"?d:j,r=n.xAxisID=le(i.xAxisID,$s(e,"x")),s=n.yAxisID=le(i.yAxisID,$s(e,"y")),M=n.rAxisID=le(i.rAxisID,$s(e,"r")),l=n.indexAxis,u=n.iAxisID=a(l,r,s,M),c=n.vAxisID=a(l,s,r,M);n.xScale=this.getScaleForId(r),n.yScale=this.getScaleForId(s),n.rScale=this.getScaleForId(M),n.iScale=this.getScaleForId(u),n.vScale=this.getScaleForId(c)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(e){return this.chart.scales[e]}_getOtherScale(e){const n=this._cachedMeta;return e===n.iScale?n.vScale:n.iScale}reset(){this._update("reset")}_destroy(){const e=this._cachedMeta;this._data&&qu(this._data,this),e._stacked&&$n(e)}_dataCheck(){const e=this.getDataset(),n=e.data||(e.data=[]),i=this._data;if(Me(n))this._data=c0(n);else if(i!==n){if(i){qu(i,this);const a=this._cachedMeta;$n(a),a._parsed=[]}n&&Object.isExtensible(n)&&wz(n,this),this._syncList=[],this._data=n}}addElements(){const e=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(e.dataset=new this.datasetElementType)}buildOrUpdateElements(e){const n=this._cachedMeta,i=this.getDataset();let a=!1;this._dataCheck();const r=n._stacked;n._stacked=Zc(n.vScale,n),n.stack!==i.stack&&(a=!0,$n(n),n.stack=i.stack),this._resyncElements(e),(a||r!==n._stacked)&&Gc(this,n._parsed)}configure(){const e=this.chart.config,n=e.datasetScopeKeys(this._type),i=e.getOptionScopes(this.getDataset(),n,!0);this.options=e.createResolver(i,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(e,n){const{_cachedMeta:i,_data:a}=this,{iScale:r,_stacked:s}=i,M=r.axis;let l=e===0&&n===a.length?!0:i._sorted,u=e>0&&i._parsed[e-1],c,g,y;if(this._parsing===!1)i._parsed=a,i._sorted=!0,y=a;else{pe(a[e])?y=this.parseArrayData(i,a,e,n):Me(a[e])?y=this.parseObjectData(i,a,e,n):y=this.parsePrimitiveData(i,a,e,n);const j=()=>g[M]===null||u&&g[M]<u[M];for(c=0;c<n;++c)i._parsed[c+e]=g=y[c],l&&(j()&&(l=!1),u=g);i._sorted=l}s&&Gc(this,y)}parsePrimitiveData(e,n,i,a){const{iScale:r,vScale:s}=e,M=r.axis,l=s.axis,u=r.getLabels(),c=r===s,g=new Array(a);let y,j,d;for(y=0,j=a;y<j;++y)d=y+i,g[y]={[M]:c||r.parse(u[d],d),[l]:s.parse(n[d],d)};return g}parseArrayData(e,n,i,a){const{xScale:r,yScale:s}=e,M=new Array(a);let l,u,c,g;for(l=0,u=a;l<u;++l)c=l+i,g=n[c],M[l]={x:r.parse(g[0],c),y:s.parse(g[1],c)};return M}parseObjectData(e,n,i,a){const{xScale:r,yScale:s}=e,{xAxisKey:M="x",yAxisKey:l="y"}=this._parsing,u=new Array(a);let c,g,y,j;for(c=0,g=a;c<g;++c)y=c+i,j=n[y],u[c]={x:r.parse(Bt(j,M),y),y:s.parse(Bt(j,l),y)};return u}getParsed(e){return this._cachedMeta._parsed[e]}getDataElement(e){return this._cachedMeta.data[e]}applyStack(e,n,i){const a=this.chart,r=this._cachedMeta,s=n[e.axis],M={keys:Bc(a,!0),values:n._stacks[e.axis]};return Rc(M,s,r.index,{mode:i})}updateRangeFromParsed(e,n,i,a){const r=i[n.axis];let s=r===null?NaN:r;const M=a&&i._stacks[n.axis];a&&M&&(a.values=M,s=Rc(a,r,this._cachedMeta.index)),e.min=Math.min(e.min,s),e.max=Math.max(e.max,s)}getMinMax(e,n){const i=this._cachedMeta,a=i._parsed,r=i._sorted&&e===i.iScale,s=a.length,M=this._getOtherScale(e),l=I0(n,i,this.chart),u={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:c,max:g}=N0(M);let y,j;function d(){j=a[y];const D=j[M.axis];return!Be(j[e.axis])||c>D||g<D}for(y=0;y<s&&!(!d()&&(this.updateRangeFromParsed(u,e,j,l),r));++y);if(r){for(y=s-1;y>=0;--y)if(!d()){this.updateRangeFromParsed(u,e,j,l);break}}return u}getAllParsedValues(e){const n=this._cachedMeta._parsed,i=[];let a,r,s;for(a=0,r=n.length;a<r;++a)s=n[a][e.axis],Be(s)&&i.push(s);return i}getMaxOverflow(){return!1}getLabelAndValue(e){const n=this._cachedMeta,i=n.iScale,a=n.vScale,r=this.getParsed(e);return{label:i?""+i.getLabelForValue(r[i.axis]):"",value:a?""+a.getLabelForValue(r[a.axis]):""}}_update(e){const n=this._cachedMeta;this.update(e||"default"),n._clip=u0(le(this.options.clip,l0(n.xScale,n.yScale,this.getMaxOverflow())))}update(e){}draw(){const e=this._ctx,n=this.chart,i=this._cachedMeta,a=i.data||[],r=n.chartArea,s=[],M=this._drawStart||0,l=this._drawCount||a.length-M,u=this.options.drawActiveElementsOnTop;let c;for(i.dataset&&i.dataset.draw(e,r,M,l),c=M;c<M+l;++c){const g=a[c];g.hidden||(g.active&&u?s.push(g):g.draw(e,r))}for(c=0;c<s.length;++c)s[c].draw(e,r)}getStyle(e,n){const i=n?"active":"default";return e===void 0&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(i):this.resolveDataElementOptions(e||0,i)}getContext(e,n,i){const a=this.getDataset();let r;if(e>=0&&e<this._cachedMeta.data.length){const s=this._cachedMeta.data[e];r=s.$context||(s.$context=d0(this.getContext(),e,s)),r.parsed=this.getParsed(e),r.raw=a.data[e],r.index=r.dataIndex=e}else r=this.$context||(this.$context=j0(this.chart.getContext(),this.index)),r.dataset=a,r.index=r.datasetIndex=this.index;return r.active=!!n,r.mode=i,r}resolveDatasetElementOptions(e){return this._resolveElementOptions(this.datasetElementType.id,e)}resolveDataElementOptions(e,n){return this._resolveElementOptions(this.dataElementType.id,n,e)}_resolveElementOptions(e,n="default",i){const a=n==="active",r=this._cachedDataOpts,s=e+"-"+n,M=r[s],l=this.enableOptionSharing&&it(i);if(M)return Wc(M,l);const u=this.chart.config,c=u.datasetElementScopeKeys(this._type,e),g=a?[`${e}Hover`,"hover",e,""]:[e,""],y=u.getOptionScopes(this.getDataset(),c),j=Object.keys(oe.elements[e]),d=()=>this.getContext(i,a),D=u.resolveNamedOptions(y,j,d,g);return D.$shared&&(D.$shared=l,r[s]=Object.freeze(Wc(D,l))),D}_resolveAnimations(e,n,i){const a=this.chart,r=this._cachedDataOpts,s=`animation-${n}`,M=r[s];if(M)return M;let l;if(a.options.animation!==!1){const c=this.chart.config,g=c.datasetAnimationScopeKeys(this._type,n),y=c.getOptionScopes(this.getDataset(),g);l=c.createResolver(y,this.getContext(e,i,n))}const u=new Uc(a,l&&l.animations);return l&&l._cacheable&&(r[s]=Object.freeze(u)),u}getSharedOptions(e){if(!!e.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},e))}includeOptions(e,n){return!n||Hs(e)||this.chart._animationsDisabled}_getSharedOptions(e,n){const i=this.resolveDataElementOptions(e,n),a=this._sharedOptions,r=this.getSharedOptions(i),s=this.includeOptions(n,r)||r!==a;return this.updateSharedOptions(r,n,i),{sharedOptions:r,includeOptions:s}}updateElement(e,n,i,a){Hs(a)?Object.assign(e,i):this._resolveAnimations(n,a).update(e,i)}updateSharedOptions(e,n,i){e&&!Hs(n)&&this._resolveAnimations(void 0,n).update(e,i)}_setStyle(e,n,i,a){e.active=a;const r=this.getStyle(n,a);this._resolveAnimations(n,i,a).update(e,{options:!a&&this.getSharedOptions(r)||r})}removeHoverStyle(e,n,i){this._setStyle(e,i,"active",!1)}setHoverStyle(e,n,i){this._setStyle(e,i,"active",!0)}_removeDatasetHoverStyle(){const e=this._cachedMeta.dataset;e&&this._setStyle(e,void 0,"active",!1)}_setDatasetHoverStyle(){const e=this._cachedMeta.dataset;e&&this._setStyle(e,void 0,"active",!0)}_resyncElements(e){const n=this._data,i=this._cachedMeta.data;for(const[M,l,u]of this._syncList)this[M](l,u);this._syncList=[];const a=i.length,r=n.length,s=Math.min(r,a);s&&this.parse(0,s),r>a?this._insertElements(a,r-a,e):r<a&&this._removeElements(r,a-r)}_insertElements(e,n,i=!0){const a=this._cachedMeta,r=a.data,s=e+n;let M;const l=u=>{for(u.length+=n,M=u.length-1;M>=s;M--)u[M]=u[M-n]};for(l(r),M=e;M<s;++M)r[M]=new this.dataElementType;this._parsing&&l(a._parsed),this.parse(e,n),i&&this.updateElements(r,e,n,"reset")}updateElements(e,n,i,a){}_removeElements(e,n){const i=this._cachedMeta;if(this._parsing){const a=i._parsed.splice(e,n);i._stacked&&$n(i,a)}i.data.splice(e,n)}_sync(e){if(this._parsing)this._syncList.push(e);else{const[n,i,a]=e;this[n](i,a)}this.chart._dataChanges.push([this.index,...e])}_onDataPush(){const e=arguments.length;this._sync(["_insertElements",this.getDataset().data.length-e,e])}_onDataPop(){this._sync(["_removeElements",this._cachedMeta.data.length-1,1])}_onDataShift(){this._sync(["_removeElements",0,1])}_onDataSplice(e,n){n&&this._sync(["_removeElements",e,n]);const i=arguments.length-2;i&&this._sync(["_insertElements",e,i])}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length])}}Nt.defaults={},Nt.prototype.datasetElementType=null,Nt.prototype.dataElementType=null;function D0(t,e){if(!t._cache.$bar){const n=t.getMatchingVisibleMetas(e);let i=[];for(let a=0,r=n.length;a<r;a++)i=i.concat(n[a].controller.getAllParsedValues(t));t._cache.$bar=ec(i.sort((a,r)=>a-r))}return t._cache.$bar}function f0(t){const e=t.iScale,n=D0(e,t.type);let i=e._length,a,r,s,M;const l=()=>{s===32767||s===-32768||(it(M)&&(i=Math.min(i,Math.abs(s-M)||i)),M=s)};for(a=0,r=n.length;a<r;++a)s=e.getPixelForValue(n[a]),l();for(M=void 0,a=0,r=e.ticks.length;a<r;++a)s=e.getPixelForTick(a),l();return i}function h0(t,e,n,i){const a=n.barThickness;let r,s;return ye(a)?(r=e.min*n.categoryPercentage,s=n.barPercentage):(r=a*i,s=1),{chunk:r/i,ratio:s,start:e.pixels[t]-r/2}}function m0(t,e,n,i){const a=e.pixels,r=a[t];let s=t>0?a[t-1]:null,M=t<a.length-1?a[t+1]:null;const l=n.categoryPercentage;s===null&&(s=r-(M===null?e.end-e.start:M-r)),M===null&&(M=r+r-s);const u=r-(r-Math.min(s,M))/2*l;return{chunk:Math.abs(M-s)/2*l/i,ratio:n.barPercentage,start:u}}function z0(t,e,n,i){const a=n.parse(t[0],i),r=n.parse(t[1],i),s=Math.min(a,r),M=Math.max(a,r);let l=s,u=M;Math.abs(s)>Math.abs(M)&&(l=M,u=s),e[n.axis]=u,e._custom={barStart:l,barEnd:u,start:a,end:r,min:s,max:M}}function $c(t,e,n,i){return pe(t)?z0(t,e,n,i):e[n.axis]=n.parse(t,i),e}function Hc(t,e,n,i){const a=t.iScale,r=t.vScale,s=a.getLabels(),M=a===r,l=[];let u,c,g,y;for(u=n,c=n+i;u<c;++u)y=e[u],g={},g[a.axis]=M||a.parse(s[u],u),l.push($c(y,g,r,u));return l}function Fs(t){return t&&t.barStart!==void 0&&t.barEnd!==void 0}function A0(t,e,n){return t!==0?ht(t):(e.isHorizontal()?1:-1)*(e.min>=n?1:-1)}function T0(t){let e,n,i,a,r;return t.horizontal?(e=t.base>t.x,n="left",i="right"):(e=t.base<t.y,n="bottom",i="top"),e?(a="end",r="start"):(a="start",r="end"),{start:n,end:i,reverse:e,top:a,bottom:r}}function p0(t,e,n,i){let a=e.borderSkipped;const r={};if(!a){t.borderSkipped=r;return}if(a===!0){t.borderSkipped={top:!0,right:!0,bottom:!0,left:!0};return}const{start:s,end:M,reverse:l,top:u,bottom:c}=T0(t);a==="middle"&&n&&(t.enableBorderRadius=!0,(n._top||0)===i?a=u:(n._bottom||0)===i?a=c:(r[Fc(c,s,M,l)]=!0,a=u)),r[Fc(a,s,M,l)]=!0,t.borderSkipped=r}function Fc(t,e,n,i){return i?(t=L0(t,e,n),t=Jc(t,n,e)):t=Jc(t,e,n),t}function L0(t,e,n){return t===e?n:t===n?e:t}function Jc(t,e,n){return t==="start"?e:t==="end"?n:t}function x0(t,{inflateAmount:e},n){t.inflateAmount=e==="auto"?n===1?.33:0:e}class ir extends Nt{parsePrimitiveData(e,n,i,a){return Hc(e,n,i,a)}parseArrayData(e,n,i,a){return Hc(e,n,i,a)}parseObjectData(e,n,i,a){const{iScale:r,vScale:s}=e,{xAxisKey:M="x",yAxisKey:l="y"}=this._parsing,u=r.axis==="x"?M:l,c=s.axis==="x"?M:l,g=[];let y,j,d,D;for(y=i,j=i+a;y<j;++y)D=n[y],d={},d[r.axis]=r.parse(Bt(D,u),y),g.push($c(Bt(D,c),d,s,y));return g}updateRangeFromParsed(e,n,i,a){super.updateRangeFromParsed(e,n,i,a);const r=i._custom;r&&n===this._cachedMeta.vScale&&(e.min=Math.min(e.min,r.min),e.max=Math.max(e.max,r.max))}getMaxOverflow(){return 0}getLabelAndValue(e){const n=this._cachedMeta,{iScale:i,vScale:a}=n,r=this.getParsed(e),s=r._custom,M=Fs(s)?"["+s.start+", "+s.end+"]":""+a.getLabelForValue(r[a.axis]);return{label:""+i.getLabelForValue(r[i.axis]),value:M}}initialize(){this.enableOptionSharing=!0,super.initialize();const e=this._cachedMeta;e.stack=this.getDataset().stack}update(e){const n=this._cachedMeta;this.updateElements(n.data,0,n.data.length,e)}updateElements(e,n,i,a){const r=a==="reset",{index:s,_cachedMeta:{vScale:M}}=this,l=M.getBasePixel(),u=M.isHorizontal(),c=this._getRuler(),{sharedOptions:g,includeOptions:y}=this._getSharedOptions(n,a);for(let j=n;j<n+i;j++){const d=this.getParsed(j),D=r||ye(d[M.axis])?{base:l,head:l}:this._calculateBarValuePixels(j),f=this._calculateBarIndexPixels(j,c),N=(d._stacks||{})[M.axis],I={horizontal:u,base:D.base,enableBorderRadius:!N||Fs(d._custom)||s===N._top||s===N._bottom,x:u?D.head:f.center,y:u?f.center:D.head,height:u?f.size:Math.abs(D.size),width:u?Math.abs(D.size):f.size};y&&(I.options=g||this.resolveDataElementOptions(j,e[j].active?"active":a));const z=I.options||e[j].options;p0(I,z,N,s),x0(I,z,c.ratio),this.updateElement(e[j],j,I,a)}}_getStacks(e,n){const{iScale:i}=this._cachedMeta,a=i.getMatchingVisibleMetas(this._type).filter(l=>l.controller.options.grouped),r=i.options.stacked,s=[],M=l=>{const u=l.controller.getParsed(n),c=u&&u[l.vScale.axis];if(ye(c)||isNaN(c))return!0};for(const l of a)if(!(n!==void 0&&M(l))&&((r===!1||s.indexOf(l.stack)===-1||r===void 0&&l.stack===void 0)&&s.push(l.stack),l.index===e))break;return s.length||s.push(void 0),s}_getStackCount(e){return this._getStacks(void 0,e).length}_getStackIndex(e,n,i){const a=this._getStacks(e,i),r=n!==void 0?a.indexOf(n):-1;return r===-1?a.length-1:r}_getRuler(){const e=this.options,n=this._cachedMeta,i=n.iScale,a=[];let r,s;for(r=0,s=n.data.length;r<s;++r)a.push(i.getPixelForValue(this.getParsed(r)[i.axis],r));const M=e.barThickness;return{min:M||f0(n),pixels:a,start:i._startPixel,end:i._endPixel,stackCount:this._getStackCount(),scale:i,grouped:e.grouped,ratio:M?1:e.categoryPercentage*e.barPercentage}}_calculateBarValuePixels(e){const{_cachedMeta:{vScale:n,_stacked:i},options:{base:a,minBarLength:r}}=this,s=a||0,M=this.getParsed(e),l=M._custom,u=Fs(l);let c=M[n.axis],g=0,y=i?this.applyStack(n,M,i):c,j,d;y!==c&&(g=y-c,y=c),u&&(c=l.barStart,y=l.barEnd-l.barStart,c!==0&&ht(c)!==ht(l.barEnd)&&(g=0),g+=c);const D=!ye(a)&&!u?a:g;let f=n.getPixelForValue(D);if(this.chart.getDataVisibility(e)?j=n.getPixelForValue(g+y):j=f,d=j-f,Math.abs(d)<r){d=A0(d,n,s)*r,c===s&&(f-=d/2);const N=n.getPixelForDecimal(0),I=n.getPixelForDecimal(1),z=Math.min(N,I),T=Math.max(N,I);f=Math.max(Math.min(f,T),z),j=f+d}if(f===n.getPixelForValue(s)){const N=ht(d)*n.getLineWidthForValue(s)/2;f+=N,d-=N}return{size:d,base:f,head:j,center:j+d/2}}_calculateBarIndexPixels(e,n){const i=n.scale,a=this.options,r=a.skipNull,s=le(a.maxBarThickness,1/0);let M,l;if(n.grouped){const u=r?this._getStackCount(e):n.stackCount,c=a.barThickness==="flex"?m0(e,n,a,u):h0(e,n,a,u),g=this._getStackIndex(this.index,this._cachedMeta.stack,r?e:void 0);M=c.start+c.chunk*g+c.chunk/2,l=Math.min(s,c.chunk*c.ratio)}else M=i.getPixelForValue(this.getParsed(e)[i.axis],e),l=Math.min(s,n.min*n.ratio);return{base:M-l/2,head:M+l/2,center:M,size:l}}draw(){const e=this._cachedMeta,n=e.vScale,i=e.data,a=i.length;let r=0;for(;r<a;++r)this.getParsed(r)[n.axis]!==null&&i[r].draw(this._ctx)}}ir.id="bar",ir.defaults={datasetElementType:!1,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}},ir.overrides={scales:{_index_:{type:"category",offset:!0,grid:{offset:!0}},_value_:{type:"linear",beginAtZero:!0}}};class Js extends Nt{initialize(){this.enableOptionSharing=!0,super.initialize()}parsePrimitiveData(e,n,i,a){const r=super.parsePrimitiveData(e,n,i,a);for(let s=0;s<r.length;s++)r[s]._custom=this.resolveDataElementOptions(s+i).radius;return r}parseArrayData(e,n,i,a){const r=super.parseArrayData(e,n,i,a);for(let s=0;s<r.length;s++){const M=n[i+s];r[s]._custom=le(M[2],this.resolveDataElementOptions(s+i).radius)}return r}parseObjectData(e,n,i,a){const r=super.parseObjectData(e,n,i,a);for(let s=0;s<r.length;s++){const M=n[i+s];r[s]._custom=le(M&&M.r&&+M.r,this.resolveDataElementOptions(s+i).radius)}return r}getMaxOverflow(){const e=this._cachedMeta.data;let n=0;for(let i=e.length-1;i>=0;--i)n=Math.max(n,e[i].size(this.resolveDataElementOptions(i))/2);return n>0&&n}getLabelAndValue(e){const n=this._cachedMeta,{xScale:i,yScale:a}=n,r=this.getParsed(e),s=i.getLabelForValue(r.x),M=a.getLabelForValue(r.y),l=r._custom;return{label:n.label,value:"("+s+", "+M+(l?", "+l:"")+")"}}update(e){const n=this._cachedMeta.data;this.updateElements(n,0,n.length,e)}updateElements(e,n,i,a){const r=a==="reset",{iScale:s,vScale:M}=this._cachedMeta,{sharedOptions:l,includeOptions:u}=this._getSharedOptions(n,a),c=s.axis,g=M.axis;for(let y=n;y<n+i;y++){const j=e[y],d=!r&&this.getParsed(y),D={},f=D[c]=r?s.getPixelForDecimal(.5):s.getPixelForValue(d[c]),N=D[g]=r?M.getBasePixel():M.getPixelForValue(d[g]);D.skip=isNaN(f)||isNaN(N),u&&(D.options=l||this.resolveDataElementOptions(y,j.active?"active":a),r&&(D.options.radius=0)),this.updateElement(j,y,D,a)}}resolveDataElementOptions(e,n){const i=this.getParsed(e);let a=super.resolveDataElementOptions(e,n);a.$shared&&(a=Object.assign({},a,{$shared:!1}));const r=a.radius;return n!=="active"&&(a.radius=0),a.radius+=le(i&&i._custom,r),a}}Js.id="bubble",Js.defaults={datasetElementType:!1,dataElementType:"point",animations:{numbers:{type:"number",properties:["x","y","borderWidth","radius"]}}},Js.overrides={scales:{x:{type:"linear"},y:{type:"linear"}},plugins:{tooltip:{callbacks:{title(){return""}}}}};function O0(t,e,n){let i=1,a=1,r=0,s=0;if(e<fe){const M=t,l=M+e,u=Math.cos(M),c=Math.sin(M),g=Math.cos(l),y=Math.sin(l),j=(z,T,m)=>Pn(z,M,l,!0)?1:Math.max(T,T*n,m,m*n),d=(z,T,m)=>Pn(z,M,l,!0)?-1:Math.min(T,T*n,m,m*n),D=j(0,u,g),f=j(Ce,c,y),N=d(Ee,u,g),I=d(Ee+Ce,c,y);i=(D-N)/2,a=(f-I)/2,r=-(D+N)/2,s=-(f+I)/2}return{ratioX:i,ratioY:a,offsetX:r,offsetY:s}}class Hn extends Nt{constructor(e,n){super(e,n),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(e,n){const i=this.getDataset().data,a=this._cachedMeta;if(this._parsing===!1)a._parsed=i;else{let r=l=>+i[l];if(Me(i[e])){const{key:l="value"}=this._parsing;r=u=>+Bt(i[u],l)}let s,M;for(s=e,M=e+n;s<M;++s)a._parsed[s]=r(s)}}_getRotation(){return ct(this.options.rotation-90)}_getCircumference(){return ct(this.options.circumference)}_getRotationExtents(){let e=fe,n=-fe;for(let i=0;i<this.chart.data.datasets.length;++i)if(this.chart.isDatasetVisible(i)){const a=this.chart.getDatasetMeta(i).controller,r=a._getRotation(),s=a._getCircumference();e=Math.min(e,r),n=Math.max(n,r+s)}return{rotation:e,circumference:n-e}}update(e){const n=this.chart,{chartArea:i}=n,a=this._cachedMeta,r=a.data,s=this.getMaxBorderWidth()+this.getMaxOffset(r)+this.options.spacing,M=Math.max((Math.min(i.width,i.height)-s)/2,0),l=Math.min(fz(this.options.cutout,M),1),u=this._getRingWeight(this.index),{circumference:c,rotation:g}=this._getRotationExtents(),{ratioX:y,ratioY:j,offsetX:d,offsetY:D}=O0(g,c,l),f=(i.width-s)/y,N=(i.height-s)/j,I=Math.max(Math.min(f,N)/2,0),z=Zu(this.options.radius,I),T=Math.max(z*l,0),m=(z-T)/this._getVisibleDatasetWeightTotal();this.offsetX=d*z,this.offsetY=D*z,a.total=this.calculateTotal(),this.outerRadius=z-m*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-m*u,0),this.updateElements(r,0,r.length,e)}_circumference(e,n){const i=this.options,a=this._cachedMeta,r=this._getCircumference();return n&&i.animation.animateRotate||!this.chart.getDataVisibility(e)||a._parsed[e]===null||a.data[e].hidden?0:this.calculateCircumference(a._parsed[e]*r/fe)}updateElements(e,n,i,a){const r=a==="reset",s=this.chart,M=s.chartArea,u=s.options.animation,c=(M.left+M.right)/2,g=(M.top+M.bottom)/2,y=r&&u.animateScale,j=y?0:this.innerRadius,d=y?0:this.outerRadius,{sharedOptions:D,includeOptions:f}=this._getSharedOptions(n,a);let N=this._getRotation(),I;for(I=0;I<n;++I)N+=this._circumference(I,r);for(I=n;I<n+i;++I){const z=this._circumference(I,r),T=e[I],m={x:c+this.offsetX,y:g+this.offsetY,startAngle:N,endAngle:N+z,circumference:z,outerRadius:d,innerRadius:j};f&&(m.options=D||this.resolveDataElementOptions(I,T.active?"active":a)),N+=z,this.updateElement(T,I,m,a)}}calculateTotal(){const e=this._cachedMeta,n=e.data;let i=0,a;for(a=0;a<n.length;a++){const r=e._parsed[a];r!==null&&!isNaN(r)&&this.chart.getDataVisibility(a)&&!n[a].hidden&&(i+=Math.abs(r))}return i}calculateCircumference(e){const n=this._cachedMeta.total;return n>0&&!isNaN(e)?fe*(Math.abs(e)/n):0}getLabelAndValue(e){const n=this._cachedMeta,i=this.chart,a=i.data.labels||[],r=Wn(n._parsed[e],i.options.locale);return{label:a[e]||"",value:r}}getMaxBorderWidth(e){let n=0;const i=this.chart;let a,r,s,M,l;if(!e){for(a=0,r=i.data.datasets.length;a<r;++a)if(i.isDatasetVisible(a)){s=i.getDatasetMeta(a),e=s.data,M=s.controller;break}}if(!e)return 0;for(a=0,r=e.length;a<r;++a)l=M.resolveDataElementOptions(a),l.borderAlign!=="inner"&&(n=Math.max(n,l.borderWidth||0,l.hoverBorderWidth||0));return n}getMaxOffset(e){let n=0;for(let i=0,a=e.length;i<a;++i){const r=this.resolveDataElementOptions(i);n=Math.max(n,r.offset||0,r.hoverOffset||0)}return n}_getRingWeightOffset(e){let n=0;for(let i=0;i<e;++i)this.chart.isDatasetVisible(i)&&(n+=this._getRingWeight(i));return n}_getRingWeight(e){return Math.max(le(this.chart.data.datasets[e].weight,1),0)}_getVisibleDatasetWeightTotal(){return this._getRingWeightOffset(this.chart.data.datasets.length)||1}}Hn.id="doughnut",Hn.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"},Hn.descriptors={_scriptable:t=>t!=="spacing",_indexable:t=>t!=="spacing"},Hn.overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const e=t.data;if(e.labels.length&&e.datasets.length){const{labels:{pointStyle:n}}=t.legend.options;return e.labels.map((i,a)=>{const s=t.getDatasetMeta(0).controller.getStyle(a);return{text:i,fillStyle:s.backgroundColor,strokeStyle:s.borderColor,lineWidth:s.borderWidth,pointStyle:n,hidden:!t.getDataVisibility(a),index:a}})}return[]}},onClick(t,e,n){n.chart.toggleDataVisibility(e.index),n.chart.update()}},tooltip:{callbacks:{title(){return""},label(t){let e=t.label;const n=": "+t.formattedValue;return pe(e)?(e=e.slice(),e[0]+=n):e+=n,e}}}}};class Xs extends Nt{initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(e){const n=this._cachedMeta,{dataset:i,data:a=[],_dataset:r}=n,s=this.chart._animationsDisabled;let{start:M,count:l}=ac(n,a,s);this._drawStart=M,this._drawCount=l,rc(n)&&(M=0,l=a.length),i._chart=this.chart,i._datasetIndex=this.index,i._decimated=!!r._decimated,i.points=a;const u=this.resolveDatasetElementOptions(e);this.options.showLine||(u.borderWidth=0),u.segment=this.options.segment,this.updateElement(i,void 0,{animated:!s,options:u},e),this.updateElements(a,M,l,e)}updateElements(e,n,i,a){const r=a==="reset",{iScale:s,vScale:M,_stacked:l,_dataset:u}=this._cachedMeta,{sharedOptions:c,includeOptions:g}=this._getSharedOptions(n,a),y=s.axis,j=M.axis,{spanGaps:d,segment:D}=this.options,f=Dn(d)?d:Number.POSITIVE_INFINITY,N=this.chart._animationsDisabled||r||a==="none";let I=n>0&&this.getParsed(n-1);for(let z=n;z<n+i;++z){const T=e[z],m=this.getParsed(z),A=N?T:{},w=ye(m[j]),Q=A[y]=s.getPixelForValue(m[y],z),Y=A[j]=r||w?M.getBasePixel():M.getPixelForValue(l?this.applyStack(M,m,l):m[j],z);A.skip=isNaN(Q)||isNaN(Y)||w,A.stop=z>0&&Math.abs(m[y]-I[y])>f,D&&(A.parsed=m,A.raw=u.data[z]),g&&(A.options=c||this.resolveDataElementOptions(z,T.active?"active":a)),N||this.updateElement(T,z,A,a),I=m}}getMaxOverflow(){const e=this._cachedMeta,n=e.dataset,i=n.options&&n.options.borderWidth||0,a=e.data||[];if(!a.length)return i;const r=a[0].size(this.resolveDataElementOptions(0)),s=a[a.length-1].size(this.resolveDataElementOptions(a.length-1));return Math.max(i,r,s)/2}draw(){const e=this._cachedMeta;e.dataset.updateControlPoints(this.chart.chartArea,e.iScale.axis),super.draw()}}Xs.id="line",Xs.defaults={datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1},Xs.overrides={scales:{_index_:{type:"category"},_value_:{type:"linear"}}};class Ks extends Nt{constructor(e,n){super(e,n),this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(e){const n=this._cachedMeta,i=this.chart,a=i.data.labels||[],r=Wn(n._parsed[e].r,i.options.locale);return{label:a[e]||"",value:r}}parseObjectData(e,n,i,a){return Oc.bind(this)(e,n,i,a)}update(e){const n=this._cachedMeta.data;this._updateRadius(),this.updateElements(n,0,n.length,e)}getMinMax(){const e=this._cachedMeta,n={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY};return e.data.forEach((i,a)=>{const r=this.getParsed(a).r;!isNaN(r)&&this.chart.getDataVisibility(a)&&(r<n.min&&(n.min=r),r>n.max&&(n.max=r))}),n}_updateRadius(){const e=this.chart,n=e.chartArea,i=e.options,a=Math.min(n.right-n.left,n.bottom-n.top),r=Math.max(a/2,0),s=Math.max(i.cutoutPercentage?r/100*i.cutoutPercentage:1,0),M=(r-s)/e.getVisibleDatasetCount();this.outerRadius=r-M*this.index,this.innerRadius=this.outerRadius-M}updateElements(e,n,i,a){const r=a==="reset",s=this.chart,l=s.options.animation,u=this._cachedMeta.rScale,c=u.xCenter,g=u.yCenter,y=u.getIndexAngle(0)-.5*Ee;let j=y,d;const D=360/this.countVisibleElements();for(d=0;d<n;++d)j+=this._computeAngle(d,a,D);for(d=n;d<n+i;d++){const f=e[d];let N=j,I=j+this._computeAngle(d,a,D),z=s.getDataVisibility(d)?u.getDistanceFromCenterForValue(this.getParsed(d).r):0;j=I,r&&(l.animateScale&&(z=0),l.animateRotate&&(N=I=y));const T={x:c,y:g,innerRadius:0,outerRadius:z,startAngle:N,endAngle:I,options:this.resolveDataElementOptions(d,f.active?"active":a)};this.updateElement(f,d,T,a)}}countVisibleElements(){const e=this._cachedMeta;let n=0;return e.data.forEach((i,a)=>{!isNaN(this.getParsed(a).r)&&this.chart.getDataVisibility(a)&&n++}),n}_computeAngle(e,n,i){return this.chart.getDataVisibility(e)?ct(this.resolveDataElementOptions(e,n).angle||i):0}}Ks.id="polarArea",Ks.defaults={dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0},Ks.overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const e=t.data;if(e.labels.length&&e.datasets.length){const{labels:{pointStyle:n}}=t.legend.options;return e.labels.map((i,a)=>{const s=t.getDatasetMeta(0).controller.getStyle(a);return{text:i,fillStyle:s.backgroundColor,strokeStyle:s.borderColor,lineWidth:s.borderWidth,pointStyle:n,hidden:!t.getDataVisibility(a),index:a}})}return[]}},onClick(t,e,n){n.chart.toggleDataVisibility(e.index),n.chart.update()}},tooltip:{callbacks:{title(){return""},label(t){return t.chart.data.labels[t.dataIndex]+": "+t.formattedValue}}}},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}};class Xc extends Hn{}Xc.id="pie",Xc.defaults={cutout:0,rotation:0,circumference:360,radius:"100%"};class qs extends Nt{getLabelAndValue(e){const n=this._cachedMeta.vScale,i=this.getParsed(e);return{label:n.getLabels()[e],value:""+n.getLabelForValue(i[n.axis])}}parseObjectData(e,n,i,a){return Oc.bind(this)(e,n,i,a)}update(e){const n=this._cachedMeta,i=n.dataset,a=n.data||[],r=n.iScale.getLabels();if(i.points=a,e!=="resize"){const s=this.resolveDatasetElementOptions(e);this.options.showLine||(s.borderWidth=0);const M={_loop:!0,_fullLoop:r.length===a.length,options:s};this.updateElement(i,void 0,M,e)}this.updateElements(a,0,a.length,e)}updateElements(e,n,i,a){const r=this._cachedMeta.rScale,s=a==="reset";for(let M=n;M<n+i;M++){const l=e[M],u=this.resolveDataElementOptions(M,l.active?"active":a),c=r.getPointPositionForValue(M,this.getParsed(M).r),g=s?r.xCenter:c.x,y=s?r.yCenter:c.y,j={x:g,y,angle:c.angle,skip:isNaN(g)||isNaN(y),options:u};this.updateElement(l,M,j,a)}}}qs.id="radar",qs.defaults={datasetElementType:"line",dataElementType:"point",indexAxis:"r",showLine:!0,elements:{line:{fill:"start"}}},qs.overrides={aspectRatio:1,scales:{r:{type:"radialLinear"}}};class bt{constructor(){this.x=void 0,this.y=void 0,this.active=!1,this.options=void 0,this.$animations=void 0}tooltipPosition(e){const{x:n,y:i}=this.getProps(["x","y"],e);return{x:n,y:i}}hasValue(){return Dn(this.x)&&Dn(this.y)}getProps(e,n){const i=this.$animations;if(!n||!i)return this;const a={};return e.forEach(r=>{a[r]=i[r]&&i[r].active()?i[r]._to:this[r]}),a}}bt.defaults={},bt.defaultRoutes=void 0;const Kc={values(t){return pe(t)?t:""+t},numeric(t,e,n){if(t===0)return"0";const i=this.chart.options.locale;let a,r=t;if(n.length>1){const u=Math.max(Math.abs(n[0].value),Math.abs(n[n.length-1].value));(u<1e-4||u>1e15)&&(a="scientific"),r=S0(t,n)}const s=at(Math.abs(r)),M=Math.max(Math.min(-1*Math.floor(s),20),0),l={notation:a,minimumFractionDigits:M,maximumFractionDigits:M};return Object.assign(l,this.options.ticks.format),Wn(t,i,l)},logarithmic(t,e,n){if(t===0)return"0";const i=t/Math.pow(10,Math.floor(at(t)));return i===1||i===2||i===5?Kc.numeric.call(this,t,e,n):""}};function S0(t,e){let n=e.length>3?e[2].value-e[1].value:e[1].value-e[0].value;return Math.abs(n)>=1&&t!==Math.floor(t)&&(n=t-Math.floor(t)),n}var ar={formatters:Kc};oe.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",grace:0,grid:{display:!0,lineWidth:1,drawBorder:!0,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(t,e)=>e.lineWidth,tickColor:(t,e)=>e.color,offset:!1,borderDash:[],borderDashOffset:0,borderWidth:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:ar.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),oe.route("scale.ticks","color","","color"),oe.route("scale.grid","color","","borderColor"),oe.route("scale.grid","borderColor","","borderColor"),oe.route("scale.title","color","","color"),oe.describe("scale",{_fallback:!1,_scriptable:t=>!t.startsWith("before")&&!t.startsWith("after")&&t!=="callback"&&t!=="parser",_indexable:t=>t!=="borderDash"&&t!=="tickBorderDash"}),oe.describe("scales",{_fallback:"scale"}),oe.describe("scale.ticks",{_scriptable:t=>t!=="backdropPadding"&&t!=="callback",_indexable:t=>t!=="backdropPadding"});function E0(t,e){const n=t.options.ticks,i=n.maxTicksLimit||C0(t),a=n.major.enabled?w0(e):[],r=a.length,s=a[0],M=a[r-1],l=[];if(r>i)return k0(e,l,a,r/i),l;const u=b0(a,e,i);if(r>0){let c,g;const y=r>1?Math.round((M-s)/(r-1)):null;for(rr(e,l,u,ye(y)?0:s-y,s),c=0,g=r-1;c<g;c++)rr(e,l,u,a[c],a[c+1]);return rr(e,l,u,M,ye(y)?e.length:M+y),l}return rr(e,l,u),l}function C0(t){const e=t.options.offset,n=t._tickSize(),i=t._length/n+(e?0:1),a=t._maxLength/n;return Math.floor(Math.min(i,a))}function b0(t,e,n){const i=Q0(t),a=e.length/n;if(!i)return Math.max(a,1);const r=xz(i);for(let s=0,M=r.length-1;s<M;s++){const l=r[s];if(l>a)return l}return Math.max(a,1)}function w0(t){const e=[];let n,i;for(n=0,i=t.length;n<i;n++)t[n].major&&e.push(n);return e}function k0(t,e,n,i){let a=0,r=n[0],s;for(i=Math.ceil(i),s=0;s<t.length;s++)s===r&&(e.push(t[s]),a++,r=n[a*i])}function rr(t,e,n,i,a){const r=le(i,0),s=Math.min(le(a,t.length),t.length);let M=0,l,u,c;for(n=Math.ceil(n),a&&(l=a-i,n=l/Math.floor(l/n)),c=r;c<0;)M++,c=Math.round(r+M*n);for(u=Math.max(r,0);u<s;u++)u===c&&(e.push(t[u]),M++,c=Math.round(r+M*n))}function Q0(t){const e=t.length;let n,i;if(e<2)return!1;for(i=t[0],n=1;n<e;++n)if(t[n]-t[n-1]!==i)return!1;return i}const _0=t=>t==="left"?"right":t==="right"?"left":t,qc=(t,e,n)=>e==="top"||e==="left"?t[e]+n:t[e]-n;function eg(t,e){const n=[],i=t.length/e,a=t.length;let r=0;for(;r<a;r+=i)n.push(t[Math.floor(r)]);return n}function v0(t,e,n){const i=t.ticks.length,a=Math.min(e,i-1),r=t._startPixel,s=t._endPixel,M=1e-6;let l=t.getPixelForTick(a),u;if(!(n&&(i===1?u=Math.max(l-r,s-l):e===0?u=(t.getPixelForTick(1)-l)/2:u=(l-t.getPixelForTick(a-1))/2,l+=a<e?u:-u,l<r-M||l>s+M)))return l}function Y0(t,e){Ie(t,n=>{const i=n.gc,a=i.length/2;let r;if(a>e){for(r=0;r<a;++r)delete n.data[i[r]];i.splice(0,a)}})}function Fn(t){return t.drawTicks?t.tickLength:0}function tg(t,e){if(!t.display)return 0;const n=et(t.font,e),i=ot(t.padding);return(pe(t.text)?t.text.length:1)*n.lineHeight+i.height}function U0(t,e){return Gt(t,{scale:e,type:"scale"})}function P0(t,e,n){return Gt(t,{tick:n,index:e,type:"tick"})}function B0(t,e,n){let i=Qz(t);return(n&&e!=="right"||!n&&e==="right")&&(i=_0(i)),i}function R0(t,e,n,i){const{top:a,left:r,bottom:s,right:M,chart:l}=t,{chartArea:u,scales:c}=l;let g=0,y,j,d;const D=s-a,f=M-r;if(t.isHorizontal()){if(j=ic(i,r,M),Me(n)){const N=Object.keys(n)[0],I=n[N];d=c[N].getPixelForValue(I)+D-e}else n==="center"?d=(u.bottom+u.top)/2+D-e:d=qc(t,n,e);y=M-r}else{if(Me(n)){const N=Object.keys(n)[0],I=n[N];j=c[N].getPixelForValue(I)-f+e}else n==="center"?j=(u.left+u.right)/2-f+e:j=qc(t,n,e);d=ic(i,s,a),g=n==="left"?-Ce:Ce}return{titleX:j,titleY:d,maxWidth:y,rotation:g}}class Mn extends bt{constructor(e){super(),this.id=e.id,this.type=e.type,this.options=void 0,this.ctx=e.ctx,this.chart=e.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(e){this.options=e.setContext(this.getContext()),this.axis=e.axis,this._userMin=this.parse(e.min),this._userMax=this.parse(e.max),this._suggestedMin=this.parse(e.suggestedMin),this._suggestedMax=this.parse(e.suggestedMax)}parse(e,n){return e}getUserBounds(){let{_userMin:e,_userMax:n,_suggestedMin:i,_suggestedMax:a}=this;return e=nt(e,Number.POSITIVE_INFINITY),n=nt(n,Number.NEGATIVE_INFINITY),i=nt(i,Number.POSITIVE_INFINITY),a=nt(a,Number.NEGATIVE_INFINITY),{min:nt(e,i),max:nt(n,a),minDefined:Be(e),maxDefined:Be(n)}}getMinMax(e){let{min:n,max:i,minDefined:a,maxDefined:r}=this.getUserBounds(),s;if(a&&r)return{min:n,max:i};const M=this.getMatchingVisibleMetas();for(let l=0,u=M.length;l<u;++l)s=M[l].controller.getMinMax(this,e),a||(n=Math.min(n,s.min)),r||(i=Math.max(i,s.max));return n=r&&n>i?i:n,i=a&&n>i?n:i,{min:nt(n,nt(i,n)),max:nt(i,nt(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 e=this.chart.data;return this.options.labels||(this.isHorizontal()?e.xLabels:e.yLabels)||e.labels||[]}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){Se(this.options.beforeUpdate,[this])}update(e,n,i){const{beginAtZero:a,grace:r,ticks:s}=this.options,M=s.sampleSize;this.beforeUpdate(),this.maxWidth=e,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=dA(this,r,a),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const l=M<this.ticks.length;this._convertTicksToLabels(l?eg(this.ticks,M):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),s.display&&(s.autoSkip||s.source==="auto")&&(this.ticks=E0(this,this.ticks),this._labelSizes=null,this.afterAutoSkip()),l&&this._convertTicksToLabels(this.ticks),this.beforeFit(),this.fit(),this.afterFit(),this.afterUpdate()}configure(){let e=this.options.reverse,n,i;this.isHorizontal()?(n=this.left,i=this.right):(n=this.top,i=this.bottom,e=!e),this._startPixel=n,this._endPixel=i,this._reversePixels=e,this._length=i-n,this._alignToPixels=this.options.alignToPixels}afterUpdate(){Se(this.options.afterUpdate,[this])}beforeSetDimensions(){Se(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(){Se(this.options.afterSetDimensions,[this])}_callHooks(e){this.chart.notifyPlugins(e,this.getContext()),Se(this.options[e],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){Se(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(e){const n=this.options.ticks;let i,a,r;for(i=0,a=e.length;i<a;i++)r=e[i],r.label=Se(n.callback,[r.value,i,e],this)}afterTickToLabelConversion(){Se(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){Se(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){const e=this.options,n=e.ticks,i=this.ticks.length,a=n.minRotation||0,r=n.maxRotation;let s=a,M,l,u;if(!this._isVisible()||!n.display||a>=r||i<=1||!this.isHorizontal()){this.labelRotation=a;return}const c=this._getLabelSizes(),g=c.widest.width,y=c.highest.height,j=Ve(this.chart.width-g,0,this.maxWidth);M=e.offset?this.maxWidth/i:j/(i-1),g+6>M&&(M=j/(i-(e.offset?.5:1)),l=this.maxHeight-Fn(e.grid)-n.padding-tg(e.title,this.chart.options.font),u=Math.sqrt(g*g+y*y),s=Os(Math.min(Math.asin(Ve((c.highest.height+6)/M,-1,1)),Math.asin(Ve(l/u,-1,1))-Math.asin(Ve(y/u,-1,1)))),s=Math.max(a,Math.min(r,s))),this.labelRotation=s}afterCalculateLabelRotation(){Se(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){Se(this.options.beforeFit,[this])}fit(){const e={width:0,height:0},{chart:n,options:{ticks:i,title:a,grid:r}}=this,s=this._isVisible(),M=this.isHorizontal();if(s){const l=tg(a,n.options.font);if(M?(e.width=this.maxWidth,e.height=Fn(r)+l):(e.height=this.maxHeight,e.width=Fn(r)+l),i.display&&this.ticks.length){const{first:u,last:c,widest:g,highest:y}=this._getLabelSizes(),j=i.padding*2,d=ct(this.labelRotation),D=Math.cos(d),f=Math.sin(d);if(M){const N=i.mirror?0:f*g.width+D*y.height;e.height=Math.min(this.maxHeight,e.height+N+j)}else{const N=i.mirror?0:D*g.width+f*y.height;e.width=Math.min(this.maxWidth,e.width+N+j)}this._calculatePadding(u,c,f,D)}}this._handleMargins(),M?(this.width=this._length=n.width-this._margins.left-this._margins.right,this.height=e.height):(this.width=e.width,this.height=this._length=n.height-this._margins.top-this._margins.bottom)}_calculatePadding(e,n,i,a){const{ticks:{align:r,padding:s},position:M}=this.options,l=this.labelRotation!==0,u=M!=="top"&&this.axis==="x";if(this.isHorizontal()){const c=this.getPixelForTick(0)-this.left,g=this.right-this.getPixelForTick(this.ticks.length-1);let y=0,j=0;l?u?(y=a*e.width,j=i*n.height):(y=i*e.height,j=a*n.width):r==="start"?j=n.width:r==="end"?y=e.width:r!=="inner"&&(y=e.width/2,j=n.width/2),this.paddingLeft=Math.max((y-c+s)*this.width/(this.width-c),0),this.paddingRight=Math.max((j-g+s)*this.width/(this.width-g),0)}else{let c=n.height/2,g=e.height/2;r==="start"?(c=0,g=e.height):r==="end"&&(c=n.height,g=0),this.paddingTop=c+s,this.paddingBottom=g+s}}_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(){Se(this.options.afterFit,[this])}isHorizontal(){const{axis:e,position:n}=this.options;return n==="top"||n==="bottom"||e==="x"}isFullSize(){return this.options.fullSize}_convertTicksToLabels(e){this.beforeTickToLabelConversion(),this.generateTickLabels(e);let n,i;for(n=0,i=e.length;n<i;n++)ye(e[n].label)&&(e.splice(n,1),i--,n--);this.afterTickToLabelConversion()}_getLabelSizes(){let e=this._labelSizes;if(!e){const n=this.options.ticks.sampleSize;let i=this.ticks;n<i.length&&(i=eg(i,n)),this._labelSizes=e=this._computeLabelSizes(i,i.length)}return e}_computeLabelSizes(e,n){const{ctx:i,_longestTextCache:a}=this,r=[],s=[];let M=0,l=0,u,c,g,y,j,d,D,f,N,I,z;for(u=0;u<n;++u){if(y=e[u].label,j=this._resolveTickFontOptions(u),i.font=d=j.string,D=a[d]=a[d]||{data:{},gc:[]},f=j.lineHeight,N=I=0,!ye(y)&&!pe(y))N=Ja(i,D.data,D.gc,N,y),I=f;else if(pe(y))for(c=0,g=y.length;c<g;++c)z=y[c],!ye(z)&&!pe(z)&&(N=Ja(i,D.data,D.gc,N,z),I+=f);r.push(N),s.push(I),M=Math.max(N,M),l=Math.max(I,l)}Y0(a,n);const T=r.indexOf(M),m=s.indexOf(l),A=w=>({width:r[w]||0,height:s[w]||0});return{first:A(0),last:A(n-1),widest:A(T),highest:A(m),widths:r,heights:s}}getLabelForValue(e){return e}getPixelForValue(e,n){return NaN}getValueForPixel(e){}getPixelForTick(e){const n=this.ticks;return e<0||e>n.length-1?null:this.getPixelForValue(n[e].value)}getPixelForDecimal(e){this._reversePixels&&(e=1-e);const n=this._startPixel+e*this._length;return Ez(this._alignToPixels?an(this.chart,n,0):n)}getDecimalForPixel(e){const n=(e-this._startPixel)/this._length;return this._reversePixels?1-n:n}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:e,max:n}=this;return e<0&&n<0?n:e>0&&n>0?e:0}getContext(e){const n=this.ticks||[];if(e>=0&&e<n.length){const i=n[e];return i.$context||(i.$context=P0(this.getContext(),e,i))}return this.$context||(this.$context=U0(this.chart.getContext(),this))}_tickSize(){const e=this.options.ticks,n=ct(this.labelRotation),i=Math.abs(Math.cos(n)),a=Math.abs(Math.sin(n)),r=this._getLabelSizes(),s=e.autoSkipPadding||0,M=r?r.widest.width+s:0,l=r?r.highest.height+s:0;return this.isHorizontal()?l*i>M*a?M/i:l/a:l*a<M*i?l/i:M/a}_isVisible(){const e=this.options.display;return e!=="auto"?!!e:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(e){const n=this.axis,i=this.chart,a=this.options,{grid:r,position:s}=a,M=r.offset,l=this.isHorizontal(),c=this.ticks.length+(M?1:0),g=Fn(r),y=[],j=r.setContext(this.getContext()),d=j.drawBorder?j.borderWidth:0,D=d/2,f=function(p){return an(i,p,d)};let N,I,z,T,m,A,w,Q,Y,B,k,h;if(s==="top")N=f(this.bottom),A=this.bottom-g,Q=N-D,B=f(e.top)+D,h=e.bottom;else if(s==="bottom")N=f(this.top),B=e.top,h=f(e.bottom)-D,A=N+D,Q=this.top+g;else if(s==="left")N=f(this.right),m=this.right-g,w=N-D,Y=f(e.left)+D,k=e.right;else if(s==="right")N=f(this.left),Y=e.left,k=f(e.right)-D,m=N+D,w=this.left+g;else if(n==="x"){if(s==="center")N=f((e.top+e.bottom)/2+.5);else if(Me(s)){const p=Object.keys(s)[0],_=s[p];N=f(this.chart.scales[p].getPixelForValue(_))}B=e.top,h=e.bottom,A=N+D,Q=A+g}else if(n==="y"){if(s==="center")N=f((e.left+e.right)/2);else if(Me(s)){const p=Object.keys(s)[0],_=s[p];N=f(this.chart.scales[p].getPixelForValue(_))}m=N-D,w=m-g,Y=e.left,k=e.right}const E=le(a.ticks.maxTicksLimit,c),b=Math.max(1,Math.ceil(c/E));for(I=0;I<c;I+=b){const p=r.setContext(this.getContext(I)),_=p.lineWidth,V=p.color,R=p.borderDash||[],F=p.borderDashOffset,$=p.tickWidth,O=p.tickColor,P=p.tickBorderDash||[],U=p.tickBorderDashOffset;z=v0(this,I,M),z!==void 0&&(T=an(i,z,_),l?m=w=Y=k=T:A=Q=B=h=T,y.push({tx1:m,ty1:A,tx2:w,ty2:Q,x1:Y,y1:B,x2:k,y2:h,width:_,color:V,borderDash:R,borderDashOffset:F,tickWidth:$,tickColor:O,tickBorderDash:P,tickBorderDashOffset:U}))}return this._ticksLength=c,this._borderValue=N,y}_computeLabelItems(e){const n=this.axis,i=this.options,{position:a,ticks:r}=i,s=this.isHorizontal(),M=this.ticks,{align:l,crossAlign:u,padding:c,mirror:g}=r,y=Fn(i.grid),j=y+c,d=g?-c:j,D=-ct(this.labelRotation),f=[];let N,I,z,T,m,A,w,Q,Y,B,k,h,E="middle";if(a==="top")A=this.bottom-d,w=this._getXAxisLabelAlignment();else if(a==="bottom")A=this.top+d,w=this._getXAxisLabelAlignment();else if(a==="left"){const p=this._getYAxisLabelAlignment(y);w=p.textAlign,m=p.x}else if(a==="right"){const p=this._getYAxisLabelAlignment(y);w=p.textAlign,m=p.x}else if(n==="x"){if(a==="center")A=(e.top+e.bottom)/2+j;else if(Me(a)){const p=Object.keys(a)[0],_=a[p];A=this.chart.scales[p].getPixelForValue(_)+j}w=this._getXAxisLabelAlignment()}else if(n==="y"){if(a==="center")m=(e.left+e.right)/2-j;else if(Me(a)){const p=Object.keys(a)[0],_=a[p];m=this.chart.scales[p].getPixelForValue(_)}w=this._getYAxisLabelAlignment(y).textAlign}n==="y"&&(l==="start"?E="top":l==="end"&&(E="bottom"));const b=this._getLabelSizes();for(N=0,I=M.length;N<I;++N){z=M[N],T=z.label;const p=r.setContext(this.getContext(N));Q=this.getPixelForTick(N)+r.labelOffset,Y=this._resolveTickFontOptions(N),B=Y.lineHeight,k=pe(T)?T.length:1;const _=k/2,V=p.color,R=p.textStrokeColor,F=p.textStrokeWidth;let $=w;s?(m=Q,w==="inner"&&(N===I-1?$=this.options.reverse?"left":"right":N===0?$=this.options.reverse?"right":"left":$="center"),a==="top"?u==="near"||D!==0?h=-k*B+B/2:u==="center"?h=-b.highest.height/2-_*B+B:h=-b.highest.height+B/2:u==="near"||D!==0?h=B/2:u==="center"?h=b.highest.height/2-_*B:h=b.highest.height-k*B,g&&(h*=-1)):(A=Q,h=(1-k)*B/2);let O;if(p.showLabelBackdrop){const P=ot(p.backdropPadding),U=b.heights[N],De=b.widths[N];let Z=A+h-P.top,q=m-P.left;switch(E){case"middle":Z-=U/2;break;case"bottom":Z-=U;break}switch(w){case"center":q-=De/2;break;case"right":q-=De;break}O={left:q,top:Z,width:De+P.width,height:U+P.height,color:p.backdropColor}}f.push({rotation:D,label:T,font:Y,color:V,strokeColor:R,strokeWidth:F,textOffset:h,textAlign:$,textBaseline:E,translation:[m,A],backdrop:O})}return f}_getXAxisLabelAlignment(){const{position:e,ticks:n}=this.options;if(-ct(this.labelRotation))return e==="top"?"left":"right";let a="center";return n.align==="start"?a="left":n.align==="end"?a="right":n.align==="inner"&&(a="inner"),a}_getYAxisLabelAlignment(e){const{position:n,ticks:{crossAlign:i,mirror:a,padding:r}}=this.options,s=this._getLabelSizes(),M=e+r,l=s.widest.width;let u,c;return n==="left"?a?(c=this.right+r,i==="near"?u="left":i==="center"?(u="center",c+=l/2):(u="right",c+=l)):(c=this.right-M,i==="near"?u="right":i==="center"?(u="center",c-=l/2):(u="left",c=this.left)):n==="right"?a?(c=this.left+r,i==="near"?u="right":i==="center"?(u="center",c-=l/2):(u="left",c-=l)):(c=this.left+M,i==="near"?u="left":i==="center"?(u="center",c+=l/2):(u="right",c=this.right)):u="right",{textAlign:u,x:c}}_computeLabelArea(){if(this.options.ticks.mirror)return;const e=this.chart,n=this.options.position;if(n==="left"||n==="right")return{top:0,left:this.left,bottom:e.height,right:this.right};if(n==="top"||n==="bottom")return{top:this.top,left:0,bottom:this.bottom,right:e.width}}drawBackground(){const{ctx:e,options:{backgroundColor:n},left:i,top:a,width:r,height:s}=this;n&&(e.save(),e.fillStyle=n,e.fillRect(i,a,r,s),e.restore())}getLineWidthForValue(e){const n=this.options.grid;if(!this._isVisible()||!n.display)return 0;const a=this.ticks.findIndex(r=>r.value===e);return a>=0?n.setContext(this.getContext(a)).lineWidth:0}drawGrid(e){const n=this.options.grid,i=this.ctx,a=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(e));let r,s;const M=(l,u,c)=>{!c.width||!c.color||(i.save(),i.lineWidth=c.width,i.strokeStyle=c.color,i.setLineDash(c.borderDash||[]),i.lineDashOffset=c.borderDashOffset,i.beginPath(),i.moveTo(l.x,l.y),i.lineTo(u.x,u.y),i.stroke(),i.restore())};if(n.display)for(r=0,s=a.length;r<s;++r){const l=a[r];n.drawOnChartArea&&M({x:l.x1,y:l.y1},{x:l.x2,y:l.y2},l),n.drawTicks&&M({x:l.tx1,y:l.ty1},{x:l.tx2,y:l.ty2},{color:l.tickColor,width:l.tickWidth,borderDash:l.tickBorderDash,borderDashOffset:l.tickBorderDashOffset})}}drawBorder(){const{chart:e,ctx:n,options:{grid:i}}=this,a=i.setContext(this.getContext()),r=i.drawBorder?a.borderWidth:0;if(!r)return;const s=i.setContext(this.getContext(0)).lineWidth,M=this._borderValue;let l,u,c,g;this.isHorizontal()?(l=an(e,this.left,r)-r/2,u=an(e,this.right,s)+s/2,c=g=M):(c=an(e,this.top,r)-r/2,g=an(e,this.bottom,s)+s/2,l=u=M),n.save(),n.lineWidth=a.borderWidth,n.strokeStyle=a.borderColor,n.beginPath(),n.moveTo(l,c),n.lineTo(u,g),n.stroke(),n.restore()}drawLabels(e){if(!this.options.ticks.display)return;const i=this.ctx,a=this._computeLabelArea();a&&fc(i,a);const r=this._labelItems||(this._labelItems=this._computeLabelItems(e));let s,M;for(s=0,M=r.length;s<M;++s){const l=r[s],u=l.font,c=l.label;l.backdrop&&(i.fillStyle=l.backdrop.color,i.fillRect(l.backdrop.left,l.backdrop.top,l.backdrop.width,l.backdrop.height));let g=l.textOffset;Xa(i,c,0,g,u,l)}a&&hc(i)}drawTitle(){const{ctx:e,options:{position:n,title:i,reverse:a}}=this;if(!i.display)return;const r=et(i.font),s=ot(i.padding),M=i.align;let l=r.lineHeight/2;n==="bottom"||n==="center"||Me(n)?(l+=s.bottom,pe(i.text)&&(l+=r.lineHeight*(i.text.length-1))):l+=s.top;const{titleX:u,titleY:c,maxWidth:g,rotation:y}=R0(this,l,n,M);Xa(e,i.text,0,0,r,{color:i.color,maxWidth:g,rotation:y,textAlign:B0(M,n,a),textBaseline:"middle",translation:[u,c]})}draw(e){!this._isVisible()||(this.drawBackground(),this.drawGrid(e),this.drawBorder(),this.drawTitle(),this.drawLabels(e))}_layers(){const e=this.options,n=e.ticks&&e.ticks.z||0,i=le(e.grid&&e.grid.z,-1);return!this._isVisible()||this.draw!==Mn.prototype.draw?[{z:n,draw:a=>{this.draw(a)}}]:[{z:i,draw:a=>{this.drawBackground(),this.drawGrid(a),this.drawTitle()}},{z:i+1,draw:()=>{this.drawBorder()}},{z:n,draw:a=>{this.drawLabels(a)}}]}getMatchingVisibleMetas(e){const n=this.chart.getSortedVisibleDatasetMetas(),i=this.axis+"AxisID",a=[];let r,s;for(r=0,s=n.length;r<s;++r){const M=n[r];M[i]===this.id&&(!e||M.type===e)&&a.push(M)}return a}_resolveTickFontOptions(e){const n=this.options.ticks.setContext(this.getContext(e));return et(n.font)}_maxDigits(){const e=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/e}}class or{constructor(e,n,i){this.type=e,this.scope=n,this.override=i,this.items=Object.create(null)}isForType(e){return Object.prototype.isPrototypeOf.call(this.type.prototype,e.prototype)}register(e){const n=Object.getPrototypeOf(e);let i;G0(n)&&(i=this.register(n));const a=this.items,r=e.id,s=this.scope+"."+r;if(!r)throw new Error("class does not have id: "+e);return r in a||(a[r]=e,Z0(e,s,i),this.override&&oe.override(e.id,e.overrides)),s}get(e){return this.items[e]}unregister(e){const n=this.items,i=e.id,a=this.scope;i in n&&delete n[i],a&&i in oe[a]&&(delete oe[a][i],this.override&&delete nn[i])}}function Z0(t,e,n){const i=_n(Object.create(null),[n?oe.get(n):{},oe.get(e),t.defaults]);oe.set(e,i),t.defaultRoutes&&V0(e,t.defaultRoutes),t.descriptors&&oe.describe(e,t.descriptors)}function V0(t,e){Object.keys(e).forEach(n=>{const i=n.split("."),a=i.pop(),r=[t].concat(i).join("."),s=e[n].split("."),M=s.pop(),l=s.join(".");oe.route(r,a,l,M)})}function G0(t){return"id"in t&&"defaults"in t}class W0{constructor(){this.controllers=new or(Nt,"datasets",!0),this.elements=new or(bt,"elements"),this.plugins=new or(Object,"plugins"),this.scales=new or(Mn,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...e){this._each("register",e)}remove(...e){this._each("unregister",e)}addControllers(...e){this._each("register",e,this.controllers)}addElements(...e){this._each("register",e,this.elements)}addPlugins(...e){this._each("register",e,this.plugins)}addScales(...e){this._each("register",e,this.scales)}getController(e){return this._get(e,this.controllers,"controller")}getElement(e){return this._get(e,this.elements,"element")}getPlugin(e){return this._get(e,this.plugins,"plugin")}getScale(e){return this._get(e,this.scales,"scale")}removeControllers(...e){this._each("unregister",e,this.controllers)}removeElements(...e){this._each("unregister",e,this.elements)}removePlugins(...e){this._each("unregister",e,this.plugins)}removeScales(...e){this._each("unregister",e,this.scales)}_each(e,n,i){[...n].forEach(a=>{const r=i||this._getRegistryForType(a);i||r.isForType(a)||r===this.plugins&&a.id?this._exec(e,r,a):Ie(a,s=>{const M=i||this._getRegistryForType(s);this._exec(e,M,s)})})}_exec(e,n,i){const a=xs(e);Se(i["before"+a],[],i),n[e](i),Se(i["after"+a],[],i)}_getRegistryForType(e){for(let n=0;n<this._typedRegistries.length;n++){const i=this._typedRegistries[n];if(i.isForType(e))return i}return this.plugins}_get(e,n,i){const a=n.get(e);if(a===void 0)throw new Error('"'+e+'" is not a registered '+i+".");return a}}var mt=new W0;class eM extends Nt{update(e){const n=this._cachedMeta,{data:i=[]}=n,a=this.chart._animationsDisabled;let{start:r,count:s}=ac(n,i,a);if(this._drawStart=r,this._drawCount=s,rc(n)&&(r=0,s=i.length),this.options.showLine){const{dataset:M,_dataset:l}=n;M._chart=this.chart,M._datasetIndex=this.index,M._decimated=!!l._decimated,M.points=i;const u=this.resolveDatasetElementOptions(e);u.segment=this.options.segment,this.updateElement(M,void 0,{animated:!a,options:u},e)}this.updateElements(i,r,s,e)}addElements(){const{showLine:e}=this.options;!this.datasetElementType&&e&&(this.datasetElementType=mt.getElement("line")),super.addElements()}updateElements(e,n,i,a){const r=a==="reset",{iScale:s,vScale:M,_stacked:l,_dataset:u}=this._cachedMeta,c=this.resolveDataElementOptions(n,a),g=this.getSharedOptions(c),y=this.includeOptions(a,g),j=s.axis,d=M.axis,{spanGaps:D,segment:f}=this.options,N=Dn(D)?D:Number.POSITIVE_INFINITY,I=this.chart._animationsDisabled||r||a==="none";let z=n>0&&this.getParsed(n-1);for(let T=n;T<n+i;++T){const m=e[T],A=this.getParsed(T),w=I?m:{},Q=ye(A[d]),Y=w[j]=s.getPixelForValue(A[j],T),B=w[d]=r||Q?M.getBasePixel():M.getPixelForValue(l?this.applyStack(M,A,l):A[d],T);w.skip=isNaN(Y)||isNaN(B)||Q,w.stop=T>0&&Math.abs(A[j]-z[j])>N,f&&(w.parsed=A,w.raw=u.data[T]),y&&(w.options=g||this.resolveDataElementOptions(T,m.active?"active":a)),I||this.updateElement(m,T,w,a),z=A}this.updateSharedOptions(g,a,c)}getMaxOverflow(){const e=this._cachedMeta,n=e.data||[];if(!this.options.showLine){let M=0;for(let l=n.length-1;l>=0;--l)M=Math.max(M,n[l].size(this.resolveDataElementOptions(l))/2);return M>0&&M}const i=e.dataset,a=i.options&&i.options.borderWidth||0;if(!n.length)return a;const r=n[0].size(this.resolveDataElementOptions(0)),s=n[n.length-1].size(this.resolveDataElementOptions(n.length-1));return Math.max(a,r,s)/2}}eM.id="scatter",eM.defaults={datasetElementType:!1,dataElementType:"point",showLine:!1,fill:!1},eM.overrides={interaction:{mode:"point"},plugins:{tooltip:{callbacks:{title(){return""},label(t){return"("+t.label+", "+t.formattedValue+")"}}}},scales:{x:{type:"linear"},y:{type:"linear"}}};function ln(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class tM{constructor(e){this.options=e||{}}init(e){}formats(){return ln()}parse(e,n){return ln()}format(e,n){return ln()}add(e,n,i){return ln()}diff(e,n,i){return ln()}startOf(e,n,i){return ln()}endOf(e,n){return ln()}}tM.override=function(t){Object.assign(tM.prototype,t)};var $0={_date:tM};function H0(t,e,n,i){const{controller:a,data:r,_sorted:s}=t,M=a._cachedMeta.iScale;if(M&&e===M.axis&&e!=="r"&&s&&r.length){const l=M._reversePixels?Cz:tn;if(i){if(a._sharedOptions){const u=r[0],c=typeof u.getRange=="function"&&u.getRange(e);if(c){const g=l(r,e,n-c),y=l(r,e,n+c);return{lo:g.lo,hi:y.hi}}}}else return l(r,e,n)}return{lo:0,hi:r.length-1}}function Jn(t,e,n,i,a){const r=t.getSortedVisibleDatasetMetas(),s=n[e];for(let M=0,l=r.length;M<l;++M){const{index:u,data:c}=r[M],{lo:g,hi:y}=H0(r[M],e,s,a);for(let j=g;j<=y;++j){const d=c[j];d.skip||i(d,u,j)}}}function F0(t){const e=t.indexOf("x")!==-1,n=t.indexOf("y")!==-1;return function(i,a){const r=e?Math.abs(i.x-a.x):0,s=n?Math.abs(i.y-a.y):0;return Math.sqrt(Math.pow(r,2)+Math.pow(s,2))}}function nM(t,e,n,i,a){const r=[];return!a&&!t.isPointInArea(e)||Jn(t,n,e,function(M,l,u){!a&&!Gn(M,t.chartArea,0)||M.inRange(e.x,e.y,i)&&r.push({element:M,datasetIndex:l,index:u})},!0),r}function J0(t,e,n,i){let a=[];function r(s,M,l){const{startAngle:u,endAngle:c}=s.getProps(["startAngle","endAngle"],i),{angle:g}=Xu(s,{x:e.x,y:e.y});Pn(g,u,c)&&a.push({element:s,datasetIndex:M,index:l})}return Jn(t,n,e,r),a}function X0(t,e,n,i,a,r){let s=[];const M=F0(n);let l=Number.POSITIVE_INFINITY;function u(c,g,y){const j=c.inRange(e.x,e.y,a);if(i&&!j)return;const d=c.getCenterPoint(a);if(!(!!r||t.isPointInArea(d))&&!j)return;const f=M(e,d);f<l?(s=[{element:c,datasetIndex:g,index:y}],l=f):f===l&&s.push({element:c,datasetIndex:g,index:y})}return Jn(t,n,e,u),s}function iM(t,e,n,i,a,r){return!r&&!t.isPointInArea(e)?[]:n==="r"&&!i?J0(t,e,n,a):X0(t,e,n,i,a,r)}function ng(t,e,n,i,a){const r=[],s=n==="x"?"inXRange":"inYRange";let M=!1;return Jn(t,n,e,(l,u,c)=>{l[s](e[n],a)&&(r.push({element:l,datasetIndex:u,index:c}),M=M||l.inRange(e.x,e.y,a))}),i&&!M?[]:r}var K0={evaluateInteractionItems:Jn,modes:{index(t,e,n,i){const a=on(e,t),r=n.axis||"x",s=n.includeInvisible||!1,M=n.intersect?nM(t,a,r,i,s):iM(t,a,r,!1,i,s),l=[];return M.length?(t.getSortedVisibleDatasetMetas().forEach(u=>{const c=M[0].index,g=u.data[c];g&&!g.skip&&l.push({element:g,datasetIndex:u.index,index:c})}),l):[]},dataset(t,e,n,i){const a=on(e,t),r=n.axis||"xy",s=n.includeInvisible||!1;let M=n.intersect?nM(t,a,r,i,s):iM(t,a,r,!1,i,s);if(M.length>0){const l=M[0].datasetIndex,u=t.getDatasetMeta(l).data;M=[];for(let c=0;c<u.length;++c)M.push({element:u[c],datasetIndex:l,index:c})}return M},point(t,e,n,i){const a=on(e,t),r=n.axis||"xy",s=n.includeInvisible||!1;return nM(t,a,r,i,s)},nearest(t,e,n,i){const a=on(e,t),r=n.axis||"xy",s=n.includeInvisible||!1;return iM(t,a,r,n.intersect,i,s)},x(t,e,n,i){const a=on(e,t);return ng(t,a,"x",n.intersect,i)},y(t,e,n,i){const a=on(e,t);return ng(t,a,"y",n.intersect,i)}}};const ig=["left","top","right","bottom"];function Xn(t,e){return t.filter(n=>n.pos===e)}function ag(t,e){return t.filter(n=>ig.indexOf(n.pos)===-1&&n.box.axis===e)}function Kn(t,e){return t.sort((n,i)=>{const a=e?i:n,r=e?n:i;return a.weight===r.weight?a.index-r.index:a.weight-r.weight})}function q0(t){const e=[];let n,i,a,r,s,M;for(n=0,i=(t||[]).length;n<i;++n)a=t[n],{position:r,options:{stack:s,stackWeight:M=1}}=a,e.push({index:n,box:a,pos:r,horizontal:a.isHorizontal(),weight:a.weight,stack:s&&r+s,stackWeight:M});return e}function eT(t){const e={};for(const n of t){const{stack:i,pos:a,stackWeight:r}=n;if(!i||!ig.includes(a))continue;const s=e[i]||(e[i]={count:0,placed:0,weight:0,size:0});s.count++,s.weight+=r}return e}function tT(t,e){const n=eT(t),{vBoxMaxWidth:i,hBoxMaxHeight:a}=e;let r,s,M;for(r=0,s=t.length;r<s;++r){M=t[r];const{fullSize:l}=M.box,u=n[M.stack],c=u&&M.stackWeight/u.weight;M.horizontal?(M.width=c?c*i:l&&e.availableWidth,M.height=a):(M.width=i,M.height=c?c*a:l&&e.availableHeight)}return n}function nT(t){const e=q0(t),n=Kn(e.filter(u=>u.box.fullSize),!0),i=Kn(Xn(e,"left"),!0),a=Kn(Xn(e,"right")),r=Kn(Xn(e,"top"),!0),s=Kn(Xn(e,"bottom")),M=ag(e,"x"),l=ag(e,"y");return{fullSize:n,leftAndTop:i.concat(r),rightAndBottom:a.concat(l).concat(s).concat(M),chartArea:Xn(e,"chartArea"),vertical:i.concat(a).concat(l),horizontal:r.concat(s).concat(M)}}function rg(t,e,n,i){return Math.max(t[n],e[n])+Math.max(t[i],e[i])}function og(t,e){t.top=Math.max(t.top,e.top),t.left=Math.max(t.left,e.left),t.bottom=Math.max(t.bottom,e.bottom),t.right=Math.max(t.right,e.right)}function iT(t,e,n,i){const{pos:a,box:r}=n,s=t.maxPadding;if(!Me(a)){n.size&&(t[a]-=n.size);const g=i[n.stack]||{size:0,count:1};g.size=Math.max(g.size,n.horizontal?r.height:r.width),n.size=g.size/g.count,t[a]+=n.size}r.getPadding&&og(s,r.getPadding());const M=Math.max(0,e.outerWidth-rg(s,t,"left","right")),l=Math.max(0,e.outerHeight-rg(s,t,"top","bottom")),u=M!==t.w,c=l!==t.h;return t.w=M,t.h=l,n.horizontal?{same:u,other:c}:{same:c,other:u}}function aT(t){const e=t.maxPadding;function n(i){const a=Math.max(e[i]-t[i],0);return t[i]+=a,a}t.y+=n("top"),t.x+=n("left"),n("right"),n("bottom")}function rT(t,e){const n=e.maxPadding;function i(a){const r={left:0,top:0,right:0,bottom:0};return a.forEach(s=>{r[s]=Math.max(e[s],n[s])}),r}return i(t?["left","right"]:["top","bottom"])}function qn(t,e,n,i){const a=[];let r,s,M,l,u,c;for(r=0,s=t.length,u=0;r<s;++r){M=t[r],l=M.box,l.update(M.width||e.w,M.height||e.h,rT(M.horizontal,e));const{same:g,other:y}=iT(e,n,M,i);u|=g&&a.length,c=c||y,l.fullSize||a.push(M)}return u&&qn(a,e,n,i)||c}function sr(t,e,n,i,a){t.top=n,t.left=e,t.right=e+i,t.bottom=n+a,t.width=i,t.height=a}function sg(t,e,n,i){const a=n.padding;let{x:r,y:s}=e;for(const M of t){const l=M.box,u=i[M.stack]||{count:1,placed:0,weight:1},c=M.stackWeight/u.weight||1;if(M.horizontal){const g=e.w*c,y=u.size||l.height;it(u.start)&&(s=u.start),l.fullSize?sr(l,a.left,s,n.outerWidth-a.right-a.left,y):sr(l,e.left+u.placed,s,g,y),u.start=s,u.placed+=g,s=l.bottom}else{const g=e.h*c,y=u.size||l.width;it(u.start)&&(r=u.start),l.fullSize?sr(l,r,a.top,y,n.outerHeight-a.bottom-a.top):sr(l,r,e.top+u.placed,y,g),u.start=r,u.placed+=g,r=l.right}}e.x=r,e.y=s}oe.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}});var Mr={addBox(t,e){t.boxes||(t.boxes=[]),e.fullSize=e.fullSize||!1,e.position=e.position||"top",e.weight=e.weight||0,e._layers=e._layers||function(){return[{z:0,draw(n){e.draw(n)}}]},t.boxes.push(e)},removeBox(t,e){const n=t.boxes?t.boxes.indexOf(e):-1;n!==-1&&t.boxes.splice(n,1)},configure(t,e,n){e.fullSize=n.fullSize,e.position=n.position,e.weight=n.weight},update(t,e,n,i){if(!t)return;const a=ot(t.options.layout.padding),r=Math.max(e-a.width,0),s=Math.max(n-a.height,0),M=nT(t.boxes),l=M.vertical,u=M.horizontal;Ie(t.boxes,D=>{typeof D.beforeLayout=="function"&&D.beforeLayout()});const c=l.reduce((D,f)=>f.box.options&&f.box.options.display===!1?D:D+1,0)||1,g=Object.freeze({outerWidth:e,outerHeight:n,padding:a,availableWidth:r,availableHeight:s,vBoxMaxWidth:r/2/c,hBoxMaxHeight:s/2}),y=Object.assign({},a);og(y,ot(i));const j=Object.assign({maxPadding:y,w:r,h:s,x:a.left,y:a.top},a),d=tT(l.concat(u),g);qn(M.fullSize,j,g,d),qn(l,j,g,d),qn(u,j,g,d)&&qn(l,j,g,d),aT(j),sg(M.leftAndTop,j,g,d),j.x+=j.w,j.y+=j.h,sg(M.rightAndBottom,j,g,d),t.chartArea={left:j.left,top:j.top,right:j.left+j.w,bottom:j.top+j.h,height:j.h,width:j.w},Ie(M.chartArea,D=>{const f=D.box;Object.assign(f,t.chartArea),f.update(j.w,j.h,{left:0,top:0,right:0,bottom:0})})}};class Mg{acquireContext(e,n){}releaseContext(e){return!1}addEventListener(e,n,i){}removeEventListener(e,n,i){}getDevicePixelRatio(){return 1}getMaximumSize(e,n,i,a){return n=Math.max(0,n||e.width),i=i||e.height,{width:n,height:Math.max(0,a?Math.floor(n/a):i)}}isAttached(e){return!0}updateConfig(e){}}class oT extends Mg{acquireContext(e){return e&&e.getContext&&e.getContext("2d")||null}updateConfig(e){e.options.animation=!1}}const lr="$chartjs",sT={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},lg=t=>t===null||t==="";function MT(t,e){const n=t.style,i=t.getAttribute("height"),a=t.getAttribute("width");if(t[lr]={initial:{height:i,width:a,style:{display:n.display,height:n.height,width:n.width}}},n.display=n.display||"block",n.boxSizing=n.boxSizing||"border-box",lg(a)){const r=bc(t,"width");r!==void 0&&(t.width=r)}if(lg(i))if(t.style.height==="")t.height=t.width/(e||2);else{const r=bc(t,"height");r!==void 0&&(t.height=r)}return t}const ug=UA?{passive:!0}:!1;function lT(t,e,n){t.addEventListener(e,n,ug)}function uT(t,e,n){t.canvas.removeEventListener(e,n,ug)}function cT(t,e){const n=sT[t.type]||t.type,{x:i,y:a}=on(t,e);return{type:n,chart:e,native:t,x:i!==void 0?i:null,y:a!==void 0?a:null}}function ur(t,e){for(const n of t)if(n===e||n.contains(e))return!0}function gT(t,e,n){const i=t.canvas,a=new MutationObserver(r=>{let s=!1;for(const M of r)s=s||ur(M.addedNodes,i),s=s&&!ur(M.removedNodes,i);s&&n()});return a.observe(document,{childList:!0,subtree:!0}),a}function NT(t,e,n){const i=t.canvas,a=new MutationObserver(r=>{let s=!1;for(const M of r)s=s||ur(M.removedNodes,i),s=s&&!ur(M.addedNodes,i);s&&n()});return a.observe(document,{childList:!0,subtree:!0}),a}const ei=new Map;let cg=0;function gg(){const t=window.devicePixelRatio;t!==cg&&(cg=t,ei.forEach((e,n)=>{n.currentDevicePixelRatio!==t&&e()}))}function yT(t,e){ei.size||window.addEventListener("resize",gg),ei.set(t,e)}function jT(t){ei.delete(t),ei.size||window.removeEventListener("resize",gg)}function dT(t,e,n){const i=t.canvas,a=i&&Vs(i);if(!a)return;const r=nc((M,l)=>{const u=a.clientWidth;n(M,l),u<a.clientWidth&&n()},window),s=new ResizeObserver(M=>{const l=M[0],u=l.contentRect.width,c=l.contentRect.height;u===0&&c===0||r(u,c)});return s.observe(a),yT(t,r),s}function aM(t,e,n){n&&n.disconnect(),e==="resize"&&jT(t)}function IT(t,e,n){const i=t.canvas,a=nc(r=>{t.ctx!==null&&n(cT(r,t))},t,r=>{const s=r[0];return[s,s.offsetX,s.offsetY]});return lT(i,e,a),a}class DT extends Mg{acquireContext(e,n){const i=e&&e.getContext&&e.getContext("2d");return i&&i.canvas===e?(MT(e,n),i):null}releaseContext(e){const n=e.canvas;if(!n[lr])return!1;const i=n[lr].initial;["height","width"].forEach(r=>{const s=i[r];ye(s)?n.removeAttribute(r):n.setAttribute(r,s)});const a=i.style||{};return Object.keys(a).forEach(r=>{n.style[r]=a[r]}),n.width=n.width,delete n[lr],!0}addEventListener(e,n,i){this.removeEventListener(e,n);const a=e.$proxies||(e.$proxies={}),s={attach:gT,detach:NT,resize:dT}[n]||IT;a[n]=s(e,n,i)}removeEventListener(e,n){const i=e.$proxies||(e.$proxies={}),a=i[n];if(!a)return;({attach:aM,detach:aM,resize:aM}[n]||uT)(e,n,a),i[n]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(e,n,i,a){return YA(e,n,i,a)}isAttached(e){const n=Vs(e);return!!(n&&n.isConnected)}}function fT(t){return!Ec()||typeof OffscreenCanvas!="undefined"&&t instanceof OffscreenCanvas?oT:DT}class hT{constructor(){this._init=[]}notify(e,n,i,a){n==="beforeInit"&&(this._init=this._createDescriptors(e,!0),this._notify(this._init,e,"install"));const r=a?this._descriptors(e).filter(a):this._descriptors(e),s=this._notify(r,e,n,i);return n==="afterDestroy"&&(this._notify(r,e,"stop"),this._notify(this._init,e,"uninstall")),s}_notify(e,n,i,a){a=a||{};for(const r of e){const s=r.plugin,M=s[i],l=[n,a,r.options];if(Se(M,l,s)===!1&&a.cancelable)return!1}return!0}invalidate(){ye(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(e){if(this._cache)return this._cache;const n=this._cache=this._createDescriptors(e);return this._notifyStateChanges(e),n}_createDescriptors(e,n){const i=e&&e.config,a=le(i.options&&i.options.plugins,{}),r=mT(i);return a===!1&&!n?[]:AT(e,r,a,n)}_notifyStateChanges(e){const n=this._oldCache||[],i=this._cache,a=(r,s)=>r.filter(M=>!s.some(l=>M.plugin.id===l.plugin.id));this._notify(a(n,i),e,"stop"),this._notify(a(i,n),e,"start")}}function mT(t){const e={},n=[],i=Object.keys(mt.plugins.items);for(let r=0;r<i.length;r++)n.push(mt.getPlugin(i[r]));const a=t.plugins||[];for(let r=0;r<a.length;r++){const s=a[r];n.indexOf(s)===-1&&(n.push(s),e[s.id]=!0)}return{plugins:n,localIds:e}}function zT(t,e){return!e&&t===!1?null:t===!0?{}:t}function AT(t,{plugins:e,localIds:n},i,a){const r=[],s=t.getContext();for(const M of e){const l=M.id,u=zT(i[l],a);u!==null&&r.push({plugin:M,options:TT(t.config,{plugin:M,local:n[l]},u,s)})}return r}function TT(t,{plugin:e,local:n},i,a){const r=t.pluginScopeKeys(e),s=t.getOptionScopes(i,r);return n&&e.defaults&&s.push(e.defaults),t.createResolver(s,a,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function rM(t,e){const n=oe.datasets[t]||{};return((e.datasets||{})[t]||{}).indexAxis||e.indexAxis||n.indexAxis||"x"}function pT(t,e){let n=t;return t==="_index_"?n=e:t==="_value_"&&(n=e==="x"?"y":"x"),n}function LT(t,e){return t===e?"_index_":"_value_"}function xT(t){if(t==="top"||t==="bottom")return"x";if(t==="left"||t==="right")return"y"}function oM(t,e){return t==="x"||t==="y"?t:e.axis||xT(e.position)||t.charAt(0).toLowerCase()}function OT(t,e){const n=nn[t.type]||{scales:{}},i=e.scales||{},a=rM(t.type,e),r=Object.create(null),s=Object.create(null);return Object.keys(i).forEach(M=>{const l=i[M];if(!Me(l))return console.error(`Invalid scale configuration for scale: ${M}`);if(l._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${M}`);const u=oM(M,l),c=LT(u,a),g=n.scales||{};r[u]=r[u]||M,s[M]=vn(Object.create(null),[{axis:u},l,g[u],g[c]])}),t.data.datasets.forEach(M=>{const l=M.type||t.type,u=M.indexAxis||rM(l,e),g=(nn[l]||{}).scales||{};Object.keys(g).forEach(y=>{const j=pT(y,u),d=M[j+"AxisID"]||r[j]||j;s[d]=s[d]||Object.create(null),vn(s[d],[{axis:j},i[d],g[y]])})}),Object.keys(s).forEach(M=>{const l=s[M];vn(l,[oe.scales[l.type],oe.scale])}),s}function Ng(t){const e=t.options||(t.options={});e.plugins=le(e.plugins,{}),e.scales=OT(t,e)}function yg(t){return t=t||{},t.datasets=t.datasets||[],t.labels=t.labels||[],t}function ST(t){return t=t||{},t.data=yg(t.data),Ng(t),t}const jg=new Map,dg=new Set;function cr(t,e){let n=jg.get(t);return n||(n=e(),jg.set(t,n),dg.add(n)),n}const ti=(t,e,n)=>{const i=Bt(e,n);i!==void 0&&t.add(i)};class ET{constructor(e){this._config=ST(e),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(e){this._config.type=e}get data(){return this._config.data}set data(e){this._config.data=yg(e)}get options(){return this._config.options}set options(e){this._config.options=e}get plugins(){return this._config.plugins}update(){const e=this._config;this.clearCache(),Ng(e)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(e){return cr(e,()=>[[`datasets.${e}`,""]])}datasetAnimationScopeKeys(e,n){return cr(`${e}.transition.${n}`,()=>[[`datasets.${e}.transitions.${n}`,`transitions.${n}`],[`datasets.${e}`,""]])}datasetElementScopeKeys(e,n){return cr(`${e}-${n}`,()=>[[`datasets.${e}.elements.${n}`,`datasets.${e}`,`elements.${n}`,""]])}pluginScopeKeys(e){const n=e.id,i=this.type;return cr(`${i}-plugin-${n}`,()=>[[`plugins.${n}`,...e.additionalOptionScopes||[]]])}_cachedScopes(e,n){const i=this._scopeCache;let a=i.get(e);return(!a||n)&&(a=new Map,i.set(e,a)),a}getOptionScopes(e,n,i){const{options:a,type:r}=this,s=this._cachedScopes(e,i),M=s.get(n);if(M)return M;const l=new Set;n.forEach(c=>{e&&(l.add(e),c.forEach(g=>ti(l,e,g))),c.forEach(g=>ti(l,a,g)),c.forEach(g=>ti(l,nn[r]||{},g)),c.forEach(g=>ti(l,oe,g)),c.forEach(g=>ti(l,vs,g))});const u=Array.from(l);return u.length===0&&u.push(Object.create(null)),dg.has(n)&&s.set(n,u),u}chartOptionScopes(){const{options:e,type:n}=this;return[e,nn[n]||{},oe.datasets[n]||{},{type:n},oe,vs]}resolveNamedOptions(e,n,i,a=[""]){const r={$shared:!0},{resolver:s,subPrefixes:M}=Ig(this._resolverCache,e,a);let l=s;if(bT(s,n)){r.$shared=!1,i=Rt(i)?i():i;const u=this.createResolver(e,i,M);l=mn(s,i,u)}for(const u of n)r[u]=l[u];return r}createResolver(e,n,i=[""],a){const{resolver:r}=Ig(this._resolverCache,e,i);return Me(n)?mn(r,n,void 0,a):r}}function Ig(t,e,n){let i=t.get(e);i||(i=new Map,t.set(e,i));const a=n.join();let r=i.get(a);return r||(r={resolver:Bs(e,n),subPrefixes:n.filter(M=>!M.toLowerCase().includes("hover"))},i.set(a,r)),r}const CT=t=>Me(t)&&Object.getOwnPropertyNames(t).reduce((e,n)=>e||Rt(t[n]),!1);function bT(t,e){const{isScriptable:n,isIndexable:i}=zc(t);for(const a of e){const r=n(a),s=i(a),M=(s||r)&&t[a];if(r&&(Rt(M)||CT(M))||s&&pe(M))return!0}return!1}var wT="3.9.1";const kT=["top","bottom","left","right","chartArea"];function Dg(t,e){return t==="top"||t==="bottom"||kT.indexOf(t)===-1&&e==="x"}function fg(t,e){return function(n,i){return n[t]===i[t]?n[e]-i[e]:n[t]-i[t]}}function hg(t){const e=t.chart,n=e.options.animation;e.notifyPlugins("afterRender"),Se(n&&n.onComplete,[t],e)}function QT(t){const e=t.chart,n=e.options.animation;Se(n&&n.onProgress,[t],e)}function mg(t){return Ec()&&typeof t=="string"?t=document.getElementById(t):t&&t.length&&(t=t[0]),t&&t.canvas&&(t=t.canvas),t}const gr={},zg=t=>{const e=mg(t);return Object.values(gr).filter(n=>n.canvas===e).pop()};function _T(t,e,n){const i=Object.keys(t);for(const a of i){const r=+a;if(r>=e){const s=t[a];delete t[a],(n>0||r>e)&&(t[r+n]=s)}}}function vT(t,e,n,i){return!n||t.type==="mouseout"?null:i?e:t}class ni{constructor(e,n){const i=this.config=new ET(n),a=mg(e),r=zg(a);if(r)throw new Error("Canvas is already in use. Chart with ID '"+r.id+"' must be destroyed before the canvas with ID '"+r.canvas.id+"' can be reused.");const s=i.createResolver(i.chartOptionScopes(),this.getContext());this.platform=new(i.platform||fT(a)),this.platform.updateConfig(i);const M=this.platform.acquireContext(a,s.aspectRatio),l=M&&M.canvas,u=l&&l.height,c=l&&l.width;if(this.id=Dz(),this.ctx=M,this.canvas=l,this.width=c,this.height=u,this._options=s,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 hT,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=kz(g=>this.update(g),s.resizeDelay||0),this._dataChanges=[],gr[this.id]=this,!M||!l){console.error("Failed to create chart: can't acquire context from the given item");return}Ct.listen(this,"complete",hg),Ct.listen(this,"progress",QT),this._initialize(),this.attached&&this.update()}get aspectRatio(){const{options:{aspectRatio:e,maintainAspectRatio:n},width:i,height:a,_aspectRatio:r}=this;return ye(e)?n&&r?r:a?i/a:null:e}get data(){return this.config.data}set data(e){this.config.data=e}get options(){return this._options}set options(e){this.config.options=e}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():Cc(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return Dc(this.canvas,this.ctx),this}stop(){return Ct.stop(this),this}resize(e,n){Ct.running(this)?this._resizeBeforeDraw={width:e,height:n}:this._resize(e,n)}_resize(e,n){const i=this.options,a=this.canvas,r=i.maintainAspectRatio&&this.aspectRatio,s=this.platform.getMaximumSize(a,e,n,r),M=i.devicePixelRatio||this.platform.getDevicePixelRatio(),l=this.width?"resize":"attach";this.width=s.width,this.height=s.height,this._aspectRatio=this.aspectRatio,Cc(this,M,!0)&&(this.notifyPlugins("resize",{size:s}),Se(i.onResize,[this,s],this),this.attached&&this._doResize(l)&&this.render())}ensureScalesHaveIDs(){const n=this.options.scales||{};Ie(n,(i,a)=>{i.id=a})}buildOrUpdateScales(){const e=this.options,n=e.scales,i=this.scales,a=Object.keys(i).reduce((s,M)=>(s[M]=!1,s),{});let r=[];n&&(r=r.concat(Object.keys(n).map(s=>{const M=n[s],l=oM(s,M),u=l==="r",c=l==="x";return{options:M,dposition:u?"chartArea":c?"bottom":"left",dtype:u?"radialLinear":c?"category":"linear"}}))),Ie(r,s=>{const M=s.options,l=M.id,u=oM(l,M),c=le(M.type,s.dtype);(M.position===void 0||Dg(M.position,u)!==Dg(s.dposition))&&(M.position=s.dposition),a[l]=!0;let g=null;if(l in i&&i[l].type===c)g=i[l];else{const y=mt.getScale(c);g=new y({id:l,type:c,ctx:this.ctx,chart:this}),i[g.id]=g}g.init(M,e)}),Ie(a,(s,M)=>{s||delete i[M]}),Ie(i,s=>{Mr.configure(this,s,s.options),Mr.addBox(this,s)})}_updateMetasets(){const e=this._metasets,n=this.data.datasets.length,i=e.length;if(e.sort((a,r)=>a.index-r.index),i>n){for(let a=n;a<i;++a)this._destroyDatasetMeta(a);e.splice(n,i-n)}this._sortedMetasets=e.slice(0).sort(fg("order","index"))}_removeUnreferencedMetasets(){const{_metasets:e,data:{datasets:n}}=this;e.length>n.length&&delete this._stacks,e.forEach((i,a)=>{n.filter(r=>r===i._dataset).length===0&&this._destroyDatasetMeta(a)})}buildOrUpdateControllers(){const e=[],n=this.data.datasets;let i,a;for(this._removeUnreferencedMetasets(),i=0,a=n.length;i<a;i++){const r=n[i];let s=this.getDatasetMeta(i);const M=r.type||this.config.type;if(s.type&&s.type!==M&&(this._destroyDatasetMeta(i),s=this.getDatasetMeta(i)),s.type=M,s.indexAxis=r.indexAxis||rM(M,this.options),s.order=r.order||0,s.index=i,s.label=""+r.label,s.visible=this.isDatasetVisible(i),s.controller)s.controller.updateIndex(i),s.controller.linkScales();else{const l=mt.getController(M),{datasetElementType:u,dataElementType:c}=oe.datasets[M];Object.assign(l.prototype,{dataElementType:mt.getElement(c),datasetElementType:u&&mt.getElement(u)}),s.controller=new l(this,i),e.push(s.controller)}}return this._updateMetasets(),e}_resetElements(){Ie(this.data.datasets,(e,n)=>{this.getDatasetMeta(n).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(e){const n=this.config;n.update();const i=this._options=n.createResolver(n.chartOptionScopes(),this.getContext()),a=this._animationsDisabled=!i.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),this.notifyPlugins("beforeUpdate",{mode:e,cancelable:!0})===!1)return;const r=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let s=0;for(let u=0,c=this.data.datasets.length;u<c;u++){const{controller:g}=this.getDatasetMeta(u),y=!a&&r.indexOf(g)===-1;g.buildOrUpdateElements(y),s=Math.max(+g.getMaxOverflow(),s)}s=this._minPadding=i.layout.autoPadding?s:0,this._updateLayout(s),a||Ie(r,u=>{u.reset()}),this._updateDatasets(e),this.notifyPlugins("afterUpdate",{mode:e}),this._layers.sort(fg("z","_idx"));const{_active:M,_lastEvent:l}=this;l?this._eventHandler(l,!0):M.length&&this._updateHoverStyles(M,M,!0),this.render()}_updateScales(){Ie(this.scales,e=>{Mr.removeBox(this,e)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const e=this.options,n=new Set(Object.keys(this._listeners)),i=new Set(e.events);(!Wu(n,i)||!!this._responsiveListeners!==e.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:e}=this,n=this._getUniformDataChanges()||[];for(const{method:i,start:a,count:r}of n){const s=i==="_removeElements"?-r:r;_T(e,a,s)}}_getUniformDataChanges(){const e=this._dataChanges;if(!e||!e.length)return;this._dataChanges=[];const n=this.data.datasets.length,i=r=>new Set(e.filter(s=>s[0]===r).map((s,M)=>M+","+s.splice(1).join(","))),a=i(0);for(let r=1;r<n;r++)if(!Wu(a,i(r)))return;return Array.from(a).map(r=>r.split(",")).map(r=>({method:r[1],start:+r[2],count:+r[3]}))}_updateLayout(e){if(this.notifyPlugins("beforeLayout",{cancelable:!0})===!1)return;Mr.update(this,this.width,this.height,e);const n=this.chartArea,i=n.width<=0||n.height<=0;this._layers=[],Ie(this.boxes,a=>{i&&a.position==="chartArea"||(a.configure&&a.configure(),this._layers.push(...a._layers()))},this),this._layers.forEach((a,r)=>{a._idx=r}),this.notifyPlugins("afterLayout")}_updateDatasets(e){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:e,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,Rt(e)?e({datasetIndex:n}):e);this.notifyPlugins("afterDatasetsUpdate",{mode:e})}}_updateDataset(e,n){const i=this.getDatasetMeta(e),a={meta:i,index:e,mode:n,cancelable:!0};this.notifyPlugins("beforeDatasetUpdate",a)!==!1&&(i.controller._update(n),a.cancelable=!1,this.notifyPlugins("afterDatasetUpdate",a))}render(){this.notifyPlugins("beforeRender",{cancelable:!0})!==!1&&(Ct.has(this)?this.attached&&!Ct.running(this)&&Ct.start(this):(this.draw(),hg({chart:this})))}draw(){let e;if(this._resizeBeforeDraw){const{width:i,height:a}=this._resizeBeforeDraw;this._resize(i,a),this._resizeBeforeDraw=null}if(this.clear(),this.width<=0||this.height<=0||this.notifyPlugins("beforeDraw",{cancelable:!0})===!1)return;const n=this._layers;for(e=0;e<n.length&&n[e].z<=0;++e)n[e].draw(this.chartArea);for(this._drawDatasets();e<n.length;++e)n[e].draw(this.chartArea);this.notifyPlugins("afterDraw")}_getSortedDatasetMetas(e){const n=this._sortedMetasets,i=[];let a,r;for(a=0,r=n.length;a<r;++a){const s=n[a];(!e||s.visible)&&i.push(s)}return i}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(!0)}_drawDatasets(){if(this.notifyPlugins("beforeDatasetsDraw",{cancelable:!0})===!1)return;const e=this.getSortedVisibleDatasetMetas();for(let n=e.length-1;n>=0;--n)this._drawDataset(e[n]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(e){const n=this.ctx,i=e._clip,a=!i.disabled,r=this.chartArea,s={meta:e,index:e.index,cancelable:!0};this.notifyPlugins("beforeDatasetDraw",s)!==!1&&(a&&fc(n,{left:i.left===!1?0:r.left-i.left,right:i.right===!1?this.width:r.right+i.right,top:i.top===!1?0:r.top-i.top,bottom:i.bottom===!1?this.height:r.bottom+i.bottom}),e.controller.draw(),a&&hc(n),s.cancelable=!1,this.notifyPlugins("afterDatasetDraw",s))}isPointInArea(e){return Gn(e,this.chartArea,this._minPadding)}getElementsAtEventForMode(e,n,i,a){const r=K0.modes[n];return typeof r=="function"?r(this,e,i,a):[]}getDatasetMeta(e){const n=this.data.datasets[e],i=this._metasets;let a=i.filter(r=>r&&r._dataset===n).pop();return a||(a={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:n&&n.order||0,index:e,_dataset:n,_parsed:[],_sorted:!1},i.push(a)),a}getContext(){return this.$context||(this.$context=Gt(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(e){const n=this.data.datasets[e];if(!n)return!1;const i=this.getDatasetMeta(e);return typeof i.hidden=="boolean"?!i.hidden:!n.hidden}setDatasetVisibility(e,n){const i=this.getDatasetMeta(e);i.hidden=!n}toggleDataVisibility(e){this._hiddenIndices[e]=!this._hiddenIndices[e]}getDataVisibility(e){return!this._hiddenIndices[e]}_updateVisibility(e,n,i){const a=i?"show":"hide",r=this.getDatasetMeta(e),s=r.controller._resolveAnimations(void 0,a);it(n)?(r.data[n].hidden=!i,this.update()):(this.setDatasetVisibility(e,i),s.update(r,{visible:i}),this.update(M=>M.datasetIndex===e?a:void 0))}hide(e,n){this._updateVisibility(e,n,!1)}show(e,n){this._updateVisibility(e,n,!0)}_destroyDatasetMeta(e){const n=this._metasets[e];n&&n.controller&&n.controller._destroy(),delete this._metasets[e]}_stop(){let e,n;for(this.stop(),Ct.remove(this),e=0,n=this.data.datasets.length;e<n;++e)this._destroyDatasetMeta(e)}destroy(){this.notifyPlugins("beforeDestroy");const{canvas:e,ctx:n}=this;this._stop(),this.config.clearCache(),e&&(this.unbindEvents(),Dc(e,n),this.platform.releaseContext(n),this.canvas=null,this.ctx=null),this.notifyPlugins("destroy"),delete gr[this.id],this.notifyPlugins("afterDestroy")}toBase64Image(...e){return this.canvas.toDataURL(...e)}bindEvents(){this.bindUserEvents(),this.options.responsive?this.bindResponsiveEvents():this.attached=!0}bindUserEvents(){const e=this._listeners,n=this.platform,i=(r,s)=>{n.addEventListener(this,r,s),e[r]=s},a=(r,s,M)=>{r.offsetX=s,r.offsetY=M,this._eventHandler(r)};Ie(this.options.events,r=>i(r,a))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const e=this._responsiveListeners,n=this.platform,i=(l,u)=>{n.addEventListener(this,l,u),e[l]=u},a=(l,u)=>{e[l]&&(n.removeEventListener(this,l,u),delete e[l])},r=(l,u)=>{this.canvas&&this.resize(l,u)};let s;const M=()=>{a("attach",M),this.attached=!0,this.resize(),i("resize",r),i("detach",s)};s=()=>{this.attached=!1,a("resize",r),this._stop(),this._resize(0,0),i("attach",M)},n.isAttached(this.canvas)?M():s()}unbindEvents(){Ie(this._listeners,(e,n)=>{this.platform.removeEventListener(this,n,e)}),this._listeners={},Ie(this._responsiveListeners,(e,n)=>{this.platform.removeEventListener(this,n,e)}),this._responsiveListeners=void 0}updateHoverStyle(e,n,i){const a=i?"set":"remove";let r,s,M,l;for(n==="dataset"&&(r=this.getDatasetMeta(e[0].datasetIndex),r.controller["_"+a+"DatasetHoverStyle"]()),M=0,l=e.length;M<l;++M){s=e[M];const u=s&&this.getDatasetMeta(s.datasetIndex).controller;u&&u[a+"HoverStyle"](s.element,s.datasetIndex,s.index)}}getActiveElements(){return this._active||[]}setActiveElements(e){const n=this._active||[],i=e.map(({datasetIndex:r,index:s})=>{const M=this.getDatasetMeta(r);if(!M)throw new Error("No dataset found at index "+r);return{datasetIndex:r,element:M.data[s],index:s}});!Ba(i,n)&&(this._active=i,this._lastEvent=null,this._updateHoverStyles(i,n))}notifyPlugins(e,n,i){return this._plugins.notify(this,e,n,i)}_updateHoverStyles(e,n,i){const a=this.options.hover,r=(l,u)=>l.filter(c=>!u.some(g=>c.datasetIndex===g.datasetIndex&&c.index===g.index)),s=r(n,e),M=i?e:r(e,n);s.length&&this.updateHoverStyle(s,a.mode,!1),M.length&&a.mode&&this.updateHoverStyle(M,a.mode,!0)}_eventHandler(e,n){const i={event:e,replay:n,cancelable:!0,inChartArea:this.isPointInArea(e)},a=s=>(s.options.events||this.options.events).includes(e.native.type);if(this.notifyPlugins("beforeEvent",i,a)===!1)return;const r=this._handleEvent(e,n,i.inChartArea);return i.cancelable=!1,this.notifyPlugins("afterEvent",i,a),(r||i.changed)&&this.render(),this}_handleEvent(e,n,i){const{_active:a=[],options:r}=this,s=n,M=this._getActiveElements(e,a,i,s),l=Tz(e),u=vT(e,this._lastEvent,i,l);i&&(this._lastEvent=null,Se(r.onHover,[e,M,this],this),l&&Se(r.onClick,[e,M,this],this));const c=!Ba(M,a);return(c||n)&&(this._active=M,this._updateHoverStyles(M,a,n)),this._lastEvent=u,c}_getActiveElements(e,n,i,a){if(e.type==="mouseout")return[];if(!i)return n;const r=this.options.hover;return this.getElementsAtEventForMode(e,r.mode,r,a)}}const Ag=()=>Ie(ni.instances,t=>t._plugins.invalidate()),Wt=!0;Object.defineProperties(ni,{defaults:{enumerable:Wt,value:oe},instances:{enumerable:Wt,value:gr},overrides:{enumerable:Wt,value:nn},registry:{enumerable:Wt,value:mt},version:{enumerable:Wt,value:wT},getChart:{enumerable:Wt,value:zg},register:{enumerable:Wt,value:(...t)=>{mt.add(...t),Ag()}},unregister:{enumerable:Wt,value:(...t)=>{mt.remove(...t),Ag()}}});function Tg(t,e,n){const{startAngle:i,pixelMargin:a,x:r,y:s,outerRadius:M,innerRadius:l}=e;let u=a/M;t.beginPath(),t.arc(r,s,M,i-u,n+u),l>a?(u=a/l,t.arc(r,s,l,n+u,i-u,!0)):t.arc(r,s,a,n+Ce,i-Ce),t.closePath(),t.clip()}function YT(t){return Ps(t,["outerStart","outerEnd","innerStart","innerEnd"])}function UT(t,e,n,i){const a=YT(t.options.borderRadius),r=(n-e)/2,s=Math.min(r,i*e/2),M=l=>{const u=(n-Math.min(r,l))*i/2;return Ve(l,0,Math.min(r,u))};return{outerStart:M(a.outerStart),outerEnd:M(a.outerEnd),innerStart:Ve(a.innerStart,0,s),innerEnd:Ve(a.innerEnd,0,s)}}function An(t,e,n,i){return{x:n+t*Math.cos(e),y:i+t*Math.sin(e)}}function sM(t,e,n,i,a,r){const{x:s,y:M,startAngle:l,pixelMargin:u,innerRadius:c}=e,g=Math.max(e.outerRadius+i+n-u,0),y=c>0?c+i+n+u:0;let j=0;const d=a-l;if(i){const p=c>0?c-i:0,_=g>0?g-i:0,V=(p+_)/2,R=V!==0?d*V/(V+i):d;j=(d-R)/2}const D=Math.max(.001,d*g-n/Ee)/g,f=(d-D)/2,N=l+f+j,I=a-f-j,{outerStart:z,outerEnd:T,innerStart:m,innerEnd:A}=UT(e,y,g,I-N),w=g-z,Q=g-T,Y=N+z/w,B=I-T/Q,k=y+m,h=y+A,E=N+m/k,b=I-A/h;if(t.beginPath(),r){if(t.arc(s,M,g,Y,B),T>0){const V=An(Q,B,s,M);t.arc(V.x,V.y,T,B,I+Ce)}const p=An(h,I,s,M);if(t.lineTo(p.x,p.y),A>0){const V=An(h,b,s,M);t.arc(V.x,V.y,A,I+Ce,b+Math.PI)}if(t.arc(s,M,y,I-A/y,N+m/y,!0),m>0){const V=An(k,E,s,M);t.arc(V.x,V.y,m,E+Math.PI,N-Ce)}const _=An(w,N,s,M);if(t.lineTo(_.x,_.y),z>0){const V=An(w,Y,s,M);t.arc(V.x,V.y,z,N-Ce,Y)}}else{t.moveTo(s,M);const p=Math.cos(Y)*g+s,_=Math.sin(Y)*g+M;t.lineTo(p,_);const V=Math.cos(B)*g+s,R=Math.sin(B)*g+M;t.lineTo(V,R)}t.closePath()}function PT(t,e,n,i,a){const{fullCircles:r,startAngle:s,circumference:M}=e;let l=e.endAngle;if(r){sM(t,e,n,i,s+fe,a);for(let u=0;u<r;++u)t.fill();isNaN(M)||(l=s+M%fe,M%fe===0&&(l+=fe))}return sM(t,e,n,i,l,a),t.fill(),l}function BT(t,e,n){const{x:i,y:a,startAngle:r,pixelMargin:s,fullCircles:M}=e,l=Math.max(e.outerRadius-s,0),u=e.innerRadius+s;let c;for(n&&Tg(t,e,r+fe),t.beginPath(),t.arc(i,a,u,r+fe,r,!0),c=0;c<M;++c)t.stroke();for(t.beginPath(),t.arc(i,a,l,r,r+fe),c=0;c<M;++c)t.stroke()}function RT(t,e,n,i,a,r){const{options:s}=e,{borderWidth:M,borderJoinStyle:l}=s,u=s.borderAlign==="inner";!M||(u?(t.lineWidth=M*2,t.lineJoin=l||"round"):(t.lineWidth=M,t.lineJoin=l||"bevel"),e.fullCircles&&BT(t,e,u),u&&Tg(t,e,a),sM(t,e,n,i,a,r),t.stroke())}class MM extends bt{constructor(e){super(),this.options=void 0,this.circumference=void 0,this.startAngle=void 0,this.endAngle=void 0,this.innerRadius=void 0,this.outerRadius=void 0,this.pixelMargin=0,this.fullCircles=0,e&&Object.assign(this,e)}inRange(e,n,i){const a=this.getProps(["x","y"],i),{angle:r,distance:s}=Xu(a,{x:e,y:n}),{startAngle:M,endAngle:l,innerRadius:u,outerRadius:c,circumference:g}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],i),y=this.options.spacing/2,d=le(g,l-M)>=fe||Pn(r,M,l),D=Va(s,u+y,c+y);return d&&D}getCenterPoint(e){const{x:n,y:i,startAngle:a,endAngle:r,innerRadius:s,outerRadius:M}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius","circumference"],e),{offset:l,spacing:u}=this.options,c=(a+r)/2,g=(s+M+u+l)/2;return{x:n+Math.cos(c)*g,y:i+Math.sin(c)*g}}tooltipPosition(e){return this.getCenterPoint(e)}draw(e){const{options:n,circumference:i}=this,a=(n.offset||0)/2,r=(n.spacing||0)/2,s=n.circular;if(this.pixelMargin=n.borderAlign==="inner"?.33:0,this.fullCircles=i>fe?Math.floor(i/fe):0,i===0||this.innerRadius<0||this.outerRadius<0)return;e.save();let M=0;if(a){M=a/2;const u=(this.startAngle+this.endAngle)/2;e.translate(Math.cos(u)*M,Math.sin(u)*M),this.circumference>=Ee&&(M=a)}e.fillStyle=n.backgroundColor,e.strokeStyle=n.borderColor;const l=PT(e,this,M,r,s);RT(e,this,M,r,l,s),e.restore()}}MM.id="arc",MM.defaults={borderAlign:"center",borderColor:"#fff",borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0},MM.defaultRoutes={backgroundColor:"backgroundColor"};function pg(t,e,n=e){t.lineCap=le(n.borderCapStyle,e.borderCapStyle),t.setLineDash(le(n.borderDash,e.borderDash)),t.lineDashOffset=le(n.borderDashOffset,e.borderDashOffset),t.lineJoin=le(n.borderJoinStyle,e.borderJoinStyle),t.lineWidth=le(n.borderWidth,e.borderWidth),t.strokeStyle=le(n.borderColor,e.borderColor)}function ZT(t,e,n){t.lineTo(n.x,n.y)}function VT(t){return t.stepped?MA:t.tension||t.cubicInterpolationMode==="monotone"?lA:ZT}function Lg(t,e,n={}){const i=t.length,{start:a=0,end:r=i-1}=n,{start:s,end:M}=e,l=Math.max(a,s),u=Math.min(r,M),c=a<s&&r<s||a>M&&r>M;return{count:i,start:l,loop:e.loop,ilen:u<l&&!c?i+u-l:u-l}}function GT(t,e,n,i){const{points:a,options:r}=e,{count:s,start:M,loop:l,ilen:u}=Lg(a,n,i),c=VT(r);let{move:g=!0,reverse:y}=i||{},j,d,D;for(j=0;j<=u;++j)d=a[(M+(y?u-j:j))%s],!d.skip&&(g?(t.moveTo(d.x,d.y),g=!1):c(t,D,d,y,r.stepped),D=d);return l&&(d=a[(M+(y?u:0))%s],c(t,D,d,y,r.stepped)),!!l}function WT(t,e,n,i){const a=e.points,{count:r,start:s,ilen:M}=Lg(a,n,i),{move:l=!0,reverse:u}=i||{};let c=0,g=0,y,j,d,D,f,N;const I=T=>(s+(u?M-T:T))%r,z=()=>{D!==f&&(t.lineTo(c,f),t.lineTo(c,D),t.lineTo(c,N))};for(l&&(j=a[I(0)],t.moveTo(j.x,j.y)),y=0;y<=M;++y){if(j=a[I(y)],j.skip)continue;const T=j.x,m=j.y,A=T|0;A===d?(m<D?D=m:m>f&&(f=m),c=(g*c+T)/++g):(z(),t.lineTo(T,m),d=A,g=0,D=f=m),N=m}z()}function lM(t){const e=t.options,n=e.borderDash&&e.borderDash.length;return!t._decimated&&!t._loop&&!e.tension&&e.cubicInterpolationMode!=="monotone"&&!e.stepped&&!n?WT:GT}function $T(t){return t.stepped?PA:t.tension||t.cubicInterpolationMode==="monotone"?BA:sn}function HT(t,e,n,i){let a=e._path;a||(a=e._path=new Path2D,e.path(a,n,i)&&a.closePath()),pg(t,e.options),t.stroke(a)}function FT(t,e,n,i){const{segments:a,options:r}=e,s=lM(e);for(const M of a)pg(t,r,M.style),t.beginPath(),s(t,e,M,{start:n,end:n+i-1})&&t.closePath(),t.stroke()}const JT=typeof Path2D=="function";function XT(t,e,n,i){JT&&!e.options.segment?HT(t,e,n,i):FT(t,e,n,i)}class Nr extends bt{constructor(e){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,e&&Object.assign(this,e)}updateControlPoints(e,n){const i=this.options;if((i.tension||i.cubicInterpolationMode==="monotone")&&!i.stepped&&!this._pointsUpdated){const a=i.spanGaps?this._loop:this._fullLoop;bA(this._points,i,e,a,n),this._pointsUpdated=!0}}set points(e){this._points=e,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=KA(this,this.options.segment))}first(){const e=this.segments,n=this.points;return e.length&&n[e[0].start]}last(){const e=this.segments,n=this.points,i=e.length;return i&&n[e[i-1].end]}interpolate(e,n){const i=this.options,a=e[n],r=this.points,s=FA(this,{property:n,start:a,end:a});if(!s.length)return;const M=[],l=$T(i);let u,c;for(u=0,c=s.length;u<c;++u){const{start:g,end:y}=s[u],j=r[g],d=r[y];if(j===d){M.push(j);continue}const D=Math.abs((a-j[n])/(d[n]-j[n])),f=l(j,d,D,i.stepped);f[n]=e[n],M.push(f)}return M.length===1?M[0]:M}pathSegment(e,n,i){return lM(this)(e,this,n,i)}path(e,n,i){const a=this.segments,r=lM(this);let s=this._loop;n=n||0,i=i||this.points.length-n;for(const M of a)s&=r(e,this,M,{start:n,end:n+i-1});return!!s}draw(e,n,i,a){const r=this.options||{};(this.points||[]).length&&r.borderWidth&&(e.save(),XT(e,this,i,a),e.restore()),this.animated&&(this._pointsUpdated=!1,this._path=void 0)}}Nr.id="line",Nr.defaults={borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0},Nr.defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"},Nr.descriptors={_scriptable:!0,_indexable:t=>t!=="borderDash"&&t!=="fill"};function xg(t,e,n,i){const a=t.options,{[n]:r}=t.getProps([n],i);return Math.abs(e-r)<a.radius+a.hitRadius}class uM extends bt{constructor(e){super(),this.options=void 0,this.parsed=void 0,this.skip=void 0,this.stop=void 0,e&&Object.assign(this,e)}inRange(e,n,i){const a=this.options,{x:r,y:s}=this.getProps(["x","y"],i);return Math.pow(e-r,2)+Math.pow(n-s,2)<Math.pow(a.hitRadius+a.radius,2)}inXRange(e,n){return xg(this,e,"x",n)}inYRange(e,n){return xg(this,e,"y",n)}getCenterPoint(e){const{x:n,y:i}=this.getProps(["x","y"],e);return{x:n,y:i}}size(e){e=e||this.options||{};let n=e.radius||0;n=Math.max(n,n&&e.hoverRadius||0);const i=n&&e.borderWidth||0;return(n+i)*2}draw(e,n){const i=this.options;this.skip||i.radius<.1||!Gn(this,n,this.size(i)/2)||(e.strokeStyle=i.borderColor,e.lineWidth=i.borderWidth,e.fillStyle=i.backgroundColor,Us(e,i,this.x,this.y))}getRange(){const e=this.options||{};return e.radius+e.hitRadius}}uM.id="point",uM.defaults={borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0},uM.defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};function Og(t,e){const{x:n,y:i,base:a,width:r,height:s}=t.getProps(["x","y","base","width","height"],e);let M,l,u,c,g;return t.horizontal?(g=s/2,M=Math.min(n,a),l=Math.max(n,a),u=i-g,c=i+g):(g=r/2,M=n-g,l=n+g,u=Math.min(i,a),c=Math.max(i,a)),{left:M,top:u,right:l,bottom:c}}function $t(t,e,n,i){return t?0:Ve(e,n,i)}function KT(t,e,n){const i=t.options.borderWidth,a=t.borderSkipped,r=mc(i);return{t:$t(a.top,r.top,0,n),r:$t(a.right,r.right,0,e),b:$t(a.bottom,r.bottom,0,n),l:$t(a.left,r.left,0,e)}}function qT(t,e,n){const{enableBorderRadius:i}=t.getProps(["enableBorderRadius"]),a=t.options.borderRadius,r=hn(a),s=Math.min(e,n),M=t.borderSkipped,l=i||Me(a);return{topLeft:$t(!l||M.top||M.left,r.topLeft,0,s),topRight:$t(!l||M.top||M.right,r.topRight,0,s),bottomLeft:$t(!l||M.bottom||M.left,r.bottomLeft,0,s),bottomRight:$t(!l||M.bottom||M.right,r.bottomRight,0,s)}}function ep(t){const e=Og(t),n=e.right-e.left,i=e.bottom-e.top,a=KT(t,n/2,i/2),r=qT(t,n/2,i/2);return{outer:{x:e.left,y:e.top,w:n,h:i,radius:r},inner:{x:e.left+a.l,y:e.top+a.t,w:n-a.l-a.r,h:i-a.t-a.b,radius:{topLeft:Math.max(0,r.topLeft-Math.max(a.t,a.l)),topRight:Math.max(0,r.topRight-Math.max(a.t,a.r)),bottomLeft:Math.max(0,r.bottomLeft-Math.max(a.b,a.l)),bottomRight:Math.max(0,r.bottomRight-Math.max(a.b,a.r))}}}}function cM(t,e,n,i){const a=e===null,r=n===null,M=t&&!(a&&r)&&Og(t,i);return M&&(a||Va(e,M.left,M.right))&&(r||Va(n,M.top,M.bottom))}function tp(t){return t.topLeft||t.topRight||t.bottomLeft||t.bottomRight}function np(t,e){t.rect(e.x,e.y,e.w,e.h)}function gM(t,e,n={}){const i=t.x!==n.x?-e:0,a=t.y!==n.y?-e:0,r=(t.x+t.w!==n.x+n.w?e:0)-i,s=(t.y+t.h!==n.y+n.h?e:0)-a;return{x:t.x+i,y:t.y+a,w:t.w+r,h:t.h+s,radius:t.radius}}class yr extends bt{constructor(e){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,e&&Object.assign(this,e)}draw(e){const{inflateAmount:n,options:{borderColor:i,backgroundColor:a}}=this,{inner:r,outer:s}=ep(this),M=tp(s.radius)?Ka:np;e.save(),(s.w!==r.w||s.h!==r.h)&&(e.beginPath(),M(e,gM(s,n,r)),e.clip(),M(e,gM(r,-n,s)),e.fillStyle=i,e.fill("evenodd")),e.beginPath(),M(e,gM(r,n)),e.fillStyle=a,e.fill(),e.restore()}inRange(e,n,i){return cM(this,e,n,i)}inXRange(e,n){return cM(this,e,null,n)}inYRange(e,n){return cM(this,null,e,n)}getCenterPoint(e){const{x:n,y:i,base:a,horizontal:r}=this.getProps(["x","y","base","horizontal"],e);return{x:r?(n+a)/2:n,y:r?i:(i+a)/2}}getRange(e){return e==="x"?this.width/2:this.height/2}}yr.id="bar",yr.defaults={borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0},yr.defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};const ii={average(t){if(!t.length)return!1;let e,n,i=0,a=0,r=0;for(e=0,n=t.length;e<n;++e){const s=t[e].element;if(s&&s.hasValue()){const M=s.tooltipPosition();i+=M.x,a+=M.y,++r}}return{x:i/r,y:a/r}},nearest(t,e){if(!t.length)return!1;let n=e.x,i=e.y,a=Number.POSITIVE_INFINITY,r,s,M;for(r=0,s=t.length;r<s;++r){const l=t[r].element;if(l&&l.hasValue()){const u=l.getCenterPoint(),c=Ss(e,u);c<a&&(a=c,M=l)}}if(M){const l=M.tooltipPosition();n=l.x,i=l.y}return{x:n,y:i}}};function zt(t,e){return e&&(pe(e)?Array.prototype.push.apply(t,e):t.push(e)),t}function wt(t){return(typeof t=="string"||t instanceof String)&&t.indexOf(`
|
|
18
18
|
`)>-1?t.split(`
|
|
19
|
-
`):t}function ip(t,e){const{element:n,datasetIndex:i,index:a}=e,r=t.getDatasetMeta(i).controller,{label:s,value:M}=r.getLabelAndValue(a);return{chart:t,label:s,parsed:r.getParsed(a),raw:t.data.datasets[i].data[a],formattedValue:M,dataset:r.getDataset(),dataIndex:a,datasetIndex:i,element:n}}function Sg(t,e){const n=t.chart.ctx,{body:i,footer:a,title:r}=t,{boxWidth:s,boxHeight:M}=e,l=et(e.bodyFont),u=et(e.titleFont),c=et(e.footerFont),g=r.length,y=a.length,j=i.length,d=ot(e.padding);let D=d.height,f=0,N=i.reduce((T,m)=>T+m.before.length+m.lines.length+m.after.length,0);if(N+=t.beforeBody.length+t.afterBody.length,g&&(D+=g*u.lineHeight+(g-1)*e.titleSpacing+e.titleMarginBottom),N){const T=e.displayColors?Math.max(M,l.lineHeight):l.lineHeight;D+=j*T+(N-j)*l.lineHeight+(N-1)*e.bodySpacing}y&&(D+=e.footerMarginTop+y*c.lineHeight+(y-1)*e.footerSpacing);let I=0;const z=function(T){f=Math.max(f,n.measureText(T).width+I)};return n.save(),n.font=u.string,Ie(t.title,z),n.font=l.string,Ie(t.beforeBody.concat(t.afterBody),z),I=e.displayColors?s+2+e.boxPadding:0,Ie(i,T=>{Ie(T.before,z),Ie(T.lines,z),Ie(T.after,z)}),I=0,n.font=c.string,Ie(t.footer,z),n.restore(),f+=d.width,{width:f,height:D}}function ap(t,e){const{y:n,height:i}=e;return n<i/2?"top":n>t.height-i/2?"bottom":"center"}function rp(t,e,n,i){const{x:a,width:r}=i,s=n.caretSize+n.caretPadding;if(t==="left"&&a+r+s>e.width||t==="right"&&a-r-s<0)return!0}function op(t,e,n,i){const{x:a,width:r}=n,{width:s,chartArea:{left:M,right:l}}=t;let u="center";return i==="center"?u=a<=(M+l)/2?"left":"right":a<=r/2?u="left":a>=s-r/2&&(u="right"),rp(u,t,e,n)&&(u="center"),u}function Eg(t,e,n){const i=n.yAlign||e.yAlign||ap(t,n);return{xAlign:n.xAlign||e.xAlign||op(t,e,n,i),yAlign:i}}function sp(t,e){let{x:n,width:i}=t;return e==="right"?n-=i:e==="center"&&(n-=i/2),n}function Mp(t,e,n){let{y:i,height:a}=t;return e==="top"?i+=n:e==="bottom"?i-=a+n:i-=a/2,i}function Cg(t,e,n,i){const{caretSize:a,caretPadding:r,cornerRadius:s}=t,{xAlign:M,yAlign:l}=n,u=a+r,{topLeft:c,topRight:g,bottomLeft:y,bottomRight:j}=hn(s);let d=sp(e,M);const D=Mp(e,l,u);return l==="center"?M==="left"?d+=u:M==="right"&&(d-=u):M==="left"?d-=Math.max(c,y)+a:M==="right"&&(d+=Math.max(g,j)+a),{x:Ve(d,0,i.width-e.width),y:Ve(D,0,i.height-e.height)}}function jr(t,e,n){const i=ot(n.padding);return e==="center"?t.x+t.width/2:e==="right"?t.x+t.width-i.right:t.x+i.left}function bg(t){return zt([],wt(t))}function lp(t,e,n){return Gt(t,{tooltip:e,tooltipItems:n,type:"tooltip"})}function wg(t,e){const n=e&&e.dataset&&e.dataset.tooltip&&e.dataset.tooltip.callbacks;return n?t.override(n):t}class NM extends bt{constructor(e){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=e.chart||e._chart,this._chart=this.chart,this.options=e.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(e){this.options=e,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const e=this._cachedAnimations;if(e)return e;const n=this.chart,i=this.options.setContext(this.getContext()),a=i.enabled&&n.options.animation&&i.animations,r=new Uc(this.chart,a);return a._cacheable&&(this._cachedAnimations=Object.freeze(r)),r}getContext(){return this.$context||(this.$context=lp(this.chart.getContext(),this,this._tooltipItems))}getTitle(e,n){const{callbacks:i}=n,a=i.beforeTitle.apply(this,[e]),r=i.title.apply(this,[e]),s=i.afterTitle.apply(this,[e]);let M=[];return M=zt(M,wt(a)),M=zt(M,wt(r)),M=zt(M,wt(s)),M}getBeforeBody(e,n){return bg(n.callbacks.beforeBody.apply(this,[e]))}getBody(e,n){const{callbacks:i}=n,a=[];return Ie(e,r=>{const s={before:[],lines:[],after:[]},M=wg(i,r);zt(s.before,wt(M.beforeLabel.call(this,r))),zt(s.lines,M.label.call(this,r)),zt(s.after,wt(M.afterLabel.call(this,r))),a.push(s)}),a}getAfterBody(e,n){return bg(n.callbacks.afterBody.apply(this,[e]))}getFooter(e,n){const{callbacks:i}=n,a=i.beforeFooter.apply(this,[e]),r=i.footer.apply(this,[e]),s=i.afterFooter.apply(this,[e]);let M=[];return M=zt(M,wt(a)),M=zt(M,wt(r)),M=zt(M,wt(s)),M}_createItems(e){const n=this._active,i=this.chart.data,a=[],r=[],s=[];let M=[],l,u;for(l=0,u=n.length;l<u;++l)M.push(ip(this.chart,n[l]));return e.filter&&(M=M.filter((c,g,y)=>e.filter(c,g,y,i))),e.itemSort&&(M=M.sort((c,g)=>e.itemSort(c,g,i))),Ie(M,c=>{const g=wg(e.callbacks,c);a.push(g.labelColor.call(this,c)),r.push(g.labelPointStyle.call(this,c)),s.push(g.labelTextColor.call(this,c))}),this.labelColors=a,this.labelPointStyles=r,this.labelTextColors=s,this.dataPoints=M,M}update(e,n){const i=this.options.setContext(this.getContext()),a=this._active;let r,s=[];if(!a.length)this.opacity!==0&&(r={opacity:0});else{const M=ii[i.position].call(this,a,this._eventPosition);s=this._createItems(i),this.title=this.getTitle(s,i),this.beforeBody=this.getBeforeBody(s,i),this.body=this.getBody(s,i),this.afterBody=this.getAfterBody(s,i),this.footer=this.getFooter(s,i);const l=this._size=Sg(this,i),u=Object.assign({},M,l),c=Eg(this.chart,i,u),g=Cg(i,u,c,this.chart);this.xAlign=c.xAlign,this.yAlign=c.yAlign,r={opacity:1,x:g.x,y:g.y,width:l.width,height:l.height,caretX:M.x,caretY:M.y}}this._tooltipItems=s,this.$context=void 0,r&&this._resolveAnimations().update(this,r),e&&i.external&&i.external.call(this,{chart:this.chart,tooltip:this,replay:n})}drawCaret(e,n,i,a){const r=this.getCaretPosition(e,i,a);n.lineTo(r.x1,r.y1),n.lineTo(r.x2,r.y2),n.lineTo(r.x3,r.y3)}getCaretPosition(e,n,i){const{xAlign:a,yAlign:r}=this,{caretSize:s,cornerRadius:M}=i,{topLeft:l,topRight:u,bottomLeft:c,bottomRight:g}=hn(M),{x:y,y:j}=e,{width:d,height:D}=n;let f,N,I,z,T,m;return r==="center"?(T=j+D/2,a==="left"?(f=y,N=f-s,z=T+s,m=T-s):(f=y+d,N=f+s,z=T-s,m=T+s),I=f):(a==="left"?N=y+Math.max(l,c)+s:a==="right"?N=y+d-Math.max(u,g)-s:N=this.caretX,r==="top"?(z=j,T=z-s,f=N-s,I=N+s):(z=j+D,T=z+s,f=N+s,I=N-s),m=z),{x1:f,x2:N,x3:I,y1:z,y2:T,y3:m}}drawTitle(e,n,i){const a=this.title,r=a.length;let s,M,l;if(r){const u=Ws(i.rtl,this.x,this.width);for(e.x=jr(this,i.titleAlign,i),n.textAlign=u.textAlign(i.titleAlign),n.textBaseline="middle",s=et(i.titleFont),M=i.titleSpacing,n.fillStyle=i.titleColor,n.font=s.string,l=0;l<r;++l)n.fillText(a[l],u.x(e.x),e.y+s.lineHeight/2),e.y+=s.lineHeight+M,l+1===r&&(e.y+=i.titleMarginBottom-M)}}_drawColorBox(e,n,i,a,r){const s=this.labelColors[i],M=this.labelPointStyles[i],{boxHeight:l,boxWidth:u,boxPadding:c}=r,g=et(r.bodyFont),y=jr(this,"left",r),j=a.x(y),d=l<g.lineHeight?(g.lineHeight-l)/2:0,D=n.y+d;if(r.usePointStyle){const f={radius:Math.min(u,l)/2,pointStyle:M.pointStyle,rotation:M.rotation,borderWidth:1},N=a.leftForLtr(j,u)+u/2,I=D+l/2;e.strokeStyle=r.multiKeyBackground,e.fillStyle=r.multiKeyBackground,Us(e,f,N,I),e.strokeStyle=s.borderColor,e.fillStyle=s.backgroundColor,Us(e,f,N,I)}else{e.lineWidth=Me(s.borderWidth)?Math.max(...Object.values(s.borderWidth)):s.borderWidth||1,e.strokeStyle=s.borderColor,e.setLineDash(s.borderDash||[]),e.lineDashOffset=s.borderDashOffset||0;const f=a.leftForLtr(j,u-c),N=a.leftForLtr(a.xPlus(j,1),u-c-2),I=hn(s.borderRadius);Object.values(I).some(z=>z!==0)?(e.beginPath(),e.fillStyle=r.multiKeyBackground,Ka(e,{x:f,y:D,w:u,h:l,radius:I}),e.fill(),e.stroke(),e.fillStyle=s.backgroundColor,e.beginPath(),Ka(e,{x:N,y:D+1,w:u-2,h:l-2,radius:I}),e.fill()):(e.fillStyle=r.multiKeyBackground,e.fillRect(f,D,u,l),e.strokeRect(f,D,u,l),e.fillStyle=s.backgroundColor,e.fillRect(N,D+1,u-2,l-2))}e.fillStyle=this.labelTextColors[i]}drawBody(e,n,i){const{body:a}=this,{bodySpacing:r,bodyAlign:s,displayColors:M,boxHeight:l,boxWidth:u,boxPadding:c}=i,g=et(i.bodyFont);let y=g.lineHeight,j=0;const d=Ws(i.rtl,this.x,this.width),D=function(Q){n.fillText(Q,d.x(e.x+j),e.y+y/2),e.y+=y+r},f=d.textAlign(s);let N,I,z,T,m,A,w;for(n.textAlign=s,n.textBaseline="middle",n.font=g.string,e.x=jr(this,f,i),n.fillStyle=i.bodyColor,Ie(this.beforeBody,D),j=M&&f!=="right"?s==="center"?u/2+c:u+2+c:0,T=0,A=a.length;T<A;++T){for(N=a[T],I=this.labelTextColors[T],n.fillStyle=I,Ie(N.before,D),z=N.lines,M&&z.length&&(this._drawColorBox(n,e,T,d,i),y=Math.max(g.lineHeight,l)),m=0,w=z.length;m<w;++m)D(z[m]),y=g.lineHeight;Ie(N.after,D)}j=0,y=g.lineHeight,Ie(this.afterBody,D),e.y-=r}drawFooter(e,n,i){const a=this.footer,r=a.length;let s,M;if(r){const l=Ws(i.rtl,this.x,this.width);for(e.x=jr(this,i.footerAlign,i),e.y+=i.footerMarginTop,n.textAlign=l.textAlign(i.footerAlign),n.textBaseline="middle",s=et(i.footerFont),n.fillStyle=i.footerColor,n.font=s.string,M=0;M<r;++M)n.fillText(a[M],l.x(e.x),e.y+s.lineHeight/2),e.y+=s.lineHeight+i.footerSpacing}}drawBackground(e,n,i,a){const{xAlign:r,yAlign:s}=this,{x:M,y:l}=e,{width:u,height:c}=i,{topLeft:g,topRight:y,bottomLeft:j,bottomRight:d}=hn(a.cornerRadius);n.fillStyle=a.backgroundColor,n.strokeStyle=a.borderColor,n.lineWidth=a.borderWidth,n.beginPath(),n.moveTo(M+g,l),s==="top"&&this.drawCaret(e,n,i,a),n.lineTo(M+u-y,l),n.quadraticCurveTo(M+u,l,M+u,l+y),s==="center"&&r==="right"&&this.drawCaret(e,n,i,a),n.lineTo(M+u,l+c-d),n.quadraticCurveTo(M+u,l+c,M+u-d,l+c),s==="bottom"&&this.drawCaret(e,n,i,a),n.lineTo(M+j,l+c),n.quadraticCurveTo(M,l+c,M,l+c-j),s==="center"&&r==="left"&&this.drawCaret(e,n,i,a),n.lineTo(M,l+g),n.quadraticCurveTo(M,l,M+g,l),n.closePath(),n.fill(),a.borderWidth>0&&n.stroke()}_updateAnimationTarget(e){const n=this.chart,i=this.$animations,a=i&&i.x,r=i&&i.y;if(a||r){const s=ii[e.position].call(this,this._active,this._eventPosition);if(!s)return;const M=this._size=Sg(this,e),l=Object.assign({},s,this._size),u=Eg(n,e,l),c=Cg(e,l,u,n);(a._to!==c.x||r._to!==c.y)&&(this.xAlign=u.xAlign,this.yAlign=u.yAlign,this.width=M.width,this.height=M.height,this.caretX=s.x,this.caretY=s.y,this._resolveAnimations().update(this,c))}}_willRender(){return!!this.opacity}draw(e){const n=this.options.setContext(this.getContext());let i=this.opacity;if(!i)return;this._updateAnimationTarget(n);const a={width:this.width,height:this.height},r={x:this.x,y:this.y};i=Math.abs(i)<.001?0:i;const s=ot(n.padding),M=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;n.enabled&&M&&(e.save(),e.globalAlpha=i,this.drawBackground(r,e,a,n),GA(e,n.textDirection),r.y+=s.top,this.drawTitle(r,e,n),this.drawBody(r,e,n),this.drawFooter(r,e,n),WA(e,n.textDirection),e.restore())}getActiveElements(){return this._active||[]}setActiveElements(e,n){const i=this._active,a=e.map(({datasetIndex:M,index:l})=>{const u=this.chart.getDatasetMeta(M);if(!u)throw new Error("Cannot find a dataset at index "+M);return{datasetIndex:M,element:u.data[l],index:l}}),r=!Ba(i,a),s=this._positionChanged(a,n);(r||s)&&(this._active=a,this._eventPosition=n,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(e,n,i=!0){if(n&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const a=this.options,r=this._active||[],s=this._getActiveElements(e,r,n,i),M=this._positionChanged(s,e),l=n||!Ba(s,r)||M;return l&&(this._active=s,(a.enabled||a.external)&&(this._eventPosition={x:e.x,y:e.y},this.update(!0,n))),l}_getActiveElements(e,n,i,a){const r=this.options;if(e.type==="mouseout")return[];if(!a)return n;const s=this.chart.getElementsAtEventForMode(e,r.mode,r,i);return r.reverse&&s.reverse(),s}_positionChanged(e,n){const{caretX:i,caretY:a,options:r}=this,s=ii[r.position].call(this,e,n);return s!==!1&&(i!==s.x||a!==s.y)}}NM.positioners=ii;var up={id:"tooltip",_element:NM,positioners:ii,afterInit(t,e,n){n&&(t.tooltip=new NM({chart:t,options:n}))},beforeUpdate(t,e,n){t.tooltip&&t.tooltip.initialize(n)},reset(t,e,n){t.tooltip&&t.tooltip.initialize(n)},afterDraw(t){const e=t.tooltip;if(e&&e._willRender()){const n={tooltip:e};if(t.notifyPlugins("beforeTooltipDraw",n)===!1)return;e.draw(t.ctx),t.notifyPlugins("afterTooltipDraw",n)}},afterEvent(t,e){if(t.tooltip){const n=e.replay;t.tooltip.handleEvent(e.event,n,e.inChartArea)&&(e.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(t,e)=>e.bodyFont.size,boxWidth:(t,e)=>e.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:{beforeTitle:St,title(t){if(t.length>0){const e=t[0],n=e.chart.data.labels,i=n?n.length:0;if(this&&this.options&&this.options.mode==="dataset")return e.dataset.label||"";if(e.label)return e.label;if(i>0&&e.dataIndex<i)return n[e.dataIndex]}return""},afterTitle:St,beforeBody:St,beforeLabel:St,label(t){if(this&&this.options&&this.options.mode==="dataset")return t.label+": "+t.formattedValue||t.formattedValue;let e=t.dataset.label||"";e&&(e+=": ");const n=t.formattedValue;return ye(n)||(e+=n),e},labelColor(t){const n=t.chart.getDatasetMeta(t.datasetIndex).controller.getStyle(t.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(t){const n=t.chart.getDatasetMeta(t.datasetIndex).controller.getStyle(t.dataIndex);return{pointStyle:n.pointStyle,rotation:n.rotation}},afterLabel:St,afterBody:St,beforeFooter:St,footer:St,afterFooter:St}},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:t=>t!=="filter"&&t!=="itemSort"&&t!=="external",_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]};const cp=(t,e,n,i)=>(typeof e=="string"?(n=t.push(e)-1,i.unshift({index:n,label:e})):isNaN(e)&&(n=null),n);function gp(t,e,n,i){const a=t.indexOf(e);if(a===-1)return cp(t,e,n,i);const r=t.lastIndexOf(e);return a!==r?n:a}const Np=(t,e)=>t===null?null:Ve(Math.round(t),0,e);class dr extends Mn{constructor(e){super(e),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(e){const n=this._addedLabels;if(n.length){const i=this.getLabels();for(const{index:a,label:r}of n)i[a]===r&&i.splice(a,1);this._addedLabels=[]}super.init(e)}parse(e,n){if(ye(e))return null;const i=this.getLabels();return n=isFinite(n)&&i[n]===e?n:gp(i,e,le(n,e),this._addedLabels),Np(n,i.length-1)}determineDataLimits(){const{minDefined:e,maxDefined:n}=this.getUserBounds();let{min:i,max:a}=this.getMinMax(!0);this.options.bounds==="ticks"&&(e||(i=0),n||(a=this.getLabels().length-1)),this.min=i,this.max=a}buildTicks(){const e=this.min,n=this.max,i=this.options.offset,a=[];let r=this.getLabels();r=e===0&&n===r.length-1?r:r.slice(e,n+1),this._valueRange=Math.max(r.length-(i?0:1),1),this._startValue=this.min-(i?.5:0);for(let s=e;s<=n;s++)a.push({value:s});return a}getLabelForValue(e){const n=this.getLabels();return e>=0&&e<n.length?n[e]:e}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(e){return typeof e!="number"&&(e=this.parse(e)),e===null?NaN:this.getPixelForDecimal((e-this._startValue)/this._valueRange)}getPixelForTick(e){const n=this.ticks;return e<0||e>n.length-1?null:this.getPixelForValue(n[e].value)}getValueForPixel(e){return Math.round(this._startValue+this.getDecimalForPixel(e)*this._valueRange)}getBasePixel(){return this.bottom}}dr.id="category",dr.defaults={ticks:{callback:dr.prototype.getLabelForValue}};function yp(t,e){const n=[],{bounds:a,step:r,min:s,max:M,precision:l,count:u,maxTicks:c,maxDigits:g,includeBounds:y}=t,j=r||1,d=c-1,{min:D,max:f}=e,N=!ye(s),I=!ye(M),z=!ye(u),T=(f-D)/(g+1);let m=Hu((f-D)/d/j)*j,A,w,Q,Y;if(m<1e-14&&!N&&!I)return[{value:D},{value:f}];Y=Math.ceil(f/m)-Math.floor(D/m),Y>d&&(m=Hu(Y*m/d/j)*j),ye(l)||(A=Math.pow(10,l),m=Math.ceil(m*A)/A),a==="ticks"?(w=Math.floor(D/m)*m,Q=Math.ceil(f/m)*m):(w=D,Q=f),N&&I&&r&&Oz((M-s)/r,m/1e3)?(Y=Math.round(Math.min((M-s)/m,c)),m=(M-s)/Y,w=s,Q=M):z?(w=N?s:w,Q=I?M:Q,Y=u-1,m=(Q-w)/Y):(Y=(Q-w)/m,Un(Y,Math.round(Y),m/1e3)?Y=Math.round(Y):Y=Math.ceil(Y));const B=Math.max(Ju(m),Ju(w));A=Math.pow(10,ye(l)?B:l),w=Math.round(w*A)/A,Q=Math.round(Q*A)/A;let k=0;for(N&&(y&&w!==s?(n.push({value:s}),w<s&&k++,Un(Math.round((w+k*m)*A)/A,s,kg(s,T,t))&&k++):w<s&&k++);k<Y;++k)n.push({value:Math.round((w+k*m)*A)/A});return I&&y&&Q!==M?n.length&&Un(n[n.length-1].value,M,kg(M,T,t))?n[n.length-1].value=M:n.push({value:M}):(!I||Q===M)&&n.push({value:Q}),n}function kg(t,e,{horizontal:n,minRotation:i}){const a=ct(i),r=(n?Math.sin(a):Math.cos(a))||.001,s=.75*e*(""+t).length;return Math.min(e/r,s)}class Ir extends Mn{constructor(e){super(e),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(e,n){return ye(e)||(typeof e=="number"||e instanceof Number)&&!isFinite(+e)?null:+e}handleTickRangeOptions(){const{beginAtZero:e}=this.options,{minDefined:n,maxDefined:i}=this.getUserBounds();let{min:a,max:r}=this;const s=l=>a=n?a:l,M=l=>r=i?r:l;if(e){const l=ht(a),u=ht(r);l<0&&u<0?M(0):l>0&&u>0&&s(0)}if(a===r){let l=1;(r>=Number.MAX_SAFE_INTEGER||a<=Number.MIN_SAFE_INTEGER)&&(l=Math.abs(r*.05)),M(r+l),e||s(a-l)}this.min=a,this.max=r}getTickLimit(){const e=this.options.ticks;let{maxTicksLimit:n,stepSize:i}=e,a;return i?(a=Math.ceil(this.max/i)-Math.floor(this.min/i)+1,a>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${i} would result generating up to ${a} ticks. Limiting to 1000.`),a=1e3)):(a=this.computeTickLimit(),n=n||11),n&&(a=Math.min(n,a)),a}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const e=this.options,n=e.ticks;let i=this.getTickLimit();i=Math.max(2,i);const a={maxTicks:i,bounds:e.bounds,min:e.min,max:e.max,precision:n.precision,step:n.stepSize,count:n.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:n.minRotation||0,includeBounds:n.includeBounds!==!1},r=this._range||this,s=yp(a,r);return e.bounds==="ticks"&&Fu(s,this,"value"),e.reverse?(s.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),s}configure(){const e=this.ticks;let n=this.min,i=this.max;if(super.configure(),this.options.offset&&e.length){const a=(i-n)/Math.max(e.length-1,1)/2;n-=a,i+=a}this._startValue=n,this._endValue=i,this._valueRange=i-n}getLabelForValue(e){return Wn(e,this.chart.options.locale,this.options.ticks.format)}}class yM extends Ir{determineDataLimits(){const{min:e,max:n}=this.getMinMax(!0);this.min=Be(e)?e:0,this.max=Be(n)?n:1,this.handleTickRangeOptions()}computeTickLimit(){const e=this.isHorizontal(),n=e?this.width:this.height,i=ct(this.options.ticks.minRotation),a=(e?Math.sin(i):Math.cos(i))||.001,r=this._resolveTickFontOptions(0);return Math.ceil(n/Math.min(40,r.lineHeight/a))}getPixelForValue(e){return e===null?NaN:this.getPixelForDecimal((e-this._startValue)/this._valueRange)}getValueForPixel(e){return this._startValue+this.getDecimalForPixel(e)*this._valueRange}}yM.id="linear",yM.defaults={ticks:{callback:ar.formatters.numeric}};function Qg(t){return t/Math.pow(10,Math.floor(at(t)))===1}function jp(t,e){const n=Math.floor(at(e.max)),i=Math.ceil(e.max/Math.pow(10,n)),a=[];let r=nt(t.min,Math.pow(10,Math.floor(at(e.min)))),s=Math.floor(at(r)),M=Math.floor(r/Math.pow(10,s)),l=s<0?Math.pow(10,Math.abs(s)):1;do a.push({value:r,major:Qg(r)}),++M,M===10&&(M=1,++s,l=s>=0?1:l),r=Math.round(M*Math.pow(10,s)*l)/l;while(s<n||s===n&&M<i);const u=nt(t.max,r);return a.push({value:u,major:Qg(r)}),a}class _g extends Mn{constructor(e){super(e),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(e,n){const i=Ir.prototype.parse.apply(this,[e,n]);if(i===0){this._zero=!0;return}return Be(i)&&i>0?i:null}determineDataLimits(){const{min:e,max:n}=this.getMinMax(!0);this.min=Be(e)?Math.max(0,e):null,this.max=Be(n)?Math.max(0,n):null,this.options.beginAtZero&&(this._zero=!0),this.handleTickRangeOptions()}handleTickRangeOptions(){const{minDefined:e,maxDefined:n}=this.getUserBounds();let i=this.min,a=this.max;const r=l=>i=e?i:l,s=l=>a=n?a:l,M=(l,u)=>Math.pow(10,Math.floor(at(l))+u);i===a&&(i<=0?(r(1),s(10)):(r(M(i,-1)),s(M(a,1)))),i<=0&&r(M(a,-1)),a<=0&&s(M(i,1)),this._zero&&this.min!==this._suggestedMin&&i===M(this.min,0)&&r(M(i,-1)),this.min=i,this.max=a}buildTicks(){const e=this.options,n={min:this._userMin,max:this._userMax},i=jp(n,this);return e.bounds==="ticks"&&Fu(i,this,"value"),e.reverse?(i.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),i}getLabelForValue(e){return e===void 0?"0":Wn(e,this.chart.options.locale,this.options.ticks.format)}configure(){const e=this.min;super.configure(),this._startValue=at(e),this._valueRange=at(this.max)-at(e)}getPixelForValue(e){return(e===void 0||e===0)&&(e=this.min),e===null||isNaN(e)?NaN:this.getPixelForDecimal(e===this.min?0:(at(e)-this._startValue)/this._valueRange)}getValueForPixel(e){const n=this.getDecimalForPixel(e);return Math.pow(10,this._startValue+n*this._valueRange)}}_g.id="logarithmic",_g.defaults={ticks:{callback:ar.formatters.logarithmic,major:{enabled:!0}}};function jM(t){const e=t.ticks;if(e.display&&t.display){const n=ot(e.backdropPadding);return le(e.font&&e.font.size,oe.font.size)+n.height}return 0}function dp(t,e,n){return n=pe(n)?n:[n],{w:oA(t,e.string,n),h:n.length*e.lineHeight}}function vg(t,e,n,i,a){return t===i||t===a?{start:e-n/2,end:e+n/2}:t<i||t>a?{start:e-n,end:e}:{start:e,end:e+n}}function Ip(t){const e={l:t.left+t._padding.left,r:t.right-t._padding.right,t:t.top+t._padding.top,b:t.bottom-t._padding.bottom},n=Object.assign({},e),i=[],a=[],r=t._pointLabels.length,s=t.options.pointLabels,M=s.centerPointLabels?Ee/r:0;for(let l=0;l<r;l++){const u=s.setContext(t.getPointLabelContext(l));a[l]=u.padding;const c=t.getPointPosition(l,t.drawingArea+a[l],M),g=et(u.font),y=dp(t.ctx,g,t._pointLabels[l]);i[l]=y;const j=gt(t.getIndexAngle(l)+M),d=Math.round(Os(j)),D=vg(d,c.x,y.w,0,180),f=vg(d,c.y,y.h,90,270);Dp(n,e,j,D,f)}t.setCenterPoint(e.l-n.l,n.r-e.r,e.t-n.t,n.b-e.b),t._pointLabelItems=fp(t,i,a)}function Dp(t,e,n,i,a){const r=Math.abs(Math.sin(n)),s=Math.abs(Math.cos(n));let M=0,l=0;i.start<e.l?(M=(e.l-i.start)/r,t.l=Math.min(t.l,e.l-M)):i.end>e.r&&(M=(i.end-e.r)/r,t.r=Math.max(t.r,e.r+M)),a.start<e.t?(l=(e.t-a.start)/s,t.t=Math.min(t.t,e.t-l)):a.end>e.b&&(l=(a.end-e.b)/s,t.b=Math.max(t.b,e.b+l))}function fp(t,e,n){const i=[],a=t._pointLabels.length,r=t.options,s=jM(r)/2,M=t.drawingArea,l=r.pointLabels.centerPointLabels?Ee/a:0;for(let u=0;u<a;u++){const c=t.getPointPosition(u,M+s+n[u],l),g=Math.round(Os(gt(c.angle+Ce))),y=e[u],j=zp(c.y,y.h,g),d=hp(g),D=mp(c.x,y.w,d);i.push({x:c.x,y:j,textAlign:d,left:D,top:j,right:D+y.w,bottom:j+y.h})}return i}function hp(t){return t===0||t===180?"center":t<180?"left":"right"}function mp(t,e,n){return n==="right"?t-=e:n==="center"&&(t-=e/2),t}function zp(t,e,n){return n===90||n===270?t-=e/2:(n>270||n<90)&&(t-=e),t}function Ap(t,e){const{ctx:n,options:{pointLabels:i}}=t;for(let a=e-1;a>=0;a--){const r=i.setContext(t.getPointLabelContext(a)),s=et(r.font),{x:M,y:l,textAlign:u,left:c,top:g,right:y,bottom:j}=t._pointLabelItems[a],{backdropColor:d}=r;if(!ye(d)){const D=hn(r.borderRadius),f=ot(r.backdropPadding);n.fillStyle=d;const N=c-f.left,I=g-f.top,z=y-c+f.width,T=j-g+f.height;Object.values(D).some(m=>m!==0)?(n.beginPath(),Ka(n,{x:N,y:I,w:z,h:T,radius:D}),n.fill()):n.fillRect(N,I,z,T)}Xa(n,t._pointLabels[a],M,l+s.lineHeight/2,s,{color:r.color,textAlign:u,textBaseline:"middle"})}}function Yg(t,e,n,i){const{ctx:a}=t;if(n)a.arc(t.xCenter,t.yCenter,e,0,fe);else{let r=t.getPointPosition(0,e);a.moveTo(r.x,r.y);for(let s=1;s<i;s++)r=t.getPointPosition(s,e),a.lineTo(r.x,r.y)}}function Tp(t,e,n,i){const a=t.ctx,r=e.circular,{color:s,lineWidth:M}=e;!r&&!i||!s||!M||n<0||(a.save(),a.strokeStyle=s,a.lineWidth=M,a.setLineDash(e.borderDash),a.lineDashOffset=e.borderDashOffset,a.beginPath(),Yg(t,n,r,i),a.closePath(),a.stroke(),a.restore())}function pp(t,e,n){return Gt(t,{label:n,index:e,type:"pointLabel"})}class Dr extends Ir{constructor(e){super(e),this.xCenter=void 0,this.yCenter=void 0,this.drawingArea=void 0,this._pointLabels=[],this._pointLabelItems=[]}setDimensions(){const e=this._padding=ot(jM(this.options)/2),n=this.width=this.maxWidth-e.width,i=this.height=this.maxHeight-e.height;this.xCenter=Math.floor(this.left+n/2+e.left),this.yCenter=Math.floor(this.top+i/2+e.top),this.drawingArea=Math.floor(Math.min(n,i)/2)}determineDataLimits(){const{min:e,max:n}=this.getMinMax(!1);this.min=Be(e)&&!isNaN(e)?e:0,this.max=Be(n)&&!isNaN(n)?n:0,this.handleTickRangeOptions()}computeTickLimit(){return Math.ceil(this.drawingArea/jM(this.options))}generateTickLabels(e){Ir.prototype.generateTickLabels.call(this,e),this._pointLabels=this.getLabels().map((n,i)=>{const a=Se(this.options.pointLabels.callback,[n,i],this);return a||a===0?a:""}).filter((n,i)=>this.chart.getDataVisibility(i))}fit(){const e=this.options;e.display&&e.pointLabels.display?Ip(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(e,n,i,a){this.xCenter+=Math.floor((e-n)/2),this.yCenter+=Math.floor((i-a)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(e,n,i,a))}getIndexAngle(e){const n=fe/(this._pointLabels.length||1),i=this.options.startAngle||0;return gt(e*n+ct(i))}getDistanceFromCenterForValue(e){if(ye(e))return NaN;const n=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-e)*n:(e-this.min)*n}getValueForDistanceFromCenter(e){if(ye(e))return NaN;const n=e/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-n:this.min+n}getPointLabelContext(e){const n=this._pointLabels||[];if(e>=0&&e<n.length){const i=n[e];return pp(this.getContext(),e,i)}}getPointPosition(e,n,i=0){const a=this.getIndexAngle(e)-Ce+i;return{x:Math.cos(a)*n+this.xCenter,y:Math.sin(a)*n+this.yCenter,angle:a}}getPointPositionForValue(e,n){return this.getPointPosition(e,this.getDistanceFromCenterForValue(n))}getBasePosition(e){return this.getPointPositionForValue(e||0,this.getBaseValue())}getPointLabelPosition(e){const{left:n,top:i,right:a,bottom:r}=this._pointLabelItems[e];return{left:n,top:i,right:a,bottom:r}}drawBackground(){const{backgroundColor:e,grid:{circular:n}}=this.options;if(e){const i=this.ctx;i.save(),i.beginPath(),Yg(this,this.getDistanceFromCenterForValue(this._endValue),n,this._pointLabels.length),i.closePath(),i.fillStyle=e,i.fill(),i.restore()}}drawGrid(){const e=this.ctx,n=this.options,{angleLines:i,grid:a}=n,r=this._pointLabels.length;let s,M,l;if(n.pointLabels.display&&Ap(this,r),a.display&&this.ticks.forEach((u,c)=>{if(c!==0){M=this.getDistanceFromCenterForValue(u.value);const g=a.setContext(this.getContext(c-1));Tp(this,g,M,r)}}),i.display){for(e.save(),s=r-1;s>=0;s--){const u=i.setContext(this.getPointLabelContext(s)),{color:c,lineWidth:g}=u;!g||!c||(e.lineWidth=g,e.strokeStyle=c,e.setLineDash(u.borderDash),e.lineDashOffset=u.borderDashOffset,M=this.getDistanceFromCenterForValue(n.ticks.reverse?this.min:this.max),l=this.getPointPosition(s,M),e.beginPath(),e.moveTo(this.xCenter,this.yCenter),e.lineTo(l.x,l.y),e.stroke())}e.restore()}}drawBorder(){}drawLabels(){const e=this.ctx,n=this.options,i=n.ticks;if(!i.display)return;const a=this.getIndexAngle(0);let r,s;e.save(),e.translate(this.xCenter,this.yCenter),e.rotate(a),e.textAlign="center",e.textBaseline="middle",this.ticks.forEach((M,l)=>{if(l===0&&!n.reverse)return;const u=i.setContext(this.getContext(l)),c=et(u.font);if(r=this.getDistanceFromCenterForValue(this.ticks[l].value),u.showLabelBackdrop){e.font=c.string,s=e.measureText(M.label).width,e.fillStyle=u.backdropColor;const g=ot(u.backdropPadding);e.fillRect(-s/2-g.left,-r-c.size/2-g.top,s+g.width,c.size+g.height)}Xa(e,M.label,0,-r,c,{color:u.color})}),e.restore()}drawTitle(){}}Dr.id="radialLinear",Dr.defaults={display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:ar.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback(t){return t},padding:5,centerPointLabels:!1}},Dr.defaultRoutes={"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"},Dr.descriptors={angleLines:{_fallback:"grid"}};const fr={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}},Ke=Object.keys(fr);function Lp(t,e){return t-e}function Ug(t,e){if(ye(e))return null;const n=t._adapter,{parser:i,round:a,isoWeekday:r}=t._parseOpts;let s=e;return typeof i=="function"&&(s=i(s)),Be(s)||(s=typeof i=="string"?n.parse(s,i):n.parse(s)),s===null?null:(a&&(s=a==="week"&&(Dn(r)||r===!0)?n.startOf(s,"isoWeek",r):n.startOf(s,a)),+s)}function Pg(t,e,n,i){const a=Ke.length;for(let r=Ke.indexOf(t);r<a-1;++r){const s=fr[Ke[r]],M=s.steps?s.steps:Number.MAX_SAFE_INTEGER;if(s.common&&Math.ceil((n-e)/(M*s.size))<=i)return Ke[r]}return Ke[a-1]}function xp(t,e,n,i,a){for(let r=Ke.length-1;r>=Ke.indexOf(n);r--){const s=Ke[r];if(fr[s].common&&t._adapter.diff(a,i,s)>=e-1)return s}return Ke[n?Ke.indexOf(n):0]}function Op(t){for(let e=Ke.indexOf(t)+1,n=Ke.length;e<n;++e)if(fr[Ke[e]].common)return Ke[e]}function Bg(t,e,n){if(!n)t[e]=!0;else if(n.length){const{lo:i,hi:a}=Es(n,e),r=n[i]>=e?n[i]:n[a];t[r]=!0}}function Sp(t,e,n,i){const a=t._adapter,r=+a.startOf(e[0].value,i),s=e[e.length-1].value;let M,l;for(M=r;M<=s;M=+a.add(M,1,i))l=n[M],l>=0&&(e[l].major=!0);return e}function Rg(t,e,n){const i=[],a={},r=e.length;let s,M;for(s=0;s<r;++s)M=e[s],a[M]=s,i.push({value:M,major:!1});return r===0||!n?i:Sp(t,i,a,n)}class hr extends Mn{constructor(e){super(e),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(e,n){const i=e.time||(e.time={}),a=this._adapter=new $0._date(e.adapters.date);a.init(n),vn(i.displayFormats,a.formats()),this._parseOpts={parser:i.parser,round:i.round,isoWeekday:i.isoWeekday},super.init(e),this._normalized=n.normalized}parse(e,n){return e===void 0?null:Ug(this,e)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const e=this.options,n=this._adapter,i=e.time.unit||"day";let{min:a,max:r,minDefined:s,maxDefined:M}=this.getUserBounds();function l(u){!s&&!isNaN(u.min)&&(a=Math.min(a,u.min)),!M&&!isNaN(u.max)&&(r=Math.max(r,u.max))}(!s||!M)&&(l(this._getLabelBounds()),(e.bounds!=="ticks"||e.ticks.source!=="labels")&&l(this.getMinMax(!1))),a=Be(a)&&!isNaN(a)?a:+n.startOf(Date.now(),i),r=Be(r)&&!isNaN(r)?r:+n.endOf(Date.now(),i)+1,this.min=Math.min(a,r-1),this.max=Math.max(a+1,r)}_getLabelBounds(){const e=this.getLabelTimestamps();let n=Number.POSITIVE_INFINITY,i=Number.NEGATIVE_INFINITY;return e.length&&(n=e[0],i=e[e.length-1]),{min:n,max:i}}buildTicks(){const e=this.options,n=e.time,i=e.ticks,a=i.source==="labels"?this.getLabelTimestamps():this._generate();e.bounds==="ticks"&&a.length&&(this.min=this._userMin||a[0],this.max=this._userMax||a[a.length-1]);const r=this.min,s=this.max,M=bz(a,r,s);return this._unit=n.unit||(i.autoSkip?Pg(n.minUnit,this.min,this.max,this._getLabelCapacity(r)):xp(this,M.length,n.minUnit,this.min,this.max)),this._majorUnit=!i.major.enabled||this._unit==="year"?void 0:Op(this._unit),this.initOffsets(a),e.reverse&&M.reverse(),Rg(this,M,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map(e=>+e.value))}initOffsets(e){let n=0,i=0,a,r;this.options.offset&&e.length&&(a=this.getDecimalForValue(e[0]),e.length===1?n=1-a:n=(this.getDecimalForValue(e[1])-a)/2,r=this.getDecimalForValue(e[e.length-1]),e.length===1?i=r:i=(r-this.getDecimalForValue(e[e.length-2]))/2);const s=e.length<3?.5:.25;n=Ve(n,0,s),i=Ve(i,0,s),this._offsets={start:n,end:i,factor:1/(n+1+i)}}_generate(){const e=this._adapter,n=this.min,i=this.max,a=this.options,r=a.time,s=r.unit||Pg(r.minUnit,n,i,this._getLabelCapacity(n)),M=le(r.stepSize,1),l=s==="week"?r.isoWeekday:!1,u=Dn(l)||l===!0,c={};let g=n,y,j;if(u&&(g=+e.startOf(g,"isoWeek",l)),g=+e.startOf(g,u?"day":s),e.diff(i,n,s)>1e5*M)throw new Error(n+" and "+i+" are too far apart with stepSize of "+M+" "+s);const d=a.ticks.source==="data"&&this.getDataTimestamps();for(y=g,j=0;y<i;y=+e.add(y,M,s),j++)Bg(c,y,d);return(y===i||a.bounds==="ticks"||j===1)&&Bg(c,y,d),Object.keys(c).sort((D,f)=>D-f).map(D=>+D)}getLabelForValue(e){const n=this._adapter,i=this.options.time;return i.tooltipFormat?n.format(e,i.tooltipFormat):n.format(e,i.displayFormats.datetime)}_tickFormatFunction(e,n,i,a){const r=this.options,s=r.time.displayFormats,M=this._unit,l=this._majorUnit,u=M&&s[M],c=l&&s[l],g=i[n],y=l&&c&&g&&g.major,j=this._adapter.format(e,a||(y?c:u)),d=r.ticks.callback;return d?Se(d,[j,n,i],this):j}generateTickLabels(e){let n,i,a;for(n=0,i=e.length;n<i;++n)a=e[n],a.label=this._tickFormatFunction(a.value,n,e)}getDecimalForValue(e){return e===null?NaN:(e-this.min)/(this.max-this.min)}getPixelForValue(e){const n=this._offsets,i=this.getDecimalForValue(e);return this.getPixelForDecimal((n.start+i)*n.factor)}getValueForPixel(e){const n=this._offsets,i=this.getDecimalForPixel(e)/n.factor-n.end;return this.min+i*(this.max-this.min)}_getLabelSize(e){const n=this.options.ticks,i=this.ctx.measureText(e).width,a=ct(this.isHorizontal()?n.maxRotation:n.minRotation),r=Math.cos(a),s=Math.sin(a),M=this._resolveTickFontOptions(0).size;return{w:i*r+M*s,h:i*s+M*r}}_getLabelCapacity(e){const n=this.options.time,i=n.displayFormats,a=i[n.unit]||i.millisecond,r=this._tickFormatFunction(e,0,Rg(this,[e],this._majorUnit),a),s=this._getLabelSize(r),M=Math.floor(this.isHorizontal()?this.width/s.w:this.height/s.h)-1;return M>0?M:1}getDataTimestamps(){let e=this._cache.data||[],n,i;if(e.length)return e;const a=this.getMatchingVisibleMetas();if(this._normalized&&a.length)return this._cache.data=a[0].controller.getAllParsedValues(this);for(n=0,i=a.length;n<i;++n)e=e.concat(a[n].controller.getAllParsedValues(this));return this._cache.data=this.normalize(e)}getLabelTimestamps(){const e=this._cache.labels||[];let n,i;if(e.length)return e;const a=this.getLabels();for(n=0,i=a.length;n<i;++n)e.push(Ug(this,a[n]));return this._cache.labels=this._normalized?e:this.normalize(e)}normalize(e){return ec(e.sort(Lp))}}hr.id="time",hr.defaults={bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",major:{enabled:!1}}};function mr(t,e,n){let i=0,a=t.length-1,r,s,M,l;n?(e>=t[i].pos&&e<=t[a].pos&&({lo:i,hi:a}=tn(t,"pos",e)),{pos:r,time:M}=t[i],{pos:s,time:l}=t[a]):(e>=t[i].time&&e<=t[a].time&&({lo:i,hi:a}=tn(t,"time",e)),{time:r,pos:M}=t[i],{time:s,pos:l}=t[a]);const u=s-r;return u?M+(l-M)*(e-r)/u:M}class Zg extends hr{constructor(e){super(e),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const e=this._getTimestampsForTable(),n=this._table=this.buildLookupTable(e);this._minPos=mr(n,this.min),this._tableRange=mr(n,this.max)-this._minPos,super.initOffsets(e)}buildLookupTable(e){const{min:n,max:i}=this,a=[],r=[];let s,M,l,u,c;for(s=0,M=e.length;s<M;++s)u=e[s],u>=n&&u<=i&&a.push(u);if(a.length<2)return[{time:n,pos:0},{time:i,pos:1}];for(s=0,M=a.length;s<M;++s)c=a[s+1],l=a[s-1],u=a[s],Math.round((c+l)/2)!==u&&r.push({time:u,pos:s/(M-1)});return r}_getTimestampsForTable(){let e=this._cache.all||[];if(e.length)return e;const n=this.getDataTimestamps(),i=this.getLabelTimestamps();return n.length&&i.length?e=this.normalize(n.concat(i)):e=n.length?n:i,e=this._cache.all=e,e}getDecimalForValue(e){return(mr(this._table,e)-this._minPos)/this._tableRange}getValueForPixel(e){const n=this._offsets,i=this.getDecimalForPixel(e)/n.factor-n.end;return mr(this._table,i*this._tableRange+this._minPos,!0)}}Zg.id="timeseries",Zg.defaults=hr.defaults;var Tn;(function(t){t.ChartRendered="chart:rendered",t.ChartUpdated="chart:updated",t.ChartDestroyed="chart:destroyed",t.LabelsUpdated="labels:updated"})(Tn||(Tn={}));function zr(t,e,n,i){t(e,n),i!==void 0&&i.emit(Tn.ChartRendered)}function Ep(t,e){t.update(),e!==void 0&&e.emit(Tn.ChartUpdated)}function Ar(t,e){t.destroy(),e!==void 0&&e.emit(Tn.ChartDestroyed)}function Cp(t,e){const n={labels:typeof t.labels=="undefined"?[]:[...t.labels],datasets:[]};return Vg(n,{...t},e),n}function Vg(t,e,n){const i=[];t.datasets=e.datasets.map(a=>{const r=t.datasets.find(s=>s[n]===a[n]);return!r||!a.data||i.includes(r)?{...a}:(i.push(r),Object.assign(r,a),r)})}function bp(t,e,n){t.data.labels=e,n!==void 0&&n.emit(Tn.LabelsUpdated)}function wp(t,e){t.options={...e}}function kp(t,e){const n=t.datasets.map(a=>a.label),i=e.datasets.map(a=>a.label);return e.datasets.length===t.datasets.length&&n.every((a,r)=>a===i[r])}const Qp="Please remove the <template></template> tags from your chart component. See https://vue-chartjs.org/guide/#vue-single-file-components",_p="Update ERROR: chart instance not found",vp=((t,e,n)=>o.defineComponent({props:{chartData:{type:Object,required:!0},chartOptions:{type:Object,default:()=>{}},datasetIdKey:{type:String,default:"label"},chartId:{type:String,default:t},width:{type:Number,default:400},height:{type:Number,default:400},cssClasses:{type:String,default:""},styles:{type:Object,default:()=>{}},plugins:{type:Array,default:()=>[]}},setup(i,a){ni.register(n);const r=o.shallowRef(null),s=o.ref(null);function M(g,y){if(r.value!==null&&Ar(o.toRaw(r.value),a),s.value===null)throw new Error(Qp);{const j=Cp(g,i.datasetIdKey),d=s.value.getContext("2d");d!==null&&(r.value=new ni(d,{type:e,data:o.isProxy(g)?new Proxy(j,{}):j,options:y,plugins:i.plugins}))}}function l(g,y){const j=o.isProxy(g)?o.toRaw(g):{...g},d=o.isProxy(y)?o.toRaw(y):{...y};if(Object.keys(d).length>0){const D=o.toRaw(r.value);kp(j,d)&&D!==null?(Vg(D==null?void 0:D.data,j,i.datasetIdKey),j.labels!==void 0&&bp(D,j.labels,a),c()):(D!==null&&Ar(D,a),zr(M,i.chartData,i.chartOptions,a))}else r.value!==null&&Ar(o.toRaw(r.value),a),zr(M,i.chartData,i.chartOptions,a)}function u(g){const y=o.toRaw(r.value);y!==null?(wp(y,g),c()):zr(M,i.chartData,i.chartOptions,a)}function c(){const g=o.toRaw(r.value);g!==null?Ep(g,a):console.error(_p)}return o.watch(()=>i.chartData,(g,y)=>l(g,y),{deep:!0}),o.watch(()=>i.chartOptions,g=>u(g),{deep:!0}),o.onMounted(()=>{"datasets"in i.chartData&&i.chartData.datasets.length>0&&zr(M,i.chartData,i.chartOptions,a)}),o.onBeforeUnmount(()=>{r.value!==null&&Ar(o.toRaw(r.value),a)}),a.expose({chart:r,updateChart:c}),()=>o.h("div",{style:i.styles,class:i.cssClasses},[o.h("canvas",{id:i.chartId,width:i.width,height:i.height,ref:s})])}}))("bar-chart","bar",ir);var tS="";const Yp={name:"MultiRangeSlider",props:{baseClassName:{type:String,default:"multi-range-slider"},min:{type:Number},max:{type:Number},minValue:{type:Number},maxValue:{type:Number},step:{type:Number,default:1},preventWheel:{type:Boolean,default:!1},ruler:{type:Boolean,default:!0},label:{type:Boolean,default:!0},labels:{type:Array},minCaption:{type:String},maxCaption:{type:String},rangeMargin:{type:Number}},data(){let t=this.labels||[],e=this.min===void 0?0:this.min,n=t.length?t.length-1:100,i=this.max===void 0?n:this.max,a=this.minValue===void 0?25:this.minValue;t.length&&this.minValue===void 0&&(a=1);let r=this.maxValue||75;if(t.length&&this.maxValue===void 0&&(r=t.length-2),i<=e)throw new Error("Invalid props min or max");if(a>r)throw new Error("Invalid props minValue or maxValue");let s=this.rangeMargin===void 0?this.step:this.rangeMargin,M=s%this.step;return M&&(s=s+this.step-M),{valueMin:a<e?e:a,valueMax:r>i?i:r,interVal:null,startX:null,mouseMoveCounter:null,barBox:null,barValue:0,rangeMarginValue:s}},methods:{onBarLeftClick(){this.valueMin-this.step>=this.minimum?this.valueMin-=this.step:this.valueMin=this.minimum},onInnerBarLeftClick(){this.valueMin+this.rangeMarginValue<this.valueMax&&(this.valueMin+=this.step)},onBarRightClick(){this.valueMax+this.step<=this.maximum?this.valueMax+=this.step:this.valueMax=this.maximum},onInnerBarRightClick(){this.valueMax-this.rangeMarginValue>this.valueMin&&(this.valueMax-=this.step)},onInputMinChange(t){let e=parseFloat(t.target.value);e<=this.valueMax-this.rangeMarginValue&&e>=this.minimum?this.valueMin=e:t.target.value=this.valueMin},onInputMaxChange(t){let e=parseFloat(t.target.value);e>=this.valueMin+this.rangeMarginValue&&e<=this.maximum?this.valueMax=e:t.target.value=this.valueMax},onLeftThumbMousedown(t){if(t.preventDefault(),this.startX=t.clientX,t.type==="touchstart")if(t.touches.length===1)this.startX=t.touches[0].clientX;else return;this.mouseMoveCounter=0,this.barValue=this.valueMin,this.barBox=t.target.parentNode.getBoundingClientRect(),document.addEventListener("mousemove",this.onLeftThumbMousemove),document.addEventListener("mouseup",this.onLeftThumbMouseup),document.addEventListener("touchmove",this.onLeftThumbMousemove),document.addEventListener("touchend",this.onLeftThumbMouseup)},onLeftThumbMousemove(t){this.mouseMoveCounter++;let e=t.clientX;t.type==="touchmove"&&(e=t.touches[0].clientX);let i=(e-this.startX)/this.barBox.width,a=this.barValue+(this.maximum-this.minimum)*i;a-=a%this.step,a<this.minimum?a=this.minimum:a>this.valueMax-this.rangeMarginValue&&(a=this.valueMax-this.rangeMarginValue),this.valueMin=a},onLeftThumbMouseup(){document.removeEventListener("mousemove",this.onLeftThumbMousemove),document.removeEventListener("mouseup",this.onLeftThumbMouseup),document.removeEventListener("touchmove",this.onLeftThumbMousemove),document.removeEventListener("touchend",this.onLeftThumbMouseup)},onRightThumbMousedown(t){if(t.preventDefault(),this.startX=t.clientX,t.type==="touchstart")if(t.touches.length===1)this.startX=t.touches[0].clientX;else return;this.mouseMoveCounter=0,this.barValue=this.valueMax,this.barBox=t.target.parentNode.getBoundingClientRect(),document.addEventListener("mousemove",this.onRightThumbMousemove),document.addEventListener("mouseup",this.onRightThumbMouseup),document.addEventListener("touchmove",this.onRightThumbMousemove),document.addEventListener("touchend",this.onRightThumbMouseup)},onRightThumbMousemove(t){this.mouseMoveCounter++;let e=t.clientX;t.type==="touchmove"&&(e=t.touches[0].clientX);let i=(e-this.startX)/this.barBox.width,a=this.barValue+(this.maximum-this.minimum)*i;a-=a%this.step,a<this.valueMin+this.rangeMarginValue?a=this.valueMin+this.rangeMarginValue:a>this.maximum&&(a=this.maximum),this.valueMax=a},onRightThumbMouseup(){document.removeEventListener("mousemove",this.onRightThumbMousemove),document.removeEventListener("mouseup",this.onRightThumbMouseup),document.removeEventListener("touchmove",this.onRightThumbMousemove),document.removeEventListener("touchend",this.onRightThumbMouseup)},onMouseWheel(t){if(this.preventWheel===!0||!t.shiftKey&&!t.ctrlKey)return;let e=this.step;t.deltaY<0&&(e=-e),t.shiftKey&&t.ctrlKey?this.valueMin+e>=this.minimum&&this.valueMax+e<=this.maximum&&(this.valueMin=this.valueMin+e,this.valueMax=this.valueMax+e):t.ctrlKey?(e=this.valueMax+e,e<this.valueMin+this.rangeMarginValue?e=this.valueMin+this.rangeMarginValue:e>this.maximum&&(e=this.maximum),this.valueMax=e):t.shiftKey&&(e=this.valueMin+e,e<this.minimum?e=this.minimum:e>this.valueMax-this.rangeMarginValue&&(e=this.valueMax-this.rangeMarginValue),this.valueMin=e)},triggerInput(){let t=0;this.step.toString().includes(".")&&(t=2);let e={min:this.minimum,max:this.maximum,minValue:parseFloat(this.valueMin.toFixed(t)),maxValue:parseFloat(this.valueMax.toFixed(t))};this.$emit("input",e)}},computed:{minimum(){return this.min===void 0?0:this.min},maximum(){let t=this.labels||[],e=t.length?t.length-1:100;return this.max===void 0?e:this.max},stepCount(){let t=this.labels||[];return t.length?t.length-1:Math.floor((this.maximum-this.minimum)/this.step)},subStepCount(){return(this.labels||[]).length&&this.step>1?(this.maximum-this.minimum)/this.step:0},barMin(){return(this.valueMin-this.minimum)/(this.maximum-this.minimum)*100},barMax(){return 100-(this.valueMax-this.minimum)/(this.maximum-this.minimum)*100},barMinVal(){let t=0;return this.step.toString().includes(".")&&(t=2),(this.valueMin||0).toFixed(t)},barMaxVal(){let t=0;return this.step.toString().includes(".")&&(t=2),(this.valueMax||100).toFixed(t)},scaleLabels(){let t=this.labels||[];return t.length===0&&(t=[],t.push(this.minimum),t.push(this.maximum)),t}},watch:{valueMin(){this.triggerInput()},valueMax(){this.triggerInput()},minValue(t){this.valueMin=t<this.minimum?this.minimum:t},maxValue(t){this.valueMax=t>this.maximum?this.maximum:t}},mounted(){}},Up={class:"bar"},Pp=["min","max","step","value"],Bp={class:"caption"},Rp={class:"min-caption"},Zp={class:"bar-inner"},Vp=["min","max","step","value"],Gp={class:"caption"},Wp={class:"max-caption"},$p={key:0,class:"ruler"},Hp={key:1,class:"sub-ruler"},Fp={key:2,class:"labels"};function Jp(t,e,n,i,a,r){return o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass([n.baseClassName,a.rangeMarginValue===0?"zero-ranage-margin":""]),onMousewheel:e[10]||(e[10]=o.withModifiers((...s)=>r.onMouseWheel&&r.onMouseWheel(...s),["prevent","stop"]))},[o.createElementVNode("div",Up,[o.createElementVNode("div",{class:"bar-left",style:o.normalizeStyle({width:r.barMin+"%"}),onClick:e[0]||(e[0]=(...s)=>r.onBarLeftClick&&r.onBarLeftClick(...s))},null,4),o.createElementVNode("input",{class:"input-type-range input-type-range-min",type:"range",min:r.minimum,max:r.maximum,step:n.step,value:a.valueMin,onInput:e[1]||(e[1]=o.withModifiers((...s)=>r.onInputMinChange&&r.onInputMinChange(...s),["stop","prevent"]))},null,40,Pp),o.createElementVNode("div",{class:"thumb thumb-left",onMousedown:e[2]||(e[2]=(...s)=>r.onLeftThumbMousedown&&r.onLeftThumbMousedown(...s)),onTouchstart:e[3]||(e[3]=(...s)=>r.onLeftThumbMousedown&&r.onLeftThumbMousedown(...s))},[o.createElementVNode("div",Bp,[o.createElementVNode("span",Rp,o.toDisplayString(n.minCaption||r.barMinVal),1)])],32),o.createElementVNode("div",Zp,[o.createElementVNode("div",{class:"bar-inner-left",onClick:e[4]||(e[4]=(...s)=>r.onInnerBarLeftClick&&r.onInnerBarLeftClick(...s))}),o.createElementVNode("div",{class:"bar-inner-right",onClick:e[5]||(e[5]=(...s)=>r.onInnerBarRightClick&&r.onInnerBarRightClick(...s))})]),o.createElementVNode("input",{class:"input-type-range input-type-range-max",type:"range",min:r.minimum,max:r.maximum,step:n.step,value:a.valueMax,onInput:e[6]||(e[6]=o.withModifiers((...s)=>r.onInputMaxChange&&r.onInputMaxChange(...s),["stop","prevent"]))},null,40,Vp),o.createElementVNode("div",{class:"thumb thumb-right",onMousedown:e[7]||(e[7]=(...s)=>r.onRightThumbMousedown&&r.onRightThumbMousedown(...s)),onTouchstart:e[8]||(e[8]=(...s)=>r.onRightThumbMousedown&&r.onRightThumbMousedown(...s))},[o.createElementVNode("div",Gp,[o.createElementVNode("span",Wp,o.toDisplayString(n.maxCaption||r.barMaxVal),1)])],32),o.createElementVNode("div",{class:"bar-right",style:o.normalizeStyle({width:r.barMax+"%"}),onClick:e[9]||(e[9]=(...s)=>r.onBarRightClick&&r.onBarRightClick(...s))},null,4)]),n.ruler?(o.openBlock(),o.createElementBlock("div",$p,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(r.stepCount,s=>(o.openBlock(),o.createElementBlock("div",{key:s,class:"ruler-rule"}))),128))])):o.createCommentVNode("",!0),r.subStepCount?(o.openBlock(),o.createElementBlock("div",Hp,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(r.subStepCount,s=>(o.openBlock(),o.createElementBlock("div",{key:s,class:"ruler-sub-rule"}))),128))])):o.createCommentVNode("",!0),n.label?(o.openBlock(),o.createElementBlock("div",Fp,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(r.scaleLabels,s=>(o.openBlock(),o.createElementBlock("div",{class:"label",key:s},o.toDisplayString(s),1))),128))])):o.createCommentVNode("",!0)],34)}var Xp=Ze(Yp,[["render",Jp]]);const Kp=o.defineComponent({components:{DhIcon:ue},props:{mainText:{type:String,default:"Advanced"},filterMissingText:{type:String,default:"Filter Missing"},matchText:{type:String,default:"Match"},excludeText:{type:String,default:"Exclude"}},data(){return{activeFilter:!1,isFilterMissing:!1,isMatch:!1,isExclude:!1}},emits:["match","exclude","filter_missing"],mounted(){this.isMatch=!0},methods:{toggleFilter(){this.activeFilter=!this.activeFilter},matchFilter(){this.isMatch=!0,this.isExclude=!1,this.$emit("match",this.isMatch)},excludeFilter(){this.isMatch=!1,this.isExclude=!0,this.$emit("exclude",this.isExclude)},missingFilter(){this.isFilterMissing=!this.isFilterMissing,this.$emit("filter_missing",this.isFilterMissing),this.isFilterMissing&&this.isMatch?this.matchFilter():this.isFilterMissing&&this.isExclude&&this.excludeFilter()}}}),qp={class:"dh-advanced-filter-container"},eL={class:"advance_section"},tL={key:0},nL={class:"list-none"},iL=["checked"],aL=["checked"],rL=["checked"];function oL(t,e,n,i,a,r){const s=o.resolveComponent("dh-icon");return o.openBlock(),o.createElementBlock("div",qp,[o.createElementVNode("div",eL,[o.createElementVNode("span",{class:"toggle-icon",onClick:e[0]||(e[0]=M=>t.toggleFilter())},[o.createTextVNode(o.toDisplayString(t.mainText)+" ",1),o.createVNode(s,{"icon-name":t.activeFilter?"arrow-up":"arrow-down",size:20},null,8,["icon-name"])]),t.activeFilter?(o.openBlock(),o.createElementBlock("div",tL,[o.renderSlot(t.$slots,"default"),o.createElementVNode("ul",nL,[o.createElementVNode("li",null,[o.createElementVNode("label",null,[o.createElementVNode("input",{checked:t.isFilterMissing,name:"number_filter",type:"checkbox",onChange:e[1]||(e[1]=M=>t.missingFilter())},null,40,iL),o.createTextVNode(" "+o.toDisplayString(t.filterMissingText),1)])]),o.createElementVNode("li",null,[o.createElementVNode("label",null,[o.createElementVNode("input",{checked:t.isMatch,name:"number_filter",type:"radio",onChange:e[2]||(e[2]=M=>t.matchFilter())},null,40,aL),o.createTextVNode(" "+o.toDisplayString(t.matchText),1)]),o.createElementVNode("label",null,[o.createElementVNode("input",{checked:t.isExclude,name:"number_filter",type:"radio",onChange:e[3]||(e[3]=M=>t.excludeFilter())},null,40,rL),o.createTextVNode(" "+o.toDisplayString(t.excludeText),1)])])])])):o.createCommentVNode("",!0)])])}var Gg=Ze(Kp,[["render",oL]]),nS="";ni.register(up,yr,dr,yM);const sL=o.defineComponent({components:{Bar:vp,MultiRangeSlider:Xp,DhAdvancedFilter:Gg},props:{numberRange:{type:Array,default:()=>[{key:1,count:10}]},width:{type:Number,default:200},height:{type:Number,default:50},chartId:{type:String,default:"bar-chart"},datasetIdKey:{type:String,default:"label"},steps:{type:Number,default:1},includeForm:{type:Boolean,default:!1}},data(){return{chartData:{labels:[],datasets:[{labels:"",data:[],backgroundColor:["#5ea9e5"],borderRadius:1,hoverBackgroundColor:"#e0e0e0"}]},chartOptions:{responsive:!0,plugins:{legend:{display:!1},tooltip:{enabled:!1}},scales:{x:{display:!1,grid:{display:!1},ticks:{display:!0}},y:{display:!1,grid:{display:!1},ticks:{display:!1}}}},chartLines:{},min:"1",max:this.maxNumber(this.numberRange),rangeMax:this.numberRange.length,chart_dta:[],BarMinValue:1,BarMaxValue:this.numberRange.length,activeFilter:!1,validated:!1,isMatch:!1,isExclude:!1,isDisable:!1,labels:[]}},mounted(){this.isMatch=!0,this.setChartData(this.numberRange),this.highlightChart(),this.labels=[this.BarMinValue,this.max]},methods:{matchFilter(){if(!this.isDisable){this.isMatch=!0,this.isExclude=!1;var t=this.chartData.datasets[0].data;this.chartLines=this.chartData.datasets[0],this.chartData.datasets[0].backgroundColor=[];for(let e=0;e<=t.length;e++)t[e]>=this.min&&t[e]<=this.max?this.chartData.datasets[0].backgroundColor.push("#5ea9e5"):this.chartData.datasets[0].backgroundColor.push("#e0e0e0")}},excludeFilter(){if(!this.isDisable){this.isMatch=!1,this.isExclude=!0;var t=this.chartData.datasets[0].data;this.chartLines=this.chartData.datasets[0],this.chartData.datasets[0].backgroundColor=[];for(let e=0;e<t.length;e++)t[e]>=this.min&&t[e]<=this.max?this.chartData.datasets[0].backgroundColor.push("#e0e0e0"):this.chartData.datasets[0].backgroundColor.push("#5ea9e5")}},missingFilter(){this.isDisable=!this.isDisable,this.validated=!this.validated;var t=this.chartData.datasets[0].data;if(this.chartLines=this.chartData.datasets[0],this.chartData.datasets[0].backgroundColor=[],this.validated)for(let e=1;e<=t.length;e++)this.chartData.datasets[0].backgroundColor.push("#e0e0e0");else this.isMatch&&this.matchFilter(),this.isExclude&&this.excludeFilter()},changeMin(t){let e=t.target.value;this.min=e||"1",this.BarMinValue=e?this.getFirstIndex(parseInt(e)):1,this.isMatch&&!this.isDisable&&this.matchFilter(),this.isExclude&&!this.isDisable&&this.excludeFilter()},changeMax(t){let e=t.target.value;this.BarMaxValue=e&&e>this.maxNumber(this.numberRange)?this.numberRange.length:this.getLastIndex(parseInt(e)),this.max=e&&e>this.maxNumber(this.numberRange)?this.maxNumber(this.numberRange):e,this.isMatch&&!this.isDisable&&this.matchFilter(),this.isExclude&&!this.isDisable&&this.excludeFilter()},setChartData(t){t=this.sortData(t),this.removeChartData();let e=this.chartData.labels;for(let n=0;n<t.length;n++)e.push(t[n].key),this.chart_dta.push(t[n].count);this.chartData.datasets[0].data=this.chart_dta},highlightChart(){var t=this.chartData.datasets[0].data;this.chartLines=this.chartData.datasets[0],this.chartData.datasets[0].backgroundColor=[];for(let e=0;e<=t.length;e++)t[e]>=this.min&&t[e]<=this.max?this.chartData.datasets[0].backgroundColor.push("#5ea9e5"):this.chartData.datasets[0].backgroundColor.push("#e0e0e0")},updateBarChart(t){const{minValue:e,maxValue:n}=t;this.BarMinValue=e,this.BarMaxValue=n;var i=this.chartData.datasets[0].data;this.min=i[this.BarMinValue]?i[this.BarMinValue]:"1",this.max=i[this.BarMaxValue]?i[this.BarMaxValue]:this.max,this.isMatch&&!this.isDisable&&this.matchFilter(),this.isExclude&&!this.isDisable&&this.excludeFilter()},toggleFilter(){this.activeFilter=!this.activeFilter},removeChartData(){this.chartData.labels=[],this.chartData.datasets[0].data=[],this.chart_dta=[]},sortData(t){return t.slice().sort(function(e,n){return e.count-n.count})},maxNumber(t){if(t.length!=0)return t.reduce((e,n)=>e=e>n.count?e:n.count,0)},getLastIndex(t){let e=this.chartData.datasets[0].data,n=0;for(let i=t;i>=0;i--)if(e.lastIndexOf(i)!==-1){n=e.lastIndexOf(i);break}else continue;return n},getFirstIndex(t){let e=this.chartData.datasets[0].data,n=0;for(let i=t;i<=this.max;i++)if(e.lastIndexOf(i)!==-1){n=e.lastIndexOf(i);break}else continue;return n}}}),ML={class:"dh-range-container"},lL={class:"bar-chart"},uL={key:0,class:"input-group-section"},cL={class:"input-group sb-input"},gL=["disabled","max","value"],NL={class:"input-group sb-input"},yL=["disabled","max","min","value"];function jL(t,e,n,i,a,r){const s=o.resolveComponent("Bar"),M=o.resolveComponent("MultiRangeSlider"),l=o.resolveComponent("dh-advanced-filter");return o.openBlock(),o.createElementBlock("div",ML,[o.createElementVNode("div",lL,[o.createVNode(s,{"chart-data":t.chartData,"chart-id":t.chartId,"chart-options":t.chartOptions,"dataset-id-key":t.datasetIdKey,height:t.height,width:t.width},null,8,["chart-data","chart-id","chart-options","dataset-id-key","height","width"]),o.createVNode(M,{"base-class-name":`multi-range-slider range-slider ${t.isDisable}`,label:!0,labels:t.labels,max:t.rangeMax,"max-caption":`${t.max}`,"max-value":t.BarMaxValue,min:1,"min-caption":`${t.min}`,"min-value":t.BarMinValue,"range-margin":0,ruler:!1,step:t.steps,onInput:t.updateBarChart},null,8,["base-class-name","labels","max","max-caption","max-value","min-caption","min-value","step","onInput"])]),t.includeForm?(o.openBlock(),o.createElementBlock("div",uL,[o.createElementVNode("div",cL,[o.createElementVNode("label",{class:o.normalizeClass(`dh-body-2 input-to ${t.validated?"disable":""}`)}," From ",2),o.createElementVNode("input",{class:"form-input text",disabled:!!t.validated,max:`${t.max}`,min:"1",placeholder:"From",type:"number",value:`${t.min}`,onInput:e[0]||(e[0]=u=>t.changeMin(u))},null,40,gL)]),o.createElementVNode("div",NL,[o.createElementVNode("label",{class:o.normalizeClass(`dh-body-2 input-to ${t.validated?"disable":""}`)}," To ",2),o.createElementVNode("input",{class:"form-input text",disabled:!!t.validated,max:`${t.maxNumber(t.numberRange)}`,min:`${t.min}`,placeholder:"To",type:"number",value:`${t.max}`,onInput:e[1]||(e[1]=u=>t.changeMax(u))},null,40,yL)])])):o.createCommentVNode("",!0),o.renderSlot(t.$slots,"input"),o.createVNode(l,{onExclude:t.excludeFilter,onFilter_missing:t.missingFilter,onMatch:t.matchFilter},{default:o.withCtx(()=>[o.renderSlot(t.$slots,"filter")]),_:3},8,["onExclude","onFilter_missing","onMatch"])])}var Wg=Ze(sL,[["render",jL]]),iS="",aS="";const dL={id:"dp-container"},IL=o.createElementVNode("div",{class:"dp__calendar_range"},[o.createElementVNode("p",null,"From"),o.createElementVNode("p",null,"To")],-1),DL={class:"dp__multi"},fL=["value"],hL=["value"],mL=o.createTextVNode(" Back "),zL=["onClick"],AL=["onClick"],TL=["onClick"],pL=["onClick"],LL=["onClick"],xL=["onClick"],OL=["onClick"],SL=["onClick"],EL=o.createElementVNode("div",{id:"tags",class:"dp__calendar_tags"},null,-1),CL={__name:"AdvancedDatePicker",props:{numberRange:{type:Array,required:!0}},emits:["update"],setup(t,{emit:e}){const n=o.ref(["",""]),i=o.ref(null),a=o.ref(null),r=o.ref(null),s=o.ref(!1),M=o.ref([{label:"Today",range:[new Date,new Date],slot:"today"},{label:"Previous week",range:[ou(ru(new Date)),ru(new Date)],slot:"previousWeek"},{label:"This week",range:[ou(new Date),_D(new Date)],slot:"week"},{label:"Next week",range:[YD(new Date),vD(new Date().setDate(new Date().getDate()+7))],slot:"nextWeek"},{label:"This month",range:[ci(new Date),ui(new Date)],slot:"currentMonth"},{label:"Previous month",range:[ci(tt(new Date,1)),ui(tt(new Date,1))],slot:"previousMonth"},{label:"Last 3 months",range:[ci(tt(new Date,3)),ui(tt(new Date,1))],slot:"threeMonths"},{label:"Last 6 months",range:[ci(tt(new Date,6)),ui(tt(new Date,1))],slot:"sixMonths"},{label:"Last year",range:[rN(new Date),aN(new Date)],slot:"yearly"}]),l=y=>{n.value=y,console.log(n.value),e("update",n.value)};function u(y){a.value=y.target.value,n.value=[y.target.value,i.value]}function c(y){i.value=y.target.value,n.value=[a.value,y.target.value]}o.onMounted(()=>{r.value.openMenu()});function g(){r.value.openMenu()}return(y,j)=>(o.openBlock(),o.createElementBlock("div",dL,[IL,o.createVNode(o.unref(Pa),{ref_key:"datePicker",ref:r,modelValue:n.value,"onUpdate:modelValue":[j[2]||(j[2]=d=>n.value=d),l],"auto-apply":"","day-names":["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],"enable-time-picker":!1,"model-type":"dd/MM/yyyy","multi-calendars":"","multi-calendars-solo":"","multi-static":!1,offset:12,position:"left","preset-ranges":M.value,range:"","select-text":"Apply","text-input":"",uid:"advanced",onClosed:g},{"dp-input":o.withCtx(()=>[o.createElementVNode("div",DL,[o.createElementVNode("input",{class:"dp__input dp__multi_input",placeholder:"MM/DD/YYYY",type:"text",value:a.value?a.value:n.value[0],onInput:j[0]||(j[0]=d=>u(d))},null,40,fL),o.createElementVNode("input",{class:"dp__input dp__multi_input",placeholder:"MM/DD/YYYY",type:"text",value:i.value?i.value:n.value[1],onInput:j[1]||(j[1]=d=>c(d))},null,40,hL)])]),"arrow-left":o.withCtx(()=>[o.createVNode(ue,{"icon-name":"previous",size:20})]),"arrow-right":o.withCtx(()=>[o.createVNode(ue,{"icon-name":"next",size:20})]),"calendar-icon":o.withCtx(()=>[mL]),"clear-icon":o.withCtx(()=>[]),"action-preview":o.withCtx(()=>[]),"action-select":o.withCtx(()=>[]),previousWeek:o.withCtx(({label:d,range:D,presetDateRange:f})=>[(o.openBlock(),o.createBlock(o.Teleport,{to:"#tags"},[o.createElementVNode("span",{onClick:N=>f(D)},o.toDisplayString(d),9,zL)]))]),week:o.withCtx(({label:d,range:D,presetDateRange:f})=>[(o.openBlock(),o.createBlock(o.Teleport,{to:"#tags"},[o.createElementVNode("span",{onClick:N=>f(D)},o.toDisplayString(d),9,AL)]))]),nextWeek:o.withCtx(({label:d,range:D,presetDateRange:f})=>[(o.openBlock(),o.createBlock(o.Teleport,{to:"#tags"},[o.createElementVNode("span",{onClick:N=>f(D)},o.toDisplayString(d),9,TL)]))]),currentMonth:o.withCtx(({label:d,range:D,presetDateRange:f})=>[(o.openBlock(),o.createBlock(o.Teleport,{to:"#tags"},[o.createElementVNode("span",{onClick:N=>f(D)},o.toDisplayString(d),9,pL)]))]),previousMonth:o.withCtx(({label:d,range:D,presetDateRange:f})=>[(o.openBlock(),o.createBlock(o.Teleport,{to:"#tags"},[o.createElementVNode("span",{onClick:N=>f(D)},o.toDisplayString(d),9,LL)]))]),threeMonths:o.withCtx(({label:d,range:D,presetDateRange:f})=>[(o.openBlock(),o.createBlock(o.Teleport,{to:"#tags"},[o.createElementVNode("span",{onClick:N=>f(D)},o.toDisplayString(d),9,xL)]))]),sixMonths:o.withCtx(({label:d,range:D,presetDateRange:f})=>[(o.openBlock(),o.createBlock(o.Teleport,{to:"#tags"},[o.createElementVNode("span",{onClick:N=>f(D)},o.toDisplayString(d),9,OL)]))]),yearly:o.withCtx(({label:d,range:D,presetDateRange:f})=>[(o.openBlock(),o.createBlock(o.Teleport,{to:"#tags"},[o.createElementVNode("span",{onClick:N=>f(D)},o.toDisplayString(d),9,SL)]))]),_:1},8,["modelValue","preset-ranges"]),o.createVNode(Wg,{class:"dp__calendar_range_number","number-range":t.numberRange,steps:1},{input:o.withCtx(()=>[EL]),filter:o.withCtx(()=>[o.createVNode(Ru,{data:s.value,label:"Include time",onChange:j[3]||(j[3]=d=>s.value=d)},null,8,["data"])]),_:1},8,["number-range"])]))}},bL=o.defineComponent({props:{target:{type:String,required:!0},trigger:{type:String,required:!0},placement:{type:Object,default:()=>({placement:"bottom"}),required:!1},tooltipText:{type:String,required:!0}},data(){return{show:!1}},methods:{showTooltip(){this.show=!this.show},tooltip(){let t=this.$refs.main,e=this.$refs[this.target];["right","left"].includes(this.placement)&&(e.style.top=-(((e==null?void 0:e.offsetHeight)-(t==null?void 0:t.offsetHeight))/2)+"px")}}}),wL=["placement","target","tooltipText","trigger"],kL=["id"],QL={class:"text"};function _L(t,e,n,i,a,r){return o.openBlock(),o.createElementBlock("div",{id:"main-contain",ref:"main",class:"dh-tooltip-container tooltip",placement:t.placement,target:t.target,tooltipText:t.tooltipText,trigger:t.trigger,onClick:e[0]||(e[0]=s=>t.trigger=="click"?t.showTooltip():null),onMouseover:e[1]||(e[1]=s=>t.tooltip())},[o.renderSlot(t.$slots,"default"),o.createElementVNode("div",{id:t.target,ref:t.target,class:o.normalizeClass(`tooltiptext ${t.show}`)},[o.createElementVNode("span",QL,o.toDisplayString(t.tooltipText),1)],10,kL)],40,wL)}var $g=Ze(bL,[["render",_L]]),rS="";const vL={class:"copy__text"},YL={__name:"Copiable",props:{text:{type:String,required:!0},placement:{type:String,default:"bottom"}},setup(t){const e=o.ref("copy text");function n(i){navigator.clipboard.writeText(i),e.value="copied !"}return(i,a)=>(o.openBlock(),o.createElementBlock("span",vL,[o.createTextVNode(o.toDisplayString(t.text)+" ",1),o.createVNode($g,{placement:t.placement,target:"tooltiptext","tooltip-text":e.value,trigger:"hover",onClick:a[0]||(a[0]=r=>n(t.text))},{default:o.withCtx(()=>[o.createVNode(ue,{class:"copy__text_icon","icon-name":"copy",size:"18"})]),_:1},8,["placement","tooltip-text"])]))}};var oS="";const UL=o.createTextVNode(" Back "),PL=o.createElementVNode("div",null,"today",-1),BL={__name:"DatePicker",props:{inline:{type:Boolean,default:!0}},emits:["update"],setup(t,{emit:e}){const n=o.ref(),i=o.ref(null),a=s=>{n.value=s,e("update",n.value)},r=o.ref([{date:xt(new Date,0),type:"dot",tooltip:[{text:"Dot with tooltip",color:"blue"}]}]);return(s,M)=>(o.openBlock(),o.createElementBlock("div",null,[o.createVNode(o.unref(Pa),{ref_key:"datePicker",ref:i,modelValue:n.value,"onUpdate:modelValue":[M[0]||(M[0]=l=>n.value=l),a],"day-names":["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],"enable-time-picker":!1,inline:t.inline,markers:r.value,"month-name-format":"short",offset:12,placeholder:"MM/DD/YYYY","select-text":"Apply","text-input":"",uid:"base"},{"arrow-left":o.withCtx(()=>[o.createVNode(ue,{"icon-name":"previous",size:20})]),"arrow-right":o.withCtx(()=>[o.createVNode(ue,{"icon-name":"next",size:20})]),"calendar-icon":o.withCtx(()=>[UL]),"clear-icon":o.withCtx(()=>[]),"action-preview":o.withCtx(()=>[]),"marker-tooltip":o.withCtx(()=>[PL]),_:1},8,["modelValue","inline","markers"])]))}};var sS="";const RL=["src"],ZL={key:3,class:"menu-item-text-wrapper"};var Hg=Ze(o.defineComponent({__name:"DropdownMenuItem",props:{item:{type:Object,required:!0},textEllipsisStyle:{type:String,required:!1,default:"none",validator:t=>["none","ellipsis","fit-content"].includes(t)},iconSize:{type:Number,required:!1,default:24}},setup(t){const e=t;return(n,i)=>(o.openBlock(),o.createElementBlock(o.Fragment,null,[t.item.iconUrl?(o.openBlock(),o.createElementBlock("img",{key:0,alt:"icon image",class:"icon icon-url",src:t.item.iconUrl},null,8,RL)):o.createCommentVNode("",!0),t.item.iconUrl?o.createCommentVNode("",!0):(o.openBlock(),o.createBlock(ue,o.mergeProps({key:1,class:"icon"},{...t.item,size:e.iconSize}),null,16)),t.item.subText?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock("span",{key:2,class:o.normalizeClass(["dh-body-2",t.textEllipsisStyle])},o.toDisplayString(t.item.text),3)),t.item.subText?(o.openBlock(),o.createElementBlock("div",ZL,[o.createElementVNode("span",{class:o.normalizeClass(["dh-body-1",t.textEllipsisStyle])},o.toDisplayString(t.item.text),3),o.createElementVNode("span",{class:o.normalizeClass(["dh-body-4-medium",t.textEllipsisStyle])},o.toDisplayString(t.item.subText),3)])):o.createCommentVNode("",!0),t.item.isSelected?(o.openBlock(),o.createBlock(ue,{key:4,class:"icon-blue icon-accept","icon-name":"accept",size:16})):o.createCommentVNode("",!0)],64))}}),[["__scopeId","data-v-35071082"]]),lS="";const VL=["data-e2e","onClick"],GL=["onClick"];var WL=Ze(o.defineComponent({__name:"DropdownMenu",props:{items:{type:Object,required:!0},textEllipsisStyle:{type:String,required:!1,default:"none",validator:t=>["none","ellipsis","fit-content"].includes(t)},iconSize:{type:Number,required:!1,default:24},closeOnClickOutside:{type:Boolean,required:!1,default:!0},zIndex:{type:Number,required:!1,default:100},closeOnItemSelected:{type:Boolean,required:!1,default:!0}},emits:["itemSelected","close"],setup(t,{emit:e}){const n=t;o.onMounted(()=>{document.addEventListener("click",r=>{i(r)})});function i(r){const s=r.target,M=document.querySelector("[data-id='dropdown-menu']");M&&!M.contains(r.target)&&!s.classList.contains("dropdown-toggle")&&n.closeOnClickOutside&&e("close")}function a(r){e("itemSelected",r),n.closeOnItemSelected&&e("close")}return(r,s)=>{const M=o.resolveComponent("router-link");return o.openBlock(),o.createElementBlock("div",{class:"dropdown-menu","data-id":"dropdown-menu",style:o.normalizeStyle({"z-index":n.zIndex})},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(t.items,l=>(o.openBlock(),o.createElementBlock("div",{key:l.iconName,class:"menu-item","data-e2e":l.dataE2eTag,onClick:u=>a(l)},[l.url?(o.openBlock(),o.createBlock(M,{key:0,class:"center-vertical",to:{path:l.url},onClick:u=>a(l)},{default:o.withCtx(()=>[o.createVNode(Hg,{"icon-size":t.iconSize,item:l,"text-ellipsis-style":t.textEllipsisStyle},null,8,["icon-size","item","text-ellipsis-style"])]),_:2},1032,["to","onClick"])):(o.openBlock(),o.createElementBlock("div",{key:1,class:"center-vertical",onClick:u=>a(l)},[o.createVNode(Hg,{"icon-size":t.iconSize,item:l,"text-ellipsis-style":t.textEllipsisStyle},null,8,["icon-size","item","text-ellipsis-style"])],8,GL))],8,VL))),128))],4)}}}),[["__scopeId","data-v-0c809d82"]]),cS="";const $L={key:0,class:"invalid-feedback"},HL=o.defineComponent({__name:"Error",props:{errors:{type:Object,required:!1,default:void 0}},setup(t){const e=t;return(n,i)=>{var a;return o.unref(e).errors&&((a=o.unref(e).errors)==null?void 0:a.length)>0?(o.openBlock(),o.createElementBlock("div",$L,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(t.errors,r=>(o.openBlock(),o.createElementBlock("span",{key:r},o.toDisplayString(r),1))),128))])):o.createCommentVNode("",!0)}}}),FL=o.defineComponent({components:{DhIcon:ue},props:{title:{type:String,default:"Advanced"},isAdvancedSettingsOpen:{type:Boolean,default:!1}},data(){return{isAdvancedSettingsCurrentlyOpen:!1}},watch:{isAdvancedSettingsOpen:function(t){this.isAdvancedSettingsCurrentlyOpen=t}},mounted(){this.isAdvancedSettingsCurrentlyOpen=this.isAdvancedSettingsOpen}}),JL={class:"dh-body-1-medium"},XL=o.createTextVNode(" Content ");function KL(t,e,n,i,a,r){const s=o.resolveComponent("dh-icon");return o.openBlock(),o.createElementBlock(o.Fragment,null,[o.createElementVNode("div",{class:o.normalizeClass(["advanced-panel-header clickable",{opened:t.isAdvancedSettingsCurrentlyOpen,closed:!t.isAdvancedSettingsCurrentlyOpen}]),"data-e2e":"expansion-panel-button",onClick:e[0]||(e[0]=M=>t.isAdvancedSettingsCurrentlyOpen=!t.isAdvancedSettingsCurrentlyOpen)},[o.createElementVNode("h4",JL,o.toDisplayString(t.title),1),o.createVNode(s,{class:"icon","icon-name":t.isAdvancedSettingsCurrentlyOpen?"arrow-up":"arrow-down",size:24},null,8,["icon-name"])],2),t.isAdvancedSettingsCurrentlyOpen?o.renderSlot(t.$slots,"content",{key:0},()=>[XL]):o.createCommentVNode("",!0)],64)}var qL=Ze(FL,[["render",KL]]),gS="";const ex=o.createElementVNode("label",{for:"upload_pdf"},[o.createTextVNode(" Drag and drop file or "),o.createElementVNode("span",{id:"upload"},"browse")],-1),tx={key:1,class:"file__upload_items"},nx={class:"file__upload_list_item"},ix={class:"file__upload_list_item_label"},ax=["title"],rx={key:0,class:"label__antivirus"},ox={key:1,class:"label__antivirus label__antivirus--failed"},sx={key:2,class:"label__antivirus label__antivirus--detected"},Mx=o.createElementVNode("br",null,null,-1),lx={key:3},ux={key:4},cx={key:0},gx=["value"],Nx=["href"],yx={key:2,class:"file__upload_placeholder"},jx={key:3,class:"file__upload_action"},dx=o.createElementVNode("button",{class:"file__upload_action_cancel"},"Cancel",-1),Ix={__name:"FileUpload",props:{uploadProgress:{type:Array,required:!0},modelValue:{type:FileList,required:!1,default:void 0},inline:{type:Boolean,required:!1,default:!1},errorOccurred:{type:Array,required:!0},errorMessage:{type:String,required:!1,default:"an error occurred while uploading"},fileSaved:{type:Boolean,default:!1},virusCheck:{type:Array,required:!0},virusCheckText:{type:String,required:!1,default:"Antivirus check ..."},virusCheckFailedText:{type:String,required:!1,default:"Antivirus check failed"},virusDetectedText:{type:String,required:!1,default:"Virus detected"},deleteConfirmationText:{type:String,required:!1,default:"Are you sure you want to delete it permanently? this action will be irreversible"},zIndex:{type:Number,required:!1,default:99}},emits:["update:modelValue","save:modelValue","reload"],setup(t,{emit:e}){const n=t,i=o.ref(null),a=o.ref(!1),r=o.ref([]),s=o.ref([".pdf",".csv",".doc",".jpeg",".mp4",".png",".txt",".xls"]);function M(z,T=2){if(!+z)return"0 Bytes";const m=1024,A=T<0?0:T,w=["Bytes","KB","MB","GB","TB","PB","EB","ZB","YB"],Q=Math.floor(Math.log(z)/Math.log(m));return`${parseFloat((z/Math.pow(m,Q)).toFixed(A))} ${w[Q]}`}function l(z){return s.value.includes(c(z))?c(z).slice(1):"unknown"}function u(z){const T=z.lastIndexOf(".");let m=z.slice(0,T);return m.length<=15?m:m.slice(0,15)+"... "}function c(z){return z.replace(/.*(?=\.)/g,"")}function g(z){z.stopPropagation(),r.value=i.value.files,r.value&&(a.value=!0),e("update:modelValue",r.value)}function y(z){z.stopPropagation(),z.dataTransfer.dropEffect="copy"}function j(z){z.stopPropagation(),a.value=!0,r.value=z.dataTransfer.files,e("update:modelValue",r.value)}function d(z){window.confirm(n.deleteConfirmationText)&&D(z)}function D(z){const T=new DataTransfer;for(let m=0;m<r.value.length;m++){const A=r.value[m];z!==m&&T.items.add(A)}r.value=T.files,r.value.length==0&&(a.value=!1)}function f(){e("save:modelValue",r.value)}function N(z){return URL.createObjectURL(z)}function I(z){z.preventDefault(),e("reload")}return(z,T)=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(["file__upload",t.inline?"":"file__upload_box"])},[t.fileSaved?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock("div",{key:0,class:"file__upload_btn",onDragover:T[1]||(T[1]=o.withModifiers(m=>y(m),["prevent"])),onDrop:T[2]||(T[2]=o.withModifiers(m=>j(m),["prevent"]))},[o.createVNode(ue,{class:"file__upload_btn_icon","icon-name":"upload",size:24}),ex,o.createElementVNode("input",{id:"upload_pdf",ref_key:"upload",ref:i,multiple:"",name:"file",type:"file",onInput:T[0]||(T[0]=m=>g(m))},null,544)],32)),a.value?(o.openBlock(),o.createElementBlock("div",tx,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(r.value,(m,A)=>(o.openBlock(),o.createElementBlock("div",{key:A,class:o.normalizeClass(["file__upload_list",t.inline?"":"file__upload_list_box"])},[o.createVNode(ue,{class:o.normalizeClass(t.errorOccurred[A]?"file__upload_list_icon":""),"icon-name":"file-"+l(m.name),size:40},null,8,["class","icon-name"]),n.uploadProgress[A]==100&&t.fileSaved&&!t.errorOccurred[A]&&t.virusCheck[A]=="loading"?(o.openBlock(),o.createBlock(ue,{key:0,class:"file__upload_list_icon_sub file__upload_list_icon_sub--loading","icon-name":"states",size:20,style:o.normalizeStyle({"z-index":n.zIndex})},null,8,["style"])):o.createCommentVNode("",!0),n.uploadProgress[A]==100&&t.fileSaved&&t.virusCheck[A]=="failed"?(o.openBlock(),o.createBlock(ue,{key:1,class:"file__upload_list_icon_sub","icon-name":"warning",size:20,style:o.normalizeStyle({"z-index":n.zIndex})},null,8,["style"])):o.createCommentVNode("",!0),n.uploadProgress[A]==100&&t.fileSaved&&t.virusCheck[A]=="detected"?(o.openBlock(),o.createBlock(ue,{key:2,class:"file__upload_list_icon_sub","icon-name":"danger",size:20,style:o.normalizeStyle({"z-index":n.zIndex})},null,8,["style"])):o.createCommentVNode("",!0),t.fileSaved&&t.errorOccurred[A]?(o.openBlock(),o.createBlock(ue,{key:3,class:"file__upload_list_icon_sub","icon-name":"error",size:20,style:o.normalizeStyle({"z-index":n.zIndex})},null,8,["style"])):o.createCommentVNode("",!0),o.createElementVNode("div",nx,[o.createElementVNode("div",ix,[o.createElementVNode("div",null,[o.createElementVNode("span",{title:m.name},o.toDisplayString(u(m.name))+o.toDisplayString(c(m.name)),9,ax),n.uploadProgress[A]==100&&t.fileSaved&&!t.errorOccurred[A]&&t.virusCheck[A]=="loading"?(o.openBlock(),o.createElementBlock("span",rx,[o.createTextVNode(o.toDisplayString(t.virusCheckText)+" ",1),o.createVNode(ue,{class:"file__upload_list_icon_sub--loading","icon-name":"processing",size:18})])):o.createCommentVNode("",!0),n.uploadProgress[A]==100&&t.fileSaved&&t.virusCheck[A]=="failed"?(o.openBlock(),o.createElementBlock("span",ox,o.toDisplayString(t.virusCheckFailedText),1)):o.createCommentVNode("",!0),n.uploadProgress[A]==100&&t.fileSaved&&t.virusCheck[A]=="detected"?(o.openBlock(),o.createElementBlock("span",sx,o.toDisplayString(t.virusDetectedText),1)):o.createCommentVNode("",!0),Mx,t.fileSaved&&!t.errorOccurred[A]||!t.errorOccurred[A]&&t.virusCheck[A]?(o.openBlock(),o.createElementBlock("span",lx,o.toDisplayString(M(m.size)),1)):o.createCommentVNode("",!0),t.fileSaved&&t.errorOccurred[A]?(o.openBlock(),o.createElementBlock("span",ux,o.toDisplayString(t.errorMessage),1)):o.createCommentVNode("",!0)]),t.fileSaved?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock("span",cx,o.toDisplayString(n.uploadProgress[A])+"%",1))]),t.fileSaved?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock("progress",{key:0,id:"file",max:"100",value:n.uploadProgress[A]},o.toDisplayString(n.uploadProgress[A])+"% ",9,gx))]),t.fileSaved&&!t.virusCheck[A]&&!t.errorOccurred[A]?(o.openBlock(),o.createElementBlock("a",{key:4,class:"file__upload_list_download",download:"",href:N(m)},[o.createVNode(ue,{class:"file__upload_list_download_icon","icon-name":"download",size:24})],8,Nx)):o.createCommentVNode("",!0),t.fileSaved&&t.errorOccurred[A]?(o.openBlock(),o.createElementBlock("a",{key:5,class:"file__upload_list_retry",onClick:T[3]||(T[3]=w=>I(w))},[o.createVNode(ue,{class:"file__upload_list_retry_icon","icon-name":"retry",size:24})])):o.createCommentVNode("",!0),n.uploadProgress[A]!==100?(o.openBlock(),o.createBlock(ue,{key:6,class:"file__upload_list_delete","icon-name":"close",size:24,onClick:w=>D(A)},null,8,["onClick"])):(o.openBlock(),o.createBlock(ue,{key:7,class:"file__upload_list_delete","icon-name":"delete",size:24,onClick:w=>d(A)},null,8,["onClick"]))],2))),128))])):o.createCommentVNode("",!0),!a.value&&!t.inline?(o.openBlock(),o.createElementBlock("div",yx," No file selected ")):o.createCommentVNode("",!0),!t.inline&&!t.fileSaved?(o.openBlock(),o.createElementBlock("div",jx,[dx,o.createElementVNode("button",{class:o.normalizeClass(["file__upload_action_done",a.value&&!t.fileSaved?"file__upload_action_done--active":""]),onClick:f}," Done ",2)])):o.createCommentVNode("",!0)],2))}};var NS="";const Dx={class:"input__dropdown"},fx={class:"input__dropdown_second"},hx=["tabindex"],mx=["onClick"],zx=["onClick"],Ax={__name:"InputDropdown",props:{list:{type:Array,required:!0},labelProp:{type:String,default:"label"},icon:{type:String,required:!0},placeholder:{type:String,default:"select from menu"},tabindex:{type:Number,required:!1,default:0}},emits:["update"],setup(t,{emit:e}){const n=t,i=o.ref(n.placeholder),a=o.ref(!1),r=o.ref(null);o.onMounted(()=>{e("update","",i.value)});function s(){e("update",r.value.value,i.value)}return(M,l)=>(o.openBlock(),o.createElementBlock("div",Dx,[o.createElementVNode("input",{ref_key:"name",ref:r,class:"input__dropdown_text",type:"text",onInput:s},null,544),o.createElementVNode("div",fx,[o.createVNode(ue,{"icon-name":t.icon,size:18},null,8,["icon-name"]),o.createElementVNode("div",{class:"custom__select",tabindex:t.tabindex,onBlur:l[1]||(l[1]=u=>a.value=!1)},[o.createElementVNode("div",{class:o.normalizeClass(["custom__select_selected",{"custom__select--open":a.value}]),onClick:l[0]||(l[0]=u=>a.value=!a.value)},o.toDisplayString(i.value),3),typeof t.list[0]=="object"?(o.openBlock(),o.createElementBlock("div",{key:0,class:o.normalizeClass(["custom__select_items",{"custom__select--hide":!a.value}])},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(t.list,(u,c)=>(o.openBlock(),o.createElementBlock("div",{key:c,onClick:g=>{i.value=u[t.labelProp],a.value=!1,s()}},o.toDisplayString(u[t.labelProp]),9,mx))),128))],2)):o.createCommentVNode("",!0),typeof t.list[0]=="string"?(o.openBlock(),o.createElementBlock("div",{key:1,class:o.normalizeClass(["custom__select_items",{"custom__select--hide":!a.value}])},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(t.list,(u,c)=>(o.openBlock(),o.createElementBlock("div",{key:c,onClick:g=>{i.value=u,a.value=!1,s()}},o.toDisplayString(u),9,zx))),128))],2)):o.createCommentVNode("",!0)],40,hx)])]))}};var yS="";const Tx={class:"input__group"},px=["type"],Lx={__name:"InputGroup",props:{inputType:{type:String,default:"text"},iconName:{type:String,required:!0},widthProp:{type:String,default:"200px"},direction:{type:String,default:"right"}},setup(t){const e=t;o.useCssVars(i=>({"14ee876f":n.value,"0aeebdb8":t.widthProp}));const n=o.ref("row");return o.onMounted(()=>{e.direction=="left"&&(n.value="row-reverse")}),(i,a)=>(o.openBlock(),o.createElementBlock("div",Tx,[o.createElementVNode("input",{class:"input__group_field",type:t.inputType},null,8,px),o.createVNode(ue,{class:"input__group_icon","icon-name":t.iconName},null,8,["icon-name"])]))}};var xx="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABoAAAAaCAYAAACpSkzOAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAR2SURBVHgBlVVdaFtlGH6+LydJ89OYtHVbf+YyhoPK5uK2G3/oIlTYhRctKApebAiCXowtDLzxIi3sUqnBiiBerF6osGl7J0idqWyD4WSZF3PzZ4tt7Y/NmnRN0yYn5/t8z9e0Ne35Wnwg5Jzzvt/7vO/7vT8MO6BnYDEuPP4TXMi4kIgyxqOrElEAZEZKZLhVHhpJBDPb2WE6wcsDZtwwXEkJGd9G7T9WRJqZ+f6RxONprUp9BDIs3CLJJM7tSLAJkg5xIT6EVSTCSEFLdPKT5ai36hqWzBVj8v+R1IFVM8y0ekcSvuwWop6BfFgaoR8kY0RSf04qRUriSh6l/AzcDY3wRtpgmWUSUhSewFYuITMFwV9MJ5iKzFgTCHfITtcWEhvW/H38NfYpViZ+UZ7Jmn920B3dZxDuPLnljOQsFmYiSY8J+53Xook734nE4v1r+P2rBMoTt1VUqzRC/ThFU85P2m7CCYKxc3bVrhNZRjDpdPHmoxnMXBmErFbgDIncza+RuzGE1QTXQ1k0fElF9OpAJcaZK+5kZuHuKCqlAraDbWzmxmWUJm5pXEH89Y8W49w0cNrBGYWlqTvbFvjTna1oigQoLQKP/ryq0eIooSFOxcCP6AxJaWkkDAEfw/uJ52GaJt658D1yhSmdGdJmJ+iOZEyrQaFeOPss9u3xKXUVHlXN8UO78U2qFx0tbuxv9eOzZDepCr0ZGlsGdUFYR3L04C50H4ugt2s/HkwXsVgqoyXUgLbdQeITtgFFEPK58VR7iFKk81dEuU7m5yWkXmtEo98Ao0jeS12FWeVo3+WnZhT48edJvNl3RTkU8nN8fKoJAWNJE5HdsJJl6SG6WVZhbsyZfuxVlSLwwbtd2NMcUM/2wReOP4Enoy2rVuhbQTRhpep25pGiwBmvZJ2EVcuD8/fewGwloIy1NftUdUlqUkn7glPKWpsblO7flTDO330FFjyORKSd4bBcY9CCYboUXFe3S9UmYmuvNeTJGRrEziTM1q/eJieLaWhAnuDbiQO12cZgLa0Ay1UI+7eyUfqjMwehWymMHHNXqxc57Y003W5aR3YrfwCXsp3KkCvgAfd7wX3073PRLAOGxztxbWqfrudtpC/R9uWrrGa/1KjS6MSXfxzFFxNdsJhXxUmOQbj8+Py35zB07xilh2kyAoom328/K6KRM740mUxtHoz2fRTmBKYfMMxXaP+wCMzcAsyHCyQLomRElayQs+y1tAVUAKnLtdW+3ke8avSRILNGZpPMjlsozlMBUI6u36Ebaz8M+OjiPUHwvc9g9KeyWkqLD13ITdpkG9OBPmcQNPrW3uti7hlYjkq3Z5iSH8vPEslCfSV1Ha7g1EucSt/Exe8krv/qrzMQeMxCUyu3d1WGutt5lW+QyXDZLPf9M26cldAODkfY99zSUU4FvL6+kdoK1xKt4dDbc3G3EUmSQhw7EDLqFSFZmvZtf2bQvm8HHeyA2FvFGPd6TlN0R0iZJj0Lq2NSZiWsLGNsjKOYvjlIbbIN/gUK8Nn86IrnuAAAAABJRU5ErkJggg==";function At(t){return[null,void 0].indexOf(t)!==-1}function Ox(t,e,n){const{object:i,valueProp:a,mode:r}=o.toRefs(t),s=o.getCurrentInstance().proxy,M=n.iv,l=g=>{M.value=c(g);const y=u(g);e.emit("change",y,s),e.emit("input",y),e.emit("update:modelValue",y)},u=g=>i.value||At(g)?g:Array.isArray(g)?g.map(y=>y[a.value]):g[a.value],c=g=>At(g)?r.value==="single"?{}:[]:g;return{update:l}}function Sx(t,e){const{value:n,modelValue:i,mode:a,valueProp:r}=o.toRefs(t),s=o.ref(a.value!=="single"?[]:{}),M=i&&i.value!==void 0?i:n,l=o.computed(()=>a.value==="single"?s.value[r.value]:s.value.map(c=>c[r.value])),u=o.computed(()=>a.value!=="single"?s.value.map(c=>c[r.value]).join(","):s.value[r.value]);return{iv:s,internalValue:s,ev:M,externalValue:M,textValue:u,plainValue:l}}function Ex(t,e,n){const{regex:i}=o.toRefs(t),a=o.getCurrentInstance().proxy,r=n.isOpen,s=n.open,M=o.ref(null),l=o.ref(null),u=()=>{M.value=""},c=j=>{M.value=j.target.value},g=j=>{if(i&&i.value){let d=i.value;typeof d=="string"&&(d=new RegExp(d)),j.key.match(d)||j.preventDefault()}},y=j=>{if(i&&i.value){let D=(j.clipboardData||window.clipboardData).getData("Text"),f=i.value;typeof f=="string"&&(f=new RegExp(f)),D.split("").every(N=>!!N.match(f))||j.preventDefault()}e.emit("paste",j,a)};return o.watch(M,j=>{!r.value&&j&&s(),e.emit("search-change",j,a)}),{search:M,input:l,clearSearch:u,handleSearchInput:c,handleKeypress:g,handlePaste:y}}function Cx(t,e,n){const{groupSelect:i,mode:a,groups:r,disabledProp:s}=o.toRefs(t),M=o.ref(null),l=c=>{c===void 0||c!==null&&c[s.value]||r.value&&c&&c.group&&(a.value==="single"||!i.value)||(M.value=c)};return{pointer:M,setPointer:l,clearPointer:()=>{l(null)}}}function Tr(t,e=!0){return e?String(t).toLowerCase().trim():String(t).normalize("NFD").replace(/\p{Diacritic}/gu,"").toLowerCase().trim()}function bx(t){return Object.prototype.toString.call(t)==="[object Object]"}function wx(t,e){const n=e.slice().sort();return t.length===e.length&&t.slice().sort().every(function(i,a){return i===n[a]})}function kx(t,e,n){const{options:i,mode:a,trackBy:r,limit:s,hideSelected:M,createTag:l,createOption:u,label:c,appendNewTag:g,appendNewOption:y,multipleLabel:j,object:d,loading:D,delay:f,resolveOnLoad:N,minChars:I,filterResults:z,clearOnSearch:T,clearOnSelect:m,valueProp:A,canDeselect:w,max:Q,strict:Y,closeOnSelect:B,groups:k,reverse:h,infinite:E,groupOptions:b,groupHideEmpty:p,groupSelect:_,onCreate:V,disabledProp:R,searchStart:F}=o.toRefs(t),$=o.getCurrentInstance().proxy,O=n.iv,P=n.ev,U=n.search,De=n.clearSearch,Z=n.update,q=n.pointer,ze=n.clearPointer,Ne=n.focus,re=n.deactivate,ce=n.close,Fe=o.ref([]),Ye=o.ref([]),_e=o.ref(!1),Ge=o.ref(null),C=o.ref(E.value&&s.value===-1?10:s.value),se=o.computed(()=>l.value||u.value||!1),he=o.computed(()=>g.value!==void 0?g.value:y.value!==void 0?y.value:!0),qe=o.computed(()=>{if(k.value){let x=Ye.value||[],W=[];return x.forEach(ae=>{yt(ae[b.value]).forEach(ke=>{W.push(Object.assign({},ke,ae[R.value]?{[R.value]:!0}:{}))})}),W}else{let x=yt(Ye.value||[]);return Fe.value.length&&(x=x.concat(Fe.value)),x}}),Tt=o.computed(()=>k.value?ie((Ye.value||[]).map((x,W)=>{const ae=yt(x[b.value]);return{...x,index:W,group:!0,[b.value]:Qt(ae,!1).map(ke=>Object.assign({},ke,x[R.value]?{[R.value]:!0}:{})),__VISIBLE__:Qt(ae).map(ke=>Object.assign({},ke,x[R.value]?{[R.value]:!0}:{}))}})):[]),pn=o.computed(()=>{let x=qe.value;return h.value&&(x=x.reverse()),ve.value.length&&(x=ve.value.concat(x)),Qt(x)}),pt=o.computed(()=>{let x=pn.value;return C.value>0&&(x=x.slice(0,C.value)),x}),L=o.computed(()=>{switch(a.value){case"single":return!At(O.value[A.value]);case"multiple":case"tags":return!At(O.value)&&O.value.length>0}}),v=o.computed(()=>j!==void 0&&j.value!==void 0?j.value(O.value,$):O.value&&O.value.length>1?`${O.value.length} options selected`:"1 option selected"),G=o.computed(()=>!qe.value.length&&!_e.value&&!ve.value.length),ne=o.computed(()=>qe.value.length>0&&pt.value.length==0&&(U.value&&k.value||!k.value)),ve=o.computed(()=>se.value===!1||!U.value?[]:ee(U.value)!==-1?[]:[{[A.value]:U.value,[c.value]:U.value,[Qe.value]:U.value,__CREATE__:!0}]),Qe=o.computed(()=>r.value||c.value),st=o.computed(()=>{switch(a.value){case"single":return null;case"multiple":case"tags":return[]}}),Ln=o.computed(()=>D.value||_e.value),Je=x=>{switch(typeof x!="object"&&(x=S(x)),a.value){case"single":Z(x);break;case"multiple":case"tags":Z(O.value.concat(x));break}e.emit("select",pr(x),x,$)},Ht=x=>{switch(typeof x!="object"&&(x=S(x)),a.value){case"single":xr();break;case"tags":case"multiple":Z(Array.isArray(x)?O.value.filter(W=>x.map(ae=>ae[A.value]).indexOf(W[A.value])===-1):O.value.filter(W=>W[A.value]!=x[A.value]));break}e.emit("deselect",pr(x),x,$)},pr=x=>d.value?x:x[A.value],Lr=x=>{Ht(x)},IM=(x,W)=>{if(W.button!==0){W.preventDefault();return}Lr(x)},xr=()=>{e.emit("clear",$),Z(st.value)},Lt=x=>{if(x.group!==void 0)return a.value==="single"?!1:hM(x[b.value])&&x[b.value].length;switch(a.value){case"single":return!At(O.value)&&O.value[A.value]==x[A.value];case"tags":case"multiple":return!At(O.value)&&O.value.map(W=>W[A.value]).indexOf(x[A.value])!==-1}},kt=x=>x[R.value]===!0,ai=()=>Q===void 0||Q.value===-1||!L.value&&Q.value>0?!1:O.value.length>=Q.value,DM=x=>{if(!kt(x)){if(V&&V.value&&!Lt(x)&&x.__CREATE__&&(x={...x},delete x.__CREATE__,x=V.value(x,$),x instanceof Promise)){_e.value=!0,x.then(W=>{_e.value=!1,Or(W)});return}Or(x)}},Or=x=>{switch(x.__CREATE__&&(x={...x},delete x.__CREATE__),a.value){case"single":if(x&&Lt(x)){w.value&&Ht(x);return}x&&un(x),m.value&&De(),B.value&&(ze(),ce()),x&&Je(x);break;case"multiple":if(x&&Lt(x)){Ht(x);return}if(ai())return;x&&(un(x),Je(x)),m.value&&De(),M.value&&ze(),B.value&&ce();break;case"tags":if(x&&Lt(x)){Ht(x);return}if(ai())return;x&&un(x),m.value&&De(),x&&Je(x),M.value&&ze(),B.value&&ce();break}B.value||Ne()},fM=x=>{if(!(kt(x)||a.value==="single"||!_.value)){switch(a.value){case"multiple":case"tags":xn(x[b.value])?Ht(x[b.value]):Je(x[b.value].filter(W=>O.value.map(ae=>ae[A.value]).indexOf(W[A.value])===-1).filter(W=>!W[R.value]).filter((W,ae)=>O.value.length+1+ae<=Q.value||Q.value===-1));break}B.value&&re()}},un=x=>{S(x[A.value])===void 0&&se.value&&(e.emit("tag",x[A.value],$),e.emit("option",x[A.value],$),he.value&&te(x),De())},Sr=()=>{a.value!=="single"&&Je(pt.value)},xn=x=>x.find(W=>!Lt(W)&&!W[R.value])===void 0,hM=x=>x.find(W=>!Lt(W))===void 0,S=x=>qe.value[qe.value.map(W=>String(W[A.value])).indexOf(String(x))],ee=(x,W=!0)=>qe.value.map(ae=>parseInt(ae[Qe.value])==ae[Qe.value]?parseInt(ae[Qe.value]):ae[Qe.value]).indexOf(parseInt(x)==x?parseInt(x):x),J=x=>["tags","multiple"].indexOf(a.value)!==-1&&M.value&&Lt(x),te=x=>{Fe.value.push(x)},ie=x=>p.value?x.filter(W=>U.value?W.__VISIBLE__.length:W[b.value].length):x.filter(W=>U.value?W.__VISIBLE__.length:!0),Qt=(x,W=!0)=>{let ae=x;return U.value&&z.value&&(ae=ae.filter(ke=>F.value?Tr(ke[Qe.value],Y.value).startsWith(Tr(U.value,Y.value)):Tr(ke[Qe.value],Y.value).indexOf(Tr(U.value,Y.value))!==-1)),M.value&&W&&(ae=ae.filter(ke=>!J(ke))),ae},yt=x=>{let W=x;return bx(W)&&(W=Object.keys(W).map(ae=>{let ke=W[ae];return{[A.value]:ae,[Qe.value]:ke,[c.value]:ke}})),W=W.map(ae=>typeof ae=="object"?ae:{[A.value]:ae,[Qe.value]:ae,[c.value]:ae}),W},cn=()=>{At(P.value)||(O.value=Cr(P.value))},gn=x=>(_e.value=!0,new Promise((W,ae)=>{i.value(U.value,$).then(ke=>{Ye.value=ke||[],typeof x=="function"&&x(ke),_e.value=!1}).catch(ke=>{console.error(ke),Ye.value=[],_e.value=!1}).finally(()=>{W()})})),On=()=>{if(!!L.value)if(a.value==="single"){let x=S(O.value[A.value]);if(x!==void 0){let W=x[c.value];O.value[c.value]=W,d.value&&(P.value[c.value]=W)}}else O.value.forEach((x,W)=>{let ae=S(O.value[W][A.value]);if(ae!==void 0){let ke=ae[c.value];O.value[W][c.value]=ke,d.value&&(P.value[W][c.value]=ke)}})},Er=x=>{gn(x)},Cr=x=>At(x)?a.value==="single"?{}:[]:d.value?x:a.value==="single"?S(x)||{}:x.filter(W=>!!S(W)).map(W=>S(W)),Jg=()=>{Ge.value=o.watch(U,x=>{x.length<I.value||!x&&I.value!==0||(_e.value=!0,T.value&&(Ye.value=[]),setTimeout(()=>{x==U.value&&i.value(U.value,$).then(W=>{(x==U.value||!U.value)&&(Ye.value=W,q.value=pt.value.filter(ae=>ae[R.value]!==!0)[0]||null,_e.value=!1)}).catch(W=>{console.error(W)})},f.value))},{flush:"sync"})};if(a.value!=="single"&&!At(P.value)&&!Array.isArray(P.value))throw new Error(`v-model must be an array when using "${a.value}" mode`);return i&&typeof i.value=="function"?N.value?gn(cn):d.value==!0&&cn():(Ye.value=i.value,cn()),f.value>-1&&Jg(),o.watch(f,(x,W)=>{Ge.value&&Ge.value(),x>=0&&Jg()}),o.watch(P,x=>{if(At(x)){O.value=Cr(x);return}switch(a.value){case"single":(d.value?x[A.value]!=O.value[A.value]:x!=O.value[A.value])&&(O.value=Cr(x));break;case"multiple":case"tags":wx(d.value?x.map(W=>W[A.value]):x,O.value.map(W=>W[A.value]))||(O.value=Cr(x));break}},{deep:!0}),o.watch(i,(x,W)=>{typeof t.options=="function"?N.value&&(!W||x&&x.toString()!==W.toString())&&gn():(Ye.value=t.options,Object.keys(O.value).length||cn(),On())}),o.watch(c,On),{pfo:pn,fo:pt,filteredOptions:pt,hasSelected:L,multipleLabelText:v,eo:qe,extendedOptions:qe,fg:Tt,filteredGroups:Tt,noOptions:G,noResults:ne,resolving:_e,busy:Ln,offset:C,select:Je,deselect:Ht,remove:Lr,selectAll:Sr,clear:xr,isSelected:Lt,isDisabled:kt,isMax:ai,getOption:S,handleOptionClick:DM,handleGroupClick:fM,handleTagRemove:IM,refreshOptions:Er,resolveOptions:gn,refreshLabels:On}}function Qx(t,e,n){const{valueProp:i,showOptions:a,searchable:r,groupLabel:s,groups:M,mode:l,groupSelect:u,disabledProp:c}=o.toRefs(t),g=n.fo,y=n.fg,j=n.handleOptionClick,d=n.handleGroupClick,D=n.search,f=n.pointer,N=n.setPointer,I=n.clearPointer,z=n.multiselect,T=n.isOpen,m=o.computed(()=>g.value.filter(Z=>!Z[c.value])),A=o.computed(()=>y.value.filter(Z=>!Z[c.value])),w=o.computed(()=>l.value!=="single"&&u.value),Q=o.computed(()=>f.value&&f.value.group),Y=o.computed(()=>U(f.value)),B=o.computed(()=>{const Z=Q.value?f.value:U(f.value),q=A.value.map(Ne=>Ne[s.value]).indexOf(Z[s.value]);let ze=A.value[q-1];return ze===void 0&&(ze=h.value),ze}),k=o.computed(()=>{let Z=A.value.map(q=>q.label).indexOf(Q.value?f.value[s.value]:U(f.value)[s.value])+1;return A.value.length<=Z&&(Z=0),A.value[Z]}),h=o.computed(()=>[...A.value].slice(-1)[0]),E=o.computed(()=>f.value.__VISIBLE__.filter(Z=>!Z[c.value])[0]),b=o.computed(()=>{const Z=Y.value.__VISIBLE__.filter(q=>!q[c.value]);return Z[Z.map(q=>q[i.value]).indexOf(f.value[i.value])-1]}),p=o.computed(()=>{const Z=U(f.value).__VISIBLE__.filter(q=>!q[c.value]);return Z[Z.map(q=>q[i.value]).indexOf(f.value[i.value])+1]}),_=o.computed(()=>[...B.value.__VISIBLE__.filter(Z=>!Z[c.value])].slice(-1)[0]),V=o.computed(()=>[...h.value.__VISIBLE__.filter(Z=>!Z[c.value])].slice(-1)[0]),R=Z=>!!f.value&&(!Z.group&&f.value[i.value]==Z[i.value]||Z.group!==void 0&&f.value[s.value]==Z[s.value])?!0:void 0,F=()=>{N(m.value[0]||null)},$=()=>{!f.value||f.value[c.value]===!0||(Q.value?d(f.value):j(f.value))},O=()=>{if(f.value===null)N((M.value&&w.value?A.value[0]:m.value[0])||null);else if(M.value&&w.value){let Z=Q.value?E.value:p.value;Z===void 0&&(Z=k.value),N(Z||null)}else{let Z=m.value.map(q=>q[i.value]).indexOf(f.value[i.value])+1;m.value.length<=Z&&(Z=0),N(m.value[Z]||null)}o.nextTick(()=>{De()})},P=()=>{if(f.value===null){let Z=m.value[m.value.length-1];M.value&&w.value&&(Z=V.value,Z===void 0&&(Z=h.value)),N(Z||null)}else if(M.value&&w.value){let Z=Q.value?_.value:b.value;Z===void 0&&(Z=Q.value?B.value:Y.value),N(Z||null)}else{let Z=m.value.map(q=>q[i.value]).indexOf(f.value[i.value])-1;Z<0&&(Z=m.value.length-1),N(m.value[Z]||null)}o.nextTick(()=>{De()})},U=Z=>A.value.find(q=>q.__VISIBLE__.map(ze=>ze[i.value]).indexOf(Z[i.value])!==-1),De=()=>{let Z=z.value.querySelector("[data-pointed]");if(!Z)return;let q=Z.parentElement.parentElement;M.value&&(q=Q.value?Z.parentElement.parentElement.parentElement:Z.parentElement.parentElement.parentElement.parentElement),Z.offsetTop+Z.offsetHeight>q.clientHeight+q.scrollTop&&(q.scrollTop=Z.offsetTop+Z.offsetHeight-q.clientHeight),Z.offsetTop<q.scrollTop&&(q.scrollTop=Z.offsetTop)};return o.watch(D,Z=>{r.value&&(Z.length&&a.value?F():I())}),o.watch(T,Z=>{if(Z){let q=z.value.querySelectorAll("[data-selected]")[0];if(!q)return;let ze=q.parentElement.parentElement;o.nextTick(()=>{ze.scrollTop>0||(ze.scrollTop=q.offsetTop)})}}),{pointer:f,canPointGroups:w,isPointed:R,setPointerFirst:F,selectPointer:$,forwardPointer:O,backwardPointer:P}}function _x(t,e,n){const{disabled:i}=o.toRefs(t),a=o.getCurrentInstance().proxy,r=o.ref(!1);return{isOpen:r,open:()=>{r.value||i.value||(r.value=!0,e.emit("open",a))},close:()=>{!r.value||(r.value=!1,e.emit("close",a))}}}function vx(t,e,n){const{searchable:i,disabled:a}=o.toRefs(t),r=n.input,s=n.open,M=n.close,l=n.clearSearch,u=n.isOpen,c=o.ref(null),g=o.ref(null),y=o.ref(null),j=o.ref(!1),d=o.ref(!1),D=o.computed(()=>i.value||a.value?-1:0),f=()=>{i.value&&r.value.blur(),g.value.blur()},N=()=>{i.value&&!a.value&&r.value.focus()},I=(Q=!0)=>{a.value||(j.value=!0,Q&&s())},z=()=>{j.value=!1,setTimeout(()=>{j.value||(M(),l())},1)};return{multiselect:c,wrapper:g,tags:y,tabindex:D,isActive:j,mouseClicked:d,blur:f,focus:N,activate:I,deactivate:z,handleFocusIn:Q=>{Q.target.closest("[data-tags]")||Q.target.closest("[data-clear]")||I(d.value)},handleFocusOut:()=>{z()},handleCaretClick:()=>{z(),f()},handleMousedown:Q=>{d.value=!0,u.value&&(Q.target.isEqualNode(g.value)||Q.target.isEqualNode(y.value))?setTimeout(()=>{z()},0):document.activeElement.isEqualNode(g.value)&&!u.value&&(console.log(Q.target.closest("[data-tags]")),I()),setTimeout(()=>{d.value=!1},0)}}}function Yx(t,e,n){const{mode:i,addTagOn:a,openDirection:r,searchable:s,showOptions:M,valueProp:l,groups:u,addOptionOn:c,createTag:g,createOption:y,reverse:j}=o.toRefs(t),d=o.getCurrentInstance().proxy,D=n.iv,f=n.update,N=n.search,I=n.setPointer,z=n.selectPointer,T=n.backwardPointer,m=n.forwardPointer,A=n.multiselect,w=n.wrapper,Q=n.tags,Y=n.isOpen,B=n.open,k=n.blur,h=n.fo,E=o.computed(()=>g.value||y.value||!1),b=o.computed(()=>a.value!==void 0?a.value:c.value!==void 0?c.value:["enter"]),p=()=>{i.value==="tags"&&!M.value&&E.value&&s.value&&!u.value&&I(h.value[h.value.map(R=>R[l.value]).indexOf(N.value)])};return{handleKeydown:R=>{e.emit("keydown",R,d);let F,$;switch(["ArrowLeft","ArrowRight","Enter"].indexOf(R.key)!==-1&&i.value==="tags"&&(F=[...A.value.querySelectorAll("[data-tags] > *")].filter(O=>O!==Q.value),$=F.findIndex(O=>O===document.activeElement)),R.key){case"Backspace":if(i.value==="single"||s.value&&[null,""].indexOf(N.value)===-1||D.value.length===0)return;f([...D.value].slice(0,-1));break;case"Enter":if(R.preventDefault(),R.keyCode===229)return;if($!==-1&&$!==void 0){f([...D.value].filter((O,P)=>P!==$)),$===F.length-1&&(F.length-1?F[F.length-2].focus():s.value?Q.value.querySelector("input").focus():w.value.focus());return}if(b.value.indexOf("enter")===-1&&E.value)return;p(),z();break;case" ":if(!E.value&&!s.value){R.preventDefault(),p(),z();return}if(!E.value)return!1;if(b.value.indexOf("space")===-1&&E.value)return;R.preventDefault(),p(),z();break;case"Tab":case";":case",":if(b.value.indexOf(R.key.toLowerCase())===-1||!E.value)return;p(),z(),R.preventDefault();break;case"Escape":k();break;case"ArrowUp":if(R.preventDefault(),!M.value)return;Y.value||B(),T();break;case"ArrowDown":if(R.preventDefault(),!M.value)return;Y.value||B(),m();break;case"ArrowLeft":if(s.value&&Q.value&&Q.value.querySelector("input").selectionStart||R.shiftKey||i.value!=="tags"||!D.value||!D.value.length)return;R.preventDefault(),$===-1?F[F.length-1].focus():$>0&&F[$-1].focus();break;case"ArrowRight":if($===-1||R.shiftKey||i.value!=="tags"||!D.value||!D.value.length)return;R.preventDefault(),F.length>$+1?F[$+1].focus():s.value?Q.value.querySelector("input").focus():s.value||w.value.focus();break}},handleKeyup:R=>{e.emit("keyup",R,d)},preparePointer:p}}function Ux(t,e,n){const{classes:i,disabled:a,openDirection:r,showOptions:s}=o.toRefs(t),M=n.isOpen,l=n.isPointed,u=n.isSelected,c=n.isDisabled,g=n.isActive,y=n.canPointGroups,j=n.resolving,d=n.fo,D=o.computed(()=>({container:"multiselect",containerDisabled:"is-disabled",containerOpen:"is-open",containerOpenTop:"is-open-top",containerActive:"is-active",wrapper:"multiselect-wrapper",singleLabel:"multiselect-single-label",singleLabelText:"multiselect-single-label-text",multipleLabel:"multiselect-multiple-label",search:"multiselect-search",tags:"multiselect-tags",tag:"multiselect-tag",tagDisabled:"is-disabled",tagRemove:"multiselect-tag-remove",tagRemoveIcon:"multiselect-tag-remove-icon",tagsSearchWrapper:"multiselect-tags-search-wrapper",tagsSearch:"multiselect-tags-search",tagsSearchCopy:"multiselect-tags-search-copy",placeholder:"multiselect-placeholder",caret:"multiselect-caret",caretOpen:"is-open",clear:"multiselect-clear",clearIcon:"multiselect-clear-icon",spinner:"multiselect-spinner",inifinite:"multiselect-inifite",inifiniteSpinner:"multiselect-inifite-spinner",dropdown:"multiselect-dropdown",dropdownTop:"is-top",dropdownHidden:"is-hidden",options:"multiselect-options",optionsTop:"is-top",group:"multiselect-group",groupLabel:"multiselect-group-label",groupLabelPointable:"is-pointable",groupLabelPointed:"is-pointed",groupLabelSelected:"is-selected",groupLabelDisabled:"is-disabled",groupLabelSelectedPointed:"is-selected is-pointed",groupLabelSelectedDisabled:"is-selected is-disabled",groupOptions:"multiselect-group-options",option:"multiselect-option",optionPointed:"is-pointed",optionSelected:"is-selected",optionDisabled:"is-disabled",optionSelectedPointed:"is-selected is-pointed",optionSelectedDisabled:"is-selected is-disabled",noOptions:"multiselect-no-options",noResults:"multiselect-no-results",fakeInput:"multiselect-fake-input",assist:"multiselect-assistive-text",spacer:"multiselect-spacer",...i.value})),f=o.computed(()=>!!(M.value&&s.value&&(!j.value||j.value&&d.value.length)));return{classList:o.computed(()=>{const I=D.value;return{container:[I.container].concat(a.value?I.containerDisabled:[]).concat(f.value&&r.value==="top"?I.containerOpenTop:[]).concat(f.value&&r.value!=="top"?I.containerOpen:[]).concat(g.value?I.containerActive:[]),wrapper:I.wrapper,spacer:I.spacer,singleLabel:I.singleLabel,singleLabelText:I.singleLabelText,multipleLabel:I.multipleLabel,search:I.search,tags:I.tags,tag:[I.tag].concat(a.value?I.tagDisabled:[]),tagRemove:I.tagRemove,tagRemoveIcon:I.tagRemoveIcon,tagsSearchWrapper:I.tagsSearchWrapper,tagsSearch:I.tagsSearch,tagsSearchCopy:I.tagsSearchCopy,placeholder:I.placeholder,caret:[I.caret].concat(M.value?I.caretOpen:[]),clear:I.clear,clearIcon:I.clearIcon,spinner:I.spinner,inifinite:I.inifinite,inifiniteSpinner:I.inifiniteSpinner,dropdown:[I.dropdown].concat(r.value==="top"?I.dropdownTop:[]).concat(!M.value||!s.value||!f.value?I.dropdownHidden:[]),options:[I.options].concat(r.value==="top"?I.optionsTop:[]),group:I.group,groupLabel:z=>{let T=[I.groupLabel];return l(z)?T.push(u(z)?I.groupLabelSelectedPointed:I.groupLabelPointed):u(z)&&y.value?T.push(c(z)?I.groupLabelSelectedDisabled:I.groupLabelSelected):c(z)&&T.push(I.groupLabelDisabled),y.value&&T.push(I.groupLabelPointable),T},groupOptions:I.groupOptions,option:(z,T)=>{let m=[I.option];return l(z)?m.push(u(z)?I.optionSelectedPointed:I.optionPointed):u(z)?m.push(c(z)?I.optionSelectedDisabled:I.optionSelected):(c(z)||T&&c(T))&&m.push(I.optionDisabled),m},noOptions:I.noOptions,noResults:I.noResults,assist:I.assist,fakeInput:I.fakeInput}}),showDropdown:f}}function Px(t,e,n){const{limit:i,infinite:a}=o.toRefs(t),r=n.isOpen,s=n.offset,M=n.search,l=n.pfo,u=n.eo,c=o.ref(null),g=o.ref(null),y=o.computed(()=>s.value<l.value.length),j=D=>{const{isIntersecting:f,target:N}=D[0];if(f){const I=N.offsetParent,z=I.scrollTop;s.value+=i.value==-1?10:i.value,o.nextTick(()=>{I.scrollTop=z})}},d=()=>{r.value&&s.value<l.value.length?c.value.observe(g.value):!r.value&&c.value&&c.value.disconnect()};return o.watch(r,()=>{!a.value||d()}),o.watch(M,()=>{!a.value||(s.value=i.value,d())},{flush:"post"}),o.watch(u,()=>{!a.value||d()},{immediate:!1,flush:"post"}),o.onMounted(()=>{window&&window.IntersectionObserver&&(c.value=new IntersectionObserver(j))}),{hasMore:y,infiniteLoader:g}}function Bx(t,e,n){const{placeholder:i,id:a,valueProp:r,label:s,mode:M,groupLabel:l,aria:u,searchable:c}=o.toRefs(t),g=n.pointer,y=n.iv,j=n.hasSelected,d=n.multipleLabelText,D=o.ref(null),f=o.computed(()=>{let h=[];return a&&a.value&&h.push(a.value),h.push("assist"),h.join("-")}),N=o.computed(()=>{let h=[];return a&&a.value&&h.push(a.value),h.push("multiselect-options"),h.join("-")}),I=o.computed(()=>{let h=[];if(a&&a.value&&h.push(a.value),g.value)return h.push(g.value.group?"multiselect-group":"multiselect-option"),h.push(g.value.group?g.value.index:g.value[r.value]),h.join("-")}),z=o.computed(()=>i.value),T=o.computed(()=>M.value!=="single"),m=o.computed(()=>{let h="";return M.value==="single"&&j.value&&(h+=y.value[s.value]),M.value==="multiple"&&j.value&&(h+=d.value),M.value==="tags"&&j.value&&(h+=y.value.map(E=>E[s.value]).join(", ")),h}),A=o.computed(()=>{let h={...u.value};return c.value&&(h["aria-labelledby"]=h["aria-labelledby"]?`${f.value} ${h["aria-labelledby"]}`:f.value,m.value&&h["aria-label"]&&(h["aria-label"]=`${m.value}, ${h["aria-label"]}`)),h}),w=h=>{let E=[];return a&&a.value&&E.push(a.value),E.push("multiselect-option"),E.push(h[r.value]),E.join("-")},Q=h=>{let E=[];return a&&a.value&&E.push(a.value),E.push("multiselect-group"),E.push(h.index),E.join("-")},Y=h=>{let E=[];return E.push(h[s.value]),E.join(" ")},B=h=>{let E=[];return E.push(h[l.value]),E.join(" ")},k=h=>`${h} \u274E`;return o.onMounted(()=>{if(a&&a.value&&document&&document.querySelector){let h=document.querySelector(`[for="${a.value}"]`);D.value=h?h.innerText:null}}),{arias:A,ariaLabel:m,ariaAssist:f,ariaControls:N,ariaPlaceholder:z,ariaMultiselectable:T,ariaActiveDescendant:I,ariaOptionId:w,ariaOptionLabel:Y,ariaGroupId:Q,ariaGroupLabel:B,ariaTagLabel:k}}function Rx(t,e,n,i={}){return n.forEach(a=>{a&&(i={...i,...a(t,e,i)})}),i}var dM={name:"Multiselect",emits:["paste","open","close","select","deselect","input","search-change","tag","option","update:modelValue","change","clear","keydown","keyup"],props:{value:{required:!1},modelValue:{required:!1},options:{type:[Array,Object,Function],required:!1,default:()=>[]},id:{type:[String,Number],required:!1},name:{type:[String,Number],required:!1,default:"multiselect"},disabled:{type:Boolean,required:!1,default:!1},label:{type:String,required:!1,default:"label"},trackBy:{type:String,required:!1,default:void 0},valueProp:{type:String,required:!1,default:"value"},placeholder:{type:String,required:!1,default:null},mode:{type:String,required:!1,default:"single"},searchable:{type:Boolean,required:!1,default:!1},limit:{type:Number,required:!1,default:-1},hideSelected:{type:Boolean,required:!1,default:!0},createTag:{type:Boolean,required:!1,default:void 0},createOption:{type:Boolean,required:!1,default:void 0},appendNewTag:{type:Boolean,required:!1,default:void 0},appendNewOption:{type:Boolean,required:!1,default:void 0},addTagOn:{type:Array,required:!1,default:void 0},addOptionOn:{type:Array,required:!1,default:void 0},caret:{type:Boolean,required:!1,default:!0},loading:{type:Boolean,required:!1,default:!1},noOptionsText:{type:String,required:!1,default:"The list is empty"},noResultsText:{type:String,required:!1,default:"No results found"},multipleLabel:{type:Function,required:!1},object:{type:Boolean,required:!1,default:!1},delay:{type:Number,required:!1,default:-1},minChars:{type:Number,required:!1,default:0},resolveOnLoad:{type:Boolean,required:!1,default:!0},filterResults:{type:Boolean,required:!1,default:!0},clearOnSearch:{type:Boolean,required:!1,default:!1},clearOnSelect:{type:Boolean,required:!1,default:!0},canDeselect:{type:Boolean,required:!1,default:!0},canClear:{type:Boolean,required:!1,default:!0},max:{type:Number,required:!1,default:-1},showOptions:{type:Boolean,required:!1,default:!0},required:{type:Boolean,required:!1,default:!1},openDirection:{type:String,required:!1,default:"bottom"},nativeSupport:{type:Boolean,required:!1,default:!1},classes:{type:Object,required:!1,default:()=>({})},strict:{type:Boolean,required:!1,default:!0},closeOnSelect:{type:Boolean,required:!1,default:!0},autocomplete:{type:String,required:!1},groups:{type:Boolean,required:!1,default:!1},groupLabel:{type:String,required:!1,default:"label"},groupOptions:{type:String,required:!1,default:"options"},groupHideEmpty:{type:Boolean,required:!1,default:!1},groupSelect:{type:Boolean,required:!1,default:!0},inputType:{type:String,required:!1,default:"text"},attrs:{required:!1,type:Object,default:()=>({})},onCreate:{required:!1,type:Function},disabledProp:{type:String,required:!1,default:"disabled"},searchStart:{type:Boolean,required:!1,default:!1},reverse:{type:Boolean,required:!1,default:!1},regex:{type:[Object,String,RegExp],required:!1,default:void 0},rtl:{type:Boolean,required:!1,default:!1},infinite:{type:Boolean,required:!1,default:!1},aria:{required:!1,type:Object,default:()=>({})}},setup(t,e){return Rx(t,e,[Sx,Cx,_x,Ex,Ox,vx,kx,Px,Qx,Yx,Ux,Bx])}};const Zx=["id","dir"],Vx=["tabindex","aria-controls","aria-placeholder","aria-expanded","aria-activedescendant","aria-multiselectable","role"],Gx=["type","modelValue","value","autocomplete","id","aria-controls","aria-placeholder","aria-expanded","aria-activedescendant","aria-multiselectable"],Wx=["onKeyup","aria-label"],$x=["onClick"],Hx=["type","modelValue","value","id","autocomplete","aria-controls","aria-placeholder","aria-expanded","aria-activedescendant","aria-multiselectable"],Fx=["innerHTML"],Jx=["id"],Xx=["id","aria-label","aria-selected"],Kx=["data-pointed","onMouseenter","onClick"],qx=["innerHTML"],eO=["aria-label"],tO=["data-pointed","data-selected","onMouseenter","onClick","id","aria-selected","aria-label"],nO=["data-pointed","data-selected","onMouseenter","onClick","id","aria-selected","aria-label"],iO=["innerHTML"],aO=["innerHTML"],rO=["value"],oO=["name","value"],sO=["name","value"],MO=["id"];function lO(t,e,n,i,a,r){return o.openBlock(),o.createElementBlock("div",{ref:"multiselect",class:o.normalizeClass(t.classList.container),id:n.searchable?void 0:n.id,dir:n.rtl?"rtl":void 0,onFocusin:e[10]||(e[10]=(...s)=>t.handleFocusIn&&t.handleFocusIn(...s)),onFocusout:e[11]||(e[11]=(...s)=>t.handleFocusOut&&t.handleFocusOut(...s)),onKeyup:e[12]||(e[12]=(...s)=>t.handleKeyup&&t.handleKeyup(...s)),onKeydown:e[13]||(e[13]=(...s)=>t.handleKeydown&&t.handleKeydown(...s))},[o.createElementVNode("div",o.mergeProps({class:t.classList.wrapper,onMousedown:e[9]||(e[9]=(...s)=>t.handleMousedown&&t.handleMousedown(...s)),ref:"wrapper",tabindex:t.tabindex,"aria-controls":n.searchable?void 0:t.ariaControls,"aria-placeholder":n.searchable?void 0:t.ariaPlaceholder,"aria-expanded":n.searchable?void 0:t.isOpen,"aria-activedescendant":n.searchable?void 0:t.ariaActiveDescendant,"aria-multiselectable":n.searchable?void 0:t.ariaMultiselectable,role:n.searchable?void 0:"combobox"},n.searchable?{}:t.arias),[o.createCommentVNode(" Search "),n.mode!=="tags"&&n.searchable&&!n.disabled?(o.openBlock(),o.createElementBlock("input",o.mergeProps({key:0,type:n.inputType,modelValue:t.search,value:t.search,class:t.classList.search,autocomplete:n.autocomplete,id:n.searchable?n.id:void 0,onInput:e[0]||(e[0]=(...s)=>t.handleSearchInput&&t.handleSearchInput(...s)),onKeypress:e[1]||(e[1]=(...s)=>t.handleKeypress&&t.handleKeypress(...s)),onPaste:e[2]||(e[2]=o.withModifiers((...s)=>t.handlePaste&&t.handlePaste(...s),["stop"])),ref:"input","aria-controls":t.ariaControls,"aria-placeholder":t.ariaPlaceholder,"aria-expanded":t.isOpen,"aria-activedescendant":t.ariaActiveDescendant,"aria-multiselectable":t.ariaMultiselectable,role:"combobox"},{...n.attrs,...t.arias}),null,16,Gx)):o.createCommentVNode("v-if",!0),o.createCommentVNode(" Tags (with search) "),n.mode=="tags"?(o.openBlock(),o.createElementBlock("div",{key:1,class:o.normalizeClass(t.classList.tags),"data-tags":""},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(t.iv,(s,M,l)=>o.renderSlot(t.$slots,"tag",{option:s,handleTagRemove:t.handleTagRemove,disabled:n.disabled},()=>[(o.openBlock(),o.createElementBlock("span",{class:o.normalizeClass(t.classList.tag),tabindex:"-1",onKeyup:o.withKeys(u=>t.handleTagRemove(s,u),["enter"]),key:l,"aria-label":t.ariaTagLabel(s[n.label])},[o.createTextVNode(o.toDisplayString(s[n.label])+" ",1),n.disabled?o.createCommentVNode("v-if",!0):(o.openBlock(),o.createElementBlock("span",{key:0,class:o.normalizeClass(t.classList.tagRemove),onClick:u=>t.handleTagRemove(s,u)},[o.createElementVNode("span",{class:o.normalizeClass(t.classList.tagRemoveIcon)},null,2)],10,$x))],42,Wx))])),256)),o.createElementVNode("div",{class:o.normalizeClass(t.classList.tagsSearchWrapper),ref:"tags"},[o.createCommentVNode(" Used for measuring search width "),o.createElementVNode("span",{class:o.normalizeClass(t.classList.tagsSearchCopy)},o.toDisplayString(t.search),3),o.createCommentVNode(" Actual search input "),n.searchable&&!n.disabled?(o.openBlock(),o.createElementBlock("input",o.mergeProps({key:0,type:n.inputType,modelValue:t.search,value:t.search,class:t.classList.tagsSearch,id:n.searchable?n.id:void 0,autocomplete:n.autocomplete,onInput:e[3]||(e[3]=(...s)=>t.handleSearchInput&&t.handleSearchInput(...s)),onKeypress:e[4]||(e[4]=(...s)=>t.handleKeypress&&t.handleKeypress(...s)),onPaste:e[5]||(e[5]=o.withModifiers((...s)=>t.handlePaste&&t.handlePaste(...s),["stop"])),ref:"input","aria-controls":t.ariaControls,"aria-placeholder":t.ariaPlaceholder,"aria-expanded":t.isOpen,"aria-activedescendant":t.ariaActiveDescendant,"aria-multiselectable":t.ariaMultiselectable,role:"combobox"},{...n.attrs,...t.arias}),null,16,Hx)):o.createCommentVNode("v-if",!0)],2)],2)):o.createCommentVNode("v-if",!0),o.createCommentVNode(" Single label "),n.mode=="single"&&t.hasSelected&&!t.search&&t.iv?o.renderSlot(t.$slots,"singlelabel",{key:2,value:t.iv},()=>[o.createElementVNode("div",{class:o.normalizeClass(t.classList.singleLabel)},[o.createElementVNode("span",{class:o.normalizeClass(t.classList.singleLabelText)},o.toDisplayString(t.iv[n.label]),3)],2)]):o.createCommentVNode("v-if",!0),o.createCommentVNode(" Multiple label "),n.mode=="multiple"&&t.hasSelected&&!t.search?o.renderSlot(t.$slots,"multiplelabel",{key:3,values:t.iv},()=>[o.createElementVNode("div",{class:o.normalizeClass(t.classList.multipleLabel),innerHTML:t.multipleLabelText},null,10,Fx)]):o.createCommentVNode("v-if",!0),o.createCommentVNode(" Placeholder "),n.placeholder&&!t.hasSelected&&!t.search?o.renderSlot(t.$slots,"placeholder",{key:4},()=>[o.createElementVNode("div",{class:o.normalizeClass(t.classList.placeholder),"aria-hidden":"true"},o.toDisplayString(n.placeholder),3)]):o.createCommentVNode("v-if",!0),o.createCommentVNode(" Spinner "),n.loading||t.resolving?o.renderSlot(t.$slots,"spinner",{key:5},()=>[o.createElementVNode("span",{class:o.normalizeClass(t.classList.spinner),"aria-hidden":"true"},null,2)]):o.createCommentVNode("v-if",!0),o.createCommentVNode(" Clear "),t.hasSelected&&!n.disabled&&n.canClear&&!t.busy?o.renderSlot(t.$slots,"clear",{key:6,clear:t.clear},()=>[o.createElementVNode("span",{"aria-hidden":"true",tabindex:"0",role:"button","data-clear":"","aria-roledescription":"\u274E",class:o.normalizeClass(t.classList.clear),onClick:e[6]||(e[6]=(...s)=>t.clear&&t.clear(...s)),onKeyup:e[7]||(e[7]=o.withKeys((...s)=>t.clear&&t.clear(...s),["enter"]))},[o.createElementVNode("span",{class:o.normalizeClass(t.classList.clearIcon)},null,2)],34)]):o.createCommentVNode("v-if",!0),o.createCommentVNode(" Caret "),n.caret&&n.showOptions?o.renderSlot(t.$slots,"caret",{key:7},()=>[o.createElementVNode("span",{class:o.normalizeClass(t.classList.caret),onClick:e[8]||(e[8]=(...s)=>t.handleCaretClick&&t.handleCaretClick(...s)),"aria-hidden":"true"},null,2)]):o.createCommentVNode("v-if",!0)],16,Vx),o.createCommentVNode(" Options "),o.createElementVNode("div",{class:o.normalizeClass(t.classList.dropdown),tabindex:"-1"},[o.renderSlot(t.$slots,"beforelist",{options:t.fo}),o.createElementVNode("ul",{class:o.normalizeClass(t.classList.options),id:t.ariaControls,role:"listbox"},[n.groups?(o.openBlock(!0),o.createElementBlock(o.Fragment,{key:0},o.renderList(t.fg,(s,M,l)=>(o.openBlock(),o.createElementBlock("li",{class:o.normalizeClass(t.classList.group),key:l,id:t.ariaGroupId(s),"aria-label":t.ariaGroupLabel(s),"aria-selected":t.isSelected(s),role:"option"},[o.createElementVNode("div",{class:o.normalizeClass(t.classList.groupLabel(s)),"data-pointed":t.isPointed(s),onMouseenter:u=>t.setPointer(s,M),onClick:u=>t.handleGroupClick(s)},[o.renderSlot(t.$slots,"grouplabel",{group:s,isSelected:t.isSelected,isPointed:t.isPointed},()=>[o.createElementVNode("span",{innerHTML:s[n.groupLabel]},null,8,qx)])],42,Kx),o.createElementVNode("ul",{class:o.normalizeClass(t.classList.groupOptions),"aria-label":t.ariaGroupLabel(s),role:"group"},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(s.__VISIBLE__,(u,c,g)=>(o.openBlock(),o.createElementBlock("li",{class:o.normalizeClass(t.classList.option(u,s)),"data-pointed":t.isPointed(u),"data-selected":t.isSelected(u)||void 0,key:g,onMouseenter:y=>t.setPointer(u),onClick:y=>t.handleOptionClick(u),id:t.ariaOptionId(u),"aria-selected":t.isSelected(u),"aria-label":t.ariaOptionLabel(u),role:"option"},[o.renderSlot(t.$slots,"option",{option:u,isSelected:t.isSelected,isPointed:t.isPointed,search:t.search},()=>[o.createElementVNode("span",null,o.toDisplayString(u[n.label]),1)])],42,tO))),128))],10,eO)],10,Xx))),128)):(o.openBlock(!0),o.createElementBlock(o.Fragment,{key:1},o.renderList(t.fo,(s,M,l)=>(o.openBlock(),o.createElementBlock("li",{class:o.normalizeClass(t.classList.option(s)),"data-pointed":t.isPointed(s),"data-selected":t.isSelected(s)||void 0,key:l,onMouseenter:u=>t.setPointer(s),onClick:u=>t.handleOptionClick(s),id:t.ariaOptionId(s),"aria-selected":t.isSelected(s),"aria-label":t.ariaOptionLabel(s),role:"option"},[o.renderSlot(t.$slots,"option",{option:s,isSelected:t.isSelected,isPointed:t.isPointed,search:t.search},()=>[o.createElementVNode("span",null,o.toDisplayString(s[n.label]),1)])],42,nO))),128))],10,Jx),t.noOptions?o.renderSlot(t.$slots,"nooptions",{key:0},()=>[o.createElementVNode("div",{class:o.normalizeClass(t.classList.noOptions),innerHTML:n.noOptionsText},null,10,iO)]):o.createCommentVNode("v-if",!0),t.noResults?o.renderSlot(t.$slots,"noresults",{key:1},()=>[o.createElementVNode("div",{class:o.normalizeClass(t.classList.noResults),innerHTML:n.noResultsText},null,10,aO)]):o.createCommentVNode("v-if",!0),n.infinite&&t.hasMore?(o.openBlock(),o.createElementBlock("div",{key:2,class:o.normalizeClass(t.classList.inifinite),ref:"infiniteLoader"},[o.renderSlot(t.$slots,"infinite",{},()=>[o.createElementVNode("span",{class:o.normalizeClass(t.classList.inifiniteSpinner)},null,2)])],2)):o.createCommentVNode("v-if",!0),o.renderSlot(t.$slots,"afterlist",{options:t.fo})],2),o.createCommentVNode(" Hacky input element to show HTML5 required warning "),n.required?(o.openBlock(),o.createElementBlock("input",{key:0,class:o.normalizeClass(t.classList.fakeInput),tabindex:"-1",value:t.textValue,required:""},null,10,rO)):o.createCommentVNode("v-if",!0),o.createCommentVNode(" Native input support "),n.nativeSupport?(o.openBlock(),o.createElementBlock(o.Fragment,{key:1},[n.mode=="single"?(o.openBlock(),o.createElementBlock("input",{key:0,type:"hidden",name:n.name,value:t.plainValue!==void 0?t.plainValue:""},null,8,oO)):(o.openBlock(!0),o.createElementBlock(o.Fragment,{key:1},o.renderList(t.plainValue,(s,M)=>(o.openBlock(),o.createElementBlock("input",{type:"hidden",name:`${n.name}[]`,value:s,key:M},null,8,sO))),128))],64)):o.createCommentVNode("v-if",!0),o.createCommentVNode(" Screen reader assistive text "),n.searchable&&t.hasSelected?(o.openBlock(),o.createElementBlock("div",{key:2,class:o.normalizeClass(t.classList.assist),id:t.ariaAssist,"aria-hidden":"true"},o.toDisplayString(t.ariaLabel),11,MO)):o.createCommentVNode("v-if",!0),o.createCommentVNode(" Create height for empty input "),o.createElementVNode("div",{class:o.normalizeClass(t.classList.spacer)},null,2)],42,Zx)}dM.render=lO,dM.__file="src/Multiselect.vue";var jS="",dS="";const uO=o.createElementVNode("img",{alt:"",class:"list__item_thumb",src:xx},null,-1),cO={class:"list__item_text"},gO=o.createElementVNode("div",{id:"list"},null,-1),NO={__name:"InputList",props:{list:{type:Array,required:!0},maxHeight:{type:String,default:"200px"},labelProp:{type:String,default:"label"},idProp:{type:String,default:"value"}},emits:["update"],setup(t,{emit:e}){o.useCssVars(a=>({"341349d2":t.maxHeight}));const n=o.ref(null);function i(){e("update",n.value)}return(a,r)=>(o.openBlock(),o.createElementBlock(o.Fragment,null,[o.createVNode(o.unref(dM),{modelValue:n.value,"onUpdate:modelValue":r[0]||(r[0]=s=>n.value=s),label:t.labelProp,mode:"tags",native:!1,object:!0,options:t.list,placeholder:"Start typing a name",searchable:!0,"value-prop":t.idProp,onSelect:i},{tag:o.withCtx(({option:s,handleTagRemove:M,disabled:l})=>[(o.openBlock(),o.createBlock(o.Teleport,{to:"#list"},[o.createElementVNode("div",{class:o.normalizeClass(["list__item",{"is-disabled":l}])},[uO,o.createElementVNode("p",cO,o.toDisplayString(s[t.labelProp]),1),o.createVNode(ue,{class:"list__item_icon","icon-name":"delete",size:24,onClick:u=>M(s,u)},null,8,["onClick"]),o.renderSlot(a.$slots,"default")],2)]))]),_:3},8,["modelValue","label","options","value-prop"]),gO],64))}},yO=o.defineComponent({components:{DhIcon:ue},props:{hasCloseButton:{type:Boolean,default:!0},hasSideBar:{type:Boolean,default:!0},hasSideBarButtonBottom:{type:Boolean,default:!0},hasHeader:{type:Boolean,default:!0},hasFooter:{type:Boolean,default:!0},hasFooterButtonRight:{type:Boolean,default:!0},sideBarPosition:{type:String,default:"left"},hasCloseConfirmation:{type:Boolean,default:!1},bodyClass:{type:String,default:""}},emits:["close"],methods:{closed(){this.$emit("close",this.hasCloseConfirmation)}}}),jO={key:1,id:"modal-sidebar",class:"modal-sidebar"},dO={key:0,id:"modalTitle",class:"modal-header"},IO={class:"modal-footer"};function DO(t,e,n,i,a,r){const s=o.resolveComponent("dh-icon");return o.openBlock(),o.createBlock(o.Transition,{name:"modal-fade"},{default:o.withCtx(()=>[o.createElementVNode("div",{class:"modal-backdrop",onClick:e[2]||(e[2]=(...M)=>t.closed&&t.closed(...M))},[o.createElementVNode("div",{"aria-describedby":"modalDescription","aria-labelledby":"modalTitle",class:o.normalizeClass(`modal ${t.hasSideBar?t.sideBarPosition:""}`),role:"dialog",onClick:e[1]||(e[1]=o.withModifiers(()=>{},["stop"]))},[t.hasCloseButton?(o.openBlock(),o.createElementBlock("button",{key:0,"aria-label":"Close modal",class:"btn-close",type:"button",onClick:e[0]||(e[0]=(...M)=>t.closed&&t.closed(...M))},[o.createVNode(s,{class:"icon","icon-name":"close",size:24})])):o.createCommentVNode("",!0),t.hasSideBar?(o.openBlock(),o.createElementBlock("aside",jO,[o.renderSlot(t.$slots,"sidebar"),t.hasSideBarButtonBottom?o.renderSlot(t.$slots,"sidebar-button-bottom",{key:0}):o.createCommentVNode("",!0)])):o.createCommentVNode("",!0),o.createElementVNode("section",{class:o.normalizeClass(`right-section ${t.hasSideBar?"":"full"}`)},[t.hasHeader?(o.openBlock(),o.createElementBlock("header",dO,[o.renderSlot(t.$slots,"header")])):o.createCommentVNode("",!0),o.createElementVNode("section",{id:"modalDescription",class:o.normalizeClass(["modal-body",t.bodyClass])},[o.renderSlot(t.$slots,"body")],2),o.createElementVNode("footer",IO,[t.hasFooter?o.renderSlot(t.$slots,"footer",{key:0}):o.createCommentVNode("",!0),t.hasFooterButtonRight?o.renderSlot(t.$slots,"footer-button-right",{key:1}):o.createCommentVNode("",!0)])],2)],2)])]),_:3})}var fO=Ze(yO,[["render",DO]]);const hO=o.defineComponent({components:{DhIcon:ue},props:{notificationType:{type:String,required:!0,default:"toast",validator:t=>["toast","bottom-message","actionable","modal"].includes(t)},icon:{type:String,required:!0,default:"info"},title:{type:String,required:!1,default:""},message:{type:String,required:!1,default:""},dismissible:{type:Boolean,required:!1,default:!0},notificationButton:{type:String,default:"Action"},buttonDismiss:{type:String,default:"Dismiss"},zIndex:{type:Number,default:2}},data(){return{show:!0}},mounted(){this.dismissible&&["toast","bottom-message"].includes(this.notificationType)&&setTimeout(()=>{this.close()},3e3)},emits:["action"],methods:{close(t=!1){this.show=!1,this.$emit("action",t)},limitTitle(t,e){return["toast","actionable"].includes(e)&&t.length>=60?`${t.substring(0,60)}..`:["bottom-message"].includes(e)&&t.length>=40?`${t.substring(0,40)}..`:["modal"].includes(e)&&t.length>=80?`${t.substring(0,80)}..`:t}}}),mO=[o.createElementVNode("img",{alt:"icon",class:"close-icon",src:Bu},null,-1)],zO={class:"additional-text"},AO={key:0,class:"descriptions"};function TO(t,e,n,i,a,r){const s=o.resolveComponent("dh-icon");return o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(`dh-notification-container ${t.notificationType}`),style:o.normalizeStyle({"z-index":t.zIndex})},[t.show?(o.openBlock(),o.createElementBlock("div",{key:0,class:o.normalizeClass(["bottom-message"].includes(t.notificationType)?`notification-up status status-${t.notificationType}`:`notification-enter status status-${t.notificationType}`)},[["modal","bottom-message"].includes(t.notificationType)?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock("button",{key:0,class:"close-notification",onClick:e[0]||(e[0]=M=>t.close(!1))},mO)),o.createElementVNode("div",{class:o.normalizeClass(`content content- ${t.notificationType}`)},[o.createElementVNode("div",{class:o.normalizeClass(`ellipse ellipse-${t.notificationType} ellipse-${t.icon}`)},[o.createVNode(s,{class:o.normalizeClass(`icon-${t.icon}`),"icon-name":t.icon,size:33},null,8,["class","icon-name"])],2),o.createElementVNode("div",zO,[o.createElementVNode("div",{class:o.normalizeClass(`title title-${t.notificationType}`)},o.toDisplayString(t.limitTitle(t.title,t.notificationType)),3),["bottom-message"].includes(t.notificationType)?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock("div",AO,o.toDisplayString(t.message.length>=280?`${t.message.substring(0,280)}..`:t.message),1))]),["toast","bottom-message"].includes(t.notificationType)?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock("div",{key:0,class:o.normalizeClass(`buttons ${t.notificationType}`)},[o.createElementVNode("button",{class:o.normalizeClass(["btn btn-normal",t.icon=="delete"?"btn-danger":"btn-primary"]),onClick:e[1]||(e[1]=M=>t.close(!0))},o.toDisplayString(t.notificationButton),3),o.createElementVNode("button",{class:"btn btn-normal btn-secondary dismiss",onClick:e[2]||(e[2]=M=>t.close())},o.toDisplayString(t.buttonDismiss),1)],2))],2)],2)):o.createCommentVNode("",!0)],6)}var pO=Ze(hO,[["render",TO]]),DS="";const LO={class:"password__panel"},xO=["placeholder","type"],OO={class:"icon is-right"},SO={key:0,class:"password__tooltip"};var EO=Ze(o.defineComponent({__name:"PasswordField",props:{modelValue:{type:String,default:""},placeholder:{type:String,default:""},tipChars:{type:String,default:"12 Characters"},tipNumbers:{type:String,default:"Numbers"},tipSymbols:{type:String,default:"Symbols"},passwordTooltipDisabled:{type:Boolean,default:!1}},emits:["submit","update:modelValue"],setup(t,{emit:e}){const n=t,i=o.ref(""),a=o.ref(!1),r=o.ref(!1),s=o.ref(!1),M=o.ref(!1),l=o.ref(!1),u=o.ref(!1);function c(){e("submit",i.value),e("update:modelValue",i.value)}function g(){a.value=!0,u.value=!0}function y(){a.value=!1,u.value=!1}function j(){l.value=!l.value}return o.onMounted(()=>()=>i.value=n.modelValue||""),o.watch(n,()=>(i.value=n.modelValue||"",r.value=i.value.length>11,s.value=/\d/.test(i.value),M.value=/[!@#$%^&*)(+=._-]/.test(i.value))),(d,D)=>(o.openBlock(),o.createElementBlock("div",LO,[o.withDirectives(o.createElementVNode("input",{"onUpdate:modelValue":D[0]||(D[0]=f=>i.value=f),class:"form__input password__panel_input","data-e2e":"password-input",placeholder:n.placeholder,type:l.value?"text":"password",onFocus:g,onFocusout:y,onKeyup:c},null,40,xO),[[o.vModelDynamic,i.value]]),o.createElementVNode("button",{class:"password__panel_button",type:"button",onClick:j},[o.createElementVNode("span",OO,[o.createVNode(ue,{active:u.value,"icon-name":l.value?"invisible":"visible",size:20},null,8,["active","icon-name"])])]),a.value&&!n.passwordTooltipDisabled?(o.openBlock(),o.createElementBlock("div",SO,[o.createElementVNode("p",{class:o.normalizeClass(["password__tooltip_text",r.value?"password__tooltip_text--valid":""])},[o.createVNode(ue,{class:o.normalizeClass(r.value?"password__tooltip_icon--active":"password__tooltip_icon"),"icon-name":r.value?"accept":"close",size:16},null,8,["class","icon-name"]),o.createElementVNode("span",null,o.toDisplayString(n.tipChars),1)],2),o.createElementVNode("p",{class:o.normalizeClass(["password__tooltip_text",s.value?"password__tooltip_text--valid":""])},[o.createVNode(ue,{class:o.normalizeClass(s.value?"password__tooltip_icon--active":"password__tooltip_icon"),"icon-name":s.value?"accept":"close",size:16},null,8,["class","icon-name"]),o.createElementVNode("span",null,o.toDisplayString(n.tipNumbers),1)],2),o.createElementVNode("p",{class:o.normalizeClass(["password__tooltip_text",M.value?"password__tooltip_text--valid":""])},[o.createVNode(ue,{class:o.normalizeClass(M.value?"password__tooltip_icon--active":"password__tooltip_icon"),"icon-name":M.value?"accept":"close",size:16},null,8,["class","icon-name"]),o.createElementVNode("span",null,o.toDisplayString(n.tipSymbols),1)],2)])):o.createCommentVNode("",!0)]))}}),[["__scopeId","data-v-3ae35090"]]),hS="";const CO={class:"radio"},bO=["for"],wO=["id","type","value"],kO={class:"radio__label_txt"};var Fg=Ze({__name:"RadioBox",props:{type:{type:String,default:"radio"},value:{type:String,required:!0},label:{type:String,required:!0}},emits:["clickBox"],setup(t,{emit:e}){return(n,i)=>(o.openBlock(),o.createElementBlock("div",CO,[o.createElementVNode("label",{class:"radio__label",for:t.value},[o.createElementVNode("input",{id:t.value,class:"radio__input",name:"radiobox",type:t.type,value:t.value,onClick:i[0]||(i[0]=a=>e("clickBox"))},null,8,wO),o.createElementVNode("span",kO,o.toDisplayString(t.label),1)],8,bO)]))}},[["__scopeId","data-v-29696bd5"]]),zS="";const QO={__name:"RadioBoxGroup",props:{orientation:{type:String,default:"horizontal"},type:{type:String,default:"radio"},list:{type:Array,required:!0}},setup(t){const e=o.ref(null);function n(){const i=document.querySelectorAll("input");for(let a=0;a<i.length;a++)i[a].checked?i[a].parentNode.parentNode.classList.add("radio--checked"):i[a].parentNode.parentNode.classList.remove("radio--checked")}return(i,a)=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(["radio__grp",t.orientation==="vertical"?"radio__vertical":"radio__horizontal"])},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(t.list,r=>(o.openBlock(),o.createBlock(Fg,{key:r.key,ref_for:!0,ref_key:"boxes",ref:e,label:r.label,type:t.type,value:r.value,onClickBox:n},null,8,["label","type","value"]))),128))],2))}};var AS="";const _O={class:"search-panel"},vO=["placeholder"];var YO=Ze(o.defineComponent({__name:"SearchInput",props:{modelValue:{type:String,default:""},placeholder:{type:String,default:""}},emits:["submit","clean","update:modelValue"],setup(t,{emit:e}){const n=t,i=o.ref("");function a(){e("submit",i.value),e("update:modelValue",i.value)}function r(){i.value="",e("clean"),e("update:modelValue",i.value)}return o.onMounted(()=>()=>i.value=n.modelValue||""),o.watch(n,()=>i.value=n.modelValue||""),(s,M)=>(o.openBlock(),o.createElementBlock("div",_O,[o.withDirectives(o.createElementVNode("input",{"onUpdate:modelValue":M[0]||(M[0]=l=>i.value=l),class:"form-input search-panel-input","data-e2e":"search-input",placeholder:n.placeholder,onKeyup:a},null,40,vO),[[o.vModelText,i.value]]),i.value?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock("button",{key:0,class:"search-panel-button","data-e2e":"search-submit",onClick:a},[o.createVNode(ue,{active:!0,"icon-name":"search",size:24})])),i.value?(o.openBlock(),o.createElementBlock("button",{key:1,class:"search-panel-button close","data-e2e":"search-close",onClick:r},[o.createVNode(ue,{class:"icon","icon-name":"close",size:24})])):o.createCommentVNode("",!0)]))}}),[["__scopeId","data-v-562faa14"]]),pS="";const UO=t=>(o.pushScopeId("data-v-0213b522"),t=t(),o.popScopeId(),t),PO={class:"stepper"},BO=UO(()=>o.createElementVNode("hr",{class:"solid"},null,-1));var RO=Ze(o.defineComponent({__name:"Stepper",props:{maxSteps:{type:Number,default:0},currentStep:{type:Number,default:0}},setup(t){const e=t;function n(){return Array.from(Array(e.maxSteps||0).keys())}return(i,a)=>(o.openBlock(),o.createElementBlock("div",PO,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(n(),(r,s)=>(o.openBlock(),o.createElementBlock("div",{key:s,class:"step"},[o.createElementVNode("span",{class:o.normalizeClass(["step-number",{active:r===t.currentStep}])},o.toDisplayString(r+1),3),BO]))),128))]))}}),[["__scopeId","data-v-0213b522"]]),xS="";const ZO={class:"code"},VO=["autocomplete"],GO=["autocomplete"],WO=["autocomplete"],$O=["autocomplete"],HO=["autocomplete"],FO=["autocomplete"];var JO=Ze(o.defineComponent({__name:"VerificationCode",props:{code:{type:String,required:!1,default:""},focusOnFirstInput:{type:Boolean,default:!0},focusOnFirstInputDelay:{type:Number,default:100},autoComplete:{type:String,default:"off"}},emits:["submit"],setup(t,{emit:e}){const n=t,i=o.ref(null),a=o.ref(null),r=o.ref(null),s=o.ref(null),M=o.ref(null),l=o.ref(null);async function u(f){var N,I,z,T,m;switch(f){case 1:break;case 2:(N=i.value)==null||N.focus();break;case 3:(I=a.value)==null||I.focus();break;case 4:(z=r.value)==null||z.focus();break;case 5:(T=s.value)==null||T.focus();break;case 6:(m=M.value)==null||m.focus();break}}async function c(f){var N,I,z,T,m;switch(f){case 1:(N=a.value)==null||N.focus();break;case 2:(I=r.value)==null||I.focus();break;case 3:(z=s.value)==null||z.focus();break;case 4:(T=M.value)==null||T.focus();break;case 5:(m=l.value)==null||m.focus();break}}async function g(f,N){const I=f.key;let z=!0;[{_index:1,nextInput:a},{_index:2,nextInput:r},{_index:3,nextInput:s},{_index:4,nextInput:M},{_index:5,nextInput:l}].forEach(({_index:T,nextInput:m})=>{N===T&&(m.value&&I.match(/^[0-9]+$/)&&m.value.focus({}),z=!1),f.preventDefault()}),I.match(/^[0-9]+$/)&&(f.target.value=I),z&&d()}async function y(f){var I;const N=((I=f.clipboardData)==null?void 0:I.getData("text/plain"))||"";j(N),d()}function j(f){const N=f.replace(/\D/g,"");if(N.length!==6)return;const[I,z,T,m,A,w]=N.split("");i.value&&(i.value.value=I),a.value&&(a.value.value=z),r.value&&(r.value.value=T),s.value&&(s.value.value=m),M.value&&(M.value.value=A),l.value&&(l.value.value=w)}async function d(){var N,I,z,T,m,A;const f=`${(N=i.value)==null?void 0:N.value}${(I=a.value)==null?void 0:I.value}${(z=r.value)==null?void 0:z.value}${(T=s.value)==null?void 0:T.value}${(m=M.value)==null?void 0:m.value}${(A=l.value)==null?void 0:A.value}`;e("submit",f)}function D(){setTimeout(()=>{var f;n.focusOnFirstInput&&((f=i.value)==null||f.focus())},n.focusOnFirstInputDelay)}return o.onMounted(()=>{n.code&&(j(n.code),d()),D()}),(f,N)=>(o.openBlock(),o.createElementBlock("div",ZO,[o.createElementVNode("input",{ref_key:"txtInput1",ref:i,autocomplete:t.autoComplete,autofocus:"",class:"form-input input-1","data-e2e":"input-1",inputmode:"numeric",maxlength:"1",placeholder:"_",type:"text",onKeypress:N[0]||(N[0]=I=>g(I,1)),onKeyup:[N[1]||(N[1]=o.withKeys(I=>u(1),["delete"])),N[2]||(N[2]=o.withKeys(I=>u(1),["left"])),N[3]||(N[3]=o.withKeys(I=>c(1),["right"]))],onPaste:y},null,40,VO),o.createElementVNode("input",{ref_key:"txtInput2",ref:a,autocomplete:t.autoComplete,class:"form-input","data-e2e":"input-2",inputmode:"numeric",maxlength:"1",placeholder:"_",type:"text",onKeypress:N[4]||(N[4]=I=>g(I,2)),onKeyup:[N[5]||(N[5]=o.withKeys(I=>u(2),["delete"])),N[6]||(N[6]=o.withKeys(I=>u(2),["left"])),N[7]||(N[7]=o.withKeys(I=>c(2),["right"]))],onPaste:y},null,40,GO),o.createElementVNode("input",{ref_key:"txtInput3",ref:r,autocomplete:t.autoComplete,class:"form-input","data-e2e":"input-3",inputmode:"numeric",maxlength:"1",placeholder:"_",type:"text",onKeypress:N[8]||(N[8]=I=>g(I,3)),onKeyup:[N[9]||(N[9]=o.withKeys(I=>u(3),["delete"])),N[10]||(N[10]=o.withKeys(I=>u(3),["left"])),N[11]||(N[11]=o.withKeys(I=>c(3),["right"]))],onPaste:y},null,40,WO),o.createElementVNode("input",{ref_key:"txtInput4",ref:s,autocomplete:t.autoComplete,class:"form-input","data-e2e":"input-4",inputmode:"numeric",maxlength:"1",placeholder:"_",type:"text",onKeypress:N[12]||(N[12]=I=>g(I,4)),onKeyup:[N[13]||(N[13]=o.withKeys(I=>u(4),["delete"])),N[14]||(N[14]=o.withKeys(I=>u(4),["left"])),N[15]||(N[15]=o.withKeys(I=>c(4),["right"]))],onPaste:y},null,40,$O),o.createElementVNode("input",{ref_key:"txtInput5",ref:M,autocomplete:t.autoComplete,class:"form-input","data-e2e":"input-5",inputmode:"numeric",maxlength:"1",placeholder:"_",type:"text",onKeypress:N[16]||(N[16]=I=>g(I,5)),onKeyup:[N[17]||(N[17]=o.withKeys(I=>u(5),["delete"])),N[18]||(N[18]=o.withKeys(I=>u(5),["left"])),N[19]||(N[19]=o.withKeys(I=>c(5),["right"]))],onPaste:y},null,40,HO),o.createElementVNode("input",{ref_key:"txtInput6",ref:l,autocomplete:t.autoComplete,class:"form-input","data-e2e":"input-6",inputmode:"numeric",maxlength:"1",placeholder:"_",type:"text",onKeypress:N[20]||(N[20]=I=>g(I,6)),onKeyup:[N[21]||(N[21]=o.withKeys(I=>u(6),["delete"])),N[22]||(N[22]=o.withKeys(I=>u(6),["left"])),N[23]||(N[23]=o.withKeys(I=>c(6),["right"]))],onPaste:y},null,40,FO)]))}}),[["__scopeId","data-v-2ace876a"]]);je.DhAdvancedDatePicker=CL,je.DhAdvancedFilter=Gg,je.DhCopyText=YL,je.DhDatePicker=BL,je.DhDropdownMenu=WL,je.DhError=HL,je.DhExpansionPanel=qL,je.DhFileUpload=Ix,je.DhIcon=ue,je.DhInputDropdown=Ax,je.DhInputGroup=Lx,je.DhInputList=NO,je.DhModal=fO,je.DhNotification=pO,je.DhNumberRange=Wg,je.DhPasswordField=EO,je.DhRadioBox=Fg,je.DhRadioBoxGroup=QO,je.DhSearchInput=YO,je.DhStepper=RO,je.DhSwitch=Ru,je.DhTooltip=$g,je.DhVerificationCode=JO,Object.defineProperties(je,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
|
19
|
+
`):t}function ip(t,e){const{element:n,datasetIndex:i,index:a}=e,r=t.getDatasetMeta(i).controller,{label:s,value:M}=r.getLabelAndValue(a);return{chart:t,label:s,parsed:r.getParsed(a),raw:t.data.datasets[i].data[a],formattedValue:M,dataset:r.getDataset(),dataIndex:a,datasetIndex:i,element:n}}function Sg(t,e){const n=t.chart.ctx,{body:i,footer:a,title:r}=t,{boxWidth:s,boxHeight:M}=e,l=et(e.bodyFont),u=et(e.titleFont),c=et(e.footerFont),g=r.length,y=a.length,j=i.length,d=ot(e.padding);let D=d.height,f=0,N=i.reduce((T,m)=>T+m.before.length+m.lines.length+m.after.length,0);if(N+=t.beforeBody.length+t.afterBody.length,g&&(D+=g*u.lineHeight+(g-1)*e.titleSpacing+e.titleMarginBottom),N){const T=e.displayColors?Math.max(M,l.lineHeight):l.lineHeight;D+=j*T+(N-j)*l.lineHeight+(N-1)*e.bodySpacing}y&&(D+=e.footerMarginTop+y*c.lineHeight+(y-1)*e.footerSpacing);let I=0;const z=function(T){f=Math.max(f,n.measureText(T).width+I)};return n.save(),n.font=u.string,Ie(t.title,z),n.font=l.string,Ie(t.beforeBody.concat(t.afterBody),z),I=e.displayColors?s+2+e.boxPadding:0,Ie(i,T=>{Ie(T.before,z),Ie(T.lines,z),Ie(T.after,z)}),I=0,n.font=c.string,Ie(t.footer,z),n.restore(),f+=d.width,{width:f,height:D}}function ap(t,e){const{y:n,height:i}=e;return n<i/2?"top":n>t.height-i/2?"bottom":"center"}function rp(t,e,n,i){const{x:a,width:r}=i,s=n.caretSize+n.caretPadding;if(t==="left"&&a+r+s>e.width||t==="right"&&a-r-s<0)return!0}function op(t,e,n,i){const{x:a,width:r}=n,{width:s,chartArea:{left:M,right:l}}=t;let u="center";return i==="center"?u=a<=(M+l)/2?"left":"right":a<=r/2?u="left":a>=s-r/2&&(u="right"),rp(u,t,e,n)&&(u="center"),u}function Eg(t,e,n){const i=n.yAlign||e.yAlign||ap(t,n);return{xAlign:n.xAlign||e.xAlign||op(t,e,n,i),yAlign:i}}function sp(t,e){let{x:n,width:i}=t;return e==="right"?n-=i:e==="center"&&(n-=i/2),n}function Mp(t,e,n){let{y:i,height:a}=t;return e==="top"?i+=n:e==="bottom"?i-=a+n:i-=a/2,i}function Cg(t,e,n,i){const{caretSize:a,caretPadding:r,cornerRadius:s}=t,{xAlign:M,yAlign:l}=n,u=a+r,{topLeft:c,topRight:g,bottomLeft:y,bottomRight:j}=hn(s);let d=sp(e,M);const D=Mp(e,l,u);return l==="center"?M==="left"?d+=u:M==="right"&&(d-=u):M==="left"?d-=Math.max(c,y)+a:M==="right"&&(d+=Math.max(g,j)+a),{x:Ve(d,0,i.width-e.width),y:Ve(D,0,i.height-e.height)}}function jr(t,e,n){const i=ot(n.padding);return e==="center"?t.x+t.width/2:e==="right"?t.x+t.width-i.right:t.x+i.left}function bg(t){return zt([],wt(t))}function lp(t,e,n){return Gt(t,{tooltip:e,tooltipItems:n,type:"tooltip"})}function wg(t,e){const n=e&&e.dataset&&e.dataset.tooltip&&e.dataset.tooltip.callbacks;return n?t.override(n):t}class NM extends bt{constructor(e){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=e.chart||e._chart,this._chart=this.chart,this.options=e.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(e){this.options=e,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const e=this._cachedAnimations;if(e)return e;const n=this.chart,i=this.options.setContext(this.getContext()),a=i.enabled&&n.options.animation&&i.animations,r=new Uc(this.chart,a);return a._cacheable&&(this._cachedAnimations=Object.freeze(r)),r}getContext(){return this.$context||(this.$context=lp(this.chart.getContext(),this,this._tooltipItems))}getTitle(e,n){const{callbacks:i}=n,a=i.beforeTitle.apply(this,[e]),r=i.title.apply(this,[e]),s=i.afterTitle.apply(this,[e]);let M=[];return M=zt(M,wt(a)),M=zt(M,wt(r)),M=zt(M,wt(s)),M}getBeforeBody(e,n){return bg(n.callbacks.beforeBody.apply(this,[e]))}getBody(e,n){const{callbacks:i}=n,a=[];return Ie(e,r=>{const s={before:[],lines:[],after:[]},M=wg(i,r);zt(s.before,wt(M.beforeLabel.call(this,r))),zt(s.lines,M.label.call(this,r)),zt(s.after,wt(M.afterLabel.call(this,r))),a.push(s)}),a}getAfterBody(e,n){return bg(n.callbacks.afterBody.apply(this,[e]))}getFooter(e,n){const{callbacks:i}=n,a=i.beforeFooter.apply(this,[e]),r=i.footer.apply(this,[e]),s=i.afterFooter.apply(this,[e]);let M=[];return M=zt(M,wt(a)),M=zt(M,wt(r)),M=zt(M,wt(s)),M}_createItems(e){const n=this._active,i=this.chart.data,a=[],r=[],s=[];let M=[],l,u;for(l=0,u=n.length;l<u;++l)M.push(ip(this.chart,n[l]));return e.filter&&(M=M.filter((c,g,y)=>e.filter(c,g,y,i))),e.itemSort&&(M=M.sort((c,g)=>e.itemSort(c,g,i))),Ie(M,c=>{const g=wg(e.callbacks,c);a.push(g.labelColor.call(this,c)),r.push(g.labelPointStyle.call(this,c)),s.push(g.labelTextColor.call(this,c))}),this.labelColors=a,this.labelPointStyles=r,this.labelTextColors=s,this.dataPoints=M,M}update(e,n){const i=this.options.setContext(this.getContext()),a=this._active;let r,s=[];if(!a.length)this.opacity!==0&&(r={opacity:0});else{const M=ii[i.position].call(this,a,this._eventPosition);s=this._createItems(i),this.title=this.getTitle(s,i),this.beforeBody=this.getBeforeBody(s,i),this.body=this.getBody(s,i),this.afterBody=this.getAfterBody(s,i),this.footer=this.getFooter(s,i);const l=this._size=Sg(this,i),u=Object.assign({},M,l),c=Eg(this.chart,i,u),g=Cg(i,u,c,this.chart);this.xAlign=c.xAlign,this.yAlign=c.yAlign,r={opacity:1,x:g.x,y:g.y,width:l.width,height:l.height,caretX:M.x,caretY:M.y}}this._tooltipItems=s,this.$context=void 0,r&&this._resolveAnimations().update(this,r),e&&i.external&&i.external.call(this,{chart:this.chart,tooltip:this,replay:n})}drawCaret(e,n,i,a){const r=this.getCaretPosition(e,i,a);n.lineTo(r.x1,r.y1),n.lineTo(r.x2,r.y2),n.lineTo(r.x3,r.y3)}getCaretPosition(e,n,i){const{xAlign:a,yAlign:r}=this,{caretSize:s,cornerRadius:M}=i,{topLeft:l,topRight:u,bottomLeft:c,bottomRight:g}=hn(M),{x:y,y:j}=e,{width:d,height:D}=n;let f,N,I,z,T,m;return r==="center"?(T=j+D/2,a==="left"?(f=y,N=f-s,z=T+s,m=T-s):(f=y+d,N=f+s,z=T-s,m=T+s),I=f):(a==="left"?N=y+Math.max(l,c)+s:a==="right"?N=y+d-Math.max(u,g)-s:N=this.caretX,r==="top"?(z=j,T=z-s,f=N-s,I=N+s):(z=j+D,T=z+s,f=N+s,I=N-s),m=z),{x1:f,x2:N,x3:I,y1:z,y2:T,y3:m}}drawTitle(e,n,i){const a=this.title,r=a.length;let s,M,l;if(r){const u=Ws(i.rtl,this.x,this.width);for(e.x=jr(this,i.titleAlign,i),n.textAlign=u.textAlign(i.titleAlign),n.textBaseline="middle",s=et(i.titleFont),M=i.titleSpacing,n.fillStyle=i.titleColor,n.font=s.string,l=0;l<r;++l)n.fillText(a[l],u.x(e.x),e.y+s.lineHeight/2),e.y+=s.lineHeight+M,l+1===r&&(e.y+=i.titleMarginBottom-M)}}_drawColorBox(e,n,i,a,r){const s=this.labelColors[i],M=this.labelPointStyles[i],{boxHeight:l,boxWidth:u,boxPadding:c}=r,g=et(r.bodyFont),y=jr(this,"left",r),j=a.x(y),d=l<g.lineHeight?(g.lineHeight-l)/2:0,D=n.y+d;if(r.usePointStyle){const f={radius:Math.min(u,l)/2,pointStyle:M.pointStyle,rotation:M.rotation,borderWidth:1},N=a.leftForLtr(j,u)+u/2,I=D+l/2;e.strokeStyle=r.multiKeyBackground,e.fillStyle=r.multiKeyBackground,Us(e,f,N,I),e.strokeStyle=s.borderColor,e.fillStyle=s.backgroundColor,Us(e,f,N,I)}else{e.lineWidth=Me(s.borderWidth)?Math.max(...Object.values(s.borderWidth)):s.borderWidth||1,e.strokeStyle=s.borderColor,e.setLineDash(s.borderDash||[]),e.lineDashOffset=s.borderDashOffset||0;const f=a.leftForLtr(j,u-c),N=a.leftForLtr(a.xPlus(j,1),u-c-2),I=hn(s.borderRadius);Object.values(I).some(z=>z!==0)?(e.beginPath(),e.fillStyle=r.multiKeyBackground,Ka(e,{x:f,y:D,w:u,h:l,radius:I}),e.fill(),e.stroke(),e.fillStyle=s.backgroundColor,e.beginPath(),Ka(e,{x:N,y:D+1,w:u-2,h:l-2,radius:I}),e.fill()):(e.fillStyle=r.multiKeyBackground,e.fillRect(f,D,u,l),e.strokeRect(f,D,u,l),e.fillStyle=s.backgroundColor,e.fillRect(N,D+1,u-2,l-2))}e.fillStyle=this.labelTextColors[i]}drawBody(e,n,i){const{body:a}=this,{bodySpacing:r,bodyAlign:s,displayColors:M,boxHeight:l,boxWidth:u,boxPadding:c}=i,g=et(i.bodyFont);let y=g.lineHeight,j=0;const d=Ws(i.rtl,this.x,this.width),D=function(Q){n.fillText(Q,d.x(e.x+j),e.y+y/2),e.y+=y+r},f=d.textAlign(s);let N,I,z,T,m,A,w;for(n.textAlign=s,n.textBaseline="middle",n.font=g.string,e.x=jr(this,f,i),n.fillStyle=i.bodyColor,Ie(this.beforeBody,D),j=M&&f!=="right"?s==="center"?u/2+c:u+2+c:0,T=0,A=a.length;T<A;++T){for(N=a[T],I=this.labelTextColors[T],n.fillStyle=I,Ie(N.before,D),z=N.lines,M&&z.length&&(this._drawColorBox(n,e,T,d,i),y=Math.max(g.lineHeight,l)),m=0,w=z.length;m<w;++m)D(z[m]),y=g.lineHeight;Ie(N.after,D)}j=0,y=g.lineHeight,Ie(this.afterBody,D),e.y-=r}drawFooter(e,n,i){const a=this.footer,r=a.length;let s,M;if(r){const l=Ws(i.rtl,this.x,this.width);for(e.x=jr(this,i.footerAlign,i),e.y+=i.footerMarginTop,n.textAlign=l.textAlign(i.footerAlign),n.textBaseline="middle",s=et(i.footerFont),n.fillStyle=i.footerColor,n.font=s.string,M=0;M<r;++M)n.fillText(a[M],l.x(e.x),e.y+s.lineHeight/2),e.y+=s.lineHeight+i.footerSpacing}}drawBackground(e,n,i,a){const{xAlign:r,yAlign:s}=this,{x:M,y:l}=e,{width:u,height:c}=i,{topLeft:g,topRight:y,bottomLeft:j,bottomRight:d}=hn(a.cornerRadius);n.fillStyle=a.backgroundColor,n.strokeStyle=a.borderColor,n.lineWidth=a.borderWidth,n.beginPath(),n.moveTo(M+g,l),s==="top"&&this.drawCaret(e,n,i,a),n.lineTo(M+u-y,l),n.quadraticCurveTo(M+u,l,M+u,l+y),s==="center"&&r==="right"&&this.drawCaret(e,n,i,a),n.lineTo(M+u,l+c-d),n.quadraticCurveTo(M+u,l+c,M+u-d,l+c),s==="bottom"&&this.drawCaret(e,n,i,a),n.lineTo(M+j,l+c),n.quadraticCurveTo(M,l+c,M,l+c-j),s==="center"&&r==="left"&&this.drawCaret(e,n,i,a),n.lineTo(M,l+g),n.quadraticCurveTo(M,l,M+g,l),n.closePath(),n.fill(),a.borderWidth>0&&n.stroke()}_updateAnimationTarget(e){const n=this.chart,i=this.$animations,a=i&&i.x,r=i&&i.y;if(a||r){const s=ii[e.position].call(this,this._active,this._eventPosition);if(!s)return;const M=this._size=Sg(this,e),l=Object.assign({},s,this._size),u=Eg(n,e,l),c=Cg(e,l,u,n);(a._to!==c.x||r._to!==c.y)&&(this.xAlign=u.xAlign,this.yAlign=u.yAlign,this.width=M.width,this.height=M.height,this.caretX=s.x,this.caretY=s.y,this._resolveAnimations().update(this,c))}}_willRender(){return!!this.opacity}draw(e){const n=this.options.setContext(this.getContext());let i=this.opacity;if(!i)return;this._updateAnimationTarget(n);const a={width:this.width,height:this.height},r={x:this.x,y:this.y};i=Math.abs(i)<.001?0:i;const s=ot(n.padding),M=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;n.enabled&&M&&(e.save(),e.globalAlpha=i,this.drawBackground(r,e,a,n),GA(e,n.textDirection),r.y+=s.top,this.drawTitle(r,e,n),this.drawBody(r,e,n),this.drawFooter(r,e,n),WA(e,n.textDirection),e.restore())}getActiveElements(){return this._active||[]}setActiveElements(e,n){const i=this._active,a=e.map(({datasetIndex:M,index:l})=>{const u=this.chart.getDatasetMeta(M);if(!u)throw new Error("Cannot find a dataset at index "+M);return{datasetIndex:M,element:u.data[l],index:l}}),r=!Ba(i,a),s=this._positionChanged(a,n);(r||s)&&(this._active=a,this._eventPosition=n,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(e,n,i=!0){if(n&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const a=this.options,r=this._active||[],s=this._getActiveElements(e,r,n,i),M=this._positionChanged(s,e),l=n||!Ba(s,r)||M;return l&&(this._active=s,(a.enabled||a.external)&&(this._eventPosition={x:e.x,y:e.y},this.update(!0,n))),l}_getActiveElements(e,n,i,a){const r=this.options;if(e.type==="mouseout")return[];if(!a)return n;const s=this.chart.getElementsAtEventForMode(e,r.mode,r,i);return r.reverse&&s.reverse(),s}_positionChanged(e,n){const{caretX:i,caretY:a,options:r}=this,s=ii[r.position].call(this,e,n);return s!==!1&&(i!==s.x||a!==s.y)}}NM.positioners=ii;var up={id:"tooltip",_element:NM,positioners:ii,afterInit(t,e,n){n&&(t.tooltip=new NM({chart:t,options:n}))},beforeUpdate(t,e,n){t.tooltip&&t.tooltip.initialize(n)},reset(t,e,n){t.tooltip&&t.tooltip.initialize(n)},afterDraw(t){const e=t.tooltip;if(e&&e._willRender()){const n={tooltip:e};if(t.notifyPlugins("beforeTooltipDraw",n)===!1)return;e.draw(t.ctx),t.notifyPlugins("afterTooltipDraw",n)}},afterEvent(t,e){if(t.tooltip){const n=e.replay;t.tooltip.handleEvent(e.event,n,e.inChartArea)&&(e.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(t,e)=>e.bodyFont.size,boxWidth:(t,e)=>e.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:{beforeTitle:St,title(t){if(t.length>0){const e=t[0],n=e.chart.data.labels,i=n?n.length:0;if(this&&this.options&&this.options.mode==="dataset")return e.dataset.label||"";if(e.label)return e.label;if(i>0&&e.dataIndex<i)return n[e.dataIndex]}return""},afterTitle:St,beforeBody:St,beforeLabel:St,label(t){if(this&&this.options&&this.options.mode==="dataset")return t.label+": "+t.formattedValue||t.formattedValue;let e=t.dataset.label||"";e&&(e+=": ");const n=t.formattedValue;return ye(n)||(e+=n),e},labelColor(t){const n=t.chart.getDatasetMeta(t.datasetIndex).controller.getStyle(t.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(t){const n=t.chart.getDatasetMeta(t.datasetIndex).controller.getStyle(t.dataIndex);return{pointStyle:n.pointStyle,rotation:n.rotation}},afterLabel:St,afterBody:St,beforeFooter:St,footer:St,afterFooter:St}},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:t=>t!=="filter"&&t!=="itemSort"&&t!=="external",_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]};const cp=(t,e,n,i)=>(typeof e=="string"?(n=t.push(e)-1,i.unshift({index:n,label:e})):isNaN(e)&&(n=null),n);function gp(t,e,n,i){const a=t.indexOf(e);if(a===-1)return cp(t,e,n,i);const r=t.lastIndexOf(e);return a!==r?n:a}const Np=(t,e)=>t===null?null:Ve(Math.round(t),0,e);class dr extends Mn{constructor(e){super(e),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(e){const n=this._addedLabels;if(n.length){const i=this.getLabels();for(const{index:a,label:r}of n)i[a]===r&&i.splice(a,1);this._addedLabels=[]}super.init(e)}parse(e,n){if(ye(e))return null;const i=this.getLabels();return n=isFinite(n)&&i[n]===e?n:gp(i,e,le(n,e),this._addedLabels),Np(n,i.length-1)}determineDataLimits(){const{minDefined:e,maxDefined:n}=this.getUserBounds();let{min:i,max:a}=this.getMinMax(!0);this.options.bounds==="ticks"&&(e||(i=0),n||(a=this.getLabels().length-1)),this.min=i,this.max=a}buildTicks(){const e=this.min,n=this.max,i=this.options.offset,a=[];let r=this.getLabels();r=e===0&&n===r.length-1?r:r.slice(e,n+1),this._valueRange=Math.max(r.length-(i?0:1),1),this._startValue=this.min-(i?.5:0);for(let s=e;s<=n;s++)a.push({value:s});return a}getLabelForValue(e){const n=this.getLabels();return e>=0&&e<n.length?n[e]:e}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(e){return typeof e!="number"&&(e=this.parse(e)),e===null?NaN:this.getPixelForDecimal((e-this._startValue)/this._valueRange)}getPixelForTick(e){const n=this.ticks;return e<0||e>n.length-1?null:this.getPixelForValue(n[e].value)}getValueForPixel(e){return Math.round(this._startValue+this.getDecimalForPixel(e)*this._valueRange)}getBasePixel(){return this.bottom}}dr.id="category",dr.defaults={ticks:{callback:dr.prototype.getLabelForValue}};function yp(t,e){const n=[],{bounds:a,step:r,min:s,max:M,precision:l,count:u,maxTicks:c,maxDigits:g,includeBounds:y}=t,j=r||1,d=c-1,{min:D,max:f}=e,N=!ye(s),I=!ye(M),z=!ye(u),T=(f-D)/(g+1);let m=Hu((f-D)/d/j)*j,A,w,Q,Y;if(m<1e-14&&!N&&!I)return[{value:D},{value:f}];Y=Math.ceil(f/m)-Math.floor(D/m),Y>d&&(m=Hu(Y*m/d/j)*j),ye(l)||(A=Math.pow(10,l),m=Math.ceil(m*A)/A),a==="ticks"?(w=Math.floor(D/m)*m,Q=Math.ceil(f/m)*m):(w=D,Q=f),N&&I&&r&&Oz((M-s)/r,m/1e3)?(Y=Math.round(Math.min((M-s)/m,c)),m=(M-s)/Y,w=s,Q=M):z?(w=N?s:w,Q=I?M:Q,Y=u-1,m=(Q-w)/Y):(Y=(Q-w)/m,Un(Y,Math.round(Y),m/1e3)?Y=Math.round(Y):Y=Math.ceil(Y));const B=Math.max(Ju(m),Ju(w));A=Math.pow(10,ye(l)?B:l),w=Math.round(w*A)/A,Q=Math.round(Q*A)/A;let k=0;for(N&&(y&&w!==s?(n.push({value:s}),w<s&&k++,Un(Math.round((w+k*m)*A)/A,s,kg(s,T,t))&&k++):w<s&&k++);k<Y;++k)n.push({value:Math.round((w+k*m)*A)/A});return I&&y&&Q!==M?n.length&&Un(n[n.length-1].value,M,kg(M,T,t))?n[n.length-1].value=M:n.push({value:M}):(!I||Q===M)&&n.push({value:Q}),n}function kg(t,e,{horizontal:n,minRotation:i}){const a=ct(i),r=(n?Math.sin(a):Math.cos(a))||.001,s=.75*e*(""+t).length;return Math.min(e/r,s)}class Ir extends Mn{constructor(e){super(e),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(e,n){return ye(e)||(typeof e=="number"||e instanceof Number)&&!isFinite(+e)?null:+e}handleTickRangeOptions(){const{beginAtZero:e}=this.options,{minDefined:n,maxDefined:i}=this.getUserBounds();let{min:a,max:r}=this;const s=l=>a=n?a:l,M=l=>r=i?r:l;if(e){const l=ht(a),u=ht(r);l<0&&u<0?M(0):l>0&&u>0&&s(0)}if(a===r){let l=1;(r>=Number.MAX_SAFE_INTEGER||a<=Number.MIN_SAFE_INTEGER)&&(l=Math.abs(r*.05)),M(r+l),e||s(a-l)}this.min=a,this.max=r}getTickLimit(){const e=this.options.ticks;let{maxTicksLimit:n,stepSize:i}=e,a;return i?(a=Math.ceil(this.max/i)-Math.floor(this.min/i)+1,a>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${i} would result generating up to ${a} ticks. Limiting to 1000.`),a=1e3)):(a=this.computeTickLimit(),n=n||11),n&&(a=Math.min(n,a)),a}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const e=this.options,n=e.ticks;let i=this.getTickLimit();i=Math.max(2,i);const a={maxTicks:i,bounds:e.bounds,min:e.min,max:e.max,precision:n.precision,step:n.stepSize,count:n.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:n.minRotation||0,includeBounds:n.includeBounds!==!1},r=this._range||this,s=yp(a,r);return e.bounds==="ticks"&&Fu(s,this,"value"),e.reverse?(s.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),s}configure(){const e=this.ticks;let n=this.min,i=this.max;if(super.configure(),this.options.offset&&e.length){const a=(i-n)/Math.max(e.length-1,1)/2;n-=a,i+=a}this._startValue=n,this._endValue=i,this._valueRange=i-n}getLabelForValue(e){return Wn(e,this.chart.options.locale,this.options.ticks.format)}}class yM extends Ir{determineDataLimits(){const{min:e,max:n}=this.getMinMax(!0);this.min=Be(e)?e:0,this.max=Be(n)?n:1,this.handleTickRangeOptions()}computeTickLimit(){const e=this.isHorizontal(),n=e?this.width:this.height,i=ct(this.options.ticks.minRotation),a=(e?Math.sin(i):Math.cos(i))||.001,r=this._resolveTickFontOptions(0);return Math.ceil(n/Math.min(40,r.lineHeight/a))}getPixelForValue(e){return e===null?NaN:this.getPixelForDecimal((e-this._startValue)/this._valueRange)}getValueForPixel(e){return this._startValue+this.getDecimalForPixel(e)*this._valueRange}}yM.id="linear",yM.defaults={ticks:{callback:ar.formatters.numeric}};function Qg(t){return t/Math.pow(10,Math.floor(at(t)))===1}function jp(t,e){const n=Math.floor(at(e.max)),i=Math.ceil(e.max/Math.pow(10,n)),a=[];let r=nt(t.min,Math.pow(10,Math.floor(at(e.min)))),s=Math.floor(at(r)),M=Math.floor(r/Math.pow(10,s)),l=s<0?Math.pow(10,Math.abs(s)):1;do a.push({value:r,major:Qg(r)}),++M,M===10&&(M=1,++s,l=s>=0?1:l),r=Math.round(M*Math.pow(10,s)*l)/l;while(s<n||s===n&&M<i);const u=nt(t.max,r);return a.push({value:u,major:Qg(r)}),a}class _g extends Mn{constructor(e){super(e),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(e,n){const i=Ir.prototype.parse.apply(this,[e,n]);if(i===0){this._zero=!0;return}return Be(i)&&i>0?i:null}determineDataLimits(){const{min:e,max:n}=this.getMinMax(!0);this.min=Be(e)?Math.max(0,e):null,this.max=Be(n)?Math.max(0,n):null,this.options.beginAtZero&&(this._zero=!0),this.handleTickRangeOptions()}handleTickRangeOptions(){const{minDefined:e,maxDefined:n}=this.getUserBounds();let i=this.min,a=this.max;const r=l=>i=e?i:l,s=l=>a=n?a:l,M=(l,u)=>Math.pow(10,Math.floor(at(l))+u);i===a&&(i<=0?(r(1),s(10)):(r(M(i,-1)),s(M(a,1)))),i<=0&&r(M(a,-1)),a<=0&&s(M(i,1)),this._zero&&this.min!==this._suggestedMin&&i===M(this.min,0)&&r(M(i,-1)),this.min=i,this.max=a}buildTicks(){const e=this.options,n={min:this._userMin,max:this._userMax},i=jp(n,this);return e.bounds==="ticks"&&Fu(i,this,"value"),e.reverse?(i.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),i}getLabelForValue(e){return e===void 0?"0":Wn(e,this.chart.options.locale,this.options.ticks.format)}configure(){const e=this.min;super.configure(),this._startValue=at(e),this._valueRange=at(this.max)-at(e)}getPixelForValue(e){return(e===void 0||e===0)&&(e=this.min),e===null||isNaN(e)?NaN:this.getPixelForDecimal(e===this.min?0:(at(e)-this._startValue)/this._valueRange)}getValueForPixel(e){const n=this.getDecimalForPixel(e);return Math.pow(10,this._startValue+n*this._valueRange)}}_g.id="logarithmic",_g.defaults={ticks:{callback:ar.formatters.logarithmic,major:{enabled:!0}}};function jM(t){const e=t.ticks;if(e.display&&t.display){const n=ot(e.backdropPadding);return le(e.font&&e.font.size,oe.font.size)+n.height}return 0}function dp(t,e,n){return n=pe(n)?n:[n],{w:oA(t,e.string,n),h:n.length*e.lineHeight}}function vg(t,e,n,i,a){return t===i||t===a?{start:e-n/2,end:e+n/2}:t<i||t>a?{start:e-n,end:e}:{start:e,end:e+n}}function Ip(t){const e={l:t.left+t._padding.left,r:t.right-t._padding.right,t:t.top+t._padding.top,b:t.bottom-t._padding.bottom},n=Object.assign({},e),i=[],a=[],r=t._pointLabels.length,s=t.options.pointLabels,M=s.centerPointLabels?Ee/r:0;for(let l=0;l<r;l++){const u=s.setContext(t.getPointLabelContext(l));a[l]=u.padding;const c=t.getPointPosition(l,t.drawingArea+a[l],M),g=et(u.font),y=dp(t.ctx,g,t._pointLabels[l]);i[l]=y;const j=gt(t.getIndexAngle(l)+M),d=Math.round(Os(j)),D=vg(d,c.x,y.w,0,180),f=vg(d,c.y,y.h,90,270);Dp(n,e,j,D,f)}t.setCenterPoint(e.l-n.l,n.r-e.r,e.t-n.t,n.b-e.b),t._pointLabelItems=fp(t,i,a)}function Dp(t,e,n,i,a){const r=Math.abs(Math.sin(n)),s=Math.abs(Math.cos(n));let M=0,l=0;i.start<e.l?(M=(e.l-i.start)/r,t.l=Math.min(t.l,e.l-M)):i.end>e.r&&(M=(i.end-e.r)/r,t.r=Math.max(t.r,e.r+M)),a.start<e.t?(l=(e.t-a.start)/s,t.t=Math.min(t.t,e.t-l)):a.end>e.b&&(l=(a.end-e.b)/s,t.b=Math.max(t.b,e.b+l))}function fp(t,e,n){const i=[],a=t._pointLabels.length,r=t.options,s=jM(r)/2,M=t.drawingArea,l=r.pointLabels.centerPointLabels?Ee/a:0;for(let u=0;u<a;u++){const c=t.getPointPosition(u,M+s+n[u],l),g=Math.round(Os(gt(c.angle+Ce))),y=e[u],j=zp(c.y,y.h,g),d=hp(g),D=mp(c.x,y.w,d);i.push({x:c.x,y:j,textAlign:d,left:D,top:j,right:D+y.w,bottom:j+y.h})}return i}function hp(t){return t===0||t===180?"center":t<180?"left":"right"}function mp(t,e,n){return n==="right"?t-=e:n==="center"&&(t-=e/2),t}function zp(t,e,n){return n===90||n===270?t-=e/2:(n>270||n<90)&&(t-=e),t}function Ap(t,e){const{ctx:n,options:{pointLabels:i}}=t;for(let a=e-1;a>=0;a--){const r=i.setContext(t.getPointLabelContext(a)),s=et(r.font),{x:M,y:l,textAlign:u,left:c,top:g,right:y,bottom:j}=t._pointLabelItems[a],{backdropColor:d}=r;if(!ye(d)){const D=hn(r.borderRadius),f=ot(r.backdropPadding);n.fillStyle=d;const N=c-f.left,I=g-f.top,z=y-c+f.width,T=j-g+f.height;Object.values(D).some(m=>m!==0)?(n.beginPath(),Ka(n,{x:N,y:I,w:z,h:T,radius:D}),n.fill()):n.fillRect(N,I,z,T)}Xa(n,t._pointLabels[a],M,l+s.lineHeight/2,s,{color:r.color,textAlign:u,textBaseline:"middle"})}}function Yg(t,e,n,i){const{ctx:a}=t;if(n)a.arc(t.xCenter,t.yCenter,e,0,fe);else{let r=t.getPointPosition(0,e);a.moveTo(r.x,r.y);for(let s=1;s<i;s++)r=t.getPointPosition(s,e),a.lineTo(r.x,r.y)}}function Tp(t,e,n,i){const a=t.ctx,r=e.circular,{color:s,lineWidth:M}=e;!r&&!i||!s||!M||n<0||(a.save(),a.strokeStyle=s,a.lineWidth=M,a.setLineDash(e.borderDash),a.lineDashOffset=e.borderDashOffset,a.beginPath(),Yg(t,n,r,i),a.closePath(),a.stroke(),a.restore())}function pp(t,e,n){return Gt(t,{label:n,index:e,type:"pointLabel"})}class Dr extends Ir{constructor(e){super(e),this.xCenter=void 0,this.yCenter=void 0,this.drawingArea=void 0,this._pointLabels=[],this._pointLabelItems=[]}setDimensions(){const e=this._padding=ot(jM(this.options)/2),n=this.width=this.maxWidth-e.width,i=this.height=this.maxHeight-e.height;this.xCenter=Math.floor(this.left+n/2+e.left),this.yCenter=Math.floor(this.top+i/2+e.top),this.drawingArea=Math.floor(Math.min(n,i)/2)}determineDataLimits(){const{min:e,max:n}=this.getMinMax(!1);this.min=Be(e)&&!isNaN(e)?e:0,this.max=Be(n)&&!isNaN(n)?n:0,this.handleTickRangeOptions()}computeTickLimit(){return Math.ceil(this.drawingArea/jM(this.options))}generateTickLabels(e){Ir.prototype.generateTickLabels.call(this,e),this._pointLabels=this.getLabels().map((n,i)=>{const a=Se(this.options.pointLabels.callback,[n,i],this);return a||a===0?a:""}).filter((n,i)=>this.chart.getDataVisibility(i))}fit(){const e=this.options;e.display&&e.pointLabels.display?Ip(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(e,n,i,a){this.xCenter+=Math.floor((e-n)/2),this.yCenter+=Math.floor((i-a)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(e,n,i,a))}getIndexAngle(e){const n=fe/(this._pointLabels.length||1),i=this.options.startAngle||0;return gt(e*n+ct(i))}getDistanceFromCenterForValue(e){if(ye(e))return NaN;const n=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-e)*n:(e-this.min)*n}getValueForDistanceFromCenter(e){if(ye(e))return NaN;const n=e/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-n:this.min+n}getPointLabelContext(e){const n=this._pointLabels||[];if(e>=0&&e<n.length){const i=n[e];return pp(this.getContext(),e,i)}}getPointPosition(e,n,i=0){const a=this.getIndexAngle(e)-Ce+i;return{x:Math.cos(a)*n+this.xCenter,y:Math.sin(a)*n+this.yCenter,angle:a}}getPointPositionForValue(e,n){return this.getPointPosition(e,this.getDistanceFromCenterForValue(n))}getBasePosition(e){return this.getPointPositionForValue(e||0,this.getBaseValue())}getPointLabelPosition(e){const{left:n,top:i,right:a,bottom:r}=this._pointLabelItems[e];return{left:n,top:i,right:a,bottom:r}}drawBackground(){const{backgroundColor:e,grid:{circular:n}}=this.options;if(e){const i=this.ctx;i.save(),i.beginPath(),Yg(this,this.getDistanceFromCenterForValue(this._endValue),n,this._pointLabels.length),i.closePath(),i.fillStyle=e,i.fill(),i.restore()}}drawGrid(){const e=this.ctx,n=this.options,{angleLines:i,grid:a}=n,r=this._pointLabels.length;let s,M,l;if(n.pointLabels.display&&Ap(this,r),a.display&&this.ticks.forEach((u,c)=>{if(c!==0){M=this.getDistanceFromCenterForValue(u.value);const g=a.setContext(this.getContext(c-1));Tp(this,g,M,r)}}),i.display){for(e.save(),s=r-1;s>=0;s--){const u=i.setContext(this.getPointLabelContext(s)),{color:c,lineWidth:g}=u;!g||!c||(e.lineWidth=g,e.strokeStyle=c,e.setLineDash(u.borderDash),e.lineDashOffset=u.borderDashOffset,M=this.getDistanceFromCenterForValue(n.ticks.reverse?this.min:this.max),l=this.getPointPosition(s,M),e.beginPath(),e.moveTo(this.xCenter,this.yCenter),e.lineTo(l.x,l.y),e.stroke())}e.restore()}}drawBorder(){}drawLabels(){const e=this.ctx,n=this.options,i=n.ticks;if(!i.display)return;const a=this.getIndexAngle(0);let r,s;e.save(),e.translate(this.xCenter,this.yCenter),e.rotate(a),e.textAlign="center",e.textBaseline="middle",this.ticks.forEach((M,l)=>{if(l===0&&!n.reverse)return;const u=i.setContext(this.getContext(l)),c=et(u.font);if(r=this.getDistanceFromCenterForValue(this.ticks[l].value),u.showLabelBackdrop){e.font=c.string,s=e.measureText(M.label).width,e.fillStyle=u.backdropColor;const g=ot(u.backdropPadding);e.fillRect(-s/2-g.left,-r-c.size/2-g.top,s+g.width,c.size+g.height)}Xa(e,M.label,0,-r,c,{color:u.color})}),e.restore()}drawTitle(){}}Dr.id="radialLinear",Dr.defaults={display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:ar.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback(t){return t},padding:5,centerPointLabels:!1}},Dr.defaultRoutes={"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"},Dr.descriptors={angleLines:{_fallback:"grid"}};const fr={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}},Ke=Object.keys(fr);function Lp(t,e){return t-e}function Ug(t,e){if(ye(e))return null;const n=t._adapter,{parser:i,round:a,isoWeekday:r}=t._parseOpts;let s=e;return typeof i=="function"&&(s=i(s)),Be(s)||(s=typeof i=="string"?n.parse(s,i):n.parse(s)),s===null?null:(a&&(s=a==="week"&&(Dn(r)||r===!0)?n.startOf(s,"isoWeek",r):n.startOf(s,a)),+s)}function Pg(t,e,n,i){const a=Ke.length;for(let r=Ke.indexOf(t);r<a-1;++r){const s=fr[Ke[r]],M=s.steps?s.steps:Number.MAX_SAFE_INTEGER;if(s.common&&Math.ceil((n-e)/(M*s.size))<=i)return Ke[r]}return Ke[a-1]}function xp(t,e,n,i,a){for(let r=Ke.length-1;r>=Ke.indexOf(n);r--){const s=Ke[r];if(fr[s].common&&t._adapter.diff(a,i,s)>=e-1)return s}return Ke[n?Ke.indexOf(n):0]}function Op(t){for(let e=Ke.indexOf(t)+1,n=Ke.length;e<n;++e)if(fr[Ke[e]].common)return Ke[e]}function Bg(t,e,n){if(!n)t[e]=!0;else if(n.length){const{lo:i,hi:a}=Es(n,e),r=n[i]>=e?n[i]:n[a];t[r]=!0}}function Sp(t,e,n,i){const a=t._adapter,r=+a.startOf(e[0].value,i),s=e[e.length-1].value;let M,l;for(M=r;M<=s;M=+a.add(M,1,i))l=n[M],l>=0&&(e[l].major=!0);return e}function Rg(t,e,n){const i=[],a={},r=e.length;let s,M;for(s=0;s<r;++s)M=e[s],a[M]=s,i.push({value:M,major:!1});return r===0||!n?i:Sp(t,i,a,n)}class hr extends Mn{constructor(e){super(e),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(e,n){const i=e.time||(e.time={}),a=this._adapter=new $0._date(e.adapters.date);a.init(n),vn(i.displayFormats,a.formats()),this._parseOpts={parser:i.parser,round:i.round,isoWeekday:i.isoWeekday},super.init(e),this._normalized=n.normalized}parse(e,n){return e===void 0?null:Ug(this,e)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const e=this.options,n=this._adapter,i=e.time.unit||"day";let{min:a,max:r,minDefined:s,maxDefined:M}=this.getUserBounds();function l(u){!s&&!isNaN(u.min)&&(a=Math.min(a,u.min)),!M&&!isNaN(u.max)&&(r=Math.max(r,u.max))}(!s||!M)&&(l(this._getLabelBounds()),(e.bounds!=="ticks"||e.ticks.source!=="labels")&&l(this.getMinMax(!1))),a=Be(a)&&!isNaN(a)?a:+n.startOf(Date.now(),i),r=Be(r)&&!isNaN(r)?r:+n.endOf(Date.now(),i)+1,this.min=Math.min(a,r-1),this.max=Math.max(a+1,r)}_getLabelBounds(){const e=this.getLabelTimestamps();let n=Number.POSITIVE_INFINITY,i=Number.NEGATIVE_INFINITY;return e.length&&(n=e[0],i=e[e.length-1]),{min:n,max:i}}buildTicks(){const e=this.options,n=e.time,i=e.ticks,a=i.source==="labels"?this.getLabelTimestamps():this._generate();e.bounds==="ticks"&&a.length&&(this.min=this._userMin||a[0],this.max=this._userMax||a[a.length-1]);const r=this.min,s=this.max,M=bz(a,r,s);return this._unit=n.unit||(i.autoSkip?Pg(n.minUnit,this.min,this.max,this._getLabelCapacity(r)):xp(this,M.length,n.minUnit,this.min,this.max)),this._majorUnit=!i.major.enabled||this._unit==="year"?void 0:Op(this._unit),this.initOffsets(a),e.reverse&&M.reverse(),Rg(this,M,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map(e=>+e.value))}initOffsets(e){let n=0,i=0,a,r;this.options.offset&&e.length&&(a=this.getDecimalForValue(e[0]),e.length===1?n=1-a:n=(this.getDecimalForValue(e[1])-a)/2,r=this.getDecimalForValue(e[e.length-1]),e.length===1?i=r:i=(r-this.getDecimalForValue(e[e.length-2]))/2);const s=e.length<3?.5:.25;n=Ve(n,0,s),i=Ve(i,0,s),this._offsets={start:n,end:i,factor:1/(n+1+i)}}_generate(){const e=this._adapter,n=this.min,i=this.max,a=this.options,r=a.time,s=r.unit||Pg(r.minUnit,n,i,this._getLabelCapacity(n)),M=le(r.stepSize,1),l=s==="week"?r.isoWeekday:!1,u=Dn(l)||l===!0,c={};let g=n,y,j;if(u&&(g=+e.startOf(g,"isoWeek",l)),g=+e.startOf(g,u?"day":s),e.diff(i,n,s)>1e5*M)throw new Error(n+" and "+i+" are too far apart with stepSize of "+M+" "+s);const d=a.ticks.source==="data"&&this.getDataTimestamps();for(y=g,j=0;y<i;y=+e.add(y,M,s),j++)Bg(c,y,d);return(y===i||a.bounds==="ticks"||j===1)&&Bg(c,y,d),Object.keys(c).sort((D,f)=>D-f).map(D=>+D)}getLabelForValue(e){const n=this._adapter,i=this.options.time;return i.tooltipFormat?n.format(e,i.tooltipFormat):n.format(e,i.displayFormats.datetime)}_tickFormatFunction(e,n,i,a){const r=this.options,s=r.time.displayFormats,M=this._unit,l=this._majorUnit,u=M&&s[M],c=l&&s[l],g=i[n],y=l&&c&&g&&g.major,j=this._adapter.format(e,a||(y?c:u)),d=r.ticks.callback;return d?Se(d,[j,n,i],this):j}generateTickLabels(e){let n,i,a;for(n=0,i=e.length;n<i;++n)a=e[n],a.label=this._tickFormatFunction(a.value,n,e)}getDecimalForValue(e){return e===null?NaN:(e-this.min)/(this.max-this.min)}getPixelForValue(e){const n=this._offsets,i=this.getDecimalForValue(e);return this.getPixelForDecimal((n.start+i)*n.factor)}getValueForPixel(e){const n=this._offsets,i=this.getDecimalForPixel(e)/n.factor-n.end;return this.min+i*(this.max-this.min)}_getLabelSize(e){const n=this.options.ticks,i=this.ctx.measureText(e).width,a=ct(this.isHorizontal()?n.maxRotation:n.minRotation),r=Math.cos(a),s=Math.sin(a),M=this._resolveTickFontOptions(0).size;return{w:i*r+M*s,h:i*s+M*r}}_getLabelCapacity(e){const n=this.options.time,i=n.displayFormats,a=i[n.unit]||i.millisecond,r=this._tickFormatFunction(e,0,Rg(this,[e],this._majorUnit),a),s=this._getLabelSize(r),M=Math.floor(this.isHorizontal()?this.width/s.w:this.height/s.h)-1;return M>0?M:1}getDataTimestamps(){let e=this._cache.data||[],n,i;if(e.length)return e;const a=this.getMatchingVisibleMetas();if(this._normalized&&a.length)return this._cache.data=a[0].controller.getAllParsedValues(this);for(n=0,i=a.length;n<i;++n)e=e.concat(a[n].controller.getAllParsedValues(this));return this._cache.data=this.normalize(e)}getLabelTimestamps(){const e=this._cache.labels||[];let n,i;if(e.length)return e;const a=this.getLabels();for(n=0,i=a.length;n<i;++n)e.push(Ug(this,a[n]));return this._cache.labels=this._normalized?e:this.normalize(e)}normalize(e){return ec(e.sort(Lp))}}hr.id="time",hr.defaults={bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",major:{enabled:!1}}};function mr(t,e,n){let i=0,a=t.length-1,r,s,M,l;n?(e>=t[i].pos&&e<=t[a].pos&&({lo:i,hi:a}=tn(t,"pos",e)),{pos:r,time:M}=t[i],{pos:s,time:l}=t[a]):(e>=t[i].time&&e<=t[a].time&&({lo:i,hi:a}=tn(t,"time",e)),{time:r,pos:M}=t[i],{time:s,pos:l}=t[a]);const u=s-r;return u?M+(l-M)*(e-r)/u:M}class Zg extends hr{constructor(e){super(e),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const e=this._getTimestampsForTable(),n=this._table=this.buildLookupTable(e);this._minPos=mr(n,this.min),this._tableRange=mr(n,this.max)-this._minPos,super.initOffsets(e)}buildLookupTable(e){const{min:n,max:i}=this,a=[],r=[];let s,M,l,u,c;for(s=0,M=e.length;s<M;++s)u=e[s],u>=n&&u<=i&&a.push(u);if(a.length<2)return[{time:n,pos:0},{time:i,pos:1}];for(s=0,M=a.length;s<M;++s)c=a[s+1],l=a[s-1],u=a[s],Math.round((c+l)/2)!==u&&r.push({time:u,pos:s/(M-1)});return r}_getTimestampsForTable(){let e=this._cache.all||[];if(e.length)return e;const n=this.getDataTimestamps(),i=this.getLabelTimestamps();return n.length&&i.length?e=this.normalize(n.concat(i)):e=n.length?n:i,e=this._cache.all=e,e}getDecimalForValue(e){return(mr(this._table,e)-this._minPos)/this._tableRange}getValueForPixel(e){const n=this._offsets,i=this.getDecimalForPixel(e)/n.factor-n.end;return mr(this._table,i*this._tableRange+this._minPos,!0)}}Zg.id="timeseries",Zg.defaults=hr.defaults;var Tn;(function(t){t.ChartRendered="chart:rendered",t.ChartUpdated="chart:updated",t.ChartDestroyed="chart:destroyed",t.LabelsUpdated="labels:updated"})(Tn||(Tn={}));function zr(t,e,n,i){t(e,n),i!==void 0&&i.emit(Tn.ChartRendered)}function Ep(t,e){t.update(),e!==void 0&&e.emit(Tn.ChartUpdated)}function Ar(t,e){t.destroy(),e!==void 0&&e.emit(Tn.ChartDestroyed)}function Cp(t,e){const n={labels:typeof t.labels=="undefined"?[]:[...t.labels],datasets:[]};return Vg(n,{...t},e),n}function Vg(t,e,n){const i=[];t.datasets=e.datasets.map(a=>{const r=t.datasets.find(s=>s[n]===a[n]);return!r||!a.data||i.includes(r)?{...a}:(i.push(r),Object.assign(r,a),r)})}function bp(t,e,n){t.data.labels=e,n!==void 0&&n.emit(Tn.LabelsUpdated)}function wp(t,e){t.options={...e}}function kp(t,e){const n=t.datasets.map(a=>a.label),i=e.datasets.map(a=>a.label);return e.datasets.length===t.datasets.length&&n.every((a,r)=>a===i[r])}const Qp="Please remove the <template></template> tags from your chart component. See https://vue-chartjs.org/guide/#vue-single-file-components",_p="Update ERROR: chart instance not found",vp=((t,e,n)=>o.defineComponent({props:{chartData:{type:Object,required:!0},chartOptions:{type:Object,default:()=>{}},datasetIdKey:{type:String,default:"label"},chartId:{type:String,default:t},width:{type:Number,default:400},height:{type:Number,default:400},cssClasses:{type:String,default:""},styles:{type:Object,default:()=>{}},plugins:{type:Array,default:()=>[]}},setup(i,a){ni.register(n);const r=o.shallowRef(null),s=o.ref(null);function M(g,y){if(r.value!==null&&Ar(o.toRaw(r.value),a),s.value===null)throw new Error(Qp);{const j=Cp(g,i.datasetIdKey),d=s.value.getContext("2d");d!==null&&(r.value=new ni(d,{type:e,data:o.isProxy(g)?new Proxy(j,{}):j,options:y,plugins:i.plugins}))}}function l(g,y){const j=o.isProxy(g)?o.toRaw(g):{...g},d=o.isProxy(y)?o.toRaw(y):{...y};if(Object.keys(d).length>0){const D=o.toRaw(r.value);kp(j,d)&&D!==null?(Vg(D==null?void 0:D.data,j,i.datasetIdKey),j.labels!==void 0&&bp(D,j.labels,a),c()):(D!==null&&Ar(D,a),zr(M,i.chartData,i.chartOptions,a))}else r.value!==null&&Ar(o.toRaw(r.value),a),zr(M,i.chartData,i.chartOptions,a)}function u(g){const y=o.toRaw(r.value);y!==null?(wp(y,g),c()):zr(M,i.chartData,i.chartOptions,a)}function c(){const g=o.toRaw(r.value);g!==null?Ep(g,a):console.error(_p)}return o.watch(()=>i.chartData,(g,y)=>l(g,y),{deep:!0}),o.watch(()=>i.chartOptions,g=>u(g),{deep:!0}),o.onMounted(()=>{"datasets"in i.chartData&&i.chartData.datasets.length>0&&zr(M,i.chartData,i.chartOptions,a)}),o.onBeforeUnmount(()=>{r.value!==null&&Ar(o.toRaw(r.value),a)}),a.expose({chart:r,updateChart:c}),()=>o.h("div",{style:i.styles,class:i.cssClasses},[o.h("canvas",{id:i.chartId,width:i.width,height:i.height,ref:s})])}}))("bar-chart","bar",ir);var tS="";const Yp={name:"MultiRangeSlider",props:{baseClassName:{type:String,default:"multi-range-slider"},min:{type:Number},max:{type:Number},minValue:{type:Number},maxValue:{type:Number},step:{type:Number,default:1},preventWheel:{type:Boolean,default:!1},ruler:{type:Boolean,default:!0},label:{type:Boolean,default:!0},labels:{type:Array},minCaption:{type:String},maxCaption:{type:String},rangeMargin:{type:Number}},data(){let t=this.labels||[],e=this.min===void 0?0:this.min,n=t.length?t.length-1:100,i=this.max===void 0?n:this.max,a=this.minValue===void 0?25:this.minValue;t.length&&this.minValue===void 0&&(a=1);let r=this.maxValue||75;if(t.length&&this.maxValue===void 0&&(r=t.length-2),i<=e)throw new Error("Invalid props min or max");if(a>r)throw new Error("Invalid props minValue or maxValue");let s=this.rangeMargin===void 0?this.step:this.rangeMargin,M=s%this.step;return M&&(s=s+this.step-M),{valueMin:a<e?e:a,valueMax:r>i?i:r,interVal:null,startX:null,mouseMoveCounter:null,barBox:null,barValue:0,rangeMarginValue:s}},methods:{onBarLeftClick(){this.valueMin-this.step>=this.minimum?this.valueMin-=this.step:this.valueMin=this.minimum},onInnerBarLeftClick(){this.valueMin+this.rangeMarginValue<this.valueMax&&(this.valueMin+=this.step)},onBarRightClick(){this.valueMax+this.step<=this.maximum?this.valueMax+=this.step:this.valueMax=this.maximum},onInnerBarRightClick(){this.valueMax-this.rangeMarginValue>this.valueMin&&(this.valueMax-=this.step)},onInputMinChange(t){let e=parseFloat(t.target.value);e<=this.valueMax-this.rangeMarginValue&&e>=this.minimum?this.valueMin=e:t.target.value=this.valueMin},onInputMaxChange(t){let e=parseFloat(t.target.value);e>=this.valueMin+this.rangeMarginValue&&e<=this.maximum?this.valueMax=e:t.target.value=this.valueMax},onLeftThumbMousedown(t){if(t.preventDefault(),this.startX=t.clientX,t.type==="touchstart")if(t.touches.length===1)this.startX=t.touches[0].clientX;else return;this.mouseMoveCounter=0,this.barValue=this.valueMin,this.barBox=t.target.parentNode.getBoundingClientRect(),document.addEventListener("mousemove",this.onLeftThumbMousemove),document.addEventListener("mouseup",this.onLeftThumbMouseup),document.addEventListener("touchmove",this.onLeftThumbMousemove),document.addEventListener("touchend",this.onLeftThumbMouseup)},onLeftThumbMousemove(t){this.mouseMoveCounter++;let e=t.clientX;t.type==="touchmove"&&(e=t.touches[0].clientX);let i=(e-this.startX)/this.barBox.width,a=this.barValue+(this.maximum-this.minimum)*i;a-=a%this.step,a<this.minimum?a=this.minimum:a>this.valueMax-this.rangeMarginValue&&(a=this.valueMax-this.rangeMarginValue),this.valueMin=a},onLeftThumbMouseup(){document.removeEventListener("mousemove",this.onLeftThumbMousemove),document.removeEventListener("mouseup",this.onLeftThumbMouseup),document.removeEventListener("touchmove",this.onLeftThumbMousemove),document.removeEventListener("touchend",this.onLeftThumbMouseup)},onRightThumbMousedown(t){if(t.preventDefault(),this.startX=t.clientX,t.type==="touchstart")if(t.touches.length===1)this.startX=t.touches[0].clientX;else return;this.mouseMoveCounter=0,this.barValue=this.valueMax,this.barBox=t.target.parentNode.getBoundingClientRect(),document.addEventListener("mousemove",this.onRightThumbMousemove),document.addEventListener("mouseup",this.onRightThumbMouseup),document.addEventListener("touchmove",this.onRightThumbMousemove),document.addEventListener("touchend",this.onRightThumbMouseup)},onRightThumbMousemove(t){this.mouseMoveCounter++;let e=t.clientX;t.type==="touchmove"&&(e=t.touches[0].clientX);let i=(e-this.startX)/this.barBox.width,a=this.barValue+(this.maximum-this.minimum)*i;a-=a%this.step,a<this.valueMin+this.rangeMarginValue?a=this.valueMin+this.rangeMarginValue:a>this.maximum&&(a=this.maximum),this.valueMax=a},onRightThumbMouseup(){document.removeEventListener("mousemove",this.onRightThumbMousemove),document.removeEventListener("mouseup",this.onRightThumbMouseup),document.removeEventListener("touchmove",this.onRightThumbMousemove),document.removeEventListener("touchend",this.onRightThumbMouseup)},onMouseWheel(t){if(this.preventWheel===!0||!t.shiftKey&&!t.ctrlKey)return;let e=this.step;t.deltaY<0&&(e=-e),t.shiftKey&&t.ctrlKey?this.valueMin+e>=this.minimum&&this.valueMax+e<=this.maximum&&(this.valueMin=this.valueMin+e,this.valueMax=this.valueMax+e):t.ctrlKey?(e=this.valueMax+e,e<this.valueMin+this.rangeMarginValue?e=this.valueMin+this.rangeMarginValue:e>this.maximum&&(e=this.maximum),this.valueMax=e):t.shiftKey&&(e=this.valueMin+e,e<this.minimum?e=this.minimum:e>this.valueMax-this.rangeMarginValue&&(e=this.valueMax-this.rangeMarginValue),this.valueMin=e)},triggerInput(){let t=0;this.step.toString().includes(".")&&(t=2);let e={min:this.minimum,max:this.maximum,minValue:parseFloat(this.valueMin.toFixed(t)),maxValue:parseFloat(this.valueMax.toFixed(t))};this.$emit("input",e)}},computed:{minimum(){return this.min===void 0?0:this.min},maximum(){let t=this.labels||[],e=t.length?t.length-1:100;return this.max===void 0?e:this.max},stepCount(){let t=this.labels||[];return t.length?t.length-1:Math.floor((this.maximum-this.minimum)/this.step)},subStepCount(){return(this.labels||[]).length&&this.step>1?(this.maximum-this.minimum)/this.step:0},barMin(){return(this.valueMin-this.minimum)/(this.maximum-this.minimum)*100},barMax(){return 100-(this.valueMax-this.minimum)/(this.maximum-this.minimum)*100},barMinVal(){let t=0;return this.step.toString().includes(".")&&(t=2),(this.valueMin||0).toFixed(t)},barMaxVal(){let t=0;return this.step.toString().includes(".")&&(t=2),(this.valueMax||100).toFixed(t)},scaleLabels(){let t=this.labels||[];return t.length===0&&(t=[],t.push(this.minimum),t.push(this.maximum)),t}},watch:{valueMin(){this.triggerInput()},valueMax(){this.triggerInput()},minValue(t){this.valueMin=t<this.minimum?this.minimum:t},maxValue(t){this.valueMax=t>this.maximum?this.maximum:t}},mounted(){}},Up={class:"bar"},Pp=["min","max","step","value"],Bp={class:"caption"},Rp={class:"min-caption"},Zp={class:"bar-inner"},Vp=["min","max","step","value"],Gp={class:"caption"},Wp={class:"max-caption"},$p={key:0,class:"ruler"},Hp={key:1,class:"sub-ruler"},Fp={key:2,class:"labels"};function Jp(t,e,n,i,a,r){return o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass([n.baseClassName,a.rangeMarginValue===0?"zero-ranage-margin":""]),onMousewheel:e[10]||(e[10]=o.withModifiers((...s)=>r.onMouseWheel&&r.onMouseWheel(...s),["prevent","stop"]))},[o.createElementVNode("div",Up,[o.createElementVNode("div",{class:"bar-left",style:o.normalizeStyle({width:r.barMin+"%"}),onClick:e[0]||(e[0]=(...s)=>r.onBarLeftClick&&r.onBarLeftClick(...s))},null,4),o.createElementVNode("input",{class:"input-type-range input-type-range-min",type:"range",min:r.minimum,max:r.maximum,step:n.step,value:a.valueMin,onInput:e[1]||(e[1]=o.withModifiers((...s)=>r.onInputMinChange&&r.onInputMinChange(...s),["stop","prevent"]))},null,40,Pp),o.createElementVNode("div",{class:"thumb thumb-left",onMousedown:e[2]||(e[2]=(...s)=>r.onLeftThumbMousedown&&r.onLeftThumbMousedown(...s)),onTouchstart:e[3]||(e[3]=(...s)=>r.onLeftThumbMousedown&&r.onLeftThumbMousedown(...s))},[o.createElementVNode("div",Bp,[o.createElementVNode("span",Rp,o.toDisplayString(n.minCaption||r.barMinVal),1)])],32),o.createElementVNode("div",Zp,[o.createElementVNode("div",{class:"bar-inner-left",onClick:e[4]||(e[4]=(...s)=>r.onInnerBarLeftClick&&r.onInnerBarLeftClick(...s))}),o.createElementVNode("div",{class:"bar-inner-right",onClick:e[5]||(e[5]=(...s)=>r.onInnerBarRightClick&&r.onInnerBarRightClick(...s))})]),o.createElementVNode("input",{class:"input-type-range input-type-range-max",type:"range",min:r.minimum,max:r.maximum,step:n.step,value:a.valueMax,onInput:e[6]||(e[6]=o.withModifiers((...s)=>r.onInputMaxChange&&r.onInputMaxChange(...s),["stop","prevent"]))},null,40,Vp),o.createElementVNode("div",{class:"thumb thumb-right",onMousedown:e[7]||(e[7]=(...s)=>r.onRightThumbMousedown&&r.onRightThumbMousedown(...s)),onTouchstart:e[8]||(e[8]=(...s)=>r.onRightThumbMousedown&&r.onRightThumbMousedown(...s))},[o.createElementVNode("div",Gp,[o.createElementVNode("span",Wp,o.toDisplayString(n.maxCaption||r.barMaxVal),1)])],32),o.createElementVNode("div",{class:"bar-right",style:o.normalizeStyle({width:r.barMax+"%"}),onClick:e[9]||(e[9]=(...s)=>r.onBarRightClick&&r.onBarRightClick(...s))},null,4)]),n.ruler?(o.openBlock(),o.createElementBlock("div",$p,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(r.stepCount,s=>(o.openBlock(),o.createElementBlock("div",{key:s,class:"ruler-rule"}))),128))])):o.createCommentVNode("",!0),r.subStepCount?(o.openBlock(),o.createElementBlock("div",Hp,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(r.subStepCount,s=>(o.openBlock(),o.createElementBlock("div",{key:s,class:"ruler-sub-rule"}))),128))])):o.createCommentVNode("",!0),n.label?(o.openBlock(),o.createElementBlock("div",Fp,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(r.scaleLabels,s=>(o.openBlock(),o.createElementBlock("div",{class:"label",key:s},o.toDisplayString(s),1))),128))])):o.createCommentVNode("",!0)],34)}var Xp=Ze(Yp,[["render",Jp]]);const Kp=o.defineComponent({components:{DhIcon:ue},props:{mainText:{type:String,default:"Advanced"},filterMissingText:{type:String,default:"Filter Missing"},matchText:{type:String,default:"Match"},excludeText:{type:String,default:"Exclude"}},data(){return{activeFilter:!1,isFilterMissing:!1,isMatch:!1,isExclude:!1}},emits:["match","exclude","filter_missing"],mounted(){this.isMatch=!0},methods:{toggleFilter(){this.activeFilter=!this.activeFilter},matchFilter(){this.isMatch=!0,this.isExclude=!1,this.$emit("match",this.isMatch)},excludeFilter(){this.isMatch=!1,this.isExclude=!0,this.$emit("exclude",this.isExclude)},missingFilter(){this.isFilterMissing=!this.isFilterMissing,this.$emit("filter_missing",this.isFilterMissing),this.isFilterMissing&&this.isMatch?this.matchFilter():this.isFilterMissing&&this.isExclude&&this.excludeFilter()}}}),qp={class:"dh-advanced-filter-container"},eL={class:"advance_section"},tL={key:0},nL={class:"list-none"},iL=["checked"],aL=["checked"],rL=["checked"];function oL(t,e,n,i,a,r){const s=o.resolveComponent("dh-icon");return o.openBlock(),o.createElementBlock("div",qp,[o.createElementVNode("div",eL,[o.createElementVNode("span",{class:"toggle-icon",onClick:e[0]||(e[0]=M=>t.toggleFilter())},[o.createTextVNode(o.toDisplayString(t.mainText)+" ",1),o.createVNode(s,{"icon-name":t.activeFilter?"arrow-up":"arrow-down",size:20},null,8,["icon-name"])]),t.activeFilter?(o.openBlock(),o.createElementBlock("div",tL,[o.renderSlot(t.$slots,"default"),o.createElementVNode("ul",nL,[o.createElementVNode("li",null,[o.createElementVNode("label",null,[o.createElementVNode("input",{checked:t.isFilterMissing,name:"number_filter",type:"checkbox",onChange:e[1]||(e[1]=M=>t.missingFilter())},null,40,iL),o.createTextVNode(" "+o.toDisplayString(t.filterMissingText),1)])]),o.createElementVNode("li",null,[o.createElementVNode("label",null,[o.createElementVNode("input",{checked:t.isMatch,name:"number_filter",type:"radio",onChange:e[2]||(e[2]=M=>t.matchFilter())},null,40,aL),o.createTextVNode(" "+o.toDisplayString(t.matchText),1)]),o.createElementVNode("label",null,[o.createElementVNode("input",{checked:t.isExclude,name:"number_filter",type:"radio",onChange:e[3]||(e[3]=M=>t.excludeFilter())},null,40,rL),o.createTextVNode(" "+o.toDisplayString(t.excludeText),1)])])])])):o.createCommentVNode("",!0)])])}var Gg=Ze(Kp,[["render",oL]]),nS="";ni.register(up,yr,dr,yM);const sL=o.defineComponent({components:{Bar:vp,MultiRangeSlider:Xp,DhAdvancedFilter:Gg},props:{numberRange:{type:Array,default:()=>[{key:1,count:10}]},width:{type:Number,default:200},height:{type:Number,default:50},chartId:{type:String,default:"bar-chart"},datasetIdKey:{type:String,default:"label"},steps:{type:Number,default:1},includeForm:{type:Boolean,default:!1}},data(){return{chartData:{labels:[],datasets:[{labels:"",data:[],backgroundColor:["#5ea9e5"],borderRadius:1,hoverBackgroundColor:"#e0e0e0"}]},chartOptions:{responsive:!0,plugins:{legend:{display:!1},tooltip:{enabled:!1}},scales:{x:{display:!1,grid:{display:!1},ticks:{display:!0}},y:{display:!1,grid:{display:!1},ticks:{display:!1}}}},chartLines:{},min:"1",max:this.maxNumber(this.numberRange),rangeMax:this.numberRange.length,chart_dta:[],BarMinValue:1,BarMaxValue:this.numberRange.length,activeFilter:!1,validated:!1,isMatch:!1,isExclude:!1,isDisable:!1,labels:[]}},mounted(){this.isMatch=!0,this.setChartData(this.numberRange),this.highlightChart(),this.labels=[this.BarMinValue,this.max]},methods:{matchFilter(){if(!this.isDisable){this.isMatch=!0,this.isExclude=!1;var t=this.chartData.datasets[0].data;this.chartLines=this.chartData.datasets[0],this.chartData.datasets[0].backgroundColor=[];for(let e=0;e<=t.length;e++)t[e]>=this.min&&t[e]<=this.max?this.chartData.datasets[0].backgroundColor.push("#5ea9e5"):this.chartData.datasets[0].backgroundColor.push("#e0e0e0")}},excludeFilter(){if(!this.isDisable){this.isMatch=!1,this.isExclude=!0;var t=this.chartData.datasets[0].data;this.chartLines=this.chartData.datasets[0],this.chartData.datasets[0].backgroundColor=[];for(let e=0;e<t.length;e++)t[e]>=this.min&&t[e]<=this.max?this.chartData.datasets[0].backgroundColor.push("#e0e0e0"):this.chartData.datasets[0].backgroundColor.push("#5ea9e5")}},missingFilter(){this.isDisable=!this.isDisable,this.validated=!this.validated;var t=this.chartData.datasets[0].data;if(this.chartLines=this.chartData.datasets[0],this.chartData.datasets[0].backgroundColor=[],this.validated)for(let e=1;e<=t.length;e++)this.chartData.datasets[0].backgroundColor.push("#e0e0e0");else this.isMatch&&this.matchFilter(),this.isExclude&&this.excludeFilter()},changeMin(t){let e=t.target.value;this.min=e||"1",this.BarMinValue=e?this.getFirstIndex(parseInt(e)):1,this.isMatch&&!this.isDisable&&this.matchFilter(),this.isExclude&&!this.isDisable&&this.excludeFilter()},changeMax(t){let e=t.target.value;this.BarMaxValue=e&&e>this.maxNumber(this.numberRange)?this.numberRange.length:this.getLastIndex(parseInt(e)),this.max=e&&e>this.maxNumber(this.numberRange)?this.maxNumber(this.numberRange):e,this.isMatch&&!this.isDisable&&this.matchFilter(),this.isExclude&&!this.isDisable&&this.excludeFilter()},setChartData(t){t=this.sortData(t),this.removeChartData();let e=this.chartData.labels;for(let n=0;n<t.length;n++)e.push(t[n].key),this.chart_dta.push(t[n].count);this.chartData.datasets[0].data=this.chart_dta},highlightChart(){var t=this.chartData.datasets[0].data;this.chartLines=this.chartData.datasets[0],this.chartData.datasets[0].backgroundColor=[];for(let e=0;e<=t.length;e++)t[e]>=this.min&&t[e]<=this.max?this.chartData.datasets[0].backgroundColor.push("#5ea9e5"):this.chartData.datasets[0].backgroundColor.push("#e0e0e0")},updateBarChart(t){const{minValue:e,maxValue:n}=t;this.BarMinValue=e,this.BarMaxValue=n;var i=this.chartData.datasets[0].data;this.min=i[this.BarMinValue]?i[this.BarMinValue]:"1",this.max=i[this.BarMaxValue]?i[this.BarMaxValue]:this.max,this.isMatch&&!this.isDisable&&this.matchFilter(),this.isExclude&&!this.isDisable&&this.excludeFilter()},toggleFilter(){this.activeFilter=!this.activeFilter},removeChartData(){this.chartData.labels=[],this.chartData.datasets[0].data=[],this.chart_dta=[]},sortData(t){return t.slice().sort(function(e,n){return e.count-n.count})},maxNumber(t){if(t.length!=0)return t.reduce((e,n)=>e=e>n.count?e:n.count,0)},getLastIndex(t){let e=this.chartData.datasets[0].data,n=0;for(let i=t;i>=0;i--)if(e.lastIndexOf(i)!==-1){n=e.lastIndexOf(i);break}else continue;return n},getFirstIndex(t){let e=this.chartData.datasets[0].data,n=0;for(let i=t;i<=this.max;i++)if(e.lastIndexOf(i)!==-1){n=e.lastIndexOf(i);break}else continue;return n}}}),ML={class:"dh-range-container"},lL={class:"bar-chart"},uL={key:0,class:"input-group-section"},cL={class:"input-group sb-input"},gL=["disabled","max","value"],NL={class:"input-group sb-input"},yL=["disabled","max","min","value"];function jL(t,e,n,i,a,r){const s=o.resolveComponent("Bar"),M=o.resolveComponent("MultiRangeSlider"),l=o.resolveComponent("dh-advanced-filter");return o.openBlock(),o.createElementBlock("div",ML,[o.createElementVNode("div",lL,[o.createVNode(s,{"chart-data":t.chartData,"chart-id":t.chartId,"chart-options":t.chartOptions,"dataset-id-key":t.datasetIdKey,height:t.height,width:t.width},null,8,["chart-data","chart-id","chart-options","dataset-id-key","height","width"]),o.createVNode(M,{"base-class-name":`multi-range-slider range-slider ${t.isDisable}`,label:!0,labels:t.labels,max:t.rangeMax,"max-caption":`${t.max}`,"max-value":t.BarMaxValue,min:1,"min-caption":`${t.min}`,"min-value":t.BarMinValue,"range-margin":0,ruler:!1,step:t.steps,onInput:t.updateBarChart},null,8,["base-class-name","labels","max","max-caption","max-value","min-caption","min-value","step","onInput"])]),t.includeForm?(o.openBlock(),o.createElementBlock("div",uL,[o.createElementVNode("div",cL,[o.createElementVNode("label",{class:o.normalizeClass(`dh-body-2 input-to ${t.validated?"disable":""}`)}," From ",2),o.createElementVNode("input",{class:"form-input text",disabled:!!t.validated,max:`${t.max}`,min:"1",placeholder:"From",type:"number",value:`${t.min}`,onInput:e[0]||(e[0]=u=>t.changeMin(u))},null,40,gL)]),o.createElementVNode("div",NL,[o.createElementVNode("label",{class:o.normalizeClass(`dh-body-2 input-to ${t.validated?"disable":""}`)}," To ",2),o.createElementVNode("input",{class:"form-input text",disabled:!!t.validated,max:`${t.maxNumber(t.numberRange)}`,min:`${t.min}`,placeholder:"To",type:"number",value:`${t.max}`,onInput:e[1]||(e[1]=u=>t.changeMax(u))},null,40,yL)])])):o.createCommentVNode("",!0),o.renderSlot(t.$slots,"input"),o.createVNode(l,{onExclude:t.excludeFilter,onFilter_missing:t.missingFilter,onMatch:t.matchFilter},{default:o.withCtx(()=>[o.renderSlot(t.$slots,"filter")]),_:3},8,["onExclude","onFilter_missing","onMatch"])])}var Wg=Ze(sL,[["render",jL]]),iS="",aS="";const dL={id:"dp-container"},IL=o.createElementVNode("div",{class:"dp__calendar_range"},[o.createElementVNode("p",null,"From"),o.createElementVNode("p",null,"To")],-1),DL={class:"dp__multi"},fL=["value"],hL=["value"],mL=o.createTextVNode(" Back "),zL=["onClick"],AL=["onClick"],TL=["onClick"],pL=["onClick"],LL=["onClick"],xL=["onClick"],OL=["onClick"],SL=["onClick"],EL=o.createElementVNode("div",{id:"tags",class:"dp__calendar_tags"},null,-1),CL={__name:"AdvancedDatePicker",props:{numberRange:{type:Array,required:!0}},emits:["update"],setup(t,{emit:e}){const n=o.ref(["",""]),i=o.ref(null),a=o.ref(null),r=o.ref(null),s=o.ref(!1),M=o.ref([{label:"Today",range:[new Date,new Date],slot:"today"},{label:"Previous week",range:[ou(ru(new Date)),ru(new Date)],slot:"previousWeek"},{label:"This week",range:[ou(new Date),_D(new Date)],slot:"week"},{label:"Next week",range:[YD(new Date),vD(new Date().setDate(new Date().getDate()+7))],slot:"nextWeek"},{label:"This month",range:[ci(new Date),ui(new Date)],slot:"currentMonth"},{label:"Previous month",range:[ci(tt(new Date,1)),ui(tt(new Date,1))],slot:"previousMonth"},{label:"Last 3 months",range:[ci(tt(new Date,3)),ui(tt(new Date,1))],slot:"threeMonths"},{label:"Last 6 months",range:[ci(tt(new Date,6)),ui(tt(new Date,1))],slot:"sixMonths"},{label:"Last year",range:[rN(new Date),aN(new Date)],slot:"yearly"}]),l=y=>{n.value=y,console.log(n.value),e("update",n.value)};function u(y){a.value=y.target.value,n.value=[y.target.value,i.value]}function c(y){i.value=y.target.value,n.value=[a.value,y.target.value]}o.onMounted(()=>{r.value.openMenu()});function g(){r.value.openMenu()}return(y,j)=>(o.openBlock(),o.createElementBlock("div",dL,[IL,o.createVNode(o.unref(Pa),{ref_key:"datePicker",ref:r,modelValue:n.value,"onUpdate:modelValue":[j[2]||(j[2]=d=>n.value=d),l],"auto-apply":"","day-names":["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],"enable-time-picker":!1,"model-type":"dd/MM/yyyy","multi-calendars":"","multi-calendars-solo":"","multi-static":!1,offset:12,position:"left","preset-ranges":M.value,range:"","select-text":"Apply","text-input":"",uid:"advanced",onClosed:g},{"dp-input":o.withCtx(()=>[o.createElementVNode("div",DL,[o.createElementVNode("input",{class:"dp__input dp__multi_input",placeholder:"MM/DD/YYYY",type:"text",value:a.value?a.value:n.value[0],onInput:j[0]||(j[0]=d=>u(d))},null,40,fL),o.createElementVNode("input",{class:"dp__input dp__multi_input",placeholder:"MM/DD/YYYY",type:"text",value:i.value?i.value:n.value[1],onInput:j[1]||(j[1]=d=>c(d))},null,40,hL)])]),"arrow-left":o.withCtx(()=>[o.createVNode(ue,{"icon-name":"previous",size:20})]),"arrow-right":o.withCtx(()=>[o.createVNode(ue,{"icon-name":"next",size:20})]),"calendar-icon":o.withCtx(()=>[mL]),"clear-icon":o.withCtx(()=>[]),"action-preview":o.withCtx(()=>[]),"action-select":o.withCtx(()=>[]),previousWeek:o.withCtx(({label:d,range:D,presetDateRange:f})=>[(o.openBlock(),o.createBlock(o.Teleport,{to:"#tags"},[o.createElementVNode("span",{onClick:N=>f(D)},o.toDisplayString(d),9,zL)]))]),week:o.withCtx(({label:d,range:D,presetDateRange:f})=>[(o.openBlock(),o.createBlock(o.Teleport,{to:"#tags"},[o.createElementVNode("span",{onClick:N=>f(D)},o.toDisplayString(d),9,AL)]))]),nextWeek:o.withCtx(({label:d,range:D,presetDateRange:f})=>[(o.openBlock(),o.createBlock(o.Teleport,{to:"#tags"},[o.createElementVNode("span",{onClick:N=>f(D)},o.toDisplayString(d),9,TL)]))]),currentMonth:o.withCtx(({label:d,range:D,presetDateRange:f})=>[(o.openBlock(),o.createBlock(o.Teleport,{to:"#tags"},[o.createElementVNode("span",{onClick:N=>f(D)},o.toDisplayString(d),9,pL)]))]),previousMonth:o.withCtx(({label:d,range:D,presetDateRange:f})=>[(o.openBlock(),o.createBlock(o.Teleport,{to:"#tags"},[o.createElementVNode("span",{onClick:N=>f(D)},o.toDisplayString(d),9,LL)]))]),threeMonths:o.withCtx(({label:d,range:D,presetDateRange:f})=>[(o.openBlock(),o.createBlock(o.Teleport,{to:"#tags"},[o.createElementVNode("span",{onClick:N=>f(D)},o.toDisplayString(d),9,xL)]))]),sixMonths:o.withCtx(({label:d,range:D,presetDateRange:f})=>[(o.openBlock(),o.createBlock(o.Teleport,{to:"#tags"},[o.createElementVNode("span",{onClick:N=>f(D)},o.toDisplayString(d),9,OL)]))]),yearly:o.withCtx(({label:d,range:D,presetDateRange:f})=>[(o.openBlock(),o.createBlock(o.Teleport,{to:"#tags"},[o.createElementVNode("span",{onClick:N=>f(D)},o.toDisplayString(d),9,SL)]))]),_:1},8,["modelValue","preset-ranges"]),o.createVNode(Wg,{class:"dp__calendar_range_number","number-range":t.numberRange,steps:1},{input:o.withCtx(()=>[EL]),filter:o.withCtx(()=>[o.createVNode(Ru,{data:s.value,label:"Include time",onChange:j[3]||(j[3]=d=>s.value=d)},null,8,["data"])]),_:1},8,["number-range"])]))}},bL=o.defineComponent({props:{target:{type:String,required:!0},trigger:{type:String,required:!0},placement:{type:Object,default:()=>({placement:"bottom"}),required:!1},tooltipText:{type:String,required:!0}},data(){return{show:!1}},methods:{showTooltip(){this.show=!this.show},tooltip(){let t=this.$refs.main,e=this.$refs[this.target];["right","left"].includes(this.placement)&&(e.style.top=-(((e==null?void 0:e.offsetHeight)-(t==null?void 0:t.offsetHeight))/2)+"px")}}}),wL=["placement","target","tooltipText","trigger"],kL=["id"],QL={class:"text"};function _L(t,e,n,i,a,r){return o.openBlock(),o.createElementBlock("div",{id:"main-contain",ref:"main",class:"dh-tooltip-container tooltip",placement:t.placement,target:t.target,tooltipText:t.tooltipText,trigger:t.trigger,onClick:e[0]||(e[0]=s=>t.trigger=="click"?t.showTooltip():null),onMouseover:e[1]||(e[1]=s=>t.tooltip())},[o.renderSlot(t.$slots,"default"),o.createElementVNode("div",{id:t.target,ref:t.target,class:o.normalizeClass(`tooltiptext ${t.show}`)},[o.createElementVNode("span",QL,o.toDisplayString(t.tooltipText),1)],10,kL)],40,wL)}var $g=Ze(bL,[["render",_L]]),rS="";const vL={class:"copy__text"},YL={__name:"Copiable",props:{text:{type:String,required:!0},placement:{type:String,default:"bottom"}},setup(t){const e=o.ref("copy text");function n(i){navigator.clipboard.writeText(i),e.value="copied !"}return(i,a)=>(o.openBlock(),o.createElementBlock("span",vL,[o.createTextVNode(o.toDisplayString(t.text)+" ",1),o.createVNode($g,{placement:t.placement,target:"tooltiptext","tooltip-text":e.value,trigger:"hover",onClick:a[0]||(a[0]=r=>n(t.text))},{default:o.withCtx(()=>[o.createVNode(ue,{class:"copy__text_icon","icon-name":"copy",size:"18"})]),_:1},8,["placement","tooltip-text"])]))}};var oS="";const UL=o.createTextVNode(" Back "),PL=o.createElementVNode("div",null,"today",-1),BL={__name:"DatePicker",props:{inline:{type:Boolean,default:!0}},emits:["update"],setup(t,{emit:e}){const n=o.ref(),i=o.ref(null),a=s=>{n.value=s,e("update",n.value)},r=o.ref([{date:xt(new Date,0),type:"dot",tooltip:[{text:"Dot with tooltip",color:"blue"}]}]);return(s,M)=>(o.openBlock(),o.createElementBlock("div",null,[o.createVNode(o.unref(Pa),{ref_key:"datePicker",ref:i,modelValue:n.value,"onUpdate:modelValue":[M[0]||(M[0]=l=>n.value=l),a],"day-names":["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],"enable-time-picker":!1,inline:t.inline,markers:r.value,"month-name-format":"short",offset:12,placeholder:"MM/DD/YYYY","select-text":"Apply","text-input":"",uid:"base"},{"arrow-left":o.withCtx(()=>[o.createVNode(ue,{"icon-name":"previous",size:20})]),"arrow-right":o.withCtx(()=>[o.createVNode(ue,{"icon-name":"next",size:20})]),"calendar-icon":o.withCtx(()=>[UL]),"clear-icon":o.withCtx(()=>[]),"action-preview":o.withCtx(()=>[]),"marker-tooltip":o.withCtx(()=>[PL]),_:1},8,["modelValue","inline","markers"])]))}};var sS="";const RL=["src"],ZL={key:3,class:"menu-item-text-wrapper"};var Hg=Ze(o.defineComponent({__name:"DropdownMenuItem",props:{item:{type:Object,required:!0},textEllipsisStyle:{type:String,required:!1,default:"none",validator:t=>["none","ellipsis","fit-content"].includes(t)},iconSize:{type:Number,required:!1,default:24}},setup(t){const e=t;return(n,i)=>(o.openBlock(),o.createElementBlock(o.Fragment,null,[t.item.iconUrl?(o.openBlock(),o.createElementBlock("img",{key:0,alt:"icon image",class:"icon icon-url",src:t.item.iconUrl},null,8,RL)):o.createCommentVNode("",!0),t.item.iconUrl?o.createCommentVNode("",!0):(o.openBlock(),o.createBlock(ue,o.mergeProps({key:1,class:"icon"},{...t.item,size:e.iconSize}),null,16)),t.item.subText?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock("span",{key:2,class:o.normalizeClass(["dh-body-2",t.textEllipsisStyle])},o.toDisplayString(t.item.text),3)),t.item.subText?(o.openBlock(),o.createElementBlock("div",ZL,[o.createElementVNode("span",{class:o.normalizeClass(["dh-body-1",t.textEllipsisStyle])},o.toDisplayString(t.item.text),3),o.createElementVNode("span",{class:o.normalizeClass(["dh-body-4-medium",t.textEllipsisStyle])},o.toDisplayString(t.item.subText),3)])):o.createCommentVNode("",!0),t.item.isSelected?(o.openBlock(),o.createBlock(ue,{key:4,class:"icon-blue icon-accept","icon-name":"accept",size:16})):o.createCommentVNode("",!0)],64))}}),[["__scopeId","data-v-35071082"]]),lS="";const VL=["data-e2e","onClick"],GL=["onClick"];var WL=Ze(o.defineComponent({__name:"DropdownMenu",props:{items:{type:Object,required:!0},textEllipsisStyle:{type:String,required:!1,default:"none",validator:t=>["none","ellipsis","fit-content"].includes(t)},iconSize:{type:Number,required:!1,default:24},closeOnClickOutside:{type:Boolean,required:!1,default:!0},zIndex:{type:Number,required:!1,default:100},closeOnItemSelected:{type:Boolean,required:!1,default:!0}},emits:["itemSelected","close"],setup(t,{emit:e}){const n=t;o.onMounted(()=>{document.addEventListener("click",r=>{i(r)})});function i(r){const s=r.target,M=document.querySelector("[data-id='dropdown-menu']");M&&!M.contains(r.target)&&!s.classList.contains("dropdown-toggle")&&n.closeOnClickOutside&&e("close")}function a(r){e("itemSelected",r),n.closeOnItemSelected&&e("close")}return(r,s)=>{const M=o.resolveComponent("router-link");return o.openBlock(),o.createElementBlock("div",{class:"dropdown-menu","data-id":"dropdown-menu",style:o.normalizeStyle({"z-index":n.zIndex})},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(t.items,l=>(o.openBlock(),o.createElementBlock("div",{key:l.iconName,class:"menu-item","data-e2e":l.dataE2eTag,onClick:u=>a(l)},[l.url?(o.openBlock(),o.createBlock(M,{key:0,class:"center-vertical",to:{path:l.url},onClick:u=>a(l)},{default:o.withCtx(()=>[o.createVNode(Hg,{"icon-size":t.iconSize,item:l,"text-ellipsis-style":t.textEllipsisStyle},null,8,["icon-size","item","text-ellipsis-style"])]),_:2},1032,["to","onClick"])):(o.openBlock(),o.createElementBlock("div",{key:1,class:"center-vertical",onClick:u=>a(l)},[o.createVNode(Hg,{"icon-size":t.iconSize,item:l,"text-ellipsis-style":t.textEllipsisStyle},null,8,["icon-size","item","text-ellipsis-style"])],8,GL))],8,VL))),128))],4)}}}),[["__scopeId","data-v-0c809d82"]]),cS="";const $L={key:0,class:"invalid-feedback"},HL=o.defineComponent({__name:"Error",props:{errors:{type:Object,required:!1,default:void 0}},setup(t){const e=t;return(n,i)=>{var a;return o.unref(e).errors&&((a=o.unref(e).errors)==null?void 0:a.length)>0?(o.openBlock(),o.createElementBlock("div",$L,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(t.errors,r=>(o.openBlock(),o.createElementBlock("span",{key:r},o.toDisplayString(r),1))),128))])):o.createCommentVNode("",!0)}}}),FL=o.defineComponent({components:{DhIcon:ue},props:{title:{type:String,default:"Advanced"},isAdvancedSettingsOpen:{type:Boolean,default:!1}},data(){return{isAdvancedSettingsCurrentlyOpen:!1}},watch:{isAdvancedSettingsOpen:function(t){this.isAdvancedSettingsCurrentlyOpen=t}},mounted(){this.isAdvancedSettingsCurrentlyOpen=this.isAdvancedSettingsOpen}}),JL={class:"dh-body-1-medium"},XL=o.createTextVNode(" Content ");function KL(t,e,n,i,a,r){const s=o.resolveComponent("dh-icon");return o.openBlock(),o.createElementBlock(o.Fragment,null,[o.createElementVNode("div",{class:o.normalizeClass(["advanced-panel-header clickable",{opened:t.isAdvancedSettingsCurrentlyOpen,closed:!t.isAdvancedSettingsCurrentlyOpen}]),"data-e2e":"expansion-panel-button",onClick:e[0]||(e[0]=M=>t.isAdvancedSettingsCurrentlyOpen=!t.isAdvancedSettingsCurrentlyOpen)},[o.createElementVNode("h4",JL,o.toDisplayString(t.title),1),o.createVNode(s,{class:"icon","icon-name":t.isAdvancedSettingsCurrentlyOpen?"arrow-up":"arrow-down",size:24},null,8,["icon-name"])],2),t.isAdvancedSettingsCurrentlyOpen?o.renderSlot(t.$slots,"content",{key:0},()=>[XL]):o.createCommentVNode("",!0)],64)}var qL=Ze(FL,[["render",KL]]),gS="";const ex=o.createElementVNode("label",{for:"upload_pdf"},[o.createTextVNode(" Drag and drop file or "),o.createElementVNode("span",{id:"upload"},"browse")],-1),tx={key:1,class:"file__upload_items"},nx={class:"file__upload_list_item"},ix={class:"file__upload_list_item_label"},ax=["title"],rx={key:0,class:"label__antivirus"},ox={key:1,class:"label__antivirus label__antivirus--failed"},sx={key:2,class:"label__antivirus label__antivirus--detected"},Mx=o.createElementVNode("br",null,null,-1),lx={key:3},ux={key:4},cx={key:0},gx=["value"],Nx=["href"],yx={key:2,class:"file__upload_placeholder"},jx={key:3,class:"file__upload_action"},dx=o.createElementVNode("button",{class:"file__upload_action_cancel"},"Cancel",-1),Ix={__name:"FileUpload",props:{uploadProgress:{type:Array,required:!0},modelValue:{type:FileList,required:!1,default:void 0},inline:{type:Boolean,required:!1,default:!1},errorOccurred:{type:Array,required:!0},errorMessage:{type:String,required:!1,default:"an error occurred while uploading"},fileSaved:{type:Boolean,default:!1},virusCheck:{type:Array,required:!0},virusCheckText:{type:String,required:!1,default:"Antivirus check ..."},virusCheckFailedText:{type:String,required:!1,default:"Antivirus check failed"},virusDetectedText:{type:String,required:!1,default:"Virus detected"},deleteConfirmationText:{type:String,required:!1,default:"Are you sure you want to delete it permanently? this action will be irreversible"},zIndex:{type:Number,required:!1,default:99}},emits:["update:modelValue","save:modelValue","reload"],setup(t,{emit:e}){const n=t,i=o.ref(null),a=o.ref(!1),r=o.ref([]),s=o.ref([".pdf",".csv",".doc",".jpeg",".mp4",".png",".txt",".xls"]);function M(z,T=2){if(!+z)return"0 Bytes";const m=1024,A=T<0?0:T,w=["Bytes","KB","MB","GB","TB","PB","EB","ZB","YB"],Q=Math.floor(Math.log(z)/Math.log(m));return`${parseFloat((z/Math.pow(m,Q)).toFixed(A))} ${w[Q]}`}function l(z){return s.value.includes(c(z))?c(z).slice(1):"unknown"}function u(z){const T=z.lastIndexOf(".");let m=z.slice(0,T);return m.length<=15?m:m.slice(0,15)+"... "}function c(z){return z.replace(/.*(?=\.)/g,"")}function g(z){z.stopPropagation(),r.value=i.value.files,r.value&&(a.value=!0),e("update:modelValue",r.value)}function y(z){z.stopPropagation(),z.dataTransfer.dropEffect="copy"}function j(z){z.stopPropagation(),a.value=!0,r.value=z.dataTransfer.files,e("update:modelValue",r.value)}function d(z){window.confirm(n.deleteConfirmationText)&&D(z)}function D(z){const T=new DataTransfer;for(let m=0;m<r.value.length;m++){const A=r.value[m];z!==m&&T.items.add(A)}r.value=T.files,r.value.length==0&&(a.value=!1)}function f(){e("save:modelValue",r.value)}function N(z){return URL.createObjectURL(z)}function I(z){z.preventDefault(),e("reload")}return(z,T)=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(["file__upload",t.inline?"":"file__upload_box"])},[t.fileSaved?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock("div",{key:0,class:"file__upload_btn",onDragover:T[1]||(T[1]=o.withModifiers(m=>y(m),["prevent"])),onDrop:T[2]||(T[2]=o.withModifiers(m=>j(m),["prevent"]))},[o.createVNode(ue,{class:"file__upload_btn_icon","icon-name":"upload",size:24}),ex,o.createElementVNode("input",{id:"upload_pdf",ref_key:"upload",ref:i,multiple:"",name:"file",type:"file",onInput:T[0]||(T[0]=m=>g(m))},null,544)],32)),a.value?(o.openBlock(),o.createElementBlock("div",tx,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(r.value,(m,A)=>(o.openBlock(),o.createElementBlock("div",{key:A,class:o.normalizeClass(["file__upload_list",t.inline?"":"file__upload_list_box"])},[o.createVNode(ue,{class:o.normalizeClass(t.errorOccurred[A]?"file__upload_list_icon":""),"icon-name":"file-"+l(m.name),size:40},null,8,["class","icon-name"]),n.uploadProgress[A]==100&&t.fileSaved&&!t.errorOccurred[A]&&t.virusCheck[A]=="loading"?(o.openBlock(),o.createBlock(ue,{key:0,class:"file__upload_list_icon_sub file__upload_list_icon_sub--loading","icon-name":"states",size:20,style:o.normalizeStyle({"z-index":n.zIndex})},null,8,["style"])):o.createCommentVNode("",!0),n.uploadProgress[A]==100&&t.fileSaved&&t.virusCheck[A]=="failed"?(o.openBlock(),o.createBlock(ue,{key:1,class:"file__upload_list_icon_sub","icon-name":"warning",size:20,style:o.normalizeStyle({"z-index":n.zIndex})},null,8,["style"])):o.createCommentVNode("",!0),n.uploadProgress[A]==100&&t.fileSaved&&t.virusCheck[A]=="detected"?(o.openBlock(),o.createBlock(ue,{key:2,class:"file__upload_list_icon_sub","icon-name":"danger",size:20,style:o.normalizeStyle({"z-index":n.zIndex})},null,8,["style"])):o.createCommentVNode("",!0),t.fileSaved&&t.errorOccurred[A]?(o.openBlock(),o.createBlock(ue,{key:3,class:"file__upload_list_icon_sub","icon-name":"error",size:20,style:o.normalizeStyle({"z-index":n.zIndex})},null,8,["style"])):o.createCommentVNode("",!0),o.createElementVNode("div",nx,[o.createElementVNode("div",ix,[o.createElementVNode("div",null,[o.createElementVNode("span",{title:m.name},o.toDisplayString(u(m.name))+o.toDisplayString(c(m.name)),9,ax),n.uploadProgress[A]==100&&t.fileSaved&&!t.errorOccurred[A]&&t.virusCheck[A]=="loading"?(o.openBlock(),o.createElementBlock("span",rx,[o.createTextVNode(o.toDisplayString(t.virusCheckText)+" ",1),o.createVNode(ue,{class:"file__upload_list_icon_sub--loading","icon-name":"processing",size:18})])):o.createCommentVNode("",!0),n.uploadProgress[A]==100&&t.fileSaved&&t.virusCheck[A]=="failed"?(o.openBlock(),o.createElementBlock("span",ox,o.toDisplayString(t.virusCheckFailedText),1)):o.createCommentVNode("",!0),n.uploadProgress[A]==100&&t.fileSaved&&t.virusCheck[A]=="detected"?(o.openBlock(),o.createElementBlock("span",sx,o.toDisplayString(t.virusDetectedText),1)):o.createCommentVNode("",!0),Mx,t.fileSaved&&!t.errorOccurred[A]||!t.errorOccurred[A]&&t.virusCheck[A]?(o.openBlock(),o.createElementBlock("span",lx,o.toDisplayString(M(m.size)),1)):o.createCommentVNode("",!0),t.fileSaved&&t.errorOccurred[A]?(o.openBlock(),o.createElementBlock("span",ux,o.toDisplayString(t.errorMessage),1)):o.createCommentVNode("",!0)]),t.fileSaved?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock("span",cx,o.toDisplayString(n.uploadProgress[A])+"%",1))]),t.fileSaved?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock("progress",{key:0,id:"file",max:"100",value:n.uploadProgress[A]},o.toDisplayString(n.uploadProgress[A])+"% ",9,gx))]),t.fileSaved&&!t.virusCheck[A]&&!t.errorOccurred[A]?(o.openBlock(),o.createElementBlock("a",{key:4,class:"file__upload_list_download",download:"",href:N(m)},[o.createVNode(ue,{class:"file__upload_list_download_icon","icon-name":"download",size:24})],8,Nx)):o.createCommentVNode("",!0),t.fileSaved&&t.errorOccurred[A]?(o.openBlock(),o.createElementBlock("a",{key:5,class:"file__upload_list_retry",onClick:T[3]||(T[3]=w=>I(w))},[o.createVNode(ue,{class:"file__upload_list_retry_icon","icon-name":"retry",size:24})])):o.createCommentVNode("",!0),n.uploadProgress[A]!==100?(o.openBlock(),o.createBlock(ue,{key:6,class:"file__upload_list_delete","icon-name":"close",size:24,onClick:w=>D(A)},null,8,["onClick"])):(o.openBlock(),o.createBlock(ue,{key:7,class:"file__upload_list_delete","icon-name":"delete",size:24,onClick:w=>d(A)},null,8,["onClick"]))],2))),128))])):o.createCommentVNode("",!0),!a.value&&!t.inline?(o.openBlock(),o.createElementBlock("div",yx," No file selected ")):o.createCommentVNode("",!0),!t.inline&&!t.fileSaved?(o.openBlock(),o.createElementBlock("div",jx,[dx,o.createElementVNode("button",{class:o.normalizeClass(["file__upload_action_done",a.value&&!t.fileSaved?"file__upload_action_done--active":""]),onClick:f}," Done ",2)])):o.createCommentVNode("",!0)],2))}};var NS="";const Dx={class:"input__dropdown"},fx={class:"input__dropdown_second"},hx=["tabindex"],mx=["onClick"],zx=["onClick"],Ax={__name:"InputDropdown",props:{list:{type:Array,required:!0},labelProp:{type:String,default:"label"},icon:{type:String,required:!0},placeholder:{type:String,default:"select from menu"},tabindex:{type:Number,required:!1,default:0}},emits:["update"],setup(t,{emit:e}){const n=t,i=o.ref(n.placeholder),a=o.ref(!1),r=o.ref(null);o.onMounted(()=>{e("update","",i.value)});function s(){e("update",r.value.value,i.value)}return(M,l)=>(o.openBlock(),o.createElementBlock("div",Dx,[o.createElementVNode("input",{ref_key:"name",ref:r,class:"input__dropdown_text",type:"text",onInput:s},null,544),o.createElementVNode("div",fx,[o.createVNode(ue,{"icon-name":t.icon,size:18},null,8,["icon-name"]),o.createElementVNode("div",{class:"custom__select",tabindex:t.tabindex,onBlur:l[1]||(l[1]=u=>a.value=!1)},[o.createElementVNode("div",{class:o.normalizeClass(["custom__select_selected",{"custom__select--open":a.value}]),onClick:l[0]||(l[0]=u=>a.value=!a.value)},o.toDisplayString(i.value),3),typeof t.list[0]=="object"?(o.openBlock(),o.createElementBlock("div",{key:0,class:o.normalizeClass(["custom__select_items",{"custom__select--hide":!a.value}])},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(t.list,(u,c)=>(o.openBlock(),o.createElementBlock("div",{key:c,onClick:g=>{i.value=u[t.labelProp],a.value=!1,s()}},o.toDisplayString(u[t.labelProp]),9,mx))),128))],2)):o.createCommentVNode("",!0),typeof t.list[0]=="string"?(o.openBlock(),o.createElementBlock("div",{key:1,class:o.normalizeClass(["custom__select_items",{"custom__select--hide":!a.value}])},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(t.list,(u,c)=>(o.openBlock(),o.createElementBlock("div",{key:c,onClick:g=>{i.value=u,a.value=!1,s()}},o.toDisplayString(u),9,zx))),128))],2)):o.createCommentVNode("",!0)],40,hx)])]))}};var yS="";const Tx={class:"input__group"},px=["type"],Lx={__name:"InputGroup",props:{inputType:{type:String,default:"text"},iconName:{type:String,required:!0},widthProp:{type:String,default:"200px"},direction:{type:String,default:"right"}},setup(t){const e=t;o.useCssVars(i=>({"14ee876f":n.value,"0aeebdb8":t.widthProp}));const n=o.ref("row");return o.onMounted(()=>{e.direction=="left"&&(n.value="row-reverse")}),(i,a)=>(o.openBlock(),o.createElementBlock("div",Tx,[o.createElementVNode("input",{class:"input__group_field",type:t.inputType},null,8,px),o.createVNode(ue,{class:"input__group_icon","icon-name":t.iconName},null,8,["icon-name"])]))}};var xx="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABoAAAAaCAYAAACpSkzOAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAR2SURBVHgBlVVdaFtlGH6+LydJ89OYtHVbf+YyhoPK5uK2G3/oIlTYhRctKApebAiCXowtDLzxIi3sUqnBiiBerF6osGl7J0idqWyD4WSZF3PzZ4tt7Y/NmnRN0yYn5/t8z9e0Ne35Wnwg5Jzzvt/7vO/7vT8MO6BnYDEuPP4TXMi4kIgyxqOrElEAZEZKZLhVHhpJBDPb2WE6wcsDZtwwXEkJGd9G7T9WRJqZ+f6RxONprUp9BDIs3CLJJM7tSLAJkg5xIT6EVSTCSEFLdPKT5ai36hqWzBVj8v+R1IFVM8y0ekcSvuwWop6BfFgaoR8kY0RSf04qRUriSh6l/AzcDY3wRtpgmWUSUhSewFYuITMFwV9MJ5iKzFgTCHfITtcWEhvW/H38NfYpViZ+UZ7Jmn920B3dZxDuPLnljOQsFmYiSY8J+53Xook734nE4v1r+P2rBMoTt1VUqzRC/ThFU85P2m7CCYKxc3bVrhNZRjDpdPHmoxnMXBmErFbgDIncza+RuzGE1QTXQ1k0fElF9OpAJcaZK+5kZuHuKCqlAraDbWzmxmWUJm5pXEH89Y8W49w0cNrBGYWlqTvbFvjTna1oigQoLQKP/ryq0eIooSFOxcCP6AxJaWkkDAEfw/uJ52GaJt658D1yhSmdGdJmJ+iOZEyrQaFeOPss9u3xKXUVHlXN8UO78U2qFx0tbuxv9eOzZDepCr0ZGlsGdUFYR3L04C50H4ugt2s/HkwXsVgqoyXUgLbdQeITtgFFEPK58VR7iFKk81dEuU7m5yWkXmtEo98Ao0jeS12FWeVo3+WnZhT48edJvNl3RTkU8nN8fKoJAWNJE5HdsJJl6SG6WVZhbsyZfuxVlSLwwbtd2NMcUM/2wReOP4Enoy2rVuhbQTRhpep25pGiwBmvZJ2EVcuD8/fewGwloIy1NftUdUlqUkn7glPKWpsblO7flTDO330FFjyORKSd4bBcY9CCYboUXFe3S9UmYmuvNeTJGRrEziTM1q/eJieLaWhAnuDbiQO12cZgLa0Ay1UI+7eyUfqjMwehWymMHHNXqxc57Y003W5aR3YrfwCXsp3KkCvgAfd7wX3073PRLAOGxztxbWqfrudtpC/R9uWrrGa/1KjS6MSXfxzFFxNdsJhXxUmOQbj8+Py35zB07xilh2kyAoom328/K6KRM740mUxtHoz2fRTmBKYfMMxXaP+wCMzcAsyHCyQLomRElayQs+y1tAVUAKnLtdW+3ke8avSRILNGZpPMjlsozlMBUI6u36Ebaz8M+OjiPUHwvc9g9KeyWkqLD13ITdpkG9OBPmcQNPrW3uti7hlYjkq3Z5iSH8vPEslCfSV1Ha7g1EucSt/Exe8krv/qrzMQeMxCUyu3d1WGutt5lW+QyXDZLPf9M26cldAODkfY99zSUU4FvL6+kdoK1xKt4dDbc3G3EUmSQhw7EDLqFSFZmvZtf2bQvm8HHeyA2FvFGPd6TlN0R0iZJj0Lq2NSZiWsLGNsjKOYvjlIbbIN/gUK8Nn86IrnuAAAAABJRU5ErkJggg==";function At(t){return[null,void 0].indexOf(t)!==-1}function Ox(t,e,n){const{object:i,valueProp:a,mode:r}=o.toRefs(t),s=o.getCurrentInstance().proxy,M=n.iv,l=g=>{M.value=c(g);const y=u(g);e.emit("change",y,s),e.emit("input",y),e.emit("update:modelValue",y)},u=g=>i.value||At(g)?g:Array.isArray(g)?g.map(y=>y[a.value]):g[a.value],c=g=>At(g)?r.value==="single"?{}:[]:g;return{update:l}}function Sx(t,e){const{value:n,modelValue:i,mode:a,valueProp:r}=o.toRefs(t),s=o.ref(a.value!=="single"?[]:{}),M=i&&i.value!==void 0?i:n,l=o.computed(()=>a.value==="single"?s.value[r.value]:s.value.map(c=>c[r.value])),u=o.computed(()=>a.value!=="single"?s.value.map(c=>c[r.value]).join(","):s.value[r.value]);return{iv:s,internalValue:s,ev:M,externalValue:M,textValue:u,plainValue:l}}function Ex(t,e,n){const{regex:i}=o.toRefs(t),a=o.getCurrentInstance().proxy,r=n.isOpen,s=n.open,M=o.ref(null),l=o.ref(null),u=()=>{M.value=""},c=j=>{M.value=j.target.value},g=j=>{if(i&&i.value){let d=i.value;typeof d=="string"&&(d=new RegExp(d)),j.key.match(d)||j.preventDefault()}},y=j=>{if(i&&i.value){let D=(j.clipboardData||window.clipboardData).getData("Text"),f=i.value;typeof f=="string"&&(f=new RegExp(f)),D.split("").every(N=>!!N.match(f))||j.preventDefault()}e.emit("paste",j,a)};return o.watch(M,j=>{!r.value&&j&&s(),e.emit("search-change",j,a)}),{search:M,input:l,clearSearch:u,handleSearchInput:c,handleKeypress:g,handlePaste:y}}function Cx(t,e,n){const{groupSelect:i,mode:a,groups:r,disabledProp:s}=o.toRefs(t),M=o.ref(null),l=c=>{c===void 0||c!==null&&c[s.value]||r.value&&c&&c.group&&(a.value==="single"||!i.value)||(M.value=c)};return{pointer:M,setPointer:l,clearPointer:()=>{l(null)}}}function Tr(t,e=!0){return e?String(t).toLowerCase().trim():String(t).normalize("NFD").replace(/\p{Diacritic}/gu,"").toLowerCase().trim()}function bx(t){return Object.prototype.toString.call(t)==="[object Object]"}function wx(t,e){const n=e.slice().sort();return t.length===e.length&&t.slice().sort().every(function(i,a){return i===n[a]})}function kx(t,e,n){const{options:i,mode:a,trackBy:r,limit:s,hideSelected:M,createTag:l,createOption:u,label:c,appendNewTag:g,appendNewOption:y,multipleLabel:j,object:d,loading:D,delay:f,resolveOnLoad:N,minChars:I,filterResults:z,clearOnSearch:T,clearOnSelect:m,valueProp:A,canDeselect:w,max:Q,strict:Y,closeOnSelect:B,groups:k,reverse:h,infinite:E,groupOptions:b,groupHideEmpty:p,groupSelect:_,onCreate:V,disabledProp:R,searchStart:F}=o.toRefs(t),$=o.getCurrentInstance().proxy,O=n.iv,P=n.ev,U=n.search,De=n.clearSearch,Z=n.update,q=n.pointer,ze=n.clearPointer,Ne=n.focus,re=n.deactivate,ce=n.close,Fe=o.ref([]),Ye=o.ref([]),_e=o.ref(!1),Ge=o.ref(null),C=o.ref(E.value&&s.value===-1?10:s.value),se=o.computed(()=>l.value||u.value||!1),he=o.computed(()=>g.value!==void 0?g.value:y.value!==void 0?y.value:!0),qe=o.computed(()=>{if(k.value){let x=Ye.value||[],W=[];return x.forEach(ae=>{yt(ae[b.value]).forEach(ke=>{W.push(Object.assign({},ke,ae[R.value]?{[R.value]:!0}:{}))})}),W}else{let x=yt(Ye.value||[]);return Fe.value.length&&(x=x.concat(Fe.value)),x}}),Tt=o.computed(()=>k.value?ie((Ye.value||[]).map((x,W)=>{const ae=yt(x[b.value]);return{...x,index:W,group:!0,[b.value]:Qt(ae,!1).map(ke=>Object.assign({},ke,x[R.value]?{[R.value]:!0}:{})),__VISIBLE__:Qt(ae).map(ke=>Object.assign({},ke,x[R.value]?{[R.value]:!0}:{}))}})):[]),pn=o.computed(()=>{let x=qe.value;return h.value&&(x=x.reverse()),ve.value.length&&(x=ve.value.concat(x)),Qt(x)}),pt=o.computed(()=>{let x=pn.value;return C.value>0&&(x=x.slice(0,C.value)),x}),L=o.computed(()=>{switch(a.value){case"single":return!At(O.value[A.value]);case"multiple":case"tags":return!At(O.value)&&O.value.length>0}}),v=o.computed(()=>j!==void 0&&j.value!==void 0?j.value(O.value,$):O.value&&O.value.length>1?`${O.value.length} options selected`:"1 option selected"),G=o.computed(()=>!qe.value.length&&!_e.value&&!ve.value.length),ne=o.computed(()=>qe.value.length>0&&pt.value.length==0&&(U.value&&k.value||!k.value)),ve=o.computed(()=>se.value===!1||!U.value?[]:ee(U.value)!==-1?[]:[{[A.value]:U.value,[c.value]:U.value,[Qe.value]:U.value,__CREATE__:!0}]),Qe=o.computed(()=>r.value||c.value),st=o.computed(()=>{switch(a.value){case"single":return null;case"multiple":case"tags":return[]}}),Ln=o.computed(()=>D.value||_e.value),Je=x=>{switch(typeof x!="object"&&(x=S(x)),a.value){case"single":Z(x);break;case"multiple":case"tags":Z(O.value.concat(x));break}e.emit("select",pr(x),x,$)},Ht=x=>{switch(typeof x!="object"&&(x=S(x)),a.value){case"single":xr();break;case"tags":case"multiple":Z(Array.isArray(x)?O.value.filter(W=>x.map(ae=>ae[A.value]).indexOf(W[A.value])===-1):O.value.filter(W=>W[A.value]!=x[A.value]));break}e.emit("deselect",pr(x),x,$)},pr=x=>d.value?x:x[A.value],Lr=x=>{Ht(x)},IM=(x,W)=>{if(W.button!==0){W.preventDefault();return}Lr(x)},xr=()=>{e.emit("clear",$),Z(st.value)},Lt=x=>{if(x.group!==void 0)return a.value==="single"?!1:hM(x[b.value])&&x[b.value].length;switch(a.value){case"single":return!At(O.value)&&O.value[A.value]==x[A.value];case"tags":case"multiple":return!At(O.value)&&O.value.map(W=>W[A.value]).indexOf(x[A.value])!==-1}},kt=x=>x[R.value]===!0,ai=()=>Q===void 0||Q.value===-1||!L.value&&Q.value>0?!1:O.value.length>=Q.value,DM=x=>{if(!kt(x)){if(V&&V.value&&!Lt(x)&&x.__CREATE__&&(x={...x},delete x.__CREATE__,x=V.value(x,$),x instanceof Promise)){_e.value=!0,x.then(W=>{_e.value=!1,Or(W)});return}Or(x)}},Or=x=>{switch(x.__CREATE__&&(x={...x},delete x.__CREATE__),a.value){case"single":if(x&&Lt(x)){w.value&&Ht(x);return}x&&un(x),m.value&&De(),B.value&&(ze(),ce()),x&&Je(x);break;case"multiple":if(x&&Lt(x)){Ht(x);return}if(ai())return;x&&(un(x),Je(x)),m.value&&De(),M.value&&ze(),B.value&&ce();break;case"tags":if(x&&Lt(x)){Ht(x);return}if(ai())return;x&&un(x),m.value&&De(),x&&Je(x),M.value&&ze(),B.value&&ce();break}B.value||Ne()},fM=x=>{if(!(kt(x)||a.value==="single"||!_.value)){switch(a.value){case"multiple":case"tags":xn(x[b.value])?Ht(x[b.value]):Je(x[b.value].filter(W=>O.value.map(ae=>ae[A.value]).indexOf(W[A.value])===-1).filter(W=>!W[R.value]).filter((W,ae)=>O.value.length+1+ae<=Q.value||Q.value===-1));break}B.value&&re()}},un=x=>{S(x[A.value])===void 0&&se.value&&(e.emit("tag",x[A.value],$),e.emit("option",x[A.value],$),he.value&&te(x),De())},Sr=()=>{a.value!=="single"&&Je(pt.value)},xn=x=>x.find(W=>!Lt(W)&&!W[R.value])===void 0,hM=x=>x.find(W=>!Lt(W))===void 0,S=x=>qe.value[qe.value.map(W=>String(W[A.value])).indexOf(String(x))],ee=(x,W=!0)=>qe.value.map(ae=>parseInt(ae[Qe.value])==ae[Qe.value]?parseInt(ae[Qe.value]):ae[Qe.value]).indexOf(parseInt(x)==x?parseInt(x):x),J=x=>["tags","multiple"].indexOf(a.value)!==-1&&M.value&&Lt(x),te=x=>{Fe.value.push(x)},ie=x=>p.value?x.filter(W=>U.value?W.__VISIBLE__.length:W[b.value].length):x.filter(W=>U.value?W.__VISIBLE__.length:!0),Qt=(x,W=!0)=>{let ae=x;return U.value&&z.value&&(ae=ae.filter(ke=>F.value?Tr(ke[Qe.value],Y.value).startsWith(Tr(U.value,Y.value)):Tr(ke[Qe.value],Y.value).indexOf(Tr(U.value,Y.value))!==-1)),M.value&&W&&(ae=ae.filter(ke=>!J(ke))),ae},yt=x=>{let W=x;return bx(W)&&(W=Object.keys(W).map(ae=>{let ke=W[ae];return{[A.value]:ae,[Qe.value]:ke,[c.value]:ke}})),W=W.map(ae=>typeof ae=="object"?ae:{[A.value]:ae,[Qe.value]:ae,[c.value]:ae}),W},cn=()=>{At(P.value)||(O.value=Cr(P.value))},gn=x=>(_e.value=!0,new Promise((W,ae)=>{i.value(U.value,$).then(ke=>{Ye.value=ke||[],typeof x=="function"&&x(ke),_e.value=!1}).catch(ke=>{console.error(ke),Ye.value=[],_e.value=!1}).finally(()=>{W()})})),On=()=>{if(!!L.value)if(a.value==="single"){let x=S(O.value[A.value]);if(x!==void 0){let W=x[c.value];O.value[c.value]=W,d.value&&(P.value[c.value]=W)}}else O.value.forEach((x,W)=>{let ae=S(O.value[W][A.value]);if(ae!==void 0){let ke=ae[c.value];O.value[W][c.value]=ke,d.value&&(P.value[W][c.value]=ke)}})},Er=x=>{gn(x)},Cr=x=>At(x)?a.value==="single"?{}:[]:d.value?x:a.value==="single"?S(x)||{}:x.filter(W=>!!S(W)).map(W=>S(W)),Jg=()=>{Ge.value=o.watch(U,x=>{x.length<I.value||!x&&I.value!==0||(_e.value=!0,T.value&&(Ye.value=[]),setTimeout(()=>{x==U.value&&i.value(U.value,$).then(W=>{(x==U.value||!U.value)&&(Ye.value=W,q.value=pt.value.filter(ae=>ae[R.value]!==!0)[0]||null,_e.value=!1)}).catch(W=>{console.error(W)})},f.value))},{flush:"sync"})};if(a.value!=="single"&&!At(P.value)&&!Array.isArray(P.value))throw new Error(`v-model must be an array when using "${a.value}" mode`);return i&&typeof i.value=="function"?N.value?gn(cn):d.value==!0&&cn():(Ye.value=i.value,cn()),f.value>-1&&Jg(),o.watch(f,(x,W)=>{Ge.value&&Ge.value(),x>=0&&Jg()}),o.watch(P,x=>{if(At(x)){O.value=Cr(x);return}switch(a.value){case"single":(d.value?x[A.value]!=O.value[A.value]:x!=O.value[A.value])&&(O.value=Cr(x));break;case"multiple":case"tags":wx(d.value?x.map(W=>W[A.value]):x,O.value.map(W=>W[A.value]))||(O.value=Cr(x));break}},{deep:!0}),o.watch(i,(x,W)=>{typeof t.options=="function"?N.value&&(!W||x&&x.toString()!==W.toString())&&gn():(Ye.value=t.options,Object.keys(O.value).length||cn(),On())}),o.watch(c,On),{pfo:pn,fo:pt,filteredOptions:pt,hasSelected:L,multipleLabelText:v,eo:qe,extendedOptions:qe,fg:Tt,filteredGroups:Tt,noOptions:G,noResults:ne,resolving:_e,busy:Ln,offset:C,select:Je,deselect:Ht,remove:Lr,selectAll:Sr,clear:xr,isSelected:Lt,isDisabled:kt,isMax:ai,getOption:S,handleOptionClick:DM,handleGroupClick:fM,handleTagRemove:IM,refreshOptions:Er,resolveOptions:gn,refreshLabels:On}}function Qx(t,e,n){const{valueProp:i,showOptions:a,searchable:r,groupLabel:s,groups:M,mode:l,groupSelect:u,disabledProp:c}=o.toRefs(t),g=n.fo,y=n.fg,j=n.handleOptionClick,d=n.handleGroupClick,D=n.search,f=n.pointer,N=n.setPointer,I=n.clearPointer,z=n.multiselect,T=n.isOpen,m=o.computed(()=>g.value.filter(Z=>!Z[c.value])),A=o.computed(()=>y.value.filter(Z=>!Z[c.value])),w=o.computed(()=>l.value!=="single"&&u.value),Q=o.computed(()=>f.value&&f.value.group),Y=o.computed(()=>U(f.value)),B=o.computed(()=>{const Z=Q.value?f.value:U(f.value),q=A.value.map(Ne=>Ne[s.value]).indexOf(Z[s.value]);let ze=A.value[q-1];return ze===void 0&&(ze=h.value),ze}),k=o.computed(()=>{let Z=A.value.map(q=>q.label).indexOf(Q.value?f.value[s.value]:U(f.value)[s.value])+1;return A.value.length<=Z&&(Z=0),A.value[Z]}),h=o.computed(()=>[...A.value].slice(-1)[0]),E=o.computed(()=>f.value.__VISIBLE__.filter(Z=>!Z[c.value])[0]),b=o.computed(()=>{const Z=Y.value.__VISIBLE__.filter(q=>!q[c.value]);return Z[Z.map(q=>q[i.value]).indexOf(f.value[i.value])-1]}),p=o.computed(()=>{const Z=U(f.value).__VISIBLE__.filter(q=>!q[c.value]);return Z[Z.map(q=>q[i.value]).indexOf(f.value[i.value])+1]}),_=o.computed(()=>[...B.value.__VISIBLE__.filter(Z=>!Z[c.value])].slice(-1)[0]),V=o.computed(()=>[...h.value.__VISIBLE__.filter(Z=>!Z[c.value])].slice(-1)[0]),R=Z=>!!f.value&&(!Z.group&&f.value[i.value]==Z[i.value]||Z.group!==void 0&&f.value[s.value]==Z[s.value])?!0:void 0,F=()=>{N(m.value[0]||null)},$=()=>{!f.value||f.value[c.value]===!0||(Q.value?d(f.value):j(f.value))},O=()=>{if(f.value===null)N((M.value&&w.value?A.value[0]:m.value[0])||null);else if(M.value&&w.value){let Z=Q.value?E.value:p.value;Z===void 0&&(Z=k.value),N(Z||null)}else{let Z=m.value.map(q=>q[i.value]).indexOf(f.value[i.value])+1;m.value.length<=Z&&(Z=0),N(m.value[Z]||null)}o.nextTick(()=>{De()})},P=()=>{if(f.value===null){let Z=m.value[m.value.length-1];M.value&&w.value&&(Z=V.value,Z===void 0&&(Z=h.value)),N(Z||null)}else if(M.value&&w.value){let Z=Q.value?_.value:b.value;Z===void 0&&(Z=Q.value?B.value:Y.value),N(Z||null)}else{let Z=m.value.map(q=>q[i.value]).indexOf(f.value[i.value])-1;Z<0&&(Z=m.value.length-1),N(m.value[Z]||null)}o.nextTick(()=>{De()})},U=Z=>A.value.find(q=>q.__VISIBLE__.map(ze=>ze[i.value]).indexOf(Z[i.value])!==-1),De=()=>{let Z=z.value.querySelector("[data-pointed]");if(!Z)return;let q=Z.parentElement.parentElement;M.value&&(q=Q.value?Z.parentElement.parentElement.parentElement:Z.parentElement.parentElement.parentElement.parentElement),Z.offsetTop+Z.offsetHeight>q.clientHeight+q.scrollTop&&(q.scrollTop=Z.offsetTop+Z.offsetHeight-q.clientHeight),Z.offsetTop<q.scrollTop&&(q.scrollTop=Z.offsetTop)};return o.watch(D,Z=>{r.value&&(Z.length&&a.value?F():I())}),o.watch(T,Z=>{if(Z){let q=z.value.querySelectorAll("[data-selected]")[0];if(!q)return;let ze=q.parentElement.parentElement;o.nextTick(()=>{ze.scrollTop>0||(ze.scrollTop=q.offsetTop)})}}),{pointer:f,canPointGroups:w,isPointed:R,setPointerFirst:F,selectPointer:$,forwardPointer:O,backwardPointer:P}}function _x(t,e,n){const{disabled:i}=o.toRefs(t),a=o.getCurrentInstance().proxy,r=o.ref(!1);return{isOpen:r,open:()=>{r.value||i.value||(r.value=!0,e.emit("open",a))},close:()=>{!r.value||(r.value=!1,e.emit("close",a))}}}function vx(t,e,n){const{searchable:i,disabled:a}=o.toRefs(t),r=n.input,s=n.open,M=n.close,l=n.clearSearch,u=n.isOpen,c=o.ref(null),g=o.ref(null),y=o.ref(null),j=o.ref(!1),d=o.ref(!1),D=o.computed(()=>i.value||a.value?-1:0),f=()=>{i.value&&r.value.blur(),g.value.blur()},N=()=>{i.value&&!a.value&&r.value.focus()},I=(Q=!0)=>{a.value||(j.value=!0,Q&&s())},z=()=>{j.value=!1,setTimeout(()=>{j.value||(M(),l())},1)};return{multiselect:c,wrapper:g,tags:y,tabindex:D,isActive:j,mouseClicked:d,blur:f,focus:N,activate:I,deactivate:z,handleFocusIn:Q=>{Q.target.closest("[data-tags]")||Q.target.closest("[data-clear]")||I(d.value)},handleFocusOut:()=>{z()},handleCaretClick:()=>{z(),f()},handleMousedown:Q=>{d.value=!0,u.value&&(Q.target.isEqualNode(g.value)||Q.target.isEqualNode(y.value))?setTimeout(()=>{z()},0):document.activeElement.isEqualNode(g.value)&&!u.value&&(console.log(Q.target.closest("[data-tags]")),I()),setTimeout(()=>{d.value=!1},0)}}}function Yx(t,e,n){const{mode:i,addTagOn:a,openDirection:r,searchable:s,showOptions:M,valueProp:l,groups:u,addOptionOn:c,createTag:g,createOption:y,reverse:j}=o.toRefs(t),d=o.getCurrentInstance().proxy,D=n.iv,f=n.update,N=n.search,I=n.setPointer,z=n.selectPointer,T=n.backwardPointer,m=n.forwardPointer,A=n.multiselect,w=n.wrapper,Q=n.tags,Y=n.isOpen,B=n.open,k=n.blur,h=n.fo,E=o.computed(()=>g.value||y.value||!1),b=o.computed(()=>a.value!==void 0?a.value:c.value!==void 0?c.value:["enter"]),p=()=>{i.value==="tags"&&!M.value&&E.value&&s.value&&!u.value&&I(h.value[h.value.map(R=>R[l.value]).indexOf(N.value)])};return{handleKeydown:R=>{e.emit("keydown",R,d);let F,$;switch(["ArrowLeft","ArrowRight","Enter"].indexOf(R.key)!==-1&&i.value==="tags"&&(F=[...A.value.querySelectorAll("[data-tags] > *")].filter(O=>O!==Q.value),$=F.findIndex(O=>O===document.activeElement)),R.key){case"Backspace":if(i.value==="single"||s.value&&[null,""].indexOf(N.value)===-1||D.value.length===0)return;f([...D.value].slice(0,-1));break;case"Enter":if(R.preventDefault(),R.keyCode===229)return;if($!==-1&&$!==void 0){f([...D.value].filter((O,P)=>P!==$)),$===F.length-1&&(F.length-1?F[F.length-2].focus():s.value?Q.value.querySelector("input").focus():w.value.focus());return}if(b.value.indexOf("enter")===-1&&E.value)return;p(),z();break;case" ":if(!E.value&&!s.value){R.preventDefault(),p(),z();return}if(!E.value)return!1;if(b.value.indexOf("space")===-1&&E.value)return;R.preventDefault(),p(),z();break;case"Tab":case";":case",":if(b.value.indexOf(R.key.toLowerCase())===-1||!E.value)return;p(),z(),R.preventDefault();break;case"Escape":k();break;case"ArrowUp":if(R.preventDefault(),!M.value)return;Y.value||B(),T();break;case"ArrowDown":if(R.preventDefault(),!M.value)return;Y.value||B(),m();break;case"ArrowLeft":if(s.value&&Q.value&&Q.value.querySelector("input").selectionStart||R.shiftKey||i.value!=="tags"||!D.value||!D.value.length)return;R.preventDefault(),$===-1?F[F.length-1].focus():$>0&&F[$-1].focus();break;case"ArrowRight":if($===-1||R.shiftKey||i.value!=="tags"||!D.value||!D.value.length)return;R.preventDefault(),F.length>$+1?F[$+1].focus():s.value?Q.value.querySelector("input").focus():s.value||w.value.focus();break}},handleKeyup:R=>{e.emit("keyup",R,d)},preparePointer:p}}function Ux(t,e,n){const{classes:i,disabled:a,openDirection:r,showOptions:s}=o.toRefs(t),M=n.isOpen,l=n.isPointed,u=n.isSelected,c=n.isDisabled,g=n.isActive,y=n.canPointGroups,j=n.resolving,d=n.fo,D=o.computed(()=>({container:"multiselect",containerDisabled:"is-disabled",containerOpen:"is-open",containerOpenTop:"is-open-top",containerActive:"is-active",wrapper:"multiselect-wrapper",singleLabel:"multiselect-single-label",singleLabelText:"multiselect-single-label-text",multipleLabel:"multiselect-multiple-label",search:"multiselect-search",tags:"multiselect-tags",tag:"multiselect-tag",tagDisabled:"is-disabled",tagRemove:"multiselect-tag-remove",tagRemoveIcon:"multiselect-tag-remove-icon",tagsSearchWrapper:"multiselect-tags-search-wrapper",tagsSearch:"multiselect-tags-search",tagsSearchCopy:"multiselect-tags-search-copy",placeholder:"multiselect-placeholder",caret:"multiselect-caret",caretOpen:"is-open",clear:"multiselect-clear",clearIcon:"multiselect-clear-icon",spinner:"multiselect-spinner",inifinite:"multiselect-inifite",inifiniteSpinner:"multiselect-inifite-spinner",dropdown:"multiselect-dropdown",dropdownTop:"is-top",dropdownHidden:"is-hidden",options:"multiselect-options",optionsTop:"is-top",group:"multiselect-group",groupLabel:"multiselect-group-label",groupLabelPointable:"is-pointable",groupLabelPointed:"is-pointed",groupLabelSelected:"is-selected",groupLabelDisabled:"is-disabled",groupLabelSelectedPointed:"is-selected is-pointed",groupLabelSelectedDisabled:"is-selected is-disabled",groupOptions:"multiselect-group-options",option:"multiselect-option",optionPointed:"is-pointed",optionSelected:"is-selected",optionDisabled:"is-disabled",optionSelectedPointed:"is-selected is-pointed",optionSelectedDisabled:"is-selected is-disabled",noOptions:"multiselect-no-options",noResults:"multiselect-no-results",fakeInput:"multiselect-fake-input",assist:"multiselect-assistive-text",spacer:"multiselect-spacer",...i.value})),f=o.computed(()=>!!(M.value&&s.value&&(!j.value||j.value&&d.value.length)));return{classList:o.computed(()=>{const I=D.value;return{container:[I.container].concat(a.value?I.containerDisabled:[]).concat(f.value&&r.value==="top"?I.containerOpenTop:[]).concat(f.value&&r.value!=="top"?I.containerOpen:[]).concat(g.value?I.containerActive:[]),wrapper:I.wrapper,spacer:I.spacer,singleLabel:I.singleLabel,singleLabelText:I.singleLabelText,multipleLabel:I.multipleLabel,search:I.search,tags:I.tags,tag:[I.tag].concat(a.value?I.tagDisabled:[]),tagRemove:I.tagRemove,tagRemoveIcon:I.tagRemoveIcon,tagsSearchWrapper:I.tagsSearchWrapper,tagsSearch:I.tagsSearch,tagsSearchCopy:I.tagsSearchCopy,placeholder:I.placeholder,caret:[I.caret].concat(M.value?I.caretOpen:[]),clear:I.clear,clearIcon:I.clearIcon,spinner:I.spinner,inifinite:I.inifinite,inifiniteSpinner:I.inifiniteSpinner,dropdown:[I.dropdown].concat(r.value==="top"?I.dropdownTop:[]).concat(!M.value||!s.value||!f.value?I.dropdownHidden:[]),options:[I.options].concat(r.value==="top"?I.optionsTop:[]),group:I.group,groupLabel:z=>{let T=[I.groupLabel];return l(z)?T.push(u(z)?I.groupLabelSelectedPointed:I.groupLabelPointed):u(z)&&y.value?T.push(c(z)?I.groupLabelSelectedDisabled:I.groupLabelSelected):c(z)&&T.push(I.groupLabelDisabled),y.value&&T.push(I.groupLabelPointable),T},groupOptions:I.groupOptions,option:(z,T)=>{let m=[I.option];return l(z)?m.push(u(z)?I.optionSelectedPointed:I.optionPointed):u(z)?m.push(c(z)?I.optionSelectedDisabled:I.optionSelected):(c(z)||T&&c(T))&&m.push(I.optionDisabled),m},noOptions:I.noOptions,noResults:I.noResults,assist:I.assist,fakeInput:I.fakeInput}}),showDropdown:f}}function Px(t,e,n){const{limit:i,infinite:a}=o.toRefs(t),r=n.isOpen,s=n.offset,M=n.search,l=n.pfo,u=n.eo,c=o.ref(null),g=o.ref(null),y=o.computed(()=>s.value<l.value.length),j=D=>{const{isIntersecting:f,target:N}=D[0];if(f){const I=N.offsetParent,z=I.scrollTop;s.value+=i.value==-1?10:i.value,o.nextTick(()=>{I.scrollTop=z})}},d=()=>{r.value&&s.value<l.value.length?c.value.observe(g.value):!r.value&&c.value&&c.value.disconnect()};return o.watch(r,()=>{!a.value||d()}),o.watch(M,()=>{!a.value||(s.value=i.value,d())},{flush:"post"}),o.watch(u,()=>{!a.value||d()},{immediate:!1,flush:"post"}),o.onMounted(()=>{window&&window.IntersectionObserver&&(c.value=new IntersectionObserver(j))}),{hasMore:y,infiniteLoader:g}}function Bx(t,e,n){const{placeholder:i,id:a,valueProp:r,label:s,mode:M,groupLabel:l,aria:u,searchable:c}=o.toRefs(t),g=n.pointer,y=n.iv,j=n.hasSelected,d=n.multipleLabelText,D=o.ref(null),f=o.computed(()=>{let h=[];return a&&a.value&&h.push(a.value),h.push("assist"),h.join("-")}),N=o.computed(()=>{let h=[];return a&&a.value&&h.push(a.value),h.push("multiselect-options"),h.join("-")}),I=o.computed(()=>{let h=[];if(a&&a.value&&h.push(a.value),g.value)return h.push(g.value.group?"multiselect-group":"multiselect-option"),h.push(g.value.group?g.value.index:g.value[r.value]),h.join("-")}),z=o.computed(()=>i.value),T=o.computed(()=>M.value!=="single"),m=o.computed(()=>{let h="";return M.value==="single"&&j.value&&(h+=y.value[s.value]),M.value==="multiple"&&j.value&&(h+=d.value),M.value==="tags"&&j.value&&(h+=y.value.map(E=>E[s.value]).join(", ")),h}),A=o.computed(()=>{let h={...u.value};return c.value&&(h["aria-labelledby"]=h["aria-labelledby"]?`${f.value} ${h["aria-labelledby"]}`:f.value,m.value&&h["aria-label"]&&(h["aria-label"]=`${m.value}, ${h["aria-label"]}`)),h}),w=h=>{let E=[];return a&&a.value&&E.push(a.value),E.push("multiselect-option"),E.push(h[r.value]),E.join("-")},Q=h=>{let E=[];return a&&a.value&&E.push(a.value),E.push("multiselect-group"),E.push(h.index),E.join("-")},Y=h=>{let E=[];return E.push(h[s.value]),E.join(" ")},B=h=>{let E=[];return E.push(h[l.value]),E.join(" ")},k=h=>`${h} \u274E`;return o.onMounted(()=>{if(a&&a.value&&document&&document.querySelector){let h=document.querySelector(`[for="${a.value}"]`);D.value=h?h.innerText:null}}),{arias:A,ariaLabel:m,ariaAssist:f,ariaControls:N,ariaPlaceholder:z,ariaMultiselectable:T,ariaActiveDescendant:I,ariaOptionId:w,ariaOptionLabel:Y,ariaGroupId:Q,ariaGroupLabel:B,ariaTagLabel:k}}function Rx(t,e,n,i={}){return n.forEach(a=>{a&&(i={...i,...a(t,e,i)})}),i}var dM={name:"Multiselect",emits:["paste","open","close","select","deselect","input","search-change","tag","option","update:modelValue","change","clear","keydown","keyup"],props:{value:{required:!1},modelValue:{required:!1},options:{type:[Array,Object,Function],required:!1,default:()=>[]},id:{type:[String,Number],required:!1},name:{type:[String,Number],required:!1,default:"multiselect"},disabled:{type:Boolean,required:!1,default:!1},label:{type:String,required:!1,default:"label"},trackBy:{type:String,required:!1,default:void 0},valueProp:{type:String,required:!1,default:"value"},placeholder:{type:String,required:!1,default:null},mode:{type:String,required:!1,default:"single"},searchable:{type:Boolean,required:!1,default:!1},limit:{type:Number,required:!1,default:-1},hideSelected:{type:Boolean,required:!1,default:!0},createTag:{type:Boolean,required:!1,default:void 0},createOption:{type:Boolean,required:!1,default:void 0},appendNewTag:{type:Boolean,required:!1,default:void 0},appendNewOption:{type:Boolean,required:!1,default:void 0},addTagOn:{type:Array,required:!1,default:void 0},addOptionOn:{type:Array,required:!1,default:void 0},caret:{type:Boolean,required:!1,default:!0},loading:{type:Boolean,required:!1,default:!1},noOptionsText:{type:String,required:!1,default:"The list is empty"},noResultsText:{type:String,required:!1,default:"No results found"},multipleLabel:{type:Function,required:!1},object:{type:Boolean,required:!1,default:!1},delay:{type:Number,required:!1,default:-1},minChars:{type:Number,required:!1,default:0},resolveOnLoad:{type:Boolean,required:!1,default:!0},filterResults:{type:Boolean,required:!1,default:!0},clearOnSearch:{type:Boolean,required:!1,default:!1},clearOnSelect:{type:Boolean,required:!1,default:!0},canDeselect:{type:Boolean,required:!1,default:!0},canClear:{type:Boolean,required:!1,default:!0},max:{type:Number,required:!1,default:-1},showOptions:{type:Boolean,required:!1,default:!0},required:{type:Boolean,required:!1,default:!1},openDirection:{type:String,required:!1,default:"bottom"},nativeSupport:{type:Boolean,required:!1,default:!1},classes:{type:Object,required:!1,default:()=>({})},strict:{type:Boolean,required:!1,default:!0},closeOnSelect:{type:Boolean,required:!1,default:!0},autocomplete:{type:String,required:!1},groups:{type:Boolean,required:!1,default:!1},groupLabel:{type:String,required:!1,default:"label"},groupOptions:{type:String,required:!1,default:"options"},groupHideEmpty:{type:Boolean,required:!1,default:!1},groupSelect:{type:Boolean,required:!1,default:!0},inputType:{type:String,required:!1,default:"text"},attrs:{required:!1,type:Object,default:()=>({})},onCreate:{required:!1,type:Function},disabledProp:{type:String,required:!1,default:"disabled"},searchStart:{type:Boolean,required:!1,default:!1},reverse:{type:Boolean,required:!1,default:!1},regex:{type:[Object,String,RegExp],required:!1,default:void 0},rtl:{type:Boolean,required:!1,default:!1},infinite:{type:Boolean,required:!1,default:!1},aria:{required:!1,type:Object,default:()=>({})}},setup(t,e){return Rx(t,e,[Sx,Cx,_x,Ex,Ox,vx,kx,Px,Qx,Yx,Ux,Bx])}};const Zx=["id","dir"],Vx=["tabindex","aria-controls","aria-placeholder","aria-expanded","aria-activedescendant","aria-multiselectable","role"],Gx=["type","modelValue","value","autocomplete","id","aria-controls","aria-placeholder","aria-expanded","aria-activedescendant","aria-multiselectable"],Wx=["onKeyup","aria-label"],$x=["onClick"],Hx=["type","modelValue","value","id","autocomplete","aria-controls","aria-placeholder","aria-expanded","aria-activedescendant","aria-multiselectable"],Fx=["innerHTML"],Jx=["id"],Xx=["id","aria-label","aria-selected"],Kx=["data-pointed","onMouseenter","onClick"],qx=["innerHTML"],eO=["aria-label"],tO=["data-pointed","data-selected","onMouseenter","onClick","id","aria-selected","aria-label"],nO=["data-pointed","data-selected","onMouseenter","onClick","id","aria-selected","aria-label"],iO=["innerHTML"],aO=["innerHTML"],rO=["value"],oO=["name","value"],sO=["name","value"],MO=["id"];function lO(t,e,n,i,a,r){return o.openBlock(),o.createElementBlock("div",{ref:"multiselect",class:o.normalizeClass(t.classList.container),id:n.searchable?void 0:n.id,dir:n.rtl?"rtl":void 0,onFocusin:e[10]||(e[10]=(...s)=>t.handleFocusIn&&t.handleFocusIn(...s)),onFocusout:e[11]||(e[11]=(...s)=>t.handleFocusOut&&t.handleFocusOut(...s)),onKeyup:e[12]||(e[12]=(...s)=>t.handleKeyup&&t.handleKeyup(...s)),onKeydown:e[13]||(e[13]=(...s)=>t.handleKeydown&&t.handleKeydown(...s))},[o.createElementVNode("div",o.mergeProps({class:t.classList.wrapper,onMousedown:e[9]||(e[9]=(...s)=>t.handleMousedown&&t.handleMousedown(...s)),ref:"wrapper",tabindex:t.tabindex,"aria-controls":n.searchable?void 0:t.ariaControls,"aria-placeholder":n.searchable?void 0:t.ariaPlaceholder,"aria-expanded":n.searchable?void 0:t.isOpen,"aria-activedescendant":n.searchable?void 0:t.ariaActiveDescendant,"aria-multiselectable":n.searchable?void 0:t.ariaMultiselectable,role:n.searchable?void 0:"combobox"},n.searchable?{}:t.arias),[o.createCommentVNode(" Search "),n.mode!=="tags"&&n.searchable&&!n.disabled?(o.openBlock(),o.createElementBlock("input",o.mergeProps({key:0,type:n.inputType,modelValue:t.search,value:t.search,class:t.classList.search,autocomplete:n.autocomplete,id:n.searchable?n.id:void 0,onInput:e[0]||(e[0]=(...s)=>t.handleSearchInput&&t.handleSearchInput(...s)),onKeypress:e[1]||(e[1]=(...s)=>t.handleKeypress&&t.handleKeypress(...s)),onPaste:e[2]||(e[2]=o.withModifiers((...s)=>t.handlePaste&&t.handlePaste(...s),["stop"])),ref:"input","aria-controls":t.ariaControls,"aria-placeholder":t.ariaPlaceholder,"aria-expanded":t.isOpen,"aria-activedescendant":t.ariaActiveDescendant,"aria-multiselectable":t.ariaMultiselectable,role:"combobox"},{...n.attrs,...t.arias}),null,16,Gx)):o.createCommentVNode("v-if",!0),o.createCommentVNode(" Tags (with search) "),n.mode=="tags"?(o.openBlock(),o.createElementBlock("div",{key:1,class:o.normalizeClass(t.classList.tags),"data-tags":""},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(t.iv,(s,M,l)=>o.renderSlot(t.$slots,"tag",{option:s,handleTagRemove:t.handleTagRemove,disabled:n.disabled},()=>[(o.openBlock(),o.createElementBlock("span",{class:o.normalizeClass(t.classList.tag),tabindex:"-1",onKeyup:o.withKeys(u=>t.handleTagRemove(s,u),["enter"]),key:l,"aria-label":t.ariaTagLabel(s[n.label])},[o.createTextVNode(o.toDisplayString(s[n.label])+" ",1),n.disabled?o.createCommentVNode("v-if",!0):(o.openBlock(),o.createElementBlock("span",{key:0,class:o.normalizeClass(t.classList.tagRemove),onClick:u=>t.handleTagRemove(s,u)},[o.createElementVNode("span",{class:o.normalizeClass(t.classList.tagRemoveIcon)},null,2)],10,$x))],42,Wx))])),256)),o.createElementVNode("div",{class:o.normalizeClass(t.classList.tagsSearchWrapper),ref:"tags"},[o.createCommentVNode(" Used for measuring search width "),o.createElementVNode("span",{class:o.normalizeClass(t.classList.tagsSearchCopy)},o.toDisplayString(t.search),3),o.createCommentVNode(" Actual search input "),n.searchable&&!n.disabled?(o.openBlock(),o.createElementBlock("input",o.mergeProps({key:0,type:n.inputType,modelValue:t.search,value:t.search,class:t.classList.tagsSearch,id:n.searchable?n.id:void 0,autocomplete:n.autocomplete,onInput:e[3]||(e[3]=(...s)=>t.handleSearchInput&&t.handleSearchInput(...s)),onKeypress:e[4]||(e[4]=(...s)=>t.handleKeypress&&t.handleKeypress(...s)),onPaste:e[5]||(e[5]=o.withModifiers((...s)=>t.handlePaste&&t.handlePaste(...s),["stop"])),ref:"input","aria-controls":t.ariaControls,"aria-placeholder":t.ariaPlaceholder,"aria-expanded":t.isOpen,"aria-activedescendant":t.ariaActiveDescendant,"aria-multiselectable":t.ariaMultiselectable,role:"combobox"},{...n.attrs,...t.arias}),null,16,Hx)):o.createCommentVNode("v-if",!0)],2)],2)):o.createCommentVNode("v-if",!0),o.createCommentVNode(" Single label "),n.mode=="single"&&t.hasSelected&&!t.search&&t.iv?o.renderSlot(t.$slots,"singlelabel",{key:2,value:t.iv},()=>[o.createElementVNode("div",{class:o.normalizeClass(t.classList.singleLabel)},[o.createElementVNode("span",{class:o.normalizeClass(t.classList.singleLabelText)},o.toDisplayString(t.iv[n.label]),3)],2)]):o.createCommentVNode("v-if",!0),o.createCommentVNode(" Multiple label "),n.mode=="multiple"&&t.hasSelected&&!t.search?o.renderSlot(t.$slots,"multiplelabel",{key:3,values:t.iv},()=>[o.createElementVNode("div",{class:o.normalizeClass(t.classList.multipleLabel),innerHTML:t.multipleLabelText},null,10,Fx)]):o.createCommentVNode("v-if",!0),o.createCommentVNode(" Placeholder "),n.placeholder&&!t.hasSelected&&!t.search?o.renderSlot(t.$slots,"placeholder",{key:4},()=>[o.createElementVNode("div",{class:o.normalizeClass(t.classList.placeholder),"aria-hidden":"true"},o.toDisplayString(n.placeholder),3)]):o.createCommentVNode("v-if",!0),o.createCommentVNode(" Spinner "),n.loading||t.resolving?o.renderSlot(t.$slots,"spinner",{key:5},()=>[o.createElementVNode("span",{class:o.normalizeClass(t.classList.spinner),"aria-hidden":"true"},null,2)]):o.createCommentVNode("v-if",!0),o.createCommentVNode(" Clear "),t.hasSelected&&!n.disabled&&n.canClear&&!t.busy?o.renderSlot(t.$slots,"clear",{key:6,clear:t.clear},()=>[o.createElementVNode("span",{"aria-hidden":"true",tabindex:"0",role:"button","data-clear":"","aria-roledescription":"\u274E",class:o.normalizeClass(t.classList.clear),onClick:e[6]||(e[6]=(...s)=>t.clear&&t.clear(...s)),onKeyup:e[7]||(e[7]=o.withKeys((...s)=>t.clear&&t.clear(...s),["enter"]))},[o.createElementVNode("span",{class:o.normalizeClass(t.classList.clearIcon)},null,2)],34)]):o.createCommentVNode("v-if",!0),o.createCommentVNode(" Caret "),n.caret&&n.showOptions?o.renderSlot(t.$slots,"caret",{key:7},()=>[o.createElementVNode("span",{class:o.normalizeClass(t.classList.caret),onClick:e[8]||(e[8]=(...s)=>t.handleCaretClick&&t.handleCaretClick(...s)),"aria-hidden":"true"},null,2)]):o.createCommentVNode("v-if",!0)],16,Vx),o.createCommentVNode(" Options "),o.createElementVNode("div",{class:o.normalizeClass(t.classList.dropdown),tabindex:"-1"},[o.renderSlot(t.$slots,"beforelist",{options:t.fo}),o.createElementVNode("ul",{class:o.normalizeClass(t.classList.options),id:t.ariaControls,role:"listbox"},[n.groups?(o.openBlock(!0),o.createElementBlock(o.Fragment,{key:0},o.renderList(t.fg,(s,M,l)=>(o.openBlock(),o.createElementBlock("li",{class:o.normalizeClass(t.classList.group),key:l,id:t.ariaGroupId(s),"aria-label":t.ariaGroupLabel(s),"aria-selected":t.isSelected(s),role:"option"},[o.createElementVNode("div",{class:o.normalizeClass(t.classList.groupLabel(s)),"data-pointed":t.isPointed(s),onMouseenter:u=>t.setPointer(s,M),onClick:u=>t.handleGroupClick(s)},[o.renderSlot(t.$slots,"grouplabel",{group:s,isSelected:t.isSelected,isPointed:t.isPointed},()=>[o.createElementVNode("span",{innerHTML:s[n.groupLabel]},null,8,qx)])],42,Kx),o.createElementVNode("ul",{class:o.normalizeClass(t.classList.groupOptions),"aria-label":t.ariaGroupLabel(s),role:"group"},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(s.__VISIBLE__,(u,c,g)=>(o.openBlock(),o.createElementBlock("li",{class:o.normalizeClass(t.classList.option(u,s)),"data-pointed":t.isPointed(u),"data-selected":t.isSelected(u)||void 0,key:g,onMouseenter:y=>t.setPointer(u),onClick:y=>t.handleOptionClick(u),id:t.ariaOptionId(u),"aria-selected":t.isSelected(u),"aria-label":t.ariaOptionLabel(u),role:"option"},[o.renderSlot(t.$slots,"option",{option:u,isSelected:t.isSelected,isPointed:t.isPointed,search:t.search},()=>[o.createElementVNode("span",null,o.toDisplayString(u[n.label]),1)])],42,tO))),128))],10,eO)],10,Xx))),128)):(o.openBlock(!0),o.createElementBlock(o.Fragment,{key:1},o.renderList(t.fo,(s,M,l)=>(o.openBlock(),o.createElementBlock("li",{class:o.normalizeClass(t.classList.option(s)),"data-pointed":t.isPointed(s),"data-selected":t.isSelected(s)||void 0,key:l,onMouseenter:u=>t.setPointer(s),onClick:u=>t.handleOptionClick(s),id:t.ariaOptionId(s),"aria-selected":t.isSelected(s),"aria-label":t.ariaOptionLabel(s),role:"option"},[o.renderSlot(t.$slots,"option",{option:s,isSelected:t.isSelected,isPointed:t.isPointed,search:t.search},()=>[o.createElementVNode("span",null,o.toDisplayString(s[n.label]),1)])],42,nO))),128))],10,Jx),t.noOptions?o.renderSlot(t.$slots,"nooptions",{key:0},()=>[o.createElementVNode("div",{class:o.normalizeClass(t.classList.noOptions),innerHTML:n.noOptionsText},null,10,iO)]):o.createCommentVNode("v-if",!0),t.noResults?o.renderSlot(t.$slots,"noresults",{key:1},()=>[o.createElementVNode("div",{class:o.normalizeClass(t.classList.noResults),innerHTML:n.noResultsText},null,10,aO)]):o.createCommentVNode("v-if",!0),n.infinite&&t.hasMore?(o.openBlock(),o.createElementBlock("div",{key:2,class:o.normalizeClass(t.classList.inifinite),ref:"infiniteLoader"},[o.renderSlot(t.$slots,"infinite",{},()=>[o.createElementVNode("span",{class:o.normalizeClass(t.classList.inifiniteSpinner)},null,2)])],2)):o.createCommentVNode("v-if",!0),o.renderSlot(t.$slots,"afterlist",{options:t.fo})],2),o.createCommentVNode(" Hacky input element to show HTML5 required warning "),n.required?(o.openBlock(),o.createElementBlock("input",{key:0,class:o.normalizeClass(t.classList.fakeInput),tabindex:"-1",value:t.textValue,required:""},null,10,rO)):o.createCommentVNode("v-if",!0),o.createCommentVNode(" Native input support "),n.nativeSupport?(o.openBlock(),o.createElementBlock(o.Fragment,{key:1},[n.mode=="single"?(o.openBlock(),o.createElementBlock("input",{key:0,type:"hidden",name:n.name,value:t.plainValue!==void 0?t.plainValue:""},null,8,oO)):(o.openBlock(!0),o.createElementBlock(o.Fragment,{key:1},o.renderList(t.plainValue,(s,M)=>(o.openBlock(),o.createElementBlock("input",{type:"hidden",name:`${n.name}[]`,value:s,key:M},null,8,sO))),128))],64)):o.createCommentVNode("v-if",!0),o.createCommentVNode(" Screen reader assistive text "),n.searchable&&t.hasSelected?(o.openBlock(),o.createElementBlock("div",{key:2,class:o.normalizeClass(t.classList.assist),id:t.ariaAssist,"aria-hidden":"true"},o.toDisplayString(t.ariaLabel),11,MO)):o.createCommentVNode("v-if",!0),o.createCommentVNode(" Create height for empty input "),o.createElementVNode("div",{class:o.normalizeClass(t.classList.spacer)},null,2)],42,Zx)}dM.render=lO,dM.__file="src/Multiselect.vue";var jS="",dS="";const uO=o.createElementVNode("img",{alt:"",class:"list__item_thumb",src:xx},null,-1),cO={class:"list__item_text"},gO=o.createElementVNode("div",{id:"list"},null,-1),NO={__name:"InputList",props:{list:{type:Array,required:!0},maxHeight:{type:String,default:"200px"},labelProp:{type:String,default:"label"},idProp:{type:String,default:"value"}},emits:["update"],setup(t,{emit:e}){o.useCssVars(a=>({"341349d2":t.maxHeight}));const n=o.ref(null);function i(){e("update",n.value)}return(a,r)=>(o.openBlock(),o.createElementBlock(o.Fragment,null,[o.createVNode(o.unref(dM),{modelValue:n.value,"onUpdate:modelValue":r[0]||(r[0]=s=>n.value=s),label:t.labelProp,mode:"tags",native:!1,object:!0,options:t.list,placeholder:"Start typing a name",searchable:!0,"value-prop":t.idProp,onSelect:i},{tag:o.withCtx(({option:s,handleTagRemove:M,disabled:l})=>[(o.openBlock(),o.createBlock(o.Teleport,{to:"#list"},[o.createElementVNode("div",{class:o.normalizeClass(["list__item",{"is-disabled":l}])},[uO,o.createElementVNode("p",cO,o.toDisplayString(s[t.labelProp]),1),o.createVNode(ue,{class:"list__item_icon","icon-name":"delete",size:24,onClick:u=>M(s,u)},null,8,["onClick"]),o.renderSlot(a.$slots,"default")],2)]))]),_:3},8,["modelValue","label","options","value-prop"]),gO],64))}},yO=o.defineComponent({components:{DhIcon:ue},props:{hasCloseButton:{type:Boolean,default:!0},hasSideBar:{type:Boolean,default:!0},hasSideBarButtonBottom:{type:Boolean,default:!0},hasHeader:{type:Boolean,default:!0},hasFooter:{type:Boolean,default:!0},hasFooterButtonRight:{type:Boolean,default:!0},sideBarPosition:{type:String,default:"left"},hasCloseConfirmation:{type:Boolean,default:!1},bodyClass:{type:String,default:""}},emits:["close"],methods:{closed(){this.$emit("close",this.hasCloseConfirmation)}}}),jO={key:1,id:"modal-sidebar",class:"modal-sidebar"},dO={key:0,id:"modalTitle",class:"modal-header"},IO={class:"modal-footer"};function DO(t,e,n,i,a,r){const s=o.resolveComponent("dh-icon");return o.openBlock(),o.createBlock(o.Transition,{name:"modal-fade"},{default:o.withCtx(()=>[o.createElementVNode("div",{class:"modal-backdrop",onClick:e[2]||(e[2]=(...M)=>t.closed&&t.closed(...M))},[o.createElementVNode("div",{"aria-describedby":"modalDescription","aria-labelledby":"modalTitle",class:o.normalizeClass(`modal ${t.hasSideBar?t.sideBarPosition:""}`),role:"dialog",onClick:e[1]||(e[1]=o.withModifiers(()=>{},["stop"]))},[t.hasCloseButton?(o.openBlock(),o.createElementBlock("button",{key:0,"aria-label":"Close modal",class:"btn-close",type:"button",onClick:e[0]||(e[0]=(...M)=>t.closed&&t.closed(...M))},[o.createVNode(s,{class:"icon","icon-name":"close",size:24})])):o.createCommentVNode("",!0),t.hasSideBar?(o.openBlock(),o.createElementBlock("aside",jO,[o.renderSlot(t.$slots,"sidebar"),t.hasSideBarButtonBottom?o.renderSlot(t.$slots,"sidebar-button-bottom",{key:0}):o.createCommentVNode("",!0)])):o.createCommentVNode("",!0),o.createElementVNode("section",{class:o.normalizeClass(`right-section ${t.hasSideBar?"":"full"}`)},[t.hasHeader?(o.openBlock(),o.createElementBlock("header",dO,[o.renderSlot(t.$slots,"header")])):o.createCommentVNode("",!0),o.createElementVNode("section",{id:"modalDescription",class:o.normalizeClass(["modal-body",t.bodyClass])},[o.renderSlot(t.$slots,"body")],2),o.createElementVNode("footer",IO,[t.hasFooter?o.renderSlot(t.$slots,"footer",{key:0}):o.createCommentVNode("",!0),t.hasFooterButtonRight?o.renderSlot(t.$slots,"footer-button-right",{key:1}):o.createCommentVNode("",!0)])],2)],2)])]),_:3})}var fO=Ze(yO,[["render",DO]]);const hO=o.defineComponent({components:{DhIcon:ue},props:{notificationType:{type:String,required:!0,default:"toast",validator:t=>["toast","bottom-message","actionable","modal"].includes(t)},icon:{type:String,required:!0,default:"info"},title:{type:String,required:!1,default:""},message:{type:String,required:!1,default:""},dismissible:{type:Boolean,required:!1,default:!0},notificationButton:{type:String,default:"Action"},buttonDismiss:{type:String,default:"Dismiss"},zIndex:{type:Number,default:2},show:{type:Boolean,default:!1}},mounted(){this.dismissible&&["toast","bottom-message"].includes(this.notificationType)&&setTimeout(()=>{this.close()},3e3)},emits:["action"],methods:{close(t=!1){this.$emit("action",t)},limitTitle(t,e){return["toast","actionable"].includes(e)&&t.length>=60?`${t.substring(0,60)}..`:["bottom-message"].includes(e)&&t.length>=40?`${t.substring(0,40)}..`:["modal"].includes(e)&&t.length>=80?`${t.substring(0,80)}..`:t}}}),mO=[o.createElementVNode("img",{alt:"icon",class:"close-icon",src:Bu},null,-1)],zO={class:"additional-text"},AO={key:0,class:"descriptions"};function TO(t,e,n,i,a,r){const s=o.resolveComponent("dh-icon");return o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(`dh-notification-container ${t.notificationType}`),style:o.normalizeStyle({"z-index":t.zIndex})},[t.show?(o.openBlock(),o.createElementBlock("div",{key:0,class:o.normalizeClass(["bottom-message"].includes(t.notificationType)?`notification-up status status-${t.notificationType}`:`notification-enter status status-${t.notificationType}`)},[["modal","bottom-message"].includes(t.notificationType)?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock("button",{key:0,class:"close-notification",onClick:e[0]||(e[0]=M=>t.close(!1))},mO)),o.createElementVNode("div",{class:o.normalizeClass(`content content- ${t.notificationType}`)},[o.createElementVNode("div",{class:o.normalizeClass(`ellipse ellipse-${t.notificationType} ellipse-${t.icon}`)},[o.createVNode(s,{class:o.normalizeClass(`icon-${t.icon}`),"icon-name":t.icon,size:33},null,8,["class","icon-name"])],2),o.createElementVNode("div",zO,[o.createElementVNode("div",{class:o.normalizeClass(`title title-${t.notificationType}`)},o.toDisplayString(t.limitTitle(t.title,t.notificationType)),3),["bottom-message"].includes(t.notificationType)?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock("div",AO,o.toDisplayString(t.message.length>=280?`${t.message.substring(0,280)}..`:t.message),1))]),["toast","bottom-message"].includes(t.notificationType)?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock("div",{key:0,class:o.normalizeClass(`buttons ${t.notificationType}`)},[o.createElementVNode("button",{class:o.normalizeClass(["btn btn-normal",t.icon=="delete"?"btn-danger":"btn-primary"]),onClick:e[1]||(e[1]=M=>t.close(!0))},o.toDisplayString(t.notificationButton),3),o.createElementVNode("button",{class:"btn btn-normal btn-secondary dismiss",onClick:e[2]||(e[2]=M=>t.close())},o.toDisplayString(t.buttonDismiss),1)],2))],2)],2)):o.createCommentVNode("",!0)],6)}var pO=Ze(hO,[["render",TO]]),DS="";const LO={class:"password__panel"},xO=["placeholder","type"],OO={class:"icon is-right"},SO={key:0,class:"password__tooltip"};var EO=Ze(o.defineComponent({__name:"PasswordField",props:{modelValue:{type:String,default:""},placeholder:{type:String,default:""},tipChars:{type:String,default:"12 Characters"},tipNumbers:{type:String,default:"Numbers"},tipSymbols:{type:String,default:"Symbols"},passwordTooltipDisabled:{type:Boolean,default:!1}},emits:["submit","update:modelValue"],setup(t,{emit:e}){const n=t,i=o.ref(""),a=o.ref(!1),r=o.ref(!1),s=o.ref(!1),M=o.ref(!1),l=o.ref(!1),u=o.ref(!1);function c(){e("submit",i.value),e("update:modelValue",i.value)}function g(){a.value=!0,u.value=!0}function y(){a.value=!1,u.value=!1}function j(){l.value=!l.value}return o.onMounted(()=>()=>i.value=n.modelValue||""),o.watch(n,()=>(i.value=n.modelValue||"",r.value=i.value.length>11,s.value=/\d/.test(i.value),M.value=/[!@#$%^&*)(+=._-]/.test(i.value))),(d,D)=>(o.openBlock(),o.createElementBlock("div",LO,[o.withDirectives(o.createElementVNode("input",{"onUpdate:modelValue":D[0]||(D[0]=f=>i.value=f),class:"form__input password__panel_input","data-e2e":"password-input",placeholder:n.placeholder,type:l.value?"text":"password",onFocus:g,onFocusout:y,onKeyup:c},null,40,xO),[[o.vModelDynamic,i.value]]),o.createElementVNode("button",{class:"password__panel_button",type:"button",onClick:j},[o.createElementVNode("span",OO,[o.createVNode(ue,{active:u.value,"icon-name":l.value?"invisible":"visible",size:20},null,8,["active","icon-name"])])]),a.value&&!n.passwordTooltipDisabled?(o.openBlock(),o.createElementBlock("div",SO,[o.createElementVNode("p",{class:o.normalizeClass(["password__tooltip_text",r.value?"password__tooltip_text--valid":""])},[o.createVNode(ue,{class:o.normalizeClass(r.value?"password__tooltip_icon--active":"password__tooltip_icon"),"icon-name":r.value?"accept":"close",size:16},null,8,["class","icon-name"]),o.createElementVNode("span",null,o.toDisplayString(n.tipChars),1)],2),o.createElementVNode("p",{class:o.normalizeClass(["password__tooltip_text",s.value?"password__tooltip_text--valid":""])},[o.createVNode(ue,{class:o.normalizeClass(s.value?"password__tooltip_icon--active":"password__tooltip_icon"),"icon-name":s.value?"accept":"close",size:16},null,8,["class","icon-name"]),o.createElementVNode("span",null,o.toDisplayString(n.tipNumbers),1)],2),o.createElementVNode("p",{class:o.normalizeClass(["password__tooltip_text",M.value?"password__tooltip_text--valid":""])},[o.createVNode(ue,{class:o.normalizeClass(M.value?"password__tooltip_icon--active":"password__tooltip_icon"),"icon-name":M.value?"accept":"close",size:16},null,8,["class","icon-name"]),o.createElementVNode("span",null,o.toDisplayString(n.tipSymbols),1)],2)])):o.createCommentVNode("",!0)]))}}),[["__scopeId","data-v-3ae35090"]]),hS="";const CO={class:"radio"},bO=["for"],wO=["id","type","value"],kO={class:"radio__label_txt"};var Fg=Ze({__name:"RadioBox",props:{type:{type:String,default:"radio"},value:{type:String,required:!0},label:{type:String,required:!0}},emits:["clickBox"],setup(t,{emit:e}){return(n,i)=>(o.openBlock(),o.createElementBlock("div",CO,[o.createElementVNode("label",{class:"radio__label",for:t.value},[o.createElementVNode("input",{id:t.value,class:"radio__input",name:"radiobox",type:t.type,value:t.value,onClick:i[0]||(i[0]=a=>e("clickBox"))},null,8,wO),o.createElementVNode("span",kO,o.toDisplayString(t.label),1)],8,bO)]))}},[["__scopeId","data-v-29696bd5"]]),zS="";const QO={__name:"RadioBoxGroup",props:{orientation:{type:String,default:"horizontal"},type:{type:String,default:"radio"},list:{type:Array,required:!0}},setup(t){const e=o.ref(null);function n(){const i=document.querySelectorAll("input");for(let a=0;a<i.length;a++)i[a].checked?i[a].parentNode.parentNode.classList.add("radio--checked"):i[a].parentNode.parentNode.classList.remove("radio--checked")}return(i,a)=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(["radio__grp",t.orientation==="vertical"?"radio__vertical":"radio__horizontal"])},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(t.list,r=>(o.openBlock(),o.createBlock(Fg,{key:r.key,ref_for:!0,ref_key:"boxes",ref:e,label:r.label,type:t.type,value:r.value,onClickBox:n},null,8,["label","type","value"]))),128))],2))}};var AS="";const _O={class:"search-panel"},vO=["placeholder"];var YO=Ze(o.defineComponent({__name:"SearchInput",props:{modelValue:{type:String,default:""},placeholder:{type:String,default:""}},emits:["submit","clean","update:modelValue"],setup(t,{emit:e}){const n=t,i=o.ref("");function a(){e("submit",i.value),e("update:modelValue",i.value)}function r(){i.value="",e("clean"),e("update:modelValue",i.value)}return o.onMounted(()=>()=>i.value=n.modelValue||""),o.watch(n,()=>i.value=n.modelValue||""),(s,M)=>(o.openBlock(),o.createElementBlock("div",_O,[o.withDirectives(o.createElementVNode("input",{"onUpdate:modelValue":M[0]||(M[0]=l=>i.value=l),class:"form-input search-panel-input","data-e2e":"search-input",placeholder:n.placeholder,onKeyup:a},null,40,vO),[[o.vModelText,i.value]]),i.value?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock("button",{key:0,class:"search-panel-button","data-e2e":"search-submit",onClick:a},[o.createVNode(ue,{active:!0,"icon-name":"search",size:24})])),i.value?(o.openBlock(),o.createElementBlock("button",{key:1,class:"search-panel-button close","data-e2e":"search-close",onClick:r},[o.createVNode(ue,{class:"icon","icon-name":"close",size:24})])):o.createCommentVNode("",!0)]))}}),[["__scopeId","data-v-562faa14"]]),pS="";const UO=t=>(o.pushScopeId("data-v-0213b522"),t=t(),o.popScopeId(),t),PO={class:"stepper"},BO=UO(()=>o.createElementVNode("hr",{class:"solid"},null,-1));var RO=Ze(o.defineComponent({__name:"Stepper",props:{maxSteps:{type:Number,default:0},currentStep:{type:Number,default:0}},setup(t){const e=t;function n(){return Array.from(Array(e.maxSteps||0).keys())}return(i,a)=>(o.openBlock(),o.createElementBlock("div",PO,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(n(),(r,s)=>(o.openBlock(),o.createElementBlock("div",{key:s,class:"step"},[o.createElementVNode("span",{class:o.normalizeClass(["step-number",{active:r===t.currentStep}])},o.toDisplayString(r+1),3),BO]))),128))]))}}),[["__scopeId","data-v-0213b522"]]),xS="";const ZO={class:"code"},VO=["autocomplete"],GO=["autocomplete"],WO=["autocomplete"],$O=["autocomplete"],HO=["autocomplete"],FO=["autocomplete"];var JO=Ze(o.defineComponent({__name:"VerificationCode",props:{code:{type:String,required:!1,default:""},focusOnFirstInput:{type:Boolean,default:!0},focusOnFirstInputDelay:{type:Number,default:100},autoComplete:{type:String,default:"off"}},emits:["submit"],setup(t,{emit:e}){const n=t,i=o.ref(null),a=o.ref(null),r=o.ref(null),s=o.ref(null),M=o.ref(null),l=o.ref(null);async function u(f){var N,I,z,T,m;switch(f){case 1:break;case 2:(N=i.value)==null||N.focus();break;case 3:(I=a.value)==null||I.focus();break;case 4:(z=r.value)==null||z.focus();break;case 5:(T=s.value)==null||T.focus();break;case 6:(m=M.value)==null||m.focus();break}}async function c(f){var N,I,z,T,m;switch(f){case 1:(N=a.value)==null||N.focus();break;case 2:(I=r.value)==null||I.focus();break;case 3:(z=s.value)==null||z.focus();break;case 4:(T=M.value)==null||T.focus();break;case 5:(m=l.value)==null||m.focus();break}}async function g(f,N){const I=f.key;let z=!0;[{_index:1,nextInput:a},{_index:2,nextInput:r},{_index:3,nextInput:s},{_index:4,nextInput:M},{_index:5,nextInput:l}].forEach(({_index:T,nextInput:m})=>{N===T&&(m.value&&I.match(/^[0-9]+$/)&&m.value.focus({}),z=!1),f.preventDefault()}),I.match(/^[0-9]+$/)&&(f.target.value=I),z&&d()}async function y(f){var I;const N=((I=f.clipboardData)==null?void 0:I.getData("text/plain"))||"";j(N),d()}function j(f){const N=f.replace(/\D/g,"");if(N.length!==6)return;const[I,z,T,m,A,w]=N.split("");i.value&&(i.value.value=I),a.value&&(a.value.value=z),r.value&&(r.value.value=T),s.value&&(s.value.value=m),M.value&&(M.value.value=A),l.value&&(l.value.value=w)}async function d(){var N,I,z,T,m,A;const f=`${(N=i.value)==null?void 0:N.value}${(I=a.value)==null?void 0:I.value}${(z=r.value)==null?void 0:z.value}${(T=s.value)==null?void 0:T.value}${(m=M.value)==null?void 0:m.value}${(A=l.value)==null?void 0:A.value}`;e("submit",f)}function D(){setTimeout(()=>{var f;n.focusOnFirstInput&&((f=i.value)==null||f.focus())},n.focusOnFirstInputDelay)}return o.onMounted(()=>{n.code&&(j(n.code),d()),D()}),(f,N)=>(o.openBlock(),o.createElementBlock("div",ZO,[o.createElementVNode("input",{ref_key:"txtInput1",ref:i,autocomplete:t.autoComplete,autofocus:"",class:"form-input input-1","data-e2e":"input-1",inputmode:"numeric",maxlength:"1",placeholder:"_",type:"text",onKeypress:N[0]||(N[0]=I=>g(I,1)),onKeyup:[N[1]||(N[1]=o.withKeys(I=>u(1),["delete"])),N[2]||(N[2]=o.withKeys(I=>u(1),["left"])),N[3]||(N[3]=o.withKeys(I=>c(1),["right"]))],onPaste:y},null,40,VO),o.createElementVNode("input",{ref_key:"txtInput2",ref:a,autocomplete:t.autoComplete,class:"form-input","data-e2e":"input-2",inputmode:"numeric",maxlength:"1",placeholder:"_",type:"text",onKeypress:N[4]||(N[4]=I=>g(I,2)),onKeyup:[N[5]||(N[5]=o.withKeys(I=>u(2),["delete"])),N[6]||(N[6]=o.withKeys(I=>u(2),["left"])),N[7]||(N[7]=o.withKeys(I=>c(2),["right"]))],onPaste:y},null,40,GO),o.createElementVNode("input",{ref_key:"txtInput3",ref:r,autocomplete:t.autoComplete,class:"form-input","data-e2e":"input-3",inputmode:"numeric",maxlength:"1",placeholder:"_",type:"text",onKeypress:N[8]||(N[8]=I=>g(I,3)),onKeyup:[N[9]||(N[9]=o.withKeys(I=>u(3),["delete"])),N[10]||(N[10]=o.withKeys(I=>u(3),["left"])),N[11]||(N[11]=o.withKeys(I=>c(3),["right"]))],onPaste:y},null,40,WO),o.createElementVNode("input",{ref_key:"txtInput4",ref:s,autocomplete:t.autoComplete,class:"form-input","data-e2e":"input-4",inputmode:"numeric",maxlength:"1",placeholder:"_",type:"text",onKeypress:N[12]||(N[12]=I=>g(I,4)),onKeyup:[N[13]||(N[13]=o.withKeys(I=>u(4),["delete"])),N[14]||(N[14]=o.withKeys(I=>u(4),["left"])),N[15]||(N[15]=o.withKeys(I=>c(4),["right"]))],onPaste:y},null,40,$O),o.createElementVNode("input",{ref_key:"txtInput5",ref:M,autocomplete:t.autoComplete,class:"form-input","data-e2e":"input-5",inputmode:"numeric",maxlength:"1",placeholder:"_",type:"text",onKeypress:N[16]||(N[16]=I=>g(I,5)),onKeyup:[N[17]||(N[17]=o.withKeys(I=>u(5),["delete"])),N[18]||(N[18]=o.withKeys(I=>u(5),["left"])),N[19]||(N[19]=o.withKeys(I=>c(5),["right"]))],onPaste:y},null,40,HO),o.createElementVNode("input",{ref_key:"txtInput6",ref:l,autocomplete:t.autoComplete,class:"form-input","data-e2e":"input-6",inputmode:"numeric",maxlength:"1",placeholder:"_",type:"text",onKeypress:N[20]||(N[20]=I=>g(I,6)),onKeyup:[N[21]||(N[21]=o.withKeys(I=>u(6),["delete"])),N[22]||(N[22]=o.withKeys(I=>u(6),["left"])),N[23]||(N[23]=o.withKeys(I=>c(6),["right"]))],onPaste:y},null,40,FO)]))}}),[["__scopeId","data-v-2ace876a"]]);je.DhAdvancedDatePicker=CL,je.DhAdvancedFilter=Gg,je.DhCopyText=YL,je.DhDatePicker=BL,je.DhDropdownMenu=WL,je.DhError=HL,je.DhExpansionPanel=qL,je.DhFileUpload=Ix,je.DhIcon=ue,je.DhInputDropdown=Ax,je.DhInputGroup=Lx,je.DhInputList=NO,je.DhModal=fO,je.DhNotification=pO,je.DhNumberRange=Wg,je.DhPasswordField=EO,je.DhRadioBox=Fg,je.DhRadioBoxGroup=QO,je.DhSearchInput=YO,je.DhStepper=RO,je.DhSwitch=Ru,je.DhTooltip=$g,je.DhVerificationCode=JO,Object.defineProperties(je,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
|
@@ -37,9 +37,11 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
37
37
|
type: NumberConstructor;
|
|
38
38
|
default: number;
|
|
39
39
|
};
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
40
|
+
show: {
|
|
41
|
+
type: BooleanConstructor;
|
|
42
|
+
default: boolean;
|
|
43
|
+
};
|
|
44
|
+
}, unknown, unknown, {}, {
|
|
43
45
|
close(confirmation?: boolean): void;
|
|
44
46
|
limitTitle(_title: string, _type: string): string;
|
|
45
47
|
}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "action"[], "action", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
@@ -81,10 +83,15 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
81
83
|
type: NumberConstructor;
|
|
82
84
|
default: number;
|
|
83
85
|
};
|
|
86
|
+
show: {
|
|
87
|
+
type: BooleanConstructor;
|
|
88
|
+
default: boolean;
|
|
89
|
+
};
|
|
84
90
|
}>> & {
|
|
85
91
|
onAction?: ((...args: any[]) => any) | undefined;
|
|
86
92
|
}, {
|
|
87
93
|
zIndex: number;
|
|
94
|
+
show: boolean;
|
|
88
95
|
title: string;
|
|
89
96
|
icon: string;
|
|
90
97
|
notificationType: string;
|