(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-48b0aa0e","chunk-d5707d66","chunk-256cfcdb"],{"0160":function(t,e,i){},"0798":function(t,e,i){"use strict";i("0c18");var s=i("10d2"),n=i("afdd"),a=i("9d26"),o=i("f2e7"),r=i("7560"),l=i("2b0e"),c=l["a"].extend({name:"transitionable",props:{mode:String,origin:String,transition:String}}),h=i("58df"),d=i("d9bd");e["a"]=Object(h["a"])(s["a"],o["a"],c).extend({name:"v-alert",props:{border:{type:String,validator(t){return["top","right","bottom","left"].includes(t)}},closeLabel:{type:String,default:"$vuetify.close"},coloredBorder:Boolean,dense:Boolean,dismissible:Boolean,closeIcon:{type:String,default:"$cancel"},icon:{default:"",type:[Boolean,String],validator(t){return"string"===typeof t||!1===t}},outlined:Boolean,prominent:Boolean,text:Boolean,type:{type:String,validator(t){return["info","error","success","warning"].includes(t)}},value:{type:Boolean,default:!0}},computed:{__cachedBorder(){if(!this.border)return null;let t={staticClass:"v-alert__border",class:{["v-alert__border--"+this.border]:!0}};return this.coloredBorder&&(t=this.setBackgroundColor(this.computedColor,t),t.class["v-alert__border--has-color"]=!0),this.$createElement("div",t)},__cachedDismissible(){if(!this.dismissible)return null;const t=this.iconColor;return this.$createElement(n["a"],{staticClass:"v-alert__dismissible",props:{color:t,icon:!0,small:!0},attrs:{"aria-label":this.$vuetify.lang.t(this.closeLabel)},on:{click:()=>this.isActive=!1}},[this.$createElement(a["a"],{props:{color:t}},this.closeIcon)])},__cachedIcon(){return this.computedIcon?this.$createElement(a["a"],{staticClass:"v-alert__icon",props:{color:this.iconColor}},this.computedIcon):null},classes(){const t={...s["a"].options.computed.classes.call(this),"v-alert--border":Boolean(this.border),"v-alert--dense":this.dense,"v-alert--outlined":this.outlined,"v-alert--prominent":this.prominent,"v-alert--text":this.text};return this.border&&(t["v-alert--border-"+this.border]=!0),t},computedColor(){return this.color||this.type},computedIcon(){return!1!==this.icon&&("string"===typeof this.icon&&this.icon?this.icon:!!["error","info","success","warning"].includes(this.type)&&"$"+this.type)},hasColoredIcon(){return this.hasText||Boolean(this.border)&&this.coloredBorder},hasText(){return this.text||this.outlined},iconColor(){return this.hasColoredIcon?this.computedColor:void 0},isDark(){return!(!this.type||this.coloredBorder||this.outlined)||r["a"].options.computed.isDark.call(this)}},created(){this.$attrs.hasOwnProperty("outline")&&Object(d["a"])("outline","outlined",this)},methods:{genWrapper(){const t=[this.$slots.prepend||this.__cachedIcon,this.genContent(),this.__cachedBorder,this.$slots.append,this.$scopedSlots.close?this.$scopedSlots.close({toggle:this.toggle}):this.__cachedDismissible],e={staticClass:"v-alert__wrapper"};return this.$createElement("div",e,t)},genContent(){return this.$createElement("div",{staticClass:"v-alert__content"},this.$slots.default)},genAlert(){let t={staticClass:"v-alert",attrs:{role:"alert"},on:this.listeners$,class:this.classes,style:this.styles,directives:[{name:"show",value:this.isActive}]};if(!this.coloredBorder){const e=this.hasText?this.setTextColor:this.setBackgroundColor;t=e(this.computedColor,t)}return this.$createElement("div",t,[this.genWrapper()])},toggle(){this.isActive=!this.isActive}},render(t){const e=this.genAlert();return this.transition?t("transition",{props:{name:this.transition,origin:this.origin,mode:this.mode}},[e]):e}})},"07d2":function(t,e,i){"use strict";i("8900")},"0c18":function(t,e,i){},"169a":function(t,e,i){"use strict";i("368e");var s=i("480e"),n=i("4ad4"),a=i("b848"),o=i("75eb"),r=i("e707"),l=i("e4d3"),c=i("21be"),h=i("a293"),d=i("58df"),u=i("d9bd"),p=i("80d2");const f=Object(d["a"])(a["a"],o["a"],r["a"],l["a"],c["a"],n["a"]);e["a"]=f.extend({name:"v-dialog",directives:{ClickOutside:h["a"]},props:{dark:Boolean,disabled:Boolean,fullscreen:Boolean,light:Boolean,maxWidth:[String,Number],noClickAnimation:Boolean,origin:{type:String,default:"center center"},persistent:Boolean,retainFocus:{type:Boolean,default:!0},scrollable:Boolean,transition:{type:[String,Boolean],default:"dialog-transition"},width:[String,Number]},data(){return{activatedBy:null,animate:!1,animateTimeout:-1,stackMinZIndex:200,previousActiveElement:null}},computed:{classes(){return{[("v-dialog "+this.contentClass).trim()]:!0,"v-dialog--active":this.isActive,"v-dialog--persistent":this.persistent,"v-dialog--fullscreen":this.fullscreen,"v-dialog--scrollable":this.scrollable,"v-dialog--animated":this.animate}},contentClasses(){return{"v-dialog__content":!0,"v-dialog__content--active":this.isActive}},hasActivator(){return Boolean(!!this.$slots.activator||!!this.$scopedSlots.activator)}},watch:{isActive(t){var e;t?(this.show(),this.hideScroll()):(this.removeOverlay(),this.unbind(),null===(e=this.previousActiveElement)||void 0===e||e.focus())},fullscreen(t){this.isActive&&(t?(this.hideScroll(),this.removeOverlay(!1)):(this.showScroll(),this.genOverlay()))}},created(){this.$attrs.hasOwnProperty("full-width")&&Object(u["e"])("full-width",this)},beforeMount(){this.$nextTick(()=>{this.isBooted=this.isActive,this.isActive&&this.show()})},beforeDestroy(){"undefined"!==typeof window&&this.unbind()},methods:{animateClick(){this.animate=!1,this.$nextTick(()=>{this.animate=!0,window.clearTimeout(this.animateTimeout),this.animateTimeout=window.setTimeout(()=>this.animate=!1,150)})},closeConditional(t){const e=t.target;return!(this._isDestroyed||!this.isActive||this.$refs.content.contains(e)||this.overlay&&e&&!this.overlay.$el.contains(e))&&this.activeZIndex>=this.getMaxZIndex()},hideScroll(){this.fullscreen?document.documentElement.classList.add("overflow-y-hidden"):r["a"].options.methods.hideScroll.call(this)},show(){!this.fullscreen&&!this.hideOverlay&&this.genOverlay(),this.$nextTick(()=>{this.$nextTick(()=>{var t,e;(null===(t=this.$refs.dialog)||void 0===t?void 0:t.contains(document.activeElement))||(this.previousActiveElement=document.activeElement,null===(e=this.$refs.dialog)||void 0===e||e.focus()),this.bind()})})},bind(){window.addEventListener("focusin",this.onFocusin)},unbind(){window.removeEventListener("focusin",this.onFocusin)},onClickOutside(t){this.$emit("click:outside",t),this.persistent?this.noClickAnimation||this.animateClick():this.isActive=!1},onKeydown(t){if(t.keyCode===p["y"].esc&&!this.getOpenDependents().length)if(this.persistent)this.noClickAnimation||this.animateClick();else{this.isActive=!1;const t=this.getActivator();this.$nextTick(()=>t&&t.focus())}this.$emit("keydown",t)},onFocusin(t){if(!t||!this.retainFocus)return;const e=t.target;if(e&&this.$refs.dialog&&![document,this.$refs.dialog].includes(e)&&!this.$refs.dialog.contains(e)&&this.activeZIndex>=this.getMaxZIndex()&&!this.getOpenDependentElements().some(t=>t.contains(e))){const t=this.$refs.dialog.querySelectorAll('button, [href], input:not([type="hidden"]), select, textarea, [tabindex]:not([tabindex="-1"])'),e=[...t].find(t=>!t.hasAttribute("disabled")&&!t.matches('[tabindex="-1"]'));e&&e.focus()}},genContent(){return this.showLazyContent(()=>[this.$createElement(s["a"],{props:{root:!0,light:this.light,dark:this.dark}},[this.$createElement("div",{class:this.contentClasses,attrs:{role:"dialog","aria-modal":this.hideOverlay?void 0:"true",...this.getScopeIdAttrs()},on:{keydown:this.onKeydown},style:{zIndex:this.activeZIndex},ref:"content"},[this.genTransition()])])])},genTransition(){const t=this.genInnerContent();return this.transition?this.$createElement("transition",{props:{name:this.transition,origin:this.origin,appear:!0}},[t]):t},genInnerContent(){const t={class:this.classes,attrs:{tabindex:this.isActive?0:void 0},ref:"dialog",directives:[{name:"click-outside",value:{handler:this.onClickOutside,closeConditional:this.closeConditional,include:this.getOpenDependentElements}},{name:"show",value:this.isActive}],style:{transformOrigin:this.origin}};return this.fullscreen||(t.style={...t.style,maxWidth:Object(p["h"])(this.maxWidth),width:Object(p["h"])(this.width)}),this.$createElement("div",t,this.getContentSlot())}},render(t){return t("div",{staticClass:"v-dialog__container",class:{"v-dialog__container--attached":""===this.attach||!0===this.attach||"attach"===this.attach}},[this.genActivator(),this.genContent()])}})},"193c":function(t,e,i){"use strict";i("f74e")},"1b19":function(t,e,i){"use strict";var s=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"chart-container",staticStyle:{position:"relative",height:"200px"}},[i("canvas",{ref:"chart"})])},n=[],a=i("9b4a"),o=i("1315");i("cadc");a["c"].register(a["a"],a["b"],a["d"],a["e"],a["f"]);var r={name:"RaceHistogramByDate",components:{},props:{data:Object,label:String,minimal:Boolean,defaultColor:{type:String,default:"#111"},accentColor:{type:String,default:"#ccc"}},data(){return{chart:null,minValue:0,maxValue:0}},async mounted(){this.prepareData(),this.data&&this.createChart()},methods:{prepareData(){console.log("prepareData",this.data,Object.values(this.data));var t=Object.values(this.data);this.minValue=Math.min(...t),this.maxValue=Math.max(...t)},barColor:function(t,e){var i=(t.raw.y-this.minValue)/(this.maxValue-this.minValue);return this.$helpers.getGradientColorAt(this.accentColor,this.defaultColor,i)},createOrRefreshChart(){this.chart?this.chart.update():this.createChart()},dayToDate(t){return o["DateTime"].fromISO(t)},createChart(){if(!this.chart){var t=this.$refs.chart;console.log("CHART creating",t,this.data),this.chart=new a["c"](t,{type:"bar",data:{datasets:[{label:this.label,backgroundColor:this.barColor,data:Object.keys(this.data).map(t=>({x:this.dayToDate(t),y:this.data[t]})),borderColor:this.defaultColor,borderWidth:1}]},options:{maintainAspectRatio:!1,scales:{x:{type:"time",time:{unit:"day",displayFormats:{minute:"dd-MM"},tooltipFormat:"'Date' yyyy-MM-dd"},ticks:{display:!this.minimal},grid:{display:!this.minimal}},y:{display:!0,beginAtZero:!0,ticks:{display:!1,major:{enabled:!0}},grid:{display:!this.minimal}}},plugins:{legend:{display:!1}}}})}}},watch:{data(t){}}},l=r,c=i("2877"),h=Object(c["a"])(l,s,n,!1,null,null,null);e["a"]=h.exports},"1f09":function(t,e,i){},3129:function(t,e,i){"use strict";i("14d9"),i("1f09");var s=i("c995"),n=i("24b2"),a=i("7560"),o=i("58df"),r=i("80d2");e["a"]=Object(o["a"])(s["a"],n["a"],a["a"]).extend({name:"VSkeletonLoader",props:{boilerplate:Boolean,loading:Boolean,tile:Boolean,transition:String,type:String,types:{type:Object,default:()=>({})}},computed:{attrs(){return this.isLoading?this.boilerplate?{}:{"aria-busy":!0,"aria-live":"polite",role:"alert",...this.$attrs}:this.$attrs},classes(){return{"v-skeleton-loader--boilerplate":this.boilerplate,"v-skeleton-loader--is-loading":this.isLoading,"v-skeleton-loader--tile":this.tile,...this.themeClasses,...this.elevationClasses}},isLoading(){return!("default"in this.$scopedSlots)||this.loading},rootTypes(){return{actions:"button@2",article:"heading, paragraph",avatar:"avatar",button:"button",card:"image, card-heading","card-avatar":"image, list-item-avatar","card-heading":"heading",chip:"chip","date-picker":"list-item, card-heading, divider, date-picker-options, date-picker-days, actions","date-picker-options":"text, avatar@2","date-picker-days":"avatar@28",heading:"heading",image:"image","list-item":"text","list-item-avatar":"avatar, text","list-item-two-line":"sentences","list-item-avatar-two-line":"avatar, sentences","list-item-three-line":"paragraph","list-item-avatar-three-line":"avatar, paragraph",paragraph:"text@3",sentences:"text@2",table:"table-heading, table-thead, table-tbody, table-tfoot","table-heading":"heading, text","table-thead":"heading@6","table-tbody":"table-row-divider@6","table-row-divider":"table-row, divider","table-row":"table-cell@6","table-cell":"text","table-tfoot":"text@2, avatar@2",text:"text",...this.types}}},methods:{genBone(t,e){return this.$createElement("div",{staticClass:`v-skeleton-loader__${t} v-skeleton-loader__bone`},e)},genBones(t){const[e,i]=t.split("@"),s=()=>this.genStructure(e);return Array.from({length:i}).map(s)},genStructure(t){let e=[];t=t||this.type||"";const i=this.rootTypes[t]||"";if(t===i);else{if(t.indexOf(",")>-1)return this.mapBones(t);if(t.indexOf("@")>-1)return this.genBones(t);i.indexOf(",")>-1?e=this.mapBones(i):i.indexOf("@")>-1?e=this.genBones(i):i&&e.push(this.genStructure(i))}return[this.genBone(t,e)]},genSkeleton(){const t=[];return this.isLoading?t.push(this.genStructure()):t.push(Object(r["s"])(this)),this.transition?this.$createElement("transition",{props:{name:this.transition},on:{afterEnter:this.resetStyles,beforeEnter:this.onBeforeEnter,beforeLeave:this.onBeforeLeave,leaveCancelled:this.resetStyles}},t):t},mapBones(t){return t.replace(/\s/g,"").split(",").map(this.genStructure)},onBeforeEnter(t){this.resetStyles(t),this.isLoading&&(t._initialStyle={display:t.style.display,transition:t.style.transition},t.style.setProperty("transition","none","important"))},onBeforeLeave(t){t.style.setProperty("display","none","important")},resetStyles(t){t._initialStyle&&(t.style.display=t._initialStyle.display||"",t.style.transition=t._initialStyle.transition,delete t._initialStyle)}},render(t){return t("div",{staticClass:"v-skeleton-loader",attrs:this.attrs,on:this.$listeners,class:this.classes,style:this.isLoading?this.measurableStyles:void 0},[this.genSkeleton()])}})},"31a7":function(t,e,i){"use strict";var s=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",[i("div",{ref:"markdownContent",attrs:{"v-html":t.rendered},on:{click:function(e){return t.$emit("click",e)}}},[t._t("default")],2),i("div",{ref:"dynamic"})])},n=[],a=(i("d9e2"),i("d4cd")),o=i.n(a),r=i("ed18"),l=i.n(r),c={name:"VueMarkdown",components:{},props:{html:{type:Boolean,default:!1},source:{type:String,default:null}},data:function(){return{compiled:null,md:null,rendered:null}},async mounted(){this.md=new o.a({html:!0,linkify:!0,typographer:!0}),this.registerShortCodes(this.md);var t=this.$refs.markdownContent.innerHTML;t?this.render(t):this.source&&this.render(this.source)},methods:{registerShortCodes(t){var e=["img","video","iframe"],i={media:{render:function(t,i){if(e.indexOf(t.method)<0)throw new Error("unsupported medium");var s="<"+t.method;return s+=' src="'+(t.src||"")+'"',s+=' alt="'+(t.alt||"")+'"',t.width&&(s+=' width="'+t.width+'"'),t.side&&(s+=' style="float:'+t.side+'"'),s+">"}},block:{render:function(t,e){var i=t.icon||"",s=t.title||"",n=t.text||"",a=t.href||"",o=a?"a":"div";return`<${o} class="auto-block-grid pa-4 v-card ${a?"v-card--link":""} v-sheet theme--light elevation-2 grey lighten-4 flex d-flex flex-column" href="${a}">\n                          <i class="${i?"v-icon":"d-none"} notranslate fa ${i} theme--light grey--text d-inline-block" style="font-size:50px;"></i>\n                          <h3 class="my-4">${s}</h3>\n                          <p class="d-flex">${n}</p>\n                        </${o}>`}},video:{render:function(t,e){var i=t.id||"";return`<a class="text-center d-inline-block videoPlayer clickToPlayVideo" style="width:640px;height:360px; max-width:100%; position:relative;cursor:pointer;" data-video-id="${i}">\n                          <i class="v-icon fa fa-play theme--light" style="font-size:100px;position:absolute;left:50%;top:50%;margin-top:-50px; margin-left:-50px;"></i>\n                          <img src="https://img.youtube.com/vi/${i}/maxresdefault.jpg" width="640" height="360" style="object-fit:contain; max-width:100%;"/>\n                        </a>`}},button:{render:function(t,e){var i=t.outlined,s=t.color||"primary",n=(t.block,i?`v-btn v-btn--depressed v-btn--flat v-btn--outlined v-btn--router theme--light v-size--default ${s}--text`:"v-btn v-btn--contained v-btn--router theme--light v-size--default "+s);return`<p><a href="${t.href}" class="${n}"><span class="v-btn__content">${t.text}</span></a></p>`}},banner:{render:function(t,e){var i=t.color||"green",s=t.title||"",n=t.message||"",a=t.primaryLabel||"",o=t.primaryHref||"",r=t.secondaryLabel||"",l=t.secondaryHref||"",c=a&&o?`<a href="${o}" class="v-btn v-btn--is-elevated v-btn--has-bg theme--light v-size--default white"><span class="v-btn__content">${a}</span></a>`:"",h=r&&l?`<a href="${l}" class="ml-4 v-btn v-btn--outlined theme--light v-size--default white--text"><span class="v-btn__content">${r}</span></a>`:"";return`<div class="${i} white--text my-10 py-6 py-md-12 mx-n4">\n                          <div class="container text-center">\n                            <div class="col-md-12 col-12">\n                              <h2>${s}</h2>\n                              <h1>${n}</h1>\n                              <p class="${c||h?"mb-0 mt-4":"d-none"}">\n                                ${c} ${h}\n                              </p>\n                            </div>\n                          </div>\n                        </div>`}}};t.use(l.a,i)},render(t){if(t){var e=this.md.render(t);this.$refs.markdownContent.innerHTML=e}}},watch:{async source(t){await this.$nextTick(),this.render(t)}}},h=c,d=i("2877"),u=Object(d["a"])(h,s,n,!1,null,null,null);e["a"]=u.exports},3303:function(t,e,i){"use strict";i.r(e);var s=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("v-card",[i("Header",{attrs:{title:t.$t("profile.friends.title")}}),t.befriendUrl?i("v-card-text",[i("h3",[t._v(t._s(t.$t("profile.friends.invite-friend")))]),i("p",[t._v(t._s(t.$t("profile.friends.invite-friend-msg")))]),i("v-dialog",{attrs:{"max-width":"400px"},scopedSlots:t._u([{key:"activator",fn:function(e){var s=e.on;return[i("v-btn",t._g({attrs:{color:"primary"}},s),[i("v-icon",{staticClass:"me-2"},[t._v("fadl fa fa-qrcode")]),t._v(" "+t._s(t.$t("shared.show-qr-code"))+" ")],1)]}}],null,!1,421053375)},[i("v-card",[i("v-card-title",[t._v(t._s(t.$t("shared.qr-code")))]),i("v-card-text",[t._v(t._s(t.$t("profile.friends.share-msg")))]),i("QrCode",{attrs:{data:t.befriendUrl}})],1)],1),i("v-btn",{staticClass:"ms-4",attrs:{color:"primary",outlined:""},on:{click:function(e){return t.$helpers.copyToClipboard(t.befriendUrl,t.$toast)}}},[t._v(t._s(t.$t("shared.copy-link")))])],1):t._e(),t.requested&&t.requested.length?i("div",[i("v-card-subtitle",{staticClass:"subtitle"},[t._v(t._s(t.$t("profile.friends.open-requests")))]),i("v-card-text",[t._v(t._s(t.$t("profile.friends.open-requests-msg")))]),i("v-data-table",{attrs:{headers:t.tableHeaders,items:t.requested,"item-key":"id","sort-by":"created","items-per-page":50,"show-group-by":!1},scopedSlots:t._u([{key:"item.id",fn:function(e){var s=e.item;return[i("span",[t._v(t._s(s.friend.name))])]}},{key:"item.created",fn:function(e){var i=e.item;return[t._v(" "+t._s(t._f("localDate")(i.created))+" ")]}},{key:"item.actions",fn:function(e){var s=e.item;return[s.requested_by_id==t.profile.id?i("span",[t._v(t._s(t.$t("profile.friends.waiting-for-response")))]):i("span",[i("v-btn",{attrs:{text:"",color:"green"},on:{click:function(e){return t.acceptFriendRequest(s)}}},[t._v(t._s(t.$t("profile.friends.accept")))]),i("v-btn",{attrs:{text:""},on:{click:function(e){return t.ignoreFriendRequest(s)}}},[t._v(t._s(t.$t("profile.friends.ignore")))])],1)]}}],null,!1,2014558060)})],1):t._e(),i("v-card-subtitle",{staticClass:"subtitle"},[t._v(t._s(t.$t("profile.friends.title")))]),i("v-card-text",[t._v(t._s(t.$t("profile.friends.message")))]),t.accepted?i("v-data-table",{attrs:{headers:t.tableHeaders,items:t.accepted,"item-key":"id","sort-by":"created","items-per-page":50,"show-group-by":!1},scopedSlots:t._u([{key:"item.id",fn:function(e){var s=e.item;return[i("v-btn",{attrs:{text:"",color:"primary"},on:{click:function(e){return t.openFriendDialog(s)}}},[t._v(t._s(s.friend.name))])]}},{key:"item.created",fn:function(e){var i=e.item;return[t._v(" "+t._s(t._f("localDate")(i.created))+" ")]}},{key:"item.actions",fn:function(e){var s=e.item;return[i("v-btn",{attrs:{outlined:"",color:"primary"},on:{click:function(e){return t.challengeFriend(s)}}},[i("v-icon",{staticClass:"me-2",attrs:{small:""}},[t._v("fa-trophy")]),t._v(" "+t._s(t.$t("profile.friends.challenge")))],1),i("v-menu",{attrs:{bottom:"",left:""},scopedSlots:t._u([{key:"activator",fn:function(e){var s=e.on,n=e.attrs;return[i("v-btn",t._g(t._b({attrs:{icon:"",color:"primary"}},"v-btn",n,!1),s),[i("v-icon",[t._v("fa-ellipsis-v")])],1)]}}],null,!0)},[i("v-list",[i("v-list-item",{on:{click:function(e){return t.deleteFriend(s)}}},[i("v-list-item-icon",[i("v-icon",[t._v("fa-unlink")])],1),i("v-list-item-title",[t._v(t._s(t.$t("profile.friends.unfriend")))])],1),i("v-list-item",{on:{click:function(e){return t.blockFriend(s)}}},[i("v-list-item-icon",[i("v-icon",[t._v("fa-ban")])],1),i("v-list-item-title",[t._v(t._s(t.$t("profile.friends.block")))])],1)],1)],1)]}}],null,!1,1587878074)}):t._e(),t.challenges&&t.challenges.length?i("div",[i("v-card-subtitle",{staticClass:"subtitle"},[t._v(t._s(t.$t("profile.friends.challenges")))]),i("v-card-text",[t._v(t._s(t.$t("profile.friends.challenges-msg")))]),i("EventGrid",{staticClass:"mx-4 mb-4",attrs:{routeResolver:t.resolveViewChallengeRoute,items:t.challenges,minimal:!0}})],1):t._e(),t.blocked&&t.blocked.length?i("div",[i("v-card-subtitle",{staticClass:"subtitle"},[t._v(t._s(t.$t("profile.friends.blocked-users")))]),i("v-card-text",[t._v(t._s(t.$t("profile.friends.blocked-users-msg")))]),i("v-data-table",{attrs:{headers:t.tableHeaders,items:t.blocked,"item-key":"id","sort-by":"created","items-per-page":50,"show-group-by":!1},scopedSlots:t._u([{key:"item.id",fn:function(e){var s=e.item;return[i("span",[t._v(t._s(s.friend.name))])]}},{key:"item.created",fn:function(e){var i=e.item;return[t._v(" "+t._s(t._f("localDate")(i.created))+" ")]}},{key:"item.actions",fn:function(e){var s=e.item;return[i("v-btn",{attrs:{text:"",small:""},on:{click:function(e){return t.deleteFriend(s)}}},[i("v-icon",{staticClass:"me-2",attrs:{small:""}},[t._v("fa-unlink")]),t._v(" "+t._s(t.$t("shared.delete")))],1)]}}],null,!1,151419882)})],1):t._e(),i("FriendDialog",{ref:"friendDialog"})],1)},n=[],a=(i("14d9"),i("2f62")),o=i("ac67"),r=i("585f"),l=i("1315"),c=i("6373"),h=i("8de7"),d=function(){var t=this,e=t.$createElement,i=t._self._c||e;return t.friend?i("v-dialog",{model:{value:t.showDialog,callback:function(e){t.showDialog=e},expression:"showDialog"}},[i("v-card",{},[i("v-card-title",{staticClass:"subtitle d-block align-center grey darken-2 white--text"},[t.friend.img?i("v-avatar",{staticClass:"mb-4",attrs:{size:"100"}},[i("img",{attrs:{src:t.friend.img}})]):t._e(),i("div",[t._v(t._s(t.friend.name))])],1),t.details?i("div",[i("v-tabs",{attrs:{"background-color":"grey darken-2",centered:"",dark:"","icons-and-text":""},model:{value:t.tab,callback:function(e){t.tab=e},expression:"tab"}},[i("v-tabs-slider"),t.details.steps_by_date?i("v-tab",{attrs:{href:"#tab-0"}},[t._v(" Steps "),i("v-icon",[t._v("fa-shoe-prints")])],1):t._e(),i("v-tab",{attrs:{href:"#tab-1"}},[t._v(" Activities "),i("v-icon",[t._v("fa-stopwatch")])],1),i("v-tab",{attrs:{href:"#tab-2"}},[t._v(" Messages "),i("v-icon",[t._v("fa-comments")])],1)],1),i("v-tabs-items",{model:{value:t.tab,callback:function(e){t.tab=e},expression:"tab"}},[t.details.steps_by_date?i("v-tab-item",{attrs:{value:"tab-0"}},[i("v-card-subtitle",[t._v(t._s(t.$t("profile.friends.details.steps-title")))]),i("RaceHistogramByDate",{attrs:{data:t.details.steps_by_date,label:t.$t("results.details.score-by-day-steps"),defaultColor:t.$vuetify.theme.defaults.light.primary,accentColor:t.$helpers.getColorVariant(t.$vuetify.theme.defaults.light.primary,100)}})],1):t._e(),i("v-tab-item",{attrs:{value:"tab-1"}},[i("v-card-subtitle",[t._v(t._s(t.$t("profile.friends.details.activities-title")))]),t.details.activities&&!t.details.activities.length?i("v-card-text",[t._v(t._s(t.$t("profile.friends.details.activities-no-data",{friend:t.friend.name})))]):t._e(),t.details.activities&&t.details.activities.length?i("ActivityGrid",{ref:"activityGrid",staticClass:"mb-4",attrs:{data:this.details.activities,limit:25,autoLoad:!1}}):t._e()],1),i("v-tab-item",{attrs:{value:"tab-2"}},[i("v-card-subtitle",[t._v(t._s(t.$t("profile.friends.details.messages-title")))]),i("v-card-text",[t._v(t._s(t.$t("profile.friends.details.messages-msg",{friend:t.friend.name})))]),i("FeedList",{attrs:{feedItems:t.details.messages,compact:"",emptyLabel:t.$t("profile.friends.details.messages-no-data",{friend:t.friend.name})}}),i("PostCommentField",{staticClass:"mx-4",on:{submit:t.postMessage}})],1)],1)],1):i("v-card-text",[i("i",[i("v-icon",[t._v("fa fa-circle-notch fa-spin")]),t._v(" "+t._s(t.$t("shared.loading")))],1)]),i("v-card-actions",[i("v-btn",{attrs:{text:""},on:{click:function(e){t.showDialog=!1}}},[t._v("Close")])],1)],1)],1):t._e()},u=[],p=i("35f1"),f=i("3386"),g=i("a0b1"),m=i("1b19"),v=i("4a1f"),b=i.n(v);const _=b.a.current();var x={name:"FriendDialog",props:{},components:{ActivityGrid:p["a"],PostCommentField:g["a"],FeedList:f["a"],RaceHistogramByDate:m["a"]},data(){return{tenant:_,friend:null,details:null,showDialog:!1,tab:0}},mounted(){},methods:{async open(t){this.friend=t.friend,this.showDialog=!0,await this.loadData()},async loadData(){this.details=(await o["a"].getFriendDetails(this.friend.id)).data,await this.$nextTick()},async postMessage(t){let e=(await o["a"].messageFriend(this.friend.id,t)).data;this.$helpers.toastResponse(this,e,"Message sent!"),"OK"==e.status&&await this.loadData()}},computed:{...Object(a["b"])({user:"user"})}},y=x,k=i("2877"),w=i("6544"),C=i.n(w),M=i("8212"),S=i("8336"),O=i("b0af"),D=i("99d9"),P=i("169a"),I=i("132d"),T=i("71a3"),$=i("9d65"),L=i("4e82"),E=i("c3f0"),A=i("80d2"),R=i("58df");const V=Object(R["a"])($["a"],Object(L["a"])("windowGroup","v-window-item","v-window"));var F=V.extend().extend().extend({name:"v-window-item",directives:{Touch:E["a"]},props:{disabled:Boolean,reverseTransition:{type:[Boolean,String],default:void 0},transition:{type:[Boolean,String],default:void 0},value:{required:!1}},data(){return{isActive:!1,inTransition:!1}},computed:{classes(){return this.groupClasses},computedTransition(){return this.windowGroup.internalReverse?"undefined"!==typeof this.reverseTransition?this.reverseTransition||"":this.windowGroup.computedTransition:"undefined"!==typeof this.transition?this.transition||"":this.windowGroup.computedTransition}},methods:{genDefaultSlot(){return this.$slots.default},genWindowItem(){return this.$createElement("div",{staticClass:"v-window-item",class:this.classes,directives:[{name:"show",value:this.isActive}],on:this.$listeners},this.genDefaultSlot())},onAfterTransition(){this.inTransition&&(this.inTransition=!1,this.windowGroup.transitionCount>0&&(this.windowGroup.transitionCount--,0===this.windowGroup.transitionCount&&(this.windowGroup.transitionHeight=void 0)))},onBeforeTransition(){this.inTransition||(this.inTransition=!0,0===this.windowGroup.transitionCount&&(this.windowGroup.transitionHeight=Object(A["h"])(this.windowGroup.$el.clientHeight)),this.windowGroup.transitionCount++)},onTransitionCancelled(){this.onAfterTransition()},onEnter(t){this.inTransition&&this.$nextTick(()=>{this.computedTransition&&this.inTransition&&(this.windowGroup.transitionHeight=Object(A["h"])(t.clientHeight))})}},render(t){return t("transition",{props:{name:this.computedTransition},on:{beforeEnter:this.onBeforeTransition,afterEnter:this.onAfterTransition,enterCancelled:this.onTransitionCancelled,beforeLeave:this.onBeforeTransition,afterLeave:this.onAfterTransition,leaveCancelled:this.onTransitionCancelled,enter:this.onEnter}},this.showLazyContent(()=>[this.genWindowItem()]))}}),B=F.extend({name:"v-tab-item",props:{id:String},methods:{genWindowItem(){const t=F.options.methods.genWindowItem.call(this);return t.data.domProps=t.data.domProps||{},t.data.domProps.id=this.id||this.value,t}}}),z=i("fe57"),j=i("aac8"),N=i("9a96"),W=Object(k["a"])(y,d,u,!1,null,"3ec36440",null),H=W.exports;C()(W,{VAvatar:M["a"],VBtn:S["a"],VCard:O["a"],VCardActions:D["a"],VCardSubtitle:D["b"],VCardText:D["c"],VCardTitle:D["d"],VDialog:P["a"],VIcon:I["a"],VTab:T["a"],VTabItem:B,VTabs:z["a"],VTabsItems:j["a"],VTabsSlider:N["a"]});var U=i("b55c"),q=i("4279");b.a.current();var Y={name:"Friends",components:{Header:q["a"],QrCode:c["a"],ShareButton:U["a"],EventGrid:h["a"],FriendDialog:H},props:{},data(){return{befriendUrl:null,challenges:null,requested:null,accepted:null,profile:null,blocked:null,tableHeaders:[{value:"id",text:this.$t("profile.friends.cols.name")},{value:"created",text:this.$t("profile.friends.cols.created")},{value:"actions",text:""}]}},async mounted(){await this.getProfile(),r["a"].$on("login-state-change",async t=>{await this.getProfile()})},methods:{async getProfile(){if(this.user){console.log(this.user),this.profile=(await o["a"].get()).data,this.befriendUrl=(await o["a"].getFriendInviteLink()).data.msg;let t=(await o["a"].getFriends()).data.data;this.requested=t.filter(t=>"REQUESTED"===t.status),this.accepted=t.filter(t=>"ACCEPTED"===t.status)||[],this.blocked=t.filter(t=>"BLOCKED"===t.status),this.challenges=(await o["a"].getFriendChallenges()).data.data}},resolveViewChallengeRoute(t){return{name:"profileFriendsChallengeView",params:{eventId:t}}},openFriendDialog(t){this.$refs.friendDialog.open(t)},async acceptFriendRequest(t){if(confirm(this.$t("profile.friends.accept-request-prompt"))){const e=(await o["a"].acceptFriendRequest(t.friend.id)).data;this.$helpers.toastResponse(this,e,this.$t("profile.friends.accept-request-confirmation")),await this.getProfile()}},async ignoreFriendRequest(t){if(confirm(this.$t("profile.friends.ignore-request-prompt"))){const e=(await o["a"].ignoreFriendRequest(t.friend.id)).data;this.$helpers.toastResponse(this,e,this.$t("profile.friends.ignore-request-confirmation")),await this.getProfile()}},async deleteFriend(t){if(confirm(this.$t("profile.friends.delete-user-prompt"))){const e=(await o["a"].deleteFriend(t.friend.id)).data;this.$helpers.toastResponse(this,e,this.$t("profile.friends.delete-user-confirmation")),await this.getProfile()}},async blockFriend(t){if(confirm(this.$t("profile.friends.block-user-prompt"))){const e=(await o["a"].blockFriend(t.friend.id)).data;this.$helpers.toastResponse(this,e,this.$t("profile.friends.block-user-confirmation")),await this.getProfile()}},async challengeFriend(t){if(confirm(this.$t("profile.friends.challenge-user-prompt"))){const e={timezone:l["DateTime"].now().zoneName},i=(await o["a"].challengeFriend(t.friend.id,e)).data;this.$helpers.toastResponse(this,i,this.$t("profile.friends.challenge-user-confirmation")),"OK"==i.status&&this.$router.push({name:"profileFriendsChallengeConfig",params:{eventId:i.id},query:this.$route.query})}}},computed:{...Object(a["b"])({user:"user"})}},G=Y,X=i("8fea"),Q=i("8860"),K=i("da13"),Z=i("34c3"),J=i("5d23"),tt=i("e449"),et=Object(k["a"])(G,s,n,!1,null,null,null);e["default"]=et.exports;C()(et,{VBtn:S["a"],VCard:O["a"],VCardSubtitle:D["b"],VCardText:D["c"],VCardTitle:D["d"],VDataTable:X["a"],VDialog:P["a"],VIcon:I["a"],VList:Q["a"],VListItem:K["a"],VListItemIcon:Z["a"],VListItemTitle:J["c"],VMenu:tt["a"]})},3386:function(t,e,i){"use strict";var s=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",[t.feedItems?0==t.feedItems.length?i("v-card-text",{},[i("i",[t._v(t._s(t.emptyLabel||"Empty feed."))])]):t.compact?i("v-list",[t._l(t.feedItems,(function(e,s){return[i("v-divider",{key:"div"+s}),i("v-list-item",{key:s,attrs:{"two-line":""}},[e.profile&&e.profile.img?i("v-list-item-avatar",[i("v-img",{attrs:{src:e.profile.img}})],1):t._e(),e.sender&&e.sender.img?i("v-list-item-avatar",[i("v-img",{attrs:{src:e.sender.img}})],1):t._e(),i("v-list-item-content",[i("v-list-item-title",[t._v(" "+t._s(e.msg)+" "),e.video?i("div",[e.meta&&e.meta.some((function(t){return"apivideo.id"==t.key}))?i("div",[i("ApiVideoPlayer",{attrs:{videoId:e.meta.find((function(t){return"apivideo.id"==t.key})).val_str}})],1):i("div",[i("p",{staticClass:"text-muted"},[t._v("Inline video player is only available in the app.")]),i("v-btn",{attrs:{outlined:"",href:e.video,target:"_blank"}},[t._v("Watch Video")])],1)]):t._e()]),i("v-list-item-subtitle",[e.profile?i("span",[t._v("By "+t._s(e.profile.name)+" •")]):t._e(),e.sender?i("span",[t._v("By "+t._s(e.sender.name)+" •")]):t._e(),t._v(" "+t._s(t._f("localDate")(e.timestamp,"ddd L LTS Z"))+" ")]),t.showLikeOption||t.showCommentOption||t.allowDelete?i("v-list-item-subtitle",{staticClass:" pt-0"},[t.showLikeOption?i("v-btn",{attrs:{small:"",text:"",color:"primary"},on:{click:function(i){return t.likeItem(e.id)}}},[i("v-icon",{staticClass:"me-1",attrs:{color:"primary","x-small":""}},[t._v("fa-thumbs-up")]),i("strong",[t._v(t._s(e.likes))]),t._v(" "+t._s(t.$t("results.details.likes"))+" ")],1):t._e(),t.showCommentOption?i("v-btn",{attrs:{small:"",text:"",color:"primary"},on:{click:function(i){return t.openItemDetails(e)}}},[i("v-icon",{staticClass:"me-1",attrs:{color:"primary","x-small":""}},[t._v("fa-comments")]),i("strong",[t._v(t._s(e.comments))]),t._v(" "+t._s(t.$t("results.details.comments"))+" ")],1):t._e(),t.allowDelete?i("v-spacer"):t._e(),t.allowDelete&&(t.me&&e.profile&&t.me.id==e.profile.id||t.adminView)?i("v-btn",{attrs:{small:"",icon:"",color:"error"},on:{click:function(i){return t.deleteFeedItem(e.id)}}},[i("v-icon",{attrs:{small:""}},[t._v("fa-trash")])],1):t._e()],1):t._e()],1)],1),s==t.feedItems.length-1?i("v-divider",{key:"div"+s+"_end",staticClass:"mb-2"}):t._e()]}))],2):i("v-timeline",{staticClass:"mx-4 pt-0",attrs:{dense:t.$vuetify.breakpoint.xsOnly}},[t._l(t.feedItemsByDate,(function(e,s){return[i("v-timeline-item",{key:s,staticClass:"date-separator",attrs:{"hide-dot":""}},[i("span",[t._v(t._s(t._f("localDate")(e.key,"L")))])]),t._l(e.data,(function(e,n){return i("v-timeline-item",{key:s+"-"+n,attrs:{color:"green",small:t.$vuetify.breakpoint.xsOnly,icon:e.tile?t.$helpers.getActivityIcon(e.tile.activity_type):null},scopedSlots:t._u([{key:"opposite",fn:function(){return[i("span",[t._v(" ")])]},proxy:!0}],null,!0)},["TILE_RANKING"==e.type?i("v-card",{staticClass:"elevation-1",attrs:{color:"grey lighten-5"}},[i("v-card-title",{staticClass:"subtitle-1 pa-2 pb-0"},[i("strong",[t._v("#"+t._s(e.tile.pos))]),t._v(" "),i("span",{staticClass:"grey--text mx-1"},[t._v("(of "+t._s(e.tile.cnt)+")")]),t._v(" in "),i("router-link",{staticClass:"ml-1",attrs:{to:{name:"tile",params:{id:e.tile.id,type:e.tile.activity_type.toLowerCase()},query:{ranking:e.tile.key}}}},[t._v(t._s(e.tile.name))])],1),i("v-card-text",{staticClass:"pa-2 pb-0"},[t._v(t._s(e.msg))]),i("v-card-actions",{staticClass:"pa-2 pt-0"},[i("v-btn",{attrs:{text:"",color:"primary",to:{name:"tile",params:{id:e.tile.id,type:e.tile.activity_type.toLowerCase()},query:{ranking:e.tile.key}}}},[t._v("View tile")]),i("v-spacer"),i("ShareButton",{attrs:{text:(e.share_msg||e.msg)+" - Check sodisp.com",color:"primary",route:{name:"tile",params:{id:e.tile.id,type:e.tile.activity_type.toLowerCase()},query:{ranking:e.tile.key}}}})],1)],1):"EVENT_UPDATE"==e.type||"EVENT_PHOTO"==e.type?i("v-card",{staticClass:"elevation-1",attrs:{color:"grey lighten-5"}},[i("v-card-text",{staticClass:"pa-2 pb-0"},[t.adminView?i("div",[e.lang?i("p",{staticClass:"text-muted float-right"},[t._v("Language: "),i("strong",[t._v(t._s(e.lang))])]):t._e(),i("p",{staticClass:"text-muted mb-0"},[t._v(t._s(t._f("localDate")(e.timestamp)))])]):t._e(),i("vue-markdown",{staticClass:"markdown",attrs:{html:!1,source:e.msg}}),e.img&&!e.video?i("img",{staticClass:"feed-image-lg mt-4",attrs:{src:e.img}}):t._e(),e.video?i("div",[e.meta&&e.meta.some((function(t){return"apivideo.id"==t.key}))?i("div",[i("ApiVideoPlayer",{attrs:{videoId:e.meta.find((function(t){return"apivideo.id"==t.key})).val_str}})],1):i("div",[i("p",{staticClass:"text-muted"},[t._v("Inline video player is only available in the app.")]),i("v-btn",{attrs:{outlined:"",href:e.video,target:"_blank"}},[t._v("Watch Video")])],1)]):t._e()],1),t.event&&t.event.allow_feed_interactions?i("v-divider",{staticClass:"my-2"}):t._e(),t.event&&t.event.allow_feed_interactions?i("v-card-actions",{staticClass:"pa-2 pt-0"},[i("span",[i("v-icon",{staticClass:"mr-2",attrs:{color:"grey",small:""}},[t._v("fa-thumbs-up")]),i("strong",[t._v(t._s(e.likes))]),t._v(" "+t._s(t.$t("results.details.likes")))],1),i("v-spacer"),t.$listeners&&t.$listeners.openItemComments?i("v-btn",{attrs:{outlined:"",color:"primary"},on:{click:function(i){return t.openItemComments(e.id)}}},[i("v-icon",{staticClass:"mr-2",attrs:{color:"primary",small:""}},[t._v("fa-comments")]),i("strong",[t._v(t._s(e.comments))]),t._v(" "+t._s(t.$t("results.details.comments"))+" ")],1):i("span",[i("v-icon",{staticClass:"mr-2",attrs:{color:"grey",small:""}},[t._v("fa-comments")]),i("strong",[t._v(t._s(e.comments))]),t._v(" "+t._s(t.$t("results.details.comments"))+" ")],1)],1):t._e(),i("v-card-actions",{staticClass:"pa-2 pt-0"},[e.link?i("v-btn",{ref:"nofollow",refInFor:!0,staticClass:"pl-0",attrs:{text:"",color:"primary",href:e.link,target:"_blank"}},[t._v(t._s(t.$t("shared.view")))]):t._e(),e.race&&e.race.race_id?i("v-btn",{staticClass:"pl-0",attrs:{text:"",color:"primary",exact:"",to:{name:"race",params:{id:e.race.event_id,raceId:e.race.race_id}}}},[t._v(t._s(t.$t("profile.feed.view-race")))]):t._e(),i("v-spacer"),t.allowDelete&&(t.adminView||t.me&&e.profile&&t.me.id==e.profile.id)?i("v-btn",{attrs:{small:"",icon:"",color:"error"},on:{click:function(i){return t.deleteFeedItem(e.id)}}},[i("v-icon",{attrs:{small:""}},[t._v("fa-trash")])],1):t._e()],1)],1):e.race&&e.race.result_id?i("v-card",{staticClass:"elevation-1 d-flex flex-row",attrs:{color:"grey lighten-5"}},[e.img?i("div",{staticClass:"flex-shrink-1 pa-2"},[i("img",{staticClass:"feed-image",attrs:{src:e.img}})]):t._e(),i("div",{staticClass:"flex-grow-1 "},[i("v-card-title",{staticClass:"subtitle-1 pa-2 pb-0"},[i("strong",[t._v(t._s(e.race.event_name))])]),i("v-card-text",{staticClass:"pa-2 pb-0"},[t._v(t._s(e.msg))]),i("v-card-actions",{staticClass:"pa-0"},[i("v-btn",{staticClass:"pl-0",attrs:{text:"",color:"primary",exact:"",to:{name:"raceResult",params:{id:e.race.event_id,raceId:e.race.race_id,resultId:e.race.result_id}}}},[t._v(t._s(t.$t("shared.view")))]),i("v-spacer"),t.allowDelete&&t.me&&e.profile&&t.me.id==e.profile.id?i("v-btn",{attrs:{small:"",icon:"",color:"error"},on:{click:function(i){return t.deleteFeedItem(e.id)}}},[i("v-icon",{attrs:{small:""}},[t._v("fa-trash")])],1):t._e(),i("ShareButton",{attrs:{icon:"",text:(e.share_msg||e.msg)+" - Check sodisp.com",color:"primary",route:{name:"raceResult",params:{id:e.race.event_id,raceId:e.race.race_id,resultId:e.race.result_id}}}})],1)],1)]):e.race&&e.race.event_id?i("v-card",{staticClass:"elevation-1 d-flex flex-row",attrs:{color:"grey lighten-5"}},[e.img?i("div",{staticClass:"flex-shrink-1 pa-2"},[i("img",{staticClass:"feed-image",attrs:{src:e.img}})]):t._e(),i("div",{staticClass:"flex-grow-1 "},[i("v-card-title",{staticClass:"subtitle-1 pa-2 pb-0"},[i("strong",[t._v(t._s(e.race.event_name))])]),i("v-card-text",{staticClass:"pa-2 pb-0"},[t._v(t._s(e.msg))]),i("v-card-actions",{staticClass:"pa-0"},[i("v-btn",{staticClass:"pl-0",attrs:{text:"",color:"primary",exact:"",to:{name:"event",params:{id:e.race.event_id}}}},[t._v(t._s(t.$t("shared.view")))]),i("v-spacer"),t.allowDelete&&t.me&&e.profile&&t.me.id==e.profile.id?i("v-btn",{attrs:{small:"",icon:"",color:"error"},on:{click:function(i){return t.deleteFeedItem(e.id)}}},[i("v-icon",{attrs:{small:""}},[t._v("fa-trash")])],1):t._e(),i("ShareButton",{attrs:{icon:"",text:(e.share_msg||e.msg)+" - Check sodisp.com",color:"primary",route:{name:"event",params:{id:e.race.event_id}}}})],1)],1)]):i("v-card",{staticClass:"elevation-1",attrs:{color:"grey lighten-5"}},[t.me&&e.profile&&t.me.id!==e.profile.id||"FEED_ITEM_COMMENT"==e.type?i("div",[e.profile?i("v-list-item",[e.profile&&e.profile.img?i("v-list-item-avatar",[i("v-img",{attrs:{src:e.profile.img}})],1):t._e(),i("v-list-item-title",[t._v(t._s(e.profile.name))])],1):t._e(),e.sender?i("v-list-item",[e.sender.img?i("v-list-item-avatar",[i("v-img",{attrs:{src:e.sender.img}})],1):t._e(),i("v-list-item-title",[t._v(t._s(e.sender.name))])],1):t._e(),i("v-divider")],1):t._e(),i("v-card-text",{staticClass:"pa-2 text-muted"},[t._v(t._s(t._f("localDate")(e.timestamp,"ddd L LTS Z")))]),i("v-card-text",{staticClass:"pa-2"},[t._v(t._s(e.msg))]),i("v-card-actions",{staticClass:"pa-0"},[t.showLikeOption?i("v-btn",{attrs:{text:"",color:"primary"},on:{click:function(i){return t.likeItem(e.id)}}},[i("v-icon",{staticClass:"mr-2",attrs:{color:"primary",small:""}},[t._v("fa-thumbs-up")]),i("strong",[t._v(t._s(e.likes))]),t._v(" "+t._s(t.$t("results.details.likes"))+" ")],1):t._e(),i("v-spacer"),t.showCommentOption?i("v-btn",{attrs:{text:"",color:"primary"},on:{click:function(i){return t.openItemDetails(e)}}},[i("v-icon",{staticClass:"mr-2",attrs:{color:"primary",small:""}},[t._v("fa-comments")]),i("strong",[t._v(t._s(e.comments))]),t._v(" "+t._s(t.$t("results.details.comments"))+" ")],1):t._e(),t.allowDelete?i("v-spacer"):t._e(),t.allowDelete&&t.me&&e.profile&&t.me.id==e.profile.id?i("v-btn",{attrs:{small:"",icon:"",color:"error"},on:{click:function(i){return t.deleteFeedItem(e.id)}}},[i("v-icon",{attrs:{small:""}},[t._v("fa-trash")])],1):t._e()],1)],1)],1)}))]}))],2):i("div",{staticClass:"pa-8"},[i("i",[i("v-icon",[t._v("fa fa-circle-notch fa-spin")]),t._v(" Loading feed...")],1)]),i("v-dialog",{model:{value:t.feedItemDetailsDialog,callback:function(e){t.feedItemDetailsDialog=e},expression:"feedItemDetailsDialog"}},[i("v-card",[i("v-card-title",{staticClass:"subtitle"},[t._v("Comments")]),i("FeedList",{attrs:{feedItems:t.detailsItems,compact:"",emptyLabel:t.$t("results.comments.no-comments-message")}}),i("v-divider"),i("PostCommentField",{staticClass:"pa-2",on:{submit:t.postCommentOnItem}})],1)],1)],1)},n=[],a=(i("13d5"),i("14d9"),i("2f62")),o=i("1315"),r=i("b55c"),l=i("31a7"),c=i("a0b1"),h=i("c3b6"),d={name:"FeedList",components:{ShareButton:r["a"],VueMarkdown:l["a"],PostCommentField:c["a"],ApiVideoPlayer:h["a"]},props:{me:Object,emptyLabel:String,feedItems:Array,allowDelete:Boolean,event:Object,adminView:Boolean,compact:Boolean,getItemCommentsFn:Function,postCommentOnItemFn:Function},data:function(){return{feedItemDetailsDialog:!1,selectedItem:null,detailsItems:null}},created(){},mounted(){},methods:{deleteFeedItem(t){this.$emit("deleteItem",t)},openItemComments(t){this.$emit("openItemComments",t)},async openItemDetails(t){this.detailsItems=null,this.feedItemDetailsDialog=!0,this.selectedItem=t,this.detailsItems=await this.getItemCommentsFn(t.id)},likeItem(t){this.$emit("likeItem",t)},async postCommentOnItem(t){await this.postCommentOnItemFn(this.selectedItem.id,t),this.detailsItems=await this.getItemCommentsFn(this.selectedItem.id)}},computed:{showLikeOption(){return this.$listeners&&this.$listeners.likeItem&&(!this.event||this.event.allow_feed_interactions)},showCommentOption(){return this.getItemCommentsFn&&(!this.event||this.event.allow_feed_interactions)},feedItemsByDate(){var t=this.feedItems.reduce((t,e)=>{const i=o["DateTime"].fromISO(e.timestamp).toISODate();return(t[i]=t[i]||[]).push(e),t},{});const e=[];var i=Object.keys(t);for(var s of(i.sort(),i.reverse(),i))e.push({key:s,data:t[s]});return e},...Object(a["b"])({user:"user"})},watch:{}},u=d,p=(i("6cc6"),i("2877")),f=i("6544"),g=i.n(f),m=i("8336"),v=i("b0af"),b=i("99d9"),_=i("169a"),x=i("ce7e"),y=i("132d"),k=i("adda"),w=i("8860"),C=i("da13"),M=i("8270"),S=i("5d23"),O=i("2fa4"),D=(i("0160"),i("58df")),P=i("7560"),I=Object(D["a"])(P["a"]).extend({name:"v-timeline",provide(){return{timeline:this}},props:{alignTop:Boolean,dense:Boolean,reverse:Boolean},computed:{classes(){return{"v-timeline--align-top":this.alignTop,"v-timeline--dense":this.dense,"v-timeline--reverse":this.reverse,...this.themeClasses}}},render(t){return t("div",{staticClass:"v-timeline",class:this.classes},this.$slots.default)}}),T=i("9d26"),$=i("a9ad");const L=Object(D["a"])($["a"],P["a"]);var E=L.extend().extend({name:"v-timeline-item",inject:["timeline"],props:{color:{type:String,default:"primary"},fillDot:Boolean,hideDot:Boolean,icon:String,iconColor:String,large:Boolean,left:Boolean,right:Boolean,small:Boolean},computed:{hasIcon(){return!!this.icon||!!this.$slots.icon}},methods:{genBody(){return this.$createElement("div",{staticClass:"v-timeline-item__body"},this.$slots.default)},genIcon(){return this.$slots.icon?this.$slots.icon:this.$createElement(T["a"],{props:{color:this.iconColor,dark:!this.theme.isDark,small:this.small}},this.icon)},genInnerDot(){const t=this.setBackgroundColor(this.color);return this.$createElement("div",{staticClass:"v-timeline-item__inner-dot",...t},[this.hasIcon&&this.genIcon()])},genDot(){return this.$createElement("div",{staticClass:"v-timeline-item__dot",class:{"v-timeline-item__dot--small":this.small,"v-timeline-item__dot--large":this.large}},[this.genInnerDot()])},genDivider(){const t=[];return this.hideDot||t.push(this.genDot()),this.$createElement("div",{staticClass:"v-timeline-item__divider"},t)},genOpposite(){return this.$createElement("div",{staticClass:"v-timeline-item__opposite"},this.$slots.opposite)}},render(t){const e=[this.genBody(),this.genDivider()];return this.$slots.opposite&&e.push(this.genOpposite()),t("div",{staticClass:"v-timeline-item",class:{"v-timeline-item--fill-dot":this.fillDot,"v-timeline-item--before":this.timeline.reverse?this.right:this.left,"v-timeline-item--after":this.timeline.reverse?this.left:this.right,...this.themeClasses}},e)}}),A=Object(p["a"])(u,s,n,!1,null,null,null);e["a"]=A.exports;g()(A,{VBtn:m["a"],VCard:v["a"],VCardActions:b["a"],VCardText:b["c"],VCardTitle:b["d"],VDialog:_["a"],VDivider:x["a"],VIcon:y["a"],VImg:k["a"],VList:w["a"],VListItem:C["a"],VListItemAvatar:M["a"],VListItemContent:S["a"],VListItemSubtitle:S["b"],VListItemTitle:S["c"],VSpacer:O["a"],VTimeline:I,VTimelineItem:E})},"35f1":function(t,e,i){"use strict";var s=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",[t.user&&t.activities?t._e():i("v-skeleton-loader",{attrs:{type:"table"}}),t.activities&&t.activities.length>0?i("v-simple-table",{attrs:{"fixed-header":""},scopedSlots:t._u([{key:"default",fn:function(){return[i("thead",[i("tr",[i("th",{staticClass:"text-left"},[t._v(t._s(t.$t("profile.activities.sport")))]),i("th",{staticClass:"text-left"},[t._v(t._s(t.$t("profile.activities.source")))]),i("th",{staticClass:"text-left"},[t._v(t._s(t.$t("profile.activities.date")))]),i("th",{staticClass:"text-left"},[t._v(t._s(t.$t("profile.activities.time")))]),i("th",{staticClass:"text-left"},[t._v(t._s(t.$t("profile.activities.distance")))]),t.profile?i("th",{staticClass:"text-left"},[t._v(t._s(t.$t("profile.activities.results")))]):t._e(),t.profile?i("th",{staticClass:"text-left px-0"},[t._v(" ")]):t._e(),t.profile?i("th",{staticClass:"text-left"},[t._v(" ")]):t._e()])]),i("tbody",t._l(t.activities,(function(e,s){return i("router-link",{key:"act"+s,attrs:{to:{name:"activity",params:{id:e.id}}},scopedSlots:t._u([{key:"default",fn:function(s){var n=s.href,a=s.navigate;return[i("tr",{class:"type--"+e.type,attrs:{href:n},on:{click:a}},[i("td",{staticClass:"pe-0",staticStyle:{width:"30px"}},[i("v-icon",{attrs:{title:e.type}},[t._v(t._s(t.$helpers.getActivityIcon(e.type)))])],1),i("td",{staticClass:"pe-0",staticStyle:{width:"30px"}},[i("v-icon",{attrs:{title:e.prov}},[t._v(t._s(t.$helpers.getProviderIcon(e.prov)))])],1),t.adminMode?i("td",[t._v(t._s(t._f("localDate")(e.start,"L LTS Z")))]):"DAILY_SUMMARY"==e.type?i("td",[t._v(t._s(t._f("localDate")(e.start,"L")))]):i("td",[t._v(t._s(t._f("localDate")(e.start,"L LTS")))]),i("td",[t._v(t._s(t._f("duration")(e.time_s))+" ")]),"DAILY_SUMMARY"==e.type&&e.steps?i("td",[t._v(t._s(t.$t("results.formatting.steps",{value:t.$options.filters.int(e.steps)}))+" ")]):"STAIR_CLIMBING"==e.type?i("td",[t._v(t._s(e.custom)+" stairs ")]):i("td",[t._v(t._s(t._f("distance")(e.dist,t.profile&&t.profile.unit,!1,e.type))+" ")]),t.profile&&e.race_links&&e.race_links.length>0?i("td",{attrs:{set:t.link=e.race_links.find((function(t){return t.val>0}))}},[i("ActivityRaceLink",{attrs:{link:t.link,profile:t.profile}}),e.race_links.length>1?i("span",{staticClass:"text-muted"},[t._v("+ "+t._s(e.race_links.length-1))]):t._e()],1):t.profile?i("td",[i("span",{staticClass:"text-muted"},[t._v(t._s(t.$t("shared.n-a")))])]):t._e(),t.profile?i("td",[t.adminMode?t._e():i("v-btn",{attrs:{text:"",small:"",color:"accent",to:{name:"profileUpload",query:{activityId:e.id}},title:t.$t("profile.upload-photo.upload-photo")}},[i("v-icon",{staticClass:"fa fa-camera-alt",attrs:{small:""}})],1),t.adminMode?t._e():i("v-btn",{attrs:{text:"",small:"",color:"primary",to:{name:"activity",params:{id:e.id}}}},[t._v(t._s(t.$t("shared.view")))]),t.adminMode?i("v-btn",{attrs:{icon:"",small:"",color:"red"},on:{click:function(i){return i.preventDefault(),t.$emit("delete",e)}}},[i("v-icon",{staticClass:"fa fa-trash",attrs:{small:"",color:"red"}})],1):t._e()],1):t._e()])]}}],null,!0)})})),1)]},proxy:!0}],null,!1,1578003462)}):t._e(),i("v-divider"),!t.compact&&t.meta&&t.meta.has_more?i("div",{staticClass:"full-width-separator text-center mt-6"},[i("v-btn",{attrs:{rounded:"",outlined:""},on:{click:t.loadNextPage}},[t._v(t._s(t.$t("shared.load-more-data")))])],1):t._e(),t.activities&&0==t.activities.length?i("v-alert",{attrs:{type:"info",tile:""}},[t._v(" "+t._s(t.$t("profile.activities.no-activities-yet"))+" ")]):t._e()],1)},n=[],a=i("2f62"),o=i("585f"),r=i("56e4"),l=i("a177"),c={name:"ActivityGrid",components:{ActivityRaceLink:l["a"]},props:{limit:Number,compact:Boolean,adminMode:Boolean,profile:Object,autoLoad:{type:Boolean,default:!0},data:Array},data(){return{activities:null,meta:null}},async mounted(){await this.loadData(),o["a"].$on("login-state-change",async t=>{await this.loadData()}),this.data&&this.loadActivities(this.data)},methods:{async loadActivities(t){this.activities=t,this.meta={},console.log("Loading activities",t)},async loadResponse(t){this.activities=t.data,this.meta=t.meta},async loadData(){if(this.user&&this.autoLoad){this.adminMode&&(r["a"].impersonationProfileId=this.profile.id);const t=(await r["a"].all(this.limit)).data;this.meta=t.meta,this.activities=t.data}},async loadNextPage(){this.adminMode&&(r["a"].impersonationProfileId=this.profile.id);const t=(await r["a"].allPaged(this.limit,this.meta.continuation_token)).data;this.meta=t.meta,this.activities=this.activities.concat(t.data)}},computed:{...Object(a["b"])({user:"user"})}},h=c,d=(i("193c"),i("2877")),u=i("6544"),p=i.n(u),f=i("0798"),g=i("8336"),m=i("ce7e"),v=i("132d"),b=i("1f4f"),_=i("3129"),x=Object(d["a"])(h,s,n,!1,null,null,null);e["a"]=x.exports;p()(x,{VAlert:f["a"],VBtn:g["a"],VDivider:m["a"],VIcon:v["a"],VSimpleTable:b["a"],VSkeletonLoader:_["a"]})},"368e":function(t,e,i){},4279:function(t,e,i){"use strict";var s=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",[i("v-toolbar",{attrs:{dark:"",color:"profile"},scopedSlots:t._u([t.focused?null:{key:"extension",fn:function(){return[i("v-tabs",{staticClass:"mx-0",attrs:{"background-color":"profile darken-1","slider-color":"white","show-arrows":""}},t._l(t.tabs,(function(e,s){return i("v-tab",{key:s,attrs:{to:e.to}},[t._v(" "+t._s(e.text)+" ")])})),1)]},proxy:!0}],null,!0)},[i("v-toolbar-title",{staticClass:"ml-4"},[i("router-link",{staticClass:"white--text no-decoration",attrs:{to:{name:"profile"}}},[t._v(t._s(t.title||t.$t("profile.heading")))])],1),i("v-spacer"),i("div",[t._t("default"),t.showEdit?i("v-btn",{staticClass:"mr-0",attrs:{to:{name:"profileEdit"}}},[i("v-icon",{staticClass:"mr-2",attrs:{small:""}},[t._v("fadl fa fa-user-edit")]),t._v(" "+t._s(t.$t("shared.edit"))+" ")],1):t._e(),i("v-menu",{attrs:{"offset-y":""},scopedSlots:t._u([{key:"activator",fn:function(e){var s=e.on,n=e.attrs;return[i("v-btn",t._g(t._b({attrs:{icon:"",title:"More options"}},"v-btn",n,!1),s),[i("v-icon",[t._v("fa-ellipsis-v")])],1)]}}])},[i("v-list",[i("v-list-item",{attrs:{href:t.tenant.profileFaqUrl,target:"_blank"}},[i("v-list-item-icon",[i("v-icon",[t._v("fal fa-question-circle")])],1),i("v-list-item-title",[t._v("FAQ")])],1)],1)],1)],2)],1)],1)},n=[],a=i("4a1f"),o=i.n(a);const r=o.a.current();var l={name:"ProfileHeader",components:{},props:{title:String,focused:Boolean,showEdit:Boolean},data(){return{tenant:r}},async mounted(){},methods:{},computed:{tabs(){return[{text:this.$t("profile.title"),to:{name:"profile"}},{text:this.$t("profile.activities.title-short"),to:{name:"activities"}},{text:this.$t("profile.friends.title"),to:{name:"profileFriends"}},{text:this.$t("app.nav.feed"),to:{name:"profileFeed"}},"wmm"==r.id?null:{text:this.$t("profile.groups.title"),to:{name:"profileGroups"}}].filter(t=>null!=t)}}},c=l,h=i("2877"),d=i("6544"),u=i.n(d),p=i("8336"),f=i("132d"),g=i("8860"),m=i("da13"),v=i("34c3"),b=i("5d23"),_=i("e449"),x=i("2fa4"),y=i("71a3"),k=i("fe57"),w=i("71d9"),C=i("2a7f"),M=Object(h["a"])(c,s,n,!1,null,null,null);e["a"]=M.exports;u()(M,{VBtn:p["a"],VIcon:f["a"],VList:g["a"],VListItem:m["a"],VListItemIcon:v["a"],VListItemTitle:b["c"],VMenu:_["a"],VSpacer:x["a"],VTab:y["a"],VTabs:k["a"],VToolbar:w["a"],VToolbarTitle:C["b"]})},"44e5":function(t,e,i){},"4a00":function(t,e,i){},"4bd4":function(t,e,i){"use strict";i("14d9");var s=i("58df"),n=i("7e2b"),a=i("3206");e["a"]=Object(s["a"])(n["a"],Object(a["b"])("form")).extend({name:"v-form",provide(){return{form:this}},inheritAttrs:!1,props:{disabled:Boolean,lazyValidation:Boolean,readonly:Boolean,value:Boolean},data:()=>({inputs:[],watchers:[],errorBag:{}}),watch:{errorBag:{handler(t){const e=Object.values(t).includes(!0);this.$emit("input",!e)},deep:!0,immediate:!0}},methods:{watchInput(t){const e=t=>t.$watch("hasError",e=>{this.$set(this.errorBag,t._uid,e)},{immediate:!0}),i={_uid:t._uid,valid:()=>{},shouldValidate:()=>{}};return this.lazyValidation?i.shouldValidate=t.$watch("shouldValidate",s=>{s&&(this.errorBag.hasOwnProperty(t._uid)||(i.valid=e(t)))}):i.valid=e(t),i},validate(){return 0===this.inputs.filter(t=>!t.validate(!0)).length},reset(){this.inputs.forEach(t=>t.reset()),this.resetErrorBag()},resetErrorBag(){this.lazyValidation&&setTimeout(()=>{this.errorBag={}},0)},resetValidation(){this.inputs.forEach(t=>t.resetValidation()),this.resetErrorBag()},register(t){this.inputs.push(t),this.watchers.push(this.watchInput(t))},unregister(t){const e=this.inputs.find(e=>e._uid===t._uid);if(!e)return;const i=this.watchers.find(t=>t._uid===e._uid);i&&(i.valid(),i.shouldValidate()),this.watchers=this.watchers.filter(t=>t._uid!==e._uid),this.inputs=this.inputs.filter(t=>t._uid!==e._uid),this.$delete(this.errorBag,e._uid)}},render(t){return t("form",{staticClass:"v-form",attrs:{novalidate:!0,...this.attrs$},on:{submit:t=>this.$emit("submit",t)}},this.$slots.default)}})},"56e4":function(t,e,i){"use strict";var s=i("dde5"),n=(i("4360"),i("b383")),a=i.n(n);e["a"]={impersonationProfileId:null,getConfig(){return{headers:{"x-impersonation-profile-id":this.impersonationProfileId||""}}},all(t){return s["a"].http.get("/v1.0/activity/?limit="+(t||25),this.getConfig())},allPaged(t,e){return s["a"].http.post("/v1.0/activity/",a.a.stringify({limit:t||25,continuationToken:e}),this.getConfig())},get(t){return s["a"].http.get("/v1.0/activity/"+t,this.getConfig())},getQuickEntry(t,e){return s["a"].http.get(`/v1.0/activity/public/${t}/${e}`)},getActivityTypes(){return s["a"].http.get("/v1.0/activity/activity_types",this.getConfig())},getActivityEntryContext(){return s["a"].http.get("/v1.0/activity/entry-context",this.getConfig())},getClaimableBadges(t,e){return s["a"].http.get(`/v1.0/activity/events/${t}/${e}/claimable-badges`,this.getConfig())},claimBadge(t,e,i){return s["a"].http.post(`/v1.0/activity/events/${t}/${e}/claimable-badges/claim`,i,this.getConfig())},connect(t,e){return s["a"].http.post(`/v1.0/activity/${t}/connect`,{event_ids:e},this.getConfig())},delete(t,e){return s["a"].http.delete(`/v1.0/activity/${t}?skipReprocess=${e||!1}`,this.getConfig())},getTilescores(t,e){return s["a"].http.get(`/v1.0/activity/${t}/tilescores?activityType=${e}`,this.getConfig())},upload(t){return s["a"].http.post("/v1.0/activity/upload",t,this.getConfig())},validate(t){return s["a"].http.post("/v1.0/activity/validate",t,this.getConfig())},manualEntry(t,e,i){return s["a"].http.post(`/v1.0/activity/manualentry?ignoreValidation=${e}&limitToEventId=${i||""}`,t,this.getConfig())},edit(t,e){return s["a"].http.put("/v1.0/activity/"+t,e,this.getConfig())},calculateSteps(t,e){return s["a"].http.post("/v1.0/activity/calculate-steps?algo="+(e||""),t,this.getConfig())},zeroDistanceActivities(t){return["YOGA","MIND_BODY","PILATES","WEIGHT_LIFTING","INDOOR_CARDIO","VOLUNTEERING","STAIR_CLIMBING","DAILY_SUMMARY","TENNIS","TEAM_SPORTS","GOLF","CUSTOM","OTHER"].some(e=>e===t.type)},requireDistance(t){return!("INDOOR_CYCLING"===t.type||"INDOOR_RUNNING"===t.type||this.zeroDistanceActivities(t))},validateDistance(t){return t.dist>0||!this.requireDistance(t)||"Please enter a positive number"},validateSteps(t){return t.steps>0||"DAILY_SUMMARY"!==t.type||"Please enter a positive number"}}},6373:function(t,e,i){"use strict";var s=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("img",{staticStyle:{padding:"25px","max-width":"100%"},attrs:{src:"https://api.qrserver.com/v1/create-qr-code/?size=350x350&data="+encodeURIComponent(t.data),width:"400",height:"400"}})},n=[],a={name:"QrCode",components:{},props:{data:String},computed:{}},o=a,r=i("2877"),l=Object(r["a"])(o,s,n,!1,null,null,null);e["a"]=l.exports},"6cc6":function(t,e,i){"use strict";i("44e5")},"81a6":function(t,e,i){"use strict";var s=i("dde5"),n=i("4360"),a=i("b383"),o=i.n(a);e["a"]={getConfig(){return{headers:{authorization:"Bearer "+n["a"].getters.jwtToken}}},get(t,e){return e?s["a"].http.get(`/v1.0/events/${t}?allowDraft=true`,this.getConfig()):s["a"].http.get("/v1.0/events/"+t,this.getConfig())},getList(t){return s["a"].http.post("/v1.0/events/list",t,this.getConfig())},getTileScores(t,e){return s["a"].http.get(`/v1.0/events/${t}/tilescores`,this.getConfig())},getPhotos(t){return s["a"].http.get(`/v1.0/events/${t}/photos`,this.getConfig())},getFeed(t){return s["a"].http.get(`/v1.0/events/${t}/feed`,this.getConfig())},getFeedItemComments(t,e){return s["a"].http.get(`/v1.0/events/${t}/feed/${e}/comments`,this.getConfig())},quickEntry(t,e,i){return s["a"].http.post(`/v1.0/events/${t}/quickentry?ignoreValidation=${i}`,e,this.getConfig())},verifyQuickEntry(t,e){return s["a"].http.post(`/v1.0/events/${t}/quickentry/verify`,e,this.getConfig())},getEventJoinInfo(t){return s["a"].http.get(`/v1.0/events/${t}/codes/info`,this.getConfig())},getJoinInfo(t,e){return s["a"].http.get(`/v1.0/events/${t}/codes/${e}/info`,this.getConfig())},getJoinInfoByEmail(t,e){return s["a"].http.get(`/v1.0/events/${t}/codes/lookup?email=${e}`,this.getConfig())},requestInvite(t,e){return s["a"].http.post(`/v1.0/events/${t}/codes/request-invite`,e,this.getConfig())},getRaceResults(t,e,i,n,a){var r=this.filterToQs(i);return r={...r,q:i?i.search:""},n>1&&(r.page=n),s["a"].http.post(`/v1.0/events/${t}/${e}/results?${o.a.encode(r)}`,o.a.encode(a),this.getConfig())},getRaceMarkers(t,e){return s["a"].http.get(`/v1.0/events/${t}/${e}/markers`)},getRaceBadges(t,e){return s["a"].http.get(`/v1.0/events/${t}/${e}/badges`)},getRaceTiles(t,e){return s["a"].http.get(`/v1.0/events/${t}/${e}/tiles`)},getRaceTileResults(t,e,i){return s["a"].http.get(`/v1.0/events/${t}/${e}/tiles/${i}`)},getRaceBadge(t,e,i){return s["a"].http.get(`/v1.0/events/${t}/${e}/badges/${i}`)},getRaceResultsMeta(t,e){return s["a"].http.get(`/v1.0/events/${t}/${e}/meta`)},exportRaceGpx(t,e){return s["a"].http.get(`/v1.0/events/${t}/${e}/gpx`)},getRaceResultDetails(t,e,i,n){const a=this.filterToQs(n);return s["a"].http.get(`/v1.0/events/${t}/${e}/results/${i}?${o.a.encode(a)}`)},getRaceResultDetailsByCode(t,e,i){return s["a"].http.get(`/v1.0/events/${t}/${e}/result?code=${i}`)},claimRaceResult(t,e,i,n){return s["a"].http.post(`/v1.0/events/${t}/${e}/results/${i}/claim`,n,this.getConfig())},likeResult(t,e,i,n){const a=this.filterToQs(n);return s["a"].http.post(`/v1.0/events/${t}/${e}/results/${i}/like?${o.a.encode(a)}`,{},this.getConfig())},commentResult(t,e,i,n,a){const r=this.filterToQs(n),l={message:a};return s["a"].http.post(`/v1.0/events/${t}/${e}/results/${i}/comments?${o.a.encode(r)}`,o.a.encode(l),this.getConfig())},getRaceResultComments(t,e,i,n){const a=this.filterToQs(n);return s["a"].http.get(`/v1.0/events/${t}/${e}/results/${i}/comments?${o.a.encode(a)}`)},deleteResultComment(t,e,i,n,a){const r=this.filterToQs(n);return s["a"].http.delete(`/v1.0/events/${t}/${e}/results/${i}/comments/${a}?${o.a.encode(r)}`,this.getConfig())},getRaceResultPhotos(t,e,i,n){return s["a"].http.get(`/v1.0/events/${t}/${e}/results/${i}/photos`)},inviteFriend(t,e){return s["a"].http.post(`/v1.0/events/${t}/invite`,e)},submitRegistration(t,e){return s["a"].http.post(`/v1.0/events/${t}/reg`,e,this.getConfig())},getRegistrationSummary(t,e){return s["a"].http.get(`/v1.0/events/${t}/reg/${e}/summary`,this.getConfig())},finalizeRegistration(t,e){return s["a"].http.post(`/v1.0/events/${t}/reg/${e}/finalize`,{},this.getConfig())},filterToQs(t){const e=t&&"onlyOfficialResults"in t&&null!==t.onlyOfficialResults&&"undefined"!==t.onlyOfficialResults&&"*"!==t.onlyOfficialResults,i=t&&!!t.limit&&0!==t.limit,s=t&&"*"!==t.gender,n=t&&t.category&&""!==t.category;console.log("result search filter",t,"hasOfficial",e);var a=s||n?{gender:s&&t.gender||"",category:n&&t.category||""}:{};return e&&(a={...a,official:t.onlyOfficialResults}),i&&(a={...a,limit:t.limit}),a},upcoming(t){return s["a"].http.get("/v1.0/events/all?limit="+(t||50),this.getConfig())},getFeatured(){return s["a"].http.get("/v1.0/events/featured",this.getConfig())},getForTeamsChat(t,e){const i={chatId:e};return s["a"].http.get(`/v1.0/events/teams/${t}/chat?${o.a.encode(i)}`,this.getConfig())},getForTeamsChannel(t,e,i,n){const a={teamId:e,groupId:i,channelId:n};return s["a"].http.get(`/v1.0/events/teams/${t}/channel?${o.a.encode(a)}`,this.getConfig())}}},8900:function(t,e,i){},"8de7":function(t,e,i){"use strict";var s=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",[i("v-row",{attrs:{dense:""}},t._l(t.events||t.items,(function(e,s){return i("v-col",{key:e.o?e.o.id:e.id,attrs:{cols:"12",sm:"6",md:"4",lg:"3"}},[i("EventCard",{attrs:{item:e,minimal:t.minimal,showLogo:t.showLogos,icon:t.icon,routeResolver:t.routeResolver,index:s},on:{click:function(i){t.$listeners&&t.$listeners.itemclick&&t.$emit("itemclick",e.id)}}})],1)})),1)],1)},n=[],a=i("81a6"),o=i("a69d"),r={name:"EventGrid",components:{EventCard:o["a"]},props:{items:Array,eventIds:Array,routeResolver:Function,minimal:Boolean,showLogos:Boolean,icon:String},emits:{},data(){return{events:null}},async mounted(){this.eventIds&&this.eventIds.length&&!this.items&&(this.events=(await a["a"].getList(this.eventIds)).data.data)},methods:{}},l=r,c=i("2877"),h=i("6544"),d=i.n(h),u=i("62ad"),p=i("0fd9"),f=Object(c["a"])(l,s,n,!1,null,null,null);e["a"]=f.exports;d()(f,{VCol:u["a"],VRow:p["a"]})},"99d9":function(t,e,i){"use strict";i.d(e,"a",(function(){return a})),i.d(e,"b",(function(){return o})),i.d(e,"c",(function(){return r})),i.d(e,"d",(function(){return l}));var s=i("b0af"),n=i("80d2");const a=Object(n["j"])("v-card__actions"),o=Object(n["j"])("v-card__subtitle"),r=Object(n["j"])("v-card__text"),l=Object(n["j"])("v-card__title");s["a"]},"9b4a":function(t,e,i){"use strict";i.d(e,"a",(function(){return sn})),i.d(e,"b",(function(){return sr})),i.d(e,"c",(function(){return yo})),i.d(e,"d",(function(){return Pr})),i.d(e,"e",(function(){return sl})),i.d(e,"f",(function(){return yr})),i.d(e,"g",(function(){return mn}));const s=function(){return"undefined"===typeof window?function(t){return t()}:window.requestAnimationFrame}();function n(t,e,i){const n=i||(t=>Array.prototype.slice.call(t));let a=!1,o=[];return function(...i){o=n(i),a||(a=!0,s.call(window,()=>{a=!1,t.apply(e,o)}))}}function a(t,e){let i;return function(...s){return e?(clearTimeout(i),i=setTimeout(t,e,s)):t.apply(this,s),e}}const o=t=>"start"===t?"left":"end"===t?"right":"center",r=(t,e,i)=>"start"===t?e:"end"===t?i:(e+i)/2;function l(){}const c=function(){let t=0;return function(){return t++}}();function h(t){return null===t||"undefined"===typeof t}function d(t){if(Array.isArray&&Array.isArray(t))return!0;const e=Object.prototype.toString.call(t);return"[object"===e.slice(0,7)&&"Array]"===e.slice(-6)}function u(t){return null!==t&&"[object Object]"===Object.prototype.toString.call(t)}const p=t=>("number"===typeof t||t instanceof Number)&&isFinite(+t);function f(t,e){return p(t)?t:e}function g(t,e){return"undefined"===typeof t?e:t}const m=(t,e)=>"string"===typeof t&&t.endsWith("%")?parseFloat(t)/100:t/e,v=(t,e)=>"string"===typeof t&&t.endsWith("%")?parseFloat(t)/100*e:+t;function b(t,e,i){if(t&&"function"===typeof t.call)return t.apply(i,e)}function _(t,e,i,s){let n,a,o;if(d(t))if(a=t.length,s)for(n=a-1;n>=0;n--)e.call(i,t[n],n);else for(n=0;n<a;n++)e.call(i,t[n],n);else if(u(t))for(o=Object.keys(t),a=o.length,n=0;n<a;n++)e.call(i,t[o[n]],o[n])}function x(t,e){let i,s,n,a;if(!t||!e||t.length!==e.length)return!1;for(i=0,s=t.length;i<s;++i)if(n=t[i],a=e[i],n.datasetIndex!==a.datasetIndex||n.index!==a.index)return!1;return!0}function y(t){if(d(t))return t.map(y);if(u(t)){const e=Object.create(null),i=Object.keys(t),s=i.length;let n=0;for(;n<s;++n)e[i[n]]=y(t[i[n]]);return e}return t}function k(t){return-1===["__proto__","prototype","constructor"].indexOf(t)}function w(t,e,i,s){if(!k(t))return;const n=e[t],a=i[t];u(n)&&u(a)?C(n,a,s):e[t]=y(a)}function C(t,e,i){const s=d(e)?e:[e],n=s.length;if(!u(t))return t;i=i||{};const a=i.merger||w;for(let o=0;o<n;++o){if(e=s[o],!u(e))continue;const n=Object.keys(e);for(let s=0,o=n.length;s<o;++s)a(n[s],t,e,i)}return t}function M(t,e){return C(t,e,{merger:S})}function S(t,e,i){if(!k(t))return;const s=e[t],n=i[t];u(s)&&u(n)?M(s,n):Object.prototype.hasOwnProperty.call(e,t)||(e[t]=y(n))}const O="",D=".";function P(t,e){const i=t.indexOf(D,e);return-1===i?t.length:i}function I(t,e){if(e===O)return t;let i=0,s=P(e,i);while(t&&s>i)t=t[e.slice(i,s)],i=s+1,s=P(e,i);return t}function T(t){return t.charAt(0).toUpperCase()+t.slice(1)}const $=t=>"undefined"!==typeof t,L=t=>"function"===typeof t,E=(t,e)=>{if(t.size!==e.size)return!1;for(const i of t)if(!e.has(i))return!1;return!0};function A(t){return"mouseup"===t.type||"click"===t.type||"contextmenu"===t.type}const R=Math.PI,V=2*R,F=V+R,B=Number.POSITIVE_INFINITY,z=R/180,j=R/2,N=R/4,W=2*R/3,H=Math.log10,U=Math.sign;function q(t){const e=Math.round(t);t=X(t,e,t/1e3)?e:t;const i=Math.pow(10,Math.floor(H(t))),s=t/i,n=s<=1?1:s<=2?2:s<=5?5:10;return n*i}function Y(t){const e=[],i=Math.sqrt(t);let s;for(s=1;s<i;s++)t%s===0&&(e.push(s),e.push(t/s));return i===(0|i)&&e.push(i),e.sort((t,e)=>t-e).pop(),e}function G(t){return!isNaN(parseFloat(t))&&isFinite(t)}function X(t,e,i){return Math.abs(t-e)<i}function Q(t,e){const i=Math.round(t);return i-e<=t&&i+e>=t}function K(t,e,i){let s,n,a;for(s=0,n=t.length;s<n;s++)a=t[s][i],isNaN(a)||(e.min=Math.min(e.min,a),e.max=Math.max(e.max,a))}function Z(t){return t*(R/180)}function J(t){return t*(180/R)}function tt(t){if(!p(t))return;let e=1,i=0;while(Math.round(t*e)/e!==t)e*=10,i++;return i}function et(t,e){const i=e.x-t.x,s=e.y-t.y,n=Math.sqrt(i*i+s*s);let a=Math.atan2(s,i);return a<-.5*R&&(a+=V),{angle:a,distance:n}}function it(t,e){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function st(t,e){return(t-e+F)%V-R}function nt(t){return(t%V+V)%V}function at(t,e,i,s){const n=nt(t),a=nt(e),o=nt(i),r=nt(a-n),l=nt(o-n),c=nt(n-a),h=nt(n-o);return n===a||n===o||s&&a===o||r>l&&c<h}function ot(t,e,i){return Math.max(e,Math.min(i,t))}function rt(t){return ot(t,-32768,32767)}function lt(t,e,i,s=1e-6){return t>=Math.min(e,i)-s&&t<=Math.max(e,i)+s}const ct=t=>0===t||1===t,ht=(t,e,i)=>-Math.pow(2,10*(t-=1))*Math.sin((t-e)*V/i),dt=(t,e,i)=>Math.pow(2,-10*t)*Math.sin((t-e)*V/i)+1,ut={linear:t=>t,easeInQuad:t=>t*t,easeOutQuad:t=>-t*(t-2),easeInOutQuad:t=>(t/=.5)<1?.5*t*t:-.5*(--t*(t-2)-1),easeInCubic:t=>t*t*t,easeOutCubic:t=>(t-=1)*t*t+1,easeInOutCubic:t=>(t/=.5)<1?.5*t*t*t:.5*((t-=2)*t*t+2),easeInQuart:t=>t*t*t*t,easeOutQuart:t=>-((t-=1)*t*t*t-1),easeInOutQuart:t=>(t/=.5)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2),easeInQuint:t=>t*t*t*t*t,easeOutQuint:t=>(t-=1)*t*t*t*t+1,easeInOutQuint:t=>(t/=.5)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2),easeInSine:t=>1-Math.cos(t*j),easeOutSine:t=>Math.sin(t*j),easeInOutSine:t=>-.5*(Math.cos(R*t)-1),easeInExpo:t=>0===t?0:Math.pow(2,10*(t-1)),easeOutExpo:t=>1===t?1:1-Math.pow(2,-10*t),easeInOutExpo:t=>ct(t)?t:t<.5?.5*Math.pow(2,10*(2*t-1)):.5*(2-Math.pow(2,-10*(2*t-1))),easeInCirc:t=>t>=1?t:-(Math.sqrt(1-t*t)-1),easeOutCirc:t=>Math.sqrt(1-(t-=1)*t),easeInOutCirc:t=>(t/=.5)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1),easeInElastic:t=>ct(t)?t:ht(t,.075,.3),easeOutElastic:t=>ct(t)?t:dt(t,.075,.3),easeInOutElastic(t){const e=.1125,i=.45;return ct(t)?t:t<.5?.5*ht(2*t,e,i):.5+.5*dt(2*t-1,e,i)},easeInBack(t){const e=1.70158;return t*t*((e+1)*t-e)},easeOutBack(t){const e=1.70158;return(t-=1)*t*((e+1)*t+e)+1},easeInOutBack(t){let e=1.70158;return(t/=.5)<1?t*t*((1+(e*=1.525))*t-e)*.5:.5*((t-=2)*t*((1+(e*=1.525))*t+e)+2)},easeInBounce:t=>1-ut.easeOutBounce(1-t),easeOutBounce(t){const e=7.5625,i=2.75;return t<1/i?e*t*t:t<2/i?e*(t-=1.5/i)*t+.75:t<2.5/i?e*(t-=2.25/i)*t+.9375:e*(t-=2.625/i)*t+.984375},easeInOutBounce:t=>t<.5?.5*ut.easeInBounce(2*t):.5*ut.easeOutBounce(2*t-1)+.5};
/*!
 * @kurkle/color v0.2.1
 * https://github.com/kurkle/color#readme
 * (c) 2022 Jukka Kurkela
 * Released under the MIT License
 */
function pt(t){return t+.5|0}const ft=(t,e,i)=>Math.max(Math.min(t,i),e);function gt(t){return ft(pt(2.55*t),0,255)}function mt(t){return ft(pt(255*t),0,255)}function vt(t){return ft(pt(t/2.55)/100,0,1)}function bt(t){return ft(pt(100*t),0,100)}const _t={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15},xt=[..."0123456789ABCDEF"],yt=t=>xt[15&t],kt=t=>xt[(240&t)>>4]+xt[15&t],wt=t=>(240&t)>>4===(15&t),Ct=t=>wt(t.r)&&wt(t.g)&&wt(t.b)&&wt(t.a);function Mt(t){var e,i=t.length;return"#"===t[0]&&(4===i||5===i?e={r:255&17*_t[t[1]],g:255&17*_t[t[2]],b:255&17*_t[t[3]],a:5===i?17*_t[t[4]]:255}:7!==i&&9!==i||(e={r:_t[t[1]]<<4|_t[t[2]],g:_t[t[3]]<<4|_t[t[4]],b:_t[t[5]]<<4|_t[t[6]],a:9===i?_t[t[7]]<<4|_t[t[8]]:255})),e}const St=(t,e)=>t<255?e(t):"";function Ot(t){var e=Ct(t)?yt:kt;return t?"#"+e(t.r)+e(t.g)+e(t.b)+St(t.a,e):void 0}const Dt=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function Pt(t,e,i){const s=e*Math.min(i,1-i),n=(e,n=(e+t/30)%12)=>i-s*Math.max(Math.min(n-3,9-n,1),-1);return[n(0),n(8),n(4)]}function It(t,e,i){const s=(s,n=(s+t/60)%6)=>i-i*e*Math.max(Math.min(n,4-n,1),0);return[s(5),s(3),s(1)]}function Tt(t,e,i){const s=Pt(t,1,.5);let n;for(e+i>1&&(n=1/(e+i),e*=n,i*=n),n=0;n<3;n++)s[n]*=1-e-i,s[n]+=e;return s}function $t(t,e,i,s,n){return t===n?(e-i)/s+(e<i?6:0):e===n?(i-t)/s+2:(t-e)/s+4}function Lt(t){const e=255,i=t.r/e,s=t.g/e,n=t.b/e,a=Math.max(i,s,n),o=Math.min(i,s,n),r=(a+o)/2;let l,c,h;return a!==o&&(h=a-o,c=r>.5?h/(2-a-o):h/(a+o),l=$t(i,s,n,h,a),l=60*l+.5),[0|l,c||0,r]}function Et(t,e,i,s){return(Array.isArray(e)?t(e[0],e[1],e[2]):t(e,i,s)).map(mt)}function At(t,e,i){return Et(Pt,t,e,i)}function Rt(t,e,i){return Et(Tt,t,e,i)}function Vt(t,e,i){return Et(It,t,e,i)}function Ft(t){return(t%360+360)%360}function Bt(t){const e=Dt.exec(t);let i,s=255;if(!e)return;e[5]!==i&&(s=e[6]?gt(+e[5]):mt(+e[5]));const n=Ft(+e[2]),a=+e[3]/100,o=+e[4]/100;return i="hwb"===e[1]?Rt(n,a,o):"hsv"===e[1]?Vt(n,a,o):At(n,a,o),{r:i[0],g:i[1],b:i[2],a:s}}function zt(t,e){var i=Lt(t);i[0]=Ft(i[0]+e),i=At(i),t.r=i[0],t.g=i[1],t.b=i[2]}function jt(t){if(!t)return;const e=Lt(t),i=e[0],s=bt(e[1]),n=bt(e[2]);return t.a<255?`hsla(${i}, ${s}%, ${n}%, ${vt(t.a)})`:`hsl(${i}, ${s}%, ${n}%)`}const Nt={x:"dark",Z:"light",Y:"re",X:"blu",W:"gr",V:"medium",U:"slate",A:"ee",T:"ol",S:"or",B:"ra",C:"lateg",D:"ights",R:"in",Q:"turquois",E:"hi",P:"ro",O:"al",N:"le",M:"de",L:"yello",F:"en",K:"ch",G:"arks",H:"ea",I:"ightg",J:"wh"},Wt={OiceXe:"f0f8ff",antiquewEte:"faebd7",aqua:"ffff",aquamarRe:"7fffd4",azuY:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"0",blanKedOmond:"ffebcd",Xe:"ff",XeviTet:"8a2be2",bPwn:"a52a2a",burlywood:"deb887",caMtXe:"5f9ea0",KartYuse:"7fff00",KocTate:"d2691e",cSO:"ff7f50",cSnflowerXe:"6495ed",cSnsilk:"fff8dc",crimson:"dc143c",cyan:"ffff",xXe:"8b",xcyan:"8b8b",xgTMnPd:"b8860b",xWay:"a9a9a9",xgYF:"6400",xgYy:"a9a9a9",xkhaki:"bdb76b",xmagFta:"8b008b",xTivegYF:"556b2f",xSange:"ff8c00",xScEd:"9932cc",xYd:"8b0000",xsOmon:"e9967a",xsHgYF:"8fbc8f",xUXe:"483d8b",xUWay:"2f4f4f",xUgYy:"2f4f4f",xQe:"ced1",xviTet:"9400d3",dAppRk:"ff1493",dApskyXe:"bfff",dimWay:"696969",dimgYy:"696969",dodgerXe:"1e90ff",fiYbrick:"b22222",flSOwEte:"fffaf0",foYstWAn:"228b22",fuKsia:"ff00ff",gaRsbSo:"dcdcdc",ghostwEte:"f8f8ff",gTd:"ffd700",gTMnPd:"daa520",Way:"808080",gYF:"8000",gYFLw:"adff2f",gYy:"808080",honeyMw:"f0fff0",hotpRk:"ff69b4",RdianYd:"cd5c5c",Rdigo:"4b0082",ivSy:"fffff0",khaki:"f0e68c",lavFMr:"e6e6fa",lavFMrXsh:"fff0f5",lawngYF:"7cfc00",NmoncEffon:"fffacd",ZXe:"add8e6",ZcSO:"f08080",Zcyan:"e0ffff",ZgTMnPdLw:"fafad2",ZWay:"d3d3d3",ZgYF:"90ee90",ZgYy:"d3d3d3",ZpRk:"ffb6c1",ZsOmon:"ffa07a",ZsHgYF:"20b2aa",ZskyXe:"87cefa",ZUWay:"778899",ZUgYy:"778899",ZstAlXe:"b0c4de",ZLw:"ffffe0",lime:"ff00",limegYF:"32cd32",lRF:"faf0e6",magFta:"ff00ff",maPon:"800000",VaquamarRe:"66cdaa",VXe:"cd",VScEd:"ba55d3",VpurpN:"9370db",VsHgYF:"3cb371",VUXe:"7b68ee",VsprRggYF:"fa9a",VQe:"48d1cc",VviTetYd:"c71585",midnightXe:"191970",mRtcYam:"f5fffa",mistyPse:"ffe4e1",moccasR:"ffe4b5",navajowEte:"ffdead",navy:"80",Tdlace:"fdf5e6",Tive:"808000",TivedBb:"6b8e23",Sange:"ffa500",SangeYd:"ff4500",ScEd:"da70d6",pOegTMnPd:"eee8aa",pOegYF:"98fb98",pOeQe:"afeeee",pOeviTetYd:"db7093",papayawEp:"ffefd5",pHKpuff:"ffdab9",peru:"cd853f",pRk:"ffc0cb",plum:"dda0dd",powMrXe:"b0e0e6",purpN:"800080",YbeccapurpN:"663399",Yd:"ff0000",Psybrown:"bc8f8f",PyOXe:"4169e1",saddNbPwn:"8b4513",sOmon:"fa8072",sandybPwn:"f4a460",sHgYF:"2e8b57",sHshell:"fff5ee",siFna:"a0522d",silver:"c0c0c0",skyXe:"87ceeb",UXe:"6a5acd",UWay:"708090",UgYy:"708090",snow:"fffafa",sprRggYF:"ff7f",stAlXe:"4682b4",tan:"d2b48c",teO:"8080",tEstN:"d8bfd8",tomato:"ff6347",Qe:"40e0d0",viTet:"ee82ee",JHt:"f5deb3",wEte:"ffffff",wEtesmoke:"f5f5f5",Lw:"ffff00",LwgYF:"9acd32"};function Ht(){const t={},e=Object.keys(Wt),i=Object.keys(Nt);let s,n,a,o,r;for(s=0;s<e.length;s++){for(o=r=e[s],n=0;n<i.length;n++)a=i[n],r=r.replace(a,Nt[a]);a=parseInt(Wt[o],16),t[r]=[a>>16&255,a>>8&255,255&a]}return t}let Ut;function qt(t){Ut||(Ut=Ht(),Ut.transparent=[0,0,0,0]);const e=Ut[t.toLowerCase()];return e&&{r:e[0],g:e[1],b:e[2],a:4===e.length?e[3]:255}}const Yt=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;function Gt(t){const e=Yt.exec(t);let i,s,n,a=255;if(e){if(e[7]!==i){const t=+e[7];a=e[8]?gt(t):ft(255*t,0,255)}return i=+e[1],s=+e[3],n=+e[5],i=255&(e[2]?gt(i):ft(i,0,255)),s=255&(e[4]?gt(s):ft(s,0,255)),n=255&(e[6]?gt(n):ft(n,0,255)),{r:i,g:s,b:n,a:a}}}function Xt(t){return t&&(t.a<255?`rgba(${t.r}, ${t.g}, ${t.b}, ${vt(t.a)})`:`rgb(${t.r}, ${t.g}, ${t.b})`)}const Qt=t=>t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055,Kt=t=>t<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4);function Zt(t,e,i){const s=Kt(vt(t.r)),n=Kt(vt(t.g)),a=Kt(vt(t.b));return{r:mt(Qt(s+i*(Kt(vt(e.r))-s))),g:mt(Qt(n+i*(Kt(vt(e.g))-n))),b:mt(Qt(a+i*(Kt(vt(e.b))-a))),a:t.a+i*(e.a-t.a)}}function Jt(t,e,i){if(t){let s=Lt(t);s[e]=Math.max(0,Math.min(s[e]+s[e]*i,0===e?360:1)),s=At(s),t.r=s[0],t.g=s[1],t.b=s[2]}}function te(t,e){return t?Object.assign(e||{},t):t}function ee(t){var e={r:0,g:0,b:0,a:255};return Array.isArray(t)?t.length>=3&&(e={r:t[0],g:t[1],b:t[2],a:255},t.length>3&&(e.a=mt(t[3]))):(e=te(t,{r:0,g:0,b:0,a:1}),e.a=mt(e.a)),e}function ie(t){return"r"===t.charAt(0)?Gt(t):Bt(t)}class se{constructor(t){if(t instanceof se)return t;const e=typeof t;let i;"object"===e?i=ee(t):"string"===e&&(i=Mt(t)||qt(t)||ie(t)),this._rgb=i,this._valid=!!i}get valid(){return this._valid}get rgb(){var t=te(this._rgb);return t&&(t.a=vt(t.a)),t}set rgb(t){this._rgb=ee(t)}rgbString(){return this._valid?Xt(this._rgb):void 0}hexString(){return this._valid?Ot(this._rgb):void 0}hslString(){return this._valid?jt(this._rgb):void 0}mix(t,e){if(t){const i=this.rgb,s=t.rgb;let n;const a=e===n?.5:e,o=2*a-1,r=i.a-s.a,l=((o*r===-1?o:(o+r)/(1+o*r))+1)/2;n=1-l,i.r=255&l*i.r+n*s.r+.5,i.g=255&l*i.g+n*s.g+.5,i.b=255&l*i.b+n*s.b+.5,i.a=a*i.a+(1-a)*s.a,this.rgb=i}return this}interpolate(t,e){return t&&(this._rgb=Zt(this._rgb,t._rgb,e)),this}clone(){return new se(this.rgb)}alpha(t){return this._rgb.a=mt(t),this}clearer(t){const e=this._rgb;return e.a*=1-t,this}greyscale(){const t=this._rgb,e=pt(.3*t.r+.59*t.g+.11*t.b);return t.r=t.g=t.b=e,this}opaquer(t){const e=this._rgb;return e.a*=1+t,this}negate(){const t=this._rgb;return t.r=255-t.r,t.g=255-t.g,t.b=255-t.b,this}lighten(t){return Jt(this._rgb,2,t),this}darken(t){return Jt(this._rgb,2,-t),this}saturate(t){return Jt(this._rgb,1,t),this}desaturate(t){return Jt(this._rgb,1,-t),this}rotate(t){return zt(this._rgb,t),this}}function ne(t){return new se(t)}function ae(t){if(t&&"object"===typeof t){const e=t.toString();return"[object CanvasPattern]"===e||"[object CanvasGradient]"===e}return!1}function oe(t){return ae(t)?t:ne(t)}function re(t){return ae(t)?t:ne(t).saturate(.5).darken(.1).hexString()}const le=Object.create(null),ce=Object.create(null);function he(t,e){if(!e)return t;const i=e.split(".");for(let s=0,n=i.length;s<n;++s){const e=i[s];t=t[e]||(t[e]=Object.create(null))}return t}function de(t,e,i){return"string"===typeof e?C(he(t,e),i):C(he(t,""),e)}class ue{constructor(t){this.animation=void 0,this.backgroundColor="rgba(0,0,0,0.1)",this.borderColor="rgba(0,0,0,0.1)",this.color="#666",this.datasets={},this.devicePixelRatio=t=>t.chart.platform.getDevicePixelRatio(),this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(t,e)=>re(e.backgroundColor),this.hoverBorderColor=(t,e)=>re(e.borderColor),this.hoverColor=(t,e)=>re(e.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0,includeInvisible:!1},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(t)}set(t,e){return de(this,t,e)}get(t){return he(this,t)}describe(t,e){return de(ce,t,e)}override(t,e){return de(le,t,e)}route(t,e,i,s){const n=he(this,t),a=he(this,i),o="_"+e;Object.defineProperties(n,{[o]:{value:n[e],writable:!0},[e]:{enumerable:!0,get(){const t=this[o],e=a[s];return u(t)?Object.assign({},e,t):g(t,e)},set(t){this[o]=t}}})}}var pe=new ue({_scriptable:t=>!t.startsWith("on"),_indexable:t=>"events"!==t,hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}});function fe(t){return!t||h(t.size)||h(t.family)?null:(t.style?t.style+" ":"")+(t.weight?t.weight+" ":"")+t.size+"px "+t.family}function ge(t,e,i,s,n){let a=e[n];return a||(a=e[n]=t.measureText(n).width,i.push(n)),a>s&&(s=a),s}function me(t,e,i,s){s=s||{};let n=s.data=s.data||{},a=s.garbageCollect=s.garbageCollect||[];s.font!==e&&(n=s.data={},a=s.garbageCollect=[],s.font=e),t.save(),t.font=e;let o=0;const r=i.length;let l,c,h,u,p;for(l=0;l<r;l++)if(u=i[l],void 0!==u&&null!==u&&!0!==d(u))o=ge(t,n,a,o,u);else if(d(u))for(c=0,h=u.length;c<h;c++)p=u[c],void 0===p||null===p||d(p)||(o=ge(t,n,a,o,p));t.restore();const f=a.length/2;if(f>i.length){for(l=0;l<f;l++)delete n[a[l]];a.splice(0,f)}return o}function ve(t,e,i){const s=t.currentDevicePixelRatio,n=0!==i?Math.max(i/2,.5):0;return Math.round((e-n)*s)/s+n}function be(t,e){e=e||t.getContext("2d"),e.save(),e.resetTransform(),e.clearRect(0,0,t.width,t.height),e.restore()}function _e(t,e,i,s){let n,a,o,r,l;const c=e.pointStyle,h=e.rotation,d=e.radius;let u=(h||0)*z;if(c&&"object"===typeof c&&(n=c.toString(),"[object HTMLImageElement]"===n||"[object HTMLCanvasElement]"===n))return t.save(),t.translate(i,s),t.rotate(u),t.drawImage(c,-c.width/2,-c.height/2,c.width,c.height),void t.restore();if(!(isNaN(d)||d<=0)){switch(t.beginPath(),c){default:t.arc(i,s,d,0,V),t.closePath();break;case"triangle":t.moveTo(i+Math.sin(u)*d,s-Math.cos(u)*d),u+=W,t.lineTo(i+Math.sin(u)*d,s-Math.cos(u)*d),u+=W,t.lineTo(i+Math.sin(u)*d,s-Math.cos(u)*d),t.closePath();break;case"rectRounded":l=.516*d,r=d-l,a=Math.cos(u+N)*r,o=Math.sin(u+N)*r,t.arc(i-a,s-o,l,u-R,u-j),t.arc(i+o,s-a,l,u-j,u),t.arc(i+a,s+o,l,u,u+j),t.arc(i-o,s+a,l,u+j,u+R),t.closePath();break;case"rect":if(!h){r=Math.SQRT1_2*d,t.rect(i-r,s-r,2*r,2*r);break}u+=N;case"rectRot":a=Math.cos(u)*d,o=Math.sin(u)*d,t.moveTo(i-a,s-o),t.lineTo(i+o,s-a),t.lineTo(i+a,s+o),t.lineTo(i-o,s+a),t.closePath();break;case"crossRot":u+=N;case"cross":a=Math.cos(u)*d,o=Math.sin(u)*d,t.moveTo(i-a,s-o),t.lineTo(i+a,s+o),t.moveTo(i+o,s-a),t.lineTo(i-o,s+a);break;case"star":a=Math.cos(u)*d,o=Math.sin(u)*d,t.moveTo(i-a,s-o),t.lineTo(i+a,s+o),t.moveTo(i+o,s-a),t.lineTo(i-o,s+a),u+=N,a=Math.cos(u)*d,o=Math.sin(u)*d,t.moveTo(i-a,s-o),t.lineTo(i+a,s+o),t.moveTo(i+o,s-a),t.lineTo(i-o,s+a);break;case"line":a=Math.cos(u)*d,o=Math.sin(u)*d,t.moveTo(i-a,s-o),t.lineTo(i+a,s+o);break;case"dash":t.moveTo(i,s),t.lineTo(i+Math.cos(u)*d,s+Math.sin(u)*d);break}t.fill(),e.borderWidth>0&&t.stroke()}}function xe(t,e,i){return i=i||.5,!e||t&&t.x>e.left-i&&t.x<e.right+i&&t.y>e.top-i&&t.y<e.bottom+i}function ye(t,e){t.save(),t.beginPath(),t.rect(e.left,e.top,e.right-e.left,e.bottom-e.top),t.clip()}function ke(t){t.restore()}function we(t,e,i,s,n){if(!e)return t.lineTo(i.x,i.y);if("middle"===n){const s=(e.x+i.x)/2;t.lineTo(s,e.y),t.lineTo(s,i.y)}else"after"===n!==!!s?t.lineTo(e.x,i.y):t.lineTo(i.x,e.y);t.lineTo(i.x,i.y)}function Ce(t,e,i,s){if(!e)return t.lineTo(i.x,i.y);t.bezierCurveTo(s?e.cp1x:e.cp2x,s?e.cp1y:e.cp2y,s?i.cp2x:i.cp1x,s?i.cp2y:i.cp1y,i.x,i.y)}function Me(t,e,i,s,n,a={}){const o=d(e)?e:[e],r=a.strokeWidth>0&&""!==a.strokeColor;let l,c;for(t.save(),t.font=n.string,Se(t,a),l=0;l<o.length;++l)c=o[l],r&&(a.strokeColor&&(t.strokeStyle=a.strokeColor),h(a.strokeWidth)||(t.lineWidth=a.strokeWidth),t.strokeText(c,i,s,a.maxWidth)),t.fillText(c,i,s,a.maxWidth),Oe(t,i,s,c,a),s+=n.lineHeight;t.restore()}function Se(t,e){e.translation&&t.translate(e.translation[0],e.translation[1]),h(e.rotation)||t.rotate(e.rotation),e.color&&(t.fillStyle=e.color),e.textAlign&&(t.textAlign=e.textAlign),e.textBaseline&&(t.textBaseline=e.textBaseline)}function Oe(t,e,i,s,n){if(n.strikethrough||n.underline){const a=t.measureText(s),o=e-a.actualBoundingBoxLeft,r=e+a.actualBoundingBoxRight,l=i-a.actualBoundingBoxAscent,c=i+a.actualBoundingBoxDescent,h=n.strikethrough?(l+c)/2:c;t.strokeStyle=t.fillStyle,t.beginPath(),t.lineWidth=n.decorationWidth||2,t.moveTo(o,h),t.lineTo(r,h),t.stroke()}}function De(t,e){const{x:i,y:s,w:n,h:a,radius:o}=e;t.arc(i+o.topLeft,s+o.topLeft,o.topLeft,-j,R,!0),t.lineTo(i,s+a-o.bottomLeft),t.arc(i+o.bottomLeft,s+a-o.bottomLeft,o.bottomLeft,R,j,!0),t.lineTo(i+n-o.bottomRight,s+a),t.arc(i+n-o.bottomRight,s+a-o.bottomRight,o.bottomRight,j,0,!0),t.lineTo(i+n,s+o.topRight),t.arc(i+n-o.topRight,s+o.topRight,o.topRight,0,-j,!0),t.lineTo(i+o.topLeft,s)}const Pe=new RegExp(/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/),Ie=new RegExp(/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/);function Te(t,e){const i=(""+t).match(Pe);if(!i||"normal"===i[1])return 1.2*e;switch(t=+i[2],i[3]){case"px":return t;case"%":t/=100;break}return e*t}const $e=t=>+t||0;function Le(t,e){const i={},s=u(e),n=s?Object.keys(e):e,a=u(t)?s?i=>g(t[i],t[e[i]]):e=>t[e]:()=>t;for(const o of n)i[o]=$e(a(o));return i}function Ee(t){return Le(t,{top:"y",right:"x",bottom:"y",left:"x"})}function Ae(t){return Le(t,["topLeft","topRight","bottomLeft","bottomRight"])}function Re(t){const e=Ee(t);return e.width=e.left+e.right,e.height=e.top+e.bottom,e}function Ve(t,e){t=t||{},e=e||pe.font;let i=g(t.size,e.size);"string"===typeof i&&(i=parseInt(i,10));let s=g(t.style,e.style);s&&!(""+s).match(Ie)&&(console.warn('Invalid font style specified: "'+s+'"'),s="");const n={family:g(t.family,e.family),lineHeight:Te(g(t.lineHeight,e.lineHeight),i),size:i,style:s,weight:g(t.weight,e.weight),string:""};return n.string=fe(n),n}function Fe(t,e,i,s){let n,a,o,r=!0;for(n=0,a=t.length;n<a;++n)if(o=t[n],void 0!==o&&(void 0!==e&&"function"===typeof o&&(o=o(e),r=!1),void 0!==i&&d(o)&&(o=o[i%o.length],r=!1),void 0!==o))return s&&!r&&(s.cacheable=!1),o}function Be(t,e,i){const{min:s,max:n}=t,a=v(e,(n-s)/2),o=(t,e)=>i&&0===t?0:t+e;return{min:o(s,-Math.abs(a)),max:o(n,a)}}function ze(t,e){return Object.assign(Object.create(t),e)}function je(t,e,i){i=i||(i=>t[i]<e);let s,n=t.length-1,a=0;while(n-a>1)s=a+n>>1,i(s)?a=s:n=s;return{lo:a,hi:n}}const Ne=(t,e,i)=>je(t,i,s=>t[s][e]<i),We=(t,e,i)=>je(t,i,s=>t[s][e]>=i);function He(t,e,i){let s=0,n=t.length;while(s<n&&t[s]<e)s++;while(n>s&&t[n-1]>i)n--;return s>0||n<t.length?t.slice(s,n):t}const Ue=["push","pop","shift","splice","unshift"];function qe(t,e){t._chartjs?t._chartjs.listeners.push(e):(Object.defineProperty(t,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[e]}}),Ue.forEach(e=>{const i="_onData"+T(e),s=t[e];Object.defineProperty(t,e,{configurable:!0,enumerable:!1,value(...e){const n=s.apply(this,e);return t._chartjs.listeners.forEach(t=>{"function"===typeof t[i]&&t[i](...e)}),n}})}))}function Ye(t,e){const i=t._chartjs;if(!i)return;const s=i.listeners,n=s.indexOf(e);-1!==n&&s.splice(n,1),s.length>0||(Ue.forEach(e=>{delete t[e]}),delete t._chartjs)}function Ge(t){const e=new Set;let i,s;for(i=0,s=t.length;i<s;++i)e.add(t[i]);return e.size===s?t:Array.from(e)}function Xe(t,e=[""],i=t,s,n=(()=>t[0])){$(s)||(s=di("_fallback",t));const a={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:t,_rootScopes:i,_fallback:s,_getTarget:n,override:n=>Xe([n,...t],e,i,s)};return new Proxy(a,{deleteProperty(e,i){return delete e[i],delete e._keys,delete t[0][i],!0},get(i,s){return ti(i,s,()=>hi(s,e,t,i))},getOwnPropertyDescriptor(t,e){return Reflect.getOwnPropertyDescriptor(t._scopes[0],e)},getPrototypeOf(){return Reflect.getPrototypeOf(t[0])},has(t,e){return ui(t).includes(e)},ownKeys(t){return ui(t)},set(t,e,i){const s=t._storage||(t._storage=n());return t[e]=s[e]=i,delete t._keys,!0}})}function Qe(t,e,i,s){const n={_cacheable:!1,_proxy:t,_context:e,_subProxy:i,_stack:new Set,_descriptors:Ke(t,s),setContext:e=>Qe(t,e,i,s),override:n=>Qe(t.override(n),e,i,s)};return new Proxy(n,{deleteProperty(e,i){return delete e[i],delete t[i],!0},get(t,e,i){return ti(t,e,()=>ei(t,e,i))},getOwnPropertyDescriptor(e,i){return e._descriptors.allKeys?Reflect.has(t,i)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(t,i)},getPrototypeOf(){return Reflect.getPrototypeOf(t)},has(e,i){return Reflect.has(t,i)},ownKeys(){return Reflect.ownKeys(t)},set(e,i,s){return t[i]=s,delete e[i],!0}})}function Ke(t,e={scriptable:!0,indexable:!0}){const{_scriptable:i=e.scriptable,_indexable:s=e.indexable,_allKeys:n=e.allKeys}=t;return{allKeys:n,scriptable:i,indexable:s,isScriptable:L(i)?i:()=>i,isIndexable:L(s)?s:()=>s}}const Ze=(t,e)=>t?t+T(e):e,Je=(t,e)=>u(e)&&"adapters"!==t&&(null===Object.getPrototypeOf(e)||e.constructor===Object);function ti(t,e,i){if(Object.prototype.hasOwnProperty.call(t,e))return t[e];const s=i();return t[e]=s,s}function ei(t,e,i){const{_proxy:s,_context:n,_subProxy:a,_descriptors:o}=t;let r=s[e];return L(r)&&o.isScriptable(e)&&(r=ii(e,r,t,i)),d(r)&&r.length&&(r=si(e,r,t,o.isIndexable)),Je(e,r)&&(r=Qe(r,n,a&&a[e],o)),r}function ii(t,e,i,s){const{_proxy:n,_context:a,_subProxy:o,_stack:r}=i;if(r.has(t))throw new Error("Recursion detected: "+Array.from(r).join("->")+"->"+t);return r.add(t),e=e(a,o||s),r.delete(t),Je(t,e)&&(e=ri(n._scopes,n,t,e)),e}function si(t,e,i,s){const{_proxy:n,_context:a,_subProxy:o,_descriptors:r}=i;if($(a.index)&&s(t))e=e[a.index%e.length];else if(u(e[0])){const i=e,s=n._scopes.filter(t=>t!==i);e=[];for(const l of i){const i=ri(s,n,t,l);e.push(Qe(i,a,o&&o[t],r))}}return e}function ni(t,e,i){return L(t)?t(e,i):t}const ai=(t,e)=>!0===t?e:"string"===typeof t?I(e,t):void 0;function oi(t,e,i,s,n){for(const a of e){const e=ai(i,a);if(e){t.add(e);const a=ni(e._fallback,i,n);if($(a)&&a!==i&&a!==s)return a}else if(!1===e&&$(s)&&i!==s)return null}return!1}function ri(t,e,i,s){const n=e._rootScopes,a=ni(e._fallback,i,s),o=[...t,...n],r=new Set;r.add(s);let l=li(r,o,i,a||i,s);return null!==l&&((!$(a)||a===i||(l=li(r,o,a,l,s),null!==l))&&Xe(Array.from(r),[""],n,a,()=>ci(e,i,s)))}function li(t,e,i,s,n){while(i)i=oi(t,e,i,s,n);return i}function ci(t,e,i){const s=t._getTarget();e in s||(s[e]={});const n=s[e];return d(n)&&u(i)?i:n}function hi(t,e,i,s){let n;for(const a of e)if(n=di(Ze(a,t),i),$(n))return Je(t,n)?ri(i,s,t,n):n}function di(t,e){for(const i of e){if(!i)continue;const e=i[t];if($(e))return e}}function ui(t){let e=t._keys;return e||(e=t._keys=pi(t._scopes)),e}function pi(t){const e=new Set;for(const i of t)for(const t of Object.keys(i).filter(t=>!t.startsWith("_")))e.add(t);return Array.from(e)}function fi(t,e,i,s){const{iScale:n}=t,{key:a="r"}=this._parsing,o=new Array(s);let r,l,c,h;for(r=0,l=s;r<l;++r)c=r+i,h=e[c],o[r]={r:n.parse(I(h,a),c)};return o}const gi=Number.EPSILON||1e-14,mi=(t,e)=>e<t.length&&!t[e].skip&&t[e],vi=t=>"x"===t?"y":"x";function bi(t,e,i,s){const n=t.skip?e:t,a=e,o=i.skip?e:i,r=it(a,n),l=it(o,a);let c=r/(r+l),h=l/(r+l);c=isNaN(c)?0:c,h=isNaN(h)?0:h;const d=s*c,u=s*h;return{previous:{x:a.x-d*(o.x-n.x),y:a.y-d*(o.y-n.y)},next:{x:a.x+u*(o.x-n.x),y:a.y+u*(o.y-n.y)}}}function _i(t,e,i){const s=t.length;let n,a,o,r,l,c=mi(t,0);for(let h=0;h<s-1;++h)l=c,c=mi(t,h+1),l&&c&&(X(e[h],0,gi)?i[h]=i[h+1]=0:(n=i[h]/e[h],a=i[h+1]/e[h],r=Math.pow(n,2)+Math.pow(a,2),r<=9||(o=3/Math.sqrt(r),i[h]=n*o*e[h],i[h+1]=a*o*e[h])))}function xi(t,e,i="x"){const s=vi(i),n=t.length;let a,o,r,l=mi(t,0);for(let c=0;c<n;++c){if(o=r,r=l,l=mi(t,c+1),!r)continue;const n=r[i],h=r[s];o&&(a=(n-o[i])/3,r["cp1"+i]=n-a,r["cp1"+s]=h-a*e[c]),l&&(a=(l[i]-n)/3,r["cp2"+i]=n+a,r["cp2"+s]=h+a*e[c])}}function yi(t,e="x"){const i=vi(e),s=t.length,n=Array(s).fill(0),a=Array(s);let o,r,l,c=mi(t,0);for(o=0;o<s;++o)if(r=l,l=c,c=mi(t,o+1),l){if(c){const t=c[e]-l[e];n[o]=0!==t?(c[i]-l[i])/t:0}a[o]=r?c?U(n[o-1])!==U(n[o])?0:(n[o-1]+n[o])/2:n[o-1]:n[o]}_i(t,n,a),xi(t,a,e)}function ki(t,e,i){return Math.max(Math.min(t,i),e)}function wi(t,e){let i,s,n,a,o,r=xe(t[0],e);for(i=0,s=t.length;i<s;++i)o=a,a=r,r=i<s-1&&xe(t[i+1],e),a&&(n=t[i],o&&(n.cp1x=ki(n.cp1x,e.left,e.right),n.cp1y=ki(n.cp1y,e.top,e.bottom)),r&&(n.cp2x=ki(n.cp2x,e.left,e.right),n.cp2y=ki(n.cp2y,e.top,e.bottom)))}function Ci(t,e,i,s,n){let a,o,r,l;if(e.spanGaps&&(t=t.filter(t=>!t.skip)),"monotone"===e.cubicInterpolationMode)yi(t,n);else{let i=s?t[t.length-1]:t[0];for(a=0,o=t.length;a<o;++a)r=t[a],l=bi(i,r,t[Math.min(a+1,o-(s?0:1))%o],e.tension),r.cp1x=l.previous.x,r.cp1y=l.previous.y,r.cp2x=l.next.x,r.cp2y=l.next.y,i=r}e.capBezierPoints&&wi(t,i)}function Mi(){return"undefined"!==typeof window&&"undefined"!==typeof document}function Si(t){let e=t.parentNode;return e&&"[object ShadowRoot]"===e.toString()&&(e=e.host),e}function Oi(t,e,i){let s;return"string"===typeof t?(s=parseInt(t,10),-1!==t.indexOf("%")&&(s=s/100*e.parentNode[i])):s=t,s}const Di=t=>window.getComputedStyle(t,null);function Pi(t,e){return Di(t).getPropertyValue(e)}const Ii=["top","right","bottom","left"];function Ti(t,e,i){const s={};i=i?"-"+i:"";for(let n=0;n<4;n++){const a=Ii[n];s[a]=parseFloat(t[e+"-"+a+i])||0}return s.width=s.left+s.right,s.height=s.top+s.bottom,s}const $i=(t,e,i)=>(t>0||e>0)&&(!i||!i.shadowRoot);function Li(t,e){const i=t.touches,s=i&&i.length?i[0]:t,{offsetX:n,offsetY:a}=s;let o,r,l=!1;if($i(n,a,t.target))o=n,r=a;else{const t=e.getBoundingClientRect();o=s.clientX-t.left,r=s.clientY-t.top,l=!0}return{x:o,y:r,box:l}}function Ei(t,e){if("native"in t)return t;const{canvas:i,currentDevicePixelRatio:s}=e,n=Di(i),a="border-box"===n.boxSizing,o=Ti(n,"padding"),r=Ti(n,"border","width"),{x:l,y:c,box:h}=Li(t,i),d=o.left+(h&&r.left),u=o.top+(h&&r.top);let{width:p,height:f}=e;return a&&(p-=o.width+r.width,f-=o.height+r.height),{x:Math.round((l-d)/p*i.width/s),y:Math.round((c-u)/f*i.height/s)}}function Ai(t,e,i){let s,n;if(void 0===e||void 0===i){const a=Si(t);if(a){const t=a.getBoundingClientRect(),o=Di(a),r=Ti(o,"border","width"),l=Ti(o,"padding");e=t.width-l.width-r.width,i=t.height-l.height-r.height,s=Oi(o.maxWidth,a,"clientWidth"),n=Oi(o.maxHeight,a,"clientHeight")}else e=t.clientWidth,i=t.clientHeight}return{width:e,height:i,maxWidth:s||B,maxHeight:n||B}}const Ri=t=>Math.round(10*t)/10;function Vi(t,e,i,s){const n=Di(t),a=Ti(n,"margin"),o=Oi(n.maxWidth,t,"clientWidth")||B,r=Oi(n.maxHeight,t,"clientHeight")||B,l=Ai(t,e,i);let{width:c,height:h}=l;if("content-box"===n.boxSizing){const t=Ti(n,"border","width"),e=Ti(n,"padding");c-=e.width+t.width,h-=e.height+t.height}return c=Math.max(0,c-a.width),h=Math.max(0,s?Math.floor(c/s):h-a.height),c=Ri(Math.min(c,o,l.maxWidth)),h=Ri(Math.min(h,r,l.maxHeight)),c&&!h&&(h=Ri(c/2)),{width:c,height:h}}function Fi(t,e,i){const s=e||1,n=Math.floor(t.height*s),a=Math.floor(t.width*s);t.height=n/s,t.width=a/s;const o=t.canvas;return o.style&&(i||!o.style.height&&!o.style.width)&&(o.style.height=t.height+"px",o.style.width=t.width+"px"),(t.currentDevicePixelRatio!==s||o.height!==n||o.width!==a)&&(t.currentDevicePixelRatio=s,o.height=n,o.width=a,t.ctx.setTransform(s,0,0,s,0,0),!0)}const Bi=function(){let t=!1;try{const e={get passive(){return t=!0,!1}};window.addEventListener("test",null,e),window.removeEventListener("test",null,e)}catch(e){}return t}();function zi(t,e){const i=Pi(t,e),s=i&&i.match(/^(\d+)(\.\d+)?px$/);return s?+s[1]:void 0}function ji(t,e,i,s){return{x:t.x+i*(e.x-t.x),y:t.y+i*(e.y-t.y)}}function Ni(t,e,i,s){return{x:t.x+i*(e.x-t.x),y:"middle"===s?i<.5?t.y:e.y:"after"===s?i<1?t.y:e.y:i>0?e.y:t.y}}function Wi(t,e,i,s){const n={x:t.cp2x,y:t.cp2y},a={x:e.cp1x,y:e.cp1y},o=ji(t,n,i),r=ji(n,a,i),l=ji(a,e,i),c=ji(o,r,i),h=ji(r,l,i);return ji(c,h,i)}const Hi=new Map;function Ui(t,e){e=e||{};const i=t+JSON.stringify(e);let s=Hi.get(i);return s||(s=new Intl.NumberFormat(t,e),Hi.set(i,s)),s}function qi(t,e,i){return Ui(e,i).format(t)}const Yi=function(t,e){return{x(i){return t+t+e-i},setWidth(t){e=t},textAlign(t){return"center"===t?t:"right"===t?"left":"right"},xPlus(t,e){return t-e},leftForLtr(t,e){return t-e}}},Gi=function(){return{x(t){return t},setWidth(t){},textAlign(t){return t},xPlus(t,e){return t+e},leftForLtr(t,e){return t}}};function Xi(t,e,i){return t?Yi(e,i):Gi()}function Qi(t,e){let i,s;"ltr"!==e&&"rtl"!==e||(i=t.canvas.style,s=[i.getPropertyValue("direction"),i.getPropertyPriority("direction")],i.setProperty("direction",e,"important"),t.prevTextDirection=s)}function Ki(t,e){void 0!==e&&(delete t.prevTextDirection,t.canvas.style.setProperty("direction",e[0],e[1]))}function Zi(t){return"angle"===t?{between:at,compare:st,normalize:nt}:{between:lt,compare:(t,e)=>t-e,normalize:t=>t}}function Ji({start:t,end:e,count:i,loop:s,style:n}){return{start:t%i,end:e%i,loop:s&&(e-t+1)%i===0,style:n}}function ts(t,e,i){const{property:s,start:n,end:a}=i,{between:o,normalize:r}=Zi(s),l=e.length;let c,h,{start:d,end:u,loop:p}=t;if(p){for(d+=l,u+=l,c=0,h=l;c<h;++c){if(!o(r(e[d%l][s]),n,a))break;d--,u--}d%=l,u%=l}return u<d&&(u+=l),{start:d,end:u,loop:p,style:t.style}}function es(t,e,i){if(!i)return[t];const{property:s,start:n,end:a}=i,o=e.length,{compare:r,between:l,normalize:c}=Zi(s),{start:h,end:d,loop:u,style:p}=ts(t,e,i),f=[];let g,m,v,b=!1,_=null;const x=()=>l(n,v,g)&&0!==r(n,v),y=()=>0===r(a,g)||l(a,v,g),k=()=>b||x(),w=()=>!b||y();for(let C=h,M=h;C<=d;++C)m=e[C%o],m.skip||(g=c(m[s]),g!==v&&(b=l(g,n,a),null===_&&k()&&(_=0===r(g,n)?C:M),null!==_&&w()&&(f.push(Ji({start:_,end:C,loop:u,count:o,style:p})),_=null),M=C,v=g));return null!==_&&f.push(Ji({start:_,end:d,loop:u,count:o,style:p})),f}function is(t,e){const i=[],s=t.segments;for(let n=0;n<s.length;n++){const a=es(s[n],t.points,e);a.length&&i.push(...a)}return i}function ss(t,e,i,s){let n=0,a=e-1;if(i&&!s)while(n<e&&!t[n].skip)n++;while(n<e&&t[n].skip)n++;n%=e,i&&(a+=n);while(a>n&&t[a%e].skip)a--;return a%=e,{start:n,end:a}}function ns(t,e,i,s){const n=t.length,a=[];let o,r=e,l=t[e];for(o=e+1;o<=i;++o){const i=t[o%n];i.skip||i.stop?l.skip||(s=!1,a.push({start:e%n,end:(o-1)%n,loop:s}),e=r=i.stop?o:null):(r=o,l.skip&&(e=o)),l=i}return null!==r&&a.push({start:e%n,end:r%n,loop:s}),a}function as(t,e){const i=t.points,s=t.options.spanGaps,n=i.length;if(!n)return[];const a=!!t._loop,{start:o,end:r}=ss(i,n,a,s);if(!0===s)return os(t,[{start:o,end:r,loop:a}],i,e);const l=r<o?r+n:r,c=!!t._fullLoop&&0===o&&r===n-1;return os(t,ns(i,o,l,c),i,e)}function os(t,e,i,s){return s&&s.setContext&&i?rs(t,e,i,s):e}function rs(t,e,i,s){const n=t._chart.getContext(),a=ls(t.options),{_datasetIndex:o,options:{spanGaps:r}}=t,l=i.length,c=[];let h=a,d=e[0].start,u=d;function p(t,e,s,n){const a=r?-1:1;if(t!==e){t+=l;while(i[t%l].skip)t-=a;while(i[e%l].skip)e+=a;t%l!==e%l&&(c.push({start:t%l,end:e%l,loop:s,style:n}),h=n,d=e%l)}}for(const f of e){d=r?d:f.start;let t,e=i[d%l];for(u=d+1;u<=f.end;u++){const a=i[u%l];t=ls(s.setContext(ze(n,{type:"segment",p0:e,p1:a,p0DataIndex:(u-1)%l,p1DataIndex:u%l,datasetIndex:o}))),cs(t,h)&&p(d,u-1,f.loop,h),e=a,h=t}d<u-1&&p(d,u-1,f.loop,h)}return c}function ls(t){return{backgroundColor:t.backgroundColor,borderCapStyle:t.borderCapStyle,borderDash:t.borderDash,borderDashOffset:t.borderDashOffset,borderJoinStyle:t.borderJoinStyle,borderWidth:t.borderWidth,borderColor:t.borderColor}}function cs(t,e){return e&&JSON.stringify(t)!==JSON.stringify(e)}
/*!
 * Chart.js v3.8.0
 * https://www.chartjs.org
 * (c) 2022 Chart.js Contributors
 * Released under the MIT License
 */class hs{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(t,e,i,s){const n=e.listeners[s],a=e.duration;n.forEach(s=>s({chart:t,initial:e.initial,numSteps:a,currentStep:Math.min(i-e.start,a)}))}_refresh(){this._request||(this._running=!0,this._request=s.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(t=Date.now()){let e=0;this._charts.forEach((i,s)=>{if(!i.running||!i.items.length)return;const n=i.items;let a,o=n.length-1,r=!1;for(;o>=0;--o)a=n[o],a._active?(a._total>i.duration&&(i.duration=a._total),a.tick(t),r=!0):(n[o]=n[n.length-1],n.pop());r&&(s.draw(),this._notify(s,i,t,"progress")),n.length||(i.running=!1,this._notify(s,i,t,"complete"),i.initial=!1),e+=n.length}),this._lastDate=t,0===e&&(this._running=!1)}_getAnims(t){const e=this._charts;let i=e.get(t);return i||(i={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},e.set(t,i)),i}listen(t,e,i){this._getAnims(t).listeners[e].push(i)}add(t,e){e&&e.length&&this._getAnims(t).items.push(...e)}has(t){return this._getAnims(t).items.length>0}start(t){const e=this._charts.get(t);e&&(e.running=!0,e.start=Date.now(),e.duration=e.items.reduce((t,e)=>Math.max(t,e._duration),0),this._refresh())}running(t){if(!this._running)return!1;const e=this._charts.get(t);return!!(e&&e.running&&e.items.length)}stop(t){const e=this._charts.get(t);if(!e||!e.items.length)return;const i=e.items;let s=i.length-1;for(;s>=0;--s)i[s].cancel();e.items=[],this._notify(t,e,Date.now(),"complete")}remove(t){return this._charts.delete(t)}}var ds=new hs;const us="transparent",ps={boolean(t,e,i){return i>.5?e:t},color(t,e,i){const s=oe(t||us),n=s.valid&&oe(e||us);return n&&n.valid?n.mix(s,i).hexString():e},number(t,e,i){return t+(e-t)*i}};class fs{constructor(t,e,i,s){const n=e[i];s=Fe([t.to,s,n,t.from]);const a=Fe([t.from,n,s]);this._active=!0,this._fn=t.fn||ps[t.type||typeof a],this._easing=ut[t.easing]||ut.linear,this._start=Math.floor(Date.now()+(t.delay||0)),this._duration=this._total=Math.floor(t.duration),this._loop=!!t.loop,this._target=e,this._prop=i,this._from=a,this._to=s,this._promises=void 0}active(){return this._active}update(t,e,i){if(this._active){this._notify(!1);const s=this._target[this._prop],n=i-this._start,a=this._duration-n;this._start=i,this._duration=Math.floor(Math.max(a,t.duration)),this._total+=n,this._loop=!!t.loop,this._to=Fe([t.to,e,s,t.from]),this._from=Fe([t.from,s,e])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(t){const e=t-this._start,i=this._duration,s=this._prop,n=this._from,a=this._loop,o=this._to;let r;if(this._active=n!==o&&(a||e<i),!this._active)return this._target[s]=o,void this._notify(!0);e<0?this._target[s]=n:(r=e/i%2,r=a&&r>1?2-r:r,r=this._easing(Math.min(1,Math.max(0,r))),this._target[s]=this._fn(n,o,r))}wait(){const t=this._promises||(this._promises=[]);return new Promise((e,i)=>{t.push({res:e,rej:i})})}_notify(t){const e=t?"res":"rej",i=this._promises||[];for(let s=0;s<i.length;s++)i[s][e]()}}const gs=["x","y","borderWidth","radius","tension"],ms=["color","borderColor","backgroundColor"];pe.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0});const vs=Object.keys(pe.animation);pe.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:t=>"onProgress"!==t&&"onComplete"!==t&&"fn"!==t}),pe.set("animations",{colors:{type:"color",properties:ms},numbers:{type:"number",properties:gs}}),pe.describe("animations",{_fallback:"animation"}),pe.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:t=>0|t}}}});class bs{constructor(t,e){this._chart=t,this._properties=new Map,this.configure(e)}configure(t){if(!u(t))return;const e=this._properties;Object.getOwnPropertyNames(t).forEach(i=>{const s=t[i];if(!u(s))return;const n={};for(const t of vs)n[t]=s[t];(d(s.properties)&&s.properties||[i]).forEach(t=>{t!==i&&e.has(t)||e.set(t,n)})})}_animateOptions(t,e){const i=e.options,s=xs(t,i);if(!s)return[];const n=this._createAnimations(s,i);return i.$shared&&_s(t.options.$animations,i).then(()=>{t.options=i},()=>{}),n}_createAnimations(t,e){const i=this._properties,s=[],n=t.$animations||(t.$animations={}),a=Object.keys(e),o=Date.now();let r;for(r=a.length-1;r>=0;--r){const l=a[r];if("$"===l.charAt(0))continue;if("options"===l){s.push(...this._animateOptions(t,e));continue}const c=e[l];let h=n[l];const d=i.get(l);if(h){if(d&&h.active()){h.update(d,c,o);continue}h.cancel()}d&&d.duration?(n[l]=h=new fs(d,t,l,c),s.push(h)):t[l]=c}return s}update(t,e){if(0===this._properties.size)return void Object.assign(t,e);const i=this._createAnimations(t,e);return i.length?(ds.add(this._chart,i),!0):void 0}}function _s(t,e){const i=[],s=Object.keys(e);for(let n=0;n<s.length;n++){const e=t[s[n]];e&&e.active()&&i.push(e.wait())}return Promise.all(i)}function xs(t,e){if(!e)return;let i=t.options;if(i)return i.$shared&&(t.options=i=Object.assign({},i,{$shared:!1,$animations:{}})),i;t.options=e}function ys(t,e){const i=t&&t.options||{},s=i.reverse,n=void 0===i.min?e:0,a=void 0===i.max?e:0;return{start:s?a:n,end:s?n:a}}function ks(t,e,i){if(!1===i)return!1;const s=ys(t,i),n=ys(e,i);return{top:n.end,right:s.end,bottom:n.start,left:s.start}}function ws(t){let e,i,s,n;return u(t)?(e=t.top,i=t.right,s=t.bottom,n=t.left):e=i=s=n=t,{top:e,right:i,bottom:s,left:n,disabled:!1===t}}function Cs(t,e){const i=[],s=t._getSortedDatasetMetas(e);let n,a;for(n=0,a=s.length;n<a;++n)i.push(s[n].index);return i}function Ms(t,e,i,s={}){const n=t.keys,a="single"===s.mode;let o,r,l,c;if(null!==e){for(o=0,r=n.length;o<r;++o){if(l=+n[o],l===i){if(s.all)continue;break}c=t.values[l],p(c)&&(a||0===e||U(e)===U(c))&&(e+=c)}return e}}function Ss(t){const e=Object.keys(t),i=new Array(e.length);let s,n,a;for(s=0,n=e.length;s<n;++s)a=e[s],i[s]={x:a,y:t[a]};return i}function Os(t,e){const i=t&&t.options.stacked;return i||void 0===i&&void 0!==e.stack}function Ds(t,e,i){return`${t.id}.${e.id}.${i.stack||i.type}`}function Ps(t){const{min:e,max:i,minDefined:s,maxDefined:n}=t.getUserBounds();return{min:s?e:Number.NEGATIVE_INFINITY,max:n?i:Number.POSITIVE_INFINITY}}function Is(t,e,i){const s=t[e]||(t[e]={});return s[i]||(s[i]={})}function Ts(t,e,i,s){for(const n of e.getMatchingVisibleMetas(s).reverse()){const e=t[n.index];if(i&&e>0||!i&&e<0)return n.index}return null}function $s(t,e){const{chart:i,_cachedMeta:s}=t,n=i._stacks||(i._stacks={}),{iScale:a,vScale:o,index:r}=s,l=a.axis,c=o.axis,h=Ds(a,o,s),d=e.length;let u;for(let p=0;p<d;++p){const t=e[p],{[l]:i,[c]:a}=t,d=t._stacks||(t._stacks={});u=d[c]=Is(n,h,i),u[r]=a,u._top=Ts(u,o,!0,s.type),u._bottom=Ts(u,o,!1,s.type)}}function Ls(t,e){const i=t.scales;return Object.keys(i).filter(t=>i[t].axis===e).shift()}function Es(t,e){return ze(t,{active:!1,dataset:void 0,datasetIndex:e,index:e,mode:"default",type:"dataset"})}function As(t,e,i){return ze(t,{active:!1,dataIndex:e,parsed:void 0,raw:void 0,element:i,index:e,mode:"default",type:"data"})}function Rs(t,e){const i=t.controller.index,s=t.vScale&&t.vScale.axis;if(s){e=e||t._parsed;for(const t of e){const e=t._stacks;if(!e||void 0===e[s]||void 0===e[s][i])return;delete e[s][i]}}}const Vs=t=>"reset"===t||"none"===t,Fs=(t,e)=>e?t:Object.assign({},t),Bs=(t,e,i)=>t&&!e.hidden&&e._stacked&&{keys:Cs(i,!0),values:null};class zs{constructor(t,e){this.chart=t,this._ctx=t.ctx,this.index=e,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.supportsDecimation=!1,this.$context=void 0,this._syncList=[],this.initialize()}initialize(){const t=this._cachedMeta;this.configure(),this.linkScales(),t._stacked=Os(t.vScale,t),this.addElements()}updateIndex(t){this.index!==t&&Rs(this._cachedMeta),this.index=t}linkScales(){const t=this.chart,e=this._cachedMeta,i=this.getDataset(),s=(t,e,i,s)=>"x"===t?e:"r"===t?s:i,n=e.xAxisID=g(i.xAxisID,Ls(t,"x")),a=e.yAxisID=g(i.yAxisID,Ls(t,"y")),o=e.rAxisID=g(i.rAxisID,Ls(t,"r")),r=e.indexAxis,l=e.iAxisID=s(r,n,a,o),c=e.vAxisID=s(r,a,n,o);e.xScale=this.getScaleForId(n),e.yScale=this.getScaleForId(a),e.rScale=this.getScaleForId(o),e.iScale=this.getScaleForId(l),e.vScale=this.getScaleForId(c)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(t){return this.chart.scales[t]}_getOtherScale(t){const e=this._cachedMeta;return t===e.iScale?e.vScale:e.iScale}reset(){this._update("reset")}_destroy(){const t=this._cachedMeta;this._data&&Ye(this._data,this),t._stacked&&Rs(t)}_dataCheck(){const t=this.getDataset(),e=t.data||(t.data=[]),i=this._data;if(u(e))this._data=Ss(e);else if(i!==e){if(i){Ye(i,this);const t=this._cachedMeta;Rs(t),t._parsed=[]}e&&Object.isExtensible(e)&&qe(e,this),this._syncList=[],this._data=e}}addElements(){const t=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(t.dataset=new this.datasetElementType)}buildOrUpdateElements(t){const e=this._cachedMeta,i=this.getDataset();let s=!1;this._dataCheck();const n=e._stacked;e._stacked=Os(e.vScale,e),e.stack!==i.stack&&(s=!0,Rs(e),e.stack=i.stack),this._resyncElements(t),(s||n!==e._stacked)&&$s(this,e._parsed)}configure(){const t=this.chart.config,e=t.datasetScopeKeys(this._type),i=t.getOptionScopes(this.getDataset(),e,!0);this.options=t.createResolver(i,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(t,e){const{_cachedMeta:i,_data:s}=this,{iScale:n,_stacked:a}=i,o=n.axis;let r,l,c,h=0===t&&e===s.length||i._sorted,p=t>0&&i._parsed[t-1];if(!1===this._parsing)i._parsed=s,i._sorted=!0,c=s;else{c=d(s[t])?this.parseArrayData(i,s,t,e):u(s[t])?this.parseObjectData(i,s,t,e):this.parsePrimitiveData(i,s,t,e);const n=()=>null===l[o]||p&&l[o]<p[o];for(r=0;r<e;++r)i._parsed[r+t]=l=c[r],h&&(n()&&(h=!1),p=l);i._sorted=h}a&&$s(this,c)}parsePrimitiveData(t,e,i,s){const{iScale:n,vScale:a}=t,o=n.axis,r=a.axis,l=n.getLabels(),c=n===a,h=new Array(s);let d,u,p;for(d=0,u=s;d<u;++d)p=d+i,h[d]={[o]:c||n.parse(l[p],p),[r]:a.parse(e[p],p)};return h}parseArrayData(t,e,i,s){const{xScale:n,yScale:a}=t,o=new Array(s);let r,l,c,h;for(r=0,l=s;r<l;++r)c=r+i,h=e[c],o[r]={x:n.parse(h[0],c),y:a.parse(h[1],c)};return o}parseObjectData(t,e,i,s){const{xScale:n,yScale:a}=t,{xAxisKey:o="x",yAxisKey:r="y"}=this._parsing,l=new Array(s);let c,h,d,u;for(c=0,h=s;c<h;++c)d=c+i,u=e[d],l[c]={x:n.parse(I(u,o),d),y:a.parse(I(u,r),d)};return l}getParsed(t){return this._cachedMeta._parsed[t]}getDataElement(t){return this._cachedMeta.data[t]}applyStack(t,e,i){const s=this.chart,n=this._cachedMeta,a=e[t.axis],o={keys:Cs(s,!0),values:e._stacks[t.axis]};return Ms(o,a,n.index,{mode:i})}updateRangeFromParsed(t,e,i,s){const n=i[e.axis];let a=null===n?NaN:n;const o=s&&i._stacks[e.axis];s&&o&&(s.values=o,a=Ms(s,n,this._cachedMeta.index)),t.min=Math.min(t.min,a),t.max=Math.max(t.max,a)}getMinMax(t,e){const i=this._cachedMeta,s=i._parsed,n=i._sorted&&t===i.iScale,a=s.length,o=this._getOtherScale(t),r=Bs(e,i,this.chart),l={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:c,max:h}=Ps(o);let d,u;function f(){u=s[d];const e=u[o.axis];return!p(u[t.axis])||c>e||h<e}for(d=0;d<a;++d)if(!f()&&(this.updateRangeFromParsed(l,t,u,r),n))break;if(n)for(d=a-1;d>=0;--d)if(!f()){this.updateRangeFromParsed(l,t,u,r);break}return l}getAllParsedValues(t){const e=this._cachedMeta._parsed,i=[];let s,n,a;for(s=0,n=e.length;s<n;++s)a=e[s][t.axis],p(a)&&i.push(a);return i}getMaxOverflow(){return!1}getLabelAndValue(t){const e=this._cachedMeta,i=e.iScale,s=e.vScale,n=this.getParsed(t);return{label:i?""+i.getLabelForValue(n[i.axis]):"",value:s?""+s.getLabelForValue(n[s.axis]):""}}_update(t){const e=this._cachedMeta;this.update(t||"default"),e._clip=ws(g(this.options.clip,ks(e.xScale,e.yScale,this.getMaxOverflow())))}update(t){}draw(){const t=this._ctx,e=this.chart,i=this._cachedMeta,s=i.data||[],n=e.chartArea,a=[],o=this._drawStart||0,r=this._drawCount||s.length-o,l=this.options.drawActiveElementsOnTop;let c;for(i.dataset&&i.dataset.draw(t,n,o,r),c=o;c<o+r;++c){const e=s[c];e.hidden||(e.active&&l?a.push(e):e.draw(t,n))}for(c=0;c<a.length;++c)a[c].draw(t,n)}getStyle(t,e){const i=e?"active":"default";return void 0===t&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(i):this.resolveDataElementOptions(t||0,i)}getContext(t,e,i){const s=this.getDataset();let n;if(t>=0&&t<this._cachedMeta.data.length){const e=this._cachedMeta.data[t];n=e.$context||(e.$context=As(this.getContext(),t,e)),n.parsed=this.getParsed(t),n.raw=s.data[t],n.index=n.dataIndex=t}else n=this.$context||(this.$context=Es(this.chart.getContext(),this.index)),n.dataset=s,n.index=n.datasetIndex=this.index;return n.active=!!e,n.mode=i,n}resolveDatasetElementOptions(t){return this._resolveElementOptions(this.datasetElementType.id,t)}resolveDataElementOptions(t,e){return this._resolveElementOptions(this.dataElementType.id,e,t)}_resolveElementOptions(t,e="default",i){const s="active"===e,n=this._cachedDataOpts,a=t+"-"+e,o=n[a],r=this.enableOptionSharing&&$(i);if(o)return Fs(o,r);const l=this.chart.config,c=l.datasetElementScopeKeys(this._type,t),h=s?[t+"Hover","hover",t,""]:[t,""],d=l.getOptionScopes(this.getDataset(),c),u=Object.keys(pe.elements[t]),p=()=>this.getContext(i,s),f=l.resolveNamedOptions(d,u,p,h);return f.$shared&&(f.$shared=r,n[a]=Object.freeze(Fs(f,r))),f}_resolveAnimations(t,e,i){const s=this.chart,n=this._cachedDataOpts,a="animation-"+e,o=n[a];if(o)return o;let r;if(!1!==s.options.animation){const s=this.chart.config,n=s.datasetAnimationScopeKeys(this._type,e),a=s.getOptionScopes(this.getDataset(),n);r=s.createResolver(a,this.getContext(t,i,e))}const l=new bs(s,r&&r.animations);return r&&r._cacheable&&(n[a]=Object.freeze(l)),l}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,e){return!e||Vs(t)||this.chart._animationsDisabled}updateElement(t,e,i,s){Vs(s)?Object.assign(t,i):this._resolveAnimations(e,s).update(t,i)}updateSharedOptions(t,e,i){t&&!Vs(e)&&this._resolveAnimations(void 0,e).update(t,i)}_setStyle(t,e,i,s){t.active=s;const n=this.getStyle(e,s);this._resolveAnimations(e,i,s).update(t,{options:!s&&this.getSharedOptions(n)||n})}removeHoverStyle(t,e,i){this._setStyle(t,i,"active",!1)}setHoverStyle(t,e,i){this._setStyle(t,i,"active",!0)}_removeDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!1)}_setDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!0)}_resyncElements(t){const e=this._data,i=this._cachedMeta.data;for(const[o,r,l]of this._syncList)this[o](r,l);this._syncList=[];const s=i.length,n=e.length,a=Math.min(n,s);a&&this.parse(0,a),n>s?this._insertElements(s,n-s,t):n<s&&this._removeElements(n,s-n)}_insertElements(t,e,i=!0){const s=this._cachedMeta,n=s.data,a=t+e;let o;const r=t=>{for(t.length+=e,o=t.length-1;o>=a;o--)t[o]=t[o-e]};for(r(n),o=t;o<a;++o)n[o]=new this.dataElementType;this._parsing&&r(s._parsed),this.parse(t,e),i&&this.updateElements(n,t,e,"reset")}updateElements(t,e,i,s){}_removeElements(t,e){const i=this._cachedMeta;if(this._parsing){const s=i._parsed.splice(t,e);i._stacked&&Rs(i,s)}i.data.splice(t,e)}_sync(t){if(this._parsing)this._syncList.push(t);else{const[e,i,s]=t;this[e](i,s)}this.chart._dataChanges.push([this.index,...t])}_onDataPush(){const t=arguments.length;this._sync(["_insertElements",this.getDataset().data.length-t,t])}_onDataPop(){this._sync(["_removeElements",this._cachedMeta.data.length-1,1])}_onDataShift(){this._sync(["_removeElements",0,1])}_onDataSplice(t,e){e&&this._sync(["_removeElements",t,e]);const i=arguments.length-2;i&&this._sync(["_insertElements",t,i])}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length])}}function js(t,e){if(!t._cache.$bar){const i=t.getMatchingVisibleMetas(e);let s=[];for(let e=0,n=i.length;e<n;e++)s=s.concat(i[e].controller.getAllParsedValues(t));t._cache.$bar=Ge(s.sort((t,e)=>t-e))}return t._cache.$bar}function Ns(t){const e=t.iScale,i=js(e,t.type);let s,n,a,o,r=e._length;const l=()=>{32767!==a&&-32768!==a&&($(o)&&(r=Math.min(r,Math.abs(a-o)||r)),o=a)};for(s=0,n=i.length;s<n;++s)a=e.getPixelForValue(i[s]),l();for(o=void 0,s=0,n=e.ticks.length;s<n;++s)a=e.getPixelForTick(s),l();return r}function Ws(t,e,i,s){const n=i.barThickness;let a,o;return h(n)?(a=e.min*i.categoryPercentage,o=i.barPercentage):(a=n*s,o=1),{chunk:a/s,ratio:o,start:e.pixels[t]-a/2}}function Hs(t,e,i,s){const n=e.pixels,a=n[t];let o=t>0?n[t-1]:null,r=t<n.length-1?n[t+1]:null;const l=i.categoryPercentage;null===o&&(o=a-(null===r?e.end-e.start:r-a)),null===r&&(r=a+a-o);const c=a-(a-Math.min(o,r))/2*l,h=Math.abs(r-o)/2*l;return{chunk:h/s,ratio:i.barPercentage,start:c}}function Us(t,e,i,s){const n=i.parse(t[0],s),a=i.parse(t[1],s),o=Math.min(n,a),r=Math.max(n,a);let l=o,c=r;Math.abs(o)>Math.abs(r)&&(l=r,c=o),e[i.axis]=c,e._custom={barStart:l,barEnd:c,start:n,end:a,min:o,max:r}}function qs(t,e,i,s){return d(t)?Us(t,e,i,s):e[i.axis]=i.parse(t,s),e}function Ys(t,e,i,s){const n=t.iScale,a=t.vScale,o=n.getLabels(),r=n===a,l=[];let c,h,d,u;for(c=i,h=i+s;c<h;++c)u=e[c],d={},d[n.axis]=r||n.parse(o[c],c),l.push(qs(u,d,a,c));return l}function Gs(t){return t&&void 0!==t.barStart&&void 0!==t.barEnd}function Xs(t,e,i){return 0!==t?U(t):(e.isHorizontal()?1:-1)*(e.min>=i?1:-1)}function Qs(t){let e,i,s,n,a;return t.horizontal?(e=t.base>t.x,i="left",s="right"):(e=t.base<t.y,i="bottom",s="top"),e?(n="end",a="start"):(n="start",a="end"),{start:i,end:s,reverse:e,top:n,bottom:a}}function Ks(t,e,i,s){let n=e.borderSkipped;const a={};if(!n)return void(t.borderSkipped=a);const{start:o,end:r,reverse:l,top:c,bottom:h}=Qs(t);"middle"===n&&i&&(t.enableBorderRadius=!0,(i._top||0)===s?n=c:(i._bottom||0)===s?n=h:(a[Zs(h,o,r,l)]=!0,n=c)),a[Zs(n,o,r,l)]=!0,t.borderSkipped=a}function Zs(t,e,i,s){return s?(t=Js(t,e,i),t=tn(t,i,e)):t=tn(t,e,i),t}function Js(t,e,i){return t===e?i:t===i?e:t}function tn(t,e,i){return"start"===t?e:"end"===t?i:t}function en(t,{inflateAmount:e},i){t.inflateAmount="auto"===e?1===i?.33:0:e}zs.defaults={},zs.prototype.datasetElementType=null,zs.prototype.dataElementType=null;class sn extends zs{parsePrimitiveData(t,e,i,s){return Ys(t,e,i,s)}parseArrayData(t,e,i,s){return Ys(t,e,i,s)}parseObjectData(t,e,i,s){const{iScale:n,vScale:a}=t,{xAxisKey:o="x",yAxisKey:r="y"}=this._parsing,l="x"===n.axis?o:r,c="x"===a.axis?o:r,h=[];let d,u,p,f;for(d=i,u=i+s;d<u;++d)f=e[d],p={},p[n.axis]=n.parse(I(f,l),d),h.push(qs(I(f,c),p,a,d));return h}updateRangeFromParsed(t,e,i,s){super.updateRangeFromParsed(t,e,i,s);const n=i._custom;n&&e===this._cachedMeta.vScale&&(t.min=Math.min(t.min,n.min),t.max=Math.max(t.max,n.max))}getMaxOverflow(){return 0}getLabelAndValue(t){const e=this._cachedMeta,{iScale:i,vScale:s}=e,n=this.getParsed(t),a=n._custom,o=Gs(a)?"["+a.start+", "+a.end+"]":""+s.getLabelForValue(n[s.axis]);return{label:""+i.getLabelForValue(n[i.axis]),value:o}}initialize(){this.enableOptionSharing=!0,super.initialize();const t=this._cachedMeta;t.stack=this.getDataset().stack}update(t){const e=this._cachedMeta;this.updateElements(e.data,0,e.data.length,t)}updateElements(t,e,i,s){const n="reset"===s,{index:a,_cachedMeta:{vScale:o}}=this,r=o.getBasePixel(),l=o.isHorizontal(),c=this._getRuler(),d=this.resolveDataElementOptions(e,s),u=this.getSharedOptions(d),p=this.includeOptions(s,u);this.updateSharedOptions(u,s,d);for(let f=e;f<e+i;f++){const e=this.getParsed(f),i=n||h(e[o.axis])?{base:r,head:r}:this._calculateBarValuePixels(f),d=this._calculateBarIndexPixels(f,c),g=(e._stacks||{})[o.axis],m={horizontal:l,base:i.base,enableBorderRadius:!g||Gs(e._custom)||a===g._top||a===g._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=u||this.resolveDataElementOptions(f,t[f].active?"active":s));const v=m.options||t[f].options;Ks(m,v,g,a),en(m,v,c.ratio),this.updateElement(t[f],f,m,s)}}_getStacks(t,e){const i=this._cachedMeta,s=i.iScale,n=s.getMatchingVisibleMetas(this._type),a=s.options.stacked,o=n.length,r=[];let l,c;for(l=0;l<o;++l)if(c=n[l],c.controller.options.grouped){if("undefined"!==typeof e){const t=c.controller.getParsed(e)[c.controller._cachedMeta.vScale.axis];if(h(t)||isNaN(t))continue}if((!1===a||-1===r.indexOf(c.stack)||void 0===a&&void 0===c.stack)&&r.push(c.stack),c.index===t)break}return r.length||r.push(void 0),r}_getStackCount(t){return this._getStacks(void 0,t).length}_getStackIndex(t,e,i){const s=this._getStacks(t,i),n=void 0!==e?s.indexOf(e):-1;return-1===n?s.length-1:n}_getRuler(){const t=this.options,e=this._cachedMeta,i=e.iScale,s=[];let n,a;for(n=0,a=e.data.length;n<a;++n)s.push(i.getPixelForValue(this.getParsed(n)[i.axis],n));const o=t.barThickness,r=o||Ns(e);return{min:r,pixels:s,start:i._startPixel,end:i._endPixel,stackCount:this._getStackCount(),scale:i,grouped:t.grouped,ratio:o?1:t.categoryPercentage*t.barPercentage}}_calculateBarValuePixels(t){const{_cachedMeta:{vScale:e,_stacked:i},options:{base:s,minBarLength:n}}=this,a=s||0,o=this.getParsed(t),r=o._custom,l=Gs(r);let c,d,u=o[e.axis],p=0,f=i?this.applyStack(e,o,i):u;f!==u&&(p=f-u,f=u),l&&(u=r.barStart,f=r.barEnd-r.barStart,0!==u&&U(u)!==U(r.barEnd)&&(p=0),p+=u);const g=h(s)||l?p:s;let m=e.getPixelForValue(g);if(c=this.chart.getDataVisibility(t)?e.getPixelForValue(p+f):m,d=c-m,Math.abs(d)<n){d=Xs(d,e,a)*n,u===a&&(m-=d/2);const t=e.getPixelForDecimal(0),i=e.getPixelForDecimal(1),s=Math.min(t,i),o=Math.max(t,i);m=Math.max(Math.min(m,o),s),c=m+d}if(m===e.getPixelForValue(a)){const t=U(d)*e.getLineWidthForValue(a)/2;m+=t,d-=t}return{size:d,base:m,head:c,center:c+d/2}}_calculateBarIndexPixels(t,e){const i=e.scale,s=this.options,n=s.skipNull,a=g(s.maxBarThickness,1/0);let o,r;if(e.grouped){const i=n?this._getStackCount(t):e.stackCount,l="flex"===s.barThickness?Hs(t,e,s,i):Ws(t,e,s,i),c=this._getStackIndex(this.index,this._cachedMeta.stack,n?t:void 0);o=l.start+l.chunk*c+l.chunk/2,r=Math.min(a,l.chunk*l.ratio)}else o=i.getPixelForValue(this.getParsed(t)[i.axis],t),r=Math.min(a,e.min*e.ratio);return{base:o-r/2,head:o+r/2,center:o,size:r}}draw(){const t=this._cachedMeta,e=t.vScale,i=t.data,s=i.length;let n=0;for(;n<s;++n)null!==this.getParsed(n)[e.axis]&&i[n].draw(this._ctx)}}sn.id="bar",sn.defaults={datasetElementType:!1,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}},sn.overrides={scales:{_index_:{type:"category",offset:!0,grid:{offset:!0}},_value_:{type:"linear",beginAtZero:!0}}};class nn extends zs{initialize(){this.enableOptionSharing=!0,super.initialize()}parsePrimitiveData(t,e,i,s){const n=super.parsePrimitiveData(t,e,i,s);for(let a=0;a<n.length;a++)n[a]._custom=this.resolveDataElementOptions(a+i).radius;return n}parseArrayData(t,e,i,s){const n=super.parseArrayData(t,e,i,s);for(let a=0;a<n.length;a++){const t=e[i+a];n[a]._custom=g(t[2],this.resolveDataElementOptions(a+i).radius)}return n}parseObjectData(t,e,i,s){const n=super.parseObjectData(t,e,i,s);for(let a=0;a<n.length;a++){const t=e[i+a];n[a]._custom=g(t&&t.r&&+t.r,this.resolveDataElementOptions(a+i).radius)}return n}getMaxOverflow(){const t=this._cachedMeta.data;let e=0;for(let i=t.length-1;i>=0;--i)e=Math.max(e,t[i].size(this.resolveDataElementOptions(i))/2);return e>0&&e}getLabelAndValue(t){const e=this._cachedMeta,{xScale:i,yScale:s}=e,n=this.getParsed(t),a=i.getLabelForValue(n.x),o=s.getLabelForValue(n.y),r=n._custom;return{label:e.label,value:"("+a+", "+o+(r?", "+r:"")+")"}}update(t){const e=this._cachedMeta.data;this.updateElements(e,0,e.length,t)}updateElements(t,e,i,s){const n="reset"===s,{iScale:a,vScale:o}=this._cachedMeta,r=this.resolveDataElementOptions(e,s),l=this.getSharedOptions(r),c=this.includeOptions(s,l),h=a.axis,d=o.axis;for(let u=e;u<e+i;u++){const e=t[u],i=!n&&this.getParsed(u),r={},l=r[h]=n?a.getPixelForDecimal(.5):a.getPixelForValue(i[h]),p=r[d]=n?o.getBasePixel():o.getPixelForValue(i[d]);r.skip=isNaN(l)||isNaN(p),c&&(r.options=this.resolveDataElementOptions(u,e.active?"active":s),n&&(r.options.radius=0)),this.updateElement(e,u,r,s)}this.updateSharedOptions(l,s,r)}resolveDataElementOptions(t,e){const i=this.getParsed(t);let s=super.resolveDataElementOptions(t,e);s.$shared&&(s=Object.assign({},s,{$shared:!1}));const n=s.radius;return"active"!==e&&(s.radius=0),s.radius+=g(i&&i._custom,n),s}}function an(t,e,i){let s=1,n=1,a=0,o=0;if(e<V){const r=t,l=r+e,c=Math.cos(r),h=Math.sin(r),d=Math.cos(l),u=Math.sin(l),p=(t,e,s)=>at(t,r,l,!0)?1:Math.max(e,e*i,s,s*i),f=(t,e,s)=>at(t,r,l,!0)?-1:Math.min(e,e*i,s,s*i),g=p(0,c,d),m=p(j,h,u),v=f(R,c,d),b=f(R+j,h,u);s=(g-v)/2,n=(m-b)/2,a=-(g+v)/2,o=-(m+b)/2}return{ratioX:s,ratioY:n,offsetX:a,offsetY:o}}nn.id="bubble",nn.defaults={datasetElementType:!1,dataElementType:"point",animations:{numbers:{type:"number",properties:["x","y","borderWidth","radius"]}}},nn.overrides={scales:{x:{type:"linear"},y:{type:"linear"}},plugins:{tooltip:{callbacks:{title(){return""}}}}};class on extends zs{constructor(t,e){super(t,e),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(t,e){const i=this.getDataset().data,s=this._cachedMeta;if(!1===this._parsing)s._parsed=i;else{let n,a,o=t=>+i[t];if(u(i[t])){const{key:t="value"}=this._parsing;o=e=>+I(i[e],t)}for(n=t,a=t+e;n<a;++n)s._parsed[n]=o(n)}}_getRotation(){return Z(this.options.rotation-90)}_getCircumference(){return Z(this.options.circumference)}_getRotationExtents(){let t=V,e=-V;for(let i=0;i<this.chart.data.datasets.length;++i)if(this.chart.isDatasetVisible(i)){const s=this.chart.getDatasetMeta(i).controller,n=s._getRotation(),a=s._getCircumference();t=Math.min(t,n),e=Math.max(e,n+a)}return{rotation:t,circumference:e-t}}update(t){const e=this.chart,{chartArea:i}=e,s=this._cachedMeta,n=s.data,a=this.getMaxBorderWidth()+this.getMaxOffset(n)+this.options.spacing,o=Math.max((Math.min(i.width,i.height)-a)/2,0),r=Math.min(m(this.options.cutout,o),1),l=this._getRingWeight(this.index),{circumference:c,rotation:h}=this._getRotationExtents(),{ratioX:d,ratioY:u,offsetX:p,offsetY:f}=an(h,c,r),g=(i.width-a)/d,b=(i.height-a)/u,_=Math.max(Math.min(g,b)/2,0),x=v(this.options.radius,_),y=Math.max(x*r,0),k=(x-y)/this._getVisibleDatasetWeightTotal();this.offsetX=p*x,this.offsetY=f*x,s.total=this.calculateTotal(),this.outerRadius=x-k*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-k*l,0),this.updateElements(n,0,n.length,t)}_circumference(t,e){const i=this.options,s=this._cachedMeta,n=this._getCircumference();return e&&i.animation.animateRotate||!this.chart.getDataVisibility(t)||null===s._parsed[t]||s.data[t].hidden?0:this.calculateCircumference(s._parsed[t]*n/V)}updateElements(t,e,i,s){const n="reset"===s,a=this.chart,o=a.chartArea,r=a.options,l=r.animation,c=(o.left+o.right)/2,h=(o.top+o.bottom)/2,d=n&&l.animateScale,u=d?0:this.innerRadius,p=d?0:this.outerRadius,f=this.resolveDataElementOptions(e,s),g=this.getSharedOptions(f),m=this.includeOptions(s,g);let v,b=this._getRotation();for(v=0;v<e;++v)b+=this._circumference(v,n);for(v=e;v<e+i;++v){const e=this._circumference(v,n),i=t[v],a={x:c+this.offsetX,y:h+this.offsetY,startAngle:b,endAngle:b+e,circumference:e,outerRadius:p,innerRadius:u};m&&(a.options=g||this.resolveDataElementOptions(v,i.active?"active":s)),b+=e,this.updateElement(i,v,a,s)}this.updateSharedOptions(g,s,f)}calculateTotal(){const t=this._cachedMeta,e=t.data;let i,s=0;for(i=0;i<e.length;i++){const n=t._parsed[i];null===n||isNaN(n)||!this.chart.getDataVisibility(i)||e[i].hidden||(s+=Math.abs(n))}return s}calculateCircumference(t){const e=this._cachedMeta.total;return e>0&&!isNaN(t)?V*(Math.abs(t)/e):0}getLabelAndValue(t){const e=this._cachedMeta,i=this.chart,s=i.data.labels||[],n=qi(e._parsed[t],i.options.locale);return{label:s[t]||"",value:n}}getMaxBorderWidth(t){let e=0;const i=this.chart;let s,n,a,o,r;if(!t)for(s=0,n=i.data.datasets.length;s<n;++s)if(i.isDatasetVisible(s)){a=i.getDatasetMeta(s),t=a.data,o=a.controller;break}if(!t)return 0;for(s=0,n=t.length;s<n;++s)r=o.resolveDataElementOptions(s),"inner"!==r.borderAlign&&(e=Math.max(e,r.borderWidth||0,r.hoverBorderWidth||0));return e}getMaxOffset(t){let e=0;for(let i=0,s=t.length;i<s;++i){const t=this.resolveDataElementOptions(i);e=Math.max(e,t.offset||0,t.hoverOffset||0)}return e}_getRingWeightOffset(t){let e=0;for(let i=0;i<t;++i)this.chart.isDatasetVisible(i)&&(e+=this._getRingWeight(i));return e}_getRingWeight(t){return Math.max(g(this.chart.data.datasets[t].weight,1),0)}_getVisibleDatasetWeightTotal(){return this._getRingWeightOffset(this.chart.data.datasets.length)||1}}on.id="doughnut",on.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"},on.descriptors={_scriptable:t=>"spacing"!==t,_indexable:t=>"spacing"!==t},on.overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const e=t.data;if(e.labels.length&&e.datasets.length){const{labels:{pointStyle:i}}=t.legend.options;return e.labels.map((e,s)=>{const n=t.getDatasetMeta(0),a=n.controller.getStyle(s);return{text:e,fillStyle:a.backgroundColor,strokeStyle:a.borderColor,lineWidth:a.borderWidth,pointStyle:i,hidden:!t.getDataVisibility(s),index:s}})}return[]}},onClick(t,e,i){i.chart.toggleDataVisibility(e.index),i.chart.update()}},tooltip:{callbacks:{title(){return""},label(t){let e=t.label;const i=": "+t.formattedValue;return d(e)?(e=e.slice(),e[0]+=i):e+=i,e}}}}};class rn extends zs{initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(t){const e=this._cachedMeta,{dataset:i,data:s=[],_dataset:n}=e,a=this.chart._animationsDisabled;let{start:o,count:r}=ln(e,s,a);this._drawStart=o,this._drawCount=r,cn(e)&&(o=0,r=s.length),i._chart=this.chart,i._datasetIndex=this.index,i._decimated=!!n._decimated,i.points=s;const l=this.resolveDatasetElementOptions(t);this.options.showLine||(l.borderWidth=0),l.segment=this.options.segment,this.updateElement(i,void 0,{animated:!a,options:l},t),this.updateElements(s,o,r,t)}updateElements(t,e,i,s){const n="reset"===s,{iScale:a,vScale:o,_stacked:r,_dataset:l}=this._cachedMeta,c=this.resolveDataElementOptions(e,s),d=this.getSharedOptions(c),u=this.includeOptions(s,d),p=a.axis,f=o.axis,{spanGaps:g,segment:m}=this.options,v=G(g)?g:Number.POSITIVE_INFINITY,b=this.chart._animationsDisabled||n||"none"===s;let _=e>0&&this.getParsed(e-1);for(let x=e;x<e+i;++x){const e=t[x],i=this.getParsed(x),c=b?e:{},g=h(i[f]),y=c[p]=a.getPixelForValue(i[p],x),k=c[f]=n||g?o.getBasePixel():o.getPixelForValue(r?this.applyStack(o,i,r):i[f],x);c.skip=isNaN(y)||isNaN(k)||g,c.stop=x>0&&Math.abs(i[p]-_[p])>v,m&&(c.parsed=i,c.raw=l.data[x]),u&&(c.options=d||this.resolveDataElementOptions(x,e.active?"active":s)),b||this.updateElement(e,x,c,s),_=i}this.updateSharedOptions(d,s,c)}getMaxOverflow(){const t=this._cachedMeta,e=t.dataset,i=e.options&&e.options.borderWidth||0,s=t.data||[];if(!s.length)return i;const n=s[0].size(this.resolveDataElementOptions(0)),a=s[s.length-1].size(this.resolveDataElementOptions(s.length-1));return Math.max(i,n,a)/2}draw(){const t=this._cachedMeta;t.dataset.updateControlPoints(this.chart.chartArea,t.iScale.axis),super.draw()}}function ln(t,e,i){const s=e.length;let n=0,a=s;if(t._sorted){const{iScale:o,_parsed:r}=t,l=o.axis,{min:c,max:h,minDefined:d,maxDefined:u}=o.getUserBounds();d&&(n=ot(Math.min(Ne(r,o.axis,c).lo,i?s:Ne(e,l,o.getPixelForValue(c)).lo),0,s-1)),a=u?ot(Math.max(Ne(r,o.axis,h).hi+1,i?0:Ne(e,l,o.getPixelForValue(h)).hi+1),n,s)-n:s-n}return{start:n,count:a}}function cn(t){const{xScale:e,yScale:i,_scaleRanges:s}=t,n={xmin:e.min,xmax:e.max,ymin:i.min,ymax:i.max};if(!s)return t._scaleRanges=n,!0;const a=s.xmin!==e.min||s.xmax!==e.max||s.ymin!==i.min||s.ymax!==i.max;return Object.assign(s,n),a}rn.id="line",rn.defaults={datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1},rn.overrides={scales:{_index_:{type:"category"},_value_:{type:"linear"}}};class hn extends zs{constructor(t,e){super(t,e),this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(t){const e=this._cachedMeta,i=this.chart,s=i.data.labels||[],n=qi(e._parsed[t].r,i.options.locale);return{label:s[t]||"",value:n}}parseObjectData(t,e,i,s){return fi.bind(this)(t,e,i,s)}update(t){const e=this._cachedMeta.data;this._updateRadius(),this.updateElements(e,0,e.length,t)}getMinMax(){const t=this._cachedMeta,e={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY};return t.data.forEach((t,i)=>{const s=this.getParsed(i).r;!isNaN(s)&&this.chart.getDataVisibility(i)&&(s<e.min&&(e.min=s),s>e.max&&(e.max=s))}),e}_updateRadius(){const t=this.chart,e=t.chartArea,i=t.options,s=Math.min(e.right-e.left,e.bottom-e.top),n=Math.max(s/2,0),a=Math.max(i.cutoutPercentage?n/100*i.cutoutPercentage:1,0),o=(n-a)/t.getVisibleDatasetCount();this.outerRadius=n-o*this.index,this.innerRadius=this.outerRadius-o}updateElements(t,e,i,s){const n="reset"===s,a=this.chart,o=a.options,r=o.animation,l=this._cachedMeta.rScale,c=l.xCenter,h=l.yCenter,d=l.getIndexAngle(0)-.5*R;let u,p=d;const f=360/this.countVisibleElements();for(u=0;u<e;++u)p+=this._computeAngle(u,s,f);for(u=e;u<e+i;u++){const e=t[u];let i=p,o=p+this._computeAngle(u,s,f),g=a.getDataVisibility(u)?l.getDistanceFromCenterForValue(this.getParsed(u).r):0;p=o,n&&(r.animateScale&&(g=0),r.animateRotate&&(i=o=d));const m={x:c,y:h,innerRadius:0,outerRadius:g,startAngle:i,endAngle:o,options:this.resolveDataElementOptions(u,e.active?"active":s)};this.updateElement(e,u,m,s)}}countVisibleElements(){const t=this._cachedMeta;let e=0;return t.data.forEach((t,i)=>{!isNaN(this.getParsed(i).r)&&this.chart.getDataVisibility(i)&&e++}),e}_computeAngle(t,e,i){return this.chart.getDataVisibility(t)?Z(this.resolveDataElementOptions(t,e).angle||i):0}}hn.id="polarArea",hn.defaults={dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0},hn.overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const e=t.data;if(e.labels.length&&e.datasets.length){const{labels:{pointStyle:i}}=t.legend.options;return e.labels.map((e,s)=>{const n=t.getDatasetMeta(0),a=n.controller.getStyle(s);return{text:e,fillStyle:a.backgroundColor,strokeStyle:a.borderColor,lineWidth:a.borderWidth,pointStyle:i,hidden:!t.getDataVisibility(s),index:s}})}return[]}},onClick(t,e,i){i.chart.toggleDataVisibility(e.index),i.chart.update()}},tooltip:{callbacks:{title(){return""},label(t){return t.chart.data.labels[t.dataIndex]+": "+t.formattedValue}}}},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}};class dn extends on{}dn.id="pie",dn.defaults={cutout:0,rotation:0,circumference:360,radius:"100%"};class un extends zs{getLabelAndValue(t){const e=this._cachedMeta.vScale,i=this.getParsed(t);return{label:e.getLabels()[t],value:""+e.getLabelForValue(i[e.axis])}}parseObjectData(t,e,i,s){return fi.bind(this)(t,e,i,s)}update(t){const e=this._cachedMeta,i=e.dataset,s=e.data||[],n=e.iScale.getLabels();if(i.points=s,"resize"!==t){const e=this.resolveDatasetElementOptions(t);this.options.showLine||(e.borderWidth=0);const a={_loop:!0,_fullLoop:n.length===s.length,options:e};this.updateElement(i,void 0,a,t)}this.updateElements(s,0,s.length,t)}updateElements(t,e,i,s){const n=this._cachedMeta.rScale,a="reset"===s;for(let o=e;o<e+i;o++){const e=t[o],i=this.resolveDataElementOptions(o,e.active?"active":s),r=n.getPointPositionForValue(o,this.getParsed(o).r),l=a?n.xCenter:r.x,c=a?n.yCenter:r.y,h={x:l,y:c,angle:r.angle,skip:isNaN(l)||isNaN(c),options:i};this.updateElement(e,o,h,s)}}}un.id="radar",un.defaults={datasetElementType:"line",dataElementType:"point",indexAxis:"r",showLine:!0,elements:{line:{fill:"start"}}},un.overrides={aspectRatio:1,scales:{r:{type:"radialLinear"}}};class pn extends rn{}pn.id="scatter",pn.defaults={showLine:!1,fill:!1},pn.overrides={interaction:{mode:"point"},plugins:{tooltip:{callbacks:{title(){return""},label(t){return"("+t.label+", "+t.formattedValue+")"}}}},scales:{x:{type:"linear"},y:{type:"linear"}}};function fn(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class gn{constructor(t){this.options=t||{}}formats(){return fn()}parse(t,e){return fn()}format(t,e){return fn()}add(t,e,i){return fn()}diff(t,e,i){return fn()}startOf(t,e,i){return fn()}endOf(t,e){return fn()}}gn.override=function(t){Object.assign(gn.prototype,t)};var mn={_date:gn};function vn(t,e,i,s){const{controller:n,data:a,_sorted:o}=t,r=n._cachedMeta.iScale;if(r&&e===r.axis&&"r"!==e&&o&&a.length){const t=r._reversePixels?We:Ne;if(!s)return t(a,e,i);if(n._sharedOptions){const s=a[0],n="function"===typeof s.getRange&&s.getRange(e);if(n){const s=t(a,e,i-n),o=t(a,e,i+n);return{lo:s.lo,hi:o.hi}}}}return{lo:0,hi:a.length-1}}function bn(t,e,i,s,n){const a=t.getSortedVisibleDatasetMetas(),o=i[e];for(let r=0,l=a.length;r<l;++r){const{index:t,data:i}=a[r],{lo:l,hi:c}=vn(a[r],e,o,n);for(let e=l;e<=c;++e){const n=i[e];n.skip||s(n,t,e)}}}function _n(t){const e=-1!==t.indexOf("x"),i=-1!==t.indexOf("y");return function(t,s){const n=e?Math.abs(t.x-s.x):0,a=i?Math.abs(t.y-s.y):0;return Math.sqrt(Math.pow(n,2)+Math.pow(a,2))}}function xn(t,e,i,s,n){const a=[];if(!n&&!t.isPointInArea(e))return a;const o=function(i,o,r){(n||xe(i,t.chartArea,0))&&i.inRange(e.x,e.y,s)&&a.push({element:i,datasetIndex:o,index:r})};return bn(t,i,e,o,!0),a}function yn(t,e,i,s){let n=[];function a(t,i,a){const{startAngle:o,endAngle:r}=t.getProps(["startAngle","endAngle"],s),{angle:l}=et(t,{x:e.x,y:e.y});at(l,o,r)&&n.push({element:t,datasetIndex:i,index:a})}return bn(t,i,e,a),n}function kn(t,e,i,s,n,a){let o=[];const r=_n(i);let l=Number.POSITIVE_INFINITY;function c(i,c,h){const d=i.inRange(e.x,e.y,n);if(s&&!d)return;const u=i.getCenterPoint(n),p=!!a||t.isPointInArea(u);if(!p&&!d)return;const f=r(e,u);f<l?(o=[{element:i,datasetIndex:c,index:h}],l=f):f===l&&o.push({element:i,datasetIndex:c,index:h})}return bn(t,i,e,c),o}function wn(t,e,i,s,n,a){return a||t.isPointInArea(e)?"r"!==i||s?kn(t,e,i,s,n,a):yn(t,e,i,n):[]}function Cn(t,e,i,s,n){const a=[],o="x"===i?"inXRange":"inYRange";let r=!1;return bn(t,i,e,(t,s,l)=>{t[o](e[i],n)&&(a.push({element:t,datasetIndex:s,index:l}),r=r||t.inRange(e.x,e.y,n))}),s&&!r?[]:a}var Mn={evaluateInteractionItems:bn,modes:{index(t,e,i,s){const n=Ei(e,t),a=i.axis||"x",o=i.includeInvisible||!1,r=i.intersect?xn(t,n,a,s,o):wn(t,n,a,!1,s,o),l=[];return r.length?(t.getSortedVisibleDatasetMetas().forEach(t=>{const e=r[0].index,i=t.data[e];i&&!i.skip&&l.push({element:i,datasetIndex:t.index,index:e})}),l):[]},dataset(t,e,i,s){const n=Ei(e,t),a=i.axis||"xy",o=i.includeInvisible||!1;let r=i.intersect?xn(t,n,a,s,o):wn(t,n,a,!1,s,o);if(r.length>0){const e=r[0].datasetIndex,i=t.getDatasetMeta(e).data;r=[];for(let t=0;t<i.length;++t)r.push({element:i[t],datasetIndex:e,index:t})}return r},point(t,e,i,s){const n=Ei(e,t),a=i.axis||"xy",o=i.includeInvisible||!1;return xn(t,n,a,s,o)},nearest(t,e,i,s){const n=Ei(e,t),a=i.axis||"xy",o=i.includeInvisible||!1;return wn(t,n,a,i.intersect,s,o)},x(t,e,i,s){const n=Ei(e,t);return Cn(t,n,"x",i.intersect,s)},y(t,e,i,s){const n=Ei(e,t);return Cn(t,n,"y",i.intersect,s)}}};const Sn=["left","top","right","bottom"];function On(t,e){return t.filter(t=>t.pos===e)}function Dn(t,e){return t.filter(t=>-1===Sn.indexOf(t.pos)&&t.box.axis===e)}function Pn(t,e){return t.sort((t,i)=>{const s=e?i:t,n=e?t:i;return s.weight===n.weight?s.index-n.index:s.weight-n.weight})}function In(t){const e=[];let i,s,n,a,o,r;for(i=0,s=(t||[]).length;i<s;++i)n=t[i],({position:a,options:{stack:o,stackWeight:r=1}}=n),e.push({index:i,box:n,pos:a,horizontal:n.isHorizontal(),weight:n.weight,stack:o&&a+o,stackWeight:r});return e}function Tn(t){const e={};for(const i of t){const{stack:t,pos:s,stackWeight:n}=i;if(!t||!Sn.includes(s))continue;const a=e[t]||(e[t]={count:0,placed:0,weight:0,size:0});a.count++,a.weight+=n}return e}function $n(t,e){const i=Tn(t),{vBoxMaxWidth:s,hBoxMaxHeight:n}=e;let a,o,r;for(a=0,o=t.length;a<o;++a){r=t[a];const{fullSize:o}=r.box,l=i[r.stack],c=l&&r.stackWeight/l.weight;r.horizontal?(r.width=c?c*s:o&&e.availableWidth,r.height=n):(r.width=s,r.height=c?c*n:o&&e.availableHeight)}return i}function Ln(t){const e=In(t),i=Pn(e.filter(t=>t.box.fullSize),!0),s=Pn(On(e,"left"),!0),n=Pn(On(e,"right")),a=Pn(On(e,"top"),!0),o=Pn(On(e,"bottom")),r=Dn(e,"x"),l=Dn(e,"y");return{fullSize:i,leftAndTop:s.concat(a),rightAndBottom:n.concat(l).concat(o).concat(r),chartArea:On(e,"chartArea"),vertical:s.concat(n).concat(l),horizontal:a.concat(o).concat(r)}}function En(t,e,i,s){return Math.max(t[i],e[i])+Math.max(t[s],e[s])}function An(t,e){t.top=Math.max(t.top,e.top),t.left=Math.max(t.left,e.left),t.bottom=Math.max(t.bottom,e.bottom),t.right=Math.max(t.right,e.right)}function Rn(t,e,i,s){const{pos:n,box:a}=i,o=t.maxPadding;if(!u(n)){i.size&&(t[n]-=i.size);const e=s[i.stack]||{size:0,count:1};e.size=Math.max(e.size,i.horizontal?a.height:a.width),i.size=e.size/e.count,t[n]+=i.size}a.getPadding&&An(o,a.getPadding());const r=Math.max(0,e.outerWidth-En(o,t,"left","right")),l=Math.max(0,e.outerHeight-En(o,t,"top","bottom")),c=r!==t.w,h=l!==t.h;return t.w=r,t.h=l,i.horizontal?{same:c,other:h}:{same:h,other:c}}function Vn(t){const e=t.maxPadding;function i(i){const s=Math.max(e[i]-t[i],0);return t[i]+=s,s}t.y+=i("top"),t.x+=i("left"),i("right"),i("bottom")}function Fn(t,e){const i=e.maxPadding;function s(t){const s={left:0,top:0,right:0,bottom:0};return t.forEach(t=>{s[t]=Math.max(e[t],i[t])}),s}return s(t?["left","right"]:["top","bottom"])}function Bn(t,e,i,s){const n=[];let a,o,r,l,c,h;for(a=0,o=t.length,c=0;a<o;++a){r=t[a],l=r.box,l.update(r.width||e.w,r.height||e.h,Fn(r.horizontal,e));const{same:o,other:d}=Rn(e,i,r,s);c|=o&&n.length,h=h||d,l.fullSize||n.push(r)}return c&&Bn(n,e,i,s)||h}function zn(t,e,i,s,n){t.top=i,t.left=e,t.right=e+s,t.bottom=i+n,t.width=s,t.height=n}function jn(t,e,i,s){const n=i.padding;let{x:a,y:o}=e;for(const r of t){const t=r.box,l=s[r.stack]||{count:1,placed:0,weight:1},c=r.stackWeight/l.weight||1;if(r.horizontal){const s=e.w*c,a=l.size||t.height;$(l.start)&&(o=l.start),t.fullSize?zn(t,n.left,o,i.outerWidth-n.right-n.left,a):zn(t,e.left+l.placed,o,s,a),l.start=o,l.placed+=s,o=t.bottom}else{const s=e.h*c,o=l.size||t.width;$(l.start)&&(a=l.start),t.fullSize?zn(t,a,n.top,o,i.outerHeight-n.bottom-n.top):zn(t,a,e.top+l.placed,o,s),l.start=a,l.placed+=s,a=t.right}}e.x=a,e.y=o}pe.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}});var Nn={addBox(t,e){t.boxes||(t.boxes=[]),e.fullSize=e.fullSize||!1,e.position=e.position||"top",e.weight=e.weight||0,e._layers=e._layers||function(){return[{z:0,draw(t){e.draw(t)}}]},t.boxes.push(e)},removeBox(t,e){const i=t.boxes?t.boxes.indexOf(e):-1;-1!==i&&t.boxes.splice(i,1)},configure(t,e,i){e.fullSize=i.fullSize,e.position=i.position,e.weight=i.weight},update(t,e,i,s){if(!t)return;const n=Re(t.options.layout.padding),a=Math.max(e-n.width,0),o=Math.max(i-n.height,0),r=Ln(t.boxes),l=r.vertical,c=r.horizontal;_(t.boxes,t=>{"function"===typeof t.beforeLayout&&t.beforeLayout()});const h=l.reduce((t,e)=>e.box.options&&!1===e.box.options.display?t:t+1,0)||1,d=Object.freeze({outerWidth:e,outerHeight:i,padding:n,availableWidth:a,availableHeight:o,vBoxMaxWidth:a/2/h,hBoxMaxHeight:o/2}),u=Object.assign({},n);An(u,Re(s));const p=Object.assign({maxPadding:u,w:a,h:o,x:n.left,y:n.top},n),f=$n(l.concat(c),d);Bn(r.fullSize,p,d,f),Bn(l,p,d,f),Bn(c,p,d,f)&&Bn(l,p,d,f),Vn(p),jn(r.leftAndTop,p,d,f),p.x+=p.w,p.y+=p.h,jn(r.rightAndBottom,p,d,f),t.chartArea={left:p.left,top:p.top,right:p.left+p.w,bottom:p.top+p.h,height:p.h,width:p.w},_(r.chartArea,e=>{const i=e.box;Object.assign(i,t.chartArea),i.update(p.w,p.h,{left:0,top:0,right:0,bottom:0})})}};class Wn{acquireContext(t,e){}releaseContext(t){return!1}addEventListener(t,e,i){}removeEventListener(t,e,i){}getDevicePixelRatio(){return 1}getMaximumSize(t,e,i,s){return e=Math.max(0,e||t.width),i=i||t.height,{width:e,height:Math.max(0,s?Math.floor(e/s):i)}}isAttached(t){return!0}updateConfig(t){}}class Hn extends Wn{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=!1}}const Un="$chartjs",qn={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},Yn=t=>null===t||""===t;function Gn(t,e){const i=t.style,s=t.getAttribute("height"),n=t.getAttribute("width");if(t[Un]={initial:{height:s,width:n,style:{display:i.display,height:i.height,width:i.width}}},i.display=i.display||"block",i.boxSizing=i.boxSizing||"border-box",Yn(n)){const e=zi(t,"width");void 0!==e&&(t.width=e)}if(Yn(s))if(""===t.style.height)t.height=t.width/(e||2);else{const e=zi(t,"height");void 0!==e&&(t.height=e)}return t}const Xn=!!Bi&&{passive:!0};function Qn(t,e,i){t.addEventListener(e,i,Xn)}function Kn(t,e,i){t.canvas.removeEventListener(e,i,Xn)}function Zn(t,e){const i=qn[t.type]||t.type,{x:s,y:n}=Ei(t,e);return{type:i,chart:e,native:t,x:void 0!==s?s:null,y:void 0!==n?n:null}}function Jn(t,e){for(const i of t)if(i===e||i.contains(e))return!0}function ta(t,e,i){const s=t.canvas,n=new MutationObserver(t=>{let e=!1;for(const i of t)e=e||Jn(i.addedNodes,s),e=e&&!Jn(i.removedNodes,s);e&&i()});return n.observe(document,{childList:!0,subtree:!0}),n}function ea(t,e,i){const s=t.canvas,n=new MutationObserver(t=>{let e=!1;for(const i of t)e=e||Jn(i.removedNodes,s),e=e&&!Jn(i.addedNodes,s);e&&i()});return n.observe(document,{childList:!0,subtree:!0}),n}const ia=new Map;let sa=0;function na(){const t=window.devicePixelRatio;t!==sa&&(sa=t,ia.forEach((e,i)=>{i.currentDevicePixelRatio!==t&&e()}))}function aa(t,e){ia.size||window.addEventListener("resize",na),ia.set(t,e)}function oa(t){ia.delete(t),ia.size||window.removeEventListener("resize",na)}function ra(t,e,i){const s=t.canvas,a=s&&Si(s);if(!a)return;const o=n((t,e)=>{const s=a.clientWidth;i(t,e),s<a.clientWidth&&i()},window),r=new ResizeObserver(t=>{const e=t[0],i=e.contentRect.width,s=e.contentRect.height;0===i&&0===s||o(i,s)});return r.observe(a),aa(t,o),r}function la(t,e,i){i&&i.disconnect(),"resize"===e&&oa(t)}function ca(t,e,i){const s=t.canvas,a=n(e=>{null!==t.ctx&&i(Zn(e,t))},t,t=>{const e=t[0];return[e,e.offsetX,e.offsetY]});return Qn(s,e,a),a}class ha extends Wn{acquireContext(t,e){const i=t&&t.getContext&&t.getContext("2d");return i&&i.canvas===t?(Gn(t,e),i):null}releaseContext(t){const e=t.canvas;if(!e[Un])return!1;const i=e[Un].initial;["height","width"].forEach(t=>{const s=i[t];h(s)?e.removeAttribute(t):e.setAttribute(t,s)});const s=i.style||{};return Object.keys(s).forEach(t=>{e.style[t]=s[t]}),e.width=e.width,delete e[Un],!0}addEventListener(t,e,i){this.removeEventListener(t,e);const s=t.$proxies||(t.$proxies={}),n={attach:ta,detach:ea,resize:ra},a=n[e]||ca;s[e]=a(t,e,i)}removeEventListener(t,e){const i=t.$proxies||(t.$proxies={}),s=i[e];if(!s)return;const n={attach:la,detach:la,resize:la},a=n[e]||Kn;a(t,e,s),i[e]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,e,i,s){return Vi(t,e,i,s)}isAttached(t){const e=Si(t);return!(!e||!e.isConnected)}}function da(t){return!Mi()||"undefined"!==typeof OffscreenCanvas&&t instanceof OffscreenCanvas?Hn:ha}class ua{constructor(){this.x=void 0,this.y=void 0,this.active=!1,this.options=void 0,this.$animations=void 0}tooltipPosition(t){const{x:e,y:i}=this.getProps(["x","y"],t);return{x:e,y:i}}hasValue(){return G(this.x)&&G(this.y)}getProps(t,e){const i=this.$animations;if(!e||!i)return this;const s={};return t.forEach(t=>{s[t]=i[t]&&i[t].active()?i[t]._to:this[t]}),s}}ua.defaults={},ua.defaultRoutes=void 0;const pa={values(t){return d(t)?t:""+t},numeric(t,e,i){if(0===t)return"0";const s=this.chart.options.locale;let n,a=t;if(i.length>1){const e=Math.max(Math.abs(i[0].value),Math.abs(i[i.length-1].value));(e<1e-4||e>1e15)&&(n="scientific"),a=fa(t,i)}const o=H(Math.abs(a)),r=Math.max(Math.min(-1*Math.floor(o),20),0),l={notation:n,minimumFractionDigits:r,maximumFractionDigits:r};return Object.assign(l,this.options.ticks.format),qi(t,s,l)},logarithmic(t,e,i){if(0===t)return"0";const s=t/Math.pow(10,Math.floor(H(t)));return 1===s||2===s||5===s?pa.numeric.call(this,t,e,i):""}};function fa(t,e){let i=e.length>3?e[2].value-e[1].value:e[1].value-e[0].value;return Math.abs(i)>=1&&t!==Math.floor(t)&&(i=t-Math.floor(t)),i}var ga={formatters:pa};function ma(t,e){const i=t.options.ticks,s=i.maxTicksLimit||va(t),n=i.major.enabled?_a(e):[],a=n.length,o=n[0],r=n[a-1],l=[];if(a>s)return xa(e,l,n,a/s),l;const c=ba(n,e,s);if(a>0){let t,i;const s=a>1?Math.round((r-o)/(a-1)):null;for(ya(e,l,c,h(s)?0:o-s,o),t=0,i=a-1;t<i;t++)ya(e,l,c,n[t],n[t+1]);return ya(e,l,c,r,h(s)?e.length:r+s),l}return ya(e,l,c),l}function va(t){const e=t.options.offset,i=t._tickSize(),s=t._length/i+(e?0:1),n=t._maxLength/i;return Math.floor(Math.min(s,n))}function ba(t,e,i){const s=ka(t),n=e.length/i;if(!s)return Math.max(n,1);const a=Y(s);for(let o=0,r=a.length-1;o<r;o++){const t=a[o];if(t>n)return t}return Math.max(n,1)}function _a(t){const e=[];let i,s;for(i=0,s=t.length;i<s;i++)t[i].major&&e.push(i);return e}function xa(t,e,i,s){let n,a=0,o=i[0];for(s=Math.ceil(s),n=0;n<t.length;n++)n===o&&(e.push(t[n]),a++,o=i[a*s])}function ya(t,e,i,s,n){const a=g(s,0),o=Math.min(g(n,t.length),t.length);let r,l,c,h=0;i=Math.ceil(i),n&&(r=n-s,i=r/Math.floor(r/i)),c=a;while(c<0)h++,c=Math.round(a+h*i);for(l=Math.max(a,0);l<o;l++)l===c&&(e.push(t[l]),h++,c=Math.round(a+h*i))}function ka(t){const e=t.length;let i,s;if(e<2)return!1;for(s=t[0],i=1;i<e;++i)if(t[i]-t[i-1]!==s)return!1;return s}pe.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",grace:0,grid:{display:!0,lineWidth:1,drawBorder:!0,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(t,e)=>e.lineWidth,tickColor:(t,e)=>e.color,offset:!1,borderDash:[],borderDashOffset:0,borderWidth:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:ga.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),pe.route("scale.ticks","color","","color"),pe.route("scale.grid","color","","borderColor"),pe.route("scale.grid","borderColor","","borderColor"),pe.route("scale.title","color","","color"),pe.describe("scale",{_fallback:!1,_scriptable:t=>!t.startsWith("before")&&!t.startsWith("after")&&"callback"!==t&&"parser"!==t,_indexable:t=>"borderDash"!==t&&"tickBorderDash"!==t}),pe.describe("scales",{_fallback:"scale"}),pe.describe("scale.ticks",{_scriptable:t=>"backdropPadding"!==t&&"callback"!==t,_indexable:t=>"backdropPadding"!==t});const wa=t=>"left"===t?"right":"right"===t?"left":t,Ca=(t,e,i)=>"top"===e||"left"===e?t[e]+i:t[e]-i;function Ma(t,e){const i=[],s=t.length/e,n=t.length;let a=0;for(;a<n;a+=s)i.push(t[Math.floor(a)]);return i}function Sa(t,e,i){const s=t.ticks.length,n=Math.min(e,s-1),a=t._startPixel,o=t._endPixel,r=1e-6;let l,c=t.getPixelForTick(n);if(!(i&&(l=1===s?Math.max(c-a,o-c):0===e?(t.getPixelForTick(1)-c)/2:(c-t.getPixelForTick(n-1))/2,c+=n<e?l:-l,c<a-r||c>o+r)))return c}function Oa(t,e){_(t,t=>{const i=t.gc,s=i.length/2;let n;if(s>e){for(n=0;n<s;++n)delete t.data[i[n]];i.splice(0,s)}})}function Da(t){return t.drawTicks?t.tickLength:0}function Pa(t,e){if(!t.display)return 0;const i=Ve(t.font,e),s=Re(t.padding),n=d(t.text)?t.text.length:1;return n*i.lineHeight+s.height}function Ia(t,e){return ze(t,{scale:e,type:"scale"})}function Ta(t,e,i){return ze(t,{tick:i,index:e,type:"tick"})}function $a(t,e,i){let s=o(t);return(i&&"right"!==e||!i&&"right"===e)&&(s=wa(s)),s}function La(t,e,i,s){const{top:n,left:a,bottom:o,right:l,chart:c}=t,{chartArea:h,scales:d}=c;let p,f,g,m=0;const v=o-n,b=l-a;if(t.isHorizontal()){if(f=r(s,a,l),u(i)){const t=Object.keys(i)[0],s=i[t];g=d[t].getPixelForValue(s)+v-e}else g="center"===i?(h.bottom+h.top)/2+v-e:Ca(t,i,e);p=l-a}else{if(u(i)){const t=Object.keys(i)[0],s=i[t];f=d[t].getPixelForValue(s)-b+e}else f="center"===i?(h.left+h.right)/2-b+e:Ca(t,i,e);g=r(s,o,n),m="left"===i?-j:j}return{titleX:f,titleY:g,maxWidth:p,rotation:m}}class Ea extends ua{constructor(t){super(),this.id=t.id,this.type=t.type,this.options=void 0,this.ctx=t.ctx,this.chart=t.chart,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this._margins={left:0,right:0,top:0,bottom:0},this.maxWidth=void 0,this.maxHeight=void 0,this.paddingTop=void 0,this.paddingBottom=void 0,this.paddingLeft=void 0,this.paddingRight=void 0,this.axis=void 0,this.labelRotation=void 0,this.min=void 0,this.max=void 0,this._range=void 0,this.ticks=[],this._gridLineItems=null,this._labelItems=null,this._labelSizes=null,this._length=0,this._maxLength=0,this._longestTextCache={},this._startPixel=void 0,this._endPixel=void 0,this._reversePixels=!1,this._userMax=void 0,this._userMin=void 0,this._suggestedMax=void 0,this._suggestedMin=void 0,this._ticksLength=0,this._borderValue=0,this._cache={},this._dataLimitsCached=!1,this.$context=void 0}init(t){this.options=t.setContext(this.getContext()),this.axis=t.axis,this._userMin=this.parse(t.min),this._userMax=this.parse(t.max),this._suggestedMin=this.parse(t.suggestedMin),this._suggestedMax=this.parse(t.suggestedMax)}parse(t,e){return t}getUserBounds(){let{_userMin:t,_userMax:e,_suggestedMin:i,_suggestedMax:s}=this;return t=f(t,Number.POSITIVE_INFINITY),e=f(e,Number.NEGATIVE_INFINITY),i=f(i,Number.POSITIVE_INFINITY),s=f(s,Number.NEGATIVE_INFINITY),{min:f(t,i),max:f(e,s),minDefined:p(t),maxDefined:p(e)}}getMinMax(t){let e,{min:i,max:s,minDefined:n,maxDefined:a}=this.getUserBounds();if(n&&a)return{min:i,max:s};const o=this.getMatchingVisibleMetas();for(let r=0,l=o.length;r<l;++r)e=o[r].controller.getMinMax(this,t),n||(i=Math.min(i,e.min)),a||(s=Math.max(s,e.max));return i=a&&i>s?s:i,s=n&&i>s?i:s,{min:f(i,f(s,i)),max:f(s,f(i,s))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const t=this.chart.data;return this.options.labels||(this.isHorizontal()?t.xLabels:t.yLabels)||t.labels||[]}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){b(this.options.beforeUpdate,[this])}update(t,e,i){const{beginAtZero:s,grace:n,ticks:a}=this.options,o=a.sampleSize;this.beforeUpdate(),this.maxWidth=t,this.maxHeight=e,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=Be(this,n,s),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const r=o<this.ticks.length;this._convertTicksToLabels(r?Ma(this.ticks,o):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),a.display&&(a.autoSkip||"auto"===a.source)&&(this.ticks=ma(this,this.ticks),this._labelSizes=null,this.afterAutoSkip()),r&&this._convertTicksToLabels(this.ticks),this.beforeFit(),this.fit(),this.afterFit(),this.afterUpdate()}configure(){let t,e,i=this.options.reverse;this.isHorizontal()?(t=this.left,e=this.right):(t=this.top,e=this.bottom,i=!i),this._startPixel=t,this._endPixel=e,this._reversePixels=i,this._length=e-t,this._alignToPixels=this.options.alignToPixels}afterUpdate(){b(this.options.afterUpdate,[this])}beforeSetDimensions(){b(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(){b(this.options.afterSetDimensions,[this])}_callHooks(t){this.chart.notifyPlugins(t,this.getContext()),b(this.options[t],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){b(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(t){const e=this.options.ticks;let i,s,n;for(i=0,s=t.length;i<s;i++)n=t[i],n.label=b(e.callback,[n.value,i,t],this)}afterTickToLabelConversion(){b(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){b(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){const t=this.options,e=t.ticks,i=this.ticks.length,s=e.minRotation||0,n=e.maxRotation;let a,o,r,l=s;if(!this._isVisible()||!e.display||s>=n||i<=1||!this.isHorizontal())return void(this.labelRotation=s);const c=this._getLabelSizes(),h=c.widest.width,d=c.highest.height,u=ot(this.chart.width-h,0,this.maxWidth);a=t.offset?this.maxWidth/i:u/(i-1),h+6>a&&(a=u/(i-(t.offset?.5:1)),o=this.maxHeight-Da(t.grid)-e.padding-Pa(t.title,this.chart.options.font),r=Math.sqrt(h*h+d*d),l=J(Math.min(Math.asin(ot((c.highest.height+6)/a,-1,1)),Math.asin(ot(o/r,-1,1))-Math.asin(ot(d/r,-1,1)))),l=Math.max(s,Math.min(n,l))),this.labelRotation=l}afterCalculateLabelRotation(){b(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){b(this.options.beforeFit,[this])}fit(){const t={width:0,height:0},{chart:e,options:{ticks:i,title:s,grid:n}}=this,a=this._isVisible(),o=this.isHorizontal();if(a){const a=Pa(s,e.options.font);if(o?(t.width=this.maxWidth,t.height=Da(n)+a):(t.height=this.maxHeight,t.width=Da(n)+a),i.display&&this.ticks.length){const{first:e,last:s,widest:n,highest:a}=this._getLabelSizes(),r=2*i.padding,l=Z(this.labelRotation),c=Math.cos(l),h=Math.sin(l);if(o){const e=i.mirror?0:h*n.width+c*a.height;t.height=Math.min(this.maxHeight,t.height+e+r)}else{const e=i.mirror?0:c*n.width+h*a.height;t.width=Math.min(this.maxWidth,t.width+e+r)}this._calculatePadding(e,s,h,c)}}this._handleMargins(),o?(this.width=this._length=e.width-this._margins.left-this._margins.right,this.height=t.height):(this.width=t.width,this.height=this._length=e.height-this._margins.top-this._margins.bottom)}_calculatePadding(t,e,i,s){const{ticks:{align:n,padding:a},position:o}=this.options,r=0!==this.labelRotation,l="top"!==o&&"x"===this.axis;if(this.isHorizontal()){const o=this.getPixelForTick(0)-this.left,c=this.right-this.getPixelForTick(this.ticks.length-1);let h=0,d=0;r?l?(h=s*t.width,d=i*e.height):(h=i*t.height,d=s*e.width):"start"===n?d=e.width:"end"===n?h=t.width:"inner"!==n&&(h=t.width/2,d=e.width/2),this.paddingLeft=Math.max((h-o+a)*this.width/(this.width-o),0),this.paddingRight=Math.max((d-c+a)*this.width/(this.width-c),0)}else{let i=e.height/2,s=t.height/2;"start"===n?(i=0,s=t.height):"end"===n&&(i=e.height,s=0),this.paddingTop=i+a,this.paddingBottom=s+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(){b(this.options.afterFit,[this])}isHorizontal(){const{axis:t,position:e}=this.options;return"top"===e||"bottom"===e||"x"===t}isFullSize(){return this.options.fullSize}_convertTicksToLabels(t){let e,i;for(this.beforeTickToLabelConversion(),this.generateTickLabels(t),e=0,i=t.length;e<i;e++)h(t[e].label)&&(t.splice(e,1),i--,e--);this.afterTickToLabelConversion()}_getLabelSizes(){let t=this._labelSizes;if(!t){const e=this.options.ticks.sampleSize;let i=this.ticks;e<i.length&&(i=Ma(i,e)),this._labelSizes=t=this._computeLabelSizes(i,i.length)}return t}_computeLabelSizes(t,e){const{ctx:i,_longestTextCache:s}=this,n=[],a=[];let o,r,l,c,u,p,f,g,m,v,b,_=0,x=0;for(o=0;o<e;++o){if(c=t[o].label,u=this._resolveTickFontOptions(o),i.font=p=u.string,f=s[p]=s[p]||{data:{},gc:[]},g=u.lineHeight,m=v=0,h(c)||d(c)){if(d(c))for(r=0,l=c.length;r<l;++r)b=c[r],h(b)||d(b)||(m=ge(i,f.data,f.gc,m,b),v+=g)}else m=ge(i,f.data,f.gc,m,c),v=g;n.push(m),a.push(v),_=Math.max(m,_),x=Math.max(v,x)}Oa(s,e);const y=n.indexOf(_),k=a.indexOf(x),w=t=>({width:n[t]||0,height:a[t]||0});return{first:w(0),last:w(e-1),widest:w(y),highest:w(k),widths:n,heights:a}}getLabelForValue(t){return t}getPixelForValue(t,e){return NaN}getValueForPixel(t){}getPixelForTick(t){const e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t].value)}getPixelForDecimal(t){this._reversePixels&&(t=1-t);const e=this._startPixel+t*this._length;return rt(this._alignToPixels?ve(this.chart,e,0):e)}getDecimalForPixel(t){const e=(t-this._startPixel)/this._length;return this._reversePixels?1-e:e}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:t,max:e}=this;return t<0&&e<0?e:t>0&&e>0?t:0}getContext(t){const e=this.ticks||[];if(t>=0&&t<e.length){const i=e[t];return i.$context||(i.$context=Ta(this.getContext(),t,i))}return this.$context||(this.$context=Ia(this.chart.getContext(),this))}_tickSize(){const t=this.options.ticks,e=Z(this.labelRotation),i=Math.abs(Math.cos(e)),s=Math.abs(Math.sin(e)),n=this._getLabelSizes(),a=t.autoSkipPadding||0,o=n?n.widest.width+a:0,r=n?n.highest.height+a:0;return this.isHorizontal()?r*i>o*s?o/i:r/s:r*s<o*i?r/i:o/s}_isVisible(){const t=this.options.display;return"auto"!==t?!!t:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(t){const e=this.axis,i=this.chart,s=this.options,{grid:n,position:a}=s,o=n.offset,r=this.isHorizontal(),l=this.ticks,c=l.length+(o?1:0),h=Da(n),d=[],p=n.setContext(this.getContext()),f=p.drawBorder?p.borderWidth:0,m=f/2,v=function(t){return ve(i,t,f)};let b,_,x,y,k,w,C,M,S,O,D,P;if("top"===a)b=v(this.bottom),w=this.bottom-h,M=b-m,O=v(t.top)+m,P=t.bottom;else if("bottom"===a)b=v(this.top),O=t.top,P=v(t.bottom)-m,w=b+m,M=this.top+h;else if("left"===a)b=v(this.right),k=this.right-h,C=b-m,S=v(t.left)+m,D=t.right;else if("right"===a)b=v(this.left),S=t.left,D=v(t.right)-m,k=b+m,C=this.left+h;else if("x"===e){if("center"===a)b=v((t.top+t.bottom)/2+.5);else if(u(a)){const t=Object.keys(a)[0],e=a[t];b=v(this.chart.scales[t].getPixelForValue(e))}O=t.top,P=t.bottom,w=b+m,M=w+h}else if("y"===e){if("center"===a)b=v((t.left+t.right)/2);else if(u(a)){const t=Object.keys(a)[0],e=a[t];b=v(this.chart.scales[t].getPixelForValue(e))}k=b-m,C=k-h,S=t.left,D=t.right}const I=g(s.ticks.maxTicksLimit,c),T=Math.max(1,Math.ceil(c/I));for(_=0;_<c;_+=T){const t=n.setContext(this.getContext(_)),e=t.lineWidth,s=t.color,a=n.borderDash||[],l=t.borderDashOffset,c=t.tickWidth,h=t.tickColor,u=t.tickBorderDash||[],p=t.tickBorderDashOffset;x=Sa(this,_,o),void 0!==x&&(y=ve(i,x,e),r?k=C=S=D=y:w=M=O=P=y,d.push({tx1:k,ty1:w,tx2:C,ty2:M,x1:S,y1:O,x2:D,y2:P,width:e,color:s,borderDash:a,borderDashOffset:l,tickWidth:c,tickColor:h,tickBorderDash:u,tickBorderDashOffset:p}))}return this._ticksLength=c,this._borderValue=b,d}_computeLabelItems(t){const e=this.axis,i=this.options,{position:s,ticks:n}=i,a=this.isHorizontal(),o=this.ticks,{align:r,crossAlign:l,padding:c,mirror:h}=n,p=Da(i.grid),f=p+c,g=h?-c:f,m=-Z(this.labelRotation),v=[];let b,_,x,y,k,w,C,M,S,O,D,P,I="middle";if("top"===s)w=this.bottom-g,C=this._getXAxisLabelAlignment();else if("bottom"===s)w=this.top+g,C=this._getXAxisLabelAlignment();else if("left"===s){const t=this._getYAxisLabelAlignment(p);C=t.textAlign,k=t.x}else if("right"===s){const t=this._getYAxisLabelAlignment(p);C=t.textAlign,k=t.x}else if("x"===e){if("center"===s)w=(t.top+t.bottom)/2+f;else if(u(s)){const t=Object.keys(s)[0],e=s[t];w=this.chart.scales[t].getPixelForValue(e)+f}C=this._getXAxisLabelAlignment()}else if("y"===e){if("center"===s)k=(t.left+t.right)/2-f;else if(u(s)){const t=Object.keys(s)[0],e=s[t];k=this.chart.scales[t].getPixelForValue(e)}C=this._getYAxisLabelAlignment(p).textAlign}"y"===e&&("start"===r?I="top":"end"===r&&(I="bottom"));const T=this._getLabelSizes();for(b=0,_=o.length;b<_;++b){x=o[b],y=x.label;const t=n.setContext(this.getContext(b));M=this.getPixelForTick(b)+n.labelOffset,S=this._resolveTickFontOptions(b),O=S.lineHeight,D=d(y)?y.length:1;const e=D/2,i=t.color,r=t.textStrokeColor,c=t.textStrokeWidth;let u,p=C;if(a?(k=M,"inner"===C&&(p=b===_-1?this.options.reverse?"left":"right":0===b?this.options.reverse?"right":"left":"center"),P="top"===s?"near"===l||0!==m?-D*O+O/2:"center"===l?-T.highest.height/2-e*O+O:-T.highest.height+O/2:"near"===l||0!==m?O/2:"center"===l?T.highest.height/2-e*O:T.highest.height-D*O,h&&(P*=-1)):(w=M,P=(1-D)*O/2),t.showLabelBackdrop){const e=Re(t.backdropPadding),i=T.heights[b],s=T.widths[b];let n=w+P-e.top,a=k-e.left;switch(I){case"middle":n-=i/2;break;case"bottom":n-=i;break}switch(C){case"center":a-=s/2;break;case"right":a-=s;break}u={left:a,top:n,width:s+e.width,height:i+e.height,color:t.backdropColor}}v.push({rotation:m,label:y,font:S,color:i,strokeColor:r,strokeWidth:c,textOffset:P,textAlign:p,textBaseline:I,translation:[k,w],backdrop:u})}return v}_getXAxisLabelAlignment(){const{position:t,ticks:e}=this.options,i=-Z(this.labelRotation);if(i)return"top"===t?"left":"right";let s="center";return"start"===e.align?s="left":"end"===e.align?s="right":"inner"===e.align&&(s="inner"),s}_getYAxisLabelAlignment(t){const{position:e,ticks:{crossAlign:i,mirror:s,padding:n}}=this.options,a=this._getLabelSizes(),o=t+n,r=a.widest.width;let l,c;return"left"===e?s?(c=this.right+n,"near"===i?l="left":"center"===i?(l="center",c+=r/2):(l="right",c+=r)):(c=this.right-o,"near"===i?l="right":"center"===i?(l="center",c-=r/2):(l="left",c=this.left)):"right"===e?s?(c=this.left+n,"near"===i?l="right":"center"===i?(l="center",c-=r/2):(l="left",c-=r)):(c=this.left+o,"near"===i?l="left":"center"===i?(l="center",c+=r/2):(l="right",c=this.right)):l="right",{textAlign:l,x:c}}_computeLabelArea(){if(this.options.ticks.mirror)return;const t=this.chart,e=this.options.position;return"left"===e||"right"===e?{top:0,left:this.left,bottom:t.height,right:this.right}:"top"===e||"bottom"===e?{top:this.top,left:0,bottom:this.bottom,right:t.width}:void 0}drawBackground(){const{ctx:t,options:{backgroundColor:e},left:i,top:s,width:n,height:a}=this;e&&(t.save(),t.fillStyle=e,t.fillRect(i,s,n,a),t.restore())}getLineWidthForValue(t){const e=this.options.grid;if(!this._isVisible()||!e.display)return 0;const i=this.ticks,s=i.findIndex(e=>e.value===t);if(s>=0){const t=e.setContext(this.getContext(s));return t.lineWidth}return 0}drawGrid(t){const e=this.options.grid,i=this.ctx,s=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(t));let n,a;const o=(t,e,s)=>{s.width&&s.color&&(i.save(),i.lineWidth=s.width,i.strokeStyle=s.color,i.setLineDash(s.borderDash||[]),i.lineDashOffset=s.borderDashOffset,i.beginPath(),i.moveTo(t.x,t.y),i.lineTo(e.x,e.y),i.stroke(),i.restore())};if(e.display)for(n=0,a=s.length;n<a;++n){const t=s[n];e.drawOnChartArea&&o({x:t.x1,y:t.y1},{x:t.x2,y:t.y2},t),e.drawTicks&&o({x:t.tx1,y:t.ty1},{x:t.tx2,y:t.ty2},{color:t.tickColor,width:t.tickWidth,borderDash:t.tickBorderDash,borderDashOffset:t.tickBorderDashOffset})}}drawBorder(){const{chart:t,ctx:e,options:{grid:i}}=this,s=i.setContext(this.getContext()),n=i.drawBorder?s.borderWidth:0;if(!n)return;const a=i.setContext(this.getContext(0)).lineWidth,o=this._borderValue;let r,l,c,h;this.isHorizontal()?(r=ve(t,this.left,n)-n/2,l=ve(t,this.right,a)+a/2,c=h=o):(c=ve(t,this.top,n)-n/2,h=ve(t,this.bottom,a)+a/2,r=l=o),e.save(),e.lineWidth=s.borderWidth,e.strokeStyle=s.borderColor,e.beginPath(),e.moveTo(r,c),e.lineTo(l,h),e.stroke(),e.restore()}drawLabels(t){const e=this.options.ticks;if(!e.display)return;const i=this.ctx,s=this._computeLabelArea();s&&ye(i,s);const n=this._labelItems||(this._labelItems=this._computeLabelItems(t));let a,o;for(a=0,o=n.length;a<o;++a){const t=n[a],e=t.font,s=t.label;t.backdrop&&(i.fillStyle=t.backdrop.color,i.fillRect(t.backdrop.left,t.backdrop.top,t.backdrop.width,t.backdrop.height));let o=t.textOffset;Me(i,s,0,o,e,t)}s&&ke(i)}drawTitle(){const{ctx:t,options:{position:e,title:i,reverse:s}}=this;if(!i.display)return;const n=Ve(i.font),a=Re(i.padding),o=i.align;let r=n.lineHeight/2;"bottom"===e||"center"===e||u(e)?(r+=a.bottom,d(i.text)&&(r+=n.lineHeight*(i.text.length-1))):r+=a.top;const{titleX:l,titleY:c,maxWidth:h,rotation:p}=La(this,r,e,o);Me(t,i.text,0,0,n,{color:i.color,maxWidth:h,rotation:p,textAlign:$a(o,e,s),textBaseline:"middle",translation:[l,c]})}draw(t){this._isVisible()&&(this.drawBackground(),this.drawGrid(t),this.drawBorder(),this.drawTitle(),this.drawLabels(t))}_layers(){const t=this.options,e=t.ticks&&t.ticks.z||0,i=g(t.grid&&t.grid.z,-1);return this._isVisible()&&this.draw===Ea.prototype.draw?[{z:i,draw:t=>{this.drawBackground(),this.drawGrid(t),this.drawTitle()}},{z:i+1,draw:()=>{this.drawBorder()}},{z:e,draw:t=>{this.drawLabels(t)}}]:[{z:e,draw:t=>{this.draw(t)}}]}getMatchingVisibleMetas(t){const e=this.chart.getSortedVisibleDatasetMetas(),i=this.axis+"AxisID",s=[];let n,a;for(n=0,a=e.length;n<a;++n){const a=e[n];a[i]!==this.id||t&&a.type!==t||s.push(a)}return s}_resolveTickFontOptions(t){const e=this.options.ticks.setContext(this.getContext(t));return Ve(e.font)}_maxDigits(){const t=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/t}}class Aa{constructor(t,e,i){this.type=t,this.scope=e,this.override=i,this.items=Object.create(null)}isForType(t){return Object.prototype.isPrototypeOf.call(this.type.prototype,t.prototype)}register(t){const e=Object.getPrototypeOf(t);let i;Fa(e)&&(i=this.register(e));const s=this.items,n=t.id,a=this.scope+"."+n;if(!n)throw new Error("class does not have id: "+t);return n in s||(s[n]=t,Ra(t,a,i),this.override&&pe.override(t.id,t.overrides)),a}get(t){return this.items[t]}unregister(t){const e=this.items,i=t.id,s=this.scope;i in e&&delete e[i],s&&i in pe[s]&&(delete pe[s][i],this.override&&delete le[i])}}function Ra(t,e,i){const s=C(Object.create(null),[i?pe.get(i):{},pe.get(e),t.defaults]);pe.set(e,s),t.defaultRoutes&&Va(e,t.defaultRoutes),t.descriptors&&pe.describe(e,t.descriptors)}function Va(t,e){Object.keys(e).forEach(i=>{const s=i.split("."),n=s.pop(),a=[t].concat(s).join("."),o=e[i].split("."),r=o.pop(),l=o.join(".");pe.route(a,n,l,r)})}function Fa(t){return"id"in t&&"defaults"in t}class Ba{constructor(){this.controllers=new Aa(zs,"datasets",!0),this.elements=new Aa(ua,"elements"),this.plugins=new Aa(Object,"plugins"),this.scales=new Aa(Ea,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...t){this._each("register",t)}remove(...t){this._each("unregister",t)}addControllers(...t){this._each("register",t,this.controllers)}addElements(...t){this._each("register",t,this.elements)}addPlugins(...t){this._each("register",t,this.plugins)}addScales(...t){this._each("register",t,this.scales)}getController(t){return this._get(t,this.controllers,"controller")}getElement(t){return this._get(t,this.elements,"element")}getPlugin(t){return this._get(t,this.plugins,"plugin")}getScale(t){return this._get(t,this.scales,"scale")}removeControllers(...t){this._each("unregister",t,this.controllers)}removeElements(...t){this._each("unregister",t,this.elements)}removePlugins(...t){this._each("unregister",t,this.plugins)}removeScales(...t){this._each("unregister",t,this.scales)}_each(t,e,i){[...e].forEach(e=>{const s=i||this._getRegistryForType(e);i||s.isForType(e)||s===this.plugins&&e.id?this._exec(t,s,e):_(e,e=>{const s=i||this._getRegistryForType(e);this._exec(t,s,e)})})}_exec(t,e,i){const s=T(t);b(i["before"+s],[],i),e[t](i),b(i["after"+s],[],i)}_getRegistryForType(t){for(let e=0;e<this._typedRegistries.length;e++){const i=this._typedRegistries[e];if(i.isForType(t))return i}return this.plugins}_get(t,e,i){const s=e.get(t);if(void 0===s)throw new Error('"'+t+'" is not a registered '+i+".");return s}}var za=new Ba;class ja{constructor(){this._init=[]}notify(t,e,i,s){"beforeInit"===e&&(this._init=this._createDescriptors(t,!0),this._notify(this._init,t,"install"));const n=s?this._descriptors(t).filter(s):this._descriptors(t),a=this._notify(n,t,e,i);return"afterDestroy"===e&&(this._notify(n,t,"stop"),this._notify(this._init,t,"uninstall")),a}_notify(t,e,i,s){s=s||{};for(const n of t){const t=n.plugin,a=t[i],o=[e,s,n.options];if(!1===b(a,o,t)&&s.cancelable)return!1}return!0}invalidate(){h(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(t){if(this._cache)return this._cache;const e=this._cache=this._createDescriptors(t);return this._notifyStateChanges(t),e}_createDescriptors(t,e){const i=t&&t.config,s=g(i.options&&i.options.plugins,{}),n=Na(i);return!1!==s||e?Ha(t,n,s,e):[]}_notifyStateChanges(t){const e=this._oldCache||[],i=this._cache,s=(t,e)=>t.filter(t=>!e.some(e=>t.plugin.id===e.plugin.id));this._notify(s(e,i),t,"stop"),this._notify(s(i,e),t,"start")}}function Na(t){const e=[],i=Object.keys(za.plugins.items);for(let n=0;n<i.length;n++)e.push(za.getPlugin(i[n]));const s=t.plugins||[];for(let n=0;n<s.length;n++){const t=s[n];-1===e.indexOf(t)&&e.push(t)}return e}function Wa(t,e){return e||!1!==t?!0===t?{}:t:null}function Ha(t,e,i,s){const n=[],a=t.getContext();for(let o=0;o<e.length;o++){const r=e[o],l=r.id,c=Wa(i[l],s);null!==c&&n.push({plugin:r,options:Ua(t.config,r,c,a)})}return n}function Ua(t,e,i,s){const n=t.pluginScopeKeys(e),a=t.getOptionScopes(i,n);return t.createResolver(a,s,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function qa(t,e){const i=pe.datasets[t]||{},s=(e.datasets||{})[t]||{};return s.indexAxis||e.indexAxis||i.indexAxis||"x"}function Ya(t,e){let i=t;return"_index_"===t?i=e:"_value_"===t&&(i="x"===e?"y":"x"),i}function Ga(t,e){return t===e?"_index_":"_value_"}function Xa(t){return"top"===t||"bottom"===t?"x":"left"===t||"right"===t?"y":void 0}function Qa(t,e){return"x"===t||"y"===t?t:e.axis||Xa(e.position)||t.charAt(0).toLowerCase()}function Ka(t,e){const i=le[t.type]||{scales:{}},s=e.scales||{},n=qa(t.type,e),a=Object.create(null),o=Object.create(null);return Object.keys(s).forEach(t=>{const e=s[t];if(!u(e))return console.error("Invalid scale configuration for scale: "+t);if(e._proxy)return console.warn("Ignoring resolver passed as options for scale: "+t);const r=Qa(t,e),l=Ga(r,n),c=i.scales||{};a[r]=a[r]||t,o[t]=M(Object.create(null),[{axis:r},e,c[r],c[l]])}),t.data.datasets.forEach(i=>{const n=i.type||t.type,r=i.indexAxis||qa(n,e),l=le[n]||{},c=l.scales||{};Object.keys(c).forEach(t=>{const e=Ya(t,r),n=i[e+"AxisID"]||a[e]||e;o[n]=o[n]||Object.create(null),M(o[n],[{axis:e},s[n],c[t]])})}),Object.keys(o).forEach(t=>{const e=o[t];M(e,[pe.scales[e.type],pe.scale])}),o}function Za(t){const e=t.options||(t.options={});e.plugins=g(e.plugins,{}),e.scales=Ka(t,e)}function Ja(t){return t=t||{},t.datasets=t.datasets||[],t.labels=t.labels||[],t}function to(t){return t=t||{},t.data=Ja(t.data),Za(t),t}const eo=new Map,io=new Set;function so(t,e){let i=eo.get(t);return i||(i=e(),eo.set(t,i),io.add(i)),i}const no=(t,e,i)=>{const s=I(e,i);void 0!==s&&t.add(s)};class ao{constructor(t){this._config=to(t),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(t){this._config.type=t}get data(){return this._config.data}set data(t){this._config.data=Ja(t)}get options(){return this._config.options}set options(t){this._config.options=t}get plugins(){return this._config.plugins}update(){const t=this._config;this.clearCache(),Za(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return so(t,()=>[["datasets."+t,""]])}datasetAnimationScopeKeys(t,e){return so(`${t}.transition.${e}`,()=>[[`datasets.${t}.transitions.${e}`,"transitions."+e],["datasets."+t,""]])}datasetElementScopeKeys(t,e){return so(`${t}-${e}`,()=>[[`datasets.${t}.elements.${e}`,"datasets."+t,"elements."+e,""]])}pluginScopeKeys(t){const e=t.id,i=this.type;return so(`${i}-plugin-${e}`,()=>[["plugins."+e,...t.additionalOptionScopes||[]]])}_cachedScopes(t,e){const i=this._scopeCache;let s=i.get(t);return s&&!e||(s=new Map,i.set(t,s)),s}getOptionScopes(t,e,i){const{options:s,type:n}=this,a=this._cachedScopes(t,i),o=a.get(e);if(o)return o;const r=new Set;e.forEach(e=>{t&&(r.add(t),e.forEach(e=>no(r,t,e))),e.forEach(t=>no(r,s,t)),e.forEach(t=>no(r,le[n]||{},t)),e.forEach(t=>no(r,pe,t)),e.forEach(t=>no(r,ce,t))});const l=Array.from(r);return 0===l.length&&l.push(Object.create(null)),io.has(e)&&a.set(e,l),l}chartOptionScopes(){const{options:t,type:e}=this;return[t,le[e]||{},pe.datasets[e]||{},{type:e},pe,ce]}resolveNamedOptions(t,e,i,s=[""]){const n={$shared:!0},{resolver:a,subPrefixes:o}=oo(this._resolverCache,t,s);let r=a;if(lo(a,e)){n.$shared=!1,i=L(i)?i():i;const e=this.createResolver(t,i,o);r=Qe(a,i,e)}for(const l of e)n[l]=r[l];return n}createResolver(t,e,i=[""],s){const{resolver:n}=oo(this._resolverCache,t,i);return u(e)?Qe(n,e,void 0,s):n}}function oo(t,e,i){let s=t.get(e);s||(s=new Map,t.set(e,s));const n=i.join();let a=s.get(n);if(!a){const t=Xe(e,i);a={resolver:t,subPrefixes:i.filter(t=>!t.toLowerCase().includes("hover"))},s.set(n,a)}return a}const ro=t=>u(t)&&Object.getOwnPropertyNames(t).reduce((e,i)=>e||L(t[i]),!1);function lo(t,e){const{isScriptable:i,isIndexable:s}=Ke(t);for(const n of e){const e=i(n),a=s(n),o=(a||e)&&t[n];if(e&&(L(o)||ro(o))||a&&d(o))return!0}return!1}var co="3.8.0";const ho=["top","bottom","left","right","chartArea"];function uo(t,e){return"top"===t||"bottom"===t||-1===ho.indexOf(t)&&"x"===e}function po(t,e){return function(i,s){return i[t]===s[t]?i[e]-s[e]:i[t]-s[t]}}function fo(t){const e=t.chart,i=e.options.animation;e.notifyPlugins("afterRender"),b(i&&i.onComplete,[t],e)}function go(t){const e=t.chart,i=e.options.animation;b(i&&i.onProgress,[t],e)}function mo(t){return Mi()&&"string"===typeof t?t=document.getElementById(t):t&&t.length&&(t=t[0]),t&&t.canvas&&(t=t.canvas),t}const vo={},bo=t=>{const e=mo(t);return Object.values(vo).filter(t=>t.canvas===e).pop()};function _o(t,e,i){const s=Object.keys(t);for(const n of s){const s=+n;if(s>=e){const a=t[n];delete t[n],(i>0||s>e)&&(t[s+i]=a)}}}function xo(t,e,i,s){return i&&"mouseout"!==t.type?s?e:t:null}class yo{constructor(t,e){const i=this.config=new ao(e),s=mo(t),n=bo(s);if(n)throw new Error("Canvas is already in use. Chart with ID '"+n.id+"' must be destroyed before the canvas can be reused.");const o=i.createResolver(i.chartOptionScopes(),this.getContext());this.platform=new(i.platform||da(s)),this.platform.updateConfig(i);const r=this.platform.acquireContext(s,o.aspectRatio),l=r&&r.canvas,h=l&&l.height,d=l&&l.width;this.id=c(),this.ctx=r,this.canvas=l,this.width=d,this.height=h,this._options=o,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new ja,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=a(t=>this.update(t),o.resizeDelay||0),this._dataChanges=[],vo[this.id]=this,r&&l?(ds.listen(this,"complete",fo),ds.listen(this,"progress",go),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:t,maintainAspectRatio:e},width:i,height:s,_aspectRatio:n}=this;return h(t)?e&&n?n:s?i/s:null:t}get data(){return this.config.data}set data(t){this.config.data=t}get options(){return this._options}set options(t){this.config.options=t}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():Fi(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return be(this.canvas,this.ctx),this}stop(){return ds.stop(this),this}resize(t,e){ds.running(this)?this._resizeBeforeDraw={width:t,height:e}:this._resize(t,e)}_resize(t,e){const i=this.options,s=this.canvas,n=i.maintainAspectRatio&&this.aspectRatio,a=this.platform.getMaximumSize(s,t,e,n),o=i.devicePixelRatio||this.platform.getDevicePixelRatio(),r=this.width?"resize":"attach";this.width=a.width,this.height=a.height,this._aspectRatio=this.aspectRatio,Fi(this,o,!0)&&(this.notifyPlugins("resize",{size:a}),b(i.onResize,[this,a],this),this.attached&&this._doResize(r)&&this.render())}ensureScalesHaveIDs(){const t=this.options,e=t.scales||{};_(e,(t,e)=>{t.id=e})}buildOrUpdateScales(){const t=this.options,e=t.scales,i=this.scales,s=Object.keys(i).reduce((t,e)=>(t[e]=!1,t),{});let n=[];e&&(n=n.concat(Object.keys(e).map(t=>{const i=e[t],s=Qa(t,i),n="r"===s,a="x"===s;return{options:i,dposition:n?"chartArea":a?"bottom":"left",dtype:n?"radialLinear":a?"category":"linear"}}))),_(n,e=>{const n=e.options,a=n.id,o=Qa(a,n),r=g(n.type,e.dtype);void 0!==n.position&&uo(n.position,o)===uo(e.dposition)||(n.position=e.dposition),s[a]=!0;let l=null;if(a in i&&i[a].type===r)l=i[a];else{const t=za.getScale(r);l=new t({id:a,type:r,ctx:this.ctx,chart:this}),i[l.id]=l}l.init(n,t)}),_(s,(t,e)=>{t||delete i[e]}),_(i,t=>{Nn.configure(this,t,t.options),Nn.addBox(this,t)})}_updateMetasets(){const t=this._metasets,e=this.data.datasets.length,i=t.length;if(t.sort((t,e)=>t.index-e.index),i>e){for(let t=e;t<i;++t)this._destroyDatasetMeta(t);t.splice(e,i-e)}this._sortedMetasets=t.slice(0).sort(po("order","index"))}_removeUnreferencedMetasets(){const{_metasets:t,data:{datasets:e}}=this;t.length>e.length&&delete this._stacks,t.forEach((t,i)=>{0===e.filter(e=>e===t._dataset).length&&this._destroyDatasetMeta(i)})}buildOrUpdateControllers(){const t=[],e=this.data.datasets;let i,s;for(this._removeUnreferencedMetasets(),i=0,s=e.length;i<s;i++){const s=e[i];let n=this.getDatasetMeta(i);const a=s.type||this.config.type;if(n.type&&n.type!==a&&(this._destroyDatasetMeta(i),n=this.getDatasetMeta(i)),n.type=a,n.indexAxis=s.indexAxis||qa(a,this.options),n.order=s.order||0,n.index=i,n.label=""+s.label,n.visible=this.isDatasetVisible(i),n.controller)n.controller.updateIndex(i),n.controller.linkScales();else{const e=za.getController(a),{datasetElementType:s,dataElementType:o}=pe.datasets[a];Object.assign(e.prototype,{dataElementType:za.getElement(o),datasetElementType:s&&za.getElement(s)}),n.controller=new e(this,i),t.push(n.controller)}}return this._updateMetasets(),t}_resetElements(){_(this.data.datasets,(t,e)=>{this.getDatasetMeta(e).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(t){const e=this.config;e.update();const i=this._options=e.createResolver(e.chartOptionScopes(),this.getContext()),s=this._animationsDisabled=!i.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),!1===this.notifyPlugins("beforeUpdate",{mode:t,cancelable:!0}))return;const n=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let a=0;for(let l=0,c=this.data.datasets.length;l<c;l++){const{controller:t}=this.getDatasetMeta(l),e=!s&&-1===n.indexOf(t);t.buildOrUpdateElements(e),a=Math.max(+t.getMaxOverflow(),a)}a=this._minPadding=i.layout.autoPadding?a:0,this._updateLayout(a),s||_(n,t=>{t.reset()}),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(po("z","_idx"));const{_active:o,_lastEvent:r}=this;r?this._eventHandler(r,!0):o.length&&this._updateHoverStyles(o,o,!0),this.render()}_updateScales(){_(this.scales,t=>{Nn.removeBox(this,t)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const t=this.options,e=new Set(Object.keys(this._listeners)),i=new Set(t.events);E(e,i)&&!!this._responsiveListeners===t.responsive||(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:t}=this,e=this._getUniformDataChanges()||[];for(const{method:i,start:s,count:n}of e){const e="_removeElements"===i?-n:n;_o(t,s,e)}}_getUniformDataChanges(){const t=this._dataChanges;if(!t||!t.length)return;this._dataChanges=[];const e=this.data.datasets.length,i=e=>new Set(t.filter(t=>t[0]===e).map((t,e)=>e+","+t.splice(1).join(","))),s=i(0);for(let n=1;n<e;n++)if(!E(s,i(n)))return;return Array.from(s).map(t=>t.split(",")).map(t=>({method:t[1],start:+t[2],count:+t[3]}))}_updateLayout(t){if(!1===this.notifyPlugins("beforeLayout",{cancelable:!0}))return;Nn.update(this,this.width,this.height,t);const e=this.chartArea,i=e.width<=0||e.height<=0;this._layers=[],_(this.boxes,t=>{i&&"chartArea"===t.position||(t.configure&&t.configure(),this._layers.push(...t._layers()))},this),this._layers.forEach((t,e)=>{t._idx=e}),this.notifyPlugins("afterLayout")}_updateDatasets(t){if(!1!==this.notifyPlugins("beforeDatasetsUpdate",{mode:t,cancelable:!0})){for(let t=0,e=this.data.datasets.length;t<e;++t)this.getDatasetMeta(t).controller.configure();for(let e=0,i=this.data.datasets.length;e<i;++e)this._updateDataset(e,L(t)?t({datasetIndex:e}):t);this.notifyPlugins("afterDatasetsUpdate",{mode:t})}}_updateDataset(t,e){const i=this.getDatasetMeta(t),s={meta:i,index:t,mode:e,cancelable:!0};!1!==this.notifyPlugins("beforeDatasetUpdate",s)&&(i.controller._update(e),s.cancelable=!1,this.notifyPlugins("afterDatasetUpdate",s))}render(){!1!==this.notifyPlugins("beforeRender",{cancelable:!0})&&(ds.has(this)?this.attached&&!ds.running(this)&&ds.start(this):(this.draw(),fo({chart:this})))}draw(){let t;if(this._resizeBeforeDraw){const{width:t,height:e}=this._resizeBeforeDraw;this._resize(t,e),this._resizeBeforeDraw=null}if(this.clear(),this.width<=0||this.height<=0)return;if(!1===this.notifyPlugins("beforeDraw",{cancelable:!0}))return;const e=this._layers;for(t=0;t<e.length&&e[t].z<=0;++t)e[t].draw(this.chartArea);for(this._drawDatasets();t<e.length;++t)e[t].draw(this.chartArea);this.notifyPlugins("afterDraw")}_getSortedDatasetMetas(t){const e=this._sortedMetasets,i=[];let s,n;for(s=0,n=e.length;s<n;++s){const n=e[s];t&&!n.visible||i.push(n)}return i}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(!0)}_drawDatasets(){if(!1===this.notifyPlugins("beforeDatasetsDraw",{cancelable:!0}))return;const t=this.getSortedVisibleDatasetMetas();for(let e=t.length-1;e>=0;--e)this._drawDataset(t[e]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(t){const e=this.ctx,i=t._clip,s=!i.disabled,n=this.chartArea,a={meta:t,index:t.index,cancelable:!0};!1!==this.notifyPlugins("beforeDatasetDraw",a)&&(s&&ye(e,{left:!1===i.left?0:n.left-i.left,right:!1===i.right?this.width:n.right+i.right,top:!1===i.top?0:n.top-i.top,bottom:!1===i.bottom?this.height:n.bottom+i.bottom}),t.controller.draw(),s&&ke(e),a.cancelable=!1,this.notifyPlugins("afterDatasetDraw",a))}isPointInArea(t){return xe(t,this.chartArea,this._minPadding)}getElementsAtEventForMode(t,e,i,s){const n=Mn.modes[e];return"function"===typeof n?n(this,t,i,s):[]}getDatasetMeta(t){const e=this.data.datasets[t],i=this._metasets;let s=i.filter(t=>t&&t._dataset===e).pop();return s||(s={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:e&&e.order||0,index:t,_dataset:e,_parsed:[],_sorted:!1},i.push(s)),s}getContext(){return this.$context||(this.$context=ze(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){const e=this.data.datasets[t];if(!e)return!1;const i=this.getDatasetMeta(t);return"boolean"===typeof i.hidden?!i.hidden:!e.hidden}setDatasetVisibility(t,e){const i=this.getDatasetMeta(t);i.hidden=!e}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateVisibility(t,e,i){const s=i?"show":"hide",n=this.getDatasetMeta(t),a=n.controller._resolveAnimations(void 0,s);$(e)?(n.data[e].hidden=!i,this.update()):(this.setDatasetVisibility(t,i),a.update(n,{visible:i}),this.update(e=>e.datasetIndex===t?s:void 0))}hide(t,e){this._updateVisibility(t,e,!1)}show(t,e){this._updateVisibility(t,e,!0)}_destroyDatasetMeta(t){const e=this._metasets[t];e&&e.controller&&e.controller._destroy(),delete this._metasets[t]}_stop(){let t,e;for(this.stop(),ds.remove(this),t=0,e=this.data.datasets.length;t<e;++t)this._destroyDatasetMeta(t)}destroy(){this.notifyPlugins("beforeDestroy");const{canvas:t,ctx:e}=this;this._stop(),this.config.clearCache(),t&&(this.unbindEvents(),be(t,e),this.platform.releaseContext(e),this.canvas=null,this.ctx=null),this.notifyPlugins("destroy"),delete vo[this.id],this.notifyPlugins("afterDestroy")}toBase64Image(...t){return this.canvas.toDataURL(...t)}bindEvents(){this.bindUserEvents(),this.options.responsive?this.bindResponsiveEvents():this.attached=!0}bindUserEvents(){const t=this._listeners,e=this.platform,i=(i,s)=>{e.addEventListener(this,i,s),t[i]=s},s=(t,e,i)=>{t.offsetX=e,t.offsetY=i,this._eventHandler(t)};_(this.options.events,t=>i(t,s))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const t=this._responsiveListeners,e=this.platform,i=(i,s)=>{e.addEventListener(this,i,s),t[i]=s},s=(i,s)=>{t[i]&&(e.removeEventListener(this,i,s),delete t[i])},n=(t,e)=>{this.canvas&&this.resize(t,e)};let a;const o=()=>{s("attach",o),this.attached=!0,this.resize(),i("resize",n),i("detach",a)};a=()=>{this.attached=!1,s("resize",n),this._stop(),this._resize(0,0),i("attach",o)},e.isAttached(this.canvas)?o():a()}unbindEvents(){_(this._listeners,(t,e)=>{this.platform.removeEventListener(this,e,t)}),this._listeners={},_(this._responsiveListeners,(t,e)=>{this.platform.removeEventListener(this,e,t)}),this._responsiveListeners=void 0}updateHoverStyle(t,e,i){const s=i?"set":"remove";let n,a,o,r;for("dataset"===e&&(n=this.getDatasetMeta(t[0].datasetIndex),n.controller["_"+s+"DatasetHoverStyle"]()),o=0,r=t.length;o<r;++o){a=t[o];const e=a&&this.getDatasetMeta(a.datasetIndex).controller;e&&e[s+"HoverStyle"](a.element,a.datasetIndex,a.index)}}getActiveElements(){return this._active||[]}setActiveElements(t){const e=this._active||[],i=t.map(({datasetIndex:t,index:e})=>{const i=this.getDatasetMeta(t);if(!i)throw new Error("No dataset found at index "+t);return{datasetIndex:t,element:i.data[e],index:e}}),s=!x(i,e);s&&(this._active=i,this._lastEvent=null,this._updateHoverStyles(i,e))}notifyPlugins(t,e,i){return this._plugins.notify(this,t,e,i)}_updateHoverStyles(t,e,i){const s=this.options.hover,n=(t,e)=>t.filter(t=>!e.some(e=>t.datasetIndex===e.datasetIndex&&t.index===e.index)),a=n(e,t),o=i?t:n(t,e);a.length&&this.updateHoverStyle(a,s.mode,!1),o.length&&s.mode&&this.updateHoverStyle(o,s.mode,!0)}_eventHandler(t,e){const i={event:t,replay:e,cancelable:!0,inChartArea:this.isPointInArea(t)},s=e=>(e.options.events||this.options.events).includes(t.native.type);if(!1===this.notifyPlugins("beforeEvent",i,s))return;const n=this._handleEvent(t,e,i.inChartArea);return i.cancelable=!1,this.notifyPlugins("afterEvent",i,s),(n||i.changed)&&this.render(),this}_handleEvent(t,e,i){const{_active:s=[],options:n}=this,a=e,o=this._getActiveElements(t,s,i,a),r=A(t),l=xo(t,this._lastEvent,i,r);i&&(this._lastEvent=null,b(n.onHover,[t,o,this],this),r&&b(n.onClick,[t,o,this],this));const c=!x(o,s);return(c||e)&&(this._active=o,this._updateHoverStyles(o,s,e)),this._lastEvent=l,c}_getActiveElements(t,e,i,s){if("mouseout"===t.type)return[];if(!i)return e;const n=this.options.hover;return this.getElementsAtEventForMode(t,n.mode,n,s)}}const ko=()=>_(yo.instances,t=>t._plugins.invalidate()),wo=!0;function Co(t,e,i){const{startAngle:s,pixelMargin:n,x:a,y:o,outerRadius:r,innerRadius:l}=e;let c=n/r;t.beginPath(),t.arc(a,o,r,s-c,i+c),l>n?(c=n/l,t.arc(a,o,l,i+c,s-c,!0)):t.arc(a,o,n,i+j,s-j),t.closePath(),t.clip()}function Mo(t){return Le(t,["outerStart","outerEnd","innerStart","innerEnd"])}function So(t,e,i,s){const n=Mo(t.options.borderRadius),a=(i-e)/2,o=Math.min(a,s*e/2),r=t=>{const e=(i-Math.min(a,t))*s/2;return ot(t,0,Math.min(a,e))};return{outerStart:r(n.outerStart),outerEnd:r(n.outerEnd),innerStart:ot(n.innerStart,0,o),innerEnd:ot(n.innerEnd,0,o)}}function Oo(t,e,i,s){return{x:i+t*Math.cos(e),y:s+t*Math.sin(e)}}function Do(t,e,i,s,n){const{x:a,y:o,startAngle:r,pixelMargin:l,innerRadius:c}=e,h=Math.max(e.outerRadius+s+i-l,0),d=c>0?c+s+i+l:0;let u=0;const p=n-r;if(s){const t=c>0?c-s:0,e=h>0?h-s:0,i=(t+e)/2,n=0!==i?p*i/(i+s):p;u=(p-n)/2}const f=Math.max(.001,p*h-i/R)/h,g=(p-f)/2,m=r+g+u,v=n-g-u,{outerStart:b,outerEnd:_,innerStart:x,innerEnd:y}=So(e,d,h,v-m),k=h-b,w=h-_,C=m+b/k,M=v-_/w,S=d+x,O=d+y,D=m+x/S,P=v-y/O;if(t.beginPath(),t.arc(a,o,h,C,M),_>0){const e=Oo(w,M,a,o);t.arc(e.x,e.y,_,M,v+j)}const I=Oo(O,v,a,o);if(t.lineTo(I.x,I.y),y>0){const e=Oo(O,P,a,o);t.arc(e.x,e.y,y,v+j,P+Math.PI)}if(t.arc(a,o,d,v-y/d,m+x/d,!0),x>0){const e=Oo(S,D,a,o);t.arc(e.x,e.y,x,D+Math.PI,m-j)}const T=Oo(k,m,a,o);if(t.lineTo(T.x,T.y),b>0){const e=Oo(k,C,a,o);t.arc(e.x,e.y,b,m-j,C)}t.closePath()}function Po(t,e,i,s){const{fullCircles:n,startAngle:a,circumference:o}=e;let r=e.endAngle;if(n){Do(t,e,i,s,a+V);for(let e=0;e<n;++e)t.fill();isNaN(o)||(r=a+o%V,o%V===0&&(r+=V))}return Do(t,e,i,s,r),t.fill(),r}function Io(t,e,i){const{x:s,y:n,startAngle:a,pixelMargin:o,fullCircles:r}=e,l=Math.max(e.outerRadius-o,0),c=e.innerRadius+o;let h;for(i&&Co(t,e,a+V),t.beginPath(),t.arc(s,n,c,a+V,a,!0),h=0;h<r;++h)t.stroke();for(t.beginPath(),t.arc(s,n,l,a,a+V),h=0;h<r;++h)t.stroke()}function To(t,e,i,s,n){const{options:a}=e,{borderWidth:o,borderJoinStyle:r}=a,l="inner"===a.borderAlign;o&&(l?(t.lineWidth=2*o,t.lineJoin=r||"round"):(t.lineWidth=o,t.lineJoin=r||"bevel"),e.fullCircles&&Io(t,e,l),l&&Co(t,e,n),Do(t,e,i,s,n),t.stroke())}Object.defineProperties(yo,{defaults:{enumerable:wo,value:pe},instances:{enumerable:wo,value:vo},overrides:{enumerable:wo,value:le},registry:{enumerable:wo,value:za},version:{enumerable:wo,value:co},getChart:{enumerable:wo,value:bo},register:{enumerable:wo,value:(...t)=>{za.add(...t),ko()}},unregister:{enumerable:wo,value:(...t)=>{za.remove(...t),ko()}}});class $o extends ua{constructor(t){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,t&&Object.assign(this,t)}inRange(t,e,i){const s=this.getProps(["x","y"],i),{angle:n,distance:a}=et(s,{x:t,y:e}),{startAngle:o,endAngle:r,innerRadius:l,outerRadius:c,circumference:h}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],i),d=this.options.spacing/2,u=g(h,r-o),p=u>=V||at(n,o,r),f=lt(a,l+d,c+d);return p&&f}getCenterPoint(t){const{x:e,y:i,startAngle:s,endAngle:n,innerRadius:a,outerRadius:o}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius","circumference"],t),{offset:r,spacing:l}=this.options,c=(s+n)/2,h=(a+o+l+r)/2;return{x:e+Math.cos(c)*h,y:i+Math.sin(c)*h}}tooltipPosition(t){return this.getCenterPoint(t)}draw(t){const{options:e,circumference:i}=this,s=(e.offset||0)/2,n=(e.spacing||0)/2;if(this.pixelMargin="inner"===e.borderAlign?.33:0,this.fullCircles=i>V?Math.floor(i/V):0,0===i||this.innerRadius<0||this.outerRadius<0)return;t.save();let a=0;if(s){a=s/2;const e=(this.startAngle+this.endAngle)/2;t.translate(Math.cos(e)*a,Math.sin(e)*a),this.circumference>=R&&(a=s)}t.fillStyle=e.backgroundColor,t.strokeStyle=e.borderColor;const o=Po(t,this,a,n);To(t,this,a,n,o),t.restore()}}function Lo(t,e,i=e){t.lineCap=g(i.borderCapStyle,e.borderCapStyle),t.setLineDash(g(i.borderDash,e.borderDash)),t.lineDashOffset=g(i.borderDashOffset,e.borderDashOffset),t.lineJoin=g(i.borderJoinStyle,e.borderJoinStyle),t.lineWidth=g(i.borderWidth,e.borderWidth),t.strokeStyle=g(i.borderColor,e.borderColor)}function Eo(t,e,i){t.lineTo(i.x,i.y)}function Ao(t){return t.stepped?we:t.tension||"monotone"===t.cubicInterpolationMode?Ce:Eo}function Ro(t,e,i={}){const s=t.length,{start:n=0,end:a=s-1}=i,{start:o,end:r}=e,l=Math.max(n,o),c=Math.min(a,r),h=n<o&&a<o||n>r&&a>r;return{count:s,start:l,loop:e.loop,ilen:c<l&&!h?s+c-l:c-l}}function Vo(t,e,i,s){const{points:n,options:a}=e,{count:o,start:r,loop:l,ilen:c}=Ro(n,i,s),h=Ao(a);let d,u,p,{move:f=!0,reverse:g}=s||{};for(d=0;d<=c;++d)u=n[(r+(g?c-d:d))%o],u.skip||(f?(t.moveTo(u.x,u.y),f=!1):h(t,p,u,g,a.stepped),p=u);return l&&(u=n[(r+(g?c:0))%o],h(t,p,u,g,a.stepped)),!!l}function Fo(t,e,i,s){const n=e.points,{count:a,start:o,ilen:r}=Ro(n,i,s),{move:l=!0,reverse:c}=s||{};let h,d,u,p,f,g,m=0,v=0;const b=t=>(o+(c?r-t:t))%a,_=()=>{p!==f&&(t.lineTo(m,f),t.lineTo(m,p),t.lineTo(m,g))};for(l&&(d=n[b(0)],t.moveTo(d.x,d.y)),h=0;h<=r;++h){if(d=n[b(h)],d.skip)continue;const e=d.x,i=d.y,s=0|e;s===u?(i<p?p=i:i>f&&(f=i),m=(v*m+e)/++v):(_(),t.lineTo(e,i),u=s,v=0,p=f=i),g=i}_()}function Bo(t){const e=t.options,i=e.borderDash&&e.borderDash.length,s=!t._decimated&&!t._loop&&!e.tension&&"monotone"!==e.cubicInterpolationMode&&!e.stepped&&!i;return s?Fo:Vo}function zo(t){return t.stepped?Ni:t.tension||"monotone"===t.cubicInterpolationMode?Wi:ji}function jo(t,e,i,s){let n=e._path;n||(n=e._path=new Path2D,e.path(n,i,s)&&n.closePath()),Lo(t,e.options),t.stroke(n)}function No(t,e,i,s){const{segments:n,options:a}=e,o=Bo(e);for(const r of n)Lo(t,a,r.style),t.beginPath(),o(t,e,r,{start:i,end:i+s-1})&&t.closePath(),t.stroke()}$o.id="arc",$o.defaults={borderAlign:"center",borderColor:"#fff",borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0},$o.defaultRoutes={backgroundColor:"backgroundColor"};const Wo="function"===typeof Path2D;function Ho(t,e,i,s){Wo&&!e.options.segment?jo(t,e,i,s):No(t,e,i,s)}class Uo extends ua{constructor(t){super(),this.animated=!0,this.options=void 0,this._chart=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,this._datasetIndex=void 0,t&&Object.assign(this,t)}updateControlPoints(t,e){const i=this.options;if((i.tension||"monotone"===i.cubicInterpolationMode)&&!i.stepped&&!this._pointsUpdated){const s=i.spanGaps?this._loop:this._fullLoop;Ci(this._points,i,t,s,e),this._pointsUpdated=!0}}set points(t){this._points=t,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=as(this,this.options.segment))}first(){const t=this.segments,e=this.points;return t.length&&e[t[0].start]}last(){const t=this.segments,e=this.points,i=t.length;return i&&e[t[i-1].end]}interpolate(t,e){const i=this.options,s=t[e],n=this.points,a=is(this,{property:e,start:s,end:s});if(!a.length)return;const o=[],r=zo(i);let l,c;for(l=0,c=a.length;l<c;++l){const{start:c,end:h}=a[l],d=n[c],u=n[h];if(d===u){o.push(d);continue}const p=Math.abs((s-d[e])/(u[e]-d[e])),f=r(d,u,p,i.stepped);f[e]=t[e],o.push(f)}return 1===o.length?o[0]:o}pathSegment(t,e,i){const s=Bo(this);return s(t,this,e,i)}path(t,e,i){const s=this.segments,n=Bo(this);let a=this._loop;e=e||0,i=i||this.points.length-e;for(const o of s)a&=n(t,this,o,{start:e,end:e+i-1});return!!a}draw(t,e,i,s){const n=this.options||{},a=this.points||[];a.length&&n.borderWidth&&(t.save(),Ho(t,this,i,s),t.restore()),this.animated&&(this._pointsUpdated=!1,this._path=void 0)}}function qo(t,e,i,s){const n=t.options,{[i]:a}=t.getProps([i],s);return Math.abs(e-a)<n.radius+n.hitRadius}Uo.id="line",Uo.defaults={borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0},Uo.defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"},Uo.descriptors={_scriptable:!0,_indexable:t=>"borderDash"!==t&&"fill"!==t};class Yo extends ua{constructor(t){super(),this.options=void 0,this.parsed=void 0,this.skip=void 0,this.stop=void 0,t&&Object.assign(this,t)}inRange(t,e,i){const s=this.options,{x:n,y:a}=this.getProps(["x","y"],i);return Math.pow(t-n,2)+Math.pow(e-a,2)<Math.pow(s.hitRadius+s.radius,2)}inXRange(t,e){return qo(this,t,"x",e)}inYRange(t,e){return qo(this,t,"y",e)}getCenterPoint(t){const{x:e,y:i}=this.getProps(["x","y"],t);return{x:e,y:i}}size(t){t=t||this.options||{};let e=t.radius||0;e=Math.max(e,e&&t.hoverRadius||0);const i=e&&t.borderWidth||0;return 2*(e+i)}draw(t,e){const i=this.options;this.skip||i.radius<.1||!xe(this,e,this.size(i)/2)||(t.strokeStyle=i.borderColor,t.lineWidth=i.borderWidth,t.fillStyle=i.backgroundColor,_e(t,i,this.x,this.y))}getRange(){const t=this.options||{};return t.radius+t.hitRadius}}function Go(t,e){const{x:i,y:s,base:n,width:a,height:o}=t.getProps(["x","y","base","width","height"],e);let r,l,c,h,d;return t.horizontal?(d=o/2,r=Math.min(i,n),l=Math.max(i,n),c=s-d,h=s+d):(d=a/2,r=i-d,l=i+d,c=Math.min(s,n),h=Math.max(s,n)),{left:r,top:c,right:l,bottom:h}}function Xo(t,e,i,s){return t?0:ot(e,i,s)}function Qo(t,e,i){const s=t.options.borderWidth,n=t.borderSkipped,a=Ee(s);return{t:Xo(n.top,a.top,0,i),r:Xo(n.right,a.right,0,e),b:Xo(n.bottom,a.bottom,0,i),l:Xo(n.left,a.left,0,e)}}function Ko(t,e,i){const{enableBorderRadius:s}=t.getProps(["enableBorderRadius"]),n=t.options.borderRadius,a=Ae(n),o=Math.min(e,i),r=t.borderSkipped,l=s||u(n);return{topLeft:Xo(!l||r.top||r.left,a.topLeft,0,o),topRight:Xo(!l||r.top||r.right,a.topRight,0,o),bottomLeft:Xo(!l||r.bottom||r.left,a.bottomLeft,0,o),bottomRight:Xo(!l||r.bottom||r.right,a.bottomRight,0,o)}}function Zo(t){const e=Go(t),i=e.right-e.left,s=e.bottom-e.top,n=Qo(t,i/2,s/2),a=Ko(t,i/2,s/2);return{outer:{x:e.left,y:e.top,w:i,h:s,radius:a},inner:{x:e.left+n.l,y:e.top+n.t,w:i-n.l-n.r,h:s-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 Jo(t,e,i,s){const n=null===e,a=null===i,o=n&&a,r=t&&!o&&Go(t,s);return r&&(n||lt(e,r.left,r.right))&&(a||lt(i,r.top,r.bottom))}function tr(t){return t.topLeft||t.topRight||t.bottomLeft||t.bottomRight}function er(t,e){t.rect(e.x,e.y,e.w,e.h)}function ir(t,e,i={}){const s=t.x!==i.x?-e:0,n=t.y!==i.y?-e:0,a=(t.x+t.w!==i.x+i.w?e:0)-s,o=(t.y+t.h!==i.y+i.h?e:0)-n;return{x:t.x+s,y:t.y+n,w:t.w+a,h:t.h+o,radius:t.radius}}Yo.id="point",Yo.defaults={borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0},Yo.defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};class sr extends ua{constructor(t){super(),this.options=void 0,this.horizontal=void 0,this.base=void 0,this.width=void 0,this.height=void 0,this.inflateAmount=void 0,t&&Object.assign(this,t)}draw(t){const{inflateAmount:e,options:{borderColor:i,backgroundColor:s}}=this,{inner:n,outer:a}=Zo(this),o=tr(a.radius)?De:er;t.save(),a.w===n.w&&a.h===n.h||(t.beginPath(),o(t,ir(a,e,n)),t.clip(),o(t,ir(n,-e,a)),t.fillStyle=i,t.fill("evenodd")),t.beginPath(),o(t,ir(n,e)),t.fillStyle=s,t.fill(),t.restore()}inRange(t,e,i){return Jo(this,t,e,i)}inXRange(t,e){return Jo(this,t,null,e)}inYRange(t,e){return Jo(this,null,t,e)}getCenterPoint(t){const{x:e,y:i,base:s,horizontal:n}=this.getProps(["x","y","base","horizontal"],t);return{x:n?(e+s)/2:e,y:n?i:(i+s)/2}}getRange(t){return"x"===t?this.width/2:this.height/2}}sr.id="bar",sr.defaults={borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0},sr.defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};new WeakMap;const nr={average(t){if(!t.length)return!1;let e,i,s=0,n=0,a=0;for(e=0,i=t.length;e<i;++e){const i=t[e].element;if(i&&i.hasValue()){const t=i.tooltipPosition();s+=t.x,n+=t.y,++a}}return{x:s/a,y:n/a}},nearest(t,e){if(!t.length)return!1;let i,s,n,a=e.x,o=e.y,r=Number.POSITIVE_INFINITY;for(i=0,s=t.length;i<s;++i){const s=t[i].element;if(s&&s.hasValue()){const t=s.getCenterPoint(),i=it(e,t);i<r&&(r=i,n=s)}}if(n){const t=n.tooltipPosition();a=t.x,o=t.y}return{x:a,y:o}}};function ar(t,e){return e&&(d(e)?Array.prototype.push.apply(t,e):t.push(e)),t}function or(t){return("string"===typeof t||t instanceof String)&&t.indexOf("\n")>-1?t.split("\n"):t}function rr(t,e){const{element:i,datasetIndex:s,index:n}=e,a=t.getDatasetMeta(s).controller,{label:o,value:r}=a.getLabelAndValue(n);return{chart:t,label:o,parsed:a.getParsed(n),raw:t.data.datasets[s].data[n],formattedValue:r,dataset:a.getDataset(),dataIndex:n,datasetIndex:s,element:i}}function lr(t,e){const i=t.chart.ctx,{body:s,footer:n,title:a}=t,{boxWidth:o,boxHeight:r}=e,l=Ve(e.bodyFont),c=Ve(e.titleFont),h=Ve(e.footerFont),d=a.length,u=n.length,p=s.length,f=Re(e.padding);let g=f.height,m=0,v=s.reduce((t,e)=>t+e.before.length+e.lines.length+e.after.length,0);if(v+=t.beforeBody.length+t.afterBody.length,d&&(g+=d*c.lineHeight+(d-1)*e.titleSpacing+e.titleMarginBottom),v){const t=e.displayColors?Math.max(r,l.lineHeight):l.lineHeight;g+=p*t+(v-p)*l.lineHeight+(v-1)*e.bodySpacing}u&&(g+=e.footerMarginTop+u*h.lineHeight+(u-1)*e.footerSpacing);let b=0;const x=function(t){m=Math.max(m,i.measureText(t).width+b)};return i.save(),i.font=c.string,_(t.title,x),i.font=l.string,_(t.beforeBody.concat(t.afterBody),x),b=e.displayColors?o+2+e.boxPadding:0,_(s,t=>{_(t.before,x),_(t.lines,x),_(t.after,x)}),b=0,i.font=h.string,_(t.footer,x),i.restore(),m+=f.width,{width:m,height:g}}function cr(t,e){const{y:i,height:s}=e;return i<s/2?"top":i>t.height-s/2?"bottom":"center"}function hr(t,e,i,s){const{x:n,width:a}=s,o=i.caretSize+i.caretPadding;return"left"===t&&n+a+o>e.width||("right"===t&&n-a-o<0||void 0)}function dr(t,e,i,s){const{x:n,width:a}=i,{width:o,chartArea:{left:r,right:l}}=t;let c="center";return"center"===s?c=n<=(r+l)/2?"left":"right":n<=a/2?c="left":n>=o-a/2&&(c="right"),hr(c,t,e,i)&&(c="center"),c}function ur(t,e,i){const s=i.yAlign||e.yAlign||cr(t,i);return{xAlign:i.xAlign||e.xAlign||dr(t,e,i,s),yAlign:s}}function pr(t,e){let{x:i,width:s}=t;return"right"===e?i-=s:"center"===e&&(i-=s/2),i}function fr(t,e,i){let{y:s,height:n}=t;return"top"===e?s+=i:s-="bottom"===e?n+i:n/2,s}function gr(t,e,i,s){const{caretSize:n,caretPadding:a,cornerRadius:o}=t,{xAlign:r,yAlign:l}=i,c=n+a,{topLeft:h,topRight:d,bottomLeft:u,bottomRight:p}=Ae(o);let f=pr(e,r);const g=fr(e,l,c);return"center"===l?"left"===r?f+=c:"right"===r&&(f-=c):"left"===r?f-=Math.max(h,u)+n:"right"===r&&(f+=Math.max(d,p)+n),{x:ot(f,0,s.width-e.width),y:ot(g,0,s.height-e.height)}}function mr(t,e,i){const s=Re(i.padding);return"center"===e?t.x+t.width/2:"right"===e?t.x+t.width-s.right:t.x+s.left}function vr(t){return ar([],or(t))}function br(t,e,i){return ze(t,{tooltip:e,tooltipItems:i,type:"tooltip"})}function _r(t,e){const i=e&&e.dataset&&e.dataset.tooltip&&e.dataset.tooltip.callbacks;return i?t.override(i):t}class xr extends ua{constructor(t){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=t.chart||t._chart,this._chart=this.chart,this.options=t.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(t){this.options=t,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const t=this._cachedAnimations;if(t)return t;const e=this.chart,i=this.options.setContext(this.getContext()),s=i.enabled&&e.options.animation&&i.animations,n=new bs(this.chart,s);return s._cacheable&&(this._cachedAnimations=Object.freeze(n)),n}getContext(){return this.$context||(this.$context=br(this.chart.getContext(),this,this._tooltipItems))}getTitle(t,e){const{callbacks:i}=e,s=i.beforeTitle.apply(this,[t]),n=i.title.apply(this,[t]),a=i.afterTitle.apply(this,[t]);let o=[];return o=ar(o,or(s)),o=ar(o,or(n)),o=ar(o,or(a)),o}getBeforeBody(t,e){return vr(e.callbacks.beforeBody.apply(this,[t]))}getBody(t,e){const{callbacks:i}=e,s=[];return _(t,t=>{const e={before:[],lines:[],after:[]},n=_r(i,t);ar(e.before,or(n.beforeLabel.call(this,t))),ar(e.lines,n.label.call(this,t)),ar(e.after,or(n.afterLabel.call(this,t))),s.push(e)}),s}getAfterBody(t,e){return vr(e.callbacks.afterBody.apply(this,[t]))}getFooter(t,e){const{callbacks:i}=e,s=i.beforeFooter.apply(this,[t]),n=i.footer.apply(this,[t]),a=i.afterFooter.apply(this,[t]);let o=[];return o=ar(o,or(s)),o=ar(o,or(n)),o=ar(o,or(a)),o}_createItems(t){const e=this._active,i=this.chart.data,s=[],n=[],a=[];let o,r,l=[];for(o=0,r=e.length;o<r;++o)l.push(rr(this.chart,e[o]));return t.filter&&(l=l.filter((e,s,n)=>t.filter(e,s,n,i))),t.itemSort&&(l=l.sort((e,s)=>t.itemSort(e,s,i))),_(l,e=>{const i=_r(t.callbacks,e);s.push(i.labelColor.call(this,e)),n.push(i.labelPointStyle.call(this,e)),a.push(i.labelTextColor.call(this,e))}),this.labelColors=s,this.labelPointStyles=n,this.labelTextColors=a,this.dataPoints=l,l}update(t,e){const i=this.options.setContext(this.getContext()),s=this._active;let n,a=[];if(s.length){const t=nr[i.position].call(this,s,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 e=this._size=lr(this,i),o=Object.assign({},t,e),r=ur(this.chart,i,o),l=gr(i,o,r,this.chart);this.xAlign=r.xAlign,this.yAlign=r.yAlign,n={opacity:1,x:l.x,y:l.y,width:e.width,height:e.height,caretX:t.x,caretY:t.y}}else 0!==this.opacity&&(n={opacity:0});this._tooltipItems=a,this.$context=void 0,n&&this._resolveAnimations().update(this,n),t&&i.external&&i.external.call(this,{chart:this.chart,tooltip:this,replay:e})}drawCaret(t,e,i,s){const n=this.getCaretPosition(t,i,s);e.lineTo(n.x1,n.y1),e.lineTo(n.x2,n.y2),e.lineTo(n.x3,n.y3)}getCaretPosition(t,e,i){const{xAlign:s,yAlign:n}=this,{caretSize:a,cornerRadius:o}=i,{topLeft:r,topRight:l,bottomLeft:c,bottomRight:h}=Ae(o),{x:d,y:u}=t,{width:p,height:f}=e;let g,m,v,b,_,x;return"center"===n?(_=u+f/2,"left"===s?(g=d,m=g-a,b=_+a,x=_-a):(g=d+p,m=g+a,b=_-a,x=_+a),v=g):(m="left"===s?d+Math.max(r,c)+a:"right"===s?d+p-Math.max(l,h)-a:this.caretX,"top"===n?(b=u,_=b-a,g=m-a,v=m+a):(b=u+f,_=b+a,g=m+a,v=m-a),x=b),{x1:g,x2:m,x3:v,y1:b,y2:_,y3:x}}drawTitle(t,e,i){const s=this.title,n=s.length;let a,o,r;if(n){const l=Xi(i.rtl,this.x,this.width);for(t.x=mr(this,i.titleAlign,i),e.textAlign=l.textAlign(i.titleAlign),e.textBaseline="middle",a=Ve(i.titleFont),o=i.titleSpacing,e.fillStyle=i.titleColor,e.font=a.string,r=0;r<n;++r)e.fillText(s[r],l.x(t.x),t.y+a.lineHeight/2),t.y+=a.lineHeight+o,r+1===n&&(t.y+=i.titleMarginBottom-o)}}_drawColorBox(t,e,i,s,n){const a=this.labelColors[i],o=this.labelPointStyles[i],{boxHeight:r,boxWidth:l,boxPadding:c}=n,h=Ve(n.bodyFont),d=mr(this,"left",n),u=s.x(d),p=r<h.lineHeight?(h.lineHeight-r)/2:0,f=e.y+p;if(n.usePointStyle){const e={radius:Math.min(l,r)/2,pointStyle:o.pointStyle,rotation:o.rotation,borderWidth:1},i=s.leftForLtr(u,l)+l/2,c=f+r/2;t.strokeStyle=n.multiKeyBackground,t.fillStyle=n.multiKeyBackground,_e(t,e,i,c),t.strokeStyle=a.borderColor,t.fillStyle=a.backgroundColor,_e(t,e,i,c)}else{t.lineWidth=a.borderWidth||1,t.strokeStyle=a.borderColor,t.setLineDash(a.borderDash||[]),t.lineDashOffset=a.borderDashOffset||0;const e=s.leftForLtr(u,l-c),i=s.leftForLtr(s.xPlus(u,1),l-c-2),o=Ae(a.borderRadius);Object.values(o).some(t=>0!==t)?(t.beginPath(),t.fillStyle=n.multiKeyBackground,De(t,{x:e,y:f,w:l,h:r,radius:o}),t.fill(),t.stroke(),t.fillStyle=a.backgroundColor,t.beginPath(),De(t,{x:i,y:f+1,w:l-2,h:r-2,radius:o}),t.fill()):(t.fillStyle=n.multiKeyBackground,t.fillRect(e,f,l,r),t.strokeRect(e,f,l,r),t.fillStyle=a.backgroundColor,t.fillRect(i,f+1,l-2,r-2))}t.fillStyle=this.labelTextColors[i]}drawBody(t,e,i){const{body:s}=this,{bodySpacing:n,bodyAlign:a,displayColors:o,boxHeight:r,boxWidth:l,boxPadding:c}=i,h=Ve(i.bodyFont);let d=h.lineHeight,u=0;const p=Xi(i.rtl,this.x,this.width),f=function(i){e.fillText(i,p.x(t.x+u),t.y+d/2),t.y+=d+n},g=p.textAlign(a);let m,v,b,x,y,k,w;for(e.textAlign=a,e.textBaseline="middle",e.font=h.string,t.x=mr(this,g,i),e.fillStyle=i.bodyColor,_(this.beforeBody,f),u=o&&"right"!==g?"center"===a?l/2+c:l+2+c:0,x=0,k=s.length;x<k;++x){for(m=s[x],v=this.labelTextColors[x],e.fillStyle=v,_(m.before,f),b=m.lines,o&&b.length&&(this._drawColorBox(e,t,x,p,i),d=Math.max(h.lineHeight,r)),y=0,w=b.length;y<w;++y)f(b[y]),d=h.lineHeight;_(m.after,f)}u=0,d=h.lineHeight,_(this.afterBody,f),t.y-=n}drawFooter(t,e,i){const s=this.footer,n=s.length;let a,o;if(n){const r=Xi(i.rtl,this.x,this.width);for(t.x=mr(this,i.footerAlign,i),t.y+=i.footerMarginTop,e.textAlign=r.textAlign(i.footerAlign),e.textBaseline="middle",a=Ve(i.footerFont),e.fillStyle=i.footerColor,e.font=a.string,o=0;o<n;++o)e.fillText(s[o],r.x(t.x),t.y+a.lineHeight/2),t.y+=a.lineHeight+i.footerSpacing}}drawBackground(t,e,i,s){const{xAlign:n,yAlign:a}=this,{x:o,y:r}=t,{width:l,height:c}=i,{topLeft:h,topRight:d,bottomLeft:u,bottomRight:p}=Ae(s.cornerRadius);e.fillStyle=s.backgroundColor,e.strokeStyle=s.borderColor,e.lineWidth=s.borderWidth,e.beginPath(),e.moveTo(o+h,r),"top"===a&&this.drawCaret(t,e,i,s),e.lineTo(o+l-d,r),e.quadraticCurveTo(o+l,r,o+l,r+d),"center"===a&&"right"===n&&this.drawCaret(t,e,i,s),e.lineTo(o+l,r+c-p),e.quadraticCurveTo(o+l,r+c,o+l-p,r+c),"bottom"===a&&this.drawCaret(t,e,i,s),e.lineTo(o+u,r+c),e.quadraticCurveTo(o,r+c,o,r+c-u),"center"===a&&"left"===n&&this.drawCaret(t,e,i,s),e.lineTo(o,r+h),e.quadraticCurveTo(o,r,o+h,r),e.closePath(),e.fill(),s.borderWidth>0&&e.stroke()}_updateAnimationTarget(t){const e=this.chart,i=this.$animations,s=i&&i.x,n=i&&i.y;if(s||n){const i=nr[t.position].call(this,this._active,this._eventPosition);if(!i)return;const a=this._size=lr(this,t),o=Object.assign({},i,this._size),r=ur(e,t,o),l=gr(t,o,r,e);s._to===l.x&&n._to===l.y||(this.xAlign=r.xAlign,this.yAlign=r.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(t){const e=this.options.setContext(this.getContext());let i=this.opacity;if(!i)return;this._updateAnimationTarget(e);const s={width:this.width,height:this.height},n={x:this.x,y:this.y};i=Math.abs(i)<.001?0:i;const a=Re(e.padding),o=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;e.enabled&&o&&(t.save(),t.globalAlpha=i,this.drawBackground(n,t,s,e),Qi(t,e.textDirection),n.y+=a.top,this.drawTitle(n,t,e),this.drawBody(n,t,e),this.drawFooter(n,t,e),Ki(t,e.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,e){const i=this._active,s=t.map(({datasetIndex:t,index:e})=>{const i=this.chart.getDatasetMeta(t);if(!i)throw new Error("Cannot find a dataset at index "+t);return{datasetIndex:t,element:i.data[e],index:e}}),n=!x(i,s),a=this._positionChanged(s,e);(n||a)&&(this._active=s,this._eventPosition=e,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(t,e,i=!0){if(e&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const s=this.options,n=this._active||[],a=this._getActiveElements(t,n,e,i),o=this._positionChanged(a,t),r=e||!x(a,n)||o;return r&&(this._active=a,(s.enabled||s.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,e))),r}_getActiveElements(t,e,i,s){const n=this.options;if("mouseout"===t.type)return[];if(!s)return e;const a=this.chart.getElementsAtEventForMode(t,n.mode,n,i);return n.reverse&&a.reverse(),a}_positionChanged(t,e){const{caretX:i,caretY:s,options:n}=this,a=nr[n.position].call(this,t,e);return!1!==a&&(i!==a.x||s!==a.y)}}xr.positioners=nr;var yr={id:"tooltip",_element:xr,positioners:nr,afterInit(t,e,i){i&&(t.tooltip=new xr({chart:t,options:i}))},beforeUpdate(t,e,i){t.tooltip&&t.tooltip.initialize(i)},reset(t,e,i){t.tooltip&&t.tooltip.initialize(i)},afterDraw(t){const e=t.tooltip;if(e&&e._willRender()){const i={tooltip:e};if(!1===t.notifyPlugins("beforeTooltipDraw",i))return;e.draw(t.ctx),t.notifyPlugins("afterTooltipDraw",i)}},afterEvent(t,e){if(t.tooltip){const i=e.replay;t.tooltip.handleEvent(e.event,i,e.inChartArea)&&(e.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(t,e)=>e.bodyFont.size,boxWidth:(t,e)=>e.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:{beforeTitle:l,title(t){if(t.length>0){const e=t[0],i=e.chart.data.labels,s=i?i.length:0;if(this&&this.options&&"dataset"===this.options.mode)return e.dataset.label||"";if(e.label)return e.label;if(s>0&&e.dataIndex<s)return i[e.dataIndex]}return""},afterTitle:l,beforeBody:l,beforeLabel:l,label(t){if(this&&this.options&&"dataset"===this.options.mode)return t.label+": "+t.formattedValue||t.formattedValue;let e=t.dataset.label||"";e&&(e+=": ");const i=t.formattedValue;return h(i)||(e+=i),e},labelColor(t){const e=t.chart.getDatasetMeta(t.datasetIndex),i=e.controller.getStyle(t.dataIndex);return{borderColor:i.borderColor,backgroundColor:i.backgroundColor,borderWidth:i.borderWidth,borderDash:i.borderDash,borderDashOffset:i.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(t){const e=t.chart.getDatasetMeta(t.datasetIndex),i=e.controller.getStyle(t.dataIndex);return{pointStyle:i.pointStyle,rotation:i.rotation}},afterLabel:l,afterBody:l,beforeFooter:l,footer:l,afterFooter:l}},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:t=>"filter"!==t&&"itemSort"!==t&&"external"!==t,_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]};const kr=(t,e,i,s)=>("string"===typeof e?(i=t.push(e)-1,s.unshift({index:i,label:e})):isNaN(e)&&(i=null),i);function wr(t,e,i,s){const n=t.indexOf(e);if(-1===n)return kr(t,e,i,s);const a=t.lastIndexOf(e);return n!==a?i:n}const Cr=(t,e)=>null===t?null:ot(Math.round(t),0,e);class Mr extends Ea{constructor(t){super(t),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(t){const e=this._addedLabels;if(e.length){const t=this.getLabels();for(const{index:i,label:s}of e)t[i]===s&&t.splice(i,1);this._addedLabels=[]}super.init(t)}parse(t,e){if(h(t))return null;const i=this.getLabels();return e=isFinite(e)&&i[e]===t?e:wr(i,t,g(e,t),this._addedLabels),Cr(e,i.length-1)}determineDataLimits(){const{minDefined:t,maxDefined:e}=this.getUserBounds();let{min:i,max:s}=this.getMinMax(!0);"ticks"===this.options.bounds&&(t||(i=0),e||(s=this.getLabels().length-1)),this.min=i,this.max=s}buildTicks(){const t=this.min,e=this.max,i=this.options.offset,s=[];let n=this.getLabels();n=0===t&&e===n.length-1?n:n.slice(t,e+1),this._valueRange=Math.max(n.length-(i?0:1),1),this._startValue=this.min-(i?.5:0);for(let a=t;a<=e;a++)s.push({value:a});return s}getLabelForValue(t){const e=this.getLabels();return t>=0&&t<e.length?e[t]:t}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(t){return"number"!==typeof t&&(t=this.parse(t)),null===t?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getPixelForTick(t){const e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t].value)}getValueForPixel(t){return Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange)}getBasePixel(){return this.bottom}}function Sr(t,e){const i=[],s=1e-14,{bounds:n,step:a,min:o,max:r,precision:l,count:c,maxTicks:d,maxDigits:u,includeBounds:p}=t,f=a||1,g=d-1,{min:m,max:v}=e,b=!h(o),_=!h(r),x=!h(c),y=(v-m)/(u+1);let k,w,C,M,S=q((v-m)/g/f)*f;if(S<s&&!b&&!_)return[{value:m},{value:v}];M=Math.ceil(v/S)-Math.floor(m/S),M>g&&(S=q(M*S/g/f)*f),h(l)||(k=Math.pow(10,l),S=Math.ceil(S*k)/k),"ticks"===n?(w=Math.floor(m/S)*S,C=Math.ceil(v/S)*S):(w=m,C=v),b&&_&&a&&Q((r-o)/a,S/1e3)?(M=Math.round(Math.min((r-o)/S,d)),S=(r-o)/M,w=o,C=r):x?(w=b?o:w,C=_?r:C,M=c-1,S=(C-w)/M):(M=(C-w)/S,M=X(M,Math.round(M),S/1e3)?Math.round(M):Math.ceil(M));const O=Math.max(tt(S),tt(w));k=Math.pow(10,h(l)?O:l),w=Math.round(w*k)/k,C=Math.round(C*k)/k;let D=0;for(b&&(p&&w!==o?(i.push({value:o}),w<o&&D++,X(Math.round((w+D*S)*k)/k,o,Or(o,y,t))&&D++):w<o&&D++);D<M;++D)i.push({value:Math.round((w+D*S)*k)/k});return _&&p&&C!==r?i.length&&X(i[i.length-1].value,r,Or(r,y,t))?i[i.length-1].value=r:i.push({value:r}):_&&C!==r||i.push({value:C}),i}function Or(t,e,{horizontal:i,minRotation:s}){const n=Z(s),a=(i?Math.sin(n):Math.cos(n))||.001,o=.75*e*(""+t).length;return Math.min(e/a,o)}Mr.id="category",Mr.defaults={ticks:{callback:Mr.prototype.getLabelForValue}};class Dr extends Ea{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(t,e){return h(t)||("number"===typeof t||t instanceof Number)&&!isFinite(+t)?null:+t}handleTickRangeOptions(){const{beginAtZero:t}=this.options,{minDefined:e,maxDefined:i}=this.getUserBounds();let{min:s,max:n}=this;const a=t=>s=e?s:t,o=t=>n=i?n:t;if(t){const t=U(s),e=U(n);t<0&&e<0?o(0):t>0&&e>0&&a(0)}if(s===n){let e=1;(n>=Number.MAX_SAFE_INTEGER||s<=Number.MIN_SAFE_INTEGER)&&(e=Math.abs(.05*n)),o(n+e),t||a(s-e)}this.min=s,this.max=n}getTickLimit(){const t=this.options.ticks;let e,{maxTicksLimit:i,stepSize:s}=t;return s?(e=Math.ceil(this.max/s)-Math.floor(this.min/s)+1,e>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${s} would result generating up to ${e} ticks. Limiting to 1000.`),e=1e3)):(e=this.computeTickLimit(),i=i||11),i&&(e=Math.min(i,e)),e}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const t=this.options,e=t.ticks;let i=this.getTickLimit();i=Math.max(2,i);const s={maxTicks:i,bounds:t.bounds,min:t.min,max:t.max,precision:e.precision,step:e.stepSize,count:e.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:e.minRotation||0,includeBounds:!1!==e.includeBounds},n=this._range||this,a=Sr(s,n);return"ticks"===t.bounds&&K(a,this,"value"),t.reverse?(a.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),a}configure(){const t=this.ticks;let e=this.min,i=this.max;if(super.configure(),this.options.offset&&t.length){const s=(i-e)/Math.max(t.length-1,1)/2;e-=s,i+=s}this._startValue=e,this._endValue=i,this._valueRange=i-e}getLabelForValue(t){return qi(t,this.chart.options.locale,this.options.ticks.format)}}class Pr extends Dr{determineDataLimits(){const{min:t,max:e}=this.getMinMax(!0);this.min=p(t)?t:0,this.max=p(e)?e:1,this.handleTickRangeOptions()}computeTickLimit(){const t=this.isHorizontal(),e=t?this.width:this.height,i=Z(this.options.ticks.minRotation),s=(t?Math.sin(i):Math.cos(i))||.001,n=this._resolveTickFontOptions(0);return Math.ceil(e/Math.min(40,n.lineHeight/s))}getPixelForValue(t){return null===t?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getValueForPixel(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange}}function Ir(t){const e=t/Math.pow(10,Math.floor(H(t)));return 1===e}function Tr(t,e){const i=Math.floor(H(e.max)),s=Math.ceil(e.max/Math.pow(10,i)),n=[];let a=f(t.min,Math.pow(10,Math.floor(H(e.min)))),o=Math.floor(H(a)),r=Math.floor(a/Math.pow(10,o)),l=o<0?Math.pow(10,Math.abs(o)):1;do{n.push({value:a,major:Ir(a)}),++r,10===r&&(r=1,++o,l=o>=0?1:l),a=Math.round(r*Math.pow(10,o)*l)/l}while(o<i||o===i&&r<s);const c=f(t.max,a);return n.push({value:c,major:Ir(a)}),n}Pr.id="linear",Pr.defaults={ticks:{callback:ga.formatters.numeric}};class $r extends Ea{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(t,e){const i=Dr.prototype.parse.apply(this,[t,e]);if(0!==i)return p(i)&&i>0?i:null;this._zero=!0}determineDataLimits(){const{min:t,max:e}=this.getMinMax(!0);this.min=p(t)?Math.max(0,t):null,this.max=p(e)?Math.max(0,e):null,this.options.beginAtZero&&(this._zero=!0),this.handleTickRangeOptions()}handleTickRangeOptions(){const{minDefined:t,maxDefined:e}=this.getUserBounds();let i=this.min,s=this.max;const n=e=>i=t?i:e,a=t=>s=e?s:t,o=(t,e)=>Math.pow(10,Math.floor(H(t))+e);i===s&&(i<=0?(n(1),a(10)):(n(o(i,-1)),a(o(s,1)))),i<=0&&n(o(s,-1)),s<=0&&a(o(i,1)),this._zero&&this.min!==this._suggestedMin&&i===o(this.min,0)&&n(o(i,-1)),this.min=i,this.max=s}buildTicks(){const t=this.options,e={min:this._userMin,max:this._userMax},i=Tr(e,this);return"ticks"===t.bounds&&K(i,this,"value"),t.reverse?(i.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),i}getLabelForValue(t){return void 0===t?"0":qi(t,this.chart.options.locale,this.options.ticks.format)}configure(){const t=this.min;super.configure(),this._startValue=H(t),this._valueRange=H(this.max)-H(t)}getPixelForValue(t){return void 0!==t&&0!==t||(t=this.min),null===t||isNaN(t)?NaN:this.getPixelForDecimal(t===this.min?0:(H(t)-this._startValue)/this._valueRange)}getValueForPixel(t){const e=this.getDecimalForPixel(t);return Math.pow(10,this._startValue+e*this._valueRange)}}function Lr(t){const e=t.ticks;if(e.display&&t.display){const t=Re(e.backdropPadding);return g(e.font&&e.font.size,pe.font.size)+t.height}return 0}function Er(t,e,i){return i=d(i)?i:[i],{w:me(t,e.string,i),h:i.length*e.lineHeight}}function Ar(t,e,i,s,n){return t===s||t===n?{start:e-i/2,end:e+i/2}:t<s||t>n?{start:e-i,end:e}:{start:e,end:e+i}}function Rr(t){const e={l:t.left+t._padding.left,r:t.right-t._padding.right,t:t.top+t._padding.top,b:t.bottom-t._padding.bottom},i=Object.assign({},e),s=[],n=[],a=t._pointLabels.length,o=t.options.pointLabels,r=o.centerPointLabels?R/a:0;for(let l=0;l<a;l++){const a=o.setContext(t.getPointLabelContext(l));n[l]=a.padding;const c=t.getPointPosition(l,t.drawingArea+n[l],r),h=Ve(a.font),d=Er(t.ctx,h,t._pointLabels[l]);s[l]=d;const u=nt(t.getIndexAngle(l)+r),p=Math.round(J(u)),f=Ar(p,c.x,d.w,0,180),g=Ar(p,c.y,d.h,90,270);Vr(i,e,u,f,g)}t.setCenterPoint(e.l-i.l,i.r-e.r,e.t-i.t,i.b-e.b),t._pointLabelItems=Fr(t,s,n)}function Vr(t,e,i,s,n){const a=Math.abs(Math.sin(i)),o=Math.abs(Math.cos(i));let r=0,l=0;s.start<e.l?(r=(e.l-s.start)/a,t.l=Math.min(t.l,e.l-r)):s.end>e.r&&(r=(s.end-e.r)/a,t.r=Math.max(t.r,e.r+r)),n.start<e.t?(l=(e.t-n.start)/o,t.t=Math.min(t.t,e.t-l)):n.end>e.b&&(l=(n.end-e.b)/o,t.b=Math.max(t.b,e.b+l))}function Fr(t,e,i){const s=[],n=t._pointLabels.length,a=t.options,o=Lr(a)/2,r=t.drawingArea,l=a.pointLabels.centerPointLabels?R/n:0;for(let c=0;c<n;c++){const n=t.getPointPosition(c,r+o+i[c],l),a=Math.round(J(nt(n.angle+j))),h=e[c],d=jr(n.y,h.h,a),u=Br(a),p=zr(n.x,h.w,u);s.push({x:n.x,y:d,textAlign:u,left:p,top:d,right:p+h.w,bottom:d+h.h})}return s}function Br(t){return 0===t||180===t?"center":t<180?"left":"right"}function zr(t,e,i){return"right"===i?t-=e:"center"===i&&(t-=e/2),t}function jr(t,e,i){return 90===i||270===i?t-=e/2:(i>270||i<90)&&(t-=e),t}function Nr(t,e){const{ctx:i,options:{pointLabels:s}}=t;for(let n=e-1;n>=0;n--){const e=s.setContext(t.getPointLabelContext(n)),a=Ve(e.font),{x:o,y:r,textAlign:l,left:c,top:d,right:u,bottom:p}=t._pointLabelItems[n],{backdropColor:f}=e;if(!h(f)){const t=Ae(e.borderRadius),s=Re(e.backdropPadding);i.fillStyle=f;const n=c-s.left,a=d-s.top,o=u-c+s.width,r=p-d+s.height;Object.values(t).some(t=>0!==t)?(i.beginPath(),De(i,{x:n,y:a,w:o,h:r,radius:t}),i.fill()):i.fillRect(n,a,o,r)}Me(i,t._pointLabels[n],o,r+a.lineHeight/2,a,{color:e.color,textAlign:l,textBaseline:"middle"})}}function Wr(t,e,i,s){const{ctx:n}=t;if(i)n.arc(t.xCenter,t.yCenter,e,0,V);else{let i=t.getPointPosition(0,e);n.moveTo(i.x,i.y);for(let a=1;a<s;a++)i=t.getPointPosition(a,e),n.lineTo(i.x,i.y)}}function Hr(t,e,i,s){const n=t.ctx,a=e.circular,{color:o,lineWidth:r}=e;!a&&!s||!o||!r||i<0||(n.save(),n.strokeStyle=o,n.lineWidth=r,n.setLineDash(e.borderDash),n.lineDashOffset=e.borderDashOffset,n.beginPath(),Wr(t,i,a,s),n.closePath(),n.stroke(),n.restore())}function Ur(t,e,i){return ze(t,{label:i,index:e,type:"pointLabel"})}$r.id="logarithmic",$r.defaults={ticks:{callback:ga.formatters.logarithmic,major:{enabled:!0}}};class qr extends Dr{constructor(t){super(t),this.xCenter=void 0,this.yCenter=void 0,this.drawingArea=void 0,this._pointLabels=[],this._pointLabelItems=[]}setDimensions(){const t=this._padding=Re(Lr(this.options)/2),e=this.width=this.maxWidth-t.width,i=this.height=this.maxHeight-t.height;this.xCenter=Math.floor(this.left+e/2+t.left),this.yCenter=Math.floor(this.top+i/2+t.top),this.drawingArea=Math.floor(Math.min(e,i)/2)}determineDataLimits(){const{min:t,max:e}=this.getMinMax(!1);this.min=p(t)&&!isNaN(t)?t:0,this.max=p(e)&&!isNaN(e)?e:0,this.handleTickRangeOptions()}computeTickLimit(){return Math.ceil(this.drawingArea/Lr(this.options))}generateTickLabels(t){Dr.prototype.generateTickLabels.call(this,t),this._pointLabels=this.getLabels().map((t,e)=>{const i=b(this.options.pointLabels.callback,[t,e],this);return i||0===i?i:""}).filter((t,e)=>this.chart.getDataVisibility(e))}fit(){const t=this.options;t.display&&t.pointLabels.display?Rr(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(t,e,i,s){this.xCenter+=Math.floor((t-e)/2),this.yCenter+=Math.floor((i-s)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(t,e,i,s))}getIndexAngle(t){const e=V/(this._pointLabels.length||1),i=this.options.startAngle||0;return nt(t*e+Z(i))}getDistanceFromCenterForValue(t){if(h(t))return NaN;const e=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-t)*e:(t-this.min)*e}getValueForDistanceFromCenter(t){if(h(t))return NaN;const e=t/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-e:this.min+e}getPointLabelContext(t){const e=this._pointLabels||[];if(t>=0&&t<e.length){const i=e[t];return Ur(this.getContext(),t,i)}}getPointPosition(t,e,i=0){const s=this.getIndexAngle(t)-j+i;return{x:Math.cos(s)*e+this.xCenter,y:Math.sin(s)*e+this.yCenter,angle:s}}getPointPositionForValue(t,e){return this.getPointPosition(t,this.getDistanceFromCenterForValue(e))}getBasePosition(t){return this.getPointPositionForValue(t||0,this.getBaseValue())}getPointLabelPosition(t){const{left:e,top:i,right:s,bottom:n}=this._pointLabelItems[t];return{left:e,top:i,right:s,bottom:n}}drawBackground(){const{backgroundColor:t,grid:{circular:e}}=this.options;if(t){const i=this.ctx;i.save(),i.beginPath(),Wr(this,this.getDistanceFromCenterForValue(this._endValue),e,this._pointLabels.length),i.closePath(),i.fillStyle=t,i.fill(),i.restore()}}drawGrid(){const t=this.ctx,e=this.options,{angleLines:i,grid:s}=e,n=this._pointLabels.length;let a,o,r;if(e.pointLabels.display&&Nr(this,n),s.display&&this.ticks.forEach((t,e)=>{if(0!==e){o=this.getDistanceFromCenterForValue(t.value);const i=s.setContext(this.getContext(e-1));Hr(this,i,o,n)}}),i.display){for(t.save(),a=n-1;a>=0;a--){const s=i.setContext(this.getPointLabelContext(a)),{color:n,lineWidth:l}=s;l&&n&&(t.lineWidth=l,t.strokeStyle=n,t.setLineDash(s.borderDash),t.lineDashOffset=s.borderDashOffset,o=this.getDistanceFromCenterForValue(e.ticks.reverse?this.min:this.max),r=this.getPointPosition(a,o),t.beginPath(),t.moveTo(this.xCenter,this.yCenter),t.lineTo(r.x,r.y),t.stroke())}t.restore()}}drawBorder(){}drawLabels(){const t=this.ctx,e=this.options,i=e.ticks;if(!i.display)return;const s=this.getIndexAngle(0);let n,a;t.save(),t.translate(this.xCenter,this.yCenter),t.rotate(s),t.textAlign="center",t.textBaseline="middle",this.ticks.forEach((s,o)=>{if(0===o&&!e.reverse)return;const r=i.setContext(this.getContext(o)),l=Ve(r.font);if(n=this.getDistanceFromCenterForValue(this.ticks[o].value),r.showLabelBackdrop){t.font=l.string,a=t.measureText(s.label).width,t.fillStyle=r.backdropColor;const e=Re(r.backdropPadding);t.fillRect(-a/2-e.left,-n-l.size/2-e.top,a+e.width,l.size+e.height)}Me(t,s.label,0,-n,l,{color:r.color})}),t.restore()}drawTitle(){}}qr.id="radialLinear",qr.defaults={display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:ga.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback(t){return t},padding:5,centerPointLabels:!1}},qr.defaultRoutes={"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"},qr.descriptors={angleLines:{_fallback:"grid"}};const Yr={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}},Gr=Object.keys(Yr);function Xr(t,e){return t-e}function Qr(t,e){if(h(e))return null;const i=t._adapter,{parser:s,round:n,isoWeekday:a}=t._parseOpts;let o=e;return"function"===typeof s&&(o=s(o)),p(o)||(o="string"===typeof s?i.parse(o,s):i.parse(o)),null===o?null:(n&&(o="week"!==n||!G(a)&&!0!==a?i.startOf(o,n):i.startOf(o,"isoWeek",a)),+o)}function Kr(t,e,i,s){const n=Gr.length;for(let a=Gr.indexOf(t);a<n-1;++a){const t=Yr[Gr[a]],n=t.steps?t.steps:Number.MAX_SAFE_INTEGER;if(t.common&&Math.ceil((i-e)/(n*t.size))<=s)return Gr[a]}return Gr[n-1]}function Zr(t,e,i,s,n){for(let a=Gr.length-1;a>=Gr.indexOf(i);a--){const i=Gr[a];if(Yr[i].common&&t._adapter.diff(n,s,i)>=e-1)return i}return Gr[i?Gr.indexOf(i):0]}function Jr(t){for(let e=Gr.indexOf(t)+1,i=Gr.length;e<i;++e)if(Yr[Gr[e]].common)return Gr[e]}function tl(t,e,i){if(i){if(i.length){const{lo:s,hi:n}=je(i,e),a=i[s]>=e?i[s]:i[n];t[a]=!0}}else t[e]=!0}function el(t,e,i,s){const n=t._adapter,a=+n.startOf(e[0].value,s),o=e[e.length-1].value;let r,l;for(r=a;r<=o;r=+n.add(r,1,s))l=i[r],l>=0&&(e[l].major=!0);return e}function il(t,e,i){const s=[],n={},a=e.length;let o,r;for(o=0;o<a;++o)r=e[o],n[r]=o,s.push({value:r,major:!1});return 0!==a&&i?el(t,s,n,i):s}class sl extends Ea{constructor(t){super(t),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(t,e){const i=t.time||(t.time={}),s=this._adapter=new mn._date(t.adapters.date);M(i.displayFormats,s.formats()),this._parseOpts={parser:i.parser,round:i.round,isoWeekday:i.isoWeekday},super.init(t),this._normalized=e.normalized}parse(t,e){return void 0===t?null:Qr(this,t)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const t=this.options,e=this._adapter,i=t.time.unit||"day";let{min:s,max:n,minDefined:a,maxDefined:o}=this.getUserBounds();function r(t){a||isNaN(t.min)||(s=Math.min(s,t.min)),o||isNaN(t.max)||(n=Math.max(n,t.max))}a&&o||(r(this._getLabelBounds()),"ticks"===t.bounds&&"labels"===t.ticks.source||r(this.getMinMax(!1))),s=p(s)&&!isNaN(s)?s:+e.startOf(Date.now(),i),n=p(n)&&!isNaN(n)?n:+e.endOf(Date.now(),i)+1,this.min=Math.min(s,n-1),this.max=Math.max(s+1,n)}_getLabelBounds(){const t=this.getLabelTimestamps();let e=Number.POSITIVE_INFINITY,i=Number.NEGATIVE_INFINITY;return t.length&&(e=t[0],i=t[t.length-1]),{min:e,max:i}}buildTicks(){const t=this.options,e=t.time,i=t.ticks,s="labels"===i.source?this.getLabelTimestamps():this._generate();"ticks"===t.bounds&&s.length&&(this.min=this._userMin||s[0],this.max=this._userMax||s[s.length-1]);const n=this.min,a=this.max,o=He(s,n,a);return this._unit=e.unit||(i.autoSkip?Kr(e.minUnit,this.min,this.max,this._getLabelCapacity(n)):Zr(this,o.length,e.minUnit,this.min,this.max)),this._majorUnit=i.major.enabled&&"year"!==this._unit?Jr(this._unit):void 0,this.initOffsets(s),t.reverse&&o.reverse(),il(this,o,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map(t=>+t.value))}initOffsets(t){let e,i,s=0,n=0;this.options.offset&&t.length&&(e=this.getDecimalForValue(t[0]),s=1===t.length?1-e:(this.getDecimalForValue(t[1])-e)/2,i=this.getDecimalForValue(t[t.length-1]),n=1===t.length?i:(i-this.getDecimalForValue(t[t.length-2]))/2);const a=t.length<3?.5:.25;s=ot(s,0,a),n=ot(n,0,a),this._offsets={start:s,end:n,factor:1/(s+1+n)}}_generate(){const t=this._adapter,e=this.min,i=this.max,s=this.options,n=s.time,a=n.unit||Kr(n.minUnit,e,i,this._getLabelCapacity(e)),o=g(n.stepSize,1),r="week"===a&&n.isoWeekday,l=G(r)||!0===r,c={};let h,d,u=e;if(l&&(u=+t.startOf(u,"isoWeek",r)),u=+t.startOf(u,l?"day":a),t.diff(i,e,a)>1e5*o)throw new Error(e+" and "+i+" are too far apart with stepSize of "+o+" "+a);const p="data"===s.ticks.source&&this.getDataTimestamps();for(h=u,d=0;h<i;h=+t.add(h,o,a),d++)tl(c,h,p);return h!==i&&"ticks"!==s.bounds&&1!==d||tl(c,h,p),Object.keys(c).sort((t,e)=>t-e).map(t=>+t)}getLabelForValue(t){const e=this._adapter,i=this.options.time;return i.tooltipFormat?e.format(t,i.tooltipFormat):e.format(t,i.displayFormats.datetime)}_tickFormatFunction(t,e,i,s){const n=this.options,a=n.time.displayFormats,o=this._unit,r=this._majorUnit,l=o&&a[o],c=r&&a[r],h=i[e],d=r&&c&&h&&h.major,u=this._adapter.format(t,s||(d?c:l)),p=n.ticks.callback;return p?b(p,[u,e,i],this):u}generateTickLabels(t){let e,i,s;for(e=0,i=t.length;e<i;++e)s=t[e],s.label=this._tickFormatFunction(s.value,e,t)}getDecimalForValue(t){return null===t?NaN:(t-this.min)/(this.max-this.min)}getPixelForValue(t){const e=this._offsets,i=this.getDecimalForValue(t);return this.getPixelForDecimal((e.start+i)*e.factor)}getValueForPixel(t){const e=this._offsets,i=this.getDecimalForPixel(t)/e.factor-e.end;return this.min+i*(this.max-this.min)}_getLabelSize(t){const e=this.options.ticks,i=this.ctx.measureText(t).width,s=Z(this.isHorizontal()?e.maxRotation:e.minRotation),n=Math.cos(s),a=Math.sin(s),o=this._resolveTickFontOptions(0).size;return{w:i*n+o*a,h:i*a+o*n}}_getLabelCapacity(t){const e=this.options.time,i=e.displayFormats,s=i[e.unit]||i.millisecond,n=this._tickFormatFunction(t,0,il(this,[t],this._majorUnit),s),a=this._getLabelSize(n),o=Math.floor(this.isHorizontal()?this.width/a.w:this.height/a.h)-1;return o>0?o:1}getDataTimestamps(){let t,e,i=this._cache.data||[];if(i.length)return i;const s=this.getMatchingVisibleMetas();if(this._normalized&&s.length)return this._cache.data=s[0].controller.getAllParsedValues(this);for(t=0,e=s.length;t<e;++t)i=i.concat(s[t].controller.getAllParsedValues(this));return this._cache.data=this.normalize(i)}getLabelTimestamps(){const t=this._cache.labels||[];let e,i;if(t.length)return t;const s=this.getLabels();for(e=0,i=s.length;e<i;++e)t.push(Qr(this,s[e]));return this._cache.labels=this._normalized?t:this.normalize(t)}normalize(t){return Ge(t.sort(Xr))}}function nl(t,e,i){let s,n,a,o,r=0,l=t.length-1;i?(e>=t[r].pos&&e<=t[l].pos&&({lo:r,hi:l}=Ne(t,"pos",e)),({pos:s,time:a}=t[r]),({pos:n,time:o}=t[l])):(e>=t[r].time&&e<=t[l].time&&({lo:r,hi:l}=Ne(t,"time",e)),({time:s,pos:a}=t[r]),({time:n,pos:o}=t[l]));const c=n-s;return c?a+(o-a)*(e-s)/c:a}sl.id="time",sl.defaults={bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",major:{enabled:!1}}};class al extends sl{constructor(t){super(t),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const t=this._getTimestampsForTable(),e=this._table=this.buildLookupTable(t);this._minPos=nl(e,this.min),this._tableRange=nl(e,this.max)-this._minPos,super.initOffsets(t)}buildLookupTable(t){const{min:e,max:i}=this,s=[],n=[];let a,o,r,l,c;for(a=0,o=t.length;a<o;++a)l=t[a],l>=e&&l<=i&&s.push(l);if(s.length<2)return[{time:e,pos:0},{time:i,pos:1}];for(a=0,o=s.length;a<o;++a)c=s[a+1],r=s[a-1],l=s[a],Math.round((c+r)/2)!==l&&n.push({time:l,pos:a/(o-1)});return n}_getTimestampsForTable(){let t=this._cache.all||[];if(t.length)return t;const e=this.getDataTimestamps(),i=this.getLabelTimestamps();return t=e.length&&i.length?this.normalize(e.concat(i)):e.length?e:i,t=this._cache.all=t,t}getDecimalForValue(t){return(nl(this._table,t)-this._minPos)/this._tableRange}getValueForPixel(t){const e=this._offsets,i=this.getDecimalForPixel(t)/e.factor-e.end;return nl(this._table,i*this._tableRange+this._minPos,!0)}}al.id="timeseries",al.defaults=sl.defaults},a0b1:function(t,e,i){"use strict";var s=function(){var t=this,e=t.$createElement,i=t._self._c||e;return t.user?i("div",[i("v-form",{ref:"form",attrs:{"lazy-validation":""},model:{value:t.valid,callback:function(e){t.valid=e},expression:"valid"}},[i("v-text-field",{ref:"commentField",attrs:{label:t.$t("results.comments.comment-label"),type:"text","no-details":"",outlined:"","append-outer-icon":t.posting&&t.$store.getters.isLoading?"fa fa-circle-notch fa-spin":"fa-paper-plane",rules:t.rules,loading:t.posting&&t.$store.getters.isLoading,disabled:t.posting&&t.$store.getters.isLoading,"hide-details":""},on:{keydown:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:(e.preventDefault(),t.postCommentOnItem.apply(null,arguments))},"click:append-outer":t.postCommentOnItem},model:{value:t.newMessage,callback:function(e){t.newMessage=e},expression:"newMessage"}})],1)],1):t._e()},n=[],a=i("2f62"),o={name:"PostCommentField",components:{},props:{},data:function(){return{newMessage:null,posting:!1,valid:!0,rules:[t=>!!t||"Please enter the comment you want to post."]}},created(){},mounted(){},methods:{async postCommentOnItem(){this.$refs.form.validate()&&this.user&&this.newMessage&&(this.posting=!0,this.$emit("submit",this.newMessage))}},computed:{...Object(a["b"])({user:"user"})},watch:{}},r=o,l=i("2877"),c=i("6544"),h=i.n(c),d=i("4bd4"),u=i("8654"),p=Object(l["a"])(r,s,n,!1,null,null,null);e["a"]=p.exports;h()(p,{VForm:d["a"],VTextField:u["a"]})},a177:function(t,e,i){"use strict";var s=function(){var t=this,e=t.$createElement,i=t._self._c||e;return t.link?i("span",{attrs:{title:t.link.race_name}},[t.withIcon?i("v-icon",{staticClass:"mr-2",attrs:{title:t.link.scoring}},[t._v(t._s(t.$helpers.getScoringIcon(t.link.scoring))+" ")]):t._e(),"RESULT"==t.link.scoring?i("span",{},[t._v(t._s(t._f("duration")(-1*t.link.val)))]):"DISTANCE"==t.link.scoring?i("span",{},[t._v(t._s(t._f("distance")(t.link.val,t.profile.unit)))]):"TIME"==t.link.scoring?i("span",{},[t._v(t._s(t._f("duration")(t.link.val)))]):"ELEVATION"==t.link.scoring?i("span",{},[t._v(t._s(t._f("distance")(t.link.val,t.profile.unit)))]):"STEPS"==t.link.scoring?i("span",{},[t._v(t._s(t._f("steps")(t.link.val))+" "+t._s(t._f("lowercase")(t.$t("profile.activities.steps")))+" ")]):"CUSTOM"==t.link.scoring?i("span",{},[t._v(" "+t._s(t.link.val)+" "+t._s(t._f("lowercase")(t.link.custom||t.$t("profile.activities.points")))+" "),t.link.scoring_desc?i("TooltipDialog",{attrs:{title:"Scoring for this race",text:t.link.scoring_desc}}):t._e()],1):0===t.link.val?i("span",{},[t._v("✔️")]):i("span",{},[t._v(t._s(t.link.val))])],1):t._e()},n=[],a={name:"ActivityRaceLink",components:{},props:{link:Object,profile:Object,withIcon:Boolean},data(){return{}},async mounted(){},methods:{},computed:{}},o=a,r=i("2877"),l=i("6544"),c=i.n(l),h=i("132d"),d=Object(r["a"])(o,s,n,!1,null,null,null);e["a"]=d.exports;c()(d,{VIcon:h["a"]})},a453:function(t,e,i){"use strict";i("4a00")},a69d:function(t,e,i){"use strict";var s=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("v-card",{staticClass:"event-card",attrs:{href:t.redirectToExternalUrl?t.data.external_url:null,to:t.redirectToExternalUrl||t.hasClickListener?null:t.routeResolver?t.routeResolver(t.data.id):{name:"event",params:{id:t.data.id}}},on:{click:function(e){t.hasClickListener&&t.$emit("click",t.data.id)}}},[t.data.img?i("v-img",{staticClass:"white--text align-end",attrs:{src:t.data.img,gradient:"to bottom, rgba(0,0,0,.1), rgba(0,0,0,.5)",height:"200px"}},[t.showLogo&&t.data.logo?i("v-card",{staticClass:"pa-1 d-inline-block event-card--logo",attrs:{color:"white"}},[i("v-img",{attrs:{src:t.data.logo,height:"80",width:"80"}})],1):t._e(),i("v-card-title",[t._v(t._s(t._f("trim")(t.data.name,50))),t.icon?i("v-icon",{staticClass:"ml-2",attrs:{color:"white"}},[t._v(t._s(t.icon))]):t._e()],1)],1):i("v-sheet",{attrs:{color:t.$helpers.getGradientColor(t.index),height:"200"}},[i("v-card-title",[t._v(t._s(t.data.name)),t.icon?i("v-icon",{staticClass:"ml-2"},[t._v(t._s(t.icon))]):t._e()],1)],1),t.minimal?t._e():i("div",[t.$helpers.isActiveEvent(t.item)?i("v-card-text",[i("v-chip",{staticClass:"white--text",attrs:{color:"primary darken-0"}},[t._v("Active now!")]),t._v(" till "+t._s(t._f("localDate")(t.data.till,"L"))+" ")],1):t.$helpers.isFutureEvent(t.item)?i("v-card-text",[i("span",{staticClass:"py-1 d-inline-block"},[t._v("Opens in "+t._s(t._f("duration")(t.$helpers.getStartDurationForEvent(t.item),!0)))])]):i("v-card-text",[i("span",{staticClass:"py-1 d-inline-block"},[t._v(t._s(t._f("localDate")(t.data.from,"L"))+" till "+t._s(t._f("localDate")(t.data.till,"L")))])])],1)],1)},n=[],a={name:"EventCard",props:{item:Object,route:Object,minimal:Boolean,showLogo:Boolean,icon:String,index:Number,routeResolver:Function},emits:{},data:function(){return{data:null,score:null}},created(){},mounted(){},methods:{},computed:{hasClickListener(){return this.$listeners&&this.$listeners.click&&this.$listeners.click.length},redirectToExternalUrl(){return this.item&&!this.routeResolver&&this.item.external_url&&this.isFuture}},watch:{item:{immediate:!0,handler(t,e){t.o?(this.data=t.o,this.score=t.d||t.s):this.data=t}}}},o=a,r=(i("aa65"),i("2877")),l=i("6544"),c=i.n(l),h=i("b0af"),d=i("99d9"),u=i("cc20"),p=i("132d"),f=i("adda"),g=i("8dd9"),m=Object(r["a"])(o,s,n,!1,null,"65e0f963",null);e["a"]=m.exports;c()(m,{VCard:h["a"],VCardText:d["c"],VCardTitle:d["d"],VChip:u["a"],VIcon:p["a"],VImg:f["a"],VSheet:g["a"]})},aa65:function(t,e,i){"use strict";i("f37c")},b55c:function(t,e,i){"use strict";var s=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("span",[t.nativeShare?i("v-btn",{class:t.buttonClass,style:t.buttonStyle,attrs:{text:!t.icon&&!t.outlined,icon:t.icon,color:t.color,rounded:t.rounded,outlined:t.outlined,"aria-label":"Share this page",title:"Share this page"},on:{click:function(e){return e.stopPropagation(),t.showNativeShareOptions.apply(null,arguments)}}},[i("v-icon",{attrs:{small:t.small}},[t._v("fa-share-alt")]),t.icon?t._e():i("span",{staticClass:"ml-2"},[t._v(t._s(t.$t("shared.share")))])],1):i("v-btn",{class:t.buttonClass,style:t.buttonStyle,attrs:{text:!t.icon&&!t.outlined,icon:t.icon,color:t.color,rounded:t.rounded,outlined:t.outlined,"aria-label":"Share this page",title:"Share this page"},on:{click:function(e){t.showShareDialog=!0}}},[i("v-icon",{attrs:{small:t.small}},[t._v("fa-share-alt")]),t.icon?t._e():i("span",{staticClass:"ml-2"},[t._v(t._s(t.$t("shared.share")))])],1),i("v-dialog",{attrs:{width:"310"},model:{value:t.showShareDialog,callback:function(e){t.showShareDialog=e},expression:"showShareDialog"}},[i("v-list",[i("v-subheader",{staticClass:"title"},[t._v(t._s(t.$t("shared.share-title")))]),t._l(t.sharers,(function(e){return i("v-list-item",{key:e.title,attrs:{href:e.url,target:"_blank"},on:{click:function(i){t.processShareClick(e.title.toLowerCase())}}},[i("v-list-item-avatar",[i("v-avatar",{attrs:{size:"32px",tile:""}},[i("v-icon",{attrs:{color:e.color,alt:e.title}},[t._v(t._s(e.icon))])],1)],1),i("v-list-item-title",[t._v(t._s(e.title))])],1)}))],2)],1)],1)},n=[],a=i("585f"),o=i("4a1f"),r=i.n(o);const l=r.a.current();var c={name:"ShareButton",props:{icon:Boolean,outlined:Boolean,rounded:Boolean,color:String,text:String,small:Boolean,route:Object,url:String,buttonStyle:String,buttonClass:String},data(){return{tenant:l,nativeShare:navigator.share,pageTitle:null,pageDescription:null,pageUrl:null,sharers:null,showShareDialog:!1}},mounted(){this.updatePageState(this.$store.state.currentPageMeta),a["a"].$on("page-header-change",this.updatePageState)},watch:{$route(t,e){this.pageUrl=this.getPageUrl(),this.sharers=this.createSharers()}},computed:{twitterUrl(){return"https://twitter.com/intent/tweet?url="+encodeURIComponent(this.getPageUrl())+"&text="+encodeURIComponent(this.pageTitle)+"&hashtags=sodisp"}},methods:{createSharers(){return[{color:"#3b5998",icon:"fab fa-facebook",title:"Facebook",url:this.getFacebookUrl()},{color:"#55acee",icon:"fab fa-twitter",title:"Twitter",url:this.getTwitterUrl()},{color:"#25D366",icon:"fab fa-whatsapp",title:"Whatsapp",url:this.getWhatsappUrl()},{color:"#0077b5",icon:"fab fa-linkedin",title:"LinkedIn",url:this.getLinkedInUrl()},{color:"",icon:"fas fa-envelope",title:"Email",url:this.getEmailUrl()}]},updatePageState(t){console.log("Loading new data to share",t),this.pageTitle=t.title,this.pageDescription=t.description,this.sharers=this.createSharers()},getPageUrl(){return this.route?document.location.origin+this.$router.resolve(this.route).href:this.url||(document.querySelector("link[rel=canonical]")?document.querySelector("link[rel=canonical]").href:document.location.href)},getShareText(){return this.text||this.pageTitle},processShareClick(t){this.showShareDialog=!1,this.$analytics.event(t,{event_category:"share",event_label:this.getPageUrl()})},showNativeShareOptions(){this.$analytics.event("native",{event_category:"share",event_label:this.getPageUrl()}),navigator.share?navigator.share({title:l.title,text:this.getShareText(),url:this.getPageUrl()}).then(()=>{}).catch(t=>{console.error(t),this.showShareDialog=!0}):(this.showShareDialog=!0,console.log("Native share not available"))},getTwitterUrl(){return"https://twitter.com/intent/tweet?url="+encodeURIComponent(this.getPageUrl())+"&text="+encodeURIComponent(this.getShareText())+"&hashtags=sodisp"},getLinkedInUrl(){return"https://www.linkedin.com/shareArticle?mini=true&url="+encodeURIComponent(this.getPageUrl())+"&source=sodisp"},getFacebookUrl(){return"https://www.facebook.com/sharer.php?u="+encodeURIComponent(this.getPageUrl())},getEmailUrl(){return"mailto:?subject="+encodeURIComponent(this.getShareText())+"&body="+encodeURIComponent(this.getPageUrl())},getWhatsappUrl(){return"whatsapp://send?text="+encodeURIComponent(this.getShareText())+"%20"+encodeURIComponent(this.getPageUrl())},getInstagamUrl(){return null},socialWindow(t){var e=(screen.width-570)/2,i=(screen.height-570)/2,s="menubar=no,toolbar=no,status=no,width=570,height=570,top="+i+",left="+e;window.open(t,"NewWindow",s)}}},h=c,d=(i("a453"),i("2877")),u=i("6544"),p=i.n(u),f=i("8212"),g=i("8336"),m=i("169a"),v=i("132d"),b=i("8860"),_=i("da13"),x=i("8270"),y=i("5d23"),k=i("e0c7"),w=Object(d["a"])(h,s,n,!1,null,"25bc903e",null);e["a"]=w.exports;p()(w,{VAvatar:f["a"],VBtn:g["a"],VDialog:m["a"],VIcon:v["a"],VList:b["a"],VListItem:_["a"],VListItemAvatar:x["a"],VListItemTitle:y["c"],VSubheader:k["a"]})},c3b6:function(t,e,i){"use strict";var s=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"apivideo-player",attrs:{id:"videoplayer-"+t.videoId}})},n=[];class a{constructor(t,e){this.iframe=null,this.sdkInSync=!1,this.currentVideoReady=!1,this.onceSdkInSyncCallbacks=[],this.onceVideoReadyCallbacks=[],this.userEventListeners=[],this.playerOrigin=null,this.postMessageCallbacks={},this.appendQueryParamIfMissing=(t,e,i)=>{const s=new URL(t,document.location.href),n=new URLSearchParams(s.search);return n.has(e)?t:(n.append(e,i),s.search=n.toString(),s.toString())},this.sdkPlayerId=a.nextSdkPlayerId++,this.sdkOrigin=`${window.location.protocol}//${window.location.host}`;const i=t instanceof Element?t:document.querySelector(t);if(null==i)throw new Error("No match found for selector "+t);this.iframe="IFRAME"!==i.tagName?this.createIframe(i):i;const s=e||{};this.iframeUrl=this.getIframeUrl(s),this.iframe.src?this.bindExistingPlayer(this.iframe):this.createNewPlayer(this.iframe,s),this.onceSdkInSyncCallbacks=[],this.userEventListeners=[],this.sdkInSync=!1,this.currentVideoReady=!1,this.playerOrigin=new URL(this.iframeUrl).origin,this.options=s,window.addEventListener("message",t=>{var e;t.origin===this.playerOrigin&&parseInt(null===(e=t.data)||void 0===e?void 0:e.sdkPlayerId,10)===this.sdkPlayerId&&(t.data.callbackId&&this.postMessageCallbacks[t.data.callbackId]?this.postMessageCallbacks[t.data.callbackId](t.data.arg):this.onEvent(t.data))},!1),s.playbackRate&&this.setPlaybackRate(s.playbackRate)}getIframeUrl(t){if(t.iframeUrl)return t.iframeUrl;const e=t.customDomain||"embed.api.video";return"https://"+e+"/${type}/${id}"}loadConfig(t){this.currentVideoReady=!1,this.options=Object.assign(Object.assign({},this.options),t),this.postMessage({message:"loadConfig",url:this.buildPlayerUrl(this.options)})}play(){this.postMessage({message:"play"})}setVideoStyleTransform(t){this.postMessage({message:"setStyleProperty",query:"video",property:"transform",value:t},void 0,!1),this.postMessage({message:"setStyleProperty",query:".vjs-poster",property:"transform",value:t},void 0,!1)}setVideoStyleObjectFit(t){this.postMessage({message:"setStyleProperty",query:"video",property:"object-fit",value:t},void 0,!1),this.postMessage({message:"setStyleProperty",query:".vjs-poster",property:"background-size",value:"fill"!==t?t:"100% 100%"},void 0,!1)}setMinimalQuality(t){this.postMessage({message:"setMinimalQuality",quality:t})}setMaximalQuality(t){this.postMessage({message:"setMaximalQuality",quality:t})}hideControls(t){t||(this.options.hideControls=!0),this.postMessage({message:"hideControls",controls:t},void 0,!0)}showControls(t){t||(this.options.hideControls=!1),this.postMessage({message:"showControls",controls:t},void 0,!0)}hideSubtitles(){this.options.showSubtitles=!1,this.postMessage({message:"hideSubtitles"})}showSubtitles(){this.options.showSubtitles=!0,this.postMessage({message:"showSubtitles"})}hideTitle(){this.options.hideTitle=!0,this.postMessage({message:"hideTitle"})}showTitle(){this.options.hideTitle=!1,this.postMessage({message:"showTitle"})}hidePoster(){this.options.hidePoster=!0,this.postMessage({message:"hidePoster"})}showPoster(){this.options.hidePoster=!1,this.postMessage({message:"showPoster"})}pause(){this.postMessage({message:"pause"})}mute(){this.options.muted=!0,this.postMessage({message:"mute"})}unmute(){this.options.muted=!1,this.postMessage({message:"unmute"})}seek(t){this.postMessage({message:"seek",seek:t})}setCurrentTime(t){this.postMessage({message:"setCurrentTime",currentTime:t})}setVolume(t){this.postMessage({message:"setVolume",volume:t})}setAutoplay(t){this.options.autoplay=t,this.postMessage({message:"setAutoplay",autoplay:t})}setLoop(t){this.options.loop=t,this.postMessage({message:"setLoop",loop:t})}setChromeless(t){this.options.chromeless=t,this.postMessage({message:"setChromeless",chromeless:t})}setPlaybackRate(t){this.options.playbackRate=t,this.postMessage({message:"setPlaybackRate",rate:t},void 0,!0)}exitFullscreen(){this.postMessage({message:"exitFullscreen"},void 0,!0)}requestFullscreen(){this.postMessage({message:"requestFullscreen"},void 0,!0)}exitPictureInPicture(){this.postMessage({message:"exitPictureInPicture"},void 0,!0)}requestPictureInPicture(){this.postMessage({message:"requestPictureInPicture"},void 0,!0)}setTheme(t){this.postMessage({message:"setTheme",theme:t})}getPaused(t){return this.postMessage({message:"getPaused"},t)}getMuted(t){return this.postMessage({message:"getMuted"},t)}getPlaying(t){return this.postMessage({message:"getPlaying"},t)}getDuration(t){return this.postMessage({message:"getDuration"},t,!0)}getCurrentTime(t){return this.postMessage({message:"getCurrentTime"},t)}getPlaybackRate(t){return this.postMessage({message:"getPlaybackRate"},t)}getVolume(t){return this.postMessage({message:"getVolume"},t)}getLoop(t){return this.postMessage({message:"getLoop"},t)}download(t){this.postMessage({message:"getMp4Url"},e=>{if(!e)throw new Error("This video is not downloadable");fetch(e).then(e=>{e.blob().then(e=>{const i=URL.createObjectURL(e),s=document.createElement("a");s.href=i,s.download=t||"video.mp4",s.target="_blank",s.click(),URL.revokeObjectURL(i)})})})}getVideoSize(t){return this.postMessage({message:"getVideoSize"},t,!0)}isLiveStream(t){return this.postMessage({message:"isLiveStream"},t)}addEventListener(t,e){this.userEventListeners.push({event:t,callback:e})}destroy(){this.postMessage({message:"destroy"}),setTimeout(()=>{var t,e;return null===(e=null===(t=this.iframe)||void 0===t?void 0:t.parentElement)||void 0===e?void 0:e.removeChild(this.iframe)},0)}createNewPlayer(t,e){this.setIframeSrc(t,this.buildPlayerUrl(e))}buildPlayerUrl(t){if(!t.id)throw new Error("Missing id in options");const e=this.iframeUrl.replace("${id}",t.id).replace("${type}",t.live?"live":"vod");return this.addParametersInIframeHash(`${e}?${this.urlParametersFromOptions(t)}`,t)}bindExistingPlayer(t){this.setIframeSrc(t,this.addParametersInIframeHash(t.src,{}))}addParametersInIframeHash(t,e){var i,s,n,a,o,r;const l=(e,i)=>{const s=t.indexOf("#"),n=i?`${e}:${i}`:e;if(-1===s)return`${t}#${n}`;const a=t.substr(0,s);let o=t.substr(s+1);return o=o.replace(new RegExp(e+"(:[^;]+)?;?"),""),`${a}#${n};${o}`};return t=l("sdkPlayerId",""+this.sdkPlayerId),t=l("sdkOrigin",btoa(this.sdkOrigin)),t=l("api"),!0===e.hideControls&&(t=l("hide-controls")),void 0===e.hotKeys||e.hotKeys||(t=l("hotkeys:false")),!0===e.chromeless&&(t=l("chromeless")),!0===e.hidePoster&&(t=l("hide-poster")),!0===e.loop&&(t=l("loop")),!0===e.hideTitle&&(t=l("hide-title")),!0===e.showSubtitles&&(t=l("show-subtitles")),void 0!==e.minimalQuality&&(t=l("min-quality:"+encodeURIComponent(e.minimalQuality))),void 0!==e.maximalQuality&&(t=l("max-quality:"+encodeURIComponent(e.maximalQuality))),(null===(i=e.ads)||void 0===i?void 0:i.adTagUrl)&&(t=l("adTagUrl:"+encodeURIComponent(null===(s=e.ads)||void 0===s?void 0:s.adTagUrl))),isNaN(parseInt(""+(null===(n=e.sequence)||void 0===n?void 0:n.end),10))||isNaN(parseInt(""+(null===(a=e.sequence)||void 0===a?void 0:a.start),10))||(t=l(`t=${null===(o=e.sequence)||void 0===o?void 0:o.start},${null===(r=e.sequence)||void 0===r?void 0:r.end}`)),t}urlParametersFromOptions(t){const e=["id","live","autoplay","muted","metadata","hideControls","hidePoster","chromeless","loop","hideTitle","iframeUrl","token","showSubtitles","ts","avh"],i=t;return i.ts=(new Date).getTime(),t.privateSession&&(i.avh=t.privateSession),Object.keys(t).map(t=>{if(-1!==e.indexOf(t)){if("metadata"===t&&"object"===typeof i[t]){const e=i[t];return Object.keys(e).map(t=>"metadata["+t+"]="+e[t]).join("&")}return t+"="+i[t]}}).join("&")}onEvent(t){const e=Object.assign({},t);switch(delete e.type,delete e.sdkPlayerId,this.userEventListeners.filter(e=>e.event===t.type).forEach(t=>t.callback(e)),t.type){case"ready":this.onVideoReady();break;case"sdkSync":this.onSdkInSync();break}}onSdkInSync(){this.sdkInSync||(this.sdkInSync=!0,this.onceSdkInSyncCallbacks.forEach(t=>{t()}))}onVideoReady(){this.currentVideoReady||(this.currentVideoReady=!0,this.onceVideoReadyCallbacks.forEach(t=>{t()}))}postMessage(t,e,i=!1){return new Promise((s,n)=>{var a;if(!this.playerOrigin||!(null===(a=this.iframe)||void 0===a?void 0:a.contentWindow))return void n();const o=Object.assign(Object.assign({},t),{sdkPlayerId:this.sdkPlayerId}),r=this.makeId(16);this.postMessageCallbacks[r]=t=>{s(t),e&&e(t)},o.callbackId=r,this.currentVideoReady||!i?this.sdkInSync&&this.playerOrigin?this.iframe.contentWindow.postMessage(o,this.playerOrigin):this.onceSdkInSyncCallbacks.push(()=>{var t,e;return this.playerOrigin&&(null===(e=null===(t=this.iframe)||void 0===t?void 0:t.contentWindow)||void 0===e?void 0:e.postMessage(o,this.playerOrigin))}):this.onceVideoReadyCallbacks.push(()=>{var t,e;return this.playerOrigin&&(null===(e=null===(t=this.iframe)||void 0===t?void 0:t.contentWindow)||void 0===e?void 0:e.postMessage(o,this.playerOrigin))})})}makeId(t){const e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",i=e.length;let s="";for(let n=0;n<t;n++)s+=e.charAt(Math.floor(Math.random()*i));return s}createIframe(t){const e=document.createElement("iframe");return e.style.height="100%",e.style.width="100%",e.allowFullscreen=!0,e.allow="autoplay",t.appendChild(e),e}setIframeSrc(t,e){t.src=e}}a.nextSdkPlayerId=1;var o={name:"ApiVideoPlayer",components:{},props:{videoId:String},computed:{},async mounted(){const t=new a("#videoplayer-"+this.videoId,{id:this.videoId,hideTitle:!0});t.showControls(),t.hideControls(["download","subtitles"])}},r=o,l=(i("07d2"),i("2877")),c=Object(l["a"])(r,s,n,!1,null,"b54d226e",null);e["a"]=c.exports},cadc:function(t,e,i){"use strict";var s=i("9b4a"),n=i("1315");
/*!
 * chartjs-adapter-luxon v1.1.0
 * https://www.chartjs.org
 * (c) 2021 chartjs-adapter-luxon Contributors
 * Released under the MIT license
 */
const a={datetime:n["DateTime"].DATETIME_MED_WITH_SECONDS,millisecond:"h:mm:ss.SSS a",second:n["DateTime"].TIME_WITH_SECONDS,minute:n["DateTime"].TIME_SIMPLE,hour:{hour:"numeric"},day:{day:"numeric",month:"short"},week:"DD",month:{month:"short",year:"numeric"},quarter:"'Q'q - yyyy",year:{year:"numeric"}};s["g"]._date.override({_id:"luxon",_create:function(t){return n["DateTime"].fromMillis(t,this.options)},formats:function(){return a},parse:function(t,e){const i=this.options;if(null===t||"undefined"===typeof t)return null;const s=typeof t;return"number"===s?t=this._create(t):"string"===s?t="string"===typeof e?n["DateTime"].fromFormat(t,e,i):n["DateTime"].fromISO(t,i):t instanceof Date?t=n["DateTime"].fromJSDate(t,i):"object"!==s||t instanceof n["DateTime"]||(t=n["DateTime"].fromObject(t)),t.isValid?t.valueOf():null},format:function(t,e){const i=this._create(t);return"string"===typeof e?i.toFormat(e,this.options):i.toLocaleString(e)},add:function(t,e,i){const s={};return s[i]=e,this._create(t).plus(s).valueOf()},diff:function(t,e,i){return this._create(t).diff(this._create(e)).as(i).valueOf()},startOf:function(t,e,i){if("isoWeek"===e){i=Math.trunc(Math.min(Math.max(0,i),6));const e=this._create(t);return e.minus({days:(e.weekday-i+7)%7}).startOf("day").valueOf()}return e?this._create(t).startOf(e).valueOf():t},endOf:function(t,e){return this._create(t).endOf(e).valueOf()}})},ed18:function(t,e,i){"use strict";t.exports=function(t,e,i){i=i||{};const s=i.interpolator||function(t,e){return e[t]},n=t.block.ruler.__find__("html_block");if(n<0||!e)return;const a=Object.getOwnPropertyNames(e),o=[];if(a.length<1)return;for(const _ of a){if("function"!==typeof e[_].render)throw new Error("missing render function for shortcode tag: "+_);e[_].inline&&o.push(_)}const r="([a-zA-Z_:][a-zA-Z0-9:._-]*)",l="(-?(?:\\d*\\.\\d+|\\d+)(?:[eE]-?\\d+)?)",c="('[^']*'|\"[^\"]*\")",h="(#\\{[^}]*\\})",d=new RegExp("\\s+"+r+"(?:\\s*=\\s*(?:"+l+"|"+c+"|"+h+"))?","g"),u=new RegExp(h),p=/^<(\w+)/;function f(t,e){const i=p.exec(t);return i&&e.find(t=>t===i[1])}function g(e){let i=e.tokens;if(e.md.options.html)for(let s=i.length-1;s>=0;s--){const n=i[s];if("html_block"!==n.type)continue;if(!f(n.content,o))continue;let a,r=n.level;const l=[];a=new e.Token("paragraph_open","p",1),a.level=r++,l.push(a),a=new e.Token("inline","",0),a.content=n.content,a.level=r,a.children=[],l.push(a),a=new e.Token("paragraph_close","p",-1),a.level=--r,l.push(a),e.tokens=i=t.utils.arrayReplaceAt(i,s,l)}}o.length>0&&t.core.ruler.after("block","shortcode",g);const m=function(t,e,i,s,n){return n.renderToken(t,e,i)},v={html_block:t.renderer.rules.html_block||m,html_inline:t.renderer.rules.html_inline||m};function b(t,i,n,o,r){const l=t[i].content;let c,h={};while(c=d.exec(l))if(c[4]){let t=c[4].slice(2,-1).trim();h[c[1]]=s(t,o)}else if(c[3]){const t=c[3].slice(1,-1);h[c[1]]=t.replace(u,t=>{const e=t.slice(2,-1);return o[e]})}else c[2]?h[c[1]]=parseFloat(c[2]):h[c[1]]=!0;const p=f(l,a);return p?e[p].render(h,o):v[t[i].type](t,i,n,o,r)}t.renderer.rules.html_block=t.renderer.rules.html_inline=b}},f37c:function(t,e,i){},f74e:function(t,e,i){}}]);
//# sourceMappingURL=chunk-48b0aa0e.51aaa476.js.map