honeycombatomiclib 0.0.13 → 0.0.15

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/index.js CHANGED
@@ -16,7 +16,7 @@
16
16
  * https://www.chartjs.org
17
17
  * (c) 2025 Chart.js Contributors
18
18
  * Released under the MIT License
19
- */class Animator{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(e,t,i,r){const n=t.listeners[r],a=t.duration;n.forEach(r=>r({chart:e,initial:t.initial,numSteps:a,currentStep:Math.min(i-t.start,a)}))}_refresh(){this._request||(this._running=!0,this._request=requestAnimFrame.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(e=Date.now()){let t=0;this._charts.forEach((i,r)=>{if(!i.running||!i.items.length)return;const n=i.items;let a,s=n.length-1,o=!1;for(;s>=0;--s)a=n[s],a._active?(a._total>i.duration&&(i.duration=a._total),a.tick(e),o=!0):(n[s]=n[n.length-1],n.pop());o&&(r.draw(),this._notify(r,i,e,"progress")),n.length||(i.running=!1,this._notify(r,i,e,"complete"),i.initial=!1),t+=n.length}),this._lastDate=e,0===t&&(this._running=!1)}_getAnims(e){const t=this._charts;let i=t.get(e);return i||(i={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},t.set(e,i)),i}listen(e,t,i){this._getAnims(e).listeners[t].push(i)}add(e,t){t&&t.length&&this._getAnims(e).items.push(...t)}has(e){return this._getAnims(e).items.length>0}start(e){const t=this._charts.get(e);t&&(t.running=!0,t.start=Date.now(),t.duration=t.items.reduce((e,t)=>Math.max(e,t._duration),0),this._refresh())}running(e){if(!this._running)return!1;const t=this._charts.get(e);return!!(t&&t.running&&t.items.length)}stop(e){const t=this._charts.get(e);if(!t||!t.items.length)return;const i=t.items;let r=i.length-1;for(;r>=0;--r)i[r].cancel();t.items=[],this._notify(e,t,Date.now(),"complete")}remove(e){return this._charts.delete(e)}}var animator=new Animator;const transparent="transparent",interpolators={boolean:(e,t,i)=>i>.5?t:e,color(e,t,i){const r=color(e||transparent),n=r.valid&&color(t||transparent);return n&&n.valid?n.mix(r,i).hexString():t},number:(e,t,i)=>e+(t-e)*i};class Animation{constructor(e,t,i,r){const n=t[i];r=resolve([e.to,r,n,e.from]);const a=resolve([e.from,n,r]);this._active=!0,this._fn=e.fn||interpolators[e.type||typeof a],this._easing=effects[e.easing]||effects.linear,this._start=Math.floor(Date.now()+(e.delay||0)),this._duration=this._total=Math.floor(e.duration),this._loop=!!e.loop,this._target=t,this._prop=i,this._from=a,this._to=r,this._promises=void 0}active(){return this._active}update(e,t,i){if(this._active){this._notify(!1);const r=this._target[this._prop],n=i-this._start,a=this._duration-n;this._start=i,this._duration=Math.floor(Math.max(a,e.duration)),this._total+=n,this._loop=!!e.loop,this._to=resolve([e.to,t,r,e.from]),this._from=resolve([e.from,r,t])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(e){const t=e-this._start,i=this._duration,r=this._prop,n=this._from,a=this._loop,s=this._to;let o;if(this._active=n!==s&&(a||t<i),!this._active)return this._target[r]=s,void this._notify(!0);t<0?this._target[r]=n:(o=t/i%2,o=a&&o>1?2-o:o,o=this._easing(Math.min(1,Math.max(0,o))),this._target[r]=this._fn(n,s,o))}wait(){const e=this._promises||(this._promises=[]);return new Promise((t,i)=>{e.push({res:t,rej:i})})}_notify(e){const t=e?"res":"rej",i=this._promises||[];for(let e=0;e<i.length;e++)i[e][t]()}}class Animations{constructor(e,t){this._chart=e,this._properties=new Map,this.configure(t)}configure(e){if(!isObject$1(e))return;const t=Object.keys(defaults.animation),i=this._properties;Object.getOwnPropertyNames(e).forEach(r=>{const n=e[r];if(!isObject$1(n))return;const a={};for(const e of t)a[e]=n[e];(isArray(n.properties)&&n.properties||[r]).forEach(e=>{e!==r&&i.has(e)||i.set(e,a)})})}_animateOptions(e,t){const i=t.options,r=resolveTargetOptions(e,i);if(!r)return[];const n=this._createAnimations(r,i);return i.$shared&&awaitAll(e.options.$animations,i).then(()=>{e.options=i},()=>{}),n}_createAnimations(e,t){const i=this._properties,r=[],n=e.$animations||(e.$animations={}),a=Object.keys(t),s=Date.now();let o;for(o=a.length-1;o>=0;--o){const l=a[o];if("$"===l.charAt(0))continue;if("options"===l){r.push(...this._animateOptions(e,t));continue}const c=t[l];let h=n[l];const p=i.get(l);if(h){if(p&&h.active()){h.update(p,c,s);continue}h.cancel()}p&&p.duration?(n[l]=h=new Animation(p,e,l,c),r.push(h)):e[l]=c}return r}update(e,t){if(0===this._properties.size)return void Object.assign(e,t);const i=this._createAnimations(e,t);return i.length?(animator.add(this._chart,i),!0):void 0}}function awaitAll(e,t){const i=[],r=Object.keys(t);for(let t=0;t<r.length;t++){const n=e[r[t]];n&&n.active()&&i.push(n.wait())}return Promise.all(i)}function resolveTargetOptions(e,t){if(!t)return;let i=e.options;if(i)return i.$shared&&(e.options=i=Object.assign({},i,{$shared:!1,$animations:{}})),i;e.options=t}function scaleClip(e,t){const i=e&&e.options||{},r=i.reverse,n=void 0===i.min?t:0,a=void 0===i.max?t:0;return{start:r?a:n,end:r?n:a}}function defaultClip(e,t,i){if(!1===i)return!1;const r=scaleClip(e,i),n=scaleClip(t,i);return{top:n.end,right:r.end,bottom:n.start,left:r.start}}function toClip(e){let t,i,r,n;return isObject$1(e)?(t=e.top,i=e.right,r=e.bottom,n=e.left):t=i=r=n=e,{top:t,right:i,bottom:r,left:n,disabled:!1===e}}function getSortedDatasetIndices(e,t){const i=[],r=e._getSortedDatasetMetas(t);let n,a;for(n=0,a=r.length;n<a;++n)i.push(r[n].index);return i}function applyStack(e,t,i,r={}){const n=e.keys,a="single"===r.mode;let s,o,l,c;if(null===t)return;let h=!1;for(s=0,o=n.length;s<o;++s){if(l=+n[s],l===i){if(h=!0,r.all)continue;break}c=e.values[l],isNumberFinite(c)&&(a||0===t||sign(t)===sign(c))&&(t+=c)}return h||r.all?t:0}function convertObjectDataToArray(e,t){const{iScale:i,vScale:r}=t,n="x"===i.axis?"x":"y",a="x"===r.axis?"x":"y",s=Object.keys(e),o=new Array(s.length);let l,c,h;for(l=0,c=s.length;l<c;++l)h=s[l],o[l]={[n]:h,[a]:e[h]};return o}function isStacked(e,t){const i=e&&e.options.stacked;return i||void 0===i&&void 0!==t.stack}function getStackKey(e,t,i){return`${e.id}.${t.id}.${i.stack||i.type}`}function getUserBounds(e){const{min:t,max:i,minDefined:r,maxDefined:n}=e.getUserBounds();return{min:r?t:Number.NEGATIVE_INFINITY,max:n?i:Number.POSITIVE_INFINITY}}function getOrCreateStack(e,t,i){const r=e[t]||(e[t]={});return r[i]||(r[i]={})}function getLastIndexInStack(e,t,i,r){for(const n of t.getMatchingVisibleMetas(r).reverse()){const t=e[n.index];if(i&&t>0||!i&&t<0)return n.index}return null}function updateStacks(e,t){const{chart:i,_cachedMeta:r}=e,n=i._stacks||(i._stacks={}),{iScale:a,vScale:s,index:o}=r,l=a.axis,c=s.axis,h=getStackKey(a,s,r),p=t.length;let u;for(let e=0;e<p;++e){const i=t[e],{[l]:a,[c]:p}=i;u=(i._stacks||(i._stacks={}))[c]=getOrCreateStack(n,h,a),u[o]=p,u._top=getLastIndexInStack(u,s,!0,r.type),u._bottom=getLastIndexInStack(u,s,!1,r.type);(u._visualValues||(u._visualValues={}))[o]=p}}function getFirstScaleId(e,t){const i=e.scales;return Object.keys(i).filter(e=>i[e].axis===t).shift()}function createDatasetContext(e,t){return createContext(e,{active:!1,dataset:void 0,datasetIndex:t,index:t,mode:"default",type:"dataset"})}function createDataContext(e,t,i){return createContext(e,{active:!1,dataIndex:t,parsed:void 0,raw:void 0,element:i,index:t,mode:"default",type:"data"})}function clearStacks(e,t){const i=e.controller.index,r=e.vScale&&e.vScale.axis;if(r){t=t||e._parsed;for(const e of t){const t=e._stacks;if(!t||void 0===t[r]||void 0===t[r][i])return;delete t[r][i],void 0!==t[r]._visualValues&&void 0!==t[r]._visualValues[i]&&delete t[r]._visualValues[i]}}}const isDirectUpdateMode=e=>"reset"===e||"none"===e,cloneIfNotShared=(e,t)=>t?e:Object.assign({},e),createStack=(e,t,i)=>e&&!t.hidden&&t._stacked&&{keys:getSortedDatasetIndices(i,!0),values:null};class DatasetController{static defaults={};static datasetElementType=null;static dataElementType=null;constructor(e,t){this.chart=e,this._ctx=e.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.datasetElementType=new.target.datasetElementType,this.dataElementType=new.target.dataElementType,this.initialize()}initialize(){const e=this._cachedMeta;this.configure(),this.linkScales(),e._stacked=isStacked(e.vScale,e),this.addElements(),this.options.fill&&!this.chart.isPluginEnabled("filler")&&console.warn("Tried to use the 'fill' option without the 'Filler' plugin enabled. Please import and register the 'Filler' plugin and make sure it is not disabled in the options")}updateIndex(e){this.index!==e&&clearStacks(this._cachedMeta),this.index=e}linkScales(){const e=this.chart,t=this._cachedMeta,i=this.getDataset(),r=(e,t,i,r)=>"x"===e?t:"r"===e?r:i,n=t.xAxisID=valueOrDefault(i.xAxisID,getFirstScaleId(e,"x")),a=t.yAxisID=valueOrDefault(i.yAxisID,getFirstScaleId(e,"y")),s=t.rAxisID=valueOrDefault(i.rAxisID,getFirstScaleId(e,"r")),o=t.indexAxis,l=t.iAxisID=r(o,n,a,s),c=t.vAxisID=r(o,a,n,s);t.xScale=this.getScaleForId(n),t.yScale=this.getScaleForId(a),t.rScale=this.getScaleForId(s),t.iScale=this.getScaleForId(l),t.vScale=this.getScaleForId(c)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(e){return this.chart.scales[e]}_getOtherScale(e){const t=this._cachedMeta;return e===t.iScale?t.vScale:t.iScale}reset(){this._update("reset")}_destroy(){const e=this._cachedMeta;this._data&&unlistenArrayEvents(this._data,this),e._stacked&&clearStacks(e)}_dataCheck(){const e=this.getDataset(),t=e.data||(e.data=[]),i=this._data;if(isObject$1(t)){const e=this._cachedMeta;this._data=convertObjectDataToArray(t,e)}else if(i!==t){if(i){unlistenArrayEvents(i,this);const e=this._cachedMeta;clearStacks(e),e._parsed=[]}t&&Object.isExtensible(t)&&listenArrayEvents(t,this),this._syncList=[],this._data=t}}addElements(){const e=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(e.dataset=new this.datasetElementType)}buildOrUpdateElements(e){const t=this._cachedMeta,i=this.getDataset();let r=!1;this._dataCheck();const n=t._stacked;t._stacked=isStacked(t.vScale,t),t.stack!==i.stack&&(r=!0,clearStacks(t),t.stack=i.stack),this._resyncElements(e),(r||n!==t._stacked)&&(updateStacks(this,t._parsed),t._stacked=isStacked(t.vScale,t))}configure(){const e=this.chart.config,t=e.datasetScopeKeys(this._type),i=e.getOptionScopes(this.getDataset(),t,!0);this.options=e.createResolver(i,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(e,t){const{_cachedMeta:i,_data:r}=this,{iScale:n,_stacked:a}=i,s=n.axis;let o,l,c,h=0===e&&t===r.length||i._sorted,p=e>0&&i._parsed[e-1];if(!1===this._parsing)i._parsed=r,i._sorted=!0,c=r;else{c=isArray(r[e])?this.parseArrayData(i,r,e,t):isObject$1(r[e])?this.parseObjectData(i,r,e,t):this.parsePrimitiveData(i,r,e,t);const n=()=>null===l[s]||p&&l[s]<p[s];for(o=0;o<t;++o)i._parsed[o+e]=l=c[o],h&&(n()&&(h=!1),p=l);i._sorted=h}a&&updateStacks(this,c)}parsePrimitiveData(e,t,i,r){const{iScale:n,vScale:a}=e,s=n.axis,o=a.axis,l=n.getLabels(),c=n===a,h=new Array(r);let p,u,d;for(p=0,u=r;p<u;++p)d=p+i,h[p]={[s]:c||n.parse(l[d],d),[o]:a.parse(t[d],d)};return h}parseArrayData(e,t,i,r){const{xScale:n,yScale:a}=e,s=new Array(r);let o,l,c,h;for(o=0,l=r;o<l;++o)c=o+i,h=t[c],s[o]={x:n.parse(h[0],c),y:a.parse(h[1],c)};return s}parseObjectData(e,t,i,r){const{xScale:n,yScale:a}=e,{xAxisKey:s="x",yAxisKey:o="y"}=this._parsing,l=new Array(r);let c,h,p,u;for(c=0,h=r;c<h;++c)p=c+i,u=t[p],l[c]={x:n.parse(resolveObjectKey(u,s),p),y:a.parse(resolveObjectKey(u,o),p)};return l}getParsed(e){return this._cachedMeta._parsed[e]}getDataElement(e){return this._cachedMeta.data[e]}applyStack(e,t,i){const r=this.chart,n=this._cachedMeta,a=t[e.axis];return applyStack({keys:getSortedDatasetIndices(r,!0),values:t._stacks[e.axis]._visualValues},a,n.index,{mode:i})}updateRangeFromParsed(e,t,i,r){const n=i[t.axis];let a=null===n?NaN:n;const s=r&&i._stacks[t.axis];r&&s&&(r.values=s,a=applyStack(r,n,this._cachedMeta.index)),e.min=Math.min(e.min,a),e.max=Math.max(e.max,a)}getMinMax(e,t){const i=this._cachedMeta,r=i._parsed,n=i._sorted&&e===i.iScale,a=r.length,s=this._getOtherScale(e),o=createStack(t,i,this.chart),l={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:c,max:h}=getUserBounds(s);let p,u;function d(){u=r[p];const t=u[s.axis];return!isNumberFinite(u[e.axis])||c>t||h<t}for(p=0;p<a&&(d()||(this.updateRangeFromParsed(l,e,u,o),!n));++p);if(n)for(p=a-1;p>=0;--p)if(!d()){this.updateRangeFromParsed(l,e,u,o);break}return l}getAllParsedValues(e){const t=this._cachedMeta._parsed,i=[];let r,n,a;for(r=0,n=t.length;r<n;++r)a=t[r][e.axis],isNumberFinite(a)&&i.push(a);return i}getMaxOverflow(){return!1}getLabelAndValue(e){const t=this._cachedMeta,i=t.iScale,r=t.vScale,n=this.getParsed(e);return{label:i?""+i.getLabelForValue(n[i.axis]):"",value:r?""+r.getLabelForValue(n[r.axis]):""}}_update(e){const t=this._cachedMeta;this.update(e||"default"),t._clip=toClip(valueOrDefault(this.options.clip,defaultClip(t.xScale,t.yScale,this.getMaxOverflow())))}update(e){}draw(){const e=this._ctx,t=this.chart,i=this._cachedMeta,r=i.data||[],n=t.chartArea,a=[],s=this._drawStart||0,o=this._drawCount||r.length-s,l=this.options.drawActiveElementsOnTop;let c;for(i.dataset&&i.dataset.draw(e,n,s,o),c=s;c<s+o;++c){const t=r[c];t.hidden||(t.active&&l?a.push(t):t.draw(e,n))}for(c=0;c<a.length;++c)a[c].draw(e,n)}getStyle(e,t){const i=t?"active":"default";return void 0===e&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(i):this.resolveDataElementOptions(e||0,i)}getContext(e,t,i){const r=this.getDataset();let n;if(e>=0&&e<this._cachedMeta.data.length){const t=this._cachedMeta.data[e];n=t.$context||(t.$context=createDataContext(this.getContext(),e,t)),n.parsed=this.getParsed(e),n.raw=r.data[e],n.index=n.dataIndex=e}else n=this.$context||(this.$context=createDatasetContext(this.chart.getContext(),this.index)),n.dataset=r,n.index=n.datasetIndex=this.index;return n.active=!!t,n.mode=i,n}resolveDatasetElementOptions(e){return this._resolveElementOptions(this.datasetElementType.id,e)}resolveDataElementOptions(e,t){return this._resolveElementOptions(this.dataElementType.id,t,e)}_resolveElementOptions(e,t="default",i){const r="active"===t,n=this._cachedDataOpts,a=e+"-"+t,s=n[a],o=this.enableOptionSharing&&defined(i);if(s)return cloneIfNotShared(s,o);const l=this.chart.config,c=l.datasetElementScopeKeys(this._type,e),h=r?[`${e}Hover`,"hover",e,""]:[e,""],p=l.getOptionScopes(this.getDataset(),c),u=Object.keys(defaults.elements[e]),d=l.resolveNamedOptions(p,u,()=>this.getContext(i,r,t),h);return d.$shared&&(d.$shared=o,n[a]=Object.freeze(cloneIfNotShared(d,o))),d}_resolveAnimations(e,t,i){const r=this.chart,n=this._cachedDataOpts,a=`animation-${t}`,s=n[a];if(s)return s;let o;if(!1!==r.options.animation){const r=this.chart.config,n=r.datasetAnimationScopeKeys(this._type,t),a=r.getOptionScopes(this.getDataset(),n);o=r.createResolver(a,this.getContext(e,i,t))}const l=new Animations(r,o&&o.animations);return o&&o._cacheable&&(n[a]=Object.freeze(l)),l}getSharedOptions(e){if(e.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},e))}includeOptions(e,t){return!t||isDirectUpdateMode(e)||this.chart._animationsDisabled}_getSharedOptions(e,t){const i=this.resolveDataElementOptions(e,t),r=this._sharedOptions,n=this.getSharedOptions(i),a=this.includeOptions(t,n)||n!==r;return this.updateSharedOptions(n,t,i),{sharedOptions:n,includeOptions:a}}updateElement(e,t,i,r){isDirectUpdateMode(r)?Object.assign(e,i):this._resolveAnimations(t,r).update(e,i)}updateSharedOptions(e,t,i){e&&!isDirectUpdateMode(t)&&this._resolveAnimations(void 0,t).update(e,i)}_setStyle(e,t,i,r){e.active=r;const n=this.getStyle(t,r);this._resolveAnimations(t,i,r).update(e,{options:!r&&this.getSharedOptions(n)||n})}removeHoverStyle(e,t,i){this._setStyle(e,i,"active",!1)}setHoverStyle(e,t,i){this._setStyle(e,i,"active",!0)}_removeDatasetHoverStyle(){const e=this._cachedMeta.dataset;e&&this._setStyle(e,void 0,"active",!1)}_setDatasetHoverStyle(){const e=this._cachedMeta.dataset;e&&this._setStyle(e,void 0,"active",!0)}_resyncElements(e){const t=this._data,i=this._cachedMeta.data;for(const[e,t,i]of this._syncList)this[e](t,i);this._syncList=[];const r=i.length,n=t.length,a=Math.min(n,r);a&&this.parse(0,a),n>r?this._insertElements(r,n-r,e):n<r&&this._removeElements(n,r-n)}_insertElements(e,t,i=!0){const r=this._cachedMeta,n=r.data,a=e+t;let s;const o=e=>{for(e.length+=t,s=e.length-1;s>=a;s--)e[s]=e[s-t]};for(o(n),s=e;s<a;++s)n[s]=new this.dataElementType;this._parsing&&o(r._parsed),this.parse(e,t),i&&this.updateElements(n,e,t,"reset")}updateElements(e,t,i,r){}_removeElements(e,t){const i=this._cachedMeta;if(this._parsing){const r=i._parsed.splice(e,t);i._stacked&&clearStacks(i,r)}i.data.splice(e,t)}_sync(e){if(this._parsing)this._syncList.push(e);else{const[t,i,r]=e;this[t](i,r)}this.chart._dataChanges.push([this.index,...e])}_onDataPush(){const e=arguments.length;this._sync(["_insertElements",this.getDataset().data.length-e,e])}_onDataPop(){this._sync(["_removeElements",this._cachedMeta.data.length-1,1])}_onDataShift(){this._sync(["_removeElements",0,1])}_onDataSplice(e,t){t&&this._sync(["_removeElements",e,t]);const i=arguments.length-2;i&&this._sync(["_insertElements",e,i])}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length])}}function getAllScaleValues(e,t){if(!e._cache.$bar){const i=e.getMatchingVisibleMetas(t);let r=[];for(let t=0,n=i.length;t<n;t++)r=r.concat(i[t].controller.getAllParsedValues(e));e._cache.$bar=_arrayUnique(r.sort((e,t)=>e-t))}return e._cache.$bar}function computeMinSampleSize(e){const t=e.iScale,i=getAllScaleValues(t,e.type);let r,n,a,s,o=t._length;const l=()=>{32767!==a&&-32768!==a&&(defined(s)&&(o=Math.min(o,Math.abs(a-s)||o)),s=a)};for(r=0,n=i.length;r<n;++r)a=t.getPixelForValue(i[r]),l();for(s=void 0,r=0,n=t.ticks.length;r<n;++r)a=t.getPixelForTick(r),l();return o}function computeFitCategoryTraits(e,t,i,r){const n=i.barThickness;let a,s;return isNullOrUndef(n)?(a=t.min*i.categoryPercentage,s=i.barPercentage):(a=n*r,s=1),{chunk:a/r,ratio:s,start:t.pixels[e]-a/2}}function computeFlexCategoryTraits(e,t,i,r){const n=t.pixels,a=n[e];let s=e>0?n[e-1]:null,o=e<n.length-1?n[e+1]:null;const l=i.categoryPercentage;null===s&&(s=a-(null===o?t.end-t.start:o-a)),null===o&&(o=a+a-s);const c=a-(a-Math.min(s,o))/2*l;return{chunk:Math.abs(o-s)/2*l/r,ratio:i.barPercentage,start:c}}function parseFloatBar(e,t,i,r){const n=i.parse(e[0],r),a=i.parse(e[1],r),s=Math.min(n,a),o=Math.max(n,a);let l=s,c=o;Math.abs(s)>Math.abs(o)&&(l=o,c=s),t[i.axis]=c,t._custom={barStart:l,barEnd:c,start:n,end:a,min:s,max:o}}function parseValue(e,t,i,r){return isArray(e)?parseFloatBar(e,t,i,r):t[i.axis]=i.parse(e,r),t}function parseArrayOrPrimitive(e,t,i,r){const n=e.iScale,a=e.vScale,s=n.getLabels(),o=n===a,l=[];let c,h,p,u;for(c=i,h=i+r;c<h;++c)u=t[c],p={},p[n.axis]=o||n.parse(s[c],c),l.push(parseValue(u,p,a,c));return l}function isFloatBar(e){return e&&void 0!==e.barStart&&void 0!==e.barEnd}function barSign(e,t,i){return 0!==e?sign(e):(t.isHorizontal()?1:-1)*(t.min>=i?1:-1)}function borderProps(e){let t,i,r,n,a;return e.horizontal?(t=e.base>e.x,i="left",r="right"):(t=e.base<e.y,i="bottom",r="top"),t?(n="end",a="start"):(n="start",a="end"),{start:i,end:r,reverse:t,top:n,bottom:a}}function setBorderSkipped(e,t,i,r){let n=t.borderSkipped;const a={};if(!n)return void(e.borderSkipped=a);if(!0===n)return void(e.borderSkipped={top:!0,right:!0,bottom:!0,left:!0});const{start:s,end:o,reverse:l,top:c,bottom:h}=borderProps(e);"middle"===n&&i&&(e.enableBorderRadius=!0,(i._top||0)===r?n=c:(i._bottom||0)===r?n=h:(a[parseEdge(h,s,o,l)]=!0,n=c)),a[parseEdge(n,s,o,l)]=!0,e.borderSkipped=a}function parseEdge(e,t,i,r){return e=r?startEnd(e=swap(e,t,i),i,t):startEnd(e,t,i)}function swap(e,t,i){return e===t?i:e===i?t:e}function startEnd(e,t,i){return"start"===e?t:"end"===e?i:e}function setInflateAmount(e,{inflateAmount:t},i){e.inflateAmount="auto"===t?1===i?.33:0:t}class BarController extends DatasetController{static id="bar";static defaults={datasetElementType:!1,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}};static overrides={scales:{_index_:{type:"category",offset:!0,grid:{offset:!0}},_value_:{type:"linear",beginAtZero:!0}}};parsePrimitiveData(e,t,i,r){return parseArrayOrPrimitive(e,t,i,r)}parseArrayData(e,t,i,r){return parseArrayOrPrimitive(e,t,i,r)}parseObjectData(e,t,i,r){const{iScale:n,vScale:a}=e,{xAxisKey:s="x",yAxisKey:o="y"}=this._parsing,l="x"===n.axis?s:o,c="x"===a.axis?s:o,h=[];let p,u,d,f;for(p=i,u=i+r;p<u;++p)f=t[p],d={},d[n.axis]=n.parse(resolveObjectKey(f,l),p),h.push(parseValue(resolveObjectKey(f,c),d,a,p));return h}updateRangeFromParsed(e,t,i,r){super.updateRangeFromParsed(e,t,i,r);const n=i._custom;n&&t===this._cachedMeta.vScale&&(e.min=Math.min(e.min,n.min),e.max=Math.max(e.max,n.max))}getMaxOverflow(){return 0}getLabelAndValue(e){const t=this._cachedMeta,{iScale:i,vScale:r}=t,n=this.getParsed(e),a=n._custom,s=isFloatBar(a)?"["+a.start+", "+a.end+"]":""+r.getLabelForValue(n[r.axis]);return{label:""+i.getLabelForValue(n[i.axis]),value:s}}initialize(){this.enableOptionSharing=!0,super.initialize();this._cachedMeta.stack=this.getDataset().stack}update(e){const t=this._cachedMeta;this.updateElements(t.data,0,t.data.length,e)}updateElements(e,t,i,r){const n="reset"===r,{index:a,_cachedMeta:{vScale:s}}=this,o=s.getBasePixel(),l=s.isHorizontal(),c=this._getRuler(),{sharedOptions:h,includeOptions:p}=this._getSharedOptions(t,r);for(let u=t;u<t+i;u++){const t=this.getParsed(u),i=n||isNullOrUndef(t[s.axis])?{base:o,head:o}:this._calculateBarValuePixels(u),d=this._calculateBarIndexPixels(u,c),f=(t._stacks||{})[s.axis],m={horizontal:l,base:i.base,enableBorderRadius:!f||isFloatBar(t._custom)||a===f._top||a===f._bottom,x:l?i.head:d.center,y:l?d.center:i.head,height:l?d.size:Math.abs(i.size),width:l?Math.abs(i.size):d.size};p&&(m.options=h||this.resolveDataElementOptions(u,e[u].active?"active":r));const g=m.options||e[u].options;setBorderSkipped(m,g,f,a),setInflateAmount(m,g,c.ratio),this.updateElement(e[u],u,m,r)}}_getStacks(e,t){const{iScale:i}=this._cachedMeta,r=i.getMatchingVisibleMetas(this._type).filter(e=>e.controller.options.grouped),n=i.options.stacked,a=[],s=this._cachedMeta.controller.getParsed(t),o=s&&s[i.axis],l=e=>{const t=e._parsed.find(e=>e[i.axis]===o),r=t&&t[e.vScale.axis];if(isNullOrUndef(r)||isNaN(r))return!0};for(const i of r)if((void 0===t||!l(i))&&((!1===n||-1===a.indexOf(i.stack)||void 0===n&&void 0===i.stack)&&a.push(i.stack),i.index===e))break;return a.length||a.push(void 0),a}_getStackCount(e){return this._getStacks(void 0,e).length}_getAxisCount(){return this._getAxis().length}getFirstScaleIdForIndexAxis(){const e=this.chart.scales,t=this.chart.options.indexAxis;return Object.keys(e).filter(i=>e[i].axis===t).shift()}_getAxis(){const e={},t=this.getFirstScaleIdForIndexAxis();for(const i of this.chart.data.datasets)e[valueOrDefault("x"===this.chart.options.indexAxis?i.xAxisID:i.yAxisID,t)]=!0;return Object.keys(e)}_getStackIndex(e,t,i){const r=this._getStacks(e,i),n=void 0!==t?r.indexOf(t):-1;return-1===n?r.length-1:n}_getRuler(){const e=this.options,t=this._cachedMeta,i=t.iScale,r=[];let n,a;for(n=0,a=t.data.length;n<a;++n)r.push(i.getPixelForValue(this.getParsed(n)[i.axis],n));const s=e.barThickness;return{min:s||computeMinSampleSize(t),pixels:r,start:i._startPixel,end:i._endPixel,stackCount:this._getStackCount(),scale:i,grouped:e.grouped,ratio:s?1:e.categoryPercentage*e.barPercentage}}_calculateBarValuePixels(e){const{_cachedMeta:{vScale:t,_stacked:i,index:r},options:{base:n,minBarLength:a}}=this,s=n||0,o=this.getParsed(e),l=o._custom,c=isFloatBar(l);let h,p,u=o[t.axis],d=0,f=i?this.applyStack(t,o,i):u;f!==u&&(d=f-u,f=u),c&&(u=l.barStart,f=l.barEnd-l.barStart,0!==u&&sign(u)!==sign(l.barEnd)&&(d=0),d+=u);const m=isNullOrUndef(n)||c?d:n;let g=t.getPixelForValue(m);if(h=this.chart.getDataVisibility(e)?t.getPixelForValue(d+f):g,p=h-g,Math.abs(p)<a){p=barSign(p,t,s)*a,u===s&&(g-=p/2);const e=t.getPixelForDecimal(0),n=t.getPixelForDecimal(1),l=Math.min(e,n),d=Math.max(e,n);g=Math.max(Math.min(g,d),l),h=g+p,i&&!c&&(o._stacks[t.axis]._visualValues[r]=t.getValueForPixel(h)-t.getValueForPixel(g))}if(g===t.getPixelForValue(s)){const e=sign(p)*t.getLineWidthForValue(s)/2;g+=e,p-=e}return{size:p,base:g,head:h,center:h+p/2}}_calculateBarIndexPixels(e,t){const i=t.scale,r=this.options,n=r.skipNull,a=valueOrDefault(r.maxBarThickness,1/0);let s,o;const l=this._getAxisCount();if(t.grouped){const i=n?this._getStackCount(e):t.stackCount,c="flex"===r.barThickness?computeFlexCategoryTraits(e,t,r,i*l):computeFitCategoryTraits(e,t,r,i*l),h="x"===this.chart.options.indexAxis?this.getDataset().xAxisID:this.getDataset().yAxisID,p=this._getAxis().indexOf(valueOrDefault(h,this.getFirstScaleIdForIndexAxis())),u=this._getStackIndex(this.index,this._cachedMeta.stack,n?e:void 0)+p;s=c.start+c.chunk*u+c.chunk/2,o=Math.min(a,c.chunk*c.ratio)}else s=i.getPixelForValue(this.getParsed(e)[i.axis],e),o=Math.min(a,t.min*t.ratio);return{base:s-o/2,head:s+o/2,center:s,size:o}}draw(){const e=this._cachedMeta,t=e.vScale,i=e.data,r=i.length;let n=0;for(;n<r;++n)null===this.getParsed(n)[t.axis]||i[n].hidden||i[n].draw(this._ctx)}}function getRatioAndOffset(e,t,i){let r=1,n=1,a=0,s=0;if(t<TAU){const o=e,l=o+t,c=Math.cos(o),h=Math.sin(o),p=Math.cos(l),u=Math.sin(l),d=(e,t,r)=>_angleBetween(e,o,l,!0)?1:Math.max(t,t*i,r,r*i),f=(e,t,r)=>_angleBetween(e,o,l,!0)?-1:Math.min(t,t*i,r,r*i),m=d(0,c,p),g=d(HALF_PI,h,u),v=f(PI,c,p),y=f(PI+HALF_PI,h,u);r=(m-v)/2,n=(g-y)/2,a=-(m+v)/2,s=-(g+y)/2}return{ratioX:r,ratioY:n,offsetX:a,offsetY:s}}class DoughnutController extends DatasetController{static id="doughnut";static defaults={datasetElementType:!1,dataElementType:"arc",animation:{animateRotate:!0,animateScale:!1},animations:{numbers:{type:"number",properties:["circumference","endAngle","innerRadius","outerRadius","startAngle","x","y","offset","borderWidth","spacing"]}},cutout:"50%",rotation:0,circumference:360,radius:"100%",spacing:0,indexAxis:"r"};static descriptors={_scriptable:e=>"spacing"!==e,_indexable:e=>"spacing"!==e&&!e.startsWith("borderDash")&&!e.startsWith("hoverBorderDash")};static overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(e){const t=e.data,{labels:{pointStyle:i,textAlign:r,color:n,useBorderRadius:a,borderRadius:s}}=e.legend.options;return t.labels.length&&t.datasets.length?t.labels.map((t,o)=>{const l=e.getDatasetMeta(0).controller.getStyle(o);return{text:t,fillStyle:l.backgroundColor,fontColor:n,hidden:!e.getDataVisibility(o),lineDash:l.borderDash,lineDashOffset:l.borderDashOffset,lineJoin:l.borderJoinStyle,lineWidth:l.borderWidth,strokeStyle:l.borderColor,textAlign:r,pointStyle:i,borderRadius:a&&(s||l.borderRadius),index:o}}):[]}},onClick(e,t,i){i.chart.toggleDataVisibility(t.index),i.chart.update()}}}};constructor(e,t){super(e,t),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(e,t){const i=this.getDataset().data,r=this._cachedMeta;if(!1===this._parsing)r._parsed=i;else{let n,a,s=e=>+i[e];if(isObject$1(i[e])){const{key:e="value"}=this._parsing;s=t=>+resolveObjectKey(i[t],e)}for(n=e,a=e+t;n<a;++n)r._parsed[n]=s(n)}}_getRotation(){return toRadians(this.options.rotation-90)}_getCircumference(){return toRadians(this.options.circumference)}_getRotationExtents(){let e=TAU,t=-TAU;for(let i=0;i<this.chart.data.datasets.length;++i)if(this.chart.isDatasetVisible(i)&&this.chart.getDatasetMeta(i).type===this._type){const r=this.chart.getDatasetMeta(i).controller,n=r._getRotation(),a=r._getCircumference();e=Math.min(e,n),t=Math.max(t,n+a)}return{rotation:e,circumference:t-e}}update(e){const t=this.chart,{chartArea:i}=t,r=this._cachedMeta,n=r.data,a=this.getMaxBorderWidth()+this.getMaxOffset(n)+this.options.spacing,s=Math.max((Math.min(i.width,i.height)-a)/2,0),o=Math.min(toPercentage(this.options.cutout,s),1),l=this._getRingWeight(this.index),{circumference:c,rotation:h}=this._getRotationExtents(),{ratioX:p,ratioY:u,offsetX:d,offsetY:f}=getRatioAndOffset(h,c,o),m=(i.width-a)/p,g=(i.height-a)/u,v=Math.max(Math.min(m,g)/2,0),y=toDimension(this.options.radius,v),b=(y-Math.max(y*o,0))/this._getVisibleDatasetWeightTotal();this.offsetX=d*y,this.offsetY=f*y,r.total=this.calculateTotal(),this.outerRadius=y-b*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-b*l,0),this.updateElements(n,0,n.length,e)}_circumference(e,t){const i=this.options,r=this._cachedMeta,n=this._getCircumference();return t&&i.animation.animateRotate||!this.chart.getDataVisibility(e)||null===r._parsed[e]||r.data[e].hidden?0:this.calculateCircumference(r._parsed[e]*n/TAU)}updateElements(e,t,i,r){const n="reset"===r,a=this.chart,s=a.chartArea,o=a.options.animation,l=(s.left+s.right)/2,c=(s.top+s.bottom)/2,h=n&&o.animateScale,p=h?0:this.innerRadius,u=h?0:this.outerRadius,{sharedOptions:d,includeOptions:f}=this._getSharedOptions(t,r);let m,g=this._getRotation();for(m=0;m<t;++m)g+=this._circumference(m,n);for(m=t;m<t+i;++m){const t=this._circumference(m,n),i=e[m],a={x:l+this.offsetX,y:c+this.offsetY,startAngle:g,endAngle:g+t,circumference:t,outerRadius:u,innerRadius:p};f&&(a.options=d||this.resolveDataElementOptions(m,i.active?"active":r)),g+=t,this.updateElement(i,m,a,r)}}calculateTotal(){const e=this._cachedMeta,t=e.data;let i,r=0;for(i=0;i<t.length;i++){const n=e._parsed[i];null===n||isNaN(n)||!this.chart.getDataVisibility(i)||t[i].hidden||(r+=Math.abs(n))}return r}calculateCircumference(e){const t=this._cachedMeta.total;return t>0&&!isNaN(e)?TAU*(Math.abs(e)/t):0}getLabelAndValue(e){const t=this._cachedMeta,i=this.chart,r=i.data.labels||[],n=formatNumber(t._parsed[e],i.options.locale);return{label:r[e]||"",value:n}}getMaxBorderWidth(e){let t=0;const i=this.chart;let r,n,a,s,o;if(!e)for(r=0,n=i.data.datasets.length;r<n;++r)if(i.isDatasetVisible(r)){a=i.getDatasetMeta(r),e=a.data,s=a.controller;break}if(!e)return 0;for(r=0,n=e.length;r<n;++r)o=s.resolveDataElementOptions(r),"inner"!==o.borderAlign&&(t=Math.max(t,o.borderWidth||0,o.hoverBorderWidth||0));return t}getMaxOffset(e){let t=0;for(let i=0,r=e.length;i<r;++i){const e=this.resolveDataElementOptions(i);t=Math.max(t,e.offset||0,e.hoverOffset||0)}return t}_getRingWeightOffset(e){let t=0;for(let i=0;i<e;++i)this.chart.isDatasetVisible(i)&&(t+=this._getRingWeight(i));return t}_getRingWeight(e){return Math.max(valueOrDefault(this.chart.data.datasets[e].weight,1),0)}_getVisibleDatasetWeightTotal(){return this._getRingWeightOffset(this.chart.data.datasets.length)||1}}class PieController extends DoughnutController{static id="pie";static defaults={cutout:0,rotation:0,circumference:360,radius:"100%"}}function abstract(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class DateAdapterBase{static override(e){Object.assign(DateAdapterBase.prototype,e)}options;constructor(e){this.options=e||{}}init(){}formats(){return abstract()}parse(){return abstract()}format(){return abstract()}add(){return abstract()}diff(){return abstract()}startOf(){return abstract()}endOf(){return abstract()}}var adapters={_date:DateAdapterBase};function binarySearch(e,t,i,r){const{controller:n,data:a,_sorted:s}=e,o=n._cachedMeta.iScale,l=e.dataset&&e.dataset.options?e.dataset.options.spanGaps:null;if(o&&t===o.axis&&"r"!==t&&s&&a.length){const s=o._reversePixels?_rlookupByKey:_lookupByKey;if(!r){const r=s(a,t,i);if(l){const{vScale:t}=n._cachedMeta,{_parsed:i}=e,a=i.slice(0,r.lo+1).reverse().findIndex(e=>!isNullOrUndef(e[t.axis]));r.lo-=Math.max(0,a);const s=i.slice(r.hi).findIndex(e=>!isNullOrUndef(e[t.axis]));r.hi+=Math.max(0,s)}return r}if(n._sharedOptions){const e=a[0],r="function"==typeof e.getRange&&e.getRange(t);if(r){const e=s(a,t,i-r),n=s(a,t,i+r);return{lo:e.lo,hi:n.hi}}}}return{lo:0,hi:a.length-1}}function evaluateInteractionItems(e,t,i,r,n){const a=e.getSortedVisibleDatasetMetas(),s=i[t];for(let e=0,i=a.length;e<i;++e){const{index:i,data:o}=a[e],{lo:l,hi:c}=binarySearch(a[e],t,s,n);for(let e=l;e<=c;++e){const t=o[e];t.skip||r(t,i,e)}}}function getDistanceMetricForAxis(e){const t=-1!==e.indexOf("x"),i=-1!==e.indexOf("y");return function(e,r){const n=t?Math.abs(e.x-r.x):0,a=i?Math.abs(e.y-r.y):0;return Math.sqrt(Math.pow(n,2)+Math.pow(a,2))}}function getIntersectItems(e,t,i,r,n){const a=[];if(!n&&!e.isPointInArea(t))return a;return evaluateInteractionItems(e,i,t,function(i,s,o){(n||_isPointInArea(i,e.chartArea,0))&&i.inRange(t.x,t.y,r)&&a.push({element:i,datasetIndex:s,index:o})},!0),a}function getNearestRadialItems(e,t,i,r){let n=[];return evaluateInteractionItems(e,i,t,function(e,i,a){const{startAngle:s,endAngle:o}=e.getProps(["startAngle","endAngle"],r),{angle:l}=getAngleFromPoint(e,{x:t.x,y:t.y});_angleBetween(l,s,o)&&n.push({element:e,datasetIndex:i,index:a})}),n}function getNearestCartesianItems(e,t,i,r,n,a){let s=[];const o=getDistanceMetricForAxis(i);let l=Number.POSITIVE_INFINITY;return evaluateInteractionItems(e,i,t,function(i,c,h){const p=i.inRange(t.x,t.y,n);if(r&&!p)return;const u=i.getCenterPoint(n);if(!(!!a||e.isPointInArea(u))&&!p)return;const d=o(t,u);d<l?(s=[{element:i,datasetIndex:c,index:h}],l=d):d===l&&s.push({element:i,datasetIndex:c,index:h})}),s}function getNearestItems(e,t,i,r,n,a){return a||e.isPointInArea(t)?"r"!==i||r?getNearestCartesianItems(e,t,i,r,n,a):getNearestRadialItems(e,t,i,n):[]}function getAxisItems(e,t,i,r,n){const a=[],s="x"===i?"inXRange":"inYRange";let o=!1;return evaluateInteractionItems(e,i,t,(e,r,l)=>{e[s]&&e[s](t[i],n)&&(a.push({element:e,datasetIndex:r,index:l}),o=o||e.inRange(t.x,t.y,n))}),r&&!o?[]:a}var Interaction={modes:{index(e,t,i,r){const n=getRelativePosition(t,e),a=i.axis||"x",s=i.includeInvisible||!1,o=i.intersect?getIntersectItems(e,n,a,r,s):getNearestItems(e,n,a,!1,r,s),l=[];return o.length?(e.getSortedVisibleDatasetMetas().forEach(e=>{const t=o[0].index,i=e.data[t];i&&!i.skip&&l.push({element:i,datasetIndex:e.index,index:t})}),l):[]},dataset(e,t,i,r){const n=getRelativePosition(t,e),a=i.axis||"xy",s=i.includeInvisible||!1;let o=i.intersect?getIntersectItems(e,n,a,r,s):getNearestItems(e,n,a,!1,r,s);if(o.length>0){const t=o[0].datasetIndex,i=e.getDatasetMeta(t).data;o=[];for(let e=0;e<i.length;++e)o.push({element:i[e],datasetIndex:t,index:e})}return o},point:(e,t,i,r)=>getIntersectItems(e,getRelativePosition(t,e),i.axis||"xy",r,i.includeInvisible||!1),nearest(e,t,i,r){const n=getRelativePosition(t,e),a=i.axis||"xy",s=i.includeInvisible||!1;return getNearestItems(e,n,a,i.intersect,r,s)},x:(e,t,i,r)=>getAxisItems(e,getRelativePosition(t,e),"x",i.intersect,r),y:(e,t,i,r)=>getAxisItems(e,getRelativePosition(t,e),"y",i.intersect,r)}};const STATIC_POSITIONS=["left","top","right","bottom"];function filterByPosition(e,t){return e.filter(e=>e.pos===t)}function filterDynamicPositionByAxis(e,t){return e.filter(e=>-1===STATIC_POSITIONS.indexOf(e.pos)&&e.box.axis===t)}function sortByWeight(e,t){return e.sort((e,i)=>{const r=t?i:e,n=t?e:i;return r.weight===n.weight?r.index-n.index:r.weight-n.weight})}function wrapBoxes(e){const t=[];let i,r,n,a,s,o;for(i=0,r=(e||[]).length;i<r;++i)n=e[i],({position:a,options:{stack:s,stackWeight:o=1}}=n),t.push({index:i,box:n,pos:a,horizontal:n.isHorizontal(),weight:n.weight,stack:s&&a+s,stackWeight:o});return t}function buildStacks(e){const t={};for(const i of e){const{stack:e,pos:r,stackWeight:n}=i;if(!e||!STATIC_POSITIONS.includes(r))continue;const a=t[e]||(t[e]={count:0,placed:0,weight:0,size:0});a.count++,a.weight+=n}return t}function setLayoutDims(e,t){const i=buildStacks(e),{vBoxMaxWidth:r,hBoxMaxHeight:n}=t;let a,s,o;for(a=0,s=e.length;a<s;++a){o=e[a];const{fullSize:s}=o.box,l=i[o.stack],c=l&&o.stackWeight/l.weight;o.horizontal?(o.width=c?c*r:s&&t.availableWidth,o.height=n):(o.width=r,o.height=c?c*n:s&&t.availableHeight)}return i}function buildLayoutBoxes(e){const t=wrapBoxes(e),i=sortByWeight(t.filter(e=>e.box.fullSize),!0),r=sortByWeight(filterByPosition(t,"left"),!0),n=sortByWeight(filterByPosition(t,"right")),a=sortByWeight(filterByPosition(t,"top"),!0),s=sortByWeight(filterByPosition(t,"bottom")),o=filterDynamicPositionByAxis(t,"x"),l=filterDynamicPositionByAxis(t,"y");return{fullSize:i,leftAndTop:r.concat(a),rightAndBottom:n.concat(l).concat(s).concat(o),chartArea:filterByPosition(t,"chartArea"),vertical:r.concat(n).concat(l),horizontal:a.concat(s).concat(o)}}function getCombinedMax(e,t,i,r){return Math.max(e[i],t[i])+Math.max(e[r],t[r])}function updateMaxPadding(e,t){e.top=Math.max(e.top,t.top),e.left=Math.max(e.left,t.left),e.bottom=Math.max(e.bottom,t.bottom),e.right=Math.max(e.right,t.right)}function updateDims(e,t,i,r){const{pos:n,box:a}=i,s=e.maxPadding;if(!isObject$1(n)){i.size&&(e[n]-=i.size);const t=r[i.stack]||{size:0,count:1};t.size=Math.max(t.size,i.horizontal?a.height:a.width),i.size=t.size/t.count,e[n]+=i.size}a.getPadding&&updateMaxPadding(s,a.getPadding());const o=Math.max(0,t.outerWidth-getCombinedMax(s,e,"left","right")),l=Math.max(0,t.outerHeight-getCombinedMax(s,e,"top","bottom")),c=o!==e.w,h=l!==e.h;return e.w=o,e.h=l,i.horizontal?{same:c,other:h}:{same:h,other:c}}function handleMaxPadding(e){const t=e.maxPadding;function i(i){const r=Math.max(t[i]-e[i],0);return e[i]+=r,r}e.y+=i("top"),e.x+=i("left"),i("right"),i("bottom")}function getMargins(e,t){const i=t.maxPadding;function r(e){const r={left:0,top:0,right:0,bottom:0};return e.forEach(e=>{r[e]=Math.max(t[e],i[e])}),r}return r(e?["left","right"]:["top","bottom"])}function fitBoxes(e,t,i,r){const n=[];let a,s,o,l,c,h;for(a=0,s=e.length,c=0;a<s;++a){o=e[a],l=o.box,l.update(o.width||t.w,o.height||t.h,getMargins(o.horizontal,t));const{same:s,other:p}=updateDims(t,i,o,r);c|=s&&n.length,h=h||p,l.fullSize||n.push(o)}return c&&fitBoxes(n,t,i,r)||h}function setBoxDims(e,t,i,r,n){e.top=i,e.left=t,e.right=t+r,e.bottom=i+n,e.width=r,e.height=n}function placeBoxes(e,t,i,r){const n=i.padding;let{x:a,y:s}=t;for(const o of e){const e=o.box,l=r[o.stack]||{placed:0,weight:1},c=o.stackWeight/l.weight||1;if(o.horizontal){const r=t.w*c,a=l.size||e.height;defined(l.start)&&(s=l.start),e.fullSize?setBoxDims(e,n.left,s,i.outerWidth-n.right-n.left,a):setBoxDims(e,t.left+l.placed,s,r,a),l.start=s,l.placed+=r,s=e.bottom}else{const r=t.h*c,s=l.size||e.width;defined(l.start)&&(a=l.start),e.fullSize?setBoxDims(e,a,n.top,s,i.outerHeight-n.bottom-n.top):setBoxDims(e,a,t.top+l.placed,s,r),l.start=a,l.placed+=r,a=e.right}}t.x=a,t.y=s}var layouts={addBox(e,t){e.boxes||(e.boxes=[]),t.fullSize=t.fullSize||!1,t.position=t.position||"top",t.weight=t.weight||0,t._layers=t._layers||function(){return[{z:0,draw(e){t.draw(e)}}]},e.boxes.push(t)},removeBox(e,t){const i=e.boxes?e.boxes.indexOf(t):-1;-1!==i&&e.boxes.splice(i,1)},configure(e,t,i){t.fullSize=i.fullSize,t.position=i.position,t.weight=i.weight},update(e,t,i,r){if(!e)return;const n=toPadding(e.options.layout.padding),a=Math.max(t-n.width,0),s=Math.max(i-n.height,0),o=buildLayoutBoxes(e.boxes),l=o.vertical,c=o.horizontal;each(e.boxes,e=>{"function"==typeof e.beforeLayout&&e.beforeLayout()});const h=l.reduce((e,t)=>t.box.options&&!1===t.box.options.display?e:e+1,0)||1,p=Object.freeze({outerWidth:t,outerHeight:i,padding:n,availableWidth:a,availableHeight:s,vBoxMaxWidth:a/2/h,hBoxMaxHeight:s/2}),u=Object.assign({},n);updateMaxPadding(u,toPadding(r));const d=Object.assign({maxPadding:u,w:a,h:s,x:n.left,y:n.top},n),f=setLayoutDims(l.concat(c),p);fitBoxes(o.fullSize,d,p,f),fitBoxes(l,d,p,f),fitBoxes(c,d,p,f)&&fitBoxes(l,d,p,f),handleMaxPadding(d),placeBoxes(o.leftAndTop,d,p,f),d.x+=d.w,d.y+=d.h,placeBoxes(o.rightAndBottom,d,p,f),e.chartArea={left:d.left,top:d.top,right:d.left+d.w,bottom:d.top+d.h,height:d.h,width:d.w},each(o.chartArea,t=>{const i=t.box;Object.assign(i,e.chartArea),i.update(d.w,d.h,{left:0,top:0,right:0,bottom:0})})}};class BasePlatform{acquireContext(e,t){}releaseContext(e){return!1}addEventListener(e,t,i){}removeEventListener(e,t,i){}getDevicePixelRatio(){return 1}getMaximumSize(e,t,i,r){return t=Math.max(0,t||e.width),i=i||e.height,{width:t,height:Math.max(0,r?Math.floor(t/r):i)}}isAttached(e){return!0}updateConfig(e){}}class BasicPlatform extends BasePlatform{acquireContext(e){return e&&e.getContext&&e.getContext("2d")||null}updateConfig(e){e.options.animation=!1}}const EXPANDO_KEY="$chartjs",EVENT_TYPES={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},isNullOrEmpty=e=>null===e||""===e;function initCanvas(e,t){const i=e.style,r=e.getAttribute("height"),n=e.getAttribute("width");if(e[EXPANDO_KEY]={initial:{height:r,width:n,style:{display:i.display,height:i.height,width:i.width}}},i.display=i.display||"block",i.boxSizing=i.boxSizing||"border-box",isNullOrEmpty(n)){const t=readUsedSize(e,"width");void 0!==t&&(e.width=t)}if(isNullOrEmpty(r))if(""===e.style.height)e.height=e.width/(t||2);else{const t=readUsedSize(e,"height");void 0!==t&&(e.height=t)}return e}const eventListenerOptions=!!supportsEventListenerOptions&&{passive:!0};function addListener(e,t,i){e&&e.addEventListener(t,i,eventListenerOptions)}function removeListener(e,t,i){e&&e.canvas&&e.canvas.removeEventListener(t,i,eventListenerOptions)}function fromNativeEvent(e,t){const i=EVENT_TYPES[e.type]||e.type,{x:r,y:n}=getRelativePosition(e,t);return{type:i,chart:t,native:e,x:void 0!==r?r:null,y:void 0!==n?n:null}}function nodeListContains(e,t){for(const i of e)if(i===t||i.contains(t))return!0}function createAttachObserver(e,t,i){const r=e.canvas,n=new MutationObserver(e=>{let t=!1;for(const i of e)t=t||nodeListContains(i.addedNodes,r),t=t&&!nodeListContains(i.removedNodes,r);t&&i()});return n.observe(document,{childList:!0,subtree:!0}),n}function createDetachObserver(e,t,i){const r=e.canvas,n=new MutationObserver(e=>{let t=!1;for(const i of e)t=t||nodeListContains(i.removedNodes,r),t=t&&!nodeListContains(i.addedNodes,r);t&&i()});return n.observe(document,{childList:!0,subtree:!0}),n}const drpListeningCharts=new Map;let oldDevicePixelRatio=0;function onWindowResize(){const e=window.devicePixelRatio;e!==oldDevicePixelRatio&&(oldDevicePixelRatio=e,drpListeningCharts.forEach((t,i)=>{i.currentDevicePixelRatio!==e&&t()}))}function listenDevicePixelRatioChanges(e,t){drpListeningCharts.size||window.addEventListener("resize",onWindowResize),drpListeningCharts.set(e,t)}function unlistenDevicePixelRatioChanges(e){drpListeningCharts.delete(e),drpListeningCharts.size||window.removeEventListener("resize",onWindowResize)}function createResizeObserver(e,t,i){const r=e.canvas,n=r&&_getParentNode(r);if(!n)return;const a=throttled((e,t)=>{const r=n.clientWidth;i(e,t),r<n.clientWidth&&i()},window),s=new ResizeObserver(e=>{const t=e[0],i=t.contentRect.width,r=t.contentRect.height;0===i&&0===r||a(i,r)});return s.observe(n),listenDevicePixelRatioChanges(e,a),s}function releaseObserver(e,t,i){i&&i.disconnect(),"resize"===t&&unlistenDevicePixelRatioChanges(e)}function createProxyAndListen(e,t,i){const r=e.canvas,n=throttled(t=>{null!==e.ctx&&i(fromNativeEvent(t,e))},e);return addListener(r,t,n),n}class DomPlatform extends BasePlatform{acquireContext(e,t){const i=e&&e.getContext&&e.getContext("2d");return i&&i.canvas===e?(initCanvas(e,t),i):null}releaseContext(e){const t=e.canvas;if(!t[EXPANDO_KEY])return!1;const i=t[EXPANDO_KEY].initial;["height","width"].forEach(e=>{const r=i[e];isNullOrUndef(r)?t.removeAttribute(e):t.setAttribute(e,r)});const r=i.style||{};return Object.keys(r).forEach(e=>{t.style[e]=r[e]}),t.width=t.width,delete t[EXPANDO_KEY],!0}addEventListener(e,t,i){this.removeEventListener(e,t);const r=e.$proxies||(e.$proxies={}),n={attach:createAttachObserver,detach:createDetachObserver,resize:createResizeObserver}[t]||createProxyAndListen;r[t]=n(e,t,i)}removeEventListener(e,t){const i=e.$proxies||(e.$proxies={}),r=i[t];if(!r)return;({attach:releaseObserver,detach:releaseObserver,resize:releaseObserver}[t]||removeListener)(e,t,r),i[t]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(e,t,i,r){return getMaximumSize(e,t,i,r)}isAttached(e){const t=e&&_getParentNode(e);return!(!t||!t.isConnected)}}function _detectPlatform(e){return!_isDomSupported()||"undefined"!=typeof OffscreenCanvas&&e instanceof OffscreenCanvas?BasicPlatform:DomPlatform}class Element{static defaults={};static defaultRoutes=void 0;x;y;active=!1;options;$animations;tooltipPosition(e){const{x:t,y:i}=this.getProps(["x","y"],e);return{x:t,y:i}}hasValue(){return isNumber(this.x)&&isNumber(this.y)}getProps(e,t){const i=this.$animations;if(!t||!i)return this;const r={};return e.forEach(e=>{r[e]=i[e]&&i[e].active()?i[e]._to:this[e]}),r}}function autoSkip(e,t){const i=e.options.ticks,r=determineMaxTicks(e),n=Math.min(i.maxTicksLimit||r,r),a=i.major.enabled?getMajorIndices(t):[],s=a.length,o=a[0],l=a[s-1],c=[];if(s>n)return skipMajors(t,c,a,s/n),c;const h=calculateSpacing(a,t,n);if(s>0){let e,i;const r=s>1?Math.round((l-o)/(s-1)):null;for(skip(t,c,h,isNullOrUndef(r)?0:o-r,o),e=0,i=s-1;e<i;e++)skip(t,c,h,a[e],a[e+1]);return skip(t,c,h,l,isNullOrUndef(r)?t.length:l+r),c}return skip(t,c,h),c}function determineMaxTicks(e){const t=e.options.offset,i=e._tickSize(),r=e._length/i+(t?0:1),n=e._maxLength/i;return Math.floor(Math.min(r,n))}function calculateSpacing(e,t,i){const r=getEvenSpacing(e),n=t.length/i;if(!r)return Math.max(n,1);const a=_factorize(r);for(let e=0,t=a.length-1;e<t;e++){const t=a[e];if(t>n)return t}return Math.max(n,1)}function getMajorIndices(e){const t=[];let i,r;for(i=0,r=e.length;i<r;i++)e[i].major&&t.push(i);return t}function skipMajors(e,t,i,r){let n,a=0,s=i[0];for(r=Math.ceil(r),n=0;n<e.length;n++)n===s&&(t.push(e[n]),a++,s=i[a*r])}function skip(e,t,i,r,n){const a=valueOrDefault(r,0),s=Math.min(valueOrDefault(n,e.length),e.length);let o,l,c,h=0;for(i=Math.ceil(i),n&&(o=n-r,i=o/Math.floor(o/i)),c=a;c<0;)h++,c=Math.round(a+h*i);for(l=Math.max(a,0);l<s;l++)l===c&&(t.push(e[l]),h++,c=Math.round(a+h*i))}function getEvenSpacing(e){const t=e.length;let i,r;if(t<2)return!1;for(r=e[0],i=1;i<t;++i)if(e[i]-e[i-1]!==r)return!1;return r}const reverseAlign=e=>"left"===e?"right":"right"===e?"left":e,offsetFromEdge=(e,t,i)=>"top"===t||"left"===t?e[t]+i:e[t]-i,getTicksLimit=(e,t)=>Math.min(t||e,e);function sample(e,t){const i=[],r=e.length/t,n=e.length;let a=0;for(;a<n;a+=r)i.push(e[Math.floor(a)]);return i}function getPixelForGridLine(e,t,i){const r=e.ticks.length,n=Math.min(t,r-1),a=e._startPixel,s=e._endPixel,o=1e-6;let l,c=e.getPixelForTick(n);if(!(i&&(l=1===r?Math.max(c-a,s-c):0===t?(e.getPixelForTick(1)-c)/2:(c-e.getPixelForTick(n-1))/2,c+=n<t?l:-l,c<a-o||c>s+o)))return c}function garbageCollect(e,t){each(e,e=>{const i=e.gc,r=i.length/2;let n;if(r>t){for(n=0;n<r;++n)delete e.data[i[n]];i.splice(0,r)}})}function getTickMarkLength(e){return e.drawTicks?e.tickLength:0}function getTitleHeight(e,t){if(!e.display)return 0;const i=toFont(e.font,t),r=toPadding(e.padding);return(isArray(e.text)?e.text.length:1)*i.lineHeight+r.height}function createScaleContext(e,t){return createContext(e,{scale:t,type:"scale"})}function createTickContext(e,t,i){return createContext(e,{tick:i,index:t,type:"tick"})}function titleAlign(e,t,i){let r=_toLeftRightCenter(e);return(i&&"right"!==t||!i&&"right"===t)&&(r=reverseAlign(r)),r}function titleArgs(e,t,i,r){const{top:n,left:a,bottom:s,right:o,chart:l}=e,{chartArea:c,scales:h}=l;let p,u,d,f=0;const m=s-n,g=o-a;if(e.isHorizontal()){if(u=_alignStartEnd(r,a,o),isObject$1(i)){const e=Object.keys(i)[0],r=i[e];d=h[e].getPixelForValue(r)+m-t}else d="center"===i?(c.bottom+c.top)/2+m-t:offsetFromEdge(e,i,t);p=o-a}else{if(isObject$1(i)){const e=Object.keys(i)[0],r=i[e];u=h[e].getPixelForValue(r)-g+t}else u="center"===i?(c.left+c.right)/2-g+t:offsetFromEdge(e,i,t);d=_alignStartEnd(r,s,n),f="left"===i?-HALF_PI:HALF_PI}return{titleX:u,titleY:d,maxWidth:p,rotation:f}}class Scale extends Element{constructor(e){super(),this.id=e.id,this.type=e.type,this.options=void 0,this.ctx=e.ctx,this.chart=e.chart,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this._margins={left:0,right:0,top:0,bottom:0},this.maxWidth=void 0,this.maxHeight=void 0,this.paddingTop=void 0,this.paddingBottom=void 0,this.paddingLeft=void 0,this.paddingRight=void 0,this.axis=void 0,this.labelRotation=void 0,this.min=void 0,this.max=void 0,this._range=void 0,this.ticks=[],this._gridLineItems=null,this._labelItems=null,this._labelSizes=null,this._length=0,this._maxLength=0,this._longestTextCache={},this._startPixel=void 0,this._endPixel=void 0,this._reversePixels=!1,this._userMax=void 0,this._userMin=void 0,this._suggestedMax=void 0,this._suggestedMin=void 0,this._ticksLength=0,this._borderValue=0,this._cache={},this._dataLimitsCached=!1,this.$context=void 0}init(e){this.options=e.setContext(this.getContext()),this.axis=e.axis,this._userMin=this.parse(e.min),this._userMax=this.parse(e.max),this._suggestedMin=this.parse(e.suggestedMin),this._suggestedMax=this.parse(e.suggestedMax)}parse(e,t){return e}getUserBounds(){let{_userMin:e,_userMax:t,_suggestedMin:i,_suggestedMax:r}=this;return e=finiteOrDefault(e,Number.POSITIVE_INFINITY),t=finiteOrDefault(t,Number.NEGATIVE_INFINITY),i=finiteOrDefault(i,Number.POSITIVE_INFINITY),r=finiteOrDefault(r,Number.NEGATIVE_INFINITY),{min:finiteOrDefault(e,i),max:finiteOrDefault(t,r),minDefined:isNumberFinite(e),maxDefined:isNumberFinite(t)}}getMinMax(e){let t,{min:i,max:r,minDefined:n,maxDefined:a}=this.getUserBounds();if(n&&a)return{min:i,max:r};const s=this.getMatchingVisibleMetas();for(let o=0,l=s.length;o<l;++o)t=s[o].controller.getMinMax(this,e),n||(i=Math.min(i,t.min)),a||(r=Math.max(r,t.max));return i=a&&i>r?r:i,r=n&&i>r?i:r,{min:finiteOrDefault(i,finiteOrDefault(r,i)),max:finiteOrDefault(r,finiteOrDefault(i,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 e=this.chart.data;return this.options.labels||(this.isHorizontal()?e.xLabels:e.yLabels)||e.labels||[]}getLabelItems(e=this.chart.chartArea){return this._labelItems||(this._labelItems=this._computeLabelItems(e))}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){callback(this.options.beforeUpdate,[this])}update(e,t,i){const{beginAtZero:r,grace:n,ticks:a}=this.options,s=a.sampleSize;this.beforeUpdate(),this.maxWidth=e,this.maxHeight=t,this._margins=i=Object.assign({left:0,right:0,top:0,bottom:0},i),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+i.left+i.right:this.height+i.top+i.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=_addGrace(this,n,r),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const o=s<this.ticks.length;this._convertTicksToLabels(o?sample(this.ticks,s):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),a.display&&(a.autoSkip||"auto"===a.source)&&(this.ticks=autoSkip(this,this.ticks),this._labelSizes=null,this.afterAutoSkip()),o&&this._convertTicksToLabels(this.ticks),this.beforeFit(),this.fit(),this.afterFit(),this.afterUpdate()}configure(){let e,t,i=this.options.reverse;this.isHorizontal()?(e=this.left,t=this.right):(e=this.top,t=this.bottom,i=!i),this._startPixel=e,this._endPixel=t,this._reversePixels=i,this._length=t-e,this._alignToPixels=this.options.alignToPixels}afterUpdate(){callback(this.options.afterUpdate,[this])}beforeSetDimensions(){callback(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(){callback(this.options.afterSetDimensions,[this])}_callHooks(e){this.chart.notifyPlugins(e,this.getContext()),callback(this.options[e],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){callback(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(e){const t=this.options.ticks;let i,r,n;for(i=0,r=e.length;i<r;i++)n=e[i],n.label=callback(t.callback,[n.value,i,e],this)}afterTickToLabelConversion(){callback(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){callback(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){const e=this.options,t=e.ticks,i=getTicksLimit(this.ticks.length,e.ticks.maxTicksLimit),r=t.minRotation||0,n=t.maxRotation;let a,s,o,l=r;if(!this._isVisible()||!t.display||r>=n||i<=1||!this.isHorizontal())return void(this.labelRotation=r);const c=this._getLabelSizes(),h=c.widest.width,p=c.highest.height,u=_limitValue(this.chart.width-h,0,this.maxWidth);a=e.offset?this.maxWidth/i:u/(i-1),h+6>a&&(a=u/(i-(e.offset?.5:1)),s=this.maxHeight-getTickMarkLength(e.grid)-t.padding-getTitleHeight(e.title,this.chart.options.font),o=Math.sqrt(h*h+p*p),l=toDegrees(Math.min(Math.asin(_limitValue((c.highest.height+6)/a,-1,1)),Math.asin(_limitValue(s/o,-1,1))-Math.asin(_limitValue(p/o,-1,1)))),l=Math.max(r,Math.min(n,l))),this.labelRotation=l}afterCalculateLabelRotation(){callback(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){callback(this.options.beforeFit,[this])}fit(){const e={width:0,height:0},{chart:t,options:{ticks:i,title:r,grid:n}}=this,a=this._isVisible(),s=this.isHorizontal();if(a){const a=getTitleHeight(r,t.options.font);if(s?(e.width=this.maxWidth,e.height=getTickMarkLength(n)+a):(e.height=this.maxHeight,e.width=getTickMarkLength(n)+a),i.display&&this.ticks.length){const{first:t,last:r,widest:n,highest:a}=this._getLabelSizes(),o=2*i.padding,l=toRadians(this.labelRotation),c=Math.cos(l),h=Math.sin(l);if(s){const t=i.mirror?0:h*n.width+c*a.height;e.height=Math.min(this.maxHeight,e.height+t+o)}else{const t=i.mirror?0:c*n.width+h*a.height;e.width=Math.min(this.maxWidth,e.width+t+o)}this._calculatePadding(t,r,h,c)}}this._handleMargins(),s?(this.width=this._length=t.width-this._margins.left-this._margins.right,this.height=e.height):(this.width=e.width,this.height=this._length=t.height-this._margins.top-this._margins.bottom)}_calculatePadding(e,t,i,r){const{ticks:{align:n,padding:a},position:s}=this.options,o=0!==this.labelRotation,l="top"!==s&&"x"===this.axis;if(this.isHorizontal()){const s=this.getPixelForTick(0)-this.left,c=this.right-this.getPixelForTick(this.ticks.length-1);let h=0,p=0;o?l?(h=r*e.width,p=i*t.height):(h=i*e.height,p=r*t.width):"start"===n?p=t.width:"end"===n?h=e.width:"inner"!==n&&(h=e.width/2,p=t.width/2),this.paddingLeft=Math.max((h-s+a)*this.width/(this.width-s),0),this.paddingRight=Math.max((p-c+a)*this.width/(this.width-c),0)}else{let i=t.height/2,r=e.height/2;"start"===n?(i=0,r=e.height):"end"===n&&(i=t.height,r=0),this.paddingTop=i+a,this.paddingBottom=r+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(){callback(this.options.afterFit,[this])}isHorizontal(){const{axis:e,position:t}=this.options;return"top"===t||"bottom"===t||"x"===e}isFullSize(){return this.options.fullSize}_convertTicksToLabels(e){let t,i;for(this.beforeTickToLabelConversion(),this.generateTickLabels(e),t=0,i=e.length;t<i;t++)isNullOrUndef(e[t].label)&&(e.splice(t,1),i--,t--);this.afterTickToLabelConversion()}_getLabelSizes(){let e=this._labelSizes;if(!e){const t=this.options.ticks.sampleSize;let i=this.ticks;t<i.length&&(i=sample(i,t)),this._labelSizes=e=this._computeLabelSizes(i,i.length,this.options.ticks.maxTicksLimit)}return e}_computeLabelSizes(e,t,i){const{ctx:r,_longestTextCache:n}=this,a=[],s=[],o=Math.floor(t/getTicksLimit(t,i));let l,c,h,p,u,d,f,m,g,v,y,b=0,x=0;for(l=0;l<t;l+=o){if(p=e[l].label,u=this._resolveTickFontOptions(l),r.font=d=u.string,f=n[d]=n[d]||{data:{},gc:[]},m=u.lineHeight,g=v=0,isNullOrUndef(p)||isArray(p)){if(isArray(p))for(c=0,h=p.length;c<h;++c)y=p[c],isNullOrUndef(y)||isArray(y)||(g=_measureText(r,f.data,f.gc,g,y),v+=m)}else g=_measureText(r,f.data,f.gc,g,p),v=m;a.push(g),s.push(v),b=Math.max(g,b),x=Math.max(v,x)}garbageCollect(n,t);const _=a.indexOf(b),S=s.indexOf(x),w=e=>({width:a[e]||0,height:s[e]||0});return{first:w(0),last:w(t-1),widest:w(_),highest:w(S),widths:a,heights:s}}getLabelForValue(e){return e}getPixelForValue(e,t){return NaN}getValueForPixel(e){}getPixelForTick(e){const t=this.ticks;return e<0||e>t.length-1?null:this.getPixelForValue(t[e].value)}getPixelForDecimal(e){this._reversePixels&&(e=1-e);const t=this._startPixel+e*this._length;return _int16Range(this._alignToPixels?_alignPixel(this.chart,t,0):t)}getDecimalForPixel(e){const t=(e-this._startPixel)/this._length;return this._reversePixels?1-t:t}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:e,max:t}=this;return e<0&&t<0?t:e>0&&t>0?e:0}getContext(e){const t=this.ticks||[];if(e>=0&&e<t.length){const i=t[e];return i.$context||(i.$context=createTickContext(this.getContext(),e,i))}return this.$context||(this.$context=createScaleContext(this.chart.getContext(),this))}_tickSize(){const e=this.options.ticks,t=toRadians(this.labelRotation),i=Math.abs(Math.cos(t)),r=Math.abs(Math.sin(t)),n=this._getLabelSizes(),a=e.autoSkipPadding||0,s=n?n.widest.width+a:0,o=n?n.highest.height+a:0;return this.isHorizontal()?o*i>s*r?s/i:o/r:o*r<s*i?o/i:s/r}_isVisible(){const e=this.options.display;return"auto"!==e?!!e:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(e){const t=this.axis,i=this.chart,r=this.options,{grid:n,position:a,border:s}=r,o=n.offset,l=this.isHorizontal(),c=this.ticks.length+(o?1:0),h=getTickMarkLength(n),p=[],u=s.setContext(this.getContext()),d=u.display?u.width:0,f=d/2,m=function(e){return _alignPixel(i,e,d)};let g,v,y,b,x,_,S,w,C,P,E,k;if("top"===a)g=m(this.bottom),_=this.bottom-h,w=g-f,P=m(e.top)+f,k=e.bottom;else if("bottom"===a)g=m(this.top),P=e.top,k=m(e.bottom)-f,_=g+f,w=this.top+h;else if("left"===a)g=m(this.right),x=this.right-h,S=g-f,C=m(e.left)+f,E=e.right;else if("right"===a)g=m(this.left),C=e.left,E=m(e.right)-f,x=g+f,S=this.left+h;else if("x"===t){if("center"===a)g=m((e.top+e.bottom)/2+.5);else if(isObject$1(a)){const e=Object.keys(a)[0],t=a[e];g=m(this.chart.scales[e].getPixelForValue(t))}P=e.top,k=e.bottom,_=g+f,w=_+h}else if("y"===t){if("center"===a)g=m((e.left+e.right)/2);else if(isObject$1(a)){const e=Object.keys(a)[0],t=a[e];g=m(this.chart.scales[e].getPixelForValue(t))}x=g-f,S=x-h,C=e.left,E=e.right}const $=valueOrDefault(r.ticks.maxTicksLimit,c),A=Math.max(1,Math.ceil(c/$));for(v=0;v<c;v+=A){const e=this.getContext(v),t=n.setContext(e),r=s.setContext(e),a=t.lineWidth,c=t.color,h=r.dash||[],u=r.dashOffset,d=t.tickWidth,f=t.tickColor,m=t.tickBorderDash||[],g=t.tickBorderDashOffset;y=getPixelForGridLine(this,v,o),void 0!==y&&(b=_alignPixel(i,y,a),l?x=S=C=E=b:_=w=P=k=b,p.push({tx1:x,ty1:_,tx2:S,ty2:w,x1:C,y1:P,x2:E,y2:k,width:a,color:c,borderDash:h,borderDashOffset:u,tickWidth:d,tickColor:f,tickBorderDash:m,tickBorderDashOffset:g}))}return this._ticksLength=c,this._borderValue=g,p}_computeLabelItems(e){const t=this.axis,i=this.options,{position:r,ticks:n}=i,a=this.isHorizontal(),s=this.ticks,{align:o,crossAlign:l,padding:c,mirror:h}=n,p=getTickMarkLength(i.grid),u=p+c,d=h?-c:u,f=-toRadians(this.labelRotation),m=[];let g,v,y,b,x,_,S,w,C,P,E,k,$="middle";if("top"===r)_=this.bottom-d,S=this._getXAxisLabelAlignment();else if("bottom"===r)_=this.top+d,S=this._getXAxisLabelAlignment();else if("left"===r){const e=this._getYAxisLabelAlignment(p);S=e.textAlign,x=e.x}else if("right"===r){const e=this._getYAxisLabelAlignment(p);S=e.textAlign,x=e.x}else if("x"===t){if("center"===r)_=(e.top+e.bottom)/2+u;else if(isObject$1(r)){const e=Object.keys(r)[0],t=r[e];_=this.chart.scales[e].getPixelForValue(t)+u}S=this._getXAxisLabelAlignment()}else if("y"===t){if("center"===r)x=(e.left+e.right)/2-u;else if(isObject$1(r)){const e=Object.keys(r)[0],t=r[e];x=this.chart.scales[e].getPixelForValue(t)}S=this._getYAxisLabelAlignment(p).textAlign}"y"===t&&("start"===o?$="top":"end"===o&&($="bottom"));const A=this._getLabelSizes();for(g=0,v=s.length;g<v;++g){y=s[g],b=y.label;const e=n.setContext(this.getContext(g));w=this.getPixelForTick(g)+n.labelOffset,C=this._resolveTickFontOptions(g),P=C.lineHeight,E=isArray(b)?b.length:1;const t=E/2,i=e.color,o=e.textStrokeColor,c=e.textStrokeWidth;let p,u=S;if(a?(x=w,"inner"===S&&(u=g===v-1?this.options.reverse?"left":"right":0===g?this.options.reverse?"right":"left":"center"),k="top"===r?"near"===l||0!==f?-E*P+P/2:"center"===l?-A.highest.height/2-t*P+P:-A.highest.height+P/2:"near"===l||0!==f?P/2:"center"===l?A.highest.height/2-t*P:A.highest.height-E*P,h&&(k*=-1),0===f||e.showLabelBackdrop||(x+=P/2*Math.sin(f))):(_=w,k=(1-E)*P/2),e.showLabelBackdrop){const t=toPadding(e.backdropPadding),i=A.heights[g],r=A.widths[g];let n=k-t.top,a=0-t.left;switch($){case"middle":n-=i/2;break;case"bottom":n-=i}switch(S){case"center":a-=r/2;break;case"right":a-=r;break;case"inner":g===v-1?a-=r:g>0&&(a-=r/2)}p={left:a,top:n,width:r+t.width,height:i+t.height,color:e.backdropColor}}m.push({label:b,font:C,textOffset:k,options:{rotation:f,color:i,strokeColor:o,strokeWidth:c,textAlign:u,textBaseline:$,translation:[x,_],backdrop:p}})}return m}_getXAxisLabelAlignment(){const{position:e,ticks:t}=this.options;if(-toRadians(this.labelRotation))return"top"===e?"left":"right";let i="center";return"start"===t.align?i="left":"end"===t.align?i="right":"inner"===t.align&&(i="inner"),i}_getYAxisLabelAlignment(e){const{position:t,ticks:{crossAlign:i,mirror:r,padding:n}}=this.options,a=e+n,s=this._getLabelSizes().widest.width;let o,l;return"left"===t?r?(l=this.right+n,"near"===i?o="left":"center"===i?(o="center",l+=s/2):(o="right",l+=s)):(l=this.right-a,"near"===i?o="right":"center"===i?(o="center",l-=s/2):(o="left",l=this.left)):"right"===t?r?(l=this.left+n,"near"===i?o="right":"center"===i?(o="center",l-=s/2):(o="left",l-=s)):(l=this.left+a,"near"===i?o="left":"center"===i?(o="center",l+=s/2):(o="right",l=this.right)):o="right",{textAlign:o,x:l}}_computeLabelArea(){if(this.options.ticks.mirror)return;const e=this.chart,t=this.options.position;return"left"===t||"right"===t?{top:0,left:this.left,bottom:e.height,right:this.right}:"top"===t||"bottom"===t?{top:this.top,left:0,bottom:this.bottom,right:e.width}:void 0}drawBackground(){const{ctx:e,options:{backgroundColor:t},left:i,top:r,width:n,height:a}=this;t&&(e.save(),e.fillStyle=t,e.fillRect(i,r,n,a),e.restore())}getLineWidthForValue(e){const t=this.options.grid;if(!this._isVisible()||!t.display)return 0;const i=this.ticks.findIndex(t=>t.value===e);if(i>=0){return t.setContext(this.getContext(i)).lineWidth}return 0}drawGrid(e){const t=this.options.grid,i=this.ctx,r=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(e));let n,a;const s=(e,t,r)=>{r.width&&r.color&&(i.save(),i.lineWidth=r.width,i.strokeStyle=r.color,i.setLineDash(r.borderDash||[]),i.lineDashOffset=r.borderDashOffset,i.beginPath(),i.moveTo(e.x,e.y),i.lineTo(t.x,t.y),i.stroke(),i.restore())};if(t.display)for(n=0,a=r.length;n<a;++n){const e=r[n];t.drawOnChartArea&&s({x:e.x1,y:e.y1},{x:e.x2,y:e.y2},e),t.drawTicks&&s({x:e.tx1,y:e.ty1},{x:e.tx2,y:e.ty2},{color:e.tickColor,width:e.tickWidth,borderDash:e.tickBorderDash,borderDashOffset:e.tickBorderDashOffset})}}drawBorder(){const{chart:e,ctx:t,options:{border:i,grid:r}}=this,n=i.setContext(this.getContext()),a=i.display?n.width:0;if(!a)return;const s=r.setContext(this.getContext(0)).lineWidth,o=this._borderValue;let l,c,h,p;this.isHorizontal()?(l=_alignPixel(e,this.left,a)-a/2,c=_alignPixel(e,this.right,s)+s/2,h=p=o):(h=_alignPixel(e,this.top,a)-a/2,p=_alignPixel(e,this.bottom,s)+s/2,l=c=o),t.save(),t.lineWidth=n.width,t.strokeStyle=n.color,t.beginPath(),t.moveTo(l,h),t.lineTo(c,p),t.stroke(),t.restore()}drawLabels(e){if(!this.options.ticks.display)return;const t=this.ctx,i=this._computeLabelArea();i&&clipArea(t,i);const r=this.getLabelItems(e);for(const e of r){const i=e.options,r=e.font;renderText(t,e.label,0,e.textOffset,r,i)}i&&unclipArea(t)}drawTitle(){const{ctx:e,options:{position:t,title:i,reverse:r}}=this;if(!i.display)return;const n=toFont(i.font),a=toPadding(i.padding),s=i.align;let o=n.lineHeight/2;"bottom"===t||"center"===t||isObject$1(t)?(o+=a.bottom,isArray(i.text)&&(o+=n.lineHeight*(i.text.length-1))):o+=a.top;const{titleX:l,titleY:c,maxWidth:h,rotation:p}=titleArgs(this,o,t,s);renderText(e,i.text,0,0,n,{color:i.color,maxWidth:h,rotation:p,textAlign:titleAlign(s,t,r),textBaseline:"middle",translation:[l,c]})}draw(e){this._isVisible()&&(this.drawBackground(),this.drawGrid(e),this.drawBorder(),this.drawTitle(),this.drawLabels(e))}_layers(){const e=this.options,t=e.ticks&&e.ticks.z||0,i=valueOrDefault(e.grid&&e.grid.z,-1),r=valueOrDefault(e.border&&e.border.z,0);return this._isVisible()&&this.draw===Scale.prototype.draw?[{z:i,draw:e=>{this.drawBackground(),this.drawGrid(e),this.drawTitle()}},{z:r,draw:()=>{this.drawBorder()}},{z:t,draw:e=>{this.drawLabels(e)}}]:[{z:t,draw:e=>{this.draw(e)}}]}getMatchingVisibleMetas(e){const t=this.chart.getSortedVisibleDatasetMetas(),i=this.axis+"AxisID",r=[];let n,a;for(n=0,a=t.length;n<a;++n){const a=t[n];a[i]!==this.id||e&&a.type!==e||r.push(a)}return r}_resolveTickFontOptions(e){return toFont(this.options.ticks.setContext(this.getContext(e)).font)}_maxDigits(){const e=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/e}}class TypedRegistry{constructor(e,t,i){this.type=e,this.scope=t,this.override=i,this.items=Object.create(null)}isForType(e){return Object.prototype.isPrototypeOf.call(this.type.prototype,e.prototype)}register(e){const t=Object.getPrototypeOf(e);let i;isIChartComponent(t)&&(i=this.register(t));const r=this.items,n=e.id,a=this.scope+"."+n;if(!n)throw new Error("class does not have id: "+e);return n in r||(r[n]=e,registerDefaults(e,a,i),this.override&&defaults.override(e.id,e.overrides)),a}get(e){return this.items[e]}unregister(e){const t=this.items,i=e.id,r=this.scope;i in t&&delete t[i],r&&i in defaults[r]&&(delete defaults[r][i],this.override&&delete overrides[i])}}function registerDefaults(e,t,i){const r=merge(Object.create(null),[i?defaults.get(i):{},defaults.get(t),e.defaults]);defaults.set(t,r),e.defaultRoutes&&routeDefaults(t,e.defaultRoutes),e.descriptors&&defaults.describe(t,e.descriptors)}function routeDefaults(e,t){Object.keys(t).forEach(i=>{const r=i.split("."),n=r.pop(),a=[e].concat(r).join("."),s=t[i].split("."),o=s.pop(),l=s.join(".");defaults.route(a,n,l,o)})}function isIChartComponent(e){return"id"in e&&"defaults"in e}class Registry{constructor(){this.controllers=new TypedRegistry(DatasetController,"datasets",!0),this.elements=new TypedRegistry(Element,"elements"),this.plugins=new TypedRegistry(Object,"plugins"),this.scales=new TypedRegistry(Scale,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...e){this._each("register",e)}remove(...e){this._each("unregister",e)}addControllers(...e){this._each("register",e,this.controllers)}addElements(...e){this._each("register",e,this.elements)}addPlugins(...e){this._each("register",e,this.plugins)}addScales(...e){this._each("register",e,this.scales)}getController(e){return this._get(e,this.controllers,"controller")}getElement(e){return this._get(e,this.elements,"element")}getPlugin(e){return this._get(e,this.plugins,"plugin")}getScale(e){return this._get(e,this.scales,"scale")}removeControllers(...e){this._each("unregister",e,this.controllers)}removeElements(...e){this._each("unregister",e,this.elements)}removePlugins(...e){this._each("unregister",e,this.plugins)}removeScales(...e){this._each("unregister",e,this.scales)}_each(e,t,i){[...t].forEach(t=>{const r=i||this._getRegistryForType(t);i||r.isForType(t)||r===this.plugins&&t.id?this._exec(e,r,t):each(t,t=>{const r=i||this._getRegistryForType(t);this._exec(e,r,t)})})}_exec(e,t,i){const r=_capitalize(e);callback(i["before"+r],[],i),t[e](i),callback(i["after"+r],[],i)}_getRegistryForType(e){for(let t=0;t<this._typedRegistries.length;t++){const i=this._typedRegistries[t];if(i.isForType(e))return i}return this.plugins}_get(e,t,i){const r=t.get(e);if(void 0===r)throw new Error('"'+e+'" is not a registered '+i+".");return r}}var registry=new Registry;class PluginService{constructor(){this._init=void 0}notify(e,t,i,r){if("beforeInit"===t&&(this._init=this._createDescriptors(e,!0),this._notify(this._init,e,"install")),void 0===this._init)return;const n=r?this._descriptors(e).filter(r):this._descriptors(e),a=this._notify(n,e,t,i);return"afterDestroy"===t&&(this._notify(n,e,"stop"),this._notify(this._init,e,"uninstall"),this._init=void 0),a}_notify(e,t,i,r){r=r||{};for(const n of e){const e=n.plugin;if(!1===callback(e[i],[t,r,n.options],e)&&r.cancelable)return!1}return!0}invalidate(){isNullOrUndef(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(e){if(this._cache)return this._cache;const t=this._cache=this._createDescriptors(e);return this._notifyStateChanges(e),t}_createDescriptors(e,t){const i=e&&e.config,r=valueOrDefault(i.options&&i.options.plugins,{}),n=allPlugins(i);return!1!==r||t?createDescriptors(e,n,r,t):[]}_notifyStateChanges(e){const t=this._oldCache||[],i=this._cache,r=(e,t)=>e.filter(e=>!t.some(t=>e.plugin.id===t.plugin.id));this._notify(r(t,i),e,"stop"),this._notify(r(i,t),e,"start")}}function allPlugins(e){const t={},i=[],r=Object.keys(registry.plugins.items);for(let e=0;e<r.length;e++)i.push(registry.getPlugin(r[e]));const n=e.plugins||[];for(let e=0;e<n.length;e++){const r=n[e];-1===i.indexOf(r)&&(i.push(r),t[r.id]=!0)}return{plugins:i,localIds:t}}function getOpts(e,t){return t||!1!==e?!0===e?{}:e:null}function createDescriptors(e,{plugins:t,localIds:i},r,n){const a=[],s=e.getContext();for(const o of t){const t=o.id,l=getOpts(r[t],n);null!==l&&a.push({plugin:o,options:pluginOpts(e.config,{plugin:o,local:i[t]},l,s)})}return a}function pluginOpts(e,{plugin:t,local:i},r,n){const a=e.pluginScopeKeys(t),s=e.getOptionScopes(r,a);return i&&t.defaults&&s.push(t.defaults),e.createResolver(s,n,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function getIndexAxis(e,t){const i=defaults.datasets[e]||{};return((t.datasets||{})[e]||{}).indexAxis||t.indexAxis||i.indexAxis||"x"}function getAxisFromDefaultScaleID(e,t){let i=e;return"_index_"===e?i=t:"_value_"===e&&(i="x"===t?"y":"x"),i}function getDefaultScaleIDFromAxis(e,t){return e===t?"_index_":"_value_"}function idMatchesAxis(e){if("x"===e||"y"===e||"r"===e)return e}function axisFromPosition(e){return"top"===e||"bottom"===e?"x":"left"===e||"right"===e?"y":void 0}function determineAxis(e,...t){if(idMatchesAxis(e))return e;for(const i of t){const t=i.axis||axisFromPosition(i.position)||e.length>1&&idMatchesAxis(e[0].toLowerCase());if(t)return t}throw new Error(`Cannot determine type of '${e}' axis. Please provide 'axis' or 'position' option.`)}function getAxisFromDataset(e,t,i){if(i[t+"AxisID"]===e)return{axis:t}}function retrieveAxisFromDatasets(e,t){if(t.data&&t.data.datasets){const i=t.data.datasets.filter(t=>t.xAxisID===e||t.yAxisID===e);if(i.length)return getAxisFromDataset(e,"x",i[0])||getAxisFromDataset(e,"y",i[0])}return{}}function mergeScaleConfig(e,t){const i=overrides[e.type]||{scales:{}},r=t.scales||{},n=getIndexAxis(e.type,t),a=Object.create(null);return Object.keys(r).forEach(t=>{const s=r[t];if(!isObject$1(s))return console.error(`Invalid scale configuration for scale: ${t}`);if(s._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${t}`);const o=determineAxis(t,s,retrieveAxisFromDatasets(t,e),defaults.scales[s.type]),l=getDefaultScaleIDFromAxis(o,n),c=i.scales||{};a[t]=mergeIf(Object.create(null),[{axis:o},s,c[o],c[l]])}),e.data.datasets.forEach(i=>{const n=i.type||e.type,s=i.indexAxis||getIndexAxis(n,t),o=(overrides[n]||{}).scales||{};Object.keys(o).forEach(e=>{const t=getAxisFromDefaultScaleID(e,s),n=i[t+"AxisID"]||t;a[n]=a[n]||Object.create(null),mergeIf(a[n],[{axis:t},r[n],o[e]])})}),Object.keys(a).forEach(e=>{const t=a[e];mergeIf(t,[defaults.scales[t.type],defaults.scale])}),a}function initOptions(e){const t=e.options||(e.options={});t.plugins=valueOrDefault(t.plugins,{}),t.scales=mergeScaleConfig(e,t)}function initData(e){return(e=e||{}).datasets=e.datasets||[],e.labels=e.labels||[],e}function initConfig(e){return(e=e||{}).data=initData(e.data),initOptions(e),e}const keyCache=new Map,keysCached=new Set;function cachedKeys(e,t){let i=keyCache.get(e);return i||(i=t(),keyCache.set(e,i),keysCached.add(i)),i}const addIfFound=(e,t,i)=>{const r=resolveObjectKey(t,i);void 0!==r&&e.add(r)};class Config{constructor(e){this._config=initConfig(e),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(e){this._config.type=e}get data(){return this._config.data}set data(e){this._config.data=initData(e)}get options(){return this._config.options}set options(e){this._config.options=e}get plugins(){return this._config.plugins}update(){const e=this._config;this.clearCache(),initOptions(e)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(e){return cachedKeys(e,()=>[[`datasets.${e}`,""]])}datasetAnimationScopeKeys(e,t){return cachedKeys(`${e}.transition.${t}`,()=>[[`datasets.${e}.transitions.${t}`,`transitions.${t}`],[`datasets.${e}`,""]])}datasetElementScopeKeys(e,t){return cachedKeys(`${e}-${t}`,()=>[[`datasets.${e}.elements.${t}`,`datasets.${e}`,`elements.${t}`,""]])}pluginScopeKeys(e){const t=e.id;return cachedKeys(`${this.type}-plugin-${t}`,()=>[[`plugins.${t}`,...e.additionalOptionScopes||[]]])}_cachedScopes(e,t){const i=this._scopeCache;let r=i.get(e);return r&&!t||(r=new Map,i.set(e,r)),r}getOptionScopes(e,t,i){const{options:r,type:n}=this,a=this._cachedScopes(e,i),s=a.get(t);if(s)return s;const o=new Set;t.forEach(t=>{e&&(o.add(e),t.forEach(t=>addIfFound(o,e,t))),t.forEach(e=>addIfFound(o,r,e)),t.forEach(e=>addIfFound(o,overrides[n]||{},e)),t.forEach(e=>addIfFound(o,defaults,e)),t.forEach(e=>addIfFound(o,descriptors,e))});const l=Array.from(o);return 0===l.length&&l.push(Object.create(null)),keysCached.has(t)&&a.set(t,l),l}chartOptionScopes(){const{options:e,type:t}=this;return[e,overrides[t]||{},defaults.datasets[t]||{},{type:t},defaults,descriptors]}resolveNamedOptions(e,t,i,r=[""]){const n={$shared:!0},{resolver:a,subPrefixes:s}=getResolver(this._resolverCache,e,r);let o=a;if(needContext(a,t)){n.$shared=!1;o=_attachContext(a,i=isFunction(i)?i():i,this.createResolver(e,i,s))}for(const e of t)n[e]=o[e];return n}createResolver(e,t,i=[""],r){const{resolver:n}=getResolver(this._resolverCache,e,i);return isObject$1(t)?_attachContext(n,t,void 0,r):n}}function getResolver(e,t,i){let r=e.get(t);r||(r=new Map,e.set(t,r));const n=i.join();let a=r.get(n);if(!a){a={resolver:_createResolver(t,i),subPrefixes:i.filter(e=>!e.toLowerCase().includes("hover"))},r.set(n,a)}return a}const hasFunction=e=>isObject$1(e)&&Object.getOwnPropertyNames(e).some(t=>isFunction(e[t]));function needContext(e,t){const{isScriptable:i,isIndexable:r}=_descriptors(e);for(const n of t){const t=i(n),a=r(n),s=(a||t)&&e[n];if(t&&(isFunction(s)||hasFunction(s))||a&&isArray(s))return!0}return!1}var version="4.5.1";const KNOWN_POSITIONS=["top","bottom","left","right","chartArea"];function positionIsHorizontal(e,t){return"top"===e||"bottom"===e||-1===KNOWN_POSITIONS.indexOf(e)&&"x"===t}function compare2Level(e,t){return function(i,r){return i[e]===r[e]?i[t]-r[t]:i[e]-r[e]}}function onAnimationsComplete(e){const t=e.chart,i=t.options.animation;t.notifyPlugins("afterRender"),callback(i&&i.onComplete,[e],t)}function onAnimationProgress(e){const t=e.chart,i=t.options.animation;callback(i&&i.onProgress,[e],t)}function getCanvas(e){return _isDomSupported()&&"string"==typeof e?e=document.getElementById(e):e&&e.length&&(e=e[0]),e&&e.canvas&&(e=e.canvas),e}const instances={},getChart=e=>{const t=getCanvas(e);return Object.values(instances).filter(e=>e.canvas===t).pop()};function moveNumericKeys(e,t,i){const r=Object.keys(e);for(const n of r){const r=+n;if(r>=t){const a=e[n];delete e[n],(i>0||r>t)&&(e[r+i]=a)}}}function determineLastEvent(e,t,i,r){return i&&"mouseout"!==e.type?r?t:e:null}class Chart{static defaults=defaults;static instances=instances;static overrides=overrides;static registry=registry;static version=version;static getChart=getChart;static register(...e){registry.add(...e),invalidatePlugins()}static unregister(...e){registry.remove(...e),invalidatePlugins()}constructor(e,t){const i=this.config=new Config(t),r=getCanvas(e),n=getChart(r);if(n)throw new Error("Canvas is already in use. Chart with ID '"+n.id+"' must be destroyed before the canvas with ID '"+n.canvas.id+"' can be reused.");const a=i.createResolver(i.chartOptionScopes(),this.getContext());this.platform=new(i.platform||_detectPlatform(r)),this.platform.updateConfig(i);const s=this.platform.acquireContext(r,a.aspectRatio),o=s&&s.canvas,l=o&&o.height,c=o&&o.width;this.id=uid(),this.ctx=s,this.canvas=o,this.width=c,this.height=l,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 PluginService,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=debounce(e=>this.update(e),a.resizeDelay||0),this._dataChanges=[],instances[this.id]=this,s&&o?(animator.listen(this,"complete",onAnimationsComplete),animator.listen(this,"progress",onAnimationProgress),this._initialize(),this.attached&&this.update()):console.error("Failed to create chart: can't acquire context from the given item")}get aspectRatio(){const{options:{aspectRatio:e,maintainAspectRatio:t},width:i,height:r,_aspectRatio:n}=this;return isNullOrUndef(e)?t&&n?n:r?i/r:null:e}get data(){return this.config.data}set data(e){this.config.data=e}get options(){return this._options}set options(e){this.config.options=e}get registry(){return registry}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():retinaScale(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return clearCanvas(this.canvas,this.ctx),this}stop(){return animator.stop(this),this}resize(e,t){animator.running(this)?this._resizeBeforeDraw={width:e,height:t}:this._resize(e,t)}_resize(e,t){const i=this.options,r=this.canvas,n=i.maintainAspectRatio&&this.aspectRatio,a=this.platform.getMaximumSize(r,e,t,n),s=i.devicePixelRatio||this.platform.getDevicePixelRatio(),o=this.width?"resize":"attach";this.width=a.width,this.height=a.height,this._aspectRatio=this.aspectRatio,retinaScale(this,s,!0)&&(this.notifyPlugins("resize",{size:a}),callback(i.onResize,[this,a],this),this.attached&&this._doResize(o)&&this.render())}ensureScalesHaveIDs(){each(this.options.scales||{},(e,t)=>{e.id=t})}buildOrUpdateScales(){const e=this.options,t=e.scales,i=this.scales,r=Object.keys(i).reduce((e,t)=>(e[t]=!1,e),{});let n=[];t&&(n=n.concat(Object.keys(t).map(e=>{const i=t[e],r=determineAxis(e,i),n="r"===r,a="x"===r;return{options:i,dposition:n?"chartArea":a?"bottom":"left",dtype:n?"radialLinear":a?"category":"linear"}}))),each(n,t=>{const n=t.options,a=n.id,s=determineAxis(a,n),o=valueOrDefault(n.type,t.dtype);void 0!==n.position&&positionIsHorizontal(n.position,s)===positionIsHorizontal(t.dposition)||(n.position=t.dposition),r[a]=!0;let l=null;if(a in i&&i[a].type===o)l=i[a];else{l=new(registry.getScale(o))({id:a,type:o,ctx:this.ctx,chart:this}),i[l.id]=l}l.init(n,e)}),each(r,(e,t)=>{e||delete i[t]}),each(i,e=>{layouts.configure(this,e,e.options),layouts.addBox(this,e)})}_updateMetasets(){const e=this._metasets,t=this.data.datasets.length,i=e.length;if(e.sort((e,t)=>e.index-t.index),i>t){for(let e=t;e<i;++e)this._destroyDatasetMeta(e);e.splice(t,i-t)}this._sortedMetasets=e.slice(0).sort(compare2Level("order","index"))}_removeUnreferencedMetasets(){const{_metasets:e,data:{datasets:t}}=this;e.length>t.length&&delete this._stacks,e.forEach((e,i)=>{0===t.filter(t=>t===e._dataset).length&&this._destroyDatasetMeta(i)})}buildOrUpdateControllers(){const e=[],t=this.data.datasets;let i,r;for(this._removeUnreferencedMetasets(),i=0,r=t.length;i<r;i++){const r=t[i];let n=this.getDatasetMeta(i);const a=r.type||this.config.type;if(n.type&&n.type!==a&&(this._destroyDatasetMeta(i),n=this.getDatasetMeta(i)),n.type=a,n.indexAxis=r.indexAxis||getIndexAxis(a,this.options),n.order=r.order||0,n.index=i,n.label=""+r.label,n.visible=this.isDatasetVisible(i),n.controller)n.controller.updateIndex(i),n.controller.linkScales();else{const t=registry.getController(a),{datasetElementType:r,dataElementType:s}=defaults.datasets[a];Object.assign(t,{dataElementType:registry.getElement(s),datasetElementType:r&&registry.getElement(r)}),n.controller=new t(this,i),e.push(n.controller)}}return this._updateMetasets(),e}_resetElements(){each(this.data.datasets,(e,t)=>{this.getDatasetMeta(t).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(e){const t=this.config;t.update();const i=this._options=t.createResolver(t.chartOptionScopes(),this.getContext()),r=this._animationsDisabled=!i.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),!1===this.notifyPlugins("beforeUpdate",{mode:e,cancelable:!0}))return;const n=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let a=0;for(let e=0,t=this.data.datasets.length;e<t;e++){const{controller:t}=this.getDatasetMeta(e),i=!r&&-1===n.indexOf(t);t.buildOrUpdateElements(i),a=Math.max(+t.getMaxOverflow(),a)}a=this._minPadding=i.layout.autoPadding?a:0,this._updateLayout(a),r||each(n,e=>{e.reset()}),this._updateDatasets(e),this.notifyPlugins("afterUpdate",{mode:e}),this._layers.sort(compare2Level("z","_idx"));const{_active:s,_lastEvent:o}=this;o?this._eventHandler(o,!0):s.length&&this._updateHoverStyles(s,s,!0),this.render()}_updateScales(){each(this.scales,e=>{layouts.removeBox(this,e)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const e=this.options,t=new Set(Object.keys(this._listeners)),i=new Set(e.events);setsEqual(t,i)&&!!this._responsiveListeners===e.responsive||(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:e}=this,t=this._getUniformDataChanges()||[];for(const{method:i,start:r,count:n}of t){moveNumericKeys(e,r,"_removeElements"===i?-n:n)}}_getUniformDataChanges(){const e=this._dataChanges;if(!e||!e.length)return;this._dataChanges=[];const t=this.data.datasets.length,i=t=>new Set(e.filter(e=>e[0]===t).map((e,t)=>t+","+e.splice(1).join(","))),r=i(0);for(let e=1;e<t;e++)if(!setsEqual(r,i(e)))return;return Array.from(r).map(e=>e.split(",")).map(e=>({method:e[1],start:+e[2],count:+e[3]}))}_updateLayout(e){if(!1===this.notifyPlugins("beforeLayout",{cancelable:!0}))return;layouts.update(this,this.width,this.height,e);const t=this.chartArea,i=t.width<=0||t.height<=0;this._layers=[],each(this.boxes,e=>{i&&"chartArea"===e.position||(e.configure&&e.configure(),this._layers.push(...e._layers()))},this),this._layers.forEach((e,t)=>{e._idx=t}),this.notifyPlugins("afterLayout")}_updateDatasets(e){if(!1!==this.notifyPlugins("beforeDatasetsUpdate",{mode:e,cancelable:!0})){for(let e=0,t=this.data.datasets.length;e<t;++e)this.getDatasetMeta(e).controller.configure();for(let t=0,i=this.data.datasets.length;t<i;++t)this._updateDataset(t,isFunction(e)?e({datasetIndex:t}):e);this.notifyPlugins("afterDatasetsUpdate",{mode:e})}}_updateDataset(e,t){const i=this.getDatasetMeta(e),r={meta:i,index:e,mode:t,cancelable:!0};!1!==this.notifyPlugins("beforeDatasetUpdate",r)&&(i.controller._update(t),r.cancelable=!1,this.notifyPlugins("afterDatasetUpdate",r))}render(){!1!==this.notifyPlugins("beforeRender",{cancelable:!0})&&(animator.has(this)?this.attached&&!animator.running(this)&&animator.start(this):(this.draw(),onAnimationsComplete({chart:this})))}draw(){let e;if(this._resizeBeforeDraw){const{width:e,height:t}=this._resizeBeforeDraw;this._resizeBeforeDraw=null,this._resize(e,t)}if(this.clear(),this.width<=0||this.height<=0)return;if(!1===this.notifyPlugins("beforeDraw",{cancelable:!0}))return;const t=this._layers;for(e=0;e<t.length&&t[e].z<=0;++e)t[e].draw(this.chartArea);for(this._drawDatasets();e<t.length;++e)t[e].draw(this.chartArea);this.notifyPlugins("afterDraw")}_getSortedDatasetMetas(e){const t=this._sortedMetasets,i=[];let r,n;for(r=0,n=t.length;r<n;++r){const n=t[r];e&&!n.visible||i.push(n)}return i}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(!0)}_drawDatasets(){if(!1===this.notifyPlugins("beforeDatasetsDraw",{cancelable:!0}))return;const e=this.getSortedVisibleDatasetMetas();for(let t=e.length-1;t>=0;--t)this._drawDataset(e[t]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(e){const t=this.ctx,i={meta:e,index:e.index,cancelable:!0},r=getDatasetClipArea(this,e);!1!==this.notifyPlugins("beforeDatasetDraw",i)&&(r&&clipArea(t,r),e.controller.draw(),r&&unclipArea(t),i.cancelable=!1,this.notifyPlugins("afterDatasetDraw",i))}isPointInArea(e){return _isPointInArea(e,this.chartArea,this._minPadding)}getElementsAtEventForMode(e,t,i,r){const n=Interaction.modes[t];return"function"==typeof n?n(this,e,i,r):[]}getDatasetMeta(e){const t=this.data.datasets[e],i=this._metasets;let r=i.filter(e=>e&&e._dataset===t).pop();return r||(r={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:t&&t.order||0,index:e,_dataset:t,_parsed:[],_sorted:!1},i.push(r)),r}getContext(){return this.$context||(this.$context=createContext(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(e){const t=this.data.datasets[e];if(!t)return!1;const i=this.getDatasetMeta(e);return"boolean"==typeof i.hidden?!i.hidden:!t.hidden}setDatasetVisibility(e,t){this.getDatasetMeta(e).hidden=!t}toggleDataVisibility(e){this._hiddenIndices[e]=!this._hiddenIndices[e]}getDataVisibility(e){return!this._hiddenIndices[e]}_updateVisibility(e,t,i){const r=i?"show":"hide",n=this.getDatasetMeta(e),a=n.controller._resolveAnimations(void 0,r);defined(t)?(n.data[t].hidden=!i,this.update()):(this.setDatasetVisibility(e,i),a.update(n,{visible:i}),this.update(t=>t.datasetIndex===e?r:void 0))}hide(e,t){this._updateVisibility(e,t,!1)}show(e,t){this._updateVisibility(e,t,!0)}_destroyDatasetMeta(e){const t=this._metasets[e];t&&t.controller&&t.controller._destroy(),delete this._metasets[e]}_stop(){let e,t;for(this.stop(),animator.remove(this),e=0,t=this.data.datasets.length;e<t;++e)this._destroyDatasetMeta(e)}destroy(){this.notifyPlugins("beforeDestroy");const{canvas:e,ctx:t}=this;this._stop(),this.config.clearCache(),e&&(this.unbindEvents(),clearCanvas(e,t),this.platform.releaseContext(t),this.canvas=null,this.ctx=null),delete instances[this.id],this.notifyPlugins("afterDestroy")}toBase64Image(...e){return this.canvas.toDataURL(...e)}bindEvents(){this.bindUserEvents(),this.options.responsive?this.bindResponsiveEvents():this.attached=!0}bindUserEvents(){const e=this._listeners,t=this.platform,i=(i,r)=>{t.addEventListener(this,i,r),e[i]=r},r=(e,t,i)=>{e.offsetX=t,e.offsetY=i,this._eventHandler(e)};each(this.options.events,e=>i(e,r))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const e=this._responsiveListeners,t=this.platform,i=(i,r)=>{t.addEventListener(this,i,r),e[i]=r},r=(i,r)=>{e[i]&&(t.removeEventListener(this,i,r),delete e[i])},n=(e,t)=>{this.canvas&&this.resize(e,t)};let a;const s=()=>{r("attach",s),this.attached=!0,this.resize(),i("resize",n),i("detach",a)};a=()=>{this.attached=!1,r("resize",n),this._stop(),this._resize(0,0),i("attach",s)},t.isAttached(this.canvas)?s():a()}unbindEvents(){each(this._listeners,(e,t)=>{this.platform.removeEventListener(this,t,e)}),this._listeners={},each(this._responsiveListeners,(e,t)=>{this.platform.removeEventListener(this,t,e)}),this._responsiveListeners=void 0}updateHoverStyle(e,t,i){const r=i?"set":"remove";let n,a,s,o;for("dataset"===t&&(n=this.getDatasetMeta(e[0].datasetIndex),n.controller["_"+r+"DatasetHoverStyle"]()),s=0,o=e.length;s<o;++s){a=e[s];const t=a&&this.getDatasetMeta(a.datasetIndex).controller;t&&t[r+"HoverStyle"](a.element,a.datasetIndex,a.index)}}getActiveElements(){return this._active||[]}setActiveElements(e){const t=this._active||[],i=e.map(({datasetIndex:e,index:t})=>{const i=this.getDatasetMeta(e);if(!i)throw new Error("No dataset found at index "+e);return{datasetIndex:e,element:i.data[t],index:t}});!_elementsEqual(i,t)&&(this._active=i,this._lastEvent=null,this._updateHoverStyles(i,t))}notifyPlugins(e,t,i){return this._plugins.notify(this,e,t,i)}isPluginEnabled(e){return 1===this._plugins._cache.filter(t=>t.plugin.id===e).length}_updateHoverStyles(e,t,i){const r=this.options.hover,n=(e,t)=>e.filter(e=>!t.some(t=>e.datasetIndex===t.datasetIndex&&e.index===t.index)),a=n(t,e),s=i?e:n(e,t);a.length&&this.updateHoverStyle(a,r.mode,!1),s.length&&r.mode&&this.updateHoverStyle(s,r.mode,!0)}_eventHandler(e,t){const i={event:e,replay:t,cancelable:!0,inChartArea:this.isPointInArea(e)},r=t=>(t.options.events||this.options.events).includes(e.native.type);if(!1===this.notifyPlugins("beforeEvent",i,r))return;const n=this._handleEvent(e,t,i.inChartArea);return i.cancelable=!1,this.notifyPlugins("afterEvent",i,r),(n||i.changed)&&this.render(),this}_handleEvent(e,t,i){const{_active:r=[],options:n}=this,a=t,s=this._getActiveElements(e,r,i,a),o=_isClickEvent(e),l=determineLastEvent(e,this._lastEvent,i,o);i&&(this._lastEvent=null,callback(n.onHover,[e,s,this],this),o&&callback(n.onClick,[e,s,this],this));const c=!_elementsEqual(s,r);return(c||t)&&(this._active=s,this._updateHoverStyles(s,r,t)),this._lastEvent=l,c}_getActiveElements(e,t,i,r){if("mouseout"===e.type)return[];if(!i)return t;const n=this.options.hover;return this.getElementsAtEventForMode(e,n.mode,n,r)}}function invalidatePlugins(){return each(Chart.instances,e=>e._plugins.invalidate())}function clipSelf(e,t,i){const{startAngle:r,x:n,y:a,outerRadius:s,innerRadius:o,options:l}=t,{borderWidth:c,borderJoinStyle:h}=l,p=Math.min(c/s,_normalizeAngle(r-i));if(e.beginPath(),e.arc(n,a,s-c/2,r+p/2,i-p/2),o>0){const t=Math.min(c/o,_normalizeAngle(r-i));e.arc(n,a,o+c/2,i-t/2,r+t/2,!0)}else{const t=Math.min(c/2,s*_normalizeAngle(r-i));if("round"===h)e.arc(n,a,t,i-PI/2,r+PI/2,!0);else if("bevel"===h){const s=2*t*t,o=-s*Math.cos(i+PI/2)+n,l=-s*Math.sin(i+PI/2)+a,c=s*Math.cos(r+PI/2)+n,h=s*Math.sin(r+PI/2)+a;e.lineTo(o,l),e.lineTo(c,h)}}e.closePath(),e.moveTo(0,0),e.rect(0,0,e.canvas.width,e.canvas.height),e.clip("evenodd")}function clipArc(e,t,i){const{startAngle:r,pixelMargin:n,x:a,y:s,outerRadius:o,innerRadius:l}=t;let c=n/o;e.beginPath(),e.arc(a,s,o,r-c,i+c),l>n?(c=n/l,e.arc(a,s,l,i+c,r-c,!0)):e.arc(a,s,n,i+HALF_PI,r-HALF_PI),e.closePath(),e.clip()}function toRadiusCorners(e){return _readValueToProps(e,["outerStart","outerEnd","innerStart","innerEnd"])}function parseBorderRadius$1(e,t,i,r){const n=toRadiusCorners(e.options.borderRadius),a=(i-t)/2,s=Math.min(a,r*t/2),o=e=>{const t=(i-Math.min(a,e))*r/2;return _limitValue(e,0,Math.min(a,t))};return{outerStart:o(n.outerStart),outerEnd:o(n.outerEnd),innerStart:_limitValue(n.innerStart,0,s),innerEnd:_limitValue(n.innerEnd,0,s)}}function rThetaToXY(e,t,i,r){return{x:i+e*Math.cos(t),y:r+e*Math.sin(t)}}function pathArc(e,t,i,r,n,a){const{x:s,y:o,startAngle:l,pixelMargin:c,innerRadius:h}=t,p=Math.max(t.outerRadius+r+i-c,0),u=h>0?h+r+i+c:0;let d=0;const f=n-l;if(r){const e=((h>0?h-r:0)+(p>0?p-r:0))/2;d=(f-(0!==e?f*e/(e+r):f))/2}const m=(f-Math.max(.001,f*p-i/PI)/p)/2,g=l+m+d,v=n-m-d,{outerStart:y,outerEnd:b,innerStart:x,innerEnd:_}=parseBorderRadius$1(t,u,p,v-g),S=p-y,w=p-b,C=g+y/S,P=v-b/w,E=u+x,k=u+_,$=g+x/E,A=v-_/k;if(e.beginPath(),a){const t=(C+P)/2;if(e.arc(s,o,p,C,t),e.arc(s,o,p,t,P),b>0){const t=rThetaToXY(w,P,s,o);e.arc(t.x,t.y,b,P,v+HALF_PI)}const i=rThetaToXY(k,v,s,o);if(e.lineTo(i.x,i.y),_>0){const t=rThetaToXY(k,A,s,o);e.arc(t.x,t.y,_,v+HALF_PI,A+Math.PI)}const r=(v-_/u+(g+x/u))/2;if(e.arc(s,o,u,v-_/u,r,!0),e.arc(s,o,u,r,g+x/u,!0),x>0){const t=rThetaToXY(E,$,s,o);e.arc(t.x,t.y,x,$+Math.PI,g-HALF_PI)}const n=rThetaToXY(S,g,s,o);if(e.lineTo(n.x,n.y),y>0){const t=rThetaToXY(S,C,s,o);e.arc(t.x,t.y,y,g-HALF_PI,C)}}else{e.moveTo(s,o);const t=Math.cos(C)*p+s,i=Math.sin(C)*p+o;e.lineTo(t,i);const r=Math.cos(P)*p+s,n=Math.sin(P)*p+o;e.lineTo(r,n)}e.closePath()}function drawArc(e,t,i,r,n){const{fullCircles:a,startAngle:s,circumference:o}=t;let l=t.endAngle;if(a){pathArc(e,t,i,r,l,n);for(let t=0;t<a;++t)e.fill();isNaN(o)||(l=s+(o%TAU||TAU))}return pathArc(e,t,i,r,l,n),e.fill(),l}function drawBorder(e,t,i,r,n){const{fullCircles:a,startAngle:s,circumference:o,options:l}=t,{borderWidth:c,borderJoinStyle:h,borderDash:p,borderDashOffset:u,borderRadius:d}=l,f="inner"===l.borderAlign;if(!c)return;e.setLineDash(p||[]),e.lineDashOffset=u,f?(e.lineWidth=2*c,e.lineJoin=h||"round"):(e.lineWidth=c,e.lineJoin=h||"bevel");let m=t.endAngle;if(a){pathArc(e,t,i,r,m,n);for(let t=0;t<a;++t)e.stroke();isNaN(o)||(m=s+(o%TAU||TAU))}f&&clipArc(e,t,m),l.selfJoin&&m-s>=PI&&0===d&&"miter"!==h&&clipSelf(e,t,m),a||(pathArc(e,t,i,r,m,n),e.stroke())}class ArcElement extends Element{static id="arc";static defaults={borderAlign:"center",borderColor:"#fff",borderDash:[],borderDashOffset:0,borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0,selfJoin:!1};static defaultRoutes={backgroundColor:"backgroundColor"};static descriptors={_scriptable:!0,_indexable:e=>"borderDash"!==e};circumference;endAngle;fullCircles;innerRadius;outerRadius;pixelMargin;startAngle;constructor(e){super(),this.options=void 0,this.circumference=void 0,this.startAngle=void 0,this.endAngle=void 0,this.innerRadius=void 0,this.outerRadius=void 0,this.pixelMargin=0,this.fullCircles=0,e&&Object.assign(this,e)}inRange(e,t,i){const r=this.getProps(["x","y"],i),{angle:n,distance:a}=getAngleFromPoint(r,{x:e,y:t}),{startAngle:s,endAngle:o,innerRadius:l,outerRadius:c,circumference:h}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],i),p=(this.options.spacing+this.options.borderWidth)/2,u=valueOrDefault(h,o-s),d=_angleBetween(n,s,o)&&s!==o,f=u>=TAU||d,m=_isBetween(a,l+p,c+p);return f&&m}getCenterPoint(e){const{x:t,y:i,startAngle:r,endAngle:n,innerRadius:a,outerRadius:s}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius"],e),{offset:o,spacing:l}=this.options,c=(r+n)/2,h=(a+s+l+o)/2;return{x:t+Math.cos(c)*h,y:i+Math.sin(c)*h}}tooltipPosition(e){return this.getCenterPoint(e)}draw(e){const{options:t,circumference:i}=this,r=(t.offset||0)/4,n=(t.spacing||0)/2,a=t.circular;if(this.pixelMargin="inner"===t.borderAlign?.33:0,this.fullCircles=i>TAU?Math.floor(i/TAU):0,0===i||this.innerRadius<0||this.outerRadius<0)return;e.save();const s=(this.startAngle+this.endAngle)/2;e.translate(Math.cos(s)*r,Math.sin(s)*r);const o=r*(1-Math.sin(Math.min(PI,i||0)));e.fillStyle=t.backgroundColor,e.strokeStyle=t.borderColor,drawArc(e,this,o,n,a),drawBorder(e,this,o,n,a),e.restore()}}function getBarBounds(e,t){const{x:i,y:r,base:n,width:a,height:s}=e.getProps(["x","y","base","width","height"],t);let o,l,c,h,p;return e.horizontal?(p=s/2,o=Math.min(i,n),l=Math.max(i,n),c=r-p,h=r+p):(p=a/2,o=i-p,l=i+p,c=Math.min(r,n),h=Math.max(r,n)),{left:o,top:c,right:l,bottom:h}}function skipOrLimit(e,t,i,r){return e?0:_limitValue(t,i,r)}function parseBorderWidth(e,t,i){const r=e.options.borderWidth,n=e.borderSkipped,a=toTRBL(r);return{t:skipOrLimit(n.top,a.top,0,i),r:skipOrLimit(n.right,a.right,0,t),b:skipOrLimit(n.bottom,a.bottom,0,i),l:skipOrLimit(n.left,a.left,0,t)}}function parseBorderRadius(e,t,i){const{enableBorderRadius:r}=e.getProps(["enableBorderRadius"]),n=e.options.borderRadius,a=toTRBLCorners(n),s=Math.min(t,i),o=e.borderSkipped,l=r||isObject$1(n);return{topLeft:skipOrLimit(!l||o.top||o.left,a.topLeft,0,s),topRight:skipOrLimit(!l||o.top||o.right,a.topRight,0,s),bottomLeft:skipOrLimit(!l||o.bottom||o.left,a.bottomLeft,0,s),bottomRight:skipOrLimit(!l||o.bottom||o.right,a.bottomRight,0,s)}}function boundingRects(e){const t=getBarBounds(e),i=t.right-t.left,r=t.bottom-t.top,n=parseBorderWidth(e,i/2,r/2),a=parseBorderRadius(e,i/2,r/2);return{outer:{x:t.left,y:t.top,w:i,h:r,radius:a},inner:{x:t.left+n.l,y:t.top+n.t,w:i-n.l-n.r,h:r-n.t-n.b,radius:{topLeft:Math.max(0,a.topLeft-Math.max(n.t,n.l)),topRight:Math.max(0,a.topRight-Math.max(n.t,n.r)),bottomLeft:Math.max(0,a.bottomLeft-Math.max(n.b,n.l)),bottomRight:Math.max(0,a.bottomRight-Math.max(n.b,n.r))}}}}function inRange(e,t,i,r){const n=null===t,a=null===i,s=e&&!(n&&a)&&getBarBounds(e,r);return s&&(n||_isBetween(t,s.left,s.right))&&(a||_isBetween(i,s.top,s.bottom))}function hasRadius(e){return e.topLeft||e.topRight||e.bottomLeft||e.bottomRight}function addNormalRectPath(e,t){e.rect(t.x,t.y,t.w,t.h)}function inflateRect(e,t,i={}){const r=e.x!==i.x?-t:0,n=e.y!==i.y?-t:0,a=(e.x+e.w!==i.x+i.w?t:0)-r,s=(e.y+e.h!==i.y+i.h?t:0)-n;return{x:e.x+r,y:e.y+n,w:e.w+a,h:e.h+s,radius:e.radius}}class BarElement extends Element{static id="bar";static defaults={borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};constructor(e){super(),this.options=void 0,this.horizontal=void 0,this.base=void 0,this.width=void 0,this.height=void 0,this.inflateAmount=void 0,e&&Object.assign(this,e)}draw(e){const{inflateAmount:t,options:{borderColor:i,backgroundColor:r}}=this,{inner:n,outer:a}=boundingRects(this),s=hasRadius(a.radius)?addRoundedRectPath:addNormalRectPath;e.save(),a.w===n.w&&a.h===n.h||(e.beginPath(),s(e,inflateRect(a,t,n)),e.clip(),s(e,inflateRect(n,-t,a)),e.fillStyle=i,e.fill("evenodd")),e.beginPath(),s(e,inflateRect(n,t)),e.fillStyle=r,e.fill(),e.restore()}inRange(e,t,i){return inRange(this,e,t,i)}inXRange(e,t){return inRange(this,e,null,t)}inYRange(e,t){return inRange(this,null,e,t)}getCenterPoint(e){const{x:t,y:i,base:r,horizontal:n}=this.getProps(["x","y","base","horizontal"],e);return{x:n?(t+r)/2:t,y:n?i:(i+r)/2}}getRange(e){return"x"===e?this.width/2:this.height/2}}const getBoxSize=(e,t)=>{let{boxHeight:i=t,boxWidth:r=t}=e;return e.usePointStyle&&(i=Math.min(i,t),r=e.pointStyleWidth||Math.min(r,t)),{boxWidth:r,boxHeight:i,itemHeight:Math.max(t,i)}},itemsEqual=(e,t)=>null!==e&&null!==t&&e.datasetIndex===t.datasetIndex&&e.index===t.index;class Legend extends Element{constructor(e){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=e.chart,this.options=e.options,this.ctx=e.ctx,this.legendItems=void 0,this.columnSizes=void 0,this.lineWidths=void 0,this.maxHeight=void 0,this.maxWidth=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.height=void 0,this.width=void 0,this._margins=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(e,t,i){this.maxWidth=e,this.maxHeight=t,this._margins=i,this.setDimensions(),this.buildLabels(),this.fit()}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=this._margins.left,this.right=this.width):(this.height=this.maxHeight,this.top=this._margins.top,this.bottom=this.height)}buildLabels(){const e=this.options.labels||{};let t=callback(e.generateLabels,[this.chart],this)||[];e.filter&&(t=t.filter(t=>e.filter(t,this.chart.data))),e.sort&&(t=t.sort((t,i)=>e.sort(t,i,this.chart.data))),this.options.reverse&&t.reverse(),this.legendItems=t}fit(){const{options:e,ctx:t}=this;if(!e.display)return void(this.width=this.height=0);const i=e.labels,r=toFont(i.font),n=r.size,a=this._computeTitleHeight(),{boxWidth:s,itemHeight:o}=getBoxSize(i,n);let l,c;t.font=r.string,this.isHorizontal()?(l=this.maxWidth,c=this._fitRows(a,n,s,o)+10):(c=this.maxHeight,l=this._fitCols(a,r,s,o)+10),this.width=Math.min(l,e.maxWidth||this.maxWidth),this.height=Math.min(c,e.maxHeight||this.maxHeight)}_fitRows(e,t,i,r){const{ctx:n,maxWidth:a,options:{labels:{padding:s}}}=this,o=this.legendHitBoxes=[],l=this.lineWidths=[0],c=r+s;let h=e;n.textAlign="left",n.textBaseline="middle";let p=-1,u=-c;return this.legendItems.forEach((e,d)=>{const f=i+t/2+n.measureText(e.text).width;(0===d||l[l.length-1]+f+2*s>a)&&(h+=c,l[l.length-(d>0?0:1)]=0,u+=c,p++),o[d]={left:0,top:u,row:p,width:f,height:r},l[l.length-1]+=f+s}),h}_fitCols(e,t,i,r){const{ctx:n,maxHeight:a,options:{labels:{padding:s}}}=this,o=this.legendHitBoxes=[],l=this.columnSizes=[],c=a-e;let h=s,p=0,u=0,d=0,f=0;return this.legendItems.forEach((e,a)=>{const{itemWidth:m,itemHeight:g}=calculateItemSize(i,t,n,e,r);a>0&&u+g+2*s>c&&(h+=p+s,l.push({width:p,height:u}),d+=p+s,f++,p=u=0),o[a]={left:d,top:u,col:f,width:m,height:g},p=Math.max(p,m),u+=g+s}),h+=p,l.push({width:p,height:u}),h}adjustHitBoxes(){if(!this.options.display)return;const e=this._computeTitleHeight(),{legendHitBoxes:t,options:{align:i,labels:{padding:r},rtl:n}}=this,a=getRtlAdapter(n,this.left,this.width);if(this.isHorizontal()){let n=0,s=_alignStartEnd(i,this.left+r,this.right-this.lineWidths[n]);for(const o of t)n!==o.row&&(n=o.row,s=_alignStartEnd(i,this.left+r,this.right-this.lineWidths[n])),o.top+=this.top+e+r,o.left=a.leftForLtr(a.x(s),o.width),s+=o.width+r}else{let n=0,s=_alignStartEnd(i,this.top+e+r,this.bottom-this.columnSizes[n].height);for(const o of t)o.col!==n&&(n=o.col,s=_alignStartEnd(i,this.top+e+r,this.bottom-this.columnSizes[n].height)),o.top=s,o.left+=this.left+r,o.left=a.leftForLtr(a.x(o.left),o.width),s+=o.height+r}}isHorizontal(){return"top"===this.options.position||"bottom"===this.options.position}draw(){if(this.options.display){const e=this.ctx;clipArea(e,this),this._draw(),unclipArea(e)}}_draw(){const{options:e,columnSizes:t,lineWidths:i,ctx:r}=this,{align:n,labels:a}=e,s=defaults.color,o=getRtlAdapter(e.rtl,this.left,this.width),l=toFont(a.font),{padding:c}=a,h=l.size,p=h/2;let u;this.drawTitle(),r.textAlign=o.textAlign("left"),r.textBaseline="middle",r.lineWidth=.5,r.font=l.string;const{boxWidth:d,boxHeight:f,itemHeight:m}=getBoxSize(a,h),g=this.isHorizontal(),v=this._computeTitleHeight();u=g?{x:_alignStartEnd(n,this.left+c,this.right-i[0]),y:this.top+c+v,line:0}:{x:this.left+c,y:_alignStartEnd(n,this.top+v+c,this.bottom-t[0].height),line:0},overrideTextDirection(this.ctx,e.textDirection);const y=m+c;this.legendItems.forEach((b,x)=>{r.strokeStyle=b.fontColor,r.fillStyle=b.fontColor;const _=r.measureText(b.text).width,S=o.textAlign(b.textAlign||(b.textAlign=a.textAlign)),w=d+p+_;let C=u.x,P=u.y;o.setWidth(this.width),g?x>0&&C+w+c>this.right&&(P=u.y+=y,u.line++,C=u.x=_alignStartEnd(n,this.left+c,this.right-i[u.line])):x>0&&P+y>this.bottom&&(C=u.x=C+t[u.line].width+c,u.line++,P=u.y=_alignStartEnd(n,this.top+v+c,this.bottom-t[u.line].height));if(function(e,t,i){if(isNaN(d)||d<=0||isNaN(f)||f<0)return;r.save();const n=valueOrDefault(i.lineWidth,1);if(r.fillStyle=valueOrDefault(i.fillStyle,s),r.lineCap=valueOrDefault(i.lineCap,"butt"),r.lineDashOffset=valueOrDefault(i.lineDashOffset,0),r.lineJoin=valueOrDefault(i.lineJoin,"miter"),r.lineWidth=n,r.strokeStyle=valueOrDefault(i.strokeStyle,s),r.setLineDash(valueOrDefault(i.lineDash,[])),a.usePointStyle){const s={radius:f*Math.SQRT2/2,pointStyle:i.pointStyle,rotation:i.rotation,borderWidth:n},l=o.xPlus(e,d/2);drawPointLegend(r,s,l,t+p,a.pointStyleWidth&&d)}else{const a=t+Math.max((h-f)/2,0),s=o.leftForLtr(e,d),l=toTRBLCorners(i.borderRadius);r.beginPath(),Object.values(l).some(e=>0!==e)?addRoundedRectPath(r,{x:s,y:a,w:d,h:f,radius:l}):r.rect(s,a,d,f),r.fill(),0!==n&&r.stroke()}r.restore()}(o.x(C),P,b),C=_textX(S,C+d+p,g?C+w:this.right,e.rtl),function(e,t,i){renderText(r,i.text,e,t+m/2,l,{strikethrough:i.hidden,textAlign:o.textAlign(i.textAlign)})}(o.x(C),P,b),g)u.x+=w+c;else if("string"!=typeof b.text){const e=l.lineHeight;u.y+=calculateLegendItemHeight(b,e)+c}else u.y+=y}),restoreTextDirection(this.ctx,e.textDirection)}drawTitle(){const e=this.options,t=e.title,i=toFont(t.font),r=toPadding(t.padding);if(!t.display)return;const n=getRtlAdapter(e.rtl,this.left,this.width),a=this.ctx,s=t.position,o=i.size/2,l=r.top+o;let c,h=this.left,p=this.width;if(this.isHorizontal())p=Math.max(...this.lineWidths),c=this.top+l,h=_alignStartEnd(e.align,h,this.right-p);else{const t=this.columnSizes.reduce((e,t)=>Math.max(e,t.height),0);c=l+_alignStartEnd(e.align,this.top,this.bottom-t-e.labels.padding-this._computeTitleHeight())}const u=_alignStartEnd(s,h,h+p);a.textAlign=n.textAlign(_toLeftRightCenter(s)),a.textBaseline="middle",a.strokeStyle=t.color,a.fillStyle=t.color,a.font=i.string,renderText(a,t.text,u,c,i)}_computeTitleHeight(){const e=this.options.title,t=toFont(e.font),i=toPadding(e.padding);return e.display?t.lineHeight+i.height:0}_getLegendItemAt(e,t){let i,r,n;if(_isBetween(e,this.left,this.right)&&_isBetween(t,this.top,this.bottom))for(n=this.legendHitBoxes,i=0;i<n.length;++i)if(r=n[i],_isBetween(e,r.left,r.left+r.width)&&_isBetween(t,r.top,r.top+r.height))return this.legendItems[i];return null}handleEvent(e){const t=this.options;if(!isListened(e.type,t))return;const i=this._getLegendItemAt(e.x,e.y);if("mousemove"===e.type||"mouseout"===e.type){const r=this._hoveredItem,n=itemsEqual(r,i);r&&!n&&callback(t.onLeave,[e,r,this],this),this._hoveredItem=i,i&&!n&&callback(t.onHover,[e,i,this],this)}else i&&callback(t.onClick,[e,i,this],this)}}function calculateItemSize(e,t,i,r,n){return{itemWidth:calculateItemWidth(r,e,t,i),itemHeight:calculateItemHeight(n,r,t.lineHeight)}}function calculateItemWidth(e,t,i,r){let n=e.text;return n&&"string"!=typeof n&&(n=n.reduce((e,t)=>e.length>t.length?e:t)),t+i.size/2+r.measureText(n).width}function calculateItemHeight(e,t,i){let r=e;return"string"!=typeof t.text&&(r=calculateLegendItemHeight(t,i)),r}function calculateLegendItemHeight(e,t){return t*(e.text?e.text.length:0)}function isListened(e,t){return!("mousemove"!==e&&"mouseout"!==e||!t.onHover&&!t.onLeave)||!(!t.onClick||"click"!==e&&"mouseup"!==e)}var plugin_legend={id:"legend",_element:Legend,start(e,t,i){const r=e.legend=new Legend({ctx:e.ctx,options:i,chart:e});layouts.configure(e,r,i),layouts.addBox(e,r)},stop(e){layouts.removeBox(e,e.legend),delete e.legend},beforeUpdate(e,t,i){const r=e.legend;layouts.configure(e,r,i),r.options=i},afterUpdate(e){const t=e.legend;t.buildLabels(),t.adjustHitBoxes()},afterEvent(e,t){t.replay||e.legend.handleEvent(t.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(e,t,i){const r=t.datasetIndex,n=i.chart;n.isDatasetVisible(r)?(n.hide(r),t.hidden=!0):(n.show(r),t.hidden=!1)},onHover:null,onLeave:null,labels:{color:e=>e.chart.options.color,boxWidth:40,padding:10,generateLabels(e){const t=e.data.datasets,{labels:{usePointStyle:i,pointStyle:r,textAlign:n,color:a,useBorderRadius:s,borderRadius:o}}=e.legend.options;return e._getSortedDatasetMetas().map(e=>{const l=e.controller.getStyle(i?0:void 0),c=toPadding(l.borderWidth);return{text:t[e.index].label,fillStyle:l.backgroundColor,fontColor:a,hidden:!e.visible,lineCap:l.borderCapStyle,lineDash:l.borderDash,lineDashOffset:l.borderDashOffset,lineJoin:l.borderJoinStyle,lineWidth:(c.width+c.height)/4,strokeStyle:l.borderColor,pointStyle:r||l.pointStyle,rotation:l.rotation,textAlign:n||l.textAlign,borderRadius:s&&(o||l.borderRadius),datasetIndex:e.index}},this)}},title:{color:e=>e.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:e=>!e.startsWith("on"),labels:{_scriptable:e=>!["generateLabels","filter","sort"].includes(e)}}};const positioners={average(e){if(!e.length)return!1;let t,i,r=new Set,n=0,a=0;for(t=0,i=e.length;t<i;++t){const i=e[t].element;if(i&&i.hasValue()){const e=i.tooltipPosition();r.add(e.x),n+=e.y,++a}}if(0===a||0===r.size)return!1;return{x:[...r].reduce((e,t)=>e+t)/r.size,y:n/a}},nearest(e,t){if(!e.length)return!1;let i,r,n,a=t.x,s=t.y,o=Number.POSITIVE_INFINITY;for(i=0,r=e.length;i<r;++i){const r=e[i].element;if(r&&r.hasValue()){const e=distanceBetweenPoints(t,r.getCenterPoint());e<o&&(o=e,n=r)}}if(n){const e=n.tooltipPosition();a=e.x,s=e.y}return{x:a,y:s}}};function pushOrConcat(e,t){return t&&(isArray(t)?Array.prototype.push.apply(e,t):e.push(t)),e}function splitNewlines(e){return("string"==typeof e||e instanceof String)&&e.indexOf("\n")>-1?e.split("\n"):e}function createTooltipItem(e,t){const{element:i,datasetIndex:r,index:n}=t,a=e.getDatasetMeta(r).controller,{label:s,value:o}=a.getLabelAndValue(n);return{chart:e,label:s,parsed:a.getParsed(n),raw:e.data.datasets[r].data[n],formattedValue:o,dataset:a.getDataset(),dataIndex:n,datasetIndex:r,element:i}}function getTooltipSize(e,t){const i=e.chart.ctx,{body:r,footer:n,title:a}=e,{boxWidth:s,boxHeight:o}=t,l=toFont(t.bodyFont),c=toFont(t.titleFont),h=toFont(t.footerFont),p=a.length,u=n.length,d=r.length,f=toPadding(t.padding);let m=f.height,g=0,v=r.reduce((e,t)=>e+t.before.length+t.lines.length+t.after.length,0);if(v+=e.beforeBody.length+e.afterBody.length,p&&(m+=p*c.lineHeight+(p-1)*t.titleSpacing+t.titleMarginBottom),v){m+=d*(t.displayColors?Math.max(o,l.lineHeight):l.lineHeight)+(v-d)*l.lineHeight+(v-1)*t.bodySpacing}u&&(m+=t.footerMarginTop+u*h.lineHeight+(u-1)*t.footerSpacing);let y=0;const b=function(e){g=Math.max(g,i.measureText(e).width+y)};return i.save(),i.font=c.string,each(e.title,b),i.font=l.string,each(e.beforeBody.concat(e.afterBody),b),y=t.displayColors?s+2+t.boxPadding:0,each(r,e=>{each(e.before,b),each(e.lines,b),each(e.after,b)}),y=0,i.font=h.string,each(e.footer,b),i.restore(),g+=f.width,{width:g,height:m}}function determineYAlign(e,t){const{y:i,height:r}=t;return i<r/2?"top":i>e.height-r/2?"bottom":"center"}function doesNotFitWithAlign(e,t,i,r){const{x:n,width:a}=r,s=i.caretSize+i.caretPadding;return"left"===e&&n+a+s>t.width||("right"===e&&n-a-s<0||void 0)}function determineXAlign(e,t,i,r){const{x:n,width:a}=i,{width:s,chartArea:{left:o,right:l}}=e;let c="center";return"center"===r?c=n<=(o+l)/2?"left":"right":n<=a/2?c="left":n>=s-a/2&&(c="right"),doesNotFitWithAlign(c,e,t,i)&&(c="center"),c}function determineAlignment(e,t,i){const r=i.yAlign||t.yAlign||determineYAlign(e,i);return{xAlign:i.xAlign||t.xAlign||determineXAlign(e,t,i,r),yAlign:r}}function alignX(e,t){let{x:i,width:r}=e;return"right"===t?i-=r:"center"===t&&(i-=r/2),i}function alignY(e,t,i){let{y:r,height:n}=e;return"top"===t?r+=i:r-="bottom"===t?n+i:n/2,r}function getBackgroundPoint(e,t,i,r){const{caretSize:n,caretPadding:a,cornerRadius:s}=e,{xAlign:o,yAlign:l}=i,c=n+a,{topLeft:h,topRight:p,bottomLeft:u,bottomRight:d}=toTRBLCorners(s);let f=alignX(t,o);const m=alignY(t,l,c);return"center"===l?"left"===o?f+=c:"right"===o&&(f-=c):"left"===o?f-=Math.max(h,u)+n:"right"===o&&(f+=Math.max(p,d)+n),{x:_limitValue(f,0,r.width-t.width),y:_limitValue(m,0,r.height-t.height)}}function getAlignedX(e,t,i){const r=toPadding(i.padding);return"center"===t?e.x+e.width/2:"right"===t?e.x+e.width-r.right:e.x+r.left}function getBeforeAfterBodyLines(e){return pushOrConcat([],splitNewlines(e))}function createTooltipContext(e,t,i){return createContext(e,{tooltip:t,tooltipItems:i,type:"tooltip"})}function overrideCallbacks(e,t){const i=t&&t.dataset&&t.dataset.tooltip&&t.dataset.tooltip.callbacks;return i?e.override(i):e}const defaultCallbacks={beforeTitle:noop$1,title(e){if(e.length>0){const t=e[0],i=t.chart.data.labels,r=i?i.length:0;if(this&&this.options&&"dataset"===this.options.mode)return t.dataset.label||"";if(t.label)return t.label;if(r>0&&t.dataIndex<r)return i[t.dataIndex]}return""},afterTitle:noop$1,beforeBody:noop$1,beforeLabel:noop$1,label(e){if(this&&this.options&&"dataset"===this.options.mode)return e.label+": "+e.formattedValue||e.formattedValue;let t=e.dataset.label||"";t&&(t+=": ");const i=e.formattedValue;return isNullOrUndef(i)||(t+=i),t},labelColor(e){const t=e.chart.getDatasetMeta(e.datasetIndex).controller.getStyle(e.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(e){const t=e.chart.getDatasetMeta(e.datasetIndex).controller.getStyle(e.dataIndex);return{pointStyle:t.pointStyle,rotation:t.rotation}},afterLabel:noop$1,afterBody:noop$1,beforeFooter:noop$1,footer:noop$1,afterFooter:noop$1};function invokeCallbackWithFallback(e,t,i,r){const n=e[t].call(i,r);return void 0===n?defaultCallbacks[t].call(i,r):n}class Tooltip extends Element{static positioners=positioners;constructor(e){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=e.chart,this.options=e.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(e){this.options=e,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const e=this._cachedAnimations;if(e)return e;const t=this.chart,i=this.options.setContext(this.getContext()),r=i.enabled&&t.options.animation&&i.animations,n=new Animations(this.chart,r);return r._cacheable&&(this._cachedAnimations=Object.freeze(n)),n}getContext(){return this.$context||(this.$context=createTooltipContext(this.chart.getContext(),this,this._tooltipItems))}getTitle(e,t){const{callbacks:i}=t,r=invokeCallbackWithFallback(i,"beforeTitle",this,e),n=invokeCallbackWithFallback(i,"title",this,e),a=invokeCallbackWithFallback(i,"afterTitle",this,e);let s=[];return s=pushOrConcat(s,splitNewlines(r)),s=pushOrConcat(s,splitNewlines(n)),s=pushOrConcat(s,splitNewlines(a)),s}getBeforeBody(e,t){return getBeforeAfterBodyLines(invokeCallbackWithFallback(t.callbacks,"beforeBody",this,e))}getBody(e,t){const{callbacks:i}=t,r=[];return each(e,e=>{const t={before:[],lines:[],after:[]},n=overrideCallbacks(i,e);pushOrConcat(t.before,splitNewlines(invokeCallbackWithFallback(n,"beforeLabel",this,e))),pushOrConcat(t.lines,invokeCallbackWithFallback(n,"label",this,e)),pushOrConcat(t.after,splitNewlines(invokeCallbackWithFallback(n,"afterLabel",this,e))),r.push(t)}),r}getAfterBody(e,t){return getBeforeAfterBodyLines(invokeCallbackWithFallback(t.callbacks,"afterBody",this,e))}getFooter(e,t){const{callbacks:i}=t,r=invokeCallbackWithFallback(i,"beforeFooter",this,e),n=invokeCallbackWithFallback(i,"footer",this,e),a=invokeCallbackWithFallback(i,"afterFooter",this,e);let s=[];return s=pushOrConcat(s,splitNewlines(r)),s=pushOrConcat(s,splitNewlines(n)),s=pushOrConcat(s,splitNewlines(a)),s}_createItems(e){const t=this._active,i=this.chart.data,r=[],n=[],a=[];let s,o,l=[];for(s=0,o=t.length;s<o;++s)l.push(createTooltipItem(this.chart,t[s]));return e.filter&&(l=l.filter((t,r,n)=>e.filter(t,r,n,i))),e.itemSort&&(l=l.sort((t,r)=>e.itemSort(t,r,i))),each(l,t=>{const i=overrideCallbacks(e.callbacks,t);r.push(invokeCallbackWithFallback(i,"labelColor",this,t)),n.push(invokeCallbackWithFallback(i,"labelPointStyle",this,t)),a.push(invokeCallbackWithFallback(i,"labelTextColor",this,t))}),this.labelColors=r,this.labelPointStyles=n,this.labelTextColors=a,this.dataPoints=l,l}update(e,t){const i=this.options.setContext(this.getContext()),r=this._active;let n,a=[];if(r.length){const e=positioners[i.position].call(this,r,this._eventPosition);a=this._createItems(i),this.title=this.getTitle(a,i),this.beforeBody=this.getBeforeBody(a,i),this.body=this.getBody(a,i),this.afterBody=this.getAfterBody(a,i),this.footer=this.getFooter(a,i);const t=this._size=getTooltipSize(this,i),s=Object.assign({},e,t),o=determineAlignment(this.chart,i,s),l=getBackgroundPoint(i,s,o,this.chart);this.xAlign=o.xAlign,this.yAlign=o.yAlign,n={opacity:1,x:l.x,y:l.y,width:t.width,height:t.height,caretX:e.x,caretY:e.y}}else 0!==this.opacity&&(n={opacity:0});this._tooltipItems=a,this.$context=void 0,n&&this._resolveAnimations().update(this,n),e&&i.external&&i.external.call(this,{chart:this.chart,tooltip:this,replay:t})}drawCaret(e,t,i,r){const n=this.getCaretPosition(e,i,r);t.lineTo(n.x1,n.y1),t.lineTo(n.x2,n.y2),t.lineTo(n.x3,n.y3)}getCaretPosition(e,t,i){const{xAlign:r,yAlign:n}=this,{caretSize:a,cornerRadius:s}=i,{topLeft:o,topRight:l,bottomLeft:c,bottomRight:h}=toTRBLCorners(s),{x:p,y:u}=e,{width:d,height:f}=t;let m,g,v,y,b,x;return"center"===n?(b=u+f/2,"left"===r?(m=p,g=m-a,y=b+a,x=b-a):(m=p+d,g=m+a,y=b-a,x=b+a),v=m):(g="left"===r?p+Math.max(o,c)+a:"right"===r?p+d-Math.max(l,h)-a:this.caretX,"top"===n?(y=u,b=y-a,m=g-a,v=g+a):(y=u+f,b=y+a,m=g+a,v=g-a),x=y),{x1:m,x2:g,x3:v,y1:y,y2:b,y3:x}}drawTitle(e,t,i){const r=this.title,n=r.length;let a,s,o;if(n){const l=getRtlAdapter(i.rtl,this.x,this.width);for(e.x=getAlignedX(this,i.titleAlign,i),t.textAlign=l.textAlign(i.titleAlign),t.textBaseline="middle",a=toFont(i.titleFont),s=i.titleSpacing,t.fillStyle=i.titleColor,t.font=a.string,o=0;o<n;++o)t.fillText(r[o],l.x(e.x),e.y+a.lineHeight/2),e.y+=a.lineHeight+s,o+1===n&&(e.y+=i.titleMarginBottom-s)}}_drawColorBox(e,t,i,r,n){const a=this.labelColors[i],s=this.labelPointStyles[i],{boxHeight:o,boxWidth:l}=n,c=toFont(n.bodyFont),h=getAlignedX(this,"left",n),p=r.x(h),u=o<c.lineHeight?(c.lineHeight-o)/2:0,d=t.y+u;if(n.usePointStyle){const t={radius:Math.min(l,o)/2,pointStyle:s.pointStyle,rotation:s.rotation,borderWidth:1},i=r.leftForLtr(p,l)+l/2,c=d+o/2;e.strokeStyle=n.multiKeyBackground,e.fillStyle=n.multiKeyBackground,drawPoint(e,t,i,c),e.strokeStyle=a.borderColor,e.fillStyle=a.backgroundColor,drawPoint(e,t,i,c)}else{e.lineWidth=isObject$1(a.borderWidth)?Math.max(...Object.values(a.borderWidth)):a.borderWidth||1,e.strokeStyle=a.borderColor,e.setLineDash(a.borderDash||[]),e.lineDashOffset=a.borderDashOffset||0;const t=r.leftForLtr(p,l),i=r.leftForLtr(r.xPlus(p,1),l-2),s=toTRBLCorners(a.borderRadius);Object.values(s).some(e=>0!==e)?(e.beginPath(),e.fillStyle=n.multiKeyBackground,addRoundedRectPath(e,{x:t,y:d,w:l,h:o,radius:s}),e.fill(),e.stroke(),e.fillStyle=a.backgroundColor,e.beginPath(),addRoundedRectPath(e,{x:i,y:d+1,w:l-2,h:o-2,radius:s}),e.fill()):(e.fillStyle=n.multiKeyBackground,e.fillRect(t,d,l,o),e.strokeRect(t,d,l,o),e.fillStyle=a.backgroundColor,e.fillRect(i,d+1,l-2,o-2))}e.fillStyle=this.labelTextColors[i]}drawBody(e,t,i){const{body:r}=this,{bodySpacing:n,bodyAlign:a,displayColors:s,boxHeight:o,boxWidth:l,boxPadding:c}=i,h=toFont(i.bodyFont);let p=h.lineHeight,u=0;const d=getRtlAdapter(i.rtl,this.x,this.width),f=function(i){t.fillText(i,d.x(e.x+u),e.y+p/2),e.y+=p+n},m=d.textAlign(a);let g,v,y,b,x,_,S;for(t.textAlign=a,t.textBaseline="middle",t.font=h.string,e.x=getAlignedX(this,m,i),t.fillStyle=i.bodyColor,each(this.beforeBody,f),u=s&&"right"!==m?"center"===a?l/2+c:l+2+c:0,b=0,_=r.length;b<_;++b){for(g=r[b],v=this.labelTextColors[b],t.fillStyle=v,each(g.before,f),y=g.lines,s&&y.length&&(this._drawColorBox(t,e,b,d,i),p=Math.max(h.lineHeight,o)),x=0,S=y.length;x<S;++x)f(y[x]),p=h.lineHeight;each(g.after,f)}u=0,p=h.lineHeight,each(this.afterBody,f),e.y-=n}drawFooter(e,t,i){const r=this.footer,n=r.length;let a,s;if(n){const o=getRtlAdapter(i.rtl,this.x,this.width);for(e.x=getAlignedX(this,i.footerAlign,i),e.y+=i.footerMarginTop,t.textAlign=o.textAlign(i.footerAlign),t.textBaseline="middle",a=toFont(i.footerFont),t.fillStyle=i.footerColor,t.font=a.string,s=0;s<n;++s)t.fillText(r[s],o.x(e.x),e.y+a.lineHeight/2),e.y+=a.lineHeight+i.footerSpacing}}drawBackground(e,t,i,r){const{xAlign:n,yAlign:a}=this,{x:s,y:o}=e,{width:l,height:c}=i,{topLeft:h,topRight:p,bottomLeft:u,bottomRight:d}=toTRBLCorners(r.cornerRadius);t.fillStyle=r.backgroundColor,t.strokeStyle=r.borderColor,t.lineWidth=r.borderWidth,t.beginPath(),t.moveTo(s+h,o),"top"===a&&this.drawCaret(e,t,i,r),t.lineTo(s+l-p,o),t.quadraticCurveTo(s+l,o,s+l,o+p),"center"===a&&"right"===n&&this.drawCaret(e,t,i,r),t.lineTo(s+l,o+c-d),t.quadraticCurveTo(s+l,o+c,s+l-d,o+c),"bottom"===a&&this.drawCaret(e,t,i,r),t.lineTo(s+u,o+c),t.quadraticCurveTo(s,o+c,s,o+c-u),"center"===a&&"left"===n&&this.drawCaret(e,t,i,r),t.lineTo(s,o+h),t.quadraticCurveTo(s,o,s+h,o),t.closePath(),t.fill(),r.borderWidth>0&&t.stroke()}_updateAnimationTarget(e){const t=this.chart,i=this.$animations,r=i&&i.x,n=i&&i.y;if(r||n){const i=positioners[e.position].call(this,this._active,this._eventPosition);if(!i)return;const a=this._size=getTooltipSize(this,e),s=Object.assign({},i,this._size),o=determineAlignment(t,e,s),l=getBackgroundPoint(e,s,o,t);r._to===l.x&&n._to===l.y||(this.xAlign=o.xAlign,this.yAlign=o.yAlign,this.width=a.width,this.height=a.height,this.caretX=i.x,this.caretY=i.y,this._resolveAnimations().update(this,l))}}_willRender(){return!!this.opacity}draw(e){const t=this.options.setContext(this.getContext());let i=this.opacity;if(!i)return;this._updateAnimationTarget(t);const r={width:this.width,height:this.height},n={x:this.x,y:this.y};i=Math.abs(i)<.001?0:i;const a=toPadding(t.padding),s=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;t.enabled&&s&&(e.save(),e.globalAlpha=i,this.drawBackground(n,e,r,t),overrideTextDirection(e,t.textDirection),n.y+=a.top,this.drawTitle(n,e,t),this.drawBody(n,e,t),this.drawFooter(n,e,t),restoreTextDirection(e,t.textDirection),e.restore())}getActiveElements(){return this._active||[]}setActiveElements(e,t){const i=this._active,r=e.map(({datasetIndex:e,index:t})=>{const i=this.chart.getDatasetMeta(e);if(!i)throw new Error("Cannot find a dataset at index "+e);return{datasetIndex:e,element:i.data[t],index:t}}),n=!_elementsEqual(i,r),a=this._positionChanged(r,t);(n||a)&&(this._active=r,this._eventPosition=t,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(e,t,i=!0){if(t&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const r=this.options,n=this._active||[],a=this._getActiveElements(e,n,t,i),s=this._positionChanged(a,e),o=t||!_elementsEqual(a,n)||s;return o&&(this._active=a,(r.enabled||r.external)&&(this._eventPosition={x:e.x,y:e.y},this.update(!0,t))),o}_getActiveElements(e,t,i,r){const n=this.options;if("mouseout"===e.type)return[];if(!r)return t.filter(e=>this.chart.data.datasets[e.datasetIndex]&&void 0!==this.chart.getDatasetMeta(e.datasetIndex).controller.getParsed(e.index));const a=this.chart.getElementsAtEventForMode(e,n.mode,n,i);return n.reverse&&a.reverse(),a}_positionChanged(e,t){const{caretX:i,caretY:r,options:n}=this,a=positioners[n.position].call(this,e,t);return!1!==a&&(i!==a.x||r!==a.y)}}var plugin_tooltip={id:"tooltip",_element:Tooltip,positioners:positioners,afterInit(e,t,i){i&&(e.tooltip=new Tooltip({chart:e,options:i}))},beforeUpdate(e,t,i){e.tooltip&&e.tooltip.initialize(i)},reset(e,t,i){e.tooltip&&e.tooltip.initialize(i)},afterDraw(e){const t=e.tooltip;if(t&&t._willRender()){const i={tooltip:t};if(!1===e.notifyPlugins("beforeTooltipDraw",{...i,cancelable:!0}))return;t.draw(e.ctx),e.notifyPlugins("afterTooltipDraw",i)}},afterEvent(e,t){if(e.tooltip){const i=t.replay;e.tooltip.handleEvent(t.event,i,t.inChartArea)&&(t.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(e,t)=>t.bodyFont.size,boxWidth:(e,t)=>t.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:defaultCallbacks},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:e=>"filter"!==e&&"itemSort"!==e&&"external"!==e,_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]};const addIfString=(e,t,i,r)=>("string"==typeof t?(i=e.push(t)-1,r.unshift({index:i,label:t})):isNaN(t)&&(i=null),i);function findOrAddLabel(e,t,i,r){const n=e.indexOf(t);if(-1===n)return addIfString(e,t,i,r);return n!==e.lastIndexOf(t)?i:n}const validIndex=(e,t)=>null===e?null:_limitValue(Math.round(e),0,t);function _getLabelForValue(e){const t=this.getLabels();return e>=0&&e<t.length?t[e]:e}class CategoryScale extends Scale{static id="category";static defaults={ticks:{callback:_getLabelForValue}};constructor(e){super(e),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(e){const t=this._addedLabels;if(t.length){const e=this.getLabels();for(const{index:i,label:r}of t)e[i]===r&&e.splice(i,1);this._addedLabels=[]}super.init(e)}parse(e,t){if(isNullOrUndef(e))return null;const i=this.getLabels();return t=isFinite(t)&&i[t]===e?t:findOrAddLabel(i,e,valueOrDefault(t,e),this._addedLabels),validIndex(t,i.length-1)}determineDataLimits(){const{minDefined:e,maxDefined:t}=this.getUserBounds();let{min:i,max:r}=this.getMinMax(!0);"ticks"===this.options.bounds&&(e||(i=0),t||(r=this.getLabels().length-1)),this.min=i,this.max=r}buildTicks(){const e=this.min,t=this.max,i=this.options.offset,r=[];let n=this.getLabels();n=0===e&&t===n.length-1?n:n.slice(e,t+1),this._valueRange=Math.max(n.length-(i?0:1),1),this._startValue=this.min-(i?.5:0);for(let i=e;i<=t;i++)r.push({value:i});return r}getLabelForValue(e){return _getLabelForValue.call(this,e)}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(e){return"number"!=typeof e&&(e=this.parse(e)),null===e?NaN:this.getPixelForDecimal((e-this._startValue)/this._valueRange)}getPixelForTick(e){const t=this.ticks;return e<0||e>t.length-1?null:this.getPixelForValue(t[e].value)}getValueForPixel(e){return Math.round(this._startValue+this.getDecimalForPixel(e)*this._valueRange)}getBasePixel(){return this.bottom}}function generateTicks$1(e,t){const i=[],{bounds:r,step:n,min:a,max:s,precision:o,count:l,maxTicks:c,maxDigits:h,includeBounds:p}=e,u=n||1,d=c-1,{min:f,max:m}=t,g=!isNullOrUndef(a),v=!isNullOrUndef(s),y=!isNullOrUndef(l),b=(m-f)/(h+1);let x,_,S,w,C=niceNum((m-f)/d/u)*u;if(C<1e-14&&!g&&!v)return[{value:f},{value:m}];w=Math.ceil(m/C)-Math.floor(f/C),w>d&&(C=niceNum(w*C/d/u)*u),isNullOrUndef(o)||(x=Math.pow(10,o),C=Math.ceil(C*x)/x),"ticks"===r?(_=Math.floor(f/C)*C,S=Math.ceil(m/C)*C):(_=f,S=m),g&&v&&n&&almostWhole((s-a)/n,C/1e3)?(w=Math.round(Math.min((s-a)/C,c)),C=(s-a)/w,_=a,S=s):y?(_=g?a:_,S=v?s:S,w=l-1,C=(S-_)/w):(w=(S-_)/C,w=almostEquals(w,Math.round(w),C/1e3)?Math.round(w):Math.ceil(w));const P=Math.max(_decimalPlaces(C),_decimalPlaces(_));x=Math.pow(10,isNullOrUndef(o)?P:o),_=Math.round(_*x)/x,S=Math.round(S*x)/x;let E=0;for(g&&(p&&_!==a?(i.push({value:a}),_<a&&E++,almostEquals(Math.round((_+E*C)*x)/x,a,relativeLabelSize(a,b,e))&&E++):_<a&&E++);E<w;++E){const e=Math.round((_+E*C)*x)/x;if(v&&e>s)break;i.push({value:e})}return v&&p&&S!==s?i.length&&almostEquals(i[i.length-1].value,s,relativeLabelSize(s,b,e))?i[i.length-1].value=s:i.push({value:s}):v&&S!==s||i.push({value:S}),i}function relativeLabelSize(e,t,{horizontal:i,minRotation:r}){const n=toRadians(r),a=(i?Math.sin(n):Math.cos(n))||.001,s=.75*t*(""+e).length;return Math.min(t/a,s)}class LinearScaleBase extends Scale{constructor(e){super(e),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(e,t){return isNullOrUndef(e)||("number"==typeof e||e instanceof Number)&&!isFinite(+e)?null:+e}handleTickRangeOptions(){const{beginAtZero:e}=this.options,{minDefined:t,maxDefined:i}=this.getUserBounds();let{min:r,max:n}=this;const a=e=>r=t?r:e,s=e=>n=i?n:e;if(e){const e=sign(r),t=sign(n);e<0&&t<0?s(0):e>0&&t>0&&a(0)}if(r===n){let t=0===n?1:Math.abs(.05*n);s(n+t),e||a(r-t)}this.min=r,this.max=n}getTickLimit(){const e=this.options.ticks;let t,{maxTicksLimit:i,stepSize:r}=e;return r?(t=Math.ceil(this.max/r)-Math.floor(this.min/r)+1,t>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${r} would result generating up to ${t} ticks. Limiting to 1000.`),t=1e3)):(t=this.computeTickLimit(),i=i||11),i&&(t=Math.min(i,t)),t}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const e=this.options,t=e.ticks;let i=this.getTickLimit();i=Math.max(2,i);const r=generateTicks$1({maxTicks:i,bounds:e.bounds,min:e.min,max:e.max,precision:t.precision,step:t.stepSize,count:t.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:t.minRotation||0,includeBounds:!1!==t.includeBounds},this._range||this);return"ticks"===e.bounds&&_setMinAndMaxByKey(r,this,"value"),e.reverse?(r.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),r}configure(){const e=this.ticks;let t=this.min,i=this.max;if(super.configure(),this.options.offset&&e.length){const r=(i-t)/Math.max(e.length-1,1)/2;t-=r,i+=r}this._startValue=t,this._endValue=i,this._valueRange=i-t}getLabelForValue(e){return formatNumber(e,this.chart.options.locale,this.options.ticks.format)}}class LinearScale extends LinearScaleBase{static id="linear";static defaults={ticks:{callback:Ticks.formatters.numeric}};determineDataLimits(){const{min:e,max:t}=this.getMinMax(!0);this.min=isNumberFinite(e)?e:0,this.max=isNumberFinite(t)?t:1,this.handleTickRangeOptions()}computeTickLimit(){const e=this.isHorizontal(),t=e?this.width:this.height,i=toRadians(this.options.ticks.minRotation),r=(e?Math.sin(i):Math.cos(i))||.001,n=this._resolveTickFontOptions(0);return Math.ceil(t/Math.min(40,n.lineHeight/r))}getPixelForValue(e){return null===e?NaN:this.getPixelForDecimal((e-this._startValue)/this._valueRange)}getValueForPixel(e){return this._startValue+this.getDecimalForPixel(e)*this._valueRange}}const INTERVALS={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}},UNITS=Object.keys(INTERVALS);function sorter(e,t){return e-t}function parse(e,t){if(isNullOrUndef(t))return null;const i=e._adapter,{parser:r,round:n,isoWeekday:a}=e._parseOpts;let s=t;return"function"==typeof r&&(s=r(s)),isNumberFinite(s)||(s="string"==typeof r?i.parse(s,r):i.parse(s)),null===s?null:(n&&(s="week"!==n||!isNumber(a)&&!0!==a?i.startOf(s,n):i.startOf(s,"isoWeek",a)),+s)}function determineUnitForAutoTicks(e,t,i,r){const n=UNITS.length;for(let a=UNITS.indexOf(e);a<n-1;++a){const e=INTERVALS[UNITS[a]],n=e.steps?e.steps:Number.MAX_SAFE_INTEGER;if(e.common&&Math.ceil((i-t)/(n*e.size))<=r)return UNITS[a]}return UNITS[n-1]}function determineUnitForFormatting(e,t,i,r,n){for(let a=UNITS.length-1;a>=UNITS.indexOf(i);a--){const i=UNITS[a];if(INTERVALS[i].common&&e._adapter.diff(n,r,i)>=t-1)return i}return UNITS[i?UNITS.indexOf(i):0]}function determineMajorUnit(e){for(let t=UNITS.indexOf(e)+1,i=UNITS.length;t<i;++t)if(INTERVALS[UNITS[t]].common)return UNITS[t]}function addTick(e,t,i){if(i){if(i.length){const{lo:r,hi:n}=_lookup(i,t);e[i[r]>=t?i[r]:i[n]]=!0}}else e[t]=!0}function setMajorTicks(e,t,i,r){const n=e._adapter,a=+n.startOf(t[0].value,r),s=t[t.length-1].value;let o,l;for(o=a;o<=s;o=+n.add(o,1,r))l=i[o],l>=0&&(t[l].major=!0);return t}function ticksFromTimestamps(e,t,i){const r=[],n={},a=t.length;let s,o;for(s=0;s<a;++s)o=t[s],n[o]=s,r.push({value:o,major:!1});return 0!==a&&i?setMajorTicks(e,r,n,i):r}class TimeScale extends Scale{static id="time";static defaults={bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",callback:!1,major:{enabled:!1}}};constructor(e){super(e),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(e,t={}){const i=e.time||(e.time={}),r=this._adapter=new adapters._date(e.adapters.date);r.init(t),mergeIf(i.displayFormats,r.formats()),this._parseOpts={parser:i.parser,round:i.round,isoWeekday:i.isoWeekday},super.init(e),this._normalized=t.normalized}parse(e,t){return void 0===e?null:parse(this,e)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const e=this.options,t=this._adapter,i=e.time.unit||"day";let{min:r,max:n,minDefined:a,maxDefined:s}=this.getUserBounds();function o(e){a||isNaN(e.min)||(r=Math.min(r,e.min)),s||isNaN(e.max)||(n=Math.max(n,e.max))}a&&s||(o(this._getLabelBounds()),"ticks"===e.bounds&&"labels"===e.ticks.source||o(this.getMinMax(!1))),r=isNumberFinite(r)&&!isNaN(r)?r:+t.startOf(Date.now(),i),n=isNumberFinite(n)&&!isNaN(n)?n:+t.endOf(Date.now(),i)+1,this.min=Math.min(r,n-1),this.max=Math.max(r+1,n)}_getLabelBounds(){const e=this.getLabelTimestamps();let t=Number.POSITIVE_INFINITY,i=Number.NEGATIVE_INFINITY;return e.length&&(t=e[0],i=e[e.length-1]),{min:t,max:i}}buildTicks(){const e=this.options,t=e.time,i=e.ticks,r="labels"===i.source?this.getLabelTimestamps():this._generate();"ticks"===e.bounds&&r.length&&(this.min=this._userMin||r[0],this.max=this._userMax||r[r.length-1]);const n=this.min,a=_filterBetween(r,n,this.max);return this._unit=t.unit||(i.autoSkip?determineUnitForAutoTicks(t.minUnit,this.min,this.max,this._getLabelCapacity(n)):determineUnitForFormatting(this,a.length,t.minUnit,this.min,this.max)),this._majorUnit=i.major.enabled&&"year"!==this._unit?determineMajorUnit(this._unit):void 0,this.initOffsets(r),e.reverse&&a.reverse(),ticksFromTimestamps(this,a,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map(e=>+e.value))}initOffsets(e=[]){let t,i,r=0,n=0;this.options.offset&&e.length&&(t=this.getDecimalForValue(e[0]),r=1===e.length?1-t:(this.getDecimalForValue(e[1])-t)/2,i=this.getDecimalForValue(e[e.length-1]),n=1===e.length?i:(i-this.getDecimalForValue(e[e.length-2]))/2);const a=e.length<3?.5:.25;r=_limitValue(r,0,a),n=_limitValue(n,0,a),this._offsets={start:r,end:n,factor:1/(r+1+n)}}_generate(){const e=this._adapter,t=this.min,i=this.max,r=this.options,n=r.time,a=n.unit||determineUnitForAutoTicks(n.minUnit,t,i,this._getLabelCapacity(t)),s=valueOrDefault(r.ticks.stepSize,1),o="week"===a&&n.isoWeekday,l=isNumber(o)||!0===o,c={};let h,p,u=t;if(l&&(u=+e.startOf(u,"isoWeek",o)),u=+e.startOf(u,l?"day":a),e.diff(i,t,a)>1e5*s)throw new Error(t+" and "+i+" are too far apart with stepSize of "+s+" "+a);const d="data"===r.ticks.source&&this.getDataTimestamps();for(h=u,p=0;h<i;h=+e.add(h,s,a),p++)addTick(c,h,d);return h!==i&&"ticks"!==r.bounds&&1!==p||addTick(c,h,d),Object.keys(c).sort(sorter).map(e=>+e)}getLabelForValue(e){const t=this._adapter,i=this.options.time;return i.tooltipFormat?t.format(e,i.tooltipFormat):t.format(e,i.displayFormats.datetime)}format(e,t){const i=this.options.time.displayFormats,r=this._unit,n=t||i[r];return this._adapter.format(e,n)}_tickFormatFunction(e,t,i,r){const n=this.options,a=n.ticks.callback;if(a)return callback(a,[e,t,i],this);const s=n.time.displayFormats,o=this._unit,l=this._majorUnit,c=o&&s[o],h=l&&s[l],p=i[t],u=l&&h&&p&&p.major;return this._adapter.format(e,r||(u?h:c))}generateTickLabels(e){let t,i,r;for(t=0,i=e.length;t<i;++t)r=e[t],r.label=this._tickFormatFunction(r.value,t,e)}getDecimalForValue(e){return null===e?NaN:(e-this.min)/(this.max-this.min)}getPixelForValue(e){const t=this._offsets,i=this.getDecimalForValue(e);return this.getPixelForDecimal((t.start+i)*t.factor)}getValueForPixel(e){const t=this._offsets,i=this.getDecimalForPixel(e)/t.factor-t.end;return this.min+i*(this.max-this.min)}_getLabelSize(e){const t=this.options.ticks,i=this.ctx.measureText(e).width,r=toRadians(this.isHorizontal()?t.maxRotation:t.minRotation),n=Math.cos(r),a=Math.sin(r),s=this._resolveTickFontOptions(0).size;return{w:i*n+s*a,h:i*a+s*n}}_getLabelCapacity(e){const t=this.options.time,i=t.displayFormats,r=i[t.unit]||i.millisecond,n=this._tickFormatFunction(e,0,ticksFromTimestamps(this,[e],this._majorUnit),r),a=this._getLabelSize(n),s=Math.floor(this.isHorizontal()?this.width/a.w:this.height/a.h)-1;return s>0?s:1}getDataTimestamps(){let e,t,i=this._cache.data||[];if(i.length)return i;const r=this.getMatchingVisibleMetas();if(this._normalized&&r.length)return this._cache.data=r[0].controller.getAllParsedValues(this);for(e=0,t=r.length;e<t;++e)i=i.concat(r[e].controller.getAllParsedValues(this));return this._cache.data=this.normalize(i)}getLabelTimestamps(){const e=this._cache.labels||[];let t,i;if(e.length)return e;const r=this.getLabels();for(t=0,i=r.length;t<i;++t)e.push(parse(this,r[t]));return this._cache.labels=this._normalized?e:this.normalize(e)}normalize(e){return _arrayUnique(e.sort(sorter))}}function interpolate(e,t,i){let r,n,a,s,o=0,l=e.length-1;i?(t>=e[o].pos&&t<=e[l].pos&&({lo:o,hi:l}=_lookupByKey(e,"pos",t)),({pos:r,time:a}=e[o]),({pos:n,time:s}=e[l])):(t>=e[o].time&&t<=e[l].time&&({lo:o,hi:l}=_lookupByKey(e,"time",t)),({time:r,pos:a}=e[o]),({time:n,pos:s}=e[l]));const c=n-r;return c?a+(s-a)*(t-r)/c:a}class TimeSeriesScale extends TimeScale{static id="timeseries";static defaults=TimeScale.defaults;constructor(e){super(e),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const e=this._getTimestampsForTable(),t=this._table=this.buildLookupTable(e);this._minPos=interpolate(t,this.min),this._tableRange=interpolate(t,this.max)-this._minPos,super.initOffsets(e)}buildLookupTable(e){const{min:t,max:i}=this,r=[],n=[];let a,s,o,l,c;for(a=0,s=e.length;a<s;++a)l=e[a],l>=t&&l<=i&&r.push(l);if(r.length<2)return[{time:t,pos:0},{time:i,pos:1}];for(a=0,s=r.length;a<s;++a)c=r[a+1],o=r[a-1],l=r[a],Math.round((c+o)/2)!==l&&n.push({time:l,pos:a/(s-1)});return n}_generate(){const e=this.min,t=this.max;let i=super.getDataTimestamps();return i.includes(e)&&i.length||i.splice(0,0,e),i.includes(t)&&1!==i.length||i.push(t),i.sort((e,t)=>e-t)}_getTimestampsForTable(){let e=this._cache.all||[];if(e.length)return e;const t=this.getDataTimestamps(),i=this.getLabelTimestamps();return e=t.length&&i.length?this.normalize(t.concat(i)):t.length?t:i,e=this._cache.all=e,e}getDecimalForValue(e){return(interpolate(this._table,e)-this._minPos)/this._tableRange}getValueForPixel(e){const t=this._offsets,i=this.getDecimalForPixel(e)/t.factor-t.end;return interpolate(this._table,i*this._tableRange+this._minPos,!0)}}const getCSSVariable=(e,t=1,i="#666666")=>{const r=getComputedStyle(document.documentElement).getPropertyValue(e).trim();if(!r)return console.warn(`CSS variable ${e} not found, using fallback color: ${i}`),i;if(1===t)return r;if(r.startsWith("#")){const e=r.replace("#","");return`rgba(${parseInt(e.substr(0,2),16)}, ${parseInt(e.substr(2,2),16)}, ${parseInt(e.substr(4,2),16)}, ${t})`}return r.startsWith("rgb")?r.startsWith("rgba")?r.replace(/[\d.]+\)$/,`${t})`):r.replace("rgb","rgba").replace(")",`, ${t})`):r};function BasicPriceChart({legend:e,chartOptions:t,noChartDisplay:i,id:r,className:n}){var a;const s=React.useRef(null),o=React.useRef(null);return React.useLayoutEffect(()=>{var e,i;if(!s.current)return;const r=s.current.getContext("2d");if(!r)return;const n=null==r?void 0:r.createLinearGradient(0,0,300,0);return null==n||n.addColorStop(0,getCSSVariable("--secondary-color")),null==n||n.addColorStop(.3,getCSSVariable("--secondary-dark-color")),null==n||n.addColorStop(.7,getCSSVariable("--primary-color")),o.current&&o.current.destroy(),(null===(e=t.data.datasets[0])||void 0===e?void 0:e.backgroundColor)&&(t.data.datasets[0].backgroundColor=[n,"rgba(0, 0, 0, 0.2)"]),(null===(i=t.data.datasets[0])||void 0===i?void 0:i.borderColor)&&(t.data.datasets[0].borderColor=[n,"rgba(0, 0, 0, 0.2)"]),o.current=new Chart(r,t),()=>{var e;null===(e=o.current)||void 0===e||e.destroy()}},[t]),require$$0.jsx("div",{id:r,className:"basic-price-chart"+(n?" "+n:""),children:require$$0.jsx("div",{className:"basic-price-chart__content",children:(null===(a=t.data.datasets[0])||void 0===a?void 0:a.data.every(e=>0===e))?require$$0.jsx("div",{className:"basic-price-chart__empty",children:null!=i?i:require$$0.jsx("div",{children:"Kein Chart verfügbar"})}):require$$0.jsxs(require$$0.Fragment,{children:[require$$0.jsx("div",{className:"basic-price-chart__chart",children:require$$0.jsx("canvas",{ref:s})}),e]})})})}function LvEditingStatusChart({chartOptions:e,legend:t,noChartDisplay:i,id:r,className:n}){var a;const s=React.useRef(null),o=React.useRef(null);return React.useLayoutEffect(()=>{var t,i;if(!s.current)return;const r=s.current.getContext("2d");return r?(o.current&&o.current.destroy(),(null===(t=e.data.datasets[0])||void 0===t?void 0:t.backgroundColor)&&(e.data.datasets[0].backgroundColor=[getCSSVariable("--warning-color",.6),getCSSVariable("--valid-color",.6),getCSSVariable("--error-color",.6)]),(null===(i=e.data.datasets[0])||void 0===i?void 0:i.borderColor)&&(e.data.datasets[0].borderColor=[getCSSVariable("--warning-color",.6),getCSSVariable("--valid-color",.6),getCSSVariable("--error-color",.6)]),o.current=new Chart(r,e),()=>{var e;null===(e=o.current)||void 0===e||e.destroy()}):void 0},[]),require$$0.jsx("div",{id:r,className:"lv-editing-status-chart"+(n?" "+n:""),children:require$$0.jsx("div",{className:"lv-editing-status-chart__content",children:(null===(a=e.data.datasets[0])||void 0===a?void 0:a.data.every(e=>0===e))?require$$0.jsx("div",{className:"lv-editing-status-chart__empty",children:null!=i?i:require$$0.jsx("div",{children:"Kein Chart verfügbar"})}):require$$0.jsxs(require$$0.Fragment,{children:[require$$0.jsx("div",{className:"lv-editing-status-chart__chart",children:require$$0.jsx("canvas",{ref:s})}),t]})})})}function LvInsightsChart({chartOptions:e,legend:t,noChartDisplay:i,id:r,className:n}){var a;const s=React.useRef(null),o=React.useRef(null),l=[getCSSVariable("--secondary-color",.7),getCSSVariable("--primary-color",.7),getCSSVariable("--info-color",.7),getCSSVariable("--diagram-color-5",.7)],c=[getCSSVariable("--secondary-color",1),getCSSVariable("--primary-color",1),getCSSVariable("--info-color",1),getCSSVariable("--diagram-color-5",1)];return React.useLayoutEffect(()=>{var t,i;if(!s.current)return;const r=s.current.getContext("2d");return r?(o.current&&o.current.destroy(),(null===(t=e.data.datasets[0])||void 0===t?void 0:t.backgroundColor)&&(e.data.datasets[0].backgroundColor=l),(null===(i=e.data.datasets[0])||void 0===i?void 0:i.hoverBackgroundColor)&&(e.data.datasets[0].hoverBackgroundColor=c),o.current=new Chart(r,e),()=>{var e;null===(e=o.current)||void 0===e||e.destroy()}):void 0},[]),require$$0.jsx("div",{id:r,className:"lv-insights"+(n?" "+n:""),children:require$$0.jsx("div",{className:"lv-insights__content",children:(null===(a=e.data.datasets[0])||void 0===a?void 0:a.data.every(e=>0===e))?require$$0.jsx("div",{className:"lv-insights__empty",children:null!=i?i:require$$0.jsx("div",{children:"Kein Chart verfügbar"})}):require$$0.jsxs(require$$0.Fragment,{children:[require$$0.jsx("div",{className:"lv-insights__chart",children:require$$0.jsx("canvas",{ref:s})}),t]})})})}function ContractPotentialsChart({chartOptions:e,legend:t,noChartDisplay:i,id:r,className:n}){var a,s;const o=React.useRef(null),l=React.useRef(null);return React.useLayoutEffect(()=>{var t,i;if(!o.current)return;const r=o.current.getContext("2d");return r?(l.current&&l.current.destroy(),(null===(t=e.data.datasets[0])||void 0===t?void 0:t.backgroundColor)&&(e.data.datasets[0].backgroundColor=[getCSSVariable("--secondary-color-50")]),(null===(i=e.data.datasets[1])||void 0===i?void 0:i.backgroundColor)&&(e.data.datasets[1].backgroundColor=[getCSSVariable("--primary-color-68",1)]),l.current=new Chart(r,e),()=>{var e;null===(e=l.current)||void 0===e||e.destroy()}):void 0},[e]),require$$0.jsx("div",{id:r,className:"contract-potentials"+(n?" "+n:""),children:require$$0.jsx("div",{className:"contract-potentials__content",children:(null===(a=e.data.datasets[0])||void 0===a?void 0:a.data.every(e=>0===e))&&(null===(s=e.data.datasets[1])||void 0===s?void 0:s.data.every(e=>0===e))?require$$0.jsx("div",{className:"contract-potentials__empty",children:null!=i?i:require$$0.jsx("div",{children:"Kein Chart verfügbar"})}):require$$0.jsxs(require$$0.Fragment,{children:[require$$0.jsx("div",{className:"contract-potentials__chart",children:require$$0.jsx("canvas",{ref:o})}),t]})})})}function BeeLabel({id:e,className:t,value:i,size:r="medium",type:n="neutral"}){const a=null!=e?e:libExports.useId(1,"bee-info-label-")[0],s="bee-label "+("neutral"===n?" bee-info-neutral-label":"valid"===n?" bee-info-valid-label":"error"===n?" bee-error-label":"")+("small"===r?" bee-info-label-small":"medium"===r?" bee-info-label-medium":"large"===r?" bee-info-label-large":" bee-info-label-medium")+(t?" "+t:"");return require$$0.jsx("span",{id:a,className:s,children:i})}Chart.register(DoughnutController,ArcElement,plugin_tooltip,plugin_legend),Chart.register(PieController,ArcElement,plugin_tooltip,plugin_legend),Chart.register(DoughnutController,ArcElement,plugin_tooltip,plugin_legend),Chart.register(BarController,CategoryScale,LinearScale,BarElement,plugin_tooltip,plugin_legend);const EMPTY_FIELD_PLACEHOLDER=" — ";function BeeTextInput({id:e,className:t,label:i,value:r,disabled:n,statusLabel:a,formstate:s="neutral",halfRounded:o,readOnly:l,required:c,placeholder:h,tooltip:p,tooltipOptions:u,onChange:d,onFocusOut:f}){var m;const g=null!==(m=null!=e?e:libExports.useId(1,"bee-txt-input-")[0])&&void 0!==m?m:"bee-txt-input";let v="";l&&(v=" bee-txt-input-readOnly",n=!0);const y="bee-txt-input "+("valid"===s?" bee-txt-input-valid":"error"===s?" bee-txt-input-error":"neutral"===s?" bee-txt-input-neutral":"none"===s?" bee-cur-input-field-neutral":" bee-txt-input-neutral"),b="p-float-label bee-txt-input-container"+v+(o?" half-rounded":"");return require$$0.jsxs(require$$0.Fragment,{children:[require$$0.jsx("div",{id:g,className:b+(t?" "+t:""),children:l&&!r?require$$0.jsx(BeePlaceholder,{id:g,label:i}):require$$0.jsxs(require$$0.Fragment,{children:[require$$0.jsx(inputtext.InputText,{id:g+"input",value:null!=r?r:void 0,disabled:null!=n&&n,className:y,placeholder:h,tooltip:p,tooltipOptions:u,onChange:e=>function(e){!n&&d&&d(e)}(e),onBlur:e=>function(e){!n&&f&&f(e)}(e)}),i?require$$0.jsxs("label",{htmlFor:g+"input",className:"bee-txt-input-label",children:[i,c&&i?require$$0.jsx("span",{className:"bee-txt-input-label-required",children:require$$0.jsx("span",{className:"bee-txt-input-label-required-star",children:" *"})}):null]}):null]})}),"none"!=s&&a?(()=>{const e="medium";return require$$0.jsx("div",{className:"bee-text-input-statusLabel",children:"error"===s&&a?require$$0.jsx(BeeLabel,{size:e,value:a,type:"error"}):"valid"===s&&a?require$$0.jsx(BeeLabel,{size:e,value:a,type:"valid"}):"neutral"===s&&a?require$$0.jsx(BeeLabel,{size:e,value:a,type:"neutral"}):null})})():null]})}function BeePlaceholder({id:e,className:t,label:i,disabled:r}){const n=null!=e?e:libExports.useId(1,"bee-placeholder-")[0];return require$$0.jsx(BeeTextInput,{id:n+"input",label:i,value:EMPTY_FIELD_PLACEHOLDER,className:null!=t?t:"",disabled:null==r||r,readOnly:!0,formstate:"neutral"})}function BeeAutocompleteDropdown({id:e,className:t,label:i,value:r,suggestions:n,disabled:a,statusLabel:s,formstate:o="neutral",readOnly:l,required:c,placeholder:h,tooltip:p,tooltipOptions:u,onChange:d,onFocusOut:f}){const m=null!=e?e:libExports.useId(1,"bee-autocomplete-dropdown-")[0],[g,v]=React.useState(null!=n?n:[]),y="bee-autocomplete-dropdown "+("valid"===o?" bee-autocomplete-dropdown-valid":"error"===o?" bee-autocomplete-dropdown-error":"neutral"===o?" bee-autocomplete-dropdown-neutral":"none"===o?" bee-autocomplete-dropdodown-none":" bee-autocomplete-dropdown-neutral"),b="p-float-label bee-autocomplete-dropdown-container"+(l?" bee-autocomplete-dropdown-readOnly":"")+(a?" bee-autocomplete-dropdown-disabled":"");return require$$0.jsxs(require$$0.Fragment,{children:[require$$0.jsx("span",{id:m,className:b+(t?" "+t:""),children:l&&!r?require$$0.jsx(BeePlaceholder,{id:m,label:i}):require$$0.jsxs(require$$0.Fragment,{children:[require$$0.jsx(autocomplete.AutoComplete,{id:m+"input",value:null!=r?r:void 0,dropdown:!0,suggestions:g,disabled:null!=a&&a,className:y,placeholder:h,tooltip:p,tooltipOptions:u,onChange:e=>function(e){!a&&d&&d(e)}(e),onBlur:e=>function(e){!a&&f&&f(e)}(e),completeMethod:e=>{const t=(null!=n?n:[]).filter(t=>String(t).toLowerCase().startsWith(e.query.toLowerCase()));v(t)}}),i?require$$0.jsxs("label",{htmlFor:m+"input",className:"bee-autocomplete-dropdown-label",children:[i,c&&i?require$$0.jsx("span",{className:"bee-autocomplete-dropdown-label-required",children:require$$0.jsx("span",{className:"bee-autocomplete-dropdown-label-required-star",children:" *"})}):null]}):null]})}),"none"!=o&&s?(()=>{const e="medium";return require$$0.jsx("div",{className:"bee-autocomplete-dropdown-statusLabel",children:"error"===o&&s?require$$0.jsx(BeeLabel,{size:e,value:s,type:"error"}):"valid"===o&&s?require$$0.jsx(BeeLabel,{size:e,value:s,type:"valid"}):"neutral"===o&&s?require$$0.jsx(BeeLabel,{size:e,value:s,type:"neutral"}):null})})():null]})}function BeeAutocompleteTag({id:e,className:t,label:i,value:r,suggestions:n,disabled:a,statusLabel:s,formstate:o="neutral",readOnly:l,required:c,placeholder:h,tooltip:p,tooltipOptions:u,onChange:d,onFocusOut:f}){const m=null!=e?e:libExports.useId(1,"bee-autocomplete-tag-")[0],[g,v]=React.useState(null!=n?n:[]);let y="";l&&(y=" bee-autocomplete-tag-readOnly",a=!0);const b="bee-autocomplete-tag "+("valid"===o?" bee-autocomplete-tag-valid":"error"===o?" bee-autocomplete-tag-error":"neutral"===o?" bee-autocomplete-tag-neutral":"none"===o?" bee-cur-input-field-neutral":" bee-autocomplete-tag-neutral"),x="p-float-label bee-autocomplete-tag-container"+y;const _=void 0===r?[]:Array.isArray(r)?r.map(String):[String(r)];return require$$0.jsxs(require$$0.Fragment,{children:[require$$0.jsx("div",{id:m,className:x+(t?" "+t:""),children:l&&!r?require$$0.jsx(BeePlaceholder,{id:m,label:i}):require$$0.jsxs(require$$0.Fragment,{children:[require$$0.jsx(autocomplete.AutoComplete,{id:m+"input",value:_,multiple:!0,suggestions:g,disabled:null!=a&&a,className:b,placeholder:h,tooltip:p,tooltipOptions:u,onChange:e=>function(e){!a&&d&&d(e)}(e),onBlur:e=>function(e){!a&&f&&f(e)}(e),completeMethod:e=>{const t=(null!=n?n:[]).filter(t=>String(t).toLowerCase().startsWith(e.query.toLowerCase()));v(t)}}),i?require$$0.jsxs("label",{htmlFor:m+"input",className:"bee-autocomplete-tag-label",children:[i,c&&i?require$$0.jsx("span",{className:"bee-autocomplete-tag-label-required",children:require$$0.jsx("span",{className:"bee-autocomplete-tag-label-required-star",children:" *"})}):null]}):null]})}),"none"!=o&&s?(()=>{const e="medium";return require$$0.jsx("div",{className:"bee-autocomplete-tag-statusLabel",children:"error"===o&&s?require$$0.jsx(BeeLabel,{size:e,value:s,type:"error"}):"valid"===o&&s?require$$0.jsx(BeeLabel,{size:e,value:s,type:"valid"}):"neutral"===o&&s?require$$0.jsx(BeeLabel,{size:e,value:s,type:"neutral"}):null})})():null]})}function BeeBadge({id:e,className:t,label:i,type:r="primary",size:n="normal"}){const a=null!=e?e:libExports.useId(1,"bee-badge-")[0],s="primary"===r?"bee-badge bee-badge-primary":"secondary"===r?"bee-badge bee-badge-secondary":"danger"===r?"bee-badge bee-badge-danger":"bee-badge bee-badge-primary"+(t?" "+t:"");return require$$0.jsx(badge.Badge,{id:a,value:i,className:s,size:n})}function BeeContentHeadline({id:e,className:t,value:i,headlineType:r="h1",type:n="primary"}){const a=null!=e?e:libExports.useId(1,"bee-content-headline-")[0],s="primary"===n?"bee-headline bee-headline-primary":"secondary"===n?"bee-headline bee-headline-secondary":"bee-headline bee-headline-primary"+(t?" "+t:"");return"h1"===r?require$$0.jsx("h1",{id:a,className:s,children:i}):"h2"===r?require$$0.jsx("h2",{id:a,className:s,children:i}):"h3"===r?require$$0.jsx("h3",{id:a,className:s,children:i}):"h4"===r?require$$0.jsx("h4",{id:a,className:s,children:i}):"h5"===r?require$$0.jsx("h5",{id:a,className:s,children:i}):require$$0.jsx("h1",{id:a,className:s,children:i})}function BeeContentParagraph({id:e,className:t,value:i,size:r="medium",type:n="primary"}){const a=null!=e?e:libExports.useId(1,"bee-content-paragraph-")[0],s="bee-content-paragraph"+("xSmall"===r?" bee-content-paragraph-xsmall":"small"===r?" bee-content-paragraph-small":"medium"===r?" bee-content-paragraph-medium":"large"===r?" bee-content-paragraph-large":"xLarge"===r?" bee-content-paragraph-xlarge":" bee-content-paragraph-medium")+("primary"===n?" bee-content-paragraph-primary":"secondary"===n?" bee-content-paragraph-secondary":"")+(t?" "+t:"");return require$$0.jsx("p",{id:a,className:s,children:i})}function BeeLink({id:e,className:t,value:i,href:r,type:n="primary",size:a="medium",onClick:s}){const o=null!=e?e:libExports.useId(1,"bee-link-")[0],l="bee-link"+("primary"===n?" bee-link-primary":"secondary"===n?" bee-link-secondary":" bee-link-default")+("xSmall"===a?" bee-link-size-xSmall":"small"===a?" bee-link-size-small":"medium"===a?" bee-link-size-medium":"large"===a?" bee-link-size-large":"xLarge"===a?" bee-link-size-xLarge":" bee-link-size-medium");return require$$0.jsx(require$$0.Fragment,{children:r?require$$0.jsx("a",{id:o,className:l+(t?" "+t:""),href:r,children:i}):require$$0.jsx("a",{id:o,className:l+(t?" "+t:""),onClick:e=>function(e){s&&s(e)}(e),children:i})})}function BeeSequencePosition({id:e,className:t,data:i,type:r="primary"}){const n=null!=e?e:libExports.useId(1,"bee-seq-pos-")[0],a="bee-seq-pos"+("primary"===r?" bee-seq-pos-primary":"secondary"===r?" bee-seq-pos-secondary":"default"===r?" bee-seq-pos-default":" bee-seq-pos-primary")+(t?" "+t:"");return require$$0.jsx("div",{id:n,className:a,children:(()=>{if(i){let e=[];return i.forEach((t,i)=>{e.push(((e,t)=>{const i=(null==e?void 0:e.bold)?"bee-seq-pos-bold":void 0;return require$$0.jsxs("span",{children:[(null==e?void 0:e.icon)?require$$0.jsx("i",{className:e.icon}):null,null!=(null==e?void 0:e.label)?require$$0.jsx("span",{className:i,children:e.label}):null]},`SeqPos_${t}`)})(t,i)),e.push(require$$0.jsx("i",{className:"pi pi-chevron-right bee-seq-pos-separator"},">_"+i))}),e.pop(),e}})()})}function BeeChipInput({id:e,className:t,label:i,type:r="primary",data:n=[],statusLabel:a,formstate:s="neutral",required:o,disabled:l,readOnly:c,placeholder:h,tooltip:p,tooltipOptions:u,itemTemplate:d,onChange:f}){var m;const g=null!==(m=null!=e?e:libExports.useId(1,"bee-chip-input-")[0])&&void 0!==m?m:"bee-chip-input",v="bee-chip-input p-float-label"+("primary"===r?" bee-chip-input-primary":"secondary"===r?" bee-chip-input-secondary":" bee-chip-input-primary")+(c?" bee-chip-input-readOnly":"")+(l?" bee-chip-input-disabled":"")+("valid"===s?" bee-chip-input-field-valid":"error"===s?" bee-chip-input-field-error":" bee-chip-input-field-neutral")+(t?" "+t:""),y=o?"bee-chip-input-label-required":"",b=o?"bee-chip-input-label-required-star":"";return require$$0.jsxs("div",{id:g,className:v,children:[require$$0.jsx(require$$0.Fragment,{children:c&&!n||c&&n.length<1?require$$0.jsx(BeePlaceholder,{id:g,label:i}):require$$0.jsx(require$$0.Fragment,{children:require$$0.jsx(chips.Chips,Object.assign({value:n},void 0!==d?{itemTemplate:d}:{},{onChange:e=>function(e){!l&&f&&f(e)}(e),separator:",",addOnBlur:!0,removable:!c,readOnly:null!=c&&c,placeholder:h,tooltip:p,tooltipOptions:u}))})}),i?require$$0.jsxs("label",{className:"bee-chip-input-label",children:[i,o?require$$0.jsx("span",{className:y,children:require$$0.jsx("span",{className:b,children:" *"})}):null]}):null,"none"!=s&&a?(()=>{const e="medium";return require$$0.jsx("div",{className:"bee-chip-input-statusLabel",children:"error"===s&&a?require$$0.jsx(BeeLabel,{size:e,value:a,type:"error"}):"valid"===s&&a?require$$0.jsx(BeeLabel,{size:e,value:a,type:"valid"}):"neutral"===s&&a?require$$0.jsx(BeeLabel,{size:e,value:a,type:"neutral"}):null})})():null]})}function BeeCurrencyInput({id:e,className:t,label:i,value:r,showArrow:n,disabled:a,autoFocus:s,minFractionDigits:o,maxFractionDigits:l,max:c,min:h,currency:p="EUR",locale:u="de-DE",statusLabel:d,formstate:f="neutral",readOnly:m,required:g,placeholder:v,name:y,tooltip:b,tooltipOptions:x,onChange:_,onFocusOut:S}){var w;const C=null!==(w=null!=e?e:libExports.useId(1,"bee-cur-input-")[0])&&void 0!==w?w:"bee-cur-input",P=null!=o?o:2,E=null!=l?l:2;let k="";m&&(k=" bee-cur-input-field-readOnly",a=!0);const $=" bee-cur-input-container "+(n?" bee-cur-input-container--showArrow ":""),A="bee-cur-input-field"+("valid"===f?" bee-cur-input-field-valid":"error"===f?" bee-cur-input-field-error":" bee-cur-input-field-neutral")+k,T="icon icon-right-arrow "+(r&&r>0?"up-arrow":r&&r<0?"down-arrow":"");return require$$0.jsxs("div",{children:[m&&!r?require$$0.jsx("div",{className:null!=t?t:"",children:require$$0.jsx(BeePlaceholder,{id:C,label:i})}):require$$0.jsxs("div",{className:$+(t?" "+t:""),children:[n?require$$0.jsx("i",{className:T}):null,require$$0.jsxs("span",{id:C,className:"p-float-label ",children:[require$$0.jsx(inputnumber.InputNumber,{id:C+"input",value:null!=r?r:null,disabled:null!=a&&a,minFractionDigits:P,maxFractionDigits:E,max:c,min:h,autoFocus:s,mode:"currency",currency:p,inputId:C+"_input",inputClassName:A,locale:u,placeholder:v,name:y,tooltip:b,tooltipOptions:x,onValueChange:e=>function(e){!a&&_&&_(e)}(e),onBlur:e=>function(e){!a&&S&&S(e)}(e)}),i?require$$0.jsxs("label",{htmlFor:C+"input",className:"bee-cur-input-label",children:[i,g&&i?require$$0.jsx("span",{className:"bee-cur-input-label-required",children:require$$0.jsx("span",{className:"bee-cur-input-label-required-star",children:" *"})}):null]}):null]})]}),"none"!=f&&d?(()=>{const e="medium";return require$$0.jsx("div",{className:"bee-cur-input-statusLabel",children:"error"===f&&d?require$$0.jsx(BeeLabel,{size:e,value:d,type:"error"}):"valid"===f&&d?require$$0.jsx(BeeLabel,{size:e,value:d,type:"valid"}):"neutral"===f&&d?require$$0.jsx(BeeLabel,{size:e,value:d,type:"neutral"}):null})})():null]})}function BeeDateInput({id:e,className:t,label:i,value:r,statusLabel:n,formstate:a="neutral",disabled:s,readOnly:o,required:l,showButtonBar:c,dateFormat:h,view:p,minDate:u,maxDate:d,showMinMaxRange:f,showUTCDate:m,placeholder:g,tooltip:v,tooltipOptions:y,onChange:b,onFocusOut:x,panelClassName:_,locale:S="de"}){var w;const C=null!==(w=null!=e?e:libExports.useId(1,"bee-date-input-")[0])&&void 0!==w?w:"bee-date-input";let P="";o&&(P=" bee-date-input-readOnly",s=!0);const E=`bee-date-input ${"valid"===a?" bee-date-input-valid":"error"===a?" bee-date-input-error":" bee-date-input-neutral"} ${P} ${_||""}`;function k(e){if(!e||Array.isArray(e))return null;let t=new Date(e);return new Date(t.getTime()-6e4*t.getTimezoneOffset())}function $(e){if(!e||Array.isArray(e))return;let t=new Date(e);return new Date(t.getTime()+6e4*t.getTimezoneOffset())}function A(e){if(e&&!Array.isArray(e))return e instanceof Date?e:new Date(e)}return require$$0.jsxs(require$$0.Fragment,{children:[require$$0.jsx("div",{id:C,className:"p-float-label bee-date-input-container"+(t?" "+t:""),children:o&&!r?require$$0.jsx(BeePlaceholder,{id:C,label:i}):require$$0.jsxs(require$$0.Fragment,{children:[require$$0.jsx(calendar.Calendar,{id:C+"input",value:m&&r?$(r):A(r),disabled:null!=s&&s,className:E,showIcon:!0,showButtonBar:null!=c&&c,dateFormat:null!=h?h:"dd.mm.y",view:null!=p?p:"date",minDate:u?m?$(u):A(u):void 0,maxDate:d?m?$(d):A(d):void 0,showMinMaxRange:null!=f&&f,placeholder:g,tooltip:v,tooltipOptions:y,onChange:e=>function(e){var t;!s&&b&&(m?(e.value=null!==(t=k(e.value))&&void 0!==t?t:new Date,b(e)):b(e))}(e),onBlur:e=>function(e){var t,i;!s&&x&&(m?(e.target.value=null!==(i=null===(t=k(e.target.value))||void 0===t?void 0:t.toString())&&void 0!==i?i:e.target.value,x(e)):x(e))}(e),locale:S}),i?require$$0.jsxs("label",{htmlFor:C+"input",className:"bee-date-input-label",children:[i,l&&i?require$$0.jsx("span",{className:"bee-date-input-label-required",children:require$$0.jsx("span",{className:"bee-date-input-label-required-star",children:" *"})}):null]}):null]})}),"none"!=a&&n?(()=>{const e="medium";return require$$0.jsx("div",{className:"bee-date-input-statusLabel",children:"error"===a&&n?require$$0.jsx(BeeLabel,{size:e,value:n,type:"error"}):"valid"===a&&n?require$$0.jsx(BeeLabel,{size:e,value:n,type:"valid"}):"neutral"===a&&n?require$$0.jsx(BeeLabel,{size:e,value:n,type:"neutral"}):null})})():null]})}function BeeDateTimeInput({id:e,className:t,label:i,value:r,disabled:n,statusLabel:a,formstate:s="neutral",readOnly:o,required:l,minDate:c,maxDate:h,showMinMaxRange:p,placeholder:u,tooltip:d,tooltipOptions:f,onChange:m,onFocusOut:g}){var v;const y=null!==(v=null!=e?e:libExports.useId(1,"bee-date-time-input-")[0])&&void 0!==v?v:"bee-date-time-input";let b="";o&&(b=" bee-date-time-input-readOnly",n=!0);const x="bee-date-time-input"+("valid"===s?" bee-date-time-input-valid":"error"===s?" bee-date-time-input-error":"neutral"===s?" bee-date-time-input-neutral":"none"===s?" bee-date-time-field-neutral":" bee-date-time-input-neutral")+b;return require$$0.jsxs(require$$0.Fragment,{children:[o&&!r?require$$0.jsx("div",{className:null!=t?t:"",children:require$$0.jsx(BeePlaceholder,{id:y,label:i})}):require$$0.jsxs("span",{id:y,className:"p-float-label bee-date-time-input-container"+(t?" "+t:""),children:[require$$0.jsx(calendar.Calendar,{showTime:!0,showSeconds:!0,hourFormat:"24",dateFormat:"dd.mm.yy",value:r,disabled:null!=n&&n,className:x,minDate:c?new Date(c):void 0,maxDate:h?new Date(h):void 0,showMinMaxRange:null!=p&&p,placeholder:u,tooltip:d,tooltipOptions:f,onChange:e=>function(e){!n&&m&&m(e)}(e),onBlur:e=>function(e){!n&&g&&g(e)}(e)}),i?require$$0.jsxs("label",{htmlFor:y+"input",className:"bee-date-time-input-label",children:[i,l&&i?require$$0.jsx("span",{className:"bee-date-time-input-label-required",children:require$$0.jsx("span",{className:"bee-date-time-input-label-required-star",children:" *"})}):null]}):null]}),"none"!=s&&a?(()=>{const e="medium";return require$$0.jsx("div",{className:"bee-date-time-input-statusLabel",children:"error"===s&&a?require$$0.jsx(BeeLabel,{size:e,value:a,type:"error"}):"valid"===s&&a?require$$0.jsx(BeeLabel,{size:e,value:a,type:"valid"}):"neutral"===s&&a?require$$0.jsx(BeeLabel,{size:e,value:a,type:"neutral"}):null})})():null]})}function BeeNumberInput({id:e,className:t,label:i,value:r,showArrow:n,autoFocus:a,minFractionDigits:s,maxFractionDigits:o,max:l,min:c,disabled:h,grouping:p,locale:u="de-DE",statusLabel:d,formstate:f="neutral",readOnly:m,required:g,placeholder:v,tooltip:y,tooltipOptions:b,onChange:x,onFocusOut:_}){var S;const w=null!==(S=null!=e?e:libExports.useId(1,"bee-num-input")[0])&&void 0!==S?S:"bee-num-input";let C="";m&&(C=" bee-num-input-readOnly",h=!0);const P=" bee-num-input-container"+(n?" bee-num-input-container--showArrow":""),E="bee-num-input "+("valid"===f?"bee-num-input-valid":"error"===f?"bee-num-input-error":"bee-num-input-neutral")+C,k="icon icon-right-arrow "+(r&&r>0?"up-arrow":r&&r<0?"down-arrow":"");return require$$0.jsxs(require$$0.Fragment,{children:[m&&!r&&0!==r?require$$0.jsx("div",{className:null!=t?t:"",children:require$$0.jsx(BeePlaceholder,{id:w,label:i})}):require$$0.jsxs("div",{className:"flex-grow-0"+P+(t?" "+t:""),children:[n?require$$0.jsx("i",{className:k}):null,require$$0.jsxs("span",{id:w,className:"p-float-label",children:[require$$0.jsx(inputnumber.InputNumber,{id:w+"input",value:null!=r?r:null,disabled:null!=h&&h,mode:"decimal",autoFocus:a,useGrouping:p,minFractionDigits:s,maxFractionDigits:o,max:l,min:c,locale:u,inputClassName:E,placeholder:v,tooltip:y,tooltipOptions:b,onValueChange:e=>function(e){!h&&x&&x(e)}(e),onBlur:e=>function(e){!h&&_&&_(e)}(e)}),i?require$$0.jsxs("label",{htmlFor:w+"input",className:"bee-num-input-label",children:[i,g&&i?require$$0.jsx("span",{className:"bee-num-input-label-required",children:require$$0.jsx("span",{className:"bee-num-input-label-required-star",children:" *"})}):null]}):null]})]}),"none"!=f&&d?(()=>{const e="medium";return require$$0.jsx("div",{className:"bee-num-input-statusLabel",children:"error"===f&&d?require$$0.jsx(BeeLabel,{size:e,value:d,type:"error"}):"valid"===f&&d?require$$0.jsx(BeeLabel,{size:e,value:d,type:"valid"}):"neutral"===f&&d?require$$0.jsx(BeeLabel,{size:e,value:d,type:"neutral"}):null})})():null]})}function BeePasswordInput({id:e,className:t,label:i,value:r,disabled:n,showPwStrength:a,showHint:s,statusLabel:o,formstate:l="neutral",readOnly:c,required:h,placeholder:p,tooltip:u,tooltipOptions:d,onChange:f,onFocusOut:m}){var g;const v=null!==(g=null!=e?e:libExports.useId(1,"bee-pw-input")[0])&&void 0!==g?g:"bee-pw-input";let y="";c&&(y=" bee-pw-input-readOnly",n=!0);const b="bee-pw-input "+("valid"===l?"bee-pw-input-valid":"error"===l?"bee-pw-input-error":"bee-pw-input-neutral"),x="p-float-label bee-pw-container"+y,_=require$$0.jsx("h6",{children:"Passwort wählen"});const S=require$$0.jsxs(require$$0.Fragment,{children:[require$$0.jsx(divider.Divider,{}),require$$0.jsx("p",{className:"mt-2",children:"Suggestions"}),require$$0.jsxs("ul",{className:"pl-2 ml-2 mt-0",style:{lineHeight:"1.5"},children:[require$$0.jsx("li",{children:"Mind. einen Kleinbuchstaben"}),require$$0.jsx("li",{children:"Mind. einen Großbuchstaben"}),require$$0.jsx("li",{children:"Mind. eine Zahl"}),require$$0.jsx("li",{children:"Mind. 8 Buchstaben/Zahlen"})]})]});return require$$0.jsxs(require$$0.Fragment,{children:[require$$0.jsx("div",{className:null!=t?t:"",children:c&&!r?require$$0.jsx(BeePlaceholder,{id:v,label:i}):require$$0.jsxs("span",{id:v,className:x,children:[require$$0.jsx(password.Password,{id:v+"input",value:null!=r?r:void 0,disabled:null!=n&&n,onChange:e=>function(e){!n&&f&&f(e)}(e),onBlur:m,inputClassName:b,toggleMask:!0,feedback:a,header:s?_:null,footer:s?S:null,placeholder:p,tooltip:u,tooltipOptions:d}),i?require$$0.jsxs("label",{htmlFor:v+"input",className:"bee-pw-input-label",children:[i,h&&i?require$$0.jsx("span",{className:"bee-pw-input-label-required",children:require$$0.jsx("span",{className:"bee-pw-input-label-required-star",children:" *"})}):null]}):null]})}),"none"!=l&&o?(()=>{const e="medium";return require$$0.jsx("div",{className:"bee-pw-input-statusLabel",children:"error"===l&&o?require$$0.jsx(BeeLabel,{size:e,value:o,type:"error"}):"valid"===l&&o?require$$0.jsx(BeeLabel,{size:e,value:o,type:"valid"}):"neutral"===l&&o?require$$0.jsx(BeeLabel,{size:e,value:o,type:"neutral"}):null})})():null]})}function BeePercentageInput({id:e,className:t,label:i,value:r,showArrow:n,autoFocus:a,minFractionDigits:s,maxFractionDigits:o,max:l,min:c,locale:h="de-DE",disabled:p,grouping:u,statusLabel:d,formstate:f="neutral",readOnly:m,required:g,placeholder:v,tooltip:y,tooltipOptions:b,onChange:x,onFocusOut:_}){var S;const w=null!==(S=null!=e?e:libExports.useId(1,"bee-percent-input")[0])&&void 0!==S?S:"bee-percent-input",C="icon icon-right-arrow "+(r&&r>0?"up-arrow":r&&r<0?"down-arrow":"");let P="";m&&(P=" bee-percent-input-readOnly",p=!0);const E=" bee-percentage-input-container "+(n?" bee-percentage-input-container--showArrow":""),k="bee-percent-input "+("valid"===f?"bee-percent-input-valid":"error"===f?"bee-percent-input-error":"bee-percent-input-neutral")+P;return require$$0.jsxs(require$$0.Fragment,{children:[m&&!r&&0!==r?require$$0.jsx("div",{className:null!=t?t:"",children:require$$0.jsx(BeePlaceholder,{id:w,label:i})}):require$$0.jsxs("div",{className:"flex-grow-0 "+E+(t?" "+t:""),children:[n?require$$0.jsx("i",{className:C}):null,require$$0.jsxs("span",{id:w,className:"p-float-label span-container",children:[require$$0.jsx(inputnumber.InputNumber,{id:w+"input",value:null!=r?r:null,disabled:null!=p&&p,mode:"decimal",suffix:"%",autoFocus:a,useGrouping:u,minFractionDigits:s,maxFractionDigits:o,max:l,min:c,locale:h,inputClassName:k,placeholder:v,tooltip:y,tooltipOptions:b,onValueChange:e=>function(e){!p&&x&&x(e)}(e),onBlur:e=>function(e){!p&&_&&_(e)}(e)}),i?require$$0.jsxs("label",{htmlFor:w+"input",className:"bee-percent-input-label",children:[i,g&&i?require$$0.jsx("span",{className:"bee-percent-input-label-required",children:require$$0.jsx("span",{className:"bee-percent-input-label-required-star",children:" *"})}):null]}):null]})]}),"none"!=f&&d?(()=>{const e="medium";return require$$0.jsx("div",{className:"bee-percent-input-statusLabel",children:"error"===f&&d?require$$0.jsx(BeeLabel,{size:e,value:d,type:"error"}):"valid"===f&&d?require$$0.jsx(BeeLabel,{size:e,value:d,type:"valid"}):"neutral"===f&&d?require$$0.jsx(BeeLabel,{size:e,value:d,type:"neutral"}):null})})():null]})}function BeeTextArea({id:e,className:t,label:i,value:r,rows:n,disabled:a,autoResize:s,statusLabel:o,formstate:l="neutral",readOnly:c,required:h,placeholder:p,tooltip:u,tooltipOptions:d,onChange:f,onFocusOut:m}){var g;const v=null!==(g=null!=e?e:libExports.useId(1,"bee-ta-input-")[0])&&void 0!==g?g:"bee-ta-input";let y="";c&&(y=" bee-ta-input-readOnly",a=!0);const b=("valid"===l?"bee-ta-input-valid":"error"===l?"bee-ta-input-error":"neutral"===l?"bee-ta-input-neutral":"none"===l?" bee-cur-input-field-neutral":"bee-ta-input-neutral")+y;return require$$0.jsxs(require$$0.Fragment,{children:[c&&!r?require$$0.jsx("div",{className:null!=t?t:"",children:require$$0.jsx(BeePlaceholder,{id:v,label:i})}):require$$0.jsxs("span",{id:v,className:"p-float-label bee-ta-input-container"+(t?" "+t:""),children:[require$$0.jsx(require$$0.Fragment,{children:require$$0.jsx(inputtextarea.InputTextarea,{id:v+"input",value:null!=r?r:void 0,rows:n,disabled:null!=a&&a,autoResize:s,className:b,placeholder:p,tooltip:u,tooltipOptions:d,onChange:e=>function(e){!a&&f&&f(e)}(e),onBlur:e=>function(e){!a&&m&&m(e)}(e)})}),i?require$$0.jsxs("label",{htmlFor:v+"input",className:"bee-ta-input-label",children:[i,h&&i?require$$0.jsx("span",{className:"bee-ta-input-label-required",children:require$$0.jsx("span",{className:"bee-ta-input-label-required-star",children:" *"})}):null]}):null]}),"none"!=l&&o?(()=>{const e="medium";return require$$0.jsx("div",{className:"bee-ta-input-statusLabel",children:"error"===l&&o?require$$0.jsx(BeeLabel,{size:e,value:o,type:"error"}):"valid"===l&&o?require$$0.jsx(BeeLabel,{size:e,value:o,type:"valid"}):"neutral"===l&&o?require$$0.jsx(BeeLabel,{size:e,value:o,type:"neutral"}):null})})():null]})}function BeeTimeInput({id:e,className:t,label:i,value:r,disabled:n,statusLabel:a,formstate:s="neutral",readOnly:o,required:l,minDate:c,maxDate:h,showMinMaxRange:p,placeholder:u,tooltip:d,tooltipOptions:f,onChange:m,onFocusOut:g}){var v;const y=null!==(v=null!=e?e:libExports.useId(1,"bee-time-input-")[0])&&void 0!==v?v:"bee-time-input";let b="";o&&(b=" bee-time-input-readOnly",n=!0);const x="bee-time-input"+("valid"===s?" bee-time-input-valid":"error"===s?" bee-time-input-error":"neutral"===s?" bee-time-input-neutral":"none"===s?" bee-time-input-field-neutral":" bee-time-input-neutral")+b;return require$$0.jsxs(require$$0.Fragment,{children:[o&&!r?require$$0.jsx("div",{className:null!=t?t:"",children:require$$0.jsx(BeePlaceholder,{id:y,label:i})}):require$$0.jsxs("span",{id:y,className:"p-float-label bee-time-input-container"+(t?" "+t:""),children:[require$$0.jsx(calendar.Calendar,{timeOnly:!0,showTime:!0,hourFormat:"24",value:r,readOnlyInput:null!=o&&o,disabled:null!=n&&n,className:x,minDate:c?new Date(c):void 0,maxDate:h?new Date(h):void 0,showMinMaxRange:null!=p&&p,placeholder:u,tooltip:d,tooltipOptions:f,onChange:e=>function(e){!n&&m&&m(e)}(e),onBlur:e=>function(e){!n&&g&&g(e)}(e)}),i?require$$0.jsxs("label",{htmlFor:y+"input",className:"bee-time-input-label",children:[i,l&&i?require$$0.jsx("span",{className:"bee-time-input-label-required",children:require$$0.jsx("span",{className:"bee-time-input-label-required-star",children:" *"})}):null]}):null]}),"none"!=s&&a?(()=>{const e="medium";return require$$0.jsx("div",{className:"bee-time-input-statusLabel",children:"error"===s&&a?require$$0.jsx(BeeLabel,{size:e,value:a,type:"error"}):"valid"===s&&a?require$$0.jsx(BeeLabel,{size:e,value:a,type:"valid"}):"neutral"===s&&a?require$$0.jsx(BeeLabel,{size:e,value:a,type:"neutral"}):null})})():null]})}api.addLocale("de",{firstDayOfWeek:1,dayNames:["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag"],dayNamesShort:["Son","Mon","Die","Mit","Don","Fre","Sam"],dayNamesMin:["So","Mo","Di","Mi","Do","Fr","Sa"],monthNames:["Januar","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember"],monthNamesShort:["Jan","Feb","Mär","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez"],today:"Heute",clear:"Löschen"});var lodash$1={exports:{}},lodash=lodash$1.exports,hasRequiredLodash;
19
+ */class Animator{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(e,t,i,r){const n=t.listeners[r],a=t.duration;n.forEach(r=>r({chart:e,initial:t.initial,numSteps:a,currentStep:Math.min(i-t.start,a)}))}_refresh(){this._request||(this._running=!0,this._request=requestAnimFrame.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(e=Date.now()){let t=0;this._charts.forEach((i,r)=>{if(!i.running||!i.items.length)return;const n=i.items;let a,s=n.length-1,o=!1;for(;s>=0;--s)a=n[s],a._active?(a._total>i.duration&&(i.duration=a._total),a.tick(e),o=!0):(n[s]=n[n.length-1],n.pop());o&&(r.draw(),this._notify(r,i,e,"progress")),n.length||(i.running=!1,this._notify(r,i,e,"complete"),i.initial=!1),t+=n.length}),this._lastDate=e,0===t&&(this._running=!1)}_getAnims(e){const t=this._charts;let i=t.get(e);return i||(i={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},t.set(e,i)),i}listen(e,t,i){this._getAnims(e).listeners[t].push(i)}add(e,t){t&&t.length&&this._getAnims(e).items.push(...t)}has(e){return this._getAnims(e).items.length>0}start(e){const t=this._charts.get(e);t&&(t.running=!0,t.start=Date.now(),t.duration=t.items.reduce((e,t)=>Math.max(e,t._duration),0),this._refresh())}running(e){if(!this._running)return!1;const t=this._charts.get(e);return!!(t&&t.running&&t.items.length)}stop(e){const t=this._charts.get(e);if(!t||!t.items.length)return;const i=t.items;let r=i.length-1;for(;r>=0;--r)i[r].cancel();t.items=[],this._notify(e,t,Date.now(),"complete")}remove(e){return this._charts.delete(e)}}var animator=new Animator;const transparent="transparent",interpolators={boolean:(e,t,i)=>i>.5?t:e,color(e,t,i){const r=color(e||transparent),n=r.valid&&color(t||transparent);return n&&n.valid?n.mix(r,i).hexString():t},number:(e,t,i)=>e+(t-e)*i};class Animation{constructor(e,t,i,r){const n=t[i];r=resolve([e.to,r,n,e.from]);const a=resolve([e.from,n,r]);this._active=!0,this._fn=e.fn||interpolators[e.type||typeof a],this._easing=effects[e.easing]||effects.linear,this._start=Math.floor(Date.now()+(e.delay||0)),this._duration=this._total=Math.floor(e.duration),this._loop=!!e.loop,this._target=t,this._prop=i,this._from=a,this._to=r,this._promises=void 0}active(){return this._active}update(e,t,i){if(this._active){this._notify(!1);const r=this._target[this._prop],n=i-this._start,a=this._duration-n;this._start=i,this._duration=Math.floor(Math.max(a,e.duration)),this._total+=n,this._loop=!!e.loop,this._to=resolve([e.to,t,r,e.from]),this._from=resolve([e.from,r,t])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(e){const t=e-this._start,i=this._duration,r=this._prop,n=this._from,a=this._loop,s=this._to;let o;if(this._active=n!==s&&(a||t<i),!this._active)return this._target[r]=s,void this._notify(!0);t<0?this._target[r]=n:(o=t/i%2,o=a&&o>1?2-o:o,o=this._easing(Math.min(1,Math.max(0,o))),this._target[r]=this._fn(n,s,o))}wait(){const e=this._promises||(this._promises=[]);return new Promise((t,i)=>{e.push({res:t,rej:i})})}_notify(e){const t=e?"res":"rej",i=this._promises||[];for(let e=0;e<i.length;e++)i[e][t]()}}class Animations{constructor(e,t){this._chart=e,this._properties=new Map,this.configure(t)}configure(e){if(!isObject$1(e))return;const t=Object.keys(defaults.animation),i=this._properties;Object.getOwnPropertyNames(e).forEach(r=>{const n=e[r];if(!isObject$1(n))return;const a={};for(const e of t)a[e]=n[e];(isArray(n.properties)&&n.properties||[r]).forEach(e=>{e!==r&&i.has(e)||i.set(e,a)})})}_animateOptions(e,t){const i=t.options,r=resolveTargetOptions(e,i);if(!r)return[];const n=this._createAnimations(r,i);return i.$shared&&awaitAll(e.options.$animations,i).then(()=>{e.options=i},()=>{}),n}_createAnimations(e,t){const i=this._properties,r=[],n=e.$animations||(e.$animations={}),a=Object.keys(t),s=Date.now();let o;for(o=a.length-1;o>=0;--o){const l=a[o];if("$"===l.charAt(0))continue;if("options"===l){r.push(...this._animateOptions(e,t));continue}const c=t[l];let h=n[l];const p=i.get(l);if(h){if(p&&h.active()){h.update(p,c,s);continue}h.cancel()}p&&p.duration?(n[l]=h=new Animation(p,e,l,c),r.push(h)):e[l]=c}return r}update(e,t){if(0===this._properties.size)return void Object.assign(e,t);const i=this._createAnimations(e,t);return i.length?(animator.add(this._chart,i),!0):void 0}}function awaitAll(e,t){const i=[],r=Object.keys(t);for(let t=0;t<r.length;t++){const n=e[r[t]];n&&n.active()&&i.push(n.wait())}return Promise.all(i)}function resolveTargetOptions(e,t){if(!t)return;let i=e.options;if(i)return i.$shared&&(e.options=i=Object.assign({},i,{$shared:!1,$animations:{}})),i;e.options=t}function scaleClip(e,t){const i=e&&e.options||{},r=i.reverse,n=void 0===i.min?t:0,a=void 0===i.max?t:0;return{start:r?a:n,end:r?n:a}}function defaultClip(e,t,i){if(!1===i)return!1;const r=scaleClip(e,i),n=scaleClip(t,i);return{top:n.end,right:r.end,bottom:n.start,left:r.start}}function toClip(e){let t,i,r,n;return isObject$1(e)?(t=e.top,i=e.right,r=e.bottom,n=e.left):t=i=r=n=e,{top:t,right:i,bottom:r,left:n,disabled:!1===e}}function getSortedDatasetIndices(e,t){const i=[],r=e._getSortedDatasetMetas(t);let n,a;for(n=0,a=r.length;n<a;++n)i.push(r[n].index);return i}function applyStack(e,t,i,r={}){const n=e.keys,a="single"===r.mode;let s,o,l,c;if(null===t)return;let h=!1;for(s=0,o=n.length;s<o;++s){if(l=+n[s],l===i){if(h=!0,r.all)continue;break}c=e.values[l],isNumberFinite(c)&&(a||0===t||sign(t)===sign(c))&&(t+=c)}return h||r.all?t:0}function convertObjectDataToArray(e,t){const{iScale:i,vScale:r}=t,n="x"===i.axis?"x":"y",a="x"===r.axis?"x":"y",s=Object.keys(e),o=new Array(s.length);let l,c,h;for(l=0,c=s.length;l<c;++l)h=s[l],o[l]={[n]:h,[a]:e[h]};return o}function isStacked(e,t){const i=e&&e.options.stacked;return i||void 0===i&&void 0!==t.stack}function getStackKey(e,t,i){return`${e.id}.${t.id}.${i.stack||i.type}`}function getUserBounds(e){const{min:t,max:i,minDefined:r,maxDefined:n}=e.getUserBounds();return{min:r?t:Number.NEGATIVE_INFINITY,max:n?i:Number.POSITIVE_INFINITY}}function getOrCreateStack(e,t,i){const r=e[t]||(e[t]={});return r[i]||(r[i]={})}function getLastIndexInStack(e,t,i,r){for(const n of t.getMatchingVisibleMetas(r).reverse()){const t=e[n.index];if(i&&t>0||!i&&t<0)return n.index}return null}function updateStacks(e,t){const{chart:i,_cachedMeta:r}=e,n=i._stacks||(i._stacks={}),{iScale:a,vScale:s,index:o}=r,l=a.axis,c=s.axis,h=getStackKey(a,s,r),p=t.length;let u;for(let e=0;e<p;++e){const i=t[e],{[l]:a,[c]:p}=i;u=(i._stacks||(i._stacks={}))[c]=getOrCreateStack(n,h,a),u[o]=p,u._top=getLastIndexInStack(u,s,!0,r.type),u._bottom=getLastIndexInStack(u,s,!1,r.type);(u._visualValues||(u._visualValues={}))[o]=p}}function getFirstScaleId(e,t){const i=e.scales;return Object.keys(i).filter(e=>i[e].axis===t).shift()}function createDatasetContext(e,t){return createContext(e,{active:!1,dataset:void 0,datasetIndex:t,index:t,mode:"default",type:"dataset"})}function createDataContext(e,t,i){return createContext(e,{active:!1,dataIndex:t,parsed:void 0,raw:void 0,element:i,index:t,mode:"default",type:"data"})}function clearStacks(e,t){const i=e.controller.index,r=e.vScale&&e.vScale.axis;if(r){t=t||e._parsed;for(const e of t){const t=e._stacks;if(!t||void 0===t[r]||void 0===t[r][i])return;delete t[r][i],void 0!==t[r]._visualValues&&void 0!==t[r]._visualValues[i]&&delete t[r]._visualValues[i]}}}const isDirectUpdateMode=e=>"reset"===e||"none"===e,cloneIfNotShared=(e,t)=>t?e:Object.assign({},e),createStack=(e,t,i)=>e&&!t.hidden&&t._stacked&&{keys:getSortedDatasetIndices(i,!0),values:null};class DatasetController{static defaults={};static datasetElementType=null;static dataElementType=null;constructor(e,t){this.chart=e,this._ctx=e.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.datasetElementType=new.target.datasetElementType,this.dataElementType=new.target.dataElementType,this.initialize()}initialize(){const e=this._cachedMeta;this.configure(),this.linkScales(),e._stacked=isStacked(e.vScale,e),this.addElements(),this.options.fill&&!this.chart.isPluginEnabled("filler")&&console.warn("Tried to use the 'fill' option without the 'Filler' plugin enabled. Please import and register the 'Filler' plugin and make sure it is not disabled in the options")}updateIndex(e){this.index!==e&&clearStacks(this._cachedMeta),this.index=e}linkScales(){const e=this.chart,t=this._cachedMeta,i=this.getDataset(),r=(e,t,i,r)=>"x"===e?t:"r"===e?r:i,n=t.xAxisID=valueOrDefault(i.xAxisID,getFirstScaleId(e,"x")),a=t.yAxisID=valueOrDefault(i.yAxisID,getFirstScaleId(e,"y")),s=t.rAxisID=valueOrDefault(i.rAxisID,getFirstScaleId(e,"r")),o=t.indexAxis,l=t.iAxisID=r(o,n,a,s),c=t.vAxisID=r(o,a,n,s);t.xScale=this.getScaleForId(n),t.yScale=this.getScaleForId(a),t.rScale=this.getScaleForId(s),t.iScale=this.getScaleForId(l),t.vScale=this.getScaleForId(c)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(e){return this.chart.scales[e]}_getOtherScale(e){const t=this._cachedMeta;return e===t.iScale?t.vScale:t.iScale}reset(){this._update("reset")}_destroy(){const e=this._cachedMeta;this._data&&unlistenArrayEvents(this._data,this),e._stacked&&clearStacks(e)}_dataCheck(){const e=this.getDataset(),t=e.data||(e.data=[]),i=this._data;if(isObject$1(t)){const e=this._cachedMeta;this._data=convertObjectDataToArray(t,e)}else if(i!==t){if(i){unlistenArrayEvents(i,this);const e=this._cachedMeta;clearStacks(e),e._parsed=[]}t&&Object.isExtensible(t)&&listenArrayEvents(t,this),this._syncList=[],this._data=t}}addElements(){const e=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(e.dataset=new this.datasetElementType)}buildOrUpdateElements(e){const t=this._cachedMeta,i=this.getDataset();let r=!1;this._dataCheck();const n=t._stacked;t._stacked=isStacked(t.vScale,t),t.stack!==i.stack&&(r=!0,clearStacks(t),t.stack=i.stack),this._resyncElements(e),(r||n!==t._stacked)&&(updateStacks(this,t._parsed),t._stacked=isStacked(t.vScale,t))}configure(){const e=this.chart.config,t=e.datasetScopeKeys(this._type),i=e.getOptionScopes(this.getDataset(),t,!0);this.options=e.createResolver(i,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(e,t){const{_cachedMeta:i,_data:r}=this,{iScale:n,_stacked:a}=i,s=n.axis;let o,l,c,h=0===e&&t===r.length||i._sorted,p=e>0&&i._parsed[e-1];if(!1===this._parsing)i._parsed=r,i._sorted=!0,c=r;else{c=isArray(r[e])?this.parseArrayData(i,r,e,t):isObject$1(r[e])?this.parseObjectData(i,r,e,t):this.parsePrimitiveData(i,r,e,t);const n=()=>null===l[s]||p&&l[s]<p[s];for(o=0;o<t;++o)i._parsed[o+e]=l=c[o],h&&(n()&&(h=!1),p=l);i._sorted=h}a&&updateStacks(this,c)}parsePrimitiveData(e,t,i,r){const{iScale:n,vScale:a}=e,s=n.axis,o=a.axis,l=n.getLabels(),c=n===a,h=new Array(r);let p,u,d;for(p=0,u=r;p<u;++p)d=p+i,h[p]={[s]:c||n.parse(l[d],d),[o]:a.parse(t[d],d)};return h}parseArrayData(e,t,i,r){const{xScale:n,yScale:a}=e,s=new Array(r);let o,l,c,h;for(o=0,l=r;o<l;++o)c=o+i,h=t[c],s[o]={x:n.parse(h[0],c),y:a.parse(h[1],c)};return s}parseObjectData(e,t,i,r){const{xScale:n,yScale:a}=e,{xAxisKey:s="x",yAxisKey:o="y"}=this._parsing,l=new Array(r);let c,h,p,u;for(c=0,h=r;c<h;++c)p=c+i,u=t[p],l[c]={x:n.parse(resolveObjectKey(u,s),p),y:a.parse(resolveObjectKey(u,o),p)};return l}getParsed(e){return this._cachedMeta._parsed[e]}getDataElement(e){return this._cachedMeta.data[e]}applyStack(e,t,i){const r=this.chart,n=this._cachedMeta,a=t[e.axis];return applyStack({keys:getSortedDatasetIndices(r,!0),values:t._stacks[e.axis]._visualValues},a,n.index,{mode:i})}updateRangeFromParsed(e,t,i,r){const n=i[t.axis];let a=null===n?NaN:n;const s=r&&i._stacks[t.axis];r&&s&&(r.values=s,a=applyStack(r,n,this._cachedMeta.index)),e.min=Math.min(e.min,a),e.max=Math.max(e.max,a)}getMinMax(e,t){const i=this._cachedMeta,r=i._parsed,n=i._sorted&&e===i.iScale,a=r.length,s=this._getOtherScale(e),o=createStack(t,i,this.chart),l={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:c,max:h}=getUserBounds(s);let p,u;function d(){u=r[p];const t=u[s.axis];return!isNumberFinite(u[e.axis])||c>t||h<t}for(p=0;p<a&&(d()||(this.updateRangeFromParsed(l,e,u,o),!n));++p);if(n)for(p=a-1;p>=0;--p)if(!d()){this.updateRangeFromParsed(l,e,u,o);break}return l}getAllParsedValues(e){const t=this._cachedMeta._parsed,i=[];let r,n,a;for(r=0,n=t.length;r<n;++r)a=t[r][e.axis],isNumberFinite(a)&&i.push(a);return i}getMaxOverflow(){return!1}getLabelAndValue(e){const t=this._cachedMeta,i=t.iScale,r=t.vScale,n=this.getParsed(e);return{label:i?""+i.getLabelForValue(n[i.axis]):"",value:r?""+r.getLabelForValue(n[r.axis]):""}}_update(e){const t=this._cachedMeta;this.update(e||"default"),t._clip=toClip(valueOrDefault(this.options.clip,defaultClip(t.xScale,t.yScale,this.getMaxOverflow())))}update(e){}draw(){const e=this._ctx,t=this.chart,i=this._cachedMeta,r=i.data||[],n=t.chartArea,a=[],s=this._drawStart||0,o=this._drawCount||r.length-s,l=this.options.drawActiveElementsOnTop;let c;for(i.dataset&&i.dataset.draw(e,n,s,o),c=s;c<s+o;++c){const t=r[c];t.hidden||(t.active&&l?a.push(t):t.draw(e,n))}for(c=0;c<a.length;++c)a[c].draw(e,n)}getStyle(e,t){const i=t?"active":"default";return void 0===e&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(i):this.resolveDataElementOptions(e||0,i)}getContext(e,t,i){const r=this.getDataset();let n;if(e>=0&&e<this._cachedMeta.data.length){const t=this._cachedMeta.data[e];n=t.$context||(t.$context=createDataContext(this.getContext(),e,t)),n.parsed=this.getParsed(e),n.raw=r.data[e],n.index=n.dataIndex=e}else n=this.$context||(this.$context=createDatasetContext(this.chart.getContext(),this.index)),n.dataset=r,n.index=n.datasetIndex=this.index;return n.active=!!t,n.mode=i,n}resolveDatasetElementOptions(e){return this._resolveElementOptions(this.datasetElementType.id,e)}resolveDataElementOptions(e,t){return this._resolveElementOptions(this.dataElementType.id,t,e)}_resolveElementOptions(e,t="default",i){const r="active"===t,n=this._cachedDataOpts,a=e+"-"+t,s=n[a],o=this.enableOptionSharing&&defined(i);if(s)return cloneIfNotShared(s,o);const l=this.chart.config,c=l.datasetElementScopeKeys(this._type,e),h=r?[`${e}Hover`,"hover",e,""]:[e,""],p=l.getOptionScopes(this.getDataset(),c),u=Object.keys(defaults.elements[e]),d=l.resolveNamedOptions(p,u,()=>this.getContext(i,r,t),h);return d.$shared&&(d.$shared=o,n[a]=Object.freeze(cloneIfNotShared(d,o))),d}_resolveAnimations(e,t,i){const r=this.chart,n=this._cachedDataOpts,a=`animation-${t}`,s=n[a];if(s)return s;let o;if(!1!==r.options.animation){const r=this.chart.config,n=r.datasetAnimationScopeKeys(this._type,t),a=r.getOptionScopes(this.getDataset(),n);o=r.createResolver(a,this.getContext(e,i,t))}const l=new Animations(r,o&&o.animations);return o&&o._cacheable&&(n[a]=Object.freeze(l)),l}getSharedOptions(e){if(e.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},e))}includeOptions(e,t){return!t||isDirectUpdateMode(e)||this.chart._animationsDisabled}_getSharedOptions(e,t){const i=this.resolveDataElementOptions(e,t),r=this._sharedOptions,n=this.getSharedOptions(i),a=this.includeOptions(t,n)||n!==r;return this.updateSharedOptions(n,t,i),{sharedOptions:n,includeOptions:a}}updateElement(e,t,i,r){isDirectUpdateMode(r)?Object.assign(e,i):this._resolveAnimations(t,r).update(e,i)}updateSharedOptions(e,t,i){e&&!isDirectUpdateMode(t)&&this._resolveAnimations(void 0,t).update(e,i)}_setStyle(e,t,i,r){e.active=r;const n=this.getStyle(t,r);this._resolveAnimations(t,i,r).update(e,{options:!r&&this.getSharedOptions(n)||n})}removeHoverStyle(e,t,i){this._setStyle(e,i,"active",!1)}setHoverStyle(e,t,i){this._setStyle(e,i,"active",!0)}_removeDatasetHoverStyle(){const e=this._cachedMeta.dataset;e&&this._setStyle(e,void 0,"active",!1)}_setDatasetHoverStyle(){const e=this._cachedMeta.dataset;e&&this._setStyle(e,void 0,"active",!0)}_resyncElements(e){const t=this._data,i=this._cachedMeta.data;for(const[e,t,i]of this._syncList)this[e](t,i);this._syncList=[];const r=i.length,n=t.length,a=Math.min(n,r);a&&this.parse(0,a),n>r?this._insertElements(r,n-r,e):n<r&&this._removeElements(n,r-n)}_insertElements(e,t,i=!0){const r=this._cachedMeta,n=r.data,a=e+t;let s;const o=e=>{for(e.length+=t,s=e.length-1;s>=a;s--)e[s]=e[s-t]};for(o(n),s=e;s<a;++s)n[s]=new this.dataElementType;this._parsing&&o(r._parsed),this.parse(e,t),i&&this.updateElements(n,e,t,"reset")}updateElements(e,t,i,r){}_removeElements(e,t){const i=this._cachedMeta;if(this._parsing){const r=i._parsed.splice(e,t);i._stacked&&clearStacks(i,r)}i.data.splice(e,t)}_sync(e){if(this._parsing)this._syncList.push(e);else{const[t,i,r]=e;this[t](i,r)}this.chart._dataChanges.push([this.index,...e])}_onDataPush(){const e=arguments.length;this._sync(["_insertElements",this.getDataset().data.length-e,e])}_onDataPop(){this._sync(["_removeElements",this._cachedMeta.data.length-1,1])}_onDataShift(){this._sync(["_removeElements",0,1])}_onDataSplice(e,t){t&&this._sync(["_removeElements",e,t]);const i=arguments.length-2;i&&this._sync(["_insertElements",e,i])}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length])}}function getAllScaleValues(e,t){if(!e._cache.$bar){const i=e.getMatchingVisibleMetas(t);let r=[];for(let t=0,n=i.length;t<n;t++)r=r.concat(i[t].controller.getAllParsedValues(e));e._cache.$bar=_arrayUnique(r.sort((e,t)=>e-t))}return e._cache.$bar}function computeMinSampleSize(e){const t=e.iScale,i=getAllScaleValues(t,e.type);let r,n,a,s,o=t._length;const l=()=>{32767!==a&&-32768!==a&&(defined(s)&&(o=Math.min(o,Math.abs(a-s)||o)),s=a)};for(r=0,n=i.length;r<n;++r)a=t.getPixelForValue(i[r]),l();for(s=void 0,r=0,n=t.ticks.length;r<n;++r)a=t.getPixelForTick(r),l();return o}function computeFitCategoryTraits(e,t,i,r){const n=i.barThickness;let a,s;return isNullOrUndef(n)?(a=t.min*i.categoryPercentage,s=i.barPercentage):(a=n*r,s=1),{chunk:a/r,ratio:s,start:t.pixels[e]-a/2}}function computeFlexCategoryTraits(e,t,i,r){const n=t.pixels,a=n[e];let s=e>0?n[e-1]:null,o=e<n.length-1?n[e+1]:null;const l=i.categoryPercentage;null===s&&(s=a-(null===o?t.end-t.start:o-a)),null===o&&(o=a+a-s);const c=a-(a-Math.min(s,o))/2*l;return{chunk:Math.abs(o-s)/2*l/r,ratio:i.barPercentage,start:c}}function parseFloatBar(e,t,i,r){const n=i.parse(e[0],r),a=i.parse(e[1],r),s=Math.min(n,a),o=Math.max(n,a);let l=s,c=o;Math.abs(s)>Math.abs(o)&&(l=o,c=s),t[i.axis]=c,t._custom={barStart:l,barEnd:c,start:n,end:a,min:s,max:o}}function parseValue(e,t,i,r){return isArray(e)?parseFloatBar(e,t,i,r):t[i.axis]=i.parse(e,r),t}function parseArrayOrPrimitive(e,t,i,r){const n=e.iScale,a=e.vScale,s=n.getLabels(),o=n===a,l=[];let c,h,p,u;for(c=i,h=i+r;c<h;++c)u=t[c],p={},p[n.axis]=o||n.parse(s[c],c),l.push(parseValue(u,p,a,c));return l}function isFloatBar(e){return e&&void 0!==e.barStart&&void 0!==e.barEnd}function barSign(e,t,i){return 0!==e?sign(e):(t.isHorizontal()?1:-1)*(t.min>=i?1:-1)}function borderProps(e){let t,i,r,n,a;return e.horizontal?(t=e.base>e.x,i="left",r="right"):(t=e.base<e.y,i="bottom",r="top"),t?(n="end",a="start"):(n="start",a="end"),{start:i,end:r,reverse:t,top:n,bottom:a}}function setBorderSkipped(e,t,i,r){let n=t.borderSkipped;const a={};if(!n)return void(e.borderSkipped=a);if(!0===n)return void(e.borderSkipped={top:!0,right:!0,bottom:!0,left:!0});const{start:s,end:o,reverse:l,top:c,bottom:h}=borderProps(e);"middle"===n&&i&&(e.enableBorderRadius=!0,(i._top||0)===r?n=c:(i._bottom||0)===r?n=h:(a[parseEdge(h,s,o,l)]=!0,n=c)),a[parseEdge(n,s,o,l)]=!0,e.borderSkipped=a}function parseEdge(e,t,i,r){return e=r?startEnd(e=swap(e,t,i),i,t):startEnd(e,t,i)}function swap(e,t,i){return e===t?i:e===i?t:e}function startEnd(e,t,i){return"start"===e?t:"end"===e?i:e}function setInflateAmount(e,{inflateAmount:t},i){e.inflateAmount="auto"===t?1===i?.33:0:t}class BarController extends DatasetController{static id="bar";static defaults={datasetElementType:!1,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}};static overrides={scales:{_index_:{type:"category",offset:!0,grid:{offset:!0}},_value_:{type:"linear",beginAtZero:!0}}};parsePrimitiveData(e,t,i,r){return parseArrayOrPrimitive(e,t,i,r)}parseArrayData(e,t,i,r){return parseArrayOrPrimitive(e,t,i,r)}parseObjectData(e,t,i,r){const{iScale:n,vScale:a}=e,{xAxisKey:s="x",yAxisKey:o="y"}=this._parsing,l="x"===n.axis?s:o,c="x"===a.axis?s:o,h=[];let p,u,d,f;for(p=i,u=i+r;p<u;++p)f=t[p],d={},d[n.axis]=n.parse(resolveObjectKey(f,l),p),h.push(parseValue(resolveObjectKey(f,c),d,a,p));return h}updateRangeFromParsed(e,t,i,r){super.updateRangeFromParsed(e,t,i,r);const n=i._custom;n&&t===this._cachedMeta.vScale&&(e.min=Math.min(e.min,n.min),e.max=Math.max(e.max,n.max))}getMaxOverflow(){return 0}getLabelAndValue(e){const t=this._cachedMeta,{iScale:i,vScale:r}=t,n=this.getParsed(e),a=n._custom,s=isFloatBar(a)?"["+a.start+", "+a.end+"]":""+r.getLabelForValue(n[r.axis]);return{label:""+i.getLabelForValue(n[i.axis]),value:s}}initialize(){this.enableOptionSharing=!0,super.initialize();this._cachedMeta.stack=this.getDataset().stack}update(e){const t=this._cachedMeta;this.updateElements(t.data,0,t.data.length,e)}updateElements(e,t,i,r){const n="reset"===r,{index:a,_cachedMeta:{vScale:s}}=this,o=s.getBasePixel(),l=s.isHorizontal(),c=this._getRuler(),{sharedOptions:h,includeOptions:p}=this._getSharedOptions(t,r);for(let u=t;u<t+i;u++){const t=this.getParsed(u),i=n||isNullOrUndef(t[s.axis])?{base:o,head:o}:this._calculateBarValuePixels(u),d=this._calculateBarIndexPixels(u,c),f=(t._stacks||{})[s.axis],m={horizontal:l,base:i.base,enableBorderRadius:!f||isFloatBar(t._custom)||a===f._top||a===f._bottom,x:l?i.head:d.center,y:l?d.center:i.head,height:l?d.size:Math.abs(i.size),width:l?Math.abs(i.size):d.size};p&&(m.options=h||this.resolveDataElementOptions(u,e[u].active?"active":r));const g=m.options||e[u].options;setBorderSkipped(m,g,f,a),setInflateAmount(m,g,c.ratio),this.updateElement(e[u],u,m,r)}}_getStacks(e,t){const{iScale:i}=this._cachedMeta,r=i.getMatchingVisibleMetas(this._type).filter(e=>e.controller.options.grouped),n=i.options.stacked,a=[],s=this._cachedMeta.controller.getParsed(t),o=s&&s[i.axis],l=e=>{const t=e._parsed.find(e=>e[i.axis]===o),r=t&&t[e.vScale.axis];if(isNullOrUndef(r)||isNaN(r))return!0};for(const i of r)if((void 0===t||!l(i))&&((!1===n||-1===a.indexOf(i.stack)||void 0===n&&void 0===i.stack)&&a.push(i.stack),i.index===e))break;return a.length||a.push(void 0),a}_getStackCount(e){return this._getStacks(void 0,e).length}_getAxisCount(){return this._getAxis().length}getFirstScaleIdForIndexAxis(){const e=this.chart.scales,t=this.chart.options.indexAxis;return Object.keys(e).filter(i=>e[i].axis===t).shift()}_getAxis(){const e={},t=this.getFirstScaleIdForIndexAxis();for(const i of this.chart.data.datasets)e[valueOrDefault("x"===this.chart.options.indexAxis?i.xAxisID:i.yAxisID,t)]=!0;return Object.keys(e)}_getStackIndex(e,t,i){const r=this._getStacks(e,i),n=void 0!==t?r.indexOf(t):-1;return-1===n?r.length-1:n}_getRuler(){const e=this.options,t=this._cachedMeta,i=t.iScale,r=[];let n,a;for(n=0,a=t.data.length;n<a;++n)r.push(i.getPixelForValue(this.getParsed(n)[i.axis],n));const s=e.barThickness;return{min:s||computeMinSampleSize(t),pixels:r,start:i._startPixel,end:i._endPixel,stackCount:this._getStackCount(),scale:i,grouped:e.grouped,ratio:s?1:e.categoryPercentage*e.barPercentage}}_calculateBarValuePixels(e){const{_cachedMeta:{vScale:t,_stacked:i,index:r},options:{base:n,minBarLength:a}}=this,s=n||0,o=this.getParsed(e),l=o._custom,c=isFloatBar(l);let h,p,u=o[t.axis],d=0,f=i?this.applyStack(t,o,i):u;f!==u&&(d=f-u,f=u),c&&(u=l.barStart,f=l.barEnd-l.barStart,0!==u&&sign(u)!==sign(l.barEnd)&&(d=0),d+=u);const m=isNullOrUndef(n)||c?d:n;let g=t.getPixelForValue(m);if(h=this.chart.getDataVisibility(e)?t.getPixelForValue(d+f):g,p=h-g,Math.abs(p)<a){p=barSign(p,t,s)*a,u===s&&(g-=p/2);const e=t.getPixelForDecimal(0),n=t.getPixelForDecimal(1),l=Math.min(e,n),d=Math.max(e,n);g=Math.max(Math.min(g,d),l),h=g+p,i&&!c&&(o._stacks[t.axis]._visualValues[r]=t.getValueForPixel(h)-t.getValueForPixel(g))}if(g===t.getPixelForValue(s)){const e=sign(p)*t.getLineWidthForValue(s)/2;g+=e,p-=e}return{size:p,base:g,head:h,center:h+p/2}}_calculateBarIndexPixels(e,t){const i=t.scale,r=this.options,n=r.skipNull,a=valueOrDefault(r.maxBarThickness,1/0);let s,o;const l=this._getAxisCount();if(t.grouped){const i=n?this._getStackCount(e):t.stackCount,c="flex"===r.barThickness?computeFlexCategoryTraits(e,t,r,i*l):computeFitCategoryTraits(e,t,r,i*l),h="x"===this.chart.options.indexAxis?this.getDataset().xAxisID:this.getDataset().yAxisID,p=this._getAxis().indexOf(valueOrDefault(h,this.getFirstScaleIdForIndexAxis())),u=this._getStackIndex(this.index,this._cachedMeta.stack,n?e:void 0)+p;s=c.start+c.chunk*u+c.chunk/2,o=Math.min(a,c.chunk*c.ratio)}else s=i.getPixelForValue(this.getParsed(e)[i.axis],e),o=Math.min(a,t.min*t.ratio);return{base:s-o/2,head:s+o/2,center:s,size:o}}draw(){const e=this._cachedMeta,t=e.vScale,i=e.data,r=i.length;let n=0;for(;n<r;++n)null===this.getParsed(n)[t.axis]||i[n].hidden||i[n].draw(this._ctx)}}function getRatioAndOffset(e,t,i){let r=1,n=1,a=0,s=0;if(t<TAU){const o=e,l=o+t,c=Math.cos(o),h=Math.sin(o),p=Math.cos(l),u=Math.sin(l),d=(e,t,r)=>_angleBetween(e,o,l,!0)?1:Math.max(t,t*i,r,r*i),f=(e,t,r)=>_angleBetween(e,o,l,!0)?-1:Math.min(t,t*i,r,r*i),m=d(0,c,p),g=d(HALF_PI,h,u),v=f(PI,c,p),y=f(PI+HALF_PI,h,u);r=(m-v)/2,n=(g-y)/2,a=-(m+v)/2,s=-(g+y)/2}return{ratioX:r,ratioY:n,offsetX:a,offsetY:s}}class DoughnutController extends DatasetController{static id="doughnut";static defaults={datasetElementType:!1,dataElementType:"arc",animation:{animateRotate:!0,animateScale:!1},animations:{numbers:{type:"number",properties:["circumference","endAngle","innerRadius","outerRadius","startAngle","x","y","offset","borderWidth","spacing"]}},cutout:"50%",rotation:0,circumference:360,radius:"100%",spacing:0,indexAxis:"r"};static descriptors={_scriptable:e=>"spacing"!==e,_indexable:e=>"spacing"!==e&&!e.startsWith("borderDash")&&!e.startsWith("hoverBorderDash")};static overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(e){const t=e.data,{labels:{pointStyle:i,textAlign:r,color:n,useBorderRadius:a,borderRadius:s}}=e.legend.options;return t.labels.length&&t.datasets.length?t.labels.map((t,o)=>{const l=e.getDatasetMeta(0).controller.getStyle(o);return{text:t,fillStyle:l.backgroundColor,fontColor:n,hidden:!e.getDataVisibility(o),lineDash:l.borderDash,lineDashOffset:l.borderDashOffset,lineJoin:l.borderJoinStyle,lineWidth:l.borderWidth,strokeStyle:l.borderColor,textAlign:r,pointStyle:i,borderRadius:a&&(s||l.borderRadius),index:o}}):[]}},onClick(e,t,i){i.chart.toggleDataVisibility(t.index),i.chart.update()}}}};constructor(e,t){super(e,t),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(e,t){const i=this.getDataset().data,r=this._cachedMeta;if(!1===this._parsing)r._parsed=i;else{let n,a,s=e=>+i[e];if(isObject$1(i[e])){const{key:e="value"}=this._parsing;s=t=>+resolveObjectKey(i[t],e)}for(n=e,a=e+t;n<a;++n)r._parsed[n]=s(n)}}_getRotation(){return toRadians(this.options.rotation-90)}_getCircumference(){return toRadians(this.options.circumference)}_getRotationExtents(){let e=TAU,t=-TAU;for(let i=0;i<this.chart.data.datasets.length;++i)if(this.chart.isDatasetVisible(i)&&this.chart.getDatasetMeta(i).type===this._type){const r=this.chart.getDatasetMeta(i).controller,n=r._getRotation(),a=r._getCircumference();e=Math.min(e,n),t=Math.max(t,n+a)}return{rotation:e,circumference:t-e}}update(e){const t=this.chart,{chartArea:i}=t,r=this._cachedMeta,n=r.data,a=this.getMaxBorderWidth()+this.getMaxOffset(n)+this.options.spacing,s=Math.max((Math.min(i.width,i.height)-a)/2,0),o=Math.min(toPercentage(this.options.cutout,s),1),l=this._getRingWeight(this.index),{circumference:c,rotation:h}=this._getRotationExtents(),{ratioX:p,ratioY:u,offsetX:d,offsetY:f}=getRatioAndOffset(h,c,o),m=(i.width-a)/p,g=(i.height-a)/u,v=Math.max(Math.min(m,g)/2,0),y=toDimension(this.options.radius,v),b=(y-Math.max(y*o,0))/this._getVisibleDatasetWeightTotal();this.offsetX=d*y,this.offsetY=f*y,r.total=this.calculateTotal(),this.outerRadius=y-b*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-b*l,0),this.updateElements(n,0,n.length,e)}_circumference(e,t){const i=this.options,r=this._cachedMeta,n=this._getCircumference();return t&&i.animation.animateRotate||!this.chart.getDataVisibility(e)||null===r._parsed[e]||r.data[e].hidden?0:this.calculateCircumference(r._parsed[e]*n/TAU)}updateElements(e,t,i,r){const n="reset"===r,a=this.chart,s=a.chartArea,o=a.options.animation,l=(s.left+s.right)/2,c=(s.top+s.bottom)/2,h=n&&o.animateScale,p=h?0:this.innerRadius,u=h?0:this.outerRadius,{sharedOptions:d,includeOptions:f}=this._getSharedOptions(t,r);let m,g=this._getRotation();for(m=0;m<t;++m)g+=this._circumference(m,n);for(m=t;m<t+i;++m){const t=this._circumference(m,n),i=e[m],a={x:l+this.offsetX,y:c+this.offsetY,startAngle:g,endAngle:g+t,circumference:t,outerRadius:u,innerRadius:p};f&&(a.options=d||this.resolveDataElementOptions(m,i.active?"active":r)),g+=t,this.updateElement(i,m,a,r)}}calculateTotal(){const e=this._cachedMeta,t=e.data;let i,r=0;for(i=0;i<t.length;i++){const n=e._parsed[i];null===n||isNaN(n)||!this.chart.getDataVisibility(i)||t[i].hidden||(r+=Math.abs(n))}return r}calculateCircumference(e){const t=this._cachedMeta.total;return t>0&&!isNaN(e)?TAU*(Math.abs(e)/t):0}getLabelAndValue(e){const t=this._cachedMeta,i=this.chart,r=i.data.labels||[],n=formatNumber(t._parsed[e],i.options.locale);return{label:r[e]||"",value:n}}getMaxBorderWidth(e){let t=0;const i=this.chart;let r,n,a,s,o;if(!e)for(r=0,n=i.data.datasets.length;r<n;++r)if(i.isDatasetVisible(r)){a=i.getDatasetMeta(r),e=a.data,s=a.controller;break}if(!e)return 0;for(r=0,n=e.length;r<n;++r)o=s.resolveDataElementOptions(r),"inner"!==o.borderAlign&&(t=Math.max(t,o.borderWidth||0,o.hoverBorderWidth||0));return t}getMaxOffset(e){let t=0;for(let i=0,r=e.length;i<r;++i){const e=this.resolveDataElementOptions(i);t=Math.max(t,e.offset||0,e.hoverOffset||0)}return t}_getRingWeightOffset(e){let t=0;for(let i=0;i<e;++i)this.chart.isDatasetVisible(i)&&(t+=this._getRingWeight(i));return t}_getRingWeight(e){return Math.max(valueOrDefault(this.chart.data.datasets[e].weight,1),0)}_getVisibleDatasetWeightTotal(){return this._getRingWeightOffset(this.chart.data.datasets.length)||1}}class PieController extends DoughnutController{static id="pie";static defaults={cutout:0,rotation:0,circumference:360,radius:"100%"}}function abstract(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class DateAdapterBase{static override(e){Object.assign(DateAdapterBase.prototype,e)}options;constructor(e){this.options=e||{}}init(){}formats(){return abstract()}parse(){return abstract()}format(){return abstract()}add(){return abstract()}diff(){return abstract()}startOf(){return abstract()}endOf(){return abstract()}}var adapters={_date:DateAdapterBase};function binarySearch(e,t,i,r){const{controller:n,data:a,_sorted:s}=e,o=n._cachedMeta.iScale,l=e.dataset&&e.dataset.options?e.dataset.options.spanGaps:null;if(o&&t===o.axis&&"r"!==t&&s&&a.length){const s=o._reversePixels?_rlookupByKey:_lookupByKey;if(!r){const r=s(a,t,i);if(l){const{vScale:t}=n._cachedMeta,{_parsed:i}=e,a=i.slice(0,r.lo+1).reverse().findIndex(e=>!isNullOrUndef(e[t.axis]));r.lo-=Math.max(0,a);const s=i.slice(r.hi).findIndex(e=>!isNullOrUndef(e[t.axis]));r.hi+=Math.max(0,s)}return r}if(n._sharedOptions){const e=a[0],r="function"==typeof e.getRange&&e.getRange(t);if(r){const e=s(a,t,i-r),n=s(a,t,i+r);return{lo:e.lo,hi:n.hi}}}}return{lo:0,hi:a.length-1}}function evaluateInteractionItems(e,t,i,r,n){const a=e.getSortedVisibleDatasetMetas(),s=i[t];for(let e=0,i=a.length;e<i;++e){const{index:i,data:o}=a[e],{lo:l,hi:c}=binarySearch(a[e],t,s,n);for(let e=l;e<=c;++e){const t=o[e];t.skip||r(t,i,e)}}}function getDistanceMetricForAxis(e){const t=-1!==e.indexOf("x"),i=-1!==e.indexOf("y");return function(e,r){const n=t?Math.abs(e.x-r.x):0,a=i?Math.abs(e.y-r.y):0;return Math.sqrt(Math.pow(n,2)+Math.pow(a,2))}}function getIntersectItems(e,t,i,r,n){const a=[];if(!n&&!e.isPointInArea(t))return a;return evaluateInteractionItems(e,i,t,function(i,s,o){(n||_isPointInArea(i,e.chartArea,0))&&i.inRange(t.x,t.y,r)&&a.push({element:i,datasetIndex:s,index:o})},!0),a}function getNearestRadialItems(e,t,i,r){let n=[];return evaluateInteractionItems(e,i,t,function(e,i,a){const{startAngle:s,endAngle:o}=e.getProps(["startAngle","endAngle"],r),{angle:l}=getAngleFromPoint(e,{x:t.x,y:t.y});_angleBetween(l,s,o)&&n.push({element:e,datasetIndex:i,index:a})}),n}function getNearestCartesianItems(e,t,i,r,n,a){let s=[];const o=getDistanceMetricForAxis(i);let l=Number.POSITIVE_INFINITY;return evaluateInteractionItems(e,i,t,function(i,c,h){const p=i.inRange(t.x,t.y,n);if(r&&!p)return;const u=i.getCenterPoint(n);if(!(!!a||e.isPointInArea(u))&&!p)return;const d=o(t,u);d<l?(s=[{element:i,datasetIndex:c,index:h}],l=d):d===l&&s.push({element:i,datasetIndex:c,index:h})}),s}function getNearestItems(e,t,i,r,n,a){return a||e.isPointInArea(t)?"r"!==i||r?getNearestCartesianItems(e,t,i,r,n,a):getNearestRadialItems(e,t,i,n):[]}function getAxisItems(e,t,i,r,n){const a=[],s="x"===i?"inXRange":"inYRange";let o=!1;return evaluateInteractionItems(e,i,t,(e,r,l)=>{e[s]&&e[s](t[i],n)&&(a.push({element:e,datasetIndex:r,index:l}),o=o||e.inRange(t.x,t.y,n))}),r&&!o?[]:a}var Interaction={modes:{index(e,t,i,r){const n=getRelativePosition(t,e),a=i.axis||"x",s=i.includeInvisible||!1,o=i.intersect?getIntersectItems(e,n,a,r,s):getNearestItems(e,n,a,!1,r,s),l=[];return o.length?(e.getSortedVisibleDatasetMetas().forEach(e=>{const t=o[0].index,i=e.data[t];i&&!i.skip&&l.push({element:i,datasetIndex:e.index,index:t})}),l):[]},dataset(e,t,i,r){const n=getRelativePosition(t,e),a=i.axis||"xy",s=i.includeInvisible||!1;let o=i.intersect?getIntersectItems(e,n,a,r,s):getNearestItems(e,n,a,!1,r,s);if(o.length>0){const t=o[0].datasetIndex,i=e.getDatasetMeta(t).data;o=[];for(let e=0;e<i.length;++e)o.push({element:i[e],datasetIndex:t,index:e})}return o},point:(e,t,i,r)=>getIntersectItems(e,getRelativePosition(t,e),i.axis||"xy",r,i.includeInvisible||!1),nearest(e,t,i,r){const n=getRelativePosition(t,e),a=i.axis||"xy",s=i.includeInvisible||!1;return getNearestItems(e,n,a,i.intersect,r,s)},x:(e,t,i,r)=>getAxisItems(e,getRelativePosition(t,e),"x",i.intersect,r),y:(e,t,i,r)=>getAxisItems(e,getRelativePosition(t,e),"y",i.intersect,r)}};const STATIC_POSITIONS=["left","top","right","bottom"];function filterByPosition(e,t){return e.filter(e=>e.pos===t)}function filterDynamicPositionByAxis(e,t){return e.filter(e=>-1===STATIC_POSITIONS.indexOf(e.pos)&&e.box.axis===t)}function sortByWeight(e,t){return e.sort((e,i)=>{const r=t?i:e,n=t?e:i;return r.weight===n.weight?r.index-n.index:r.weight-n.weight})}function wrapBoxes(e){const t=[];let i,r,n,a,s,o;for(i=0,r=(e||[]).length;i<r;++i)n=e[i],({position:a,options:{stack:s,stackWeight:o=1}}=n),t.push({index:i,box:n,pos:a,horizontal:n.isHorizontal(),weight:n.weight,stack:s&&a+s,stackWeight:o});return t}function buildStacks(e){const t={};for(const i of e){const{stack:e,pos:r,stackWeight:n}=i;if(!e||!STATIC_POSITIONS.includes(r))continue;const a=t[e]||(t[e]={count:0,placed:0,weight:0,size:0});a.count++,a.weight+=n}return t}function setLayoutDims(e,t){const i=buildStacks(e),{vBoxMaxWidth:r,hBoxMaxHeight:n}=t;let a,s,o;for(a=0,s=e.length;a<s;++a){o=e[a];const{fullSize:s}=o.box,l=i[o.stack],c=l&&o.stackWeight/l.weight;o.horizontal?(o.width=c?c*r:s&&t.availableWidth,o.height=n):(o.width=r,o.height=c?c*n:s&&t.availableHeight)}return i}function buildLayoutBoxes(e){const t=wrapBoxes(e),i=sortByWeight(t.filter(e=>e.box.fullSize),!0),r=sortByWeight(filterByPosition(t,"left"),!0),n=sortByWeight(filterByPosition(t,"right")),a=sortByWeight(filterByPosition(t,"top"),!0),s=sortByWeight(filterByPosition(t,"bottom")),o=filterDynamicPositionByAxis(t,"x"),l=filterDynamicPositionByAxis(t,"y");return{fullSize:i,leftAndTop:r.concat(a),rightAndBottom:n.concat(l).concat(s).concat(o),chartArea:filterByPosition(t,"chartArea"),vertical:r.concat(n).concat(l),horizontal:a.concat(s).concat(o)}}function getCombinedMax(e,t,i,r){return Math.max(e[i],t[i])+Math.max(e[r],t[r])}function updateMaxPadding(e,t){e.top=Math.max(e.top,t.top),e.left=Math.max(e.left,t.left),e.bottom=Math.max(e.bottom,t.bottom),e.right=Math.max(e.right,t.right)}function updateDims(e,t,i,r){const{pos:n,box:a}=i,s=e.maxPadding;if(!isObject$1(n)){i.size&&(e[n]-=i.size);const t=r[i.stack]||{size:0,count:1};t.size=Math.max(t.size,i.horizontal?a.height:a.width),i.size=t.size/t.count,e[n]+=i.size}a.getPadding&&updateMaxPadding(s,a.getPadding());const o=Math.max(0,t.outerWidth-getCombinedMax(s,e,"left","right")),l=Math.max(0,t.outerHeight-getCombinedMax(s,e,"top","bottom")),c=o!==e.w,h=l!==e.h;return e.w=o,e.h=l,i.horizontal?{same:c,other:h}:{same:h,other:c}}function handleMaxPadding(e){const t=e.maxPadding;function i(i){const r=Math.max(t[i]-e[i],0);return e[i]+=r,r}e.y+=i("top"),e.x+=i("left"),i("right"),i("bottom")}function getMargins(e,t){const i=t.maxPadding;function r(e){const r={left:0,top:0,right:0,bottom:0};return e.forEach(e=>{r[e]=Math.max(t[e],i[e])}),r}return r(e?["left","right"]:["top","bottom"])}function fitBoxes(e,t,i,r){const n=[];let a,s,o,l,c,h;for(a=0,s=e.length,c=0;a<s;++a){o=e[a],l=o.box,l.update(o.width||t.w,o.height||t.h,getMargins(o.horizontal,t));const{same:s,other:p}=updateDims(t,i,o,r);c|=s&&n.length,h=h||p,l.fullSize||n.push(o)}return c&&fitBoxes(n,t,i,r)||h}function setBoxDims(e,t,i,r,n){e.top=i,e.left=t,e.right=t+r,e.bottom=i+n,e.width=r,e.height=n}function placeBoxes(e,t,i,r){const n=i.padding;let{x:a,y:s}=t;for(const o of e){const e=o.box,l=r[o.stack]||{placed:0,weight:1},c=o.stackWeight/l.weight||1;if(o.horizontal){const r=t.w*c,a=l.size||e.height;defined(l.start)&&(s=l.start),e.fullSize?setBoxDims(e,n.left,s,i.outerWidth-n.right-n.left,a):setBoxDims(e,t.left+l.placed,s,r,a),l.start=s,l.placed+=r,s=e.bottom}else{const r=t.h*c,s=l.size||e.width;defined(l.start)&&(a=l.start),e.fullSize?setBoxDims(e,a,n.top,s,i.outerHeight-n.bottom-n.top):setBoxDims(e,a,t.top+l.placed,s,r),l.start=a,l.placed+=r,a=e.right}}t.x=a,t.y=s}var layouts={addBox(e,t){e.boxes||(e.boxes=[]),t.fullSize=t.fullSize||!1,t.position=t.position||"top",t.weight=t.weight||0,t._layers=t._layers||function(){return[{z:0,draw(e){t.draw(e)}}]},e.boxes.push(t)},removeBox(e,t){const i=e.boxes?e.boxes.indexOf(t):-1;-1!==i&&e.boxes.splice(i,1)},configure(e,t,i){t.fullSize=i.fullSize,t.position=i.position,t.weight=i.weight},update(e,t,i,r){if(!e)return;const n=toPadding(e.options.layout.padding),a=Math.max(t-n.width,0),s=Math.max(i-n.height,0),o=buildLayoutBoxes(e.boxes),l=o.vertical,c=o.horizontal;each(e.boxes,e=>{"function"==typeof e.beforeLayout&&e.beforeLayout()});const h=l.reduce((e,t)=>t.box.options&&!1===t.box.options.display?e:e+1,0)||1,p=Object.freeze({outerWidth:t,outerHeight:i,padding:n,availableWidth:a,availableHeight:s,vBoxMaxWidth:a/2/h,hBoxMaxHeight:s/2}),u=Object.assign({},n);updateMaxPadding(u,toPadding(r));const d=Object.assign({maxPadding:u,w:a,h:s,x:n.left,y:n.top},n),f=setLayoutDims(l.concat(c),p);fitBoxes(o.fullSize,d,p,f),fitBoxes(l,d,p,f),fitBoxes(c,d,p,f)&&fitBoxes(l,d,p,f),handleMaxPadding(d),placeBoxes(o.leftAndTop,d,p,f),d.x+=d.w,d.y+=d.h,placeBoxes(o.rightAndBottom,d,p,f),e.chartArea={left:d.left,top:d.top,right:d.left+d.w,bottom:d.top+d.h,height:d.h,width:d.w},each(o.chartArea,t=>{const i=t.box;Object.assign(i,e.chartArea),i.update(d.w,d.h,{left:0,top:0,right:0,bottom:0})})}};class BasePlatform{acquireContext(e,t){}releaseContext(e){return!1}addEventListener(e,t,i){}removeEventListener(e,t,i){}getDevicePixelRatio(){return 1}getMaximumSize(e,t,i,r){return t=Math.max(0,t||e.width),i=i||e.height,{width:t,height:Math.max(0,r?Math.floor(t/r):i)}}isAttached(e){return!0}updateConfig(e){}}class BasicPlatform extends BasePlatform{acquireContext(e){return e&&e.getContext&&e.getContext("2d")||null}updateConfig(e){e.options.animation=!1}}const EXPANDO_KEY="$chartjs",EVENT_TYPES={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},isNullOrEmpty=e=>null===e||""===e;function initCanvas(e,t){const i=e.style,r=e.getAttribute("height"),n=e.getAttribute("width");if(e[EXPANDO_KEY]={initial:{height:r,width:n,style:{display:i.display,height:i.height,width:i.width}}},i.display=i.display||"block",i.boxSizing=i.boxSizing||"border-box",isNullOrEmpty(n)){const t=readUsedSize(e,"width");void 0!==t&&(e.width=t)}if(isNullOrEmpty(r))if(""===e.style.height)e.height=e.width/(t||2);else{const t=readUsedSize(e,"height");void 0!==t&&(e.height=t)}return e}const eventListenerOptions=!!supportsEventListenerOptions&&{passive:!0};function addListener(e,t,i){e&&e.addEventListener(t,i,eventListenerOptions)}function removeListener(e,t,i){e&&e.canvas&&e.canvas.removeEventListener(t,i,eventListenerOptions)}function fromNativeEvent(e,t){const i=EVENT_TYPES[e.type]||e.type,{x:r,y:n}=getRelativePosition(e,t);return{type:i,chart:t,native:e,x:void 0!==r?r:null,y:void 0!==n?n:null}}function nodeListContains(e,t){for(const i of e)if(i===t||i.contains(t))return!0}function createAttachObserver(e,t,i){const r=e.canvas,n=new MutationObserver(e=>{let t=!1;for(const i of e)t=t||nodeListContains(i.addedNodes,r),t=t&&!nodeListContains(i.removedNodes,r);t&&i()});return n.observe(document,{childList:!0,subtree:!0}),n}function createDetachObserver(e,t,i){const r=e.canvas,n=new MutationObserver(e=>{let t=!1;for(const i of e)t=t||nodeListContains(i.removedNodes,r),t=t&&!nodeListContains(i.addedNodes,r);t&&i()});return n.observe(document,{childList:!0,subtree:!0}),n}const drpListeningCharts=new Map;let oldDevicePixelRatio=0;function onWindowResize(){const e=window.devicePixelRatio;e!==oldDevicePixelRatio&&(oldDevicePixelRatio=e,drpListeningCharts.forEach((t,i)=>{i.currentDevicePixelRatio!==e&&t()}))}function listenDevicePixelRatioChanges(e,t){drpListeningCharts.size||window.addEventListener("resize",onWindowResize),drpListeningCharts.set(e,t)}function unlistenDevicePixelRatioChanges(e){drpListeningCharts.delete(e),drpListeningCharts.size||window.removeEventListener("resize",onWindowResize)}function createResizeObserver(e,t,i){const r=e.canvas,n=r&&_getParentNode(r);if(!n)return;const a=throttled((e,t)=>{const r=n.clientWidth;i(e,t),r<n.clientWidth&&i()},window),s=new ResizeObserver(e=>{const t=e[0],i=t.contentRect.width,r=t.contentRect.height;0===i&&0===r||a(i,r)});return s.observe(n),listenDevicePixelRatioChanges(e,a),s}function releaseObserver(e,t,i){i&&i.disconnect(),"resize"===t&&unlistenDevicePixelRatioChanges(e)}function createProxyAndListen(e,t,i){const r=e.canvas,n=throttled(t=>{null!==e.ctx&&i(fromNativeEvent(t,e))},e);return addListener(r,t,n),n}class DomPlatform extends BasePlatform{acquireContext(e,t){const i=e&&e.getContext&&e.getContext("2d");return i&&i.canvas===e?(initCanvas(e,t),i):null}releaseContext(e){const t=e.canvas;if(!t[EXPANDO_KEY])return!1;const i=t[EXPANDO_KEY].initial;["height","width"].forEach(e=>{const r=i[e];isNullOrUndef(r)?t.removeAttribute(e):t.setAttribute(e,r)});const r=i.style||{};return Object.keys(r).forEach(e=>{t.style[e]=r[e]}),t.width=t.width,delete t[EXPANDO_KEY],!0}addEventListener(e,t,i){this.removeEventListener(e,t);const r=e.$proxies||(e.$proxies={}),n={attach:createAttachObserver,detach:createDetachObserver,resize:createResizeObserver}[t]||createProxyAndListen;r[t]=n(e,t,i)}removeEventListener(e,t){const i=e.$proxies||(e.$proxies={}),r=i[t];if(!r)return;({attach:releaseObserver,detach:releaseObserver,resize:releaseObserver}[t]||removeListener)(e,t,r),i[t]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(e,t,i,r){return getMaximumSize(e,t,i,r)}isAttached(e){const t=e&&_getParentNode(e);return!(!t||!t.isConnected)}}function _detectPlatform(e){return!_isDomSupported()||"undefined"!=typeof OffscreenCanvas&&e instanceof OffscreenCanvas?BasicPlatform:DomPlatform}class Element{static defaults={};static defaultRoutes=void 0;x;y;active=!1;options;$animations;tooltipPosition(e){const{x:t,y:i}=this.getProps(["x","y"],e);return{x:t,y:i}}hasValue(){return isNumber(this.x)&&isNumber(this.y)}getProps(e,t){const i=this.$animations;if(!t||!i)return this;const r={};return e.forEach(e=>{r[e]=i[e]&&i[e].active()?i[e]._to:this[e]}),r}}function autoSkip(e,t){const i=e.options.ticks,r=determineMaxTicks(e),n=Math.min(i.maxTicksLimit||r,r),a=i.major.enabled?getMajorIndices(t):[],s=a.length,o=a[0],l=a[s-1],c=[];if(s>n)return skipMajors(t,c,a,s/n),c;const h=calculateSpacing(a,t,n);if(s>0){let e,i;const r=s>1?Math.round((l-o)/(s-1)):null;for(skip(t,c,h,isNullOrUndef(r)?0:o-r,o),e=0,i=s-1;e<i;e++)skip(t,c,h,a[e],a[e+1]);return skip(t,c,h,l,isNullOrUndef(r)?t.length:l+r),c}return skip(t,c,h),c}function determineMaxTicks(e){const t=e.options.offset,i=e._tickSize(),r=e._length/i+(t?0:1),n=e._maxLength/i;return Math.floor(Math.min(r,n))}function calculateSpacing(e,t,i){const r=getEvenSpacing(e),n=t.length/i;if(!r)return Math.max(n,1);const a=_factorize(r);for(let e=0,t=a.length-1;e<t;e++){const t=a[e];if(t>n)return t}return Math.max(n,1)}function getMajorIndices(e){const t=[];let i,r;for(i=0,r=e.length;i<r;i++)e[i].major&&t.push(i);return t}function skipMajors(e,t,i,r){let n,a=0,s=i[0];for(r=Math.ceil(r),n=0;n<e.length;n++)n===s&&(t.push(e[n]),a++,s=i[a*r])}function skip(e,t,i,r,n){const a=valueOrDefault(r,0),s=Math.min(valueOrDefault(n,e.length),e.length);let o,l,c,h=0;for(i=Math.ceil(i),n&&(o=n-r,i=o/Math.floor(o/i)),c=a;c<0;)h++,c=Math.round(a+h*i);for(l=Math.max(a,0);l<s;l++)l===c&&(t.push(e[l]),h++,c=Math.round(a+h*i))}function getEvenSpacing(e){const t=e.length;let i,r;if(t<2)return!1;for(r=e[0],i=1;i<t;++i)if(e[i]-e[i-1]!==r)return!1;return r}const reverseAlign=e=>"left"===e?"right":"right"===e?"left":e,offsetFromEdge=(e,t,i)=>"top"===t||"left"===t?e[t]+i:e[t]-i,getTicksLimit=(e,t)=>Math.min(t||e,e);function sample(e,t){const i=[],r=e.length/t,n=e.length;let a=0;for(;a<n;a+=r)i.push(e[Math.floor(a)]);return i}function getPixelForGridLine(e,t,i){const r=e.ticks.length,n=Math.min(t,r-1),a=e._startPixel,s=e._endPixel,o=1e-6;let l,c=e.getPixelForTick(n);if(!(i&&(l=1===r?Math.max(c-a,s-c):0===t?(e.getPixelForTick(1)-c)/2:(c-e.getPixelForTick(n-1))/2,c+=n<t?l:-l,c<a-o||c>s+o)))return c}function garbageCollect(e,t){each(e,e=>{const i=e.gc,r=i.length/2;let n;if(r>t){for(n=0;n<r;++n)delete e.data[i[n]];i.splice(0,r)}})}function getTickMarkLength(e){return e.drawTicks?e.tickLength:0}function getTitleHeight(e,t){if(!e.display)return 0;const i=toFont(e.font,t),r=toPadding(e.padding);return(isArray(e.text)?e.text.length:1)*i.lineHeight+r.height}function createScaleContext(e,t){return createContext(e,{scale:t,type:"scale"})}function createTickContext(e,t,i){return createContext(e,{tick:i,index:t,type:"tick"})}function titleAlign(e,t,i){let r=_toLeftRightCenter(e);return(i&&"right"!==t||!i&&"right"===t)&&(r=reverseAlign(r)),r}function titleArgs(e,t,i,r){const{top:n,left:a,bottom:s,right:o,chart:l}=e,{chartArea:c,scales:h}=l;let p,u,d,f=0;const m=s-n,g=o-a;if(e.isHorizontal()){if(u=_alignStartEnd(r,a,o),isObject$1(i)){const e=Object.keys(i)[0],r=i[e];d=h[e].getPixelForValue(r)+m-t}else d="center"===i?(c.bottom+c.top)/2+m-t:offsetFromEdge(e,i,t);p=o-a}else{if(isObject$1(i)){const e=Object.keys(i)[0],r=i[e];u=h[e].getPixelForValue(r)-g+t}else u="center"===i?(c.left+c.right)/2-g+t:offsetFromEdge(e,i,t);d=_alignStartEnd(r,s,n),f="left"===i?-HALF_PI:HALF_PI}return{titleX:u,titleY:d,maxWidth:p,rotation:f}}class Scale extends Element{constructor(e){super(),this.id=e.id,this.type=e.type,this.options=void 0,this.ctx=e.ctx,this.chart=e.chart,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this._margins={left:0,right:0,top:0,bottom:0},this.maxWidth=void 0,this.maxHeight=void 0,this.paddingTop=void 0,this.paddingBottom=void 0,this.paddingLeft=void 0,this.paddingRight=void 0,this.axis=void 0,this.labelRotation=void 0,this.min=void 0,this.max=void 0,this._range=void 0,this.ticks=[],this._gridLineItems=null,this._labelItems=null,this._labelSizes=null,this._length=0,this._maxLength=0,this._longestTextCache={},this._startPixel=void 0,this._endPixel=void 0,this._reversePixels=!1,this._userMax=void 0,this._userMin=void 0,this._suggestedMax=void 0,this._suggestedMin=void 0,this._ticksLength=0,this._borderValue=0,this._cache={},this._dataLimitsCached=!1,this.$context=void 0}init(e){this.options=e.setContext(this.getContext()),this.axis=e.axis,this._userMin=this.parse(e.min),this._userMax=this.parse(e.max),this._suggestedMin=this.parse(e.suggestedMin),this._suggestedMax=this.parse(e.suggestedMax)}parse(e,t){return e}getUserBounds(){let{_userMin:e,_userMax:t,_suggestedMin:i,_suggestedMax:r}=this;return e=finiteOrDefault(e,Number.POSITIVE_INFINITY),t=finiteOrDefault(t,Number.NEGATIVE_INFINITY),i=finiteOrDefault(i,Number.POSITIVE_INFINITY),r=finiteOrDefault(r,Number.NEGATIVE_INFINITY),{min:finiteOrDefault(e,i),max:finiteOrDefault(t,r),minDefined:isNumberFinite(e),maxDefined:isNumberFinite(t)}}getMinMax(e){let t,{min:i,max:r,minDefined:n,maxDefined:a}=this.getUserBounds();if(n&&a)return{min:i,max:r};const s=this.getMatchingVisibleMetas();for(let o=0,l=s.length;o<l;++o)t=s[o].controller.getMinMax(this,e),n||(i=Math.min(i,t.min)),a||(r=Math.max(r,t.max));return i=a&&i>r?r:i,r=n&&i>r?i:r,{min:finiteOrDefault(i,finiteOrDefault(r,i)),max:finiteOrDefault(r,finiteOrDefault(i,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 e=this.chart.data;return this.options.labels||(this.isHorizontal()?e.xLabels:e.yLabels)||e.labels||[]}getLabelItems(e=this.chart.chartArea){return this._labelItems||(this._labelItems=this._computeLabelItems(e))}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){callback(this.options.beforeUpdate,[this])}update(e,t,i){const{beginAtZero:r,grace:n,ticks:a}=this.options,s=a.sampleSize;this.beforeUpdate(),this.maxWidth=e,this.maxHeight=t,this._margins=i=Object.assign({left:0,right:0,top:0,bottom:0},i),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+i.left+i.right:this.height+i.top+i.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=_addGrace(this,n,r),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const o=s<this.ticks.length;this._convertTicksToLabels(o?sample(this.ticks,s):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),a.display&&(a.autoSkip||"auto"===a.source)&&(this.ticks=autoSkip(this,this.ticks),this._labelSizes=null,this.afterAutoSkip()),o&&this._convertTicksToLabels(this.ticks),this.beforeFit(),this.fit(),this.afterFit(),this.afterUpdate()}configure(){let e,t,i=this.options.reverse;this.isHorizontal()?(e=this.left,t=this.right):(e=this.top,t=this.bottom,i=!i),this._startPixel=e,this._endPixel=t,this._reversePixels=i,this._length=t-e,this._alignToPixels=this.options.alignToPixels}afterUpdate(){callback(this.options.afterUpdate,[this])}beforeSetDimensions(){callback(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(){callback(this.options.afterSetDimensions,[this])}_callHooks(e){this.chart.notifyPlugins(e,this.getContext()),callback(this.options[e],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){callback(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(e){const t=this.options.ticks;let i,r,n;for(i=0,r=e.length;i<r;i++)n=e[i],n.label=callback(t.callback,[n.value,i,e],this)}afterTickToLabelConversion(){callback(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){callback(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){const e=this.options,t=e.ticks,i=getTicksLimit(this.ticks.length,e.ticks.maxTicksLimit),r=t.minRotation||0,n=t.maxRotation;let a,s,o,l=r;if(!this._isVisible()||!t.display||r>=n||i<=1||!this.isHorizontal())return void(this.labelRotation=r);const c=this._getLabelSizes(),h=c.widest.width,p=c.highest.height,u=_limitValue(this.chart.width-h,0,this.maxWidth);a=e.offset?this.maxWidth/i:u/(i-1),h+6>a&&(a=u/(i-(e.offset?.5:1)),s=this.maxHeight-getTickMarkLength(e.grid)-t.padding-getTitleHeight(e.title,this.chart.options.font),o=Math.sqrt(h*h+p*p),l=toDegrees(Math.min(Math.asin(_limitValue((c.highest.height+6)/a,-1,1)),Math.asin(_limitValue(s/o,-1,1))-Math.asin(_limitValue(p/o,-1,1)))),l=Math.max(r,Math.min(n,l))),this.labelRotation=l}afterCalculateLabelRotation(){callback(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){callback(this.options.beforeFit,[this])}fit(){const e={width:0,height:0},{chart:t,options:{ticks:i,title:r,grid:n}}=this,a=this._isVisible(),s=this.isHorizontal();if(a){const a=getTitleHeight(r,t.options.font);if(s?(e.width=this.maxWidth,e.height=getTickMarkLength(n)+a):(e.height=this.maxHeight,e.width=getTickMarkLength(n)+a),i.display&&this.ticks.length){const{first:t,last:r,widest:n,highest:a}=this._getLabelSizes(),o=2*i.padding,l=toRadians(this.labelRotation),c=Math.cos(l),h=Math.sin(l);if(s){const t=i.mirror?0:h*n.width+c*a.height;e.height=Math.min(this.maxHeight,e.height+t+o)}else{const t=i.mirror?0:c*n.width+h*a.height;e.width=Math.min(this.maxWidth,e.width+t+o)}this._calculatePadding(t,r,h,c)}}this._handleMargins(),s?(this.width=this._length=t.width-this._margins.left-this._margins.right,this.height=e.height):(this.width=e.width,this.height=this._length=t.height-this._margins.top-this._margins.bottom)}_calculatePadding(e,t,i,r){const{ticks:{align:n,padding:a},position:s}=this.options,o=0!==this.labelRotation,l="top"!==s&&"x"===this.axis;if(this.isHorizontal()){const s=this.getPixelForTick(0)-this.left,c=this.right-this.getPixelForTick(this.ticks.length-1);let h=0,p=0;o?l?(h=r*e.width,p=i*t.height):(h=i*e.height,p=r*t.width):"start"===n?p=t.width:"end"===n?h=e.width:"inner"!==n&&(h=e.width/2,p=t.width/2),this.paddingLeft=Math.max((h-s+a)*this.width/(this.width-s),0),this.paddingRight=Math.max((p-c+a)*this.width/(this.width-c),0)}else{let i=t.height/2,r=e.height/2;"start"===n?(i=0,r=e.height):"end"===n&&(i=t.height,r=0),this.paddingTop=i+a,this.paddingBottom=r+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(){callback(this.options.afterFit,[this])}isHorizontal(){const{axis:e,position:t}=this.options;return"top"===t||"bottom"===t||"x"===e}isFullSize(){return this.options.fullSize}_convertTicksToLabels(e){let t,i;for(this.beforeTickToLabelConversion(),this.generateTickLabels(e),t=0,i=e.length;t<i;t++)isNullOrUndef(e[t].label)&&(e.splice(t,1),i--,t--);this.afterTickToLabelConversion()}_getLabelSizes(){let e=this._labelSizes;if(!e){const t=this.options.ticks.sampleSize;let i=this.ticks;t<i.length&&(i=sample(i,t)),this._labelSizes=e=this._computeLabelSizes(i,i.length,this.options.ticks.maxTicksLimit)}return e}_computeLabelSizes(e,t,i){const{ctx:r,_longestTextCache:n}=this,a=[],s=[],o=Math.floor(t/getTicksLimit(t,i));let l,c,h,p,u,d,f,m,g,v,y,b=0,x=0;for(l=0;l<t;l+=o){if(p=e[l].label,u=this._resolveTickFontOptions(l),r.font=d=u.string,f=n[d]=n[d]||{data:{},gc:[]},m=u.lineHeight,g=v=0,isNullOrUndef(p)||isArray(p)){if(isArray(p))for(c=0,h=p.length;c<h;++c)y=p[c],isNullOrUndef(y)||isArray(y)||(g=_measureText(r,f.data,f.gc,g,y),v+=m)}else g=_measureText(r,f.data,f.gc,g,p),v=m;a.push(g),s.push(v),b=Math.max(g,b),x=Math.max(v,x)}garbageCollect(n,t);const _=a.indexOf(b),S=s.indexOf(x),w=e=>({width:a[e]||0,height:s[e]||0});return{first:w(0),last:w(t-1),widest:w(_),highest:w(S),widths:a,heights:s}}getLabelForValue(e){return e}getPixelForValue(e,t){return NaN}getValueForPixel(e){}getPixelForTick(e){const t=this.ticks;return e<0||e>t.length-1?null:this.getPixelForValue(t[e].value)}getPixelForDecimal(e){this._reversePixels&&(e=1-e);const t=this._startPixel+e*this._length;return _int16Range(this._alignToPixels?_alignPixel(this.chart,t,0):t)}getDecimalForPixel(e){const t=(e-this._startPixel)/this._length;return this._reversePixels?1-t:t}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:e,max:t}=this;return e<0&&t<0?t:e>0&&t>0?e:0}getContext(e){const t=this.ticks||[];if(e>=0&&e<t.length){const i=t[e];return i.$context||(i.$context=createTickContext(this.getContext(),e,i))}return this.$context||(this.$context=createScaleContext(this.chart.getContext(),this))}_tickSize(){const e=this.options.ticks,t=toRadians(this.labelRotation),i=Math.abs(Math.cos(t)),r=Math.abs(Math.sin(t)),n=this._getLabelSizes(),a=e.autoSkipPadding||0,s=n?n.widest.width+a:0,o=n?n.highest.height+a:0;return this.isHorizontal()?o*i>s*r?s/i:o/r:o*r<s*i?o/i:s/r}_isVisible(){const e=this.options.display;return"auto"!==e?!!e:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(e){const t=this.axis,i=this.chart,r=this.options,{grid:n,position:a,border:s}=r,o=n.offset,l=this.isHorizontal(),c=this.ticks.length+(o?1:0),h=getTickMarkLength(n),p=[],u=s.setContext(this.getContext()),d=u.display?u.width:0,f=d/2,m=function(e){return _alignPixel(i,e,d)};let g,v,y,b,x,_,S,w,C,P,E,k;if("top"===a)g=m(this.bottom),_=this.bottom-h,w=g-f,P=m(e.top)+f,k=e.bottom;else if("bottom"===a)g=m(this.top),P=e.top,k=m(e.bottom)-f,_=g+f,w=this.top+h;else if("left"===a)g=m(this.right),x=this.right-h,S=g-f,C=m(e.left)+f,E=e.right;else if("right"===a)g=m(this.left),C=e.left,E=m(e.right)-f,x=g+f,S=this.left+h;else if("x"===t){if("center"===a)g=m((e.top+e.bottom)/2+.5);else if(isObject$1(a)){const e=Object.keys(a)[0],t=a[e];g=m(this.chart.scales[e].getPixelForValue(t))}P=e.top,k=e.bottom,_=g+f,w=_+h}else if("y"===t){if("center"===a)g=m((e.left+e.right)/2);else if(isObject$1(a)){const e=Object.keys(a)[0],t=a[e];g=m(this.chart.scales[e].getPixelForValue(t))}x=g-f,S=x-h,C=e.left,E=e.right}const $=valueOrDefault(r.ticks.maxTicksLimit,c),A=Math.max(1,Math.ceil(c/$));for(v=0;v<c;v+=A){const e=this.getContext(v),t=n.setContext(e),r=s.setContext(e),a=t.lineWidth,c=t.color,h=r.dash||[],u=r.dashOffset,d=t.tickWidth,f=t.tickColor,m=t.tickBorderDash||[],g=t.tickBorderDashOffset;y=getPixelForGridLine(this,v,o),void 0!==y&&(b=_alignPixel(i,y,a),l?x=S=C=E=b:_=w=P=k=b,p.push({tx1:x,ty1:_,tx2:S,ty2:w,x1:C,y1:P,x2:E,y2:k,width:a,color:c,borderDash:h,borderDashOffset:u,tickWidth:d,tickColor:f,tickBorderDash:m,tickBorderDashOffset:g}))}return this._ticksLength=c,this._borderValue=g,p}_computeLabelItems(e){const t=this.axis,i=this.options,{position:r,ticks:n}=i,a=this.isHorizontal(),s=this.ticks,{align:o,crossAlign:l,padding:c,mirror:h}=n,p=getTickMarkLength(i.grid),u=p+c,d=h?-c:u,f=-toRadians(this.labelRotation),m=[];let g,v,y,b,x,_,S,w,C,P,E,k,$="middle";if("top"===r)_=this.bottom-d,S=this._getXAxisLabelAlignment();else if("bottom"===r)_=this.top+d,S=this._getXAxisLabelAlignment();else if("left"===r){const e=this._getYAxisLabelAlignment(p);S=e.textAlign,x=e.x}else if("right"===r){const e=this._getYAxisLabelAlignment(p);S=e.textAlign,x=e.x}else if("x"===t){if("center"===r)_=(e.top+e.bottom)/2+u;else if(isObject$1(r)){const e=Object.keys(r)[0],t=r[e];_=this.chart.scales[e].getPixelForValue(t)+u}S=this._getXAxisLabelAlignment()}else if("y"===t){if("center"===r)x=(e.left+e.right)/2-u;else if(isObject$1(r)){const e=Object.keys(r)[0],t=r[e];x=this.chart.scales[e].getPixelForValue(t)}S=this._getYAxisLabelAlignment(p).textAlign}"y"===t&&("start"===o?$="top":"end"===o&&($="bottom"));const A=this._getLabelSizes();for(g=0,v=s.length;g<v;++g){y=s[g],b=y.label;const e=n.setContext(this.getContext(g));w=this.getPixelForTick(g)+n.labelOffset,C=this._resolveTickFontOptions(g),P=C.lineHeight,E=isArray(b)?b.length:1;const t=E/2,i=e.color,o=e.textStrokeColor,c=e.textStrokeWidth;let p,u=S;if(a?(x=w,"inner"===S&&(u=g===v-1?this.options.reverse?"left":"right":0===g?this.options.reverse?"right":"left":"center"),k="top"===r?"near"===l||0!==f?-E*P+P/2:"center"===l?-A.highest.height/2-t*P+P:-A.highest.height+P/2:"near"===l||0!==f?P/2:"center"===l?A.highest.height/2-t*P:A.highest.height-E*P,h&&(k*=-1),0===f||e.showLabelBackdrop||(x+=P/2*Math.sin(f))):(_=w,k=(1-E)*P/2),e.showLabelBackdrop){const t=toPadding(e.backdropPadding),i=A.heights[g],r=A.widths[g];let n=k-t.top,a=0-t.left;switch($){case"middle":n-=i/2;break;case"bottom":n-=i}switch(S){case"center":a-=r/2;break;case"right":a-=r;break;case"inner":g===v-1?a-=r:g>0&&(a-=r/2)}p={left:a,top:n,width:r+t.width,height:i+t.height,color:e.backdropColor}}m.push({label:b,font:C,textOffset:k,options:{rotation:f,color:i,strokeColor:o,strokeWidth:c,textAlign:u,textBaseline:$,translation:[x,_],backdrop:p}})}return m}_getXAxisLabelAlignment(){const{position:e,ticks:t}=this.options;if(-toRadians(this.labelRotation))return"top"===e?"left":"right";let i="center";return"start"===t.align?i="left":"end"===t.align?i="right":"inner"===t.align&&(i="inner"),i}_getYAxisLabelAlignment(e){const{position:t,ticks:{crossAlign:i,mirror:r,padding:n}}=this.options,a=e+n,s=this._getLabelSizes().widest.width;let o,l;return"left"===t?r?(l=this.right+n,"near"===i?o="left":"center"===i?(o="center",l+=s/2):(o="right",l+=s)):(l=this.right-a,"near"===i?o="right":"center"===i?(o="center",l-=s/2):(o="left",l=this.left)):"right"===t?r?(l=this.left+n,"near"===i?o="right":"center"===i?(o="center",l-=s/2):(o="left",l-=s)):(l=this.left+a,"near"===i?o="left":"center"===i?(o="center",l+=s/2):(o="right",l=this.right)):o="right",{textAlign:o,x:l}}_computeLabelArea(){if(this.options.ticks.mirror)return;const e=this.chart,t=this.options.position;return"left"===t||"right"===t?{top:0,left:this.left,bottom:e.height,right:this.right}:"top"===t||"bottom"===t?{top:this.top,left:0,bottom:this.bottom,right:e.width}:void 0}drawBackground(){const{ctx:e,options:{backgroundColor:t},left:i,top:r,width:n,height:a}=this;t&&(e.save(),e.fillStyle=t,e.fillRect(i,r,n,a),e.restore())}getLineWidthForValue(e){const t=this.options.grid;if(!this._isVisible()||!t.display)return 0;const i=this.ticks.findIndex(t=>t.value===e);if(i>=0){return t.setContext(this.getContext(i)).lineWidth}return 0}drawGrid(e){const t=this.options.grid,i=this.ctx,r=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(e));let n,a;const s=(e,t,r)=>{r.width&&r.color&&(i.save(),i.lineWidth=r.width,i.strokeStyle=r.color,i.setLineDash(r.borderDash||[]),i.lineDashOffset=r.borderDashOffset,i.beginPath(),i.moveTo(e.x,e.y),i.lineTo(t.x,t.y),i.stroke(),i.restore())};if(t.display)for(n=0,a=r.length;n<a;++n){const e=r[n];t.drawOnChartArea&&s({x:e.x1,y:e.y1},{x:e.x2,y:e.y2},e),t.drawTicks&&s({x:e.tx1,y:e.ty1},{x:e.tx2,y:e.ty2},{color:e.tickColor,width:e.tickWidth,borderDash:e.tickBorderDash,borderDashOffset:e.tickBorderDashOffset})}}drawBorder(){const{chart:e,ctx:t,options:{border:i,grid:r}}=this,n=i.setContext(this.getContext()),a=i.display?n.width:0;if(!a)return;const s=r.setContext(this.getContext(0)).lineWidth,o=this._borderValue;let l,c,h,p;this.isHorizontal()?(l=_alignPixel(e,this.left,a)-a/2,c=_alignPixel(e,this.right,s)+s/2,h=p=o):(h=_alignPixel(e,this.top,a)-a/2,p=_alignPixel(e,this.bottom,s)+s/2,l=c=o),t.save(),t.lineWidth=n.width,t.strokeStyle=n.color,t.beginPath(),t.moveTo(l,h),t.lineTo(c,p),t.stroke(),t.restore()}drawLabels(e){if(!this.options.ticks.display)return;const t=this.ctx,i=this._computeLabelArea();i&&clipArea(t,i);const r=this.getLabelItems(e);for(const e of r){const i=e.options,r=e.font;renderText(t,e.label,0,e.textOffset,r,i)}i&&unclipArea(t)}drawTitle(){const{ctx:e,options:{position:t,title:i,reverse:r}}=this;if(!i.display)return;const n=toFont(i.font),a=toPadding(i.padding),s=i.align;let o=n.lineHeight/2;"bottom"===t||"center"===t||isObject$1(t)?(o+=a.bottom,isArray(i.text)&&(o+=n.lineHeight*(i.text.length-1))):o+=a.top;const{titleX:l,titleY:c,maxWidth:h,rotation:p}=titleArgs(this,o,t,s);renderText(e,i.text,0,0,n,{color:i.color,maxWidth:h,rotation:p,textAlign:titleAlign(s,t,r),textBaseline:"middle",translation:[l,c]})}draw(e){this._isVisible()&&(this.drawBackground(),this.drawGrid(e),this.drawBorder(),this.drawTitle(),this.drawLabels(e))}_layers(){const e=this.options,t=e.ticks&&e.ticks.z||0,i=valueOrDefault(e.grid&&e.grid.z,-1),r=valueOrDefault(e.border&&e.border.z,0);return this._isVisible()&&this.draw===Scale.prototype.draw?[{z:i,draw:e=>{this.drawBackground(),this.drawGrid(e),this.drawTitle()}},{z:r,draw:()=>{this.drawBorder()}},{z:t,draw:e=>{this.drawLabels(e)}}]:[{z:t,draw:e=>{this.draw(e)}}]}getMatchingVisibleMetas(e){const t=this.chart.getSortedVisibleDatasetMetas(),i=this.axis+"AxisID",r=[];let n,a;for(n=0,a=t.length;n<a;++n){const a=t[n];a[i]!==this.id||e&&a.type!==e||r.push(a)}return r}_resolveTickFontOptions(e){return toFont(this.options.ticks.setContext(this.getContext(e)).font)}_maxDigits(){const e=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/e}}class TypedRegistry{constructor(e,t,i){this.type=e,this.scope=t,this.override=i,this.items=Object.create(null)}isForType(e){return Object.prototype.isPrototypeOf.call(this.type.prototype,e.prototype)}register(e){const t=Object.getPrototypeOf(e);let i;isIChartComponent(t)&&(i=this.register(t));const r=this.items,n=e.id,a=this.scope+"."+n;if(!n)throw new Error("class does not have id: "+e);return n in r||(r[n]=e,registerDefaults(e,a,i),this.override&&defaults.override(e.id,e.overrides)),a}get(e){return this.items[e]}unregister(e){const t=this.items,i=e.id,r=this.scope;i in t&&delete t[i],r&&i in defaults[r]&&(delete defaults[r][i],this.override&&delete overrides[i])}}function registerDefaults(e,t,i){const r=merge(Object.create(null),[i?defaults.get(i):{},defaults.get(t),e.defaults]);defaults.set(t,r),e.defaultRoutes&&routeDefaults(t,e.defaultRoutes),e.descriptors&&defaults.describe(t,e.descriptors)}function routeDefaults(e,t){Object.keys(t).forEach(i=>{const r=i.split("."),n=r.pop(),a=[e].concat(r).join("."),s=t[i].split("."),o=s.pop(),l=s.join(".");defaults.route(a,n,l,o)})}function isIChartComponent(e){return"id"in e&&"defaults"in e}class Registry{constructor(){this.controllers=new TypedRegistry(DatasetController,"datasets",!0),this.elements=new TypedRegistry(Element,"elements"),this.plugins=new TypedRegistry(Object,"plugins"),this.scales=new TypedRegistry(Scale,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...e){this._each("register",e)}remove(...e){this._each("unregister",e)}addControllers(...e){this._each("register",e,this.controllers)}addElements(...e){this._each("register",e,this.elements)}addPlugins(...e){this._each("register",e,this.plugins)}addScales(...e){this._each("register",e,this.scales)}getController(e){return this._get(e,this.controllers,"controller")}getElement(e){return this._get(e,this.elements,"element")}getPlugin(e){return this._get(e,this.plugins,"plugin")}getScale(e){return this._get(e,this.scales,"scale")}removeControllers(...e){this._each("unregister",e,this.controllers)}removeElements(...e){this._each("unregister",e,this.elements)}removePlugins(...e){this._each("unregister",e,this.plugins)}removeScales(...e){this._each("unregister",e,this.scales)}_each(e,t,i){[...t].forEach(t=>{const r=i||this._getRegistryForType(t);i||r.isForType(t)||r===this.plugins&&t.id?this._exec(e,r,t):each(t,t=>{const r=i||this._getRegistryForType(t);this._exec(e,r,t)})})}_exec(e,t,i){const r=_capitalize(e);callback(i["before"+r],[],i),t[e](i),callback(i["after"+r],[],i)}_getRegistryForType(e){for(let t=0;t<this._typedRegistries.length;t++){const i=this._typedRegistries[t];if(i.isForType(e))return i}return this.plugins}_get(e,t,i){const r=t.get(e);if(void 0===r)throw new Error('"'+e+'" is not a registered '+i+".");return r}}var registry=new Registry;class PluginService{constructor(){this._init=void 0}notify(e,t,i,r){if("beforeInit"===t&&(this._init=this._createDescriptors(e,!0),this._notify(this._init,e,"install")),void 0===this._init)return;const n=r?this._descriptors(e).filter(r):this._descriptors(e),a=this._notify(n,e,t,i);return"afterDestroy"===t&&(this._notify(n,e,"stop"),this._notify(this._init,e,"uninstall"),this._init=void 0),a}_notify(e,t,i,r){r=r||{};for(const n of e){const e=n.plugin;if(!1===callback(e[i],[t,r,n.options],e)&&r.cancelable)return!1}return!0}invalidate(){isNullOrUndef(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(e){if(this._cache)return this._cache;const t=this._cache=this._createDescriptors(e);return this._notifyStateChanges(e),t}_createDescriptors(e,t){const i=e&&e.config,r=valueOrDefault(i.options&&i.options.plugins,{}),n=allPlugins(i);return!1!==r||t?createDescriptors(e,n,r,t):[]}_notifyStateChanges(e){const t=this._oldCache||[],i=this._cache,r=(e,t)=>e.filter(e=>!t.some(t=>e.plugin.id===t.plugin.id));this._notify(r(t,i),e,"stop"),this._notify(r(i,t),e,"start")}}function allPlugins(e){const t={},i=[],r=Object.keys(registry.plugins.items);for(let e=0;e<r.length;e++)i.push(registry.getPlugin(r[e]));const n=e.plugins||[];for(let e=0;e<n.length;e++){const r=n[e];-1===i.indexOf(r)&&(i.push(r),t[r.id]=!0)}return{plugins:i,localIds:t}}function getOpts(e,t){return t||!1!==e?!0===e?{}:e:null}function createDescriptors(e,{plugins:t,localIds:i},r,n){const a=[],s=e.getContext();for(const o of t){const t=o.id,l=getOpts(r[t],n);null!==l&&a.push({plugin:o,options:pluginOpts(e.config,{plugin:o,local:i[t]},l,s)})}return a}function pluginOpts(e,{plugin:t,local:i},r,n){const a=e.pluginScopeKeys(t),s=e.getOptionScopes(r,a);return i&&t.defaults&&s.push(t.defaults),e.createResolver(s,n,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function getIndexAxis(e,t){const i=defaults.datasets[e]||{};return((t.datasets||{})[e]||{}).indexAxis||t.indexAxis||i.indexAxis||"x"}function getAxisFromDefaultScaleID(e,t){let i=e;return"_index_"===e?i=t:"_value_"===e&&(i="x"===t?"y":"x"),i}function getDefaultScaleIDFromAxis(e,t){return e===t?"_index_":"_value_"}function idMatchesAxis(e){if("x"===e||"y"===e||"r"===e)return e}function axisFromPosition(e){return"top"===e||"bottom"===e?"x":"left"===e||"right"===e?"y":void 0}function determineAxis(e,...t){if(idMatchesAxis(e))return e;for(const i of t){const t=i.axis||axisFromPosition(i.position)||e.length>1&&idMatchesAxis(e[0].toLowerCase());if(t)return t}throw new Error(`Cannot determine type of '${e}' axis. Please provide 'axis' or 'position' option.`)}function getAxisFromDataset(e,t,i){if(i[t+"AxisID"]===e)return{axis:t}}function retrieveAxisFromDatasets(e,t){if(t.data&&t.data.datasets){const i=t.data.datasets.filter(t=>t.xAxisID===e||t.yAxisID===e);if(i.length)return getAxisFromDataset(e,"x",i[0])||getAxisFromDataset(e,"y",i[0])}return{}}function mergeScaleConfig(e,t){const i=overrides[e.type]||{scales:{}},r=t.scales||{},n=getIndexAxis(e.type,t),a=Object.create(null);return Object.keys(r).forEach(t=>{const s=r[t];if(!isObject$1(s))return console.error(`Invalid scale configuration for scale: ${t}`);if(s._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${t}`);const o=determineAxis(t,s,retrieveAxisFromDatasets(t,e),defaults.scales[s.type]),l=getDefaultScaleIDFromAxis(o,n),c=i.scales||{};a[t]=mergeIf(Object.create(null),[{axis:o},s,c[o],c[l]])}),e.data.datasets.forEach(i=>{const n=i.type||e.type,s=i.indexAxis||getIndexAxis(n,t),o=(overrides[n]||{}).scales||{};Object.keys(o).forEach(e=>{const t=getAxisFromDefaultScaleID(e,s),n=i[t+"AxisID"]||t;a[n]=a[n]||Object.create(null),mergeIf(a[n],[{axis:t},r[n],o[e]])})}),Object.keys(a).forEach(e=>{const t=a[e];mergeIf(t,[defaults.scales[t.type],defaults.scale])}),a}function initOptions(e){const t=e.options||(e.options={});t.plugins=valueOrDefault(t.plugins,{}),t.scales=mergeScaleConfig(e,t)}function initData(e){return(e=e||{}).datasets=e.datasets||[],e.labels=e.labels||[],e}function initConfig(e){return(e=e||{}).data=initData(e.data),initOptions(e),e}const keyCache=new Map,keysCached=new Set;function cachedKeys(e,t){let i=keyCache.get(e);return i||(i=t(),keyCache.set(e,i),keysCached.add(i)),i}const addIfFound=(e,t,i)=>{const r=resolveObjectKey(t,i);void 0!==r&&e.add(r)};class Config{constructor(e){this._config=initConfig(e),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(e){this._config.type=e}get data(){return this._config.data}set data(e){this._config.data=initData(e)}get options(){return this._config.options}set options(e){this._config.options=e}get plugins(){return this._config.plugins}update(){const e=this._config;this.clearCache(),initOptions(e)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(e){return cachedKeys(e,()=>[[`datasets.${e}`,""]])}datasetAnimationScopeKeys(e,t){return cachedKeys(`${e}.transition.${t}`,()=>[[`datasets.${e}.transitions.${t}`,`transitions.${t}`],[`datasets.${e}`,""]])}datasetElementScopeKeys(e,t){return cachedKeys(`${e}-${t}`,()=>[[`datasets.${e}.elements.${t}`,`datasets.${e}`,`elements.${t}`,""]])}pluginScopeKeys(e){const t=e.id;return cachedKeys(`${this.type}-plugin-${t}`,()=>[[`plugins.${t}`,...e.additionalOptionScopes||[]]])}_cachedScopes(e,t){const i=this._scopeCache;let r=i.get(e);return r&&!t||(r=new Map,i.set(e,r)),r}getOptionScopes(e,t,i){const{options:r,type:n}=this,a=this._cachedScopes(e,i),s=a.get(t);if(s)return s;const o=new Set;t.forEach(t=>{e&&(o.add(e),t.forEach(t=>addIfFound(o,e,t))),t.forEach(e=>addIfFound(o,r,e)),t.forEach(e=>addIfFound(o,overrides[n]||{},e)),t.forEach(e=>addIfFound(o,defaults,e)),t.forEach(e=>addIfFound(o,descriptors,e))});const l=Array.from(o);return 0===l.length&&l.push(Object.create(null)),keysCached.has(t)&&a.set(t,l),l}chartOptionScopes(){const{options:e,type:t}=this;return[e,overrides[t]||{},defaults.datasets[t]||{},{type:t},defaults,descriptors]}resolveNamedOptions(e,t,i,r=[""]){const n={$shared:!0},{resolver:a,subPrefixes:s}=getResolver(this._resolverCache,e,r);let o=a;if(needContext(a,t)){n.$shared=!1;o=_attachContext(a,i=isFunction(i)?i():i,this.createResolver(e,i,s))}for(const e of t)n[e]=o[e];return n}createResolver(e,t,i=[""],r){const{resolver:n}=getResolver(this._resolverCache,e,i);return isObject$1(t)?_attachContext(n,t,void 0,r):n}}function getResolver(e,t,i){let r=e.get(t);r||(r=new Map,e.set(t,r));const n=i.join();let a=r.get(n);if(!a){a={resolver:_createResolver(t,i),subPrefixes:i.filter(e=>!e.toLowerCase().includes("hover"))},r.set(n,a)}return a}const hasFunction=e=>isObject$1(e)&&Object.getOwnPropertyNames(e).some(t=>isFunction(e[t]));function needContext(e,t){const{isScriptable:i,isIndexable:r}=_descriptors(e);for(const n of t){const t=i(n),a=r(n),s=(a||t)&&e[n];if(t&&(isFunction(s)||hasFunction(s))||a&&isArray(s))return!0}return!1}var version="4.5.1";const KNOWN_POSITIONS=["top","bottom","left","right","chartArea"];function positionIsHorizontal(e,t){return"top"===e||"bottom"===e||-1===KNOWN_POSITIONS.indexOf(e)&&"x"===t}function compare2Level(e,t){return function(i,r){return i[e]===r[e]?i[t]-r[t]:i[e]-r[e]}}function onAnimationsComplete(e){const t=e.chart,i=t.options.animation;t.notifyPlugins("afterRender"),callback(i&&i.onComplete,[e],t)}function onAnimationProgress(e){const t=e.chart,i=t.options.animation;callback(i&&i.onProgress,[e],t)}function getCanvas(e){return _isDomSupported()&&"string"==typeof e?e=document.getElementById(e):e&&e.length&&(e=e[0]),e&&e.canvas&&(e=e.canvas),e}const instances={},getChart=e=>{const t=getCanvas(e);return Object.values(instances).filter(e=>e.canvas===t).pop()};function moveNumericKeys(e,t,i){const r=Object.keys(e);for(const n of r){const r=+n;if(r>=t){const a=e[n];delete e[n],(i>0||r>t)&&(e[r+i]=a)}}}function determineLastEvent(e,t,i,r){return i&&"mouseout"!==e.type?r?t:e:null}class Chart{static defaults=defaults;static instances=instances;static overrides=overrides;static registry=registry;static version=version;static getChart=getChart;static register(...e){registry.add(...e),invalidatePlugins()}static unregister(...e){registry.remove(...e),invalidatePlugins()}constructor(e,t){const i=this.config=new Config(t),r=getCanvas(e),n=getChart(r);if(n)throw new Error("Canvas is already in use. Chart with ID '"+n.id+"' must be destroyed before the canvas with ID '"+n.canvas.id+"' can be reused.");const a=i.createResolver(i.chartOptionScopes(),this.getContext());this.platform=new(i.platform||_detectPlatform(r)),this.platform.updateConfig(i);const s=this.platform.acquireContext(r,a.aspectRatio),o=s&&s.canvas,l=o&&o.height,c=o&&o.width;this.id=uid(),this.ctx=s,this.canvas=o,this.width=c,this.height=l,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 PluginService,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=debounce(e=>this.update(e),a.resizeDelay||0),this._dataChanges=[],instances[this.id]=this,s&&o?(animator.listen(this,"complete",onAnimationsComplete),animator.listen(this,"progress",onAnimationProgress),this._initialize(),this.attached&&this.update()):console.error("Failed to create chart: can't acquire context from the given item")}get aspectRatio(){const{options:{aspectRatio:e,maintainAspectRatio:t},width:i,height:r,_aspectRatio:n}=this;return isNullOrUndef(e)?t&&n?n:r?i/r:null:e}get data(){return this.config.data}set data(e){this.config.data=e}get options(){return this._options}set options(e){this.config.options=e}get registry(){return registry}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():retinaScale(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return clearCanvas(this.canvas,this.ctx),this}stop(){return animator.stop(this),this}resize(e,t){animator.running(this)?this._resizeBeforeDraw={width:e,height:t}:this._resize(e,t)}_resize(e,t){const i=this.options,r=this.canvas,n=i.maintainAspectRatio&&this.aspectRatio,a=this.platform.getMaximumSize(r,e,t,n),s=i.devicePixelRatio||this.platform.getDevicePixelRatio(),o=this.width?"resize":"attach";this.width=a.width,this.height=a.height,this._aspectRatio=this.aspectRatio,retinaScale(this,s,!0)&&(this.notifyPlugins("resize",{size:a}),callback(i.onResize,[this,a],this),this.attached&&this._doResize(o)&&this.render())}ensureScalesHaveIDs(){each(this.options.scales||{},(e,t)=>{e.id=t})}buildOrUpdateScales(){const e=this.options,t=e.scales,i=this.scales,r=Object.keys(i).reduce((e,t)=>(e[t]=!1,e),{});let n=[];t&&(n=n.concat(Object.keys(t).map(e=>{const i=t[e],r=determineAxis(e,i),n="r"===r,a="x"===r;return{options:i,dposition:n?"chartArea":a?"bottom":"left",dtype:n?"radialLinear":a?"category":"linear"}}))),each(n,t=>{const n=t.options,a=n.id,s=determineAxis(a,n),o=valueOrDefault(n.type,t.dtype);void 0!==n.position&&positionIsHorizontal(n.position,s)===positionIsHorizontal(t.dposition)||(n.position=t.dposition),r[a]=!0;let l=null;if(a in i&&i[a].type===o)l=i[a];else{l=new(registry.getScale(o))({id:a,type:o,ctx:this.ctx,chart:this}),i[l.id]=l}l.init(n,e)}),each(r,(e,t)=>{e||delete i[t]}),each(i,e=>{layouts.configure(this,e,e.options),layouts.addBox(this,e)})}_updateMetasets(){const e=this._metasets,t=this.data.datasets.length,i=e.length;if(e.sort((e,t)=>e.index-t.index),i>t){for(let e=t;e<i;++e)this._destroyDatasetMeta(e);e.splice(t,i-t)}this._sortedMetasets=e.slice(0).sort(compare2Level("order","index"))}_removeUnreferencedMetasets(){const{_metasets:e,data:{datasets:t}}=this;e.length>t.length&&delete this._stacks,e.forEach((e,i)=>{0===t.filter(t=>t===e._dataset).length&&this._destroyDatasetMeta(i)})}buildOrUpdateControllers(){const e=[],t=this.data.datasets;let i,r;for(this._removeUnreferencedMetasets(),i=0,r=t.length;i<r;i++){const r=t[i];let n=this.getDatasetMeta(i);const a=r.type||this.config.type;if(n.type&&n.type!==a&&(this._destroyDatasetMeta(i),n=this.getDatasetMeta(i)),n.type=a,n.indexAxis=r.indexAxis||getIndexAxis(a,this.options),n.order=r.order||0,n.index=i,n.label=""+r.label,n.visible=this.isDatasetVisible(i),n.controller)n.controller.updateIndex(i),n.controller.linkScales();else{const t=registry.getController(a),{datasetElementType:r,dataElementType:s}=defaults.datasets[a];Object.assign(t,{dataElementType:registry.getElement(s),datasetElementType:r&&registry.getElement(r)}),n.controller=new t(this,i),e.push(n.controller)}}return this._updateMetasets(),e}_resetElements(){each(this.data.datasets,(e,t)=>{this.getDatasetMeta(t).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(e){const t=this.config;t.update();const i=this._options=t.createResolver(t.chartOptionScopes(),this.getContext()),r=this._animationsDisabled=!i.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),!1===this.notifyPlugins("beforeUpdate",{mode:e,cancelable:!0}))return;const n=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let a=0;for(let e=0,t=this.data.datasets.length;e<t;e++){const{controller:t}=this.getDatasetMeta(e),i=!r&&-1===n.indexOf(t);t.buildOrUpdateElements(i),a=Math.max(+t.getMaxOverflow(),a)}a=this._minPadding=i.layout.autoPadding?a:0,this._updateLayout(a),r||each(n,e=>{e.reset()}),this._updateDatasets(e),this.notifyPlugins("afterUpdate",{mode:e}),this._layers.sort(compare2Level("z","_idx"));const{_active:s,_lastEvent:o}=this;o?this._eventHandler(o,!0):s.length&&this._updateHoverStyles(s,s,!0),this.render()}_updateScales(){each(this.scales,e=>{layouts.removeBox(this,e)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const e=this.options,t=new Set(Object.keys(this._listeners)),i=new Set(e.events);setsEqual(t,i)&&!!this._responsiveListeners===e.responsive||(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:e}=this,t=this._getUniformDataChanges()||[];for(const{method:i,start:r,count:n}of t){moveNumericKeys(e,r,"_removeElements"===i?-n:n)}}_getUniformDataChanges(){const e=this._dataChanges;if(!e||!e.length)return;this._dataChanges=[];const t=this.data.datasets.length,i=t=>new Set(e.filter(e=>e[0]===t).map((e,t)=>t+","+e.splice(1).join(","))),r=i(0);for(let e=1;e<t;e++)if(!setsEqual(r,i(e)))return;return Array.from(r).map(e=>e.split(",")).map(e=>({method:e[1],start:+e[2],count:+e[3]}))}_updateLayout(e){if(!1===this.notifyPlugins("beforeLayout",{cancelable:!0}))return;layouts.update(this,this.width,this.height,e);const t=this.chartArea,i=t.width<=0||t.height<=0;this._layers=[],each(this.boxes,e=>{i&&"chartArea"===e.position||(e.configure&&e.configure(),this._layers.push(...e._layers()))},this),this._layers.forEach((e,t)=>{e._idx=t}),this.notifyPlugins("afterLayout")}_updateDatasets(e){if(!1!==this.notifyPlugins("beforeDatasetsUpdate",{mode:e,cancelable:!0})){for(let e=0,t=this.data.datasets.length;e<t;++e)this.getDatasetMeta(e).controller.configure();for(let t=0,i=this.data.datasets.length;t<i;++t)this._updateDataset(t,isFunction(e)?e({datasetIndex:t}):e);this.notifyPlugins("afterDatasetsUpdate",{mode:e})}}_updateDataset(e,t){const i=this.getDatasetMeta(e),r={meta:i,index:e,mode:t,cancelable:!0};!1!==this.notifyPlugins("beforeDatasetUpdate",r)&&(i.controller._update(t),r.cancelable=!1,this.notifyPlugins("afterDatasetUpdate",r))}render(){!1!==this.notifyPlugins("beforeRender",{cancelable:!0})&&(animator.has(this)?this.attached&&!animator.running(this)&&animator.start(this):(this.draw(),onAnimationsComplete({chart:this})))}draw(){let e;if(this._resizeBeforeDraw){const{width:e,height:t}=this._resizeBeforeDraw;this._resizeBeforeDraw=null,this._resize(e,t)}if(this.clear(),this.width<=0||this.height<=0)return;if(!1===this.notifyPlugins("beforeDraw",{cancelable:!0}))return;const t=this._layers;for(e=0;e<t.length&&t[e].z<=0;++e)t[e].draw(this.chartArea);for(this._drawDatasets();e<t.length;++e)t[e].draw(this.chartArea);this.notifyPlugins("afterDraw")}_getSortedDatasetMetas(e){const t=this._sortedMetasets,i=[];let r,n;for(r=0,n=t.length;r<n;++r){const n=t[r];e&&!n.visible||i.push(n)}return i}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(!0)}_drawDatasets(){if(!1===this.notifyPlugins("beforeDatasetsDraw",{cancelable:!0}))return;const e=this.getSortedVisibleDatasetMetas();for(let t=e.length-1;t>=0;--t)this._drawDataset(e[t]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(e){const t=this.ctx,i={meta:e,index:e.index,cancelable:!0},r=getDatasetClipArea(this,e);!1!==this.notifyPlugins("beforeDatasetDraw",i)&&(r&&clipArea(t,r),e.controller.draw(),r&&unclipArea(t),i.cancelable=!1,this.notifyPlugins("afterDatasetDraw",i))}isPointInArea(e){return _isPointInArea(e,this.chartArea,this._minPadding)}getElementsAtEventForMode(e,t,i,r){const n=Interaction.modes[t];return"function"==typeof n?n(this,e,i,r):[]}getDatasetMeta(e){const t=this.data.datasets[e],i=this._metasets;let r=i.filter(e=>e&&e._dataset===t).pop();return r||(r={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:t&&t.order||0,index:e,_dataset:t,_parsed:[],_sorted:!1},i.push(r)),r}getContext(){return this.$context||(this.$context=createContext(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(e){const t=this.data.datasets[e];if(!t)return!1;const i=this.getDatasetMeta(e);return"boolean"==typeof i.hidden?!i.hidden:!t.hidden}setDatasetVisibility(e,t){this.getDatasetMeta(e).hidden=!t}toggleDataVisibility(e){this._hiddenIndices[e]=!this._hiddenIndices[e]}getDataVisibility(e){return!this._hiddenIndices[e]}_updateVisibility(e,t,i){const r=i?"show":"hide",n=this.getDatasetMeta(e),a=n.controller._resolveAnimations(void 0,r);defined(t)?(n.data[t].hidden=!i,this.update()):(this.setDatasetVisibility(e,i),a.update(n,{visible:i}),this.update(t=>t.datasetIndex===e?r:void 0))}hide(e,t){this._updateVisibility(e,t,!1)}show(e,t){this._updateVisibility(e,t,!0)}_destroyDatasetMeta(e){const t=this._metasets[e];t&&t.controller&&t.controller._destroy(),delete this._metasets[e]}_stop(){let e,t;for(this.stop(),animator.remove(this),e=0,t=this.data.datasets.length;e<t;++e)this._destroyDatasetMeta(e)}destroy(){this.notifyPlugins("beforeDestroy");const{canvas:e,ctx:t}=this;this._stop(),this.config.clearCache(),e&&(this.unbindEvents(),clearCanvas(e,t),this.platform.releaseContext(t),this.canvas=null,this.ctx=null),delete instances[this.id],this.notifyPlugins("afterDestroy")}toBase64Image(...e){return this.canvas.toDataURL(...e)}bindEvents(){this.bindUserEvents(),this.options.responsive?this.bindResponsiveEvents():this.attached=!0}bindUserEvents(){const e=this._listeners,t=this.platform,i=(i,r)=>{t.addEventListener(this,i,r),e[i]=r},r=(e,t,i)=>{e.offsetX=t,e.offsetY=i,this._eventHandler(e)};each(this.options.events,e=>i(e,r))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const e=this._responsiveListeners,t=this.platform,i=(i,r)=>{t.addEventListener(this,i,r),e[i]=r},r=(i,r)=>{e[i]&&(t.removeEventListener(this,i,r),delete e[i])},n=(e,t)=>{this.canvas&&this.resize(e,t)};let a;const s=()=>{r("attach",s),this.attached=!0,this.resize(),i("resize",n),i("detach",a)};a=()=>{this.attached=!1,r("resize",n),this._stop(),this._resize(0,0),i("attach",s)},t.isAttached(this.canvas)?s():a()}unbindEvents(){each(this._listeners,(e,t)=>{this.platform.removeEventListener(this,t,e)}),this._listeners={},each(this._responsiveListeners,(e,t)=>{this.platform.removeEventListener(this,t,e)}),this._responsiveListeners=void 0}updateHoverStyle(e,t,i){const r=i?"set":"remove";let n,a,s,o;for("dataset"===t&&(n=this.getDatasetMeta(e[0].datasetIndex),n.controller["_"+r+"DatasetHoverStyle"]()),s=0,o=e.length;s<o;++s){a=e[s];const t=a&&this.getDatasetMeta(a.datasetIndex).controller;t&&t[r+"HoverStyle"](a.element,a.datasetIndex,a.index)}}getActiveElements(){return this._active||[]}setActiveElements(e){const t=this._active||[],i=e.map(({datasetIndex:e,index:t})=>{const i=this.getDatasetMeta(e);if(!i)throw new Error("No dataset found at index "+e);return{datasetIndex:e,element:i.data[t],index:t}});!_elementsEqual(i,t)&&(this._active=i,this._lastEvent=null,this._updateHoverStyles(i,t))}notifyPlugins(e,t,i){return this._plugins.notify(this,e,t,i)}isPluginEnabled(e){return 1===this._plugins._cache.filter(t=>t.plugin.id===e).length}_updateHoverStyles(e,t,i){const r=this.options.hover,n=(e,t)=>e.filter(e=>!t.some(t=>e.datasetIndex===t.datasetIndex&&e.index===t.index)),a=n(t,e),s=i?e:n(e,t);a.length&&this.updateHoverStyle(a,r.mode,!1),s.length&&r.mode&&this.updateHoverStyle(s,r.mode,!0)}_eventHandler(e,t){const i={event:e,replay:t,cancelable:!0,inChartArea:this.isPointInArea(e)},r=t=>(t.options.events||this.options.events).includes(e.native.type);if(!1===this.notifyPlugins("beforeEvent",i,r))return;const n=this._handleEvent(e,t,i.inChartArea);return i.cancelable=!1,this.notifyPlugins("afterEvent",i,r),(n||i.changed)&&this.render(),this}_handleEvent(e,t,i){const{_active:r=[],options:n}=this,a=t,s=this._getActiveElements(e,r,i,a),o=_isClickEvent(e),l=determineLastEvent(e,this._lastEvent,i,o);i&&(this._lastEvent=null,callback(n.onHover,[e,s,this],this),o&&callback(n.onClick,[e,s,this],this));const c=!_elementsEqual(s,r);return(c||t)&&(this._active=s,this._updateHoverStyles(s,r,t)),this._lastEvent=l,c}_getActiveElements(e,t,i,r){if("mouseout"===e.type)return[];if(!i)return t;const n=this.options.hover;return this.getElementsAtEventForMode(e,n.mode,n,r)}}function invalidatePlugins(){return each(Chart.instances,e=>e._plugins.invalidate())}function clipSelf(e,t,i){const{startAngle:r,x:n,y:a,outerRadius:s,innerRadius:o,options:l}=t,{borderWidth:c,borderJoinStyle:h}=l,p=Math.min(c/s,_normalizeAngle(r-i));if(e.beginPath(),e.arc(n,a,s-c/2,r+p/2,i-p/2),o>0){const t=Math.min(c/o,_normalizeAngle(r-i));e.arc(n,a,o+c/2,i-t/2,r+t/2,!0)}else{const t=Math.min(c/2,s*_normalizeAngle(r-i));if("round"===h)e.arc(n,a,t,i-PI/2,r+PI/2,!0);else if("bevel"===h){const s=2*t*t,o=-s*Math.cos(i+PI/2)+n,l=-s*Math.sin(i+PI/2)+a,c=s*Math.cos(r+PI/2)+n,h=s*Math.sin(r+PI/2)+a;e.lineTo(o,l),e.lineTo(c,h)}}e.closePath(),e.moveTo(0,0),e.rect(0,0,e.canvas.width,e.canvas.height),e.clip("evenodd")}function clipArc(e,t,i){const{startAngle:r,pixelMargin:n,x:a,y:s,outerRadius:o,innerRadius:l}=t;let c=n/o;e.beginPath(),e.arc(a,s,o,r-c,i+c),l>n?(c=n/l,e.arc(a,s,l,i+c,r-c,!0)):e.arc(a,s,n,i+HALF_PI,r-HALF_PI),e.closePath(),e.clip()}function toRadiusCorners(e){return _readValueToProps(e,["outerStart","outerEnd","innerStart","innerEnd"])}function parseBorderRadius$1(e,t,i,r){const n=toRadiusCorners(e.options.borderRadius),a=(i-t)/2,s=Math.min(a,r*t/2),o=e=>{const t=(i-Math.min(a,e))*r/2;return _limitValue(e,0,Math.min(a,t))};return{outerStart:o(n.outerStart),outerEnd:o(n.outerEnd),innerStart:_limitValue(n.innerStart,0,s),innerEnd:_limitValue(n.innerEnd,0,s)}}function rThetaToXY(e,t,i,r){return{x:i+e*Math.cos(t),y:r+e*Math.sin(t)}}function pathArc(e,t,i,r,n,a){const{x:s,y:o,startAngle:l,pixelMargin:c,innerRadius:h}=t,p=Math.max(t.outerRadius+r+i-c,0),u=h>0?h+r+i+c:0;let d=0;const f=n-l;if(r){const e=((h>0?h-r:0)+(p>0?p-r:0))/2;d=(f-(0!==e?f*e/(e+r):f))/2}const m=(f-Math.max(.001,f*p-i/PI)/p)/2,g=l+m+d,v=n-m-d,{outerStart:y,outerEnd:b,innerStart:x,innerEnd:_}=parseBorderRadius$1(t,u,p,v-g),S=p-y,w=p-b,C=g+y/S,P=v-b/w,E=u+x,k=u+_,$=g+x/E,A=v-_/k;if(e.beginPath(),a){const t=(C+P)/2;if(e.arc(s,o,p,C,t),e.arc(s,o,p,t,P),b>0){const t=rThetaToXY(w,P,s,o);e.arc(t.x,t.y,b,P,v+HALF_PI)}const i=rThetaToXY(k,v,s,o);if(e.lineTo(i.x,i.y),_>0){const t=rThetaToXY(k,A,s,o);e.arc(t.x,t.y,_,v+HALF_PI,A+Math.PI)}const r=(v-_/u+(g+x/u))/2;if(e.arc(s,o,u,v-_/u,r,!0),e.arc(s,o,u,r,g+x/u,!0),x>0){const t=rThetaToXY(E,$,s,o);e.arc(t.x,t.y,x,$+Math.PI,g-HALF_PI)}const n=rThetaToXY(S,g,s,o);if(e.lineTo(n.x,n.y),y>0){const t=rThetaToXY(S,C,s,o);e.arc(t.x,t.y,y,g-HALF_PI,C)}}else{e.moveTo(s,o);const t=Math.cos(C)*p+s,i=Math.sin(C)*p+o;e.lineTo(t,i);const r=Math.cos(P)*p+s,n=Math.sin(P)*p+o;e.lineTo(r,n)}e.closePath()}function drawArc(e,t,i,r,n){const{fullCircles:a,startAngle:s,circumference:o}=t;let l=t.endAngle;if(a){pathArc(e,t,i,r,l,n);for(let t=0;t<a;++t)e.fill();isNaN(o)||(l=s+(o%TAU||TAU))}return pathArc(e,t,i,r,l,n),e.fill(),l}function drawBorder(e,t,i,r,n){const{fullCircles:a,startAngle:s,circumference:o,options:l}=t,{borderWidth:c,borderJoinStyle:h,borderDash:p,borderDashOffset:u,borderRadius:d}=l,f="inner"===l.borderAlign;if(!c)return;e.setLineDash(p||[]),e.lineDashOffset=u,f?(e.lineWidth=2*c,e.lineJoin=h||"round"):(e.lineWidth=c,e.lineJoin=h||"bevel");let m=t.endAngle;if(a){pathArc(e,t,i,r,m,n);for(let t=0;t<a;++t)e.stroke();isNaN(o)||(m=s+(o%TAU||TAU))}f&&clipArc(e,t,m),l.selfJoin&&m-s>=PI&&0===d&&"miter"!==h&&clipSelf(e,t,m),a||(pathArc(e,t,i,r,m,n),e.stroke())}class ArcElement extends Element{static id="arc";static defaults={borderAlign:"center",borderColor:"#fff",borderDash:[],borderDashOffset:0,borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0,selfJoin:!1};static defaultRoutes={backgroundColor:"backgroundColor"};static descriptors={_scriptable:!0,_indexable:e=>"borderDash"!==e};circumference;endAngle;fullCircles;innerRadius;outerRadius;pixelMargin;startAngle;constructor(e){super(),this.options=void 0,this.circumference=void 0,this.startAngle=void 0,this.endAngle=void 0,this.innerRadius=void 0,this.outerRadius=void 0,this.pixelMargin=0,this.fullCircles=0,e&&Object.assign(this,e)}inRange(e,t,i){const r=this.getProps(["x","y"],i),{angle:n,distance:a}=getAngleFromPoint(r,{x:e,y:t}),{startAngle:s,endAngle:o,innerRadius:l,outerRadius:c,circumference:h}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],i),p=(this.options.spacing+this.options.borderWidth)/2,u=valueOrDefault(h,o-s),d=_angleBetween(n,s,o)&&s!==o,f=u>=TAU||d,m=_isBetween(a,l+p,c+p);return f&&m}getCenterPoint(e){const{x:t,y:i,startAngle:r,endAngle:n,innerRadius:a,outerRadius:s}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius"],e),{offset:o,spacing:l}=this.options,c=(r+n)/2,h=(a+s+l+o)/2;return{x:t+Math.cos(c)*h,y:i+Math.sin(c)*h}}tooltipPosition(e){return this.getCenterPoint(e)}draw(e){const{options:t,circumference:i}=this,r=(t.offset||0)/4,n=(t.spacing||0)/2,a=t.circular;if(this.pixelMargin="inner"===t.borderAlign?.33:0,this.fullCircles=i>TAU?Math.floor(i/TAU):0,0===i||this.innerRadius<0||this.outerRadius<0)return;e.save();const s=(this.startAngle+this.endAngle)/2;e.translate(Math.cos(s)*r,Math.sin(s)*r);const o=r*(1-Math.sin(Math.min(PI,i||0)));e.fillStyle=t.backgroundColor,e.strokeStyle=t.borderColor,drawArc(e,this,o,n,a),drawBorder(e,this,o,n,a),e.restore()}}function getBarBounds(e,t){const{x:i,y:r,base:n,width:a,height:s}=e.getProps(["x","y","base","width","height"],t);let o,l,c,h,p;return e.horizontal?(p=s/2,o=Math.min(i,n),l=Math.max(i,n),c=r-p,h=r+p):(p=a/2,o=i-p,l=i+p,c=Math.min(r,n),h=Math.max(r,n)),{left:o,top:c,right:l,bottom:h}}function skipOrLimit(e,t,i,r){return e?0:_limitValue(t,i,r)}function parseBorderWidth(e,t,i){const r=e.options.borderWidth,n=e.borderSkipped,a=toTRBL(r);return{t:skipOrLimit(n.top,a.top,0,i),r:skipOrLimit(n.right,a.right,0,t),b:skipOrLimit(n.bottom,a.bottom,0,i),l:skipOrLimit(n.left,a.left,0,t)}}function parseBorderRadius(e,t,i){const{enableBorderRadius:r}=e.getProps(["enableBorderRadius"]),n=e.options.borderRadius,a=toTRBLCorners(n),s=Math.min(t,i),o=e.borderSkipped,l=r||isObject$1(n);return{topLeft:skipOrLimit(!l||o.top||o.left,a.topLeft,0,s),topRight:skipOrLimit(!l||o.top||o.right,a.topRight,0,s),bottomLeft:skipOrLimit(!l||o.bottom||o.left,a.bottomLeft,0,s),bottomRight:skipOrLimit(!l||o.bottom||o.right,a.bottomRight,0,s)}}function boundingRects(e){const t=getBarBounds(e),i=t.right-t.left,r=t.bottom-t.top,n=parseBorderWidth(e,i/2,r/2),a=parseBorderRadius(e,i/2,r/2);return{outer:{x:t.left,y:t.top,w:i,h:r,radius:a},inner:{x:t.left+n.l,y:t.top+n.t,w:i-n.l-n.r,h:r-n.t-n.b,radius:{topLeft:Math.max(0,a.topLeft-Math.max(n.t,n.l)),topRight:Math.max(0,a.topRight-Math.max(n.t,n.r)),bottomLeft:Math.max(0,a.bottomLeft-Math.max(n.b,n.l)),bottomRight:Math.max(0,a.bottomRight-Math.max(n.b,n.r))}}}}function inRange(e,t,i,r){const n=null===t,a=null===i,s=e&&!(n&&a)&&getBarBounds(e,r);return s&&(n||_isBetween(t,s.left,s.right))&&(a||_isBetween(i,s.top,s.bottom))}function hasRadius(e){return e.topLeft||e.topRight||e.bottomLeft||e.bottomRight}function addNormalRectPath(e,t){e.rect(t.x,t.y,t.w,t.h)}function inflateRect(e,t,i={}){const r=e.x!==i.x?-t:0,n=e.y!==i.y?-t:0,a=(e.x+e.w!==i.x+i.w?t:0)-r,s=(e.y+e.h!==i.y+i.h?t:0)-n;return{x:e.x+r,y:e.y+n,w:e.w+a,h:e.h+s,radius:e.radius}}class BarElement extends Element{static id="bar";static defaults={borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};constructor(e){super(),this.options=void 0,this.horizontal=void 0,this.base=void 0,this.width=void 0,this.height=void 0,this.inflateAmount=void 0,e&&Object.assign(this,e)}draw(e){const{inflateAmount:t,options:{borderColor:i,backgroundColor:r}}=this,{inner:n,outer:a}=boundingRects(this),s=hasRadius(a.radius)?addRoundedRectPath:addNormalRectPath;e.save(),a.w===n.w&&a.h===n.h||(e.beginPath(),s(e,inflateRect(a,t,n)),e.clip(),s(e,inflateRect(n,-t,a)),e.fillStyle=i,e.fill("evenodd")),e.beginPath(),s(e,inflateRect(n,t)),e.fillStyle=r,e.fill(),e.restore()}inRange(e,t,i){return inRange(this,e,t,i)}inXRange(e,t){return inRange(this,e,null,t)}inYRange(e,t){return inRange(this,null,e,t)}getCenterPoint(e){const{x:t,y:i,base:r,horizontal:n}=this.getProps(["x","y","base","horizontal"],e);return{x:n?(t+r)/2:t,y:n?i:(i+r)/2}}getRange(e){return"x"===e?this.width/2:this.height/2}}const getBoxSize=(e,t)=>{let{boxHeight:i=t,boxWidth:r=t}=e;return e.usePointStyle&&(i=Math.min(i,t),r=e.pointStyleWidth||Math.min(r,t)),{boxWidth:r,boxHeight:i,itemHeight:Math.max(t,i)}},itemsEqual=(e,t)=>null!==e&&null!==t&&e.datasetIndex===t.datasetIndex&&e.index===t.index;class Legend extends Element{constructor(e){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=e.chart,this.options=e.options,this.ctx=e.ctx,this.legendItems=void 0,this.columnSizes=void 0,this.lineWidths=void 0,this.maxHeight=void 0,this.maxWidth=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.height=void 0,this.width=void 0,this._margins=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(e,t,i){this.maxWidth=e,this.maxHeight=t,this._margins=i,this.setDimensions(),this.buildLabels(),this.fit()}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=this._margins.left,this.right=this.width):(this.height=this.maxHeight,this.top=this._margins.top,this.bottom=this.height)}buildLabels(){const e=this.options.labels||{};let t=callback(e.generateLabels,[this.chart],this)||[];e.filter&&(t=t.filter(t=>e.filter(t,this.chart.data))),e.sort&&(t=t.sort((t,i)=>e.sort(t,i,this.chart.data))),this.options.reverse&&t.reverse(),this.legendItems=t}fit(){const{options:e,ctx:t}=this;if(!e.display)return void(this.width=this.height=0);const i=e.labels,r=toFont(i.font),n=r.size,a=this._computeTitleHeight(),{boxWidth:s,itemHeight:o}=getBoxSize(i,n);let l,c;t.font=r.string,this.isHorizontal()?(l=this.maxWidth,c=this._fitRows(a,n,s,o)+10):(c=this.maxHeight,l=this._fitCols(a,r,s,o)+10),this.width=Math.min(l,e.maxWidth||this.maxWidth),this.height=Math.min(c,e.maxHeight||this.maxHeight)}_fitRows(e,t,i,r){const{ctx:n,maxWidth:a,options:{labels:{padding:s}}}=this,o=this.legendHitBoxes=[],l=this.lineWidths=[0],c=r+s;let h=e;n.textAlign="left",n.textBaseline="middle";let p=-1,u=-c;return this.legendItems.forEach((e,d)=>{const f=i+t/2+n.measureText(e.text).width;(0===d||l[l.length-1]+f+2*s>a)&&(h+=c,l[l.length-(d>0?0:1)]=0,u+=c,p++),o[d]={left:0,top:u,row:p,width:f,height:r},l[l.length-1]+=f+s}),h}_fitCols(e,t,i,r){const{ctx:n,maxHeight:a,options:{labels:{padding:s}}}=this,o=this.legendHitBoxes=[],l=this.columnSizes=[],c=a-e;let h=s,p=0,u=0,d=0,f=0;return this.legendItems.forEach((e,a)=>{const{itemWidth:m,itemHeight:g}=calculateItemSize(i,t,n,e,r);a>0&&u+g+2*s>c&&(h+=p+s,l.push({width:p,height:u}),d+=p+s,f++,p=u=0),o[a]={left:d,top:u,col:f,width:m,height:g},p=Math.max(p,m),u+=g+s}),h+=p,l.push({width:p,height:u}),h}adjustHitBoxes(){if(!this.options.display)return;const e=this._computeTitleHeight(),{legendHitBoxes:t,options:{align:i,labels:{padding:r},rtl:n}}=this,a=getRtlAdapter(n,this.left,this.width);if(this.isHorizontal()){let n=0,s=_alignStartEnd(i,this.left+r,this.right-this.lineWidths[n]);for(const o of t)n!==o.row&&(n=o.row,s=_alignStartEnd(i,this.left+r,this.right-this.lineWidths[n])),o.top+=this.top+e+r,o.left=a.leftForLtr(a.x(s),o.width),s+=o.width+r}else{let n=0,s=_alignStartEnd(i,this.top+e+r,this.bottom-this.columnSizes[n].height);for(const o of t)o.col!==n&&(n=o.col,s=_alignStartEnd(i,this.top+e+r,this.bottom-this.columnSizes[n].height)),o.top=s,o.left+=this.left+r,o.left=a.leftForLtr(a.x(o.left),o.width),s+=o.height+r}}isHorizontal(){return"top"===this.options.position||"bottom"===this.options.position}draw(){if(this.options.display){const e=this.ctx;clipArea(e,this),this._draw(),unclipArea(e)}}_draw(){const{options:e,columnSizes:t,lineWidths:i,ctx:r}=this,{align:n,labels:a}=e,s=defaults.color,o=getRtlAdapter(e.rtl,this.left,this.width),l=toFont(a.font),{padding:c}=a,h=l.size,p=h/2;let u;this.drawTitle(),r.textAlign=o.textAlign("left"),r.textBaseline="middle",r.lineWidth=.5,r.font=l.string;const{boxWidth:d,boxHeight:f,itemHeight:m}=getBoxSize(a,h),g=this.isHorizontal(),v=this._computeTitleHeight();u=g?{x:_alignStartEnd(n,this.left+c,this.right-i[0]),y:this.top+c+v,line:0}:{x:this.left+c,y:_alignStartEnd(n,this.top+v+c,this.bottom-t[0].height),line:0},overrideTextDirection(this.ctx,e.textDirection);const y=m+c;this.legendItems.forEach((b,x)=>{r.strokeStyle=b.fontColor,r.fillStyle=b.fontColor;const _=r.measureText(b.text).width,S=o.textAlign(b.textAlign||(b.textAlign=a.textAlign)),w=d+p+_;let C=u.x,P=u.y;o.setWidth(this.width),g?x>0&&C+w+c>this.right&&(P=u.y+=y,u.line++,C=u.x=_alignStartEnd(n,this.left+c,this.right-i[u.line])):x>0&&P+y>this.bottom&&(C=u.x=C+t[u.line].width+c,u.line++,P=u.y=_alignStartEnd(n,this.top+v+c,this.bottom-t[u.line].height));if(function(e,t,i){if(isNaN(d)||d<=0||isNaN(f)||f<0)return;r.save();const n=valueOrDefault(i.lineWidth,1);if(r.fillStyle=valueOrDefault(i.fillStyle,s),r.lineCap=valueOrDefault(i.lineCap,"butt"),r.lineDashOffset=valueOrDefault(i.lineDashOffset,0),r.lineJoin=valueOrDefault(i.lineJoin,"miter"),r.lineWidth=n,r.strokeStyle=valueOrDefault(i.strokeStyle,s),r.setLineDash(valueOrDefault(i.lineDash,[])),a.usePointStyle){const s={radius:f*Math.SQRT2/2,pointStyle:i.pointStyle,rotation:i.rotation,borderWidth:n},l=o.xPlus(e,d/2);drawPointLegend(r,s,l,t+p,a.pointStyleWidth&&d)}else{const a=t+Math.max((h-f)/2,0),s=o.leftForLtr(e,d),l=toTRBLCorners(i.borderRadius);r.beginPath(),Object.values(l).some(e=>0!==e)?addRoundedRectPath(r,{x:s,y:a,w:d,h:f,radius:l}):r.rect(s,a,d,f),r.fill(),0!==n&&r.stroke()}r.restore()}(o.x(C),P,b),C=_textX(S,C+d+p,g?C+w:this.right,e.rtl),function(e,t,i){renderText(r,i.text,e,t+m/2,l,{strikethrough:i.hidden,textAlign:o.textAlign(i.textAlign)})}(o.x(C),P,b),g)u.x+=w+c;else if("string"!=typeof b.text){const e=l.lineHeight;u.y+=calculateLegendItemHeight(b,e)+c}else u.y+=y}),restoreTextDirection(this.ctx,e.textDirection)}drawTitle(){const e=this.options,t=e.title,i=toFont(t.font),r=toPadding(t.padding);if(!t.display)return;const n=getRtlAdapter(e.rtl,this.left,this.width),a=this.ctx,s=t.position,o=i.size/2,l=r.top+o;let c,h=this.left,p=this.width;if(this.isHorizontal())p=Math.max(...this.lineWidths),c=this.top+l,h=_alignStartEnd(e.align,h,this.right-p);else{const t=this.columnSizes.reduce((e,t)=>Math.max(e,t.height),0);c=l+_alignStartEnd(e.align,this.top,this.bottom-t-e.labels.padding-this._computeTitleHeight())}const u=_alignStartEnd(s,h,h+p);a.textAlign=n.textAlign(_toLeftRightCenter(s)),a.textBaseline="middle",a.strokeStyle=t.color,a.fillStyle=t.color,a.font=i.string,renderText(a,t.text,u,c,i)}_computeTitleHeight(){const e=this.options.title,t=toFont(e.font),i=toPadding(e.padding);return e.display?t.lineHeight+i.height:0}_getLegendItemAt(e,t){let i,r,n;if(_isBetween(e,this.left,this.right)&&_isBetween(t,this.top,this.bottom))for(n=this.legendHitBoxes,i=0;i<n.length;++i)if(r=n[i],_isBetween(e,r.left,r.left+r.width)&&_isBetween(t,r.top,r.top+r.height))return this.legendItems[i];return null}handleEvent(e){const t=this.options;if(!isListened(e.type,t))return;const i=this._getLegendItemAt(e.x,e.y);if("mousemove"===e.type||"mouseout"===e.type){const r=this._hoveredItem,n=itemsEqual(r,i);r&&!n&&callback(t.onLeave,[e,r,this],this),this._hoveredItem=i,i&&!n&&callback(t.onHover,[e,i,this],this)}else i&&callback(t.onClick,[e,i,this],this)}}function calculateItemSize(e,t,i,r,n){return{itemWidth:calculateItemWidth(r,e,t,i),itemHeight:calculateItemHeight(n,r,t.lineHeight)}}function calculateItemWidth(e,t,i,r){let n=e.text;return n&&"string"!=typeof n&&(n=n.reduce((e,t)=>e.length>t.length?e:t)),t+i.size/2+r.measureText(n).width}function calculateItemHeight(e,t,i){let r=e;return"string"!=typeof t.text&&(r=calculateLegendItemHeight(t,i)),r}function calculateLegendItemHeight(e,t){return t*(e.text?e.text.length:0)}function isListened(e,t){return!("mousemove"!==e&&"mouseout"!==e||!t.onHover&&!t.onLeave)||!(!t.onClick||"click"!==e&&"mouseup"!==e)}var plugin_legend={id:"legend",_element:Legend,start(e,t,i){const r=e.legend=new Legend({ctx:e.ctx,options:i,chart:e});layouts.configure(e,r,i),layouts.addBox(e,r)},stop(e){layouts.removeBox(e,e.legend),delete e.legend},beforeUpdate(e,t,i){const r=e.legend;layouts.configure(e,r,i),r.options=i},afterUpdate(e){const t=e.legend;t.buildLabels(),t.adjustHitBoxes()},afterEvent(e,t){t.replay||e.legend.handleEvent(t.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(e,t,i){const r=t.datasetIndex,n=i.chart;n.isDatasetVisible(r)?(n.hide(r),t.hidden=!0):(n.show(r),t.hidden=!1)},onHover:null,onLeave:null,labels:{color:e=>e.chart.options.color,boxWidth:40,padding:10,generateLabels(e){const t=e.data.datasets,{labels:{usePointStyle:i,pointStyle:r,textAlign:n,color:a,useBorderRadius:s,borderRadius:o}}=e.legend.options;return e._getSortedDatasetMetas().map(e=>{const l=e.controller.getStyle(i?0:void 0),c=toPadding(l.borderWidth);return{text:t[e.index].label,fillStyle:l.backgroundColor,fontColor:a,hidden:!e.visible,lineCap:l.borderCapStyle,lineDash:l.borderDash,lineDashOffset:l.borderDashOffset,lineJoin:l.borderJoinStyle,lineWidth:(c.width+c.height)/4,strokeStyle:l.borderColor,pointStyle:r||l.pointStyle,rotation:l.rotation,textAlign:n||l.textAlign,borderRadius:s&&(o||l.borderRadius),datasetIndex:e.index}},this)}},title:{color:e=>e.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:e=>!e.startsWith("on"),labels:{_scriptable:e=>!["generateLabels","filter","sort"].includes(e)}}};const positioners={average(e){if(!e.length)return!1;let t,i,r=new Set,n=0,a=0;for(t=0,i=e.length;t<i;++t){const i=e[t].element;if(i&&i.hasValue()){const e=i.tooltipPosition();r.add(e.x),n+=e.y,++a}}if(0===a||0===r.size)return!1;return{x:[...r].reduce((e,t)=>e+t)/r.size,y:n/a}},nearest(e,t){if(!e.length)return!1;let i,r,n,a=t.x,s=t.y,o=Number.POSITIVE_INFINITY;for(i=0,r=e.length;i<r;++i){const r=e[i].element;if(r&&r.hasValue()){const e=distanceBetweenPoints(t,r.getCenterPoint());e<o&&(o=e,n=r)}}if(n){const e=n.tooltipPosition();a=e.x,s=e.y}return{x:a,y:s}}};function pushOrConcat(e,t){return t&&(isArray(t)?Array.prototype.push.apply(e,t):e.push(t)),e}function splitNewlines(e){return("string"==typeof e||e instanceof String)&&e.indexOf("\n")>-1?e.split("\n"):e}function createTooltipItem(e,t){const{element:i,datasetIndex:r,index:n}=t,a=e.getDatasetMeta(r).controller,{label:s,value:o}=a.getLabelAndValue(n);return{chart:e,label:s,parsed:a.getParsed(n),raw:e.data.datasets[r].data[n],formattedValue:o,dataset:a.getDataset(),dataIndex:n,datasetIndex:r,element:i}}function getTooltipSize(e,t){const i=e.chart.ctx,{body:r,footer:n,title:a}=e,{boxWidth:s,boxHeight:o}=t,l=toFont(t.bodyFont),c=toFont(t.titleFont),h=toFont(t.footerFont),p=a.length,u=n.length,d=r.length,f=toPadding(t.padding);let m=f.height,g=0,v=r.reduce((e,t)=>e+t.before.length+t.lines.length+t.after.length,0);if(v+=e.beforeBody.length+e.afterBody.length,p&&(m+=p*c.lineHeight+(p-1)*t.titleSpacing+t.titleMarginBottom),v){m+=d*(t.displayColors?Math.max(o,l.lineHeight):l.lineHeight)+(v-d)*l.lineHeight+(v-1)*t.bodySpacing}u&&(m+=t.footerMarginTop+u*h.lineHeight+(u-1)*t.footerSpacing);let y=0;const b=function(e){g=Math.max(g,i.measureText(e).width+y)};return i.save(),i.font=c.string,each(e.title,b),i.font=l.string,each(e.beforeBody.concat(e.afterBody),b),y=t.displayColors?s+2+t.boxPadding:0,each(r,e=>{each(e.before,b),each(e.lines,b),each(e.after,b)}),y=0,i.font=h.string,each(e.footer,b),i.restore(),g+=f.width,{width:g,height:m}}function determineYAlign(e,t){const{y:i,height:r}=t;return i<r/2?"top":i>e.height-r/2?"bottom":"center"}function doesNotFitWithAlign(e,t,i,r){const{x:n,width:a}=r,s=i.caretSize+i.caretPadding;return"left"===e&&n+a+s>t.width||("right"===e&&n-a-s<0||void 0)}function determineXAlign(e,t,i,r){const{x:n,width:a}=i,{width:s,chartArea:{left:o,right:l}}=e;let c="center";return"center"===r?c=n<=(o+l)/2?"left":"right":n<=a/2?c="left":n>=s-a/2&&(c="right"),doesNotFitWithAlign(c,e,t,i)&&(c="center"),c}function determineAlignment(e,t,i){const r=i.yAlign||t.yAlign||determineYAlign(e,i);return{xAlign:i.xAlign||t.xAlign||determineXAlign(e,t,i,r),yAlign:r}}function alignX(e,t){let{x:i,width:r}=e;return"right"===t?i-=r:"center"===t&&(i-=r/2),i}function alignY(e,t,i){let{y:r,height:n}=e;return"top"===t?r+=i:r-="bottom"===t?n+i:n/2,r}function getBackgroundPoint(e,t,i,r){const{caretSize:n,caretPadding:a,cornerRadius:s}=e,{xAlign:o,yAlign:l}=i,c=n+a,{topLeft:h,topRight:p,bottomLeft:u,bottomRight:d}=toTRBLCorners(s);let f=alignX(t,o);const m=alignY(t,l,c);return"center"===l?"left"===o?f+=c:"right"===o&&(f-=c):"left"===o?f-=Math.max(h,u)+n:"right"===o&&(f+=Math.max(p,d)+n),{x:_limitValue(f,0,r.width-t.width),y:_limitValue(m,0,r.height-t.height)}}function getAlignedX(e,t,i){const r=toPadding(i.padding);return"center"===t?e.x+e.width/2:"right"===t?e.x+e.width-r.right:e.x+r.left}function getBeforeAfterBodyLines(e){return pushOrConcat([],splitNewlines(e))}function createTooltipContext(e,t,i){return createContext(e,{tooltip:t,tooltipItems:i,type:"tooltip"})}function overrideCallbacks(e,t){const i=t&&t.dataset&&t.dataset.tooltip&&t.dataset.tooltip.callbacks;return i?e.override(i):e}const defaultCallbacks={beforeTitle:noop$1,title(e){if(e.length>0){const t=e[0],i=t.chart.data.labels,r=i?i.length:0;if(this&&this.options&&"dataset"===this.options.mode)return t.dataset.label||"";if(t.label)return t.label;if(r>0&&t.dataIndex<r)return i[t.dataIndex]}return""},afterTitle:noop$1,beforeBody:noop$1,beforeLabel:noop$1,label(e){if(this&&this.options&&"dataset"===this.options.mode)return e.label+": "+e.formattedValue||e.formattedValue;let t=e.dataset.label||"";t&&(t+=": ");const i=e.formattedValue;return isNullOrUndef(i)||(t+=i),t},labelColor(e){const t=e.chart.getDatasetMeta(e.datasetIndex).controller.getStyle(e.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(e){const t=e.chart.getDatasetMeta(e.datasetIndex).controller.getStyle(e.dataIndex);return{pointStyle:t.pointStyle,rotation:t.rotation}},afterLabel:noop$1,afterBody:noop$1,beforeFooter:noop$1,footer:noop$1,afterFooter:noop$1};function invokeCallbackWithFallback(e,t,i,r){const n=e[t].call(i,r);return void 0===n?defaultCallbacks[t].call(i,r):n}class Tooltip extends Element{static positioners=positioners;constructor(e){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=e.chart,this.options=e.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(e){this.options=e,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const e=this._cachedAnimations;if(e)return e;const t=this.chart,i=this.options.setContext(this.getContext()),r=i.enabled&&t.options.animation&&i.animations,n=new Animations(this.chart,r);return r._cacheable&&(this._cachedAnimations=Object.freeze(n)),n}getContext(){return this.$context||(this.$context=createTooltipContext(this.chart.getContext(),this,this._tooltipItems))}getTitle(e,t){const{callbacks:i}=t,r=invokeCallbackWithFallback(i,"beforeTitle",this,e),n=invokeCallbackWithFallback(i,"title",this,e),a=invokeCallbackWithFallback(i,"afterTitle",this,e);let s=[];return s=pushOrConcat(s,splitNewlines(r)),s=pushOrConcat(s,splitNewlines(n)),s=pushOrConcat(s,splitNewlines(a)),s}getBeforeBody(e,t){return getBeforeAfterBodyLines(invokeCallbackWithFallback(t.callbacks,"beforeBody",this,e))}getBody(e,t){const{callbacks:i}=t,r=[];return each(e,e=>{const t={before:[],lines:[],after:[]},n=overrideCallbacks(i,e);pushOrConcat(t.before,splitNewlines(invokeCallbackWithFallback(n,"beforeLabel",this,e))),pushOrConcat(t.lines,invokeCallbackWithFallback(n,"label",this,e)),pushOrConcat(t.after,splitNewlines(invokeCallbackWithFallback(n,"afterLabel",this,e))),r.push(t)}),r}getAfterBody(e,t){return getBeforeAfterBodyLines(invokeCallbackWithFallback(t.callbacks,"afterBody",this,e))}getFooter(e,t){const{callbacks:i}=t,r=invokeCallbackWithFallback(i,"beforeFooter",this,e),n=invokeCallbackWithFallback(i,"footer",this,e),a=invokeCallbackWithFallback(i,"afterFooter",this,e);let s=[];return s=pushOrConcat(s,splitNewlines(r)),s=pushOrConcat(s,splitNewlines(n)),s=pushOrConcat(s,splitNewlines(a)),s}_createItems(e){const t=this._active,i=this.chart.data,r=[],n=[],a=[];let s,o,l=[];for(s=0,o=t.length;s<o;++s)l.push(createTooltipItem(this.chart,t[s]));return e.filter&&(l=l.filter((t,r,n)=>e.filter(t,r,n,i))),e.itemSort&&(l=l.sort((t,r)=>e.itemSort(t,r,i))),each(l,t=>{const i=overrideCallbacks(e.callbacks,t);r.push(invokeCallbackWithFallback(i,"labelColor",this,t)),n.push(invokeCallbackWithFallback(i,"labelPointStyle",this,t)),a.push(invokeCallbackWithFallback(i,"labelTextColor",this,t))}),this.labelColors=r,this.labelPointStyles=n,this.labelTextColors=a,this.dataPoints=l,l}update(e,t){const i=this.options.setContext(this.getContext()),r=this._active;let n,a=[];if(r.length){const e=positioners[i.position].call(this,r,this._eventPosition);a=this._createItems(i),this.title=this.getTitle(a,i),this.beforeBody=this.getBeforeBody(a,i),this.body=this.getBody(a,i),this.afterBody=this.getAfterBody(a,i),this.footer=this.getFooter(a,i);const t=this._size=getTooltipSize(this,i),s=Object.assign({},e,t),o=determineAlignment(this.chart,i,s),l=getBackgroundPoint(i,s,o,this.chart);this.xAlign=o.xAlign,this.yAlign=o.yAlign,n={opacity:1,x:l.x,y:l.y,width:t.width,height:t.height,caretX:e.x,caretY:e.y}}else 0!==this.opacity&&(n={opacity:0});this._tooltipItems=a,this.$context=void 0,n&&this._resolveAnimations().update(this,n),e&&i.external&&i.external.call(this,{chart:this.chart,tooltip:this,replay:t})}drawCaret(e,t,i,r){const n=this.getCaretPosition(e,i,r);t.lineTo(n.x1,n.y1),t.lineTo(n.x2,n.y2),t.lineTo(n.x3,n.y3)}getCaretPosition(e,t,i){const{xAlign:r,yAlign:n}=this,{caretSize:a,cornerRadius:s}=i,{topLeft:o,topRight:l,bottomLeft:c,bottomRight:h}=toTRBLCorners(s),{x:p,y:u}=e,{width:d,height:f}=t;let m,g,v,y,b,x;return"center"===n?(b=u+f/2,"left"===r?(m=p,g=m-a,y=b+a,x=b-a):(m=p+d,g=m+a,y=b-a,x=b+a),v=m):(g="left"===r?p+Math.max(o,c)+a:"right"===r?p+d-Math.max(l,h)-a:this.caretX,"top"===n?(y=u,b=y-a,m=g-a,v=g+a):(y=u+f,b=y+a,m=g+a,v=g-a),x=y),{x1:m,x2:g,x3:v,y1:y,y2:b,y3:x}}drawTitle(e,t,i){const r=this.title,n=r.length;let a,s,o;if(n){const l=getRtlAdapter(i.rtl,this.x,this.width);for(e.x=getAlignedX(this,i.titleAlign,i),t.textAlign=l.textAlign(i.titleAlign),t.textBaseline="middle",a=toFont(i.titleFont),s=i.titleSpacing,t.fillStyle=i.titleColor,t.font=a.string,o=0;o<n;++o)t.fillText(r[o],l.x(e.x),e.y+a.lineHeight/2),e.y+=a.lineHeight+s,o+1===n&&(e.y+=i.titleMarginBottom-s)}}_drawColorBox(e,t,i,r,n){const a=this.labelColors[i],s=this.labelPointStyles[i],{boxHeight:o,boxWidth:l}=n,c=toFont(n.bodyFont),h=getAlignedX(this,"left",n),p=r.x(h),u=o<c.lineHeight?(c.lineHeight-o)/2:0,d=t.y+u;if(n.usePointStyle){const t={radius:Math.min(l,o)/2,pointStyle:s.pointStyle,rotation:s.rotation,borderWidth:1},i=r.leftForLtr(p,l)+l/2,c=d+o/2;e.strokeStyle=n.multiKeyBackground,e.fillStyle=n.multiKeyBackground,drawPoint(e,t,i,c),e.strokeStyle=a.borderColor,e.fillStyle=a.backgroundColor,drawPoint(e,t,i,c)}else{e.lineWidth=isObject$1(a.borderWidth)?Math.max(...Object.values(a.borderWidth)):a.borderWidth||1,e.strokeStyle=a.borderColor,e.setLineDash(a.borderDash||[]),e.lineDashOffset=a.borderDashOffset||0;const t=r.leftForLtr(p,l),i=r.leftForLtr(r.xPlus(p,1),l-2),s=toTRBLCorners(a.borderRadius);Object.values(s).some(e=>0!==e)?(e.beginPath(),e.fillStyle=n.multiKeyBackground,addRoundedRectPath(e,{x:t,y:d,w:l,h:o,radius:s}),e.fill(),e.stroke(),e.fillStyle=a.backgroundColor,e.beginPath(),addRoundedRectPath(e,{x:i,y:d+1,w:l-2,h:o-2,radius:s}),e.fill()):(e.fillStyle=n.multiKeyBackground,e.fillRect(t,d,l,o),e.strokeRect(t,d,l,o),e.fillStyle=a.backgroundColor,e.fillRect(i,d+1,l-2,o-2))}e.fillStyle=this.labelTextColors[i]}drawBody(e,t,i){const{body:r}=this,{bodySpacing:n,bodyAlign:a,displayColors:s,boxHeight:o,boxWidth:l,boxPadding:c}=i,h=toFont(i.bodyFont);let p=h.lineHeight,u=0;const d=getRtlAdapter(i.rtl,this.x,this.width),f=function(i){t.fillText(i,d.x(e.x+u),e.y+p/2),e.y+=p+n},m=d.textAlign(a);let g,v,y,b,x,_,S;for(t.textAlign=a,t.textBaseline="middle",t.font=h.string,e.x=getAlignedX(this,m,i),t.fillStyle=i.bodyColor,each(this.beforeBody,f),u=s&&"right"!==m?"center"===a?l/2+c:l+2+c:0,b=0,_=r.length;b<_;++b){for(g=r[b],v=this.labelTextColors[b],t.fillStyle=v,each(g.before,f),y=g.lines,s&&y.length&&(this._drawColorBox(t,e,b,d,i),p=Math.max(h.lineHeight,o)),x=0,S=y.length;x<S;++x)f(y[x]),p=h.lineHeight;each(g.after,f)}u=0,p=h.lineHeight,each(this.afterBody,f),e.y-=n}drawFooter(e,t,i){const r=this.footer,n=r.length;let a,s;if(n){const o=getRtlAdapter(i.rtl,this.x,this.width);for(e.x=getAlignedX(this,i.footerAlign,i),e.y+=i.footerMarginTop,t.textAlign=o.textAlign(i.footerAlign),t.textBaseline="middle",a=toFont(i.footerFont),t.fillStyle=i.footerColor,t.font=a.string,s=0;s<n;++s)t.fillText(r[s],o.x(e.x),e.y+a.lineHeight/2),e.y+=a.lineHeight+i.footerSpacing}}drawBackground(e,t,i,r){const{xAlign:n,yAlign:a}=this,{x:s,y:o}=e,{width:l,height:c}=i,{topLeft:h,topRight:p,bottomLeft:u,bottomRight:d}=toTRBLCorners(r.cornerRadius);t.fillStyle=r.backgroundColor,t.strokeStyle=r.borderColor,t.lineWidth=r.borderWidth,t.beginPath(),t.moveTo(s+h,o),"top"===a&&this.drawCaret(e,t,i,r),t.lineTo(s+l-p,o),t.quadraticCurveTo(s+l,o,s+l,o+p),"center"===a&&"right"===n&&this.drawCaret(e,t,i,r),t.lineTo(s+l,o+c-d),t.quadraticCurveTo(s+l,o+c,s+l-d,o+c),"bottom"===a&&this.drawCaret(e,t,i,r),t.lineTo(s+u,o+c),t.quadraticCurveTo(s,o+c,s,o+c-u),"center"===a&&"left"===n&&this.drawCaret(e,t,i,r),t.lineTo(s,o+h),t.quadraticCurveTo(s,o,s+h,o),t.closePath(),t.fill(),r.borderWidth>0&&t.stroke()}_updateAnimationTarget(e){const t=this.chart,i=this.$animations,r=i&&i.x,n=i&&i.y;if(r||n){const i=positioners[e.position].call(this,this._active,this._eventPosition);if(!i)return;const a=this._size=getTooltipSize(this,e),s=Object.assign({},i,this._size),o=determineAlignment(t,e,s),l=getBackgroundPoint(e,s,o,t);r._to===l.x&&n._to===l.y||(this.xAlign=o.xAlign,this.yAlign=o.yAlign,this.width=a.width,this.height=a.height,this.caretX=i.x,this.caretY=i.y,this._resolveAnimations().update(this,l))}}_willRender(){return!!this.opacity}draw(e){const t=this.options.setContext(this.getContext());let i=this.opacity;if(!i)return;this._updateAnimationTarget(t);const r={width:this.width,height:this.height},n={x:this.x,y:this.y};i=Math.abs(i)<.001?0:i;const a=toPadding(t.padding),s=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;t.enabled&&s&&(e.save(),e.globalAlpha=i,this.drawBackground(n,e,r,t),overrideTextDirection(e,t.textDirection),n.y+=a.top,this.drawTitle(n,e,t),this.drawBody(n,e,t),this.drawFooter(n,e,t),restoreTextDirection(e,t.textDirection),e.restore())}getActiveElements(){return this._active||[]}setActiveElements(e,t){const i=this._active,r=e.map(({datasetIndex:e,index:t})=>{const i=this.chart.getDatasetMeta(e);if(!i)throw new Error("Cannot find a dataset at index "+e);return{datasetIndex:e,element:i.data[t],index:t}}),n=!_elementsEqual(i,r),a=this._positionChanged(r,t);(n||a)&&(this._active=r,this._eventPosition=t,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(e,t,i=!0){if(t&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const r=this.options,n=this._active||[],a=this._getActiveElements(e,n,t,i),s=this._positionChanged(a,e),o=t||!_elementsEqual(a,n)||s;return o&&(this._active=a,(r.enabled||r.external)&&(this._eventPosition={x:e.x,y:e.y},this.update(!0,t))),o}_getActiveElements(e,t,i,r){const n=this.options;if("mouseout"===e.type)return[];if(!r)return t.filter(e=>this.chart.data.datasets[e.datasetIndex]&&void 0!==this.chart.getDatasetMeta(e.datasetIndex).controller.getParsed(e.index));const a=this.chart.getElementsAtEventForMode(e,n.mode,n,i);return n.reverse&&a.reverse(),a}_positionChanged(e,t){const{caretX:i,caretY:r,options:n}=this,a=positioners[n.position].call(this,e,t);return!1!==a&&(i!==a.x||r!==a.y)}}var plugin_tooltip={id:"tooltip",_element:Tooltip,positioners:positioners,afterInit(e,t,i){i&&(e.tooltip=new Tooltip({chart:e,options:i}))},beforeUpdate(e,t,i){e.tooltip&&e.tooltip.initialize(i)},reset(e,t,i){e.tooltip&&e.tooltip.initialize(i)},afterDraw(e){const t=e.tooltip;if(t&&t._willRender()){const i={tooltip:t};if(!1===e.notifyPlugins("beforeTooltipDraw",{...i,cancelable:!0}))return;t.draw(e.ctx),e.notifyPlugins("afterTooltipDraw",i)}},afterEvent(e,t){if(e.tooltip){const i=t.replay;e.tooltip.handleEvent(t.event,i,t.inChartArea)&&(t.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(e,t)=>t.bodyFont.size,boxWidth:(e,t)=>t.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:defaultCallbacks},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:e=>"filter"!==e&&"itemSort"!==e&&"external"!==e,_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]};const addIfString=(e,t,i,r)=>("string"==typeof t?(i=e.push(t)-1,r.unshift({index:i,label:t})):isNaN(t)&&(i=null),i);function findOrAddLabel(e,t,i,r){const n=e.indexOf(t);if(-1===n)return addIfString(e,t,i,r);return n!==e.lastIndexOf(t)?i:n}const validIndex=(e,t)=>null===e?null:_limitValue(Math.round(e),0,t);function _getLabelForValue(e){const t=this.getLabels();return e>=0&&e<t.length?t[e]:e}class CategoryScale extends Scale{static id="category";static defaults={ticks:{callback:_getLabelForValue}};constructor(e){super(e),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(e){const t=this._addedLabels;if(t.length){const e=this.getLabels();for(const{index:i,label:r}of t)e[i]===r&&e.splice(i,1);this._addedLabels=[]}super.init(e)}parse(e,t){if(isNullOrUndef(e))return null;const i=this.getLabels();return t=isFinite(t)&&i[t]===e?t:findOrAddLabel(i,e,valueOrDefault(t,e),this._addedLabels),validIndex(t,i.length-1)}determineDataLimits(){const{minDefined:e,maxDefined:t}=this.getUserBounds();let{min:i,max:r}=this.getMinMax(!0);"ticks"===this.options.bounds&&(e||(i=0),t||(r=this.getLabels().length-1)),this.min=i,this.max=r}buildTicks(){const e=this.min,t=this.max,i=this.options.offset,r=[];let n=this.getLabels();n=0===e&&t===n.length-1?n:n.slice(e,t+1),this._valueRange=Math.max(n.length-(i?0:1),1),this._startValue=this.min-(i?.5:0);for(let i=e;i<=t;i++)r.push({value:i});return r}getLabelForValue(e){return _getLabelForValue.call(this,e)}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(e){return"number"!=typeof e&&(e=this.parse(e)),null===e?NaN:this.getPixelForDecimal((e-this._startValue)/this._valueRange)}getPixelForTick(e){const t=this.ticks;return e<0||e>t.length-1?null:this.getPixelForValue(t[e].value)}getValueForPixel(e){return Math.round(this._startValue+this.getDecimalForPixel(e)*this._valueRange)}getBasePixel(){return this.bottom}}function generateTicks$1(e,t){const i=[],{bounds:r,step:n,min:a,max:s,precision:o,count:l,maxTicks:c,maxDigits:h,includeBounds:p}=e,u=n||1,d=c-1,{min:f,max:m}=t,g=!isNullOrUndef(a),v=!isNullOrUndef(s),y=!isNullOrUndef(l),b=(m-f)/(h+1);let x,_,S,w,C=niceNum((m-f)/d/u)*u;if(C<1e-14&&!g&&!v)return[{value:f},{value:m}];w=Math.ceil(m/C)-Math.floor(f/C),w>d&&(C=niceNum(w*C/d/u)*u),isNullOrUndef(o)||(x=Math.pow(10,o),C=Math.ceil(C*x)/x),"ticks"===r?(_=Math.floor(f/C)*C,S=Math.ceil(m/C)*C):(_=f,S=m),g&&v&&n&&almostWhole((s-a)/n,C/1e3)?(w=Math.round(Math.min((s-a)/C,c)),C=(s-a)/w,_=a,S=s):y?(_=g?a:_,S=v?s:S,w=l-1,C=(S-_)/w):(w=(S-_)/C,w=almostEquals(w,Math.round(w),C/1e3)?Math.round(w):Math.ceil(w));const P=Math.max(_decimalPlaces(C),_decimalPlaces(_));x=Math.pow(10,isNullOrUndef(o)?P:o),_=Math.round(_*x)/x,S=Math.round(S*x)/x;let E=0;for(g&&(p&&_!==a?(i.push({value:a}),_<a&&E++,almostEquals(Math.round((_+E*C)*x)/x,a,relativeLabelSize(a,b,e))&&E++):_<a&&E++);E<w;++E){const e=Math.round((_+E*C)*x)/x;if(v&&e>s)break;i.push({value:e})}return v&&p&&S!==s?i.length&&almostEquals(i[i.length-1].value,s,relativeLabelSize(s,b,e))?i[i.length-1].value=s:i.push({value:s}):v&&S!==s||i.push({value:S}),i}function relativeLabelSize(e,t,{horizontal:i,minRotation:r}){const n=toRadians(r),a=(i?Math.sin(n):Math.cos(n))||.001,s=.75*t*(""+e).length;return Math.min(t/a,s)}class LinearScaleBase extends Scale{constructor(e){super(e),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(e,t){return isNullOrUndef(e)||("number"==typeof e||e instanceof Number)&&!isFinite(+e)?null:+e}handleTickRangeOptions(){const{beginAtZero:e}=this.options,{minDefined:t,maxDefined:i}=this.getUserBounds();let{min:r,max:n}=this;const a=e=>r=t?r:e,s=e=>n=i?n:e;if(e){const e=sign(r),t=sign(n);e<0&&t<0?s(0):e>0&&t>0&&a(0)}if(r===n){let t=0===n?1:Math.abs(.05*n);s(n+t),e||a(r-t)}this.min=r,this.max=n}getTickLimit(){const e=this.options.ticks;let t,{maxTicksLimit:i,stepSize:r}=e;return r?(t=Math.ceil(this.max/r)-Math.floor(this.min/r)+1,t>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${r} would result generating up to ${t} ticks. Limiting to 1000.`),t=1e3)):(t=this.computeTickLimit(),i=i||11),i&&(t=Math.min(i,t)),t}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const e=this.options,t=e.ticks;let i=this.getTickLimit();i=Math.max(2,i);const r=generateTicks$1({maxTicks:i,bounds:e.bounds,min:e.min,max:e.max,precision:t.precision,step:t.stepSize,count:t.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:t.minRotation||0,includeBounds:!1!==t.includeBounds},this._range||this);return"ticks"===e.bounds&&_setMinAndMaxByKey(r,this,"value"),e.reverse?(r.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),r}configure(){const e=this.ticks;let t=this.min,i=this.max;if(super.configure(),this.options.offset&&e.length){const r=(i-t)/Math.max(e.length-1,1)/2;t-=r,i+=r}this._startValue=t,this._endValue=i,this._valueRange=i-t}getLabelForValue(e){return formatNumber(e,this.chart.options.locale,this.options.ticks.format)}}class LinearScale extends LinearScaleBase{static id="linear";static defaults={ticks:{callback:Ticks.formatters.numeric}};determineDataLimits(){const{min:e,max:t}=this.getMinMax(!0);this.min=isNumberFinite(e)?e:0,this.max=isNumberFinite(t)?t:1,this.handleTickRangeOptions()}computeTickLimit(){const e=this.isHorizontal(),t=e?this.width:this.height,i=toRadians(this.options.ticks.minRotation),r=(e?Math.sin(i):Math.cos(i))||.001,n=this._resolveTickFontOptions(0);return Math.ceil(t/Math.min(40,n.lineHeight/r))}getPixelForValue(e){return null===e?NaN:this.getPixelForDecimal((e-this._startValue)/this._valueRange)}getValueForPixel(e){return this._startValue+this.getDecimalForPixel(e)*this._valueRange}}const INTERVALS={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}},UNITS=Object.keys(INTERVALS);function sorter(e,t){return e-t}function parse(e,t){if(isNullOrUndef(t))return null;const i=e._adapter,{parser:r,round:n,isoWeekday:a}=e._parseOpts;let s=t;return"function"==typeof r&&(s=r(s)),isNumberFinite(s)||(s="string"==typeof r?i.parse(s,r):i.parse(s)),null===s?null:(n&&(s="week"!==n||!isNumber(a)&&!0!==a?i.startOf(s,n):i.startOf(s,"isoWeek",a)),+s)}function determineUnitForAutoTicks(e,t,i,r){const n=UNITS.length;for(let a=UNITS.indexOf(e);a<n-1;++a){const e=INTERVALS[UNITS[a]],n=e.steps?e.steps:Number.MAX_SAFE_INTEGER;if(e.common&&Math.ceil((i-t)/(n*e.size))<=r)return UNITS[a]}return UNITS[n-1]}function determineUnitForFormatting(e,t,i,r,n){for(let a=UNITS.length-1;a>=UNITS.indexOf(i);a--){const i=UNITS[a];if(INTERVALS[i].common&&e._adapter.diff(n,r,i)>=t-1)return i}return UNITS[i?UNITS.indexOf(i):0]}function determineMajorUnit(e){for(let t=UNITS.indexOf(e)+1,i=UNITS.length;t<i;++t)if(INTERVALS[UNITS[t]].common)return UNITS[t]}function addTick(e,t,i){if(i){if(i.length){const{lo:r,hi:n}=_lookup(i,t);e[i[r]>=t?i[r]:i[n]]=!0}}else e[t]=!0}function setMajorTicks(e,t,i,r){const n=e._adapter,a=+n.startOf(t[0].value,r),s=t[t.length-1].value;let o,l;for(o=a;o<=s;o=+n.add(o,1,r))l=i[o],l>=0&&(t[l].major=!0);return t}function ticksFromTimestamps(e,t,i){const r=[],n={},a=t.length;let s,o;for(s=0;s<a;++s)o=t[s],n[o]=s,r.push({value:o,major:!1});return 0!==a&&i?setMajorTicks(e,r,n,i):r}class TimeScale extends Scale{static id="time";static defaults={bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",callback:!1,major:{enabled:!1}}};constructor(e){super(e),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(e,t={}){const i=e.time||(e.time={}),r=this._adapter=new adapters._date(e.adapters.date);r.init(t),mergeIf(i.displayFormats,r.formats()),this._parseOpts={parser:i.parser,round:i.round,isoWeekday:i.isoWeekday},super.init(e),this._normalized=t.normalized}parse(e,t){return void 0===e?null:parse(this,e)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const e=this.options,t=this._adapter,i=e.time.unit||"day";let{min:r,max:n,minDefined:a,maxDefined:s}=this.getUserBounds();function o(e){a||isNaN(e.min)||(r=Math.min(r,e.min)),s||isNaN(e.max)||(n=Math.max(n,e.max))}a&&s||(o(this._getLabelBounds()),"ticks"===e.bounds&&"labels"===e.ticks.source||o(this.getMinMax(!1))),r=isNumberFinite(r)&&!isNaN(r)?r:+t.startOf(Date.now(),i),n=isNumberFinite(n)&&!isNaN(n)?n:+t.endOf(Date.now(),i)+1,this.min=Math.min(r,n-1),this.max=Math.max(r+1,n)}_getLabelBounds(){const e=this.getLabelTimestamps();let t=Number.POSITIVE_INFINITY,i=Number.NEGATIVE_INFINITY;return e.length&&(t=e[0],i=e[e.length-1]),{min:t,max:i}}buildTicks(){const e=this.options,t=e.time,i=e.ticks,r="labels"===i.source?this.getLabelTimestamps():this._generate();"ticks"===e.bounds&&r.length&&(this.min=this._userMin||r[0],this.max=this._userMax||r[r.length-1]);const n=this.min,a=_filterBetween(r,n,this.max);return this._unit=t.unit||(i.autoSkip?determineUnitForAutoTicks(t.minUnit,this.min,this.max,this._getLabelCapacity(n)):determineUnitForFormatting(this,a.length,t.minUnit,this.min,this.max)),this._majorUnit=i.major.enabled&&"year"!==this._unit?determineMajorUnit(this._unit):void 0,this.initOffsets(r),e.reverse&&a.reverse(),ticksFromTimestamps(this,a,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map(e=>+e.value))}initOffsets(e=[]){let t,i,r=0,n=0;this.options.offset&&e.length&&(t=this.getDecimalForValue(e[0]),r=1===e.length?1-t:(this.getDecimalForValue(e[1])-t)/2,i=this.getDecimalForValue(e[e.length-1]),n=1===e.length?i:(i-this.getDecimalForValue(e[e.length-2]))/2);const a=e.length<3?.5:.25;r=_limitValue(r,0,a),n=_limitValue(n,0,a),this._offsets={start:r,end:n,factor:1/(r+1+n)}}_generate(){const e=this._adapter,t=this.min,i=this.max,r=this.options,n=r.time,a=n.unit||determineUnitForAutoTicks(n.minUnit,t,i,this._getLabelCapacity(t)),s=valueOrDefault(r.ticks.stepSize,1),o="week"===a&&n.isoWeekday,l=isNumber(o)||!0===o,c={};let h,p,u=t;if(l&&(u=+e.startOf(u,"isoWeek",o)),u=+e.startOf(u,l?"day":a),e.diff(i,t,a)>1e5*s)throw new Error(t+" and "+i+" are too far apart with stepSize of "+s+" "+a);const d="data"===r.ticks.source&&this.getDataTimestamps();for(h=u,p=0;h<i;h=+e.add(h,s,a),p++)addTick(c,h,d);return h!==i&&"ticks"!==r.bounds&&1!==p||addTick(c,h,d),Object.keys(c).sort(sorter).map(e=>+e)}getLabelForValue(e){const t=this._adapter,i=this.options.time;return i.tooltipFormat?t.format(e,i.tooltipFormat):t.format(e,i.displayFormats.datetime)}format(e,t){const i=this.options.time.displayFormats,r=this._unit,n=t||i[r];return this._adapter.format(e,n)}_tickFormatFunction(e,t,i,r){const n=this.options,a=n.ticks.callback;if(a)return callback(a,[e,t,i],this);const s=n.time.displayFormats,o=this._unit,l=this._majorUnit,c=o&&s[o],h=l&&s[l],p=i[t],u=l&&h&&p&&p.major;return this._adapter.format(e,r||(u?h:c))}generateTickLabels(e){let t,i,r;for(t=0,i=e.length;t<i;++t)r=e[t],r.label=this._tickFormatFunction(r.value,t,e)}getDecimalForValue(e){return null===e?NaN:(e-this.min)/(this.max-this.min)}getPixelForValue(e){const t=this._offsets,i=this.getDecimalForValue(e);return this.getPixelForDecimal((t.start+i)*t.factor)}getValueForPixel(e){const t=this._offsets,i=this.getDecimalForPixel(e)/t.factor-t.end;return this.min+i*(this.max-this.min)}_getLabelSize(e){const t=this.options.ticks,i=this.ctx.measureText(e).width,r=toRadians(this.isHorizontal()?t.maxRotation:t.minRotation),n=Math.cos(r),a=Math.sin(r),s=this._resolveTickFontOptions(0).size;return{w:i*n+s*a,h:i*a+s*n}}_getLabelCapacity(e){const t=this.options.time,i=t.displayFormats,r=i[t.unit]||i.millisecond,n=this._tickFormatFunction(e,0,ticksFromTimestamps(this,[e],this._majorUnit),r),a=this._getLabelSize(n),s=Math.floor(this.isHorizontal()?this.width/a.w:this.height/a.h)-1;return s>0?s:1}getDataTimestamps(){let e,t,i=this._cache.data||[];if(i.length)return i;const r=this.getMatchingVisibleMetas();if(this._normalized&&r.length)return this._cache.data=r[0].controller.getAllParsedValues(this);for(e=0,t=r.length;e<t;++e)i=i.concat(r[e].controller.getAllParsedValues(this));return this._cache.data=this.normalize(i)}getLabelTimestamps(){const e=this._cache.labels||[];let t,i;if(e.length)return e;const r=this.getLabels();for(t=0,i=r.length;t<i;++t)e.push(parse(this,r[t]));return this._cache.labels=this._normalized?e:this.normalize(e)}normalize(e){return _arrayUnique(e.sort(sorter))}}function interpolate(e,t,i){let r,n,a,s,o=0,l=e.length-1;i?(t>=e[o].pos&&t<=e[l].pos&&({lo:o,hi:l}=_lookupByKey(e,"pos",t)),({pos:r,time:a}=e[o]),({pos:n,time:s}=e[l])):(t>=e[o].time&&t<=e[l].time&&({lo:o,hi:l}=_lookupByKey(e,"time",t)),({time:r,pos:a}=e[o]),({time:n,pos:s}=e[l]));const c=n-r;return c?a+(s-a)*(t-r)/c:a}class TimeSeriesScale extends TimeScale{static id="timeseries";static defaults=TimeScale.defaults;constructor(e){super(e),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const e=this._getTimestampsForTable(),t=this._table=this.buildLookupTable(e);this._minPos=interpolate(t,this.min),this._tableRange=interpolate(t,this.max)-this._minPos,super.initOffsets(e)}buildLookupTable(e){const{min:t,max:i}=this,r=[],n=[];let a,s,o,l,c;for(a=0,s=e.length;a<s;++a)l=e[a],l>=t&&l<=i&&r.push(l);if(r.length<2)return[{time:t,pos:0},{time:i,pos:1}];for(a=0,s=r.length;a<s;++a)c=r[a+1],o=r[a-1],l=r[a],Math.round((c+o)/2)!==l&&n.push({time:l,pos:a/(s-1)});return n}_generate(){const e=this.min,t=this.max;let i=super.getDataTimestamps();return i.includes(e)&&i.length||i.splice(0,0,e),i.includes(t)&&1!==i.length||i.push(t),i.sort((e,t)=>e-t)}_getTimestampsForTable(){let e=this._cache.all||[];if(e.length)return e;const t=this.getDataTimestamps(),i=this.getLabelTimestamps();return e=t.length&&i.length?this.normalize(t.concat(i)):t.length?t:i,e=this._cache.all=e,e}getDecimalForValue(e){return(interpolate(this._table,e)-this._minPos)/this._tableRange}getValueForPixel(e){const t=this._offsets,i=this.getDecimalForPixel(e)/t.factor-t.end;return interpolate(this._table,i*this._tableRange+this._minPos,!0)}}const getCSSVariable=(e,t=1,i="#666666")=>{const r=getComputedStyle(document.documentElement).getPropertyValue(e).trim();if(!r)return console.warn(`CSS variable ${e} not found, using fallback color: ${i}`),i;if(1===t)return r;if(r.startsWith("#")){const e=r.replace("#","");return`rgba(${parseInt(e.substr(0,2),16)}, ${parseInt(e.substr(2,2),16)}, ${parseInt(e.substr(4,2),16)}, ${t})`}return r.startsWith("rgb")?r.startsWith("rgba")?r.replace(/[\d.]+\)$/,`${t})`):r.replace("rgb","rgba").replace(")",`, ${t})`):r};function BasicPriceChart({legend:e,chartOptions:t,noChartDisplay:i,id:r,className:n}){var a;const s=React.useRef(null),o=React.useRef(null);return React.useLayoutEffect(()=>{var e,i;if(!s.current)return;const r=s.current.getContext("2d");if(!r)return;const n=null==r?void 0:r.createLinearGradient(0,0,300,0);return null==n||n.addColorStop(0,getCSSVariable("--secondary-color")),null==n||n.addColorStop(.3,getCSSVariable("--secondary-dark-color")),null==n||n.addColorStop(.7,getCSSVariable("--primary-color")),o.current&&o.current.destroy(),(null===(e=t.data.datasets[0])||void 0===e?void 0:e.backgroundColor)&&(t.data.datasets[0].backgroundColor=[n,"rgba(0, 0, 0, 0.2)"]),(null===(i=t.data.datasets[0])||void 0===i?void 0:i.borderColor)&&(t.data.datasets[0].borderColor=[n,"rgba(0, 0, 0, 0.2)"]),o.current=new Chart(r,t),()=>{var e;null===(e=o.current)||void 0===e||e.destroy()}},[t]),require$$0.jsx("div",{id:r,className:"basic-price-chart"+(n?" "+n:""),children:require$$0.jsx("div",{className:"basic-price-chart__content",children:(null===(a=t.data.datasets[0])||void 0===a?void 0:a.data.every(e=>0===e))?require$$0.jsx("div",{className:"basic-price-chart__empty",children:null!=i?i:require$$0.jsx("div",{children:"Kein Chart verfügbar"})}):require$$0.jsxs(require$$0.Fragment,{children:[require$$0.jsx("div",{className:"basic-price-chart__chart",children:require$$0.jsx("canvas",{ref:s})}),e]})})})}function LvEditingStatusChart({chartOptions:e,legend:t,noChartDisplay:i,id:r,className:n}){var a;const s=React.useRef(null),o=React.useRef(null);return React.useLayoutEffect(()=>{var t,i;if(!s.current)return;const r=s.current.getContext("2d");return r?(o.current&&o.current.destroy(),(null===(t=e.data.datasets[0])||void 0===t?void 0:t.backgroundColor)&&(e.data.datasets[0].backgroundColor=[getCSSVariable("--warning-color",.6),getCSSVariable("--valid-color",.6),getCSSVariable("--error-color",.6)]),(null===(i=e.data.datasets[0])||void 0===i?void 0:i.borderColor)&&(e.data.datasets[0].borderColor=[getCSSVariable("--warning-color",.6),getCSSVariable("--valid-color",.6),getCSSVariable("--error-color",.6)]),o.current=new Chart(r,e),()=>{var e;null===(e=o.current)||void 0===e||e.destroy()}):void 0},[]),require$$0.jsx("div",{id:r,className:"lv-editing-status-chart"+(n?" "+n:""),children:require$$0.jsx("div",{className:"lv-editing-status-chart__content",children:(null===(a=e.data.datasets[0])||void 0===a?void 0:a.data.every(e=>0===e))?require$$0.jsx("div",{className:"lv-editing-status-chart__empty",children:null!=i?i:require$$0.jsx("div",{children:"Kein Chart verfügbar"})}):require$$0.jsxs(require$$0.Fragment,{children:[require$$0.jsx("div",{className:"lv-editing-status-chart__chart",children:require$$0.jsx("canvas",{ref:s})}),t]})})})}function LvInsightsChart({chartOptions:e,legend:t,noChartDisplay:i,id:r,className:n}){var a;const s=React.useRef(null),o=React.useRef(null),l=[getCSSVariable("--secondary-color",.7),getCSSVariable("--primary-color",.7),getCSSVariable("--info-color",.7),getCSSVariable("--diagram-color-5",.7)],c=[getCSSVariable("--secondary-color",1),getCSSVariable("--primary-color",1),getCSSVariable("--info-color",1),getCSSVariable("--diagram-color-5",1)];return React.useLayoutEffect(()=>{var t,i;if(!s.current)return;const r=s.current.getContext("2d");return r?(o.current&&o.current.destroy(),(null===(t=e.data.datasets[0])||void 0===t?void 0:t.backgroundColor)&&(e.data.datasets[0].backgroundColor=l),(null===(i=e.data.datasets[0])||void 0===i?void 0:i.hoverBackgroundColor)&&(e.data.datasets[0].hoverBackgroundColor=c),o.current=new Chart(r,e),()=>{var e;null===(e=o.current)||void 0===e||e.destroy()}):void 0},[]),require$$0.jsx("div",{id:r,className:"lv-insights"+(n?" "+n:""),children:require$$0.jsx("div",{className:"lv-insights__content",children:(null===(a=e.data.datasets[0])||void 0===a?void 0:a.data.every(e=>0===e))?require$$0.jsx("div",{className:"lv-insights__empty",children:null!=i?i:require$$0.jsx("div",{children:"Kein Chart verfügbar"})}):require$$0.jsxs(require$$0.Fragment,{children:[require$$0.jsx("div",{className:"lv-insights__chart",children:require$$0.jsx("canvas",{ref:s})}),t]})})})}function ContractPotentialsChart({chartOptions:e,legend:t,noChartDisplay:i,id:r,className:n}){var a,s;const o=React.useRef(null),l=React.useRef(null);return React.useLayoutEffect(()=>{var t,i;if(!o.current)return;const r=o.current.getContext("2d");return r?(l.current&&l.current.destroy(),(null===(t=e.data.datasets[0])||void 0===t?void 0:t.backgroundColor)&&(e.data.datasets[0].backgroundColor=[getCSSVariable("--secondary-color-50")]),(null===(i=e.data.datasets[1])||void 0===i?void 0:i.backgroundColor)&&(e.data.datasets[1].backgroundColor=[getCSSVariable("--primary-color-68",1)]),l.current=new Chart(r,e),()=>{var e;null===(e=l.current)||void 0===e||e.destroy()}):void 0},[e]),require$$0.jsx("div",{id:r,className:"contract-potentials"+(n?" "+n:""),children:require$$0.jsx("div",{className:"contract-potentials__content",children:(null===(a=e.data.datasets[0])||void 0===a?void 0:a.data.every(e=>0===e))&&(null===(s=e.data.datasets[1])||void 0===s?void 0:s.data.every(e=>0===e))?require$$0.jsx("div",{className:"contract-potentials__empty",children:null!=i?i:require$$0.jsx("div",{children:"Kein Chart verfügbar"})}):require$$0.jsxs(require$$0.Fragment,{children:[require$$0.jsx("div",{className:"contract-potentials__chart",children:require$$0.jsx("canvas",{ref:o})}),t]})})})}function BeeLabel({id:e,className:t,value:i,size:r="medium",type:n="neutral"}){const a=null!=e?e:libExports.useId(1,"bee-info-label-")[0],s="bee-label "+("neutral"===n?" bee-info-neutral-label":"valid"===n?" bee-info-valid-label":"error"===n?" bee-error-label":"")+("small"===r?" bee-info-label-small":"medium"===r?" bee-info-label-medium":"large"===r?" bee-info-label-large":" bee-info-label-medium")+(t?" "+t:"");return require$$0.jsx("span",{id:a,className:s,children:i})}Chart.register(DoughnutController,ArcElement,plugin_tooltip,plugin_legend),Chart.register(PieController,ArcElement,plugin_tooltip,plugin_legend),Chart.register(DoughnutController,ArcElement,plugin_tooltip,plugin_legend),Chart.register(BarController,CategoryScale,LinearScale,BarElement,plugin_tooltip,plugin_legend);const EMPTY_FIELD_PLACEHOLDER=" — ";function BeeTextInput({id:e,className:t,label:i,value:r,disabled:n,statusLabel:a,formstate:s="neutral",halfRounded:o,readOnly:l,required:c,placeholder:h,tooltip:p,tooltipOptions:u,onChange:d,onFocusOut:f}){var m;const g=null!==(m=null!=e?e:libExports.useId(1,"bee-txt-input-")[0])&&void 0!==m?m:"bee-txt-input";let v="";l&&(v=" bee-txt-input-readOnly",n=!0);const y="bee-txt-input "+("valid"===s?" bee-txt-input-valid":"error"===s?" bee-txt-input-error":"neutral"===s?" bee-txt-input-neutral":"none"===s?" bee-cur-input-field-neutral":" bee-txt-input-neutral"),b="p-float-label bee-txt-input-container"+v+(o?" half-rounded":"");return require$$0.jsxs(require$$0.Fragment,{children:[require$$0.jsx("div",{id:g,className:b+(t?" "+t:""),children:l&&!r?require$$0.jsx(BeePlaceholder,{id:g,label:i}):require$$0.jsxs(require$$0.Fragment,{children:[require$$0.jsx(inputtext.InputText,{id:g+"input",value:null!=r?r:void 0,disabled:null!=n&&n,className:y,placeholder:h,tooltip:p,tooltipOptions:u,onChange:e=>function(e){!n&&d&&d(e)}(e),onBlur:e=>function(e){!n&&f&&f(e)}(e)}),i?require$$0.jsxs("label",{htmlFor:g+"input",className:"bee-txt-input-label",children:[i,c&&i?require$$0.jsx("span",{className:"bee-txt-input-label-required",children:require$$0.jsx("span",{className:"bee-txt-input-label-required-star",children:" *"})}):null]}):null]})}),"none"!=s&&a?(()=>{const e="medium";return require$$0.jsx("div",{className:"bee-text-input-statusLabel",children:"error"===s&&a?require$$0.jsx(BeeLabel,{size:e,value:a,type:"error"}):"valid"===s&&a?require$$0.jsx(BeeLabel,{size:e,value:a,type:"valid"}):"neutral"===s&&a?require$$0.jsx(BeeLabel,{size:e,value:a,type:"neutral"}):null})})():null]})}function BeePlaceholder({id:e,className:t,label:i,disabled:r}){const n=null!=e?e:libExports.useId(1,"bee-placeholder-")[0];return require$$0.jsx(BeeTextInput,{id:n+"input",label:i,value:EMPTY_FIELD_PLACEHOLDER,className:null!=t?t:"",disabled:null==r||r,readOnly:!0,formstate:"neutral"})}function BeeAutocompleteDropdown({id:e,className:t,label:i,value:r,suggestions:n,disabled:a,statusLabel:s,formstate:o="neutral",readOnly:l,required:c,placeholder:h,tooltip:p,tooltipOptions:u,onChange:d,onFocusOut:f}){const m=null!=e?e:libExports.useId(1,"bee-autocomplete-dropdown-")[0],[g,v]=React.useState(null!=n?n:[]),y="bee-autocomplete-dropdown "+("valid"===o?" bee-autocomplete-dropdown-valid":"error"===o?" bee-autocomplete-dropdown-error":"neutral"===o?" bee-autocomplete-dropdown-neutral":"none"===o?" bee-autocomplete-dropdodown-none":" bee-autocomplete-dropdown-neutral"),b="p-float-label bee-autocomplete-dropdown-container"+(l?" bee-autocomplete-dropdown-readOnly":"")+(a?" bee-autocomplete-dropdown-disabled":"");return require$$0.jsxs(require$$0.Fragment,{children:[require$$0.jsx("span",{id:m,className:b+(t?" "+t:""),children:l&&!r?require$$0.jsx(BeePlaceholder,{id:m,label:i}):require$$0.jsxs(require$$0.Fragment,{children:[require$$0.jsx(autocomplete.AutoComplete,{id:m+"input",value:null!=r?r:void 0,dropdown:!0,suggestions:g,disabled:null!=a&&a,className:y,placeholder:h,tooltip:p,tooltipOptions:u,onChange:e=>function(e){!a&&d&&d(e)}(e),onBlur:e=>function(e){!a&&f&&f(e)}(e),completeMethod:e=>{const t=(null!=n?n:[]).filter(t=>String(t).toLowerCase().startsWith(e.query.toLowerCase()));v(t)}}),i?require$$0.jsxs("label",{htmlFor:m+"input",className:"bee-autocomplete-dropdown-label",children:[i,c&&i?require$$0.jsx("span",{className:"bee-autocomplete-dropdown-label-required",children:require$$0.jsx("span",{className:"bee-autocomplete-dropdown-label-required-star",children:" *"})}):null]}):null]})}),"none"!=o&&s?(()=>{const e="medium";return require$$0.jsx("div",{className:"bee-autocomplete-dropdown-statusLabel",children:"error"===o&&s?require$$0.jsx(BeeLabel,{size:e,value:s,type:"error"}):"valid"===o&&s?require$$0.jsx(BeeLabel,{size:e,value:s,type:"valid"}):"neutral"===o&&s?require$$0.jsx(BeeLabel,{size:e,value:s,type:"neutral"}):null})})():null]})}function BeeAutocompleteTag({id:e,className:t,label:i,value:r,suggestions:n,disabled:a,statusLabel:s,formstate:o="neutral",readOnly:l,required:c,placeholder:h,tooltip:p,tooltipOptions:u,onChange:d,onFocusOut:f}){const m=null!=e?e:libExports.useId(1,"bee-autocomplete-tag-")[0],[g,v]=React.useState(null!=n?n:[]);let y="";l&&(y=" bee-autocomplete-tag-readOnly",a=!0);const b="bee-autocomplete-tag "+("valid"===o?" bee-autocomplete-tag-valid":"error"===o?" bee-autocomplete-tag-error":"neutral"===o?" bee-autocomplete-tag-neutral":"none"===o?" bee-cur-input-field-neutral":" bee-autocomplete-tag-neutral"),x="p-float-label bee-autocomplete-tag-container"+y;const _=void 0===r?[]:Array.isArray(r)?r.map(String):[String(r)];return require$$0.jsxs(require$$0.Fragment,{children:[require$$0.jsx("div",{id:m,className:x+(t?" "+t:""),children:l&&!r?require$$0.jsx(BeePlaceholder,{id:m,label:i}):require$$0.jsxs(require$$0.Fragment,{children:[require$$0.jsx(autocomplete.AutoComplete,{id:m+"input",value:_,multiple:!0,suggestions:g,disabled:null!=a&&a,className:b,placeholder:h,tooltip:p,tooltipOptions:u,onChange:e=>function(e){!a&&d&&d(e)}(e),onBlur:e=>function(e){!a&&f&&f(e)}(e),completeMethod:e=>{const t=(null!=n?n:[]).filter(t=>String(t).toLowerCase().startsWith(e.query.toLowerCase()));v(t)}}),i?require$$0.jsxs("label",{htmlFor:m+"input",className:"bee-autocomplete-tag-label",children:[i,c&&i?require$$0.jsx("span",{className:"bee-autocomplete-tag-label-required",children:require$$0.jsx("span",{className:"bee-autocomplete-tag-label-required-star",children:" *"})}):null]}):null]})}),"none"!=o&&s?(()=>{const e="medium";return require$$0.jsx("div",{className:"bee-autocomplete-tag-statusLabel",children:"error"===o&&s?require$$0.jsx(BeeLabel,{size:e,value:s,type:"error"}):"valid"===o&&s?require$$0.jsx(BeeLabel,{size:e,value:s,type:"valid"}):"neutral"===o&&s?require$$0.jsx(BeeLabel,{size:e,value:s,type:"neutral"}):null})})():null]})}function BeeBadge({id:e,className:t,label:i,type:r="primary",size:n="normal"}){const a=null!=e?e:libExports.useId(1,"bee-badge-")[0],s="primary"===r?"bee-badge bee-badge-primary":"secondary"===r?"bee-badge bee-badge-secondary":"danger"===r?"bee-badge bee-badge-danger":"bee-badge bee-badge-primary"+(t?" "+t:"");return require$$0.jsx(badge.Badge,{id:a,value:i,className:s,size:n})}function BeeContentHeadline({id:e,className:t,value:i,headlineType:r="h1",type:n="primary"}){const a=null!=e?e:libExports.useId(1,"bee-content-headline-")[0],s="primary"===n?"bee-headline bee-headline-primary":"secondary"===n?"bee-headline bee-headline-secondary":"bee-headline bee-headline-primary"+(t?" "+t:"");return"h1"===r?require$$0.jsx("h1",{id:a,className:s,children:i}):"h2"===r?require$$0.jsx("h2",{id:a,className:s,children:i}):"h3"===r?require$$0.jsx("h3",{id:a,className:s,children:i}):"h4"===r?require$$0.jsx("h4",{id:a,className:s,children:i}):"h5"===r?require$$0.jsx("h5",{id:a,className:s,children:i}):require$$0.jsx("h1",{id:a,className:s,children:i})}function BeeContentParagraph({id:e,className:t,value:i,size:r="medium",type:n="primary"}){const a=null!=e?e:libExports.useId(1,"bee-content-paragraph-")[0],s="bee-content-paragraph"+("xSmall"===r?" bee-content-paragraph-xsmall":"small"===r?" bee-content-paragraph-small":"medium"===r?" bee-content-paragraph-medium":"large"===r?" bee-content-paragraph-large":"xLarge"===r?" bee-content-paragraph-xlarge":" bee-content-paragraph-medium")+("primary"===n?" bee-content-paragraph-primary":"secondary"===n?" bee-content-paragraph-secondary":"")+(t?" "+t:"");return require$$0.jsx("p",{id:a,className:s,children:i})}function BeeLink({id:e,className:t,value:i,href:r,type:n="primary",size:a="medium",onClick:s}){const o=null!=e?e:libExports.useId(1,"bee-link-")[0],l="bee-link"+("primary"===n?" bee-link-primary":"secondary"===n?" bee-link-secondary":" bee-link-default")+("xSmall"===a?" bee-link-size-xSmall":"small"===a?" bee-link-size-small":"medium"===a?" bee-link-size-medium":"large"===a?" bee-link-size-large":"xLarge"===a?" bee-link-size-xLarge":" bee-link-size-medium");return require$$0.jsx(require$$0.Fragment,{children:r?require$$0.jsx("a",{id:o,className:l+(t?" "+t:""),href:r,children:i}):require$$0.jsx("a",{id:o,className:l+(t?" "+t:""),onClick:e=>function(e){s&&s(e)}(e),children:i})})}function BeeSequencePosition({id:e,className:t,data:i,type:r="primary"}){const n=null!=e?e:libExports.useId(1,"bee-seq-pos-")[0],a="bee-seq-pos"+("primary"===r?" bee-seq-pos-primary":"secondary"===r?" bee-seq-pos-secondary":"default"===r?" bee-seq-pos-default":" bee-seq-pos-primary")+(t?" "+t:"");return require$$0.jsx("div",{id:n,className:a,children:(()=>{if(i){let e=[];return i.forEach((t,i)=>{e.push(((e,t)=>{const i=(null==e?void 0:e.bold)?"bee-seq-pos-bold":void 0;return require$$0.jsxs("span",{children:[(null==e?void 0:e.icon)?require$$0.jsx("i",{className:e.icon}):null,null!=(null==e?void 0:e.label)?require$$0.jsx("span",{className:i,children:e.label}):null]},`SeqPos_${t}`)})(t,i)),e.push(require$$0.jsx("i",{className:"pi pi-chevron-right bee-seq-pos-separator"},">_"+i))}),e.pop(),e}})()})}function BeeChipInput({id:e,className:t,label:i,type:r="primary",data:n=[],statusLabel:a,formstate:s="neutral",required:o,disabled:l,readOnly:c,placeholder:h,tooltip:p,tooltipOptions:u,itemTemplate:d,onChange:f}){var m;const g=null!==(m=null!=e?e:libExports.useId(1,"bee-chip-input-")[0])&&void 0!==m?m:"bee-chip-input",v="bee-chip-input p-float-label"+("primary"===r?" bee-chip-input-primary":"secondary"===r?" bee-chip-input-secondary":" bee-chip-input-primary")+(c?" bee-chip-input-readOnly":"")+(l?" bee-chip-input-disabled":"")+("valid"===s?" bee-chip-input-field-valid":"error"===s?" bee-chip-input-field-error":" bee-chip-input-field-neutral")+(t?" "+t:""),y=o?"bee-chip-input-label-required":"",b=o?"bee-chip-input-label-required-star":"";return require$$0.jsxs("div",{id:g,className:v,children:[require$$0.jsx(require$$0.Fragment,{children:c&&!n||c&&n.length<1?require$$0.jsx(BeePlaceholder,{id:g,label:i}):require$$0.jsx(require$$0.Fragment,{children:require$$0.jsx(chips.Chips,Object.assign({value:n},void 0!==d?{itemTemplate:d}:{},{onChange:e=>function(e){!l&&f&&f(e)}(e),separator:",",addOnBlur:!0,removable:!c,readOnly:null!=c&&c,placeholder:h,tooltip:p,tooltipOptions:u}))})}),i?require$$0.jsxs("label",{className:"bee-chip-input-label",children:[i,o?require$$0.jsx("span",{className:y,children:require$$0.jsx("span",{className:b,children:" *"})}):null]}):null,"none"!=s&&a?(()=>{const e="medium";return require$$0.jsx("div",{className:"bee-chip-input-statusLabel",children:"error"===s&&a?require$$0.jsx(BeeLabel,{size:e,value:a,type:"error"}):"valid"===s&&a?require$$0.jsx(BeeLabel,{size:e,value:a,type:"valid"}):"neutral"===s&&a?require$$0.jsx(BeeLabel,{size:e,value:a,type:"neutral"}):null})})():null]})}function BeeCurrencyInput({id:e,className:t,label:i,value:r,showArrow:n,disabled:a,autoFocus:s,minFractionDigits:o,maxFractionDigits:l,max:c,min:h,currency:p="EUR",locale:u="de-DE",statusLabel:d,formstate:f="neutral",readOnly:m,required:g,placeholder:v,name:y,tooltip:b,tooltipOptions:x,onChange:_,onFocusOut:S}){var w;const C=null!==(w=null!=e?e:libExports.useId(1,"bee-cur-input-")[0])&&void 0!==w?w:"bee-cur-input",P=null!=o?o:2,E=null!=l?l:2;let k="";m&&(k=" bee-cur-input-field-readOnly",a=!0);const $=" bee-cur-input-container "+(n?" bee-cur-input-container--showArrow ":""),A="bee-cur-input-field"+("valid"===f?" bee-cur-input-field-valid":"error"===f?" bee-cur-input-field-error":" bee-cur-input-field-neutral")+k,T="icon icon-right-arrow "+(r&&r>0?"up-arrow":r&&r<0?"down-arrow":"");return require$$0.jsxs("div",{children:[m&&!r?require$$0.jsx("div",{className:null!=t?t:"",children:require$$0.jsx(BeePlaceholder,{id:C,label:i})}):require$$0.jsxs("div",{className:$+(t?" "+t:""),children:[n?require$$0.jsx("i",{className:T}):null,require$$0.jsxs("span",{id:C,className:"p-float-label ",children:[require$$0.jsx(inputnumber.InputNumber,{id:C+"input",value:null!=r?r:null,disabled:null!=a&&a,minFractionDigits:P,maxFractionDigits:E,max:c,min:h,autoFocus:s,mode:"currency",currency:p,inputId:C+"_input",inputClassName:A,locale:u,placeholder:v,name:y,tooltip:b,tooltipOptions:x,onValueChange:e=>function(e){!a&&_&&_(e)}(e),onBlur:e=>function(e){!a&&S&&S(e)}(e)}),i?require$$0.jsxs("label",{htmlFor:C+"input",className:"bee-cur-input-label",children:[i,g&&i?require$$0.jsx("span",{className:"bee-cur-input-label-required",children:require$$0.jsx("span",{className:"bee-cur-input-label-required-star",children:" *"})}):null]}):null]})]}),"none"!=f&&d?(()=>{const e="medium";return require$$0.jsx("div",{className:"bee-cur-input-statusLabel",children:"error"===f&&d?require$$0.jsx(BeeLabel,{size:e,value:d,type:"error"}):"valid"===f&&d?require$$0.jsx(BeeLabel,{size:e,value:d,type:"valid"}):"neutral"===f&&d?require$$0.jsx(BeeLabel,{size:e,value:d,type:"neutral"}):null})})():null]})}function BeeDateInput({id:e,className:t,label:i,value:r,statusLabel:n,formstate:a="neutral",disabled:s,readOnly:o,required:l,showButtonBar:c,dateFormat:h,view:p,minDate:u,maxDate:d,showMinMaxRange:f,showUTCDate:m,placeholder:g,tooltip:v,tooltipOptions:y,onChange:b,onFocusOut:x,panelClassName:_,locale:S="de"}){var w;const C=null!==(w=null!=e?e:libExports.useId(1,"bee-date-input-")[0])&&void 0!==w?w:"bee-date-input";let P="";o&&(P=" bee-date-input-readOnly",s=!0);const E=`bee-date-input ${"valid"===a?" bee-date-input-valid":"error"===a?" bee-date-input-error":" bee-date-input-neutral"} ${P} ${_||""}`;function k(e){if(!e||Array.isArray(e))return null;let t=new Date(e);return new Date(t.getTime()-6e4*t.getTimezoneOffset())}function $(e){if(!e||Array.isArray(e))return;let t=new Date(e);return new Date(t.getTime()+6e4*t.getTimezoneOffset())}function A(e){if(e&&!Array.isArray(e))return e instanceof Date?e:new Date(e)}return require$$0.jsxs(require$$0.Fragment,{children:[require$$0.jsx("div",{id:C,className:"p-float-label bee-date-input-container"+(t?" "+t:""),children:o&&!r?require$$0.jsx(BeePlaceholder,{id:C,label:i}):require$$0.jsxs(require$$0.Fragment,{children:[require$$0.jsx(calendar.Calendar,{id:C+"input",value:m&&r?$(r):A(r),disabled:null!=s&&s,className:E,showIcon:!0,showButtonBar:null!=c&&c,dateFormat:null!=h?h:"dd.mm.y",view:null!=p?p:"date",minDate:u?m?$(u):A(u):void 0,maxDate:d?m?$(d):A(d):void 0,showMinMaxRange:null!=f&&f,placeholder:g,tooltip:v,tooltipOptions:y,onChange:e=>function(e){!s&&b&&(m&&(e.value=k(e.value)),b(e))}(e),onBlur:e=>function(e){var t,i;!s&&x&&(m?(e.target.value=null!==(i=null===(t=k(e.target.value))||void 0===t?void 0:t.toString())&&void 0!==i?i:e.target.value,x(e)):x(e))}(e),locale:S}),i?require$$0.jsxs("label",{htmlFor:C+"input",className:"bee-date-input-label",children:[i,l&&i?require$$0.jsx("span",{className:"bee-date-input-label-required",children:require$$0.jsx("span",{className:"bee-date-input-label-required-star",children:" *"})}):null]}):null]})}),"none"!=a&&n?(()=>{const e="medium";return require$$0.jsx("div",{className:"bee-date-input-statusLabel",children:"error"===a&&n?require$$0.jsx(BeeLabel,{size:e,value:n,type:"error"}):"valid"===a&&n?require$$0.jsx(BeeLabel,{size:e,value:n,type:"valid"}):"neutral"===a&&n?require$$0.jsx(BeeLabel,{size:e,value:n,type:"neutral"}):null})})():null]})}function BeeDateTimeInput({id:e,className:t,label:i,value:r,disabled:n,statusLabel:a,formstate:s="neutral",readOnly:o,required:l,minDate:c,maxDate:h,showMinMaxRange:p,placeholder:u,tooltip:d,tooltipOptions:f,onChange:m,onFocusOut:g}){var v;const y=null!==(v=null!=e?e:libExports.useId(1,"bee-date-time-input-")[0])&&void 0!==v?v:"bee-date-time-input";let b="";o&&(b=" bee-date-time-input-readOnly",n=!0);const x="bee-date-time-input"+("valid"===s?" bee-date-time-input-valid":"error"===s?" bee-date-time-input-error":"neutral"===s?" bee-date-time-input-neutral":"none"===s?" bee-date-time-field-neutral":" bee-date-time-input-neutral")+b;return require$$0.jsxs(require$$0.Fragment,{children:[o&&!r?require$$0.jsx("div",{className:null!=t?t:"",children:require$$0.jsx(BeePlaceholder,{id:y,label:i})}):require$$0.jsxs("span",{id:y,className:"p-float-label bee-date-time-input-container"+(t?" "+t:""),children:[require$$0.jsx(calendar.Calendar,{showTime:!0,showSeconds:!0,hourFormat:"24",dateFormat:"dd.mm.yy",value:r,disabled:null!=n&&n,className:x,minDate:c?new Date(c):void 0,maxDate:h?new Date(h):void 0,showMinMaxRange:null!=p&&p,placeholder:u,tooltip:d,tooltipOptions:f,onChange:e=>function(e){!n&&m&&m(e)}(e),onBlur:e=>function(e){!n&&g&&g(e)}(e)}),i?require$$0.jsxs("label",{htmlFor:y+"input",className:"bee-date-time-input-label",children:[i,l&&i?require$$0.jsx("span",{className:"bee-date-time-input-label-required",children:require$$0.jsx("span",{className:"bee-date-time-input-label-required-star",children:" *"})}):null]}):null]}),"none"!=s&&a?(()=>{const e="medium";return require$$0.jsx("div",{className:"bee-date-time-input-statusLabel",children:"error"===s&&a?require$$0.jsx(BeeLabel,{size:e,value:a,type:"error"}):"valid"===s&&a?require$$0.jsx(BeeLabel,{size:e,value:a,type:"valid"}):"neutral"===s&&a?require$$0.jsx(BeeLabel,{size:e,value:a,type:"neutral"}):null})})():null]})}function BeeNumberInput({id:e,className:t,label:i,value:r,showArrow:n,autoFocus:a,minFractionDigits:s,maxFractionDigits:o,max:l,min:c,disabled:h,grouping:p,locale:u="de-DE",statusLabel:d,formstate:f="neutral",readOnly:m,required:g,placeholder:v,tooltip:y,tooltipOptions:b,onChange:x,onFocusOut:_}){var S;const w=null!==(S=null!=e?e:libExports.useId(1,"bee-num-input")[0])&&void 0!==S?S:"bee-num-input";let C="";m&&(C=" bee-num-input-readOnly",h=!0);const P=" bee-num-input-container"+(n?" bee-num-input-container--showArrow":""),E="bee-num-input "+("valid"===f?"bee-num-input-valid":"error"===f?"bee-num-input-error":"bee-num-input-neutral")+C,k="icon icon-right-arrow "+(r&&r>0?"up-arrow":r&&r<0?"down-arrow":"");return require$$0.jsxs(require$$0.Fragment,{children:[m&&!r&&0!==r?require$$0.jsx("div",{className:null!=t?t:"",children:require$$0.jsx(BeePlaceholder,{id:w,label:i})}):require$$0.jsxs("div",{className:"flex-grow-0"+P+(t?" "+t:""),children:[n?require$$0.jsx("i",{className:k}):null,require$$0.jsxs("span",{id:w,className:"p-float-label",children:[require$$0.jsx(inputnumber.InputNumber,{id:w+"input",value:null!=r?r:null,disabled:null!=h&&h,mode:"decimal",autoFocus:a,useGrouping:p,minFractionDigits:s,maxFractionDigits:o,max:l,min:c,locale:u,inputClassName:E,placeholder:v,tooltip:y,tooltipOptions:b,onValueChange:e=>function(e){!h&&x&&x(e)}(e),onBlur:e=>function(e){!h&&_&&_(e)}(e)}),i?require$$0.jsxs("label",{htmlFor:w+"input",className:"bee-num-input-label",children:[i,g&&i?require$$0.jsx("span",{className:"bee-num-input-label-required",children:require$$0.jsx("span",{className:"bee-num-input-label-required-star",children:" *"})}):null]}):null]})]}),"none"!=f&&d?(()=>{const e="medium";return require$$0.jsx("div",{className:"bee-num-input-statusLabel",children:"error"===f&&d?require$$0.jsx(BeeLabel,{size:e,value:d,type:"error"}):"valid"===f&&d?require$$0.jsx(BeeLabel,{size:e,value:d,type:"valid"}):"neutral"===f&&d?require$$0.jsx(BeeLabel,{size:e,value:d,type:"neutral"}):null})})():null]})}function BeePasswordInput({id:e,className:t,label:i,value:r,disabled:n,showPwStrength:a,showHint:s,statusLabel:o,formstate:l="neutral",readOnly:c,required:h,placeholder:p,tooltip:u,tooltipOptions:d,onChange:f,onFocusOut:m}){var g;const v=null!==(g=null!=e?e:libExports.useId(1,"bee-pw-input")[0])&&void 0!==g?g:"bee-pw-input";let y="";c&&(y=" bee-pw-input-readOnly",n=!0);const b="bee-pw-input "+("valid"===l?"bee-pw-input-valid":"error"===l?"bee-pw-input-error":"bee-pw-input-neutral"),x="p-float-label bee-pw-container"+y,_=require$$0.jsx("h6",{children:"Passwort wählen"});const S=require$$0.jsxs(require$$0.Fragment,{children:[require$$0.jsx(divider.Divider,{}),require$$0.jsx("p",{className:"mt-2",children:"Suggestions"}),require$$0.jsxs("ul",{className:"pl-2 ml-2 mt-0",style:{lineHeight:"1.5"},children:[require$$0.jsx("li",{children:"Mind. einen Kleinbuchstaben"}),require$$0.jsx("li",{children:"Mind. einen Großbuchstaben"}),require$$0.jsx("li",{children:"Mind. eine Zahl"}),require$$0.jsx("li",{children:"Mind. 8 Buchstaben/Zahlen"})]})]});return require$$0.jsxs(require$$0.Fragment,{children:[require$$0.jsx("div",{className:null!=t?t:"",children:c&&!r?require$$0.jsx(BeePlaceholder,{id:v,label:i}):require$$0.jsxs("span",{id:v,className:x,children:[require$$0.jsx(password.Password,{id:v+"input",value:null!=r?r:void 0,disabled:null!=n&&n,onChange:e=>function(e){!n&&f&&f(e)}(e),onBlur:m,inputClassName:b,toggleMask:!0,feedback:a,header:s?_:null,footer:s?S:null,placeholder:p,tooltip:u,tooltipOptions:d}),i?require$$0.jsxs("label",{htmlFor:v+"input",className:"bee-pw-input-label",children:[i,h&&i?require$$0.jsx("span",{className:"bee-pw-input-label-required",children:require$$0.jsx("span",{className:"bee-pw-input-label-required-star",children:" *"})}):null]}):null]})}),"none"!=l&&o?(()=>{const e="medium";return require$$0.jsx("div",{className:"bee-pw-input-statusLabel",children:"error"===l&&o?require$$0.jsx(BeeLabel,{size:e,value:o,type:"error"}):"valid"===l&&o?require$$0.jsx(BeeLabel,{size:e,value:o,type:"valid"}):"neutral"===l&&o?require$$0.jsx(BeeLabel,{size:e,value:o,type:"neutral"}):null})})():null]})}function BeePercentageInput({id:e,className:t,label:i,value:r,showArrow:n,autoFocus:a,minFractionDigits:s,maxFractionDigits:o,max:l,min:c,locale:h="de-DE",disabled:p,grouping:u,statusLabel:d,formstate:f="neutral",readOnly:m,required:g,placeholder:v,tooltip:y,tooltipOptions:b,onChange:x,onFocusOut:_}){var S;const w=null!==(S=null!=e?e:libExports.useId(1,"bee-percent-input")[0])&&void 0!==S?S:"bee-percent-input",C="icon icon-right-arrow "+(r&&r>0?"up-arrow":r&&r<0?"down-arrow":"");let P="";m&&(P=" bee-percent-input-readOnly",p=!0);const E=" bee-percentage-input-container "+(n?" bee-percentage-input-container--showArrow":""),k="bee-percent-input "+("valid"===f?"bee-percent-input-valid":"error"===f?"bee-percent-input-error":"bee-percent-input-neutral")+P;return require$$0.jsxs(require$$0.Fragment,{children:[m&&!r&&0!==r?require$$0.jsx("div",{className:null!=t?t:"",children:require$$0.jsx(BeePlaceholder,{id:w,label:i})}):require$$0.jsxs("div",{className:"flex-grow-0 "+E+(t?" "+t:""),children:[n?require$$0.jsx("i",{className:C}):null,require$$0.jsxs("span",{id:w,className:"p-float-label span-container",children:[require$$0.jsx(inputnumber.InputNumber,{id:w+"input",value:null!=r?r:null,disabled:null!=p&&p,mode:"decimal",suffix:"%",autoFocus:a,useGrouping:u,minFractionDigits:s,maxFractionDigits:o,max:l,min:c,locale:h,inputClassName:k,placeholder:v,tooltip:y,tooltipOptions:b,onValueChange:e=>function(e){!p&&x&&x(e)}(e),onBlur:e=>function(e){!p&&_&&_(e)}(e)}),i?require$$0.jsxs("label",{htmlFor:w+"input",className:"bee-percent-input-label",children:[i,g&&i?require$$0.jsx("span",{className:"bee-percent-input-label-required",children:require$$0.jsx("span",{className:"bee-percent-input-label-required-star",children:" *"})}):null]}):null]})]}),"none"!=f&&d?(()=>{const e="medium";return require$$0.jsx("div",{className:"bee-percent-input-statusLabel",children:"error"===f&&d?require$$0.jsx(BeeLabel,{size:e,value:d,type:"error"}):"valid"===f&&d?require$$0.jsx(BeeLabel,{size:e,value:d,type:"valid"}):"neutral"===f&&d?require$$0.jsx(BeeLabel,{size:e,value:d,type:"neutral"}):null})})():null]})}function BeeTextArea({id:e,className:t,label:i,value:r,rows:n,disabled:a,autoResize:s,statusLabel:o,formstate:l="neutral",readOnly:c,required:h,placeholder:p,tooltip:u,tooltipOptions:d,onChange:f,onFocusOut:m}){var g;const v=null!==(g=null!=e?e:libExports.useId(1,"bee-ta-input-")[0])&&void 0!==g?g:"bee-ta-input";let y="";c&&(y=" bee-ta-input-readOnly",a=!0);const b=("valid"===l?"bee-ta-input-valid":"error"===l?"bee-ta-input-error":"neutral"===l?"bee-ta-input-neutral":"none"===l?" bee-cur-input-field-neutral":"bee-ta-input-neutral")+y;return require$$0.jsxs(require$$0.Fragment,{children:[c&&!r?require$$0.jsx("div",{className:null!=t?t:"",children:require$$0.jsx(BeePlaceholder,{id:v,label:i})}):require$$0.jsxs("span",{id:v,className:"p-float-label bee-ta-input-container"+(t?" "+t:""),children:[require$$0.jsx(require$$0.Fragment,{children:require$$0.jsx(inputtextarea.InputTextarea,{id:v+"input",value:null!=r?r:void 0,rows:n,disabled:null!=a&&a,autoResize:s,className:b,placeholder:p,tooltip:u,tooltipOptions:d,onChange:e=>function(e){!a&&f&&f(e)}(e),onBlur:e=>function(e){!a&&m&&m(e)}(e)})}),i?require$$0.jsxs("label",{htmlFor:v+"input",className:"bee-ta-input-label",children:[i,h&&i?require$$0.jsx("span",{className:"bee-ta-input-label-required",children:require$$0.jsx("span",{className:"bee-ta-input-label-required-star",children:" *"})}):null]}):null]}),"none"!=l&&o?(()=>{const e="medium";return require$$0.jsx("div",{className:"bee-ta-input-statusLabel",children:"error"===l&&o?require$$0.jsx(BeeLabel,{size:e,value:o,type:"error"}):"valid"===l&&o?require$$0.jsx(BeeLabel,{size:e,value:o,type:"valid"}):"neutral"===l&&o?require$$0.jsx(BeeLabel,{size:e,value:o,type:"neutral"}):null})})():null]})}function BeeTimeInput({id:e,className:t,label:i,value:r,disabled:n,statusLabel:a,formstate:s="neutral",readOnly:o,required:l,minDate:c,maxDate:h,showMinMaxRange:p,placeholder:u,tooltip:d,tooltipOptions:f,onChange:m,onFocusOut:g}){var v;const y=null!==(v=null!=e?e:libExports.useId(1,"bee-time-input-")[0])&&void 0!==v?v:"bee-time-input";let b="";o&&(b=" bee-time-input-readOnly",n=!0);const x="bee-time-input"+("valid"===s?" bee-time-input-valid":"error"===s?" bee-time-input-error":"neutral"===s?" bee-time-input-neutral":"none"===s?" bee-time-input-field-neutral":" bee-time-input-neutral")+b;return require$$0.jsxs(require$$0.Fragment,{children:[o&&!r?require$$0.jsx("div",{className:null!=t?t:"",children:require$$0.jsx(BeePlaceholder,{id:y,label:i})}):require$$0.jsxs("span",{id:y,className:"p-float-label bee-time-input-container"+(t?" "+t:""),children:[require$$0.jsx(calendar.Calendar,{timeOnly:!0,showTime:!0,hourFormat:"24",value:r,readOnlyInput:null!=o&&o,disabled:null!=n&&n,className:x,minDate:c?new Date(c):void 0,maxDate:h?new Date(h):void 0,showMinMaxRange:null!=p&&p,placeholder:u,tooltip:d,tooltipOptions:f,onChange:e=>function(e){!n&&m&&m(e)}(e),onBlur:e=>function(e){!n&&g&&g(e)}(e)}),i?require$$0.jsxs("label",{htmlFor:y+"input",className:"bee-time-input-label",children:[i,l&&i?require$$0.jsx("span",{className:"bee-time-input-label-required",children:require$$0.jsx("span",{className:"bee-time-input-label-required-star",children:" *"})}):null]}):null]}),"none"!=s&&a?(()=>{const e="medium";return require$$0.jsx("div",{className:"bee-time-input-statusLabel",children:"error"===s&&a?require$$0.jsx(BeeLabel,{size:e,value:a,type:"error"}):"valid"===s&&a?require$$0.jsx(BeeLabel,{size:e,value:a,type:"valid"}):"neutral"===s&&a?require$$0.jsx(BeeLabel,{size:e,value:a,type:"neutral"}):null})})():null]})}api.addLocale("de",{firstDayOfWeek:1,dayNames:["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag"],dayNamesShort:["Son","Mon","Die","Mit","Don","Fre","Sam"],dayNamesMin:["So","Mo","Di","Mi","Do","Fr","Sa"],monthNames:["Januar","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember"],monthNamesShort:["Jan","Feb","Mär","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez"],today:"Heute",clear:"Löschen"});var lodash$1={exports:{}},lodash=lodash$1.exports,hasRequiredLodash;
20
20
  /**
21
21
  * @license
22
22
  * Lodash <https://lodash.com/>
@@ -24,7 +24,7 @@
24
24
  * Released under MIT license <https://lodash.com/license>
25
25
  * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
26
26
  * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
27
- */function requireLodash(){return hasRequiredLodash||(hasRequiredLodash=1,e=lodash$1,t=lodash$1.exports,function(){var i,r="Expected a function",n="__lodash_hash_undefined__",a="__lodash_placeholder__",s=32,o=128,l=256,c=1/0,h=9007199254740991,p=NaN,u=4294967295,d=[["ary",o],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",s],["partialRight",64],["rearg",l]],f="[object Arguments]",m="[object Array]",g="[object Boolean]",v="[object Date]",y="[object Error]",b="[object Function]",x="[object GeneratorFunction]",_="[object Map]",S="[object Number]",w="[object Object]",C="[object Promise]",P="[object RegExp]",E="[object Set]",k="[object String]",$="[object Symbol]",A="[object WeakMap]",T="[object ArrayBuffer]",D="[object DataView]",M="[object Float32Array]",I="[object Float64Array]",F="[object Int8Array]",j="[object Int16Array]",R="[object Int32Array]",B="[object Uint8Array]",O="[object Uint8ClampedArray]",L="[object Uint16Array]",q="[object Uint32Array]",N=/\b__p \+= '';/g,z=/\b(__p \+=) '' \+/g,V=/(__e\(.*?\)|\b__t\)) \+\n'';/g,H=/&(?:amp|lt|gt|quot|#39);/g,W=/[&<>"']/g,G=RegExp(H.source),U=RegExp(W.source),Y=/<%-([\s\S]+?)%>/g,K=/<%([\s\S]+?)%>/g,X=/<%=([\s\S]+?)%>/g,Z=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,J=/^\w*$/,Q=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ee=/[\\^$.*+?()[\]{}|]/g,te=RegExp(ee.source),ie=/^\s+/,re=/\s/,ne=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,ae=/\{\n\/\* \[wrapped with (.+)\] \*/,se=/,? & /,oe=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,le=/[()=,{}\[\]\/\s]/,ce=/\\(\\)?/g,he=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,pe=/\w*$/,ue=/^[-+]0x[0-9a-f]+$/i,de=/^0b[01]+$/i,fe=/^\[object .+?Constructor\]$/,me=/^0o[0-7]+$/i,ge=/^(?:0|[1-9]\d*)$/,ve=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,ye=/($^)/,be=/['\n\r\u2028\u2029\\]/g,xe="\\ud800-\\udfff",_e="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",Se="\\u2700-\\u27bf",we="a-z\\xdf-\\xf6\\xf8-\\xff",Ce="A-Z\\xc0-\\xd6\\xd8-\\xde",Pe="\\ufe0e\\ufe0f",Ee="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",ke="['’]",$e="["+xe+"]",Ae="["+Ee+"]",Te="["+_e+"]",De="\\d+",Me="["+Se+"]",Ie="["+we+"]",Fe="[^"+xe+Ee+De+Se+we+Ce+"]",je="\\ud83c[\\udffb-\\udfff]",Re="[^"+xe+"]",Be="(?:\\ud83c[\\udde6-\\uddff]){2}",Oe="[\\ud800-\\udbff][\\udc00-\\udfff]",Le="["+Ce+"]",qe="\\u200d",Ne="(?:"+Ie+"|"+Fe+")",ze="(?:"+Le+"|"+Fe+")",Ve="(?:['’](?:d|ll|m|re|s|t|ve))?",He="(?:['’](?:D|LL|M|RE|S|T|VE))?",We="(?:"+Te+"|"+je+")?",Ge="["+Pe+"]?",Ue=Ge+We+"(?:"+qe+"(?:"+[Re,Be,Oe].join("|")+")"+Ge+We+")*",Ye="(?:"+[Me,Be,Oe].join("|")+")"+Ue,Ke="(?:"+[Re+Te+"?",Te,Be,Oe,$e].join("|")+")",Xe=RegExp(ke,"g"),Ze=RegExp(Te,"g"),Je=RegExp(je+"(?="+je+")|"+Ke+Ue,"g"),Qe=RegExp([Le+"?"+Ie+"+"+Ve+"(?="+[Ae,Le,"$"].join("|")+")",ze+"+"+He+"(?="+[Ae,Le+Ne,"$"].join("|")+")",Le+"?"+Ne+"+"+Ve,Le+"+"+He,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",De,Ye].join("|"),"g"),et=RegExp("["+qe+xe+_e+Pe+"]"),tt=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,it=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],rt=-1,nt={};nt[M]=nt[I]=nt[F]=nt[j]=nt[R]=nt[B]=nt[O]=nt[L]=nt[q]=!0,nt[f]=nt[m]=nt[T]=nt[g]=nt[D]=nt[v]=nt[y]=nt[b]=nt[_]=nt[S]=nt[w]=nt[P]=nt[E]=nt[k]=nt[A]=!1;var at={};at[f]=at[m]=at[T]=at[D]=at[g]=at[v]=at[M]=at[I]=at[F]=at[j]=at[R]=at[_]=at[S]=at[w]=at[P]=at[E]=at[k]=at[$]=at[B]=at[O]=at[L]=at[q]=!0,at[y]=at[b]=at[A]=!1;var st={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},ot=parseFloat,lt=parseInt,ct="object"==typeof commonjsGlobal&&commonjsGlobal&&commonjsGlobal.Object===Object&&commonjsGlobal,ht="object"==typeof self&&self&&self.Object===Object&&self,pt=ct||ht||Function("return this")(),ut=t&&!t.nodeType&&t,dt=ut&&e&&!e.nodeType&&e,ft=dt&&dt.exports===ut,mt=ft&&ct.process,gt=function(){try{var e=dt&&dt.require&&dt.require("util").types;return e||mt&&mt.binding&&mt.binding("util")}catch(e){}}(),vt=gt&&gt.isArrayBuffer,yt=gt&&gt.isDate,bt=gt&&gt.isMap,xt=gt&&gt.isRegExp,_t=gt&&gt.isSet,St=gt&&gt.isTypedArray;function wt(e,t,i){switch(i.length){case 0:return e.call(t);case 1:return e.call(t,i[0]);case 2:return e.call(t,i[0],i[1]);case 3:return e.call(t,i[0],i[1],i[2])}return e.apply(t,i)}function Ct(e,t,i,r){for(var n=-1,a=null==e?0:e.length;++n<a;){var s=e[n];t(r,s,i(s),e)}return r}function Pt(e,t){for(var i=-1,r=null==e?0:e.length;++i<r&&!1!==t(e[i],i,e););return e}function Et(e,t){for(var i=null==e?0:e.length;i--&&!1!==t(e[i],i,e););return e}function kt(e,t){for(var i=-1,r=null==e?0:e.length;++i<r;)if(!t(e[i],i,e))return!1;return!0}function $t(e,t){for(var i=-1,r=null==e?0:e.length,n=0,a=[];++i<r;){var s=e[i];t(s,i,e)&&(a[n++]=s)}return a}function At(e,t){return!(null==e||!e.length)&&Lt(e,t,0)>-1}function Tt(e,t,i){for(var r=-1,n=null==e?0:e.length;++r<n;)if(i(t,e[r]))return!0;return!1}function Dt(e,t){for(var i=-1,r=null==e?0:e.length,n=Array(r);++i<r;)n[i]=t(e[i],i,e);return n}function Mt(e,t){for(var i=-1,r=t.length,n=e.length;++i<r;)e[n+i]=t[i];return e}function It(e,t,i,r){var n=-1,a=null==e?0:e.length;for(r&&a&&(i=e[++n]);++n<a;)i=t(i,e[n],n,e);return i}function Ft(e,t,i,r){var n=null==e?0:e.length;for(r&&n&&(i=e[--n]);n--;)i=t(i,e[n],n,e);return i}function jt(e,t){for(var i=-1,r=null==e?0:e.length;++i<r;)if(t(e[i],i,e))return!0;return!1}var Rt=Vt("length");function Bt(e,t,i){var r;return i(e,function(e,i,n){if(t(e,i,n))return r=i,!1}),r}function Ot(e,t,i,r){for(var n=e.length,a=i+(r?1:-1);r?a--:++a<n;)if(t(e[a],a,e))return a;return-1}function Lt(e,t,i){return t==t?function(e,t,i){for(var r=i-1,n=e.length;++r<n;)if(e[r]===t)return r;return-1}(e,t,i):Ot(e,Nt,i)}function qt(e,t,i,r){for(var n=i-1,a=e.length;++n<a;)if(r(e[n],t))return n;return-1}function Nt(e){return e!=e}function zt(e,t){var i=null==e?0:e.length;return i?Gt(e,t)/i:p}function Vt(e){return function(t){return null==t?i:t[e]}}function Ht(e){return function(t){return null==e?i:e[t]}}function Wt(e,t,i,r,n){return n(e,function(e,n,a){i=r?(r=!1,e):t(i,e,n,a)}),i}function Gt(e,t){for(var r,n=-1,a=e.length;++n<a;){var s=t(e[n]);s!==i&&(r=r===i?s:r+s)}return r}function Ut(e,t){for(var i=-1,r=Array(e);++i<e;)r[i]=t(i);return r}function Yt(e){return e?e.slice(0,pi(e)+1).replace(ie,""):e}function Kt(e){return function(t){return e(t)}}function Xt(e,t){return Dt(t,function(t){return e[t]})}function Zt(e,t){return e.has(t)}function Jt(e,t){for(var i=-1,r=e.length;++i<r&&Lt(t,e[i],0)>-1;);return i}function Qt(e,t){for(var i=e.length;i--&&Lt(t,e[i],0)>-1;);return i}var ei=Ht({"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"}),ti=Ht({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"});function ii(e){return"\\"+st[e]}function ri(e){return et.test(e)}function ni(e){var t=-1,i=Array(e.size);return e.forEach(function(e,r){i[++t]=[r,e]}),i}function ai(e,t){return function(i){return e(t(i))}}function si(e,t){for(var i=-1,r=e.length,n=0,s=[];++i<r;){var o=e[i];o!==t&&o!==a||(e[i]=a,s[n++]=i)}return s}function oi(e){var t=-1,i=Array(e.size);return e.forEach(function(e){i[++t]=e}),i}function li(e){var t=-1,i=Array(e.size);return e.forEach(function(e){i[++t]=[e,e]}),i}function ci(e){return ri(e)?function(e){for(var t=Je.lastIndex=0;Je.test(e);)++t;return t}(e):Rt(e)}function hi(e){return ri(e)?function(e){return e.match(Je)||[]}(e):function(e){return e.split("")}(e)}function pi(e){for(var t=e.length;t--&&re.test(e.charAt(t)););return t}var ui=Ht({"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"}),di=function e(t){var re=(t=null==t?pt:di.defaults(pt.Object(),t,di.pick(pt,it))).Array,xe=t.Date,_e=t.Error,Se=t.Function,we=t.Math,Ce=t.Object,Pe=t.RegExp,Ee=t.String,ke=t.TypeError,$e=re.prototype,Ae=Se.prototype,Te=Ce.prototype,De=t["__core-js_shared__"],Me=Ae.toString,Ie=Te.hasOwnProperty,Fe=0,je=function(){var e=/[^.]+$/.exec(De&&De.keys&&De.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),Re=Te.toString,Be=Me.call(Ce),Oe=pt._,Le=Pe("^"+Me.call(Ie).replace(ee,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),qe=ft?t.Buffer:i,Ne=t.Symbol,ze=t.Uint8Array,Ve=qe?qe.allocUnsafe:i,He=ai(Ce.getPrototypeOf,Ce),We=Ce.create,Ge=Te.propertyIsEnumerable,Ue=$e.splice,Ye=Ne?Ne.isConcatSpreadable:i,Ke=Ne?Ne.iterator:i,Je=Ne?Ne.toStringTag:i,et=function(){try{var e=ca(Ce,"defineProperty");return e({},"",{}),e}catch(e){}}(),st=t.clearTimeout!==pt.clearTimeout&&t.clearTimeout,ct=xe&&xe.now!==pt.Date.now&&xe.now,ht=t.setTimeout!==pt.setTimeout&&t.setTimeout,ut=we.ceil,dt=we.floor,mt=Ce.getOwnPropertySymbols,gt=qe?qe.isBuffer:i,Rt=t.isFinite,Ht=$e.join,fi=ai(Ce.keys,Ce),mi=we.max,gi=we.min,vi=xe.now,yi=t.parseInt,bi=we.random,xi=$e.reverse,_i=ca(t,"DataView"),Si=ca(t,"Map"),wi=ca(t,"Promise"),Ci=ca(t,"Set"),Pi=ca(t,"WeakMap"),Ei=ca(Ce,"create"),ki=Pi&&new Pi,$i={},Ai=ja(_i),Ti=ja(Si),Di=ja(wi),Mi=ja(Ci),Ii=ja(Pi),Fi=Ne?Ne.prototype:i,ji=Fi?Fi.valueOf:i,Ri=Fi?Fi.toString:i;function Bi(e){if(Js(e)&&!Ns(e)&&!(e instanceof Ni)){if(e instanceof qi)return e;if(Ie.call(e,"__wrapped__"))return Ra(e)}return new qi(e)}var Oi=function(){function e(){}return function(t){if(!Zs(t))return{};if(We)return We(t);e.prototype=t;var r=new e;return e.prototype=i,r}}();function Li(){}function qi(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=i}function Ni(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=u,this.__views__=[]}function zi(e){var t=-1,i=null==e?0:e.length;for(this.clear();++t<i;){var r=e[t];this.set(r[0],r[1])}}function Vi(e){var t=-1,i=null==e?0:e.length;for(this.clear();++t<i;){var r=e[t];this.set(r[0],r[1])}}function Hi(e){var t=-1,i=null==e?0:e.length;for(this.clear();++t<i;){var r=e[t];this.set(r[0],r[1])}}function Wi(e){var t=-1,i=null==e?0:e.length;for(this.__data__=new Hi;++t<i;)this.add(e[t])}function Gi(e){var t=this.__data__=new Vi(e);this.size=t.size}function Ui(e,t){var i=Ns(e),r=!i&&qs(e),n=!i&&!r&&Ws(e),a=!i&&!r&&!n&&so(e),s=i||r||n||a,o=s?Ut(e.length,Ee):[],l=o.length;for(var c in e)!t&&!Ie.call(e,c)||s&&("length"==c||n&&("offset"==c||"parent"==c)||a&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||ga(c,l))||o.push(c);return o}function Yi(e){var t=e.length;return t?e[Wr(0,t-1)]:i}function Ki(e,t){return Ma(kn(e),nr(t,0,e.length))}function Xi(e){return Ma(kn(e))}function Zi(e,t,r){(r!==i&&!Bs(e[t],r)||r===i&&!(t in e))&&ir(e,t,r)}function Ji(e,t,r){var n=e[t];Ie.call(e,t)&&Bs(n,r)&&(r!==i||t in e)||ir(e,t,r)}function Qi(e,t){for(var i=e.length;i--;)if(Bs(e[i][0],t))return i;return-1}function er(e,t,i,r){return cr(e,function(e,n,a){t(r,e,i(e),a)}),r}function tr(e,t){return e&&$n(t,Ao(t),e)}function ir(e,t,i){"__proto__"==t&&et?et(e,t,{configurable:!0,enumerable:!0,value:i,writable:!0}):e[t]=i}function rr(e,t){for(var r=-1,n=t.length,a=re(n),s=null==e;++r<n;)a[r]=s?i:Co(e,t[r]);return a}function nr(e,t,r){return e==e&&(r!==i&&(e=e<=r?e:r),t!==i&&(e=e>=t?e:t)),e}function ar(e,t,r,n,a,s){var o,l=1&t,c=2&t,h=4&t;if(r&&(o=a?r(e,n,a,s):r(e)),o!==i)return o;if(!Zs(e))return e;var p=Ns(e);if(p){if(o=function(e){var t=e.length,i=new e.constructor(t);return t&&"string"==typeof e[0]&&Ie.call(e,"index")&&(i.index=e.index,i.input=e.input),i}(e),!l)return kn(e,o)}else{var u=ua(e),d=u==b||u==x;if(Ws(e))return _n(e,l);if(u==w||u==f||d&&!a){if(o=c||d?{}:fa(e),!l)return c?function(e,t){return $n(e,pa(e),t)}(e,function(e,t){return e&&$n(t,To(t),e)}(o,e)):function(e,t){return $n(e,ha(e),t)}(e,tr(o,e))}else{if(!at[u])return a?e:{};o=function(e,t,i){var r,n=e.constructor;switch(t){case T:return Sn(e);case g:case v:return new n(+e);case D:return function(e,t){var i=t?Sn(e.buffer):e.buffer;return new e.constructor(i,e.byteOffset,e.byteLength)}(e,i);case M:case I:case F:case j:case R:case B:case O:case L:case q:return wn(e,i);case _:return new n;case S:case k:return new n(e);case P:return function(e){var t=new e.constructor(e.source,pe.exec(e));return t.lastIndex=e.lastIndex,t}(e);case E:return new n;case $:return r=e,ji?Ce(ji.call(r)):{}}}(e,u,l)}}s||(s=new Gi);var m=s.get(e);if(m)return m;s.set(e,o),ro(e)?e.forEach(function(i){o.add(ar(i,t,r,i,e,s))}):Qs(e)&&e.forEach(function(i,n){o.set(n,ar(i,t,r,n,e,s))});var y=p?i:(h?c?ia:ta:c?To:Ao)(e);return Pt(y||e,function(i,n){y&&(i=e[n=i]),Ji(o,n,ar(i,t,r,n,e,s))}),o}function sr(e,t,r){var n=r.length;if(null==e)return!n;for(e=Ce(e);n--;){var a=r[n],s=t[a],o=e[a];if(o===i&&!(a in e)||!s(o))return!1}return!0}function or(e,t,n){if("function"!=typeof e)throw new ke(r);return $a(function(){e.apply(i,n)},t)}function lr(e,t,i,r){var n=-1,a=At,s=!0,o=e.length,l=[],c=t.length;if(!o)return l;i&&(t=Dt(t,Kt(i))),r?(a=Tt,s=!1):t.length>=200&&(a=Zt,s=!1,t=new Wi(t));e:for(;++n<o;){var h=e[n],p=null==i?h:i(h);if(h=r||0!==h?h:0,s&&p==p){for(var u=c;u--;)if(t[u]===p)continue e;l.push(h)}else a(t,p,r)||l.push(h)}return l}Bi.templateSettings={escape:Y,evaluate:K,interpolate:X,variable:"",imports:{_:Bi}},Bi.prototype=Li.prototype,Bi.prototype.constructor=Bi,qi.prototype=Oi(Li.prototype),qi.prototype.constructor=qi,Ni.prototype=Oi(Li.prototype),Ni.prototype.constructor=Ni,zi.prototype.clear=function(){this.__data__=Ei?Ei(null):{},this.size=0},zi.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},zi.prototype.get=function(e){var t=this.__data__;if(Ei){var r=t[e];return r===n?i:r}return Ie.call(t,e)?t[e]:i},zi.prototype.has=function(e){var t=this.__data__;return Ei?t[e]!==i:Ie.call(t,e)},zi.prototype.set=function(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=Ei&&t===i?n:t,this},Vi.prototype.clear=function(){this.__data__=[],this.size=0},Vi.prototype.delete=function(e){var t=this.__data__,i=Qi(t,e);return!(i<0||(i==t.length-1?t.pop():Ue.call(t,i,1),--this.size,0))},Vi.prototype.get=function(e){var t=this.__data__,r=Qi(t,e);return r<0?i:t[r][1]},Vi.prototype.has=function(e){return Qi(this.__data__,e)>-1},Vi.prototype.set=function(e,t){var i=this.__data__,r=Qi(i,e);return r<0?(++this.size,i.push([e,t])):i[r][1]=t,this},Hi.prototype.clear=function(){this.size=0,this.__data__={hash:new zi,map:new(Si||Vi),string:new zi}},Hi.prototype.delete=function(e){var t=oa(this,e).delete(e);return this.size-=t?1:0,t},Hi.prototype.get=function(e){return oa(this,e).get(e)},Hi.prototype.has=function(e){return oa(this,e).has(e)},Hi.prototype.set=function(e,t){var i=oa(this,e),r=i.size;return i.set(e,t),this.size+=i.size==r?0:1,this},Wi.prototype.add=Wi.prototype.push=function(e){return this.__data__.set(e,n),this},Wi.prototype.has=function(e){return this.__data__.has(e)},Gi.prototype.clear=function(){this.__data__=new Vi,this.size=0},Gi.prototype.delete=function(e){var t=this.__data__,i=t.delete(e);return this.size=t.size,i},Gi.prototype.get=function(e){return this.__data__.get(e)},Gi.prototype.has=function(e){return this.__data__.has(e)},Gi.prototype.set=function(e,t){var i=this.__data__;if(i instanceof Vi){var r=i.__data__;if(!Si||r.length<199)return r.push([e,t]),this.size=++i.size,this;i=this.__data__=new Hi(r)}return i.set(e,t),this.size=i.size,this};var cr=Dn(vr),hr=Dn(yr,!0);function pr(e,t){var i=!0;return cr(e,function(e,r,n){return i=!!t(e,r,n)}),i}function ur(e,t,r){for(var n=-1,a=e.length;++n<a;){var s=e[n],o=t(s);if(null!=o&&(l===i?o==o&&!ao(o):r(o,l)))var l=o,c=s}return c}function dr(e,t){var i=[];return cr(e,function(e,r,n){t(e,r,n)&&i.push(e)}),i}function fr(e,t,i,r,n){var a=-1,s=e.length;for(i||(i=ma),n||(n=[]);++a<s;){var o=e[a];t>0&&i(o)?t>1?fr(o,t-1,i,r,n):Mt(n,o):r||(n[n.length]=o)}return n}var mr=Mn(),gr=Mn(!0);function vr(e,t){return e&&mr(e,t,Ao)}function yr(e,t){return e&&gr(e,t,Ao)}function br(e,t){return $t(t,function(t){return Ys(e[t])})}function xr(e,t){for(var r=0,n=(t=vn(t,e)).length;null!=e&&r<n;)e=e[Fa(t[r++])];return r&&r==n?e:i}function _r(e,t,i){var r=t(e);return Ns(e)?r:Mt(r,i(e))}function Sr(e){return null==e?e===i?"[object Undefined]":"[object Null]":Je&&Je in Ce(e)?function(e){var t=Ie.call(e,Je),r=e[Je];try{e[Je]=i;var n=!0}catch(e){}var a=Re.call(e);return n&&(t?e[Je]=r:delete e[Je]),a}(e):function(e){return Re.call(e)}(e)}function wr(e,t){return e>t}function Cr(e,t){return null!=e&&Ie.call(e,t)}function Pr(e,t){return null!=e&&t in Ce(e)}function Er(e,t,r){for(var n=r?Tt:At,a=e[0].length,s=e.length,o=s,l=re(s),c=1/0,h=[];o--;){var p=e[o];o&&t&&(p=Dt(p,Kt(t))),c=gi(p.length,c),l[o]=!r&&(t||a>=120&&p.length>=120)?new Wi(o&&p):i}p=e[0];var u=-1,d=l[0];e:for(;++u<a&&h.length<c;){var f=p[u],m=t?t(f):f;if(f=r||0!==f?f:0,!(d?Zt(d,m):n(h,m,r))){for(o=s;--o;){var g=l[o];if(!(g?Zt(g,m):n(e[o],m,r)))continue e}d&&d.push(m),h.push(f)}}return h}function kr(e,t,r){var n=null==(e=Pa(e,t=vn(t,e)))?e:e[Fa(Ua(t))];return null==n?i:wt(n,e,r)}function $r(e){return Js(e)&&Sr(e)==f}function Ar(e,t,r,n,a){return e===t||(null==e||null==t||!Js(e)&&!Js(t)?e!=e&&t!=t:function(e,t,r,n,a,s){var o=Ns(e),l=Ns(t),c=o?m:ua(e),h=l?m:ua(t),p=(c=c==f?w:c)==w,u=(h=h==f?w:h)==w,d=c==h;if(d&&Ws(e)){if(!Ws(t))return!1;o=!0,p=!1}if(d&&!p)return s||(s=new Gi),o||so(e)?Qn(e,t,r,n,a,s):function(e,t,i,r,n,a,s){switch(i){case D:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case T:return!(e.byteLength!=t.byteLength||!a(new ze(e),new ze(t)));case g:case v:case S:return Bs(+e,+t);case y:return e.name==t.name&&e.message==t.message;case P:case k:return e==t+"";case _:var o=ni;case E:var l=1&r;if(o||(o=oi),e.size!=t.size&&!l)return!1;var c=s.get(e);if(c)return c==t;r|=2,s.set(e,t);var h=Qn(o(e),o(t),r,n,a,s);return s.delete(e),h;case $:if(ji)return ji.call(e)==ji.call(t)}return!1}(e,t,c,r,n,a,s);if(!(1&r)){var b=p&&Ie.call(e,"__wrapped__"),x=u&&Ie.call(t,"__wrapped__");if(b||x){var C=b?e.value():e,A=x?t.value():t;return s||(s=new Gi),a(C,A,r,n,s)}}return!!d&&(s||(s=new Gi),function(e,t,r,n,a,s){var o=1&r,l=ta(e),c=l.length,h=ta(t),p=h.length;if(c!=p&&!o)return!1;for(var u=c;u--;){var d=l[u];if(!(o?d in t:Ie.call(t,d)))return!1}var f=s.get(e),m=s.get(t);if(f&&m)return f==t&&m==e;var g=!0;s.set(e,t),s.set(t,e);for(var v=o;++u<c;){var y=e[d=l[u]],b=t[d];if(n)var x=o?n(b,y,d,t,e,s):n(y,b,d,e,t,s);if(!(x===i?y===b||a(y,b,r,n,s):x)){g=!1;break}v||(v="constructor"==d)}if(g&&!v){var _=e.constructor,S=t.constructor;_==S||!("constructor"in e)||!("constructor"in t)||"function"==typeof _&&_ instanceof _&&"function"==typeof S&&S instanceof S||(g=!1)}return s.delete(e),s.delete(t),g}(e,t,r,n,a,s))}(e,t,r,n,Ar,a))}function Tr(e,t,r,n){var a=r.length,s=a,o=!n;if(null==e)return!s;for(e=Ce(e);a--;){var l=r[a];if(o&&l[2]?l[1]!==e[l[0]]:!(l[0]in e))return!1}for(;++a<s;){var c=(l=r[a])[0],h=e[c],p=l[1];if(o&&l[2]){if(h===i&&!(c in e))return!1}else{var u=new Gi;if(n)var d=n(h,p,c,e,t,u);if(!(d===i?Ar(p,h,3,n,u):d))return!1}}return!0}function Dr(e){return!(!Zs(e)||(t=e,je&&je in t))&&(Ys(e)?Le:fe).test(ja(e));var t}function Mr(e){return"function"==typeof e?e:null==e?tl:"object"==typeof e?Ns(e)?Or(e[0],e[1]):Br(e):hl(e)}function Ir(e){if(!_a(e))return fi(e);var t=[];for(var i in Ce(e))Ie.call(e,i)&&"constructor"!=i&&t.push(i);return t}function Fr(e){if(!Zs(e))return function(e){var t=[];if(null!=e)for(var i in Ce(e))t.push(i);return t}(e);var t=_a(e),i=[];for(var r in e)("constructor"!=r||!t&&Ie.call(e,r))&&i.push(r);return i}function jr(e,t){return e<t}function Rr(e,t){var i=-1,r=Vs(e)?re(e.length):[];return cr(e,function(e,n,a){r[++i]=t(e,n,a)}),r}function Br(e){var t=la(e);return 1==t.length&&t[0][2]?wa(t[0][0],t[0][1]):function(i){return i===e||Tr(i,e,t)}}function Or(e,t){return ya(e)&&Sa(t)?wa(Fa(e),t):function(r){var n=Co(r,e);return n===i&&n===t?Po(r,e):Ar(t,n,3)}}function Lr(e,t,r,n,a){e!==t&&mr(t,function(s,o){if(a||(a=new Gi),Zs(s))!function(e,t,r,n,a,s,o){var l=Ea(e,r),c=Ea(t,r),h=o.get(c);if(h)Zi(e,r,h);else{var p=s?s(l,c,r+"",e,t,o):i,u=p===i;if(u){var d=Ns(c),f=!d&&Ws(c),m=!d&&!f&&so(c);p=c,d||f||m?Ns(l)?p=l:Hs(l)?p=kn(l):f?(u=!1,p=_n(c,!0)):m?(u=!1,p=wn(c,!0)):p=[]:to(c)||qs(c)?(p=l,qs(l)?p=mo(l):Zs(l)&&!Ys(l)||(p=fa(c))):u=!1}u&&(o.set(c,p),a(p,c,n,s,o),o.delete(c)),Zi(e,r,p)}}(e,t,o,r,Lr,n,a);else{var l=n?n(Ea(e,o),s,o+"",e,t,a):i;l===i&&(l=s),Zi(e,o,l)}},To)}function qr(e,t){var r=e.length;if(r)return ga(t+=t<0?r:0,r)?e[t]:i}function Nr(e,t,i){t=t.length?Dt(t,function(e){return Ns(e)?function(t){return xr(t,1===e.length?e[0]:e)}:e}):[tl];var r=-1;t=Dt(t,Kt(sa()));var n=Rr(e,function(e,i,n){var a=Dt(t,function(t){return t(e)});return{criteria:a,index:++r,value:e}});return function(e,t){var i=e.length;for(e.sort(t);i--;)e[i]=e[i].value;return e}(n,function(e,t){return function(e,t,i){for(var r=-1,n=e.criteria,a=t.criteria,s=n.length,o=i.length;++r<s;){var l=Cn(n[r],a[r]);if(l)return r>=o?l:l*("desc"==i[r]?-1:1)}return e.index-t.index}(e,t,i)})}function zr(e,t,i){for(var r=-1,n=t.length,a={};++r<n;){var s=t[r],o=xr(e,s);i(o,s)&&Xr(a,vn(s,e),o)}return a}function Vr(e,t,i,r){var n=r?qt:Lt,a=-1,s=t.length,o=e;for(e===t&&(t=kn(t)),i&&(o=Dt(e,Kt(i)));++a<s;)for(var l=0,c=t[a],h=i?i(c):c;(l=n(o,h,l,r))>-1;)o!==e&&Ue.call(o,l,1),Ue.call(e,l,1);return e}function Hr(e,t){for(var i=e?t.length:0,r=i-1;i--;){var n=t[i];if(i==r||n!==a){var a=n;ga(n)?Ue.call(e,n,1):cn(e,n)}}return e}function Wr(e,t){return e+dt(bi()*(t-e+1))}function Gr(e,t){var i="";if(!e||t<1||t>h)return i;do{t%2&&(i+=e),(t=dt(t/2))&&(e+=e)}while(t);return i}function Ur(e,t){return Aa(Ca(e,t,tl),e+"")}function Yr(e){return Yi(Oo(e))}function Kr(e,t){var i=Oo(e);return Ma(i,nr(t,0,i.length))}function Xr(e,t,r,n){if(!Zs(e))return e;for(var a=-1,s=(t=vn(t,e)).length,o=s-1,l=e;null!=l&&++a<s;){var c=Fa(t[a]),h=r;if("__proto__"===c||"constructor"===c||"prototype"===c)return e;if(a!=o){var p=l[c];(h=n?n(p,c,l):i)===i&&(h=Zs(p)?p:ga(t[a+1])?[]:{})}Ji(l,c,h),l=l[c]}return e}var Zr=ki?function(e,t){return ki.set(e,t),e}:tl,Jr=et?function(e,t){return et(e,"toString",{configurable:!0,enumerable:!1,value:Jo(t),writable:!0})}:tl;function Qr(e){return Ma(Oo(e))}function en(e,t,i){var r=-1,n=e.length;t<0&&(t=-t>n?0:n+t),(i=i>n?n:i)<0&&(i+=n),n=t>i?0:i-t>>>0,t>>>=0;for(var a=re(n);++r<n;)a[r]=e[r+t];return a}function tn(e,t){var i;return cr(e,function(e,r,n){return!(i=t(e,r,n))}),!!i}function rn(e,t,i){var r=0,n=null==e?r:e.length;if("number"==typeof t&&t==t&&n<=2147483647){for(;r<n;){var a=r+n>>>1,s=e[a];null!==s&&!ao(s)&&(i?s<=t:s<t)?r=a+1:n=a}return n}return nn(e,t,tl,i)}function nn(e,t,r,n){var a=0,s=null==e?0:e.length;if(0===s)return 0;for(var o=(t=r(t))!=t,l=null===t,c=ao(t),h=t===i;a<s;){var p=dt((a+s)/2),u=r(e[p]),d=u!==i,f=null===u,m=u==u,g=ao(u);if(o)var v=n||m;else v=h?m&&(n||d):l?m&&d&&(n||!f):c?m&&d&&!f&&(n||!g):!f&&!g&&(n?u<=t:u<t);v?a=p+1:s=p}return gi(s,4294967294)}function an(e,t){for(var i=-1,r=e.length,n=0,a=[];++i<r;){var s=e[i],o=t?t(s):s;if(!i||!Bs(o,l)){var l=o;a[n++]=0===s?0:s}}return a}function sn(e){return"number"==typeof e?e:ao(e)?p:+e}function on(e){if("string"==typeof e)return e;if(Ns(e))return Dt(e,on)+"";if(ao(e))return Ri?Ri.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function ln(e,t,i){var r=-1,n=At,a=e.length,s=!0,o=[],l=o;if(i)s=!1,n=Tt;else if(a>=200){var c=t?null:Un(e);if(c)return oi(c);s=!1,n=Zt,l=new Wi}else l=t?[]:o;e:for(;++r<a;){var h=e[r],p=t?t(h):h;if(h=i||0!==h?h:0,s&&p==p){for(var u=l.length;u--;)if(l[u]===p)continue e;t&&l.push(p),o.push(h)}else n(l,p,i)||(l!==o&&l.push(p),o.push(h))}return o}function cn(e,t){var i=-1,r=(t=vn(t,e)).length;if(!r)return!0;for(var n=null==e||"object"!=typeof e&&"function"!=typeof e;++i<r;){var a=t[i];if("string"==typeof a){if("__proto__"===a&&!Ie.call(e,"__proto__"))return!1;if("constructor"===a&&i+1<r&&"string"==typeof t[i+1]&&"prototype"===t[i+1]){if(n&&0===i)continue;return!1}}}var s=Pa(e,t);return null==s||delete s[Fa(Ua(t))]}function hn(e,t,i,r){return Xr(e,t,i(xr(e,t)),r)}function pn(e,t,i,r){for(var n=e.length,a=r?n:-1;(r?a--:++a<n)&&t(e[a],a,e););return i?en(e,r?0:a,r?a+1:n):en(e,r?a+1:0,r?n:a)}function un(e,t){var i=e;return i instanceof Ni&&(i=i.value()),It(t,function(e,t){return t.func.apply(t.thisArg,Mt([e],t.args))},i)}function dn(e,t,i){var r=e.length;if(r<2)return r?ln(e[0]):[];for(var n=-1,a=re(r);++n<r;)for(var s=e[n],o=-1;++o<r;)o!=n&&(a[n]=lr(a[n]||s,e[o],t,i));return ln(fr(a,1),t,i)}function fn(e,t,r){for(var n=-1,a=e.length,s=t.length,o={};++n<a;){var l=n<s?t[n]:i;r(o,e[n],l)}return o}function mn(e){return Hs(e)?e:[]}function gn(e){return"function"==typeof e?e:tl}function vn(e,t){return Ns(e)?e:ya(e,t)?[e]:Ia(go(e))}var yn=Ur;function bn(e,t,r){var n=e.length;return r=r===i?n:r,!t&&r>=n?e:en(e,t,r)}var xn=st||function(e){return pt.clearTimeout(e)};function _n(e,t){if(t)return e.slice();var i=e.length,r=Ve?Ve(i):new e.constructor(i);return e.copy(r),r}function Sn(e){var t=new e.constructor(e.byteLength);return new ze(t).set(new ze(e)),t}function wn(e,t){var i=t?Sn(e.buffer):e.buffer;return new e.constructor(i,e.byteOffset,e.length)}function Cn(e,t){if(e!==t){var r=e!==i,n=null===e,a=e==e,s=ao(e),o=t!==i,l=null===t,c=t==t,h=ao(t);if(!l&&!h&&!s&&e>t||s&&o&&c&&!l&&!h||n&&o&&c||!r&&c||!a)return 1;if(!n&&!s&&!h&&e<t||h&&r&&a&&!n&&!s||l&&r&&a||!o&&a||!c)return-1}return 0}function Pn(e,t,i,r){for(var n=-1,a=e.length,s=i.length,o=-1,l=t.length,c=mi(a-s,0),h=re(l+c),p=!r;++o<l;)h[o]=t[o];for(;++n<s;)(p||n<a)&&(h[i[n]]=e[n]);for(;c--;)h[o++]=e[n++];return h}function En(e,t,i,r){for(var n=-1,a=e.length,s=-1,o=i.length,l=-1,c=t.length,h=mi(a-o,0),p=re(h+c),u=!r;++n<h;)p[n]=e[n];for(var d=n;++l<c;)p[d+l]=t[l];for(;++s<o;)(u||n<a)&&(p[d+i[s]]=e[n++]);return p}function kn(e,t){var i=-1,r=e.length;for(t||(t=re(r));++i<r;)t[i]=e[i];return t}function $n(e,t,r,n){var a=!r;r||(r={});for(var s=-1,o=t.length;++s<o;){var l=t[s],c=n?n(r[l],e[l],l,r,e):i;c===i&&(c=e[l]),a?ir(r,l,c):Ji(r,l,c)}return r}function An(e,t){return function(i,r){var n=Ns(i)?Ct:er,a=t?t():{};return n(i,e,sa(r,2),a)}}function Tn(e){return Ur(function(t,r){var n=-1,a=r.length,s=a>1?r[a-1]:i,o=a>2?r[2]:i;for(s=e.length>3&&"function"==typeof s?(a--,s):i,o&&va(r[0],r[1],o)&&(s=a<3?i:s,a=1),t=Ce(t);++n<a;){var l=r[n];l&&e(t,l,n,s)}return t})}function Dn(e,t){return function(i,r){if(null==i)return i;if(!Vs(i))return e(i,r);for(var n=i.length,a=t?n:-1,s=Ce(i);(t?a--:++a<n)&&!1!==r(s[a],a,s););return i}}function Mn(e){return function(t,i,r){for(var n=-1,a=Ce(t),s=r(t),o=s.length;o--;){var l=s[e?o:++n];if(!1===i(a[l],l,a))break}return t}}function In(e){return function(t){var r=ri(t=go(t))?hi(t):i,n=r?r[0]:t.charAt(0),a=r?bn(r,1).join(""):t.slice(1);return n[e]()+a}}function Fn(e){return function(t){return It(Ko(No(t).replace(Xe,"")),e,"")}}function jn(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var i=Oi(e.prototype),r=e.apply(i,t);return Zs(r)?r:i}}function Rn(e){return function(t,r,n){var a=Ce(t);if(!Vs(t)){var s=sa(r,3);t=Ao(t),r=function(e){return s(a[e],e,a)}}var o=e(t,r,n);return o>-1?a[s?t[o]:o]:i}}function Bn(e){return ea(function(t){var n=t.length,a=n,s=qi.prototype.thru;for(e&&t.reverse();a--;){var o=t[a];if("function"!=typeof o)throw new ke(r);if(s&&!l&&"wrapper"==na(o))var l=new qi([],!0)}for(a=l?a:n;++a<n;){var c=na(o=t[a]),h="wrapper"==c?ra(o):i;l=h&&ba(h[0])&&424==h[1]&&!h[4].length&&1==h[9]?l[na(h[0])].apply(l,h[3]):1==o.length&&ba(o)?l[c]():l.thru(o)}return function(){var e=arguments,i=e[0];if(l&&1==e.length&&Ns(i))return l.plant(i).value();for(var r=0,a=n?t[r].apply(this,e):i;++r<n;)a=t[r].call(this,a);return a}})}function On(e,t,r,n,a,s,l,c,h,p){var u=t&o,d=1&t,f=2&t,m=24&t,g=512&t,v=f?i:jn(e);return function o(){for(var y=arguments.length,b=re(y),x=y;x--;)b[x]=arguments[x];if(m)var _=aa(o),S=function(e,t){for(var i=e.length,r=0;i--;)e[i]===t&&++r;return r}(b,_);if(n&&(b=Pn(b,n,a,m)),s&&(b=En(b,s,l,m)),y-=S,m&&y<p){var w=si(b,_);return Wn(e,t,On,o.placeholder,r,b,w,c,h,p-y)}var C=d?r:this,P=f?C[e]:e;return y=b.length,c?b=function(e,t){for(var r=e.length,n=gi(t.length,r),a=kn(e);n--;){var s=t[n];e[n]=ga(s,r)?a[s]:i}return e}(b,c):g&&y>1&&b.reverse(),u&&h<y&&(b.length=h),this&&this!==pt&&this instanceof o&&(P=v||jn(P)),P.apply(C,b)}}function Ln(e,t){return function(i,r){return function(e,t,i,r){return vr(e,function(e,n,a){t(r,i(e),n,a)}),r}(i,e,t(r),{})}}function qn(e,t){return function(r,n){var a;if(r===i&&n===i)return t;if(r!==i&&(a=r),n!==i){if(a===i)return n;"string"==typeof r||"string"==typeof n?(r=on(r),n=on(n)):(r=sn(r),n=sn(n)),a=e(r,n)}return a}}function Nn(e){return ea(function(t){return t=Dt(t,Kt(sa())),Ur(function(i){var r=this;return e(t,function(e){return wt(e,r,i)})})})}function zn(e,t){var r=(t=t===i?" ":on(t)).length;if(r<2)return r?Gr(t,e):t;var n=Gr(t,ut(e/ci(t)));return ri(t)?bn(hi(n),0,e).join(""):n.slice(0,e)}function Vn(e){return function(t,r,n){return n&&"number"!=typeof n&&va(t,r,n)&&(r=n=i),t=ho(t),r===i?(r=t,t=0):r=ho(r),function(e,t,i,r){for(var n=-1,a=mi(ut((t-e)/(i||1)),0),s=re(a);a--;)s[r?a:++n]=e,e+=i;return s}(t,r,n=n===i?t<r?1:-1:ho(n),e)}}function Hn(e){return function(t,i){return"string"==typeof t&&"string"==typeof i||(t=fo(t),i=fo(i)),e(t,i)}}function Wn(e,t,r,n,a,o,l,c,h,p){var u=8&t;t|=u?s:64,4&(t&=~(u?64:s))||(t&=-4);var d=[e,t,a,u?o:i,u?l:i,u?i:o,u?i:l,c,h,p],f=r.apply(i,d);return ba(e)&&ka(f,d),f.placeholder=n,Ta(f,e,t)}function Gn(e){var t=we[e];return function(e,i){if(e=fo(e),(i=null==i?0:gi(po(i),292))&&Rt(e)){var r=(go(e)+"e").split("e");return+((r=(go(t(r[0]+"e"+(+r[1]+i)))+"e").split("e"))[0]+"e"+(+r[1]-i))}return t(e)}}var Un=Ci&&1/oi(new Ci([,-0]))[1]==c?function(e){return new Ci(e)}:sl;function Yn(e){return function(t){var i=ua(t);return i==_?ni(t):i==E?li(t):function(e,t){return Dt(t,function(t){return[t,e[t]]})}(t,e(t))}}function Kn(e,t,n,c,h,p,u,d){var f=2&t;if(!f&&"function"!=typeof e)throw new ke(r);var m=c?c.length:0;if(m||(t&=-97,c=h=i),u=u===i?u:mi(po(u),0),d=d===i?d:po(d),m-=h?h.length:0,64&t){var g=c,v=h;c=h=i}var y=f?i:ra(e),b=[e,t,n,c,h,g,v,p,u,d];if(y&&function(e,t){var i=e[1],r=t[1],n=i|r,s=n<131,c=r==o&&8==i||r==o&&i==l&&e[7].length<=t[8]||384==r&&t[7].length<=t[8]&&8==i;if(!s&&!c)return e;1&r&&(e[2]=t[2],n|=1&i?0:4);var h=t[3];if(h){var p=e[3];e[3]=p?Pn(p,h,t[4]):h,e[4]=p?si(e[3],a):t[4]}(h=t[5])&&(p=e[5],e[5]=p?En(p,h,t[6]):h,e[6]=p?si(e[5],a):t[6]),(h=t[7])&&(e[7]=h),r&o&&(e[8]=null==e[8]?t[8]:gi(e[8],t[8])),null==e[9]&&(e[9]=t[9]),e[0]=t[0],e[1]=n}(b,y),e=b[0],t=b[1],n=b[2],c=b[3],h=b[4],!(d=b[9]=b[9]===i?f?0:e.length:mi(b[9]-m,0))&&24&t&&(t&=-25),t&&1!=t)x=8==t||16==t?function(e,t,r){var n=jn(e);return function a(){for(var s=arguments.length,o=re(s),l=s,c=aa(a);l--;)o[l]=arguments[l];var h=s<3&&o[0]!==c&&o[s-1]!==c?[]:si(o,c);return(s-=h.length)<r?Wn(e,t,On,a.placeholder,i,o,h,i,i,r-s):wt(this&&this!==pt&&this instanceof a?n:e,this,o)}}(e,t,d):t!=s&&33!=t||h.length?On.apply(i,b):function(e,t,i,r){var n=1&t,a=jn(e);return function t(){for(var s=-1,o=arguments.length,l=-1,c=r.length,h=re(c+o),p=this&&this!==pt&&this instanceof t?a:e;++l<c;)h[l]=r[l];for(;o--;)h[l++]=arguments[++s];return wt(p,n?i:this,h)}}(e,t,n,c);else var x=function(e,t,i){var r=1&t,n=jn(e);return function t(){return(this&&this!==pt&&this instanceof t?n:e).apply(r?i:this,arguments)}}(e,t,n);return Ta((y?Zr:ka)(x,b),e,t)}function Xn(e,t,r,n){return e===i||Bs(e,Te[r])&&!Ie.call(n,r)?t:e}function Zn(e,t,r,n,a,s){return Zs(e)&&Zs(t)&&(s.set(t,e),Lr(e,t,i,Zn,s),s.delete(t)),e}function Jn(e){return to(e)?i:e}function Qn(e,t,r,n,a,s){var o=1&r,l=e.length,c=t.length;if(l!=c&&!(o&&c>l))return!1;var h=s.get(e),p=s.get(t);if(h&&p)return h==t&&p==e;var u=-1,d=!0,f=2&r?new Wi:i;for(s.set(e,t),s.set(t,e);++u<l;){var m=e[u],g=t[u];if(n)var v=o?n(g,m,u,t,e,s):n(m,g,u,e,t,s);if(v!==i){if(v)continue;d=!1;break}if(f){if(!jt(t,function(e,t){if(!Zt(f,t)&&(m===e||a(m,e,r,n,s)))return f.push(t)})){d=!1;break}}else if(m!==g&&!a(m,g,r,n,s)){d=!1;break}}return s.delete(e),s.delete(t),d}function ea(e){return Aa(Ca(e,i,za),e+"")}function ta(e){return _r(e,Ao,ha)}function ia(e){return _r(e,To,pa)}var ra=ki?function(e){return ki.get(e)}:sl;function na(e){for(var t=e.name+"",i=$i[t],r=Ie.call($i,t)?i.length:0;r--;){var n=i[r],a=n.func;if(null==a||a==e)return n.name}return t}function aa(e){return(Ie.call(Bi,"placeholder")?Bi:e).placeholder}function sa(){var e=Bi.iteratee||il;return e=e===il?Mr:e,arguments.length?e(arguments[0],arguments[1]):e}function oa(e,t){var i,r,n=e.__data__;return("string"==(r=typeof(i=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==i:null===i)?n["string"==typeof t?"string":"hash"]:n.map}function la(e){for(var t=Ao(e),i=t.length;i--;){var r=t[i],n=e[r];t[i]=[r,n,Sa(n)]}return t}function ca(e,t){var r=function(e,t){return null==e?i:e[t]}(e,t);return Dr(r)?r:i}var ha=mt?function(e){return null==e?[]:(e=Ce(e),$t(mt(e),function(t){return Ge.call(e,t)}))}:dl,pa=mt?function(e){for(var t=[];e;)Mt(t,ha(e)),e=He(e);return t}:dl,ua=Sr;function da(e,t,i){for(var r=-1,n=(t=vn(t,e)).length,a=!1;++r<n;){var s=Fa(t[r]);if(!(a=null!=e&&i(e,s)))break;e=e[s]}return a||++r!=n?a:!!(n=null==e?0:e.length)&&Xs(n)&&ga(s,n)&&(Ns(e)||qs(e))}function fa(e){return"function"!=typeof e.constructor||_a(e)?{}:Oi(He(e))}function ma(e){return Ns(e)||qs(e)||!!(Ye&&e&&e[Ye])}function ga(e,t){var i=typeof e;return!!(t=null==t?h:t)&&("number"==i||"symbol"!=i&&ge.test(e))&&e>-1&&e%1==0&&e<t}function va(e,t,i){if(!Zs(i))return!1;var r=typeof t;return!!("number"==r?Vs(i)&&ga(t,i.length):"string"==r&&t in i)&&Bs(i[t],e)}function ya(e,t){if(Ns(e))return!1;var i=typeof e;return!("number"!=i&&"symbol"!=i&&"boolean"!=i&&null!=e&&!ao(e))||J.test(e)||!Z.test(e)||null!=t&&e in Ce(t)}function ba(e){var t=na(e),i=Bi[t];if("function"!=typeof i||!(t in Ni.prototype))return!1;if(e===i)return!0;var r=ra(i);return!!r&&e===r[0]}(_i&&ua(new _i(new ArrayBuffer(1)))!=D||Si&&ua(new Si)!=_||wi&&ua(wi.resolve())!=C||Ci&&ua(new Ci)!=E||Pi&&ua(new Pi)!=A)&&(ua=function(e){var t=Sr(e),r=t==w?e.constructor:i,n=r?ja(r):"";if(n)switch(n){case Ai:return D;case Ti:return _;case Di:return C;case Mi:return E;case Ii:return A}return t});var xa=De?Ys:fl;function _a(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||Te)}function Sa(e){return e==e&&!Zs(e)}function wa(e,t){return function(r){return null!=r&&r[e]===t&&(t!==i||e in Ce(r))}}function Ca(e,t,r){return t=mi(t===i?e.length-1:t,0),function(){for(var i=arguments,n=-1,a=mi(i.length-t,0),s=re(a);++n<a;)s[n]=i[t+n];n=-1;for(var o=re(t+1);++n<t;)o[n]=i[n];return o[t]=r(s),wt(e,this,o)}}function Pa(e,t){return t.length<2?e:xr(e,en(t,0,-1))}function Ea(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}var ka=Da(Zr),$a=ht||function(e,t){return pt.setTimeout(e,t)},Aa=Da(Jr);function Ta(e,t,i){var r=t+"";return Aa(e,function(e,t){var i=t.length;if(!i)return e;var r=i-1;return t[r]=(i>1?"& ":"")+t[r],t=t.join(i>2?", ":" "),e.replace(ne,"{\n/* [wrapped with "+t+"] */\n")}(r,function(e,t){return Pt(d,function(i){var r="_."+i[0];t&i[1]&&!At(e,r)&&e.push(r)}),e.sort()}(function(e){var t=e.match(ae);return t?t[1].split(se):[]}(r),i)))}function Da(e){var t=0,r=0;return function(){var n=vi(),a=16-(n-r);if(r=n,a>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(i,arguments)}}function Ma(e,t){var r=-1,n=e.length,a=n-1;for(t=t===i?n:t;++r<t;){var s=Wr(r,a),o=e[s];e[s]=e[r],e[r]=o}return e.length=t,e}var Ia=function(e){var t=Ds(e,function(e){return 500===i.size&&i.clear(),e}),i=t.cache;return t}(function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(Q,function(e,i,r,n){t.push(r?n.replace(ce,"$1"):i||e)}),t});function Fa(e){if("string"==typeof e||ao(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function ja(e){if(null!=e){try{return Me.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function Ra(e){if(e instanceof Ni)return e.clone();var t=new qi(e.__wrapped__,e.__chain__);return t.__actions__=kn(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}var Ba=Ur(function(e,t){return Hs(e)?lr(e,fr(t,1,Hs,!0)):[]}),Oa=Ur(function(e,t){var r=Ua(t);return Hs(r)&&(r=i),Hs(e)?lr(e,fr(t,1,Hs,!0),sa(r,2)):[]}),La=Ur(function(e,t){var r=Ua(t);return Hs(r)&&(r=i),Hs(e)?lr(e,fr(t,1,Hs,!0),i,r):[]});function qa(e,t,i){var r=null==e?0:e.length;if(!r)return-1;var n=null==i?0:po(i);return n<0&&(n=mi(r+n,0)),Ot(e,sa(t,3),n)}function Na(e,t,r){var n=null==e?0:e.length;if(!n)return-1;var a=n-1;return r!==i&&(a=po(r),a=r<0?mi(n+a,0):gi(a,n-1)),Ot(e,sa(t,3),a,!0)}function za(e){return null!=e&&e.length?fr(e,1):[]}function Va(e){return e&&e.length?e[0]:i}var Ha=Ur(function(e){var t=Dt(e,mn);return t.length&&t[0]===e[0]?Er(t):[]}),Wa=Ur(function(e){var t=Ua(e),r=Dt(e,mn);return t===Ua(r)?t=i:r.pop(),r.length&&r[0]===e[0]?Er(r,sa(t,2)):[]}),Ga=Ur(function(e){var t=Ua(e),r=Dt(e,mn);return(t="function"==typeof t?t:i)&&r.pop(),r.length&&r[0]===e[0]?Er(r,i,t):[]});function Ua(e){var t=null==e?0:e.length;return t?e[t-1]:i}var Ya=Ur(Ka);function Ka(e,t){return e&&e.length&&t&&t.length?Vr(e,t):e}var Xa=ea(function(e,t){var i=null==e?0:e.length,r=rr(e,t);return Hr(e,Dt(t,function(e){return ga(e,i)?+e:e}).sort(Cn)),r});function Za(e){return null==e?e:xi.call(e)}var Ja=Ur(function(e){return ln(fr(e,1,Hs,!0))}),Qa=Ur(function(e){var t=Ua(e);return Hs(t)&&(t=i),ln(fr(e,1,Hs,!0),sa(t,2))}),es=Ur(function(e){var t=Ua(e);return t="function"==typeof t?t:i,ln(fr(e,1,Hs,!0),i,t)});function ts(e){if(!e||!e.length)return[];var t=0;return e=$t(e,function(e){if(Hs(e))return t=mi(e.length,t),!0}),Ut(t,function(t){return Dt(e,Vt(t))})}function is(e,t){if(!e||!e.length)return[];var r=ts(e);return null==t?r:Dt(r,function(e){return wt(t,i,e)})}var rs=Ur(function(e,t){return Hs(e)?lr(e,t):[]}),ns=Ur(function(e){return dn($t(e,Hs))}),as=Ur(function(e){var t=Ua(e);return Hs(t)&&(t=i),dn($t(e,Hs),sa(t,2))}),ss=Ur(function(e){var t=Ua(e);return t="function"==typeof t?t:i,dn($t(e,Hs),i,t)}),os=Ur(ts),ls=Ur(function(e){var t=e.length,r=t>1?e[t-1]:i;return r="function"==typeof r?(e.pop(),r):i,is(e,r)});function cs(e){var t=Bi(e);return t.__chain__=!0,t}function hs(e,t){return t(e)}var ps=ea(function(e){var t=e.length,r=t?e[0]:0,n=this.__wrapped__,a=function(t){return rr(t,e)};return!(t>1||this.__actions__.length)&&n instanceof Ni&&ga(r)?((n=n.slice(r,+r+(t?1:0))).__actions__.push({func:hs,args:[a],thisArg:i}),new qi(n,this.__chain__).thru(function(e){return t&&!e.length&&e.push(i),e})):this.thru(a)}),us=An(function(e,t,i){Ie.call(e,i)?++e[i]:ir(e,i,1)}),ds=Rn(qa),fs=Rn(Na);function ms(e,t){return(Ns(e)?Pt:cr)(e,sa(t,3))}function gs(e,t){return(Ns(e)?Et:hr)(e,sa(t,3))}var vs=An(function(e,t,i){Ie.call(e,i)?e[i].push(t):ir(e,i,[t])}),ys=Ur(function(e,t,i){var r=-1,n="function"==typeof t,a=Vs(e)?re(e.length):[];return cr(e,function(e){a[++r]=n?wt(t,e,i):kr(e,t,i)}),a}),bs=An(function(e,t,i){ir(e,i,t)});function xs(e,t){return(Ns(e)?Dt:Rr)(e,sa(t,3))}var _s=An(function(e,t,i){e[i?0:1].push(t)},function(){return[[],[]]}),Ss=Ur(function(e,t){if(null==e)return[];var i=t.length;return i>1&&va(e,t[0],t[1])?t=[]:i>2&&va(t[0],t[1],t[2])&&(t=[t[0]]),Nr(e,fr(t,1),[])}),ws=ct||function(){return pt.Date.now()};function Cs(e,t,r){return t=r?i:t,t=e&&null==t?e.length:t,Kn(e,o,i,i,i,i,t)}function Ps(e,t){var n;if("function"!=typeof t)throw new ke(r);return e=po(e),function(){return--e>0&&(n=t.apply(this,arguments)),e<=1&&(t=i),n}}var Es=Ur(function(e,t,i){var r=1;if(i.length){var n=si(i,aa(Es));r|=s}return Kn(e,r,t,i,n)}),ks=Ur(function(e,t,i){var r=3;if(i.length){var n=si(i,aa(ks));r|=s}return Kn(t,r,e,i,n)});function $s(e,t,n){var a,s,o,l,c,h,p=0,u=!1,d=!1,f=!0;if("function"!=typeof e)throw new ke(r);function m(t){var r=a,n=s;return a=s=i,p=t,l=e.apply(n,r)}function g(e){var r=e-h;return h===i||r>=t||r<0||d&&e-p>=o}function v(){var e=ws();if(g(e))return y(e);c=$a(v,function(e){var i=t-(e-h);return d?gi(i,o-(e-p)):i}(e))}function y(e){return c=i,f&&a?m(e):(a=s=i,l)}function b(){var e=ws(),r=g(e);if(a=arguments,s=this,h=e,r){if(c===i)return function(e){return p=e,c=$a(v,t),u?m(e):l}(h);if(d)return xn(c),c=$a(v,t),m(h)}return c===i&&(c=$a(v,t)),l}return t=fo(t)||0,Zs(n)&&(u=!!n.leading,o=(d="maxWait"in n)?mi(fo(n.maxWait)||0,t):o,f="trailing"in n?!!n.trailing:f),b.cancel=function(){c!==i&&xn(c),p=0,a=h=s=c=i},b.flush=function(){return c===i?l:y(ws())},b}var As=Ur(function(e,t){return or(e,1,t)}),Ts=Ur(function(e,t,i){return or(e,fo(t)||0,i)});function Ds(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new ke(r);var i=function(){var r=arguments,n=t?t.apply(this,r):r[0],a=i.cache;if(a.has(n))return a.get(n);var s=e.apply(this,r);return i.cache=a.set(n,s)||a,s};return i.cache=new(Ds.Cache||Hi),i}function Ms(e){if("function"!=typeof e)throw new ke(r);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}Ds.Cache=Hi;var Is=yn(function(e,t){var i=(t=1==t.length&&Ns(t[0])?Dt(t[0],Kt(sa())):Dt(fr(t,1),Kt(sa()))).length;return Ur(function(r){for(var n=-1,a=gi(r.length,i);++n<a;)r[n]=t[n].call(this,r[n]);return wt(e,this,r)})}),Fs=Ur(function(e,t){var r=si(t,aa(Fs));return Kn(e,s,i,t,r)}),js=Ur(function(e,t){var r=si(t,aa(js));return Kn(e,64,i,t,r)}),Rs=ea(function(e,t){return Kn(e,l,i,i,i,t)});function Bs(e,t){return e===t||e!=e&&t!=t}var Os=Hn(wr),Ls=Hn(function(e,t){return e>=t}),qs=$r(function(){return arguments}())?$r:function(e){return Js(e)&&Ie.call(e,"callee")&&!Ge.call(e,"callee")},Ns=re.isArray,zs=vt?Kt(vt):function(e){return Js(e)&&Sr(e)==T};function Vs(e){return null!=e&&Xs(e.length)&&!Ys(e)}function Hs(e){return Js(e)&&Vs(e)}var Ws=gt||fl,Gs=yt?Kt(yt):function(e){return Js(e)&&Sr(e)==v};function Us(e){if(!Js(e))return!1;var t=Sr(e);return t==y||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!to(e)}function Ys(e){if(!Zs(e))return!1;var t=Sr(e);return t==b||t==x||"[object AsyncFunction]"==t||"[object Proxy]"==t}function Ks(e){return"number"==typeof e&&e==po(e)}function Xs(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=h}function Zs(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function Js(e){return null!=e&&"object"==typeof e}var Qs=bt?Kt(bt):function(e){return Js(e)&&ua(e)==_};function eo(e){return"number"==typeof e||Js(e)&&Sr(e)==S}function to(e){if(!Js(e)||Sr(e)!=w)return!1;var t=He(e);if(null===t)return!0;var i=Ie.call(t,"constructor")&&t.constructor;return"function"==typeof i&&i instanceof i&&Me.call(i)==Be}var io=xt?Kt(xt):function(e){return Js(e)&&Sr(e)==P},ro=_t?Kt(_t):function(e){return Js(e)&&ua(e)==E};function no(e){return"string"==typeof e||!Ns(e)&&Js(e)&&Sr(e)==k}function ao(e){return"symbol"==typeof e||Js(e)&&Sr(e)==$}var so=St?Kt(St):function(e){return Js(e)&&Xs(e.length)&&!!nt[Sr(e)]},oo=Hn(jr),lo=Hn(function(e,t){return e<=t});function co(e){if(!e)return[];if(Vs(e))return no(e)?hi(e):kn(e);if(Ke&&e[Ke])return function(e){for(var t,i=[];!(t=e.next()).done;)i.push(t.value);return i}(e[Ke]());var t=ua(e);return(t==_?ni:t==E?oi:Oo)(e)}function ho(e){return e?(e=fo(e))===c||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}function po(e){var t=ho(e),i=t%1;return t==t?i?t-i:t:0}function uo(e){return e?nr(po(e),0,u):0}function fo(e){if("number"==typeof e)return e;if(ao(e))return p;if(Zs(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=Zs(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=Yt(e);var i=de.test(e);return i||me.test(e)?lt(e.slice(2),i?2:8):ue.test(e)?p:+e}function mo(e){return $n(e,To(e))}function go(e){return null==e?"":on(e)}var vo=Tn(function(e,t){if(_a(t)||Vs(t))$n(t,Ao(t),e);else for(var i in t)Ie.call(t,i)&&Ji(e,i,t[i])}),yo=Tn(function(e,t){$n(t,To(t),e)}),bo=Tn(function(e,t,i,r){$n(t,To(t),e,r)}),xo=Tn(function(e,t,i,r){$n(t,Ao(t),e,r)}),_o=ea(rr),So=Ur(function(e,t){e=Ce(e);var r=-1,n=t.length,a=n>2?t[2]:i;for(a&&va(t[0],t[1],a)&&(n=1);++r<n;)for(var s=t[r],o=To(s),l=-1,c=o.length;++l<c;){var h=o[l],p=e[h];(p===i||Bs(p,Te[h])&&!Ie.call(e,h))&&(e[h]=s[h])}return e}),wo=Ur(function(e){return e.push(i,Zn),wt(Mo,i,e)});function Co(e,t,r){var n=null==e?i:xr(e,t);return n===i?r:n}function Po(e,t){return null!=e&&da(e,t,Pr)}var Eo=Ln(function(e,t,i){null!=t&&"function"!=typeof t.toString&&(t=Re.call(t)),e[t]=i},Jo(tl)),ko=Ln(function(e,t,i){null!=t&&"function"!=typeof t.toString&&(t=Re.call(t)),Ie.call(e,t)?e[t].push(i):e[t]=[i]},sa),$o=Ur(kr);function Ao(e){return Vs(e)?Ui(e):Ir(e)}function To(e){return Vs(e)?Ui(e,!0):Fr(e)}var Do=Tn(function(e,t,i){Lr(e,t,i)}),Mo=Tn(function(e,t,i,r){Lr(e,t,i,r)}),Io=ea(function(e,t){var i={};if(null==e)return i;var r=!1;t=Dt(t,function(t){return t=vn(t,e),r||(r=t.length>1),t}),$n(e,ia(e),i),r&&(i=ar(i,7,Jn));for(var n=t.length;n--;)cn(i,t[n]);return i}),Fo=ea(function(e,t){return null==e?{}:function(e,t){return zr(e,t,function(t,i){return Po(e,i)})}(e,t)});function jo(e,t){if(null==e)return{};var i=Dt(ia(e),function(e){return[e]});return t=sa(t),zr(e,i,function(e,i){return t(e,i[0])})}var Ro=Yn(Ao),Bo=Yn(To);function Oo(e){return null==e?[]:Xt(e,Ao(e))}var Lo=Fn(function(e,t,i){return t=t.toLowerCase(),e+(i?qo(t):t)});function qo(e){return Yo(go(e).toLowerCase())}function No(e){return(e=go(e))&&e.replace(ve,ei).replace(Ze,"")}var zo=Fn(function(e,t,i){return e+(i?"-":"")+t.toLowerCase()}),Vo=Fn(function(e,t,i){return e+(i?" ":"")+t.toLowerCase()}),Ho=In("toLowerCase"),Wo=Fn(function(e,t,i){return e+(i?"_":"")+t.toLowerCase()}),Go=Fn(function(e,t,i){return e+(i?" ":"")+Yo(t)}),Uo=Fn(function(e,t,i){return e+(i?" ":"")+t.toUpperCase()}),Yo=In("toUpperCase");function Ko(e,t,r){return e=go(e),(t=r?i:t)===i?function(e){return tt.test(e)}(e)?function(e){return e.match(Qe)||[]}(e):function(e){return e.match(oe)||[]}(e):e.match(t)||[]}var Xo=Ur(function(e,t){try{return wt(e,i,t)}catch(e){return Us(e)?e:new _e(e)}}),Zo=ea(function(e,t){return Pt(t,function(t){t=Fa(t),ir(e,t,Es(e[t],e))}),e});function Jo(e){return function(){return e}}var Qo=Bn(),el=Bn(!0);function tl(e){return e}function il(e){return Mr("function"==typeof e?e:ar(e,1))}var rl=Ur(function(e,t){return function(i){return kr(i,e,t)}}),nl=Ur(function(e,t){return function(i){return kr(e,i,t)}});function al(e,t,i){var r=Ao(t),n=br(t,r);null!=i||Zs(t)&&(n.length||!r.length)||(i=t,t=e,e=this,n=br(t,Ao(t)));var a=!(Zs(i)&&"chain"in i&&!i.chain),s=Ys(e);return Pt(n,function(i){var r=t[i];e[i]=r,s&&(e.prototype[i]=function(){var t=this.__chain__;if(a||t){var i=e(this.__wrapped__);return(i.__actions__=kn(this.__actions__)).push({func:r,args:arguments,thisArg:e}),i.__chain__=t,i}return r.apply(e,Mt([this.value()],arguments))})}),e}function sl(){}var ol=Nn(Dt),ll=Nn(kt),cl=Nn(jt);function hl(e){return ya(e)?Vt(Fa(e)):function(e){return function(t){return xr(t,e)}}(e)}var pl=Vn(),ul=Vn(!0);function dl(){return[]}function fl(){return!1}var ml,gl=qn(function(e,t){return e+t},0),vl=Gn("ceil"),yl=qn(function(e,t){return e/t},1),bl=Gn("floor"),xl=qn(function(e,t){return e*t},1),_l=Gn("round"),Sl=qn(function(e,t){return e-t},0);return Bi.after=function(e,t){if("function"!=typeof t)throw new ke(r);return e=po(e),function(){if(--e<1)return t.apply(this,arguments)}},Bi.ary=Cs,Bi.assign=vo,Bi.assignIn=yo,Bi.assignInWith=bo,Bi.assignWith=xo,Bi.at=_o,Bi.before=Ps,Bi.bind=Es,Bi.bindAll=Zo,Bi.bindKey=ks,Bi.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return Ns(e)?e:[e]},Bi.chain=cs,Bi.chunk=function(e,t,r){t=(r?va(e,t,r):t===i)?1:mi(po(t),0);var n=null==e?0:e.length;if(!n||t<1)return[];for(var a=0,s=0,o=re(ut(n/t));a<n;)o[s++]=en(e,a,a+=t);return o},Bi.compact=function(e){for(var t=-1,i=null==e?0:e.length,r=0,n=[];++t<i;){var a=e[t];a&&(n[r++]=a)}return n},Bi.concat=function(){var e=arguments.length;if(!e)return[];for(var t=re(e-1),i=arguments[0],r=e;r--;)t[r-1]=arguments[r];return Mt(Ns(i)?kn(i):[i],fr(t,1))},Bi.cond=function(e){var t=null==e?0:e.length,i=sa();return e=t?Dt(e,function(e){if("function"!=typeof e[1])throw new ke(r);return[i(e[0]),e[1]]}):[],Ur(function(i){for(var r=-1;++r<t;){var n=e[r];if(wt(n[0],this,i))return wt(n[1],this,i)}})},Bi.conforms=function(e){return function(e){var t=Ao(e);return function(i){return sr(i,e,t)}}(ar(e,1))},Bi.constant=Jo,Bi.countBy=us,Bi.create=function(e,t){var i=Oi(e);return null==t?i:tr(i,t)},Bi.curry=function e(t,r,n){var a=Kn(t,8,i,i,i,i,i,r=n?i:r);return a.placeholder=e.placeholder,a},Bi.curryRight=function e(t,r,n){var a=Kn(t,16,i,i,i,i,i,r=n?i:r);return a.placeholder=e.placeholder,a},Bi.debounce=$s,Bi.defaults=So,Bi.defaultsDeep=wo,Bi.defer=As,Bi.delay=Ts,Bi.difference=Ba,Bi.differenceBy=Oa,Bi.differenceWith=La,Bi.drop=function(e,t,r){var n=null==e?0:e.length;return n?en(e,(t=r||t===i?1:po(t))<0?0:t,n):[]},Bi.dropRight=function(e,t,r){var n=null==e?0:e.length;return n?en(e,0,(t=n-(t=r||t===i?1:po(t)))<0?0:t):[]},Bi.dropRightWhile=function(e,t){return e&&e.length?pn(e,sa(t,3),!0,!0):[]},Bi.dropWhile=function(e,t){return e&&e.length?pn(e,sa(t,3),!0):[]},Bi.fill=function(e,t,r,n){var a=null==e?0:e.length;return a?(r&&"number"!=typeof r&&va(e,t,r)&&(r=0,n=a),function(e,t,r,n){var a=e.length;for((r=po(r))<0&&(r=-r>a?0:a+r),(n=n===i||n>a?a:po(n))<0&&(n+=a),n=r>n?0:uo(n);r<n;)e[r++]=t;return e}(e,t,r,n)):[]},Bi.filter=function(e,t){return(Ns(e)?$t:dr)(e,sa(t,3))},Bi.flatMap=function(e,t){return fr(xs(e,t),1)},Bi.flatMapDeep=function(e,t){return fr(xs(e,t),c)},Bi.flatMapDepth=function(e,t,r){return r=r===i?1:po(r),fr(xs(e,t),r)},Bi.flatten=za,Bi.flattenDeep=function(e){return null!=e&&e.length?fr(e,c):[]},Bi.flattenDepth=function(e,t){return null!=e&&e.length?fr(e,t=t===i?1:po(t)):[]},Bi.flip=function(e){return Kn(e,512)},Bi.flow=Qo,Bi.flowRight=el,Bi.fromPairs=function(e){for(var t=-1,i=null==e?0:e.length,r={};++t<i;){var n=e[t];r[n[0]]=n[1]}return r},Bi.functions=function(e){return null==e?[]:br(e,Ao(e))},Bi.functionsIn=function(e){return null==e?[]:br(e,To(e))},Bi.groupBy=vs,Bi.initial=function(e){return null!=e&&e.length?en(e,0,-1):[]},Bi.intersection=Ha,Bi.intersectionBy=Wa,Bi.intersectionWith=Ga,Bi.invert=Eo,Bi.invertBy=ko,Bi.invokeMap=ys,Bi.iteratee=il,Bi.keyBy=bs,Bi.keys=Ao,Bi.keysIn=To,Bi.map=xs,Bi.mapKeys=function(e,t){var i={};return t=sa(t,3),vr(e,function(e,r,n){ir(i,t(e,r,n),e)}),i},Bi.mapValues=function(e,t){var i={};return t=sa(t,3),vr(e,function(e,r,n){ir(i,r,t(e,r,n))}),i},Bi.matches=function(e){return Br(ar(e,1))},Bi.matchesProperty=function(e,t){return Or(e,ar(t,1))},Bi.memoize=Ds,Bi.merge=Do,Bi.mergeWith=Mo,Bi.method=rl,Bi.methodOf=nl,Bi.mixin=al,Bi.negate=Ms,Bi.nthArg=function(e){return e=po(e),Ur(function(t){return qr(t,e)})},Bi.omit=Io,Bi.omitBy=function(e,t){return jo(e,Ms(sa(t)))},Bi.once=function(e){return Ps(2,e)},Bi.orderBy=function(e,t,r,n){return null==e?[]:(Ns(t)||(t=null==t?[]:[t]),Ns(r=n?i:r)||(r=null==r?[]:[r]),Nr(e,t,r))},Bi.over=ol,Bi.overArgs=Is,Bi.overEvery=ll,Bi.overSome=cl,Bi.partial=Fs,Bi.partialRight=js,Bi.partition=_s,Bi.pick=Fo,Bi.pickBy=jo,Bi.property=hl,Bi.propertyOf=function(e){return function(t){return null==e?i:xr(e,t)}},Bi.pull=Ya,Bi.pullAll=Ka,Bi.pullAllBy=function(e,t,i){return e&&e.length&&t&&t.length?Vr(e,t,sa(i,2)):e},Bi.pullAllWith=function(e,t,r){return e&&e.length&&t&&t.length?Vr(e,t,i,r):e},Bi.pullAt=Xa,Bi.range=pl,Bi.rangeRight=ul,Bi.rearg=Rs,Bi.reject=function(e,t){return(Ns(e)?$t:dr)(e,Ms(sa(t,3)))},Bi.remove=function(e,t){var i=[];if(!e||!e.length)return i;var r=-1,n=[],a=e.length;for(t=sa(t,3);++r<a;){var s=e[r];t(s,r,e)&&(i.push(s),n.push(r))}return Hr(e,n),i},Bi.rest=function(e,t){if("function"!=typeof e)throw new ke(r);return Ur(e,t=t===i?t:po(t))},Bi.reverse=Za,Bi.sampleSize=function(e,t,r){return t=(r?va(e,t,r):t===i)?1:po(t),(Ns(e)?Ki:Kr)(e,t)},Bi.set=function(e,t,i){return null==e?e:Xr(e,t,i)},Bi.setWith=function(e,t,r,n){return n="function"==typeof n?n:i,null==e?e:Xr(e,t,r,n)},Bi.shuffle=function(e){return(Ns(e)?Xi:Qr)(e)},Bi.slice=function(e,t,r){var n=null==e?0:e.length;return n?(r&&"number"!=typeof r&&va(e,t,r)?(t=0,r=n):(t=null==t?0:po(t),r=r===i?n:po(r)),en(e,t,r)):[]},Bi.sortBy=Ss,Bi.sortedUniq=function(e){return e&&e.length?an(e):[]},Bi.sortedUniqBy=function(e,t){return e&&e.length?an(e,sa(t,2)):[]},Bi.split=function(e,t,r){return r&&"number"!=typeof r&&va(e,t,r)&&(t=r=i),(r=r===i?u:r>>>0)?(e=go(e))&&("string"==typeof t||null!=t&&!io(t))&&!(t=on(t))&&ri(e)?bn(hi(e),0,r):e.split(t,r):[]},Bi.spread=function(e,t){if("function"!=typeof e)throw new ke(r);return t=null==t?0:mi(po(t),0),Ur(function(i){var r=i[t],n=bn(i,0,t);return r&&Mt(n,r),wt(e,this,n)})},Bi.tail=function(e){var t=null==e?0:e.length;return t?en(e,1,t):[]},Bi.take=function(e,t,r){return e&&e.length?en(e,0,(t=r||t===i?1:po(t))<0?0:t):[]},Bi.takeRight=function(e,t,r){var n=null==e?0:e.length;return n?en(e,(t=n-(t=r||t===i?1:po(t)))<0?0:t,n):[]},Bi.takeRightWhile=function(e,t){return e&&e.length?pn(e,sa(t,3),!1,!0):[]},Bi.takeWhile=function(e,t){return e&&e.length?pn(e,sa(t,3)):[]},Bi.tap=function(e,t){return t(e),e},Bi.throttle=function(e,t,i){var n=!0,a=!0;if("function"!=typeof e)throw new ke(r);return Zs(i)&&(n="leading"in i?!!i.leading:n,a="trailing"in i?!!i.trailing:a),$s(e,t,{leading:n,maxWait:t,trailing:a})},Bi.thru=hs,Bi.toArray=co,Bi.toPairs=Ro,Bi.toPairsIn=Bo,Bi.toPath=function(e){return Ns(e)?Dt(e,Fa):ao(e)?[e]:kn(Ia(go(e)))},Bi.toPlainObject=mo,Bi.transform=function(e,t,i){var r=Ns(e),n=r||Ws(e)||so(e);if(t=sa(t,4),null==i){var a=e&&e.constructor;i=n?r?new a:[]:Zs(e)&&Ys(a)?Oi(He(e)):{}}return(n?Pt:vr)(e,function(e,r,n){return t(i,e,r,n)}),i},Bi.unary=function(e){return Cs(e,1)},Bi.union=Ja,Bi.unionBy=Qa,Bi.unionWith=es,Bi.uniq=function(e){return e&&e.length?ln(e):[]},Bi.uniqBy=function(e,t){return e&&e.length?ln(e,sa(t,2)):[]},Bi.uniqWith=function(e,t){return t="function"==typeof t?t:i,e&&e.length?ln(e,i,t):[]},Bi.unset=function(e,t){return null==e||cn(e,t)},Bi.unzip=ts,Bi.unzipWith=is,Bi.update=function(e,t,i){return null==e?e:hn(e,t,gn(i))},Bi.updateWith=function(e,t,r,n){return n="function"==typeof n?n:i,null==e?e:hn(e,t,gn(r),n)},Bi.values=Oo,Bi.valuesIn=function(e){return null==e?[]:Xt(e,To(e))},Bi.without=rs,Bi.words=Ko,Bi.wrap=function(e,t){return Fs(gn(t),e)},Bi.xor=ns,Bi.xorBy=as,Bi.xorWith=ss,Bi.zip=os,Bi.zipObject=function(e,t){return fn(e||[],t||[],Ji)},Bi.zipObjectDeep=function(e,t){return fn(e||[],t||[],Xr)},Bi.zipWith=ls,Bi.entries=Ro,Bi.entriesIn=Bo,Bi.extend=yo,Bi.extendWith=bo,al(Bi,Bi),Bi.add=gl,Bi.attempt=Xo,Bi.camelCase=Lo,Bi.capitalize=qo,Bi.ceil=vl,Bi.clamp=function(e,t,r){return r===i&&(r=t,t=i),r!==i&&(r=(r=fo(r))==r?r:0),t!==i&&(t=(t=fo(t))==t?t:0),nr(fo(e),t,r)},Bi.clone=function(e){return ar(e,4)},Bi.cloneDeep=function(e){return ar(e,5)},Bi.cloneDeepWith=function(e,t){return ar(e,5,t="function"==typeof t?t:i)},Bi.cloneWith=function(e,t){return ar(e,4,t="function"==typeof t?t:i)},Bi.conformsTo=function(e,t){return null==t||sr(e,t,Ao(t))},Bi.deburr=No,Bi.defaultTo=function(e,t){return null==e||e!=e?t:e},Bi.divide=yl,Bi.endsWith=function(e,t,r){e=go(e),t=on(t);var n=e.length,a=r=r===i?n:nr(po(r),0,n);return(r-=t.length)>=0&&e.slice(r,a)==t},Bi.eq=Bs,Bi.escape=function(e){return(e=go(e))&&U.test(e)?e.replace(W,ti):e},Bi.escapeRegExp=function(e){return(e=go(e))&&te.test(e)?e.replace(ee,"\\$&"):e},Bi.every=function(e,t,r){var n=Ns(e)?kt:pr;return r&&va(e,t,r)&&(t=i),n(e,sa(t,3))},Bi.find=ds,Bi.findIndex=qa,Bi.findKey=function(e,t){return Bt(e,sa(t,3),vr)},Bi.findLast=fs,Bi.findLastIndex=Na,Bi.findLastKey=function(e,t){return Bt(e,sa(t,3),yr)},Bi.floor=bl,Bi.forEach=ms,Bi.forEachRight=gs,Bi.forIn=function(e,t){return null==e?e:mr(e,sa(t,3),To)},Bi.forInRight=function(e,t){return null==e?e:gr(e,sa(t,3),To)},Bi.forOwn=function(e,t){return e&&vr(e,sa(t,3))},Bi.forOwnRight=function(e,t){return e&&yr(e,sa(t,3))},Bi.get=Co,Bi.gt=Os,Bi.gte=Ls,Bi.has=function(e,t){return null!=e&&da(e,t,Cr)},Bi.hasIn=Po,Bi.head=Va,Bi.identity=tl,Bi.includes=function(e,t,i,r){e=Vs(e)?e:Oo(e),i=i&&!r?po(i):0;var n=e.length;return i<0&&(i=mi(n+i,0)),no(e)?i<=n&&e.indexOf(t,i)>-1:!!n&&Lt(e,t,i)>-1},Bi.indexOf=function(e,t,i){var r=null==e?0:e.length;if(!r)return-1;var n=null==i?0:po(i);return n<0&&(n=mi(r+n,0)),Lt(e,t,n)},Bi.inRange=function(e,t,r){return t=ho(t),r===i?(r=t,t=0):r=ho(r),function(e,t,i){return e>=gi(t,i)&&e<mi(t,i)}(e=fo(e),t,r)},Bi.invoke=$o,Bi.isArguments=qs,Bi.isArray=Ns,Bi.isArrayBuffer=zs,Bi.isArrayLike=Vs,Bi.isArrayLikeObject=Hs,Bi.isBoolean=function(e){return!0===e||!1===e||Js(e)&&Sr(e)==g},Bi.isBuffer=Ws,Bi.isDate=Gs,Bi.isElement=function(e){return Js(e)&&1===e.nodeType&&!to(e)},Bi.isEmpty=function(e){if(null==e)return!0;if(Vs(e)&&(Ns(e)||"string"==typeof e||"function"==typeof e.splice||Ws(e)||so(e)||qs(e)))return!e.length;var t=ua(e);if(t==_||t==E)return!e.size;if(_a(e))return!Ir(e).length;for(var i in e)if(Ie.call(e,i))return!1;return!0},Bi.isEqual=function(e,t){return Ar(e,t)},Bi.isEqualWith=function(e,t,r){var n=(r="function"==typeof r?r:i)?r(e,t):i;return n===i?Ar(e,t,i,r):!!n},Bi.isError=Us,Bi.isFinite=function(e){return"number"==typeof e&&Rt(e)},Bi.isFunction=Ys,Bi.isInteger=Ks,Bi.isLength=Xs,Bi.isMap=Qs,Bi.isMatch=function(e,t){return e===t||Tr(e,t,la(t))},Bi.isMatchWith=function(e,t,r){return r="function"==typeof r?r:i,Tr(e,t,la(t),r)},Bi.isNaN=function(e){return eo(e)&&e!=+e},Bi.isNative=function(e){if(xa(e))throw new _e("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return Dr(e)},Bi.isNil=function(e){return null==e},Bi.isNull=function(e){return null===e},Bi.isNumber=eo,Bi.isObject=Zs,Bi.isObjectLike=Js,Bi.isPlainObject=to,Bi.isRegExp=io,Bi.isSafeInteger=function(e){return Ks(e)&&e>=-9007199254740991&&e<=h},Bi.isSet=ro,Bi.isString=no,Bi.isSymbol=ao,Bi.isTypedArray=so,Bi.isUndefined=function(e){return e===i},Bi.isWeakMap=function(e){return Js(e)&&ua(e)==A},Bi.isWeakSet=function(e){return Js(e)&&"[object WeakSet]"==Sr(e)},Bi.join=function(e,t){return null==e?"":Ht.call(e,t)},Bi.kebabCase=zo,Bi.last=Ua,Bi.lastIndexOf=function(e,t,r){var n=null==e?0:e.length;if(!n)return-1;var a=n;return r!==i&&(a=(a=po(r))<0?mi(n+a,0):gi(a,n-1)),t==t?function(e,t,i){for(var r=i+1;r--;)if(e[r]===t)return r;return r}(e,t,a):Ot(e,Nt,a,!0)},Bi.lowerCase=Vo,Bi.lowerFirst=Ho,Bi.lt=oo,Bi.lte=lo,Bi.max=function(e){return e&&e.length?ur(e,tl,wr):i},Bi.maxBy=function(e,t){return e&&e.length?ur(e,sa(t,2),wr):i},Bi.mean=function(e){return zt(e,tl)},Bi.meanBy=function(e,t){return zt(e,sa(t,2))},Bi.min=function(e){return e&&e.length?ur(e,tl,jr):i},Bi.minBy=function(e,t){return e&&e.length?ur(e,sa(t,2),jr):i},Bi.stubArray=dl,Bi.stubFalse=fl,Bi.stubObject=function(){return{}},Bi.stubString=function(){return""},Bi.stubTrue=function(){return!0},Bi.multiply=xl,Bi.nth=function(e,t){return e&&e.length?qr(e,po(t)):i},Bi.noConflict=function(){return pt._===this&&(pt._=Oe),this},Bi.noop=sl,Bi.now=ws,Bi.pad=function(e,t,i){e=go(e);var r=(t=po(t))?ci(e):0;if(!t||r>=t)return e;var n=(t-r)/2;return zn(dt(n),i)+e+zn(ut(n),i)},Bi.padEnd=function(e,t,i){e=go(e);var r=(t=po(t))?ci(e):0;return t&&r<t?e+zn(t-r,i):e},Bi.padStart=function(e,t,i){e=go(e);var r=(t=po(t))?ci(e):0;return t&&r<t?zn(t-r,i)+e:e},Bi.parseInt=function(e,t,i){return i||null==t?t=0:t&&(t=+t),yi(go(e).replace(ie,""),t||0)},Bi.random=function(e,t,r){if(r&&"boolean"!=typeof r&&va(e,t,r)&&(t=r=i),r===i&&("boolean"==typeof t?(r=t,t=i):"boolean"==typeof e&&(r=e,e=i)),e===i&&t===i?(e=0,t=1):(e=ho(e),t===i?(t=e,e=0):t=ho(t)),e>t){var n=e;e=t,t=n}if(r||e%1||t%1){var a=bi();return gi(e+a*(t-e+ot("1e-"+((a+"").length-1))),t)}return Wr(e,t)},Bi.reduce=function(e,t,i){var r=Ns(e)?It:Wt,n=arguments.length<3;return r(e,sa(t,4),i,n,cr)},Bi.reduceRight=function(e,t,i){var r=Ns(e)?Ft:Wt,n=arguments.length<3;return r(e,sa(t,4),i,n,hr)},Bi.repeat=function(e,t,r){return t=(r?va(e,t,r):t===i)?1:po(t),Gr(go(e),t)},Bi.replace=function(){var e=arguments,t=go(e[0]);return e.length<3?t:t.replace(e[1],e[2])},Bi.result=function(e,t,r){var n=-1,a=(t=vn(t,e)).length;for(a||(a=1,e=i);++n<a;){var s=null==e?i:e[Fa(t[n])];s===i&&(n=a,s=r),e=Ys(s)?s.call(e):s}return e},Bi.round=_l,Bi.runInContext=e,Bi.sample=function(e){return(Ns(e)?Yi:Yr)(e)},Bi.size=function(e){if(null==e)return 0;if(Vs(e))return no(e)?ci(e):e.length;var t=ua(e);return t==_||t==E?e.size:Ir(e).length},Bi.snakeCase=Wo,Bi.some=function(e,t,r){var n=Ns(e)?jt:tn;return r&&va(e,t,r)&&(t=i),n(e,sa(t,3))},Bi.sortedIndex=function(e,t){return rn(e,t)},Bi.sortedIndexBy=function(e,t,i){return nn(e,t,sa(i,2))},Bi.sortedIndexOf=function(e,t){var i=null==e?0:e.length;if(i){var r=rn(e,t);if(r<i&&Bs(e[r],t))return r}return-1},Bi.sortedLastIndex=function(e,t){return rn(e,t,!0)},Bi.sortedLastIndexBy=function(e,t,i){return nn(e,t,sa(i,2),!0)},Bi.sortedLastIndexOf=function(e,t){if(null!=e&&e.length){var i=rn(e,t,!0)-1;if(Bs(e[i],t))return i}return-1},Bi.startCase=Go,Bi.startsWith=function(e,t,i){return e=go(e),i=null==i?0:nr(po(i),0,e.length),t=on(t),e.slice(i,i+t.length)==t},Bi.subtract=Sl,Bi.sum=function(e){return e&&e.length?Gt(e,tl):0},Bi.sumBy=function(e,t){return e&&e.length?Gt(e,sa(t,2)):0},Bi.template=function(e,t,r){var n=Bi.templateSettings;r&&va(e,t,r)&&(t=i),e=go(e),t=bo({},t,n,Xn);var a,s,o=bo({},t.imports,n.imports,Xn),l=Ao(o),c=Xt(o,l),h=0,p=t.interpolate||ye,u="__p += '",d=Pe((t.escape||ye).source+"|"+p.source+"|"+(p===X?he:ye).source+"|"+(t.evaluate||ye).source+"|$","g"),f="//# sourceURL="+(Ie.call(t,"sourceURL")?(t.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++rt+"]")+"\n";e.replace(d,function(t,i,r,n,o,l){return r||(r=n),u+=e.slice(h,l).replace(be,ii),i&&(a=!0,u+="' +\n__e("+i+") +\n'"),o&&(s=!0,u+="';\n"+o+";\n__p += '"),r&&(u+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),h=l+t.length,t}),u+="';\n";var m=Ie.call(t,"variable")&&t.variable;if(m){if(le.test(m))throw new _e("Invalid `variable` option passed into `_.template`")}else u="with (obj) {\n"+u+"\n}\n";u=(s?u.replace(N,""):u).replace(z,"$1").replace(V,"$1;"),u="function("+(m||"obj")+") {\n"+(m?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(a?", __e = _.escape":"")+(s?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+u+"return __p\n}";var g=Xo(function(){return Se(l,f+"return "+u).apply(i,c)});if(g.source=u,Us(g))throw g;return g},Bi.times=function(e,t){if((e=po(e))<1||e>h)return[];var i=u,r=gi(e,u);t=sa(t),e-=u;for(var n=Ut(r,t);++i<e;)t(i);return n},Bi.toFinite=ho,Bi.toInteger=po,Bi.toLength=uo,Bi.toLower=function(e){return go(e).toLowerCase()},Bi.toNumber=fo,Bi.toSafeInteger=function(e){return e?nr(po(e),-9007199254740991,h):0===e?e:0},Bi.toString=go,Bi.toUpper=function(e){return go(e).toUpperCase()},Bi.trim=function(e,t,r){if((e=go(e))&&(r||t===i))return Yt(e);if(!e||!(t=on(t)))return e;var n=hi(e),a=hi(t);return bn(n,Jt(n,a),Qt(n,a)+1).join("")},Bi.trimEnd=function(e,t,r){if((e=go(e))&&(r||t===i))return e.slice(0,pi(e)+1);if(!e||!(t=on(t)))return e;var n=hi(e);return bn(n,0,Qt(n,hi(t))+1).join("")},Bi.trimStart=function(e,t,r){if((e=go(e))&&(r||t===i))return e.replace(ie,"");if(!e||!(t=on(t)))return e;var n=hi(e);return bn(n,Jt(n,hi(t))).join("")},Bi.truncate=function(e,t){var r=30,n="...";if(Zs(t)){var a="separator"in t?t.separator:a;r="length"in t?po(t.length):r,n="omission"in t?on(t.omission):n}var s=(e=go(e)).length;if(ri(e)){var o=hi(e);s=o.length}if(r>=s)return e;var l=r-ci(n);if(l<1)return n;var c=o?bn(o,0,l).join(""):e.slice(0,l);if(a===i)return c+n;if(o&&(l+=c.length-l),io(a)){if(e.slice(l).search(a)){var h,p=c;for(a.global||(a=Pe(a.source,go(pe.exec(a))+"g")),a.lastIndex=0;h=a.exec(p);)var u=h.index;c=c.slice(0,u===i?l:u)}}else if(e.indexOf(on(a),l)!=l){var d=c.lastIndexOf(a);d>-1&&(c=c.slice(0,d))}return c+n},Bi.unescape=function(e){return(e=go(e))&&G.test(e)?e.replace(H,ui):e},Bi.uniqueId=function(e){var t=++Fe;return go(e)+t},Bi.upperCase=Uo,Bi.upperFirst=Yo,Bi.each=ms,Bi.eachRight=gs,Bi.first=Va,al(Bi,(ml={},vr(Bi,function(e,t){Ie.call(Bi.prototype,t)||(ml[t]=e)}),ml),{chain:!1}),Bi.VERSION="4.17.23",Pt(["bind","bindKey","curry","curryRight","partial","partialRight"],function(e){Bi[e].placeholder=Bi}),Pt(["drop","take"],function(e,t){Ni.prototype[e]=function(r){r=r===i?1:mi(po(r),0);var n=this.__filtered__&&!t?new Ni(this):this.clone();return n.__filtered__?n.__takeCount__=gi(r,n.__takeCount__):n.__views__.push({size:gi(r,u),type:e+(n.__dir__<0?"Right":"")}),n},Ni.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}}),Pt(["filter","map","takeWhile"],function(e,t){var i=t+1,r=1==i||3==i;Ni.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:sa(e,3),type:i}),t.__filtered__=t.__filtered__||r,t}}),Pt(["head","last"],function(e,t){var i="take"+(t?"Right":"");Ni.prototype[e]=function(){return this[i](1).value()[0]}}),Pt(["initial","tail"],function(e,t){var i="drop"+(t?"":"Right");Ni.prototype[e]=function(){return this.__filtered__?new Ni(this):this[i](1)}}),Ni.prototype.compact=function(){return this.filter(tl)},Ni.prototype.find=function(e){return this.filter(e).head()},Ni.prototype.findLast=function(e){return this.reverse().find(e)},Ni.prototype.invokeMap=Ur(function(e,t){return"function"==typeof e?new Ni(this):this.map(function(i){return kr(i,e,t)})}),Ni.prototype.reject=function(e){return this.filter(Ms(sa(e)))},Ni.prototype.slice=function(e,t){e=po(e);var r=this;return r.__filtered__&&(e>0||t<0)?new Ni(r):(e<0?r=r.takeRight(-e):e&&(r=r.drop(e)),t!==i&&(r=(t=po(t))<0?r.dropRight(-t):r.take(t-e)),r)},Ni.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},Ni.prototype.toArray=function(){return this.take(u)},vr(Ni.prototype,function(e,t){var r=/^(?:filter|find|map|reject)|While$/.test(t),n=/^(?:head|last)$/.test(t),a=Bi[n?"take"+("last"==t?"Right":""):t],s=n||/^find/.test(t);a&&(Bi.prototype[t]=function(){var t=this.__wrapped__,o=n?[1]:arguments,l=t instanceof Ni,c=o[0],h=l||Ns(t),p=function(e){var t=a.apply(Bi,Mt([e],o));return n&&u?t[0]:t};h&&r&&"function"==typeof c&&1!=c.length&&(l=h=!1);var u=this.__chain__,d=!!this.__actions__.length,f=s&&!u,m=l&&!d;if(!s&&h){t=m?t:new Ni(this);var g=e.apply(t,o);return g.__actions__.push({func:hs,args:[p],thisArg:i}),new qi(g,u)}return f&&m?e.apply(this,o):(g=this.thru(p),f?n?g.value()[0]:g.value():g)})}),Pt(["pop","push","shift","sort","splice","unshift"],function(e){var t=$e[e],i=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",r=/^(?:pop|shift)$/.test(e);Bi.prototype[e]=function(){var e=arguments;if(r&&!this.__chain__){var n=this.value();return t.apply(Ns(n)?n:[],e)}return this[i](function(i){return t.apply(Ns(i)?i:[],e)})}}),vr(Ni.prototype,function(e,t){var i=Bi[t];if(i){var r=i.name+"";Ie.call($i,r)||($i[r]=[]),$i[r].push({name:t,func:i})}}),$i[On(i,2).name]=[{name:"wrapper",func:i}],Ni.prototype.clone=function(){var e=new Ni(this.__wrapped__);return e.__actions__=kn(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=kn(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=kn(this.__views__),e},Ni.prototype.reverse=function(){if(this.__filtered__){var e=new Ni(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},Ni.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,i=Ns(e),r=t<0,n=i?e.length:0,a=function(e,t,i){for(var r=-1,n=i.length;++r<n;){var a=i[r],s=a.size;switch(a.type){case"drop":e+=s;break;case"dropRight":t-=s;break;case"take":t=gi(t,e+s);break;case"takeRight":e=mi(e,t-s)}}return{start:e,end:t}}(0,n,this.__views__),s=a.start,o=a.end,l=o-s,c=r?o:s-1,h=this.__iteratees__,p=h.length,u=0,d=gi(l,this.__takeCount__);if(!i||!r&&n==l&&d==l)return un(e,this.__actions__);var f=[];e:for(;l--&&u<d;){for(var m=-1,g=e[c+=t];++m<p;){var v=h[m],y=v.iteratee,b=v.type,x=y(g);if(2==b)g=x;else if(!x){if(1==b)continue e;break e}}f[u++]=g}return f},Bi.prototype.at=ps,Bi.prototype.chain=function(){return cs(this)},Bi.prototype.commit=function(){return new qi(this.value(),this.__chain__)},Bi.prototype.next=function(){this.__values__===i&&(this.__values__=co(this.value()));var e=this.__index__>=this.__values__.length;return{done:e,value:e?i:this.__values__[this.__index__++]}},Bi.prototype.plant=function(e){for(var t,r=this;r instanceof Li;){var n=Ra(r);n.__index__=0,n.__values__=i,t?a.__wrapped__=n:t=n;var a=n;r=r.__wrapped__}return a.__wrapped__=e,t},Bi.prototype.reverse=function(){var e=this.__wrapped__;if(e instanceof Ni){var t=e;return this.__actions__.length&&(t=new Ni(this)),(t=t.reverse()).__actions__.push({func:hs,args:[Za],thisArg:i}),new qi(t,this.__chain__)}return this.thru(Za)},Bi.prototype.toJSON=Bi.prototype.valueOf=Bi.prototype.value=function(){return un(this.__wrapped__,this.__actions__)},Bi.prototype.first=Bi.prototype.head,Ke&&(Bi.prototype[Ke]=function(){return this}),Bi}();dt?((dt.exports=di)._=di,ut._=di):pt._=di}.call(lodash)),lodash$1.exports;var e,t}var lodashExports=requireLodash(),_=getDefaultExportFromCjs(lodashExports);function BeeArrowDiff({id:e,className:t,value:i,tooltip:r,disabled:n,decimals:a,isRoot:s=!1,locale:o="de-DE"}){const l=null!=e?e:libExports.useId(1,"bee-arrow-diff-")[0],c=n?" disabled":"";let h="";switch(!0){case null==i:break;case i<=-.5:h="bee-arrow bee-arrow-dive";break;case i>-.5&&i<0:h="bee-arrow-dip";break;case 0===i:h="bee-arrow-steady";break;case i>0&&i<.5:h="bee-arrow-bump";break;case i>=.5:h="bee-arrow-jump";break;default:h="bee-arrow-steady"}return require$$0.jsx("div",{className:null!=t?t:"",children:s||!i&&0!==i?null:require$$0.jsxs(require$$0.Fragment,{children:[require$$0.jsxs("div",{id:l,className:"bee-arrow-diff "+h+c,children:[require$$0.jsx("div",{className:"bee-arrow-diff-icon",children:require$$0.jsx("i",{className:"icon-right-arrow bee-arrow"})}),require$$0.jsxs("div",{className:"bee-arrow-diff-text",children:[new Intl.NumberFormat(o,{style:"decimal",maximumFractionDigits:a||0}).format(100*i),"%"]})]}),r&&!n?require$$0.jsx(tooltip.Tooltip,{target:".bee-arrow-diff",children:r}):null]})})}function BeeAddEntryCard({id:e,className:t,disabled:i,footer:r,onClick:n}){const a=null!=e?e:libExports.useId(1,"bee-add-entry-card-")[0],s="bee-add-entry-card"+(t?" "+t:"");return require$$0.jsxs("div",{id:a,className:s,children:[require$$0.jsx(BeeIconButton,{iconClass:"pi pi-plus",rounded:!0,halfRounded:!1,disabled:null!=i&&i,type:"primary",isLoading:!1,onClick:e=>function(e){!i&&n&&n(e)}(e)}),r&&require$$0.jsx("div",{className:"bee-add-entry-card-footer",children:r})]})}var extendStatics=function(e,t){return extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])},extendStatics(e,t)};function __extends(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function i(){this.constructor=e}extendStatics(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)}var __assign=function(){return __assign=Object.assign||function(e){for(var t,i=1,r=arguments.length;i<r;i++)for(var n in t=arguments[i])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e},__assign.apply(this,arguments)};function __awaiter(e,t,i,r){return new(i||(i=Promise))(function(n,a){function s(e){try{l(r.next(e))}catch(e){a(e)}}function o(e){try{l(r.throw(e))}catch(e){a(e)}}function l(e){var t;e.done?n(e.value):(t=e.value,t instanceof i?t:new i(function(e){e(t)})).then(s,o)}l((r=r.apply(e,t||[])).next())})}function BeeSkeleton({id:e,className:t,shape:i="rectangle",size:r,width:n,height:a,borderRadius:s,animated:o=!0,showHover:l,showShade:c}){const h=null!=e?e:libExports.useId(1,"bee-skeleton-")[0],p=o?"wave":"none",u=l?" bee-skeleto--hover":"",d=c?" bee-skeleton--shade":"",f="bee-skeleton-circle"+u+d+(t?" "+t:""),m="bee-skeleton-rectangle"+u+d+(t?" "+t:""),g=require$$0.jsx(skeleton.Skeleton,{className:f,id:h,shape:"circle",size:r,animation:p,borderRadius:s}),v=require$$0.jsx(skeleton.Skeleton,{className:m,id:h,shape:"rectangle",animation:p,width:n,height:a,borderRadius:s});return"circle"===i?g:v}function BeeImage({id:e,className:t,url:i,showPlaceholder:r,secured:n=!1,secureKey:a,alt:s,title:o,titlePosition:l="left",copyright:c,onClick:h}){const p=null!=e?e:libExports.useId(1,"bee-img-")[0],u=p+"-pay",d="left"===l?" bee-img-title bee-img-title-left":"center"===l?" bee-img-title bee-img-title-center":"right"===l?" bee-img-title bee-img-title-right":" bee-img-title bee-img-title-left",f="bee-img"+(t?" "+t:""),m="100%",g="100%";function v(e,t,i){return __awaiter(this,void 0,void 0,function*(){const r=yield function(e,t){let i=new Headers;return i.set("x-bee-secure",t),fetch(e,{headers:i})}(t,i),n=yield r.blob(),a=URL.createObjectURL(n),s=document.getElementById(e);s&&(s.src=a)})}return require$$0.jsxs("div",{id:p,onClick:e=>function(e){h&&h(e)}(e),className:f,children:[o?require$$0.jsx("div",{className:d,children:o}):null,r?require$$0.jsx(BeeSkeleton,{shape:"rectangle",animated:!0,width:"100%",height:"100px"}):n&&a?(v(u,i,a),require$$0.jsx("img",{id:u,src:"",alt:s,width:m,height:g})):require$$0.jsx("img",{id:u,src:i,alt:s,width:m,height:g}),c?require$$0.jsx("footer",{className:"bee-img-copyright",children:require$$0.jsx("small",{children:c})}):null]})}function BeeAvatar({imageUrl:e,imageKey:t,imageAlt:i,isImageSecured:r,showPlaceholder:n,placeholderFirstname:a,placeholderLastname:s,size:o,type:l,showDelete:c,readOnly:h,disabled:p,onDelete:u,onClick:d,onAdd:f}){const m="bee-avatar"+("primary"===l?" bee-avatar--primary":"secondary"===l?" bee-avatar--secondary":" bee-avatar--light")+("xSmall"===o?" bee-avatar--xsmall":"small"===o?" bee-avatar--small":"medium"===o?" bee-avatar--medium":"large"===o?" bee-avatar--large":"xLarge"===o?" bee-avatar--xlarge":" bee-avatar--medium");return require$$0.jsx(require$$0.Fragment,{children:n?require$$0.jsx(card.Card,{className:m+" placeholder-avatar",children:a||s?require$$0.jsx("div",{className:"placeholder-avatar__initials",children:(a?a.substring(0,1):"")+(s?s.substring(0,1):"")}):require$$0.jsx("i",{className:"pi pi-user placeholder-avatar__icon"})}):require$$0.jsx(require$$0.Fragment,{children:e?require$$0.jsxs(card.Card,{className:m+" image-avatar",children:[require$$0.jsx(BeeImage,{url:e,alt:i,title:void 0,titlePosition:"left",copyright:void 0,secured:!0===r,showPlaceholder:!1,onClick:e=>function(e){null==d||d(e)}(e)},t),c&&!h?require$$0.jsx(BeeIconButton,{iconClass:"pi pi-trash",rounded:!0,disabled:!1,type:"danger",isLoading:!1,onClick:()=>{null==u||u()}}):null]}):require$$0.jsx(card.Card,{className:m+" empty-avatar",children:require$$0.jsx(BeeAddEntryCard,{disabled:p,onClick:e=>function(e){null==f||f(e)}(e)})})})})}function BeeChip({id:e,className:t,label:i,labelTemplate:r,iconClass:n,image:a,imageAlt:s,removable:o,type:l="primary",onRemove:c,onClick:h}){const p=null!=e?e:libExports.useId(1,"bee-chip-")[0],u=(h?"bee-chip-clickable ":"")+("primary"===l?"bee-chip bee-chip-primary":"secondary"===l?"bee-chip bee-chip-secondary":"valid"===l?"bee-chip bee-chip-valid":"info"===l?"bee-chip bee-chip-info":"warn"===l?"bee-chip bee-chip-warn":"error"===l?"bee-chip bee-chip-error":"surface"===l?"bee-chip bee-chip-surface":"bee-chip bee-chip-primary")+(t?" "+t:"");return require$$0.jsxs("div",{className:u,children:[o?require$$0.jsx("div",{className:"bee-chip-remove-btn",onClick:e=>function(e){c&&c(e)}(e),children:require$$0.jsx("i",{className:"pi pi-times-circle"})}):null,require$$0.jsx("div",{onClick:e=>function(e){h&&h(e)}(e),children:require$$0.jsx(chip.Chip,{id:p,label:null!=i?i:"",template:r,icon:n,image:a,imageAlt:s,className:"bee-chip-content",removable:null!=o&&o,onRemove:e=>(c&&c(e.originalEvent),!0)})})]})}function BeeChipArea({id:e,className:t,label:i,type:r="primary",data:n,required:a,readOnly:s,onClick:o,onRemove:l}){const c=null!=e?e:libExports.useId(1,"bee-chip-area-")[0],h="bee-chip-area"+("primary"===r?" bee-chip-area-primary":"secondary"===r?" bee-chip-area-secondary":" bee-chip-area-primary")+(s?" bee-chip-area-readOnly":"")+(t?" "+t:"");return require$$0.jsxs("div",{id:c,className:h,children:[require$$0.jsx(require$$0.Fragment,{children:s&&!n||s&&n.length<1||!n||n.length<1?require$$0.jsx(BeePlaceholder,{id:c,label:null!=i?i:""}):require$$0.jsx(require$$0.Fragment,{children:n.map(e=>{var t;return require$$0.jsx("div",{className:"bee-chip-area-chip",children:require$$0.jsx(BeeChip,{id:e.id,label:null!==(t=e.label)&&void 0!==t?t:"",labelTemplate:e.labelTemplate,removable:!s||!s&&e.removable,onRemove:t=>function(e,t){l&&l(e,t)}(t,e.id),onClick:t=>function(e,t){o&&o(e,t)}(t,e.id)})},e.id)})})}),i?require$$0.jsxs("label",{className:"bee-chip-area-label",children:[i,a?require$$0.jsx("span",{className:"bee-chip-area-label-required",children:require$$0.jsx("span",{className:"bee-chip-area-label-required-star",children:" *"})}):null]}):null]})}function BeeDivider({id:e,className:t,label:i,iconClass:r,border:n="solid",orientation:a="horizontal",align:s="center",type:o="default"}){const l=null!=e?e:libExports.useId(1,"bee-divider-")[0],c=r?r+" mr-2":void 0;let h="";h=i||r?" bee-divider-content":" bee-divider-nocontent";const p=("primary"===o?"bee-divider bee-divider-primary":"secondary"===o?"bee-divider-secondary":"bee-divider-default")+h+(t?" "+t:"");return require$$0.jsx(divider.Divider,{id:l,type:n,align:s,className:p,layout:a,children:i||r?require$$0.jsxs("div",{className:"inline-flex align-items-center bee-divider-label",children:[c?require$$0.jsx("i",{className:c}):null,i?require$$0.jsx("b",{children:i}):null]}):null})}function BeeLoadingBar({id:e,className:t,value:i,indeterminate:r=!1,type:n="primary",showValue:a,unit:s}){const o=null!=e?e:libExports.useId(1,"bee-loading-bar-")[0],l="primary"===n?"bee-loadingbar-primary":"secondary"===n?"bee-loadingbar-secondary":"bee-loadingbar-primary"+(t?" "+t:"");return require$$0.jsx(progressbar.ProgressBar,{id:o,value:i,className:l,mode:r?"indeterminate":"determinate",showValue:a,unit:s})}function BeeLoadingSpinner({id:e,className:t,strokeWidth:i="2",animationDuration:r="4s",type:n="primary",size:a}){const s=null!=e?e:libExports.useId(1,"bee-loading-spinner-")[0],o="primary"===n?"bee-loading-spinner-primary":"secondary"===n?"bee-loading-spinner-secondary":"mixed"===n?"bee-loading-spinner-mixed":"bee-loading-spinner-primary"+(t?" "+t:""),l=a?{width:a,height:a}:void 0;return require$$0.jsx(progressspinner.ProgressSpinner,{className:o,id:s,strokeWidth:i,animationDuration:r,style:l})}function BeeSlider({id:e,className:t,value:i,min:r=0,max:n=100,step:a=1,disabled:s,orientation:o="horizontal",type:l="primary",onChange:c,onSlideEnd:h}){const p=null!=e?e:libExports.useId(1,"bee-slider-")[0],u="primary"===l?"bee-slider-primary":"secondary"===l?"bee-slider-secondary":"bee-slider-primary"+(t?" "+t:"");return require$$0.jsx(slider.Slider,{id:p,value:i,min:r,max:n,step:a,className:u,disabled:null!=s&&s,orientation:o,onChange:e=>function(e){!s&&c&&c(e)}(e),onSlideEnd:e=>function(e){!s&&h&&h(e)}(e)})}"function"==typeof SuppressedError&&SuppressedError;var dist={},hasRequiredDist;function requireDist(){if(hasRequiredDist)return dist;hasRequiredDist=1,Object.defineProperty(dist,"__esModule",{value:!0});var e=require$$0,t=React,i=function(){return i=Object.assign||function(e){for(var t,i=1,r=arguments.length;i<r;i++)for(var n in t=arguments[i])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e},i.apply(this,arguments)};function r(e,t,i){for(var r,n=0,a=t.length;n<a;n++)!r&&n in t||(r||(r=Array.prototype.slice.call(t,0,n)),r[n]=t[n]);return e.concat(r||Array.prototype.slice.call(t))}function n(t){var r=t.size,n=void 0===r?25:r,a=t.SVGstrokeColor,s=void 0===a?"currentColor":a,o=t.SVGstorkeWidth,l=void 0===o?0:o,c=t.SVGclassName,h=void 0===c?"star-svg":c,p=t.SVGstyle;return e.jsx("svg",i({className:h,style:p,stroke:s,fill:"currentColor",strokeWidth:l,viewBox:"0 0 24 24",width:n,height:n,xmlns:"http://www.w3.org/2000/svg"},{children:e.jsx("path",{d:"M12 17.27L18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21z"})}))}function a(e,t){switch(t.type){case"PointerMove":return i(i({},e),{hoverValue:t.payload,hoverIndex:t.index});case"PointerLeave":return i(i({},e),{ratingValue:e.ratingValue,hoverIndex:0,hoverValue:null});case"MouseClick":return i(i({},e),{valueIndex:e.hoverIndex,ratingValue:t.payload});default:return e}}function s(){return"undefined"!=typeof window&&window.matchMedia("(pointer: coarse)").matches||"ontouchstart"in window||"undefined"!=typeof navigator&&navigator.maxTouchPoints>0}return function(e,t){void 0===t&&(t={});var i=t.insertAt;if("undefined"!=typeof document){var r=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css","top"===i&&r.firstChild?r.insertBefore(n,r.firstChild):r.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}}(".style-module_starRatingWrap__q-lJC{display:inline-block;touch-action:none}.style-module_simpleStarRating__nWUxf{display:inline-block;overflow:hidden;position:relative;touch-action:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;vertical-align:middle;white-space:nowrap}.style-module_fillIcons__6---A{display:inline-block;overflow:hidden;position:absolute;top:0;white-space:nowrap}.style-module_emptyIcons__Bg-FZ{display:inline-block}.style-module_tooltip__tKc3i{background-color:#333;border-radius:5px;color:#fff;display:inline-block;padding:5px 15px;vertical-align:middle}"),dist.Rating=function(o){var l,c,h=o.onClick,p=o.onPointerMove,u=o.onPointerEnter,d=o.onPointerLeave,f=o.initialValue,m=void 0===f?0:f,g=o.iconsCount,v=void 0===g?5:g,y=o.size,b=void 0===y?40:y,x=o.readonly,_=void 0!==x&&x,S=o.rtl,w=void 0!==S&&S,C=o.customIcons,P=void 0===C?[]:C,E=o.allowFraction,k=void 0!==E&&E,$=o.style,A=o.className,T=void 0===A?"react-simple-star-rating":A,D=o.transition,M=void 0!==D&&D,I=o.allowHover,F=void 0===I||I,j=o.disableFillHover,R=void 0!==j&&j,B=o.fillIcon,O=void 0===B?null:B,L=o.fillColor,q=void 0===L?"#ffbc0b":L,N=o.fillColorArray,z=void 0===N?[]:N,V=o.fillStyle,H=o.fillClassName,W=void 0===H?"filled-icons":H,G=o.emptyIcon,U=void 0===G?null:G,Y=o.emptyColor,K=void 0===Y?"#cccccc":Y,X=o.emptyStyle,Z=o.emptyClassName,J=void 0===Z?"empty-icons":Z,Q=o.allowTitleTag,ee=void 0===Q||Q,te=o.showTooltip,ie=void 0!==te&&te,re=o.tooltipDefaultText,ne=void 0===re?"Your Rate":re,ae=o.tooltipArray,se=void 0===ae?[]:ae,oe=o.tooltipStyle,le=o.tooltipClassName,ce=void 0===le?"react-simple-star-rating-tooltip":le,he=o.SVGclassName,pe=void 0===he?"star-svg":he,ue=o.titleSeparator,de=void 0===ue?"out of":ue,fe=o.SVGstyle,me=o.SVGstorkeWidth,ge=void 0===me?0:me,ve=o.SVGstrokeColor,ye=void 0===ve?"currentColor":ve,be=t.useReducer(a,{hoverIndex:0,valueIndex:0,ratingValue:m,hoverValue:null}),xe=be[0],_e=xe.ratingValue,Se=xe.hoverValue,we=xe.hoverIndex,Ce=xe.valueIndex,Pe=be[1];t.useEffect(function(){m&&Pe({type:"MouseClick",payload:0})},[m]);var Ee=t.useMemo(function(){return k?2*v:v},[k,v]),ke=t.useMemo(function(){return m>Ee?0:k||Math.floor(m)===m?Math.round(m/v*100):2*Math.ceil(m)*10},[k,m,v,Ee]),$e=t.useMemo(function(){return(k?2*m-1:m-1)||0},[k,m]),Ae=t.useCallback(function(e){return v%2!=0?e/2/10:e*v/100},[v]),Te=function(e){for(var t=e.clientX,i=e.currentTarget.children[0].getBoundingClientRect(),r=i.left,n=i.right,a=i.width,s=w?n-t:t-r,o=Ee,l=Math.round(a/Ee),c=0;c<=Ee;c+=1)if(s<=l*c){o=0===c&&s<l?0:c;break}var h=o-1;o>0&&(Pe({type:"PointerMove",payload:100*o/Ee,index:h}),p&&Se&&p(Ae(Se),h,e))},De=function(e){Se&&(Pe({type:"MouseClick",payload:Se}),h&&h(Ae(Se),we,e))},Me=t.useMemo(function(){if(F){if(R){var e=_e&&_e||ke;return Se&&Se>e?Se:e}return Se&&Se||_e&&_e||ke}return _e&&_e||ke},[F,R,Se,_e,ke]);t.useEffect(function(){se.length>Ee&&console.error("tooltipArray Array length is bigger then Icons Count length.")},[se.length,Ee]);var Ie=t.useCallback(function(e){return Se&&e[we]||_e&&e[Ce]||m&&e[$e]},[Se,we,_e,Ce,m,$e]),Fe=t.useMemo(function(){return Se&&Ae(Se)||_e&&Ae(_e)||m&&Ae(ke)},[Se,Ae,_e,m,ke]);return e.jsxs("span",i({className:"style-module_starRatingWrap__q-lJC",style:{direction:"".concat(w?"rtl":"ltr")}},{children:[e.jsxs("span",i({className:"".concat("style-module_simpleStarRating__nWUxf"," ").concat(T),style:i({cursor:_?"":"pointer"},$),onPointerMove:_?void 0:Te,onPointerEnter:_?void 0:function(e){u&&u(e),s()&&Te(e)},onPointerLeave:_?void 0:function(e){s()&&De(),Pe({type:"PointerLeave"}),d&&d(e)},onClick:_?void 0:De,"aria-hidden":"true"},{children:[e.jsx("span",i({className:"".concat("style-module_emptyIcons__Bg-FZ"," ").concat(J),style:i({color:K},X)},{children:r([],Array(v)).map(function(i,r){var a;return e.jsx(t.Fragment,{children:(null===(a=P[r])||void 0===a?void 0:a.icon)||U||e.jsx(n,{SVGclassName:pe,SVGstyle:fe,SVGstorkeWidth:ge,SVGstrokeColor:ye,size:b})},r)})})),e.jsx("span",i({className:"".concat("style-module_fillIcons__6---A"," ").concat(W),style:i((l={},l[w?"right":"left"]=0,l.color=Ie(z)||q,l.transition=M?"width .2s ease, color .2s ease":"",l.width="".concat(Me,"%"),l),V),title:ee?"".concat(Fe," ").concat(de," ").concat(v):void 0},{children:r([],Array(v)).map(function(i,r){var a;return e.jsx(t.Fragment,{children:(null===(a=P[r])||void 0===a?void 0:a.icon)||O||e.jsx(n,{SVGclassName:pe,SVGstyle:fe,SVGstorkeWidth:ge,SVGstrokeColor:ye,size:b})},r)})}))]})),ie&&e.jsx("span",i({className:"".concat("style-module_tooltip__tKc3i"," ").concat(ce),style:i((c={},c[w?"marginRight":"marginLeft"]=20,c),oe)},{children:(se.length>0?Ie(se):Fe)||ne}))]}))},dist}var distExports=requireDist();function BeeStarBar({id:e,className:t,value:i,stars:r,disabled:n,readOnly:a,type:s="primary",size:o=40,onChange:l}){const c=null!=e?e:libExports.useId(1,"bee-starbar-")[0],h="bee-starbar "+("primary"===s?"bee-starbar-primary":"secondary"===s?"bee-starbar-secondary":"bee-starbar-primary")+(a?" bee-starbar-readonly":"")+(n?" bee-starbar-disabled":"")+(t?" "+t:"");return require$$0.jsx("div",{id:c,children:require$$0.jsx(distExports.Rating,{initialValue:(console.log(i/r*100),i/r*100),iconsCount:r,readonly:!(!a&&!n),className:h,allowFraction:!0,size:o,showTooltip:!1,tooltipClassName:"starbar-rating-tooltip",tooltipStyle:{visibility:"hidden",display:"none"},fillColor:n?"var(--surface-500)":"primary"===s?"var(--primary-color)":"secondary"===s?"var(--secondary-color)":"var(--primary-color)",emptyColor:n?"var(--surface-300)":"var(--surface-500)",onClick:e=>function(e){l&&l(e)}(e)})})}function BeeCopyInput({id:e,className:t,label:i,value:r,disabled:n,iconClass:a}){const s=null!=e?e:libExports.useId(1,"bee-copy-input-")[0],o="bee-copy-input-link"+(t?" "+t:"");return require$$0.jsx("div",{className:"bee-copy-input",children:require$$0.jsx(require$$0.Fragment,{children:r?require$$0.jsxs("div",{className:o,onClick:()=>{r&&navigator.clipboard.writeText(r)},children:[require$$0.jsx(BeeTextInput,{id:s+"input",label:i,value:r,disabled:null!=n&&n,formstate:"neutral",readOnly:!0,required:!1}),require$$0.jsx("i",{className:a+" icon"})]}):require$$0.jsx(BeePlaceholder,{id:s,label:null!=i?i:""})})})}function BeeVisibleItemCount({id:e,className:t,visibleData:i,allData:r,isLoading:n}){const a="bee-visible-item-count"+(n?" isLoading":"")+(t?" "+t:"");return require$$0.jsx("div",{id:e,className:a,children:function(e,t){return e&&e.length>0&&t&&t.length>0&&!n?require$$0.jsx(require$$0.Fragment,{children:e.length+" / "+t.length}):require$$0.jsx(require$$0.Fragment,{children:"– / –"})}(i,r)})}function BeeBreadcrumb({id:e,className:t,border:i,items:r,type:n="default",isLoading:a}){const s=null!=e?e:libExports.useId(1,"bee-breadcrumb-")[0],o="bee-breadcrumb "+("primary"===n?"bee-breadcrumb-primary":"secondary"===n?"bee-breadcrumb-secondary":"bee-breadcrumb-default")+(i?"":" bee-breadcrumb-no-border")+(t?" "+t:"");return a?require$$0.jsx(BeeSkeleton,{shape:"rectangle",size:"20",width:"180",height:"20",animated:!0}):require$$0.jsx("div",{id:s,className:o,children:require$$0.jsx(breadcrumb.BreadCrumb,{model:_.drop(r,1),home:r[0]})})}function BeeTabview({id:e,className:t,type:i="default",tabs:r,activeIndex:n,onChangeIndex:a}){const s=null!=e?e:libExports.useId(1,"bee-tabview-")[0],o="bee-tabview"+("primary"===i?" bee-tabview-primary":"secondary"===i?" bee-tabview-secondary":" bee-tabview-default")+(t?" "+t:"");return require$$0.jsx("div",{id:s,className:o,children:require$$0.jsx(tabview.TabView,{activeIndex:n,onTabChange:e=>function(e){a&&a(e)}(e),scrollable:!0,children:r.map(e=>require$$0.jsx(tabview.TabPanel,{header:e.title,disabled:e.disabled},"tab_"+e.title))})})}const enter=13,escape=27,ENTER_KEY="Enter";function BeeCheckbox({id:e,className:t,label:i,value:r,disabled:n,statusLabel:a,type:s="primary",formstate:o="neutral",stateTrue:l="Ja",stateFalse:c="Nein",required:h,readOnly:p,tooltip:u,tooltipOptions:d,onChange:f}){const m=null!=e?e:libExports.useId(1,"bee-checkbox-")[0],g=m+"input",v="primary"===s?" bee-checkbox-primary":"secondary"===s?" bee-checkbox-secondary":" bee-checkbox-primary";let y="";p&&(y=" bee-checkbox-readOnly",n=!0);const b="bee-checkbox "+("valid"===o?" bee-checkbox-valid":"error"===o?" bee-checkbox-error":"neutral"===o?" bee-checkbox-neutral":"none"===o?" bee-checkbox-field-neutral":" bee-checkbox-neutral")+y+(n?" bee-checkbox-disabled":"")+v;return require$$0.jsxs("div",{className:null!=t?t:"",title:u,children:[require$$0.jsxs("span",{id:m,className:b,onKeyDown:e=>{!function(e){e.stopPropagation(),e.key===ENTER_KEY&&f&&f({checked:!r})}(e)},children:[require$$0.jsxs("label",{className:"bee-checkbox-input",htmlFor:g,children:[p?require$$0.jsx(require$$0.Fragment,{children:r?require$$0.jsx("i",{className:"pi pi-check"}):require$$0.jsx("i",{className:"pi pi-times"})}):require$$0.jsx(checkbox.Checkbox,{inputId:g,checked:null!=r&&r,onChange:e=>function(e){!n&&f&&f(e)}(e),className:v,tooltip:u,tooltipOptions:d}),require$$0.jsx("span",{className:"bee-checkbox-value",children:!0===r?l:c})]}),null!=i&&""!==i?require$$0.jsxs("label",{htmlFor:g,className:"bee-checkbox-label",children:[i,h?require$$0.jsx("span",{className:"bee-checkbox-label-required",children:require$$0.jsx("span",{className:"bee-checkbox-label-required-star",children:" *"})}):null]}):null]}),"none"!=o&&a?(()=>{const e="medium";return require$$0.jsx("div",{className:"bee-checkbox-statusLabel",children:"neutral"===o&&a?require$$0.jsx(BeeLabel,{size:e,value:a,type:"neutral"}):"valid"===o&&a?require$$0.jsx(BeeLabel,{size:e,value:a,type:"valid"}):"error"===o&&a?require$$0.jsx(BeeLabel,{size:e,value:a,type:"error"}):null})})():null]})}function BeeCheckboxTriState({id:e,className:t,label:i,stateNull:r="Empty",stateFalse:n="False",stateTrue:a="True",value:s,disabled:o,required:l,statusLabel:c,formstate:h="neutral",readOnly:p,tooltip:u,tooltipOptions:d,onChange:f}){const m=null!=e?e:libExports.useId(1,"bee-tri-checkbox-")[0],g=m+"input";let v="";p&&(v=" bee-tri-state-readOnly",o=!0);const y="bee-tri-state "+("valid"===h?" bee-tri-state-valid":"error"===h?" bee-tri-state-error":" bee-tri-state-neutral")+v+(o?" bee-tri-state-disabled":"")+(t?" "+t:""),b=i?"bee-tri-state-label":"";const x=!0===s||!1===s?s:null;return require$$0.jsxs("div",{className:null!=t?t:"",children:[require$$0.jsxs("div",{id:m,className:y,onKeyDown:e=>{!function(e){e.stopPropagation(),e.key===ENTER_KEY&&f&&f({target:{value:!s&&(!1===s?null:null==s||null)}})}(e)},children:[require$$0.jsxs("label",{className:"bee-tri-state-input",htmlFor:g,children:[p?require$$0.jsx(require$$0.Fragment,{children:!0===s?require$$0.jsx("i",{className:"pi pi-check"}):!1===s?require$$0.jsx("i",{className:"pi pi-times"}):require$$0.jsx("i",{className:"pi pi-question"})}):require$$0.jsx(tristatecheckbox.TriStateCheckbox,{id:g,value:x,onChange:e=>function(e){!o&&f&&f(e)}(e),tooltip:u,tooltipOptions:d}),require$$0.jsx("span",{className:"bee-tri-state-value",children:!0===s?a:!1===s?n:r})]}),null!=i&&""!==i?require$$0.jsxs("label",{htmlFor:g,className:b,children:[i,l?require$$0.jsx("span",{className:"bee-tri-state-label-required",children:require$$0.jsx("span",{className:"bee-tri-state-label-required-star",children:" *"})}):null]}):null]}),"none"!=h&&c?(()=>{const e="medium";return require$$0.jsx("div",{className:"bee-checkbox-tristate-statusLabel",children:"error"===h&&c?require$$0.jsx(BeeLabel,{size:e,value:c,type:"error"}):"valid"===h&&c?require$$0.jsx(BeeLabel,{size:e,value:c,type:"valid"}):"neutral"===h&&c?require$$0.jsx(BeeLabel,{size:e,value:c,type:"neutral"}):null})})():null]})}function BeeColorSelect({id:e,className:t,label:i,value:r,inline:n=!1,disabled:a,required:s,statusLabel:o,formstate:l="neutral",readOnly:c,defaultColor:h,format:p="rgb",tooltip:u,tooltipOptions:d,onChange:f}){const m=null!=e?e:libExports.useId(1,"bee-color-select-")[0],g=m+"input",v=a?" bee-color-select-disabled":"";let y="";c&&(y=" bee-color-select-readOnly",a=!0);const b="bee-color-select"+("valid"===l?" bee-color-select-valid":"error"===l?" bee-color-select-error":" bee-color-select-neutral")+y+v+(t?" "+t:""),x=i?"bee-color-select-label":"";function _(e){!a&&f&&f(e)}return require$$0.jsxs("div",{id:m,className:b,children:[i?require$$0.jsxs("label",{className:x,htmlFor:g,children:[i,s&&i?require$$0.jsx("span",{className:"bee-color-select-label-required",children:require$$0.jsx("span",{className:"bee-color-select-label-required-star",children:" *"})}):null]}):null,require$$0.jsx("div",{className:"bee-color-select-input",children:c?require$$0.jsx(colorpicker.ColorPicker,{id:g,value:r,defaultColor:h,format:p,onChange:e=>_(e),disabled:null!=a&&a,inline:!1,tooltip:u,tooltipOptions:d}):require$$0.jsx(colorpicker.ColorPicker,{id:g,value:r,defaultColor:h,format:p,onChange:e=>_(e),disabled:null!=a&&a,inline:n,tooltip:u,tooltipOptions:d})}),"none"!=l&&o?(()=>{const e="medium";return require$$0.jsx("div",{className:"bee-color-select-statusLabel",children:"error"===l&&o?require$$0.jsx(BeeLabel,{size:e,value:o,type:"error"}):"valid"===l&&o?require$$0.jsx(BeeLabel,{size:e,value:o,type:"valid"}):"neutral"===l&&o?require$$0.jsx(BeeLabel,{size:e,value:o,type:"neutral"}):null})})():null]})}function BeeCurrencySelect({id:e,className:t,label:i,value:r,disabled:n,currency:a="EUR",locale:s="de-DE",statusLabel:o,formstate:l="neutral",readOnly:c,required:h,placeholder:p,min:u,max:d,tooltip:f,tooltipOptions:m,onChange:g}){const v=null!=e?e:libExports.useId(1,"bee-cur-select-")[0],y=v+"input";let b="";c&&(b=" bee-cur-select-readOnly",n=!0);const x="p-float-label bee-cur-select-container"+("valid"===l?" bee-cur-select-valid":"error"===l?" bee-cur-select-error":" bee-cur-select-neutral")+b;return require$$0.jsxs(require$$0.Fragment,{children:[c&&!r?require$$0.jsx("div",{className:null!=t?t:"",children:require$$0.jsx(BeePlaceholder,{id:v,label:i})}):require$$0.jsxs("span",{id:v,className:x+(t?" "+t:""),children:[require$$0.jsx(inputnumber.InputNumber,{id:y,value:null!=r?r:null,disabled:null!=n&&n,mode:"currency",currency:a,locale:s,showButtons:!0,placeholder:p,min:u,max:d,onValueChange:e=>function(e){!n&&g&&g(e)}(e),tooltip:f,tooltipOptions:m}),i?require$$0.jsxs("label",{htmlFor:y,children:[i,h&&i?require$$0.jsx("span",{className:"bee-cur-select-label-required",children:require$$0.jsx("span",{className:"bee-cur-select-label-required-star",children:" *"})}):null]}):null]}),"none"!=l&&o?(()=>{const e="medium";return require$$0.jsx("div",{className:"bee-cur-select-statusLabel",children:"error"===l&&o?require$$0.jsx(BeeLabel,{size:e,value:o,type:"error"}):"valid"===l&&o?require$$0.jsx(BeeLabel,{size:e,value:o,type:"valid"}):"neutral"===l&&o?require$$0.jsx(BeeLabel,{size:e,value:o,type:"neutral"}):null})})():null]})}function BeeDropDown({id:e,className:t,label:i,value:r,valueTemplate:n,itemTemplate:a,options:s,optionLabel:o,optionValue:l,emptyPlaceholder:c,filter:h,filterBy:p,filterPlaceholder:u,disabled:d,statusLabel:f,formstate:m="neutral",readOnly:g,required:v,editable:y,showDelete:b,deleteIcon:x,emptyMessage:_,emptyFilterMessage:S,tooltip:w,tooltipOptions:C,onChange:P}){const E=null!=e?e:libExports.useId(1,"bee-drop-down-")[0],k=E+"input";let $="";g&&($=" bee-dropdown-readOnly",d=!0);const A=("valid"===m?"bee-dropdown-valid":"error"===m?"bee-dropdown-error":"bee-dropdown-neutral")+$,T=x||"pi pi-times-circle";function D(e){!d&&P&&P(e)}const M=React.useCallback((e,t)=>{var r,a;if(!!(null==e||"string"==typeof e&&0===e.length||"object"==typeof e&&0===Object.keys(e).length)){const e=null!==(r=null!=c?c:t.placeholder)&&void 0!==r?r:"string"==typeof i?i:"";return e?"string"==typeof e?require$$0.jsx("span",{children:e}):e:require$$0.jsx("span",{children:" "})}const s="function"==typeof n?n(e,t):n,o="string"==typeof s&&0===s.trim().length;if(null!=s&&!1!==s&&!o)return s;const l=null!==(a=null!=c?c:t.placeholder)&&void 0!==a?a:"string"==typeof i?i:"";return l?"string"==typeof l?require$$0.jsx("span",{children:l}):l:require$$0.jsx("span",{children:" "})},[c,i,n]);return require$$0.jsxs("div",{className:"bee-dropdown",children:[g&&!r?require$$0.jsx("div",{className:null!=t?t:"",children:require$$0.jsx(BeePlaceholder,{id:E,label:i})}):require$$0.jsxs("span",{id:E,className:"p-float-label bee-dropdown-container"+(t?" "+t:""),children:[require$$0.jsx(dropdown.Dropdown,{id:k,value:r,valueTemplate:n?M:void 0,options:s,disabled:null!=d&&d,className:A,onChange:e=>D(e),optionLabel:o,optionValue:l,itemTemplate:null!=a?a:void 0,placeholder:c,emptyMessage:null!=_?_:"Keine Einträge gefunden",emptyFilterMessage:S,editable:null!=y&&y,filter:null!=h&&h,filterPlaceholder:u,filterBy:p,tooltip:w,tooltipOptions:C}),i?require$$0.jsxs("label",{htmlFor:k,children:[i,v&&i?require$$0.jsx("span",{className:"bee-dropdown-label-required",children:require$$0.jsx("span",{className:"bee-dropdown-label-required-star",children:" *"})}):null]}):null,r&&b&&require$$0.jsx("div",{className:"filter-cancel",children:require$$0.jsx(BeeIconButton,{iconClass:T,rounded:!0,disabled:null!=d&&d,type:"lightPrimary",isLoading:!1,onClick:()=>D({label:"",value:null})})})]}),"none"!=m&&f?(()=>{const e="medium";return require$$0.jsx("div",{className:"bee-dropdown-statusLabel",children:"error"===m&&f?require$$0.jsx(BeeLabel,{size:e,value:f,type:"error"}):"valid"===m&&f?require$$0.jsx(BeeLabel,{size:e,value:f,type:"valid"}):"neutral"===m&&f?require$$0.jsx(BeeLabel,{size:e,value:f,type:"neutral"}):null})})():null]})}function BeeNumberSelect({id:e,className:t,label:i,value:r,minFractionDigits:n,maxFractionDigits:a,min:s,max:o,stepSize:l,disabled:c,grouping:h=!0,statusLabel:p,formstate:u="neutral",readOnly:d,required:f,placeholder:m,tooltip:g,tooltipOptions:v,onChange:y,onFocusOut:b}){const x=null!=e?e:libExports.useId(1,"bee-num-select-")[0],_=x+"input";let S="";d&&(S=" bee-num-select-readOnly",c=!0);const w="p-float-label bee-num-select-container"+("valid"===u?" bee-num-select-valid":"error"===u?" bee-num-select-error":" bee-num-select-neutral")+S;return require$$0.jsxs(require$$0.Fragment,{children:[d&&!r?require$$0.jsx("div",{className:null!=t?t:"",children:require$$0.jsx(BeePlaceholder,{id:x,label:i})}):require$$0.jsxs("span",{id:x,className:w+(t?" "+t:""),children:[require$$0.jsx(inputnumber.InputNumber,{id:_,value:null!=r?r:null,disabled:null!=c&&c,mode:"decimal",useGrouping:h,minFractionDigits:n,maxFractionDigits:a,min:s,max:o,showButtons:!0,step:null!=l?l:1,placeholder:m,tooltip:g,tooltipOptions:v,onValueChange:e=>function(e){!c&&y&&y(e)}(e),onBlur:e=>function(e){!c&&b&&b(e)}(e)}),i?require$$0.jsxs("label",{htmlFor:_,children:[i,f&&i?require$$0.jsx("span",{className:"bee-num-select-label-required",children:require$$0.jsx("span",{className:"bee-num-select-label-required-star",children:" *"})}):null]}):null]}),"none"!=u&&p?(()=>{const e="medium";return require$$0.jsx("div",{className:"bee-num-select-statusLabel",children:"error"===u&&p?require$$0.jsx(BeeLabel,{size:e,value:p,type:"error"}):"valid"===u&&p?require$$0.jsx(BeeLabel,{size:e,value:p,type:"valid"}):"neutral"===u&&p?require$$0.jsx(BeeLabel,{size:e,value:p,type:"neutral"}):null})})():null]})}function BeeSwitch({id:e,className:t,label:i,value:r,disabled:n,statusLabel:a,formstate:s="neutral",stateFalse:o="Nein",stateTrue:l="Ja",required:c,readOnly:h,tooltip:p,tooltipOptions:u,onChange:d}){const f=null!=e?e:libExports.useId(1,"bee-switch-")[0],m=f+"input";let g="";h&&(g=" bee-switch-readOnly",n=!0);const v="bee-switch"+("valid"===s?" bee-switch-valid":"error"===s?" bee-switch-error":" bee-switch-neutral")+g+(n?" bee-switch-disabled":"")+(t?" "+t:""),y=i?"bee-switch-label":"";const b=!0===r;return require$$0.jsxs("div",{id:f,className:v,children:[require$$0.jsxs("div",{className:"bee-switch-input",children:[require$$0.jsx(inputswitch.InputSwitch,{inputId:m,checked:b,className:b?"p-inputswitch-checked":void 0,onChange:e=>function(e){!n&&d&&d(e)}(e),disabled:null!=n&&n,tooltip:p,tooltipOptions:u}),require$$0.jsx("label",{className:"bee-switch-value",htmlFor:m,children:b?l:o})]}),i?require$$0.jsxs("label",{className:y,htmlFor:m,children:[i,c&&i?require$$0.jsx("span",{className:"bee-switch-label-required",children:require$$0.jsx("span",{className:"bee-switch-label-required-star",children:" *"})}):null]}):null,"none"!=s&&a?(()=>{const e="medium";return require$$0.jsx("div",{className:"bee-switch-statusLabel",children:"error"===s&&a?require$$0.jsx(BeeLabel,{size:e,value:a,type:"error"}):"valid"===s&&a?require$$0.jsx(BeeLabel,{size:e,value:a,type:"valid"}):"neutral"===s&&a?require$$0.jsx(BeeLabel,{size:e,value:a,type:"neutral"}):null})})():null]})}function BeeTreeSelect({id:e,className:t,label:i,value:r,showDelete:n,options:a,valueTemplate:s,display:o="comma",selectionMode:l="single",placeholder:c,panelClassName:h,filter:p,filterTemplate:u,filterValue:d,filterBy:f,filterPlaceholder:m,disabled:g,readOnly:v,statusLabel:y,formstate:b="neutral",required:x,emptyMessage:_,tooltip:S,tooltipOptions:w,onChange:C,onNodeSelect:P,onHide:E}){var k;const $=null!=e?e:libExports.useId(1,"bee-treeselect-")[0],A=$+"input";let T="";v&&(T=" bee-ts-readOnly",g=!0);const D=("valid"===b?" bee-ts-valid":"error"===b?" bee-ts-error":" bee-ts-neutral")+T,M=" bee-ts-container ",I=p?" bee-ts-panel":" bee-ts-panel bee-ts-invisible-header";function F(e){!g&&C&&C(e)}function j(e){!g&&P&&P(e)}function R(){!g&&E&&E()}const B=React.useCallback((e,t)=>{var r,n,a,o;if(!!(null==e||"string"==typeof e&&0===e.length||"object"==typeof e&&0===Object.keys(e).length)){const e=null!==(n=null!==(r=t.placeholder)&&void 0!==r?r:i)&&void 0!==n?n:"";return e?require$$0.jsx("span",{children:e}):require$$0.jsx("span",{children:" "})}const l="function"==typeof s?s(e,t):s,c="string"==typeof l&&0===l.trim().length;if(null!=l&&!1!==l&&!c)return l;const h=null!==(o=null!==(a=t.placeholder)&&void 0!==a?a:i)&&void 0!==o?o:"";return h?require$$0.jsx("span",{children:h}):require$$0.jsx("span",{children:" "})},[i,c,s]);return require$$0.jsxs(require$$0.Fragment,{children:[v&&!r?require$$0.jsx("div",{className:null!=t?t:"",children:require$$0.jsx(BeePlaceholder,{id:$,label:i})}):require$$0.jsx(require$$0.Fragment,{children:require$$0.jsxs("div",{id:$,className:t?t+M:M,children:[require$$0.jsx("div",{className:!v&&r&&Object.keys(r).length>0?"bee-ts-filter__deleteBtn":"bee-ts-filter__deleteBtn bee-ts-filter--hidden",children:n?require$$0.jsx(BeeIconButton,{iconClass:"pi pi-times-circle",rounded:!0,disabled:!1,type:"lightPrimary",isLoading:!1,onClick:()=>{F(void 0),j(void 0),R()}}):null}),require$$0.jsxs("div",{className:"p-float-label",children:[require$$0.jsx(treeselect.TreeSelect,{id:A,value:r,valueTemplate:s?B:void 0,options:a,disabled:g,className:D,panelClassName:h?h+I:I,display:o,selectionMode:l,placeholder:null!==(k=null!=c?c:i)&&void 0!==k?k:void 0,filter:p,filterTemplate:u,filterValue:d,filterBy:f,filterPlaceholder:null!=m?m:"Suche",onChange:e=>F(e),onNodeSelect:e=>j(e),onHide:()=>R(),emptyMessage:_,tooltip:S,tooltipOptions:w}),i?require$$0.jsxs("label",{htmlFor:A,className:"bee-ts-label",children:[i,x&&i?require$$0.jsx("span",{className:"bee-ts-label-required",children:require$$0.jsx("span",{className:"bee-ts-label-required-star",children:" *"})}):null]}):null]})]})}),"none"!=b&&y?(()=>{const e="medium";return require$$0.jsx("div",{className:"bee-ts-statusLabel",children:"error"===b&&y?require$$0.jsx(BeeLabel,{size:e,value:y,type:"error"}):"valid"===b&&y?require$$0.jsx(BeeLabel,{size:e,value:y,type:"valid"}):"neutral"===b&&y?require$$0.jsx(BeeLabel,{size:e,value:y,type:"neutral"}):null})})():null]})}function BeeChipDropdown({id:e,className:t,label:i,value:r,options:n,optionLabel:a,statusLabel:s,disabled:o,formstate:l="neutral",readOnly:c,required:h,placeholder:p,maxSelectedLabels:u,filter:d,filterBy:f,filterPlaceholder:m,emptyFilterMessage:g,emptyMessage:v,onChange:y}){const b=null!=e?e:libExports.useId(1,"bee-chip-dropdown-")[0],x=b+"input";let _="";c&&(_=" bee-chip-dropdown-readOnly",o=!0);const S=("valid"===l?"bee-chip-dropdown-valid":"error"===l?"bee-chip-dropdown-error":"bee-chip-dropdown-neutral")+_;return require$$0.jsxs("div",{children:[c&&!r?require$$0.jsx("div",{className:null!=t?t:"",children:require$$0.jsx(BeePlaceholder,{id:b,label:null!=i?i:""})}):require$$0.jsxs("span",{id:b,className:"p-float-label bee-chip-dropdown-container"+(t?" "+t:""),children:[require$$0.jsx(multiselect.MultiSelect,Object.assign({display:"chip",id:x,value:r,options:n,disabled:null!=o&&o,className:S,onChange:e=>{return t=e,void(!o&&y&&y(t));var t},optionLabel:a,panelHeaderTemplate:e=>{const t=`${e.className} p-multiselect-header bee-chip-dropdown__header`,i="bee-chip-dropdown_selectall",r=`${i}_label`;return require$$0.jsxs("div",{className:t,children:[e.checkboxElement,require$$0.jsx("label",{id:r,className:"p-checkbox-label",htmlFor:i,children:"Alle auswählen"})]})},placeholder:p,maxSelectedLabels:u,filter:null!=d&&d,filterBy:f},void 0!==m&&{filterPlaceholder:m},void 0!==v&&{emptyMessage:v},void 0!==g&&{emptyFilterMessage:g})),i?require$$0.jsxs("label",{htmlFor:x,children:[i,h&&i?require$$0.jsx("span",{className:"bee-chip-dropdown-label-required",children:require$$0.jsx("span",{className:"bee-chip-dropdown-label-required-star",children:" *"})}):null]}):null]}),"none"!=l&&s?(()=>{const e="medium";return require$$0.jsx("div",{className:"bee-chip-dropdown-statusLabel",children:"error"===l&&s?require$$0.jsx(BeeLabel,{size:e,value:s,type:"error"}):"valid"===l&&s?require$$0.jsx(BeeLabel,{size:e,value:s,type:"valid"}):"neutral"===l&&s?require$$0.jsx(BeeLabel,{size:e,value:s,type:"neutral"}):null})})():null]})}var ChatMessageSourceEnum,ChatParticipantTypeEnum,ServerStatus;function parseParticipantName(e){var t,i;if(!(null==e?void 0:e.trim()))return{firstName:"U",lastName:"N"};const r=e.trim().split(" ").filter(e=>e.length>0);return 0===r.length?{firstName:"U",lastName:"N"}:{firstName:null!==(t=r[0])&&void 0!==t?t:"U",lastName:null!==(i=r[r.length-1])&&void 0!==i?i:"N"}}function BeeChatMessage({maxWindow:e=!1,msg:t,participant:i,project:r,chatMsgSource:n,isCurrentUser:a=!1,showDeleteButton:s=!1,documentIconClass:o="pi pi-file",trashIconClass:l="pi pi-trash",sourceAuditIconClass:c="pi pi-briefcase",sourceLcIconClass:h="pi pi-comments",onMsgDelete:p,onDownload:u}){const d=React.useMemo(()=>{var e;return null!==(e=null==i?void 0:i.name)&&void 0!==e?e:"Unbekannter Benutzer"},[null==i?void 0:i.name]),f=React.useMemo(()=>null==i?void 0:i.type,[null==i?void 0:i.type]),{firstName:m,lastName:g}=React.useMemo(()=>parseParticipantName(d),[d]),v=React.useMemo(()=>f!==exports.ChatParticipantTypeEnum.USER||a?f===exports.ChatParticipantTypeEnum.USER&&a?"lc-m-chat-message--self":f===exports.ChatParticipantTypeEnum.SYSTEM?"lc-m-chat-message--system":"lc-m-chat-message--otherUser":"lc-m-chat-message--otherUser",[f,a]);function y(e){const t=new Date(e);return`${t.getDate().toString().padStart(2,"0")}.${(t.getMonth()+1).toString().padStart(2,"0")}.${t.getFullYear().toString().slice(-2)} - ${t.getHours().toString().padStart(2,"0")}:${t.getMinutes().toString().padStart(2,"0")}`}const b=(null==t?void 0:t.mediaId)&&"object"==typeof t.mediaId?t.mediaId:null;function x(){var t,i;if(!b)return null;const r=null!==(t=b.document)&&void 0!==t?t:b.image;if(!r)return null;const n=null!==(i=r.filename)&&void 0!==i?i:b.document?"Unbekannte Datei":"Unbekanntes Bild";return require$$0.jsxs("div",{className:"chat-message_media-container",children:[require$$0.jsx(BeeMixButton,{label:n,iconClass:o,type:"lightPrimary",iconPos:"left",onClick:u}),e&&null!=r.fileSize?require$$0.jsx(BeeLabel,{value:`Größe: ${r.fileSize}kb`,size:"small",type:"neutral"}):null]})}return require$$0.jsx("div",{className:"lc-m-chat-message "+v,children:require$$0.jsxs("div",{className:"chat-message__message-container-avatar",children:[(null==t?void 0:t.deletedAt)?null:t?require$$0.jsxs("div",{className:"chat-message__message-container",children:[require$$0.jsxs("div",{className:"chat-message_headline-container align-items-center"+(r===exports.ChatMessageSourceEnum.AUDIT?" pl-0":""),children:[require$$0.jsxs("div",{className:"chat-message__user-info",children:[r===exports.ChatMessageSourceEnum.AUDIT&&n===exports.ChatMessageSourceEnum.AUDIT&&require$$0.jsx("i",{className:c}),r===exports.ChatMessageSourceEnum.AUDIT&&n===exports.ChatMessageSourceEnum.LC&&require$$0.jsx("i",{className:h}),r===exports.ChatMessageSourceEnum.AUDIT&&require$$0.jsx("div",{className:"mr-1 ml-1",children:require$$0.jsx(BeeLabel,{value:"||",size:"small",type:"neutral"})}),require$$0.jsx(BeeLabel,{value:d,size:"small",type:"neutral"})]}),(null==t?void 0:t.createdAt)?require$$0.jsx(BeeLabel,{value:y(t.createdAt),size:"small",type:"neutral"}):null]}),t.mediaId?x():require$$0.jsx("div",{className:"chat-message",children:null!==(_=null==t?void 0:t.message)&&void 0!==_?_:"Keine Nachricht"}),s&&a&&p&&require$$0.jsx(BeeIconButton,{iconClass:l,type:"lightPrimary",rounded:!1,onClick:p})]}):null,require$$0.jsx(BeeAvatar,{showPlaceholder:!0,placeholderFirstname:m,placeholderLastname:g,showDelete:!1,disabled:!1,size:"xSmall",type:"primary"})]})});var _}exports.ChatMessageSourceEnum=void 0,ChatMessageSourceEnum=exports.ChatMessageSourceEnum||(exports.ChatMessageSourceEnum={}),ChatMessageSourceEnum.LC="LC",ChatMessageSourceEnum.AUDIT="AUDIT",exports.ChatParticipantTypeEnum=void 0,ChatParticipantTypeEnum=exports.ChatParticipantTypeEnum||(exports.ChatParticipantTypeEnum={}),ChatParticipantTypeEnum.ADMIN="ADMIN",ChatParticipantTypeEnum.USER="USER",ChatParticipantTypeEnum.SYSTEM="SYSTEM",exports.ServerStatus=void 0,ServerStatus=exports.ServerStatus||(exports.ServerStatus={}),ServerStatus.SERVER_STATUS_LOADING="loading",ServerStatus.SERVER_STATUS_ERROR="error",ServerStatus.SERVER_STATUS_SUCCESS="success",ServerStatus.SERVER_STATUS_EXTERNAL_UPDATE="externalUpdate";const DEFAULT_SUCCESS_TOOLTIP="Änderung gespeichert",DEFAULT_ERROR_TOOLTIP="Die Änderung konnte nicht gespeichert werden",DEFAULT_EXTERNAL_CHANGE_TOOLTIP="Eine andere Person hat dieses Feld soeben bearbeitet";function BeeServerStatusInput({status:e,successIcon:t="pi pi-check",loadingIcon:i,errorIcon:r="pi pi-times",externalChangeIcon:n="pi pi-user",hideIcons:a,children:s,onResetStatus:o,successTooltip:l=DEFAULT_SUCCESS_TOOLTIP,errorTooltip:c=DEFAULT_ERROR_TOOLTIP,externalChangeTooltip:h=DEFAULT_EXTERNAL_CHANGE_TOOLTIP}){const p=e===exports.ServerStatus.SERVER_STATUS_LOADING?"server-status-loading":e===exports.ServerStatus.SERVER_STATUS_ERROR?"server-status-error":e===exports.ServerStatus.SERVER_STATUS_SUCCESS?"server-status-success":e===exports.ServerStatus.SERVER_STATUS_EXTERNAL_UPDATE?"server-status-externalChange":"";return React.useEffect(()=>{if(e===exports.ServerStatus.SERVER_STATUS_SUCCESS||e===exports.ServerStatus.SERVER_STATUS_EXTERNAL_UPDATE){const e=setTimeout(()=>{null==o||o()},5e3);return()=>clearTimeout(e)}},[e,o]),require$$0.jsxs("div",{className:e?`serverStatus-input ${p} p-input-icon-right serverStatus-input-icon-right`:"serverStatus-input",children:[require$$0.jsx(require$$0.Fragment,{children:s}),e&&!a?require$$0.jsx(require$$0.Fragment,{children:e===exports.ServerStatus.SERVER_STATUS_SUCCESS?require$$0.jsxs(require$$0.Fragment,{children:[require$$0.jsx(tooltip.Tooltip,{target:".icon--success",content:l}),require$$0.jsx("i",{className:t+" icon--success"})]}):e===exports.ServerStatus.SERVER_STATUS_LOADING?require$$0.jsx(require$$0.Fragment,{children:i?require$$0.jsx("i",{className:i+" icon--loading"}):require$$0.jsx(BeeLoadingSpinner,{strokeWidth:"2",type:"primary"})}):e===exports.ServerStatus.SERVER_STATUS_ERROR?require$$0.jsxs(require$$0.Fragment,{children:[require$$0.jsx(tooltip.Tooltip,{target:".icon--error",content:c}),require$$0.jsx("i",{className:r+" icon--error"})]}):e===exports.ServerStatus.SERVER_STATUS_EXTERNAL_UPDATE?require$$0.jsxs(require$$0.Fragment,{children:[require$$0.jsx(tooltip.Tooltip,{target:".icon--externalChange",content:h}),require$$0.jsx("i",{className:n+" icon--externalChange"})]}):null}):null]})}function BeeChangesChip({className:e,values:t,type:i="primary"}){const r=`bee-changes-chip ${`bee-changes-chip--${i}`} ${e?" "+e:""}`;return 0===t.length?null:require$$0.jsx("div",{className:r,children:function(e){return e.map((e,t)=>{const i=e.value<10?e.value.toString():"9+";return require$$0.jsxs("div",{className:"bee-changes-chip__icon-wrapper",children:[require$$0.jsx("i",{className:e.icon}),require$$0.jsx("div",{}),require$$0.jsx(badge.Badge,{value:i,severity:"info"})]},t)})}(t)})}function BeeFilterDropDown({id:e,className:t,label:i,value:r,options:n,optionLabel:a,optionValue:s,disabled:o,dropdownIcon:l,deleteIcon:c,statusLabel:h,formstate:p="neutral",readOnly:u,onChange:d}){const f=null!=e?e:libExports.useId(1,"bee-filter-dropdown-")[0],m=f+"input",[g,v]=React.useState(r);let y="";u&&(y=" bee-filter-dropdown-readOnly",o=!0);const b=("valid"===p?"bee-filter-dropdown-valid":"error"===p?"bee-filter-dropdown-error":"bee-filter-dropdown-neutral")+y,x="p-float-label bee-filter-dropdown-container flex "+(t?" "+t:""),_=null!=c?c:"pi pi-times-circle";React.useEffect(()=>{v(r)},[r]);return require$$0.jsxs("div",{className:"bee-filter-dropdown",children:[u&&!r?require$$0.jsx("div",{className:null!=t?t:"",children:require$$0.jsx(BeePlaceholder,{id:f,label:i})}):require$$0.jsxs("span",{id:f,className:x,children:[require$$0.jsx(dropdown.Dropdown,{id:m,value:g,options:n,optionLabel:a,optionValue:s,disabled:null!=o&&o,className:b,dropdownIcon:null!=l?l:"",emptyMessage:"Keine Einträge gefunden",onChange:e=>{return t=e,void(!o&&d&&d(t));var t}}),g&&""!==g?require$$0.jsx("div",{className:"cancel",children:require$$0.jsx(BeeIconButton,{iconClass:_,rounded:!0,disabled:o||!1,type:"lightPrimary",isLoading:!1,onClick:()=>{v("")}})}):null,i?require$$0.jsx("label",{htmlFor:m,children:i}):null]}),"none"!=p&&h?(()=>{const e="medium";return require$$0.jsx("div",{className:"bee-filter-dropdown-statusLabel",children:"error"===p&&null!=h?require$$0.jsx(BeeLabel,{size:e,value:String(h),type:"error"}):"valid"===p&&null!=h?require$$0.jsx(BeeLabel,{size:e,value:String(h),type:"valid"}):"neutral"===p&&null!=h?require$$0.jsx(BeeLabel,{size:e,value:String(h),type:"neutral"}):null})})():null]})}function BeeFilterTreeSelect({id:e,className:t,label:i,value:r,options:n,valueTemplate:a,display:s="comma",selectionMode:o="single",placeholder:l,filter:c,filterTemplate:h,filterValue:p,filterBy:u,filterPlaceholder:d,confirmBtnText:f,confirmBtnDisabled:m,confirmBtnTooltip:g,deleteIcon:v,disabled:y,readOnly:b,statusLabel:x,formstate:_="neutral",required:S,hideDelete:w,onSelectNodes:C,onChange:P,onHide:E}){const k=null!=e?e:libExports.useId(1,"bee-filter-ts-")[0],$=k+"input",[A,T]=React.useState(r);let D="";b&&(D=" bee-filter-ts-readOnly",y=!0);const M=("valid"===_?"bee-filter-ts-valid":"error"===_?"bee-filter-ts-error":"bee-filter-ts-neutral")+D,I=" p-float-label bee-filter-ts-container",F=c?"bee-filter-ts-panel":"bee-filter-ts-panel bee-filter-ts-invisible-header",j=v||"pi pi-times-circle";function R(){const e=document.querySelector("body");if(e){const t=new MouseEvent("click",{bubbles:!0,view:window});e.dispatchEvent(t)}}function B(){!y&&E&&E()}React.useEffect(()=>{T(r)},[r]);return require$$0.jsxs(require$$0.Fragment,{children:[b&&!r?require$$0.jsx("div",{className:null!=t?t:"",children:require$$0.jsx(BeePlaceholder,{id:k,label:i})}):require$$0.jsxs("div",{id:k,className:t?t+I:I,children:[require$$0.jsx("div",{className:!b&&r&&Object.keys(r).length>0?"bee-filter-ts-filter__deleteBtn":"bee-filter-ts-filter__deleteBtn bee-filter-ts-filter--hidden",children:!A||""===A||w?null:require$$0.jsx("div",{className:"cancel",children:require$$0.jsx(BeeIconButton,{iconClass:j,rounded:!0,disabled:y||!1,type:"lightPrimary",isLoading:!1,onClick:()=>{T(""),!y&&C&&(C(void 0),R())}})})}),require$$0.jsxs("span",{className:"p-float-label",children:[require$$0.jsx(treeselect.TreeSelect,{id:$,value:A,options:n,disabled:y||!1,className:M,valueTemplate:a,panelClassName:F,display:null!=s?s:"comma",selectionMode:o,placeholder:l,filter:c,filterTemplate:h,filterValue:p,filterBy:u,filterPlaceholder:d||"Suche",onChange:e=>{T(e.value),function(e){!y&&P&&P(e)}(e)},onHide:()=>{T(r),B()},panelFooterTemplate:()=>require$$0.jsx("div",{className:"p-d-flex p-jc-end p-ai-center",style:{padding:"1rem"},children:require$$0.jsx(BeeButton,{label:f||"Übernehmen",type:"secondary",disabled:m||!1,tooltip:m&&g?g:void 0,onClick:()=>{B(),!y&&C&&(C(A),R())}})})}),i?require$$0.jsxs("label",{htmlFor:$,className:"bee-filter-ts-label",children:[i,S&&i?require$$0.jsx("span",{className:"bee-filter-ts-label-required",children:require$$0.jsx("span",{className:"bee-filter-ts-label-required-star",children:" *"})}):null]}):null]})]}),"none"!=_&&x?(()=>{const e="medium";return require$$0.jsx("div",{className:"bee-filter-ts-statusLabel",children:"error"===_&&null!=x?require$$0.jsx(BeeLabel,{size:e,value:String(x),type:"error"}):"valid"===_&&null!=x?require$$0.jsx(BeeLabel,{size:e,value:String(x),type:"valid"}):"neutral"===_&&null!=x?require$$0.jsx(BeeLabel,{size:e,value:String(x),type:"neutral"}):null})})():null]})}function BeeGalleryImage({id:e,className:t,imageUrl:i,imageKey:r,imageAlt:n,imageTitle:a,imageCopyright:s,isImageSecured:o=!1,showPlaceHolder:l=!1,activateHover:c=!0,readOnly:h,onClick:p,onRemove:u,onAdd:d}){const f=null!=e?e:libExports.useId(1,"bee-gallery-img-")[0],m="bee-gallery-img "+(h?"bee-gallery-img-readOnly":"")+(c?" bee-gallery-img-hover":" bee-gallery-img-noHover")+" bee-gallery-img-placeholder"+(t?" "+t:"");return require$$0.jsx("div",{id:f,className:m,children:i?require$$0.jsxs("div",{children:[h?null:require$$0.jsx("div",{className:"bee-gallery-img-close-button",children:require$$0.jsx(BeeIconButton,{iconClass:"pi pi-times",rounded:!0,disabled:!1,type:"secondary",isLoading:!1,onClick:e=>function(e){u&&u(e)}(e)})}),require$$0.jsx("div",{className:"bee-gallery-img-content",children:require$$0.jsx(BeeImage,{url:i,alt:n,title:a,titlePosition:"left",copyright:s,secured:o,secureKey:o?r:void 0,showPlaceholder:l,onClick:e=>function(e){p&&p(e)}(e)},r)})]}):h?null:require$$0.jsx("div",{className:"bee-gallery-img-add-button",children:require$$0.jsx(BeeAddEntryCard,{disabled:h||!1,onClick:e=>function(e){d&&d(e)}(e)})})})}var UserAgent_DEPRECATED_1,hasRequiredUserAgent_DEPRECATED,ExecutionEnvironment_1,hasRequiredExecutionEnvironment,isEventSupported_1,hasRequiredIsEventSupported,normalizeWheel_1,hasRequiredNormalizeWheel$1,normalizeWheel$1,hasRequiredNormalizeWheel;function requireUserAgent_DEPRECATED(){if(hasRequiredUserAgent_DEPRECATED)return UserAgent_DEPRECATED_1;hasRequiredUserAgent_DEPRECATED=1;var e,t,i,r,n,a,s,o,l,c,h,p,u,d,f,m=!1;function g(){if(!m){m=!0;var g=navigator.userAgent,v=/(?:MSIE.(\d+\.\d+))|(?:(?:Firefox|GranParadiso|Iceweasel).(\d+\.\d+))|(?:Opera(?:.+Version.|.)(\d+\.\d+))|(?:AppleWebKit.(\d+(?:\.\d+)?))|(?:Trident\/\d+\.\d+.*rv:(\d+\.\d+))/.exec(g),y=/(Mac OS X)|(Windows)|(Linux)/.exec(g);if(p=/\b(iPhone|iP[ao]d)/.exec(g),u=/\b(iP[ao]d)/.exec(g),c=/Android/i.exec(g),d=/FBAN\/\w+;/i.exec(g),f=/Mobile/i.exec(g),h=!!/Win64/.exec(g),v){(e=v[1]?parseFloat(v[1]):v[5]?parseFloat(v[5]):NaN)&&document&&document.documentMode&&(e=document.documentMode);var b=/(?:Trident\/(\d+.\d+))/.exec(g);a=b?parseFloat(b[1])+4:e,t=v[2]?parseFloat(v[2]):NaN,i=v[3]?parseFloat(v[3]):NaN,(r=v[4]?parseFloat(v[4]):NaN)?(v=/(?:Chrome\/(\d+\.\d+))/.exec(g),n=v&&v[1]?parseFloat(v[1]):NaN):n=NaN}else e=t=i=n=r=NaN;if(y){if(y[1]){var x=/(?:Mac OS X (\d+(?:[._]\d+)?))/.exec(g);s=!x||parseFloat(x[1].replace("_","."))}else s=!1;o=!!y[2],l=!!y[3]}else s=o=l=!1}}var v={ie:function(){return g()||e},ieCompatibilityMode:function(){return g()||a>e},ie64:function(){return v.ie()&&h},firefox:function(){return g()||t},opera:function(){return g()||i},webkit:function(){return g()||r},safari:function(){return v.webkit()},chrome:function(){return g()||n},windows:function(){return g()||o},osx:function(){return g()||s},linux:function(){return g()||l},iphone:function(){return g()||p},mobile:function(){return g()||p||u||c||f},nativeApp:function(){return g()||d},android:function(){return g()||c},ipad:function(){return g()||u}};return UserAgent_DEPRECATED_1=v}function requireExecutionEnvironment(){if(hasRequiredExecutionEnvironment)return ExecutionEnvironment_1;hasRequiredExecutionEnvironment=1;var e=!("undefined"==typeof window||!window.document||!window.document.createElement),t={canUseDOM:e,canUseWorkers:"undefined"!=typeof Worker,canUseEventListeners:e&&!(!window.addEventListener&&!window.attachEvent),canUseViewport:e&&!!window.screen,isInWorker:!e};return ExecutionEnvironment_1=t}function requireIsEventSupported(){if(hasRequiredIsEventSupported)return isEventSupported_1;hasRequiredIsEventSupported=1;var e,t=requireExecutionEnvironment();return t.canUseDOM&&(e=document.implementation&&document.implementation.hasFeature&&!0!==document.implementation.hasFeature("",""))
27
+ */function requireLodash(){return hasRequiredLodash||(hasRequiredLodash=1,e=lodash$1,t=lodash$1.exports,function(){var i,r="Expected a function",n="__lodash_hash_undefined__",a="__lodash_placeholder__",s=32,o=128,l=256,c=1/0,h=9007199254740991,p=NaN,u=4294967295,d=[["ary",o],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",s],["partialRight",64],["rearg",l]],f="[object Arguments]",m="[object Array]",g="[object Boolean]",v="[object Date]",y="[object Error]",b="[object Function]",x="[object GeneratorFunction]",_="[object Map]",S="[object Number]",w="[object Object]",C="[object Promise]",P="[object RegExp]",E="[object Set]",k="[object String]",$="[object Symbol]",A="[object WeakMap]",T="[object ArrayBuffer]",D="[object DataView]",M="[object Float32Array]",I="[object Float64Array]",F="[object Int8Array]",j="[object Int16Array]",R="[object Int32Array]",B="[object Uint8Array]",O="[object Uint8ClampedArray]",L="[object Uint16Array]",q="[object Uint32Array]",N=/\b__p \+= '';/g,z=/\b(__p \+=) '' \+/g,V=/(__e\(.*?\)|\b__t\)) \+\n'';/g,H=/&(?:amp|lt|gt|quot|#39);/g,W=/[&<>"']/g,G=RegExp(H.source),U=RegExp(W.source),Y=/<%-([\s\S]+?)%>/g,K=/<%([\s\S]+?)%>/g,X=/<%=([\s\S]+?)%>/g,Z=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,J=/^\w*$/,Q=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ee=/[\\^$.*+?()[\]{}|]/g,te=RegExp(ee.source),ie=/^\s+/,re=/\s/,ne=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,ae=/\{\n\/\* \[wrapped with (.+)\] \*/,se=/,? & /,oe=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,le=/[()=,{}\[\]\/\s]/,ce=/\\(\\)?/g,he=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,pe=/\w*$/,ue=/^[-+]0x[0-9a-f]+$/i,de=/^0b[01]+$/i,fe=/^\[object .+?Constructor\]$/,me=/^0o[0-7]+$/i,ge=/^(?:0|[1-9]\d*)$/,ve=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,ye=/($^)/,be=/['\n\r\u2028\u2029\\]/g,xe="\\ud800-\\udfff",_e="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",Se="\\u2700-\\u27bf",we="a-z\\xdf-\\xf6\\xf8-\\xff",Ce="A-Z\\xc0-\\xd6\\xd8-\\xde",Pe="\\ufe0e\\ufe0f",Ee="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",ke="['’]",$e="["+xe+"]",Ae="["+Ee+"]",Te="["+_e+"]",De="\\d+",Me="["+Se+"]",Ie="["+we+"]",Fe="[^"+xe+Ee+De+Se+we+Ce+"]",je="\\ud83c[\\udffb-\\udfff]",Re="[^"+xe+"]",Be="(?:\\ud83c[\\udde6-\\uddff]){2}",Oe="[\\ud800-\\udbff][\\udc00-\\udfff]",Le="["+Ce+"]",qe="\\u200d",Ne="(?:"+Ie+"|"+Fe+")",ze="(?:"+Le+"|"+Fe+")",Ve="(?:['’](?:d|ll|m|re|s|t|ve))?",He="(?:['’](?:D|LL|M|RE|S|T|VE))?",We="(?:"+Te+"|"+je+")?",Ge="["+Pe+"]?",Ue=Ge+We+"(?:"+qe+"(?:"+[Re,Be,Oe].join("|")+")"+Ge+We+")*",Ye="(?:"+[Me,Be,Oe].join("|")+")"+Ue,Ke="(?:"+[Re+Te+"?",Te,Be,Oe,$e].join("|")+")",Xe=RegExp(ke,"g"),Ze=RegExp(Te,"g"),Je=RegExp(je+"(?="+je+")|"+Ke+Ue,"g"),Qe=RegExp([Le+"?"+Ie+"+"+Ve+"(?="+[Ae,Le,"$"].join("|")+")",ze+"+"+He+"(?="+[Ae,Le+Ne,"$"].join("|")+")",Le+"?"+Ne+"+"+Ve,Le+"+"+He,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",De,Ye].join("|"),"g"),et=RegExp("["+qe+xe+_e+Pe+"]"),tt=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,it=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],rt=-1,nt={};nt[M]=nt[I]=nt[F]=nt[j]=nt[R]=nt[B]=nt[O]=nt[L]=nt[q]=!0,nt[f]=nt[m]=nt[T]=nt[g]=nt[D]=nt[v]=nt[y]=nt[b]=nt[_]=nt[S]=nt[w]=nt[P]=nt[E]=nt[k]=nt[A]=!1;var at={};at[f]=at[m]=at[T]=at[D]=at[g]=at[v]=at[M]=at[I]=at[F]=at[j]=at[R]=at[_]=at[S]=at[w]=at[P]=at[E]=at[k]=at[$]=at[B]=at[O]=at[L]=at[q]=!0,at[y]=at[b]=at[A]=!1;var st={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},ot=parseFloat,lt=parseInt,ct="object"==typeof commonjsGlobal&&commonjsGlobal&&commonjsGlobal.Object===Object&&commonjsGlobal,ht="object"==typeof self&&self&&self.Object===Object&&self,pt=ct||ht||Function("return this")(),ut=t&&!t.nodeType&&t,dt=ut&&e&&!e.nodeType&&e,ft=dt&&dt.exports===ut,mt=ft&&ct.process,gt=function(){try{var e=dt&&dt.require&&dt.require("util").types;return e||mt&&mt.binding&&mt.binding("util")}catch(e){}}(),vt=gt&&gt.isArrayBuffer,yt=gt&&gt.isDate,bt=gt&&gt.isMap,xt=gt&&gt.isRegExp,_t=gt&&gt.isSet,St=gt&&gt.isTypedArray;function wt(e,t,i){switch(i.length){case 0:return e.call(t);case 1:return e.call(t,i[0]);case 2:return e.call(t,i[0],i[1]);case 3:return e.call(t,i[0],i[1],i[2])}return e.apply(t,i)}function Ct(e,t,i,r){for(var n=-1,a=null==e?0:e.length;++n<a;){var s=e[n];t(r,s,i(s),e)}return r}function Pt(e,t){for(var i=-1,r=null==e?0:e.length;++i<r&&!1!==t(e[i],i,e););return e}function Et(e,t){for(var i=null==e?0:e.length;i--&&!1!==t(e[i],i,e););return e}function kt(e,t){for(var i=-1,r=null==e?0:e.length;++i<r;)if(!t(e[i],i,e))return!1;return!0}function $t(e,t){for(var i=-1,r=null==e?0:e.length,n=0,a=[];++i<r;){var s=e[i];t(s,i,e)&&(a[n++]=s)}return a}function At(e,t){return!(null==e||!e.length)&&Lt(e,t,0)>-1}function Tt(e,t,i){for(var r=-1,n=null==e?0:e.length;++r<n;)if(i(t,e[r]))return!0;return!1}function Dt(e,t){for(var i=-1,r=null==e?0:e.length,n=Array(r);++i<r;)n[i]=t(e[i],i,e);return n}function Mt(e,t){for(var i=-1,r=t.length,n=e.length;++i<r;)e[n+i]=t[i];return e}function It(e,t,i,r){var n=-1,a=null==e?0:e.length;for(r&&a&&(i=e[++n]);++n<a;)i=t(i,e[n],n,e);return i}function Ft(e,t,i,r){var n=null==e?0:e.length;for(r&&n&&(i=e[--n]);n--;)i=t(i,e[n],n,e);return i}function jt(e,t){for(var i=-1,r=null==e?0:e.length;++i<r;)if(t(e[i],i,e))return!0;return!1}var Rt=Vt("length");function Bt(e,t,i){var r;return i(e,function(e,i,n){if(t(e,i,n))return r=i,!1}),r}function Ot(e,t,i,r){for(var n=e.length,a=i+(r?1:-1);r?a--:++a<n;)if(t(e[a],a,e))return a;return-1}function Lt(e,t,i){return t==t?function(e,t,i){for(var r=i-1,n=e.length;++r<n;)if(e[r]===t)return r;return-1}(e,t,i):Ot(e,Nt,i)}function qt(e,t,i,r){for(var n=i-1,a=e.length;++n<a;)if(r(e[n],t))return n;return-1}function Nt(e){return e!=e}function zt(e,t){var i=null==e?0:e.length;return i?Gt(e,t)/i:p}function Vt(e){return function(t){return null==t?i:t[e]}}function Ht(e){return function(t){return null==e?i:e[t]}}function Wt(e,t,i,r,n){return n(e,function(e,n,a){i=r?(r=!1,e):t(i,e,n,a)}),i}function Gt(e,t){for(var r,n=-1,a=e.length;++n<a;){var s=t(e[n]);s!==i&&(r=r===i?s:r+s)}return r}function Ut(e,t){for(var i=-1,r=Array(e);++i<e;)r[i]=t(i);return r}function Yt(e){return e?e.slice(0,pi(e)+1).replace(ie,""):e}function Kt(e){return function(t){return e(t)}}function Xt(e,t){return Dt(t,function(t){return e[t]})}function Zt(e,t){return e.has(t)}function Jt(e,t){for(var i=-1,r=e.length;++i<r&&Lt(t,e[i],0)>-1;);return i}function Qt(e,t){for(var i=e.length;i--&&Lt(t,e[i],0)>-1;);return i}var ei=Ht({"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"}),ti=Ht({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"});function ii(e){return"\\"+st[e]}function ri(e){return et.test(e)}function ni(e){var t=-1,i=Array(e.size);return e.forEach(function(e,r){i[++t]=[r,e]}),i}function ai(e,t){return function(i){return e(t(i))}}function si(e,t){for(var i=-1,r=e.length,n=0,s=[];++i<r;){var o=e[i];o!==t&&o!==a||(e[i]=a,s[n++]=i)}return s}function oi(e){var t=-1,i=Array(e.size);return e.forEach(function(e){i[++t]=e}),i}function li(e){var t=-1,i=Array(e.size);return e.forEach(function(e){i[++t]=[e,e]}),i}function ci(e){return ri(e)?function(e){for(var t=Je.lastIndex=0;Je.test(e);)++t;return t}(e):Rt(e)}function hi(e){return ri(e)?function(e){return e.match(Je)||[]}(e):function(e){return e.split("")}(e)}function pi(e){for(var t=e.length;t--&&re.test(e.charAt(t)););return t}var ui=Ht({"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"}),di=function e(t){var re=(t=null==t?pt:di.defaults(pt.Object(),t,di.pick(pt,it))).Array,xe=t.Date,_e=t.Error,Se=t.Function,we=t.Math,Ce=t.Object,Pe=t.RegExp,Ee=t.String,ke=t.TypeError,$e=re.prototype,Ae=Se.prototype,Te=Ce.prototype,De=t["__core-js_shared__"],Me=Ae.toString,Ie=Te.hasOwnProperty,Fe=0,je=function(){var e=/[^.]+$/.exec(De&&De.keys&&De.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),Re=Te.toString,Be=Me.call(Ce),Oe=pt._,Le=Pe("^"+Me.call(Ie).replace(ee,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),qe=ft?t.Buffer:i,Ne=t.Symbol,ze=t.Uint8Array,Ve=qe?qe.allocUnsafe:i,He=ai(Ce.getPrototypeOf,Ce),We=Ce.create,Ge=Te.propertyIsEnumerable,Ue=$e.splice,Ye=Ne?Ne.isConcatSpreadable:i,Ke=Ne?Ne.iterator:i,Je=Ne?Ne.toStringTag:i,et=function(){try{var e=ca(Ce,"defineProperty");return e({},"",{}),e}catch(e){}}(),st=t.clearTimeout!==pt.clearTimeout&&t.clearTimeout,ct=xe&&xe.now!==pt.Date.now&&xe.now,ht=t.setTimeout!==pt.setTimeout&&t.setTimeout,ut=we.ceil,dt=we.floor,mt=Ce.getOwnPropertySymbols,gt=qe?qe.isBuffer:i,Rt=t.isFinite,Ht=$e.join,fi=ai(Ce.keys,Ce),mi=we.max,gi=we.min,vi=xe.now,yi=t.parseInt,bi=we.random,xi=$e.reverse,_i=ca(t,"DataView"),Si=ca(t,"Map"),wi=ca(t,"Promise"),Ci=ca(t,"Set"),Pi=ca(t,"WeakMap"),Ei=ca(Ce,"create"),ki=Pi&&new Pi,$i={},Ai=ja(_i),Ti=ja(Si),Di=ja(wi),Mi=ja(Ci),Ii=ja(Pi),Fi=Ne?Ne.prototype:i,ji=Fi?Fi.valueOf:i,Ri=Fi?Fi.toString:i;function Bi(e){if(Js(e)&&!Ns(e)&&!(e instanceof Ni)){if(e instanceof qi)return e;if(Ie.call(e,"__wrapped__"))return Ra(e)}return new qi(e)}var Oi=function(){function e(){}return function(t){if(!Zs(t))return{};if(We)return We(t);e.prototype=t;var r=new e;return e.prototype=i,r}}();function Li(){}function qi(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=i}function Ni(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=u,this.__views__=[]}function zi(e){var t=-1,i=null==e?0:e.length;for(this.clear();++t<i;){var r=e[t];this.set(r[0],r[1])}}function Vi(e){var t=-1,i=null==e?0:e.length;for(this.clear();++t<i;){var r=e[t];this.set(r[0],r[1])}}function Hi(e){var t=-1,i=null==e?0:e.length;for(this.clear();++t<i;){var r=e[t];this.set(r[0],r[1])}}function Wi(e){var t=-1,i=null==e?0:e.length;for(this.__data__=new Hi;++t<i;)this.add(e[t])}function Gi(e){var t=this.__data__=new Vi(e);this.size=t.size}function Ui(e,t){var i=Ns(e),r=!i&&qs(e),n=!i&&!r&&Ws(e),a=!i&&!r&&!n&&so(e),s=i||r||n||a,o=s?Ut(e.length,Ee):[],l=o.length;for(var c in e)!t&&!Ie.call(e,c)||s&&("length"==c||n&&("offset"==c||"parent"==c)||a&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||ga(c,l))||o.push(c);return o}function Yi(e){var t=e.length;return t?e[Wr(0,t-1)]:i}function Ki(e,t){return Ma(kn(e),nr(t,0,e.length))}function Xi(e){return Ma(kn(e))}function Zi(e,t,r){(r!==i&&!Bs(e[t],r)||r===i&&!(t in e))&&ir(e,t,r)}function Ji(e,t,r){var n=e[t];Ie.call(e,t)&&Bs(n,r)&&(r!==i||t in e)||ir(e,t,r)}function Qi(e,t){for(var i=e.length;i--;)if(Bs(e[i][0],t))return i;return-1}function er(e,t,i,r){return cr(e,function(e,n,a){t(r,e,i(e),a)}),r}function tr(e,t){return e&&$n(t,Ao(t),e)}function ir(e,t,i){"__proto__"==t&&et?et(e,t,{configurable:!0,enumerable:!0,value:i,writable:!0}):e[t]=i}function rr(e,t){for(var r=-1,n=t.length,a=re(n),s=null==e;++r<n;)a[r]=s?i:Co(e,t[r]);return a}function nr(e,t,r){return e==e&&(r!==i&&(e=e<=r?e:r),t!==i&&(e=e>=t?e:t)),e}function ar(e,t,r,n,a,s){var o,l=1&t,c=2&t,h=4&t;if(r&&(o=a?r(e,n,a,s):r(e)),o!==i)return o;if(!Zs(e))return e;var p=Ns(e);if(p){if(o=function(e){var t=e.length,i=new e.constructor(t);return t&&"string"==typeof e[0]&&Ie.call(e,"index")&&(i.index=e.index,i.input=e.input),i}(e),!l)return kn(e,o)}else{var u=ua(e),d=u==b||u==x;if(Ws(e))return _n(e,l);if(u==w||u==f||d&&!a){if(o=c||d?{}:fa(e),!l)return c?function(e,t){return $n(e,pa(e),t)}(e,function(e,t){return e&&$n(t,To(t),e)}(o,e)):function(e,t){return $n(e,ha(e),t)}(e,tr(o,e))}else{if(!at[u])return a?e:{};o=function(e,t,i){var r,n=e.constructor;switch(t){case T:return Sn(e);case g:case v:return new n(+e);case D:return function(e,t){var i=t?Sn(e.buffer):e.buffer;return new e.constructor(i,e.byteOffset,e.byteLength)}(e,i);case M:case I:case F:case j:case R:case B:case O:case L:case q:return wn(e,i);case _:return new n;case S:case k:return new n(e);case P:return function(e){var t=new e.constructor(e.source,pe.exec(e));return t.lastIndex=e.lastIndex,t}(e);case E:return new n;case $:return r=e,ji?Ce(ji.call(r)):{}}}(e,u,l)}}s||(s=new Gi);var m=s.get(e);if(m)return m;s.set(e,o),ro(e)?e.forEach(function(i){o.add(ar(i,t,r,i,e,s))}):Qs(e)&&e.forEach(function(i,n){o.set(n,ar(i,t,r,n,e,s))});var y=p?i:(h?c?ia:ta:c?To:Ao)(e);return Pt(y||e,function(i,n){y&&(i=e[n=i]),Ji(o,n,ar(i,t,r,n,e,s))}),o}function sr(e,t,r){var n=r.length;if(null==e)return!n;for(e=Ce(e);n--;){var a=r[n],s=t[a],o=e[a];if(o===i&&!(a in e)||!s(o))return!1}return!0}function or(e,t,n){if("function"!=typeof e)throw new ke(r);return $a(function(){e.apply(i,n)},t)}function lr(e,t,i,r){var n=-1,a=At,s=!0,o=e.length,l=[],c=t.length;if(!o)return l;i&&(t=Dt(t,Kt(i))),r?(a=Tt,s=!1):t.length>=200&&(a=Zt,s=!1,t=new Wi(t));e:for(;++n<o;){var h=e[n],p=null==i?h:i(h);if(h=r||0!==h?h:0,s&&p==p){for(var u=c;u--;)if(t[u]===p)continue e;l.push(h)}else a(t,p,r)||l.push(h)}return l}Bi.templateSettings={escape:Y,evaluate:K,interpolate:X,variable:"",imports:{_:Bi}},Bi.prototype=Li.prototype,Bi.prototype.constructor=Bi,qi.prototype=Oi(Li.prototype),qi.prototype.constructor=qi,Ni.prototype=Oi(Li.prototype),Ni.prototype.constructor=Ni,zi.prototype.clear=function(){this.__data__=Ei?Ei(null):{},this.size=0},zi.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},zi.prototype.get=function(e){var t=this.__data__;if(Ei){var r=t[e];return r===n?i:r}return Ie.call(t,e)?t[e]:i},zi.prototype.has=function(e){var t=this.__data__;return Ei?t[e]!==i:Ie.call(t,e)},zi.prototype.set=function(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=Ei&&t===i?n:t,this},Vi.prototype.clear=function(){this.__data__=[],this.size=0},Vi.prototype.delete=function(e){var t=this.__data__,i=Qi(t,e);return!(i<0||(i==t.length-1?t.pop():Ue.call(t,i,1),--this.size,0))},Vi.prototype.get=function(e){var t=this.__data__,r=Qi(t,e);return r<0?i:t[r][1]},Vi.prototype.has=function(e){return Qi(this.__data__,e)>-1},Vi.prototype.set=function(e,t){var i=this.__data__,r=Qi(i,e);return r<0?(++this.size,i.push([e,t])):i[r][1]=t,this},Hi.prototype.clear=function(){this.size=0,this.__data__={hash:new zi,map:new(Si||Vi),string:new zi}},Hi.prototype.delete=function(e){var t=oa(this,e).delete(e);return this.size-=t?1:0,t},Hi.prototype.get=function(e){return oa(this,e).get(e)},Hi.prototype.has=function(e){return oa(this,e).has(e)},Hi.prototype.set=function(e,t){var i=oa(this,e),r=i.size;return i.set(e,t),this.size+=i.size==r?0:1,this},Wi.prototype.add=Wi.prototype.push=function(e){return this.__data__.set(e,n),this},Wi.prototype.has=function(e){return this.__data__.has(e)},Gi.prototype.clear=function(){this.__data__=new Vi,this.size=0},Gi.prototype.delete=function(e){var t=this.__data__,i=t.delete(e);return this.size=t.size,i},Gi.prototype.get=function(e){return this.__data__.get(e)},Gi.prototype.has=function(e){return this.__data__.has(e)},Gi.prototype.set=function(e,t){var i=this.__data__;if(i instanceof Vi){var r=i.__data__;if(!Si||r.length<199)return r.push([e,t]),this.size=++i.size,this;i=this.__data__=new Hi(r)}return i.set(e,t),this.size=i.size,this};var cr=Dn(vr),hr=Dn(yr,!0);function pr(e,t){var i=!0;return cr(e,function(e,r,n){return i=!!t(e,r,n)}),i}function ur(e,t,r){for(var n=-1,a=e.length;++n<a;){var s=e[n],o=t(s);if(null!=o&&(l===i?o==o&&!ao(o):r(o,l)))var l=o,c=s}return c}function dr(e,t){var i=[];return cr(e,function(e,r,n){t(e,r,n)&&i.push(e)}),i}function fr(e,t,i,r,n){var a=-1,s=e.length;for(i||(i=ma),n||(n=[]);++a<s;){var o=e[a];t>0&&i(o)?t>1?fr(o,t-1,i,r,n):Mt(n,o):r||(n[n.length]=o)}return n}var mr=Mn(),gr=Mn(!0);function vr(e,t){return e&&mr(e,t,Ao)}function yr(e,t){return e&&gr(e,t,Ao)}function br(e,t){return $t(t,function(t){return Ys(e[t])})}function xr(e,t){for(var r=0,n=(t=vn(t,e)).length;null!=e&&r<n;)e=e[Fa(t[r++])];return r&&r==n?e:i}function _r(e,t,i){var r=t(e);return Ns(e)?r:Mt(r,i(e))}function Sr(e){return null==e?e===i?"[object Undefined]":"[object Null]":Je&&Je in Ce(e)?function(e){var t=Ie.call(e,Je),r=e[Je];try{e[Je]=i;var n=!0}catch(e){}var a=Re.call(e);return n&&(t?e[Je]=r:delete e[Je]),a}(e):function(e){return Re.call(e)}(e)}function wr(e,t){return e>t}function Cr(e,t){return null!=e&&Ie.call(e,t)}function Pr(e,t){return null!=e&&t in Ce(e)}function Er(e,t,r){for(var n=r?Tt:At,a=e[0].length,s=e.length,o=s,l=re(s),c=1/0,h=[];o--;){var p=e[o];o&&t&&(p=Dt(p,Kt(t))),c=gi(p.length,c),l[o]=!r&&(t||a>=120&&p.length>=120)?new Wi(o&&p):i}p=e[0];var u=-1,d=l[0];e:for(;++u<a&&h.length<c;){var f=p[u],m=t?t(f):f;if(f=r||0!==f?f:0,!(d?Zt(d,m):n(h,m,r))){for(o=s;--o;){var g=l[o];if(!(g?Zt(g,m):n(e[o],m,r)))continue e}d&&d.push(m),h.push(f)}}return h}function kr(e,t,r){var n=null==(e=Pa(e,t=vn(t,e)))?e:e[Fa(Ua(t))];return null==n?i:wt(n,e,r)}function $r(e){return Js(e)&&Sr(e)==f}function Ar(e,t,r,n,a){return e===t||(null==e||null==t||!Js(e)&&!Js(t)?e!=e&&t!=t:function(e,t,r,n,a,s){var o=Ns(e),l=Ns(t),c=o?m:ua(e),h=l?m:ua(t),p=(c=c==f?w:c)==w,u=(h=h==f?w:h)==w,d=c==h;if(d&&Ws(e)){if(!Ws(t))return!1;o=!0,p=!1}if(d&&!p)return s||(s=new Gi),o||so(e)?Qn(e,t,r,n,a,s):function(e,t,i,r,n,a,s){switch(i){case D:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case T:return!(e.byteLength!=t.byteLength||!a(new ze(e),new ze(t)));case g:case v:case S:return Bs(+e,+t);case y:return e.name==t.name&&e.message==t.message;case P:case k:return e==t+"";case _:var o=ni;case E:var l=1&r;if(o||(o=oi),e.size!=t.size&&!l)return!1;var c=s.get(e);if(c)return c==t;r|=2,s.set(e,t);var h=Qn(o(e),o(t),r,n,a,s);return s.delete(e),h;case $:if(ji)return ji.call(e)==ji.call(t)}return!1}(e,t,c,r,n,a,s);if(!(1&r)){var b=p&&Ie.call(e,"__wrapped__"),x=u&&Ie.call(t,"__wrapped__");if(b||x){var C=b?e.value():e,A=x?t.value():t;return s||(s=new Gi),a(C,A,r,n,s)}}return!!d&&(s||(s=new Gi),function(e,t,r,n,a,s){var o=1&r,l=ta(e),c=l.length,h=ta(t),p=h.length;if(c!=p&&!o)return!1;for(var u=c;u--;){var d=l[u];if(!(o?d in t:Ie.call(t,d)))return!1}var f=s.get(e),m=s.get(t);if(f&&m)return f==t&&m==e;var g=!0;s.set(e,t),s.set(t,e);for(var v=o;++u<c;){var y=e[d=l[u]],b=t[d];if(n)var x=o?n(b,y,d,t,e,s):n(y,b,d,e,t,s);if(!(x===i?y===b||a(y,b,r,n,s):x)){g=!1;break}v||(v="constructor"==d)}if(g&&!v){var _=e.constructor,S=t.constructor;_==S||!("constructor"in e)||!("constructor"in t)||"function"==typeof _&&_ instanceof _&&"function"==typeof S&&S instanceof S||(g=!1)}return s.delete(e),s.delete(t),g}(e,t,r,n,a,s))}(e,t,r,n,Ar,a))}function Tr(e,t,r,n){var a=r.length,s=a,o=!n;if(null==e)return!s;for(e=Ce(e);a--;){var l=r[a];if(o&&l[2]?l[1]!==e[l[0]]:!(l[0]in e))return!1}for(;++a<s;){var c=(l=r[a])[0],h=e[c],p=l[1];if(o&&l[2]){if(h===i&&!(c in e))return!1}else{var u=new Gi;if(n)var d=n(h,p,c,e,t,u);if(!(d===i?Ar(p,h,3,n,u):d))return!1}}return!0}function Dr(e){return!(!Zs(e)||(t=e,je&&je in t))&&(Ys(e)?Le:fe).test(ja(e));var t}function Mr(e){return"function"==typeof e?e:null==e?tl:"object"==typeof e?Ns(e)?Or(e[0],e[1]):Br(e):hl(e)}function Ir(e){if(!_a(e))return fi(e);var t=[];for(var i in Ce(e))Ie.call(e,i)&&"constructor"!=i&&t.push(i);return t}function Fr(e){if(!Zs(e))return function(e){var t=[];if(null!=e)for(var i in Ce(e))t.push(i);return t}(e);var t=_a(e),i=[];for(var r in e)("constructor"!=r||!t&&Ie.call(e,r))&&i.push(r);return i}function jr(e,t){return e<t}function Rr(e,t){var i=-1,r=Vs(e)?re(e.length):[];return cr(e,function(e,n,a){r[++i]=t(e,n,a)}),r}function Br(e){var t=la(e);return 1==t.length&&t[0][2]?wa(t[0][0],t[0][1]):function(i){return i===e||Tr(i,e,t)}}function Or(e,t){return ya(e)&&Sa(t)?wa(Fa(e),t):function(r){var n=Co(r,e);return n===i&&n===t?Po(r,e):Ar(t,n,3)}}function Lr(e,t,r,n,a){e!==t&&mr(t,function(s,o){if(a||(a=new Gi),Zs(s))!function(e,t,r,n,a,s,o){var l=Ea(e,r),c=Ea(t,r),h=o.get(c);if(h)Zi(e,r,h);else{var p=s?s(l,c,r+"",e,t,o):i,u=p===i;if(u){var d=Ns(c),f=!d&&Ws(c),m=!d&&!f&&so(c);p=c,d||f||m?Ns(l)?p=l:Hs(l)?p=kn(l):f?(u=!1,p=_n(c,!0)):m?(u=!1,p=wn(c,!0)):p=[]:to(c)||qs(c)?(p=l,qs(l)?p=mo(l):Zs(l)&&!Ys(l)||(p=fa(c))):u=!1}u&&(o.set(c,p),a(p,c,n,s,o),o.delete(c)),Zi(e,r,p)}}(e,t,o,r,Lr,n,a);else{var l=n?n(Ea(e,o),s,o+"",e,t,a):i;l===i&&(l=s),Zi(e,o,l)}},To)}function qr(e,t){var r=e.length;if(r)return ga(t+=t<0?r:0,r)?e[t]:i}function Nr(e,t,i){t=t.length?Dt(t,function(e){return Ns(e)?function(t){return xr(t,1===e.length?e[0]:e)}:e}):[tl];var r=-1;t=Dt(t,Kt(sa()));var n=Rr(e,function(e,i,n){var a=Dt(t,function(t){return t(e)});return{criteria:a,index:++r,value:e}});return function(e,t){var i=e.length;for(e.sort(t);i--;)e[i]=e[i].value;return e}(n,function(e,t){return function(e,t,i){for(var r=-1,n=e.criteria,a=t.criteria,s=n.length,o=i.length;++r<s;){var l=Cn(n[r],a[r]);if(l)return r>=o?l:l*("desc"==i[r]?-1:1)}return e.index-t.index}(e,t,i)})}function zr(e,t,i){for(var r=-1,n=t.length,a={};++r<n;){var s=t[r],o=xr(e,s);i(o,s)&&Xr(a,vn(s,e),o)}return a}function Vr(e,t,i,r){var n=r?qt:Lt,a=-1,s=t.length,o=e;for(e===t&&(t=kn(t)),i&&(o=Dt(e,Kt(i)));++a<s;)for(var l=0,c=t[a],h=i?i(c):c;(l=n(o,h,l,r))>-1;)o!==e&&Ue.call(o,l,1),Ue.call(e,l,1);return e}function Hr(e,t){for(var i=e?t.length:0,r=i-1;i--;){var n=t[i];if(i==r||n!==a){var a=n;ga(n)?Ue.call(e,n,1):cn(e,n)}}return e}function Wr(e,t){return e+dt(bi()*(t-e+1))}function Gr(e,t){var i="";if(!e||t<1||t>h)return i;do{t%2&&(i+=e),(t=dt(t/2))&&(e+=e)}while(t);return i}function Ur(e,t){return Aa(Ca(e,t,tl),e+"")}function Yr(e){return Yi(Oo(e))}function Kr(e,t){var i=Oo(e);return Ma(i,nr(t,0,i.length))}function Xr(e,t,r,n){if(!Zs(e))return e;for(var a=-1,s=(t=vn(t,e)).length,o=s-1,l=e;null!=l&&++a<s;){var c=Fa(t[a]),h=r;if("__proto__"===c||"constructor"===c||"prototype"===c)return e;if(a!=o){var p=l[c];(h=n?n(p,c,l):i)===i&&(h=Zs(p)?p:ga(t[a+1])?[]:{})}Ji(l,c,h),l=l[c]}return e}var Zr=ki?function(e,t){return ki.set(e,t),e}:tl,Jr=et?function(e,t){return et(e,"toString",{configurable:!0,enumerable:!1,value:Jo(t),writable:!0})}:tl;function Qr(e){return Ma(Oo(e))}function en(e,t,i){var r=-1,n=e.length;t<0&&(t=-t>n?0:n+t),(i=i>n?n:i)<0&&(i+=n),n=t>i?0:i-t>>>0,t>>>=0;for(var a=re(n);++r<n;)a[r]=e[r+t];return a}function tn(e,t){var i;return cr(e,function(e,r,n){return!(i=t(e,r,n))}),!!i}function rn(e,t,i){var r=0,n=null==e?r:e.length;if("number"==typeof t&&t==t&&n<=2147483647){for(;r<n;){var a=r+n>>>1,s=e[a];null!==s&&!ao(s)&&(i?s<=t:s<t)?r=a+1:n=a}return n}return nn(e,t,tl,i)}function nn(e,t,r,n){var a=0,s=null==e?0:e.length;if(0===s)return 0;for(var o=(t=r(t))!=t,l=null===t,c=ao(t),h=t===i;a<s;){var p=dt((a+s)/2),u=r(e[p]),d=u!==i,f=null===u,m=u==u,g=ao(u);if(o)var v=n||m;else v=h?m&&(n||d):l?m&&d&&(n||!f):c?m&&d&&!f&&(n||!g):!f&&!g&&(n?u<=t:u<t);v?a=p+1:s=p}return gi(s,4294967294)}function an(e,t){for(var i=-1,r=e.length,n=0,a=[];++i<r;){var s=e[i],o=t?t(s):s;if(!i||!Bs(o,l)){var l=o;a[n++]=0===s?0:s}}return a}function sn(e){return"number"==typeof e?e:ao(e)?p:+e}function on(e){if("string"==typeof e)return e;if(Ns(e))return Dt(e,on)+"";if(ao(e))return Ri?Ri.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function ln(e,t,i){var r=-1,n=At,a=e.length,s=!0,o=[],l=o;if(i)s=!1,n=Tt;else if(a>=200){var c=t?null:Un(e);if(c)return oi(c);s=!1,n=Zt,l=new Wi}else l=t?[]:o;e:for(;++r<a;){var h=e[r],p=t?t(h):h;if(h=i||0!==h?h:0,s&&p==p){for(var u=l.length;u--;)if(l[u]===p)continue e;t&&l.push(p),o.push(h)}else n(l,p,i)||(l!==o&&l.push(p),o.push(h))}return o}function cn(e,t){var i=-1,r=(t=vn(t,e)).length;if(!r)return!0;for(var n=null==e||"object"!=typeof e&&"function"!=typeof e;++i<r;){var a=t[i];if("string"==typeof a){if("__proto__"===a&&!Ie.call(e,"__proto__"))return!1;if("constructor"===a&&i+1<r&&"string"==typeof t[i+1]&&"prototype"===t[i+1]){if(n&&0===i)continue;return!1}}}var s=Pa(e,t);return null==s||delete s[Fa(Ua(t))]}function hn(e,t,i,r){return Xr(e,t,i(xr(e,t)),r)}function pn(e,t,i,r){for(var n=e.length,a=r?n:-1;(r?a--:++a<n)&&t(e[a],a,e););return i?en(e,r?0:a,r?a+1:n):en(e,r?a+1:0,r?n:a)}function un(e,t){var i=e;return i instanceof Ni&&(i=i.value()),It(t,function(e,t){return t.func.apply(t.thisArg,Mt([e],t.args))},i)}function dn(e,t,i){var r=e.length;if(r<2)return r?ln(e[0]):[];for(var n=-1,a=re(r);++n<r;)for(var s=e[n],o=-1;++o<r;)o!=n&&(a[n]=lr(a[n]||s,e[o],t,i));return ln(fr(a,1),t,i)}function fn(e,t,r){for(var n=-1,a=e.length,s=t.length,o={};++n<a;){var l=n<s?t[n]:i;r(o,e[n],l)}return o}function mn(e){return Hs(e)?e:[]}function gn(e){return"function"==typeof e?e:tl}function vn(e,t){return Ns(e)?e:ya(e,t)?[e]:Ia(go(e))}var yn=Ur;function bn(e,t,r){var n=e.length;return r=r===i?n:r,!t&&r>=n?e:en(e,t,r)}var xn=st||function(e){return pt.clearTimeout(e)};function _n(e,t){if(t)return e.slice();var i=e.length,r=Ve?Ve(i):new e.constructor(i);return e.copy(r),r}function Sn(e){var t=new e.constructor(e.byteLength);return new ze(t).set(new ze(e)),t}function wn(e,t){var i=t?Sn(e.buffer):e.buffer;return new e.constructor(i,e.byteOffset,e.length)}function Cn(e,t){if(e!==t){var r=e!==i,n=null===e,a=e==e,s=ao(e),o=t!==i,l=null===t,c=t==t,h=ao(t);if(!l&&!h&&!s&&e>t||s&&o&&c&&!l&&!h||n&&o&&c||!r&&c||!a)return 1;if(!n&&!s&&!h&&e<t||h&&r&&a&&!n&&!s||l&&r&&a||!o&&a||!c)return-1}return 0}function Pn(e,t,i,r){for(var n=-1,a=e.length,s=i.length,o=-1,l=t.length,c=mi(a-s,0),h=re(l+c),p=!r;++o<l;)h[o]=t[o];for(;++n<s;)(p||n<a)&&(h[i[n]]=e[n]);for(;c--;)h[o++]=e[n++];return h}function En(e,t,i,r){for(var n=-1,a=e.length,s=-1,o=i.length,l=-1,c=t.length,h=mi(a-o,0),p=re(h+c),u=!r;++n<h;)p[n]=e[n];for(var d=n;++l<c;)p[d+l]=t[l];for(;++s<o;)(u||n<a)&&(p[d+i[s]]=e[n++]);return p}function kn(e,t){var i=-1,r=e.length;for(t||(t=re(r));++i<r;)t[i]=e[i];return t}function $n(e,t,r,n){var a=!r;r||(r={});for(var s=-1,o=t.length;++s<o;){var l=t[s],c=n?n(r[l],e[l],l,r,e):i;c===i&&(c=e[l]),a?ir(r,l,c):Ji(r,l,c)}return r}function An(e,t){return function(i,r){var n=Ns(i)?Ct:er,a=t?t():{};return n(i,e,sa(r,2),a)}}function Tn(e){return Ur(function(t,r){var n=-1,a=r.length,s=a>1?r[a-1]:i,o=a>2?r[2]:i;for(s=e.length>3&&"function"==typeof s?(a--,s):i,o&&va(r[0],r[1],o)&&(s=a<3?i:s,a=1),t=Ce(t);++n<a;){var l=r[n];l&&e(t,l,n,s)}return t})}function Dn(e,t){return function(i,r){if(null==i)return i;if(!Vs(i))return e(i,r);for(var n=i.length,a=t?n:-1,s=Ce(i);(t?a--:++a<n)&&!1!==r(s[a],a,s););return i}}function Mn(e){return function(t,i,r){for(var n=-1,a=Ce(t),s=r(t),o=s.length;o--;){var l=s[e?o:++n];if(!1===i(a[l],l,a))break}return t}}function In(e){return function(t){var r=ri(t=go(t))?hi(t):i,n=r?r[0]:t.charAt(0),a=r?bn(r,1).join(""):t.slice(1);return n[e]()+a}}function Fn(e){return function(t){return It(Ko(No(t).replace(Xe,"")),e,"")}}function jn(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var i=Oi(e.prototype),r=e.apply(i,t);return Zs(r)?r:i}}function Rn(e){return function(t,r,n){var a=Ce(t);if(!Vs(t)){var s=sa(r,3);t=Ao(t),r=function(e){return s(a[e],e,a)}}var o=e(t,r,n);return o>-1?a[s?t[o]:o]:i}}function Bn(e){return ea(function(t){var n=t.length,a=n,s=qi.prototype.thru;for(e&&t.reverse();a--;){var o=t[a];if("function"!=typeof o)throw new ke(r);if(s&&!l&&"wrapper"==na(o))var l=new qi([],!0)}for(a=l?a:n;++a<n;){var c=na(o=t[a]),h="wrapper"==c?ra(o):i;l=h&&ba(h[0])&&424==h[1]&&!h[4].length&&1==h[9]?l[na(h[0])].apply(l,h[3]):1==o.length&&ba(o)?l[c]():l.thru(o)}return function(){var e=arguments,i=e[0];if(l&&1==e.length&&Ns(i))return l.plant(i).value();for(var r=0,a=n?t[r].apply(this,e):i;++r<n;)a=t[r].call(this,a);return a}})}function On(e,t,r,n,a,s,l,c,h,p){var u=t&o,d=1&t,f=2&t,m=24&t,g=512&t,v=f?i:jn(e);return function o(){for(var y=arguments.length,b=re(y),x=y;x--;)b[x]=arguments[x];if(m)var _=aa(o),S=function(e,t){for(var i=e.length,r=0;i--;)e[i]===t&&++r;return r}(b,_);if(n&&(b=Pn(b,n,a,m)),s&&(b=En(b,s,l,m)),y-=S,m&&y<p){var w=si(b,_);return Wn(e,t,On,o.placeholder,r,b,w,c,h,p-y)}var C=d?r:this,P=f?C[e]:e;return y=b.length,c?b=function(e,t){for(var r=e.length,n=gi(t.length,r),a=kn(e);n--;){var s=t[n];e[n]=ga(s,r)?a[s]:i}return e}(b,c):g&&y>1&&b.reverse(),u&&h<y&&(b.length=h),this&&this!==pt&&this instanceof o&&(P=v||jn(P)),P.apply(C,b)}}function Ln(e,t){return function(i,r){return function(e,t,i,r){return vr(e,function(e,n,a){t(r,i(e),n,a)}),r}(i,e,t(r),{})}}function qn(e,t){return function(r,n){var a;if(r===i&&n===i)return t;if(r!==i&&(a=r),n!==i){if(a===i)return n;"string"==typeof r||"string"==typeof n?(r=on(r),n=on(n)):(r=sn(r),n=sn(n)),a=e(r,n)}return a}}function Nn(e){return ea(function(t){return t=Dt(t,Kt(sa())),Ur(function(i){var r=this;return e(t,function(e){return wt(e,r,i)})})})}function zn(e,t){var r=(t=t===i?" ":on(t)).length;if(r<2)return r?Gr(t,e):t;var n=Gr(t,ut(e/ci(t)));return ri(t)?bn(hi(n),0,e).join(""):n.slice(0,e)}function Vn(e){return function(t,r,n){return n&&"number"!=typeof n&&va(t,r,n)&&(r=n=i),t=ho(t),r===i?(r=t,t=0):r=ho(r),function(e,t,i,r){for(var n=-1,a=mi(ut((t-e)/(i||1)),0),s=re(a);a--;)s[r?a:++n]=e,e+=i;return s}(t,r,n=n===i?t<r?1:-1:ho(n),e)}}function Hn(e){return function(t,i){return"string"==typeof t&&"string"==typeof i||(t=fo(t),i=fo(i)),e(t,i)}}function Wn(e,t,r,n,a,o,l,c,h,p){var u=8&t;t|=u?s:64,4&(t&=~(u?64:s))||(t&=-4);var d=[e,t,a,u?o:i,u?l:i,u?i:o,u?i:l,c,h,p],f=r.apply(i,d);return ba(e)&&ka(f,d),f.placeholder=n,Ta(f,e,t)}function Gn(e){var t=we[e];return function(e,i){if(e=fo(e),(i=null==i?0:gi(po(i),292))&&Rt(e)){var r=(go(e)+"e").split("e");return+((r=(go(t(r[0]+"e"+(+r[1]+i)))+"e").split("e"))[0]+"e"+(+r[1]-i))}return t(e)}}var Un=Ci&&1/oi(new Ci([,-0]))[1]==c?function(e){return new Ci(e)}:sl;function Yn(e){return function(t){var i=ua(t);return i==_?ni(t):i==E?li(t):function(e,t){return Dt(t,function(t){return[t,e[t]]})}(t,e(t))}}function Kn(e,t,n,c,h,p,u,d){var f=2&t;if(!f&&"function"!=typeof e)throw new ke(r);var m=c?c.length:0;if(m||(t&=-97,c=h=i),u=u===i?u:mi(po(u),0),d=d===i?d:po(d),m-=h?h.length:0,64&t){var g=c,v=h;c=h=i}var y=f?i:ra(e),b=[e,t,n,c,h,g,v,p,u,d];if(y&&function(e,t){var i=e[1],r=t[1],n=i|r,s=n<131,c=r==o&&8==i||r==o&&i==l&&e[7].length<=t[8]||384==r&&t[7].length<=t[8]&&8==i;if(!s&&!c)return e;1&r&&(e[2]=t[2],n|=1&i?0:4);var h=t[3];if(h){var p=e[3];e[3]=p?Pn(p,h,t[4]):h,e[4]=p?si(e[3],a):t[4]}(h=t[5])&&(p=e[5],e[5]=p?En(p,h,t[6]):h,e[6]=p?si(e[5],a):t[6]),(h=t[7])&&(e[7]=h),r&o&&(e[8]=null==e[8]?t[8]:gi(e[8],t[8])),null==e[9]&&(e[9]=t[9]),e[0]=t[0],e[1]=n}(b,y),e=b[0],t=b[1],n=b[2],c=b[3],h=b[4],!(d=b[9]=b[9]===i?f?0:e.length:mi(b[9]-m,0))&&24&t&&(t&=-25),t&&1!=t)x=8==t||16==t?function(e,t,r){var n=jn(e);return function a(){for(var s=arguments.length,o=re(s),l=s,c=aa(a);l--;)o[l]=arguments[l];var h=s<3&&o[0]!==c&&o[s-1]!==c?[]:si(o,c);return(s-=h.length)<r?Wn(e,t,On,a.placeholder,i,o,h,i,i,r-s):wt(this&&this!==pt&&this instanceof a?n:e,this,o)}}(e,t,d):t!=s&&33!=t||h.length?On.apply(i,b):function(e,t,i,r){var n=1&t,a=jn(e);return function t(){for(var s=-1,o=arguments.length,l=-1,c=r.length,h=re(c+o),p=this&&this!==pt&&this instanceof t?a:e;++l<c;)h[l]=r[l];for(;o--;)h[l++]=arguments[++s];return wt(p,n?i:this,h)}}(e,t,n,c);else var x=function(e,t,i){var r=1&t,n=jn(e);return function t(){return(this&&this!==pt&&this instanceof t?n:e).apply(r?i:this,arguments)}}(e,t,n);return Ta((y?Zr:ka)(x,b),e,t)}function Xn(e,t,r,n){return e===i||Bs(e,Te[r])&&!Ie.call(n,r)?t:e}function Zn(e,t,r,n,a,s){return Zs(e)&&Zs(t)&&(s.set(t,e),Lr(e,t,i,Zn,s),s.delete(t)),e}function Jn(e){return to(e)?i:e}function Qn(e,t,r,n,a,s){var o=1&r,l=e.length,c=t.length;if(l!=c&&!(o&&c>l))return!1;var h=s.get(e),p=s.get(t);if(h&&p)return h==t&&p==e;var u=-1,d=!0,f=2&r?new Wi:i;for(s.set(e,t),s.set(t,e);++u<l;){var m=e[u],g=t[u];if(n)var v=o?n(g,m,u,t,e,s):n(m,g,u,e,t,s);if(v!==i){if(v)continue;d=!1;break}if(f){if(!jt(t,function(e,t){if(!Zt(f,t)&&(m===e||a(m,e,r,n,s)))return f.push(t)})){d=!1;break}}else if(m!==g&&!a(m,g,r,n,s)){d=!1;break}}return s.delete(e),s.delete(t),d}function ea(e){return Aa(Ca(e,i,za),e+"")}function ta(e){return _r(e,Ao,ha)}function ia(e){return _r(e,To,pa)}var ra=ki?function(e){return ki.get(e)}:sl;function na(e){for(var t=e.name+"",i=$i[t],r=Ie.call($i,t)?i.length:0;r--;){var n=i[r],a=n.func;if(null==a||a==e)return n.name}return t}function aa(e){return(Ie.call(Bi,"placeholder")?Bi:e).placeholder}function sa(){var e=Bi.iteratee||il;return e=e===il?Mr:e,arguments.length?e(arguments[0],arguments[1]):e}function oa(e,t){var i,r,n=e.__data__;return("string"==(r=typeof(i=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==i:null===i)?n["string"==typeof t?"string":"hash"]:n.map}function la(e){for(var t=Ao(e),i=t.length;i--;){var r=t[i],n=e[r];t[i]=[r,n,Sa(n)]}return t}function ca(e,t){var r=function(e,t){return null==e?i:e[t]}(e,t);return Dr(r)?r:i}var ha=mt?function(e){return null==e?[]:(e=Ce(e),$t(mt(e),function(t){return Ge.call(e,t)}))}:dl,pa=mt?function(e){for(var t=[];e;)Mt(t,ha(e)),e=He(e);return t}:dl,ua=Sr;function da(e,t,i){for(var r=-1,n=(t=vn(t,e)).length,a=!1;++r<n;){var s=Fa(t[r]);if(!(a=null!=e&&i(e,s)))break;e=e[s]}return a||++r!=n?a:!!(n=null==e?0:e.length)&&Xs(n)&&ga(s,n)&&(Ns(e)||qs(e))}function fa(e){return"function"!=typeof e.constructor||_a(e)?{}:Oi(He(e))}function ma(e){return Ns(e)||qs(e)||!!(Ye&&e&&e[Ye])}function ga(e,t){var i=typeof e;return!!(t=null==t?h:t)&&("number"==i||"symbol"!=i&&ge.test(e))&&e>-1&&e%1==0&&e<t}function va(e,t,i){if(!Zs(i))return!1;var r=typeof t;return!!("number"==r?Vs(i)&&ga(t,i.length):"string"==r&&t in i)&&Bs(i[t],e)}function ya(e,t){if(Ns(e))return!1;var i=typeof e;return!("number"!=i&&"symbol"!=i&&"boolean"!=i&&null!=e&&!ao(e))||J.test(e)||!Z.test(e)||null!=t&&e in Ce(t)}function ba(e){var t=na(e),i=Bi[t];if("function"!=typeof i||!(t in Ni.prototype))return!1;if(e===i)return!0;var r=ra(i);return!!r&&e===r[0]}(_i&&ua(new _i(new ArrayBuffer(1)))!=D||Si&&ua(new Si)!=_||wi&&ua(wi.resolve())!=C||Ci&&ua(new Ci)!=E||Pi&&ua(new Pi)!=A)&&(ua=function(e){var t=Sr(e),r=t==w?e.constructor:i,n=r?ja(r):"";if(n)switch(n){case Ai:return D;case Ti:return _;case Di:return C;case Mi:return E;case Ii:return A}return t});var xa=De?Ys:fl;function _a(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||Te)}function Sa(e){return e==e&&!Zs(e)}function wa(e,t){return function(r){return null!=r&&r[e]===t&&(t!==i||e in Ce(r))}}function Ca(e,t,r){return t=mi(t===i?e.length-1:t,0),function(){for(var i=arguments,n=-1,a=mi(i.length-t,0),s=re(a);++n<a;)s[n]=i[t+n];n=-1;for(var o=re(t+1);++n<t;)o[n]=i[n];return o[t]=r(s),wt(e,this,o)}}function Pa(e,t){return t.length<2?e:xr(e,en(t,0,-1))}function Ea(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}var ka=Da(Zr),$a=ht||function(e,t){return pt.setTimeout(e,t)},Aa=Da(Jr);function Ta(e,t,i){var r=t+"";return Aa(e,function(e,t){var i=t.length;if(!i)return e;var r=i-1;return t[r]=(i>1?"& ":"")+t[r],t=t.join(i>2?", ":" "),e.replace(ne,"{\n/* [wrapped with "+t+"] */\n")}(r,function(e,t){return Pt(d,function(i){var r="_."+i[0];t&i[1]&&!At(e,r)&&e.push(r)}),e.sort()}(function(e){var t=e.match(ae);return t?t[1].split(se):[]}(r),i)))}function Da(e){var t=0,r=0;return function(){var n=vi(),a=16-(n-r);if(r=n,a>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(i,arguments)}}function Ma(e,t){var r=-1,n=e.length,a=n-1;for(t=t===i?n:t;++r<t;){var s=Wr(r,a),o=e[s];e[s]=e[r],e[r]=o}return e.length=t,e}var Ia=function(e){var t=Ds(e,function(e){return 500===i.size&&i.clear(),e}),i=t.cache;return t}(function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(Q,function(e,i,r,n){t.push(r?n.replace(ce,"$1"):i||e)}),t});function Fa(e){if("string"==typeof e||ao(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function ja(e){if(null!=e){try{return Me.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function Ra(e){if(e instanceof Ni)return e.clone();var t=new qi(e.__wrapped__,e.__chain__);return t.__actions__=kn(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}var Ba=Ur(function(e,t){return Hs(e)?lr(e,fr(t,1,Hs,!0)):[]}),Oa=Ur(function(e,t){var r=Ua(t);return Hs(r)&&(r=i),Hs(e)?lr(e,fr(t,1,Hs,!0),sa(r,2)):[]}),La=Ur(function(e,t){var r=Ua(t);return Hs(r)&&(r=i),Hs(e)?lr(e,fr(t,1,Hs,!0),i,r):[]});function qa(e,t,i){var r=null==e?0:e.length;if(!r)return-1;var n=null==i?0:po(i);return n<0&&(n=mi(r+n,0)),Ot(e,sa(t,3),n)}function Na(e,t,r){var n=null==e?0:e.length;if(!n)return-1;var a=n-1;return r!==i&&(a=po(r),a=r<0?mi(n+a,0):gi(a,n-1)),Ot(e,sa(t,3),a,!0)}function za(e){return null!=e&&e.length?fr(e,1):[]}function Va(e){return e&&e.length?e[0]:i}var Ha=Ur(function(e){var t=Dt(e,mn);return t.length&&t[0]===e[0]?Er(t):[]}),Wa=Ur(function(e){var t=Ua(e),r=Dt(e,mn);return t===Ua(r)?t=i:r.pop(),r.length&&r[0]===e[0]?Er(r,sa(t,2)):[]}),Ga=Ur(function(e){var t=Ua(e),r=Dt(e,mn);return(t="function"==typeof t?t:i)&&r.pop(),r.length&&r[0]===e[0]?Er(r,i,t):[]});function Ua(e){var t=null==e?0:e.length;return t?e[t-1]:i}var Ya=Ur(Ka);function Ka(e,t){return e&&e.length&&t&&t.length?Vr(e,t):e}var Xa=ea(function(e,t){var i=null==e?0:e.length,r=rr(e,t);return Hr(e,Dt(t,function(e){return ga(e,i)?+e:e}).sort(Cn)),r});function Za(e){return null==e?e:xi.call(e)}var Ja=Ur(function(e){return ln(fr(e,1,Hs,!0))}),Qa=Ur(function(e){var t=Ua(e);return Hs(t)&&(t=i),ln(fr(e,1,Hs,!0),sa(t,2))}),es=Ur(function(e){var t=Ua(e);return t="function"==typeof t?t:i,ln(fr(e,1,Hs,!0),i,t)});function ts(e){if(!e||!e.length)return[];var t=0;return e=$t(e,function(e){if(Hs(e))return t=mi(e.length,t),!0}),Ut(t,function(t){return Dt(e,Vt(t))})}function is(e,t){if(!e||!e.length)return[];var r=ts(e);return null==t?r:Dt(r,function(e){return wt(t,i,e)})}var rs=Ur(function(e,t){return Hs(e)?lr(e,t):[]}),ns=Ur(function(e){return dn($t(e,Hs))}),as=Ur(function(e){var t=Ua(e);return Hs(t)&&(t=i),dn($t(e,Hs),sa(t,2))}),ss=Ur(function(e){var t=Ua(e);return t="function"==typeof t?t:i,dn($t(e,Hs),i,t)}),os=Ur(ts),ls=Ur(function(e){var t=e.length,r=t>1?e[t-1]:i;return r="function"==typeof r?(e.pop(),r):i,is(e,r)});function cs(e){var t=Bi(e);return t.__chain__=!0,t}function hs(e,t){return t(e)}var ps=ea(function(e){var t=e.length,r=t?e[0]:0,n=this.__wrapped__,a=function(t){return rr(t,e)};return!(t>1||this.__actions__.length)&&n instanceof Ni&&ga(r)?((n=n.slice(r,+r+(t?1:0))).__actions__.push({func:hs,args:[a],thisArg:i}),new qi(n,this.__chain__).thru(function(e){return t&&!e.length&&e.push(i),e})):this.thru(a)}),us=An(function(e,t,i){Ie.call(e,i)?++e[i]:ir(e,i,1)}),ds=Rn(qa),fs=Rn(Na);function ms(e,t){return(Ns(e)?Pt:cr)(e,sa(t,3))}function gs(e,t){return(Ns(e)?Et:hr)(e,sa(t,3))}var vs=An(function(e,t,i){Ie.call(e,i)?e[i].push(t):ir(e,i,[t])}),ys=Ur(function(e,t,i){var r=-1,n="function"==typeof t,a=Vs(e)?re(e.length):[];return cr(e,function(e){a[++r]=n?wt(t,e,i):kr(e,t,i)}),a}),bs=An(function(e,t,i){ir(e,i,t)});function xs(e,t){return(Ns(e)?Dt:Rr)(e,sa(t,3))}var _s=An(function(e,t,i){e[i?0:1].push(t)},function(){return[[],[]]}),Ss=Ur(function(e,t){if(null==e)return[];var i=t.length;return i>1&&va(e,t[0],t[1])?t=[]:i>2&&va(t[0],t[1],t[2])&&(t=[t[0]]),Nr(e,fr(t,1),[])}),ws=ct||function(){return pt.Date.now()};function Cs(e,t,r){return t=r?i:t,t=e&&null==t?e.length:t,Kn(e,o,i,i,i,i,t)}function Ps(e,t){var n;if("function"!=typeof t)throw new ke(r);return e=po(e),function(){return--e>0&&(n=t.apply(this,arguments)),e<=1&&(t=i),n}}var Es=Ur(function(e,t,i){var r=1;if(i.length){var n=si(i,aa(Es));r|=s}return Kn(e,r,t,i,n)}),ks=Ur(function(e,t,i){var r=3;if(i.length){var n=si(i,aa(ks));r|=s}return Kn(t,r,e,i,n)});function $s(e,t,n){var a,s,o,l,c,h,p=0,u=!1,d=!1,f=!0;if("function"!=typeof e)throw new ke(r);function m(t){var r=a,n=s;return a=s=i,p=t,l=e.apply(n,r)}function g(e){var r=e-h;return h===i||r>=t||r<0||d&&e-p>=o}function v(){var e=ws();if(g(e))return y(e);c=$a(v,function(e){var i=t-(e-h);return d?gi(i,o-(e-p)):i}(e))}function y(e){return c=i,f&&a?m(e):(a=s=i,l)}function b(){var e=ws(),r=g(e);if(a=arguments,s=this,h=e,r){if(c===i)return function(e){return p=e,c=$a(v,t),u?m(e):l}(h);if(d)return xn(c),c=$a(v,t),m(h)}return c===i&&(c=$a(v,t)),l}return t=fo(t)||0,Zs(n)&&(u=!!n.leading,o=(d="maxWait"in n)?mi(fo(n.maxWait)||0,t):o,f="trailing"in n?!!n.trailing:f),b.cancel=function(){c!==i&&xn(c),p=0,a=h=s=c=i},b.flush=function(){return c===i?l:y(ws())},b}var As=Ur(function(e,t){return or(e,1,t)}),Ts=Ur(function(e,t,i){return or(e,fo(t)||0,i)});function Ds(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new ke(r);var i=function(){var r=arguments,n=t?t.apply(this,r):r[0],a=i.cache;if(a.has(n))return a.get(n);var s=e.apply(this,r);return i.cache=a.set(n,s)||a,s};return i.cache=new(Ds.Cache||Hi),i}function Ms(e){if("function"!=typeof e)throw new ke(r);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}Ds.Cache=Hi;var Is=yn(function(e,t){var i=(t=1==t.length&&Ns(t[0])?Dt(t[0],Kt(sa())):Dt(fr(t,1),Kt(sa()))).length;return Ur(function(r){for(var n=-1,a=gi(r.length,i);++n<a;)r[n]=t[n].call(this,r[n]);return wt(e,this,r)})}),Fs=Ur(function(e,t){var r=si(t,aa(Fs));return Kn(e,s,i,t,r)}),js=Ur(function(e,t){var r=si(t,aa(js));return Kn(e,64,i,t,r)}),Rs=ea(function(e,t){return Kn(e,l,i,i,i,t)});function Bs(e,t){return e===t||e!=e&&t!=t}var Os=Hn(wr),Ls=Hn(function(e,t){return e>=t}),qs=$r(function(){return arguments}())?$r:function(e){return Js(e)&&Ie.call(e,"callee")&&!Ge.call(e,"callee")},Ns=re.isArray,zs=vt?Kt(vt):function(e){return Js(e)&&Sr(e)==T};function Vs(e){return null!=e&&Xs(e.length)&&!Ys(e)}function Hs(e){return Js(e)&&Vs(e)}var Ws=gt||fl,Gs=yt?Kt(yt):function(e){return Js(e)&&Sr(e)==v};function Us(e){if(!Js(e))return!1;var t=Sr(e);return t==y||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!to(e)}function Ys(e){if(!Zs(e))return!1;var t=Sr(e);return t==b||t==x||"[object AsyncFunction]"==t||"[object Proxy]"==t}function Ks(e){return"number"==typeof e&&e==po(e)}function Xs(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=h}function Zs(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function Js(e){return null!=e&&"object"==typeof e}var Qs=bt?Kt(bt):function(e){return Js(e)&&ua(e)==_};function eo(e){return"number"==typeof e||Js(e)&&Sr(e)==S}function to(e){if(!Js(e)||Sr(e)!=w)return!1;var t=He(e);if(null===t)return!0;var i=Ie.call(t,"constructor")&&t.constructor;return"function"==typeof i&&i instanceof i&&Me.call(i)==Be}var io=xt?Kt(xt):function(e){return Js(e)&&Sr(e)==P},ro=_t?Kt(_t):function(e){return Js(e)&&ua(e)==E};function no(e){return"string"==typeof e||!Ns(e)&&Js(e)&&Sr(e)==k}function ao(e){return"symbol"==typeof e||Js(e)&&Sr(e)==$}var so=St?Kt(St):function(e){return Js(e)&&Xs(e.length)&&!!nt[Sr(e)]},oo=Hn(jr),lo=Hn(function(e,t){return e<=t});function co(e){if(!e)return[];if(Vs(e))return no(e)?hi(e):kn(e);if(Ke&&e[Ke])return function(e){for(var t,i=[];!(t=e.next()).done;)i.push(t.value);return i}(e[Ke]());var t=ua(e);return(t==_?ni:t==E?oi:Oo)(e)}function ho(e){return e?(e=fo(e))===c||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}function po(e){var t=ho(e),i=t%1;return t==t?i?t-i:t:0}function uo(e){return e?nr(po(e),0,u):0}function fo(e){if("number"==typeof e)return e;if(ao(e))return p;if(Zs(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=Zs(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=Yt(e);var i=de.test(e);return i||me.test(e)?lt(e.slice(2),i?2:8):ue.test(e)?p:+e}function mo(e){return $n(e,To(e))}function go(e){return null==e?"":on(e)}var vo=Tn(function(e,t){if(_a(t)||Vs(t))$n(t,Ao(t),e);else for(var i in t)Ie.call(t,i)&&Ji(e,i,t[i])}),yo=Tn(function(e,t){$n(t,To(t),e)}),bo=Tn(function(e,t,i,r){$n(t,To(t),e,r)}),xo=Tn(function(e,t,i,r){$n(t,Ao(t),e,r)}),_o=ea(rr),So=Ur(function(e,t){e=Ce(e);var r=-1,n=t.length,a=n>2?t[2]:i;for(a&&va(t[0],t[1],a)&&(n=1);++r<n;)for(var s=t[r],o=To(s),l=-1,c=o.length;++l<c;){var h=o[l],p=e[h];(p===i||Bs(p,Te[h])&&!Ie.call(e,h))&&(e[h]=s[h])}return e}),wo=Ur(function(e){return e.push(i,Zn),wt(Mo,i,e)});function Co(e,t,r){var n=null==e?i:xr(e,t);return n===i?r:n}function Po(e,t){return null!=e&&da(e,t,Pr)}var Eo=Ln(function(e,t,i){null!=t&&"function"!=typeof t.toString&&(t=Re.call(t)),e[t]=i},Jo(tl)),ko=Ln(function(e,t,i){null!=t&&"function"!=typeof t.toString&&(t=Re.call(t)),Ie.call(e,t)?e[t].push(i):e[t]=[i]},sa),$o=Ur(kr);function Ao(e){return Vs(e)?Ui(e):Ir(e)}function To(e){return Vs(e)?Ui(e,!0):Fr(e)}var Do=Tn(function(e,t,i){Lr(e,t,i)}),Mo=Tn(function(e,t,i,r){Lr(e,t,i,r)}),Io=ea(function(e,t){var i={};if(null==e)return i;var r=!1;t=Dt(t,function(t){return t=vn(t,e),r||(r=t.length>1),t}),$n(e,ia(e),i),r&&(i=ar(i,7,Jn));for(var n=t.length;n--;)cn(i,t[n]);return i}),Fo=ea(function(e,t){return null==e?{}:function(e,t){return zr(e,t,function(t,i){return Po(e,i)})}(e,t)});function jo(e,t){if(null==e)return{};var i=Dt(ia(e),function(e){return[e]});return t=sa(t),zr(e,i,function(e,i){return t(e,i[0])})}var Ro=Yn(Ao),Bo=Yn(To);function Oo(e){return null==e?[]:Xt(e,Ao(e))}var Lo=Fn(function(e,t,i){return t=t.toLowerCase(),e+(i?qo(t):t)});function qo(e){return Yo(go(e).toLowerCase())}function No(e){return(e=go(e))&&e.replace(ve,ei).replace(Ze,"")}var zo=Fn(function(e,t,i){return e+(i?"-":"")+t.toLowerCase()}),Vo=Fn(function(e,t,i){return e+(i?" ":"")+t.toLowerCase()}),Ho=In("toLowerCase"),Wo=Fn(function(e,t,i){return e+(i?"_":"")+t.toLowerCase()}),Go=Fn(function(e,t,i){return e+(i?" ":"")+Yo(t)}),Uo=Fn(function(e,t,i){return e+(i?" ":"")+t.toUpperCase()}),Yo=In("toUpperCase");function Ko(e,t,r){return e=go(e),(t=r?i:t)===i?function(e){return tt.test(e)}(e)?function(e){return e.match(Qe)||[]}(e):function(e){return e.match(oe)||[]}(e):e.match(t)||[]}var Xo=Ur(function(e,t){try{return wt(e,i,t)}catch(e){return Us(e)?e:new _e(e)}}),Zo=ea(function(e,t){return Pt(t,function(t){t=Fa(t),ir(e,t,Es(e[t],e))}),e});function Jo(e){return function(){return e}}var Qo=Bn(),el=Bn(!0);function tl(e){return e}function il(e){return Mr("function"==typeof e?e:ar(e,1))}var rl=Ur(function(e,t){return function(i){return kr(i,e,t)}}),nl=Ur(function(e,t){return function(i){return kr(e,i,t)}});function al(e,t,i){var r=Ao(t),n=br(t,r);null!=i||Zs(t)&&(n.length||!r.length)||(i=t,t=e,e=this,n=br(t,Ao(t)));var a=!(Zs(i)&&"chain"in i&&!i.chain),s=Ys(e);return Pt(n,function(i){var r=t[i];e[i]=r,s&&(e.prototype[i]=function(){var t=this.__chain__;if(a||t){var i=e(this.__wrapped__);return(i.__actions__=kn(this.__actions__)).push({func:r,args:arguments,thisArg:e}),i.__chain__=t,i}return r.apply(e,Mt([this.value()],arguments))})}),e}function sl(){}var ol=Nn(Dt),ll=Nn(kt),cl=Nn(jt);function hl(e){return ya(e)?Vt(Fa(e)):function(e){return function(t){return xr(t,e)}}(e)}var pl=Vn(),ul=Vn(!0);function dl(){return[]}function fl(){return!1}var ml,gl=qn(function(e,t){return e+t},0),vl=Gn("ceil"),yl=qn(function(e,t){return e/t},1),bl=Gn("floor"),xl=qn(function(e,t){return e*t},1),_l=Gn("round"),Sl=qn(function(e,t){return e-t},0);return Bi.after=function(e,t){if("function"!=typeof t)throw new ke(r);return e=po(e),function(){if(--e<1)return t.apply(this,arguments)}},Bi.ary=Cs,Bi.assign=vo,Bi.assignIn=yo,Bi.assignInWith=bo,Bi.assignWith=xo,Bi.at=_o,Bi.before=Ps,Bi.bind=Es,Bi.bindAll=Zo,Bi.bindKey=ks,Bi.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return Ns(e)?e:[e]},Bi.chain=cs,Bi.chunk=function(e,t,r){t=(r?va(e,t,r):t===i)?1:mi(po(t),0);var n=null==e?0:e.length;if(!n||t<1)return[];for(var a=0,s=0,o=re(ut(n/t));a<n;)o[s++]=en(e,a,a+=t);return o},Bi.compact=function(e){for(var t=-1,i=null==e?0:e.length,r=0,n=[];++t<i;){var a=e[t];a&&(n[r++]=a)}return n},Bi.concat=function(){var e=arguments.length;if(!e)return[];for(var t=re(e-1),i=arguments[0],r=e;r--;)t[r-1]=arguments[r];return Mt(Ns(i)?kn(i):[i],fr(t,1))},Bi.cond=function(e){var t=null==e?0:e.length,i=sa();return e=t?Dt(e,function(e){if("function"!=typeof e[1])throw new ke(r);return[i(e[0]),e[1]]}):[],Ur(function(i){for(var r=-1;++r<t;){var n=e[r];if(wt(n[0],this,i))return wt(n[1],this,i)}})},Bi.conforms=function(e){return function(e){var t=Ao(e);return function(i){return sr(i,e,t)}}(ar(e,1))},Bi.constant=Jo,Bi.countBy=us,Bi.create=function(e,t){var i=Oi(e);return null==t?i:tr(i,t)},Bi.curry=function e(t,r,n){var a=Kn(t,8,i,i,i,i,i,r=n?i:r);return a.placeholder=e.placeholder,a},Bi.curryRight=function e(t,r,n){var a=Kn(t,16,i,i,i,i,i,r=n?i:r);return a.placeholder=e.placeholder,a},Bi.debounce=$s,Bi.defaults=So,Bi.defaultsDeep=wo,Bi.defer=As,Bi.delay=Ts,Bi.difference=Ba,Bi.differenceBy=Oa,Bi.differenceWith=La,Bi.drop=function(e,t,r){var n=null==e?0:e.length;return n?en(e,(t=r||t===i?1:po(t))<0?0:t,n):[]},Bi.dropRight=function(e,t,r){var n=null==e?0:e.length;return n?en(e,0,(t=n-(t=r||t===i?1:po(t)))<0?0:t):[]},Bi.dropRightWhile=function(e,t){return e&&e.length?pn(e,sa(t,3),!0,!0):[]},Bi.dropWhile=function(e,t){return e&&e.length?pn(e,sa(t,3),!0):[]},Bi.fill=function(e,t,r,n){var a=null==e?0:e.length;return a?(r&&"number"!=typeof r&&va(e,t,r)&&(r=0,n=a),function(e,t,r,n){var a=e.length;for((r=po(r))<0&&(r=-r>a?0:a+r),(n=n===i||n>a?a:po(n))<0&&(n+=a),n=r>n?0:uo(n);r<n;)e[r++]=t;return e}(e,t,r,n)):[]},Bi.filter=function(e,t){return(Ns(e)?$t:dr)(e,sa(t,3))},Bi.flatMap=function(e,t){return fr(xs(e,t),1)},Bi.flatMapDeep=function(e,t){return fr(xs(e,t),c)},Bi.flatMapDepth=function(e,t,r){return r=r===i?1:po(r),fr(xs(e,t),r)},Bi.flatten=za,Bi.flattenDeep=function(e){return null!=e&&e.length?fr(e,c):[]},Bi.flattenDepth=function(e,t){return null!=e&&e.length?fr(e,t=t===i?1:po(t)):[]},Bi.flip=function(e){return Kn(e,512)},Bi.flow=Qo,Bi.flowRight=el,Bi.fromPairs=function(e){for(var t=-1,i=null==e?0:e.length,r={};++t<i;){var n=e[t];r[n[0]]=n[1]}return r},Bi.functions=function(e){return null==e?[]:br(e,Ao(e))},Bi.functionsIn=function(e){return null==e?[]:br(e,To(e))},Bi.groupBy=vs,Bi.initial=function(e){return null!=e&&e.length?en(e,0,-1):[]},Bi.intersection=Ha,Bi.intersectionBy=Wa,Bi.intersectionWith=Ga,Bi.invert=Eo,Bi.invertBy=ko,Bi.invokeMap=ys,Bi.iteratee=il,Bi.keyBy=bs,Bi.keys=Ao,Bi.keysIn=To,Bi.map=xs,Bi.mapKeys=function(e,t){var i={};return t=sa(t,3),vr(e,function(e,r,n){ir(i,t(e,r,n),e)}),i},Bi.mapValues=function(e,t){var i={};return t=sa(t,3),vr(e,function(e,r,n){ir(i,r,t(e,r,n))}),i},Bi.matches=function(e){return Br(ar(e,1))},Bi.matchesProperty=function(e,t){return Or(e,ar(t,1))},Bi.memoize=Ds,Bi.merge=Do,Bi.mergeWith=Mo,Bi.method=rl,Bi.methodOf=nl,Bi.mixin=al,Bi.negate=Ms,Bi.nthArg=function(e){return e=po(e),Ur(function(t){return qr(t,e)})},Bi.omit=Io,Bi.omitBy=function(e,t){return jo(e,Ms(sa(t)))},Bi.once=function(e){return Ps(2,e)},Bi.orderBy=function(e,t,r,n){return null==e?[]:(Ns(t)||(t=null==t?[]:[t]),Ns(r=n?i:r)||(r=null==r?[]:[r]),Nr(e,t,r))},Bi.over=ol,Bi.overArgs=Is,Bi.overEvery=ll,Bi.overSome=cl,Bi.partial=Fs,Bi.partialRight=js,Bi.partition=_s,Bi.pick=Fo,Bi.pickBy=jo,Bi.property=hl,Bi.propertyOf=function(e){return function(t){return null==e?i:xr(e,t)}},Bi.pull=Ya,Bi.pullAll=Ka,Bi.pullAllBy=function(e,t,i){return e&&e.length&&t&&t.length?Vr(e,t,sa(i,2)):e},Bi.pullAllWith=function(e,t,r){return e&&e.length&&t&&t.length?Vr(e,t,i,r):e},Bi.pullAt=Xa,Bi.range=pl,Bi.rangeRight=ul,Bi.rearg=Rs,Bi.reject=function(e,t){return(Ns(e)?$t:dr)(e,Ms(sa(t,3)))},Bi.remove=function(e,t){var i=[];if(!e||!e.length)return i;var r=-1,n=[],a=e.length;for(t=sa(t,3);++r<a;){var s=e[r];t(s,r,e)&&(i.push(s),n.push(r))}return Hr(e,n),i},Bi.rest=function(e,t){if("function"!=typeof e)throw new ke(r);return Ur(e,t=t===i?t:po(t))},Bi.reverse=Za,Bi.sampleSize=function(e,t,r){return t=(r?va(e,t,r):t===i)?1:po(t),(Ns(e)?Ki:Kr)(e,t)},Bi.set=function(e,t,i){return null==e?e:Xr(e,t,i)},Bi.setWith=function(e,t,r,n){return n="function"==typeof n?n:i,null==e?e:Xr(e,t,r,n)},Bi.shuffle=function(e){return(Ns(e)?Xi:Qr)(e)},Bi.slice=function(e,t,r){var n=null==e?0:e.length;return n?(r&&"number"!=typeof r&&va(e,t,r)?(t=0,r=n):(t=null==t?0:po(t),r=r===i?n:po(r)),en(e,t,r)):[]},Bi.sortBy=Ss,Bi.sortedUniq=function(e){return e&&e.length?an(e):[]},Bi.sortedUniqBy=function(e,t){return e&&e.length?an(e,sa(t,2)):[]},Bi.split=function(e,t,r){return r&&"number"!=typeof r&&va(e,t,r)&&(t=r=i),(r=r===i?u:r>>>0)?(e=go(e))&&("string"==typeof t||null!=t&&!io(t))&&!(t=on(t))&&ri(e)?bn(hi(e),0,r):e.split(t,r):[]},Bi.spread=function(e,t){if("function"!=typeof e)throw new ke(r);return t=null==t?0:mi(po(t),0),Ur(function(i){var r=i[t],n=bn(i,0,t);return r&&Mt(n,r),wt(e,this,n)})},Bi.tail=function(e){var t=null==e?0:e.length;return t?en(e,1,t):[]},Bi.take=function(e,t,r){return e&&e.length?en(e,0,(t=r||t===i?1:po(t))<0?0:t):[]},Bi.takeRight=function(e,t,r){var n=null==e?0:e.length;return n?en(e,(t=n-(t=r||t===i?1:po(t)))<0?0:t,n):[]},Bi.takeRightWhile=function(e,t){return e&&e.length?pn(e,sa(t,3),!1,!0):[]},Bi.takeWhile=function(e,t){return e&&e.length?pn(e,sa(t,3)):[]},Bi.tap=function(e,t){return t(e),e},Bi.throttle=function(e,t,i){var n=!0,a=!0;if("function"!=typeof e)throw new ke(r);return Zs(i)&&(n="leading"in i?!!i.leading:n,a="trailing"in i?!!i.trailing:a),$s(e,t,{leading:n,maxWait:t,trailing:a})},Bi.thru=hs,Bi.toArray=co,Bi.toPairs=Ro,Bi.toPairsIn=Bo,Bi.toPath=function(e){return Ns(e)?Dt(e,Fa):ao(e)?[e]:kn(Ia(go(e)))},Bi.toPlainObject=mo,Bi.transform=function(e,t,i){var r=Ns(e),n=r||Ws(e)||so(e);if(t=sa(t,4),null==i){var a=e&&e.constructor;i=n?r?new a:[]:Zs(e)&&Ys(a)?Oi(He(e)):{}}return(n?Pt:vr)(e,function(e,r,n){return t(i,e,r,n)}),i},Bi.unary=function(e){return Cs(e,1)},Bi.union=Ja,Bi.unionBy=Qa,Bi.unionWith=es,Bi.uniq=function(e){return e&&e.length?ln(e):[]},Bi.uniqBy=function(e,t){return e&&e.length?ln(e,sa(t,2)):[]},Bi.uniqWith=function(e,t){return t="function"==typeof t?t:i,e&&e.length?ln(e,i,t):[]},Bi.unset=function(e,t){return null==e||cn(e,t)},Bi.unzip=ts,Bi.unzipWith=is,Bi.update=function(e,t,i){return null==e?e:hn(e,t,gn(i))},Bi.updateWith=function(e,t,r,n){return n="function"==typeof n?n:i,null==e?e:hn(e,t,gn(r),n)},Bi.values=Oo,Bi.valuesIn=function(e){return null==e?[]:Xt(e,To(e))},Bi.without=rs,Bi.words=Ko,Bi.wrap=function(e,t){return Fs(gn(t),e)},Bi.xor=ns,Bi.xorBy=as,Bi.xorWith=ss,Bi.zip=os,Bi.zipObject=function(e,t){return fn(e||[],t||[],Ji)},Bi.zipObjectDeep=function(e,t){return fn(e||[],t||[],Xr)},Bi.zipWith=ls,Bi.entries=Ro,Bi.entriesIn=Bo,Bi.extend=yo,Bi.extendWith=bo,al(Bi,Bi),Bi.add=gl,Bi.attempt=Xo,Bi.camelCase=Lo,Bi.capitalize=qo,Bi.ceil=vl,Bi.clamp=function(e,t,r){return r===i&&(r=t,t=i),r!==i&&(r=(r=fo(r))==r?r:0),t!==i&&(t=(t=fo(t))==t?t:0),nr(fo(e),t,r)},Bi.clone=function(e){return ar(e,4)},Bi.cloneDeep=function(e){return ar(e,5)},Bi.cloneDeepWith=function(e,t){return ar(e,5,t="function"==typeof t?t:i)},Bi.cloneWith=function(e,t){return ar(e,4,t="function"==typeof t?t:i)},Bi.conformsTo=function(e,t){return null==t||sr(e,t,Ao(t))},Bi.deburr=No,Bi.defaultTo=function(e,t){return null==e||e!=e?t:e},Bi.divide=yl,Bi.endsWith=function(e,t,r){e=go(e),t=on(t);var n=e.length,a=r=r===i?n:nr(po(r),0,n);return(r-=t.length)>=0&&e.slice(r,a)==t},Bi.eq=Bs,Bi.escape=function(e){return(e=go(e))&&U.test(e)?e.replace(W,ti):e},Bi.escapeRegExp=function(e){return(e=go(e))&&te.test(e)?e.replace(ee,"\\$&"):e},Bi.every=function(e,t,r){var n=Ns(e)?kt:pr;return r&&va(e,t,r)&&(t=i),n(e,sa(t,3))},Bi.find=ds,Bi.findIndex=qa,Bi.findKey=function(e,t){return Bt(e,sa(t,3),vr)},Bi.findLast=fs,Bi.findLastIndex=Na,Bi.findLastKey=function(e,t){return Bt(e,sa(t,3),yr)},Bi.floor=bl,Bi.forEach=ms,Bi.forEachRight=gs,Bi.forIn=function(e,t){return null==e?e:mr(e,sa(t,3),To)},Bi.forInRight=function(e,t){return null==e?e:gr(e,sa(t,3),To)},Bi.forOwn=function(e,t){return e&&vr(e,sa(t,3))},Bi.forOwnRight=function(e,t){return e&&yr(e,sa(t,3))},Bi.get=Co,Bi.gt=Os,Bi.gte=Ls,Bi.has=function(e,t){return null!=e&&da(e,t,Cr)},Bi.hasIn=Po,Bi.head=Va,Bi.identity=tl,Bi.includes=function(e,t,i,r){e=Vs(e)?e:Oo(e),i=i&&!r?po(i):0;var n=e.length;return i<0&&(i=mi(n+i,0)),no(e)?i<=n&&e.indexOf(t,i)>-1:!!n&&Lt(e,t,i)>-1},Bi.indexOf=function(e,t,i){var r=null==e?0:e.length;if(!r)return-1;var n=null==i?0:po(i);return n<0&&(n=mi(r+n,0)),Lt(e,t,n)},Bi.inRange=function(e,t,r){return t=ho(t),r===i?(r=t,t=0):r=ho(r),function(e,t,i){return e>=gi(t,i)&&e<mi(t,i)}(e=fo(e),t,r)},Bi.invoke=$o,Bi.isArguments=qs,Bi.isArray=Ns,Bi.isArrayBuffer=zs,Bi.isArrayLike=Vs,Bi.isArrayLikeObject=Hs,Bi.isBoolean=function(e){return!0===e||!1===e||Js(e)&&Sr(e)==g},Bi.isBuffer=Ws,Bi.isDate=Gs,Bi.isElement=function(e){return Js(e)&&1===e.nodeType&&!to(e)},Bi.isEmpty=function(e){if(null==e)return!0;if(Vs(e)&&(Ns(e)||"string"==typeof e||"function"==typeof e.splice||Ws(e)||so(e)||qs(e)))return!e.length;var t=ua(e);if(t==_||t==E)return!e.size;if(_a(e))return!Ir(e).length;for(var i in e)if(Ie.call(e,i))return!1;return!0},Bi.isEqual=function(e,t){return Ar(e,t)},Bi.isEqualWith=function(e,t,r){var n=(r="function"==typeof r?r:i)?r(e,t):i;return n===i?Ar(e,t,i,r):!!n},Bi.isError=Us,Bi.isFinite=function(e){return"number"==typeof e&&Rt(e)},Bi.isFunction=Ys,Bi.isInteger=Ks,Bi.isLength=Xs,Bi.isMap=Qs,Bi.isMatch=function(e,t){return e===t||Tr(e,t,la(t))},Bi.isMatchWith=function(e,t,r){return r="function"==typeof r?r:i,Tr(e,t,la(t),r)},Bi.isNaN=function(e){return eo(e)&&e!=+e},Bi.isNative=function(e){if(xa(e))throw new _e("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return Dr(e)},Bi.isNil=function(e){return null==e},Bi.isNull=function(e){return null===e},Bi.isNumber=eo,Bi.isObject=Zs,Bi.isObjectLike=Js,Bi.isPlainObject=to,Bi.isRegExp=io,Bi.isSafeInteger=function(e){return Ks(e)&&e>=-9007199254740991&&e<=h},Bi.isSet=ro,Bi.isString=no,Bi.isSymbol=ao,Bi.isTypedArray=so,Bi.isUndefined=function(e){return e===i},Bi.isWeakMap=function(e){return Js(e)&&ua(e)==A},Bi.isWeakSet=function(e){return Js(e)&&"[object WeakSet]"==Sr(e)},Bi.join=function(e,t){return null==e?"":Ht.call(e,t)},Bi.kebabCase=zo,Bi.last=Ua,Bi.lastIndexOf=function(e,t,r){var n=null==e?0:e.length;if(!n)return-1;var a=n;return r!==i&&(a=(a=po(r))<0?mi(n+a,0):gi(a,n-1)),t==t?function(e,t,i){for(var r=i+1;r--;)if(e[r]===t)return r;return r}(e,t,a):Ot(e,Nt,a,!0)},Bi.lowerCase=Vo,Bi.lowerFirst=Ho,Bi.lt=oo,Bi.lte=lo,Bi.max=function(e){return e&&e.length?ur(e,tl,wr):i},Bi.maxBy=function(e,t){return e&&e.length?ur(e,sa(t,2),wr):i},Bi.mean=function(e){return zt(e,tl)},Bi.meanBy=function(e,t){return zt(e,sa(t,2))},Bi.min=function(e){return e&&e.length?ur(e,tl,jr):i},Bi.minBy=function(e,t){return e&&e.length?ur(e,sa(t,2),jr):i},Bi.stubArray=dl,Bi.stubFalse=fl,Bi.stubObject=function(){return{}},Bi.stubString=function(){return""},Bi.stubTrue=function(){return!0},Bi.multiply=xl,Bi.nth=function(e,t){return e&&e.length?qr(e,po(t)):i},Bi.noConflict=function(){return pt._===this&&(pt._=Oe),this},Bi.noop=sl,Bi.now=ws,Bi.pad=function(e,t,i){e=go(e);var r=(t=po(t))?ci(e):0;if(!t||r>=t)return e;var n=(t-r)/2;return zn(dt(n),i)+e+zn(ut(n),i)},Bi.padEnd=function(e,t,i){e=go(e);var r=(t=po(t))?ci(e):0;return t&&r<t?e+zn(t-r,i):e},Bi.padStart=function(e,t,i){e=go(e);var r=(t=po(t))?ci(e):0;return t&&r<t?zn(t-r,i)+e:e},Bi.parseInt=function(e,t,i){return i||null==t?t=0:t&&(t=+t),yi(go(e).replace(ie,""),t||0)},Bi.random=function(e,t,r){if(r&&"boolean"!=typeof r&&va(e,t,r)&&(t=r=i),r===i&&("boolean"==typeof t?(r=t,t=i):"boolean"==typeof e&&(r=e,e=i)),e===i&&t===i?(e=0,t=1):(e=ho(e),t===i?(t=e,e=0):t=ho(t)),e>t){var n=e;e=t,t=n}if(r||e%1||t%1){var a=bi();return gi(e+a*(t-e+ot("1e-"+((a+"").length-1))),t)}return Wr(e,t)},Bi.reduce=function(e,t,i){var r=Ns(e)?It:Wt,n=arguments.length<3;return r(e,sa(t,4),i,n,cr)},Bi.reduceRight=function(e,t,i){var r=Ns(e)?Ft:Wt,n=arguments.length<3;return r(e,sa(t,4),i,n,hr)},Bi.repeat=function(e,t,r){return t=(r?va(e,t,r):t===i)?1:po(t),Gr(go(e),t)},Bi.replace=function(){var e=arguments,t=go(e[0]);return e.length<3?t:t.replace(e[1],e[2])},Bi.result=function(e,t,r){var n=-1,a=(t=vn(t,e)).length;for(a||(a=1,e=i);++n<a;){var s=null==e?i:e[Fa(t[n])];s===i&&(n=a,s=r),e=Ys(s)?s.call(e):s}return e},Bi.round=_l,Bi.runInContext=e,Bi.sample=function(e){return(Ns(e)?Yi:Yr)(e)},Bi.size=function(e){if(null==e)return 0;if(Vs(e))return no(e)?ci(e):e.length;var t=ua(e);return t==_||t==E?e.size:Ir(e).length},Bi.snakeCase=Wo,Bi.some=function(e,t,r){var n=Ns(e)?jt:tn;return r&&va(e,t,r)&&(t=i),n(e,sa(t,3))},Bi.sortedIndex=function(e,t){return rn(e,t)},Bi.sortedIndexBy=function(e,t,i){return nn(e,t,sa(i,2))},Bi.sortedIndexOf=function(e,t){var i=null==e?0:e.length;if(i){var r=rn(e,t);if(r<i&&Bs(e[r],t))return r}return-1},Bi.sortedLastIndex=function(e,t){return rn(e,t,!0)},Bi.sortedLastIndexBy=function(e,t,i){return nn(e,t,sa(i,2),!0)},Bi.sortedLastIndexOf=function(e,t){if(null!=e&&e.length){var i=rn(e,t,!0)-1;if(Bs(e[i],t))return i}return-1},Bi.startCase=Go,Bi.startsWith=function(e,t,i){return e=go(e),i=null==i?0:nr(po(i),0,e.length),t=on(t),e.slice(i,i+t.length)==t},Bi.subtract=Sl,Bi.sum=function(e){return e&&e.length?Gt(e,tl):0},Bi.sumBy=function(e,t){return e&&e.length?Gt(e,sa(t,2)):0},Bi.template=function(e,t,r){var n=Bi.templateSettings;r&&va(e,t,r)&&(t=i),e=go(e),t=bo({},t,n,Xn);var a,s,o=bo({},t.imports,n.imports,Xn),l=Ao(o),c=Xt(o,l),h=0,p=t.interpolate||ye,u="__p += '",d=Pe((t.escape||ye).source+"|"+p.source+"|"+(p===X?he:ye).source+"|"+(t.evaluate||ye).source+"|$","g"),f="//# sourceURL="+(Ie.call(t,"sourceURL")?(t.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++rt+"]")+"\n";e.replace(d,function(t,i,r,n,o,l){return r||(r=n),u+=e.slice(h,l).replace(be,ii),i&&(a=!0,u+="' +\n__e("+i+") +\n'"),o&&(s=!0,u+="';\n"+o+";\n__p += '"),r&&(u+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),h=l+t.length,t}),u+="';\n";var m=Ie.call(t,"variable")&&t.variable;if(m){if(le.test(m))throw new _e("Invalid `variable` option passed into `_.template`")}else u="with (obj) {\n"+u+"\n}\n";u=(s?u.replace(N,""):u).replace(z,"$1").replace(V,"$1;"),u="function("+(m||"obj")+") {\n"+(m?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(a?", __e = _.escape":"")+(s?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+u+"return __p\n}";var g=Xo(function(){return Se(l,f+"return "+u).apply(i,c)});if(g.source=u,Us(g))throw g;return g},Bi.times=function(e,t){if((e=po(e))<1||e>h)return[];var i=u,r=gi(e,u);t=sa(t),e-=u;for(var n=Ut(r,t);++i<e;)t(i);return n},Bi.toFinite=ho,Bi.toInteger=po,Bi.toLength=uo,Bi.toLower=function(e){return go(e).toLowerCase()},Bi.toNumber=fo,Bi.toSafeInteger=function(e){return e?nr(po(e),-9007199254740991,h):0===e?e:0},Bi.toString=go,Bi.toUpper=function(e){return go(e).toUpperCase()},Bi.trim=function(e,t,r){if((e=go(e))&&(r||t===i))return Yt(e);if(!e||!(t=on(t)))return e;var n=hi(e),a=hi(t);return bn(n,Jt(n,a),Qt(n,a)+1).join("")},Bi.trimEnd=function(e,t,r){if((e=go(e))&&(r||t===i))return e.slice(0,pi(e)+1);if(!e||!(t=on(t)))return e;var n=hi(e);return bn(n,0,Qt(n,hi(t))+1).join("")},Bi.trimStart=function(e,t,r){if((e=go(e))&&(r||t===i))return e.replace(ie,"");if(!e||!(t=on(t)))return e;var n=hi(e);return bn(n,Jt(n,hi(t))).join("")},Bi.truncate=function(e,t){var r=30,n="...";if(Zs(t)){var a="separator"in t?t.separator:a;r="length"in t?po(t.length):r,n="omission"in t?on(t.omission):n}var s=(e=go(e)).length;if(ri(e)){var o=hi(e);s=o.length}if(r>=s)return e;var l=r-ci(n);if(l<1)return n;var c=o?bn(o,0,l).join(""):e.slice(0,l);if(a===i)return c+n;if(o&&(l+=c.length-l),io(a)){if(e.slice(l).search(a)){var h,p=c;for(a.global||(a=Pe(a.source,go(pe.exec(a))+"g")),a.lastIndex=0;h=a.exec(p);)var u=h.index;c=c.slice(0,u===i?l:u)}}else if(e.indexOf(on(a),l)!=l){var d=c.lastIndexOf(a);d>-1&&(c=c.slice(0,d))}return c+n},Bi.unescape=function(e){return(e=go(e))&&G.test(e)?e.replace(H,ui):e},Bi.uniqueId=function(e){var t=++Fe;return go(e)+t},Bi.upperCase=Uo,Bi.upperFirst=Yo,Bi.each=ms,Bi.eachRight=gs,Bi.first=Va,al(Bi,(ml={},vr(Bi,function(e,t){Ie.call(Bi.prototype,t)||(ml[t]=e)}),ml),{chain:!1}),Bi.VERSION="4.17.23",Pt(["bind","bindKey","curry","curryRight","partial","partialRight"],function(e){Bi[e].placeholder=Bi}),Pt(["drop","take"],function(e,t){Ni.prototype[e]=function(r){r=r===i?1:mi(po(r),0);var n=this.__filtered__&&!t?new Ni(this):this.clone();return n.__filtered__?n.__takeCount__=gi(r,n.__takeCount__):n.__views__.push({size:gi(r,u),type:e+(n.__dir__<0?"Right":"")}),n},Ni.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}}),Pt(["filter","map","takeWhile"],function(e,t){var i=t+1,r=1==i||3==i;Ni.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:sa(e,3),type:i}),t.__filtered__=t.__filtered__||r,t}}),Pt(["head","last"],function(e,t){var i="take"+(t?"Right":"");Ni.prototype[e]=function(){return this[i](1).value()[0]}}),Pt(["initial","tail"],function(e,t){var i="drop"+(t?"":"Right");Ni.prototype[e]=function(){return this.__filtered__?new Ni(this):this[i](1)}}),Ni.prototype.compact=function(){return this.filter(tl)},Ni.prototype.find=function(e){return this.filter(e).head()},Ni.prototype.findLast=function(e){return this.reverse().find(e)},Ni.prototype.invokeMap=Ur(function(e,t){return"function"==typeof e?new Ni(this):this.map(function(i){return kr(i,e,t)})}),Ni.prototype.reject=function(e){return this.filter(Ms(sa(e)))},Ni.prototype.slice=function(e,t){e=po(e);var r=this;return r.__filtered__&&(e>0||t<0)?new Ni(r):(e<0?r=r.takeRight(-e):e&&(r=r.drop(e)),t!==i&&(r=(t=po(t))<0?r.dropRight(-t):r.take(t-e)),r)},Ni.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},Ni.prototype.toArray=function(){return this.take(u)},vr(Ni.prototype,function(e,t){var r=/^(?:filter|find|map|reject)|While$/.test(t),n=/^(?:head|last)$/.test(t),a=Bi[n?"take"+("last"==t?"Right":""):t],s=n||/^find/.test(t);a&&(Bi.prototype[t]=function(){var t=this.__wrapped__,o=n?[1]:arguments,l=t instanceof Ni,c=o[0],h=l||Ns(t),p=function(e){var t=a.apply(Bi,Mt([e],o));return n&&u?t[0]:t};h&&r&&"function"==typeof c&&1!=c.length&&(l=h=!1);var u=this.__chain__,d=!!this.__actions__.length,f=s&&!u,m=l&&!d;if(!s&&h){t=m?t:new Ni(this);var g=e.apply(t,o);return g.__actions__.push({func:hs,args:[p],thisArg:i}),new qi(g,u)}return f&&m?e.apply(this,o):(g=this.thru(p),f?n?g.value()[0]:g.value():g)})}),Pt(["pop","push","shift","sort","splice","unshift"],function(e){var t=$e[e],i=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",r=/^(?:pop|shift)$/.test(e);Bi.prototype[e]=function(){var e=arguments;if(r&&!this.__chain__){var n=this.value();return t.apply(Ns(n)?n:[],e)}return this[i](function(i){return t.apply(Ns(i)?i:[],e)})}}),vr(Ni.prototype,function(e,t){var i=Bi[t];if(i){var r=i.name+"";Ie.call($i,r)||($i[r]=[]),$i[r].push({name:t,func:i})}}),$i[On(i,2).name]=[{name:"wrapper",func:i}],Ni.prototype.clone=function(){var e=new Ni(this.__wrapped__);return e.__actions__=kn(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=kn(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=kn(this.__views__),e},Ni.prototype.reverse=function(){if(this.__filtered__){var e=new Ni(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},Ni.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,i=Ns(e),r=t<0,n=i?e.length:0,a=function(e,t,i){for(var r=-1,n=i.length;++r<n;){var a=i[r],s=a.size;switch(a.type){case"drop":e+=s;break;case"dropRight":t-=s;break;case"take":t=gi(t,e+s);break;case"takeRight":e=mi(e,t-s)}}return{start:e,end:t}}(0,n,this.__views__),s=a.start,o=a.end,l=o-s,c=r?o:s-1,h=this.__iteratees__,p=h.length,u=0,d=gi(l,this.__takeCount__);if(!i||!r&&n==l&&d==l)return un(e,this.__actions__);var f=[];e:for(;l--&&u<d;){for(var m=-1,g=e[c+=t];++m<p;){var v=h[m],y=v.iteratee,b=v.type,x=y(g);if(2==b)g=x;else if(!x){if(1==b)continue e;break e}}f[u++]=g}return f},Bi.prototype.at=ps,Bi.prototype.chain=function(){return cs(this)},Bi.prototype.commit=function(){return new qi(this.value(),this.__chain__)},Bi.prototype.next=function(){this.__values__===i&&(this.__values__=co(this.value()));var e=this.__index__>=this.__values__.length;return{done:e,value:e?i:this.__values__[this.__index__++]}},Bi.prototype.plant=function(e){for(var t,r=this;r instanceof Li;){var n=Ra(r);n.__index__=0,n.__values__=i,t?a.__wrapped__=n:t=n;var a=n;r=r.__wrapped__}return a.__wrapped__=e,t},Bi.prototype.reverse=function(){var e=this.__wrapped__;if(e instanceof Ni){var t=e;return this.__actions__.length&&(t=new Ni(this)),(t=t.reverse()).__actions__.push({func:hs,args:[Za],thisArg:i}),new qi(t,this.__chain__)}return this.thru(Za)},Bi.prototype.toJSON=Bi.prototype.valueOf=Bi.prototype.value=function(){return un(this.__wrapped__,this.__actions__)},Bi.prototype.first=Bi.prototype.head,Ke&&(Bi.prototype[Ke]=function(){return this}),Bi}();dt?((dt.exports=di)._=di,ut._=di):pt._=di}.call(lodash)),lodash$1.exports;var e,t}var lodashExports=requireLodash(),_=getDefaultExportFromCjs(lodashExports);function BeeArrowDiff({id:e,className:t,value:i,tooltip:r,disabled:n,decimals:a,isRoot:s=!1,locale:o="de-DE"}){const l=null!=e?e:libExports.useId(1,"bee-arrow-diff-")[0],c=n?" disabled":"";let h="";switch(!0){case null==i:break;case i<=-.5:h="bee-arrow bee-arrow-dive";break;case i>-.5&&i<0:h="bee-arrow-dip";break;case 0===i:h="bee-arrow-steady";break;case i>0&&i<.5:h="bee-arrow-bump";break;case i>=.5:h="bee-arrow-jump";break;default:h="bee-arrow-steady"}return require$$0.jsx("div",{className:null!=t?t:"",children:s||!i&&0!==i?null:require$$0.jsxs(require$$0.Fragment,{children:[require$$0.jsxs("div",{id:l,className:"bee-arrow-diff "+h+c,children:[require$$0.jsx("div",{className:"bee-arrow-diff-icon",children:require$$0.jsx("i",{className:"icon-right-arrow bee-arrow"})}),require$$0.jsxs("div",{className:"bee-arrow-diff-text",children:[new Intl.NumberFormat(o,{style:"decimal",maximumFractionDigits:a||0}).format(100*i),"%"]})]}),r&&!n?require$$0.jsx(tooltip.Tooltip,{target:".bee-arrow-diff",children:r}):null]})})}function BeeAddEntryCard({id:e,className:t,disabled:i,footer:r,onClick:n}){const a=null!=e?e:libExports.useId(1,"bee-add-entry-card-")[0],s="bee-add-entry-card"+(t?" "+t:"");return require$$0.jsxs("div",{id:a,className:s,children:[require$$0.jsx(BeeIconButton,{iconClass:"pi pi-plus",rounded:!0,halfRounded:!1,disabled:null!=i&&i,type:"primary",isLoading:!1,onClick:e=>function(e){!i&&n&&n(e)}(e)}),r&&require$$0.jsx("div",{className:"bee-add-entry-card-footer",children:r})]})}var extendStatics=function(e,t){return extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])},extendStatics(e,t)};function __extends(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function i(){this.constructor=e}extendStatics(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)}var __assign=function(){return __assign=Object.assign||function(e){for(var t,i=1,r=arguments.length;i<r;i++)for(var n in t=arguments[i])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e},__assign.apply(this,arguments)};function __awaiter(e,t,i,r){return new(i||(i=Promise))(function(n,a){function s(e){try{l(r.next(e))}catch(e){a(e)}}function o(e){try{l(r.throw(e))}catch(e){a(e)}}function l(e){var t;e.done?n(e.value):(t=e.value,t instanceof i?t:new i(function(e){e(t)})).then(s,o)}l((r=r.apply(e,t||[])).next())})}function BeeSkeleton({id:e,className:t,shape:i="rectangle",size:r,width:n,height:a,borderRadius:s,animated:o=!0,showHover:l,showShade:c}){const h=null!=e?e:libExports.useId(1,"bee-skeleton-")[0],p=o?"wave":"none",u=l?" bee-skeleto--hover":"",d=c?" bee-skeleton--shade":"",f="bee-skeleton-circle"+u+d+(t?" "+t:""),m="bee-skeleton-rectangle"+u+d+(t?" "+t:""),g=require$$0.jsx(skeleton.Skeleton,{className:f,id:h,shape:"circle",size:r,animation:p,borderRadius:s}),v=require$$0.jsx(skeleton.Skeleton,{className:m,id:h,shape:"rectangle",animation:p,width:n,height:a,borderRadius:s});return"circle"===i?g:v}function BeeImage({id:e,className:t,url:i,showPlaceholder:r,secured:n=!1,secureKey:a,alt:s,title:o,titlePosition:l="left",copyright:c,onClick:h}){const p=null!=e?e:libExports.useId(1,"bee-img-")[0],u=p+"-pay",d="left"===l?" bee-img-title bee-img-title-left":"center"===l?" bee-img-title bee-img-title-center":"right"===l?" bee-img-title bee-img-title-right":" bee-img-title bee-img-title-left",f="bee-img"+(t?" "+t:""),m="100%",g="100%";function v(e,t,i){return __awaiter(this,void 0,void 0,function*(){const r=yield function(e,t){let i=new Headers;return i.set("x-bee-secure",t),fetch(e,{headers:i})}(t,i),n=yield r.blob(),a=URL.createObjectURL(n),s=document.getElementById(e);s&&(s.src=a)})}return require$$0.jsxs("div",{id:p,onClick:e=>function(e){h&&h(e)}(e),className:f,children:[o?require$$0.jsx("div",{className:d,children:o}):null,r?require$$0.jsx(BeeSkeleton,{shape:"rectangle",animated:!0,width:"100%",height:"100px"}):n&&a?(v(u,i,a),require$$0.jsx("img",{id:u,src:"",alt:s,width:m,height:g})):require$$0.jsx("img",{id:u,src:i,alt:s,width:m,height:g}),c?require$$0.jsx("footer",{className:"bee-img-copyright",children:require$$0.jsx("small",{children:c})}):null]})}function BeeAvatar({imageUrl:e,imageKey:t,imageAlt:i,isImageSecured:r,showPlaceholder:n,placeholderFirstname:a,placeholderLastname:s,size:o,type:l,showDelete:c,readOnly:h,disabled:p,onDelete:u,onClick:d,onAdd:f}){const m="bee-avatar"+("primary"===l?" bee-avatar--primary":"secondary"===l?" bee-avatar--secondary":" bee-avatar--light")+("xSmall"===o?" bee-avatar--xsmall":"small"===o?" bee-avatar--small":"medium"===o?" bee-avatar--medium":"large"===o?" bee-avatar--large":"xLarge"===o?" bee-avatar--xlarge":" bee-avatar--medium");return require$$0.jsx(require$$0.Fragment,{children:n?require$$0.jsx(card.Card,{className:m+" placeholder-avatar",children:a||s?require$$0.jsx("div",{className:"placeholder-avatar__initials",children:(a?a.substring(0,1):"")+(s?s.substring(0,1):"")}):require$$0.jsx("i",{className:"pi pi-user placeholder-avatar__icon"})}):require$$0.jsx(require$$0.Fragment,{children:e?require$$0.jsxs(card.Card,{className:m+" image-avatar",children:[require$$0.jsx(BeeImage,{url:e,alt:i,title:void 0,titlePosition:"left",copyright:void 0,secured:!0===r,showPlaceholder:!1,onClick:e=>function(e){null==d||d(e)}(e)},t),c&&!h?require$$0.jsx(BeeIconButton,{iconClass:"pi pi-trash",rounded:!0,disabled:!1,type:"danger",isLoading:!1,onClick:()=>{null==u||u()}}):null]}):require$$0.jsx(card.Card,{className:m+" empty-avatar",children:require$$0.jsx(BeeAddEntryCard,{disabled:p,onClick:e=>function(e){null==f||f(e)}(e)})})})})}function BeeChip({id:e,className:t,label:i,labelTemplate:r,iconClass:n,image:a,imageAlt:s,removable:o,type:l="primary",onRemove:c,onClick:h}){const p=null!=e?e:libExports.useId(1,"bee-chip-")[0],u=(h?"bee-chip-clickable ":"")+("primary"===l?"bee-chip bee-chip-primary":"secondary"===l?"bee-chip bee-chip-secondary":"valid"===l?"bee-chip bee-chip-valid":"info"===l?"bee-chip bee-chip-info":"warn"===l?"bee-chip bee-chip-warn":"error"===l?"bee-chip bee-chip-error":"surface"===l?"bee-chip bee-chip-surface":"bee-chip bee-chip-primary")+(t?" "+t:"");return require$$0.jsxs("div",{className:u,children:[o?require$$0.jsx("div",{className:"bee-chip-remove-btn",onClick:e=>function(e){c&&c(e)}(e),children:require$$0.jsx("i",{className:"pi pi-times-circle"})}):null,require$$0.jsx("div",{onClick:e=>function(e){h&&h(e)}(e),children:require$$0.jsx(chip.Chip,{id:p,label:null!=i?i:"",template:r,icon:n,image:a,imageAlt:s,className:"bee-chip-content",removable:null!=o&&o,onRemove:e=>(c&&c(e),!0)})})]})}function BeeChipArea({id:e,className:t,label:i,type:r="primary",data:n,required:a,readOnly:s,onClick:o,onRemove:l}){const c=null!=e?e:libExports.useId(1,"bee-chip-area-")[0],h="bee-chip-area"+("primary"===r?" bee-chip-area-primary":"secondary"===r?" bee-chip-area-secondary":" bee-chip-area-primary")+(s?" bee-chip-area-readOnly":"")+(t?" "+t:"");return require$$0.jsxs("div",{id:c,className:h,children:[require$$0.jsx(require$$0.Fragment,{children:s&&!n||s&&n.length<1||!n||n.length<1?require$$0.jsx(BeePlaceholder,{id:c,label:null!=i?i:""}):require$$0.jsx(require$$0.Fragment,{children:n.map(e=>{var t;return require$$0.jsx("div",{className:"bee-chip-area-chip",children:require$$0.jsx(BeeChip,{id:e.id,label:null!==(t=e.label)&&void 0!==t?t:"",labelTemplate:e.labelTemplate,removable:!s||!s&&e.removable,onRemove:t=>function(e,t){l&&l(e,t)}(t,e.id),onClick:t=>function(e,t){o&&o(e,t)}(t,e.id)})},e.id)})})}),i?require$$0.jsxs("label",{className:"bee-chip-area-label",children:[i,a?require$$0.jsx("span",{className:"bee-chip-area-label-required",children:require$$0.jsx("span",{className:"bee-chip-area-label-required-star",children:" *"})}):null]}):null]})}function BeeDivider({id:e,className:t,label:i,iconClass:r,border:n="solid",orientation:a="horizontal",align:s="center",type:o="default"}){const l=null!=e?e:libExports.useId(1,"bee-divider-")[0],c=r?r+" mr-2":void 0;let h="";h=i||r?" bee-divider-content":" bee-divider-nocontent";const p=("primary"===o?"bee-divider bee-divider-primary":"secondary"===o?"bee-divider-secondary":"bee-divider-default")+h+(t?" "+t:"");return require$$0.jsx(divider.Divider,{id:l,type:n,align:s,className:p,layout:a,children:i||r?require$$0.jsxs("div",{className:"inline-flex align-items-center bee-divider-label",children:[c?require$$0.jsx("i",{className:c}):null,i?require$$0.jsx("b",{children:i}):null]}):null})}function BeeLoadingBar({id:e,className:t,value:i,indeterminate:r=!1,type:n="primary",showValue:a,unit:s}){const o=null!=e?e:libExports.useId(1,"bee-loading-bar-")[0],l="primary"===n?"bee-loadingbar-primary":"secondary"===n?"bee-loadingbar-secondary":"bee-loadingbar-primary"+(t?" "+t:"");return require$$0.jsx(progressbar.ProgressBar,{id:o,value:i,className:l,mode:r?"indeterminate":"determinate",showValue:a,unit:s})}function BeeLoadingSpinner({id:e,className:t,strokeWidth:i="2",animationDuration:r="4s",type:n="primary",size:a}){const s=null!=e?e:libExports.useId(1,"bee-loading-spinner-")[0],o="primary"===n?"bee-loading-spinner-primary":"secondary"===n?"bee-loading-spinner-secondary":"mixed"===n?"bee-loading-spinner-mixed":"bee-loading-spinner-primary"+(t?" "+t:""),l=a?{width:a,height:a}:void 0;return require$$0.jsx(progressspinner.ProgressSpinner,{className:o,id:s,strokeWidth:i,animationDuration:r,style:l})}function BeeSlider({id:e,className:t,value:i,min:r=0,max:n=100,step:a=1,disabled:s,orientation:o="horizontal",type:l="primary",onChange:c,onSlideEnd:h}){const p=null!=e?e:libExports.useId(1,"bee-slider-")[0],u="primary"===l?"bee-slider-primary":"secondary"===l?"bee-slider-secondary":"bee-slider-primary"+(t?" "+t:"");return require$$0.jsx(slider.Slider,{id:p,value:i,min:r,max:n,step:a,className:u,disabled:null!=s&&s,orientation:o,onChange:e=>function(e){!s&&c&&c(e)}(e),onSlideEnd:e=>function(e){!s&&h&&h(e)}(e)})}"function"==typeof SuppressedError&&SuppressedError;var dist={},hasRequiredDist;function requireDist(){if(hasRequiredDist)return dist;hasRequiredDist=1,Object.defineProperty(dist,"__esModule",{value:!0});var e=require$$0,t=React,i=function(){return i=Object.assign||function(e){for(var t,i=1,r=arguments.length;i<r;i++)for(var n in t=arguments[i])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e},i.apply(this,arguments)};function r(e,t,i){for(var r,n=0,a=t.length;n<a;n++)!r&&n in t||(r||(r=Array.prototype.slice.call(t,0,n)),r[n]=t[n]);return e.concat(r||Array.prototype.slice.call(t))}function n(t){var r=t.size,n=void 0===r?25:r,a=t.SVGstrokeColor,s=void 0===a?"currentColor":a,o=t.SVGstorkeWidth,l=void 0===o?0:o,c=t.SVGclassName,h=void 0===c?"star-svg":c,p=t.SVGstyle;return e.jsx("svg",i({className:h,style:p,stroke:s,fill:"currentColor",strokeWidth:l,viewBox:"0 0 24 24",width:n,height:n,xmlns:"http://www.w3.org/2000/svg"},{children:e.jsx("path",{d:"M12 17.27L18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21z"})}))}function a(e,t){switch(t.type){case"PointerMove":return i(i({},e),{hoverValue:t.payload,hoverIndex:t.index});case"PointerLeave":return i(i({},e),{ratingValue:e.ratingValue,hoverIndex:0,hoverValue:null});case"MouseClick":return i(i({},e),{valueIndex:e.hoverIndex,ratingValue:t.payload});default:return e}}function s(){return"undefined"!=typeof window&&window.matchMedia("(pointer: coarse)").matches||"ontouchstart"in window||"undefined"!=typeof navigator&&navigator.maxTouchPoints>0}return function(e,t){void 0===t&&(t={});var i=t.insertAt;if("undefined"!=typeof document){var r=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css","top"===i&&r.firstChild?r.insertBefore(n,r.firstChild):r.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}}(".style-module_starRatingWrap__q-lJC{display:inline-block;touch-action:none}.style-module_simpleStarRating__nWUxf{display:inline-block;overflow:hidden;position:relative;touch-action:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;vertical-align:middle;white-space:nowrap}.style-module_fillIcons__6---A{display:inline-block;overflow:hidden;position:absolute;top:0;white-space:nowrap}.style-module_emptyIcons__Bg-FZ{display:inline-block}.style-module_tooltip__tKc3i{background-color:#333;border-radius:5px;color:#fff;display:inline-block;padding:5px 15px;vertical-align:middle}"),dist.Rating=function(o){var l,c,h=o.onClick,p=o.onPointerMove,u=o.onPointerEnter,d=o.onPointerLeave,f=o.initialValue,m=void 0===f?0:f,g=o.iconsCount,v=void 0===g?5:g,y=o.size,b=void 0===y?40:y,x=o.readonly,_=void 0!==x&&x,S=o.rtl,w=void 0!==S&&S,C=o.customIcons,P=void 0===C?[]:C,E=o.allowFraction,k=void 0!==E&&E,$=o.style,A=o.className,T=void 0===A?"react-simple-star-rating":A,D=o.transition,M=void 0!==D&&D,I=o.allowHover,F=void 0===I||I,j=o.disableFillHover,R=void 0!==j&&j,B=o.fillIcon,O=void 0===B?null:B,L=o.fillColor,q=void 0===L?"#ffbc0b":L,N=o.fillColorArray,z=void 0===N?[]:N,V=o.fillStyle,H=o.fillClassName,W=void 0===H?"filled-icons":H,G=o.emptyIcon,U=void 0===G?null:G,Y=o.emptyColor,K=void 0===Y?"#cccccc":Y,X=o.emptyStyle,Z=o.emptyClassName,J=void 0===Z?"empty-icons":Z,Q=o.allowTitleTag,ee=void 0===Q||Q,te=o.showTooltip,ie=void 0!==te&&te,re=o.tooltipDefaultText,ne=void 0===re?"Your Rate":re,ae=o.tooltipArray,se=void 0===ae?[]:ae,oe=o.tooltipStyle,le=o.tooltipClassName,ce=void 0===le?"react-simple-star-rating-tooltip":le,he=o.SVGclassName,pe=void 0===he?"star-svg":he,ue=o.titleSeparator,de=void 0===ue?"out of":ue,fe=o.SVGstyle,me=o.SVGstorkeWidth,ge=void 0===me?0:me,ve=o.SVGstrokeColor,ye=void 0===ve?"currentColor":ve,be=t.useReducer(a,{hoverIndex:0,valueIndex:0,ratingValue:m,hoverValue:null}),xe=be[0],_e=xe.ratingValue,Se=xe.hoverValue,we=xe.hoverIndex,Ce=xe.valueIndex,Pe=be[1];t.useEffect(function(){m&&Pe({type:"MouseClick",payload:0})},[m]);var Ee=t.useMemo(function(){return k?2*v:v},[k,v]),ke=t.useMemo(function(){return m>Ee?0:k||Math.floor(m)===m?Math.round(m/v*100):2*Math.ceil(m)*10},[k,m,v,Ee]),$e=t.useMemo(function(){return(k?2*m-1:m-1)||0},[k,m]),Ae=t.useCallback(function(e){return v%2!=0?e/2/10:e*v/100},[v]),Te=function(e){for(var t=e.clientX,i=e.currentTarget.children[0].getBoundingClientRect(),r=i.left,n=i.right,a=i.width,s=w?n-t:t-r,o=Ee,l=Math.round(a/Ee),c=0;c<=Ee;c+=1)if(s<=l*c){o=0===c&&s<l?0:c;break}var h=o-1;o>0&&(Pe({type:"PointerMove",payload:100*o/Ee,index:h}),p&&Se&&p(Ae(Se),h,e))},De=function(e){Se&&(Pe({type:"MouseClick",payload:Se}),h&&h(Ae(Se),we,e))},Me=t.useMemo(function(){if(F){if(R){var e=_e&&_e||ke;return Se&&Se>e?Se:e}return Se&&Se||_e&&_e||ke}return _e&&_e||ke},[F,R,Se,_e,ke]);t.useEffect(function(){se.length>Ee&&console.error("tooltipArray Array length is bigger then Icons Count length.")},[se.length,Ee]);var Ie=t.useCallback(function(e){return Se&&e[we]||_e&&e[Ce]||m&&e[$e]},[Se,we,_e,Ce,m,$e]),Fe=t.useMemo(function(){return Se&&Ae(Se)||_e&&Ae(_e)||m&&Ae(ke)},[Se,Ae,_e,m,ke]);return e.jsxs("span",i({className:"style-module_starRatingWrap__q-lJC",style:{direction:"".concat(w?"rtl":"ltr")}},{children:[e.jsxs("span",i({className:"".concat("style-module_simpleStarRating__nWUxf"," ").concat(T),style:i({cursor:_?"":"pointer"},$),onPointerMove:_?void 0:Te,onPointerEnter:_?void 0:function(e){u&&u(e),s()&&Te(e)},onPointerLeave:_?void 0:function(e){s()&&De(),Pe({type:"PointerLeave"}),d&&d(e)},onClick:_?void 0:De,"aria-hidden":"true"},{children:[e.jsx("span",i({className:"".concat("style-module_emptyIcons__Bg-FZ"," ").concat(J),style:i({color:K},X)},{children:r([],Array(v)).map(function(i,r){var a;return e.jsx(t.Fragment,{children:(null===(a=P[r])||void 0===a?void 0:a.icon)||U||e.jsx(n,{SVGclassName:pe,SVGstyle:fe,SVGstorkeWidth:ge,SVGstrokeColor:ye,size:b})},r)})})),e.jsx("span",i({className:"".concat("style-module_fillIcons__6---A"," ").concat(W),style:i((l={},l[w?"right":"left"]=0,l.color=Ie(z)||q,l.transition=M?"width .2s ease, color .2s ease":"",l.width="".concat(Me,"%"),l),V),title:ee?"".concat(Fe," ").concat(de," ").concat(v):void 0},{children:r([],Array(v)).map(function(i,r){var a;return e.jsx(t.Fragment,{children:(null===(a=P[r])||void 0===a?void 0:a.icon)||O||e.jsx(n,{SVGclassName:pe,SVGstyle:fe,SVGstorkeWidth:ge,SVGstrokeColor:ye,size:b})},r)})}))]})),ie&&e.jsx("span",i({className:"".concat("style-module_tooltip__tKc3i"," ").concat(ce),style:i((c={},c[w?"marginRight":"marginLeft"]=20,c),oe)},{children:(se.length>0?Ie(se):Fe)||ne}))]}))},dist}var distExports=requireDist();function BeeStarBar({id:e,className:t,value:i,stars:r,disabled:n,readOnly:a,type:s="primary",size:o=40,onChange:l}){const c=null!=e?e:libExports.useId(1,"bee-starbar-")[0],h="bee-starbar "+("primary"===s?"bee-starbar-primary":"secondary"===s?"bee-starbar-secondary":"bee-starbar-primary")+(a?" bee-starbar-readonly":"")+(n?" bee-starbar-disabled":"")+(t?" "+t:"");return require$$0.jsx("div",{id:c,children:require$$0.jsx(distExports.Rating,{initialValue:(console.log(i/r*100),i/r*100),iconsCount:r,readonly:!(!a&&!n),className:h,allowFraction:!0,size:o,showTooltip:!1,tooltipClassName:"starbar-rating-tooltip",tooltipStyle:{visibility:"hidden",display:"none"},fillColor:n?"var(--surface-500)":"primary"===s?"var(--primary-color)":"secondary"===s?"var(--secondary-color)":"var(--primary-color)",emptyColor:n?"var(--surface-300)":"var(--surface-500)",onClick:e=>function(e){l&&l(e)}(e)})})}function BeeCopyInput({id:e,className:t,label:i,value:r,disabled:n,iconClass:a}){const s=null!=e?e:libExports.useId(1,"bee-copy-input-")[0],o="bee-copy-input-link"+(t?" "+t:"");return require$$0.jsx("div",{className:"bee-copy-input",children:require$$0.jsx(require$$0.Fragment,{children:r?require$$0.jsxs("div",{className:o,onClick:()=>{r&&navigator.clipboard.writeText(r)},children:[require$$0.jsx(BeeTextInput,{id:s+"input",label:i,value:r,disabled:null!=n&&n,formstate:"neutral",readOnly:!0,required:!1}),require$$0.jsx("i",{className:a+" icon"})]}):require$$0.jsx(BeePlaceholder,{id:s,label:null!=i?i:""})})})}function BeeVisibleItemCount({id:e,className:t,visibleData:i,allData:r,isLoading:n}){const a="bee-visible-item-count"+(n?" isLoading":"")+(t?" "+t:"");return require$$0.jsx("div",{id:e,className:a,children:function(e,t){return e&&e.length>0&&t&&t.length>0&&!n?require$$0.jsx(require$$0.Fragment,{children:e.length+" / "+t.length}):require$$0.jsx(require$$0.Fragment,{children:"– / –"})}(i,r)})}function BeeBreadcrumb({id:e,className:t,border:i,items:r,type:n="default",isLoading:a}){const s=null!=e?e:libExports.useId(1,"bee-breadcrumb-")[0],o="bee-breadcrumb "+("primary"===n?"bee-breadcrumb-primary":"secondary"===n?"bee-breadcrumb-secondary":"bee-breadcrumb-default")+(i?"":" bee-breadcrumb-no-border")+(t?" "+t:"");return a?require$$0.jsx(BeeSkeleton,{shape:"rectangle",size:"20",width:"180",height:"20",animated:!0}):require$$0.jsx("div",{id:s,className:o,children:require$$0.jsx(breadcrumb.BreadCrumb,{model:_.drop(r,1),home:r[0]})})}function BeeTabview({id:e,className:t,type:i="default",tabs:r,activeIndex:n,onChangeIndex:a}){const s=null!=e?e:libExports.useId(1,"bee-tabview-")[0],o="bee-tabview"+("primary"===i?" bee-tabview-primary":"secondary"===i?" bee-tabview-secondary":" bee-tabview-default")+(t?" "+t:"");return require$$0.jsx("div",{id:s,className:o,children:require$$0.jsx(tabview.TabView,{activeIndex:n,onTabChange:e=>function(e){a&&a(e)}(e),scrollable:!0,children:r.map(e=>require$$0.jsx(tabview.TabPanel,{header:e.title,disabled:e.disabled},"tab_"+e.title))})})}const enter=13,escape=27,ENTER_KEY="Enter";function BeeCheckbox({id:e,className:t,label:i,value:r,disabled:n,statusLabel:a,type:s="primary",formstate:o="neutral",stateTrue:l="Ja",stateFalse:c="Nein",required:h,readOnly:p,tooltip:u,tooltipOptions:d,onChange:f}){const m=null!=e?e:libExports.useId(1,"bee-checkbox-")[0],g=m+"input",v="primary"===s?" bee-checkbox-primary":"secondary"===s?" bee-checkbox-secondary":" bee-checkbox-primary";let y="";p&&(y=" bee-checkbox-readOnly",n=!0);const b="bee-checkbox "+("valid"===o?" bee-checkbox-valid":"error"===o?" bee-checkbox-error":"neutral"===o?" bee-checkbox-neutral":"none"===o?" bee-checkbox-field-neutral":" bee-checkbox-neutral")+y+(n?" bee-checkbox-disabled":"")+v;return require$$0.jsxs("div",{className:null!=t?t:"",title:u,children:[require$$0.jsxs("span",{id:m,className:b,onKeyDown:e=>{!function(e){e.stopPropagation(),e.key===ENTER_KEY&&f&&f({checked:!r})}(e)},children:[require$$0.jsxs("label",{className:"bee-checkbox-input",htmlFor:g,children:[p?require$$0.jsx(require$$0.Fragment,{children:r?require$$0.jsx("i",{className:"pi pi-check"}):require$$0.jsx("i",{className:"pi pi-times"})}):require$$0.jsx(checkbox.Checkbox,{inputId:g,checked:null!=r&&r,onChange:e=>function(e){!n&&f&&f(e)}(e),className:v,tooltip:u,tooltipOptions:d}),require$$0.jsx("span",{className:"bee-checkbox-value",children:!0===r?l:c})]}),null!=i&&""!==i?require$$0.jsxs("label",{htmlFor:g,className:"bee-checkbox-label",children:[i,h?require$$0.jsx("span",{className:"bee-checkbox-label-required",children:require$$0.jsx("span",{className:"bee-checkbox-label-required-star",children:" *"})}):null]}):null]}),"none"!=o&&a?(()=>{const e="medium";return require$$0.jsx("div",{className:"bee-checkbox-statusLabel",children:"neutral"===o&&a?require$$0.jsx(BeeLabel,{size:e,value:a,type:"neutral"}):"valid"===o&&a?require$$0.jsx(BeeLabel,{size:e,value:a,type:"valid"}):"error"===o&&a?require$$0.jsx(BeeLabel,{size:e,value:a,type:"error"}):null})})():null]})}function BeeCheckboxTriState({id:e,className:t,label:i,stateNull:r="Empty",stateFalse:n="False",stateTrue:a="True",value:s,disabled:o,required:l,statusLabel:c,formstate:h="neutral",readOnly:p,tooltip:u,tooltipOptions:d,onChange:f}){const m=null!=e?e:libExports.useId(1,"bee-tri-checkbox-")[0],g=m+"input";let v="";p&&(v=" bee-tri-state-readOnly",o=!0);const y="bee-tri-state "+("valid"===h?" bee-tri-state-valid":"error"===h?" bee-tri-state-error":" bee-tri-state-neutral")+v+(o?" bee-tri-state-disabled":"")+(t?" "+t:""),b=i?"bee-tri-state-label":"";const x=!0===s||!1===s?s:null;return require$$0.jsxs("div",{className:null!=t?t:"",children:[require$$0.jsxs("div",{id:m,className:y,onKeyDown:e=>{!function(e){e.stopPropagation(),e.key===ENTER_KEY&&f&&f({target:{value:!s&&(!1===s?null:null==s||null)}})}(e)},children:[require$$0.jsxs("label",{className:"bee-tri-state-input",htmlFor:g,children:[p?require$$0.jsx(require$$0.Fragment,{children:!0===s?require$$0.jsx("i",{className:"pi pi-check"}):!1===s?require$$0.jsx("i",{className:"pi pi-times"}):require$$0.jsx("i",{className:"pi pi-question"})}):require$$0.jsx(tristatecheckbox.TriStateCheckbox,{id:g,value:x,onChange:e=>function(e){!o&&f&&f(e)}(e),tooltip:u,tooltipOptions:d}),require$$0.jsx("span",{className:"bee-tri-state-value",children:!0===s?a:!1===s?n:r})]}),null!=i&&""!==i?require$$0.jsxs("label",{htmlFor:g,className:b,children:[i,l?require$$0.jsx("span",{className:"bee-tri-state-label-required",children:require$$0.jsx("span",{className:"bee-tri-state-label-required-star",children:" *"})}):null]}):null]}),"none"!=h&&c?(()=>{const e="medium";return require$$0.jsx("div",{className:"bee-checkbox-tristate-statusLabel",children:"error"===h&&c?require$$0.jsx(BeeLabel,{size:e,value:c,type:"error"}):"valid"===h&&c?require$$0.jsx(BeeLabel,{size:e,value:c,type:"valid"}):"neutral"===h&&c?require$$0.jsx(BeeLabel,{size:e,value:c,type:"neutral"}):null})})():null]})}function BeeColorSelect({id:e,className:t,label:i,value:r,inline:n=!1,disabled:a,required:s,statusLabel:o,formstate:l="neutral",readOnly:c,defaultColor:h="#FF0000",format:p="rgb",tooltip:u,tooltipOptions:d,onChange:f}){const m=null!=e?e:libExports.useId(1,"bee-color-select-")[0],g=m+"input",v=a?" bee-color-select-disabled":"";let y="";c&&(y=" bee-color-select-readOnly",a=!0);const b="bee-color-select"+("valid"===l?" bee-color-select-valid":"error"===l?" bee-color-select-error":" bee-color-select-neutral")+y+v+(t?" "+t:""),x=i?"bee-color-select-label":"";function _(e){!a&&f&&f(e)}const S=null!=r?r:h;return require$$0.jsxs("div",{id:m,className:b,children:[i?require$$0.jsxs("label",{className:x,htmlFor:g,children:[i,s&&i?require$$0.jsx("span",{className:"bee-color-select-label-required",children:require$$0.jsx("span",{className:"bee-color-select-label-required-star",children:" *"})}):null]}):null,require$$0.jsx("div",{className:"bee-color-select-input",children:c?require$$0.jsx(colorpicker.ColorPicker,{id:g,value:S,defaultColor:h,format:p,onChange:e=>_(e),disabled:null!=a&&a,inline:!1,tooltip:u,tooltipOptions:d}):require$$0.jsx(colorpicker.ColorPicker,{id:g,value:S,defaultColor:h,format:p,onChange:e=>_(e),disabled:null!=a&&a,inline:n,tooltip:u,tooltipOptions:d})}),"none"!=l&&o?(()=>{const e="medium";return require$$0.jsx("div",{className:"bee-color-select-statusLabel",children:"error"===l&&o?require$$0.jsx(BeeLabel,{size:e,value:o,type:"error"}):"valid"===l&&o?require$$0.jsx(BeeLabel,{size:e,value:o,type:"valid"}):"neutral"===l&&o?require$$0.jsx(BeeLabel,{size:e,value:o,type:"neutral"}):null})})():null]})}function BeeCurrencySelect({id:e,className:t,label:i,value:r,disabled:n,currency:a="EUR",locale:s="de-DE",statusLabel:o,formstate:l="neutral",readOnly:c,required:h,placeholder:p,min:u,max:d,tooltip:f,tooltipOptions:m,onChange:g}){const v=null!=e?e:libExports.useId(1,"bee-cur-select-")[0],y=v+"input";let b="";c&&(b=" bee-cur-select-readOnly",n=!0);const x="p-float-label bee-cur-select-container"+("valid"===l?" bee-cur-select-valid":"error"===l?" bee-cur-select-error":" bee-cur-select-neutral")+b;return require$$0.jsxs(require$$0.Fragment,{children:[c&&!r?require$$0.jsx("div",{className:null!=t?t:"",children:require$$0.jsx(BeePlaceholder,{id:v,label:i})}):require$$0.jsxs("span",{id:v,className:x+(t?" "+t:""),children:[require$$0.jsx(inputnumber.InputNumber,{id:y,value:null!=r?r:null,disabled:null!=n&&n,mode:"currency",currency:a,locale:s,showButtons:!0,placeholder:p,min:u,max:d,onValueChange:e=>function(e){!n&&g&&g(e)}(e),tooltip:f,tooltipOptions:m}),i?require$$0.jsxs("label",{htmlFor:y,children:[i,h&&i?require$$0.jsx("span",{className:"bee-cur-select-label-required",children:require$$0.jsx("span",{className:"bee-cur-select-label-required-star",children:" *"})}):null]}):null]}),"none"!=l&&o?(()=>{const e="medium";return require$$0.jsx("div",{className:"bee-cur-select-statusLabel",children:"error"===l&&o?require$$0.jsx(BeeLabel,{size:e,value:o,type:"error"}):"valid"===l&&o?require$$0.jsx(BeeLabel,{size:e,value:o,type:"valid"}):"neutral"===l&&o?require$$0.jsx(BeeLabel,{size:e,value:o,type:"neutral"}):null})})():null]})}function BeeDropDown({id:e,className:t,label:i,value:r,valueTemplate:n,itemTemplate:a,options:s,optionLabel:o,optionValue:l,emptyPlaceholder:c,filter:h,filterBy:p,filterPlaceholder:u,disabled:d,statusLabel:f,formstate:m="neutral",readOnly:g,required:v,editable:y,showDelete:b,deleteIcon:x,emptyMessage:_,emptyFilterMessage:S,tooltip:w,tooltipOptions:C,onChange:P}){const E=null!=e?e:libExports.useId(1,"bee-drop-down-")[0],k=E+"input";let $="";g&&($=" bee-dropdown-readOnly",d=!0);const A=("valid"===m?"bee-dropdown-valid":"error"===m?"bee-dropdown-error":"bee-dropdown-neutral")+$,T=x||"pi pi-times-circle";function D(e){!d&&P&&P(e)}const M=React.useCallback((e,t)=>{var r,a;if(!!(null==e||"string"==typeof e&&0===e.length||"object"==typeof e&&0===Object.keys(e).length)){const e=null!==(r=null!=c?c:t.placeholder)&&void 0!==r?r:"string"==typeof i?i:"";return e?"string"==typeof e?require$$0.jsx("span",{children:e}):e:require$$0.jsx("span",{children:" "})}const s="function"==typeof n?n(e,t):n,o="string"==typeof s&&0===s.trim().length;if(null!=s&&!1!==s&&!o)return s;const l=null!==(a=null!=c?c:t.placeholder)&&void 0!==a?a:"string"==typeof i?i:"";return l?"string"==typeof l?require$$0.jsx("span",{children:l}):l:require$$0.jsx("span",{children:" "})},[c,i,n]);return require$$0.jsxs("div",{className:"bee-dropdown",children:[g&&!r?require$$0.jsx("div",{className:null!=t?t:"",children:require$$0.jsx(BeePlaceholder,{id:E,label:i})}):require$$0.jsxs("span",{id:E,className:"p-float-label bee-dropdown-container"+(t?" "+t:""),children:[require$$0.jsx(dropdown.Dropdown,{id:k,value:r,valueTemplate:n?M:void 0,options:s,disabled:null!=d&&d,className:A,onChange:e=>D(e),optionLabel:o,optionValue:l,itemTemplate:null!=a?a:void 0,placeholder:c,emptyMessage:null!=_?_:"Keine Einträge gefunden",emptyFilterMessage:S,editable:null!=y&&y,filter:null!=h&&h,filterPlaceholder:u,filterBy:p,tooltip:w,tooltipOptions:C}),i?require$$0.jsxs("label",{htmlFor:k,children:[i,v&&i?require$$0.jsx("span",{className:"bee-dropdown-label-required",children:require$$0.jsx("span",{className:"bee-dropdown-label-required-star",children:" *"})}):null]}):null,r&&b&&require$$0.jsx("div",{className:"filter-cancel",children:require$$0.jsx(BeeIconButton,{iconClass:T,rounded:!0,disabled:null!=d&&d,type:"lightPrimary",isLoading:!1,onClick:()=>D({label:"",value:null})})})]}),"none"!=m&&f?(()=>{const e="medium";return require$$0.jsx("div",{className:"bee-dropdown-statusLabel",children:"error"===m&&f?require$$0.jsx(BeeLabel,{size:e,value:f,type:"error"}):"valid"===m&&f?require$$0.jsx(BeeLabel,{size:e,value:f,type:"valid"}):"neutral"===m&&f?require$$0.jsx(BeeLabel,{size:e,value:f,type:"neutral"}):null})})():null]})}function BeeNumberSelect({id:e,className:t,label:i,value:r,minFractionDigits:n,maxFractionDigits:a,min:s,max:o,stepSize:l,disabled:c,grouping:h=!0,statusLabel:p,formstate:u="neutral",readOnly:d,required:f,placeholder:m,tooltip:g,tooltipOptions:v,onChange:y,onFocusOut:b}){const x=null!=e?e:libExports.useId(1,"bee-num-select-")[0],_=x+"input";let S="";d&&(S=" bee-num-select-readOnly",c=!0);const w="p-float-label bee-num-select-container"+("valid"===u?" bee-num-select-valid":"error"===u?" bee-num-select-error":" bee-num-select-neutral")+S;return require$$0.jsxs(require$$0.Fragment,{children:[d&&!r?require$$0.jsx("div",{className:null!=t?t:"",children:require$$0.jsx(BeePlaceholder,{id:x,label:i})}):require$$0.jsxs("span",{id:x,className:w+(t?" "+t:""),children:[require$$0.jsx(inputnumber.InputNumber,{id:_,value:null!=r?r:null,disabled:null!=c&&c,mode:"decimal",useGrouping:h,minFractionDigits:n,maxFractionDigits:a,min:s,max:o,showButtons:!0,step:null!=l?l:1,placeholder:m,tooltip:g,tooltipOptions:v,onValueChange:e=>function(e){!c&&y&&y(e)}(e),onBlur:e=>function(e){!c&&b&&b(e)}(e)}),i?require$$0.jsxs("label",{htmlFor:_,children:[i,f&&i?require$$0.jsx("span",{className:"bee-num-select-label-required",children:require$$0.jsx("span",{className:"bee-num-select-label-required-star",children:" *"})}):null]}):null]}),"none"!=u&&p?(()=>{const e="medium";return require$$0.jsx("div",{className:"bee-num-select-statusLabel",children:"error"===u&&p?require$$0.jsx(BeeLabel,{size:e,value:p,type:"error"}):"valid"===u&&p?require$$0.jsx(BeeLabel,{size:e,value:p,type:"valid"}):"neutral"===u&&p?require$$0.jsx(BeeLabel,{size:e,value:p,type:"neutral"}):null})})():null]})}function BeeSwitch({id:e,className:t,label:i,value:r,disabled:n,statusLabel:a,formstate:s="neutral",stateFalse:o="Nein",stateTrue:l="Ja",required:c,readOnly:h,tooltip:p,tooltipOptions:u,onChange:d}){const f=null!=e?e:libExports.useId(1,"bee-switch-")[0],m=f+"input";let g="";h&&(g=" bee-switch-readOnly",n=!0);const v="bee-switch"+("valid"===s?" bee-switch-valid":"error"===s?" bee-switch-error":" bee-switch-neutral")+g+(n?" bee-switch-disabled":"")+(t?" "+t:""),y=i?"bee-switch-label":"";const b=!0===r;return require$$0.jsxs("div",{id:f,className:v,children:[require$$0.jsxs("div",{className:"bee-switch-input",children:[require$$0.jsx(inputswitch.InputSwitch,{inputId:m,checked:b,className:b?"p-inputswitch-checked":void 0,onChange:e=>function(e){!n&&d&&d(e)}(e),disabled:null!=n&&n,tooltip:p,tooltipOptions:u}),require$$0.jsx("label",{className:"bee-switch-value",htmlFor:m,children:b?l:o})]}),i?require$$0.jsxs("label",{className:y,htmlFor:m,children:[i,c&&i?require$$0.jsx("span",{className:"bee-switch-label-required",children:require$$0.jsx("span",{className:"bee-switch-label-required-star",children:" *"})}):null]}):null,"none"!=s&&a?(()=>{const e="medium";return require$$0.jsx("div",{className:"bee-switch-statusLabel",children:"error"===s&&a?require$$0.jsx(BeeLabel,{size:e,value:a,type:"error"}):"valid"===s&&a?require$$0.jsx(BeeLabel,{size:e,value:a,type:"valid"}):"neutral"===s&&a?require$$0.jsx(BeeLabel,{size:e,value:a,type:"neutral"}):null})})():null]})}function BeeTreeSelect({id:e,className:t,label:i,value:r,showDelete:n,options:a,valueTemplate:s,display:o="comma",selectionMode:l="single",placeholder:c,panelClassName:h,filter:p,filterTemplate:u,filterValue:d,filterBy:f,filterPlaceholder:m,disabled:g,readOnly:v,statusLabel:y,formstate:b="neutral",required:x,emptyMessage:_,onChange:S,onNodeSelect:w,onHide:C}){var P;const E=null!=e?e:libExports.useId(1,"bee-treeselect-")[0],k=E+"input";let $="";v&&($=" bee-ts-readOnly",g=!0);const A=("valid"===b?" bee-ts-valid":"error"===b?" bee-ts-error":" bee-ts-neutral")+$,T=" bee-ts-container ",D=p?" bee-ts-panel":" bee-ts-panel bee-ts-invisible-header";function M(e){!g&&S&&S(e)}function I(e){!g&&w&&w(e)}function F(){!g&&C&&C()}const j=React.useCallback((e,t)=>{var r,n,a,o;if(!!(null==e||"string"==typeof e&&0===e.length||"object"==typeof e&&0===Object.keys(e).length)){const e=null!==(n=null!==(r=t.placeholder)&&void 0!==r?r:i)&&void 0!==n?n:"";return e?require$$0.jsx("span",{children:e}):require$$0.jsx("span",{children:" "})}const l="function"==typeof s?s(e,t):s,c="string"==typeof l&&0===l.trim().length;if(null!=l&&!1!==l&&!c)return l;const h=null!==(o=null!==(a=t.placeholder)&&void 0!==a?a:i)&&void 0!==o?o:"";return h?require$$0.jsx("span",{children:h}):require$$0.jsx("span",{children:" "})},[i,c,s]);return require$$0.jsxs(require$$0.Fragment,{children:[v&&!r?require$$0.jsx("div",{className:null!=t?t:"",children:require$$0.jsx(BeePlaceholder,{id:E,label:i})}):require$$0.jsx(require$$0.Fragment,{children:require$$0.jsxs("div",{id:E,className:t?t+T:T,children:[require$$0.jsx("div",{className:!v&&r&&Object.keys(r).length>0?"bee-ts-filter__deleteBtn":"bee-ts-filter__deleteBtn bee-ts-filter--hidden",children:n?require$$0.jsx(BeeIconButton,{iconClass:"pi pi-times-circle",rounded:!0,disabled:!1,type:"lightPrimary",isLoading:!1,onClick:()=>{M(void 0),I(void 0),F()}}):null}),require$$0.jsxs("div",{className:"p-float-label",children:[require$$0.jsx(treeselect.TreeSelect,{id:k,value:r,valueTemplate:s?j:void 0,options:a,disabled:g,className:A,panelClassName:h?h+D:D,display:o,selectionMode:l,placeholder:null!==(P=null!=c?c:i)&&void 0!==P?P:void 0,filter:p,filterTemplate:u,filterValue:d,filterBy:f,filterPlaceholder:null!=m?m:"Suche",onChange:e=>M(e),onNodeSelect:e=>I(e),onHide:()=>F(),emptyMessage:_}),i?require$$0.jsxs("label",{htmlFor:k,className:"bee-ts-label",children:[i,x&&i?require$$0.jsx("span",{className:"bee-ts-label-required",children:require$$0.jsx("span",{className:"bee-ts-label-required-star",children:" *"})}):null]}):null]})]})}),"none"!=b&&y?(()=>{const e="medium";return require$$0.jsx("div",{className:"bee-ts-statusLabel",children:"error"===b&&y?require$$0.jsx(BeeLabel,{size:e,value:y,type:"error"}):"valid"===b&&y?require$$0.jsx(BeeLabel,{size:e,value:y,type:"valid"}):"neutral"===b&&y?require$$0.jsx(BeeLabel,{size:e,value:y,type:"neutral"}):null})})():null]})}function BeeChipDropdown({id:e,className:t,label:i,value:r,options:n,optionLabel:a,statusLabel:s,disabled:o,formstate:l="neutral",readOnly:c,required:h,placeholder:p,maxSelectedLabels:u,filter:d,filterBy:f,filterPlaceholder:m,emptyFilterMessage:g,emptyMessage:v,onChange:y}){const b=null!=e?e:libExports.useId(1,"bee-chip-dropdown-")[0],x=b+"input";let _="";c&&(_=" bee-chip-dropdown-readOnly",o=!0);const S=("valid"===l?"bee-chip-dropdown-valid":"error"===l?"bee-chip-dropdown-error":"bee-chip-dropdown-neutral")+_;return require$$0.jsxs("div",{children:[c&&!r?require$$0.jsx("div",{className:null!=t?t:"",children:require$$0.jsx(BeePlaceholder,{id:b,label:null!=i?i:""})}):require$$0.jsxs("span",{id:b,className:"p-float-label bee-chip-dropdown-container"+(t?" "+t:""),children:[require$$0.jsx(multiselect.MultiSelect,Object.assign({display:"chip",id:x,value:r,options:n,disabled:null!=o&&o,className:S,onChange:e=>{return t=e,void(!o&&y&&y(t));var t},optionLabel:a,panelHeaderTemplate:e=>{const t=`${e.className} p-multiselect-header bee-chip-dropdown__header`,i="bee-chip-dropdown_selectall",r=`${i}_label`;return require$$0.jsxs("div",{className:t,children:[e.checkboxElement,require$$0.jsx("label",{id:r,className:"p-checkbox-label",htmlFor:i,children:"Alle auswählen"})]})},placeholder:p,maxSelectedLabels:u,filter:null!=d&&d,filterBy:f},void 0!==m&&{filterPlaceholder:m},void 0!==v&&{emptyMessage:v},void 0!==g&&{emptyFilterMessage:g})),i?require$$0.jsxs("label",{htmlFor:x,children:[i,h&&i?require$$0.jsx("span",{className:"bee-chip-dropdown-label-required",children:require$$0.jsx("span",{className:"bee-chip-dropdown-label-required-star",children:" *"})}):null]}):null]}),"none"!=l&&s?(()=>{const e="medium";return require$$0.jsx("div",{className:"bee-chip-dropdown-statusLabel",children:"error"===l&&s?require$$0.jsx(BeeLabel,{size:e,value:s,type:"error"}):"valid"===l&&s?require$$0.jsx(BeeLabel,{size:e,value:s,type:"valid"}):"neutral"===l&&s?require$$0.jsx(BeeLabel,{size:e,value:s,type:"neutral"}):null})})():null]})}var ChatMessageSourceEnum,ChatParticipantTypeEnum,ServerStatus;function parseParticipantName(e){var t,i;if(!(null==e?void 0:e.trim()))return{firstName:"U",lastName:"N"};const r=e.trim().split(" ").filter(e=>e.length>0);return 0===r.length?{firstName:"U",lastName:"N"}:{firstName:null!==(t=r[0])&&void 0!==t?t:"U",lastName:null!==(i=r[r.length-1])&&void 0!==i?i:"N"}}function BeeChatMessage({maxWindow:e=!1,msg:t,participant:i,project:r,chatMsgSource:n,isCurrentUser:a=!1,showDeleteButton:s=!1,documentIconClass:o="pi pi-file",trashIconClass:l="pi pi-trash",sourceAuditIconClass:c="pi pi-briefcase",sourceLcIconClass:h="pi pi-comments",onMsgDelete:p,onDownload:u}){const d=React.useMemo(()=>{var e;return null!==(e=null==i?void 0:i.name)&&void 0!==e?e:"Unbekannter Benutzer"},[null==i?void 0:i.name]),f=React.useMemo(()=>null==i?void 0:i.type,[null==i?void 0:i.type]),{firstName:m,lastName:g}=React.useMemo(()=>parseParticipantName(d),[d]),v=React.useMemo(()=>f!==exports.ChatParticipantTypeEnum.USER||a?f===exports.ChatParticipantTypeEnum.USER&&a?"lc-m-chat-message--self":f===exports.ChatParticipantTypeEnum.SYSTEM?"lc-m-chat-message--system":"lc-m-chat-message--otherUser":"lc-m-chat-message--otherUser",[f,a]);function y(e){const t=new Date(e);return`${t.getDate().toString().padStart(2,"0")}.${(t.getMonth()+1).toString().padStart(2,"0")}.${t.getFullYear().toString().slice(-2)} - ${t.getHours().toString().padStart(2,"0")}:${t.getMinutes().toString().padStart(2,"0")}`}const b=(null==t?void 0:t.mediaId)&&"object"==typeof t.mediaId?t.mediaId:null;function x(){var t,i;if(!b)return null;const r=null!==(t=b.document)&&void 0!==t?t:b.image;if(!r)return null;const n=null!==(i=r.filename)&&void 0!==i?i:b.document?"Unbekannte Datei":"Unbekanntes Bild";return require$$0.jsxs("div",{className:"chat-message_media-container",children:[require$$0.jsx(BeeMixButton,{label:n,iconClass:o,type:"lightPrimary",iconPos:"left",onClick:u}),e&&null!=r.fileSize?require$$0.jsx(BeeLabel,{value:`Größe: ${r.fileSize}kb`,size:"small",type:"neutral"}):null]})}return require$$0.jsx("div",{className:"lc-m-chat-message "+v,children:require$$0.jsxs("div",{className:"chat-message__message-container-avatar",children:[(null==t?void 0:t.deletedAt)?null:t?require$$0.jsxs("div",{className:"chat-message__message-container",children:[require$$0.jsxs("div",{className:"chat-message_headline-container align-items-center"+(r===exports.ChatMessageSourceEnum.AUDIT?" pl-0":""),children:[require$$0.jsxs("div",{className:"chat-message__user-info",children:[r===exports.ChatMessageSourceEnum.AUDIT&&n===exports.ChatMessageSourceEnum.AUDIT&&require$$0.jsx("i",{className:c}),r===exports.ChatMessageSourceEnum.AUDIT&&n===exports.ChatMessageSourceEnum.LC&&require$$0.jsx("i",{className:h}),r===exports.ChatMessageSourceEnum.AUDIT&&require$$0.jsx("div",{className:"mr-1 ml-1",children:require$$0.jsx(BeeLabel,{value:"||",size:"small",type:"neutral"})}),require$$0.jsx(BeeLabel,{value:d,size:"small",type:"neutral"})]}),(null==t?void 0:t.createdAt)?require$$0.jsx(BeeLabel,{value:y(t.createdAt),size:"small",type:"neutral"}):null]}),t.mediaId?x():require$$0.jsx("div",{className:"chat-message",children:null!==(_=null==t?void 0:t.message)&&void 0!==_?_:"Keine Nachricht"}),s&&a&&p&&require$$0.jsx(BeeIconButton,{iconClass:l,type:"lightPrimary",rounded:!1,onClick:p})]}):null,require$$0.jsx(BeeAvatar,{showPlaceholder:!0,placeholderFirstname:m,placeholderLastname:g,showDelete:!1,disabled:!1,size:"xSmall",type:"primary"})]})});var _}exports.ChatMessageSourceEnum=void 0,ChatMessageSourceEnum=exports.ChatMessageSourceEnum||(exports.ChatMessageSourceEnum={}),ChatMessageSourceEnum.LC="LC",ChatMessageSourceEnum.AUDIT="AUDIT",exports.ChatParticipantTypeEnum=void 0,ChatParticipantTypeEnum=exports.ChatParticipantTypeEnum||(exports.ChatParticipantTypeEnum={}),ChatParticipantTypeEnum.ADMIN="ADMIN",ChatParticipantTypeEnum.USER="USER",ChatParticipantTypeEnum.SYSTEM="SYSTEM",exports.ServerStatus=void 0,ServerStatus=exports.ServerStatus||(exports.ServerStatus={}),ServerStatus.SERVER_STATUS_LOADING="loading",ServerStatus.SERVER_STATUS_ERROR="error",ServerStatus.SERVER_STATUS_SUCCESS="success",ServerStatus.SERVER_STATUS_EXTERNAL_UPDATE="externalUpdate";const DEFAULT_SUCCESS_TOOLTIP="Änderung gespeichert",DEFAULT_ERROR_TOOLTIP="Die Änderung konnte nicht gespeichert werden",DEFAULT_EXTERNAL_CHANGE_TOOLTIP="Eine andere Person hat dieses Feld soeben bearbeitet";function BeeServerStatusInput({status:e,successIcon:t="pi pi-check",loadingIcon:i,errorIcon:r="pi pi-times",externalChangeIcon:n="pi pi-user",hideIcons:a,children:s,onResetStatus:o,successTooltip:l=DEFAULT_SUCCESS_TOOLTIP,errorTooltip:c=DEFAULT_ERROR_TOOLTIP,externalChangeTooltip:h=DEFAULT_EXTERNAL_CHANGE_TOOLTIP}){const p=e===exports.ServerStatus.SERVER_STATUS_LOADING?"server-status-loading":e===exports.ServerStatus.SERVER_STATUS_ERROR?"server-status-error":e===exports.ServerStatus.SERVER_STATUS_SUCCESS?"server-status-success":e===exports.ServerStatus.SERVER_STATUS_EXTERNAL_UPDATE?"server-status-externalChange":"";return React.useEffect(()=>{if(e===exports.ServerStatus.SERVER_STATUS_SUCCESS||e===exports.ServerStatus.SERVER_STATUS_EXTERNAL_UPDATE){const e=setTimeout(()=>{null==o||o()},5e3);return()=>clearTimeout(e)}},[e,o]),require$$0.jsxs("div",{className:e?`serverStatus-input ${p} p-input-icon-right serverStatus-input-icon-right`:"serverStatus-input",children:[require$$0.jsx(require$$0.Fragment,{children:s}),e&&!a?require$$0.jsx(require$$0.Fragment,{children:e===exports.ServerStatus.SERVER_STATUS_SUCCESS?require$$0.jsxs(require$$0.Fragment,{children:[require$$0.jsx(tooltip.Tooltip,{target:".icon--success",content:l}),require$$0.jsx("i",{className:t+" icon--success"})]}):e===exports.ServerStatus.SERVER_STATUS_LOADING?require$$0.jsx(require$$0.Fragment,{children:i?require$$0.jsx("i",{className:i+" icon--loading"}):require$$0.jsx(BeeLoadingSpinner,{strokeWidth:"2",type:"primary"})}):e===exports.ServerStatus.SERVER_STATUS_ERROR?require$$0.jsxs(require$$0.Fragment,{children:[require$$0.jsx(tooltip.Tooltip,{target:".icon--error",content:c}),require$$0.jsx("i",{className:r+" icon--error"})]}):e===exports.ServerStatus.SERVER_STATUS_EXTERNAL_UPDATE?require$$0.jsxs(require$$0.Fragment,{children:[require$$0.jsx(tooltip.Tooltip,{target:".icon--externalChange",content:h}),require$$0.jsx("i",{className:n+" icon--externalChange"})]}):null}):null]})}function BeeChangesChip({className:e,values:t,type:i="primary"}){const r=`bee-changes-chip ${`bee-changes-chip--${i}`} ${e?" "+e:""}`;return 0===t.length?null:require$$0.jsx("div",{className:r,children:function(e){return e.map((e,t)=>{const i=e.value<10?e.value.toString():"9+";return require$$0.jsxs("div",{className:"bee-changes-chip__icon-wrapper",children:[require$$0.jsx("i",{className:e.icon}),require$$0.jsx("div",{}),require$$0.jsx(badge.Badge,{value:i,severity:"info"})]},t)})}(t)})}function BeeFilterDropDown({id:e,className:t,label:i,value:r,options:n,optionLabel:a,optionValue:s,disabled:o,dropdownIcon:l,deleteIcon:c,statusLabel:h,formstate:p="neutral",readOnly:u,onChange:d}){const f=null!=e?e:libExports.useId(1,"bee-filter-dropdown-")[0],m=f+"input",[g,v]=React.useState(r);let y="";u&&(y=" bee-filter-dropdown-readOnly",o=!0);const b=("valid"===p?"bee-filter-dropdown-valid":"error"===p?"bee-filter-dropdown-error":"bee-filter-dropdown-neutral")+y,x="p-float-label bee-filter-dropdown-container flex "+(t?" "+t:""),_=null!=c?c:"pi pi-times-circle";React.useEffect(()=>{v(r)},[r]);return require$$0.jsxs("div",{className:"bee-filter-dropdown",children:[u&&!r?require$$0.jsx("div",{className:null!=t?t:"",children:require$$0.jsx(BeePlaceholder,{id:f,label:i})}):require$$0.jsxs("span",{id:f,className:x,children:[require$$0.jsx(dropdown.Dropdown,{id:m,value:g,options:n,optionLabel:a,optionValue:s,disabled:null!=o&&o,className:b,dropdownIcon:null!=l?l:"",emptyMessage:"Keine Einträge gefunden",onChange:e=>{return t=e,void(!o&&d&&d(t));var t}}),g&&""!==g?require$$0.jsx("div",{className:"cancel",children:require$$0.jsx(BeeIconButton,{iconClass:_,rounded:!0,disabled:o||!1,type:"lightPrimary",isLoading:!1,onClick:()=>{v("")}})}):null,i?require$$0.jsx("label",{htmlFor:m,children:i}):null]}),"none"!=p&&h?(()=>{const e="medium";return require$$0.jsx("div",{className:"bee-filter-dropdown-statusLabel",children:"error"===p&&null!=h?require$$0.jsx(BeeLabel,{size:e,value:String(h),type:"error"}):"valid"===p&&null!=h?require$$0.jsx(BeeLabel,{size:e,value:String(h),type:"valid"}):"neutral"===p&&null!=h?require$$0.jsx(BeeLabel,{size:e,value:String(h),type:"neutral"}):null})})():null]})}function BeeFilterTreeSelect({id:e,className:t,label:i,value:r,options:n,valueTemplate:a,display:s="comma",selectionMode:o="single",placeholder:l,filter:c,filterTemplate:h,filterValue:p,filterBy:u,filterPlaceholder:d,confirmBtnText:f,confirmBtnDisabled:m,confirmBtnTooltip:g,deleteIcon:v,disabled:y,readOnly:b,statusLabel:x,formstate:_="neutral",required:S,hideDelete:w,onSelectNodes:C,onChange:P,onHide:E}){const k=null!=e?e:libExports.useId(1,"bee-filter-ts-")[0],$=k+"input",[A,T]=React.useState(r);let D="";b&&(D=" bee-filter-ts-readOnly",y=!0);const M=("valid"===_?"bee-filter-ts-valid":"error"===_?"bee-filter-ts-error":"bee-filter-ts-neutral")+D,I=" p-float-label bee-filter-ts-container",F=c?"bee-filter-ts-panel":"bee-filter-ts-panel bee-filter-ts-invisible-header",j=v||"pi pi-times-circle";function R(){const e=document.querySelector("body");if(e){const t=new MouseEvent("click",{bubbles:!0,view:window});e.dispatchEvent(t)}}function B(){!y&&E&&E()}React.useEffect(()=>{T(r)},[r]);return require$$0.jsxs(require$$0.Fragment,{children:[b&&!r?require$$0.jsx("div",{className:null!=t?t:"",children:require$$0.jsx(BeePlaceholder,{id:k,label:i})}):require$$0.jsxs("div",{id:k,className:t?t+I:I,children:[require$$0.jsx("div",{className:!b&&r&&Object.keys(r).length>0?"bee-filter-ts-filter__deleteBtn":"bee-filter-ts-filter__deleteBtn bee-filter-ts-filter--hidden",children:!A||""===A||w?null:require$$0.jsx("div",{className:"cancel",children:require$$0.jsx(BeeIconButton,{iconClass:j,rounded:!0,disabled:y||!1,type:"lightPrimary",isLoading:!1,onClick:()=>{T(""),!y&&C&&(C(void 0),R())}})})}),require$$0.jsxs("span",{className:"p-float-label",children:[require$$0.jsx(treeselect.TreeSelect,{id:$,value:A,options:n,disabled:y||!1,className:M,valueTemplate:a,panelClassName:F,display:null!=s?s:"comma",selectionMode:o,placeholder:l,filter:c,filterTemplate:h,filterValue:p,filterBy:u,filterPlaceholder:d||"Suche",onChange:e=>{T(e.value),function(e){!y&&P&&P(e)}(e)},onHide:()=>{T(r),B()},panelFooterTemplate:()=>require$$0.jsx("div",{className:"p-d-flex p-jc-end p-ai-center",style:{padding:"1rem"},children:require$$0.jsx(BeeButton,{label:f||"Übernehmen",type:"secondary",disabled:m||!1,tooltip:m&&g?g:void 0,onClick:()=>{B(),!y&&C&&(C(A),R())}})})}),i?require$$0.jsxs("label",{htmlFor:$,className:"bee-filter-ts-label",children:[i,S&&i?require$$0.jsx("span",{className:"bee-filter-ts-label-required",children:require$$0.jsx("span",{className:"bee-filter-ts-label-required-star",children:" *"})}):null]}):null]})]}),"none"!=_&&x?(()=>{const e="medium";return require$$0.jsx("div",{className:"bee-filter-ts-statusLabel",children:"error"===_&&null!=x?require$$0.jsx(BeeLabel,{size:e,value:String(x),type:"error"}):"valid"===_&&null!=x?require$$0.jsx(BeeLabel,{size:e,value:String(x),type:"valid"}):"neutral"===_&&null!=x?require$$0.jsx(BeeLabel,{size:e,value:String(x),type:"neutral"}):null})})():null]})}function BeeGalleryImage({id:e,className:t,imageUrl:i,imageKey:r,imageAlt:n,imageTitle:a,imageCopyright:s,isImageSecured:o=!1,showPlaceHolder:l=!1,activateHover:c=!0,readOnly:h,onClick:p,onRemove:u,onAdd:d}){const f=null!=e?e:libExports.useId(1,"bee-gallery-img-")[0],m="bee-gallery-img "+(h?"bee-gallery-img-readOnly":"")+(c?" bee-gallery-img-hover":" bee-gallery-img-noHover")+" bee-gallery-img-placeholder"+(t?" "+t:"");return require$$0.jsx("div",{id:f,className:m,children:i?require$$0.jsxs("div",{children:[h?null:require$$0.jsx("div",{className:"bee-gallery-img-close-button",children:require$$0.jsx(BeeIconButton,{iconClass:"pi pi-times",rounded:!0,disabled:!1,type:"secondary",isLoading:!1,onClick:e=>function(e){u&&u(e)}(e)})}),require$$0.jsx("div",{className:"bee-gallery-img-content",children:require$$0.jsx(BeeImage,{url:i,alt:n,title:a,titlePosition:"left",copyright:s,secured:o,secureKey:o?r:void 0,showPlaceholder:l,onClick:e=>function(e){p&&p(e)}(e)},r)})]}):h?null:require$$0.jsx("div",{className:"bee-gallery-img-add-button",children:require$$0.jsx(BeeAddEntryCard,{disabled:h||!1,onClick:e=>function(e){d&&d(e)}(e)})})})}var UserAgent_DEPRECATED_1,hasRequiredUserAgent_DEPRECATED,ExecutionEnvironment_1,hasRequiredExecutionEnvironment,isEventSupported_1,hasRequiredIsEventSupported,normalizeWheel_1,hasRequiredNormalizeWheel$1,normalizeWheel$1,hasRequiredNormalizeWheel;function requireUserAgent_DEPRECATED(){if(hasRequiredUserAgent_DEPRECATED)return UserAgent_DEPRECATED_1;hasRequiredUserAgent_DEPRECATED=1;var e,t,i,r,n,a,s,o,l,c,h,p,u,d,f,m=!1;function g(){if(!m){m=!0;var g=navigator.userAgent,v=/(?:MSIE.(\d+\.\d+))|(?:(?:Firefox|GranParadiso|Iceweasel).(\d+\.\d+))|(?:Opera(?:.+Version.|.)(\d+\.\d+))|(?:AppleWebKit.(\d+(?:\.\d+)?))|(?:Trident\/\d+\.\d+.*rv:(\d+\.\d+))/.exec(g),y=/(Mac OS X)|(Windows)|(Linux)/.exec(g);if(p=/\b(iPhone|iP[ao]d)/.exec(g),u=/\b(iP[ao]d)/.exec(g),c=/Android/i.exec(g),d=/FBAN\/\w+;/i.exec(g),f=/Mobile/i.exec(g),h=!!/Win64/.exec(g),v){(e=v[1]?parseFloat(v[1]):v[5]?parseFloat(v[5]):NaN)&&document&&document.documentMode&&(e=document.documentMode);var b=/(?:Trident\/(\d+.\d+))/.exec(g);a=b?parseFloat(b[1])+4:e,t=v[2]?parseFloat(v[2]):NaN,i=v[3]?parseFloat(v[3]):NaN,(r=v[4]?parseFloat(v[4]):NaN)?(v=/(?:Chrome\/(\d+\.\d+))/.exec(g),n=v&&v[1]?parseFloat(v[1]):NaN):n=NaN}else e=t=i=n=r=NaN;if(y){if(y[1]){var x=/(?:Mac OS X (\d+(?:[._]\d+)?))/.exec(g);s=!x||parseFloat(x[1].replace("_","."))}else s=!1;o=!!y[2],l=!!y[3]}else s=o=l=!1}}var v={ie:function(){return g()||e},ieCompatibilityMode:function(){return g()||a>e},ie64:function(){return v.ie()&&h},firefox:function(){return g()||t},opera:function(){return g()||i},webkit:function(){return g()||r},safari:function(){return v.webkit()},chrome:function(){return g()||n},windows:function(){return g()||o},osx:function(){return g()||s},linux:function(){return g()||l},iphone:function(){return g()||p},mobile:function(){return g()||p||u||c||f},nativeApp:function(){return g()||d},android:function(){return g()||c},ipad:function(){return g()||u}};return UserAgent_DEPRECATED_1=v}function requireExecutionEnvironment(){if(hasRequiredExecutionEnvironment)return ExecutionEnvironment_1;hasRequiredExecutionEnvironment=1;var e=!("undefined"==typeof window||!window.document||!window.document.createElement),t={canUseDOM:e,canUseWorkers:"undefined"!=typeof Worker,canUseEventListeners:e&&!(!window.addEventListener&&!window.attachEvent),canUseViewport:e&&!!window.screen,isInWorker:!e};return ExecutionEnvironment_1=t}function requireIsEventSupported(){if(hasRequiredIsEventSupported)return isEventSupported_1;hasRequiredIsEventSupported=1;var e,t=requireExecutionEnvironment();return t.canUseDOM&&(e=document.implementation&&document.implementation.hasFeature&&!0!==document.implementation.hasFeature("",""))
28
28
  /**
29
29
  * Checks if an event is supported in the current execution environment.
30
30
  *