@deskhero/dh_ui 1.42.3 → 1.42.4
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 +1 -1
- package/dist/dh_ui.umd.js +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/dh_ui.umd.js
CHANGED
|
@@ -16,7 +16,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
16
16
|
* Released under the MIT License
|
|
17
17
|
*/class $1{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(n,t,r,e){const o=t.listeners[e],a=t.duration;o.forEach(s=>s({chart:n,initial:t.initial,numSteps:a,currentStep:Math.min(r-t.start,a)}))}_refresh(){this._request||(this._running=!0,this._request=zd.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(n=Date.now()){let t=0;this._charts.forEach((r,e)=>{if(!r.running||!r.items.length)return;const o=r.items;let a=o.length-1,s=!1,l;for(;a>=0;--a)l=o[a],l._active?(l._total>r.duration&&(r.duration=l._total),l.tick(n),s=!0):(o[a]=o[o.length-1],o.pop());s&&(e.draw(),this._notify(e,r,n,"progress")),o.length||(r.running=!1,this._notify(e,r,n,"complete"),r.initial=!1),t+=o.length}),this._lastDate=n,t===0&&(this._running=!1)}_getAnims(n){const t=this._charts;let r=t.get(n);return r||(r={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},t.set(n,r)),r}listen(n,t,r){this._getAnims(n).listeners[t].push(r)}add(n,t){!t||!t.length||this._getAnims(n).items.push(...t)}has(n){return this._getAnims(n).items.length>0}start(n){const t=this._charts.get(n);!t||(t.running=!0,t.start=Date.now(),t.duration=t.items.reduce((r,e)=>Math.max(r,e._duration),0),this._refresh())}running(n){if(!this._running)return!1;const t=this._charts.get(n);return!(!t||!t.running||!t.items.length)}stop(n){const t=this._charts.get(n);if(!t||!t.items.length)return;const r=t.items;let e=r.length-1;for(;e>=0;--e)r[e].cancel();t.items=[],this._notify(n,t,Date.now(),"complete")}remove(n){return this._charts.delete(n)}}var tn=new $1;const Mf="transparent",J1={boolean(i,n,t){return t>.5?n:i},color(i,n,t){const r=Fd(i||Mf),e=r.valid&&Fd(n||Mf);return e&&e.valid?e.mix(r,t).hexString():n},number(i,n,t){return i+(n-i)*t}};class X1{constructor(n,t,r,e){const o=t[r];e=Lo([n.to,e,o,n.from]);const a=Lo([n.from,o,e]);this._active=!0,this._fn=n.fn||J1[n.type||typeof a],this._easing=yi[n.easing]||yi.linear,this._start=Math.floor(Date.now()+(n.delay||0)),this._duration=this._total=Math.floor(n.duration),this._loop=!!n.loop,this._target=t,this._prop=r,this._from=a,this._to=e,this._promises=void 0}active(){return this._active}update(n,t,r){if(this._active){this._notify(!1);const e=this._target[this._prop],o=r-this._start,a=this._duration-o;this._start=r,this._duration=Math.floor(Math.max(a,n.duration)),this._total+=o,this._loop=!!n.loop,this._to=Lo([n.to,t,e,n.from]),this._from=Lo([n.from,e,t])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(n){const t=n-this._start,r=this._duration,e=this._prop,o=this._from,a=this._loop,s=this._to;let l;if(this._active=o!==s&&(a||t<r),!this._active){this._target[e]=s,this._notify(!0);return}if(t<0){this._target[e]=o;return}l=t/r%2,l=a&&l>1?2-l:l,l=this._easing(Math.min(1,Math.max(0,l))),this._target[e]=this._fn(o,s,l)}wait(){const n=this._promises||(this._promises=[]);return new Promise((t,r)=>{n.push({res:t,rej:r})})}_notify(n){const t=n?"res":"rej",r=this._promises||[];for(let e=0;e<r.length;e++)r[e][t]()}}const K1=["x","y","borderWidth","radius","tension"],q1=["color","borderColor","backgroundColor"];Te.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 ex=Object.keys(Te.animation);Te.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:i=>i!=="onProgress"&&i!=="onComplete"&&i!=="fn"}),Te.set("animations",{colors:{type:"color",properties:q1},numbers:{type:"number",properties:K1}}),Te.describe("animations",{_fallback:"animation"}),Te.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:i=>i|0}}}});class gf{constructor(n,t){this._chart=n,this._properties=new Map,this.configure(t)}configure(n){if(!Ae(n))return;const t=this._properties;Object.getOwnPropertyNames(n).forEach(r=>{const e=n[r];if(!Ae(e))return;const o={};for(const a of ex)o[a]=e[a];(Ze(e.properties)&&e.properties||[r]).forEach(a=>{(a===r||!t.has(a))&&t.set(a,o)})})}_animateOptions(n,t){const r=t.options,e=nx(n,r);if(!e)return[];const o=this._createAnimations(e,r);return r.$shared&&tx(n.options.$animations,r).then(()=>{n.options=r},()=>{}),o}_createAnimations(n,t){const r=this._properties,e=[],o=n.$animations||(n.$animations={}),a=Object.keys(t),s=Date.now();let l;for(l=a.length-1;l>=0;--l){const u=a[l];if(u.charAt(0)==="$")continue;if(u==="options"){e.push(...this._animateOptions(n,t));continue}const f=t[u];let d=o[u];const M=r.get(u);if(d)if(M&&d.active()){d.update(M,f,s);continue}else d.cancel();if(!M||!M.duration){n[u]=f;continue}o[u]=d=new X1(M,n,u,f),e.push(d)}return e}update(n,t){if(this._properties.size===0){Object.assign(n,t);return}const r=this._createAnimations(n,t);if(r.length)return tn.add(this._chart,r),!0}}function tx(i,n){const t=[],r=Object.keys(n);for(let e=0;e<r.length;e++){const o=i[r[e]];o&&o.active()&&t.push(o.wait())}return Promise.all(t)}function nx(i,n){if(!n)return;let t=i.options;if(!t){i.options=n;return}return t.$shared&&(i.options=t=Object.assign({},t,{$shared:!1,$animations:{}})),t}function hf(i,n){const t=i&&i.options||{},r=t.reverse,e=t.min===void 0?n:0,o=t.max===void 0?n:0;return{start:r?o:e,end:r?e:o}}function ix(i,n,t){if(t===!1)return!1;const r=hf(i,t),e=hf(n,t);return{top:e.end,right:r.end,bottom:e.start,left:r.start}}function rx(i){let n,t,r,e;return Ae(i)?(n=i.top,t=i.right,r=i.bottom,e=i.left):n=t=r=e=i,{top:n,right:t,bottom:r,left:e,disabled:i===!1}}function yf(i,n){const t=[],r=i._getSortedDatasetMetas(n);let e,o;for(e=0,o=r.length;e<o;++e)t.push(r[e].index);return t}function pf(i,n,t,r={}){const e=i.keys,o=r.mode==="single";let a,s,l,u;if(n!==null){for(a=0,s=e.length;a<s;++a){if(l=+e[a],l===t){if(r.all)continue;break}u=i.values[l],rt(u)&&(o||n===0||Vt(n)===Vt(u))&&(n+=u)}return n}}function ox(i){const n=Object.keys(i),t=new Array(n.length);let r,e,o;for(r=0,e=n.length;r<e;++r)o=n[r],t[r]={x:o,y:i[o]};return t}function Nf(i,n){const t=i&&i.options.stacked;return t||t===void 0&&n.stack!==void 0}function ax(i,n,t){return`${i.id}.${n.id}.${t.stack||t.type}`}function sx(i){const{min:n,max:t,minDefined:r,maxDefined:e}=i.getUserBounds();return{min:r?n:Number.NEGATIVE_INFINITY,max:e?t:Number.POSITIVE_INFINITY}}function lx(i,n,t){const r=i[n]||(i[n]={});return r[t]||(r[t]={})}function mf(i,n,t,r){for(const e of n.getMatchingVisibleMetas(r).reverse()){const o=i[e.index];if(t&&o>0||!t&&o<0)return e.index}return null}function If(i,n){const{chart:t,_cachedMeta:r}=i,e=t._stacks||(t._stacks={}),{iScale:o,vScale:a,index:s}=r,l=o.axis,u=a.axis,f=ax(o,a,r),d=n.length;let M;for(let h=0;h<d;++h){const y=n[h],{[l]:p,[u]:N}=y,g=y._stacks||(y._stacks={});M=g[u]=lx(e,f,p),M[s]=N,M._top=mf(M,a,!0,r.type),M._bottom=mf(M,a,!1,r.type)}}function Il(i,n){const t=i.scales;return Object.keys(t).filter(r=>t[r].axis===n).shift()}function ux(i,n){return mn(i,{active:!1,dataset:void 0,datasetIndex:n,index:n,mode:"default",type:"dataset"})}function cx(i,n,t){return mn(i,{active:!1,dataIndex:n,parsed:void 0,raw:void 0,element:t,index:n,mode:"default",type:"data"})}function Di(i,n){const t=i.controller.index,r=i.vScale&&i.vScale.axis;if(!!r){n=n||i._parsed;for(const e of n){const o=e._stacks;if(!o||o[r]===void 0||o[r][t]===void 0)return;delete o[r][t]}}}const jl=i=>i==="reset"||i==="none",jf=(i,n)=>n?i:Object.assign({},i),dx=(i,n,t)=>i&&!n.hidden&&n._stacked&&{keys:yf(t,!0),values:null};class Ct{constructor(n,t){this.chart=n,this._ctx=n.ctx,this.index=t,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 n=this._cachedMeta;this.configure(),this.linkScales(),n._stacked=Nf(n.vScale,n),this.addElements()}updateIndex(n){this.index!==n&&Di(this._cachedMeta),this.index=n}linkScales(){const n=this.chart,t=this._cachedMeta,r=this.getDataset(),e=(d,M,h,y)=>d==="x"?M:d==="r"?y:h,o=t.xAxisID=ke(r.xAxisID,Il(n,"x")),a=t.yAxisID=ke(r.yAxisID,Il(n,"y")),s=t.rAxisID=ke(r.rAxisID,Il(n,"r")),l=t.indexAxis,u=t.iAxisID=e(l,o,a,s),f=t.vAxisID=e(l,a,o,s);t.xScale=this.getScaleForId(o),t.yScale=this.getScaleForId(a),t.rScale=this.getScaleForId(s),t.iScale=this.getScaleForId(u),t.vScale=this.getScaleForId(f)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(n){return this.chart.scales[n]}_getOtherScale(n){const t=this._cachedMeta;return n===t.iScale?t.vScale:t.iScale}reset(){this._update("reset")}_destroy(){const n=this._cachedMeta;this._data&&Ad(this._data,this),n._stacked&&Di(n)}_dataCheck(){const n=this.getDataset(),t=n.data||(n.data=[]),r=this._data;if(Ae(t))this._data=ox(t);else if(r!==t){if(r){Ad(r,this);const e=this._cachedMeta;Di(e),e._parsed=[]}t&&Object.isExtensible(t)&&A4(t,this),this._syncList=[],this._data=t}}addElements(){const n=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(n.dataset=new this.datasetElementType)}buildOrUpdateElements(n){const t=this._cachedMeta,r=this.getDataset();let e=!1;this._dataCheck();const o=t._stacked;t._stacked=Nf(t.vScale,t),t.stack!==r.stack&&(e=!0,Di(t),t.stack=r.stack),this._resyncElements(n),(e||o!==t._stacked)&&If(this,t._parsed)}configure(){const n=this.chart.config,t=n.datasetScopeKeys(this._type),r=n.getOptionScopes(this.getDataset(),t,!0);this.options=n.createResolver(r,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(n,t){const{_cachedMeta:r,_data:e}=this,{iScale:o,_stacked:a}=r,s=o.axis;let l=n===0&&t===e.length?!0:r._sorted,u=n>0&&r._parsed[n-1],f,d,M;if(this._parsing===!1)r._parsed=e,r._sorted=!0,M=e;else{Ze(e[n])?M=this.parseArrayData(r,e,n,t):Ae(e[n])?M=this.parseObjectData(r,e,n,t):M=this.parsePrimitiveData(r,e,n,t);const h=()=>d[s]===null||u&&d[s]<u[s];for(f=0;f<t;++f)r._parsed[f+n]=d=M[f],l&&(h()&&(l=!1),u=d);r._sorted=l}a&&If(this,M)}parsePrimitiveData(n,t,r,e){const{iScale:o,vScale:a}=n,s=o.axis,l=a.axis,u=o.getLabels(),f=o===a,d=new Array(e);let M,h,y;for(M=0,h=e;M<h;++M)y=M+r,d[M]={[s]:f||o.parse(u[y],y),[l]:a.parse(t[y],y)};return d}parseArrayData(n,t,r,e){const{xScale:o,yScale:a}=n,s=new Array(e);let l,u,f,d;for(l=0,u=e;l<u;++l)f=l+r,d=t[f],s[l]={x:o.parse(d[0],f),y:a.parse(d[1],f)};return s}parseObjectData(n,t,r,e){const{xScale:o,yScale:a}=n,{xAxisKey:s="x",yAxisKey:l="y"}=this._parsing,u=new Array(e);let f,d,M,h;for(f=0,d=e;f<d;++f)M=f+r,h=t[M],u[f]={x:o.parse(hn(h,s),M),y:a.parse(hn(h,l),M)};return u}getParsed(n){return this._cachedMeta._parsed[n]}getDataElement(n){return this._cachedMeta.data[n]}applyStack(n,t,r){const e=this.chart,o=this._cachedMeta,a=t[n.axis],s={keys:yf(e,!0),values:t._stacks[n.axis]};return pf(s,a,o.index,{mode:r})}updateRangeFromParsed(n,t,r,e){const o=r[t.axis];let a=o===null?NaN:o;const s=e&&r._stacks[t.axis];e&&s&&(e.values=s,a=pf(e,o,this._cachedMeta.index)),n.min=Math.min(n.min,a),n.max=Math.max(n.max,a)}getMinMax(n,t){const r=this._cachedMeta,e=r._parsed,o=r._sorted&&n===r.iScale,a=e.length,s=this._getOtherScale(n),l=dx(t,r,this.chart),u={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:f,max:d}=sx(s);let M,h;function y(){h=e[M];const p=h[s.axis];return!rt(h[n.axis])||f>p||d<p}for(M=0;M<a&&!(!y()&&(this.updateRangeFromParsed(u,n,h,l),o));++M);if(o){for(M=a-1;M>=0;--M)if(!y()){this.updateRangeFromParsed(u,n,h,l);break}}return u}getAllParsedValues(n){const t=this._cachedMeta._parsed,r=[];let e,o,a;for(e=0,o=t.length;e<o;++e)a=t[e][n.axis],rt(a)&&r.push(a);return r}getMaxOverflow(){return!1}getLabelAndValue(n){const t=this._cachedMeta,r=t.iScale,e=t.vScale,o=this.getParsed(n);return{label:r?""+r.getLabelForValue(o[r.axis]):"",value:e?""+e.getLabelForValue(o[e.axis]):""}}_update(n){const t=this._cachedMeta;this.update(n||"default"),t._clip=rx(ke(this.options.clip,ix(t.xScale,t.yScale,this.getMaxOverflow())))}update(n){}draw(){const n=this._ctx,t=this.chart,r=this._cachedMeta,e=r.data||[],o=t.chartArea,a=[],s=this._drawStart||0,l=this._drawCount||e.length-s,u=this.options.drawActiveElementsOnTop;let f;for(r.dataset&&r.dataset.draw(n,o,s,l),f=s;f<s+l;++f){const d=e[f];d.hidden||(d.active&&u?a.push(d):d.draw(n,o))}for(f=0;f<a.length;++f)a[f].draw(n,o)}getStyle(n,t){const r=t?"active":"default";return n===void 0&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(r):this.resolveDataElementOptions(n||0,r)}getContext(n,t,r){const e=this.getDataset();let o;if(n>=0&&n<this._cachedMeta.data.length){const a=this._cachedMeta.data[n];o=a.$context||(a.$context=cx(this.getContext(),n,a)),o.parsed=this.getParsed(n),o.raw=e.data[n],o.index=o.dataIndex=n}else o=this.$context||(this.$context=ux(this.chart.getContext(),this.index)),o.dataset=e,o.index=o.datasetIndex=this.index;return o.active=!!t,o.mode=r,o}resolveDatasetElementOptions(n){return this._resolveElementOptions(this.datasetElementType.id,n)}resolveDataElementOptions(n,t){return this._resolveElementOptions(this.dataElementType.id,t,n)}_resolveElementOptions(n,t="default",r){const e=t==="active",o=this._cachedDataOpts,a=n+"-"+t,s=o[a],l=this.enableOptionSharing&&xt(r);if(s)return jf(s,l);const u=this.chart.config,f=u.datasetElementScopeKeys(this._type,n),d=e?[`${n}Hover`,"hover",n,""]:[n,""],M=u.getOptionScopes(this.getDataset(),f),h=Object.keys(Te.elements[n]),y=()=>this.getContext(r,e),p=u.resolveNamedOptions(M,h,y,d);return p.$shared&&(p.$shared=l,o[a]=Object.freeze(jf(p,l))),p}_resolveAnimations(n,t,r){const e=this.chart,o=this._cachedDataOpts,a=`animation-${t}`,s=o[a];if(s)return s;let l;if(e.options.animation!==!1){const f=this.chart.config,d=f.datasetAnimationScopeKeys(this._type,t),M=f.getOptionScopes(this.getDataset(),d);l=f.createResolver(M,this.getContext(n,r,t))}const u=new gf(e,l&&l.animations);return l&&l._cacheable&&(o[a]=Object.freeze(u)),u}getSharedOptions(n){if(!!n.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},n))}includeOptions(n,t){return!t||jl(n)||this.chart._animationsDisabled}_getSharedOptions(n,t){const r=this.resolveDataElementOptions(n,t),e=this._sharedOptions,o=this.getSharedOptions(r),a=this.includeOptions(t,o)||o!==e;return this.updateSharedOptions(o,t,r),{sharedOptions:o,includeOptions:a}}updateElement(n,t,r,e){jl(e)?Object.assign(n,r):this._resolveAnimations(t,e).update(n,r)}updateSharedOptions(n,t,r){n&&!jl(t)&&this._resolveAnimations(void 0,t).update(n,r)}_setStyle(n,t,r,e){n.active=e;const o=this.getStyle(t,e);this._resolveAnimations(t,r,e).update(n,{options:!e&&this.getSharedOptions(o)||o})}removeHoverStyle(n,t,r){this._setStyle(n,r,"active",!1)}setHoverStyle(n,t,r){this._setStyle(n,r,"active",!0)}_removeDatasetHoverStyle(){const n=this._cachedMeta.dataset;n&&this._setStyle(n,void 0,"active",!1)}_setDatasetHoverStyle(){const n=this._cachedMeta.dataset;n&&this._setStyle(n,void 0,"active",!0)}_resyncElements(n){const t=this._data,r=this._cachedMeta.data;for(const[s,l,u]of this._syncList)this[s](l,u);this._syncList=[];const e=r.length,o=t.length,a=Math.min(o,e);a&&this.parse(0,a),o>e?this._insertElements(e,o-e,n):o<e&&this._removeElements(o,e-o)}_insertElements(n,t,r=!0){const e=this._cachedMeta,o=e.data,a=n+t;let s;const l=u=>{for(u.length+=t,s=u.length-1;s>=a;s--)u[s]=u[s-t]};for(l(o),s=n;s<a;++s)o[s]=new this.dataElementType;this._parsing&&l(e._parsed),this.parse(n,t),r&&this.updateElements(o,n,t,"reset")}updateElements(n,t,r,e){}_removeElements(n,t){const r=this._cachedMeta;if(this._parsing){const e=r._parsed.splice(n,t);r._stacked&&Di(r,e)}r.data.splice(n,t)}_sync(n){if(this._parsing)this._syncList.push(n);else{const[t,r,e]=n;this[t](r,e)}this.chart._dataChanges.push([this.index,...n])}_onDataPush(){const n=arguments.length;this._sync(["_insertElements",this.getDataset().data.length-n,n])}_onDataPop(){this._sync(["_removeElements",this._cachedMeta.data.length-1,1])}_onDataShift(){this._sync(["_removeElements",0,1])}_onDataSplice(n,t){t&&this._sync(["_removeElements",n,t]);const r=arguments.length-2;r&&this._sync(["_insertElements",n,r])}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length])}}Ct.defaults={},Ct.prototype.datasetElementType=null,Ct.prototype.dataElementType=null;function fx(i,n){if(!i._cache.$bar){const t=i.getMatchingVisibleMetas(n);let r=[];for(let e=0,o=t.length;e<o;e++)r=r.concat(t[e].controller.getAllParsedValues(i));i._cache.$bar=kd(r.sort((e,o)=>e-o))}return i._cache.$bar}function Mx(i){const n=i.iScale,t=fx(n,i.type);let r=n._length,e,o,a,s;const l=()=>{a===32767||a===-32768||(xt(s)&&(r=Math.min(r,Math.abs(a-s)||r)),s=a)};for(e=0,o=t.length;e<o;++e)a=n.getPixelForValue(t[e]),l();for(s=void 0,e=0,o=n.ticks.length;e<o;++e)a=n.getPixelForTick(e),l();return r}function gx(i,n,t,r){const e=t.barThickness;let o,a;return Se(e)?(o=n.min*t.categoryPercentage,a=t.barPercentage):(o=e*r,a=1),{chunk:o/r,ratio:a,start:n.pixels[i]-o/2}}function hx(i,n,t,r){const e=n.pixels,o=e[i];let a=i>0?e[i-1]:null,s=i<e.length-1?e[i+1]:null;const l=t.categoryPercentage;a===null&&(a=o-(s===null?n.end-n.start:s-o)),s===null&&(s=o+o-a);const u=o-(o-Math.min(a,s))/2*l;return{chunk:Math.abs(s-a)/2*l/r,ratio:t.barPercentage,start:u}}function yx(i,n,t,r){const e=t.parse(i[0],r),o=t.parse(i[1],r),a=Math.min(e,o),s=Math.max(e,o);let l=a,u=s;Math.abs(a)>Math.abs(s)&&(l=s,u=a),n[t.axis]=u,n._custom={barStart:l,barEnd:u,start:e,end:o,min:a,max:s}}function Df(i,n,t,r){return Ze(i)?yx(i,n,t,r):n[t.axis]=t.parse(i,r),n}function xf(i,n,t,r){const e=i.iScale,o=i.vScale,a=e.getLabels(),s=e===o,l=[];let u,f,d,M;for(u=t,f=t+r;u<f;++u)M=n[u],d={},d[e.axis]=s||e.parse(a[u],u),l.push(Df(M,d,o,u));return l}function Dl(i){return i&&i.barStart!==void 0&&i.barEnd!==void 0}function px(i,n,t){return i!==0?Vt(i):(n.isHorizontal()?1:-1)*(n.min>=t?1:-1)}function Nx(i){let n,t,r,e,o;return i.horizontal?(n=i.base>i.x,t="left",r="right"):(n=i.base<i.y,t="bottom",r="top"),n?(e="end",o="start"):(e="start",o="end"),{start:t,end:r,reverse:n,top:e,bottom:o}}function mx(i,n,t,r){let e=n.borderSkipped;const o={};if(!e){i.borderSkipped=o;return}if(e===!0){i.borderSkipped={top:!0,right:!0,bottom:!0,left:!0};return}const{start:a,end:s,reverse:l,top:u,bottom:f}=Nx(i);e==="middle"&&t&&(i.enableBorderRadius=!0,(t._top||0)===r?e=u:(t._bottom||0)===r?e=f:(o[bf(f,a,s,l)]=!0,e=u)),o[bf(e,a,s,l)]=!0,i.borderSkipped=o}function bf(i,n,t,r){return r?(i=Ix(i,n,t),i=vf(i,t,n)):i=vf(i,n,t),i}function Ix(i,n,t){return i===n?t:i===t?n:i}function vf(i,n,t){return i==="start"?n:i==="end"?t:i}function jx(i,{inflateAmount:n},t){i.inflateAmount=n==="auto"?t===1?.33:0:n}class Eo extends Ct{parsePrimitiveData(n,t,r,e){return xf(n,t,r,e)}parseArrayData(n,t,r,e){return xf(n,t,r,e)}parseObjectData(n,t,r,e){const{iScale:o,vScale:a}=n,{xAxisKey:s="x",yAxisKey:l="y"}=this._parsing,u=o.axis==="x"?s:l,f=a.axis==="x"?s:l,d=[];let M,h,y,p;for(M=r,h=r+e;M<h;++M)p=t[M],y={},y[o.axis]=o.parse(hn(p,u),M),d.push(Df(hn(p,f),y,a,M));return d}updateRangeFromParsed(n,t,r,e){super.updateRangeFromParsed(n,t,r,e);const o=r._custom;o&&t===this._cachedMeta.vScale&&(n.min=Math.min(n.min,o.min),n.max=Math.max(n.max,o.max))}getMaxOverflow(){return 0}getLabelAndValue(n){const t=this._cachedMeta,{iScale:r,vScale:e}=t,o=this.getParsed(n),a=o._custom,s=Dl(a)?"["+a.start+", "+a.end+"]":""+e.getLabelForValue(o[e.axis]);return{label:""+r.getLabelForValue(o[r.axis]),value:s}}initialize(){this.enableOptionSharing=!0,super.initialize();const n=this._cachedMeta;n.stack=this.getDataset().stack}update(n){const t=this._cachedMeta;this.updateElements(t.data,0,t.data.length,n)}updateElements(n,t,r,e){const o=e==="reset",{index:a,_cachedMeta:{vScale:s}}=this,l=s.getBasePixel(),u=s.isHorizontal(),f=this._getRuler(),{sharedOptions:d,includeOptions:M}=this._getSharedOptions(t,e);for(let h=t;h<t+r;h++){const y=this.getParsed(h),p=o||Se(y[s.axis])?{base:l,head:l}:this._calculateBarValuePixels(h),N=this._calculateBarIndexPixels(h,f),g=(y._stacks||{})[s.axis],I={horizontal:u,base:p.base,enableBorderRadius:!g||Dl(y._custom)||a===g._top||a===g._bottom,x:u?p.head:N.center,y:u?N.center:p.head,height:u?N.size:Math.abs(p.size),width:u?Math.abs(p.size):N.size};M&&(I.options=d||this.resolveDataElementOptions(h,n[h].active?"active":e));const x=I.options||n[h].options;mx(I,x,g,a),jx(I,x,f.ratio),this.updateElement(n[h],h,I,e)}}_getStacks(n,t){const{iScale:r}=this._cachedMeta,e=r.getMatchingVisibleMetas(this._type).filter(l=>l.controller.options.grouped),o=r.options.stacked,a=[],s=l=>{const u=l.controller.getParsed(t),f=u&&u[l.vScale.axis];if(Se(f)||isNaN(f))return!0};for(const l of e)if(!(t!==void 0&&s(l))&&((o===!1||a.indexOf(l.stack)===-1||o===void 0&&l.stack===void 0)&&a.push(l.stack),l.index===n))break;return a.length||a.push(void 0),a}_getStackCount(n){return this._getStacks(void 0,n).length}_getStackIndex(n,t,r){const e=this._getStacks(n,r),o=t!==void 0?e.indexOf(t):-1;return o===-1?e.length-1:o}_getRuler(){const n=this.options,t=this._cachedMeta,r=t.iScale,e=[];let o,a;for(o=0,a=t.data.length;o<a;++o)e.push(r.getPixelForValue(this.getParsed(o)[r.axis],o));const s=n.barThickness;return{min:s||Mx(t),pixels:e,start:r._startPixel,end:r._endPixel,stackCount:this._getStackCount(),scale:r,grouped:n.grouped,ratio:s?1:n.categoryPercentage*n.barPercentage}}_calculateBarValuePixels(n){const{_cachedMeta:{vScale:t,_stacked:r},options:{base:e,minBarLength:o}}=this,a=e||0,s=this.getParsed(n),l=s._custom,u=Dl(l);let f=s[t.axis],d=0,M=r?this.applyStack(t,s,r):f,h,y;M!==f&&(d=M-f,M=f),u&&(f=l.barStart,M=l.barEnd-l.barStart,f!==0&&Vt(f)!==Vt(l.barEnd)&&(d=0),d+=f);const p=!Se(e)&&!u?e:d;let N=t.getPixelForValue(p);if(this.chart.getDataVisibility(n)?h=t.getPixelForValue(d+M):h=N,y=h-N,Math.abs(y)<o){y=px(y,t,a)*o,f===a&&(N-=y/2);const g=t.getPixelForDecimal(0),I=t.getPixelForDecimal(1),x=Math.min(g,I),T=Math.max(g,I);N=Math.max(Math.min(N,T),x),h=N+y}if(N===t.getPixelForValue(a)){const g=Vt(y)*t.getLineWidthForValue(a)/2;N+=g,y-=g}return{size:y,base:N,head:h,center:h+y/2}}_calculateBarIndexPixels(n,t){const r=t.scale,e=this.options,o=e.skipNull,a=ke(e.maxBarThickness,1/0);let s,l;if(t.grouped){const u=o?this._getStackCount(n):t.stackCount,f=e.barThickness==="flex"?hx(n,t,e,u):gx(n,t,e,u),d=this._getStackIndex(this.index,this._cachedMeta.stack,o?n:void 0);s=f.start+f.chunk*d+f.chunk/2,l=Math.min(a,f.chunk*f.ratio)}else s=r.getPixelForValue(this.getParsed(n)[r.axis],n),l=Math.min(a,t.min*t.ratio);return{base:s-l/2,head:s+l/2,center:s,size:l}}draw(){const n=this._cachedMeta,t=n.vScale,r=n.data,e=r.length;let o=0;for(;o<e;++o)this.getParsed(o)[t.axis]!==null&&r[o].draw(this._ctx)}}Eo.id="bar",Eo.defaults={datasetElementType:!1,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}},Eo.overrides={scales:{_index_:{type:"category",offset:!0,grid:{offset:!0}},_value_:{type:"linear",beginAtZero:!0}}};class xl extends Ct{initialize(){this.enableOptionSharing=!0,super.initialize()}parsePrimitiveData(n,t,r,e){const o=super.parsePrimitiveData(n,t,r,e);for(let a=0;a<o.length;a++)o[a]._custom=this.resolveDataElementOptions(a+r).radius;return o}parseArrayData(n,t,r,e){const o=super.parseArrayData(n,t,r,e);for(let a=0;a<o.length;a++){const s=t[r+a];o[a]._custom=ke(s[2],this.resolveDataElementOptions(a+r).radius)}return o}parseObjectData(n,t,r,e){const o=super.parseObjectData(n,t,r,e);for(let a=0;a<o.length;a++){const s=t[r+a];o[a]._custom=ke(s&&s.r&&+s.r,this.resolveDataElementOptions(a+r).radius)}return o}getMaxOverflow(){const n=this._cachedMeta.data;let t=0;for(let r=n.length-1;r>=0;--r)t=Math.max(t,n[r].size(this.resolveDataElementOptions(r))/2);return t>0&&t}getLabelAndValue(n){const t=this._cachedMeta,{xScale:r,yScale:e}=t,o=this.getParsed(n),a=r.getLabelForValue(o.x),s=e.getLabelForValue(o.y),l=o._custom;return{label:t.label,value:"("+a+", "+s+(l?", "+l:"")+")"}}update(n){const t=this._cachedMeta.data;this.updateElements(t,0,t.length,n)}updateElements(n,t,r,e){const o=e==="reset",{iScale:a,vScale:s}=this._cachedMeta,{sharedOptions:l,includeOptions:u}=this._getSharedOptions(t,e),f=a.axis,d=s.axis;for(let M=t;M<t+r;M++){const h=n[M],y=!o&&this.getParsed(M),p={},N=p[f]=o?a.getPixelForDecimal(.5):a.getPixelForValue(y[f]),g=p[d]=o?s.getBasePixel():s.getPixelForValue(y[d]);p.skip=isNaN(N)||isNaN(g),u&&(p.options=l||this.resolveDataElementOptions(M,h.active?"active":e),o&&(p.options.radius=0)),this.updateElement(h,M,p,e)}}resolveDataElementOptions(n,t){const r=this.getParsed(n);let e=super.resolveDataElementOptions(n,t);e.$shared&&(e=Object.assign({},e,{$shared:!1}));const o=e.radius;return t!=="active"&&(e.radius=0),e.radius+=ke(r&&r._custom,o),e}}xl.id="bubble",xl.defaults={datasetElementType:!1,dataElementType:"point",animations:{numbers:{type:"number",properties:["x","y","borderWidth","radius"]}}},xl.overrides={scales:{x:{type:"linear"},y:{type:"linear"}},plugins:{tooltip:{callbacks:{title(){return""}}}}};function Dx(i,n,t){let r=1,e=1,o=0,a=0;if(n<Ye){const s=i,l=s+n,u=Math.cos(s),f=Math.sin(s),d=Math.cos(l),M=Math.sin(l),h=(x,T,j)=>hi(x,s,l,!0)?1:Math.max(T,T*t,j,j*t),y=(x,T,j)=>hi(x,s,l,!0)?-1:Math.min(T,T*t,j,j*t),p=h(0,u,d),N=h(Xe,f,M),g=y(Je,u,d),I=y(Je+Xe,f,M);r=(p-g)/2,e=(N-I)/2,o=-(p+g)/2,a=-(N+I)/2}return{ratioX:r,ratioY:e,offsetX:o,offsetY:a}}class xi extends Ct{constructor(n,t){super(n,t),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(n,t){const r=this.getDataset().data,e=this._cachedMeta;if(this._parsing===!1)e._parsed=r;else{let o=l=>+r[l];if(Ae(r[n])){const{key:l="value"}=this._parsing;o=u=>+hn(r[u],l)}let a,s;for(a=n,s=n+t;a<s;++a)e._parsed[a]=o(a)}}_getRotation(){return Ot(this.options.rotation-90)}_getCircumference(){return Ot(this.options.circumference)}_getRotationExtents(){let n=Ye,t=-Ye;for(let r=0;r<this.chart.data.datasets.length;++r)if(this.chart.isDatasetVisible(r)){const e=this.chart.getDatasetMeta(r).controller,o=e._getRotation(),a=e._getCircumference();n=Math.min(n,o),t=Math.max(t,o+a)}return{rotation:n,circumference:t-n}}update(n){const t=this.chart,{chartArea:r}=t,e=this._cachedMeta,o=e.data,a=this.getMaxBorderWidth()+this.getMaxOffset(o)+this.options.spacing,s=Math.max((Math.min(r.width,r.height)-a)/2,0),l=Math.min(M4(this.options.cutout,s),1),u=this._getRingWeight(this.index),{circumference:f,rotation:d}=this._getRotationExtents(),{ratioX:M,ratioY:h,offsetX:y,offsetY:p}=Dx(d,f,l),N=(r.width-a)/M,g=(r.height-a)/h,I=Math.max(Math.min(N,g)/2,0),x=pd(this.options.radius,I),T=Math.max(x*l,0),j=(x-T)/this._getVisibleDatasetWeightTotal();this.offsetX=y*x,this.offsetY=p*x,e.total=this.calculateTotal(),this.outerRadius=x-j*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-j*u,0),this.updateElements(o,0,o.length,n)}_circumference(n,t){const r=this.options,e=this._cachedMeta,o=this._getCircumference();return t&&r.animation.animateRotate||!this.chart.getDataVisibility(n)||e._parsed[n]===null||e.data[n].hidden?0:this.calculateCircumference(e._parsed[n]*o/Ye)}updateElements(n,t,r,e){const o=e==="reset",a=this.chart,s=a.chartArea,u=a.options.animation,f=(s.left+s.right)/2,d=(s.top+s.bottom)/2,M=o&&u.animateScale,h=M?0:this.innerRadius,y=M?0:this.outerRadius,{sharedOptions:p,includeOptions:N}=this._getSharedOptions(t,e);let g=this._getRotation(),I;for(I=0;I<t;++I)g+=this._circumference(I,o);for(I=t;I<t+r;++I){const x=this._circumference(I,o),T=n[I],j={x:f+this.offsetX,y:d+this.offsetY,startAngle:g,endAngle:g+x,circumference:x,outerRadius:y,innerRadius:h};N&&(j.options=p||this.resolveDataElementOptions(I,T.active?"active":e)),g+=x,this.updateElement(T,I,j,e)}}calculateTotal(){const n=this._cachedMeta,t=n.data;let r=0,e;for(e=0;e<t.length;e++){const o=n._parsed[e];o!==null&&!isNaN(o)&&this.chart.getDataVisibility(e)&&!t[e].hidden&&(r+=Math.abs(o))}return r}calculateCircumference(n){const t=this._cachedMeta.total;return t>0&&!isNaN(n)?Ye*(Math.abs(n)/t):0}getLabelAndValue(n){const t=this._cachedMeta,r=this.chart,e=r.data.labels||[],o=ji(t._parsed[n],r.options.locale);return{label:e[n]||"",value:o}}getMaxBorderWidth(n){let t=0;const r=this.chart;let e,o,a,s,l;if(!n){for(e=0,o=r.data.datasets.length;e<o;++e)if(r.isDatasetVisible(e)){a=r.getDatasetMeta(e),n=a.data,s=a.controller;break}}if(!n)return 0;for(e=0,o=n.length;e<o;++e)l=s.resolveDataElementOptions(e),l.borderAlign!=="inner"&&(t=Math.max(t,l.borderWidth||0,l.hoverBorderWidth||0));return t}getMaxOffset(n){let t=0;for(let r=0,e=n.length;r<e;++r){const o=this.resolveDataElementOptions(r);t=Math.max(t,o.offset||0,o.hoverOffset||0)}return t}_getRingWeightOffset(n){let t=0;for(let r=0;r<n;++r)this.chart.isDatasetVisible(r)&&(t+=this._getRingWeight(r));return t}_getRingWeight(n){return Math.max(ke(this.chart.data.datasets[n].weight,1),0)}_getVisibleDatasetWeightTotal(){return this._getRingWeightOffset(this.chart.data.datasets.length)||1}}xi.id="doughnut",xi.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"},xi.descriptors={_scriptable:i=>i!=="spacing",_indexable:i=>i!=="spacing"},xi.overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(i){const n=i.data;if(n.labels.length&&n.datasets.length){const{labels:{pointStyle:t}}=i.legend.options;return n.labels.map((r,e)=>{const a=i.getDatasetMeta(0).controller.getStyle(e);return{text:r,fillStyle:a.backgroundColor,strokeStyle:a.borderColor,lineWidth:a.borderWidth,pointStyle:t,hidden:!i.getDataVisibility(e),index:e}})}return[]}},onClick(i,n,t){t.chart.toggleDataVisibility(n.index),t.chart.update()}},tooltip:{callbacks:{title(){return""},label(i){let n=i.label;const t=": "+i.formattedValue;return Ze(n)?(n=n.slice(),n[0]+=t):n+=t,n}}}}};class bl extends Ct{initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(n){const t=this._cachedMeta,{dataset:r,data:e=[],_dataset:o}=t,a=this.chart._animationsDisabled;let{start:s,count:l}=Sd(t,e,a);this._drawStart=s,this._drawCount=l,Od(t)&&(s=0,l=e.length),r._chart=this.chart,r._datasetIndex=this.index,r._decimated=!!o._decimated,r.points=e;const u=this.resolveDatasetElementOptions(n);this.options.showLine||(u.borderWidth=0),u.segment=this.options.segment,this.updateElement(r,void 0,{animated:!a,options:u},n),this.updateElements(e,s,l,n)}updateElements(n,t,r,e){const o=e==="reset",{iScale:a,vScale:s,_stacked:l,_dataset:u}=this._cachedMeta,{sharedOptions:f,includeOptions:d}=this._getSharedOptions(t,e),M=a.axis,h=s.axis,{spanGaps:y,segment:p}=this.options,N=Wn(y)?y:Number.POSITIVE_INFINITY,g=this.chart._animationsDisabled||o||e==="none";let I=t>0&&this.getParsed(t-1);for(let x=t;x<t+r;++x){const T=n[x],j=this.getParsed(x),v=g?T:{},w=Se(j[h]),A=v[M]=a.getPixelForValue(j[M],x),k=v[h]=o||w?s.getBasePixel():s.getPixelForValue(l?this.applyStack(s,j,l):j[h],x);v.skip=isNaN(A)||isNaN(k)||w,v.stop=x>0&&Math.abs(j[M]-I[M])>N,p&&(v.parsed=j,v.raw=u.data[x]),d&&(v.options=f||this.resolveDataElementOptions(x,T.active?"active":e)),g||this.updateElement(T,x,v,e),I=j}}getMaxOverflow(){const n=this._cachedMeta,t=n.dataset,r=t.options&&t.options.borderWidth||0,e=n.data||[];if(!e.length)return r;const o=e[0].size(this.resolveDataElementOptions(0)),a=e[e.length-1].size(this.resolveDataElementOptions(e.length-1));return Math.max(r,o,a)/2}draw(){const n=this._cachedMeta;n.dataset.updateControlPoints(this.chart.chartArea,n.iScale.axis),super.draw()}}bl.id="line",bl.defaults={datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1},bl.overrides={scales:{_index_:{type:"category"},_value_:{type:"linear"}}};class vl extends Ct{constructor(n,t){super(n,t),this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(n){const t=this._cachedMeta,r=this.chart,e=r.data.labels||[],o=ji(t._parsed[n].r,r.options.locale);return{label:e[n]||"",value:o}}parseObjectData(n,t,r,e){return nf.bind(this)(n,t,r,e)}update(n){const t=this._cachedMeta.data;this._updateRadius(),this.updateElements(t,0,t.length,n)}getMinMax(){const n=this._cachedMeta,t={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY};return n.data.forEach((r,e)=>{const o=this.getParsed(e).r;!isNaN(o)&&this.chart.getDataVisibility(e)&&(o<t.min&&(t.min=o),o>t.max&&(t.max=o))}),t}_updateRadius(){const n=this.chart,t=n.chartArea,r=n.options,e=Math.min(t.right-t.left,t.bottom-t.top),o=Math.max(e/2,0),a=Math.max(r.cutoutPercentage?o/100*r.cutoutPercentage:1,0),s=(o-a)/n.getVisibleDatasetCount();this.outerRadius=o-s*this.index,this.innerRadius=this.outerRadius-s}updateElements(n,t,r,e){const o=e==="reset",a=this.chart,l=a.options.animation,u=this._cachedMeta.rScale,f=u.xCenter,d=u.yCenter,M=u.getIndexAngle(0)-.5*Je;let h=M,y;const p=360/this.countVisibleElements();for(y=0;y<t;++y)h+=this._computeAngle(y,e,p);for(y=t;y<t+r;y++){const N=n[y];let g=h,I=h+this._computeAngle(y,e,p),x=a.getDataVisibility(y)?u.getDistanceFromCenterForValue(this.getParsed(y).r):0;h=I,o&&(l.animateScale&&(x=0),l.animateRotate&&(g=I=M));const T={x:f,y:d,innerRadius:0,outerRadius:x,startAngle:g,endAngle:I,options:this.resolveDataElementOptions(y,N.active?"active":e)};this.updateElement(N,y,T,e)}}countVisibleElements(){const n=this._cachedMeta;let t=0;return n.data.forEach((r,e)=>{!isNaN(this.getParsed(e).r)&&this.chart.getDataVisibility(e)&&t++}),t}_computeAngle(n,t,r){return this.chart.getDataVisibility(n)?Ot(this.resolveDataElementOptions(n,t).angle||r):0}}vl.id="polarArea",vl.defaults={dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0},vl.overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(i){const n=i.data;if(n.labels.length&&n.datasets.length){const{labels:{pointStyle:t}}=i.legend.options;return n.labels.map((r,e)=>{const a=i.getDatasetMeta(0).controller.getStyle(e);return{text:r,fillStyle:a.backgroundColor,strokeStyle:a.borderColor,lineWidth:a.borderWidth,pointStyle:t,hidden:!i.getDataVisibility(e),index:e}})}return[]}},onClick(i,n,t){t.chart.toggleDataVisibility(n.index),t.chart.update()}},tooltip:{callbacks:{title(){return""},label(i){return i.chart.data.labels[i.dataIndex]+": "+i.formattedValue}}}},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}};class Tf extends xi{}Tf.id="pie",Tf.defaults={cutout:0,rotation:0,circumference:360,radius:"100%"};class Tl extends Ct{getLabelAndValue(n){const t=this._cachedMeta.vScale,r=this.getParsed(n);return{label:t.getLabels()[n],value:""+t.getLabelForValue(r[t.axis])}}parseObjectData(n,t,r,e){return nf.bind(this)(n,t,r,e)}update(n){const t=this._cachedMeta,r=t.dataset,e=t.data||[],o=t.iScale.getLabels();if(r.points=e,n!=="resize"){const a=this.resolveDatasetElementOptions(n);this.options.showLine||(a.borderWidth=0);const s={_loop:!0,_fullLoop:o.length===e.length,options:a};this.updateElement(r,void 0,s,n)}this.updateElements(e,0,e.length,n)}updateElements(n,t,r,e){const o=this._cachedMeta.rScale,a=e==="reset";for(let s=t;s<t+r;s++){const l=n[s],u=this.resolveDataElementOptions(s,l.active?"active":e),f=o.getPointPositionForValue(s,this.getParsed(s).r),d=a?o.xCenter:f.x,M=a?o.yCenter:f.y,h={x:d,y:M,angle:f.angle,skip:isNaN(d)||isNaN(M),options:u};this.updateElement(l,s,h,e)}}}Tl.id="radar",Tl.defaults={datasetElementType:"line",dataElementType:"point",indexAxis:"r",showLine:!0,elements:{line:{fill:"start"}}},Tl.overrides={aspectRatio:1,scales:{r:{type:"radialLinear"}}};class nn{constructor(){this.x=void 0,this.y=void 0,this.active=!1,this.options=void 0,this.$animations=void 0}tooltipPosition(n){const{x:t,y:r}=this.getProps(["x","y"],n);return{x:t,y:r}}hasValue(){return Wn(this.x)&&Wn(this.y)}getProps(n,t){const r=this.$animations;if(!t||!r)return this;const e={};return n.forEach(o=>{e[o]=r[o]&&r[o].active()?r[o]._to:this[o]}),e}}nn.defaults={},nn.defaultRoutes=void 0;const Af={values(i){return Ze(i)?i:""+i},numeric(i,n,t){if(i===0)return"0";const r=this.chart.options.locale;let e,o=i;if(t.length>1){const u=Math.max(Math.abs(t[0].value),Math.abs(t[t.length-1].value));(u<1e-4||u>1e15)&&(e="scientific"),o=xx(i,t)}const a=bt(Math.abs(o)),s=Math.max(Math.min(-1*Math.floor(a),20),0),l={notation:e,minimumFractionDigits:s,maximumFractionDigits:s};return Object.assign(l,this.options.ticks.format),ji(i,r,l)},logarithmic(i,n,t){if(i===0)return"0";const r=i/Math.pow(10,Math.floor(bt(i)));return r===1||r===2||r===5?Af.numeric.call(this,i,n,t):""}};function xx(i,n){let t=n.length>3?n[2].value-n[1].value:n[1].value-n[0].value;return Math.abs(t)>=1&&i!==Math.floor(i)&&(t=i-Math.floor(i)),t}var Co={formatters:Af};Te.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:(i,n)=>n.lineWidth,tickColor:(i,n)=>n.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:Co.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),Te.route("scale.ticks","color","","color"),Te.route("scale.grid","color","","borderColor"),Te.route("scale.grid","borderColor","","borderColor"),Te.route("scale.title","color","","color"),Te.describe("scale",{_fallback:!1,_scriptable:i=>!i.startsWith("before")&&!i.startsWith("after")&&i!=="callback"&&i!=="parser",_indexable:i=>i!=="borderDash"&&i!=="tickBorderDash"}),Te.describe("scales",{_fallback:"scale"}),Te.describe("scale.ticks",{_scriptable:i=>i!=="backdropPadding"&&i!=="callback",_indexable:i=>i!=="backdropPadding"});function bx(i,n){const t=i.options.ticks,r=t.maxTicksLimit||vx(i),e=t.major.enabled?Ax(n):[],o=e.length,a=e[0],s=e[o-1],l=[];if(o>r)return kx(n,l,e,o/r),l;const u=Tx(e,n,r);if(o>0){let f,d;const M=o>1?Math.round((s-a)/(o-1)):null;for(_o(n,l,u,Se(M)?0:a-M,a),f=0,d=o-1;f<d;f++)_o(n,l,u,e[f],e[f+1]);return _o(n,l,u,s,Se(M)?n.length:s+M),l}return _o(n,l,u),l}function vx(i){const n=i.options.offset,t=i._tickSize(),r=i._length/t+(n?0:1),e=i._maxLength/t;return Math.floor(Math.min(r,e))}function Tx(i,n,t){const r=zx(i),e=n.length/t;if(!r)return Math.max(e,1);const o=j4(r);for(let a=0,s=o.length-1;a<s;a++){const l=o[a];if(l>e)return l}return Math.max(e,1)}function Ax(i){const n=[];let t,r;for(t=0,r=i.length;t<r;t++)i[t].major&&n.push(t);return n}function kx(i,n,t,r){let e=0,o=t[0],a;for(r=Math.ceil(r),a=0;a<i.length;a++)a===o&&(n.push(i[a]),e++,o=t[e*r])}function _o(i,n,t,r,e){const o=ke(r,0),a=Math.min(ke(e,i.length),i.length);let s=0,l,u,f;for(t=Math.ceil(t),e&&(l=e-r,t=l/Math.floor(l/t)),f=o;f<0;)s++,f=Math.round(o+s*t);for(u=Math.max(o,0);u<a;u++)u===f&&(n.push(i[u]),s++,f=Math.round(o+s*t))}function zx(i){const n=i.length;let t,r;if(n<2)return!1;for(r=i[0],t=1;t<n;++t)if(i[t]-i[t-1]!==r)return!1;return r}const Lx=i=>i==="left"?"right":i==="right"?"left":i,kf=(i,n,t)=>n==="top"||n==="left"?i[n]+t:i[n]-t;function zf(i,n){const t=[],r=i.length/n,e=i.length;let o=0;for(;o<e;o+=r)t.push(i[Math.floor(o)]);return t}function wx(i,n,t){const r=i.ticks.length,e=Math.min(n,r-1),o=i._startPixel,a=i._endPixel,s=1e-6;let l=i.getPixelForTick(e),u;if(!(t&&(r===1?u=Math.max(l-o,a-l):n===0?u=(i.getPixelForTick(1)-l)/2:u=(l-i.getPixelForTick(e-1))/2,l+=e<n?u:-u,l<o-s||l>a+s)))return l}function Sx(i,n){Ee(i,t=>{const r=t.gc,e=r.length/2;let o;if(e>n){for(o=0;o<e;++o)delete t.data[r[o]];r.splice(0,e)}})}function bi(i){return i.drawTicks?i.tickLength:0}function Lf(i,n){if(!i.display)return 0;const t=yt(i.font,n),r=Tt(i.padding);return(Ze(i.text)?i.text.length:1)*t.lineHeight+r.height}function Ox(i,n){return mn(i,{scale:n,type:"scale"})}function Ex(i,n,t){return mn(i,{tick:t,index:n,type:"tick"})}function Cx(i,n,t){let r=z4(i);return(t&&n!=="right"||!t&&n==="right")&&(r=Lx(r)),r}function _x(i,n,t,r){const{top:e,left:o,bottom:a,right:s,chart:l}=i,{chartArea:u,scales:f}=l;let d=0,M,h,y;const p=a-e,N=s-o;if(i.isHorizontal()){if(h=wd(r,o,s),Ae(t)){const g=Object.keys(t)[0],I=t[g];y=f[g].getPixelForValue(I)+p-n}else t==="center"?y=(u.bottom+u.top)/2+p-n:y=kf(i,t,n);M=s-o}else{if(Ae(t)){const g=Object.keys(t)[0],I=t[g];h=f[g].getPixelForValue(I)-N+n}else t==="center"?h=(u.left+u.right)/2-N+n:h=kf(i,t,n);y=wd(r,a,e),d=t==="left"?-Xe:Xe}return{titleX:h,titleY:y,maxWidth:M,rotation:d}}class Un extends nn{constructor(n){super(),this.id=n.id,this.type=n.type,this.options=void 0,this.ctx=n.ctx,this.chart=n.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(n){this.options=n.setContext(this.getContext()),this.axis=n.axis,this._userMin=this.parse(n.min),this._userMax=this.parse(n.max),this._suggestedMin=this.parse(n.suggestedMin),this._suggestedMax=this.parse(n.suggestedMax)}parse(n,t){return n}getUserBounds(){let{_userMin:n,_userMax:t,_suggestedMin:r,_suggestedMax:e}=this;return n=Dt(n,Number.POSITIVE_INFINITY),t=Dt(t,Number.NEGATIVE_INFINITY),r=Dt(r,Number.POSITIVE_INFINITY),e=Dt(e,Number.NEGATIVE_INFINITY),{min:Dt(n,r),max:Dt(t,e),minDefined:rt(n),maxDefined:rt(t)}}getMinMax(n){let{min:t,max:r,minDefined:e,maxDefined:o}=this.getUserBounds(),a;if(e&&o)return{min:t,max:r};const s=this.getMatchingVisibleMetas();for(let l=0,u=s.length;l<u;++l)a=s[l].controller.getMinMax(this,n),e||(t=Math.min(t,a.min)),o||(r=Math.max(r,a.max));return t=o&&t>r?r:t,r=e&&t>r?t:r,{min:Dt(t,Dt(r,t)),max:Dt(r,Dt(t,r))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const n=this.chart.data;return this.options.labels||(this.isHorizontal()?n.xLabels:n.yLabels)||n.labels||[]}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){$e(this.options.beforeUpdate,[this])}update(n,t,r){const{beginAtZero:e,grace:o,ticks:a}=this.options,s=a.sampleSize;this.beforeUpdate(),this.maxWidth=n,this.maxHeight=t,this._margins=r=Object.assign({left:0,right:0,top:0,bottom:0},r),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+r.left+r.right:this.height+r.top+r.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=c1(this,o,e),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const l=s<this.ticks.length;this._convertTicksToLabels(l?zf(this.ticks,s):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),a.display&&(a.autoSkip||a.source==="auto")&&(this.ticks=bx(this,this.ticks),this._labelSizes=null,this.afterAutoSkip()),l&&this._convertTicksToLabels(this.ticks),this.beforeFit(),this.fit(),this.afterFit(),this.afterUpdate()}configure(){let n=this.options.reverse,t,r;this.isHorizontal()?(t=this.left,r=this.right):(t=this.top,r=this.bottom,n=!n),this._startPixel=t,this._endPixel=r,this._reversePixels=n,this._length=r-t,this._alignToPixels=this.options.alignToPixels}afterUpdate(){$e(this.options.afterUpdate,[this])}beforeSetDimensions(){$e(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(){$e(this.options.afterSetDimensions,[this])}_callHooks(n){this.chart.notifyPlugins(n,this.getContext()),$e(this.options[n],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){$e(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(n){const t=this.options.ticks;let r,e,o;for(r=0,e=n.length;r<e;r++)o=n[r],o.label=$e(t.callback,[o.value,r,n],this)}afterTickToLabelConversion(){$e(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){$e(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){const n=this.options,t=n.ticks,r=this.ticks.length,e=t.minRotation||0,o=t.maxRotation;let a=e,s,l,u;if(!this._isVisible()||!t.display||e>=o||r<=1||!this.isHorizontal()){this.labelRotation=e;return}const f=this._getLabelSizes(),d=f.widest.width,M=f.highest.height,h=st(this.chart.width-d,0,this.maxWidth);s=n.offset?this.maxWidth/r:h/(r-1),d+6>s&&(s=h/(r-(n.offset?.5:1)),l=this.maxHeight-bi(n.grid)-t.padding-Lf(n.title,this.chart.options.font),u=Math.sqrt(d*d+M*M),a=tl(Math.min(Math.asin(st((f.highest.height+6)/s,-1,1)),Math.asin(st(l/u,-1,1))-Math.asin(st(M/u,-1,1)))),a=Math.max(e,Math.min(o,a))),this.labelRotation=a}afterCalculateLabelRotation(){$e(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){$e(this.options.beforeFit,[this])}fit(){const n={width:0,height:0},{chart:t,options:{ticks:r,title:e,grid:o}}=this,a=this._isVisible(),s=this.isHorizontal();if(a){const l=Lf(e,t.options.font);if(s?(n.width=this.maxWidth,n.height=bi(o)+l):(n.height=this.maxHeight,n.width=bi(o)+l),r.display&&this.ticks.length){const{first:u,last:f,widest:d,highest:M}=this._getLabelSizes(),h=r.padding*2,y=Ot(this.labelRotation),p=Math.cos(y),N=Math.sin(y);if(s){const g=r.mirror?0:N*d.width+p*M.height;n.height=Math.min(this.maxHeight,n.height+g+h)}else{const g=r.mirror?0:p*d.width+N*M.height;n.width=Math.min(this.maxWidth,n.width+g+h)}this._calculatePadding(u,f,N,p)}}this._handleMargins(),s?(this.width=this._length=t.width-this._margins.left-this._margins.right,this.height=n.height):(this.width=n.width,this.height=this._length=t.height-this._margins.top-this._margins.bottom)}_calculatePadding(n,t,r,e){const{ticks:{align:o,padding:a},position:s}=this.options,l=this.labelRotation!==0,u=s!=="top"&&this.axis==="x";if(this.isHorizontal()){const f=this.getPixelForTick(0)-this.left,d=this.right-this.getPixelForTick(this.ticks.length-1);let M=0,h=0;l?u?(M=e*n.width,h=r*t.height):(M=r*n.height,h=e*t.width):o==="start"?h=t.width:o==="end"?M=n.width:o!=="inner"&&(M=n.width/2,h=t.width/2),this.paddingLeft=Math.max((M-f+a)*this.width/(this.width-f),0),this.paddingRight=Math.max((h-d+a)*this.width/(this.width-d),0)}else{let f=t.height/2,d=n.height/2;o==="start"?(f=0,d=n.height):o==="end"&&(f=t.height,d=0),this.paddingTop=f+a,this.paddingBottom=d+a}}_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(){$e(this.options.afterFit,[this])}isHorizontal(){const{axis:n,position:t}=this.options;return t==="top"||t==="bottom"||n==="x"}isFullSize(){return this.options.fullSize}_convertTicksToLabels(n){this.beforeTickToLabelConversion(),this.generateTickLabels(n);let t,r;for(t=0,r=n.length;t<r;t++)Se(n[t].label)&&(n.splice(t,1),r--,t--);this.afterTickToLabelConversion()}_getLabelSizes(){let n=this._labelSizes;if(!n){const t=this.options.ticks.sampleSize;let r=this.ticks;t<r.length&&(r=zf(r,t)),this._labelSizes=n=this._computeLabelSizes(r,r.length)}return n}_computeLabelSizes(n,t){const{ctx:r,_longestTextCache:e}=this,o=[],a=[];let s=0,l=0,u,f,d,M,h,y,p,N,g,I,x;for(u=0;u<t;++u){if(M=n[u].label,h=this._resolveTickFontOptions(u),r.font=y=h.string,p=e[y]=e[y]||{data:{},gc:[]},N=h.lineHeight,g=I=0,!Se(M)&&!Ze(M))g=Ao(r,p.data,p.gc,g,M),I=N;else if(Ze(M))for(f=0,d=M.length;f<d;++f)x=M[f],!Se(x)&&!Ze(x)&&(g=Ao(r,p.data,p.gc,g,x),I+=N);o.push(g),a.push(I),s=Math.max(g,s),l=Math.max(I,l)}Sx(e,t);const T=o.indexOf(s),j=a.indexOf(l),v=w=>({width:o[w]||0,height:a[w]||0});return{first:v(0),last:v(t-1),widest:v(T),highest:v(j),widths:o,heights:a}}getLabelForValue(n){return n}getPixelForValue(n,t){return NaN}getValueForPixel(n){}getPixelForTick(n){const t=this.ticks;return n<0||n>t.length-1?null:this.getPixelForValue(t[n].value)}getPixelForDecimal(n){this._reversePixels&&(n=1-n);const t=this._startPixel+n*this._length;return b4(this._alignToPixels?En(this.chart,t,0):t)}getDecimalForPixel(n){const t=(n-this._startPixel)/this._length;return this._reversePixels?1-t:t}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:n,max:t}=this;return n<0&&t<0?t:n>0&&t>0?n:0}getContext(n){const t=this.ticks||[];if(n>=0&&n<t.length){const r=t[n];return r.$context||(r.$context=Ex(this.getContext(),n,r))}return this.$context||(this.$context=Ox(this.chart.getContext(),this))}_tickSize(){const n=this.options.ticks,t=Ot(this.labelRotation),r=Math.abs(Math.cos(t)),e=Math.abs(Math.sin(t)),o=this._getLabelSizes(),a=n.autoSkipPadding||0,s=o?o.widest.width+a:0,l=o?o.highest.height+a:0;return this.isHorizontal()?l*r>s*e?s/r:l/e:l*e<s*r?l/r:s/e}_isVisible(){const n=this.options.display;return n!=="auto"?!!n:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(n){const t=this.axis,r=this.chart,e=this.options,{grid:o,position:a}=e,s=o.offset,l=this.isHorizontal(),f=this.ticks.length+(s?1:0),d=bi(o),M=[],h=o.setContext(this.getContext()),y=h.drawBorder?h.borderWidth:0,p=y/2,N=function(z){return En(r,z,y)};let g,I,x,T,j,v,w,A,k,L,b,m;if(a==="top")g=N(this.bottom),v=this.bottom-d,A=g-p,L=N(n.top)+p,m=n.bottom;else if(a==="bottom")g=N(this.top),L=n.top,m=N(n.bottom)-p,v=g+p,A=this.top+d;else if(a==="left")g=N(this.right),j=this.right-d,w=g-p,k=N(n.left)+p,b=n.right;else if(a==="right")g=N(this.left),k=n.left,b=N(n.right)-p,j=g+p,w=this.left+d;else if(t==="x"){if(a==="center")g=N((n.top+n.bottom)/2+.5);else if(Ae(a)){const z=Object.keys(a)[0],O=a[z];g=N(this.chart.scales[z].getPixelForValue(O))}L=n.top,m=n.bottom,v=g+p,A=v+d}else if(t==="y"){if(a==="center")g=N((n.left+n.right)/2);else if(Ae(a)){const z=Object.keys(a)[0],O=a[z];g=N(this.chart.scales[z].getPixelForValue(O))}j=g-p,w=j-d,k=n.left,b=n.right}const D=ke(e.ticks.maxTicksLimit,f),S=Math.max(1,Math.ceil(f/D));for(I=0;I<f;I+=S){const z=o.setContext(this.getContext(I)),O=z.lineWidth,C=z.color,E=z.borderDash||[],B=z.borderDashOffset,U=z.tickWidth,Q=z.tickColor,_=z.tickBorderDash||[],Y=z.tickBorderDashOffset;x=wx(this,I,s),x!==void 0&&(T=En(r,x,O),l?j=w=k=b=T:v=A=L=m=T,M.push({tx1:j,ty1:v,tx2:w,ty2:A,x1:k,y1:L,x2:b,y2:m,width:O,color:C,borderDash:E,borderDashOffset:B,tickWidth:U,tickColor:Q,tickBorderDash:_,tickBorderDashOffset:Y}))}return this._ticksLength=f,this._borderValue=g,M}_computeLabelItems(n){const t=this.axis,r=this.options,{position:e,ticks:o}=r,a=this.isHorizontal(),s=this.ticks,{align:l,crossAlign:u,padding:f,mirror:d}=o,M=bi(r.grid),h=M+f,y=d?-f:h,p=-Ot(this.labelRotation),N=[];let g,I,x,T,j,v,w,A,k,L,b,m,D="middle";if(e==="top")v=this.bottom-y,w=this._getXAxisLabelAlignment();else if(e==="bottom")v=this.top+y,w=this._getXAxisLabelAlignment();else if(e==="left"){const z=this._getYAxisLabelAlignment(M);w=z.textAlign,j=z.x}else if(e==="right"){const z=this._getYAxisLabelAlignment(M);w=z.textAlign,j=z.x}else if(t==="x"){if(e==="center")v=(n.top+n.bottom)/2+h;else if(Ae(e)){const z=Object.keys(e)[0],O=e[z];v=this.chart.scales[z].getPixelForValue(O)+h}w=this._getXAxisLabelAlignment()}else if(t==="y"){if(e==="center")j=(n.left+n.right)/2-h;else if(Ae(e)){const z=Object.keys(e)[0],O=e[z];j=this.chart.scales[z].getPixelForValue(O)}w=this._getYAxisLabelAlignment(M).textAlign}t==="y"&&(l==="start"?D="top":l==="end"&&(D="bottom"));const S=this._getLabelSizes();for(g=0,I=s.length;g<I;++g){x=s[g],T=x.label;const z=o.setContext(this.getContext(g));A=this.getPixelForTick(g)+o.labelOffset,k=this._resolveTickFontOptions(g),L=k.lineHeight,b=Ze(T)?T.length:1;const O=b/2,C=z.color,E=z.textStrokeColor,B=z.textStrokeWidth;let U=w;a?(j=A,w==="inner"&&(g===I-1?U=this.options.reverse?"left":"right":g===0?U=this.options.reverse?"right":"left":U="center"),e==="top"?u==="near"||p!==0?m=-b*L+L/2:u==="center"?m=-S.highest.height/2-O*L+L:m=-S.highest.height+L/2:u==="near"||p!==0?m=L/2:u==="center"?m=S.highest.height/2-O*L:m=S.highest.height-b*L,d&&(m*=-1)):(v=A,m=(1-b)*L/2);let Q;if(z.showLabelBackdrop){const _=Tt(z.backdropPadding),Y=S.heights[g],V=S.widths[g];let P=v+m-_.top,R=j-_.left;switch(D){case"middle":P-=Y/2;break;case"bottom":P-=Y;break}switch(w){case"center":R-=V/2;break;case"right":R-=V;break}Q={left:R,top:P,width:V+_.width,height:Y+_.height,color:z.backdropColor}}N.push({rotation:p,label:T,font:k,color:C,strokeColor:E,strokeWidth:B,textOffset:m,textAlign:U,textBaseline:D,translation:[j,v],backdrop:Q})}return N}_getXAxisLabelAlignment(){const{position:n,ticks:t}=this.options;if(-Ot(this.labelRotation))return n==="top"?"left":"right";let e="center";return t.align==="start"?e="left":t.align==="end"?e="right":t.align==="inner"&&(e="inner"),e}_getYAxisLabelAlignment(n){const{position:t,ticks:{crossAlign:r,mirror:e,padding:o}}=this.options,a=this._getLabelSizes(),s=n+o,l=a.widest.width;let u,f;return t==="left"?e?(f=this.right+o,r==="near"?u="left":r==="center"?(u="center",f+=l/2):(u="right",f+=l)):(f=this.right-s,r==="near"?u="right":r==="center"?(u="center",f-=l/2):(u="left",f=this.left)):t==="right"?e?(f=this.left+o,r==="near"?u="right":r==="center"?(u="center",f-=l/2):(u="left",f-=l)):(f=this.left+s,r==="near"?u="left":r==="center"?(u="center",f+=l/2):(u="right",f=this.right)):u="right",{textAlign:u,x:f}}_computeLabelArea(){if(this.options.ticks.mirror)return;const n=this.chart,t=this.options.position;if(t==="left"||t==="right")return{top:0,left:this.left,bottom:n.height,right:this.right};if(t==="top"||t==="bottom")return{top:this.top,left:0,bottom:this.bottom,right:n.width}}drawBackground(){const{ctx:n,options:{backgroundColor:t},left:r,top:e,width:o,height:a}=this;t&&(n.save(),n.fillStyle=t,n.fillRect(r,e,o,a),n.restore())}getLineWidthForValue(n){const t=this.options.grid;if(!this._isVisible()||!t.display)return 0;const e=this.ticks.findIndex(o=>o.value===n);return e>=0?t.setContext(this.getContext(e)).lineWidth:0}drawGrid(n){const t=this.options.grid,r=this.ctx,e=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(n));let o,a;const s=(l,u,f)=>{!f.width||!f.color||(r.save(),r.lineWidth=f.width,r.strokeStyle=f.color,r.setLineDash(f.borderDash||[]),r.lineDashOffset=f.borderDashOffset,r.beginPath(),r.moveTo(l.x,l.y),r.lineTo(u.x,u.y),r.stroke(),r.restore())};if(t.display)for(o=0,a=e.length;o<a;++o){const l=e[o];t.drawOnChartArea&&s({x:l.x1,y:l.y1},{x:l.x2,y:l.y2},l),t.drawTicks&&s({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:n,ctx:t,options:{grid:r}}=this,e=r.setContext(this.getContext()),o=r.drawBorder?e.borderWidth:0;if(!o)return;const a=r.setContext(this.getContext(0)).lineWidth,s=this._borderValue;let l,u,f,d;this.isHorizontal()?(l=En(n,this.left,o)-o/2,u=En(n,this.right,a)+a/2,f=d=s):(f=En(n,this.top,o)-o/2,d=En(n,this.bottom,a)+a/2,l=u=s),t.save(),t.lineWidth=e.borderWidth,t.strokeStyle=e.borderColor,t.beginPath(),t.moveTo(l,f),t.lineTo(u,d),t.stroke(),t.restore()}drawLabels(n){if(!this.options.ticks.display)return;const r=this.ctx,e=this._computeLabelArea();e&&Gd(r,e);const o=this._labelItems||(this._labelItems=this._computeLabelItems(n));let a,s;for(a=0,s=o.length;a<s;++a){const l=o[a],u=l.font,f=l.label;l.backdrop&&(r.fillStyle=l.backdrop.color,r.fillRect(l.backdrop.left,l.backdrop.top,l.backdrop.width,l.backdrop.height));let d=l.textOffset;ko(r,f,0,d,u,l)}e&&Wd(r)}drawTitle(){const{ctx:n,options:{position:t,title:r,reverse:e}}=this;if(!r.display)return;const o=yt(r.font),a=Tt(r.padding),s=r.align;let l=o.lineHeight/2;t==="bottom"||t==="center"||Ae(t)?(l+=a.bottom,Ze(r.text)&&(l+=o.lineHeight*(r.text.length-1))):l+=a.top;const{titleX:u,titleY:f,maxWidth:d,rotation:M}=_x(this,l,t,s);ko(n,r.text,0,0,o,{color:r.color,maxWidth:d,rotation:M,textAlign:Cx(s,t,e),textBaseline:"middle",translation:[u,f]})}draw(n){!this._isVisible()||(this.drawBackground(),this.drawGrid(n),this.drawBorder(),this.drawTitle(),this.drawLabels(n))}_layers(){const n=this.options,t=n.ticks&&n.ticks.z||0,r=ke(n.grid&&n.grid.z,-1);return!this._isVisible()||this.draw!==Un.prototype.draw?[{z:t,draw:e=>{this.draw(e)}}]:[{z:r,draw:e=>{this.drawBackground(),this.drawGrid(e),this.drawTitle()}},{z:r+1,draw:()=>{this.drawBorder()}},{z:t,draw:e=>{this.drawLabels(e)}}]}getMatchingVisibleMetas(n){const t=this.chart.getSortedVisibleDatasetMetas(),r=this.axis+"AxisID",e=[];let o,a;for(o=0,a=t.length;o<a;++o){const s=t[o];s[r]===this.id&&(!n||s.type===n)&&e.push(s)}return e}_resolveTickFontOptions(n){const t=this.options.ticks.setContext(this.getContext(n));return yt(t.font)}_maxDigits(){const n=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/n}}class Qo{constructor(n,t,r){this.type=n,this.scope=t,this.override=r,this.items=Object.create(null)}isForType(n){return Object.prototype.isPrototypeOf.call(this.type.prototype,n.prototype)}register(n){const t=Object.getPrototypeOf(n);let r;Yx(t)&&(r=this.register(t));const e=this.items,o=n.id,a=this.scope+"."+o;if(!o)throw new Error("class does not have id: "+n);return o in e||(e[o]=n,Qx(n,a,r),this.override&&Te.override(n.id,n.overrides)),a}get(n){return this.items[n]}unregister(n){const t=this.items,r=n.id,e=this.scope;r in t&&delete t[r],e&&r in Te[e]&&(delete Te[e][r],this.override&&delete On[r])}}function Qx(i,n,t){const r=di(Object.create(null),[t?Te.get(t):{},Te.get(n),i.defaults]);Te.set(n,r),i.defaultRoutes&&Ux(n,i.defaultRoutes),i.descriptors&&Te.describe(n,i.descriptors)}function Ux(i,n){Object.keys(n).forEach(t=>{const r=t.split("."),e=r.pop(),o=[i].concat(r).join("."),a=n[t].split("."),s=a.pop(),l=a.join(".");Te.route(o,e,l,s)})}function Yx(i){return"id"in i&&"defaults"in i}class Bx{constructor(){this.controllers=new Qo(Ct,"datasets",!0),this.elements=new Qo(nn,"elements"),this.plugins=new Qo(Object,"plugins"),this.scales=new Qo(Un,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...n){this._each("register",n)}remove(...n){this._each("unregister",n)}addControllers(...n){this._each("register",n,this.controllers)}addElements(...n){this._each("register",n,this.elements)}addPlugins(...n){this._each("register",n,this.plugins)}addScales(...n){this._each("register",n,this.scales)}getController(n){return this._get(n,this.controllers,"controller")}getElement(n){return this._get(n,this.elements,"element")}getPlugin(n){return this._get(n,this.plugins,"plugin")}getScale(n){return this._get(n,this.scales,"scale")}removeControllers(...n){this._each("unregister",n,this.controllers)}removeElements(...n){this._each("unregister",n,this.elements)}removePlugins(...n){this._each("unregister",n,this.plugins)}removeScales(...n){this._each("unregister",n,this.scales)}_each(n,t,r){[...t].forEach(e=>{const o=r||this._getRegistryForType(e);r||o.isForType(e)||o===this.plugins&&e.id?this._exec(n,o,e):Ee(e,a=>{const s=r||this._getRegistryForType(a);this._exec(n,s,a)})})}_exec(n,t,r){const e=el(n);$e(r["before"+e],[],r),t[n](r),$e(r["after"+e],[],r)}_getRegistryForType(n){for(let t=0;t<this._typedRegistries.length;t++){const r=this._typedRegistries[t];if(r.isForType(n))return r}return this.plugins}_get(n,t,r){const e=t.get(n);if(e===void 0)throw new Error('"'+n+'" is not a registered '+r+".");return e}}var Zt=new Bx;class Al extends Ct{update(n){const t=this._cachedMeta,{data:r=[]}=t,e=this.chart._animationsDisabled;let{start:o,count:a}=Sd(t,r,e);if(this._drawStart=o,this._drawCount=a,Od(t)&&(o=0,a=r.length),this.options.showLine){const{dataset:s,_dataset:l}=t;s._chart=this.chart,s._datasetIndex=this.index,s._decimated=!!l._decimated,s.points=r;const u=this.resolveDatasetElementOptions(n);u.segment=this.options.segment,this.updateElement(s,void 0,{animated:!e,options:u},n)}this.updateElements(r,o,a,n)}addElements(){const{showLine:n}=this.options;!this.datasetElementType&&n&&(this.datasetElementType=Zt.getElement("line")),super.addElements()}updateElements(n,t,r,e){const o=e==="reset",{iScale:a,vScale:s,_stacked:l,_dataset:u}=this._cachedMeta,f=this.resolveDataElementOptions(t,e),d=this.getSharedOptions(f),M=this.includeOptions(e,d),h=a.axis,y=s.axis,{spanGaps:p,segment:N}=this.options,g=Wn(p)?p:Number.POSITIVE_INFINITY,I=this.chart._animationsDisabled||o||e==="none";let x=t>0&&this.getParsed(t-1);for(let T=t;T<t+r;++T){const j=n[T],v=this.getParsed(T),w=I?j:{},A=Se(v[y]),k=w[h]=a.getPixelForValue(v[h],T),L=w[y]=o||A?s.getBasePixel():s.getPixelForValue(l?this.applyStack(s,v,l):v[y],T);w.skip=isNaN(k)||isNaN(L)||A,w.stop=T>0&&Math.abs(v[h]-x[h])>g,N&&(w.parsed=v,w.raw=u.data[T]),M&&(w.options=d||this.resolveDataElementOptions(T,j.active?"active":e)),I||this.updateElement(j,T,w,e),x=v}this.updateSharedOptions(d,e,f)}getMaxOverflow(){const n=this._cachedMeta,t=n.data||[];if(!this.options.showLine){let s=0;for(let l=t.length-1;l>=0;--l)s=Math.max(s,t[l].size(this.resolveDataElementOptions(l))/2);return s>0&&s}const r=n.dataset,e=r.options&&r.options.borderWidth||0;if(!t.length)return e;const o=t[0].size(this.resolveDataElementOptions(0)),a=t[t.length-1].size(this.resolveDataElementOptions(t.length-1));return Math.max(e,o,a)/2}}Al.id="scatter",Al.defaults={datasetElementType:!1,dataElementType:"point",showLine:!1,fill:!1},Al.overrides={interaction:{mode:"point"},plugins:{tooltip:{callbacks:{title(){return""},label(i){return"("+i.label+", "+i.formattedValue+")"}}}},scales:{x:{type:"linear"},y:{type:"linear"}}};function Yn(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class kl{constructor(n){this.options=n||{}}init(n){}formats(){return Yn()}parse(n,t){return Yn()}format(n,t){return Yn()}add(n,t,r){return Yn()}diff(n,t,r){return Yn()}startOf(n,t,r){return Yn()}endOf(n,t){return Yn()}}kl.override=function(i){Object.assign(kl.prototype,i)};var Px={_date:kl};function Rx(i,n,t,r){const{controller:e,data:o,_sorted:a}=i,s=e._cachedMeta.iScale;if(s&&n===s.axis&&n!=="r"&&a&&o.length){const l=s._reversePixels?v4:Sn;if(r){if(e._sharedOptions){const u=o[0],f=typeof u.getRange=="function"&&u.getRange(n);if(f){const d=l(o,n,t-f),M=l(o,n,t+f);return{lo:d.lo,hi:M.hi}}}}else return l(o,n,t)}return{lo:0,hi:o.length-1}}function vi(i,n,t,r,e){const o=i.getSortedVisibleDatasetMetas(),a=t[n];for(let s=0,l=o.length;s<l;++s){const{index:u,data:f}=o[s],{lo:d,hi:M}=Rx(o[s],n,a,e);for(let h=d;h<=M;++h){const y=f[h];y.skip||r(y,u,h)}}}function Vx(i){const n=i.indexOf("x")!==-1,t=i.indexOf("y")!==-1;return function(r,e){const o=n?Math.abs(r.x-e.x):0,a=t?Math.abs(r.y-e.y):0;return Math.sqrt(Math.pow(o,2)+Math.pow(a,2))}}function zl(i,n,t,r,e){const o=[];return!e&&!i.isPointInArea(n)||vi(i,t,n,function(s,l,u){!e&&!Ii(s,i.chartArea,0)||s.inRange(n.x,n.y,r)&&o.push({element:s,datasetIndex:l,index:u})},!0),o}function Zx(i,n,t,r){let e=[];function o(a,s,l){const{startAngle:u,endAngle:f}=a.getProps(["startAngle","endAngle"],r),{angle:d}=vd(a,{x:n.x,y:n.y});hi(d,u,f)&&e.push({element:a,datasetIndex:s,index:l})}return vi(i,t,n,o),e}function Fx(i,n,t,r,e,o){let a=[];const s=Vx(t);let l=Number.POSITIVE_INFINITY;function u(f,d,M){const h=f.inRange(n.x,n.y,e);if(r&&!h)return;const y=f.getCenterPoint(e);if(!(!!o||i.isPointInArea(y))&&!h)return;const N=s(n,y);N<l?(a=[{element:f,datasetIndex:d,index:M}],l=N):N===l&&a.push({element:f,datasetIndex:d,index:M})}return vi(i,t,n,u),a}function Ll(i,n,t,r,e,o){return!o&&!i.isPointInArea(n)?[]:t==="r"&&!r?Zx(i,n,t,e):Fx(i,n,t,r,e,o)}function wf(i,n,t,r,e){const o=[],a=t==="x"?"inXRange":"inYRange";let s=!1;return vi(i,t,n,(l,u,f)=>{l[a](n[t],e)&&(o.push({element:l,datasetIndex:u,index:f}),s=s||l.inRange(n.x,n.y,e))}),r&&!s?[]:o}var Hx={evaluateInteractionItems:vi,modes:{index(i,n,t,r){const e=_n(n,i),o=t.axis||"x",a=t.includeInvisible||!1,s=t.intersect?zl(i,e,o,r,a):Ll(i,e,o,!1,r,a),l=[];return s.length?(i.getSortedVisibleDatasetMetas().forEach(u=>{const f=s[0].index,d=u.data[f];d&&!d.skip&&l.push({element:d,datasetIndex:u.index,index:f})}),l):[]},dataset(i,n,t,r){const e=_n(n,i),o=t.axis||"xy",a=t.includeInvisible||!1;let s=t.intersect?zl(i,e,o,r,a):Ll(i,e,o,!1,r,a);if(s.length>0){const l=s[0].datasetIndex,u=i.getDatasetMeta(l).data;s=[];for(let f=0;f<u.length;++f)s.push({element:u[f],datasetIndex:l,index:f})}return s},point(i,n,t,r){const e=_n(n,i),o=t.axis||"xy",a=t.includeInvisible||!1;return zl(i,e,o,r,a)},nearest(i,n,t,r){const e=_n(n,i),o=t.axis||"xy",a=t.includeInvisible||!1;return Ll(i,e,o,t.intersect,r,a)},x(i,n,t,r){const e=_n(n,i);return wf(i,e,"x",t.intersect,r)},y(i,n,t,r){const e=_n(n,i);return wf(i,e,"y",t.intersect,r)}}};const Sf=["left","top","right","bottom"];function Ti(i,n){return i.filter(t=>t.pos===n)}function Of(i,n){return i.filter(t=>Sf.indexOf(t.pos)===-1&&t.box.axis===n)}function Ai(i,n){return i.sort((t,r)=>{const e=n?r:t,o=n?t:r;return e.weight===o.weight?e.index-o.index:e.weight-o.weight})}function Gx(i){const n=[];let t,r,e,o,a,s;for(t=0,r=(i||[]).length;t<r;++t)e=i[t],{position:o,options:{stack:a,stackWeight:s=1}}=e,n.push({index:t,box:e,pos:o,horizontal:e.isHorizontal(),weight:e.weight,stack:a&&o+a,stackWeight:s});return n}function Wx(i){const n={};for(const t of i){const{stack:r,pos:e,stackWeight:o}=t;if(!r||!Sf.includes(e))continue;const a=n[r]||(n[r]={count:0,placed:0,weight:0,size:0});a.count++,a.weight+=o}return n}function $x(i,n){const t=Wx(i),{vBoxMaxWidth:r,hBoxMaxHeight:e}=n;let o,a,s;for(o=0,a=i.length;o<a;++o){s=i[o];const{fullSize:l}=s.box,u=t[s.stack],f=u&&s.stackWeight/u.weight;s.horizontal?(s.width=f?f*r:l&&n.availableWidth,s.height=e):(s.width=r,s.height=f?f*e:l&&n.availableHeight)}return t}function Jx(i){const n=Gx(i),t=Ai(n.filter(u=>u.box.fullSize),!0),r=Ai(Ti(n,"left"),!0),e=Ai(Ti(n,"right")),o=Ai(Ti(n,"top"),!0),a=Ai(Ti(n,"bottom")),s=Of(n,"x"),l=Of(n,"y");return{fullSize:t,leftAndTop:r.concat(o),rightAndBottom:e.concat(l).concat(a).concat(s),chartArea:Ti(n,"chartArea"),vertical:r.concat(e).concat(l),horizontal:o.concat(a).concat(s)}}function Ef(i,n,t,r){return Math.max(i[t],n[t])+Math.max(i[r],n[r])}function Cf(i,n){i.top=Math.max(i.top,n.top),i.left=Math.max(i.left,n.left),i.bottom=Math.max(i.bottom,n.bottom),i.right=Math.max(i.right,n.right)}function Xx(i,n,t,r){const{pos:e,box:o}=t,a=i.maxPadding;if(!Ae(e)){t.size&&(i[e]-=t.size);const d=r[t.stack]||{size:0,count:1};d.size=Math.max(d.size,t.horizontal?o.height:o.width),t.size=d.size/d.count,i[e]+=t.size}o.getPadding&&Cf(a,o.getPadding());const s=Math.max(0,n.outerWidth-Ef(a,i,"left","right")),l=Math.max(0,n.outerHeight-Ef(a,i,"top","bottom")),u=s!==i.w,f=l!==i.h;return i.w=s,i.h=l,t.horizontal?{same:u,other:f}:{same:f,other:u}}function Kx(i){const n=i.maxPadding;function t(r){const e=Math.max(n[r]-i[r],0);return i[r]+=e,e}i.y+=t("top"),i.x+=t("left"),t("right"),t("bottom")}function qx(i,n){const t=n.maxPadding;function r(e){const o={left:0,top:0,right:0,bottom:0};return e.forEach(a=>{o[a]=Math.max(n[a],t[a])}),o}return r(i?["left","right"]:["top","bottom"])}function ki(i,n,t,r){const e=[];let o,a,s,l,u,f;for(o=0,a=i.length,u=0;o<a;++o){s=i[o],l=s.box,l.update(s.width||n.w,s.height||n.h,qx(s.horizontal,n));const{same:d,other:M}=Xx(n,t,s,r);u|=d&&e.length,f=f||M,l.fullSize||e.push(s)}return u&&ki(e,n,t,r)||f}function Uo(i,n,t,r,e){i.top=t,i.left=n,i.right=n+r,i.bottom=t+e,i.width=r,i.height=e}function _f(i,n,t,r){const e=t.padding;let{x:o,y:a}=n;for(const s of i){const l=s.box,u=r[s.stack]||{count:1,placed:0,weight:1},f=s.stackWeight/u.weight||1;if(s.horizontal){const d=n.w*f,M=u.size||l.height;xt(u.start)&&(a=u.start),l.fullSize?Uo(l,e.left,a,t.outerWidth-e.right-e.left,M):Uo(l,n.left+u.placed,a,d,M),u.start=a,u.placed+=d,a=l.bottom}else{const d=n.h*f,M=u.size||l.width;xt(u.start)&&(o=u.start),l.fullSize?Uo(l,o,e.top,M,t.outerHeight-e.bottom-e.top):Uo(l,o,n.top+u.placed,M,d),u.start=o,u.placed+=d,o=l.right}}n.x=o,n.y=a}Te.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}});var Yo={addBox(i,n){i.boxes||(i.boxes=[]),n.fullSize=n.fullSize||!1,n.position=n.position||"top",n.weight=n.weight||0,n._layers=n._layers||function(){return[{z:0,draw(t){n.draw(t)}}]},i.boxes.push(n)},removeBox(i,n){const t=i.boxes?i.boxes.indexOf(n):-1;t!==-1&&i.boxes.splice(t,1)},configure(i,n,t){n.fullSize=t.fullSize,n.position=t.position,n.weight=t.weight},update(i,n,t,r){if(!i)return;const e=Tt(i.options.layout.padding),o=Math.max(n-e.width,0),a=Math.max(t-e.height,0),s=Jx(i.boxes),l=s.vertical,u=s.horizontal;Ee(i.boxes,p=>{typeof p.beforeLayout=="function"&&p.beforeLayout()});const f=l.reduce((p,N)=>N.box.options&&N.box.options.display===!1?p:p+1,0)||1,d=Object.freeze({outerWidth:n,outerHeight:t,padding:e,availableWidth:o,availableHeight:a,vBoxMaxWidth:o/2/f,hBoxMaxHeight:a/2}),M=Object.assign({},e);Cf(M,Tt(r));const h=Object.assign({maxPadding:M,w:o,h:a,x:e.left,y:e.top},e),y=$x(l.concat(u),d);ki(s.fullSize,h,d,y),ki(l,h,d,y),ki(u,h,d,y)&&ki(l,h,d,y),Kx(h),_f(s.leftAndTop,h,d,y),h.x+=h.w,h.y+=h.h,_f(s.rightAndBottom,h,d,y),i.chartArea={left:h.left,top:h.top,right:h.left+h.w,bottom:h.top+h.h,height:h.h,width:h.w},Ee(s.chartArea,p=>{const N=p.box;Object.assign(N,i.chartArea),N.update(h.w,h.h,{left:0,top:0,right:0,bottom:0})})}};class Qf{acquireContext(n,t){}releaseContext(n){return!1}addEventListener(n,t,r){}removeEventListener(n,t,r){}getDevicePixelRatio(){return 1}getMaximumSize(n,t,r,e){return t=Math.max(0,t||n.width),r=r||n.height,{width:t,height:Math.max(0,e?Math.floor(t/e):r)}}isAttached(n){return!0}updateConfig(n){}}class eb extends Qf{acquireContext(n){return n&&n.getContext&&n.getContext("2d")||null}updateConfig(n){n.options.animation=!1}}const Bo="$chartjs",tb={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},Uf=i=>i===null||i==="";function nb(i,n){const t=i.style,r=i.getAttribute("height"),e=i.getAttribute("width");if(i[Bo]={initial:{height:r,width:e,style:{display:t.display,height:t.height,width:t.width}}},t.display=t.display||"block",t.boxSizing=t.boxSizing||"border-box",Uf(e)){const o=sf(i,"width");o!==void 0&&(i.width=o)}if(Uf(r))if(i.style.height==="")i.height=i.width/(n||2);else{const o=sf(i,"height");o!==void 0&&(i.height=o)}return i}const Yf=O1?{passive:!0}:!1;function ib(i,n,t){i.addEventListener(n,t,Yf)}function rb(i,n,t){i.canvas.removeEventListener(n,t,Yf)}function ob(i,n){const t=tb[i.type]||i.type,{x:r,y:e}=_n(i,n);return{type:t,chart:n,native:i,x:r!==void 0?r:null,y:e!==void 0?e:null}}function Po(i,n){for(const t of i)if(t===n||t.contains(n))return!0}function ab(i,n,t){const r=i.canvas,e=new MutationObserver(o=>{let a=!1;for(const s of o)a=a||Po(s.addedNodes,r),a=a&&!Po(s.removedNodes,r);a&&t()});return e.observe(document,{childList:!0,subtree:!0}),e}function sb(i,n,t){const r=i.canvas,e=new MutationObserver(o=>{let a=!1;for(const s of o)a=a||Po(s.removedNodes,r),a=a&&!Po(s.addedNodes,r);a&&t()});return e.observe(document,{childList:!0,subtree:!0}),e}const zi=new Map;let Bf=0;function Pf(){const i=window.devicePixelRatio;i!==Bf&&(Bf=i,zi.forEach((n,t)=>{t.currentDevicePixelRatio!==i&&n()}))}function lb(i,n){zi.size||window.addEventListener("resize",Pf),zi.set(i,n)}function ub(i){zi.delete(i),zi.size||window.removeEventListener("resize",Pf)}function cb(i,n,t){const r=i.canvas,e=r&&pl(r);if(!e)return;const o=Ld((s,l)=>{const u=e.clientWidth;t(s,l),u<e.clientWidth&&t()},window),a=new ResizeObserver(s=>{const l=s[0],u=l.contentRect.width,f=l.contentRect.height;u===0&&f===0||o(u,f)});return a.observe(e),lb(i,o),a}function wl(i,n,t){t&&t.disconnect(),n==="resize"&&ub(i)}function db(i,n,t){const r=i.canvas,e=Ld(o=>{i.ctx!==null&&t(ob(o,i))},i,o=>{const a=o[0];return[a,a.offsetX,a.offsetY]});return ib(r,n,e),e}class fb extends Qf{acquireContext(n,t){const r=n&&n.getContext&&n.getContext("2d");return r&&r.canvas===n?(nb(n,t),r):null}releaseContext(n){const t=n.canvas;if(!t[Bo])return!1;const r=t[Bo].initial;["height","width"].forEach(o=>{const a=r[o];Se(a)?t.removeAttribute(o):t.setAttribute(o,a)});const e=r.style||{};return Object.keys(e).forEach(o=>{t.style[o]=e[o]}),t.width=t.width,delete t[Bo],!0}addEventListener(n,t,r){this.removeEventListener(n,t);const e=n.$proxies||(n.$proxies={}),a={attach:ab,detach:sb,resize:cb}[t]||db;e[t]=a(n,t,r)}removeEventListener(n,t){const r=n.$proxies||(n.$proxies={}),e=r[t];if(!e)return;({attach:wl,detach:wl,resize:wl}[t]||rb)(n,t,e),r[t]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(n,t,r,e){return S1(n,t,r,e)}isAttached(n){const t=pl(n);return!!(t&&t.isConnected)}}function Mb(i){return!of()||typeof OffscreenCanvas!="undefined"&&i instanceof OffscreenCanvas?eb:fb}class gb{constructor(){this._init=[]}notify(n,t,r,e){t==="beforeInit"&&(this._init=this._createDescriptors(n,!0),this._notify(this._init,n,"install"));const o=e?this._descriptors(n).filter(e):this._descriptors(n),a=this._notify(o,n,t,r);return t==="afterDestroy"&&(this._notify(o,n,"stop"),this._notify(this._init,n,"uninstall")),a}_notify(n,t,r,e){e=e||{};for(const o of n){const a=o.plugin,s=a[r],l=[t,e,o.options];if($e(s,l,a)===!1&&e.cancelable)return!1}return!0}invalidate(){Se(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(n){if(this._cache)return this._cache;const t=this._cache=this._createDescriptors(n);return this._notifyStateChanges(n),t}_createDescriptors(n,t){const r=n&&n.config,e=ke(r.options&&r.options.plugins,{}),o=hb(r);return e===!1&&!t?[]:pb(n,o,e,t)}_notifyStateChanges(n){const t=this._oldCache||[],r=this._cache,e=(o,a)=>o.filter(s=>!a.some(l=>s.plugin.id===l.plugin.id));this._notify(e(t,r),n,"stop"),this._notify(e(r,t),n,"start")}}function hb(i){const n={},t=[],r=Object.keys(Zt.plugins.items);for(let o=0;o<r.length;o++)t.push(Zt.getPlugin(r[o]));const e=i.plugins||[];for(let o=0;o<e.length;o++){const a=e[o];t.indexOf(a)===-1&&(t.push(a),n[a.id]=!0)}return{plugins:t,localIds:n}}function yb(i,n){return!n&&i===!1?null:i===!0?{}:i}function pb(i,{plugins:n,localIds:t},r,e){const o=[],a=i.getContext();for(const s of n){const l=s.id,u=yb(r[l],e);u!==null&&o.push({plugin:s,options:Nb(i.config,{plugin:s,local:t[l]},u,a)})}return o}function Nb(i,{plugin:n,local:t},r,e){const o=i.pluginScopeKeys(n),a=i.getOptionScopes(r,o);return t&&n.defaults&&a.push(n.defaults),i.createResolver(a,e,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function Sl(i,n){const t=Te.datasets[i]||{};return((n.datasets||{})[i]||{}).indexAxis||n.indexAxis||t.indexAxis||"x"}function mb(i,n){let t=i;return i==="_index_"?t=n:i==="_value_"&&(t=n==="x"?"y":"x"),t}function Ib(i,n){return i===n?"_index_":"_value_"}function jb(i){if(i==="top"||i==="bottom")return"x";if(i==="left"||i==="right")return"y"}function Ol(i,n){return i==="x"||i==="y"?i:n.axis||jb(n.position)||i.charAt(0).toLowerCase()}function Db(i,n){const t=On[i.type]||{scales:{}},r=n.scales||{},e=Sl(i.type,n),o=Object.create(null),a=Object.create(null);return Object.keys(r).forEach(s=>{const l=r[s];if(!Ae(l))return console.error(`Invalid scale configuration for scale: ${s}`);if(l._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${s}`);const u=Ol(s,l),f=Ib(u,e),d=t.scales||{};o[u]=o[u]||s,a[s]=fi(Object.create(null),[{axis:u},l,d[u],d[f]])}),i.data.datasets.forEach(s=>{const l=s.type||i.type,u=s.indexAxis||Sl(l,n),d=(On[l]||{}).scales||{};Object.keys(d).forEach(M=>{const h=mb(M,u),y=s[h+"AxisID"]||o[h]||h;a[y]=a[y]||Object.create(null),fi(a[y],[{axis:h},r[y],d[M]])})}),Object.keys(a).forEach(s=>{const l=a[s];fi(l,[Te.scales[l.type],Te.scale])}),a}function Rf(i){const n=i.options||(i.options={});n.plugins=ke(n.plugins,{}),n.scales=Db(i,n)}function Vf(i){return i=i||{},i.datasets=i.datasets||[],i.labels=i.labels||[],i}function xb(i){return i=i||{},i.data=Vf(i.data),Rf(i),i}const Zf=new Map,Ff=new Set;function Ro(i,n){let t=Zf.get(i);return t||(t=n(),Zf.set(i,t),Ff.add(t)),t}const Li=(i,n,t)=>{const r=hn(n,t);r!==void 0&&i.add(r)};class bb{constructor(n){this._config=xb(n),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(n){this._config.type=n}get data(){return this._config.data}set data(n){this._config.data=Vf(n)}get options(){return this._config.options}set options(n){this._config.options=n}get plugins(){return this._config.plugins}update(){const n=this._config;this.clearCache(),Rf(n)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(n){return Ro(n,()=>[[`datasets.${n}`,""]])}datasetAnimationScopeKeys(n,t){return Ro(`${n}.transition.${t}`,()=>[[`datasets.${n}.transitions.${t}`,`transitions.${t}`],[`datasets.${n}`,""]])}datasetElementScopeKeys(n,t){return Ro(`${n}-${t}`,()=>[[`datasets.${n}.elements.${t}`,`datasets.${n}`,`elements.${t}`,""]])}pluginScopeKeys(n){const t=n.id,r=this.type;return Ro(`${r}-plugin-${t}`,()=>[[`plugins.${t}`,...n.additionalOptionScopes||[]]])}_cachedScopes(n,t){const r=this._scopeCache;let e=r.get(n);return(!e||t)&&(e=new Map,r.set(n,e)),e}getOptionScopes(n,t,r){const{options:e,type:o}=this,a=this._cachedScopes(n,r),s=a.get(t);if(s)return s;const l=new Set;t.forEach(f=>{n&&(l.add(n),f.forEach(d=>Li(l,n,d))),f.forEach(d=>Li(l,e,d)),f.forEach(d=>Li(l,On[o]||{},d)),f.forEach(d=>Li(l,Te,d)),f.forEach(d=>Li(l,cl,d))});const u=Array.from(l);return u.length===0&&u.push(Object.create(null)),Ff.has(t)&&a.set(t,u),u}chartOptionScopes(){const{options:n,type:t}=this;return[n,On[t]||{},Te.datasets[t]||{},{type:t},Te,cl]}resolveNamedOptions(n,t,r,e=[""]){const o={$shared:!0},{resolver:a,subPrefixes:s}=Hf(this._resolverCache,n,e);let l=a;if(Tb(a,t)){o.$shared=!1,r=yn(r)?r():r;const u=this.createResolver(n,r,s);l=Xn(a,r,u)}for(const u of t)o[u]=l[u];return o}createResolver(n,t,r=[""],e){const{resolver:o}=Hf(this._resolverCache,n,r);return Ae(t)?Xn(o,t,void 0,e):o}}function Hf(i,n,t){let r=i.get(n);r||(r=new Map,i.set(n,r));const e=t.join();let o=r.get(e);return o||(o={resolver:gl(n,t),subPrefixes:t.filter(s=>!s.toLowerCase().includes("hover"))},r.set(e,o)),o}const vb=i=>Ae(i)&&Object.getOwnPropertyNames(i).reduce((n,t)=>n||yn(i[t]),!1);function Tb(i,n){const{isScriptable:t,isIndexable:r}=Jd(i);for(const e of n){const o=t(e),a=r(e),s=(a||o)&&i[e];if(o&&(yn(s)||vb(s))||a&&Ze(s))return!0}return!1}var Ab="3.9.1";const kb=["top","bottom","left","right","chartArea"];function Gf(i,n){return i==="top"||i==="bottom"||kb.indexOf(i)===-1&&n==="x"}function Wf(i,n){return function(t,r){return t[i]===r[i]?t[n]-r[n]:t[i]-r[i]}}function $f(i){const n=i.chart,t=n.options.animation;n.notifyPlugins("afterRender"),$e(t&&t.onComplete,[i],n)}function zb(i){const n=i.chart,t=n.options.animation;$e(t&&t.onProgress,[i],n)}function Jf(i){return of()&&typeof i=="string"?i=document.getElementById(i):i&&i.length&&(i=i[0]),i&&i.canvas&&(i=i.canvas),i}const Vo={},Xf=i=>{const n=Jf(i);return Object.values(Vo).filter(t=>t.canvas===n).pop()};function Lb(i,n,t){const r=Object.keys(i);for(const e of r){const o=+e;if(o>=n){const a=i[e];delete i[e],(t>0||o>n)&&(i[o+t]=a)}}}function wb(i,n,t,r){return!t||i.type==="mouseout"?null:r?n:i}class wi{constructor(n,t){const r=this.config=new bb(t),e=Jf(n),o=Xf(e);if(o)throw new Error("Canvas is already in use. Chart with ID '"+o.id+"' must be destroyed before the canvas with ID '"+o.canvas.id+"' can be reused.");const a=r.createResolver(r.chartOptionScopes(),this.getContext());this.platform=new(r.platform||Mb(e)),this.platform.updateConfig(r);const s=this.platform.acquireContext(e,a.aspectRatio),l=s&&s.canvas,u=l&&l.height,f=l&&l.width;if(this.id=f4(),this.ctx=s,this.canvas=l,this.width=f,this.height=u,this._options=a,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new gb,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=k4(d=>this.update(d),a.resizeDelay||0),this._dataChanges=[],Vo[this.id]=this,!s||!l){console.error("Failed to create chart: can't acquire context from the given item");return}tn.listen(this,"complete",$f),tn.listen(this,"progress",zb),this._initialize(),this.attached&&this.update()}get aspectRatio(){const{options:{aspectRatio:n,maintainAspectRatio:t},width:r,height:e,_aspectRatio:o}=this;return Se(n)?t&&o?o:e?r/e:null:n}get data(){return this.config.data}set data(n){this.config.data=n}get options(){return this._options}set options(n){this.config.options=n}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():af(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return Hd(this.canvas,this.ctx),this}stop(){return tn.stop(this),this}resize(n,t){tn.running(this)?this._resizeBeforeDraw={width:n,height:t}:this._resize(n,t)}_resize(n,t){const r=this.options,e=this.canvas,o=r.maintainAspectRatio&&this.aspectRatio,a=this.platform.getMaximumSize(e,n,t,o),s=r.devicePixelRatio||this.platform.getDevicePixelRatio(),l=this.width?"resize":"attach";this.width=a.width,this.height=a.height,this._aspectRatio=this.aspectRatio,af(this,s,!0)&&(this.notifyPlugins("resize",{size:a}),$e(r.onResize,[this,a],this),this.attached&&this._doResize(l)&&this.render())}ensureScalesHaveIDs(){const t=this.options.scales||{};Ee(t,(r,e)=>{r.id=e})}buildOrUpdateScales(){const n=this.options,t=n.scales,r=this.scales,e=Object.keys(r).reduce((a,s)=>(a[s]=!1,a),{});let o=[];t&&(o=o.concat(Object.keys(t).map(a=>{const s=t[a],l=Ol(a,s),u=l==="r",f=l==="x";return{options:s,dposition:u?"chartArea":f?"bottom":"left",dtype:u?"radialLinear":f?"category":"linear"}}))),Ee(o,a=>{const s=a.options,l=s.id,u=Ol(l,s),f=ke(s.type,a.dtype);(s.position===void 0||Gf(s.position,u)!==Gf(a.dposition))&&(s.position=a.dposition),e[l]=!0;let d=null;if(l in r&&r[l].type===f)d=r[l];else{const M=Zt.getScale(f);d=new M({id:l,type:f,ctx:this.ctx,chart:this}),r[d.id]=d}d.init(s,n)}),Ee(e,(a,s)=>{a||delete r[s]}),Ee(r,a=>{Yo.configure(this,a,a.options),Yo.addBox(this,a)})}_updateMetasets(){const n=this._metasets,t=this.data.datasets.length,r=n.length;if(n.sort((e,o)=>e.index-o.index),r>t){for(let e=t;e<r;++e)this._destroyDatasetMeta(e);n.splice(t,r-t)}this._sortedMetasets=n.slice(0).sort(Wf("order","index"))}_removeUnreferencedMetasets(){const{_metasets:n,data:{datasets:t}}=this;n.length>t.length&&delete this._stacks,n.forEach((r,e)=>{t.filter(o=>o===r._dataset).length===0&&this._destroyDatasetMeta(e)})}buildOrUpdateControllers(){const n=[],t=this.data.datasets;let r,e;for(this._removeUnreferencedMetasets(),r=0,e=t.length;r<e;r++){const o=t[r];let a=this.getDatasetMeta(r);const s=o.type||this.config.type;if(a.type&&a.type!==s&&(this._destroyDatasetMeta(r),a=this.getDatasetMeta(r)),a.type=s,a.indexAxis=o.indexAxis||Sl(s,this.options),a.order=o.order||0,a.index=r,a.label=""+o.label,a.visible=this.isDatasetVisible(r),a.controller)a.controller.updateIndex(r),a.controller.linkScales();else{const l=Zt.getController(s),{datasetElementType:u,dataElementType:f}=Te.datasets[s];Object.assign(l.prototype,{dataElementType:Zt.getElement(f),datasetElementType:u&&Zt.getElement(u)}),a.controller=new l(this,r),n.push(a.controller)}}return this._updateMetasets(),n}_resetElements(){Ee(this.data.datasets,(n,t)=>{this.getDatasetMeta(t).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(n){const t=this.config;t.update();const r=this._options=t.createResolver(t.chartOptionScopes(),this.getContext()),e=this._animationsDisabled=!r.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),this.notifyPlugins("beforeUpdate",{mode:n,cancelable:!0})===!1)return;const o=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let a=0;for(let u=0,f=this.data.datasets.length;u<f;u++){const{controller:d}=this.getDatasetMeta(u),M=!e&&o.indexOf(d)===-1;d.buildOrUpdateElements(M),a=Math.max(+d.getMaxOverflow(),a)}a=this._minPadding=r.layout.autoPadding?a:0,this._updateLayout(a),e||Ee(o,u=>{u.reset()}),this._updateDatasets(n),this.notifyPlugins("afterUpdate",{mode:n}),this._layers.sort(Wf("z","_idx"));const{_active:s,_lastEvent:l}=this;l?this._eventHandler(l,!0):s.length&&this._updateHoverStyles(s,s,!0),this.render()}_updateScales(){Ee(this.scales,n=>{Yo.removeBox(this,n)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const n=this.options,t=new Set(Object.keys(this._listeners)),r=new Set(n.events);(!Id(t,r)||!!this._responsiveListeners!==n.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:n}=this,t=this._getUniformDataChanges()||[];for(const{method:r,start:e,count:o}of t){const a=r==="_removeElements"?-o:o;Lb(n,e,a)}}_getUniformDataChanges(){const n=this._dataChanges;if(!n||!n.length)return;this._dataChanges=[];const t=this.data.datasets.length,r=o=>new Set(n.filter(a=>a[0]===o).map((a,s)=>s+","+a.splice(1).join(","))),e=r(0);for(let o=1;o<t;o++)if(!Id(e,r(o)))return;return Array.from(e).map(o=>o.split(",")).map(o=>({method:o[1],start:+o[2],count:+o[3]}))}_updateLayout(n){if(this.notifyPlugins("beforeLayout",{cancelable:!0})===!1)return;Yo.update(this,this.width,this.height,n);const t=this.chartArea,r=t.width<=0||t.height<=0;this._layers=[],Ee(this.boxes,e=>{r&&e.position==="chartArea"||(e.configure&&e.configure(),this._layers.push(...e._layers()))},this),this._layers.forEach((e,o)=>{e._idx=o}),this.notifyPlugins("afterLayout")}_updateDatasets(n){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:n,cancelable:!0})!==!1){for(let t=0,r=this.data.datasets.length;t<r;++t)this.getDatasetMeta(t).controller.configure();for(let t=0,r=this.data.datasets.length;t<r;++t)this._updateDataset(t,yn(n)?n({datasetIndex:t}):n);this.notifyPlugins("afterDatasetsUpdate",{mode:n})}}_updateDataset(n,t){const r=this.getDatasetMeta(n),e={meta:r,index:n,mode:t,cancelable:!0};this.notifyPlugins("beforeDatasetUpdate",e)!==!1&&(r.controller._update(t),e.cancelable=!1,this.notifyPlugins("afterDatasetUpdate",e))}render(){this.notifyPlugins("beforeRender",{cancelable:!0})!==!1&&(tn.has(this)?this.attached&&!tn.running(this)&&tn.start(this):(this.draw(),$f({chart:this})))}draw(){let n;if(this._resizeBeforeDraw){const{width:r,height:e}=this._resizeBeforeDraw;this._resize(r,e),this._resizeBeforeDraw=null}if(this.clear(),this.width<=0||this.height<=0||this.notifyPlugins("beforeDraw",{cancelable:!0})===!1)return;const t=this._layers;for(n=0;n<t.length&&t[n].z<=0;++n)t[n].draw(this.chartArea);for(this._drawDatasets();n<t.length;++n)t[n].draw(this.chartArea);this.notifyPlugins("afterDraw")}_getSortedDatasetMetas(n){const t=this._sortedMetasets,r=[];let e,o;for(e=0,o=t.length;e<o;++e){const a=t[e];(!n||a.visible)&&r.push(a)}return r}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(!0)}_drawDatasets(){if(this.notifyPlugins("beforeDatasetsDraw",{cancelable:!0})===!1)return;const n=this.getSortedVisibleDatasetMetas();for(let t=n.length-1;t>=0;--t)this._drawDataset(n[t]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(n){const t=this.ctx,r=n._clip,e=!r.disabled,o=this.chartArea,a={meta:n,index:n.index,cancelable:!0};this.notifyPlugins("beforeDatasetDraw",a)!==!1&&(e&&Gd(t,{left:r.left===!1?0:o.left-r.left,right:r.right===!1?this.width:o.right+r.right,top:r.top===!1?0:o.top-r.top,bottom:r.bottom===!1?this.height:o.bottom+r.bottom}),n.controller.draw(),e&&Wd(t),a.cancelable=!1,this.notifyPlugins("afterDatasetDraw",a))}isPointInArea(n){return Ii(n,this.chartArea,this._minPadding)}getElementsAtEventForMode(n,t,r,e){const o=Hx.modes[t];return typeof o=="function"?o(this,n,r,e):[]}getDatasetMeta(n){const t=this.data.datasets[n],r=this._metasets;let e=r.filter(o=>o&&o._dataset===t).pop();return e||(e={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:t&&t.order||0,index:n,_dataset:t,_parsed:[],_sorted:!1},r.push(e)),e}getContext(){return this.$context||(this.$context=mn(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(n){const t=this.data.datasets[n];if(!t)return!1;const r=this.getDatasetMeta(n);return typeof r.hidden=="boolean"?!r.hidden:!t.hidden}setDatasetVisibility(n,t){const r=this.getDatasetMeta(n);r.hidden=!t}toggleDataVisibility(n){this._hiddenIndices[n]=!this._hiddenIndices[n]}getDataVisibility(n){return!this._hiddenIndices[n]}_updateVisibility(n,t,r){const e=r?"show":"hide",o=this.getDatasetMeta(n),a=o.controller._resolveAnimations(void 0,e);xt(t)?(o.data[t].hidden=!r,this.update()):(this.setDatasetVisibility(n,r),a.update(o,{visible:r}),this.update(s=>s.datasetIndex===n?e:void 0))}hide(n,t){this._updateVisibility(n,t,!1)}show(n,t){this._updateVisibility(n,t,!0)}_destroyDatasetMeta(n){const t=this._metasets[n];t&&t.controller&&t.controller._destroy(),delete this._metasets[n]}_stop(){let n,t;for(this.stop(),tn.remove(this),n=0,t=this.data.datasets.length;n<t;++n)this._destroyDatasetMeta(n)}destroy(){this.notifyPlugins("beforeDestroy");const{canvas:n,ctx:t}=this;this._stop(),this.config.clearCache(),n&&(this.unbindEvents(),Hd(n,t),this.platform.releaseContext(t),this.canvas=null,this.ctx=null),this.notifyPlugins("destroy"),delete Vo[this.id],this.notifyPlugins("afterDestroy")}toBase64Image(...n){return this.canvas.toDataURL(...n)}bindEvents(){this.bindUserEvents(),this.options.responsive?this.bindResponsiveEvents():this.attached=!0}bindUserEvents(){const n=this._listeners,t=this.platform,r=(o,a)=>{t.addEventListener(this,o,a),n[o]=a},e=(o,a,s)=>{o.offsetX=a,o.offsetY=s,this._eventHandler(o)};Ee(this.options.events,o=>r(o,e))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const n=this._responsiveListeners,t=this.platform,r=(l,u)=>{t.addEventListener(this,l,u),n[l]=u},e=(l,u)=>{n[l]&&(t.removeEventListener(this,l,u),delete n[l])},o=(l,u)=>{this.canvas&&this.resize(l,u)};let a;const s=()=>{e("attach",s),this.attached=!0,this.resize(),r("resize",o),r("detach",a)};a=()=>{this.attached=!1,e("resize",o),this._stop(),this._resize(0,0),r("attach",s)},t.isAttached(this.canvas)?s():a()}unbindEvents(){Ee(this._listeners,(n,t)=>{this.platform.removeEventListener(this,t,n)}),this._listeners={},Ee(this._responsiveListeners,(n,t)=>{this.platform.removeEventListener(this,t,n)}),this._responsiveListeners=void 0}updateHoverStyle(n,t,r){const e=r?"set":"remove";let o,a,s,l;for(t==="dataset"&&(o=this.getDatasetMeta(n[0].datasetIndex),o.controller["_"+e+"DatasetHoverStyle"]()),s=0,l=n.length;s<l;++s){a=n[s];const u=a&&this.getDatasetMeta(a.datasetIndex).controller;u&&u[e+"HoverStyle"](a.element,a.datasetIndex,a.index)}}getActiveElements(){return this._active||[]}setActiveElements(n){const t=this._active||[],r=n.map(({datasetIndex:o,index:a})=>{const s=this.getDatasetMeta(o);if(!s)throw new Error("No dataset found at index "+o);return{datasetIndex:o,element:s.data[a],index:a}});!No(r,t)&&(this._active=r,this._lastEvent=null,this._updateHoverStyles(r,t))}notifyPlugins(n,t,r){return this._plugins.notify(this,n,t,r)}_updateHoverStyles(n,t,r){const e=this.options.hover,o=(l,u)=>l.filter(f=>!u.some(d=>f.datasetIndex===d.datasetIndex&&f.index===d.index)),a=o(t,n),s=r?n:o(n,t);a.length&&this.updateHoverStyle(a,e.mode,!1),s.length&&e.mode&&this.updateHoverStyle(s,e.mode,!0)}_eventHandler(n,t){const r={event:n,replay:t,cancelable:!0,inChartArea:this.isPointInArea(n)},e=a=>(a.options.events||this.options.events).includes(n.native.type);if(this.notifyPlugins("beforeEvent",r,e)===!1)return;const o=this._handleEvent(n,t,r.inChartArea);return r.cancelable=!1,this.notifyPlugins("afterEvent",r,e),(o||r.changed)&&this.render(),this}_handleEvent(n,t,r){const{_active:e=[],options:o}=this,a=t,s=this._getActiveElements(n,e,r,a),l=N4(n),u=wb(n,this._lastEvent,r,l);r&&(this._lastEvent=null,$e(o.onHover,[n,s,this],this),l&&$e(o.onClick,[n,s,this],this));const f=!No(s,e);return(f||t)&&(this._active=s,this._updateHoverStyles(s,e,t)),this._lastEvent=u,f}_getActiveElements(n,t,r,e){if(n.type==="mouseout")return[];if(!r)return t;const o=this.options.hover;return this.getElementsAtEventForMode(n,o.mode,o,e)}}const Kf=()=>Ee(wi.instances,i=>i._plugins.invalidate()),In=!0;Object.defineProperties(wi,{defaults:{enumerable:In,value:Te},instances:{enumerable:In,value:Vo},overrides:{enumerable:In,value:On},registry:{enumerable:In,value:Zt},version:{enumerable:In,value:Ab},getChart:{enumerable:In,value:Xf},register:{enumerable:In,value:(...i)=>{Zt.add(...i),Kf()}},unregister:{enumerable:In,value:(...i)=>{Zt.remove(...i),Kf()}}});function qf(i,n,t){const{startAngle:r,pixelMargin:e,x:o,y:a,outerRadius:s,innerRadius:l}=n;let u=e/s;i.beginPath(),i.arc(o,a,s,r-u,t+u),l>e?(u=e/l,i.arc(o,a,l,t+u,r-u,!0)):i.arc(o,a,e,t+Xe,r-Xe),i.closePath(),i.clip()}function Sb(i){return Ml(i,["outerStart","outerEnd","innerStart","innerEnd"])}function Ob(i,n,t,r){const e=Sb(i.options.borderRadius),o=(t-n)/2,a=Math.min(o,r*n/2),s=l=>{const u=(t-Math.min(o,l))*r/2;return st(l,0,Math.min(o,u))};return{outerStart:s(e.outerStart),outerEnd:s(e.outerEnd),innerStart:st(e.innerStart,0,a),innerEnd:st(e.innerEnd,0,a)}}function qn(i,n,t,r){return{x:t+i*Math.cos(n),y:r+i*Math.sin(n)}}function El(i,n,t,r,e,o){const{x:a,y:s,startAngle:l,pixelMargin:u,innerRadius:f}=n,d=Math.max(n.outerRadius+r+t-u,0),M=f>0?f+r+t+u:0;let h=0;const y=e-l;if(r){const z=f>0?f-r:0,O=d>0?d-r:0,C=(z+O)/2,E=C!==0?y*C/(C+r):y;h=(y-E)/2}const p=Math.max(.001,y*d-t/Je)/d,N=(y-p)/2,g=l+N+h,I=e-N-h,{outerStart:x,outerEnd:T,innerStart:j,innerEnd:v}=Ob(n,M,d,I-g),w=d-x,A=d-T,k=g+x/w,L=I-T/A,b=M+j,m=M+v,D=g+j/b,S=I-v/m;if(i.beginPath(),o){if(i.arc(a,s,d,k,L),T>0){const C=qn(A,L,a,s);i.arc(C.x,C.y,T,L,I+Xe)}const z=qn(m,I,a,s);if(i.lineTo(z.x,z.y),v>0){const C=qn(m,S,a,s);i.arc(C.x,C.y,v,I+Xe,S+Math.PI)}if(i.arc(a,s,M,I-v/M,g+j/M,!0),j>0){const C=qn(b,D,a,s);i.arc(C.x,C.y,j,D+Math.PI,g-Xe)}const O=qn(w,g,a,s);if(i.lineTo(O.x,O.y),x>0){const C=qn(w,k,a,s);i.arc(C.x,C.y,x,g-Xe,k)}}else{i.moveTo(a,s);const z=Math.cos(k)*d+a,O=Math.sin(k)*d+s;i.lineTo(z,O);const C=Math.cos(L)*d+a,E=Math.sin(L)*d+s;i.lineTo(C,E)}i.closePath()}function Eb(i,n,t,r,e){const{fullCircles:o,startAngle:a,circumference:s}=n;let l=n.endAngle;if(o){El(i,n,t,r,a+Ye,e);for(let u=0;u<o;++u)i.fill();isNaN(s)||(l=a+s%Ye,s%Ye===0&&(l+=Ye))}return El(i,n,t,r,l,e),i.fill(),l}function Cb(i,n,t){const{x:r,y:e,startAngle:o,pixelMargin:a,fullCircles:s}=n,l=Math.max(n.outerRadius-a,0),u=n.innerRadius+a;let f;for(t&&qf(i,n,o+Ye),i.beginPath(),i.arc(r,e,u,o+Ye,o,!0),f=0;f<s;++f)i.stroke();for(i.beginPath(),i.arc(r,e,l,o,o+Ye),f=0;f<s;++f)i.stroke()}function _b(i,n,t,r,e,o){const{options:a}=n,{borderWidth:s,borderJoinStyle:l}=a,u=a.borderAlign==="inner";!s||(u?(i.lineWidth=s*2,i.lineJoin=l||"round"):(i.lineWidth=s,i.lineJoin=l||"bevel"),n.fullCircles&&Cb(i,n,u),u&&qf(i,n,e),El(i,n,t,r,e,o),i.stroke())}class Cl extends nn{constructor(n){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,n&&Object.assign(this,n)}inRange(n,t,r){const e=this.getProps(["x","y"],r),{angle:o,distance:a}=vd(e,{x:n,y:t}),{startAngle:s,endAngle:l,innerRadius:u,outerRadius:f,circumference:d}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],r),M=this.options.spacing/2,y=ke(d,l-s)>=Ye||hi(o,s,l),p=jo(a,u+M,f+M);return y&&p}getCenterPoint(n){const{x:t,y:r,startAngle:e,endAngle:o,innerRadius:a,outerRadius:s}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius","circumference"],n),{offset:l,spacing:u}=this.options,f=(e+o)/2,d=(a+s+u+l)/2;return{x:t+Math.cos(f)*d,y:r+Math.sin(f)*d}}tooltipPosition(n){return this.getCenterPoint(n)}draw(n){const{options:t,circumference:r}=this,e=(t.offset||0)/2,o=(t.spacing||0)/2,a=t.circular;if(this.pixelMargin=t.borderAlign==="inner"?.33:0,this.fullCircles=r>Ye?Math.floor(r/Ye):0,r===0||this.innerRadius<0||this.outerRadius<0)return;n.save();let s=0;if(e){s=e/2;const u=(this.startAngle+this.endAngle)/2;n.translate(Math.cos(u)*s,Math.sin(u)*s),this.circumference>=Je&&(s=e)}n.fillStyle=t.backgroundColor,n.strokeStyle=t.borderColor;const l=Eb(n,this,s,o,a);_b(n,this,s,o,l,a),n.restore()}}Cl.id="arc",Cl.defaults={borderAlign:"center",borderColor:"#fff",borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0},Cl.defaultRoutes={backgroundColor:"backgroundColor"};function eM(i,n,t=n){i.lineCap=ke(t.borderCapStyle,n.borderCapStyle),i.setLineDash(ke(t.borderDash,n.borderDash)),i.lineDashOffset=ke(t.borderDashOffset,n.borderDashOffset),i.lineJoin=ke(t.borderJoinStyle,n.borderJoinStyle),i.lineWidth=ke(t.borderWidth,n.borderWidth),i.strokeStyle=ke(t.borderColor,n.borderColor)}function Qb(i,n,t){i.lineTo(t.x,t.y)}function Ub(i){return i.stepped?n1:i.tension||i.cubicInterpolationMode==="monotone"?i1:Qb}function tM(i,n,t={}){const r=i.length,{start:e=0,end:o=r-1}=t,{start:a,end:s}=n,l=Math.max(e,a),u=Math.min(o,s),f=e<a&&o<a||e>s&&o>s;return{count:r,start:l,loop:n.loop,ilen:u<l&&!f?r+u-l:u-l}}function Yb(i,n,t,r){const{points:e,options:o}=n,{count:a,start:s,loop:l,ilen:u}=tM(e,t,r),f=Ub(o);let{move:d=!0,reverse:M}=r||{},h,y,p;for(h=0;h<=u;++h)y=e[(s+(M?u-h:h))%a],!y.skip&&(d?(i.moveTo(y.x,y.y),d=!1):f(i,p,y,M,o.stepped),p=y);return l&&(y=e[(s+(M?u:0))%a],f(i,p,y,M,o.stepped)),!!l}function Bb(i,n,t,r){const e=n.points,{count:o,start:a,ilen:s}=tM(e,t,r),{move:l=!0,reverse:u}=r||{};let f=0,d=0,M,h,y,p,N,g;const I=T=>(a+(u?s-T:T))%o,x=()=>{p!==N&&(i.lineTo(f,N),i.lineTo(f,p),i.lineTo(f,g))};for(l&&(h=e[I(0)],i.moveTo(h.x,h.y)),M=0;M<=s;++M){if(h=e[I(M)],h.skip)continue;const T=h.x,j=h.y,v=T|0;v===y?(j<p?p=j:j>N&&(N=j),f=(d*f+T)/++d):(x(),i.lineTo(T,j),y=v,d=0,p=N=j),g=j}x()}function _l(i){const n=i.options,t=n.borderDash&&n.borderDash.length;return!i._decimated&&!i._loop&&!n.tension&&n.cubicInterpolationMode!=="monotone"&&!n.stepped&&!t?Bb:Yb}function Pb(i){return i.stepped?E1:i.tension||i.cubicInterpolationMode==="monotone"?C1:Qn}function Rb(i,n,t,r){let e=n._path;e||(e=n._path=new Path2D,n.path(e,t,r)&&e.closePath()),eM(i,n.options),i.stroke(e)}function Vb(i,n,t,r){const{segments:e,options:o}=n,a=_l(n);for(const s of e)eM(i,o,s.style),i.beginPath(),a(i,n,s,{start:t,end:t+r-1})&&i.closePath(),i.stroke()}const Zb=typeof Path2D=="function";function Fb(i,n,t,r){Zb&&!n.options.segment?Rb(i,n,t,r):Vb(i,n,t,r)}class Zo extends nn{constructor(n){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,n&&Object.assign(this,n)}updateControlPoints(n,t){const r=this.options;if((r.tension||r.cubicInterpolationMode==="monotone")&&!r.stepped&&!this._pointsUpdated){const e=r.spanGaps?this._loop:this._fullLoop;T1(this._points,r,n,e,t),this._pointsUpdated=!0}}set points(n){this._points=n,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=H1(this,this.options.segment))}first(){const n=this.segments,t=this.points;return n.length&&t[n[0].start]}last(){const n=this.segments,t=this.points,r=n.length;return r&&t[n[r-1].end]}interpolate(n,t){const r=this.options,e=n[t],o=this.points,a=V1(this,{property:t,start:e,end:e});if(!a.length)return;const s=[],l=Pb(r);let u,f;for(u=0,f=a.length;u<f;++u){const{start:d,end:M}=a[u],h=o[d],y=o[M];if(h===y){s.push(h);continue}const p=Math.abs((e-h[t])/(y[t]-h[t])),N=l(h,y,p,r.stepped);N[t]=n[t],s.push(N)}return s.length===1?s[0]:s}pathSegment(n,t,r){return _l(this)(n,this,t,r)}path(n,t,r){const e=this.segments,o=_l(this);let a=this._loop;t=t||0,r=r||this.points.length-t;for(const s of e)a&=o(n,this,s,{start:t,end:t+r-1});return!!a}draw(n,t,r,e){const o=this.options||{};(this.points||[]).length&&o.borderWidth&&(n.save(),Fb(n,this,r,e),n.restore()),this.animated&&(this._pointsUpdated=!1,this._path=void 0)}}Zo.id="line",Zo.defaults={borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0},Zo.defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"},Zo.descriptors={_scriptable:!0,_indexable:i=>i!=="borderDash"&&i!=="fill"};function nM(i,n,t,r){const e=i.options,{[t]:o}=i.getProps([t],r);return Math.abs(n-o)<e.radius+e.hitRadius}class Ql extends nn{constructor(n){super(),this.options=void 0,this.parsed=void 0,this.skip=void 0,this.stop=void 0,n&&Object.assign(this,n)}inRange(n,t,r){const e=this.options,{x:o,y:a}=this.getProps(["x","y"],r);return Math.pow(n-o,2)+Math.pow(t-a,2)<Math.pow(e.hitRadius+e.radius,2)}inXRange(n,t){return nM(this,n,"x",t)}inYRange(n,t){return nM(this,n,"y",t)}getCenterPoint(n){const{x:t,y:r}=this.getProps(["x","y"],n);return{x:t,y:r}}size(n){n=n||this.options||{};let t=n.radius||0;t=Math.max(t,t&&n.hoverRadius||0);const r=t&&n.borderWidth||0;return(t+r)*2}draw(n,t){const r=this.options;this.skip||r.radius<.1||!Ii(this,t,this.size(r)/2)||(n.strokeStyle=r.borderColor,n.lineWidth=r.borderWidth,n.fillStyle=r.backgroundColor,fl(n,r,this.x,this.y))}getRange(){const n=this.options||{};return n.radius+n.hitRadius}}Ql.id="point",Ql.defaults={borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0},Ql.defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};function iM(i,n){const{x:t,y:r,base:e,width:o,height:a}=i.getProps(["x","y","base","width","height"],n);let s,l,u,f,d;return i.horizontal?(d=a/2,s=Math.min(t,e),l=Math.max(t,e),u=r-d,f=r+d):(d=o/2,s=t-d,l=t+d,u=Math.min(r,e),f=Math.max(r,e)),{left:s,top:u,right:l,bottom:f}}function jn(i,n,t,r){return i?0:st(n,t,r)}function Hb(i,n,t){const r=i.options.borderWidth,e=i.borderSkipped,o=$d(r);return{t:jn(e.top,o.top,0,t),r:jn(e.right,o.right,0,n),b:jn(e.bottom,o.bottom,0,t),l:jn(e.left,o.left,0,n)}}function Gb(i,n,t){const{enableBorderRadius:r}=i.getProps(["enableBorderRadius"]),e=i.options.borderRadius,o=Jn(e),a=Math.min(n,t),s=i.borderSkipped,l=r||Ae(e);return{topLeft:jn(!l||s.top||s.left,o.topLeft,0,a),topRight:jn(!l||s.top||s.right,o.topRight,0,a),bottomLeft:jn(!l||s.bottom||s.left,o.bottomLeft,0,a),bottomRight:jn(!l||s.bottom||s.right,o.bottomRight,0,a)}}function Wb(i){const n=iM(i),t=n.right-n.left,r=n.bottom-n.top,e=Hb(i,t/2,r/2),o=Gb(i,t/2,r/2);return{outer:{x:n.left,y:n.top,w:t,h:r,radius:o},inner:{x:n.left+e.l,y:n.top+e.t,w:t-e.l-e.r,h:r-e.t-e.b,radius:{topLeft:Math.max(0,o.topLeft-Math.max(e.t,e.l)),topRight:Math.max(0,o.topRight-Math.max(e.t,e.r)),bottomLeft:Math.max(0,o.bottomLeft-Math.max(e.b,e.l)),bottomRight:Math.max(0,o.bottomRight-Math.max(e.b,e.r))}}}}function Ul(i,n,t,r){const e=n===null,o=t===null,s=i&&!(e&&o)&&iM(i,r);return s&&(e||jo(n,s.left,s.right))&&(o||jo(t,s.top,s.bottom))}function $b(i){return i.topLeft||i.topRight||i.bottomLeft||i.bottomRight}function Jb(i,n){i.rect(n.x,n.y,n.w,n.h)}function Yl(i,n,t={}){const r=i.x!==t.x?-n:0,e=i.y!==t.y?-n:0,o=(i.x+i.w!==t.x+t.w?n:0)-r,a=(i.y+i.h!==t.y+t.h?n:0)-e;return{x:i.x+r,y:i.y+e,w:i.w+o,h:i.h+a,radius:i.radius}}class Fo extends nn{constructor(n){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,n&&Object.assign(this,n)}draw(n){const{inflateAmount:t,options:{borderColor:r,backgroundColor:e}}=this,{inner:o,outer:a}=Wb(this),s=$b(a.radius)?zo:Jb;n.save(),(a.w!==o.w||a.h!==o.h)&&(n.beginPath(),s(n,Yl(a,t,o)),n.clip(),s(n,Yl(o,-t,a)),n.fillStyle=r,n.fill("evenodd")),n.beginPath(),s(n,Yl(o,t)),n.fillStyle=e,n.fill(),n.restore()}inRange(n,t,r){return Ul(this,n,t,r)}inXRange(n,t){return Ul(this,n,null,t)}inYRange(n,t){return Ul(this,null,n,t)}getCenterPoint(n){const{x:t,y:r,base:e,horizontal:o}=this.getProps(["x","y","base","horizontal"],n);return{x:o?(t+e)/2:t,y:o?r:(r+e)/2}}getRange(n){return n==="x"?this.width/2:this.height/2}}Fo.id="bar",Fo.defaults={borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0},Fo.defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};const Si={average(i){if(!i.length)return!1;let n,t,r=0,e=0,o=0;for(n=0,t=i.length;n<t;++n){const a=i[n].element;if(a&&a.hasValue()){const s=a.tooltipPosition();r+=s.x,e+=s.y,++o}}return{x:r/o,y:e/o}},nearest(i,n){if(!i.length)return!1;let t=n.x,r=n.y,e=Number.POSITIVE_INFINITY,o,a,s;for(o=0,a=i.length;o<a;++o){const l=i[o].element;if(l&&l.hasValue()){const u=l.getCenterPoint(),f=nl(n,u);f<e&&(e=f,s=l)}}if(s){const l=s.tooltipPosition();t=l.x,r=l.y}return{x:t,y:r}}};function Ft(i,n){return n&&(Ze(n)?Array.prototype.push.apply(i,n):i.push(n)),i}function rn(i){return(typeof i=="string"||i instanceof String)&&i.indexOf(`
|
|
18
18
|
`)>-1?i.split(`
|
|
19
|
-
`):i}function Xb(i,n){const{element:t,datasetIndex:r,index:e}=n,o=i.getDatasetMeta(r).controller,{label:a,value:s}=o.getLabelAndValue(e);return{chart:i,label:a,parsed:o.getParsed(e),raw:i.data.datasets[r].data[e],formattedValue:s,dataset:o.getDataset(),dataIndex:e,datasetIndex:r,element:t}}function rM(i,n){const t=i.chart.ctx,{body:r,footer:e,title:o}=i,{boxWidth:a,boxHeight:s}=n,l=yt(n.bodyFont),u=yt(n.titleFont),f=yt(n.footerFont),d=o.length,M=e.length,h=r.length,y=Tt(n.padding);let p=y.height,N=0,g=r.reduce((T,j)=>T+j.before.length+j.lines.length+j.after.length,0);if(g+=i.beforeBody.length+i.afterBody.length,d&&(p+=d*u.lineHeight+(d-1)*n.titleSpacing+n.titleMarginBottom),g){const T=n.displayColors?Math.max(s,l.lineHeight):l.lineHeight;p+=h*T+(g-h)*l.lineHeight+(g-1)*n.bodySpacing}M&&(p+=n.footerMarginTop+M*f.lineHeight+(M-1)*n.footerSpacing);let I=0;const x=function(T){N=Math.max(N,t.measureText(T).width+I)};return t.save(),t.font=u.string,Ee(i.title,x),t.font=l.string,Ee(i.beforeBody.concat(i.afterBody),x),I=n.displayColors?a+2+n.boxPadding:0,Ee(r,T=>{Ee(T.before,x),Ee(T.lines,x),Ee(T.after,x)}),I=0,t.font=f.string,Ee(i.footer,x),t.restore(),N+=y.width,{width:N,height:p}}function Kb(i,n){const{y:t,height:r}=n;return t<r/2?"top":t>i.height-r/2?"bottom":"center"}function qb(i,n,t,r){const{x:e,width:o}=r,a=t.caretSize+t.caretPadding;if(i==="left"&&e+o+a>n.width||i==="right"&&e-o-a<0)return!0}function ev(i,n,t,r){const{x:e,width:o}=t,{width:a,chartArea:{left:s,right:l}}=i;let u="center";return r==="center"?u=e<=(s+l)/2?"left":"right":e<=o/2?u="left":e>=a-o/2&&(u="right"),qb(u,i,n,t)&&(u="center"),u}function oM(i,n,t){const r=t.yAlign||n.yAlign||Kb(i,t);return{xAlign:t.xAlign||n.xAlign||ev(i,n,t,r),yAlign:r}}function tv(i,n){let{x:t,width:r}=i;return n==="right"?t-=r:n==="center"&&(t-=r/2),t}function nv(i,n,t){let{y:r,height:e}=i;return n==="top"?r+=t:n==="bottom"?r-=e+t:r-=e/2,r}function aM(i,n,t,r){const{caretSize:e,caretPadding:o,cornerRadius:a}=i,{xAlign:s,yAlign:l}=t,u=e+o,{topLeft:f,topRight:d,bottomLeft:M,bottomRight:h}=Jn(a);let y=tv(n,s);const p=nv(n,l,u);return l==="center"?s==="left"?y+=u:s==="right"&&(y-=u):s==="left"?y-=Math.max(f,M)+e:s==="right"&&(y+=Math.max(d,h)+e),{x:st(y,0,r.width-n.width),y:st(p,0,r.height-n.height)}}function Ho(i,n,t){const r=Tt(t.padding);return n==="center"?i.x+i.width/2:n==="right"?i.x+i.width-r.right:i.x+r.left}function sM(i){return Ft([],rn(i))}function iv(i,n,t){return mn(i,{tooltip:n,tooltipItems:t,type:"tooltip"})}function lM(i,n){const t=n&&n.dataset&&n.dataset.tooltip&&n.dataset.tooltip.callbacks;return t?i.override(t):i}class Bl extends nn{constructor(n){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=n.chart||n._chart,this._chart=this.chart,this.options=n.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(n){this.options=n,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const n=this._cachedAnimations;if(n)return n;const t=this.chart,r=this.options.setContext(this.getContext()),e=r.enabled&&t.options.animation&&r.animations,o=new gf(this.chart,e);return e._cacheable&&(this._cachedAnimations=Object.freeze(o)),o}getContext(){return this.$context||(this.$context=iv(this.chart.getContext(),this,this._tooltipItems))}getTitle(n,t){const{callbacks:r}=t,e=r.beforeTitle.apply(this,[n]),o=r.title.apply(this,[n]),a=r.afterTitle.apply(this,[n]);let s=[];return s=Ft(s,rn(e)),s=Ft(s,rn(o)),s=Ft(s,rn(a)),s}getBeforeBody(n,t){return sM(t.callbacks.beforeBody.apply(this,[n]))}getBody(n,t){const{callbacks:r}=t,e=[];return Ee(n,o=>{const a={before:[],lines:[],after:[]},s=lM(r,o);Ft(a.before,rn(s.beforeLabel.call(this,o))),Ft(a.lines,s.label.call(this,o)),Ft(a.after,rn(s.afterLabel.call(this,o))),e.push(a)}),e}getAfterBody(n,t){return sM(t.callbacks.afterBody.apply(this,[n]))}getFooter(n,t){const{callbacks:r}=t,e=r.beforeFooter.apply(this,[n]),o=r.footer.apply(this,[n]),a=r.afterFooter.apply(this,[n]);let s=[];return s=Ft(s,rn(e)),s=Ft(s,rn(o)),s=Ft(s,rn(a)),s}_createItems(n){const t=this._active,r=this.chart.data,e=[],o=[],a=[];let s=[],l,u;for(l=0,u=t.length;l<u;++l)s.push(Xb(this.chart,t[l]));return n.filter&&(s=s.filter((f,d,M)=>n.filter(f,d,M,r))),n.itemSort&&(s=s.sort((f,d)=>n.itemSort(f,d,r))),Ee(s,f=>{const d=lM(n.callbacks,f);e.push(d.labelColor.call(this,f)),o.push(d.labelPointStyle.call(this,f)),a.push(d.labelTextColor.call(this,f))}),this.labelColors=e,this.labelPointStyles=o,this.labelTextColors=a,this.dataPoints=s,s}update(n,t){const r=this.options.setContext(this.getContext()),e=this._active;let o,a=[];if(!e.length)this.opacity!==0&&(o={opacity:0});else{const s=Si[r.position].call(this,e,this._eventPosition);a=this._createItems(r),this.title=this.getTitle(a,r),this.beforeBody=this.getBeforeBody(a,r),this.body=this.getBody(a,r),this.afterBody=this.getAfterBody(a,r),this.footer=this.getFooter(a,r);const l=this._size=rM(this,r),u=Object.assign({},s,l),f=oM(this.chart,r,u),d=aM(r,u,f,this.chart);this.xAlign=f.xAlign,this.yAlign=f.yAlign,o={opacity:1,x:d.x,y:d.y,width:l.width,height:l.height,caretX:s.x,caretY:s.y}}this._tooltipItems=a,this.$context=void 0,o&&this._resolveAnimations().update(this,o),n&&r.external&&r.external.call(this,{chart:this.chart,tooltip:this,replay:t})}drawCaret(n,t,r,e){const o=this.getCaretPosition(n,r,e);t.lineTo(o.x1,o.y1),t.lineTo(o.x2,o.y2),t.lineTo(o.x3,o.y3)}getCaretPosition(n,t,r){const{xAlign:e,yAlign:o}=this,{caretSize:a,cornerRadius:s}=r,{topLeft:l,topRight:u,bottomLeft:f,bottomRight:d}=Jn(s),{x:M,y:h}=n,{width:y,height:p}=t;let N,g,I,x,T,j;return o==="center"?(T=h+p/2,e==="left"?(N=M,g=N-a,x=T+a,j=T-a):(N=M+y,g=N+a,x=T-a,j=T+a),I=N):(e==="left"?g=M+Math.max(l,f)+a:e==="right"?g=M+y-Math.max(u,d)-a:g=this.caretX,o==="top"?(x=h,T=x-a,N=g-a,I=g+a):(x=h+p,T=x+a,N=g+a,I=g-a),j=x),{x1:N,x2:g,x3:I,y1:x,y2:T,y3:j}}drawTitle(n,t,r){const e=this.title,o=e.length;let a,s,l;if(o){const u=ml(r.rtl,this.x,this.width);for(n.x=Ho(this,r.titleAlign,r),t.textAlign=u.textAlign(r.titleAlign),t.textBaseline="middle",a=yt(r.titleFont),s=r.titleSpacing,t.fillStyle=r.titleColor,t.font=a.string,l=0;l<o;++l)t.fillText(e[l],u.x(n.x),n.y+a.lineHeight/2),n.y+=a.lineHeight+s,l+1===o&&(n.y+=r.titleMarginBottom-s)}}_drawColorBox(n,t,r,e,o){const a=this.labelColors[r],s=this.labelPointStyles[r],{boxHeight:l,boxWidth:u,boxPadding:f}=o,d=yt(o.bodyFont),M=Ho(this,"left",o),h=e.x(M),y=l<d.lineHeight?(d.lineHeight-l)/2:0,p=t.y+y;if(o.usePointStyle){const N={radius:Math.min(u,l)/2,pointStyle:s.pointStyle,rotation:s.rotation,borderWidth:1},g=e.leftForLtr(h,u)+u/2,I=p+l/2;n.strokeStyle=o.multiKeyBackground,n.fillStyle=o.multiKeyBackground,fl(n,N,g,I),n.strokeStyle=a.borderColor,n.fillStyle=a.backgroundColor,fl(n,N,g,I)}else{n.lineWidth=Ae(a.borderWidth)?Math.max(...Object.values(a.borderWidth)):a.borderWidth||1,n.strokeStyle=a.borderColor,n.setLineDash(a.borderDash||[]),n.lineDashOffset=a.borderDashOffset||0;const N=e.leftForLtr(h,u-f),g=e.leftForLtr(e.xPlus(h,1),u-f-2),I=Jn(a.borderRadius);Object.values(I).some(x=>x!==0)?(n.beginPath(),n.fillStyle=o.multiKeyBackground,zo(n,{x:N,y:p,w:u,h:l,radius:I}),n.fill(),n.stroke(),n.fillStyle=a.backgroundColor,n.beginPath(),zo(n,{x:g,y:p+1,w:u-2,h:l-2,radius:I}),n.fill()):(n.fillStyle=o.multiKeyBackground,n.fillRect(N,p,u,l),n.strokeRect(N,p,u,l),n.fillStyle=a.backgroundColor,n.fillRect(g,p+1,u-2,l-2))}n.fillStyle=this.labelTextColors[r]}drawBody(n,t,r){const{body:e}=this,{bodySpacing:o,bodyAlign:a,displayColors:s,boxHeight:l,boxWidth:u,boxPadding:f}=r,d=yt(r.bodyFont);let M=d.lineHeight,h=0;const y=ml(r.rtl,this.x,this.width),p=function(A){t.fillText(A,y.x(n.x+h),n.y+M/2),n.y+=M+o},N=y.textAlign(a);let g,I,x,T,j,v,w;for(t.textAlign=a,t.textBaseline="middle",t.font=d.string,n.x=Ho(this,N,r),t.fillStyle=r.bodyColor,Ee(this.beforeBody,p),h=s&&N!=="right"?a==="center"?u/2+f:u+2+f:0,T=0,v=e.length;T<v;++T){for(g=e[T],I=this.labelTextColors[T],t.fillStyle=I,Ee(g.before,p),x=g.lines,s&&x.length&&(this._drawColorBox(t,n,T,y,r),M=Math.max(d.lineHeight,l)),j=0,w=x.length;j<w;++j)p(x[j]),M=d.lineHeight;Ee(g.after,p)}h=0,M=d.lineHeight,Ee(this.afterBody,p),n.y-=o}drawFooter(n,t,r){const e=this.footer,o=e.length;let a,s;if(o){const l=ml(r.rtl,this.x,this.width);for(n.x=Ho(this,r.footerAlign,r),n.y+=r.footerMarginTop,t.textAlign=l.textAlign(r.footerAlign),t.textBaseline="middle",a=yt(r.footerFont),t.fillStyle=r.footerColor,t.font=a.string,s=0;s<o;++s)t.fillText(e[s],l.x(n.x),n.y+a.lineHeight/2),n.y+=a.lineHeight+r.footerSpacing}}drawBackground(n,t,r,e){const{xAlign:o,yAlign:a}=this,{x:s,y:l}=n,{width:u,height:f}=r,{topLeft:d,topRight:M,bottomLeft:h,bottomRight:y}=Jn(e.cornerRadius);t.fillStyle=e.backgroundColor,t.strokeStyle=e.borderColor,t.lineWidth=e.borderWidth,t.beginPath(),t.moveTo(s+d,l),a==="top"&&this.drawCaret(n,t,r,e),t.lineTo(s+u-M,l),t.quadraticCurveTo(s+u,l,s+u,l+M),a==="center"&&o==="right"&&this.drawCaret(n,t,r,e),t.lineTo(s+u,l+f-y),t.quadraticCurveTo(s+u,l+f,s+u-y,l+f),a==="bottom"&&this.drawCaret(n,t,r,e),t.lineTo(s+h,l+f),t.quadraticCurveTo(s,l+f,s,l+f-h),a==="center"&&o==="left"&&this.drawCaret(n,t,r,e),t.lineTo(s,l+d),t.quadraticCurveTo(s,l,s+d,l),t.closePath(),t.fill(),e.borderWidth>0&&t.stroke()}_updateAnimationTarget(n){const t=this.chart,r=this.$animations,e=r&&r.x,o=r&&r.y;if(e||o){const a=Si[n.position].call(this,this._active,this._eventPosition);if(!a)return;const s=this._size=rM(this,n),l=Object.assign({},a,this._size),u=oM(t,n,l),f=aM(n,l,u,t);(e._to!==f.x||o._to!==f.y)&&(this.xAlign=u.xAlign,this.yAlign=u.yAlign,this.width=s.width,this.height=s.height,this.caretX=a.x,this.caretY=a.y,this._resolveAnimations().update(this,f))}}_willRender(){return!!this.opacity}draw(n){const t=this.options.setContext(this.getContext());let r=this.opacity;if(!r)return;this._updateAnimationTarget(t);const e={width:this.width,height:this.height},o={x:this.x,y:this.y};r=Math.abs(r)<.001?0:r;const a=Tt(t.padding),s=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;t.enabled&&s&&(n.save(),n.globalAlpha=r,this.drawBackground(o,n,e,t),Y1(n,t.textDirection),o.y+=a.top,this.drawTitle(o,n,t),this.drawBody(o,n,t),this.drawFooter(o,n,t),B1(n,t.textDirection),n.restore())}getActiveElements(){return this._active||[]}setActiveElements(n,t){const r=this._active,e=n.map(({datasetIndex:s,index:l})=>{const u=this.chart.getDatasetMeta(s);if(!u)throw new Error("Cannot find a dataset at index "+s);return{datasetIndex:s,element:u.data[l],index:l}}),o=!No(r,e),a=this._positionChanged(e,t);(o||a)&&(this._active=e,this._eventPosition=t,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(n,t,r=!0){if(t&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const e=this.options,o=this._active||[],a=this._getActiveElements(n,o,t,r),s=this._positionChanged(a,n),l=t||!No(a,o)||s;return l&&(this._active=a,(e.enabled||e.external)&&(this._eventPosition={x:n.x,y:n.y},this.update(!0,t))),l}_getActiveElements(n,t,r,e){const o=this.options;if(n.type==="mouseout")return[];if(!e)return t;const a=this.chart.getElementsAtEventForMode(n,o.mode,o,r);return o.reverse&&a.reverse(),a}_positionChanged(n,t){const{caretX:r,caretY:e,options:o}=this,a=Si[o.position].call(this,n,t);return a!==!1&&(r!==a.x||e!==a.y)}}Bl.positioners=Si;var rv={id:"tooltip",_element:Bl,positioners:Si,afterInit(i,n,t){t&&(i.tooltip=new Bl({chart:i,options:t}))},beforeUpdate(i,n,t){i.tooltip&&i.tooltip.initialize(t)},reset(i,n,t){i.tooltip&&i.tooltip.initialize(t)},afterDraw(i){const n=i.tooltip;if(n&&n._willRender()){const t={tooltip:n};if(i.notifyPlugins("beforeTooltipDraw",t)===!1)return;n.draw(i.ctx),i.notifyPlugins("afterTooltipDraw",t)}},afterEvent(i,n){if(i.tooltip){const t=n.replay;i.tooltip.handleEvent(n.event,t,n.inChartArea)&&(n.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:(i,n)=>n.bodyFont.size,boxWidth:(i,n)=>n.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:qt,title(i){if(i.length>0){const n=i[0],t=n.chart.data.labels,r=t?t.length:0;if(this&&this.options&&this.options.mode==="dataset")return n.dataset.label||"";if(n.label)return n.label;if(r>0&&n.dataIndex<r)return t[n.dataIndex]}return""},afterTitle:qt,beforeBody:qt,beforeLabel:qt,label(i){if(this&&this.options&&this.options.mode==="dataset")return i.label+": "+i.formattedValue||i.formattedValue;let n=i.dataset.label||"";n&&(n+=": ");const t=i.formattedValue;return Se(t)||(n+=t),n},labelColor(i){const t=i.chart.getDatasetMeta(i.datasetIndex).controller.getStyle(i.dataIndex);return{borderColor:t.borderColor,backgroundColor:t.backgroundColor,borderWidth:t.borderWidth,borderDash:t.borderDash,borderDashOffset:t.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(i){const t=i.chart.getDatasetMeta(i.datasetIndex).controller.getStyle(i.dataIndex);return{pointStyle:t.pointStyle,rotation:t.rotation}},afterLabel:qt,afterBody:qt,beforeFooter:qt,footer:qt,afterFooter:qt}},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:i=>i!=="filter"&&i!=="itemSort"&&i!=="external",_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]};const ov=(i,n,t,r)=>(typeof n=="string"?(t=i.push(n)-1,r.unshift({index:t,label:n})):isNaN(n)&&(t=null),t);function av(i,n,t,r){const e=i.indexOf(n);if(e===-1)return ov(i,n,t,r);const o=i.lastIndexOf(n);return e!==o?t:e}const sv=(i,n)=>i===null?null:st(Math.round(i),0,n);class Go extends Un{constructor(n){super(n),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(n){const t=this._addedLabels;if(t.length){const r=this.getLabels();for(const{index:e,label:o}of t)r[e]===o&&r.splice(e,1);this._addedLabels=[]}super.init(n)}parse(n,t){if(Se(n))return null;const r=this.getLabels();return t=isFinite(t)&&r[t]===n?t:av(r,n,ke(t,n),this._addedLabels),sv(t,r.length-1)}determineDataLimits(){const{minDefined:n,maxDefined:t}=this.getUserBounds();let{min:r,max:e}=this.getMinMax(!0);this.options.bounds==="ticks"&&(n||(r=0),t||(e=this.getLabels().length-1)),this.min=r,this.max=e}buildTicks(){const n=this.min,t=this.max,r=this.options.offset,e=[];let o=this.getLabels();o=n===0&&t===o.length-1?o:o.slice(n,t+1),this._valueRange=Math.max(o.length-(r?0:1),1),this._startValue=this.min-(r?.5:0);for(let a=n;a<=t;a++)e.push({value:a});return e}getLabelForValue(n){const t=this.getLabels();return n>=0&&n<t.length?t[n]:n}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(n){return typeof n!="number"&&(n=this.parse(n)),n===null?NaN:this.getPixelForDecimal((n-this._startValue)/this._valueRange)}getPixelForTick(n){const t=this.ticks;return n<0||n>t.length-1?null:this.getPixelForValue(t[n].value)}getValueForPixel(n){return Math.round(this._startValue+this.getDecimalForPixel(n)*this._valueRange)}getBasePixel(){return this.bottom}}Go.id="category",Go.defaults={ticks:{callback:Go.prototype.getLabelForValue}};function lv(i,n){const t=[],{bounds:e,step:o,min:a,max:s,precision:l,count:u,maxTicks:f,maxDigits:d,includeBounds:M}=i,h=o||1,y=f-1,{min:p,max:N}=n,g=!Se(a),I=!Se(s),x=!Se(u),T=(N-p)/(d+1);let j=Dd((N-p)/y/h)*h,v,w,A,k;if(j<1e-14&&!g&&!I)return[{value:p},{value:N}];k=Math.ceil(N/j)-Math.floor(p/j),k>y&&(j=Dd(k*j/y/h)*h),Se(l)||(v=Math.pow(10,l),j=Math.ceil(j*v)/v),e==="ticks"?(w=Math.floor(p/j)*j,A=Math.ceil(N/j)*j):(w=p,A=N),g&&I&&o&&D4((s-a)/o,j/1e3)?(k=Math.round(Math.min((s-a)/j,f)),j=(s-a)/k,w=a,A=s):x?(w=g?a:w,A=I?s:A,k=u-1,j=(A-w)/k):(k=(A-w)/j,gi(k,Math.round(k),j/1e3)?k=Math.round(k):k=Math.ceil(k));const L=Math.max(bd(j),bd(w));v=Math.pow(10,Se(l)?L:l),w=Math.round(w*v)/v,A=Math.round(A*v)/v;let b=0;for(g&&(M&&w!==a?(t.push({value:a}),w<a&&b++,gi(Math.round((w+b*j)*v)/v,a,uM(a,T,i))&&b++):w<a&&b++);b<k;++b)t.push({value:Math.round((w+b*j)*v)/v});return I&&M&&A!==s?t.length&&gi(t[t.length-1].value,s,uM(s,T,i))?t[t.length-1].value=s:t.push({value:s}):(!I||A===s)&&t.push({value:A}),t}function uM(i,n,{horizontal:t,minRotation:r}){const e=Ot(r),o=(t?Math.sin(e):Math.cos(e))||.001,a=.75*n*(""+i).length;return Math.min(n/o,a)}class Wo extends Un{constructor(n){super(n),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(n,t){return Se(n)||(typeof n=="number"||n instanceof Number)&&!isFinite(+n)?null:+n}handleTickRangeOptions(){const{beginAtZero:n}=this.options,{minDefined:t,maxDefined:r}=this.getUserBounds();let{min:e,max:o}=this;const a=l=>e=t?e:l,s=l=>o=r?o:l;if(n){const l=Vt(e),u=Vt(o);l<0&&u<0?s(0):l>0&&u>0&&a(0)}if(e===o){let l=1;(o>=Number.MAX_SAFE_INTEGER||e<=Number.MIN_SAFE_INTEGER)&&(l=Math.abs(o*.05)),s(o+l),n||a(e-l)}this.min=e,this.max=o}getTickLimit(){const n=this.options.ticks;let{maxTicksLimit:t,stepSize:r}=n,e;return r?(e=Math.ceil(this.max/r)-Math.floor(this.min/r)+1,e>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${r} would result generating up to ${e} ticks. Limiting to 1000.`),e=1e3)):(e=this.computeTickLimit(),t=t||11),t&&(e=Math.min(t,e)),e}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const n=this.options,t=n.ticks;let r=this.getTickLimit();r=Math.max(2,r);const e={maxTicks:r,bounds:n.bounds,min:n.min,max:n.max,precision:t.precision,step:t.stepSize,count:t.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:t.minRotation||0,includeBounds:t.includeBounds!==!1},o=this._range||this,a=lv(e,o);return n.bounds==="ticks"&&xd(a,this,"value"),n.reverse?(a.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),a}configure(){const n=this.ticks;let t=this.min,r=this.max;if(super.configure(),this.options.offset&&n.length){const e=(r-t)/Math.max(n.length-1,1)/2;t-=e,r+=e}this._startValue=t,this._endValue=r,this._valueRange=r-t}getLabelForValue(n){return ji(n,this.chart.options.locale,this.options.ticks.format)}}class Pl extends Wo{determineDataLimits(){const{min:n,max:t}=this.getMinMax(!0);this.min=rt(n)?n:0,this.max=rt(t)?t:1,this.handleTickRangeOptions()}computeTickLimit(){const n=this.isHorizontal(),t=n?this.width:this.height,r=Ot(this.options.ticks.minRotation),e=(n?Math.sin(r):Math.cos(r))||.001,o=this._resolveTickFontOptions(0);return Math.ceil(t/Math.min(40,o.lineHeight/e))}getPixelForValue(n){return n===null?NaN:this.getPixelForDecimal((n-this._startValue)/this._valueRange)}getValueForPixel(n){return this._startValue+this.getDecimalForPixel(n)*this._valueRange}}Pl.id="linear",Pl.defaults={ticks:{callback:Co.formatters.numeric}};function cM(i){return i/Math.pow(10,Math.floor(bt(i)))===1}function uv(i,n){const t=Math.floor(bt(n.max)),r=Math.ceil(n.max/Math.pow(10,t)),e=[];let o=Dt(i.min,Math.pow(10,Math.floor(bt(n.min)))),a=Math.floor(bt(o)),s=Math.floor(o/Math.pow(10,a)),l=a<0?Math.pow(10,Math.abs(a)):1;do e.push({value:o,major:cM(o)}),++s,s===10&&(s=1,++a,l=a>=0?1:l),o=Math.round(s*Math.pow(10,a)*l)/l;while(a<t||a===t&&s<r);const u=Dt(i.max,o);return e.push({value:u,major:cM(o)}),e}class dM extends Un{constructor(n){super(n),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(n,t){const r=Wo.prototype.parse.apply(this,[n,t]);if(r===0){this._zero=!0;return}return rt(r)&&r>0?r:null}determineDataLimits(){const{min:n,max:t}=this.getMinMax(!0);this.min=rt(n)?Math.max(0,n):null,this.max=rt(t)?Math.max(0,t):null,this.options.beginAtZero&&(this._zero=!0),this.handleTickRangeOptions()}handleTickRangeOptions(){const{minDefined:n,maxDefined:t}=this.getUserBounds();let r=this.min,e=this.max;const o=l=>r=n?r:l,a=l=>e=t?e:l,s=(l,u)=>Math.pow(10,Math.floor(bt(l))+u);r===e&&(r<=0?(o(1),a(10)):(o(s(r,-1)),a(s(e,1)))),r<=0&&o(s(e,-1)),e<=0&&a(s(r,1)),this._zero&&this.min!==this._suggestedMin&&r===s(this.min,0)&&o(s(r,-1)),this.min=r,this.max=e}buildTicks(){const n=this.options,t={min:this._userMin,max:this._userMax},r=uv(t,this);return n.bounds==="ticks"&&xd(r,this,"value"),n.reverse?(r.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),r}getLabelForValue(n){return n===void 0?"0":ji(n,this.chart.options.locale,this.options.ticks.format)}configure(){const n=this.min;super.configure(),this._startValue=bt(n),this._valueRange=bt(this.max)-bt(n)}getPixelForValue(n){return(n===void 0||n===0)&&(n=this.min),n===null||isNaN(n)?NaN:this.getPixelForDecimal(n===this.min?0:(bt(n)-this._startValue)/this._valueRange)}getValueForPixel(n){const t=this.getDecimalForPixel(n);return Math.pow(10,this._startValue+t*this._valueRange)}}dM.id="logarithmic",dM.defaults={ticks:{callback:Co.formatters.logarithmic,major:{enabled:!0}}};function Rl(i){const n=i.ticks;if(n.display&&i.display){const t=Tt(n.backdropPadding);return ke(n.font&&n.font.size,Te.font.size)+t.height}return 0}function cv(i,n,t){return t=Ze(t)?t:[t],{w:e1(i,n.string,t),h:t.length*n.lineHeight}}function fM(i,n,t,r,e){return i===r||i===e?{start:n-t/2,end:n+t/2}:i<r||i>e?{start:n-t,end:n}:{start:n,end:n+t}}function dv(i){const n={l:i.left+i._padding.left,r:i.right-i._padding.right,t:i.top+i._padding.top,b:i.bottom-i._padding.bottom},t=Object.assign({},n),r=[],e=[],o=i._pointLabels.length,a=i.options.pointLabels,s=a.centerPointLabels?Je/o:0;for(let l=0;l<o;l++){const u=a.setContext(i.getPointLabelContext(l));e[l]=u.padding;const f=i.getPointPosition(l,i.drawingArea+e[l],s),d=yt(u.font),M=cv(i.ctx,d,i._pointLabels[l]);r[l]=M;const h=Et(i.getIndexAngle(l)+s),y=Math.round(tl(h)),p=fM(y,f.x,M.w,0,180),N=fM(y,f.y,M.h,90,270);fv(t,n,h,p,N)}i.setCenterPoint(n.l-t.l,t.r-n.r,n.t-t.t,t.b-n.b),i._pointLabelItems=Mv(i,r,e)}function fv(i,n,t,r,e){const o=Math.abs(Math.sin(t)),a=Math.abs(Math.cos(t));let s=0,l=0;r.start<n.l?(s=(n.l-r.start)/o,i.l=Math.min(i.l,n.l-s)):r.end>n.r&&(s=(r.end-n.r)/o,i.r=Math.max(i.r,n.r+s)),e.start<n.t?(l=(n.t-e.start)/a,i.t=Math.min(i.t,n.t-l)):e.end>n.b&&(l=(e.end-n.b)/a,i.b=Math.max(i.b,n.b+l))}function Mv(i,n,t){const r=[],e=i._pointLabels.length,o=i.options,a=Rl(o)/2,s=i.drawingArea,l=o.pointLabels.centerPointLabels?Je/e:0;for(let u=0;u<e;u++){const f=i.getPointPosition(u,s+a+t[u],l),d=Math.round(tl(Et(f.angle+Xe))),M=n[u],h=yv(f.y,M.h,d),y=gv(d),p=hv(f.x,M.w,y);r.push({x:f.x,y:h,textAlign:y,left:p,top:h,right:p+M.w,bottom:h+M.h})}return r}function gv(i){return i===0||i===180?"center":i<180?"left":"right"}function hv(i,n,t){return t==="right"?i-=n:t==="center"&&(i-=n/2),i}function yv(i,n,t){return t===90||t===270?i-=n/2:(t>270||t<90)&&(i-=n),i}function pv(i,n){const{ctx:t,options:{pointLabels:r}}=i;for(let e=n-1;e>=0;e--){const o=r.setContext(i.getPointLabelContext(e)),a=yt(o.font),{x:s,y:l,textAlign:u,left:f,top:d,right:M,bottom:h}=i._pointLabelItems[e],{backdropColor:y}=o;if(!Se(y)){const p=Jn(o.borderRadius),N=Tt(o.backdropPadding);t.fillStyle=y;const g=f-N.left,I=d-N.top,x=M-f+N.width,T=h-d+N.height;Object.values(p).some(j=>j!==0)?(t.beginPath(),zo(t,{x:g,y:I,w:x,h:T,radius:p}),t.fill()):t.fillRect(g,I,x,T)}ko(t,i._pointLabels[e],s,l+a.lineHeight/2,a,{color:o.color,textAlign:u,textBaseline:"middle"})}}function MM(i,n,t,r){const{ctx:e}=i;if(t)e.arc(i.xCenter,i.yCenter,n,0,Ye);else{let o=i.getPointPosition(0,n);e.moveTo(o.x,o.y);for(let a=1;a<r;a++)o=i.getPointPosition(a,n),e.lineTo(o.x,o.y)}}function Nv(i,n,t,r){const e=i.ctx,o=n.circular,{color:a,lineWidth:s}=n;!o&&!r||!a||!s||t<0||(e.save(),e.strokeStyle=a,e.lineWidth=s,e.setLineDash(n.borderDash),e.lineDashOffset=n.borderDashOffset,e.beginPath(),MM(i,t,o,r),e.closePath(),e.stroke(),e.restore())}function mv(i,n,t){return mn(i,{label:t,index:n,type:"pointLabel"})}class $o extends Wo{constructor(n){super(n),this.xCenter=void 0,this.yCenter=void 0,this.drawingArea=void 0,this._pointLabels=[],this._pointLabelItems=[]}setDimensions(){const n=this._padding=Tt(Rl(this.options)/2),t=this.width=this.maxWidth-n.width,r=this.height=this.maxHeight-n.height;this.xCenter=Math.floor(this.left+t/2+n.left),this.yCenter=Math.floor(this.top+r/2+n.top),this.drawingArea=Math.floor(Math.min(t,r)/2)}determineDataLimits(){const{min:n,max:t}=this.getMinMax(!1);this.min=rt(n)&&!isNaN(n)?n:0,this.max=rt(t)&&!isNaN(t)?t:0,this.handleTickRangeOptions()}computeTickLimit(){return Math.ceil(this.drawingArea/Rl(this.options))}generateTickLabels(n){Wo.prototype.generateTickLabels.call(this,n),this._pointLabels=this.getLabels().map((t,r)=>{const e=$e(this.options.pointLabels.callback,[t,r],this);return e||e===0?e:""}).filter((t,r)=>this.chart.getDataVisibility(r))}fit(){const n=this.options;n.display&&n.pointLabels.display?dv(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(n,t,r,e){this.xCenter+=Math.floor((n-t)/2),this.yCenter+=Math.floor((r-e)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(n,t,r,e))}getIndexAngle(n){const t=Ye/(this._pointLabels.length||1),r=this.options.startAngle||0;return Et(n*t+Ot(r))}getDistanceFromCenterForValue(n){if(Se(n))return NaN;const t=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-n)*t:(n-this.min)*t}getValueForDistanceFromCenter(n){if(Se(n))return NaN;const t=n/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-t:this.min+t}getPointLabelContext(n){const t=this._pointLabels||[];if(n>=0&&n<t.length){const r=t[n];return mv(this.getContext(),n,r)}}getPointPosition(n,t,r=0){const e=this.getIndexAngle(n)-Xe+r;return{x:Math.cos(e)*t+this.xCenter,y:Math.sin(e)*t+this.yCenter,angle:e}}getPointPositionForValue(n,t){return this.getPointPosition(n,this.getDistanceFromCenterForValue(t))}getBasePosition(n){return this.getPointPositionForValue(n||0,this.getBaseValue())}getPointLabelPosition(n){const{left:t,top:r,right:e,bottom:o}=this._pointLabelItems[n];return{left:t,top:r,right:e,bottom:o}}drawBackground(){const{backgroundColor:n,grid:{circular:t}}=this.options;if(n){const r=this.ctx;r.save(),r.beginPath(),MM(this,this.getDistanceFromCenterForValue(this._endValue),t,this._pointLabels.length),r.closePath(),r.fillStyle=n,r.fill(),r.restore()}}drawGrid(){const n=this.ctx,t=this.options,{angleLines:r,grid:e}=t,o=this._pointLabels.length;let a,s,l;if(t.pointLabels.display&&pv(this,o),e.display&&this.ticks.forEach((u,f)=>{if(f!==0){s=this.getDistanceFromCenterForValue(u.value);const d=e.setContext(this.getContext(f-1));Nv(this,d,s,o)}}),r.display){for(n.save(),a=o-1;a>=0;a--){const u=r.setContext(this.getPointLabelContext(a)),{color:f,lineWidth:d}=u;!d||!f||(n.lineWidth=d,n.strokeStyle=f,n.setLineDash(u.borderDash),n.lineDashOffset=u.borderDashOffset,s=this.getDistanceFromCenterForValue(t.ticks.reverse?this.min:this.max),l=this.getPointPosition(a,s),n.beginPath(),n.moveTo(this.xCenter,this.yCenter),n.lineTo(l.x,l.y),n.stroke())}n.restore()}}drawBorder(){}drawLabels(){const n=this.ctx,t=this.options,r=t.ticks;if(!r.display)return;const e=this.getIndexAngle(0);let o,a;n.save(),n.translate(this.xCenter,this.yCenter),n.rotate(e),n.textAlign="center",n.textBaseline="middle",this.ticks.forEach((s,l)=>{if(l===0&&!t.reverse)return;const u=r.setContext(this.getContext(l)),f=yt(u.font);if(o=this.getDistanceFromCenterForValue(this.ticks[l].value),u.showLabelBackdrop){n.font=f.string,a=n.measureText(s.label).width,n.fillStyle=u.backdropColor;const d=Tt(u.backdropPadding);n.fillRect(-a/2-d.left,-o-f.size/2-d.top,a+d.width,f.size+d.height)}ko(n,s.label,0,-o,f,{color:u.color})}),n.restore()}drawTitle(){}}$o.id="radialLinear",$o.defaults={display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:Co.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback(i){return i},padding:5,centerPointLabels:!1}},$o.defaultRoutes={"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"},$o.descriptors={angleLines:{_fallback:"grid"}};const Jo={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}},gt=Object.keys(Jo);function Iv(i,n){return i-n}function gM(i,n){if(Se(n))return null;const t=i._adapter,{parser:r,round:e,isoWeekday:o}=i._parseOpts;let a=n;return typeof r=="function"&&(a=r(a)),rt(a)||(a=typeof r=="string"?t.parse(a,r):t.parse(a)),a===null?null:(e&&(a=e==="week"&&(Wn(o)||o===!0)?t.startOf(a,"isoWeek",o):t.startOf(a,e)),+a)}function hM(i,n,t,r){const e=gt.length;for(let o=gt.indexOf(i);o<e-1;++o){const a=Jo[gt[o]],s=a.steps?a.steps:Number.MAX_SAFE_INTEGER;if(a.common&&Math.ceil((t-n)/(s*a.size))<=r)return gt[o]}return gt[e-1]}function jv(i,n,t,r,e){for(let o=gt.length-1;o>=gt.indexOf(t);o--){const a=gt[o];if(Jo[a].common&&i._adapter.diff(e,r,a)>=n-1)return a}return gt[t?gt.indexOf(t):0]}function Dv(i){for(let n=gt.indexOf(i)+1,t=gt.length;n<t;++n)if(Jo[gt[n]].common)return gt[n]}function yM(i,n,t){if(!t)i[n]=!0;else if(t.length){const{lo:r,hi:e}=il(t,n),o=t[r]>=n?t[r]:t[e];i[o]=!0}}function xv(i,n,t,r){const e=i._adapter,o=+e.startOf(n[0].value,r),a=n[n.length-1].value;let s,l;for(s=o;s<=a;s=+e.add(s,1,r))l=t[s],l>=0&&(n[l].major=!0);return n}function pM(i,n,t){const r=[],e={},o=n.length;let a,s;for(a=0;a<o;++a)s=n[a],e[s]=a,r.push({value:s,major:!1});return o===0||!t?r:xv(i,r,e,t)}class Xo extends Un{constructor(n){super(n),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(n,t){const r=n.time||(n.time={}),e=this._adapter=new Px._date(n.adapters.date);e.init(t),fi(r.displayFormats,e.formats()),this._parseOpts={parser:r.parser,round:r.round,isoWeekday:r.isoWeekday},super.init(n),this._normalized=t.normalized}parse(n,t){return n===void 0?null:gM(this,n)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const n=this.options,t=this._adapter,r=n.time.unit||"day";let{min:e,max:o,minDefined:a,maxDefined:s}=this.getUserBounds();function l(u){!a&&!isNaN(u.min)&&(e=Math.min(e,u.min)),!s&&!isNaN(u.max)&&(o=Math.max(o,u.max))}(!a||!s)&&(l(this._getLabelBounds()),(n.bounds!=="ticks"||n.ticks.source!=="labels")&&l(this.getMinMax(!1))),e=rt(e)&&!isNaN(e)?e:+t.startOf(Date.now(),r),o=rt(o)&&!isNaN(o)?o:+t.endOf(Date.now(),r)+1,this.min=Math.min(e,o-1),this.max=Math.max(e+1,o)}_getLabelBounds(){const n=this.getLabelTimestamps();let t=Number.POSITIVE_INFINITY,r=Number.NEGATIVE_INFINITY;return n.length&&(t=n[0],r=n[n.length-1]),{min:t,max:r}}buildTicks(){const n=this.options,t=n.time,r=n.ticks,e=r.source==="labels"?this.getLabelTimestamps():this._generate();n.bounds==="ticks"&&e.length&&(this.min=this._userMin||e[0],this.max=this._userMax||e[e.length-1]);const o=this.min,a=this.max,s=T4(e,o,a);return this._unit=t.unit||(r.autoSkip?hM(t.minUnit,this.min,this.max,this._getLabelCapacity(o)):jv(this,s.length,t.minUnit,this.min,this.max)),this._majorUnit=!r.major.enabled||this._unit==="year"?void 0:Dv(this._unit),this.initOffsets(e),n.reverse&&s.reverse(),pM(this,s,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map(n=>+n.value))}initOffsets(n){let t=0,r=0,e,o;this.options.offset&&n.length&&(e=this.getDecimalForValue(n[0]),n.length===1?t=1-e:t=(this.getDecimalForValue(n[1])-e)/2,o=this.getDecimalForValue(n[n.length-1]),n.length===1?r=o:r=(o-this.getDecimalForValue(n[n.length-2]))/2);const a=n.length<3?.5:.25;t=st(t,0,a),r=st(r,0,a),this._offsets={start:t,end:r,factor:1/(t+1+r)}}_generate(){const n=this._adapter,t=this.min,r=this.max,e=this.options,o=e.time,a=o.unit||hM(o.minUnit,t,r,this._getLabelCapacity(t)),s=ke(o.stepSize,1),l=a==="week"?o.isoWeekday:!1,u=Wn(l)||l===!0,f={};let d=t,M,h;if(u&&(d=+n.startOf(d,"isoWeek",l)),d=+n.startOf(d,u?"day":a),n.diff(r,t,a)>1e5*s)throw new Error(t+" and "+r+" are too far apart with stepSize of "+s+" "+a);const y=e.ticks.source==="data"&&this.getDataTimestamps();for(M=d,h=0;M<r;M=+n.add(M,s,a),h++)yM(f,M,y);return(M===r||e.bounds==="ticks"||h===1)&&yM(f,M,y),Object.keys(f).sort((p,N)=>p-N).map(p=>+p)}getLabelForValue(n){const t=this._adapter,r=this.options.time;return r.tooltipFormat?t.format(n,r.tooltipFormat):t.format(n,r.displayFormats.datetime)}_tickFormatFunction(n,t,r,e){const o=this.options,a=o.time.displayFormats,s=this._unit,l=this._majorUnit,u=s&&a[s],f=l&&a[l],d=r[t],M=l&&f&&d&&d.major,h=this._adapter.format(n,e||(M?f:u)),y=o.ticks.callback;return y?$e(y,[h,t,r],this):h}generateTickLabels(n){let t,r,e;for(t=0,r=n.length;t<r;++t)e=n[t],e.label=this._tickFormatFunction(e.value,t,n)}getDecimalForValue(n){return n===null?NaN:(n-this.min)/(this.max-this.min)}getPixelForValue(n){const t=this._offsets,r=this.getDecimalForValue(n);return this.getPixelForDecimal((t.start+r)*t.factor)}getValueForPixel(n){const t=this._offsets,r=this.getDecimalForPixel(n)/t.factor-t.end;return this.min+r*(this.max-this.min)}_getLabelSize(n){const t=this.options.ticks,r=this.ctx.measureText(n).width,e=Ot(this.isHorizontal()?t.maxRotation:t.minRotation),o=Math.cos(e),a=Math.sin(e),s=this._resolveTickFontOptions(0).size;return{w:r*o+s*a,h:r*a+s*o}}_getLabelCapacity(n){const t=this.options.time,r=t.displayFormats,e=r[t.unit]||r.millisecond,o=this._tickFormatFunction(n,0,pM(this,[n],this._majorUnit),e),a=this._getLabelSize(o),s=Math.floor(this.isHorizontal()?this.width/a.w:this.height/a.h)-1;return s>0?s:1}getDataTimestamps(){let n=this._cache.data||[],t,r;if(n.length)return n;const e=this.getMatchingVisibleMetas();if(this._normalized&&e.length)return this._cache.data=e[0].controller.getAllParsedValues(this);for(t=0,r=e.length;t<r;++t)n=n.concat(e[t].controller.getAllParsedValues(this));return this._cache.data=this.normalize(n)}getLabelTimestamps(){const n=this._cache.labels||[];let t,r;if(n.length)return n;const e=this.getLabels();for(t=0,r=e.length;t<r;++t)n.push(gM(this,e[t]));return this._cache.labels=this._normalized?n:this.normalize(n)}normalize(n){return kd(n.sort(Iv))}}Xo.id="time",Xo.defaults={bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",major:{enabled:!1}}};function Ko(i,n,t){let r=0,e=i.length-1,o,a,s,l;t?(n>=i[r].pos&&n<=i[e].pos&&({lo:r,hi:e}=Sn(i,"pos",n)),{pos:o,time:s}=i[r],{pos:a,time:l}=i[e]):(n>=i[r].time&&n<=i[e].time&&({lo:r,hi:e}=Sn(i,"time",n)),{time:o,pos:s}=i[r],{time:a,pos:l}=i[e]);const u=a-o;return u?s+(l-s)*(n-o)/u:s}class NM extends Xo{constructor(n){super(n),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const n=this._getTimestampsForTable(),t=this._table=this.buildLookupTable(n);this._minPos=Ko(t,this.min),this._tableRange=Ko(t,this.max)-this._minPos,super.initOffsets(n)}buildLookupTable(n){const{min:t,max:r}=this,e=[],o=[];let a,s,l,u,f;for(a=0,s=n.length;a<s;++a)u=n[a],u>=t&&u<=r&&e.push(u);if(e.length<2)return[{time:t,pos:0},{time:r,pos:1}];for(a=0,s=e.length;a<s;++a)f=e[a+1],l=e[a-1],u=e[a],Math.round((f+l)/2)!==u&&o.push({time:u,pos:a/(s-1)});return o}_getTimestampsForTable(){let n=this._cache.all||[];if(n.length)return n;const t=this.getDataTimestamps(),r=this.getLabelTimestamps();return t.length&&r.length?n=this.normalize(t.concat(r)):n=t.length?t:r,n=this._cache.all=n,n}getDecimalForValue(n){return(Ko(this._table,n)-this._minPos)/this._tableRange}getValueForPixel(n){const t=this._offsets,r=this.getDecimalForPixel(n)/t.factor-t.end;return Ko(this._table,r*this._tableRange+this._minPos,!0)}}NM.id="timeseries",NM.defaults=Xo.defaults;var ei;(function(i){i.ChartRendered="chart:rendered",i.ChartUpdated="chart:updated",i.ChartDestroyed="chart:destroyed",i.LabelsUpdated="labels:updated"})(ei||(ei={}));function qo(i,n,t,r){i(n,t),r!==void 0&&r.emit(ei.ChartRendered)}function bv(i,n){i.update(),n!==void 0&&n.emit(ei.ChartUpdated)}function ea(i,n){i.destroy(),n!==void 0&&n.emit(ei.ChartDestroyed)}function vv(i,n){const t={labels:typeof i.labels=="undefined"?[]:[...i.labels],datasets:[]};return mM(t,{...i},n),t}function mM(i,n,t){const r=[];i.datasets=n.datasets.map(e=>{const o=i.datasets.find(a=>a[t]===e[t]);return!o||!e.data||r.includes(o)?{...e}:(r.push(o),Object.assign(o,e),o)})}function Tv(i,n,t){i.data.labels=n,t!==void 0&&t.emit(ei.LabelsUpdated)}function Av(i,n){i.options={...n}}function kv(i,n){const t=i.datasets.map(e=>e.label),r=n.datasets.map(e=>e.label);return n.datasets.length===i.datasets.length&&t.every((e,o)=>e===r[o])}const zv="Please remove the <template></template> tags from your chart component. See https://vue-chartjs.org/guide/#vue-single-file-components",Lv="Update ERROR: chart instance not found",wv=((i,n,t)=>c.defineComponent({props:{chartData:{type:Object,required:!0},chartOptions:{type:Object,default:()=>{}},datasetIdKey:{type:String,default:"label"},chartId:{type:String,default:i},width:{type:Number,default:400},height:{type:Number,default:400},cssClasses:{type:String,default:""},styles:{type:Object,default:()=>{}},plugins:{type:Array,default:()=>[]}},setup(r,e){wi.register(t);const o=c.shallowRef(null),a=c.ref(null);function s(d,M){if(o.value!==null&&ea(c.toRaw(o.value),e),a.value===null)throw new Error(zv);{const h=vv(d,r.datasetIdKey),y=a.value.getContext("2d");y!==null&&(o.value=new wi(y,{type:n,data:c.isProxy(d)?new Proxy(h,{}):h,options:M,plugins:r.plugins}))}}function l(d,M){const h=c.isProxy(d)?c.toRaw(d):{...d},y=c.isProxy(M)?c.toRaw(M):{...M};if(Object.keys(y).length>0){const p=c.toRaw(o.value);kv(h,y)&&p!==null?(mM(p==null?void 0:p.data,h,r.datasetIdKey),h.labels!==void 0&&Tv(p,h.labels,e),f()):(p!==null&&ea(p,e),qo(s,r.chartData,r.chartOptions,e))}else o.value!==null&&ea(c.toRaw(o.value),e),qo(s,r.chartData,r.chartOptions,e)}function u(d){const M=c.toRaw(o.value);M!==null?(Av(M,d),f()):qo(s,r.chartData,r.chartOptions,e)}function f(){const d=c.toRaw(o.value);d!==null?bv(d,e):console.error(Lv)}return c.watch(()=>r.chartData,(d,M)=>l(d,M),{deep:!0}),c.watch(()=>r.chartOptions,d=>u(d),{deep:!0}),c.onMounted(()=>{"datasets"in r.chartData&&r.chartData.datasets.length>0&&qo(s,r.chartData,r.chartOptions,e)}),c.onBeforeUnmount(()=>{o.value!==null&&ea(c.toRaw(o.value),e)}),e.expose({chart:o,updateChart:f}),()=>c.h("div",{style:r.styles,class:r.cssClasses},[c.h("canvas",{id:r.chartId,width:r.width,height:r.height,ref:a})])}}))("bar-chart","bar",Eo);var yz="";const Sv={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 i=this.labels||[],n=this.min===void 0?0:this.min,t=i.length?i.length-1:100,r=this.max===void 0?t:this.max,e=this.minValue===void 0?25:this.minValue;i.length&&this.minValue===void 0&&(e=1);let o=this.maxValue||75;if(i.length&&this.maxValue===void 0&&(o=i.length-2),r<=n)throw new Error("Invalid props min or max");if(e>o)throw new Error("Invalid props minValue or maxValue");let a=this.rangeMargin===void 0?this.step:this.rangeMargin,s=a%this.step;return s&&(a=a+this.step-s),{valueMin:e<n?n:e,valueMax:o>r?r:o,interVal:null,startX:null,mouseMoveCounter:null,barBox:null,barValue:0,rangeMarginValue:a}},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(i){let n=parseFloat(i.target.value);n<=this.valueMax-this.rangeMarginValue&&n>=this.minimum?this.valueMin=n:i.target.value=this.valueMin},onInputMaxChange(i){let n=parseFloat(i.target.value);n>=this.valueMin+this.rangeMarginValue&&n<=this.maximum?this.valueMax=n:i.target.value=this.valueMax},onLeftThumbMousedown(i){if(i.preventDefault(),this.startX=i.clientX,i.type==="touchstart")if(i.touches.length===1)this.startX=i.touches[0].clientX;else return;this.mouseMoveCounter=0,this.barValue=this.valueMin,this.barBox=i.target.parentNode.getBoundingClientRect(),document.addEventListener("mousemove",this.onLeftThumbMousemove),document.addEventListener("mouseup",this.onLeftThumbMouseup),document.addEventListener("touchmove",this.onLeftThumbMousemove),document.addEventListener("touchend",this.onLeftThumbMouseup)},onLeftThumbMousemove(i){this.mouseMoveCounter++;let n=i.clientX;i.type==="touchmove"&&(n=i.touches[0].clientX);let r=(n-this.startX)/this.barBox.width,e=this.barValue+(this.maximum-this.minimum)*r;e-=e%this.step,e<this.minimum?e=this.minimum:e>this.valueMax-this.rangeMarginValue&&(e=this.valueMax-this.rangeMarginValue),this.valueMin=e},onLeftThumbMouseup(){document.removeEventListener("mousemove",this.onLeftThumbMousemove),document.removeEventListener("mouseup",this.onLeftThumbMouseup),document.removeEventListener("touchmove",this.onLeftThumbMousemove),document.removeEventListener("touchend",this.onLeftThumbMouseup)},onRightThumbMousedown(i){if(i.preventDefault(),this.startX=i.clientX,i.type==="touchstart")if(i.touches.length===1)this.startX=i.touches[0].clientX;else return;this.mouseMoveCounter=0,this.barValue=this.valueMax,this.barBox=i.target.parentNode.getBoundingClientRect(),document.addEventListener("mousemove",this.onRightThumbMousemove),document.addEventListener("mouseup",this.onRightThumbMouseup),document.addEventListener("touchmove",this.onRightThumbMousemove),document.addEventListener("touchend",this.onRightThumbMouseup)},onRightThumbMousemove(i){this.mouseMoveCounter++;let n=i.clientX;i.type==="touchmove"&&(n=i.touches[0].clientX);let r=(n-this.startX)/this.barBox.width,e=this.barValue+(this.maximum-this.minimum)*r;e-=e%this.step,e<this.valueMin+this.rangeMarginValue?e=this.valueMin+this.rangeMarginValue:e>this.maximum&&(e=this.maximum),this.valueMax=e},onRightThumbMouseup(){document.removeEventListener("mousemove",this.onRightThumbMousemove),document.removeEventListener("mouseup",this.onRightThumbMouseup),document.removeEventListener("touchmove",this.onRightThumbMousemove),document.removeEventListener("touchend",this.onRightThumbMouseup)},onMouseWheel(i){if(this.preventWheel===!0||!i.shiftKey&&!i.ctrlKey)return;let n=this.step;i.deltaY<0&&(n=-n),i.shiftKey&&i.ctrlKey?this.valueMin+n>=this.minimum&&this.valueMax+n<=this.maximum&&(this.valueMin=this.valueMin+n,this.valueMax=this.valueMax+n):i.ctrlKey?(n=this.valueMax+n,n<this.valueMin+this.rangeMarginValue?n=this.valueMin+this.rangeMarginValue:n>this.maximum&&(n=this.maximum),this.valueMax=n):i.shiftKey&&(n=this.valueMin+n,n<this.minimum?n=this.minimum:n>this.valueMax-this.rangeMarginValue&&(n=this.valueMax-this.rangeMarginValue),this.valueMin=n)},triggerInput(){let i=0;this.step.toString().includes(".")&&(i=2);let n={min:this.minimum,max:this.maximum,minValue:parseFloat(this.valueMin.toFixed(i)),maxValue:parseFloat(this.valueMax.toFixed(i))};this.$emit("input",n)}},computed:{minimum(){return this.min===void 0?0:this.min},maximum(){let i=this.labels||[],n=i.length?i.length-1:100;return this.max===void 0?n:this.max},stepCount(){let i=this.labels||[];return i.length?i.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 i=0;return this.step.toString().includes(".")&&(i=2),(this.valueMin||0).toFixed(i)},barMaxVal(){let i=0;return this.step.toString().includes(".")&&(i=2),(this.valueMax||100).toFixed(i)},scaleLabels(){let i=this.labels||[];return i.length===0&&(i=[],i.push(this.minimum),i.push(this.maximum)),i}},watch:{valueMin(){this.triggerInput()},valueMax(){this.triggerInput()},minValue(i){this.valueMin=i<this.minimum?this.minimum:i},maxValue(i){this.valueMax=i>this.maximum?this.maximum:i}},mounted(){}},Ov={class:"bar"},Ev=["min","max","step","value"],Cv={class:"caption"},_v={class:"min-caption"},Qv={class:"bar-inner"},Uv=["min","max","step","value"],Yv={class:"caption"},Bv={class:"max-caption"},Pv={key:0,class:"ruler"},Rv={key:1,class:"sub-ruler"},Vv={key:2,class:"labels"};function Zv(i,n,t,r,e,o){return c.openBlock(),c.createElementBlock("div",{class:c.normalizeClass([t.baseClassName,e.rangeMarginValue===0?"zero-ranage-margin":""]),onMousewheel:n[10]||(n[10]=c.withModifiers((...a)=>o.onMouseWheel&&o.onMouseWheel(...a),["prevent","stop"]))},[c.createElementVNode("div",Ov,[c.createElementVNode("div",{class:"bar-left",style:c.normalizeStyle({width:o.barMin+"%"}),onClick:n[0]||(n[0]=(...a)=>o.onBarLeftClick&&o.onBarLeftClick(...a))},null,4),c.createElementVNode("input",{class:"input-type-range input-type-range-min",type:"range",min:o.minimum,max:o.maximum,step:t.step,value:e.valueMin,onInput:n[1]||(n[1]=c.withModifiers((...a)=>o.onInputMinChange&&o.onInputMinChange(...a),["stop","prevent"]))},null,40,Ev),c.createElementVNode("div",{class:"thumb thumb-left",onMousedown:n[2]||(n[2]=(...a)=>o.onLeftThumbMousedown&&o.onLeftThumbMousedown(...a)),onTouchstart:n[3]||(n[3]=(...a)=>o.onLeftThumbMousedown&&o.onLeftThumbMousedown(...a))},[c.createElementVNode("div",Cv,[c.createElementVNode("span",_v,c.toDisplayString(t.minCaption||o.barMinVal),1)])],32),c.createElementVNode("div",Qv,[c.createElementVNode("div",{class:"bar-inner-left",onClick:n[4]||(n[4]=(...a)=>o.onInnerBarLeftClick&&o.onInnerBarLeftClick(...a))}),c.createElementVNode("div",{class:"bar-inner-right",onClick:n[5]||(n[5]=(...a)=>o.onInnerBarRightClick&&o.onInnerBarRightClick(...a))})]),c.createElementVNode("input",{class:"input-type-range input-type-range-max",type:"range",min:o.minimum,max:o.maximum,step:t.step,value:e.valueMax,onInput:n[6]||(n[6]=c.withModifiers((...a)=>o.onInputMaxChange&&o.onInputMaxChange(...a),["stop","prevent"]))},null,40,Uv),c.createElementVNode("div",{class:"thumb thumb-right",onMousedown:n[7]||(n[7]=(...a)=>o.onRightThumbMousedown&&o.onRightThumbMousedown(...a)),onTouchstart:n[8]||(n[8]=(...a)=>o.onRightThumbMousedown&&o.onRightThumbMousedown(...a))},[c.createElementVNode("div",Yv,[c.createElementVNode("span",Bv,c.toDisplayString(t.maxCaption||o.barMaxVal),1)])],32),c.createElementVNode("div",{class:"bar-right",style:c.normalizeStyle({width:o.barMax+"%"}),onClick:n[9]||(n[9]=(...a)=>o.onBarRightClick&&o.onBarRightClick(...a))},null,4)]),t.ruler?(c.openBlock(),c.createElementBlock("div",Pv,[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(o.stepCount,a=>(c.openBlock(),c.createElementBlock("div",{key:a,class:"ruler-rule"}))),128))])):c.createCommentVNode("",!0),o.subStepCount?(c.openBlock(),c.createElementBlock("div",Rv,[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(o.subStepCount,a=>(c.openBlock(),c.createElementBlock("div",{key:a,class:"ruler-sub-rule"}))),128))])):c.createCommentVNode("",!0),t.label?(c.openBlock(),c.createElementBlock("div",Vv,[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(o.scaleLabels,a=>(c.openBlock(),c.createElementBlock("div",{class:"label",key:a},c.toDisplayString(a),1))),128))])):c.createCommentVNode("",!0)],34)}var Fv=at(Sv,[["render",Zv]]);const Hv=c.defineComponent({components:{DhIcon:ve},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()}}}),Gv={class:"dh-advanced-filter-container"},Wv={class:"advance_section"},$v={key:0},Jv={class:"list-none"},Xv=["checked"],Kv=["checked"],qv=["checked"];function eT(i,n,t,r,e,o){const a=c.resolveComponent("dh-icon");return c.openBlock(),c.createElementBlock("div",Gv,[c.createElementVNode("div",Wv,[c.createElementVNode("span",{class:"toggle-icon",onClick:n[0]||(n[0]=s=>i.toggleFilter())},[c.createTextVNode(c.toDisplayString(i.mainText)+" ",1),c.createVNode(a,{"icon-name":i.activeFilter?"arrow-up":"arrow-down",size:20},null,8,["icon-name"])]),i.activeFilter?(c.openBlock(),c.createElementBlock("div",$v,[c.renderSlot(i.$slots,"default"),c.createElementVNode("ul",Jv,[c.createElementVNode("li",null,[c.createElementVNode("label",null,[c.createElementVNode("input",{checked:i.isFilterMissing,name:"number_filter",type:"checkbox",onChange:n[1]||(n[1]=s=>i.missingFilter())},null,40,Xv),c.createTextVNode(" "+c.toDisplayString(i.filterMissingText),1)])]),c.createElementVNode("li",null,[c.createElementVNode("label",null,[c.createElementVNode("input",{checked:i.isMatch,name:"number_filter",type:"radio",onChange:n[2]||(n[2]=s=>i.matchFilter())},null,40,Kv),c.createTextVNode(" "+c.toDisplayString(i.matchText),1)]),c.createElementVNode("label",null,[c.createElementVNode("input",{checked:i.isExclude,name:"number_filter",type:"radio",onChange:n[3]||(n[3]=s=>i.excludeFilter())},null,40,qv),c.createTextVNode(" "+c.toDisplayString(i.excludeText),1)])])])])):c.createCommentVNode("",!0)])])}var IM=at(Hv,[["render",eT]]),pz="";wi.register(rv,Fo,Go,Pl);const tT=c.defineComponent({components:{Bar:wv,MultiRangeSlider:Fv,DhAdvancedFilter:IM},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 i=this.chartData.datasets[0].data;this.chartLines=this.chartData.datasets[0],this.chartData.datasets[0].backgroundColor=[];for(let n=0;n<=i.length;n++)i[n]>=this.min&&i[n]<=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 i=this.chartData.datasets[0].data;this.chartLines=this.chartData.datasets[0],this.chartData.datasets[0].backgroundColor=[];for(let n=0;n<i.length;n++)i[n]>=this.min&&i[n]<=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 i=this.chartData.datasets[0].data;if(this.chartLines=this.chartData.datasets[0],this.chartData.datasets[0].backgroundColor=[],this.validated)for(let n=1;n<=i.length;n++)this.chartData.datasets[0].backgroundColor.push("#e0e0e0");else this.isMatch&&this.matchFilter(),this.isExclude&&this.excludeFilter()},changeMin(i){let n=i.target.value;this.min=n||"1",this.BarMinValue=n?this.getFirstIndex(parseInt(n)):1,this.isMatch&&!this.isDisable&&this.matchFilter(),this.isExclude&&!this.isDisable&&this.excludeFilter()},changeMax(i){let n=i.target.value;this.BarMaxValue=n&&n>this.maxNumber(this.numberRange)?this.numberRange.length:this.getLastIndex(parseInt(n)),this.max=n&&n>this.maxNumber(this.numberRange)?this.maxNumber(this.numberRange):n,this.isMatch&&!this.isDisable&&this.matchFilter(),this.isExclude&&!this.isDisable&&this.excludeFilter()},setChartData(i){i=this.sortData(i),this.removeChartData();let n=this.chartData.labels;for(let t=0;t<i.length;t++)n.push(i[t].key),this.chart_dta.push(i[t].count);this.chartData.datasets[0].data=this.chart_dta},highlightChart(){var i=this.chartData.datasets[0].data;this.chartLines=this.chartData.datasets[0],this.chartData.datasets[0].backgroundColor=[];for(let n=0;n<=i.length;n++)i[n]>=this.min&&i[n]<=this.max?this.chartData.datasets[0].backgroundColor.push("#5ea9e5"):this.chartData.datasets[0].backgroundColor.push("#e0e0e0")},updateBarChart(i){const{minValue:n,maxValue:t}=i;this.BarMinValue=n,this.BarMaxValue=t;var r=this.chartData.datasets[0].data;this.min=r[this.BarMinValue]?r[this.BarMinValue]:"1",this.max=r[this.BarMaxValue]?r[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(i){return i.slice().sort(function(n,t){return n.count-t.count})},maxNumber(i){if(i.length!=0)return i.reduce((n,t)=>n=n>t.count?n:t.count,0)},getLastIndex(i){let n=this.chartData.datasets[0].data,t=0;for(let r=i;r>=0;r--)if(n.lastIndexOf(r)!==-1){t=n.lastIndexOf(r);break}else continue;return t},getFirstIndex(i){let n=this.chartData.datasets[0].data,t=0;for(let r=i;r<=this.max;r++)if(n.lastIndexOf(r)!==-1){t=n.lastIndexOf(r);break}else continue;return t}}}),nT={class:"dh-range-container"},iT={class:"bar-chart"},rT={key:0,class:"input-group-section"},oT={class:"input-group sb-input"},aT=["disabled","max","value"],sT={class:"input-group sb-input"},lT=["disabled","max","min","value"];function uT(i,n,t,r,e,o){const a=c.resolveComponent("Bar"),s=c.resolveComponent("MultiRangeSlider"),l=c.resolveComponent("dh-advanced-filter");return c.openBlock(),c.createElementBlock("div",nT,[c.createElementVNode("div",iT,[c.createVNode(a,{"chart-data":i.chartData,"chart-id":i.chartId,"chart-options":i.chartOptions,"dataset-id-key":i.datasetIdKey,height:i.height,width:i.width},null,8,["chart-data","chart-id","chart-options","dataset-id-key","height","width"]),c.createVNode(s,{"base-class-name":`multi-range-slider range-slider ${i.isDisable}`,label:!0,labels:i.labels,max:i.rangeMax,"max-caption":`${i.max}`,"max-value":i.BarMaxValue,min:1,"min-caption":`${i.min}`,"min-value":i.BarMinValue,"range-margin":0,ruler:!1,step:i.steps,onInput:i.updateBarChart},null,8,["base-class-name","labels","max","max-caption","max-value","min-caption","min-value","step","onInput"])]),i.includeForm?(c.openBlock(),c.createElementBlock("div",rT,[c.createElementVNode("div",oT,[c.createElementVNode("label",{class:c.normalizeClass(`dh-body-2 input-to ${i.validated?"disable":""}`)}," From ",2),c.createElementVNode("input",{class:"form-input text",disabled:!!i.validated,max:`${i.max}`,min:"1",placeholder:"From",type:"number",value:`${i.min}`,onInput:n[0]||(n[0]=u=>i.changeMin(u))},null,40,aT)]),c.createElementVNode("div",sT,[c.createElementVNode("label",{class:c.normalizeClass(`dh-body-2 input-to ${i.validated?"disable":""}`)}," To ",2),c.createElementVNode("input",{class:"form-input text",disabled:!!i.validated,max:`${i.maxNumber(i.numberRange)}`,min:`${i.min}`,placeholder:"To",type:"number",value:`${i.max}`,onInput:n[1]||(n[1]=u=>i.changeMax(u))},null,40,lT)])])):c.createCommentVNode("",!0),c.renderSlot(i.$slots,"input"),c.createVNode(l,{onExclude:i.excludeFilter,onFilter_missing:i.missingFilter,onMatch:i.matchFilter},{default:c.withCtx(()=>[c.renderSlot(i.$slots,"filter")]),_:3},8,["onExclude","onFilter_missing","onMatch"])])}var jM=at(tT,[["render",uT]]),Nz="",mz="";const cT={id:"dp-container"},dT=c.createElementVNode("div",{class:"dp__calendar_range"},[c.createElementVNode("p",null,"From"),c.createElementVNode("p",null,"To")],-1),fT={class:"dp__multi"},MT=["value"],gT=["value"],hT=c.createTextVNode(" Back "),yT=["onClick"],pT=["onClick"],NT=["onClick"],mT=["onClick"],IT=["onClick"],jT=["onClick"],DT=["onClick"],xT=["onClick"],bT=c.createElementVNode("div",{id:"tags",class:"dp__calendar_tags"},null,-1),vT={__name:"AdvancedDatePicker",props:{numberRange:{type:Array,required:!0}},emits:["update"],setup(i,{emit:n}){const t=c.ref(["",""]),r=c.ref(null),e=c.ref(null),o=c.ref(null),a=c.ref(!1),s=c.ref([{label:"Today",range:[new Date,new Date],slot:"today"},{label:"Previous week",range:[Ec(Oc(new Date)),Oc(new Date)],slot:"previousWeek"},{label:"This week",range:[Ec(new Date),L0(new Date)],slot:"week"},{label:"Next week",range:[S0(new Date),w0(new Date().setDate(new Date().getDate()+7))],slot:"nextWeek"},{label:"This month",range:[Pi(new Date),Bi(new Date)],slot:"currentMonth"},{label:"Previous month",range:[Pi(jt(new Date,1)),Bi(jt(new Date,1))],slot:"previousMonth"},{label:"Last 3 months",range:[Pi(jt(new Date,3)),Bi(jt(new Date,1))],slot:"threeMonths"},{label:"Last 6 months",range:[Pi(jt(new Date,6)),Bi(jt(new Date,1))],slot:"sixMonths"},{label:"Last year",range:[qM(new Date),KM(new Date)],slot:"yearly"}]),l=M=>{t.value=M,console.log(t.value),n("update",t.value)};function u(M){e.value=M.target.value,t.value=[M.target.value,r.value]}function f(M){r.value=M.target.value,t.value=[e.value,M.target.value]}c.onMounted(()=>{o.value.openMenu()});function d(){o.value.openMenu()}return(M,h)=>(c.openBlock(),c.createElementBlock("div",cT,[dT,c.createVNode(c.unref(po),{ref_key:"datePicker",ref:o,modelValue:t.value,"onUpdate:modelValue":[h[2]||(h[2]=y=>t.value=y),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":s.value,range:"","select-text":"Apply","text-input":"",uid:"advanced",onClosed:d},{"dp-input":c.withCtx(()=>[c.createElementVNode("div",fT,[c.createElementVNode("input",{class:"dp__input dp__multi_input",placeholder:"MM/DD/YYYY",type:"text",value:e.value?e.value:t.value[0],onInput:h[0]||(h[0]=y=>u(y))},null,40,MT),c.createElementVNode("input",{class:"dp__input dp__multi_input",placeholder:"MM/DD/YYYY",type:"text",value:r.value?r.value:t.value[1],onInput:h[1]||(h[1]=y=>f(y))},null,40,gT)])]),"arrow-left":c.withCtx(()=>[c.createVNode(ve,{"icon-name":"previous",size:20})]),"arrow-right":c.withCtx(()=>[c.createVNode(ve,{"icon-name":"next",size:20})]),"calendar-icon":c.withCtx(()=>[hT]),"clear-icon":c.withCtx(()=>[]),"action-preview":c.withCtx(()=>[]),"action-select":c.withCtx(()=>[]),previousWeek:c.withCtx(({label:y,range:p,presetDateRange:N})=>[(c.openBlock(),c.createBlock(c.Teleport,{to:"#tags"},[c.createElementVNode("span",{onClick:g=>N(p)},c.toDisplayString(y),9,yT)]))]),week:c.withCtx(({label:y,range:p,presetDateRange:N})=>[(c.openBlock(),c.createBlock(c.Teleport,{to:"#tags"},[c.createElementVNode("span",{onClick:g=>N(p)},c.toDisplayString(y),9,pT)]))]),nextWeek:c.withCtx(({label:y,range:p,presetDateRange:N})=>[(c.openBlock(),c.createBlock(c.Teleport,{to:"#tags"},[c.createElementVNode("span",{onClick:g=>N(p)},c.toDisplayString(y),9,NT)]))]),currentMonth:c.withCtx(({label:y,range:p,presetDateRange:N})=>[(c.openBlock(),c.createBlock(c.Teleport,{to:"#tags"},[c.createElementVNode("span",{onClick:g=>N(p)},c.toDisplayString(y),9,mT)]))]),previousMonth:c.withCtx(({label:y,range:p,presetDateRange:N})=>[(c.openBlock(),c.createBlock(c.Teleport,{to:"#tags"},[c.createElementVNode("span",{onClick:g=>N(p)},c.toDisplayString(y),9,IT)]))]),threeMonths:c.withCtx(({label:y,range:p,presetDateRange:N})=>[(c.openBlock(),c.createBlock(c.Teleport,{to:"#tags"},[c.createElementVNode("span",{onClick:g=>N(p)},c.toDisplayString(y),9,jT)]))]),sixMonths:c.withCtx(({label:y,range:p,presetDateRange:N})=>[(c.openBlock(),c.createBlock(c.Teleport,{to:"#tags"},[c.createElementVNode("span",{onClick:g=>N(p)},c.toDisplayString(y),9,DT)]))]),yearly:c.withCtx(({label:y,range:p,presetDateRange:N})=>[(c.openBlock(),c.createBlock(c.Teleport,{to:"#tags"},[c.createElementVNode("span",{onClick:g=>N(p)},c.toDisplayString(y),9,xT)]))]),_:1},8,["modelValue","preset-ranges"]),c.createVNode(jM,{class:"dp__calendar_range_number","number-range":i.numberRange,steps:1},{input:c.withCtx(()=>[bT]),filter:c.withCtx(()=>[c.createVNode(yd,{data:a.value,label:"Include time",onChange:h[3]||(h[3]=y=>a.value=y)},null,8,["data"])]),_:1},8,["number-range"])]))}},TT=c.defineComponent({props:{target:{type:String,required:!0},trigger:{type:String,required:!0},placement:{type:String,default:()=>"bottom",required:!1},tooltipText:{type:String,required:!0}},data(){return{show:!1}},methods:{showTooltip(){this.show=!this.show},tooltip(){let i=this.$refs.main,n=this.$refs[this.target];["right","left"].includes(this.placement)&&(n.style.top=-(((n==null?void 0:n.offsetHeight)-(i==null?void 0:i.offsetHeight))/2)+"px")}}}),AT=["placement","target","tooltipText","trigger"],kT=["id"],zT={class:"text"};function LT(i,n,t,r,e,o){return c.openBlock(),c.createElementBlock("div",{id:"main-contain",ref:"main",class:"dh-tooltip-container tooltip",placement:i.placement,target:i.target,tooltipText:i.tooltipText,trigger:i.trigger,onClick:n[0]||(n[0]=a=>i.trigger=="click"?i.showTooltip():null),onMouseover:n[1]||(n[1]=a=>i.tooltip())},[c.renderSlot(i.$slots,"default"),c.createElementVNode("div",{id:i.target,ref:i.target,class:c.normalizeClass(`tooltiptext ${i.show}`)},[c.createElementVNode("span",zT,c.toDisplayString(i.tooltipText),1)],10,kT)],40,AT)}var DM=at(TT,[["render",LT]]),Iz="";const wT={class:"copy__text"},ST=["readonly"],OT={__name:"Copiable",props:{text:{type:String,required:!0},placement:{type:String,default:"bottom"},readonly:{type:Boolean,default:!0}},setup(i){const n=i,t=c.ref(""),r=c.ref("copy text");function e(a){navigator.clipboard.writeText(a),r.value="copied !"}function o(){r.value="copy text"}return c.onMounted(()=>{t.value=n.text}),(a,s)=>(c.openBlock(),c.createElementBlock("span",wT,[c.withDirectives(c.createElementVNode("input",{"onUpdate:modelValue":s[0]||(s[0]=l=>t.value=l),readonly:i.readonly,type:"text",onInput:o},null,40,ST),[[c.vModelText,t.value]]),c.createVNode(DM,{placement:i.placement,target:"tooltiptext","tooltip-text":r.value,trigger:"hover",onClick:s[1]||(s[1]=l=>e(t.value))},{default:c.withCtx(()=>[c.createVNode(ve,{class:"copy__text_icon","icon-name":"copy",size:18})]),_:1},8,["placement","tooltip-text"])]))}};var jz="";const ET=c.createTextVNode(" Back "),CT=c.createElementVNode("div",null,"today",-1),_T={__name:"DatePicker",props:{inline:{type:Boolean,default:!0}},emits:["update"],setup(i,{emit:n}){const t=c.ref(),r=c.ref(null),e=a=>{t.value=a,n("update",t.value)},o=c.ref([{date:Xt(new Date,0),type:"dot",tooltip:[{text:"Dot with tooltip",color:"blue"}]}]);return(a,s)=>(c.openBlock(),c.createElementBlock("div",null,[c.createVNode(c.unref(po),{ref_key:"datePicker",ref:r,modelValue:t.value,"onUpdate:modelValue":[s[0]||(s[0]=l=>t.value=l),e],"day-names":["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],"enable-time-picker":!1,inline:i.inline,markers:o.value,"month-name-format":"short",offset:12,placeholder:"MM/DD/YYYY","select-text":"Apply","text-input":"",uid:"base"},{"arrow-left":c.withCtx(()=>[c.createVNode(ve,{"icon-name":"previous",size:20})]),"arrow-right":c.withCtx(()=>[c.createVNode(ve,{"icon-name":"next",size:20})]),"calendar-icon":c.withCtx(()=>[ET]),"clear-icon":c.withCtx(()=>[]),"action-preview":c.withCtx(()=>[]),"marker-tooltip":c.withCtx(()=>[CT]),_:1},8,["modelValue","inline","markers"])]))}};var Dz="";const QT=["src"],UT={key:3,class:"menu-item-text-wrapper"};var xM=at(c.defineComponent({__name:"DropdownMenuItem",props:{item:{type:Object,required:!0},textEllipsisStyle:{type:String,required:!1,default:"none",validator:i=>["none","ellipsis","fit-content"].includes(i)},iconSize:{type:Number,required:!1,default:24}},setup(i){const n=i;return(t,r)=>(c.openBlock(),c.createElementBlock(c.Fragment,null,[i.item.iconUrl?(c.openBlock(),c.createElementBlock("img",{key:0,alt:"icon image",class:"icon icon-url",src:i.item.iconUrl},null,8,QT)):c.createCommentVNode("",!0),i.item.iconUrl?c.createCommentVNode("",!0):(c.openBlock(),c.createBlock(ve,c.mergeProps({key:1,class:"icon"},{...i.item,size:n.iconSize}),null,16)),i.item.subText?c.createCommentVNode("",!0):(c.openBlock(),c.createElementBlock("span",{key:2,class:c.normalizeClass(["dh-body-2",i.textEllipsisStyle])},c.toDisplayString(i.item.text),3)),i.item.subText?(c.openBlock(),c.createElementBlock("div",UT,[c.createElementVNode("span",{class:c.normalizeClass(["dh-body-1",i.textEllipsisStyle])},c.toDisplayString(i.item.text),3),c.createElementVNode("span",{class:c.normalizeClass(["dh-body-4-medium",i.textEllipsisStyle])},c.toDisplayString(i.item.subText),3)])):c.createCommentVNode("",!0),i.item.isSelected?(c.openBlock(),c.createBlock(ve,{key:4,class:"icon-blue icon-accept","icon-name":"accept",size:16})):c.createCommentVNode("",!0)],64))}}),[["__scopeId","data-v-35071082"]]),bz="";const YT=["data-e2e","onClick"],BT=["onClick"];var PT=at(c.defineComponent({__name:"DropdownMenu",props:{items:{type:Object,required:!0},textEllipsisStyle:{type:String,required:!1,default:"none",validator:i=>["none","ellipsis","fit-content"].includes(i)},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(i,{emit:n}){const t=i;c.onMounted(()=>{document.addEventListener("click",o=>{r(o)})});function r(o){const a=o.target,s=document.querySelector("[data-id='dropdown-menu']");s&&!s.contains(o.target)&&!a.classList.contains("dropdown-toggle")&&t.closeOnClickOutside&&n("close")}function e(o){n("itemSelected",o),t.closeOnItemSelected&&n("close")}return(o,a)=>{const s=c.resolveComponent("router-link");return c.openBlock(),c.createElementBlock("div",{class:"dropdown-menu","data-id":"dropdown-menu",style:c.normalizeStyle({"z-index":t.zIndex})},[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(i.items,l=>(c.openBlock(),c.createElementBlock("div",{key:l.iconName,class:"menu-item","data-e2e":l.dataE2eTag,onClick:u=>e(l)},[l.url?(c.openBlock(),c.createBlock(s,{key:0,class:"center-vertical",to:{path:l.url},onClick:u=>e(l)},{default:c.withCtx(()=>[c.createVNode(xM,{"icon-size":i.iconSize,item:l,"text-ellipsis-style":i.textEllipsisStyle},null,8,["icon-size","item","text-ellipsis-style"])]),_:2},1032,["to","onClick"])):(c.openBlock(),c.createElementBlock("div",{key:1,class:"center-vertical",onClick:u=>e(l)},[c.createVNode(xM,{"icon-size":i.iconSize,item:l,"text-ellipsis-style":i.textEllipsisStyle},null,8,["icon-size","item","text-ellipsis-style"])],8,BT))],8,YT))),128))],4)}}}),[["__scopeId","data-v-0c809d82"]]),Tz="";const RT={key:0,class:"invalid-feedback"},VT=c.defineComponent({__name:"Error",props:{errors:{type:Object,required:!1,default:void 0}},setup(i){const n=i;return(t,r)=>{var e;return c.unref(n).errors&&((e=c.unref(n).errors)==null?void 0:e.length)>0?(c.openBlock(),c.createElementBlock("div",RT,[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(i.errors,o=>(c.openBlock(),c.createElementBlock("span",{key:o},c.toDisplayString(o),1))),128))])):c.createCommentVNode("",!0)}}}),ZT=c.defineComponent({components:{DhIcon:ve},props:{title:{type:String,default:"Advanced"},isAdvancedSettingsOpen:{type:Boolean,default:!1}},data(){return{isAdvancedSettingsCurrentlyOpen:!1}},watch:{isAdvancedSettingsOpen:function(i){this.isAdvancedSettingsCurrentlyOpen=i}},mounted(){this.isAdvancedSettingsCurrentlyOpen=this.isAdvancedSettingsOpen}}),FT={class:"dh-body-1-medium"},HT=c.createTextVNode(" Content ");function GT(i,n,t,r,e,o){const a=c.resolveComponent("dh-icon");return c.openBlock(),c.createElementBlock(c.Fragment,null,[c.createElementVNode("div",{class:c.normalizeClass(["advanced-panel-header clickable",{opened:i.isAdvancedSettingsCurrentlyOpen,closed:!i.isAdvancedSettingsCurrentlyOpen}]),"data-e2e":"expansion-panel-button",onClick:n[0]||(n[0]=s=>i.isAdvancedSettingsCurrentlyOpen=!i.isAdvancedSettingsCurrentlyOpen)},[c.createElementVNode("h4",FT,c.toDisplayString(i.title),1),c.createVNode(a,{class:"icon","icon-name":i.isAdvancedSettingsCurrentlyOpen?"arrow-up":"arrow-down",size:24},null,8,["icon-name"])],2),i.isAdvancedSettingsCurrentlyOpen?c.renderSlot(i.$slots,"content",{key:0},()=>[HT]):c.createCommentVNode("",!0)],64)}var WT=at(ZT,[["render",GT]]),Az="";const $T=c.createElementVNode("label",{for:"upload_pdf"},[c.createTextVNode(" Drag and drop file or "),c.createElementVNode("span",{id:"upload"},"browse")],-1),JT={key:1,class:"file__upload_items"},XT={class:"file__upload_list_item"},KT={class:"file__upload_list_item_label"},qT=["title"],eA={key:0,class:"label__antivirus"},tA={key:1,class:"label__antivirus label__antivirus--failed"},nA={key:2,class:"label__antivirus label__antivirus--detected"},iA=c.createElementVNode("br",null,null,-1),rA={key:3},oA={key:4},aA={key:0},sA=["value"],lA=["href"],uA={key:2,class:"file__upload_placeholder"},cA={key:3,class:"file__upload_action"},dA=c.createElementVNode("button",{class:"file__upload_action_cancel"},"Cancel",-1),fA={__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(i,{emit:n}){const t=i,r=c.ref(null),e=c.ref(!1),o=c.ref([]),a=c.ref([".pdf",".csv",".doc",".jpeg",".mp4",".png",".txt",".xls"]);function s(x,T=2){if(!+x)return"0 Bytes";const j=1024,v=T<0?0:T,w=["Bytes","KB","MB","GB","TB","PB","EB","ZB","YB"],A=Math.floor(Math.log(x)/Math.log(j));return`${parseFloat((x/Math.pow(j,A)).toFixed(v))} ${w[A]}`}function l(x){return a.value.includes(f(x))?f(x).slice(1):"unknown"}function u(x){const T=x.lastIndexOf(".");let j=x.slice(0,T);return j.length<=15?j:j.slice(0,15)+"... "}function f(x){return x.replace(/.*(?=\.)/g,"")}function d(x){x.stopPropagation(),o.value=r.value.files,o.value&&(e.value=!0),n("update:modelValue",o.value)}function M(x){x.stopPropagation(),x.dataTransfer.dropEffect="copy"}function h(x){x.stopPropagation(),e.value=!0,o.value=x.dataTransfer.files,n("update:modelValue",o.value)}function y(x){window.confirm(t.deleteConfirmationText)&&p(x)}function p(x){const T=new DataTransfer;for(let j=0;j<o.value.length;j++){const v=o.value[j];x!==j&&T.items.add(v)}o.value=T.files,o.value.length==0&&(e.value=!1)}function N(){n("save:modelValue",o.value)}function g(x){return URL.createObjectURL(x)}function I(x){x.preventDefault(),n("reload")}return(x,T)=>(c.openBlock(),c.createElementBlock("div",{class:c.normalizeClass(["file__upload",i.inline?"":"file__upload_box"])},[i.fileSaved?c.createCommentVNode("",!0):(c.openBlock(),c.createElementBlock("div",{key:0,class:"file__upload_btn",onDragover:T[1]||(T[1]=c.withModifiers(j=>M(j),["prevent"])),onDrop:T[2]||(T[2]=c.withModifiers(j=>h(j),["prevent"]))},[c.createVNode(ve,{class:"file__upload_btn_icon","icon-name":"upload",size:24}),$T,c.createElementVNode("input",{id:"upload_pdf",ref_key:"upload",ref:r,multiple:"",name:"file",type:"file",onInput:T[0]||(T[0]=j=>d(j))},null,544)],32)),e.value?(c.openBlock(),c.createElementBlock("div",JT,[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(o.value,(j,v)=>(c.openBlock(),c.createElementBlock("div",{key:v,class:c.normalizeClass(["file__upload_list",i.inline?"":"file__upload_list_box"])},[c.createVNode(ve,{class:c.normalizeClass(i.errorOccurred[v]?"file__upload_list_icon":""),"icon-name":"file-"+l(j.name),size:40},null,8,["class","icon-name"]),t.uploadProgress[v]==100&&i.fileSaved&&!i.errorOccurred[v]&&i.virusCheck[v]=="loading"?(c.openBlock(),c.createBlock(ve,{key:0,class:"file__upload_list_icon_sub file__upload_list_icon_sub--loading","icon-name":"states",size:20,style:c.normalizeStyle({"z-index":t.zIndex})},null,8,["style"])):c.createCommentVNode("",!0),t.uploadProgress[v]==100&&i.fileSaved&&i.virusCheck[v]=="failed"?(c.openBlock(),c.createBlock(ve,{key:1,class:"file__upload_list_icon_sub","icon-name":"warning",size:20,style:c.normalizeStyle({"z-index":t.zIndex})},null,8,["style"])):c.createCommentVNode("",!0),t.uploadProgress[v]==100&&i.fileSaved&&i.virusCheck[v]=="detected"?(c.openBlock(),c.createBlock(ve,{key:2,class:"file__upload_list_icon_sub","icon-name":"danger",size:20,style:c.normalizeStyle({"z-index":t.zIndex})},null,8,["style"])):c.createCommentVNode("",!0),i.fileSaved&&i.errorOccurred[v]?(c.openBlock(),c.createBlock(ve,{key:3,class:"file__upload_list_icon_sub","icon-name":"error",size:20,style:c.normalizeStyle({"z-index":t.zIndex})},null,8,["style"])):c.createCommentVNode("",!0),c.createElementVNode("div",XT,[c.createElementVNode("div",KT,[c.createElementVNode("div",null,[c.createElementVNode("span",{title:j.name},c.toDisplayString(u(j.name))+c.toDisplayString(f(j.name)),9,qT),t.uploadProgress[v]==100&&i.fileSaved&&!i.errorOccurred[v]&&i.virusCheck[v]=="loading"?(c.openBlock(),c.createElementBlock("span",eA,[c.createTextVNode(c.toDisplayString(i.virusCheckText)+" ",1),c.createVNode(ve,{class:"file__upload_list_icon_sub--loading","icon-name":"processing",size:18})])):c.createCommentVNode("",!0),t.uploadProgress[v]==100&&i.fileSaved&&i.virusCheck[v]=="failed"?(c.openBlock(),c.createElementBlock("span",tA,c.toDisplayString(i.virusCheckFailedText),1)):c.createCommentVNode("",!0),t.uploadProgress[v]==100&&i.fileSaved&&i.virusCheck[v]=="detected"?(c.openBlock(),c.createElementBlock("span",nA,c.toDisplayString(i.virusDetectedText),1)):c.createCommentVNode("",!0),iA,i.fileSaved&&!i.errorOccurred[v]||!i.errorOccurred[v]&&i.virusCheck[v]?(c.openBlock(),c.createElementBlock("span",rA,c.toDisplayString(s(j.size)),1)):c.createCommentVNode("",!0),i.fileSaved&&i.errorOccurred[v]?(c.openBlock(),c.createElementBlock("span",oA,c.toDisplayString(i.errorMessage),1)):c.createCommentVNode("",!0)]),i.fileSaved?c.createCommentVNode("",!0):(c.openBlock(),c.createElementBlock("span",aA,c.toDisplayString(t.uploadProgress[v])+"%",1))]),i.fileSaved?c.createCommentVNode("",!0):(c.openBlock(),c.createElementBlock("progress",{key:0,id:"file",max:"100",value:t.uploadProgress[v]},c.toDisplayString(t.uploadProgress[v])+"% ",9,sA))]),i.fileSaved&&!i.virusCheck[v]&&!i.errorOccurred[v]?(c.openBlock(),c.createElementBlock("a",{key:4,class:"file__upload_list_download",download:"",href:g(j)},[c.createVNode(ve,{class:"file__upload_list_download_icon","icon-name":"download",size:24})],8,lA)):c.createCommentVNode("",!0),i.fileSaved&&i.errorOccurred[v]?(c.openBlock(),c.createElementBlock("a",{key:5,class:"file__upload_list_retry",onClick:T[3]||(T[3]=w=>I(w))},[c.createVNode(ve,{class:"file__upload_list_retry_icon","icon-name":"retry",size:24})])):c.createCommentVNode("",!0),t.uploadProgress[v]!==100?(c.openBlock(),c.createBlock(ve,{key:6,class:"file__upload_list_delete","icon-name":"close",size:24,onClick:w=>p(v)},null,8,["onClick"])):(c.openBlock(),c.createBlock(ve,{key:7,class:"file__upload_list_delete","icon-name":"delete",size:24,onClick:w=>y(v)},null,8,["onClick"]))],2))),128))])):c.createCommentVNode("",!0),!e.value&&!i.inline?(c.openBlock(),c.createElementBlock("div",uA," No file selected ")):c.createCommentVNode("",!0),!i.inline&&!i.fileSaved?(c.openBlock(),c.createElementBlock("div",cA,[dA,c.createElementVNode("button",{class:c.normalizeClass(["file__upload_action_done",e.value&&!i.fileSaved?"file__upload_action_done--active":""]),onClick:N}," Done ",2)])):c.createCommentVNode("",!0)],2))}};var kz="";const MA={class:"input__dropdown"},gA={class:"input__dropdown_second"},hA=["tabindex"],yA=["onClick"],pA=["onClick"],NA={__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(i,{emit:n}){const t=i,r=c.ref(t.placeholder),e=c.ref(!1),o=c.ref(null);c.onMounted(()=>{n("update","",r.value)});function a(){n("update",o.value.value,r.value)}return(s,l)=>(c.openBlock(),c.createElementBlock("div",MA,[c.createElementVNode("input",{ref_key:"name",ref:o,class:"input__dropdown_text",type:"text",onInput:a},null,544),c.createElementVNode("div",gA,[c.createVNode(ve,{"icon-name":i.icon,size:18},null,8,["icon-name"]),c.createElementVNode("div",{class:"custom__select",tabindex:i.tabindex,onBlur:l[1]||(l[1]=u=>e.value=!1)},[c.createElementVNode("div",{class:c.normalizeClass(["custom__select_selected",{"custom__select--open":e.value}]),onClick:l[0]||(l[0]=u=>e.value=!e.value)},c.toDisplayString(r.value),3),typeof i.list[0]=="object"?(c.openBlock(),c.createElementBlock("div",{key:0,class:c.normalizeClass(["custom__select_items",{"custom__select--hide":!e.value}])},[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(i.list,(u,f)=>(c.openBlock(),c.createElementBlock("div",{key:f,onClick:d=>{r.value=u[i.labelProp],e.value=!1,a()}},c.toDisplayString(u[i.labelProp]),9,yA))),128))],2)):c.createCommentVNode("",!0),typeof i.list[0]=="string"?(c.openBlock(),c.createElementBlock("div",{key:1,class:c.normalizeClass(["custom__select_items",{"custom__select--hide":!e.value}])},[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(i.list,(u,f)=>(c.openBlock(),c.createElementBlock("div",{key:f,onClick:d=>{r.value=u,e.value=!1,a()}},c.toDisplayString(u),9,pA))),128))],2)):c.createCommentVNode("",!0)],40,hA)])]))}};var zz="";const mA={class:"input__group"},IA=["type"],jA={__name:"InputGroup",props:{inputType:{type:String,default:"text"},iconName:{type:String,required:!0},widthProp:{type:String,default:"200px"},direction:{type:String,default:"right"}},setup(i){const n=i;c.useCssVars(r=>({"14ee876f":t.value,"0aeebdb8":i.widthProp}));const t=c.ref("row");return c.onMounted(()=>{n.direction=="left"&&(t.value="row-reverse")}),(r,e)=>(c.openBlock(),c.createElementBlock("div",mA,[c.createElementVNode("input",{class:"input__group_field",type:i.inputType},null,8,IA),c.createVNode(ve,{class:"input__group_icon","icon-name":i.iconName},null,8,["icon-name"])]))}};var DA="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 Ht(i){return[null,void 0].indexOf(i)!==-1}function xA(i,n,t){const{object:r,valueProp:e,mode:o}=c.toRefs(i),a=c.getCurrentInstance().proxy,s=t.iv,l=d=>{s.value=f(d);const M=u(d);n.emit("change",M,a),n.emit("input",M),n.emit("update:modelValue",M)},u=d=>r.value||Ht(d)?d:Array.isArray(d)?d.map(M=>M[e.value]):d[e.value],f=d=>Ht(d)?o.value==="single"?{}:[]:d;return{update:l}}function bA(i,n){const{value:t,modelValue:r,mode:e,valueProp:o}=c.toRefs(i),a=c.ref(e.value!=="single"?[]:{}),s=r&&r.value!==void 0?r:t,l=c.computed(()=>e.value==="single"?a.value[o.value]:a.value.map(f=>f[o.value])),u=c.computed(()=>e.value!=="single"?a.value.map(f=>f[o.value]).join(","):a.value[o.value]);return{iv:a,internalValue:a,ev:s,externalValue:s,textValue:u,plainValue:l}}function vA(i,n,t){const{regex:r}=c.toRefs(i),e=c.getCurrentInstance().proxy,o=t.isOpen,a=t.open,s=c.ref(null),l=c.ref(null),u=()=>{s.value=""},f=h=>{s.value=h.target.value},d=h=>{if(r&&r.value){let y=r.value;typeof y=="string"&&(y=new RegExp(y)),h.key.match(y)||h.preventDefault()}},M=h=>{if(r&&r.value){let p=(h.clipboardData||window.clipboardData).getData("Text"),N=r.value;typeof N=="string"&&(N=new RegExp(N)),p.split("").every(g=>!!g.match(N))||h.preventDefault()}n.emit("paste",h,e)};return c.watch(s,h=>{!o.value&&h&&a(),n.emit("search-change",h,e)}),{search:s,input:l,clearSearch:u,handleSearchInput:f,handleKeypress:d,handlePaste:M}}function TA(i,n,t){const{groupSelect:r,mode:e,groups:o,disabledProp:a}=c.toRefs(i),s=c.ref(null),l=f=>{f===void 0||f!==null&&f[a.value]||o.value&&f&&f.group&&(e.value==="single"||!r.value)||(s.value=f)};return{pointer:s,setPointer:l,clearPointer:()=>{l(null)}}}function ta(i,n=!0){return n?String(i).toLowerCase().trim():String(i).normalize("NFD").replace(/\p{Diacritic}/gu,"").toLowerCase().trim()}function AA(i){return Object.prototype.toString.call(i)==="[object Object]"}function kA(i,n){const t=n.slice().sort();return i.length===n.length&&i.slice().sort().every(function(r,e){return r===t[e]})}function zA(i,n,t){const{options:r,mode:e,trackBy:o,limit:a,hideSelected:s,createTag:l,createOption:u,label:f,appendNewTag:d,appendNewOption:M,multipleLabel:h,object:y,loading:p,delay:N,resolveOnLoad:g,minChars:I,filterResults:x,clearOnSearch:T,clearOnSelect:j,valueProp:v,canDeselect:w,max:A,strict:k,closeOnSelect:L,groups:b,reverse:m,infinite:D,groupOptions:S,groupHideEmpty:z,groupSelect:O,onCreate:C,disabledProp:E,searchStart:B}=c.toRefs(i),U=c.getCurrentInstance().proxy,Q=t.iv,_=t.ev,Y=t.search,V=t.clearSearch,P=t.update,R=t.pointer,F=t.clearPointer,H=t.focus,W=t.deactivate,K=t.close,re=c.ref([]),ne=c.ref([]),se=c.ref(!1),de=c.ref(null),Z=c.ref(D.value&&a.value===-1?10:a.value),q=c.computed(()=>l.value||u.value||!1),Me=c.computed(()=>d.value!==void 0?d.value:M.value!==void 0?M.value:!0),fe=c.computed(()=>{if(b.value){let $=ne.value||[],ae=[];return $.forEach(me=>{mt(me[S.value]).forEach(ee=>{ae.push(Object.assign({},ee,me[E.value]?{[E.value]:!0}:{}))})}),ae}else{let $=mt(ne.value||[]);return re.value.length&&($=$.concat(re.value)),$}}),Ie=c.computed(()=>b.value?De((ne.value||[]).map(($,ae)=>{const me=mt($[S.value]);return{...$,index:ae,group:!0,[S.value]:Qt(me,!1).map(ee=>Object.assign({},ee,$[E.value]?{[E.value]:!0}:{})),__VISIBLE__:Qt(me).map(ee=>Object.assign({},ee,$[E.value]?{[E.value]:!0}:{}))}})):[]),Ce=c.computed(()=>{let $=fe.value;return m.value&&($=$.reverse()),te.value.length&&($=te.value.concat($)),Qt($)}),ze=c.computed(()=>{let $=Ce.value;return Z.value>0&&($=$.slice(0,Z.value)),$}),G=c.computed(()=>{switch(e.value){case"single":return!Ht(Q.value[v.value]);case"multiple":case"tags":return!Ht(Q.value)&&Q.value.length>0}}),X=c.computed(()=>h!==void 0&&h.value!==void 0?h.value(Q.value,U):Q.value&&Q.value.length>1?`${Q.value.length} options selected`:"1 option selected"),ie=c.computed(()=>!fe.value.length&&!se.value&&!te.value.length),le=c.computed(()=>fe.value.length>0&&ze.value.length==0&&(Y.value&&b.value||!b.value)),te=c.computed(()=>q.value===!1||!Y.value?[]:ye(Y.value)!==-1?[]:[{[v.value]:Y.value,[f.value]:Y.value,[oe.value]:Y.value,__CREATE__:!0}]),oe=c.computed(()=>o.value||f.value),je=c.computed(()=>{switch(e.value){case"single":return null;case"multiple":case"tags":return[]}}),Be=c.computed(()=>p.value||se.value),_e=$=>{switch(typeof $!="object"&&($=J($)),e.value){case"single":P($);break;case"multiple":case"tags":P(Q.value.concat($));break}n.emit("select",ft($),$,U)},tt=$=>{switch(typeof $!="object"&&($=J($)),e.value){case"single":on();break;case"tags":case"multiple":P(Array.isArray($)?Q.value.filter(ae=>$.map(me=>me[v.value]).indexOf(ae[v.value])===-1):Q.value.filter(ae=>ae[v.value]!=$[v.value]));break}n.emit("deselect",ft($),$,U)},ft=$=>y.value?$:$[v.value],Dn=$=>{tt($)},Bn=($,ae)=>{if(ae.button!==0){ae.preventDefault();return}Dn($)},on=()=>{n.emit("clear",U),P(je.value)},Nt=$=>{if($.group!==void 0)return e.value==="single"?!1:Qe($[S.value])&&$[S.value].length;switch(e.value){case"single":return!Ht(Q.value)&&Q.value[v.value]==$[v.value];case"tags":case"multiple":return!Ht(Q.value)&&Q.value.map(ae=>ae[v.value]).indexOf($[v.value])!==-1}},ht=$=>$[E.value]===!0,xn=()=>A===void 0||A.value===-1||!G.value&&A.value>0?!1:Q.value.length>=A.value,Gt=$=>{if(!ht($)){if(C&&C.value&&!Nt($)&&$.__CREATE__&&($={...$},delete $.__CREATE__,$=C.value($,U),$ instanceof Promise)){se.value=!0,$.then(ae=>{se.value=!1,ti(ae)});return}ti($)}},ti=$=>{switch($.__CREATE__&&($={...$},delete $.__CREATE__),e.value){case"single":if($&&Nt($)){w.value&&tt($);return}$&&Wt($),j.value&&V(),L.value&&(F(),K()),$&&_e($);break;case"multiple":if($&&Nt($)){tt($);return}if(xn())return;$&&(Wt($),_e($)),j.value&&V(),s.value&&F(),L.value&&K();break;case"tags":if($&&Nt($)){tt($);return}if(xn())return;$&&Wt($),j.value&&V(),$&&_e($),s.value&&F(),L.value&&K();break}L.value||H()},Oi=$=>{if(!(ht($)||e.value==="single"||!O.value)){switch(e.value){case"multiple":case"tags":_t($[S.value])?tt($[S.value]):_e($[S.value].filter(ae=>Q.value.map(me=>me[v.value]).indexOf(ae[v.value])===-1).filter(ae=>!ae[E.value]).filter((ae,me)=>Q.value.length+1+me<=A.value||A.value===-1));break}L.value&&W()}},Wt=$=>{J($[v.value])===void 0&&q.value&&(n.emit("tag",$[v.value],U),n.emit("option",$[v.value],U),Me.value&&Ne($),V())},ni=()=>{e.value!=="single"&&_e(ze.value)},_t=$=>$.find(ae=>!Nt(ae)&&!ae[E.value])===void 0,Qe=$=>$.find(ae=>!Nt(ae))===void 0,J=$=>fe.value[fe.value.map(ae=>String(ae[v.value])).indexOf(String($))],ye=($,ae=!0)=>fe.value.map(me=>parseInt(me[oe.value])==me[oe.value]?parseInt(me[oe.value]):me[oe.value]).indexOf(parseInt($)==$?parseInt($):$),ge=$=>["tags","multiple"].indexOf(e.value)!==-1&&s.value&&Nt($),Ne=$=>{re.value.push($)},De=$=>z.value?$.filter(ae=>Y.value?ae.__VISIBLE__.length:ae[S.value].length):$.filter(ae=>Y.value?ae.__VISIBLE__.length:!0),Qt=($,ae=!0)=>{let me=$;return Y.value&&x.value&&(me=me.filter(ee=>B.value?ta(ee[oe.value],k.value).startsWith(ta(Y.value,k.value)):ta(ee[oe.value],k.value).indexOf(ta(Y.value,k.value))!==-1)),s.value&&ae&&(me=me.filter(ee=>!ge(ee))),me},mt=$=>{let ae=$;return AA(ae)&&(ae=Object.keys(ae).map(me=>{let ee=ae[me];return{[v.value]:me,[oe.value]:ee,[f.value]:ee}})),ae=ae.map(me=>typeof me=="object"?me:{[v.value]:me,[oe.value]:me,[f.value]:me}),ae},$t=()=>{Ht(_.value)||(Q.value=sn(_.value))},Jt=$=>(se.value=!0,new Promise((ae,me)=>{r.value(Y.value,U).then(ee=>{ne.value=ee||[],typeof $=="function"&&$(ee),se.value=!1}).catch(ee=>{console.error(ee),ne.value=[],se.value=!1}).finally(()=>{ae()})})),an=()=>{if(!!G.value)if(e.value==="single"){let $=J(Q.value[v.value]);if($!==void 0){let ae=$[f.value];Q.value[f.value]=ae,y.value&&(_.value[f.value]=ae)}}else Q.value.forEach(($,ae)=>{let me=J(Q.value[ae][v.value]);if(me!==void 0){let ee=me[f.value];Q.value[ae][f.value]=ee,y.value&&(_.value[ae][f.value]=ee)}})},Pn=$=>{Jt($)},sn=$=>Ht($)?e.value==="single"?{}:[]:y.value?$:e.value==="single"?J($)||{}:$.filter(ae=>!!J(ae)).map(ae=>J(ae)),Ei=()=>{de.value=c.watch(Y,$=>{$.length<I.value||!$&&I.value!==0||(se.value=!0,T.value&&(ne.value=[]),setTimeout(()=>{$==Y.value&&r.value(Y.value,U).then(ae=>{($==Y.value||!Y.value)&&(ne.value=ae,R.value=ze.value.filter(me=>me[E.value]!==!0)[0]||null,se.value=!1)}).catch(ae=>{console.error(ae)})},N.value))},{flush:"sync"})};if(e.value!=="single"&&!Ht(_.value)&&!Array.isArray(_.value))throw new Error(`v-model must be an array when using "${e.value}" mode`);return r&&typeof r.value=="function"?g.value?Jt($t):y.value==!0&&$t():(ne.value=r.value,$t()),N.value>-1&&Ei(),c.watch(N,($,ae)=>{de.value&&de.value(),$>=0&&Ei()}),c.watch(_,$=>{if(Ht($)){Q.value=sn($);return}switch(e.value){case"single":(y.value?$[v.value]!=Q.value[v.value]:$!=Q.value[v.value])&&(Q.value=sn($));break;case"multiple":case"tags":kA(y.value?$.map(ae=>ae[v.value]):$,Q.value.map(ae=>ae[v.value]))||(Q.value=sn($));break}},{deep:!0}),c.watch(r,($,ae)=>{typeof i.options=="function"?g.value&&(!ae||$&&$.toString()!==ae.toString())&&Jt():(ne.value=i.options,Object.keys(Q.value).length||$t(),an())}),c.watch(f,an),{pfo:Ce,fo:ze,filteredOptions:ze,hasSelected:G,multipleLabelText:X,eo:fe,extendedOptions:fe,fg:Ie,filteredGroups:Ie,noOptions:ie,noResults:le,resolving:se,busy:Be,offset:Z,select:_e,deselect:tt,remove:Dn,selectAll:ni,clear:on,isSelected:Nt,isDisabled:ht,isMax:xn,getOption:J,handleOptionClick:Gt,handleGroupClick:Oi,handleTagRemove:Bn,refreshOptions:Pn,resolveOptions:Jt,refreshLabels:an}}function LA(i,n,t){const{valueProp:r,showOptions:e,searchable:o,groupLabel:a,groups:s,mode:l,groupSelect:u,disabledProp:f}=c.toRefs(i),d=t.fo,M=t.fg,h=t.handleOptionClick,y=t.handleGroupClick,p=t.search,N=t.pointer,g=t.setPointer,I=t.clearPointer,x=t.multiselect,T=t.isOpen,j=c.computed(()=>d.value.filter(P=>!P[f.value])),v=c.computed(()=>M.value.filter(P=>!P[f.value])),w=c.computed(()=>l.value!=="single"&&u.value),A=c.computed(()=>N.value&&N.value.group),k=c.computed(()=>Y(N.value)),L=c.computed(()=>{const P=A.value?N.value:Y(N.value),R=v.value.map(H=>H[a.value]).indexOf(P[a.value]);let F=v.value[R-1];return F===void 0&&(F=m.value),F}),b=c.computed(()=>{let P=v.value.map(R=>R.label).indexOf(A.value?N.value[a.value]:Y(N.value)[a.value])+1;return v.value.length<=P&&(P=0),v.value[P]}),m=c.computed(()=>[...v.value].slice(-1)[0]),D=c.computed(()=>N.value.__VISIBLE__.filter(P=>!P[f.value])[0]),S=c.computed(()=>{const P=k.value.__VISIBLE__.filter(R=>!R[f.value]);return P[P.map(R=>R[r.value]).indexOf(N.value[r.value])-1]}),z=c.computed(()=>{const P=Y(N.value).__VISIBLE__.filter(R=>!R[f.value]);return P[P.map(R=>R[r.value]).indexOf(N.value[r.value])+1]}),O=c.computed(()=>[...L.value.__VISIBLE__.filter(P=>!P[f.value])].slice(-1)[0]),C=c.computed(()=>[...m.value.__VISIBLE__.filter(P=>!P[f.value])].slice(-1)[0]),E=P=>!!N.value&&(!P.group&&N.value[r.value]==P[r.value]||P.group!==void 0&&N.value[a.value]==P[a.value])?!0:void 0,B=()=>{g(j.value[0]||null)},U=()=>{!N.value||N.value[f.value]===!0||(A.value?y(N.value):h(N.value))},Q=()=>{if(N.value===null)g((s.value&&w.value?v.value[0]:j.value[0])||null);else if(s.value&&w.value){let P=A.value?D.value:z.value;P===void 0&&(P=b.value),g(P||null)}else{let P=j.value.map(R=>R[r.value]).indexOf(N.value[r.value])+1;j.value.length<=P&&(P=0),g(j.value[P]||null)}c.nextTick(()=>{V()})},_=()=>{if(N.value===null){let P=j.value[j.value.length-1];s.value&&w.value&&(P=C.value,P===void 0&&(P=m.value)),g(P||null)}else if(s.value&&w.value){let P=A.value?O.value:S.value;P===void 0&&(P=A.value?L.value:k.value),g(P||null)}else{let P=j.value.map(R=>R[r.value]).indexOf(N.value[r.value])-1;P<0&&(P=j.value.length-1),g(j.value[P]||null)}c.nextTick(()=>{V()})},Y=P=>v.value.find(R=>R.__VISIBLE__.map(F=>F[r.value]).indexOf(P[r.value])!==-1),V=()=>{let P=x.value.querySelector("[data-pointed]");if(!P)return;let R=P.parentElement.parentElement;s.value&&(R=A.value?P.parentElement.parentElement.parentElement:P.parentElement.parentElement.parentElement.parentElement),P.offsetTop+P.offsetHeight>R.clientHeight+R.scrollTop&&(R.scrollTop=P.offsetTop+P.offsetHeight-R.clientHeight),P.offsetTop<R.scrollTop&&(R.scrollTop=P.offsetTop)};return c.watch(p,P=>{o.value&&(P.length&&e.value?B():I())}),c.watch(T,P=>{if(P){let R=x.value.querySelectorAll("[data-selected]")[0];if(!R)return;let F=R.parentElement.parentElement;c.nextTick(()=>{F.scrollTop>0||(F.scrollTop=R.offsetTop)})}}),{pointer:N,canPointGroups:w,isPointed:E,setPointerFirst:B,selectPointer:U,forwardPointer:Q,backwardPointer:_}}function wA(i,n,t){const{disabled:r}=c.toRefs(i),e=c.getCurrentInstance().proxy,o=c.ref(!1);return{isOpen:o,open:()=>{o.value||r.value||(o.value=!0,n.emit("open",e))},close:()=>{!o.value||(o.value=!1,n.emit("close",e))}}}function SA(i,n,t){const{searchable:r,disabled:e}=c.toRefs(i),o=t.input,a=t.open,s=t.close,l=t.clearSearch,u=t.isOpen,f=c.ref(null),d=c.ref(null),M=c.ref(null),h=c.ref(!1),y=c.ref(!1),p=c.computed(()=>r.value||e.value?-1:0),N=()=>{r.value&&o.value.blur(),d.value.blur()},g=()=>{r.value&&!e.value&&o.value.focus()},I=(A=!0)=>{e.value||(h.value=!0,A&&a())},x=()=>{h.value=!1,setTimeout(()=>{h.value||(s(),l())},1)};return{multiselect:f,wrapper:d,tags:M,tabindex:p,isActive:h,mouseClicked:y,blur:N,focus:g,activate:I,deactivate:x,handleFocusIn:A=>{A.target.closest("[data-tags]")||A.target.closest("[data-clear]")||I(y.value)},handleFocusOut:()=>{x()},handleCaretClick:()=>{x(),N()},handleMousedown:A=>{y.value=!0,u.value&&(A.target.isEqualNode(d.value)||A.target.isEqualNode(M.value))?setTimeout(()=>{x()},0):document.activeElement.isEqualNode(d.value)&&!u.value&&(console.log(A.target.closest("[data-tags]")),I()),setTimeout(()=>{y.value=!1},0)}}}function OA(i,n,t){const{mode:r,addTagOn:e,openDirection:o,searchable:a,showOptions:s,valueProp:l,groups:u,addOptionOn:f,createTag:d,createOption:M,reverse:h}=c.toRefs(i),y=c.getCurrentInstance().proxy,p=t.iv,N=t.update,g=t.search,I=t.setPointer,x=t.selectPointer,T=t.backwardPointer,j=t.forwardPointer,v=t.multiselect,w=t.wrapper,A=t.tags,k=t.isOpen,L=t.open,b=t.blur,m=t.fo,D=c.computed(()=>d.value||M.value||!1),S=c.computed(()=>e.value!==void 0?e.value:f.value!==void 0?f.value:["enter"]),z=()=>{r.value==="tags"&&!s.value&&D.value&&a.value&&!u.value&&I(m.value[m.value.map(E=>E[l.value]).indexOf(g.value)])};return{handleKeydown:E=>{n.emit("keydown",E,y);let B,U;switch(["ArrowLeft","ArrowRight","Enter"].indexOf(E.key)!==-1&&r.value==="tags"&&(B=[...v.value.querySelectorAll("[data-tags] > *")].filter(Q=>Q!==A.value),U=B.findIndex(Q=>Q===document.activeElement)),E.key){case"Backspace":if(r.value==="single"||a.value&&[null,""].indexOf(g.value)===-1||p.value.length===0)return;N([...p.value].slice(0,-1));break;case"Enter":if(E.preventDefault(),E.keyCode===229)return;if(U!==-1&&U!==void 0){N([...p.value].filter((Q,_)=>_!==U)),U===B.length-1&&(B.length-1?B[B.length-2].focus():a.value?A.value.querySelector("input").focus():w.value.focus());return}if(S.value.indexOf("enter")===-1&&D.value)return;z(),x();break;case" ":if(!D.value&&!a.value){E.preventDefault(),z(),x();return}if(!D.value)return!1;if(S.value.indexOf("space")===-1&&D.value)return;E.preventDefault(),z(),x();break;case"Tab":case";":case",":if(S.value.indexOf(E.key.toLowerCase())===-1||!D.value)return;z(),x(),E.preventDefault();break;case"Escape":b();break;case"ArrowUp":if(E.preventDefault(),!s.value)return;k.value||L(),T();break;case"ArrowDown":if(E.preventDefault(),!s.value)return;k.value||L(),j();break;case"ArrowLeft":if(a.value&&A.value&&A.value.querySelector("input").selectionStart||E.shiftKey||r.value!=="tags"||!p.value||!p.value.length)return;E.preventDefault(),U===-1?B[B.length-1].focus():U>0&&B[U-1].focus();break;case"ArrowRight":if(U===-1||E.shiftKey||r.value!=="tags"||!p.value||!p.value.length)return;E.preventDefault(),B.length>U+1?B[U+1].focus():a.value?A.value.querySelector("input").focus():a.value||w.value.focus();break}},handleKeyup:E=>{n.emit("keyup",E,y)},preparePointer:z}}function EA(i,n,t){const{classes:r,disabled:e,openDirection:o,showOptions:a}=c.toRefs(i),s=t.isOpen,l=t.isPointed,u=t.isSelected,f=t.isDisabled,d=t.isActive,M=t.canPointGroups,h=t.resolving,y=t.fo,p=c.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",...r.value})),N=c.computed(()=>!!(s.value&&a.value&&(!h.value||h.value&&y.value.length)));return{classList:c.computed(()=>{const I=p.value;return{container:[I.container].concat(e.value?I.containerDisabled:[]).concat(N.value&&o.value==="top"?I.containerOpenTop:[]).concat(N.value&&o.value!=="top"?I.containerOpen:[]).concat(d.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(e.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(s.value?I.caretOpen:[]),clear:I.clear,clearIcon:I.clearIcon,spinner:I.spinner,inifinite:I.inifinite,inifiniteSpinner:I.inifiniteSpinner,dropdown:[I.dropdown].concat(o.value==="top"?I.dropdownTop:[]).concat(!s.value||!a.value||!N.value?I.dropdownHidden:[]),options:[I.options].concat(o.value==="top"?I.optionsTop:[]),group:I.group,groupLabel:x=>{let T=[I.groupLabel];return l(x)?T.push(u(x)?I.groupLabelSelectedPointed:I.groupLabelPointed):u(x)&&M.value?T.push(f(x)?I.groupLabelSelectedDisabled:I.groupLabelSelected):f(x)&&T.push(I.groupLabelDisabled),M.value&&T.push(I.groupLabelPointable),T},groupOptions:I.groupOptions,option:(x,T)=>{let j=[I.option];return l(x)?j.push(u(x)?I.optionSelectedPointed:I.optionPointed):u(x)?j.push(f(x)?I.optionSelectedDisabled:I.optionSelected):(f(x)||T&&f(T))&&j.push(I.optionDisabled),j},noOptions:I.noOptions,noResults:I.noResults,assist:I.assist,fakeInput:I.fakeInput}}),showDropdown:N}}function CA(i,n,t){const{limit:r,infinite:e}=c.toRefs(i),o=t.isOpen,a=t.offset,s=t.search,l=t.pfo,u=t.eo,f=c.ref(null),d=c.ref(null),M=c.computed(()=>a.value<l.value.length),h=p=>{const{isIntersecting:N,target:g}=p[0];if(N){const I=g.offsetParent,x=I.scrollTop;a.value+=r.value==-1?10:r.value,c.nextTick(()=>{I.scrollTop=x})}},y=()=>{o.value&&a.value<l.value.length?f.value.observe(d.value):!o.value&&f.value&&f.value.disconnect()};return c.watch(o,()=>{!e.value||y()}),c.watch(s,()=>{!e.value||(a.value=r.value,y())},{flush:"post"}),c.watch(u,()=>{!e.value||y()},{immediate:!1,flush:"post"}),c.onMounted(()=>{window&&window.IntersectionObserver&&(f.value=new IntersectionObserver(h))}),{hasMore:M,infiniteLoader:d}}function _A(i,n,t){const{placeholder:r,id:e,valueProp:o,label:a,mode:s,groupLabel:l,aria:u,searchable:f}=c.toRefs(i),d=t.pointer,M=t.iv,h=t.hasSelected,y=t.multipleLabelText,p=c.ref(null),N=c.computed(()=>{let m=[];return e&&e.value&&m.push(e.value),m.push("assist"),m.join("-")}),g=c.computed(()=>{let m=[];return e&&e.value&&m.push(e.value),m.push("multiselect-options"),m.join("-")}),I=c.computed(()=>{let m=[];if(e&&e.value&&m.push(e.value),d.value)return m.push(d.value.group?"multiselect-group":"multiselect-option"),m.push(d.value.group?d.value.index:d.value[o.value]),m.join("-")}),x=c.computed(()=>r.value),T=c.computed(()=>s.value!=="single"),j=c.computed(()=>{let m="";return s.value==="single"&&h.value&&(m+=M.value[a.value]),s.value==="multiple"&&h.value&&(m+=y.value),s.value==="tags"&&h.value&&(m+=M.value.map(D=>D[a.value]).join(", ")),m}),v=c.computed(()=>{let m={...u.value};return f.value&&(m["aria-labelledby"]=m["aria-labelledby"]?`${N.value} ${m["aria-labelledby"]}`:N.value,j.value&&m["aria-label"]&&(m["aria-label"]=`${j.value}, ${m["aria-label"]}`)),m}),w=m=>{let D=[];return e&&e.value&&D.push(e.value),D.push("multiselect-option"),D.push(m[o.value]),D.join("-")},A=m=>{let D=[];return e&&e.value&&D.push(e.value),D.push("multiselect-group"),D.push(m.index),D.join("-")},k=m=>{let D=[];return D.push(m[a.value]),D.join(" ")},L=m=>{let D=[];return D.push(m[l.value]),D.join(" ")},b=m=>`${m} \u274E`;return c.onMounted(()=>{if(e&&e.value&&document&&document.querySelector){let m=document.querySelector(`[for="${e.value}"]`);p.value=m?m.innerText:null}}),{arias:v,ariaLabel:j,ariaAssist:N,ariaControls:g,ariaPlaceholder:x,ariaMultiselectable:T,ariaActiveDescendant:I,ariaOptionId:w,ariaOptionLabel:k,ariaGroupId:A,ariaGroupLabel:L,ariaTagLabel:b}}function QA(i,n,t,r={}){return t.forEach(e=>{e&&(r={...r,...e(i,n,r)})}),r}var Vl={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(i,n){return QA(i,n,[bA,TA,wA,vA,xA,SA,zA,CA,LA,OA,EA,_A])}};const UA=["id","dir"],YA=["tabindex","aria-controls","aria-placeholder","aria-expanded","aria-activedescendant","aria-multiselectable","role"],BA=["type","modelValue","value","autocomplete","id","aria-controls","aria-placeholder","aria-expanded","aria-activedescendant","aria-multiselectable"],PA=["onKeyup","aria-label"],RA=["onClick"],VA=["type","modelValue","value","id","autocomplete","aria-controls","aria-placeholder","aria-expanded","aria-activedescendant","aria-multiselectable"],ZA=["innerHTML"],FA=["id"],HA=["id","aria-label","aria-selected"],GA=["data-pointed","onMouseenter","onClick"],WA=["innerHTML"],$A=["aria-label"],JA=["data-pointed","data-selected","onMouseenter","onClick","id","aria-selected","aria-label"],XA=["data-pointed","data-selected","onMouseenter","onClick","id","aria-selected","aria-label"],KA=["innerHTML"],qA=["innerHTML"],ek=["value"],tk=["name","value"],nk=["name","value"],ik=["id"];function rk(i,n,t,r,e,o){return c.openBlock(),c.createElementBlock("div",{ref:"multiselect",class:c.normalizeClass(i.classList.container),id:t.searchable?void 0:t.id,dir:t.rtl?"rtl":void 0,onFocusin:n[10]||(n[10]=(...a)=>i.handleFocusIn&&i.handleFocusIn(...a)),onFocusout:n[11]||(n[11]=(...a)=>i.handleFocusOut&&i.handleFocusOut(...a)),onKeyup:n[12]||(n[12]=(...a)=>i.handleKeyup&&i.handleKeyup(...a)),onKeydown:n[13]||(n[13]=(...a)=>i.handleKeydown&&i.handleKeydown(...a))},[c.createElementVNode("div",c.mergeProps({class:i.classList.wrapper,onMousedown:n[9]||(n[9]=(...a)=>i.handleMousedown&&i.handleMousedown(...a)),ref:"wrapper",tabindex:i.tabindex,"aria-controls":t.searchable?void 0:i.ariaControls,"aria-placeholder":t.searchable?void 0:i.ariaPlaceholder,"aria-expanded":t.searchable?void 0:i.isOpen,"aria-activedescendant":t.searchable?void 0:i.ariaActiveDescendant,"aria-multiselectable":t.searchable?void 0:i.ariaMultiselectable,role:t.searchable?void 0:"combobox"},t.searchable?{}:i.arias),[c.createCommentVNode(" Search "),t.mode!=="tags"&&t.searchable&&!t.disabled?(c.openBlock(),c.createElementBlock("input",c.mergeProps({key:0,type:t.inputType,modelValue:i.search,value:i.search,class:i.classList.search,autocomplete:t.autocomplete,id:t.searchable?t.id:void 0,onInput:n[0]||(n[0]=(...a)=>i.handleSearchInput&&i.handleSearchInput(...a)),onKeypress:n[1]||(n[1]=(...a)=>i.handleKeypress&&i.handleKeypress(...a)),onPaste:n[2]||(n[2]=c.withModifiers((...a)=>i.handlePaste&&i.handlePaste(...a),["stop"])),ref:"input","aria-controls":i.ariaControls,"aria-placeholder":i.ariaPlaceholder,"aria-expanded":i.isOpen,"aria-activedescendant":i.ariaActiveDescendant,"aria-multiselectable":i.ariaMultiselectable,role:"combobox"},{...t.attrs,...i.arias}),null,16,BA)):c.createCommentVNode("v-if",!0),c.createCommentVNode(" Tags (with search) "),t.mode=="tags"?(c.openBlock(),c.createElementBlock("div",{key:1,class:c.normalizeClass(i.classList.tags),"data-tags":""},[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(i.iv,(a,s,l)=>c.renderSlot(i.$slots,"tag",{option:a,handleTagRemove:i.handleTagRemove,disabled:t.disabled},()=>[(c.openBlock(),c.createElementBlock("span",{class:c.normalizeClass(i.classList.tag),tabindex:"-1",onKeyup:c.withKeys(u=>i.handleTagRemove(a,u),["enter"]),key:l,"aria-label":i.ariaTagLabel(a[t.label])},[c.createTextVNode(c.toDisplayString(a[t.label])+" ",1),t.disabled?c.createCommentVNode("v-if",!0):(c.openBlock(),c.createElementBlock("span",{key:0,class:c.normalizeClass(i.classList.tagRemove),onClick:u=>i.handleTagRemove(a,u)},[c.createElementVNode("span",{class:c.normalizeClass(i.classList.tagRemoveIcon)},null,2)],10,RA))],42,PA))])),256)),c.createElementVNode("div",{class:c.normalizeClass(i.classList.tagsSearchWrapper),ref:"tags"},[c.createCommentVNode(" Used for measuring search width "),c.createElementVNode("span",{class:c.normalizeClass(i.classList.tagsSearchCopy)},c.toDisplayString(i.search),3),c.createCommentVNode(" Actual search input "),t.searchable&&!t.disabled?(c.openBlock(),c.createElementBlock("input",c.mergeProps({key:0,type:t.inputType,modelValue:i.search,value:i.search,class:i.classList.tagsSearch,id:t.searchable?t.id:void 0,autocomplete:t.autocomplete,onInput:n[3]||(n[3]=(...a)=>i.handleSearchInput&&i.handleSearchInput(...a)),onKeypress:n[4]||(n[4]=(...a)=>i.handleKeypress&&i.handleKeypress(...a)),onPaste:n[5]||(n[5]=c.withModifiers((...a)=>i.handlePaste&&i.handlePaste(...a),["stop"])),ref:"input","aria-controls":i.ariaControls,"aria-placeholder":i.ariaPlaceholder,"aria-expanded":i.isOpen,"aria-activedescendant":i.ariaActiveDescendant,"aria-multiselectable":i.ariaMultiselectable,role:"combobox"},{...t.attrs,...i.arias}),null,16,VA)):c.createCommentVNode("v-if",!0)],2)],2)):c.createCommentVNode("v-if",!0),c.createCommentVNode(" Single label "),t.mode=="single"&&i.hasSelected&&!i.search&&i.iv?c.renderSlot(i.$slots,"singlelabel",{key:2,value:i.iv},()=>[c.createElementVNode("div",{class:c.normalizeClass(i.classList.singleLabel)},[c.createElementVNode("span",{class:c.normalizeClass(i.classList.singleLabelText)},c.toDisplayString(i.iv[t.label]),3)],2)]):c.createCommentVNode("v-if",!0),c.createCommentVNode(" Multiple label "),t.mode=="multiple"&&i.hasSelected&&!i.search?c.renderSlot(i.$slots,"multiplelabel",{key:3,values:i.iv},()=>[c.createElementVNode("div",{class:c.normalizeClass(i.classList.multipleLabel),innerHTML:i.multipleLabelText},null,10,ZA)]):c.createCommentVNode("v-if",!0),c.createCommentVNode(" Placeholder "),t.placeholder&&!i.hasSelected&&!i.search?c.renderSlot(i.$slots,"placeholder",{key:4},()=>[c.createElementVNode("div",{class:c.normalizeClass(i.classList.placeholder),"aria-hidden":"true"},c.toDisplayString(t.placeholder),3)]):c.createCommentVNode("v-if",!0),c.createCommentVNode(" Spinner "),t.loading||i.resolving?c.renderSlot(i.$slots,"spinner",{key:5},()=>[c.createElementVNode("span",{class:c.normalizeClass(i.classList.spinner),"aria-hidden":"true"},null,2)]):c.createCommentVNode("v-if",!0),c.createCommentVNode(" Clear "),i.hasSelected&&!t.disabled&&t.canClear&&!i.busy?c.renderSlot(i.$slots,"clear",{key:6,clear:i.clear},()=>[c.createElementVNode("span",{"aria-hidden":"true",tabindex:"0",role:"button","data-clear":"","aria-roledescription":"\u274E",class:c.normalizeClass(i.classList.clear),onClick:n[6]||(n[6]=(...a)=>i.clear&&i.clear(...a)),onKeyup:n[7]||(n[7]=c.withKeys((...a)=>i.clear&&i.clear(...a),["enter"]))},[c.createElementVNode("span",{class:c.normalizeClass(i.classList.clearIcon)},null,2)],34)]):c.createCommentVNode("v-if",!0),c.createCommentVNode(" Caret "),t.caret&&t.showOptions?c.renderSlot(i.$slots,"caret",{key:7},()=>[c.createElementVNode("span",{class:c.normalizeClass(i.classList.caret),onClick:n[8]||(n[8]=(...a)=>i.handleCaretClick&&i.handleCaretClick(...a)),"aria-hidden":"true"},null,2)]):c.createCommentVNode("v-if",!0)],16,YA),c.createCommentVNode(" Options "),c.createElementVNode("div",{class:c.normalizeClass(i.classList.dropdown),tabindex:"-1"},[c.renderSlot(i.$slots,"beforelist",{options:i.fo}),c.createElementVNode("ul",{class:c.normalizeClass(i.classList.options),id:i.ariaControls,role:"listbox"},[t.groups?(c.openBlock(!0),c.createElementBlock(c.Fragment,{key:0},c.renderList(i.fg,(a,s,l)=>(c.openBlock(),c.createElementBlock("li",{class:c.normalizeClass(i.classList.group),key:l,id:i.ariaGroupId(a),"aria-label":i.ariaGroupLabel(a),"aria-selected":i.isSelected(a),role:"option"},[c.createElementVNode("div",{class:c.normalizeClass(i.classList.groupLabel(a)),"data-pointed":i.isPointed(a),onMouseenter:u=>i.setPointer(a,s),onClick:u=>i.handleGroupClick(a)},[c.renderSlot(i.$slots,"grouplabel",{group:a,isSelected:i.isSelected,isPointed:i.isPointed},()=>[c.createElementVNode("span",{innerHTML:a[t.groupLabel]},null,8,WA)])],42,GA),c.createElementVNode("ul",{class:c.normalizeClass(i.classList.groupOptions),"aria-label":i.ariaGroupLabel(a),role:"group"},[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(a.__VISIBLE__,(u,f,d)=>(c.openBlock(),c.createElementBlock("li",{class:c.normalizeClass(i.classList.option(u,a)),"data-pointed":i.isPointed(u),"data-selected":i.isSelected(u)||void 0,key:d,onMouseenter:M=>i.setPointer(u),onClick:M=>i.handleOptionClick(u),id:i.ariaOptionId(u),"aria-selected":i.isSelected(u),"aria-label":i.ariaOptionLabel(u),role:"option"},[c.renderSlot(i.$slots,"option",{option:u,isSelected:i.isSelected,isPointed:i.isPointed,search:i.search},()=>[c.createElementVNode("span",null,c.toDisplayString(u[t.label]),1)])],42,JA))),128))],10,$A)],10,HA))),128)):(c.openBlock(!0),c.createElementBlock(c.Fragment,{key:1},c.renderList(i.fo,(a,s,l)=>(c.openBlock(),c.createElementBlock("li",{class:c.normalizeClass(i.classList.option(a)),"data-pointed":i.isPointed(a),"data-selected":i.isSelected(a)||void 0,key:l,onMouseenter:u=>i.setPointer(a),onClick:u=>i.handleOptionClick(a),id:i.ariaOptionId(a),"aria-selected":i.isSelected(a),"aria-label":i.ariaOptionLabel(a),role:"option"},[c.renderSlot(i.$slots,"option",{option:a,isSelected:i.isSelected,isPointed:i.isPointed,search:i.search},()=>[c.createElementVNode("span",null,c.toDisplayString(a[t.label]),1)])],42,XA))),128))],10,FA),i.noOptions?c.renderSlot(i.$slots,"nooptions",{key:0},()=>[c.createElementVNode("div",{class:c.normalizeClass(i.classList.noOptions),innerHTML:t.noOptionsText},null,10,KA)]):c.createCommentVNode("v-if",!0),i.noResults?c.renderSlot(i.$slots,"noresults",{key:1},()=>[c.createElementVNode("div",{class:c.normalizeClass(i.classList.noResults),innerHTML:t.noResultsText},null,10,qA)]):c.createCommentVNode("v-if",!0),t.infinite&&i.hasMore?(c.openBlock(),c.createElementBlock("div",{key:2,class:c.normalizeClass(i.classList.inifinite),ref:"infiniteLoader"},[c.renderSlot(i.$slots,"infinite",{},()=>[c.createElementVNode("span",{class:c.normalizeClass(i.classList.inifiniteSpinner)},null,2)])],2)):c.createCommentVNode("v-if",!0),c.renderSlot(i.$slots,"afterlist",{options:i.fo})],2),c.createCommentVNode(" Hacky input element to show HTML5 required warning "),t.required?(c.openBlock(),c.createElementBlock("input",{key:0,class:c.normalizeClass(i.classList.fakeInput),tabindex:"-1",value:i.textValue,required:""},null,10,ek)):c.createCommentVNode("v-if",!0),c.createCommentVNode(" Native input support "),t.nativeSupport?(c.openBlock(),c.createElementBlock(c.Fragment,{key:1},[t.mode=="single"?(c.openBlock(),c.createElementBlock("input",{key:0,type:"hidden",name:t.name,value:i.plainValue!==void 0?i.plainValue:""},null,8,tk)):(c.openBlock(!0),c.createElementBlock(c.Fragment,{key:1},c.renderList(i.plainValue,(a,s)=>(c.openBlock(),c.createElementBlock("input",{type:"hidden",name:`${t.name}[]`,value:a,key:s},null,8,nk))),128))],64)):c.createCommentVNode("v-if",!0),c.createCommentVNode(" Screen reader assistive text "),t.searchable&&i.hasSelected?(c.openBlock(),c.createElementBlock("div",{key:2,class:c.normalizeClass(i.classList.assist),id:i.ariaAssist,"aria-hidden":"true"},c.toDisplayString(i.ariaLabel),11,ik)):c.createCommentVNode("v-if",!0),c.createCommentVNode(" Create height for empty input "),c.createElementVNode("div",{class:c.normalizeClass(i.classList.spacer)},null,2)],42,UA)}Vl.render=rk,Vl.__file="src/Multiselect.vue";var Lz="",wz="";const ok=c.createElementVNode("img",{alt:"",class:"list__item_thumb",src:DA},null,-1),ak={class:"list__item_text"},sk=c.createElementVNode("div",{id:"list"},null,-1),lk={__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(i,{emit:n}){c.useCssVars(e=>({"341349d2":i.maxHeight}));const t=c.ref(null);function r(){n("update",t.value)}return(e,o)=>(c.openBlock(),c.createElementBlock(c.Fragment,null,[c.createVNode(c.unref(Vl),{modelValue:t.value,"onUpdate:modelValue":o[0]||(o[0]=a=>t.value=a),label:i.labelProp,mode:"tags",native:!1,object:!0,options:i.list,placeholder:"Start typing a name",searchable:!0,"value-prop":i.idProp,onSelect:r},{tag:c.withCtx(({option:a,handleTagRemove:s,disabled:l})=>[(c.openBlock(),c.createBlock(c.Teleport,{to:"#list"},[c.createElementVNode("div",{class:c.normalizeClass(["list__item",{"is-disabled":l}])},[ok,c.createElementVNode("p",ak,c.toDisplayString(a[i.labelProp]),1),c.createVNode(ve,{class:"list__item_icon","icon-name":"delete",size:24,onClick:u=>s(a,u)},null,8,["onClick"]),c.renderSlot(e.$slots,"default")],2)]))]),_:3},8,["modelValue","label","options","value-prop"]),sk],64))}},uk=c.defineComponent({components:{DhIcon:ve},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)}}}),ck={key:1,id:"modal-sidebar",class:"modal-sidebar"},dk={key:0,id:"modalTitle",class:"modal-header"},fk={class:"modal-footer"};function Mk(i,n,t,r,e,o){const a=c.resolveComponent("dh-icon");return c.openBlock(),c.createBlock(c.Transition,{name:"modal-fade"},{default:c.withCtx(()=>[c.createElementVNode("div",{class:"modal-backdrop",onClick:n[2]||(n[2]=(...s)=>i.closed&&i.closed(...s))},[c.createElementVNode("div",{"aria-describedby":"modalDescription","aria-labelledby":"modalTitle",class:c.normalizeClass(`modal ${i.hasSideBar?i.sideBarPosition:""}`),role:"dialog",onClick:n[1]||(n[1]=c.withModifiers(()=>{},["stop"]))},[i.hasCloseButton?(c.openBlock(),c.createElementBlock("button",{key:0,"aria-label":"Close modal",class:"btn-close",type:"button",onClick:n[0]||(n[0]=(...s)=>i.closed&&i.closed(...s))},[c.createVNode(a,{class:"icon","icon-name":"close",size:24})])):c.createCommentVNode("",!0),i.hasSideBar?(c.openBlock(),c.createElementBlock("aside",ck,[c.renderSlot(i.$slots,"sidebar"),i.hasSideBarButtonBottom?c.renderSlot(i.$slots,"sidebar-button-bottom",{key:0}):c.createCommentVNode("",!0)])):c.createCommentVNode("",!0),c.createElementVNode("section",{class:c.normalizeClass(`right-section ${i.hasSideBar?"":"full"}`)},[i.hasHeader?(c.openBlock(),c.createElementBlock("header",dk,[c.renderSlot(i.$slots,"header")])):c.createCommentVNode("",!0),c.createElementVNode("section",{id:"modalDescription",class:c.normalizeClass(["modal-body",i.bodyClass])},[c.renderSlot(i.$slots,"body")],2),c.createElementVNode("footer",fk,[i.hasFooter?c.renderSlot(i.$slots,"footer",{key:0}):c.createCommentVNode("",!0),i.hasFooterButtonRight?c.renderSlot(i.$slots,"footer-button-right",{key:1}):c.createCommentVNode("",!0)])],2)],2)])]),_:3})}var gk=at(uk,[["render",Mk]]);const hk=c.defineComponent({components:{DhIcon:ve},props:{notificationType:{type:String,required:!0,default:"toast",validator:i=>["toast","bottom-message","actionable","modal"].includes(i)},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(i=!1){this.$emit("action",i)},limitTitle(i,n){return["toast","actionable"].includes(n)&&i.length>=60?`${i.substring(0,60)}..`:["bottom-message"].includes(n)&&i.length>=40?`${i.substring(0,40)}..`:["modal"].includes(n)&&i.length>=80?`${i.substring(0,80)}..`:i}}}),yk=[c.createElementVNode("img",{alt:"icon",class:"close-icon",src:hd},null,-1)],pk={class:"additional-text"},Nk={key:0,class:"descriptions"};function mk(i,n,t,r,e,o){const a=c.resolveComponent("dh-icon");return c.openBlock(),c.createElementBlock("div",{class:c.normalizeClass(`dh-notification-container ${i.notificationType}`),style:c.normalizeStyle({"z-index":i.zIndex})},[i.show?(c.openBlock(),c.createElementBlock("div",{key:0,class:c.normalizeClass(["bottom-message"].includes(i.notificationType)?`notification-up status status-${i.notificationType}`:`notification-enter status status-${i.notificationType}`)},[["modal","bottom-message"].includes(i.notificationType)?c.createCommentVNode("",!0):(c.openBlock(),c.createElementBlock("button",{key:0,class:"close-notification",onClick:n[0]||(n[0]=s=>i.close(!1))},yk)),c.createElementVNode("div",{class:c.normalizeClass(`content content- ${i.notificationType}`)},[c.createElementVNode("div",{class:c.normalizeClass(`ellipse ellipse-${i.notificationType} ellipse-${i.icon}`)},[c.createVNode(a,{class:c.normalizeClass(`icon-${i.icon}`),"icon-name":i.icon,size:33},null,8,["class","icon-name"])],2),c.createElementVNode("div",pk,[c.createElementVNode("div",{class:c.normalizeClass(`body-section-title title-${i.notificationType}`)},c.toDisplayString(i.limitTitle(i.title,i.notificationType)),3),["bottom-message"].includes(i.notificationType)?c.createCommentVNode("",!0):(c.openBlock(),c.createElementBlock("div",Nk,c.toDisplayString(i.message.length>=280?`${i.message.substring(0,280)}..`:i.message),1))]),["toast","bottom-message"].includes(i.notificationType)?c.createCommentVNode("",!0):(c.openBlock(),c.createElementBlock("div",{key:0,class:c.normalizeClass(`buttons ${i.notificationType}`)},[c.createElementVNode("button",{class:c.normalizeClass(["btn btn-normal",i.icon=="delete"?"btn-danger":"btn-primary"]),onClick:n[1]||(n[1]=s=>i.close(!0))},c.toDisplayString(i.notificationButton),3),c.createElementVNode("button",{class:"btn btn-normal btn-secondary dismiss",onClick:n[2]||(n[2]=s=>i.close())},c.toDisplayString(i.buttonDismiss),1)],2))],2)],2)):c.createCommentVNode("",!0)],6)}var Ik=at(hk,[["render",mk]]),Oz="";const jk={class:"password__panel"},Dk=["placeholder","type"],xk={class:"icon is-right"},bk={key:0,class:"password__tooltip"};var vk=at(c.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(i,{emit:n}){const t=i,r=c.ref(""),e=c.ref(!1),o=c.ref(!1),a=c.ref(!1),s=c.ref(!1),l=c.ref(!1),u=c.ref(!1);function f(){n("submit",r.value),n("update:modelValue",r.value)}function d(){e.value=!0,u.value=!0}function M(){e.value=!1,u.value=!1}function h(){l.value=!l.value}return c.onMounted(()=>()=>r.value=t.modelValue||""),c.watch(t,()=>(r.value=t.modelValue||"",o.value=r.value.length>11,a.value=/\d/.test(r.value),s.value=/[!@#$%^&*)(+=._-]/.test(r.value))),(y,p)=>(c.openBlock(),c.createElementBlock("div",jk,[c.withDirectives(c.createElementVNode("input",{"onUpdate:modelValue":p[0]||(p[0]=N=>r.value=N),class:"form__input password__panel_input","data-e2e":"password-input",placeholder:t.placeholder,type:l.value?"text":"password",onFocus:d,onFocusout:M,onKeyup:f},null,40,Dk),[[c.vModelDynamic,r.value]]),c.createElementVNode("button",{class:"password__panel_button",type:"button",onClick:h},[c.createElementVNode("span",xk,[c.createVNode(ve,{active:u.value,"icon-name":l.value?"invisible":"visible",size:20},null,8,["active","icon-name"])])]),e.value&&!t.passwordTooltipDisabled?(c.openBlock(),c.createElementBlock("div",bk,[c.createElementVNode("p",{class:c.normalizeClass(["password__tooltip_text",o.value?"password__tooltip_text--valid":""])},[c.createVNode(ve,{class:c.normalizeClass(o.value?"password__tooltip_icon--active":"password__tooltip_icon"),"icon-name":o.value?"accept":"close",size:16},null,8,["class","icon-name"]),c.createElementVNode("span",null,c.toDisplayString(t.tipChars),1)],2),c.createElementVNode("p",{class:c.normalizeClass(["password__tooltip_text",a.value?"password__tooltip_text--valid":""])},[c.createVNode(ve,{class:c.normalizeClass(a.value?"password__tooltip_icon--active":"password__tooltip_icon"),"icon-name":a.value?"accept":"close",size:16},null,8,["class","icon-name"]),c.createElementVNode("span",null,c.toDisplayString(t.tipNumbers),1)],2),c.createElementVNode("p",{class:c.normalizeClass(["password__tooltip_text",s.value?"password__tooltip_text--valid":""])},[c.createVNode(ve,{class:c.normalizeClass(s.value?"password__tooltip_icon--active":"password__tooltip_icon"),"icon-name":s.value?"accept":"close",size:16},null,8,["class","icon-name"]),c.createElementVNode("span",null,c.toDisplayString(t.tipSymbols),1)],2)])):c.createCommentVNode("",!0)]))}}),[["__scopeId","data-v-3ae35090"]]),Cz="";const Tk={class:"radio"},Ak=["for"],kk=["id","type","value"],zk={class:"radio__label_txt"};var bM=at({__name:"RadioBox",props:{type:{type:String,default:"radio"},value:{type:String,required:!0},label:{type:String,required:!0}},emits:["clickBox"],setup(i,{emit:n}){return(t,r)=>(c.openBlock(),c.createElementBlock("div",Tk,[c.createElementVNode("label",{class:"radio__label",for:i.value},[c.createElementVNode("input",{id:i.value,class:"radio__input",name:"radiobox",type:i.type,value:i.value,onClick:r[0]||(r[0]=e=>n("clickBox"))},null,8,kk),c.createElementVNode("span",zk,c.toDisplayString(i.label),1)],8,Ak)]))}},[["__scopeId","data-v-29696bd5"]]),Qz="";const Lk={__name:"RadioBoxGroup",props:{orientation:{type:String,default:"horizontal"},type:{type:String,default:"radio"},list:{type:Array,required:!0}},setup(i){const n=c.ref(null);function t(){const r=document.querySelectorAll("input");for(let e=0;e<r.length;e++)r[e].checked?r[e].parentNode.parentNode.classList.add("radio--checked"):r[e].parentNode.parentNode.classList.remove("radio--checked")}return(r,e)=>(c.openBlock(),c.createElementBlock("div",{class:c.normalizeClass(["radio__grp",i.orientation==="vertical"?"radio__vertical":"radio__horizontal"])},[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(i.list,o=>(c.openBlock(),c.createBlock(bM,{key:o.key,ref_for:!0,ref_key:"boxes",ref:n,label:o.label,type:i.type,value:o.value,onClickBox:t},null,8,["label","type","value"]))),128))],2))}};var Uz="";const wk={class:"search-panel"},Sk=["placeholder"];var Ok=at(c.defineComponent({__name:"SearchInput",props:{modelValue:{type:String,default:""},placeholder:{type:String,default:""}},emits:["submit","clean","update:modelValue"],setup(i,{emit:n}){const t=i,r=c.ref("");function e(){n("submit",r.value),n("update:modelValue",r.value)}function o(){r.value="",n("clean"),n("update:modelValue",r.value)}return c.onMounted(()=>()=>r.value=t.modelValue||""),c.watch(t,()=>r.value=t.modelValue||""),(a,s)=>(c.openBlock(),c.createElementBlock("div",wk,[c.withDirectives(c.createElementVNode("input",{"onUpdate:modelValue":s[0]||(s[0]=l=>r.value=l),class:"form-input search-panel-input","data-e2e":"search-input",placeholder:t.placeholder,onKeyup:e},null,40,Sk),[[c.vModelText,r.value]]),r.value?c.createCommentVNode("",!0):(c.openBlock(),c.createElementBlock("button",{key:0,class:"search-panel-button","data-e2e":"search-submit",onClick:e},[c.createVNode(ve,{active:!0,"icon-name":"search",size:24})])),r.value?(c.openBlock(),c.createElementBlock("button",{key:1,class:"search-panel-button close","data-e2e":"search-close",onClick:o},[c.createVNode(ve,{class:"icon","icon-name":"close",size:24})])):c.createCommentVNode("",!0)]))}}),[["__scopeId","data-v-562faa14"]]),Bz="";const Ek=i=>(c.pushScopeId("data-v-0213b522"),i=i(),c.popScopeId(),i),Ck={class:"stepper"},_k=Ek(()=>c.createElementVNode("hr",{class:"solid"},null,-1));var Qk=at(c.defineComponent({__name:"Stepper",props:{maxSteps:{type:Number,default:0},currentStep:{type:Number,default:0}},setup(i){const n=i;function t(){return Array.from(Array(n.maxSteps||0).keys())}return(r,e)=>(c.openBlock(),c.createElementBlock("div",Ck,[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(t(),(o,a)=>(c.openBlock(),c.createElementBlock("div",{key:a,class:"step"},[c.createElementVNode("span",{class:c.normalizeClass(["step-number",{active:o===i.currentStep}])},c.toDisplayString(o+1),3),_k]))),128))]))}}),[["__scopeId","data-v-0213b522"]]);function pt(i){return i&&i.__esModule&&Object.prototype.hasOwnProperty.call(i,"default")?i.default:i}var vM={exports:{}};/*! For license information please see editor.js.LICENSE.txt */(function(i,n){(function(t,r){i.exports=r()})(window,function(){return function(t){var r={};function e(o){if(r[o])return r[o].exports;var a=r[o]={i:o,l:!1,exports:{}};return t[o].call(a.exports,a,a.exports,e),a.l=!0,a.exports}return e.m=t,e.c=r,e.d=function(o,a,s){e.o(o,a)||Object.defineProperty(o,a,{enumerable:!0,get:s})},e.r=function(o){typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(o,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(o,"__esModule",{value:!0})},e.t=function(o,a){if(1&a&&(o=e(o)),8&a||4&a&&typeof o=="object"&&o&&o.__esModule)return o;var s=Object.create(null);if(e.r(s),Object.defineProperty(s,"default",{enumerable:!0,value:o}),2&a&&typeof o!="string")for(var l in o)e.d(s,l,function(u){return o[u]}.bind(null,l));return s},e.n=function(o){var a=o&&o.__esModule?function(){return o.default}:function(){return o};return e.d(a,"a",a),a},e.o=function(o,a){return Object.prototype.hasOwnProperty.call(o,a)},e.p="",e(e.s=187)}([function(t,r,e){var o=e(10),a=e(17),s=e(27),l=e(23),u=e(31),f=function(d,M,h){var y,p,N,g,I=d&f.F,x=d&f.G,T=d&f.S,j=d&f.P,v=d&f.B,w=x?o:T?o[M]||(o[M]={}):(o[M]||{}).prototype,A=x?a:a[M]||(a[M]={}),k=A.prototype||(A.prototype={});for(y in x&&(h=M),h)N=((p=!I&&w&&w[y]!==void 0)?w:h)[y],g=v&&p?u(N,o):j&&typeof N=="function"?u(Function.call,N):N,w&&l(w,y,N,d&f.U),A[y]!=N&&s(A,y,g),j&&k[y]!=N&&(k[y]=N)};o.core=a,f.F=1,f.G=2,f.S=4,f.P=8,f.B=16,f.W=32,f.U=64,f.R=128,t.exports=f},function(t,r){t.exports=function(e){return e&&e.__esModule?e:{default:e}}},function(t,r){t.exports=function(e,o){if(!(e instanceof o))throw new TypeError("Cannot call a class as a function")}},function(t,r){function e(o,a){for(var s=0;s<a.length;s++){var l=a[s];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(o,l.key,l)}}t.exports=function(o,a,s){return a&&e(o.prototype,a),s&&e(o,s),o}},function(t,r){function e(o){return t.exports=e=Object.setPrototypeOf?Object.getPrototypeOf:function(a){return a.__proto__||Object.getPrototypeOf(a)},e(o)}t.exports=e},function(t,r,e){var o=e(110);t.exports=function(a,s){if(typeof s!="function"&&s!==null)throw new TypeError("Super expression must either be null or a function");a.prototype=Object.create(s&&s.prototype,{constructor:{value:a,writable:!0,configurable:!0}}),s&&o(a,s)}},function(t,r,e){var o=e(59),a=e(152);t.exports=function(s,l){return!l||o(l)!=="object"&&typeof l!="function"?a(s):l}},function(t,r,e){var o,a,s;a=[r,e(20),e(371),e(21),e(403),e(14)],(s=typeof(o=function(l,u,f,d,M,h){var y,p=e(1);function N(b,m){var D=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"log",S=arguments.length>3?arguments[3]:void 0,z=arguments.length>4&&arguments[4]!==void 0?arguments[4]:"color: inherit";if("console"in window&&window.console[D]){var O=["info","log","warn","error"].includes(D),C=[];switch(N.logLevel){case y.ERROR:if(D!=="error")return;break;case y.WARN:if(!["error","warn"].includes(D))return;break;case y.INFO:if(!O||b)return}S&&C.push(S);var E="Editor.js ".concat("2.25.0"),B=`line-height: 1em;
|
|
19
|
+
`):i}function Xb(i,n){const{element:t,datasetIndex:r,index:e}=n,o=i.getDatasetMeta(r).controller,{label:a,value:s}=o.getLabelAndValue(e);return{chart:i,label:a,parsed:o.getParsed(e),raw:i.data.datasets[r].data[e],formattedValue:s,dataset:o.getDataset(),dataIndex:e,datasetIndex:r,element:t}}function rM(i,n){const t=i.chart.ctx,{body:r,footer:e,title:o}=i,{boxWidth:a,boxHeight:s}=n,l=yt(n.bodyFont),u=yt(n.titleFont),f=yt(n.footerFont),d=o.length,M=e.length,h=r.length,y=Tt(n.padding);let p=y.height,N=0,g=r.reduce((T,j)=>T+j.before.length+j.lines.length+j.after.length,0);if(g+=i.beforeBody.length+i.afterBody.length,d&&(p+=d*u.lineHeight+(d-1)*n.titleSpacing+n.titleMarginBottom),g){const T=n.displayColors?Math.max(s,l.lineHeight):l.lineHeight;p+=h*T+(g-h)*l.lineHeight+(g-1)*n.bodySpacing}M&&(p+=n.footerMarginTop+M*f.lineHeight+(M-1)*n.footerSpacing);let I=0;const x=function(T){N=Math.max(N,t.measureText(T).width+I)};return t.save(),t.font=u.string,Ee(i.title,x),t.font=l.string,Ee(i.beforeBody.concat(i.afterBody),x),I=n.displayColors?a+2+n.boxPadding:0,Ee(r,T=>{Ee(T.before,x),Ee(T.lines,x),Ee(T.after,x)}),I=0,t.font=f.string,Ee(i.footer,x),t.restore(),N+=y.width,{width:N,height:p}}function Kb(i,n){const{y:t,height:r}=n;return t<r/2?"top":t>i.height-r/2?"bottom":"center"}function qb(i,n,t,r){const{x:e,width:o}=r,a=t.caretSize+t.caretPadding;if(i==="left"&&e+o+a>n.width||i==="right"&&e-o-a<0)return!0}function ev(i,n,t,r){const{x:e,width:o}=t,{width:a,chartArea:{left:s,right:l}}=i;let u="center";return r==="center"?u=e<=(s+l)/2?"left":"right":e<=o/2?u="left":e>=a-o/2&&(u="right"),qb(u,i,n,t)&&(u="center"),u}function oM(i,n,t){const r=t.yAlign||n.yAlign||Kb(i,t);return{xAlign:t.xAlign||n.xAlign||ev(i,n,t,r),yAlign:r}}function tv(i,n){let{x:t,width:r}=i;return n==="right"?t-=r:n==="center"&&(t-=r/2),t}function nv(i,n,t){let{y:r,height:e}=i;return n==="top"?r+=t:n==="bottom"?r-=e+t:r-=e/2,r}function aM(i,n,t,r){const{caretSize:e,caretPadding:o,cornerRadius:a}=i,{xAlign:s,yAlign:l}=t,u=e+o,{topLeft:f,topRight:d,bottomLeft:M,bottomRight:h}=Jn(a);let y=tv(n,s);const p=nv(n,l,u);return l==="center"?s==="left"?y+=u:s==="right"&&(y-=u):s==="left"?y-=Math.max(f,M)+e:s==="right"&&(y+=Math.max(d,h)+e),{x:st(y,0,r.width-n.width),y:st(p,0,r.height-n.height)}}function Ho(i,n,t){const r=Tt(t.padding);return n==="center"?i.x+i.width/2:n==="right"?i.x+i.width-r.right:i.x+r.left}function sM(i){return Ft([],rn(i))}function iv(i,n,t){return mn(i,{tooltip:n,tooltipItems:t,type:"tooltip"})}function lM(i,n){const t=n&&n.dataset&&n.dataset.tooltip&&n.dataset.tooltip.callbacks;return t?i.override(t):i}class Bl extends nn{constructor(n){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=n.chart||n._chart,this._chart=this.chart,this.options=n.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(n){this.options=n,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const n=this._cachedAnimations;if(n)return n;const t=this.chart,r=this.options.setContext(this.getContext()),e=r.enabled&&t.options.animation&&r.animations,o=new gf(this.chart,e);return e._cacheable&&(this._cachedAnimations=Object.freeze(o)),o}getContext(){return this.$context||(this.$context=iv(this.chart.getContext(),this,this._tooltipItems))}getTitle(n,t){const{callbacks:r}=t,e=r.beforeTitle.apply(this,[n]),o=r.title.apply(this,[n]),a=r.afterTitle.apply(this,[n]);let s=[];return s=Ft(s,rn(e)),s=Ft(s,rn(o)),s=Ft(s,rn(a)),s}getBeforeBody(n,t){return sM(t.callbacks.beforeBody.apply(this,[n]))}getBody(n,t){const{callbacks:r}=t,e=[];return Ee(n,o=>{const a={before:[],lines:[],after:[]},s=lM(r,o);Ft(a.before,rn(s.beforeLabel.call(this,o))),Ft(a.lines,s.label.call(this,o)),Ft(a.after,rn(s.afterLabel.call(this,o))),e.push(a)}),e}getAfterBody(n,t){return sM(t.callbacks.afterBody.apply(this,[n]))}getFooter(n,t){const{callbacks:r}=t,e=r.beforeFooter.apply(this,[n]),o=r.footer.apply(this,[n]),a=r.afterFooter.apply(this,[n]);let s=[];return s=Ft(s,rn(e)),s=Ft(s,rn(o)),s=Ft(s,rn(a)),s}_createItems(n){const t=this._active,r=this.chart.data,e=[],o=[],a=[];let s=[],l,u;for(l=0,u=t.length;l<u;++l)s.push(Xb(this.chart,t[l]));return n.filter&&(s=s.filter((f,d,M)=>n.filter(f,d,M,r))),n.itemSort&&(s=s.sort((f,d)=>n.itemSort(f,d,r))),Ee(s,f=>{const d=lM(n.callbacks,f);e.push(d.labelColor.call(this,f)),o.push(d.labelPointStyle.call(this,f)),a.push(d.labelTextColor.call(this,f))}),this.labelColors=e,this.labelPointStyles=o,this.labelTextColors=a,this.dataPoints=s,s}update(n,t){const r=this.options.setContext(this.getContext()),e=this._active;let o,a=[];if(!e.length)this.opacity!==0&&(o={opacity:0});else{const s=Si[r.position].call(this,e,this._eventPosition);a=this._createItems(r),this.title=this.getTitle(a,r),this.beforeBody=this.getBeforeBody(a,r),this.body=this.getBody(a,r),this.afterBody=this.getAfterBody(a,r),this.footer=this.getFooter(a,r);const l=this._size=rM(this,r),u=Object.assign({},s,l),f=oM(this.chart,r,u),d=aM(r,u,f,this.chart);this.xAlign=f.xAlign,this.yAlign=f.yAlign,o={opacity:1,x:d.x,y:d.y,width:l.width,height:l.height,caretX:s.x,caretY:s.y}}this._tooltipItems=a,this.$context=void 0,o&&this._resolveAnimations().update(this,o),n&&r.external&&r.external.call(this,{chart:this.chart,tooltip:this,replay:t})}drawCaret(n,t,r,e){const o=this.getCaretPosition(n,r,e);t.lineTo(o.x1,o.y1),t.lineTo(o.x2,o.y2),t.lineTo(o.x3,o.y3)}getCaretPosition(n,t,r){const{xAlign:e,yAlign:o}=this,{caretSize:a,cornerRadius:s}=r,{topLeft:l,topRight:u,bottomLeft:f,bottomRight:d}=Jn(s),{x:M,y:h}=n,{width:y,height:p}=t;let N,g,I,x,T,j;return o==="center"?(T=h+p/2,e==="left"?(N=M,g=N-a,x=T+a,j=T-a):(N=M+y,g=N+a,x=T-a,j=T+a),I=N):(e==="left"?g=M+Math.max(l,f)+a:e==="right"?g=M+y-Math.max(u,d)-a:g=this.caretX,o==="top"?(x=h,T=x-a,N=g-a,I=g+a):(x=h+p,T=x+a,N=g+a,I=g-a),j=x),{x1:N,x2:g,x3:I,y1:x,y2:T,y3:j}}drawTitle(n,t,r){const e=this.title,o=e.length;let a,s,l;if(o){const u=ml(r.rtl,this.x,this.width);for(n.x=Ho(this,r.titleAlign,r),t.textAlign=u.textAlign(r.titleAlign),t.textBaseline="middle",a=yt(r.titleFont),s=r.titleSpacing,t.fillStyle=r.titleColor,t.font=a.string,l=0;l<o;++l)t.fillText(e[l],u.x(n.x),n.y+a.lineHeight/2),n.y+=a.lineHeight+s,l+1===o&&(n.y+=r.titleMarginBottom-s)}}_drawColorBox(n,t,r,e,o){const a=this.labelColors[r],s=this.labelPointStyles[r],{boxHeight:l,boxWidth:u,boxPadding:f}=o,d=yt(o.bodyFont),M=Ho(this,"left",o),h=e.x(M),y=l<d.lineHeight?(d.lineHeight-l)/2:0,p=t.y+y;if(o.usePointStyle){const N={radius:Math.min(u,l)/2,pointStyle:s.pointStyle,rotation:s.rotation,borderWidth:1},g=e.leftForLtr(h,u)+u/2,I=p+l/2;n.strokeStyle=o.multiKeyBackground,n.fillStyle=o.multiKeyBackground,fl(n,N,g,I),n.strokeStyle=a.borderColor,n.fillStyle=a.backgroundColor,fl(n,N,g,I)}else{n.lineWidth=Ae(a.borderWidth)?Math.max(...Object.values(a.borderWidth)):a.borderWidth||1,n.strokeStyle=a.borderColor,n.setLineDash(a.borderDash||[]),n.lineDashOffset=a.borderDashOffset||0;const N=e.leftForLtr(h,u-f),g=e.leftForLtr(e.xPlus(h,1),u-f-2),I=Jn(a.borderRadius);Object.values(I).some(x=>x!==0)?(n.beginPath(),n.fillStyle=o.multiKeyBackground,zo(n,{x:N,y:p,w:u,h:l,radius:I}),n.fill(),n.stroke(),n.fillStyle=a.backgroundColor,n.beginPath(),zo(n,{x:g,y:p+1,w:u-2,h:l-2,radius:I}),n.fill()):(n.fillStyle=o.multiKeyBackground,n.fillRect(N,p,u,l),n.strokeRect(N,p,u,l),n.fillStyle=a.backgroundColor,n.fillRect(g,p+1,u-2,l-2))}n.fillStyle=this.labelTextColors[r]}drawBody(n,t,r){const{body:e}=this,{bodySpacing:o,bodyAlign:a,displayColors:s,boxHeight:l,boxWidth:u,boxPadding:f}=r,d=yt(r.bodyFont);let M=d.lineHeight,h=0;const y=ml(r.rtl,this.x,this.width),p=function(A){t.fillText(A,y.x(n.x+h),n.y+M/2),n.y+=M+o},N=y.textAlign(a);let g,I,x,T,j,v,w;for(t.textAlign=a,t.textBaseline="middle",t.font=d.string,n.x=Ho(this,N,r),t.fillStyle=r.bodyColor,Ee(this.beforeBody,p),h=s&&N!=="right"?a==="center"?u/2+f:u+2+f:0,T=0,v=e.length;T<v;++T){for(g=e[T],I=this.labelTextColors[T],t.fillStyle=I,Ee(g.before,p),x=g.lines,s&&x.length&&(this._drawColorBox(t,n,T,y,r),M=Math.max(d.lineHeight,l)),j=0,w=x.length;j<w;++j)p(x[j]),M=d.lineHeight;Ee(g.after,p)}h=0,M=d.lineHeight,Ee(this.afterBody,p),n.y-=o}drawFooter(n,t,r){const e=this.footer,o=e.length;let a,s;if(o){const l=ml(r.rtl,this.x,this.width);for(n.x=Ho(this,r.footerAlign,r),n.y+=r.footerMarginTop,t.textAlign=l.textAlign(r.footerAlign),t.textBaseline="middle",a=yt(r.footerFont),t.fillStyle=r.footerColor,t.font=a.string,s=0;s<o;++s)t.fillText(e[s],l.x(n.x),n.y+a.lineHeight/2),n.y+=a.lineHeight+r.footerSpacing}}drawBackground(n,t,r,e){const{xAlign:o,yAlign:a}=this,{x:s,y:l}=n,{width:u,height:f}=r,{topLeft:d,topRight:M,bottomLeft:h,bottomRight:y}=Jn(e.cornerRadius);t.fillStyle=e.backgroundColor,t.strokeStyle=e.borderColor,t.lineWidth=e.borderWidth,t.beginPath(),t.moveTo(s+d,l),a==="top"&&this.drawCaret(n,t,r,e),t.lineTo(s+u-M,l),t.quadraticCurveTo(s+u,l,s+u,l+M),a==="center"&&o==="right"&&this.drawCaret(n,t,r,e),t.lineTo(s+u,l+f-y),t.quadraticCurveTo(s+u,l+f,s+u-y,l+f),a==="bottom"&&this.drawCaret(n,t,r,e),t.lineTo(s+h,l+f),t.quadraticCurveTo(s,l+f,s,l+f-h),a==="center"&&o==="left"&&this.drawCaret(n,t,r,e),t.lineTo(s,l+d),t.quadraticCurveTo(s,l,s+d,l),t.closePath(),t.fill(),e.borderWidth>0&&t.stroke()}_updateAnimationTarget(n){const t=this.chart,r=this.$animations,e=r&&r.x,o=r&&r.y;if(e||o){const a=Si[n.position].call(this,this._active,this._eventPosition);if(!a)return;const s=this._size=rM(this,n),l=Object.assign({},a,this._size),u=oM(t,n,l),f=aM(n,l,u,t);(e._to!==f.x||o._to!==f.y)&&(this.xAlign=u.xAlign,this.yAlign=u.yAlign,this.width=s.width,this.height=s.height,this.caretX=a.x,this.caretY=a.y,this._resolveAnimations().update(this,f))}}_willRender(){return!!this.opacity}draw(n){const t=this.options.setContext(this.getContext());let r=this.opacity;if(!r)return;this._updateAnimationTarget(t);const e={width:this.width,height:this.height},o={x:this.x,y:this.y};r=Math.abs(r)<.001?0:r;const a=Tt(t.padding),s=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;t.enabled&&s&&(n.save(),n.globalAlpha=r,this.drawBackground(o,n,e,t),Y1(n,t.textDirection),o.y+=a.top,this.drawTitle(o,n,t),this.drawBody(o,n,t),this.drawFooter(o,n,t),B1(n,t.textDirection),n.restore())}getActiveElements(){return this._active||[]}setActiveElements(n,t){const r=this._active,e=n.map(({datasetIndex:s,index:l})=>{const u=this.chart.getDatasetMeta(s);if(!u)throw new Error("Cannot find a dataset at index "+s);return{datasetIndex:s,element:u.data[l],index:l}}),o=!No(r,e),a=this._positionChanged(e,t);(o||a)&&(this._active=e,this._eventPosition=t,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(n,t,r=!0){if(t&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const e=this.options,o=this._active||[],a=this._getActiveElements(n,o,t,r),s=this._positionChanged(a,n),l=t||!No(a,o)||s;return l&&(this._active=a,(e.enabled||e.external)&&(this._eventPosition={x:n.x,y:n.y},this.update(!0,t))),l}_getActiveElements(n,t,r,e){const o=this.options;if(n.type==="mouseout")return[];if(!e)return t;const a=this.chart.getElementsAtEventForMode(n,o.mode,o,r);return o.reverse&&a.reverse(),a}_positionChanged(n,t){const{caretX:r,caretY:e,options:o}=this,a=Si[o.position].call(this,n,t);return a!==!1&&(r!==a.x||e!==a.y)}}Bl.positioners=Si;var rv={id:"tooltip",_element:Bl,positioners:Si,afterInit(i,n,t){t&&(i.tooltip=new Bl({chart:i,options:t}))},beforeUpdate(i,n,t){i.tooltip&&i.tooltip.initialize(t)},reset(i,n,t){i.tooltip&&i.tooltip.initialize(t)},afterDraw(i){const n=i.tooltip;if(n&&n._willRender()){const t={tooltip:n};if(i.notifyPlugins("beforeTooltipDraw",t)===!1)return;n.draw(i.ctx),i.notifyPlugins("afterTooltipDraw",t)}},afterEvent(i,n){if(i.tooltip){const t=n.replay;i.tooltip.handleEvent(n.event,t,n.inChartArea)&&(n.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:(i,n)=>n.bodyFont.size,boxWidth:(i,n)=>n.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:qt,title(i){if(i.length>0){const n=i[0],t=n.chart.data.labels,r=t?t.length:0;if(this&&this.options&&this.options.mode==="dataset")return n.dataset.label||"";if(n.label)return n.label;if(r>0&&n.dataIndex<r)return t[n.dataIndex]}return""},afterTitle:qt,beforeBody:qt,beforeLabel:qt,label(i){if(this&&this.options&&this.options.mode==="dataset")return i.label+": "+i.formattedValue||i.formattedValue;let n=i.dataset.label||"";n&&(n+=": ");const t=i.formattedValue;return Se(t)||(n+=t),n},labelColor(i){const t=i.chart.getDatasetMeta(i.datasetIndex).controller.getStyle(i.dataIndex);return{borderColor:t.borderColor,backgroundColor:t.backgroundColor,borderWidth:t.borderWidth,borderDash:t.borderDash,borderDashOffset:t.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(i){const t=i.chart.getDatasetMeta(i.datasetIndex).controller.getStyle(i.dataIndex);return{pointStyle:t.pointStyle,rotation:t.rotation}},afterLabel:qt,afterBody:qt,beforeFooter:qt,footer:qt,afterFooter:qt}},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:i=>i!=="filter"&&i!=="itemSort"&&i!=="external",_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]};const ov=(i,n,t,r)=>(typeof n=="string"?(t=i.push(n)-1,r.unshift({index:t,label:n})):isNaN(n)&&(t=null),t);function av(i,n,t,r){const e=i.indexOf(n);if(e===-1)return ov(i,n,t,r);const o=i.lastIndexOf(n);return e!==o?t:e}const sv=(i,n)=>i===null?null:st(Math.round(i),0,n);class Go extends Un{constructor(n){super(n),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(n){const t=this._addedLabels;if(t.length){const r=this.getLabels();for(const{index:e,label:o}of t)r[e]===o&&r.splice(e,1);this._addedLabels=[]}super.init(n)}parse(n,t){if(Se(n))return null;const r=this.getLabels();return t=isFinite(t)&&r[t]===n?t:av(r,n,ke(t,n),this._addedLabels),sv(t,r.length-1)}determineDataLimits(){const{minDefined:n,maxDefined:t}=this.getUserBounds();let{min:r,max:e}=this.getMinMax(!0);this.options.bounds==="ticks"&&(n||(r=0),t||(e=this.getLabels().length-1)),this.min=r,this.max=e}buildTicks(){const n=this.min,t=this.max,r=this.options.offset,e=[];let o=this.getLabels();o=n===0&&t===o.length-1?o:o.slice(n,t+1),this._valueRange=Math.max(o.length-(r?0:1),1),this._startValue=this.min-(r?.5:0);for(let a=n;a<=t;a++)e.push({value:a});return e}getLabelForValue(n){const t=this.getLabels();return n>=0&&n<t.length?t[n]:n}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(n){return typeof n!="number"&&(n=this.parse(n)),n===null?NaN:this.getPixelForDecimal((n-this._startValue)/this._valueRange)}getPixelForTick(n){const t=this.ticks;return n<0||n>t.length-1?null:this.getPixelForValue(t[n].value)}getValueForPixel(n){return Math.round(this._startValue+this.getDecimalForPixel(n)*this._valueRange)}getBasePixel(){return this.bottom}}Go.id="category",Go.defaults={ticks:{callback:Go.prototype.getLabelForValue}};function lv(i,n){const t=[],{bounds:e,step:o,min:a,max:s,precision:l,count:u,maxTicks:f,maxDigits:d,includeBounds:M}=i,h=o||1,y=f-1,{min:p,max:N}=n,g=!Se(a),I=!Se(s),x=!Se(u),T=(N-p)/(d+1);let j=Dd((N-p)/y/h)*h,v,w,A,k;if(j<1e-14&&!g&&!I)return[{value:p},{value:N}];k=Math.ceil(N/j)-Math.floor(p/j),k>y&&(j=Dd(k*j/y/h)*h),Se(l)||(v=Math.pow(10,l),j=Math.ceil(j*v)/v),e==="ticks"?(w=Math.floor(p/j)*j,A=Math.ceil(N/j)*j):(w=p,A=N),g&&I&&o&&D4((s-a)/o,j/1e3)?(k=Math.round(Math.min((s-a)/j,f)),j=(s-a)/k,w=a,A=s):x?(w=g?a:w,A=I?s:A,k=u-1,j=(A-w)/k):(k=(A-w)/j,gi(k,Math.round(k),j/1e3)?k=Math.round(k):k=Math.ceil(k));const L=Math.max(bd(j),bd(w));v=Math.pow(10,Se(l)?L:l),w=Math.round(w*v)/v,A=Math.round(A*v)/v;let b=0;for(g&&(M&&w!==a?(t.push({value:a}),w<a&&b++,gi(Math.round((w+b*j)*v)/v,a,uM(a,T,i))&&b++):w<a&&b++);b<k;++b)t.push({value:Math.round((w+b*j)*v)/v});return I&&M&&A!==s?t.length&&gi(t[t.length-1].value,s,uM(s,T,i))?t[t.length-1].value=s:t.push({value:s}):(!I||A===s)&&t.push({value:A}),t}function uM(i,n,{horizontal:t,minRotation:r}){const e=Ot(r),o=(t?Math.sin(e):Math.cos(e))||.001,a=.75*n*(""+i).length;return Math.min(n/o,a)}class Wo extends Un{constructor(n){super(n),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(n,t){return Se(n)||(typeof n=="number"||n instanceof Number)&&!isFinite(+n)?null:+n}handleTickRangeOptions(){const{beginAtZero:n}=this.options,{minDefined:t,maxDefined:r}=this.getUserBounds();let{min:e,max:o}=this;const a=l=>e=t?e:l,s=l=>o=r?o:l;if(n){const l=Vt(e),u=Vt(o);l<0&&u<0?s(0):l>0&&u>0&&a(0)}if(e===o){let l=1;(o>=Number.MAX_SAFE_INTEGER||e<=Number.MIN_SAFE_INTEGER)&&(l=Math.abs(o*.05)),s(o+l),n||a(e-l)}this.min=e,this.max=o}getTickLimit(){const n=this.options.ticks;let{maxTicksLimit:t,stepSize:r}=n,e;return r?(e=Math.ceil(this.max/r)-Math.floor(this.min/r)+1,e>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${r} would result generating up to ${e} ticks. Limiting to 1000.`),e=1e3)):(e=this.computeTickLimit(),t=t||11),t&&(e=Math.min(t,e)),e}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const n=this.options,t=n.ticks;let r=this.getTickLimit();r=Math.max(2,r);const e={maxTicks:r,bounds:n.bounds,min:n.min,max:n.max,precision:t.precision,step:t.stepSize,count:t.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:t.minRotation||0,includeBounds:t.includeBounds!==!1},o=this._range||this,a=lv(e,o);return n.bounds==="ticks"&&xd(a,this,"value"),n.reverse?(a.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),a}configure(){const n=this.ticks;let t=this.min,r=this.max;if(super.configure(),this.options.offset&&n.length){const e=(r-t)/Math.max(n.length-1,1)/2;t-=e,r+=e}this._startValue=t,this._endValue=r,this._valueRange=r-t}getLabelForValue(n){return ji(n,this.chart.options.locale,this.options.ticks.format)}}class Pl extends Wo{determineDataLimits(){const{min:n,max:t}=this.getMinMax(!0);this.min=rt(n)?n:0,this.max=rt(t)?t:1,this.handleTickRangeOptions()}computeTickLimit(){const n=this.isHorizontal(),t=n?this.width:this.height,r=Ot(this.options.ticks.minRotation),e=(n?Math.sin(r):Math.cos(r))||.001,o=this._resolveTickFontOptions(0);return Math.ceil(t/Math.min(40,o.lineHeight/e))}getPixelForValue(n){return n===null?NaN:this.getPixelForDecimal((n-this._startValue)/this._valueRange)}getValueForPixel(n){return this._startValue+this.getDecimalForPixel(n)*this._valueRange}}Pl.id="linear",Pl.defaults={ticks:{callback:Co.formatters.numeric}};function cM(i){return i/Math.pow(10,Math.floor(bt(i)))===1}function uv(i,n){const t=Math.floor(bt(n.max)),r=Math.ceil(n.max/Math.pow(10,t)),e=[];let o=Dt(i.min,Math.pow(10,Math.floor(bt(n.min)))),a=Math.floor(bt(o)),s=Math.floor(o/Math.pow(10,a)),l=a<0?Math.pow(10,Math.abs(a)):1;do e.push({value:o,major:cM(o)}),++s,s===10&&(s=1,++a,l=a>=0?1:l),o=Math.round(s*Math.pow(10,a)*l)/l;while(a<t||a===t&&s<r);const u=Dt(i.max,o);return e.push({value:u,major:cM(o)}),e}class dM extends Un{constructor(n){super(n),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(n,t){const r=Wo.prototype.parse.apply(this,[n,t]);if(r===0){this._zero=!0;return}return rt(r)&&r>0?r:null}determineDataLimits(){const{min:n,max:t}=this.getMinMax(!0);this.min=rt(n)?Math.max(0,n):null,this.max=rt(t)?Math.max(0,t):null,this.options.beginAtZero&&(this._zero=!0),this.handleTickRangeOptions()}handleTickRangeOptions(){const{minDefined:n,maxDefined:t}=this.getUserBounds();let r=this.min,e=this.max;const o=l=>r=n?r:l,a=l=>e=t?e:l,s=(l,u)=>Math.pow(10,Math.floor(bt(l))+u);r===e&&(r<=0?(o(1),a(10)):(o(s(r,-1)),a(s(e,1)))),r<=0&&o(s(e,-1)),e<=0&&a(s(r,1)),this._zero&&this.min!==this._suggestedMin&&r===s(this.min,0)&&o(s(r,-1)),this.min=r,this.max=e}buildTicks(){const n=this.options,t={min:this._userMin,max:this._userMax},r=uv(t,this);return n.bounds==="ticks"&&xd(r,this,"value"),n.reverse?(r.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),r}getLabelForValue(n){return n===void 0?"0":ji(n,this.chart.options.locale,this.options.ticks.format)}configure(){const n=this.min;super.configure(),this._startValue=bt(n),this._valueRange=bt(this.max)-bt(n)}getPixelForValue(n){return(n===void 0||n===0)&&(n=this.min),n===null||isNaN(n)?NaN:this.getPixelForDecimal(n===this.min?0:(bt(n)-this._startValue)/this._valueRange)}getValueForPixel(n){const t=this.getDecimalForPixel(n);return Math.pow(10,this._startValue+t*this._valueRange)}}dM.id="logarithmic",dM.defaults={ticks:{callback:Co.formatters.logarithmic,major:{enabled:!0}}};function Rl(i){const n=i.ticks;if(n.display&&i.display){const t=Tt(n.backdropPadding);return ke(n.font&&n.font.size,Te.font.size)+t.height}return 0}function cv(i,n,t){return t=Ze(t)?t:[t],{w:e1(i,n.string,t),h:t.length*n.lineHeight}}function fM(i,n,t,r,e){return i===r||i===e?{start:n-t/2,end:n+t/2}:i<r||i>e?{start:n-t,end:n}:{start:n,end:n+t}}function dv(i){const n={l:i.left+i._padding.left,r:i.right-i._padding.right,t:i.top+i._padding.top,b:i.bottom-i._padding.bottom},t=Object.assign({},n),r=[],e=[],o=i._pointLabels.length,a=i.options.pointLabels,s=a.centerPointLabels?Je/o:0;for(let l=0;l<o;l++){const u=a.setContext(i.getPointLabelContext(l));e[l]=u.padding;const f=i.getPointPosition(l,i.drawingArea+e[l],s),d=yt(u.font),M=cv(i.ctx,d,i._pointLabels[l]);r[l]=M;const h=Et(i.getIndexAngle(l)+s),y=Math.round(tl(h)),p=fM(y,f.x,M.w,0,180),N=fM(y,f.y,M.h,90,270);fv(t,n,h,p,N)}i.setCenterPoint(n.l-t.l,t.r-n.r,n.t-t.t,t.b-n.b),i._pointLabelItems=Mv(i,r,e)}function fv(i,n,t,r,e){const o=Math.abs(Math.sin(t)),a=Math.abs(Math.cos(t));let s=0,l=0;r.start<n.l?(s=(n.l-r.start)/o,i.l=Math.min(i.l,n.l-s)):r.end>n.r&&(s=(r.end-n.r)/o,i.r=Math.max(i.r,n.r+s)),e.start<n.t?(l=(n.t-e.start)/a,i.t=Math.min(i.t,n.t-l)):e.end>n.b&&(l=(e.end-n.b)/a,i.b=Math.max(i.b,n.b+l))}function Mv(i,n,t){const r=[],e=i._pointLabels.length,o=i.options,a=Rl(o)/2,s=i.drawingArea,l=o.pointLabels.centerPointLabels?Je/e:0;for(let u=0;u<e;u++){const f=i.getPointPosition(u,s+a+t[u],l),d=Math.round(tl(Et(f.angle+Xe))),M=n[u],h=yv(f.y,M.h,d),y=gv(d),p=hv(f.x,M.w,y);r.push({x:f.x,y:h,textAlign:y,left:p,top:h,right:p+M.w,bottom:h+M.h})}return r}function gv(i){return i===0||i===180?"center":i<180?"left":"right"}function hv(i,n,t){return t==="right"?i-=n:t==="center"&&(i-=n/2),i}function yv(i,n,t){return t===90||t===270?i-=n/2:(t>270||t<90)&&(i-=n),i}function pv(i,n){const{ctx:t,options:{pointLabels:r}}=i;for(let e=n-1;e>=0;e--){const o=r.setContext(i.getPointLabelContext(e)),a=yt(o.font),{x:s,y:l,textAlign:u,left:f,top:d,right:M,bottom:h}=i._pointLabelItems[e],{backdropColor:y}=o;if(!Se(y)){const p=Jn(o.borderRadius),N=Tt(o.backdropPadding);t.fillStyle=y;const g=f-N.left,I=d-N.top,x=M-f+N.width,T=h-d+N.height;Object.values(p).some(j=>j!==0)?(t.beginPath(),zo(t,{x:g,y:I,w:x,h:T,radius:p}),t.fill()):t.fillRect(g,I,x,T)}ko(t,i._pointLabels[e],s,l+a.lineHeight/2,a,{color:o.color,textAlign:u,textBaseline:"middle"})}}function MM(i,n,t,r){const{ctx:e}=i;if(t)e.arc(i.xCenter,i.yCenter,n,0,Ye);else{let o=i.getPointPosition(0,n);e.moveTo(o.x,o.y);for(let a=1;a<r;a++)o=i.getPointPosition(a,n),e.lineTo(o.x,o.y)}}function Nv(i,n,t,r){const e=i.ctx,o=n.circular,{color:a,lineWidth:s}=n;!o&&!r||!a||!s||t<0||(e.save(),e.strokeStyle=a,e.lineWidth=s,e.setLineDash(n.borderDash),e.lineDashOffset=n.borderDashOffset,e.beginPath(),MM(i,t,o,r),e.closePath(),e.stroke(),e.restore())}function mv(i,n,t){return mn(i,{label:t,index:n,type:"pointLabel"})}class $o extends Wo{constructor(n){super(n),this.xCenter=void 0,this.yCenter=void 0,this.drawingArea=void 0,this._pointLabels=[],this._pointLabelItems=[]}setDimensions(){const n=this._padding=Tt(Rl(this.options)/2),t=this.width=this.maxWidth-n.width,r=this.height=this.maxHeight-n.height;this.xCenter=Math.floor(this.left+t/2+n.left),this.yCenter=Math.floor(this.top+r/2+n.top),this.drawingArea=Math.floor(Math.min(t,r)/2)}determineDataLimits(){const{min:n,max:t}=this.getMinMax(!1);this.min=rt(n)&&!isNaN(n)?n:0,this.max=rt(t)&&!isNaN(t)?t:0,this.handleTickRangeOptions()}computeTickLimit(){return Math.ceil(this.drawingArea/Rl(this.options))}generateTickLabels(n){Wo.prototype.generateTickLabels.call(this,n),this._pointLabels=this.getLabels().map((t,r)=>{const e=$e(this.options.pointLabels.callback,[t,r],this);return e||e===0?e:""}).filter((t,r)=>this.chart.getDataVisibility(r))}fit(){const n=this.options;n.display&&n.pointLabels.display?dv(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(n,t,r,e){this.xCenter+=Math.floor((n-t)/2),this.yCenter+=Math.floor((r-e)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(n,t,r,e))}getIndexAngle(n){const t=Ye/(this._pointLabels.length||1),r=this.options.startAngle||0;return Et(n*t+Ot(r))}getDistanceFromCenterForValue(n){if(Se(n))return NaN;const t=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-n)*t:(n-this.min)*t}getValueForDistanceFromCenter(n){if(Se(n))return NaN;const t=n/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-t:this.min+t}getPointLabelContext(n){const t=this._pointLabels||[];if(n>=0&&n<t.length){const r=t[n];return mv(this.getContext(),n,r)}}getPointPosition(n,t,r=0){const e=this.getIndexAngle(n)-Xe+r;return{x:Math.cos(e)*t+this.xCenter,y:Math.sin(e)*t+this.yCenter,angle:e}}getPointPositionForValue(n,t){return this.getPointPosition(n,this.getDistanceFromCenterForValue(t))}getBasePosition(n){return this.getPointPositionForValue(n||0,this.getBaseValue())}getPointLabelPosition(n){const{left:t,top:r,right:e,bottom:o}=this._pointLabelItems[n];return{left:t,top:r,right:e,bottom:o}}drawBackground(){const{backgroundColor:n,grid:{circular:t}}=this.options;if(n){const r=this.ctx;r.save(),r.beginPath(),MM(this,this.getDistanceFromCenterForValue(this._endValue),t,this._pointLabels.length),r.closePath(),r.fillStyle=n,r.fill(),r.restore()}}drawGrid(){const n=this.ctx,t=this.options,{angleLines:r,grid:e}=t,o=this._pointLabels.length;let a,s,l;if(t.pointLabels.display&&pv(this,o),e.display&&this.ticks.forEach((u,f)=>{if(f!==0){s=this.getDistanceFromCenterForValue(u.value);const d=e.setContext(this.getContext(f-1));Nv(this,d,s,o)}}),r.display){for(n.save(),a=o-1;a>=0;a--){const u=r.setContext(this.getPointLabelContext(a)),{color:f,lineWidth:d}=u;!d||!f||(n.lineWidth=d,n.strokeStyle=f,n.setLineDash(u.borderDash),n.lineDashOffset=u.borderDashOffset,s=this.getDistanceFromCenterForValue(t.ticks.reverse?this.min:this.max),l=this.getPointPosition(a,s),n.beginPath(),n.moveTo(this.xCenter,this.yCenter),n.lineTo(l.x,l.y),n.stroke())}n.restore()}}drawBorder(){}drawLabels(){const n=this.ctx,t=this.options,r=t.ticks;if(!r.display)return;const e=this.getIndexAngle(0);let o,a;n.save(),n.translate(this.xCenter,this.yCenter),n.rotate(e),n.textAlign="center",n.textBaseline="middle",this.ticks.forEach((s,l)=>{if(l===0&&!t.reverse)return;const u=r.setContext(this.getContext(l)),f=yt(u.font);if(o=this.getDistanceFromCenterForValue(this.ticks[l].value),u.showLabelBackdrop){n.font=f.string,a=n.measureText(s.label).width,n.fillStyle=u.backdropColor;const d=Tt(u.backdropPadding);n.fillRect(-a/2-d.left,-o-f.size/2-d.top,a+d.width,f.size+d.height)}ko(n,s.label,0,-o,f,{color:u.color})}),n.restore()}drawTitle(){}}$o.id="radialLinear",$o.defaults={display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:Co.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback(i){return i},padding:5,centerPointLabels:!1}},$o.defaultRoutes={"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"},$o.descriptors={angleLines:{_fallback:"grid"}};const Jo={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}},gt=Object.keys(Jo);function Iv(i,n){return i-n}function gM(i,n){if(Se(n))return null;const t=i._adapter,{parser:r,round:e,isoWeekday:o}=i._parseOpts;let a=n;return typeof r=="function"&&(a=r(a)),rt(a)||(a=typeof r=="string"?t.parse(a,r):t.parse(a)),a===null?null:(e&&(a=e==="week"&&(Wn(o)||o===!0)?t.startOf(a,"isoWeek",o):t.startOf(a,e)),+a)}function hM(i,n,t,r){const e=gt.length;for(let o=gt.indexOf(i);o<e-1;++o){const a=Jo[gt[o]],s=a.steps?a.steps:Number.MAX_SAFE_INTEGER;if(a.common&&Math.ceil((t-n)/(s*a.size))<=r)return gt[o]}return gt[e-1]}function jv(i,n,t,r,e){for(let o=gt.length-1;o>=gt.indexOf(t);o--){const a=gt[o];if(Jo[a].common&&i._adapter.diff(e,r,a)>=n-1)return a}return gt[t?gt.indexOf(t):0]}function Dv(i){for(let n=gt.indexOf(i)+1,t=gt.length;n<t;++n)if(Jo[gt[n]].common)return gt[n]}function yM(i,n,t){if(!t)i[n]=!0;else if(t.length){const{lo:r,hi:e}=il(t,n),o=t[r]>=n?t[r]:t[e];i[o]=!0}}function xv(i,n,t,r){const e=i._adapter,o=+e.startOf(n[0].value,r),a=n[n.length-1].value;let s,l;for(s=o;s<=a;s=+e.add(s,1,r))l=t[s],l>=0&&(n[l].major=!0);return n}function pM(i,n,t){const r=[],e={},o=n.length;let a,s;for(a=0;a<o;++a)s=n[a],e[s]=a,r.push({value:s,major:!1});return o===0||!t?r:xv(i,r,e,t)}class Xo extends Un{constructor(n){super(n),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(n,t){const r=n.time||(n.time={}),e=this._adapter=new Px._date(n.adapters.date);e.init(t),fi(r.displayFormats,e.formats()),this._parseOpts={parser:r.parser,round:r.round,isoWeekday:r.isoWeekday},super.init(n),this._normalized=t.normalized}parse(n,t){return n===void 0?null:gM(this,n)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const n=this.options,t=this._adapter,r=n.time.unit||"day";let{min:e,max:o,minDefined:a,maxDefined:s}=this.getUserBounds();function l(u){!a&&!isNaN(u.min)&&(e=Math.min(e,u.min)),!s&&!isNaN(u.max)&&(o=Math.max(o,u.max))}(!a||!s)&&(l(this._getLabelBounds()),(n.bounds!=="ticks"||n.ticks.source!=="labels")&&l(this.getMinMax(!1))),e=rt(e)&&!isNaN(e)?e:+t.startOf(Date.now(),r),o=rt(o)&&!isNaN(o)?o:+t.endOf(Date.now(),r)+1,this.min=Math.min(e,o-1),this.max=Math.max(e+1,o)}_getLabelBounds(){const n=this.getLabelTimestamps();let t=Number.POSITIVE_INFINITY,r=Number.NEGATIVE_INFINITY;return n.length&&(t=n[0],r=n[n.length-1]),{min:t,max:r}}buildTicks(){const n=this.options,t=n.time,r=n.ticks,e=r.source==="labels"?this.getLabelTimestamps():this._generate();n.bounds==="ticks"&&e.length&&(this.min=this._userMin||e[0],this.max=this._userMax||e[e.length-1]);const o=this.min,a=this.max,s=T4(e,o,a);return this._unit=t.unit||(r.autoSkip?hM(t.minUnit,this.min,this.max,this._getLabelCapacity(o)):jv(this,s.length,t.minUnit,this.min,this.max)),this._majorUnit=!r.major.enabled||this._unit==="year"?void 0:Dv(this._unit),this.initOffsets(e),n.reverse&&s.reverse(),pM(this,s,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map(n=>+n.value))}initOffsets(n){let t=0,r=0,e,o;this.options.offset&&n.length&&(e=this.getDecimalForValue(n[0]),n.length===1?t=1-e:t=(this.getDecimalForValue(n[1])-e)/2,o=this.getDecimalForValue(n[n.length-1]),n.length===1?r=o:r=(o-this.getDecimalForValue(n[n.length-2]))/2);const a=n.length<3?.5:.25;t=st(t,0,a),r=st(r,0,a),this._offsets={start:t,end:r,factor:1/(t+1+r)}}_generate(){const n=this._adapter,t=this.min,r=this.max,e=this.options,o=e.time,a=o.unit||hM(o.minUnit,t,r,this._getLabelCapacity(t)),s=ke(o.stepSize,1),l=a==="week"?o.isoWeekday:!1,u=Wn(l)||l===!0,f={};let d=t,M,h;if(u&&(d=+n.startOf(d,"isoWeek",l)),d=+n.startOf(d,u?"day":a),n.diff(r,t,a)>1e5*s)throw new Error(t+" and "+r+" are too far apart with stepSize of "+s+" "+a);const y=e.ticks.source==="data"&&this.getDataTimestamps();for(M=d,h=0;M<r;M=+n.add(M,s,a),h++)yM(f,M,y);return(M===r||e.bounds==="ticks"||h===1)&&yM(f,M,y),Object.keys(f).sort((p,N)=>p-N).map(p=>+p)}getLabelForValue(n){const t=this._adapter,r=this.options.time;return r.tooltipFormat?t.format(n,r.tooltipFormat):t.format(n,r.displayFormats.datetime)}_tickFormatFunction(n,t,r,e){const o=this.options,a=o.time.displayFormats,s=this._unit,l=this._majorUnit,u=s&&a[s],f=l&&a[l],d=r[t],M=l&&f&&d&&d.major,h=this._adapter.format(n,e||(M?f:u)),y=o.ticks.callback;return y?$e(y,[h,t,r],this):h}generateTickLabels(n){let t,r,e;for(t=0,r=n.length;t<r;++t)e=n[t],e.label=this._tickFormatFunction(e.value,t,n)}getDecimalForValue(n){return n===null?NaN:(n-this.min)/(this.max-this.min)}getPixelForValue(n){const t=this._offsets,r=this.getDecimalForValue(n);return this.getPixelForDecimal((t.start+r)*t.factor)}getValueForPixel(n){const t=this._offsets,r=this.getDecimalForPixel(n)/t.factor-t.end;return this.min+r*(this.max-this.min)}_getLabelSize(n){const t=this.options.ticks,r=this.ctx.measureText(n).width,e=Ot(this.isHorizontal()?t.maxRotation:t.minRotation),o=Math.cos(e),a=Math.sin(e),s=this._resolveTickFontOptions(0).size;return{w:r*o+s*a,h:r*a+s*o}}_getLabelCapacity(n){const t=this.options.time,r=t.displayFormats,e=r[t.unit]||r.millisecond,o=this._tickFormatFunction(n,0,pM(this,[n],this._majorUnit),e),a=this._getLabelSize(o),s=Math.floor(this.isHorizontal()?this.width/a.w:this.height/a.h)-1;return s>0?s:1}getDataTimestamps(){let n=this._cache.data||[],t,r;if(n.length)return n;const e=this.getMatchingVisibleMetas();if(this._normalized&&e.length)return this._cache.data=e[0].controller.getAllParsedValues(this);for(t=0,r=e.length;t<r;++t)n=n.concat(e[t].controller.getAllParsedValues(this));return this._cache.data=this.normalize(n)}getLabelTimestamps(){const n=this._cache.labels||[];let t,r;if(n.length)return n;const e=this.getLabels();for(t=0,r=e.length;t<r;++t)n.push(gM(this,e[t]));return this._cache.labels=this._normalized?n:this.normalize(n)}normalize(n){return kd(n.sort(Iv))}}Xo.id="time",Xo.defaults={bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",major:{enabled:!1}}};function Ko(i,n,t){let r=0,e=i.length-1,o,a,s,l;t?(n>=i[r].pos&&n<=i[e].pos&&({lo:r,hi:e}=Sn(i,"pos",n)),{pos:o,time:s}=i[r],{pos:a,time:l}=i[e]):(n>=i[r].time&&n<=i[e].time&&({lo:r,hi:e}=Sn(i,"time",n)),{time:o,pos:s}=i[r],{time:a,pos:l}=i[e]);const u=a-o;return u?s+(l-s)*(n-o)/u:s}class NM extends Xo{constructor(n){super(n),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const n=this._getTimestampsForTable(),t=this._table=this.buildLookupTable(n);this._minPos=Ko(t,this.min),this._tableRange=Ko(t,this.max)-this._minPos,super.initOffsets(n)}buildLookupTable(n){const{min:t,max:r}=this,e=[],o=[];let a,s,l,u,f;for(a=0,s=n.length;a<s;++a)u=n[a],u>=t&&u<=r&&e.push(u);if(e.length<2)return[{time:t,pos:0},{time:r,pos:1}];for(a=0,s=e.length;a<s;++a)f=e[a+1],l=e[a-1],u=e[a],Math.round((f+l)/2)!==u&&o.push({time:u,pos:a/(s-1)});return o}_getTimestampsForTable(){let n=this._cache.all||[];if(n.length)return n;const t=this.getDataTimestamps(),r=this.getLabelTimestamps();return t.length&&r.length?n=this.normalize(t.concat(r)):n=t.length?t:r,n=this._cache.all=n,n}getDecimalForValue(n){return(Ko(this._table,n)-this._minPos)/this._tableRange}getValueForPixel(n){const t=this._offsets,r=this.getDecimalForPixel(n)/t.factor-t.end;return Ko(this._table,r*this._tableRange+this._minPos,!0)}}NM.id="timeseries",NM.defaults=Xo.defaults;var ei;(function(i){i.ChartRendered="chart:rendered",i.ChartUpdated="chart:updated",i.ChartDestroyed="chart:destroyed",i.LabelsUpdated="labels:updated"})(ei||(ei={}));function qo(i,n,t,r){i(n,t),r!==void 0&&r.emit(ei.ChartRendered)}function bv(i,n){i.update(),n!==void 0&&n.emit(ei.ChartUpdated)}function ea(i,n){i.destroy(),n!==void 0&&n.emit(ei.ChartDestroyed)}function vv(i,n){const t={labels:typeof i.labels=="undefined"?[]:[...i.labels],datasets:[]};return mM(t,{...i},n),t}function mM(i,n,t){const r=[];i.datasets=n.datasets.map(e=>{const o=i.datasets.find(a=>a[t]===e[t]);return!o||!e.data||r.includes(o)?{...e}:(r.push(o),Object.assign(o,e),o)})}function Tv(i,n,t){i.data.labels=n,t!==void 0&&t.emit(ei.LabelsUpdated)}function Av(i,n){i.options={...n}}function kv(i,n){const t=i.datasets.map(e=>e.label),r=n.datasets.map(e=>e.label);return n.datasets.length===i.datasets.length&&t.every((e,o)=>e===r[o])}const zv="Please remove the <template></template> tags from your chart component. See https://vue-chartjs.org/guide/#vue-single-file-components",Lv="Update ERROR: chart instance not found",wv=((i,n,t)=>c.defineComponent({props:{chartData:{type:Object,required:!0},chartOptions:{type:Object,default:()=>{}},datasetIdKey:{type:String,default:"label"},chartId:{type:String,default:i},width:{type:Number,default:400},height:{type:Number,default:400},cssClasses:{type:String,default:""},styles:{type:Object,default:()=>{}},plugins:{type:Array,default:()=>[]}},setup(r,e){wi.register(t);const o=c.shallowRef(null),a=c.ref(null);function s(d,M){if(o.value!==null&&ea(c.toRaw(o.value),e),a.value===null)throw new Error(zv);{const h=vv(d,r.datasetIdKey),y=a.value.getContext("2d");y!==null&&(o.value=new wi(y,{type:n,data:c.isProxy(d)?new Proxy(h,{}):h,options:M,plugins:r.plugins}))}}function l(d,M){const h=c.isProxy(d)?c.toRaw(d):{...d},y=c.isProxy(M)?c.toRaw(M):{...M};if(Object.keys(y).length>0){const p=c.toRaw(o.value);kv(h,y)&&p!==null?(mM(p==null?void 0:p.data,h,r.datasetIdKey),h.labels!==void 0&&Tv(p,h.labels,e),f()):(p!==null&&ea(p,e),qo(s,r.chartData,r.chartOptions,e))}else o.value!==null&&ea(c.toRaw(o.value),e),qo(s,r.chartData,r.chartOptions,e)}function u(d){const M=c.toRaw(o.value);M!==null?(Av(M,d),f()):qo(s,r.chartData,r.chartOptions,e)}function f(){const d=c.toRaw(o.value);d!==null?bv(d,e):console.error(Lv)}return c.watch(()=>r.chartData,(d,M)=>l(d,M),{deep:!0}),c.watch(()=>r.chartOptions,d=>u(d),{deep:!0}),c.onMounted(()=>{"datasets"in r.chartData&&r.chartData.datasets.length>0&&qo(s,r.chartData,r.chartOptions,e)}),c.onBeforeUnmount(()=>{o.value!==null&&ea(c.toRaw(o.value),e)}),e.expose({chart:o,updateChart:f}),()=>c.h("div",{style:r.styles,class:r.cssClasses},[c.h("canvas",{id:r.chartId,width:r.width,height:r.height,ref:a})])}}))("bar-chart","bar",Eo);var yz="";const Sv={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 i=this.labels||[],n=this.min===void 0?0:this.min,t=i.length?i.length-1:100,r=this.max===void 0?t:this.max,e=this.minValue===void 0?25:this.minValue;i.length&&this.minValue===void 0&&(e=1);let o=this.maxValue||75;if(i.length&&this.maxValue===void 0&&(o=i.length-2),r<=n)throw new Error("Invalid props min or max");if(e>o)throw new Error("Invalid props minValue or maxValue");let a=this.rangeMargin===void 0?this.step:this.rangeMargin,s=a%this.step;return s&&(a=a+this.step-s),{valueMin:e<n?n:e,valueMax:o>r?r:o,interVal:null,startX:null,mouseMoveCounter:null,barBox:null,barValue:0,rangeMarginValue:a}},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(i){let n=parseFloat(i.target.value);n<=this.valueMax-this.rangeMarginValue&&n>=this.minimum?this.valueMin=n:i.target.value=this.valueMin},onInputMaxChange(i){let n=parseFloat(i.target.value);n>=this.valueMin+this.rangeMarginValue&&n<=this.maximum?this.valueMax=n:i.target.value=this.valueMax},onLeftThumbMousedown(i){if(i.preventDefault(),this.startX=i.clientX,i.type==="touchstart")if(i.touches.length===1)this.startX=i.touches[0].clientX;else return;this.mouseMoveCounter=0,this.barValue=this.valueMin,this.barBox=i.target.parentNode.getBoundingClientRect(),document.addEventListener("mousemove",this.onLeftThumbMousemove),document.addEventListener("mouseup",this.onLeftThumbMouseup),document.addEventListener("touchmove",this.onLeftThumbMousemove),document.addEventListener("touchend",this.onLeftThumbMouseup)},onLeftThumbMousemove(i){this.mouseMoveCounter++;let n=i.clientX;i.type==="touchmove"&&(n=i.touches[0].clientX);let r=(n-this.startX)/this.barBox.width,e=this.barValue+(this.maximum-this.minimum)*r;e-=e%this.step,e<this.minimum?e=this.minimum:e>this.valueMax-this.rangeMarginValue&&(e=this.valueMax-this.rangeMarginValue),this.valueMin=e},onLeftThumbMouseup(){document.removeEventListener("mousemove",this.onLeftThumbMousemove),document.removeEventListener("mouseup",this.onLeftThumbMouseup),document.removeEventListener("touchmove",this.onLeftThumbMousemove),document.removeEventListener("touchend",this.onLeftThumbMouseup)},onRightThumbMousedown(i){if(i.preventDefault(),this.startX=i.clientX,i.type==="touchstart")if(i.touches.length===1)this.startX=i.touches[0].clientX;else return;this.mouseMoveCounter=0,this.barValue=this.valueMax,this.barBox=i.target.parentNode.getBoundingClientRect(),document.addEventListener("mousemove",this.onRightThumbMousemove),document.addEventListener("mouseup",this.onRightThumbMouseup),document.addEventListener("touchmove",this.onRightThumbMousemove),document.addEventListener("touchend",this.onRightThumbMouseup)},onRightThumbMousemove(i){this.mouseMoveCounter++;let n=i.clientX;i.type==="touchmove"&&(n=i.touches[0].clientX);let r=(n-this.startX)/this.barBox.width,e=this.barValue+(this.maximum-this.minimum)*r;e-=e%this.step,e<this.valueMin+this.rangeMarginValue?e=this.valueMin+this.rangeMarginValue:e>this.maximum&&(e=this.maximum),this.valueMax=e},onRightThumbMouseup(){document.removeEventListener("mousemove",this.onRightThumbMousemove),document.removeEventListener("mouseup",this.onRightThumbMouseup),document.removeEventListener("touchmove",this.onRightThumbMousemove),document.removeEventListener("touchend",this.onRightThumbMouseup)},onMouseWheel(i){if(this.preventWheel===!0||!i.shiftKey&&!i.ctrlKey)return;let n=this.step;i.deltaY<0&&(n=-n),i.shiftKey&&i.ctrlKey?this.valueMin+n>=this.minimum&&this.valueMax+n<=this.maximum&&(this.valueMin=this.valueMin+n,this.valueMax=this.valueMax+n):i.ctrlKey?(n=this.valueMax+n,n<this.valueMin+this.rangeMarginValue?n=this.valueMin+this.rangeMarginValue:n>this.maximum&&(n=this.maximum),this.valueMax=n):i.shiftKey&&(n=this.valueMin+n,n<this.minimum?n=this.minimum:n>this.valueMax-this.rangeMarginValue&&(n=this.valueMax-this.rangeMarginValue),this.valueMin=n)},triggerInput(){let i=0;this.step.toString().includes(".")&&(i=2);let n={min:this.minimum,max:this.maximum,minValue:parseFloat(this.valueMin.toFixed(i)),maxValue:parseFloat(this.valueMax.toFixed(i))};this.$emit("input",n)}},computed:{minimum(){return this.min===void 0?0:this.min},maximum(){let i=this.labels||[],n=i.length?i.length-1:100;return this.max===void 0?n:this.max},stepCount(){let i=this.labels||[];return i.length?i.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 i=0;return this.step.toString().includes(".")&&(i=2),(this.valueMin||0).toFixed(i)},barMaxVal(){let i=0;return this.step.toString().includes(".")&&(i=2),(this.valueMax||100).toFixed(i)},scaleLabels(){let i=this.labels||[];return i.length===0&&(i=[],i.push(this.minimum),i.push(this.maximum)),i}},watch:{valueMin(){this.triggerInput()},valueMax(){this.triggerInput()},minValue(i){this.valueMin=i<this.minimum?this.minimum:i},maxValue(i){this.valueMax=i>this.maximum?this.maximum:i}},mounted(){}},Ov={class:"bar"},Ev=["min","max","step","value"],Cv={class:"caption"},_v={class:"min-caption"},Qv={class:"bar-inner"},Uv=["min","max","step","value"],Yv={class:"caption"},Bv={class:"max-caption"},Pv={key:0,class:"ruler"},Rv={key:1,class:"sub-ruler"},Vv={key:2,class:"labels"};function Zv(i,n,t,r,e,o){return c.openBlock(),c.createElementBlock("div",{class:c.normalizeClass([t.baseClassName,e.rangeMarginValue===0?"zero-ranage-margin":""]),onMousewheel:n[10]||(n[10]=c.withModifiers((...a)=>o.onMouseWheel&&o.onMouseWheel(...a),["prevent","stop"]))},[c.createElementVNode("div",Ov,[c.createElementVNode("div",{class:"bar-left",style:c.normalizeStyle({width:o.barMin+"%"}),onClick:n[0]||(n[0]=(...a)=>o.onBarLeftClick&&o.onBarLeftClick(...a))},null,4),c.createElementVNode("input",{class:"input-type-range input-type-range-min",type:"range",min:o.minimum,max:o.maximum,step:t.step,value:e.valueMin,onInput:n[1]||(n[1]=c.withModifiers((...a)=>o.onInputMinChange&&o.onInputMinChange(...a),["stop","prevent"]))},null,40,Ev),c.createElementVNode("div",{class:"thumb thumb-left",onMousedown:n[2]||(n[2]=(...a)=>o.onLeftThumbMousedown&&o.onLeftThumbMousedown(...a)),onTouchstart:n[3]||(n[3]=(...a)=>o.onLeftThumbMousedown&&o.onLeftThumbMousedown(...a))},[c.createElementVNode("div",Cv,[c.createElementVNode("span",_v,c.toDisplayString(t.minCaption||o.barMinVal),1)])],32),c.createElementVNode("div",Qv,[c.createElementVNode("div",{class:"bar-inner-left",onClick:n[4]||(n[4]=(...a)=>o.onInnerBarLeftClick&&o.onInnerBarLeftClick(...a))}),c.createElementVNode("div",{class:"bar-inner-right",onClick:n[5]||(n[5]=(...a)=>o.onInnerBarRightClick&&o.onInnerBarRightClick(...a))})]),c.createElementVNode("input",{class:"input-type-range input-type-range-max",type:"range",min:o.minimum,max:o.maximum,step:t.step,value:e.valueMax,onInput:n[6]||(n[6]=c.withModifiers((...a)=>o.onInputMaxChange&&o.onInputMaxChange(...a),["stop","prevent"]))},null,40,Uv),c.createElementVNode("div",{class:"thumb thumb-right",onMousedown:n[7]||(n[7]=(...a)=>o.onRightThumbMousedown&&o.onRightThumbMousedown(...a)),onTouchstart:n[8]||(n[8]=(...a)=>o.onRightThumbMousedown&&o.onRightThumbMousedown(...a))},[c.createElementVNode("div",Yv,[c.createElementVNode("span",Bv,c.toDisplayString(t.maxCaption||o.barMaxVal),1)])],32),c.createElementVNode("div",{class:"bar-right",style:c.normalizeStyle({width:o.barMax+"%"}),onClick:n[9]||(n[9]=(...a)=>o.onBarRightClick&&o.onBarRightClick(...a))},null,4)]),t.ruler?(c.openBlock(),c.createElementBlock("div",Pv,[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(o.stepCount,a=>(c.openBlock(),c.createElementBlock("div",{key:a,class:"ruler-rule"}))),128))])):c.createCommentVNode("",!0),o.subStepCount?(c.openBlock(),c.createElementBlock("div",Rv,[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(o.subStepCount,a=>(c.openBlock(),c.createElementBlock("div",{key:a,class:"ruler-sub-rule"}))),128))])):c.createCommentVNode("",!0),t.label?(c.openBlock(),c.createElementBlock("div",Vv,[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(o.scaleLabels,a=>(c.openBlock(),c.createElementBlock("div",{class:"label",key:a},c.toDisplayString(a),1))),128))])):c.createCommentVNode("",!0)],34)}var Fv=at(Sv,[["render",Zv]]);const Hv=c.defineComponent({components:{DhIcon:ve},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()}}}),Gv={class:"dh-advanced-filter-container"},Wv={class:"advance_section"},$v={key:0},Jv={class:"list-none"},Xv=["checked"],Kv=["checked"],qv=["checked"];function eT(i,n,t,r,e,o){const a=c.resolveComponent("dh-icon");return c.openBlock(),c.createElementBlock("div",Gv,[c.createElementVNode("div",Wv,[c.createElementVNode("span",{class:"toggle-icon",onClick:n[0]||(n[0]=s=>i.toggleFilter())},[c.createTextVNode(c.toDisplayString(i.mainText)+" ",1),c.createVNode(a,{"icon-name":i.activeFilter?"arrow-up":"arrow-down",size:20},null,8,["icon-name"])]),i.activeFilter?(c.openBlock(),c.createElementBlock("div",$v,[c.renderSlot(i.$slots,"default"),c.createElementVNode("ul",Jv,[c.createElementVNode("li",null,[c.createElementVNode("label",null,[c.createElementVNode("input",{checked:i.isFilterMissing,name:"number_filter",type:"checkbox",onChange:n[1]||(n[1]=s=>i.missingFilter())},null,40,Xv),c.createTextVNode(" "+c.toDisplayString(i.filterMissingText),1)])]),c.createElementVNode("li",null,[c.createElementVNode("label",null,[c.createElementVNode("input",{checked:i.isMatch,name:"number_filter",type:"radio",onChange:n[2]||(n[2]=s=>i.matchFilter())},null,40,Kv),c.createTextVNode(" "+c.toDisplayString(i.matchText),1)]),c.createElementVNode("label",null,[c.createElementVNode("input",{checked:i.isExclude,name:"number_filter",type:"radio",onChange:n[3]||(n[3]=s=>i.excludeFilter())},null,40,qv),c.createTextVNode(" "+c.toDisplayString(i.excludeText),1)])])])])):c.createCommentVNode("",!0)])])}var IM=at(Hv,[["render",eT]]),pz="";wi.register(rv,Fo,Go,Pl);const tT=c.defineComponent({components:{Bar:wv,MultiRangeSlider:Fv,DhAdvancedFilter:IM},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 i=this.chartData.datasets[0].data;this.chartLines=this.chartData.datasets[0],this.chartData.datasets[0].backgroundColor=[];for(let n=0;n<=i.length;n++)i[n]>=this.min&&i[n]<=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 i=this.chartData.datasets[0].data;this.chartLines=this.chartData.datasets[0],this.chartData.datasets[0].backgroundColor=[];for(let n=0;n<i.length;n++)i[n]>=this.min&&i[n]<=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 i=this.chartData.datasets[0].data;if(this.chartLines=this.chartData.datasets[0],this.chartData.datasets[0].backgroundColor=[],this.validated)for(let n=1;n<=i.length;n++)this.chartData.datasets[0].backgroundColor.push("#e0e0e0");else this.isMatch&&this.matchFilter(),this.isExclude&&this.excludeFilter()},changeMin(i){let n=i.target.value;this.min=n||"1",this.BarMinValue=n?this.getFirstIndex(parseInt(n)):1,this.isMatch&&!this.isDisable&&this.matchFilter(),this.isExclude&&!this.isDisable&&this.excludeFilter()},changeMax(i){let n=i.target.value;this.BarMaxValue=n&&n>this.maxNumber(this.numberRange)?this.numberRange.length:this.getLastIndex(parseInt(n)),this.max=n&&n>this.maxNumber(this.numberRange)?this.maxNumber(this.numberRange):n,this.isMatch&&!this.isDisable&&this.matchFilter(),this.isExclude&&!this.isDisable&&this.excludeFilter()},setChartData(i){i=this.sortData(i),this.removeChartData();let n=this.chartData.labels;for(let t=0;t<i.length;t++)n.push(i[t].key),this.chart_dta.push(i[t].count);this.chartData.datasets[0].data=this.chart_dta},highlightChart(){var i=this.chartData.datasets[0].data;this.chartLines=this.chartData.datasets[0],this.chartData.datasets[0].backgroundColor=[];for(let n=0;n<=i.length;n++)i[n]>=this.min&&i[n]<=this.max?this.chartData.datasets[0].backgroundColor.push("#5ea9e5"):this.chartData.datasets[0].backgroundColor.push("#e0e0e0")},updateBarChart(i){const{minValue:n,maxValue:t}=i;this.BarMinValue=n,this.BarMaxValue=t;var r=this.chartData.datasets[0].data;this.min=r[this.BarMinValue]?r[this.BarMinValue]:"1",this.max=r[this.BarMaxValue]?r[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(i){return i.slice().sort(function(n,t){return n.count-t.count})},maxNumber(i){if(i.length!=0)return i.reduce((n,t)=>n=n>t.count?n:t.count,0)},getLastIndex(i){let n=this.chartData.datasets[0].data,t=0;for(let r=i;r>=0;r--)if(n.lastIndexOf(r)!==-1){t=n.lastIndexOf(r);break}else continue;return t},getFirstIndex(i){let n=this.chartData.datasets[0].data,t=0;for(let r=i;r<=this.max;r++)if(n.lastIndexOf(r)!==-1){t=n.lastIndexOf(r);break}else continue;return t}}}),nT={class:"dh-range-container"},iT={class:"bar-chart"},rT={key:0,class:"input-group-section"},oT={class:"input-group sb-input"},aT=["disabled","max","value"],sT={class:"input-group sb-input"},lT=["disabled","max","min","value"];function uT(i,n,t,r,e,o){const a=c.resolveComponent("Bar"),s=c.resolveComponent("MultiRangeSlider"),l=c.resolveComponent("dh-advanced-filter");return c.openBlock(),c.createElementBlock("div",nT,[c.createElementVNode("div",iT,[c.createVNode(a,{"chart-data":i.chartData,"chart-id":i.chartId,"chart-options":i.chartOptions,"dataset-id-key":i.datasetIdKey,height:i.height,width:i.width},null,8,["chart-data","chart-id","chart-options","dataset-id-key","height","width"]),c.createVNode(s,{"base-class-name":`multi-range-slider range-slider ${i.isDisable}`,label:!0,labels:i.labels,max:i.rangeMax,"max-caption":`${i.max}`,"max-value":i.BarMaxValue,min:1,"min-caption":`${i.min}`,"min-value":i.BarMinValue,"range-margin":0,ruler:!1,step:i.steps,onInput:i.updateBarChart},null,8,["base-class-name","labels","max","max-caption","max-value","min-caption","min-value","step","onInput"])]),i.includeForm?(c.openBlock(),c.createElementBlock("div",rT,[c.createElementVNode("div",oT,[c.createElementVNode("label",{class:c.normalizeClass(`dh-body-2 input-to ${i.validated?"disable":""}`)}," From ",2),c.createElementVNode("input",{class:"form-input text",disabled:!!i.validated,max:`${i.max}`,min:"1",placeholder:"From",type:"number",value:`${i.min}`,onInput:n[0]||(n[0]=u=>i.changeMin(u))},null,40,aT)]),c.createElementVNode("div",sT,[c.createElementVNode("label",{class:c.normalizeClass(`dh-body-2 input-to ${i.validated?"disable":""}`)}," To ",2),c.createElementVNode("input",{class:"form-input text",disabled:!!i.validated,max:`${i.maxNumber(i.numberRange)}`,min:`${i.min}`,placeholder:"To",type:"number",value:`${i.max}`,onInput:n[1]||(n[1]=u=>i.changeMax(u))},null,40,lT)])])):c.createCommentVNode("",!0),c.renderSlot(i.$slots,"input"),c.createVNode(l,{onExclude:i.excludeFilter,onFilter_missing:i.missingFilter,onMatch:i.matchFilter},{default:c.withCtx(()=>[c.renderSlot(i.$slots,"filter")]),_:3},8,["onExclude","onFilter_missing","onMatch"])])}var jM=at(tT,[["render",uT]]),Nz="",mz="";const cT={id:"dp-container"},dT=c.createElementVNode("div",{class:"dp__calendar_range"},[c.createElementVNode("p",null,"From"),c.createElementVNode("p",null,"To")],-1),fT={class:"dp__multi"},MT=["value"],gT=["value"],hT=c.createTextVNode(" Back "),yT=["onClick"],pT=["onClick"],NT=["onClick"],mT=["onClick"],IT=["onClick"],jT=["onClick"],DT=["onClick"],xT=["onClick"],bT=c.createElementVNode("div",{id:"tags",class:"dp__calendar_tags"},null,-1),vT={__name:"AdvancedDatePicker",props:{numberRange:{type:Array,required:!0}},emits:["update"],setup(i,{emit:n}){const t=c.ref(["",""]),r=c.ref(null),e=c.ref(null),o=c.ref(null),a=c.ref(!1),s=c.ref([{label:"Today",range:[new Date,new Date],slot:"today"},{label:"Previous week",range:[Ec(Oc(new Date)),Oc(new Date)],slot:"previousWeek"},{label:"This week",range:[Ec(new Date),L0(new Date)],slot:"week"},{label:"Next week",range:[S0(new Date),w0(new Date().setDate(new Date().getDate()+7))],slot:"nextWeek"},{label:"This month",range:[Pi(new Date),Bi(new Date)],slot:"currentMonth"},{label:"Previous month",range:[Pi(jt(new Date,1)),Bi(jt(new Date,1))],slot:"previousMonth"},{label:"Last 3 months",range:[Pi(jt(new Date,3)),Bi(jt(new Date,1))],slot:"threeMonths"},{label:"Last 6 months",range:[Pi(jt(new Date,6)),Bi(jt(new Date,1))],slot:"sixMonths"},{label:"Last year",range:[qM(new Date),KM(new Date)],slot:"yearly"}]),l=M=>{t.value=M,console.log(t.value),n("update",t.value)};function u(M){e.value=M.target.value,t.value=[M.target.value,r.value]}function f(M){r.value=M.target.value,t.value=[e.value,M.target.value]}c.onMounted(()=>{o.value.openMenu()});function d(){o.value.openMenu()}return(M,h)=>(c.openBlock(),c.createElementBlock("div",cT,[dT,c.createVNode(c.unref(po),{ref_key:"datePicker",ref:o,modelValue:t.value,"onUpdate:modelValue":[h[2]||(h[2]=y=>t.value=y),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":s.value,range:"","select-text":"Apply","text-input":"",uid:"advanced",onClosed:d},{"dp-input":c.withCtx(()=>[c.createElementVNode("div",fT,[c.createElementVNode("input",{class:"dp__input dp__multi_input",placeholder:"MM/DD/YYYY",type:"text",value:e.value?e.value:t.value[0],onInput:h[0]||(h[0]=y=>u(y))},null,40,MT),c.createElementVNode("input",{class:"dp__input dp__multi_input",placeholder:"MM/DD/YYYY",type:"text",value:r.value?r.value:t.value[1],onInput:h[1]||(h[1]=y=>f(y))},null,40,gT)])]),"arrow-left":c.withCtx(()=>[c.createVNode(ve,{"icon-name":"previous",size:20})]),"arrow-right":c.withCtx(()=>[c.createVNode(ve,{"icon-name":"next",size:20})]),"calendar-icon":c.withCtx(()=>[hT]),"clear-icon":c.withCtx(()=>[]),"action-preview":c.withCtx(()=>[]),"action-select":c.withCtx(()=>[]),previousWeek:c.withCtx(({label:y,range:p,presetDateRange:N})=>[(c.openBlock(),c.createBlock(c.Teleport,{to:"#tags"},[c.createElementVNode("span",{onClick:g=>N(p)},c.toDisplayString(y),9,yT)]))]),week:c.withCtx(({label:y,range:p,presetDateRange:N})=>[(c.openBlock(),c.createBlock(c.Teleport,{to:"#tags"},[c.createElementVNode("span",{onClick:g=>N(p)},c.toDisplayString(y),9,pT)]))]),nextWeek:c.withCtx(({label:y,range:p,presetDateRange:N})=>[(c.openBlock(),c.createBlock(c.Teleport,{to:"#tags"},[c.createElementVNode("span",{onClick:g=>N(p)},c.toDisplayString(y),9,NT)]))]),currentMonth:c.withCtx(({label:y,range:p,presetDateRange:N})=>[(c.openBlock(),c.createBlock(c.Teleport,{to:"#tags"},[c.createElementVNode("span",{onClick:g=>N(p)},c.toDisplayString(y),9,mT)]))]),previousMonth:c.withCtx(({label:y,range:p,presetDateRange:N})=>[(c.openBlock(),c.createBlock(c.Teleport,{to:"#tags"},[c.createElementVNode("span",{onClick:g=>N(p)},c.toDisplayString(y),9,IT)]))]),threeMonths:c.withCtx(({label:y,range:p,presetDateRange:N})=>[(c.openBlock(),c.createBlock(c.Teleport,{to:"#tags"},[c.createElementVNode("span",{onClick:g=>N(p)},c.toDisplayString(y),9,jT)]))]),sixMonths:c.withCtx(({label:y,range:p,presetDateRange:N})=>[(c.openBlock(),c.createBlock(c.Teleport,{to:"#tags"},[c.createElementVNode("span",{onClick:g=>N(p)},c.toDisplayString(y),9,DT)]))]),yearly:c.withCtx(({label:y,range:p,presetDateRange:N})=>[(c.openBlock(),c.createBlock(c.Teleport,{to:"#tags"},[c.createElementVNode("span",{onClick:g=>N(p)},c.toDisplayString(y),9,xT)]))]),_:1},8,["modelValue","preset-ranges"]),c.createVNode(jM,{class:"dp__calendar_range_number","number-range":i.numberRange,steps:1},{input:c.withCtx(()=>[bT]),filter:c.withCtx(()=>[c.createVNode(yd,{data:a.value,label:"Include time",onChange:h[3]||(h[3]=y=>a.value=y)},null,8,["data"])]),_:1},8,["number-range"])]))}},TT=c.defineComponent({props:{target:{type:String,required:!0},trigger:{type:String,required:!0},placement:{type:String,default:()=>"bottom",required:!1},tooltipText:{type:String,required:!0}},data(){return{show:!1}},methods:{showTooltip(){this.show=!this.show},tooltip(){let i=this.$refs.main,n=this.$refs[this.target];["right","left"].includes(this.placement)&&(n.style.top=-(((n==null?void 0:n.offsetHeight)-(i==null?void 0:i.offsetHeight))/2)+"px")}}}),AT=["placement","target","tooltipText","trigger"],kT=["id"],zT={class:"text"};function LT(i,n,t,r,e,o){return c.openBlock(),c.createElementBlock("div",{id:"main-contain",ref:"main",class:"dh-tooltip-container tooltip",placement:i.placement,target:i.target,tooltipText:i.tooltipText,trigger:i.trigger,onClick:n[0]||(n[0]=a=>i.trigger=="click"?i.showTooltip():null),onMouseover:n[1]||(n[1]=a=>i.tooltip())},[c.renderSlot(i.$slots,"default"),c.createElementVNode("div",{id:i.target,ref:i.target,class:c.normalizeClass(`tooltiptext ${i.show}`)},[c.createElementVNode("span",zT,c.toDisplayString(i.tooltipText),1)],10,kT)],40,AT)}var DM=at(TT,[["render",LT]]),Iz="";const wT={class:"copy__text"},ST=["readonly"],OT={__name:"Copiable",props:{text:{type:String,required:!0},placement:{type:String,default:"bottom"},readonly:{type:Boolean,default:!0}},setup(i){const n=i,t=c.ref(""),r=c.ref("copy text");function e(a){navigator.clipboard.writeText(a),r.value="copied !"}function o(){r.value="copy text"}return c.onMounted(()=>{t.value=n.text}),(a,s)=>(c.openBlock(),c.createElementBlock("span",wT,[c.withDirectives(c.createElementVNode("input",{"onUpdate:modelValue":s[0]||(s[0]=l=>t.value=l),readonly:i.readonly,type:"text",onInput:o},null,40,ST),[[c.vModelText,t.value]]),c.createVNode(DM,{placement:i.placement,target:"tooltiptext","tooltip-text":r.value,trigger:"hover",onClick:s[1]||(s[1]=l=>e(t.value))},{default:c.withCtx(()=>[c.createVNode(ve,{class:"copy__text_icon","icon-name":"copy",size:18})]),_:1},8,["placement","tooltip-text"])]))}};var jz="";const ET=c.createTextVNode(" Back "),CT=c.createElementVNode("div",null,"today",-1),_T={__name:"DatePicker",props:{inline:{type:Boolean,default:!0}},emits:["update"],setup(i,{emit:n}){const t=c.ref(),r=c.ref(null),e=a=>{t.value=a,n("update",t.value)},o=c.ref([{date:Xt(new Date,0),type:"dot",tooltip:[{text:"Dot with tooltip",color:"blue"}]}]);return(a,s)=>(c.openBlock(),c.createElementBlock("div",null,[c.createVNode(c.unref(po),{ref_key:"datePicker",ref:r,modelValue:t.value,"onUpdate:modelValue":[s[0]||(s[0]=l=>t.value=l),e],"day-names":["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],"enable-time-picker":!1,inline:i.inline,markers:o.value,"month-name-format":"short",offset:12,placeholder:"MM/DD/YYYY","select-text":"Apply","text-input":"",uid:"base"},{"arrow-left":c.withCtx(()=>[c.createVNode(ve,{"icon-name":"previous",size:20})]),"arrow-right":c.withCtx(()=>[c.createVNode(ve,{"icon-name":"next",size:20})]),"calendar-icon":c.withCtx(()=>[ET]),"clear-icon":c.withCtx(()=>[]),"action-preview":c.withCtx(()=>[]),"marker-tooltip":c.withCtx(()=>[CT]),_:1},8,["modelValue","inline","markers"])]))}};var Dz="";const QT=["src"],UT={key:3,class:"menu-item-text-wrapper"};var xM=at(c.defineComponent({__name:"DropdownMenuItem",props:{item:{type:Object,required:!0},textEllipsisStyle:{type:String,required:!1,default:"none",validator:i=>["none","ellipsis","fit-content"].includes(i)},iconSize:{type:Number,required:!1,default:24}},setup(i){const n=i;return(t,r)=>(c.openBlock(),c.createElementBlock(c.Fragment,null,[i.item.iconUrl?(c.openBlock(),c.createElementBlock("img",{key:0,alt:"icon image",class:"icon icon-url",src:i.item.iconUrl},null,8,QT)):c.createCommentVNode("",!0),i.item.iconUrl?c.createCommentVNode("",!0):(c.openBlock(),c.createBlock(ve,c.mergeProps({key:1,class:"icon"},{...i.item,size:n.iconSize}),null,16)),i.item.subText?c.createCommentVNode("",!0):(c.openBlock(),c.createElementBlock("span",{key:2,class:c.normalizeClass(["dh-body-2",i.textEllipsisStyle])},c.toDisplayString(i.item.text),3)),i.item.subText?(c.openBlock(),c.createElementBlock("div",UT,[c.createElementVNode("span",{class:c.normalizeClass(["dh-body-1",i.textEllipsisStyle])},c.toDisplayString(i.item.text),3),c.createElementVNode("span",{class:c.normalizeClass(["dh-body-4-medium",i.textEllipsisStyle])},c.toDisplayString(i.item.subText),3)])):c.createCommentVNode("",!0),i.item.isSelected?(c.openBlock(),c.createBlock(ve,{key:4,class:"icon-blue icon-accept","icon-name":"accept",size:16})):c.createCommentVNode("",!0)],64))}}),[["__scopeId","data-v-35071082"]]),bz="";const YT=["data-e2e","onClick"],BT=["onClick"];var PT=at(c.defineComponent({__name:"DropdownMenu",props:{items:{type:Object,required:!0},textEllipsisStyle:{type:String,required:!1,default:"none",validator:i=>["none","ellipsis","fit-content"].includes(i)},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(i,{emit:n}){const t=i;c.onMounted(()=>{document.addEventListener("click",o=>{r(o)})});function r(o){const a=o.target,s=document.querySelector("[data-id='dropdown-menu']");s&&!s.contains(o.target)&&!a.classList.contains("dropdown-toggle")&&t.closeOnClickOutside&&n("close")}function e(o){n("itemSelected",o),t.closeOnItemSelected&&n("close")}return(o,a)=>{const s=c.resolveComponent("router-link");return c.openBlock(),c.createElementBlock("div",{class:"dropdown-menu","data-id":"dropdown-menu",style:c.normalizeStyle({"z-index":t.zIndex})},[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(i.items,l=>(c.openBlock(),c.createElementBlock("div",{key:l.iconName,class:"menu-item","data-e2e":l.dataE2eTag,onClick:u=>e(l)},[l.url?(c.openBlock(),c.createBlock(s,{key:0,class:"center-vertical",to:{path:l.url},onClick:u=>e(l)},{default:c.withCtx(()=>[c.createVNode(xM,{"icon-size":i.iconSize,item:l,"text-ellipsis-style":i.textEllipsisStyle},null,8,["icon-size","item","text-ellipsis-style"])]),_:2},1032,["to","onClick"])):(c.openBlock(),c.createElementBlock("div",{key:1,class:"center-vertical",onClick:u=>e(l)},[c.createVNode(xM,{"icon-size":i.iconSize,item:l,"text-ellipsis-style":i.textEllipsisStyle},null,8,["icon-size","item","text-ellipsis-style"])],8,BT))],8,YT))),128))],4)}}}),[["__scopeId","data-v-0c809d82"]]),Tz="";const RT={key:0,class:"invalid-feedback"},VT=c.defineComponent({__name:"Error",props:{errors:{type:Object,required:!1,default:void 0}},setup(i){const n=i;return(t,r)=>{var e;return c.unref(n).errors&&((e=c.unref(n).errors)==null?void 0:e.length)>0?(c.openBlock(),c.createElementBlock("div",RT,[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(i.errors,o=>(c.openBlock(),c.createElementBlock("span",{key:o},c.toDisplayString(o),1))),128))])):c.createCommentVNode("",!0)}}}),ZT=c.defineComponent({components:{DhIcon:ve},props:{title:{type:String,default:"Advanced"},isAdvancedSettingsOpen:{type:Boolean,default:!1}},data(){return{isAdvancedSettingsCurrentlyOpen:!1}},watch:{isAdvancedSettingsOpen:function(i){this.isAdvancedSettingsCurrentlyOpen=i}},mounted(){this.isAdvancedSettingsCurrentlyOpen=this.isAdvancedSettingsOpen}}),FT={class:"dh-body-1-medium"},HT=c.createTextVNode(" Content ");function GT(i,n,t,r,e,o){const a=c.resolveComponent("dh-icon");return c.openBlock(),c.createElementBlock(c.Fragment,null,[c.createElementVNode("div",{class:c.normalizeClass(["advanced-panel-header clickable",{opened:i.isAdvancedSettingsCurrentlyOpen,closed:!i.isAdvancedSettingsCurrentlyOpen}]),"data-e2e":"expansion-panel-button",onClick:n[0]||(n[0]=s=>i.isAdvancedSettingsCurrentlyOpen=!i.isAdvancedSettingsCurrentlyOpen)},[c.createElementVNode("h4",FT,c.toDisplayString(i.title),1),c.createVNode(a,{class:"icon","icon-name":i.isAdvancedSettingsCurrentlyOpen?"arrow-up":"arrow-down",size:24},null,8,["icon-name"])],2),i.isAdvancedSettingsCurrentlyOpen?c.renderSlot(i.$slots,"content",{key:0},()=>[HT]):c.createCommentVNode("",!0)],64)}var WT=at(ZT,[["render",GT]]),Az="";const $T=c.createElementVNode("label",{for:"upload_pdf"},[c.createTextVNode(" Drag and drop file or "),c.createElementVNode("span",{id:"upload"},"browse")],-1),JT={key:1,class:"file__upload_items"},XT={class:"file__upload_list_item"},KT={class:"file__upload_list_item_label"},qT=["title"],eA={key:0,class:"label__antivirus"},tA={key:1,class:"label__antivirus label__antivirus--failed"},nA={key:2,class:"label__antivirus label__antivirus--detected"},iA=c.createElementVNode("br",null,null,-1),rA={key:3},oA={key:4},aA={key:0},sA=["value"],lA=["href"],uA={key:2,class:"file__upload_placeholder"},cA={key:3,class:"file__upload_action"},dA=c.createElementVNode("button",{class:"file__upload_action_cancel"},"Cancel",-1),fA={__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(i,{emit:n}){const t=i,r=c.ref(null),e=c.ref(!1),o=c.ref([]),a=c.ref([".pdf",".csv",".doc",".jpeg",".mp4",".png",".txt",".xls"]);function s(x,T=2){if(!+x)return"0 Bytes";const j=1024,v=T<0?0:T,w=["Bytes","KB","MB","GB","TB","PB","EB","ZB","YB"],A=Math.floor(Math.log(x)/Math.log(j));return`${parseFloat((x/Math.pow(j,A)).toFixed(v))} ${w[A]}`}function l(x){return a.value.includes(f(x))?f(x).slice(1):"unknown"}function u(x){const T=x.lastIndexOf(".");let j=x.slice(0,T);return j.length<=15?j:j.slice(0,15)+"... "}function f(x){return x.replace(/.*(?=\.)/g,"")}function d(x){x.stopPropagation(),o.value=r.value.files,o.value&&(e.value=!0),n("update:modelValue",o.value)}function M(x){x.stopPropagation(),x.dataTransfer.dropEffect="copy"}function h(x){x.stopPropagation(),e.value=!0,o.value=x.dataTransfer.files,n("update:modelValue",o.value)}function y(x){window.confirm(t.deleteConfirmationText)&&p(x)}function p(x){const T=new DataTransfer;for(let j=0;j<o.value.length;j++){const v=o.value[j];x!==j&&T.items.add(v)}o.value=T.files,o.value.length==0&&(e.value=!1)}function N(){n("save:modelValue",o.value)}function g(x){return URL.createObjectURL(x)}function I(x){x.preventDefault(),n("reload")}return(x,T)=>(c.openBlock(),c.createElementBlock("div",{class:c.normalizeClass(["file__upload",i.inline?"":"file__upload_box"])},[i.fileSaved?c.createCommentVNode("",!0):(c.openBlock(),c.createElementBlock("div",{key:0,class:"file__upload_btn",onDragover:T[1]||(T[1]=c.withModifiers(j=>M(j),["prevent"])),onDrop:T[2]||(T[2]=c.withModifiers(j=>h(j),["prevent"]))},[c.createVNode(ve,{class:"file__upload_btn_icon","icon-name":"upload",size:24}),$T,c.createElementVNode("input",{id:"upload_pdf",ref_key:"upload",ref:r,multiple:"",name:"file",type:"file",onInput:T[0]||(T[0]=j=>d(j))},null,544)],32)),e.value?(c.openBlock(),c.createElementBlock("div",JT,[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(o.value,(j,v)=>(c.openBlock(),c.createElementBlock("div",{key:v,class:c.normalizeClass(["file__upload_list",i.inline?"":"file__upload_list_box"])},[c.createVNode(ve,{class:c.normalizeClass(i.errorOccurred[v]?"file__upload_list_icon":""),"icon-name":"file-"+l(j.name),size:40},null,8,["class","icon-name"]),t.uploadProgress[v]==100&&i.fileSaved&&!i.errorOccurred[v]&&i.virusCheck[v]=="loading"?(c.openBlock(),c.createBlock(ve,{key:0,class:"file__upload_list_icon_sub file__upload_list_icon_sub--loading","icon-name":"states",size:20,style:c.normalizeStyle({"z-index":t.zIndex})},null,8,["style"])):c.createCommentVNode("",!0),t.uploadProgress[v]==100&&i.fileSaved&&i.virusCheck[v]=="failed"?(c.openBlock(),c.createBlock(ve,{key:1,class:"file__upload_list_icon_sub","icon-name":"warning",size:20,style:c.normalizeStyle({"z-index":t.zIndex})},null,8,["style"])):c.createCommentVNode("",!0),t.uploadProgress[v]==100&&i.fileSaved&&i.virusCheck[v]=="detected"?(c.openBlock(),c.createBlock(ve,{key:2,class:"file__upload_list_icon_sub","icon-name":"danger",size:20,style:c.normalizeStyle({"z-index":t.zIndex})},null,8,["style"])):c.createCommentVNode("",!0),i.fileSaved&&i.errorOccurred[v]?(c.openBlock(),c.createBlock(ve,{key:3,class:"file__upload_list_icon_sub","icon-name":"error",size:20,style:c.normalizeStyle({"z-index":t.zIndex})},null,8,["style"])):c.createCommentVNode("",!0),c.createElementVNode("div",XT,[c.createElementVNode("div",KT,[c.createElementVNode("div",null,[c.createElementVNode("span",{title:j.name},c.toDisplayString(u(j.name))+c.toDisplayString(f(j.name)),9,qT),t.uploadProgress[v]==100&&i.fileSaved&&!i.errorOccurred[v]&&i.virusCheck[v]=="loading"?(c.openBlock(),c.createElementBlock("span",eA,[c.createTextVNode(c.toDisplayString(i.virusCheckText)+" ",1),c.createVNode(ve,{class:"file__upload_list_icon_sub--loading","icon-name":"processing",size:18})])):c.createCommentVNode("",!0),t.uploadProgress[v]==100&&i.fileSaved&&i.virusCheck[v]=="failed"?(c.openBlock(),c.createElementBlock("span",tA,c.toDisplayString(i.virusCheckFailedText),1)):c.createCommentVNode("",!0),t.uploadProgress[v]==100&&i.fileSaved&&i.virusCheck[v]=="detected"?(c.openBlock(),c.createElementBlock("span",nA,c.toDisplayString(i.virusDetectedText),1)):c.createCommentVNode("",!0),iA,i.fileSaved&&!i.errorOccurred[v]||!i.errorOccurred[v]&&i.virusCheck[v]?(c.openBlock(),c.createElementBlock("span",rA,c.toDisplayString(s(j.size)),1)):c.createCommentVNode("",!0),i.fileSaved&&i.errorOccurred[v]?(c.openBlock(),c.createElementBlock("span",oA,c.toDisplayString(i.errorMessage),1)):c.createCommentVNode("",!0)]),i.fileSaved?c.createCommentVNode("",!0):(c.openBlock(),c.createElementBlock("span",aA,c.toDisplayString(t.uploadProgress[v])+"%",1))]),i.fileSaved?c.createCommentVNode("",!0):(c.openBlock(),c.createElementBlock("progress",{key:0,id:"file",max:"100",value:t.uploadProgress[v]},c.toDisplayString(t.uploadProgress[v])+"% ",9,sA))]),i.fileSaved&&!i.virusCheck[v]&&!i.errorOccurred[v]?(c.openBlock(),c.createElementBlock("a",{key:4,class:"file__upload_list_download",download:"",href:g(j)},[c.createVNode(ve,{class:"file__upload_list_download_icon","icon-name":"download",size:24})],8,lA)):c.createCommentVNode("",!0),i.fileSaved&&i.errorOccurred[v]?(c.openBlock(),c.createElementBlock("a",{key:5,class:"file__upload_list_retry",onClick:T[3]||(T[3]=w=>I(w))},[c.createVNode(ve,{class:"file__upload_list_retry_icon","icon-name":"retry",size:24})])):c.createCommentVNode("",!0),t.uploadProgress[v]!==100?(c.openBlock(),c.createBlock(ve,{key:6,class:"file__upload_list_delete","icon-name":"close",size:24,onClick:w=>p(v)},null,8,["onClick"])):(c.openBlock(),c.createBlock(ve,{key:7,class:"file__upload_list_delete","icon-name":"delete",size:24,onClick:w=>y(v)},null,8,["onClick"]))],2))),128))])):c.createCommentVNode("",!0),!e.value&&!i.inline?(c.openBlock(),c.createElementBlock("div",uA," No file selected ")):c.createCommentVNode("",!0),!i.inline&&!i.fileSaved?(c.openBlock(),c.createElementBlock("div",cA,[dA,c.createElementVNode("button",{class:c.normalizeClass(["file__upload_action_done",e.value&&!i.fileSaved?"file__upload_action_done--active":""]),onClick:N}," Done ",2)])):c.createCommentVNode("",!0)],2))}};var kz="";const MA={class:"input__dropdown"},gA={class:"input__dropdown_second"},hA=["tabindex"],yA=["onClick"],pA=["onClick"],NA={__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(i,{emit:n}){const t=i,r=c.ref(t.placeholder),e=c.ref(!1),o=c.ref(null);c.onMounted(()=>{n("update","",r.value)});function a(){n("update",o.value.value,r.value)}return(s,l)=>(c.openBlock(),c.createElementBlock("div",MA,[c.createElementVNode("input",{ref_key:"name",ref:o,class:"input__dropdown_text",type:"text",onInput:a},null,544),c.createElementVNode("div",gA,[c.createVNode(ve,{"icon-name":i.icon,size:18},null,8,["icon-name"]),c.createElementVNode("div",{class:"custom__select",tabindex:i.tabindex,onBlur:l[1]||(l[1]=u=>e.value=!1)},[c.createElementVNode("div",{class:c.normalizeClass(["custom__select_selected",{"custom__select--open":e.value}]),onClick:l[0]||(l[0]=u=>e.value=!e.value)},c.toDisplayString(r.value),3),typeof i.list[0]=="object"?(c.openBlock(),c.createElementBlock("div",{key:0,class:c.normalizeClass(["custom__select_items",{"custom__select--hide":!e.value}])},[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(i.list,(u,f)=>(c.openBlock(),c.createElementBlock("div",{key:f,onClick:d=>{r.value=u[i.labelProp],e.value=!1,a()}},c.toDisplayString(u[i.labelProp]),9,yA))),128))],2)):c.createCommentVNode("",!0),typeof i.list[0]=="string"?(c.openBlock(),c.createElementBlock("div",{key:1,class:c.normalizeClass(["custom__select_items",{"custom__select--hide":!e.value}])},[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(i.list,(u,f)=>(c.openBlock(),c.createElementBlock("div",{key:f,onClick:d=>{r.value=u,e.value=!1,a()}},c.toDisplayString(u),9,pA))),128))],2)):c.createCommentVNode("",!0)],40,hA)])]))}};var zz="";const mA={class:"input__group"},IA=["type"],jA={__name:"InputGroup",props:{inputType:{type:String,default:"text"},iconName:{type:String,required:!0},widthProp:{type:String,default:"200px"},direction:{type:String,default:"right"}},setup(i){const n=i;c.useCssVars(r=>({"14ee876f":t.value,"0aeebdb8":i.widthProp}));const t=c.ref("row");return c.onMounted(()=>{n.direction=="left"&&(t.value="row-reverse")}),(r,e)=>(c.openBlock(),c.createElementBlock("div",mA,[c.createElementVNode("input",{class:"input__group_field",type:i.inputType},null,8,IA),c.createVNode(ve,{class:"input__group_icon","icon-name":i.iconName},null,8,["icon-name"])]))}};var DA="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 Ht(i){return[null,void 0].indexOf(i)!==-1}function xA(i,n,t){const{object:r,valueProp:e,mode:o}=c.toRefs(i),a=c.getCurrentInstance().proxy,s=t.iv,l=d=>{s.value=f(d);const M=u(d);n.emit("change",M,a),n.emit("input",M),n.emit("update:modelValue",M)},u=d=>r.value||Ht(d)?d:Array.isArray(d)?d.map(M=>M[e.value]):d[e.value],f=d=>Ht(d)?o.value==="single"?{}:[]:d;return{update:l}}function bA(i,n){const{value:t,modelValue:r,mode:e,valueProp:o}=c.toRefs(i),a=c.ref(e.value!=="single"?[]:{}),s=r&&r.value!==void 0?r:t,l=c.computed(()=>e.value==="single"?a.value[o.value]:a.value.map(f=>f[o.value])),u=c.computed(()=>e.value!=="single"?a.value.map(f=>f[o.value]).join(","):a.value[o.value]);return{iv:a,internalValue:a,ev:s,externalValue:s,textValue:u,plainValue:l}}function vA(i,n,t){const{regex:r}=c.toRefs(i),e=c.getCurrentInstance().proxy,o=t.isOpen,a=t.open,s=c.ref(null),l=c.ref(null),u=()=>{s.value=""},f=h=>{s.value=h.target.value},d=h=>{if(r&&r.value){let y=r.value;typeof y=="string"&&(y=new RegExp(y)),h.key.match(y)||h.preventDefault()}},M=h=>{if(r&&r.value){let p=(h.clipboardData||window.clipboardData).getData("Text"),N=r.value;typeof N=="string"&&(N=new RegExp(N)),p.split("").every(g=>!!g.match(N))||h.preventDefault()}n.emit("paste",h,e)};return c.watch(s,h=>{!o.value&&h&&a(),n.emit("search-change",h,e)}),{search:s,input:l,clearSearch:u,handleSearchInput:f,handleKeypress:d,handlePaste:M}}function TA(i,n,t){const{groupSelect:r,mode:e,groups:o,disabledProp:a}=c.toRefs(i),s=c.ref(null),l=f=>{f===void 0||f!==null&&f[a.value]||o.value&&f&&f.group&&(e.value==="single"||!r.value)||(s.value=f)};return{pointer:s,setPointer:l,clearPointer:()=>{l(null)}}}function ta(i,n=!0){return n?String(i).toLowerCase().trim():String(i).normalize("NFD").replace(/\p{Diacritic}/gu,"").toLowerCase().trim()}function AA(i){return Object.prototype.toString.call(i)==="[object Object]"}function kA(i,n){const t=n.slice().sort();return i.length===n.length&&i.slice().sort().every(function(r,e){return r===t[e]})}function zA(i,n,t){const{options:r,mode:e,trackBy:o,limit:a,hideSelected:s,createTag:l,createOption:u,label:f,appendNewTag:d,appendNewOption:M,multipleLabel:h,object:y,loading:p,delay:N,resolveOnLoad:g,minChars:I,filterResults:x,clearOnSearch:T,clearOnSelect:j,valueProp:v,canDeselect:w,max:A,strict:k,closeOnSelect:L,groups:b,reverse:m,infinite:D,groupOptions:S,groupHideEmpty:z,groupSelect:O,onCreate:C,disabledProp:E,searchStart:B}=c.toRefs(i),U=c.getCurrentInstance().proxy,Q=t.iv,_=t.ev,Y=t.search,V=t.clearSearch,P=t.update,R=t.pointer,F=t.clearPointer,H=t.focus,W=t.deactivate,K=t.close,re=c.ref([]),ne=c.ref([]),se=c.ref(!1),de=c.ref(null),Z=c.ref(D.value&&a.value===-1?10:a.value),q=c.computed(()=>l.value||u.value||!1),Me=c.computed(()=>d.value!==void 0?d.value:M.value!==void 0?M.value:!0),fe=c.computed(()=>{if(b.value){let $=ne.value||[],ae=[];return $.forEach(me=>{mt(me[S.value]).forEach(ee=>{ae.push(Object.assign({},ee,me[E.value]?{[E.value]:!0}:{}))})}),ae}else{let $=mt(ne.value||[]);return re.value.length&&($=$.concat(re.value)),$}}),Ie=c.computed(()=>b.value?De((ne.value||[]).map(($,ae)=>{const me=mt($[S.value]);return{...$,index:ae,group:!0,[S.value]:Qt(me,!1).map(ee=>Object.assign({},ee,$[E.value]?{[E.value]:!0}:{})),__VISIBLE__:Qt(me).map(ee=>Object.assign({},ee,$[E.value]?{[E.value]:!0}:{}))}})):[]),Ce=c.computed(()=>{let $=fe.value;return m.value&&($=$.reverse()),te.value.length&&($=te.value.concat($)),Qt($)}),ze=c.computed(()=>{let $=Ce.value;return Z.value>0&&($=$.slice(0,Z.value)),$}),G=c.computed(()=>{switch(e.value){case"single":return!Ht(Q.value[v.value]);case"multiple":case"tags":return!Ht(Q.value)&&Q.value.length>0}}),X=c.computed(()=>h!==void 0&&h.value!==void 0?h.value(Q.value,U):Q.value&&Q.value.length>1?`${Q.value.length} options selected`:"1 option selected"),ie=c.computed(()=>!fe.value.length&&!se.value&&!te.value.length),le=c.computed(()=>fe.value.length>0&&ze.value.length==0&&(Y.value&&b.value||!b.value)),te=c.computed(()=>q.value===!1||!Y.value?[]:ye(Y.value)!==-1?[]:[{[v.value]:Y.value,[f.value]:Y.value,[oe.value]:Y.value,__CREATE__:!0}]),oe=c.computed(()=>o.value||f.value),je=c.computed(()=>{switch(e.value){case"single":return null;case"multiple":case"tags":return[]}}),Be=c.computed(()=>p.value||se.value),_e=$=>{switch(typeof $!="object"&&($=J($)),e.value){case"single":P($);break;case"multiple":case"tags":P(Q.value.concat($));break}n.emit("select",ft($),$,U)},tt=$=>{switch(typeof $!="object"&&($=J($)),e.value){case"single":on();break;case"tags":case"multiple":P(Array.isArray($)?Q.value.filter(ae=>$.map(me=>me[v.value]).indexOf(ae[v.value])===-1):Q.value.filter(ae=>ae[v.value]!=$[v.value]));break}n.emit("deselect",ft($),$,U)},ft=$=>y.value?$:$[v.value],Dn=$=>{tt($)},Bn=($,ae)=>{if(ae.button!==0){ae.preventDefault();return}Dn($)},on=()=>{n.emit("clear",U),P(je.value)},Nt=$=>{if($.group!==void 0)return e.value==="single"?!1:Qe($[S.value])&&$[S.value].length;switch(e.value){case"single":return!Ht(Q.value)&&Q.value[v.value]==$[v.value];case"tags":case"multiple":return!Ht(Q.value)&&Q.value.map(ae=>ae[v.value]).indexOf($[v.value])!==-1}},ht=$=>$[E.value]===!0,xn=()=>A===void 0||A.value===-1||!G.value&&A.value>0?!1:Q.value.length>=A.value,Gt=$=>{if(!ht($)){if(C&&C.value&&!Nt($)&&$.__CREATE__&&($={...$},delete $.__CREATE__,$=C.value($,U),$ instanceof Promise)){se.value=!0,$.then(ae=>{se.value=!1,ti(ae)});return}ti($)}},ti=$=>{switch($.__CREATE__&&($={...$},delete $.__CREATE__),e.value){case"single":if($&&Nt($)){w.value&&tt($);return}$&&Wt($),j.value&&V(),L.value&&(F(),K()),$&&_e($);break;case"multiple":if($&&Nt($)){tt($);return}if(xn())return;$&&(Wt($),_e($)),j.value&&V(),s.value&&F(),L.value&&K();break;case"tags":if($&&Nt($)){tt($);return}if(xn())return;$&&Wt($),j.value&&V(),$&&_e($),s.value&&F(),L.value&&K();break}L.value||H()},Oi=$=>{if(!(ht($)||e.value==="single"||!O.value)){switch(e.value){case"multiple":case"tags":_t($[S.value])?tt($[S.value]):_e($[S.value].filter(ae=>Q.value.map(me=>me[v.value]).indexOf(ae[v.value])===-1).filter(ae=>!ae[E.value]).filter((ae,me)=>Q.value.length+1+me<=A.value||A.value===-1));break}L.value&&W()}},Wt=$=>{J($[v.value])===void 0&&q.value&&(n.emit("tag",$[v.value],U),n.emit("option",$[v.value],U),Me.value&&Ne($),V())},ni=()=>{e.value!=="single"&&_e(ze.value)},_t=$=>$.find(ae=>!Nt(ae)&&!ae[E.value])===void 0,Qe=$=>$.find(ae=>!Nt(ae))===void 0,J=$=>fe.value[fe.value.map(ae=>String(ae[v.value])).indexOf(String($))],ye=($,ae=!0)=>fe.value.map(me=>parseInt(me[oe.value])==me[oe.value]?parseInt(me[oe.value]):me[oe.value]).indexOf(parseInt($)==$?parseInt($):$),ge=$=>["tags","multiple"].indexOf(e.value)!==-1&&s.value&&Nt($),Ne=$=>{re.value.push($)},De=$=>z.value?$.filter(ae=>Y.value?ae.__VISIBLE__.length:ae[S.value].length):$.filter(ae=>Y.value?ae.__VISIBLE__.length:!0),Qt=($,ae=!0)=>{let me=$;return Y.value&&x.value&&(me=me.filter(ee=>B.value?ta(ee[oe.value],k.value).startsWith(ta(Y.value,k.value)):ta(ee[oe.value],k.value).indexOf(ta(Y.value,k.value))!==-1)),s.value&&ae&&(me=me.filter(ee=>!ge(ee))),me},mt=$=>{let ae=$;return AA(ae)&&(ae=Object.keys(ae).map(me=>{let ee=ae[me];return{[v.value]:me,[oe.value]:ee,[f.value]:ee}})),ae=ae.map(me=>typeof me=="object"?me:{[v.value]:me,[oe.value]:me,[f.value]:me}),ae},$t=()=>{Ht(_.value)||(Q.value=sn(_.value))},Jt=$=>(se.value=!0,new Promise((ae,me)=>{r.value(Y.value,U).then(ee=>{ne.value=ee||[],typeof $=="function"&&$(ee),se.value=!1}).catch(ee=>{console.error(ee),ne.value=[],se.value=!1}).finally(()=>{ae()})})),an=()=>{if(!!G.value)if(e.value==="single"){let $=J(Q.value[v.value]);if($!==void 0){let ae=$[f.value];Q.value[f.value]=ae,y.value&&(_.value[f.value]=ae)}}else Q.value.forEach(($,ae)=>{let me=J(Q.value[ae][v.value]);if(me!==void 0){let ee=me[f.value];Q.value[ae][f.value]=ee,y.value&&(_.value[ae][f.value]=ee)}})},Pn=$=>{Jt($)},sn=$=>Ht($)?e.value==="single"?{}:[]:y.value?$:e.value==="single"?J($)||{}:$.filter(ae=>!!J(ae)).map(ae=>J(ae)),Ei=()=>{de.value=c.watch(Y,$=>{$.length<I.value||!$&&I.value!==0||(se.value=!0,T.value&&(ne.value=[]),setTimeout(()=>{$==Y.value&&r.value(Y.value,U).then(ae=>{($==Y.value||!Y.value)&&(ne.value=ae,R.value=ze.value.filter(me=>me[E.value]!==!0)[0]||null,se.value=!1)}).catch(ae=>{console.error(ae)})},N.value))},{flush:"sync"})};if(e.value!=="single"&&!Ht(_.value)&&!Array.isArray(_.value))throw new Error(`v-model must be an array when using "${e.value}" mode`);return r&&typeof r.value=="function"?g.value?Jt($t):y.value==!0&&$t():(ne.value=r.value,$t()),N.value>-1&&Ei(),c.watch(N,($,ae)=>{de.value&&de.value(),$>=0&&Ei()}),c.watch(_,$=>{if(Ht($)){Q.value=sn($);return}switch(e.value){case"single":(y.value?$[v.value]!=Q.value[v.value]:$!=Q.value[v.value])&&(Q.value=sn($));break;case"multiple":case"tags":kA(y.value?$.map(ae=>ae[v.value]):$,Q.value.map(ae=>ae[v.value]))||(Q.value=sn($));break}},{deep:!0}),c.watch(r,($,ae)=>{typeof i.options=="function"?g.value&&(!ae||$&&$.toString()!==ae.toString())&&Jt():(ne.value=i.options,Object.keys(Q.value).length||$t(),an())}),c.watch(f,an),{pfo:Ce,fo:ze,filteredOptions:ze,hasSelected:G,multipleLabelText:X,eo:fe,extendedOptions:fe,fg:Ie,filteredGroups:Ie,noOptions:ie,noResults:le,resolving:se,busy:Be,offset:Z,select:_e,deselect:tt,remove:Dn,selectAll:ni,clear:on,isSelected:Nt,isDisabled:ht,isMax:xn,getOption:J,handleOptionClick:Gt,handleGroupClick:Oi,handleTagRemove:Bn,refreshOptions:Pn,resolveOptions:Jt,refreshLabels:an}}function LA(i,n,t){const{valueProp:r,showOptions:e,searchable:o,groupLabel:a,groups:s,mode:l,groupSelect:u,disabledProp:f}=c.toRefs(i),d=t.fo,M=t.fg,h=t.handleOptionClick,y=t.handleGroupClick,p=t.search,N=t.pointer,g=t.setPointer,I=t.clearPointer,x=t.multiselect,T=t.isOpen,j=c.computed(()=>d.value.filter(P=>!P[f.value])),v=c.computed(()=>M.value.filter(P=>!P[f.value])),w=c.computed(()=>l.value!=="single"&&u.value),A=c.computed(()=>N.value&&N.value.group),k=c.computed(()=>Y(N.value)),L=c.computed(()=>{const P=A.value?N.value:Y(N.value),R=v.value.map(H=>H[a.value]).indexOf(P[a.value]);let F=v.value[R-1];return F===void 0&&(F=m.value),F}),b=c.computed(()=>{let P=v.value.map(R=>R.label).indexOf(A.value?N.value[a.value]:Y(N.value)[a.value])+1;return v.value.length<=P&&(P=0),v.value[P]}),m=c.computed(()=>[...v.value].slice(-1)[0]),D=c.computed(()=>N.value.__VISIBLE__.filter(P=>!P[f.value])[0]),S=c.computed(()=>{const P=k.value.__VISIBLE__.filter(R=>!R[f.value]);return P[P.map(R=>R[r.value]).indexOf(N.value[r.value])-1]}),z=c.computed(()=>{const P=Y(N.value).__VISIBLE__.filter(R=>!R[f.value]);return P[P.map(R=>R[r.value]).indexOf(N.value[r.value])+1]}),O=c.computed(()=>[...L.value.__VISIBLE__.filter(P=>!P[f.value])].slice(-1)[0]),C=c.computed(()=>[...m.value.__VISIBLE__.filter(P=>!P[f.value])].slice(-1)[0]),E=P=>!!N.value&&(!P.group&&N.value[r.value]==P[r.value]||P.group!==void 0&&N.value[a.value]==P[a.value])?!0:void 0,B=()=>{g(j.value[0]||null)},U=()=>{!N.value||N.value[f.value]===!0||(A.value?y(N.value):h(N.value))},Q=()=>{if(N.value===null)g((s.value&&w.value?v.value[0]:j.value[0])||null);else if(s.value&&w.value){let P=A.value?D.value:z.value;P===void 0&&(P=b.value),g(P||null)}else{let P=j.value.map(R=>R[r.value]).indexOf(N.value[r.value])+1;j.value.length<=P&&(P=0),g(j.value[P]||null)}c.nextTick(()=>{V()})},_=()=>{if(N.value===null){let P=j.value[j.value.length-1];s.value&&w.value&&(P=C.value,P===void 0&&(P=m.value)),g(P||null)}else if(s.value&&w.value){let P=A.value?O.value:S.value;P===void 0&&(P=A.value?L.value:k.value),g(P||null)}else{let P=j.value.map(R=>R[r.value]).indexOf(N.value[r.value])-1;P<0&&(P=j.value.length-1),g(j.value[P]||null)}c.nextTick(()=>{V()})},Y=P=>v.value.find(R=>R.__VISIBLE__.map(F=>F[r.value]).indexOf(P[r.value])!==-1),V=()=>{let P=x.value.querySelector("[data-pointed]");if(!P)return;let R=P.parentElement.parentElement;s.value&&(R=A.value?P.parentElement.parentElement.parentElement:P.parentElement.parentElement.parentElement.parentElement),P.offsetTop+P.offsetHeight>R.clientHeight+R.scrollTop&&(R.scrollTop=P.offsetTop+P.offsetHeight-R.clientHeight),P.offsetTop<R.scrollTop&&(R.scrollTop=P.offsetTop)};return c.watch(p,P=>{o.value&&(P.length&&e.value?B():I())}),c.watch(T,P=>{if(P){let R=x.value.querySelectorAll("[data-selected]")[0];if(!R)return;let F=R.parentElement.parentElement;c.nextTick(()=>{F.scrollTop>0||(F.scrollTop=R.offsetTop)})}}),{pointer:N,canPointGroups:w,isPointed:E,setPointerFirst:B,selectPointer:U,forwardPointer:Q,backwardPointer:_}}function wA(i,n,t){const{disabled:r}=c.toRefs(i),e=c.getCurrentInstance().proxy,o=c.ref(!1);return{isOpen:o,open:()=>{o.value||r.value||(o.value=!0,n.emit("open",e))},close:()=>{!o.value||(o.value=!1,n.emit("close",e))}}}function SA(i,n,t){const{searchable:r,disabled:e}=c.toRefs(i),o=t.input,a=t.open,s=t.close,l=t.clearSearch,u=t.isOpen,f=c.ref(null),d=c.ref(null),M=c.ref(null),h=c.ref(!1),y=c.ref(!1),p=c.computed(()=>r.value||e.value?-1:0),N=()=>{r.value&&o.value.blur(),d.value.blur()},g=()=>{r.value&&!e.value&&o.value.focus()},I=(A=!0)=>{e.value||(h.value=!0,A&&a())},x=()=>{h.value=!1,setTimeout(()=>{h.value||(s(),l())},1)};return{multiselect:f,wrapper:d,tags:M,tabindex:p,isActive:h,mouseClicked:y,blur:N,focus:g,activate:I,deactivate:x,handleFocusIn:A=>{A.target.closest("[data-tags]")||A.target.closest("[data-clear]")||I(y.value)},handleFocusOut:()=>{x()},handleCaretClick:()=>{x(),N()},handleMousedown:A=>{y.value=!0,u.value&&(A.target.isEqualNode(d.value)||A.target.isEqualNode(M.value))?setTimeout(()=>{x()},0):document.activeElement.isEqualNode(d.value)&&!u.value&&(console.log(A.target.closest("[data-tags]")),I()),setTimeout(()=>{y.value=!1},0)}}}function OA(i,n,t){const{mode:r,addTagOn:e,openDirection:o,searchable:a,showOptions:s,valueProp:l,groups:u,addOptionOn:f,createTag:d,createOption:M,reverse:h}=c.toRefs(i),y=c.getCurrentInstance().proxy,p=t.iv,N=t.update,g=t.search,I=t.setPointer,x=t.selectPointer,T=t.backwardPointer,j=t.forwardPointer,v=t.multiselect,w=t.wrapper,A=t.tags,k=t.isOpen,L=t.open,b=t.blur,m=t.fo,D=c.computed(()=>d.value||M.value||!1),S=c.computed(()=>e.value!==void 0?e.value:f.value!==void 0?f.value:["enter"]),z=()=>{r.value==="tags"&&!s.value&&D.value&&a.value&&!u.value&&I(m.value[m.value.map(E=>E[l.value]).indexOf(g.value)])};return{handleKeydown:E=>{n.emit("keydown",E,y);let B,U;switch(["ArrowLeft","ArrowRight","Enter"].indexOf(E.key)!==-1&&r.value==="tags"&&(B=[...v.value.querySelectorAll("[data-tags] > *")].filter(Q=>Q!==A.value),U=B.findIndex(Q=>Q===document.activeElement)),E.key){case"Backspace":if(r.value==="single"||a.value&&[null,""].indexOf(g.value)===-1||p.value.length===0)return;N([...p.value].slice(0,-1));break;case"Enter":if(E.preventDefault(),E.keyCode===229)return;if(U!==-1&&U!==void 0){N([...p.value].filter((Q,_)=>_!==U)),U===B.length-1&&(B.length-1?B[B.length-2].focus():a.value?A.value.querySelector("input").focus():w.value.focus());return}if(S.value.indexOf("enter")===-1&&D.value)return;z(),x();break;case" ":if(!D.value&&!a.value){E.preventDefault(),z(),x();return}if(!D.value)return!1;if(S.value.indexOf("space")===-1&&D.value)return;E.preventDefault(),z(),x();break;case"Tab":case";":case",":if(S.value.indexOf(E.key.toLowerCase())===-1||!D.value)return;z(),x(),E.preventDefault();break;case"Escape":b();break;case"ArrowUp":if(E.preventDefault(),!s.value)return;k.value||L(),T();break;case"ArrowDown":if(E.preventDefault(),!s.value)return;k.value||L(),j();break;case"ArrowLeft":if(a.value&&A.value&&A.value.querySelector("input").selectionStart||E.shiftKey||r.value!=="tags"||!p.value||!p.value.length)return;E.preventDefault(),U===-1?B[B.length-1].focus():U>0&&B[U-1].focus();break;case"ArrowRight":if(U===-1||E.shiftKey||r.value!=="tags"||!p.value||!p.value.length)return;E.preventDefault(),B.length>U+1?B[U+1].focus():a.value?A.value.querySelector("input").focus():a.value||w.value.focus();break}},handleKeyup:E=>{n.emit("keyup",E,y)},preparePointer:z}}function EA(i,n,t){const{classes:r,disabled:e,openDirection:o,showOptions:a}=c.toRefs(i),s=t.isOpen,l=t.isPointed,u=t.isSelected,f=t.isDisabled,d=t.isActive,M=t.canPointGroups,h=t.resolving,y=t.fo,p=c.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",...r.value})),N=c.computed(()=>!!(s.value&&a.value&&(!h.value||h.value&&y.value.length)));return{classList:c.computed(()=>{const I=p.value;return{container:[I.container].concat(e.value?I.containerDisabled:[]).concat(N.value&&o.value==="top"?I.containerOpenTop:[]).concat(N.value&&o.value!=="top"?I.containerOpen:[]).concat(d.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(e.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(s.value?I.caretOpen:[]),clear:I.clear,clearIcon:I.clearIcon,spinner:I.spinner,inifinite:I.inifinite,inifiniteSpinner:I.inifiniteSpinner,dropdown:[I.dropdown].concat(o.value==="top"?I.dropdownTop:[]).concat(!s.value||!a.value||!N.value?I.dropdownHidden:[]),options:[I.options].concat(o.value==="top"?I.optionsTop:[]),group:I.group,groupLabel:x=>{let T=[I.groupLabel];return l(x)?T.push(u(x)?I.groupLabelSelectedPointed:I.groupLabelPointed):u(x)&&M.value?T.push(f(x)?I.groupLabelSelectedDisabled:I.groupLabelSelected):f(x)&&T.push(I.groupLabelDisabled),M.value&&T.push(I.groupLabelPointable),T},groupOptions:I.groupOptions,option:(x,T)=>{let j=[I.option];return l(x)?j.push(u(x)?I.optionSelectedPointed:I.optionPointed):u(x)?j.push(f(x)?I.optionSelectedDisabled:I.optionSelected):(f(x)||T&&f(T))&&j.push(I.optionDisabled),j},noOptions:I.noOptions,noResults:I.noResults,assist:I.assist,fakeInput:I.fakeInput}}),showDropdown:N}}function CA(i,n,t){const{limit:r,infinite:e}=c.toRefs(i),o=t.isOpen,a=t.offset,s=t.search,l=t.pfo,u=t.eo,f=c.ref(null),d=c.ref(null),M=c.computed(()=>a.value<l.value.length),h=p=>{const{isIntersecting:N,target:g}=p[0];if(N){const I=g.offsetParent,x=I.scrollTop;a.value+=r.value==-1?10:r.value,c.nextTick(()=>{I.scrollTop=x})}},y=()=>{o.value&&a.value<l.value.length?f.value.observe(d.value):!o.value&&f.value&&f.value.disconnect()};return c.watch(o,()=>{!e.value||y()}),c.watch(s,()=>{!e.value||(a.value=r.value,y())},{flush:"post"}),c.watch(u,()=>{!e.value||y()},{immediate:!1,flush:"post"}),c.onMounted(()=>{window&&window.IntersectionObserver&&(f.value=new IntersectionObserver(h))}),{hasMore:M,infiniteLoader:d}}function _A(i,n,t){const{placeholder:r,id:e,valueProp:o,label:a,mode:s,groupLabel:l,aria:u,searchable:f}=c.toRefs(i),d=t.pointer,M=t.iv,h=t.hasSelected,y=t.multipleLabelText,p=c.ref(null),N=c.computed(()=>{let m=[];return e&&e.value&&m.push(e.value),m.push("assist"),m.join("-")}),g=c.computed(()=>{let m=[];return e&&e.value&&m.push(e.value),m.push("multiselect-options"),m.join("-")}),I=c.computed(()=>{let m=[];if(e&&e.value&&m.push(e.value),d.value)return m.push(d.value.group?"multiselect-group":"multiselect-option"),m.push(d.value.group?d.value.index:d.value[o.value]),m.join("-")}),x=c.computed(()=>r.value),T=c.computed(()=>s.value!=="single"),j=c.computed(()=>{let m="";return s.value==="single"&&h.value&&(m+=M.value[a.value]),s.value==="multiple"&&h.value&&(m+=y.value),s.value==="tags"&&h.value&&(m+=M.value.map(D=>D[a.value]).join(", ")),m}),v=c.computed(()=>{let m={...u.value};return f.value&&(m["aria-labelledby"]=m["aria-labelledby"]?`${N.value} ${m["aria-labelledby"]}`:N.value,j.value&&m["aria-label"]&&(m["aria-label"]=`${j.value}, ${m["aria-label"]}`)),m}),w=m=>{let D=[];return e&&e.value&&D.push(e.value),D.push("multiselect-option"),D.push(m[o.value]),D.join("-")},A=m=>{let D=[];return e&&e.value&&D.push(e.value),D.push("multiselect-group"),D.push(m.index),D.join("-")},k=m=>{let D=[];return D.push(m[a.value]),D.join(" ")},L=m=>{let D=[];return D.push(m[l.value]),D.join(" ")},b=m=>`${m} \u274E`;return c.onMounted(()=>{if(e&&e.value&&document&&document.querySelector){let m=document.querySelector(`[for="${e.value}"]`);p.value=m?m.innerText:null}}),{arias:v,ariaLabel:j,ariaAssist:N,ariaControls:g,ariaPlaceholder:x,ariaMultiselectable:T,ariaActiveDescendant:I,ariaOptionId:w,ariaOptionLabel:k,ariaGroupId:A,ariaGroupLabel:L,ariaTagLabel:b}}function QA(i,n,t,r={}){return t.forEach(e=>{e&&(r={...r,...e(i,n,r)})}),r}var Vl={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(i,n){return QA(i,n,[bA,TA,wA,vA,xA,SA,zA,CA,LA,OA,EA,_A])}};const UA=["id","dir"],YA=["tabindex","aria-controls","aria-placeholder","aria-expanded","aria-activedescendant","aria-multiselectable","role"],BA=["type","modelValue","value","autocomplete","id","aria-controls","aria-placeholder","aria-expanded","aria-activedescendant","aria-multiselectable"],PA=["onKeyup","aria-label"],RA=["onClick"],VA=["type","modelValue","value","id","autocomplete","aria-controls","aria-placeholder","aria-expanded","aria-activedescendant","aria-multiselectable"],ZA=["innerHTML"],FA=["id"],HA=["id","aria-label","aria-selected"],GA=["data-pointed","onMouseenter","onClick"],WA=["innerHTML"],$A=["aria-label"],JA=["data-pointed","data-selected","onMouseenter","onClick","id","aria-selected","aria-label"],XA=["data-pointed","data-selected","onMouseenter","onClick","id","aria-selected","aria-label"],KA=["innerHTML"],qA=["innerHTML"],ek=["value"],tk=["name","value"],nk=["name","value"],ik=["id"];function rk(i,n,t,r,e,o){return c.openBlock(),c.createElementBlock("div",{ref:"multiselect",class:c.normalizeClass(i.classList.container),id:t.searchable?void 0:t.id,dir:t.rtl?"rtl":void 0,onFocusin:n[10]||(n[10]=(...a)=>i.handleFocusIn&&i.handleFocusIn(...a)),onFocusout:n[11]||(n[11]=(...a)=>i.handleFocusOut&&i.handleFocusOut(...a)),onKeyup:n[12]||(n[12]=(...a)=>i.handleKeyup&&i.handleKeyup(...a)),onKeydown:n[13]||(n[13]=(...a)=>i.handleKeydown&&i.handleKeydown(...a))},[c.createElementVNode("div",c.mergeProps({class:i.classList.wrapper,onMousedown:n[9]||(n[9]=(...a)=>i.handleMousedown&&i.handleMousedown(...a)),ref:"wrapper",tabindex:i.tabindex,"aria-controls":t.searchable?void 0:i.ariaControls,"aria-placeholder":t.searchable?void 0:i.ariaPlaceholder,"aria-expanded":t.searchable?void 0:i.isOpen,"aria-activedescendant":t.searchable?void 0:i.ariaActiveDescendant,"aria-multiselectable":t.searchable?void 0:i.ariaMultiselectable,role:t.searchable?void 0:"combobox"},t.searchable?{}:i.arias),[c.createCommentVNode(" Search "),t.mode!=="tags"&&t.searchable&&!t.disabled?(c.openBlock(),c.createElementBlock("input",c.mergeProps({key:0,type:t.inputType,modelValue:i.search,value:i.search,class:i.classList.search,autocomplete:t.autocomplete,id:t.searchable?t.id:void 0,onInput:n[0]||(n[0]=(...a)=>i.handleSearchInput&&i.handleSearchInput(...a)),onKeypress:n[1]||(n[1]=(...a)=>i.handleKeypress&&i.handleKeypress(...a)),onPaste:n[2]||(n[2]=c.withModifiers((...a)=>i.handlePaste&&i.handlePaste(...a),["stop"])),ref:"input","aria-controls":i.ariaControls,"aria-placeholder":i.ariaPlaceholder,"aria-expanded":i.isOpen,"aria-activedescendant":i.ariaActiveDescendant,"aria-multiselectable":i.ariaMultiselectable,role:"combobox"},{...t.attrs,...i.arias}),null,16,BA)):c.createCommentVNode("v-if",!0),c.createCommentVNode(" Tags (with search) "),t.mode=="tags"?(c.openBlock(),c.createElementBlock("div",{key:1,class:c.normalizeClass(i.classList.tags),"data-tags":""},[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(i.iv,(a,s,l)=>c.renderSlot(i.$slots,"tag",{option:a,handleTagRemove:i.handleTagRemove,disabled:t.disabled},()=>[(c.openBlock(),c.createElementBlock("span",{class:c.normalizeClass(i.classList.tag),tabindex:"-1",onKeyup:c.withKeys(u=>i.handleTagRemove(a,u),["enter"]),key:l,"aria-label":i.ariaTagLabel(a[t.label])},[c.createTextVNode(c.toDisplayString(a[t.label])+" ",1),t.disabled?c.createCommentVNode("v-if",!0):(c.openBlock(),c.createElementBlock("span",{key:0,class:c.normalizeClass(i.classList.tagRemove),onClick:u=>i.handleTagRemove(a,u)},[c.createElementVNode("span",{class:c.normalizeClass(i.classList.tagRemoveIcon)},null,2)],10,RA))],42,PA))])),256)),c.createElementVNode("div",{class:c.normalizeClass(i.classList.tagsSearchWrapper),ref:"tags"},[c.createCommentVNode(" Used for measuring search width "),c.createElementVNode("span",{class:c.normalizeClass(i.classList.tagsSearchCopy)},c.toDisplayString(i.search),3),c.createCommentVNode(" Actual search input "),t.searchable&&!t.disabled?(c.openBlock(),c.createElementBlock("input",c.mergeProps({key:0,type:t.inputType,modelValue:i.search,value:i.search,class:i.classList.tagsSearch,id:t.searchable?t.id:void 0,autocomplete:t.autocomplete,onInput:n[3]||(n[3]=(...a)=>i.handleSearchInput&&i.handleSearchInput(...a)),onKeypress:n[4]||(n[4]=(...a)=>i.handleKeypress&&i.handleKeypress(...a)),onPaste:n[5]||(n[5]=c.withModifiers((...a)=>i.handlePaste&&i.handlePaste(...a),["stop"])),ref:"input","aria-controls":i.ariaControls,"aria-placeholder":i.ariaPlaceholder,"aria-expanded":i.isOpen,"aria-activedescendant":i.ariaActiveDescendant,"aria-multiselectable":i.ariaMultiselectable,role:"combobox"},{...t.attrs,...i.arias}),null,16,VA)):c.createCommentVNode("v-if",!0)],2)],2)):c.createCommentVNode("v-if",!0),c.createCommentVNode(" Single label "),t.mode=="single"&&i.hasSelected&&!i.search&&i.iv?c.renderSlot(i.$slots,"singlelabel",{key:2,value:i.iv},()=>[c.createElementVNode("div",{class:c.normalizeClass(i.classList.singleLabel)},[c.createElementVNode("span",{class:c.normalizeClass(i.classList.singleLabelText)},c.toDisplayString(i.iv[t.label]),3)],2)]):c.createCommentVNode("v-if",!0),c.createCommentVNode(" Multiple label "),t.mode=="multiple"&&i.hasSelected&&!i.search?c.renderSlot(i.$slots,"multiplelabel",{key:3,values:i.iv},()=>[c.createElementVNode("div",{class:c.normalizeClass(i.classList.multipleLabel),innerHTML:i.multipleLabelText},null,10,ZA)]):c.createCommentVNode("v-if",!0),c.createCommentVNode(" Placeholder "),t.placeholder&&!i.hasSelected&&!i.search?c.renderSlot(i.$slots,"placeholder",{key:4},()=>[c.createElementVNode("div",{class:c.normalizeClass(i.classList.placeholder),"aria-hidden":"true"},c.toDisplayString(t.placeholder),3)]):c.createCommentVNode("v-if",!0),c.createCommentVNode(" Spinner "),t.loading||i.resolving?c.renderSlot(i.$slots,"spinner",{key:5},()=>[c.createElementVNode("span",{class:c.normalizeClass(i.classList.spinner),"aria-hidden":"true"},null,2)]):c.createCommentVNode("v-if",!0),c.createCommentVNode(" Clear "),i.hasSelected&&!t.disabled&&t.canClear&&!i.busy?c.renderSlot(i.$slots,"clear",{key:6,clear:i.clear},()=>[c.createElementVNode("span",{"aria-hidden":"true",tabindex:"0",role:"button","data-clear":"","aria-roledescription":"\u274E",class:c.normalizeClass(i.classList.clear),onClick:n[6]||(n[6]=(...a)=>i.clear&&i.clear(...a)),onKeyup:n[7]||(n[7]=c.withKeys((...a)=>i.clear&&i.clear(...a),["enter"]))},[c.createElementVNode("span",{class:c.normalizeClass(i.classList.clearIcon)},null,2)],34)]):c.createCommentVNode("v-if",!0),c.createCommentVNode(" Caret "),t.caret&&t.showOptions?c.renderSlot(i.$slots,"caret",{key:7},()=>[c.createElementVNode("span",{class:c.normalizeClass(i.classList.caret),onClick:n[8]||(n[8]=(...a)=>i.handleCaretClick&&i.handleCaretClick(...a)),"aria-hidden":"true"},null,2)]):c.createCommentVNode("v-if",!0)],16,YA),c.createCommentVNode(" Options "),c.createElementVNode("div",{class:c.normalizeClass(i.classList.dropdown),tabindex:"-1"},[c.renderSlot(i.$slots,"beforelist",{options:i.fo}),c.createElementVNode("ul",{class:c.normalizeClass(i.classList.options),id:i.ariaControls,role:"listbox"},[t.groups?(c.openBlock(!0),c.createElementBlock(c.Fragment,{key:0},c.renderList(i.fg,(a,s,l)=>(c.openBlock(),c.createElementBlock("li",{class:c.normalizeClass(i.classList.group),key:l,id:i.ariaGroupId(a),"aria-label":i.ariaGroupLabel(a),"aria-selected":i.isSelected(a),role:"option"},[c.createElementVNode("div",{class:c.normalizeClass(i.classList.groupLabel(a)),"data-pointed":i.isPointed(a),onMouseenter:u=>i.setPointer(a,s),onClick:u=>i.handleGroupClick(a)},[c.renderSlot(i.$slots,"grouplabel",{group:a,isSelected:i.isSelected,isPointed:i.isPointed},()=>[c.createElementVNode("span",{innerHTML:a[t.groupLabel]},null,8,WA)])],42,GA),c.createElementVNode("ul",{class:c.normalizeClass(i.classList.groupOptions),"aria-label":i.ariaGroupLabel(a),role:"group"},[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(a.__VISIBLE__,(u,f,d)=>(c.openBlock(),c.createElementBlock("li",{class:c.normalizeClass(i.classList.option(u,a)),"data-pointed":i.isPointed(u),"data-selected":i.isSelected(u)||void 0,key:d,onMouseenter:M=>i.setPointer(u),onClick:M=>i.handleOptionClick(u),id:i.ariaOptionId(u),"aria-selected":i.isSelected(u),"aria-label":i.ariaOptionLabel(u),role:"option"},[c.renderSlot(i.$slots,"option",{option:u,isSelected:i.isSelected,isPointed:i.isPointed,search:i.search},()=>[c.createElementVNode("span",null,c.toDisplayString(u[t.label]),1)])],42,JA))),128))],10,$A)],10,HA))),128)):(c.openBlock(!0),c.createElementBlock(c.Fragment,{key:1},c.renderList(i.fo,(a,s,l)=>(c.openBlock(),c.createElementBlock("li",{class:c.normalizeClass(i.classList.option(a)),"data-pointed":i.isPointed(a),"data-selected":i.isSelected(a)||void 0,key:l,onMouseenter:u=>i.setPointer(a),onClick:u=>i.handleOptionClick(a),id:i.ariaOptionId(a),"aria-selected":i.isSelected(a),"aria-label":i.ariaOptionLabel(a),role:"option"},[c.renderSlot(i.$slots,"option",{option:a,isSelected:i.isSelected,isPointed:i.isPointed,search:i.search},()=>[c.createElementVNode("span",null,c.toDisplayString(a[t.label]),1)])],42,XA))),128))],10,FA),i.noOptions?c.renderSlot(i.$slots,"nooptions",{key:0},()=>[c.createElementVNode("div",{class:c.normalizeClass(i.classList.noOptions),innerHTML:t.noOptionsText},null,10,KA)]):c.createCommentVNode("v-if",!0),i.noResults?c.renderSlot(i.$slots,"noresults",{key:1},()=>[c.createElementVNode("div",{class:c.normalizeClass(i.classList.noResults),innerHTML:t.noResultsText},null,10,qA)]):c.createCommentVNode("v-if",!0),t.infinite&&i.hasMore?(c.openBlock(),c.createElementBlock("div",{key:2,class:c.normalizeClass(i.classList.inifinite),ref:"infiniteLoader"},[c.renderSlot(i.$slots,"infinite",{},()=>[c.createElementVNode("span",{class:c.normalizeClass(i.classList.inifiniteSpinner)},null,2)])],2)):c.createCommentVNode("v-if",!0),c.renderSlot(i.$slots,"afterlist",{options:i.fo})],2),c.createCommentVNode(" Hacky input element to show HTML5 required warning "),t.required?(c.openBlock(),c.createElementBlock("input",{key:0,class:c.normalizeClass(i.classList.fakeInput),tabindex:"-1",value:i.textValue,required:""},null,10,ek)):c.createCommentVNode("v-if",!0),c.createCommentVNode(" Native input support "),t.nativeSupport?(c.openBlock(),c.createElementBlock(c.Fragment,{key:1},[t.mode=="single"?(c.openBlock(),c.createElementBlock("input",{key:0,type:"hidden",name:t.name,value:i.plainValue!==void 0?i.plainValue:""},null,8,tk)):(c.openBlock(!0),c.createElementBlock(c.Fragment,{key:1},c.renderList(i.plainValue,(a,s)=>(c.openBlock(),c.createElementBlock("input",{type:"hidden",name:`${t.name}[]`,value:a,key:s},null,8,nk))),128))],64)):c.createCommentVNode("v-if",!0),c.createCommentVNode(" Screen reader assistive text "),t.searchable&&i.hasSelected?(c.openBlock(),c.createElementBlock("div",{key:2,class:c.normalizeClass(i.classList.assist),id:i.ariaAssist,"aria-hidden":"true"},c.toDisplayString(i.ariaLabel),11,ik)):c.createCommentVNode("v-if",!0),c.createCommentVNode(" Create height for empty input "),c.createElementVNode("div",{class:c.normalizeClass(i.classList.spacer)},null,2)],42,UA)}Vl.render=rk,Vl.__file="src/Multiselect.vue";var Lz="",wz="";const ok=c.createElementVNode("img",{alt:"",class:"list__item_thumb",src:DA},null,-1),ak={class:"list__item_text"},sk=c.createElementVNode("div",{id:"list"},null,-1),lk={__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(i,{emit:n}){c.useCssVars(e=>({"341349d2":i.maxHeight}));const t=c.ref(null);function r(){n("update",t.value)}return(e,o)=>(c.openBlock(),c.createElementBlock(c.Fragment,null,[c.createVNode(c.unref(Vl),{modelValue:t.value,"onUpdate:modelValue":o[0]||(o[0]=a=>t.value=a),label:i.labelProp,mode:"tags",native:!1,object:!0,options:i.list,placeholder:"Start typing a name",searchable:!0,"value-prop":i.idProp,onSelect:r},{tag:c.withCtx(({option:a,handleTagRemove:s,disabled:l})=>[(c.openBlock(),c.createBlock(c.Teleport,{to:"#list"},[c.createElementVNode("div",{class:c.normalizeClass(["list__item",{"is-disabled":l}])},[ok,c.createElementVNode("p",ak,c.toDisplayString(a[i.labelProp]),1),c.createVNode(ve,{class:"list__item_icon","icon-name":"delete",size:24,onClick:u=>s(a,u)},null,8,["onClick"]),c.renderSlot(e.$slots,"default")],2)]))]),_:3},8,["modelValue","label","options","value-prop"]),sk],64))}},uk=c.defineComponent({components:{DhIcon:ve},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)}}}),ck={key:1,id:"modal-sidebar",class:"modal-sidebar"},dk={key:0,id:"modalTitle",class:"modal-header"},fk={class:"modal-footer"};function Mk(i,n,t,r,e,o){const a=c.resolveComponent("dh-icon");return c.openBlock(),c.createBlock(c.Transition,{name:"modal-fade"},{default:c.withCtx(()=>[c.createElementVNode("div",{class:"modal-backdrop",onClick:n[2]||(n[2]=(...s)=>i.closed&&i.closed(...s))},[c.createElementVNode("div",{"aria-describedby":"modalDescription","aria-labelledby":"modalTitle",class:c.normalizeClass(`modal ${i.hasSideBar?i.sideBarPosition:""}`),role:"dialog",onClick:n[1]||(n[1]=c.withModifiers(()=>{},["stop"]))},[i.hasCloseButton?(c.openBlock(),c.createElementBlock("button",{key:0,"aria-label":"Close modal",class:"btn-close",type:"button",onClick:n[0]||(n[0]=(...s)=>i.closed&&i.closed(...s))},[c.createVNode(a,{class:"icon","icon-name":"close",size:24})])):c.createCommentVNode("",!0),i.hasSideBar?(c.openBlock(),c.createElementBlock("aside",ck,[c.renderSlot(i.$slots,"sidebar"),i.hasSideBarButtonBottom?c.renderSlot(i.$slots,"sidebar-button-bottom",{key:0}):c.createCommentVNode("",!0)])):c.createCommentVNode("",!0),c.createElementVNode("section",{class:c.normalizeClass(`right-section ${i.hasSideBar?"":"full"}`)},[i.hasHeader?(c.openBlock(),c.createElementBlock("header",dk,[c.renderSlot(i.$slots,"header")])):c.createCommentVNode("",!0),c.createElementVNode("section",{id:"modalDescription",class:c.normalizeClass(["modal-body",i.bodyClass])},[c.renderSlot(i.$slots,"body")],2),c.createElementVNode("footer",fk,[i.hasFooter?c.renderSlot(i.$slots,"footer",{key:0}):c.createCommentVNode("",!0),i.hasFooterButtonRight?c.renderSlot(i.$slots,"footer-button-right",{key:1}):c.createCommentVNode("",!0)])],2)],2)])]),_:3})}var gk=at(uk,[["render",Mk]]);const hk=c.defineComponent({components:{DhIcon:ve},props:{notificationType:{type:String,required:!0,default:"toast",validator:i=>["toast","bottom-message","actionable","modal"].includes(i)},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(i=!1){this.$emit("action",i)},limitTitle(i,n){return["toast","actionable"].includes(n)&&i.length>=60?`${i.substring(0,60)}..`:["bottom-message"].includes(n)&&i.length>=40?`${i.substring(0,40)}..`:["modal"].includes(n)&&i.length>=80?`${i.substring(0,80)}..`:i}}}),yk=[c.createElementVNode("img",{alt:"icon",class:"close-icon",src:hd},null,-1)],pk={class:"additional-text"},Nk={key:0,class:"descriptions"};function mk(i,n,t,r,e,o){const a=c.resolveComponent("dh-icon");return c.openBlock(),c.createElementBlock("div",{class:c.normalizeClass(`dh-notification-container ${i.notificationType}`),style:c.normalizeStyle({"z-index":i.zIndex})},[i.show?(c.openBlock(),c.createElementBlock("div",{key:0,class:c.normalizeClass(["bottom-message"].includes(i.notificationType)?`notification-up status status-${i.notificationType}`:`notification-enter status status-${i.notificationType}`)},[["modal","bottom-message"].includes(i.notificationType)?c.createCommentVNode("",!0):(c.openBlock(),c.createElementBlock("button",{key:0,class:"close-notification",onClick:n[0]||(n[0]=s=>i.close(!1))},yk)),c.createElementVNode("div",{class:c.normalizeClass(`content content- ${i.notificationType}`)},[c.createElementVNode("div",{class:c.normalizeClass(`ellipse ellipse-${i.notificationType} ellipse-${i.icon}`)},[c.createVNode(a,{class:c.normalizeClass(`icon-${i.icon}`),"icon-name":i.icon,size:33},null,8,["class","icon-name"])],2),c.createElementVNode("div",pk,[c.createElementVNode("div",{class:c.normalizeClass(`body-section-title title-${i.notificationType}`)},c.toDisplayString(i.limitTitle(i.title,i.notificationType)),3),["bottom-message"].includes(i.notificationType)?c.createCommentVNode("",!0):(c.openBlock(),c.createElementBlock("div",Nk,c.toDisplayString(i.message.length>=280?`${i.message.substring(0,280)}..`:i.message),1))]),["toast","bottom-message"].includes(i.notificationType)?c.createCommentVNode("",!0):(c.openBlock(),c.createElementBlock("div",{key:0,class:c.normalizeClass(`buttons ${i.notificationType}`)},[c.createElementVNode("button",{class:c.normalizeClass(["btn btn-normal",i.icon=="delete"?"btn-danger":"btn-primary"]),onClick:n[1]||(n[1]=s=>i.close(!0))},c.toDisplayString(i.notificationButton),3),c.createElementVNode("button",{class:"btn btn-normal btn-secondary dismiss",onClick:n[2]||(n[2]=s=>i.close())},c.toDisplayString(i.buttonDismiss),1)],2))],2)],2)):c.createCommentVNode("",!0)],6)}var Ik=at(hk,[["render",mk]]),Oz="";const jk={class:"password__panel"},Dk=["placeholder","type"],xk={class:"icon is-right"},bk={key:0,class:"password__tooltip"};var vk=at(c.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(i,{emit:n}){const t=i,r=c.ref(""),e=c.ref(!1),o=c.ref(!1),a=c.ref(!1),s=c.ref(!1),l=c.ref(!1),u=c.ref(!1);function f(){n("submit",r.value),n("update:modelValue",r.value)}function d(){e.value=!0,u.value=!0}function M(){e.value=!1,u.value=!1}function h(){l.value=!l.value}return c.onMounted(()=>()=>r.value=t.modelValue||""),c.watch(t,()=>(r.value=t.modelValue||"",o.value=r.value.length>11,a.value=/\d/.test(r.value),s.value=/[!@#$%^&*)(+=._-]/.test(r.value))),(y,p)=>(c.openBlock(),c.createElementBlock("div",jk,[c.withDirectives(c.createElementVNode("input",{"onUpdate:modelValue":p[0]||(p[0]=N=>r.value=N),class:"form__input password__panel_input","data-e2e":"password-input",placeholder:t.placeholder,type:l.value?"text":"password",onFocus:d,onFocusout:M,onKeyup:f},null,40,Dk),[[c.vModelDynamic,r.value]]),c.createElementVNode("button",{class:"password__panel_button",type:"button",onClick:h},[c.createElementVNode("span",xk,[c.createVNode(ve,{active:u.value,"icon-name":l.value?"invisible":"visible",size:20},null,8,["active","icon-name"])])]),e.value&&!t.passwordTooltipDisabled?(c.openBlock(),c.createElementBlock("div",bk,[c.createElementVNode("p",{class:c.normalizeClass(["password__tooltip_text",o.value?"password__tooltip_text--valid":""])},[c.createVNode(ve,{class:c.normalizeClass(o.value?"password__tooltip_icon--active":"password__tooltip_icon"),"icon-name":o.value?"accept":"close",size:16},null,8,["class","icon-name"]),c.createElementVNode("span",null,c.toDisplayString(t.tipChars),1)],2),c.createElementVNode("p",{class:c.normalizeClass(["password__tooltip_text",a.value?"password__tooltip_text--valid":""])},[c.createVNode(ve,{class:c.normalizeClass(a.value?"password__tooltip_icon--active":"password__tooltip_icon"),"icon-name":a.value?"accept":"close",size:16},null,8,["class","icon-name"]),c.createElementVNode("span",null,c.toDisplayString(t.tipNumbers),1)],2),c.createElementVNode("p",{class:c.normalizeClass(["password__tooltip_text",s.value?"password__tooltip_text--valid":""])},[c.createVNode(ve,{class:c.normalizeClass(s.value?"password__tooltip_icon--active":"password__tooltip_icon"),"icon-name":s.value?"accept":"close",size:16},null,8,["class","icon-name"]),c.createElementVNode("span",null,c.toDisplayString(t.tipSymbols),1)],2)])):c.createCommentVNode("",!0)]))}}),[["__scopeId","data-v-5818eeb8"]]),Cz="";const Tk={class:"radio"},Ak=["for"],kk=["id","type","value"],zk={class:"radio__label_txt"};var bM=at({__name:"RadioBox",props:{type:{type:String,default:"radio"},value:{type:String,required:!0},label:{type:String,required:!0}},emits:["clickBox"],setup(i,{emit:n}){return(t,r)=>(c.openBlock(),c.createElementBlock("div",Tk,[c.createElementVNode("label",{class:"radio__label",for:i.value},[c.createElementVNode("input",{id:i.value,class:"radio__input",name:"radiobox",type:i.type,value:i.value,onClick:r[0]||(r[0]=e=>n("clickBox"))},null,8,kk),c.createElementVNode("span",zk,c.toDisplayString(i.label),1)],8,Ak)]))}},[["__scopeId","data-v-29696bd5"]]),Qz="";const Lk={__name:"RadioBoxGroup",props:{orientation:{type:String,default:"horizontal"},type:{type:String,default:"radio"},list:{type:Array,required:!0}},setup(i){const n=c.ref(null);function t(){const r=document.querySelectorAll("input");for(let e=0;e<r.length;e++)r[e].checked?r[e].parentNode.parentNode.classList.add("radio--checked"):r[e].parentNode.parentNode.classList.remove("radio--checked")}return(r,e)=>(c.openBlock(),c.createElementBlock("div",{class:c.normalizeClass(["radio__grp",i.orientation==="vertical"?"radio__vertical":"radio__horizontal"])},[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(i.list,o=>(c.openBlock(),c.createBlock(bM,{key:o.key,ref_for:!0,ref_key:"boxes",ref:n,label:o.label,type:i.type,value:o.value,onClickBox:t},null,8,["label","type","value"]))),128))],2))}};var Uz="";const wk={class:"search-panel"},Sk=["placeholder"];var Ok=at(c.defineComponent({__name:"SearchInput",props:{modelValue:{type:String,default:""},placeholder:{type:String,default:""}},emits:["submit","clean","update:modelValue"],setup(i,{emit:n}){const t=i,r=c.ref("");function e(){n("submit",r.value),n("update:modelValue",r.value)}function o(){r.value="",n("clean"),n("update:modelValue",r.value)}return c.onMounted(()=>()=>r.value=t.modelValue||""),c.watch(t,()=>r.value=t.modelValue||""),(a,s)=>(c.openBlock(),c.createElementBlock("div",wk,[c.withDirectives(c.createElementVNode("input",{"onUpdate:modelValue":s[0]||(s[0]=l=>r.value=l),class:"form-input search-panel-input","data-e2e":"search-input",placeholder:t.placeholder,onKeyup:e},null,40,Sk),[[c.vModelText,r.value]]),r.value?c.createCommentVNode("",!0):(c.openBlock(),c.createElementBlock("button",{key:0,class:"search-panel-button","data-e2e":"search-submit",onClick:e},[c.createVNode(ve,{active:!0,"icon-name":"search",size:24})])),r.value?(c.openBlock(),c.createElementBlock("button",{key:1,class:"search-panel-button close","data-e2e":"search-close",onClick:o},[c.createVNode(ve,{class:"icon","icon-name":"close",size:24})])):c.createCommentVNode("",!0)]))}}),[["__scopeId","data-v-562faa14"]]),Bz="";const Ek=i=>(c.pushScopeId("data-v-0213b522"),i=i(),c.popScopeId(),i),Ck={class:"stepper"},_k=Ek(()=>c.createElementVNode("hr",{class:"solid"},null,-1));var Qk=at(c.defineComponent({__name:"Stepper",props:{maxSteps:{type:Number,default:0},currentStep:{type:Number,default:0}},setup(i){const n=i;function t(){return Array.from(Array(n.maxSteps||0).keys())}return(r,e)=>(c.openBlock(),c.createElementBlock("div",Ck,[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(t(),(o,a)=>(c.openBlock(),c.createElementBlock("div",{key:a,class:"step"},[c.createElementVNode("span",{class:c.normalizeClass(["step-number",{active:o===i.currentStep}])},c.toDisplayString(o+1),3),_k]))),128))]))}}),[["__scopeId","data-v-0213b522"]]);function pt(i){return i&&i.__esModule&&Object.prototype.hasOwnProperty.call(i,"default")?i.default:i}var vM={exports:{}};/*! For license information please see editor.js.LICENSE.txt */(function(i,n){(function(t,r){i.exports=r()})(window,function(){return function(t){var r={};function e(o){if(r[o])return r[o].exports;var a=r[o]={i:o,l:!1,exports:{}};return t[o].call(a.exports,a,a.exports,e),a.l=!0,a.exports}return e.m=t,e.c=r,e.d=function(o,a,s){e.o(o,a)||Object.defineProperty(o,a,{enumerable:!0,get:s})},e.r=function(o){typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(o,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(o,"__esModule",{value:!0})},e.t=function(o,a){if(1&a&&(o=e(o)),8&a||4&a&&typeof o=="object"&&o&&o.__esModule)return o;var s=Object.create(null);if(e.r(s),Object.defineProperty(s,"default",{enumerable:!0,value:o}),2&a&&typeof o!="string")for(var l in o)e.d(s,l,function(u){return o[u]}.bind(null,l));return s},e.n=function(o){var a=o&&o.__esModule?function(){return o.default}:function(){return o};return e.d(a,"a",a),a},e.o=function(o,a){return Object.prototype.hasOwnProperty.call(o,a)},e.p="",e(e.s=187)}([function(t,r,e){var o=e(10),a=e(17),s=e(27),l=e(23),u=e(31),f=function(d,M,h){var y,p,N,g,I=d&f.F,x=d&f.G,T=d&f.S,j=d&f.P,v=d&f.B,w=x?o:T?o[M]||(o[M]={}):(o[M]||{}).prototype,A=x?a:a[M]||(a[M]={}),k=A.prototype||(A.prototype={});for(y in x&&(h=M),h)N=((p=!I&&w&&w[y]!==void 0)?w:h)[y],g=v&&p?u(N,o):j&&typeof N=="function"?u(Function.call,N):N,w&&l(w,y,N,d&f.U),A[y]!=N&&s(A,y,g),j&&k[y]!=N&&(k[y]=N)};o.core=a,f.F=1,f.G=2,f.S=4,f.P=8,f.B=16,f.W=32,f.U=64,f.R=128,t.exports=f},function(t,r){t.exports=function(e){return e&&e.__esModule?e:{default:e}}},function(t,r){t.exports=function(e,o){if(!(e instanceof o))throw new TypeError("Cannot call a class as a function")}},function(t,r){function e(o,a){for(var s=0;s<a.length;s++){var l=a[s];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(o,l.key,l)}}t.exports=function(o,a,s){return a&&e(o.prototype,a),s&&e(o,s),o}},function(t,r){function e(o){return t.exports=e=Object.setPrototypeOf?Object.getPrototypeOf:function(a){return a.__proto__||Object.getPrototypeOf(a)},e(o)}t.exports=e},function(t,r,e){var o=e(110);t.exports=function(a,s){if(typeof s!="function"&&s!==null)throw new TypeError("Super expression must either be null or a function");a.prototype=Object.create(s&&s.prototype,{constructor:{value:a,writable:!0,configurable:!0}}),s&&o(a,s)}},function(t,r,e){var o=e(59),a=e(152);t.exports=function(s,l){return!l||o(l)!=="object"&&typeof l!="function"?a(s):l}},function(t,r,e){var o,a,s;a=[r,e(20),e(371),e(21),e(403),e(14)],(s=typeof(o=function(l,u,f,d,M,h){var y,p=e(1);function N(b,m){var D=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"log",S=arguments.length>3?arguments[3]:void 0,z=arguments.length>4&&arguments[4]!==void 0?arguments[4]:"color: inherit";if("console"in window&&window.console[D]){var O=["info","log","warn","error"].includes(D),C=[];switch(N.logLevel){case y.ERROR:if(D!=="error")return;break;case y.WARN:if(!["error","warn"].includes(D))return;break;case y.INFO:if(!O||b)return}S&&C.push(S);var E="Editor.js ".concat("2.25.0"),B=`line-height: 1em;
|
|
20
20
|
color: #006FEA;
|
|
21
21
|
display: inline-block;
|
|
22
22
|
font-size: 11px;
|