1"use strict";(self["webpackChunksanyue_imghub"]=self["webpackChunksanyue_imghub"]||[]).push([[339],{2893:function(e,t,s){s(85331)},4885:function(e,t,s){s(85331)},5802:function(e,t,s){s(85331),s(38736),s(213),s(85970)},15616:function(e,t,s){s(85331),s(97197)},27339:function(e,t,s){s.r(t),s.d(t,{default:function(){return Gg}});var i=s(56768),n=s(24232);const a={class:"menu-list"},o=["onClick"],l={class:"menu-text"};function r(e,t,s,r,d,c){const h=(0,i.g2)("font-awesome-icon");return(0,i.uX)(),(0,i.CE)("div",{class:(0,n.C4)(["sidebar-container",{"is-collapsed":s.isCollapse}]),ref:"sidebar",style:(0,n.Tr)(c.sidebarStyle)},[(0,i.Lk)("div",a,[((0,i.uX)(!0),(0,i.CE)(i.FK,null,(0,i.pI)(d.menuItems,t=>((0,i.uX)(),(0,i.CE)("div",{key:t.index,class:(0,n.C4)(["menu-item",{"is-active":s.activeIndex===t.index}]),onClick:e=>c.handleSelect(t.index)},[(0,i.bF)(h,{icon:t.icon,class:"menu-icon"},null,8,["icon"]),(0,i.Lk)("span",l,(0,n.v_)(e.$t(t.titleKey)),1)],10,o))),128))]),(0,i.Lk)("div",{class:"toggle-button",onClick:t[0]||(t[0]=(...e)=>c.toggleCollapse&&c.toggleCollapse(...e))},[(0,i.bF)(h,{icon:s.isCollapse?"angle-double-right":"angle-double-left"},null,8,["icon"])])],6)}var d={name:"SysConfigTabs",props:{activeIndex:{type:String,default:"status"},isCollapse:{type:Boolean,default:!1}},data(){return{expandedWidth:null,menuItems:[{index:"status",icon:"chart-bar",titleKey:"sysConfigTabs.systemStatus"},{index:"upload",icon:"cloud-upload",titleKey:"sysConfigTabs.uploadSettings"},{index:"security",icon:"shield",titleKey:"sysConfigTabs.securitySettings"},{index:"page",icon:"pager",titleKey:"sysConfigTabs.pageSettings"},{index:"others",icon:"cog",titleKey:"sysConfigTabs.otherSettings"}]}},computed:{collapsedWidth(){return window.innerWidth<=768?50:56},sidebarStyle(){return this.isCollapse?{width:this.collapsedWidth+"px"}:this.expandedWidth?{width:this.expandedWidth+"px"}:{}}},watch:{"$i18n.locale"(){this.$nextTick(()=>this.measureWidth())}},methods:{toggleCollapse(){this.$emit("update:isCollapse",!this.isCollapse)},checkMobile(){const e=window.innerWidth<=768;this.$emit("update:isCollapse",e)},handleSelect(e){this.$emit("update:activeIndex",e)},measureWidth(){const e=this.$refs.sidebar;if(!e)return;const t=e.style.width,s=e.style.transition,i=e.classList.contains("is-collapsed");e.style.transition="none",i&&e.classList.remove("is-collapsed"),e.style.width="auto",e.offsetWidth;const n=e.scrollWidth;e.style.width=t,i&&e.classList.add("is-collapsed"),e.offsetWidth,e.style.transition=s,this.expandedWidth=n}},mounted(){this.checkMobile(),this.$nextTick(()=>this.measureWidth()),window.addEventListener("resize",this.checkMobile)},beforeDestroy(){window.removeEventListener("resize",this.checkMobile)}},c=s(71241);const h=(0,c.A)(d,[["render",r],["__scopeId","data-v-5cddfe48"]]);var u=h,p=s(54880),g=(s(85331),s(77128),s(78507)),f=(s(213),s(91570));const m={class:"container"},b={class:"header-content admin-header-content"},y={class:"header-action"};function x(e,t,s,a,o,l){const r=f.A,d=(0,i.g2)("font-awesome-icon"),c=g.R7,h=p.bZ,x=u;return(0,i.uX)(),(0,i.CE)("div",m,[(0,i.bF)(h,null,{default:(0,i.k6)(()=>[(0,i.Lk)("div",b,[(0,i.bF)(r,{activeTab:"systemConfig"}),(0,i.Lk)("div",y,[(0,i.bF)(c,{disabled:l.disableTooltip,content:e.$t("sysConfig.logout"),placement:"bottom"},{default:(0,i.k6)(()=>[(0,i.bF)(d,{icon:"sign-out-alt",class:"header-icon",onClick:l.handleLogout},null,8,["onClick"])]),_:1},8,["disabled","content"])])])]),_:1}),(0,i.bF)(x,{activeIndex:o.activeIndex,"onUpdate:activeIndex":t[0]||(t[0]=e=>o.activeIndex=e),isCollapse:o.isSidebarCollapse,"onUpdate:isCollapse":t[1]||(t[1]=e=>o.isSidebarCollapse=e)},null,8,["activeIndex","isCollapse"]),((0,i.uX)(),(0,i.Wv)((0,i.$y)(l.currentComponent),{class:(0,n.C4)(["main-container",{collapsed:o.isSidebarCollapse}])},null,8,["class"]))])}s(44114);var v=s(99114),k=(s(30694),s(57009)),_=(s(78450),s(69655)),w=(s(2893),s(9267)),C=(s(15616),s(45130));const S={class:"date-range-calendar"},F={class:"selected-range"},T={class:"selected-range-inputs"},M=["aria-label"],P={class:"date-range-separator"},D=["aria-label"],A={class:"calendar-header"},$=["aria-label"],V={class:"calendar-title"},L=["aria-label"],E={class:"calendar-weekdays"},U={class:"calendar-grid"},I=["onClick"];function O(e,t,s,a,o,l){const r=(0,i.g2)("font-awesome-icon");return(0,i.uX)(),(0,i.CE)("div",S,[(0,i.Lk)("div",F,[(0,i.Lk)("div",T,[(0,i.bo)((0,i.Lk)("input",{"onUpdate:modelValue":t[0]||(t[0]=e=>o.inputStart=e),class:"date-input",type:"text",inputmode:"numeric","aria-label":l.startDateLabel,onChange:t[1]||(t[1]=(...e)=>l.handleManualInput&&l.handleManualInput(...e))},null,40,M),[[C.Jo,o.inputStart,void 0,{trim:!0}]]),(0,i.Lk)("span",P,(0,n.v_)(l.rangeSeparator),1),(0,i.bo)((0,i.Lk)("input",{"onUpdate:modelValue":t[2]||(t[2]=e=>o.inputEnd=e),class:"date-input",type:"text",inputmode:"numeric","aria-label":l.endDateLabel,onChange:t[3]||(t[3]=(...e)=>l.handleManualInput&&l.handleManualInput(...e))},null,40,D),[[C.Jo,o.inputEnd,void 0,{trim:!0}]])])]),(0,i.Lk)("div",A,[(0,i.Lk)("button",{type:"button",class:"calendar-nav","aria-label":l.previousMonthLabel,onClick:t[4]||(t[4]=(...e)=>l.goToPreviousMonth&&l.goToPreviousMonth(...e))},[(0,i.bF)(r,{icon:"chevron-left"}
1)],8,$),(0,i.Lk)("div",V,(0,n.v_)(l.monthTitle),1),(0,i.Lk)("button",{type:"button",class:"calendar-nav","aria-label":l.nextMonthLabel,onClick:t[5]||(t[5]=(...e)=>l.goToNextMonth&&l.goToNextMonth(...e))},[(0,i.bF)(r,{icon:"chevron-right"})],8,L)]),(0,i.Lk)("div",E,[((0,i.uX)(!0),(0,i.CE)(i.FK,null,(0,i.pI)(l.weekdayLabels,e=>((0,i.uX)(),(0,i.CE)("span",{key:e},(0,n.v_)(e),1))),128))]),(0,i.Lk)("div",U,[((0,i.uX)(!0),(0,i.CE)(i.FK,null,(0,i.pI)(l.calendarDays,e=>((0,i.uX)(),(0,i.CE)("button",{key:e.key,type:"button",class:(0,n.C4)(["calendar-day",{"is-muted":!e.isCurrentMonth,"is-today":e.isToday,"is-range-start":e.key===o.draftStart,"is-range-end":e.key===o.draftEnd,"is-in-range":l.isInRange(e.key)}]),onClick:t=>l.selectDay(e.key)},(0,n.v_)(e.dayOfMonth),11,I))),128))])])}const R=864e5;function W(e){return String(e).padStart(2,"0")}function B(e){return`${e.getFullYear()}-${W(e.getMonth()+1)}-${W(e.getDate())}`}function z(e){if("string"!==typeof e)return null;const t=e.trim().match(/^(\d{4})[-/](\d{1,2})[-/](\d{1,2})$/);if(!t)return null;const s=Number(t[1]),i=Number(t[2])-1,n=Number(t[3]),a=new Date(s,i,n);return a.getFullYear()!==s||a.getMonth()!==i||a.getDate()!==n?null:(a.setHours(0,0,0,0),a)}function N(e,t){return new Date(e.getFullYear(),e.getMonth()+t,1)}var j={name:"DateRangeCalendar",props:{modelValue:{type:Array,default:()=>[]}},emits:["update:modelValue","change"],data(){const e=new Date;return e.setHours(0,0,0,0),{displayYear:e.getFullYear(),displayMonth:e.getMonth(),draftStart:"",draftEnd:"",inputStart:"",inputEnd:"",awaitingEnd:!1}},computed:{previousMonthLabel(){return this.$t("dateRangeCalendar.previousMonth")},nextMonthLabel(){return this.$t("dateRangeCalendar.nextMonth")},startDateLabel(){return this.$t("dateRangeCalendar.startDate")},endDateLabel(){return this.$t("dateRangeCalendar.endDate")},rangeSeparator(){return this.$t("dateRangeCalendar.rangeSeparator")},monthTitle(){return this.$t("dateRangeCalendar.monthTitle",{year:this.displayYear,month:W(this.displayMonth+1)})},weekdayLabels(){return[this.$t("dateRangeCalendar.weekdaySun"),this.$t("dateRangeCalendar.weekdayMon"),this.$t("dateRangeCalendar.weekdayTue"),this.$t("dateRangeCalendar.weekdayWed"),this.$t("dateRangeCalendar.weekdayThu"),this.$t("dateRangeCalendar.weekdayFri"),this.$t("dateRangeCalendar.weekdaySat")]},calendarDays(){const e=new Date(this.displayYear,this.displayMonth,1),t=new Date(this.displayYear,this.displayMonth,1-e.getDay()),s=B(new Date);return Array.from({length:42},(e,i)=>{const n=new Date(t.getTime()+i*R),a=B(n);return{key:a,dayOfMonth:n.getDate(),isCurrentMonth:n.getMonth()===this.displayMonth,isToday:a===s}})}},watch:{modelValue:{immediate:!0,handler(e){this.syncFromModel(e)}}},methods:{syncFromModel(e){const t=z(e?.[0]),s=z(e?.[1]);this.draftStart=t?B(t):"",this.draftEnd=s?B(s):"",this.inputStart=this.draftStart,this.inputEnd=this.draftEnd,this.awaitingEnd=!1;const i=t||s;i&&(this.displayYear=i.getFullYear(),this.displayMonth=i.getMonth())},goToPreviousMonth(){const e=N(new Date(this.displayYear,this.displayMonth,1),-1);this.displayYear=e.getFullYear(),this.displayMonth=e.getMonth()},goToNextMonth(){const e=N(new Date(this.displayYear,this.displayMonth,1),1);this.displayYear=e.getFullYear(),this.displayMonth=e.getMonth()},selectDay(e){if(!this.draftStart||this.draftEnd||!this.awaitingEnd)return this.draftStart=e,this.draftEnd="",this.inputStart=e,this.inputEnd="",void(this.awaitingEnd=!0);const t=e<this.draftStart?[e,this.draftStart]:[this.draftStart,e];this.draftStart=t[0],this.draftEnd=t[1],this.inputStart=t[0],this.inputEnd=t[1],this.awaitingEnd=!1,this.commitRange(t)},handleManualInput(){const e=z(this.inputStart),t=z(this.inputEnd);if(!e||!t)return;const s=B(e),i=B(t),n=s<=i?[s,i]:[i,s];this.draftStart=n[0],this.draftEnd=n[1],this.inputStart=n[0],this.inputEnd=n[1],this.awaitingEnd=!1,this.displayYear=e.getFullYear(),this.displayMonth=e.getMonth(),this.commitRange(n)},commitRange(e){this.$emit("update:modelValue",e),this.$emit("change",e)},isInRange(e){return Boolean(this.draftStart&&this.draftEnd&&e>this.draftStart&&e<this.draftEnd)}}};const q=(0,c.A)(j,[["render",O],["__scopeId","data-v-5fbe496c"]]);var H=q,X=s(66810),K=(s(34396),s(80047));s(99648);const Q={class:"status-panel"},Y={class:"overview-cards"},G={class:"card-icon"},J={class:"card-content"},Z={class:"card-title"},ee={class:"card-value"},te={class:"card-subtitle"},se={class:"overview-card index-status"},ie={class:"card-icon"},ne={class:"card-content"},ae={class:"card-title"},oe={class:"card-value"},le={class:"card-subtitle"},re={class:"card-icon"},de={class:"card-content"},ce={class:"card-title"},he={class:"card-value"},ue={class:"card-subtitle"},pe={class:"charts-section"},ge={class:"chart-card trend-chart-card"},fe={class:"chart-header trend-chart-header"},me={class:"chart-title"},be={class:"trend-controls"},ye={class:"trend-date-panel"},xe={class:"chart-content trend-chart-content"},ve={key:0,class:"empty-state trend-empty-state"},ke={key:1,class:"line-chart-wrapper"},_e={class:"chart-card"},we={class:"chart-header"},Ce={class:"chart-content"},Se={key:0,class:"empty-state"},Fe={key:1,class:"pie-chart-container"},Te={class:"pie-chart-wrapper"},Me={class:"chart-center-text"},Pe={class:"center-value"},De={class:"center-label"},Ae={class:"chart-legend"},$e={class:"legend-label"},Ve={class:"legend-value"},Le={class:"legend-percent"},Ee={class:"chart-card"},Ue={class:"chart-header"},Ie={class:"chart-content"},Oe={key:0,class:"empty-state"},Re={key:1,class:"pie-chart-container"},We={class:"pie-chart-wrapper"},Be={class:"chart-center-text"},ze={class:"center-value"},Ne={class:"center-label"},je={class:"chart-legend"},qe={class:"legend-label"},He={class:"legend-value"},Xe={class:"legend-percent"},Ke={class:"actions-section"},Qe={class:"action-card"},Ye={class:"action-header"},Ge={class:"action-content"},Je={key:0,class:"progress-container"},Ze={class:"progress-header"},et={class:"progress-phase"},tt={class:"progress-percentage"}
1,st={class:"progress-details"},it={key:0,class:"progress-count"},nt={key:1,class:"progress-time"},at={key:0,class:"progress-message"},ot={key:1,class:"error-container"},lt={class:"error-icon"},rt={class:"error-content"},dt={class:"error-message"},ct={key:0,class:"error-suggestion"},ht={class:"error-actions"},ut={key:2,class:"action-buttons"},pt={class:"restore-section"},gt={key:0,class:"file-info-section"},ft=["src"],mt={key:2,class:"card-bg-fallback"},bt={class:"file-card-header"},yt={class:"info-card-footer"},xt={class:"file-name"},vt={class:"file-meta"},kt=["src"],_t={key:2,class:"card-bg-fallback"},wt={class:"file-card-header warning"},Ct={class:"info-card-footer"},St={class:"file-name"},Ft={class:"file-meta"};function Tt(e,t,s,a,o,l){const r=(0,i.g2)("font-awesome-icon"),d=K.S2,c=X.Zh,h=X.MQ,u=H,p=w.kZ,f=(0,i.g2)("Line"),m=(0,i.g2)("Doughnut"),b=_.ve,y=g.R7,x=k.Zq,C=v.A;return(0,i.bo)(((0,i.uX)(),(0,i.CE)("div",Q,[(0,i.Lk)("div",Y,[(0,i.Lk)("div",{class:"overview-card total-files",onClick:t[0]||(t[0]=(...e)=>l.fetchIndexInfo&&l.fetchIndexInfo(...e))},[(0,i.Lk)("div",G,[(0,i.bF)(r,{icon:"database"})]),(0,i.Lk)("div",J,[(0,i.Lk)("div",Z,(0,n.v_)(e.$t("sysStatus.totalFiles")),1),(0,i.Lk)("div",ee,(0,n.v_)(o.indexInfo.totalFiles?.toLocaleString()||"0"),1),(0,i.Lk)("div",te,(0,n.v_)(e.$t("sysStatus.clickToRefresh")),1)])]),(0,i.Lk)("div",se,[(0,i.Lk)("div",ie,[(0,i.bF)(r,{icon:"clock"})]),(0,i.Lk)("div",ne,[(0,i.Lk)("div",ae,(0,n.v_)(e.$t("sysStatus.indexUpdateTime")),1),(0,i.Lk)("div",oe,(0,n.v_)(l.formatTime(o.indexInfo.lastUpdated)),1),(0,i.Lk)("div",le,(0,n.v_)(l.getTimeAgo(o.indexInfo.lastUpdated)),1)])]),(0,i.Lk)("div",{class:"overview-card system-version",onClick:t[1]||(t[1]=(...e)=>l.openReleases&&l.openReleases(...e))},[(0,i.Lk)("div",re,[(0,i.bF)(r,{icon:"code-branch"})]),(0,i.Lk)("div",de,[(0,i.Lk)("div",ce,(0,n.v_)(e.$t("sysStatus.systemVersion")),1),(0,i.Lk)("div",he,"v"+(0,n.v_)(o.version),1),(0,i.Lk)("div",ue,(0,n.v_)(e.$t("sysStatus.clickToViewChangelog")),1)])])]),(0,i.Lk)("div",pe,[(0,i.Lk)("div",ge,[(0,i.Lk)("div",fe,[(0,i.Lk)("div",me,[(0,i.bF)(r,{icon:"chart-line"}),(0,i.Lk)("span",null,(0,n.v_)(e.$t("sysStatus.uploadTrend")),1),(0,i.bF)(d,{class:"trend-calendar-btn",circle:"","aria-label":e.$t("sysStatus.selectDateRange"),onClick:l.openTrendDateDialog},{default:(0,i.k6)(()=>[(0,i.bF)(r,{icon:"calendar"})]),_:1},8,["aria-label","onClick"])]),(0,i.Lk)("div",be,[(0,i.bF)(h,{modelValue:o.trendGroupBy,"onUpdate:modelValue":t[2]||(t[2]=e=>o.trendGroupBy=e),size:"small",class:"trend-group-switch","aria-label":e.$t("sysStatus.uploadTrendGroupBy")},{default:(0,i.k6)(()=>[(0,i.bF)(c,{label:"channel"},{default:(0,i.k6)(()=>[(0,i.eW)((0,n.v_)(e.$t("sysStatus.byChannelType")),1)]),_:1}),(0,i.bF)(c,{label:"channelName"},{default:(0,i.k6)(()=>[(0,i.eW)((0,n.v_)(e.$t("sysStatus.byChannelName")),1)]),_:1})]),_:1},8,["modelValue","aria-label"])])]),(0,i.bF)(p,{modelValue:o.trendDatePickerVisible,"onUpdate:modelValue":t[4]||(t[4]=e=>o.trendDatePickerVisible=e),title:e.$t("sysStatus.selectDateRange"),width:l.trendDateDialogWidth,class:"trend-date-dialog","align-center":"","append-to-body":""},{default:(0,i.k6)(()=>[(0,i.Lk)("div",ye,[(0,i.bF)(u,{modelValue:o.trendDateRange,"onUpdate:modelValue":t[3]||(t[3]=e=>o.trendDateRange=e),onChange:l.handleTrendDateRangeChange},null,8,["modelValue","onChange"])])]),_:1},8,["modelValue","title","width"]),(0,i.Lk)("div",xe,[l.hasTrendData?((0,i.uX)(),(0,i.CE)("div",ke,[(0,i.bF)(f,{data:l.uploadTrendChartData,options:l.lineChartOptions},null,8,["data","options"])])):((0,i.uX)(),(0,i.CE)("div",ve,[(0,i.bF)(r,{icon:"inbox"}),(0,i.Lk)("span",null,(0,n.v_)(e.$t("sysStatus.noData")),1)]))])]),(0,i.Lk)("div",_e,[(0,i.Lk)("div",we,[(0,i.bF)(r,{icon:"share-alt"}),(0,i.Lk)("span",null,(0,n.v_)(e.$t("sysStatus.channelDistribution")),1)]),(0,i.Lk)("div",Ce,[0===Object.keys(o.indexInfo.channelStats||{}).length?((0,i.uX)(),(0,i.CE)("div",Se,[(0,i.bF)(r,{icon:"inbox"}),(0,i.Lk)("span",null,(0,n.v_)(e.$t("sysStatus.noData")),1)])):((0,i.uX)(),(0,i.CE)("div",Fe,[(0,i.Lk)("div",Te,[(0,i.bF)(m,{data:l.channelChartData,options:l.chartOptions},null,8,["data","options"]),(0,i.Lk)("div",Me,[(0,i.Lk)("div",Pe,(0,n.v_)(o.indexInfo.totalFiles?.toLocaleStr
1ing()||"0"),1),(0,i.Lk)("div",De,(0,n.v_)(e.$t("sysStatus.totalFilesLabel")),1)])]),(0,i.Lk)("div",Ae,[((0,i.uX)(!0),(0,i.CE)(i.FK,null,(0,i.pI)(o.indexInfo.channelStats,(e,t,s)=>((0,i.uX)(),(0,i.CE)("div",{key:t,class:"legend-item"},[(0,i.Lk)("span",{class:"legend-color",style:(0,n.Tr)({background:l.getChartColor(s)})},null,4),(0,i.Lk)("span",$e,(0,n.v_)(t),1),(0,i.Lk)("span",Ve,(0,n.v_)(e.toLocaleString()),1),(0,i.Lk)("span",Le,(0,n.v_)(l.getPercentage(e,o.indexInfo.totalFiles))+"%",1)]))),128))])]))])]),(0,i.Lk)("div",Ee,[(0,i.Lk)("div",Ue,[(0,i.bF)(r,{icon:"file-alt"}),(0,i.Lk)("span",null,(0,n.v_)(e.$t("sysStatus.fileStatusDistribution")),1)]),(0,i.Lk)("div",Ie,[0===Object.keys(o.indexInfo.typeStats||{}).length?((0,i.uX)(),(0,i.CE)("div",Oe,[(0,i.bF)(r,{icon:"inbox"}),(0,i.Lk)("span",null,(0,n.v_)(e.$t("sysStatus.noData")),1)])):((0,i.uX)(),(0,i.CE)("div",Re,[(0,i.Lk)("div",We,[(0,i.bF)(m,{data:l.typeChartData,options:l.chartOptions},null,8,["data","options"]),(0,i.Lk)("div",Be,[(0,i.Lk)("div",ze,(0,n.v_)(Object.keys(o.indexInfo.typeStats).length),1),(0,i.Lk)("div",Ne,(0,n.v_)(e.$t("sysStatus.statusTypes")),1)])]),(0,i.Lk)("div",je,[((0,i.uX)(!0),(0,i.CE)(i.FK,null,(0,i.pI)(l.aggregatedTypeStats,(e,t,s)=>((0,i.uX)(),(0,i.CE)("div",{key:t,class:"legend-item"},[(0,i.Lk)("span",{class:"legend-color",style:(0,n.Tr)({background:l.getTypeChartColor(s)})},null,4),(0,i.Lk)("span",qe,(0,n.v_)(t),1),(0,i.Lk)("span",He,(0,n.v_)(e.toLocaleString()),1),(0,i.Lk)("span",Xe,(0,n.v_)(l.getPercentage(e,o.indexInfo.totalFiles))+"%",1)]))),128))])]))])])]),(0,i.Lk)("div",Ke,[(0,i.Lk)("div",Qe,[(0,i.Lk)("div",Ye,[(0,i.bF)(r,{icon:"tools"}),(0,i.Lk)("span",null,(0,n.v_)(e.$t("sysStatus.systemMaintenance")),1)]),(0,i.Lk)("div",Ge,[o.isProcessing?((0,i.uX)(),(0,i.CE)("div",Je,[(0,i.Lk)("div",Ze,[(0,i.Lk)("span",et,(0,n.v_)(l.phaseDescription),1),(0,i.Lk)("span",tt,(0,n.v_)(Math.round(o.processingProgress.percentage))+"%",1)]),(0,i.bF)(b,{percentage:o.processingProgress.percentage,"stroke-width":12,"show-text":!1,class:"progress-bar"},null,8,["percentage"]),(0,i.Lk)("div",st,[o.processingProgress.current>0?((0,i.uX)(),(0,i.CE)("span",it,[(0,i.bF)(r,{icon:"file-alt"}),(0,i.eW)(" "+(0,n.v_)(o.processingProgress.current.toLocaleString())+" ",1),o.processingProgress.total>0?((0,i.uX)(),(0,i.CE)(i.FK,{key:0},[(0,i.eW)(" / "+(0,n.v_)(o.processingProgress.total.toLocaleString()),1)],64)):(0,i.Q3)("",!0),(0,i.eW)(" "+(0,n.v_)(e.$t("sysStatus.records")),1)])):(0,i.Q3)("",!0),l.estimatedTimeRemaining?((0,i.uX)(),(0,i.CE)("span",nt,[(0,i.bF)(r,{icon:"clock"}),(0,i.eW)(" "+(0,n.v_)(l.estimatedTimeRemaining),1)])):(0,i.Q3)("",!0)]),o.processingProgress.message?((0,i.uX)(),(0,i.CE)("div",at,(0,n.v_)(o.processingProgress.message),1)):(0,i.Q3)("",!0),(0,i.bF)(d,{type:"danger",plain:"",size:"small",onClick:l.cancelOperation,class:"cancel-btn"},{default:(0,i.k6)(()=>[(0,i.bF)(r,{icon:"times"}),(0,i.eW)(" "+(0,n.v_)(e.$t("sysStatus.cancelOperation")),1)]),_:1},8,["onClick"])])):o.processingError?((0,i.uX)(),(0,i.CE)("div",ot,[(0,i.Lk)("div",lt,[(0,i.bF)(r,{icon:"exclamation-triangle"})]),(0,i.Lk)("div",rt,[(0,i.Lk)("div",dt,(0,n.v_)(o.processingError.message),1),o.processingError.suggestion?((0,i.uX)(),(0,i.CE)("div",ct,(0,n.v_)(o.processingError.suggestion),1)):(0,i.Q3)("",!0)]),(0,i.Lk)("div",ht,[o.processingError.recoverable?((0,i.uX)(),(0,i.Wv)(d,{key:0,type:"primary",size:"small",onClick:l.retryOperation},{default:(0,i.k6)(()=>[(0,i.bF)(r,{icon:"redo"}),(0,i.eW)(" "+(0,n.v_)(e.$t("sysStatus.retry")),1)]),_:1},8,["onClick"])):(0,i.Q3)("",!0),(0,i.bF)(d,{type:"default",size:"small",onClick:l.dismissError},{default:(0,i.k6)(()=>[(0,i.eW)((0,n.v_)(e.$t("sysStatus.close")),1)]),_:1},8,["onClick"])])])):((0,i.uX)(),(0,i.CE)("div",ut,[(0,i.bF)(y,{content:e.$t("sysStatus.rebuildTooltip"),placement:"top"},{default:(0,i.k6)(()=>[(0,i.bF)(d,{type:"primary",loading:o.rebuilding,disabled:o.isProcessing,onClick:l.rebuildIndex,class:"action-btn rebuild-btn"},{default:(0,i.k6)(()=>[(0,i.bF)(r,{icon:"sync-alt"}),(0,i.eW)(" "+(0,n.v_)(o.rebuilding?e.$t("sysStatus.rebuilding"):e.$t("sysStatus.rebuildIndex")),1
1)]),_:1},8,["loading","disabled","onClick"])]),_:1},8,["content"]),(0,i.bF)(y,{content:e.$t("sysStatus.backupTooltip"),placement:"top"},{default:(0,i.k6)(()=>[(0,i.bF)(d,{type:"success",loading:o.backing,disabled:o.isProcessing,onClick:l.backupData,class:"action-btn backup-btn"},{default:(0,i.k6)(()=>[(0,i.bF)(r,{icon:"download"}),(0,i.eW)(" "+(0,n.v_)(o.backing?e.$t("sysStatus.backingUp"):e.$t("sysStatus.backupData")),1)]),_:1},8,["loading","disabled","onClick"])]),_:1},8,["content"]),(0,i.bF)(y,{content:e.$t("sysStatus.restoreTooltip"),placement:"top"},{default:(0,i.k6)(()=>[(0,i.Lk)("div",pt,[(0,i.Lk)("input",{type:"file",ref:"fileInput",accept:".json",onChange:t[5]||(t[5]=(...e)=>l.handleFileSelect&&l.handleFileSelect(...e)),style:{display:"none"}},null,544),(0,i.bF)(d,{type:"warning",loading:o.restoring,disabled:o.isProcessing,onClick:l.selectRestoreFile,class:"action-btn restore-btn"},{default:(0,i.k6)(()=>[(0,i.bF)(r,{icon:"upload"}),(0,i.eW)(" "+(0,n.v_)(o.restoring?e.$t("sysStatus.restoring"):e.$t("sysStatus.restoreData")),1)]),_:1},8,["loading","disabled","onClick"])])]),_:1},8,["content"])]))])])]),o.indexInfo.newestFile||o.indexInfo.oldestFile?((0,i.uX)(),(0,i.CE)("div",gt,[o.indexInfo.newestFile?((0,i.uX)(),(0,i.CE)("div",{key:0,class:"file-info-card info-card-newest",onClick:t[8]||(t[8]=e=>l.openFileInNewTab(o.indexInfo.newestFile))},[l.isImageFile(o.indexInfo.newestFile)&&!o.loadErrors["newest"]?((0,i.uX)(),(0,i.Wv)(x,{key:0,src:"/file/"+o.indexInfo.newestFile.id+"?from=admin",fit:"cover",class:"card-bg-media",onError:t[6]||(t[6]=e=>l.handleImageError("newest"))},null,8,["src"])):l.isVideoFile(o.indexInfo.newestFile)&&!o.loadErrors["newest"]?((0,i.uX)(),(0,i.CE)("video",{key:1,src:"/file/"+o.indexInfo.newestFile.id+"?from=admin",class:"card-bg-media",muted:"",loop:"",autoplay:"",onError:t[7]||(t[7]=e=>l.handleImageError("newest"))},null,40,ft)):((0,i.uX)(),(0,i.CE)("div",mt,[(0,i.bF)(r,{icon:"file-alt",class:"fallback-icon"})])),(0,i.Lk)("div",bt,[(0,i.bF)(r,{icon:"arrow-up"}),(0,i.Lk)("span",null,(0,n.v_)(e.$t("sysStatus.latestUpload")),1)]),(0,i.Lk)("div",yt,[(0,i.Lk)("div",xt,(0,n.v_)(o.indexInfo.newestFile.metadata?.FileName||o.indexInfo.newestFile.id),1),(0,i.Lk)("div",vt,(0,n.v_)(l.formatTime(o.indexInfo.newestFile.metadata?.TimeStamp)),1)])])):(0,i.Q3)("",!0),o.indexInfo.oldestFile?((0,i.uX)(),(0,i.CE)("div",{key:1,class:"file-info-card info-card-oldest",onClick:t[11]||(t[11]=e=>l.openFileInNewTab(o.indexInfo.oldestFile))},[l.isImageFile(o.indexInfo.oldestFile)&&!o.loadErrors["oldest"]?((0,i.uX)(),(0,i.Wv)(x,{key:0,src:"/file/"+o.indexInfo.oldestFile.id+"?from=admin",fit:"cover",class:"card-bg-media",onError:t[9]||(t[9]=e=>l.handleImageError("oldest"))},null,8,["src"])):l.isVideoFile(o.indexInfo.oldestFile)&&!o.loadErrors["oldest"]?((0,i.uX)(),(0,i.CE)("video",{key:1,src:"/file/"+o.indexInfo.oldestFile.id+"?from=admin",class:"card-bg-media",muted:"",loop:"",autoplay:"",onError:t[10]||(t[10]=e=>l.handleImageError("oldest"))},null,40,kt)):((0,i.uX)(),(0,i.CE)("div",_t,[(0,i.bF)(r,{icon:"file-alt",class:"fallback-icon"})])),(0,i.Lk)("div",wt,[(0,i.bF)(r,{icon:"arrow-down"}),(0,i.Lk)("span",null,(0,n.v_)(e.$t("sysStatus.earliestUpload")),1)]),(0,i.Lk)("div",Ct,[(0,i.Lk)("div",St,(0,n.v_)(o.indexInfo.oldestFile.metadata?.FileName||o.indexInfo.oldestFile.id),1),(0,i.Lk)("div",Ft,(0,n.v_)(l.formatTime(o.indexInfo.oldestFile.metadata?.TimeStamp)),1)])])):(0,i.Q3)("",!0)])):(0,i.Q3)("",!0)])),[[C,o.loading]])}s(18111),s(7588),s(61701),s(18237),s(17642),s(58004),s(33853),s(45876),s(32475),s(15024),s(31698);var Mt=s(70797),Pt={rE:"2.7.5"},Dt=(s(20116),s(91114));s(22489),s(13579); 2/*! 3 * @kurkle/color v0.3.4 4 * https://github.com/kurkle/color#readme 5 * (c) 2024 Jukka Kurkela 6 * Released under the MIT License 7 */ 8function At(e){return e+.5|0}const $t=(e,t,s)=>Math.max(Math.min(e,s),t);function Vt(e){return $t(At(2.55*e),0,255)}function Lt(e){return $t(At(255*e),0,255)}function Et(e){return $t(At(e/2.55)/100,0,1)}function Ut(e){return $t(At(100*e),0,100)}const It={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},Ot=[..."0123456789ABCDEF"],Rt=e=>Ot[15&e],Wt=e=>Ot[(240&e)>>4]+Ot[15&e],Bt=e=>(240&e)>>4===(15&e),zt=e=>Bt(e.r)&&Bt(e.g)&&Bt(e.b)&&Bt(e.a);function Nt(e){var t,s=e.length;return"#"===e[0]&&(4===s||5===s?t={r:255&17*It[e[1]],g:255&17*It[e[2]],b:255&17*It[e[3]],a:5===s?17*It[e[4]]:255}:7!==s&&9!==s||(t={r:It[e[1]]<<4|It[e[2]],g:It[e[3]]<<4|It[e[4]],b:It[e[5]]<<4|It[e[6]],a:9===s?It[e[7]]<<4|It[e[8]]:255})),t}const jt=(e,t)=>
vendor: 9,884 bytes, lines 8-15
8e<255?t(e):"";function qt(e){var t=zt(e)?Rt:Wt;return e?"#"+t(e.r)+t(e.g)+t(e.b)+jt(e.a,t):void 0}const Ht=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function Xt(e,t,s){const i=t*Math.min(s,1-s),n=(t,n=(t+e/30)%12)=>s-i*Math.max(Math.min(n-3,9-n,1),-1);return[n(0),n(8),n(4)]}function Kt(e,t,s){const i=(i,n=(i+e/60)%6)=>s-s*t*Math.max(Math.min(n,4-n,1),0);return[i(5),i(3),i(1)]}function Qt(e,t,s){const i=Xt(e,1,.5);let n;for(t+s>1&&(n=1/(t+s),t*=n,s*=n),n=0;n<3;n++)i[n]*=1-t-s,i[n]+=t;return i}function Yt(e,t,s,i,n){return e===n?(t-s)/i+(t<s?6:0):t===n?(s-e)/i+2:(e-t)/i+4}function Gt(e){const t=255,s=e.r/t,i=e.g/t,n=e.b/t,a=Math.max(s,i,n),o=Math.min(s,i,n),l=(a+o)/2;let r,d,c;return a!==o&&(c=a-o,d=l>.5?c/(2-a-o):c/(a+o),r=Yt(s,i,n,c,a),r=60*r+.5),[0|r,d||0,l]}function Jt(e,t,s,i){return(Array.isArray(t)?e(t[0],t[1],t[2]):e(t,s,i)).map(Lt)}function Zt(e,t,s){return Jt(Xt,e,t,s)}function es(e,t,s){return Jt(Qt,e,t,s)}function ts(e,t,s){return Jt(Kt,e,t,s)}function ss(e){return(e%360+360)%360}function is(e){const t=Ht.exec(e);let s,i=255;if(!t)return;t[5]!==s&&(i=t[6]?Vt(+t[5]):Lt(+t[5]));const n=ss(+t[2]),a=+t[3]/100,o=+t[4]/100;return s="hwb"===t[1]?es(n,a,o):"hsv"===t[1]?ts(n,a,o):Zt(n,a,o),{r:s[0],g:s[1],b:s[2],a:i}}function ns(e,t){var s=Gt(e);s[0]=ss(s[0]+t),s=Zt(s),e.r=s[0],e.g=s[1],e.b=s[2]}function as(e){if(!e)return;const t=Gt(e),s=t[0],i=Ut(t[1]),n=Ut(t[2]);return e.a<255?`hsla(${s}, ${i}%, ${n}%, ${Et(e.a)})`:`hsl(${s}, ${i}%, ${n}%)`}const os={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"},ls={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 rs(){const e={},t=Object.keys(ls),s=Object.keys(os);let i,n,a,o,l;for(i=0;i<t.length;i++){for(o=l=t[i],n=0;n<s.length;n++)a=s[n],l=l.replace(a,os[a]);a=parseInt(ls[o],16),e[l]=[a>>16&255,a>>8&255,255&a]}return e}let ds;function cs(e){ds||(ds=rs(),ds.transparent=[0,0,0,0]);const t=ds[e.toLowerCase()];return t&&{r:t[0],g:t[1],b:t[2],a:4===t.length?t[3]:255}}const hs=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;function us(e){const t=hs.exec(e);let s,i,n,a=255;if(t){if(t[7]!==s){const e=+t[7];a=t[8]?Vt(e):$t(255*e,0,255)}return s=+t[1],i=+t[3],n=+t[5],s=255&(t[2]?Vt(s):$t(s,0,255)),i=255&(t[4]?Vt(i):$t(i,0,255)),n=255&(t[6]?Vt(n):$t(n,0,255)),{r:s,g:i,b:n,a:a}}}function ps(e){return e&&(e.a<255?`rgba(${e.r}, ${e.g}, ${e.b}, ${Et(e.a)})`:`rgb(${e.r}, ${e.g}, ${e.b})`)}const gs=e=>e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055,fs=e=>e<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4);function ms(e,t,s){const i=fs(Et(e.r)),n=fs(Et(e.g)),a=fs(Et(e.b));return{r:Lt(gs(i+s*(fs(Et(t.r))-i))),g:Lt(gs(n+s*(fs(Et(t.g))-n))),b:Lt(gs(a+s*(fs(Et(t.b))-a))),a:e.a+s*(t.a-e.a)}}function bs(e,t,s){if(e){let i=Gt(e);i[t]=Math.max(0,Math.min(i[t]+i[t]*s,0===t?360:1)),i=Zt(i),e.r=i[0],e.g=i[1],e.b=i[2]}}function ys(e,t){return e?Object.assign(t||{},e):e}function xs(e){var t={r:0,g:0,b:0,a:255};return Array.isArray(e)?e.length>=3&&(t={r:e[0],g:e[1],b:e[2],a:255},e.length>3&&(t.a=Lt(e[3]))):(t=ys(e,{r:0,g:0,b:0,a:1}),t.a=Lt(t.a)),t}function vs(e){return"r"===e.charAt(0)?us(e):is(e)}class ks{constructor(e){if(e instanceof ks)return e;const t=typeof e;let s;"object"===t?s=xs(e):"string"===t&&(s=Nt(e)||cs(e)||vs(e)),this._rgb=s,this._valid=!!s}get valid(){return this._valid}get rgb(){var e=ys(this._rgb);return e&&(e.a=Et(e.a)),e}set rgb(e){this._rgb=xs(e)}rgbString(){return this._valid?ps(this._rgb):void 0}hexString(){return this._valid?qt(this._rgb):void 0}hslString(){return this._valid?as(this._rgb):void 0}mix(e,t){if(e){const s=this.rgb,i=e.rgb;let n;const a=t===n?.5:t,o=2*a-1,l=s.a-i.a,r=((o*l===-1?o:(o+l)/(1+o*l))+1)/2;n=1-r,s.r=255&r*s.r+n*i.r+.5,s.g=255&r*s.g+n*i.g+.5,s.b=255&r*s.b+n*i.b+.5,s.a=a*s.a+(1-a)*i.a,this.rgb=s}return this}interpolate(e,t){return e&&(this._rgb=ms(this._rgb,e._rgb,t)),this}clone(){return new ks(this.rgb)}alpha(e){return this._rgb.a=Lt(e),this}clearer(e){const t=this._rgb;return t.a*=1-e,this}greyscale(){const e=this._rgb,t=At(.3*e.r+.59*e.g+.11*e.b);return e.r=e.g=e.b=t,this}opaquer(e){const t=this._rgb;return t.a*=1+e,this}negate(){const e=this._rgb;return e.r=255-e.r,e.g=255-e.g,e.b=255-e.b,this}lighten(e){return bs(this._rgb,2,e),this}darken(e){return bs(this._rgb,2,-e),this}saturate(e){return bs(this._rgb,1,e),this}desaturate(e){return bs(this._rgb,1,-e),this}rotate(e){return ns(this._rgb,e),this}} 9/*! 10 * Chart.js v4.5.1 11 * https://www.chartjs.org 12 * (c) 2025 Chart.js Contributors 13 * Released under the MIT License 14 */ 15function _s(){}const ws=(()=>{let e=0;return()=>e++})();function Cs(e){return null===e||void 0===e}function Ss(e){if(Array.isArray&&Array.isArray(e))return!0;const t=Object.prototype.toString.call(e);return"[object"===t.slice(0,7)&&"Array]"===t.slice(-6)}function Fs(e){return null!==e&&"[object Object]"===Object.prototype.toString.call(e)}function Ts(e){return("number"===typeof e||e instanceof Number)&&isFinite(+e)}function Ms(e,t){return Ts(e)?e:t}function Ps(e,t){return"undefined"===typeof e?t:e}const Ds=(e,t)=>"string"===typeof e&&e.endsWith("%")?parseFloat(e)/100:+e/t,As=(e,t)=>"string"===typeof e&&e.endsWith("%")?parseFloat(e)/100*t:+e;function $s(e,t,s){if(e&&"function"===typeof e.call)return e.apply(s,t)}function Vs(e,t,s,i){let n,a,o;if(Ss(e))if(a=e.length,i)for(n=a-1;n>=0;n--)t.call(s,e[n],n);else for(n=0;n<a;n++)t.call(s,e[n],n);else if(Fs(e))for(o=Object.keys(e),a=o.length,n=0;n<a;n++)t.call(s,e[o[n]],o[n])}function Ls(e,t){let s,i,n,a;if(!e||!t||e.length!==t.length)return!1;for(s=0,i=e.length;s<i;++s)if(n=e[s],a=t[s],n.datasetIndex!==a.datasetIndex||n.index!==a.index)return!1;return!0}function Es(e){if(Ss(e))return e.map(Es);if(Fs(e)){const t=Object.create(null),s=Object.keys(e),i=s.length;let n=0;for(;n<i;++n)t[s[n]]=Es(e[s[n]]);return t}return e}function Us(e){return-1===["__proto__","prototype","constructor"].indexOf(e)}function Is(e,t,s,i){if(!Us(e))return;const n=t[e],a=s[e];Fs(n)&&Fs(a)?Os(n,a,i):t[e]=Es(a)}function Os(e,t,s){const i=Ss(t)?t:[t],n=i.length;if(!Fs(e))return e;s=s||{};const a=s.merger||Is;let o;for(let l=0;l<n;++l){if(o=i[l],!Fs(o))continue;const t=Object.keys(o);for(let i=0,n=t.length;i<n;++i)a(t[i],e,o,s)}return e}function Rs(e,t){return Os(e,t,{merger:Ws})}function Ws(e,t,s){if(!Us(e))return;const i=t[e],n=s[e];Fs(i)&&Fs(n)?Rs(i,n):Object.prototype.hasOwnProperty.call(t,e)||(t[e]=Es(n))}const Bs={"":e=>e,x:e=>e.x,y:e=>e.y};function zs(e){const t=e.split("."),s=[];let i="";for(const n of t)i+=n,i.endsWith("\\")?i=i.slice(0,-1)+".":(s.push(i),i="");return s}function Ns(e){const t=zs(e);return e=>{for(const s of t){if(""===s)break;e=e&&e[s]}return e}}function js(e,t){const s=Bs[t]||(Bs[t]=Ns(t));return s(e)}function qs(e){return e.charAt(0).toUpperCase()+e.slice(1)}const Hs=e=>"undefined"!==typeof e,Xs=e=>"function"===typeof e,Ks=(e,t)=>{if(e.size!==t.size)return!1;for(const s of e)if(!t.has(s))return!1;return!0};function Qs(e){return"mouseup"===e.type||"click"===e.type||"contextmenu"===e.type}const Ys=Math.PI,Gs=2*Ys,Js=Gs+Ys,Zs=Number.POSITIVE_INFINITY,ei=Ys/180,ti=Ys/2,si=Ys/4,ii=2*Ys/3,ni=Math.log10,ai=Math.sign;function oi(e,t,s){return Math.abs(e-t)<s}function li(e){const t=Math.round(e);e=oi(e,t,e/1e3)?t:e;const s=Math.pow(10,Math.floor(ni(e))),i=e/s,n=i<=1?1:i<=2?2:i<=5?5:10;return n*s}function ri(e){const t=[],s=Math.sqrt(e);let i;for(i=1;i<s;i++)e%i===0&&(t.push(i),t.push(e/i));
15return s===(0|s)&&t.push(s),t.sort((e,t)=>e-t).pop(),t}function di(e){return"symbol"===typeof e||"object"===typeof e&&null!==e&&!(Symbol.toPrimitive in e||"toString"in e||"valueOf"in e)}function ci(e){return!di(e)&&!isNaN(parseFloat(e))&&isFinite(e)}function hi(e,t){const s=Math.round(e);return s-t<=e&&s+t>=e}function ui(e,t,s){let i,n,a;for(i=0,n=e.length;i<n;i++)a=e[i][s],isNaN(a)||(t.min=Math.min(t.min,a),t.max=Math.max(t.max,a))}function pi(e){return e*(Ys/180)}function gi(e){return e*(180/Ys)}function fi(e){if(!Ts(e))return;let t=1,s=0;while(Math.round(e*t)/t!==e)t*=10,s++;return s}function mi(e,t){const s=t.x-e.x,i=t.y-e.y,n=Math.sqrt(s*s+i*i);let a=Math.atan2(i,s);return a<-.5*Ys&&(a+=Gs),{angle:a,distance:n}}function bi(e,t){return Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}function yi(e,t){return(e-t+Js)%Gs-Ys}function xi(e){return(e%Gs+Gs)%Gs}function vi(e,t,s,i){const n=xi(e),a=xi(t),o=xi(s),l=xi(a-n),r=xi(o-n),d=xi(n-a),c=xi(n-o);return n===a||n===o||i&&a===o||l>r&&d<c}function ki(e,t,s){return Math.max(t,Math.min(s,e))}function _i(e){return ki(e,-32768,32767)}function wi(e,t,s,i=1e-6){return e>=Math.min(t,s)-i&&e<=Math.max(t,s)+i}function Ci(e,t,s){s=s||(s=>e[s]<t);let i,n=e.length-1,a=0;while(n-a>1)i=a+n>>1,s(i)?a=i:n=i;return{lo:a,hi:n}}const Si=(e,t,s,i)=>Ci(e,s,i?i=>{const n=e[i][t];return n<s||n===s&&e[i+1][t]===s}:i=>e[i][t]<s),Fi=(e,t,s)=>Ci(e,s,i=>e[i][t]>=s);function Ti(e,t,s){let i=0,n=e.length;while(i<n&&e[i]<t)i++;while(n>i&&e[n-1]>s)n--;return i>0||n<e.length?e.slice(i,n):e}const Mi=["push","pop","shift","splice","unshift"];function Pi(e,t){e._chartjs?e._chartjs.listeners.push(t):(Object.defineProperty(e,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[t]}}),Mi.forEach(t=>{const s="_onData"+qs(t),i=e[t];Object.defineProperty(e,t,{configurable:!0,enumerable:!1,value(...t){const n=i.apply(this,t);return e._chartjs.listeners.forEach(e=>{"function"===typeof e[s]&&e[s](...t)}),n}})}))}function Di(e,t){const s=e._chartjs;if(!s)return;const i=s.listeners,n=i.indexOf(t);-1!==n&&i.splice(n,1),i.length>0||(Mi.forEach(t=>{delete e[t]}),delete e._chartjs)}function Ai(e){const t=new Set(e);return t.size===e.length?e:Array.from(t)}const $i=function(){return"undefined"===typeof window?function(e){return e()}:window.requestAnimationFrame}();function Vi(e,t){let s=[],i=!1;return function(...n){s=n,i||(i=!0,$i.call(window,()=>{i=!1,e.apply(t,s)}))}}function Li(e,t){let s;return function(...i){return t?(clearTimeout(s),s=setTimeout(e,t,i)):e.apply(this,i),t}}const Ei=e=>"start"===e?"left":"end"===e?"right":"center",Ui=(e,t,s)=>"start"===e?t:"end"===e?s:(t+s)/2,Ii=(e,t,s,i)=>{const n=i?"left":"right";return e===n?s:"center"===e?(t+s)/2:t};function Oi(e,t,s){const i=t.length;let n=0,a=i;if(e._sorted){const{iScale:o,vScale:l,_parsed:r}=e,d=e.dataset&&e.dataset.options?e.dataset.options.spanGaps:null,c=o.axis,{min:h,max:u,minDefined:p,maxDefined:g}=o.getUserBounds();if(p){if(n=Math.min(Si(r,c,h).lo,s?i:Si(t,c,o.getPixelForValue(h)).lo),d){const e=r.slice(0,n+1).reverse().findIndex(e=>!Cs(e[l.axis]));n-=Math.max(0,e)}n=ki(n,0,i-1)}if(g){let e=Math.max(Si(r,o.axis,u,!0).hi+1,s?0:Si(t,c,o.getPixelForValue(u),!0).hi+1);if(d){const t=r.slice(e-1).findIndex(e=>!Cs(e[l.axis]));e+=Math.max(0,t)}a=ki(e,n,i)-n}else a=i-n}return{start:n,count:a}}function Ri(e){const{xScale:t,yScale:s,_scaleRanges:i}=e,n={xmin:t.min,xmax:t.max,ymin:s.min,ymax:s.max};if(!i)return e._scaleRanges=n,!0;const a=i.xmin!==t.min||i.xmax!==t.max||i.ymin!==s.min||i.ymax!==s.max;return Object.assign(i,n),a}const Wi=e=>0===e||1===e,Bi=(e,t,s)=>-Math.pow(2,10*(e-=1))*Math.sin((e-t)*Gs/s),zi=(e,t,s)=>Math.pow(2,-10*e)*Math.sin((e-t)*Gs/s)+1,Ni={linear:e=>e,easeInQuad:e=>e*e,easeOutQuad:e=>-e*(e-2),easeInOutQuad:e=>(e/=.5)<1?.5*e*e:-.5*(--e*(e-2)-1),easeInCubic:e=>e*e*e,easeOutCubic:e=>(e-=1)*e*e+1,easeInOutCubic:e=>(e/=.5)<1?.5*e*e*e:.5*((e-=2)*e*e+2),easeInQuart:e=>e*e*e*e,easeOutQuart:e=>-((e-=1)*e*e*e-1),easeInOutQuart:e=>(e/=.5)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2),easeInQuint:e=>e*e*e*e*e,easeOutQuint:e=>(e-=1)*e*e*e*e+1,easeInOutQuint:e=>(e/=.5)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2),easeInSine:e=>1-Math.cos(e*ti),easeOutSine:e=>Math.sin(e*ti),easeInOutSine:e=>-.5*(Math.cos(Ys*e)-1),easeInExpo:e=>0===e?0:Math.pow(2,10*(e-1)),easeOutExpo:e=>1===e?1:1-Math.pow(2,-10*e),easeInOutExpo:e=>Wi(e)?e:e<.5?.5*Math.pow(2,10*(2*e-1)):.5*(2-Math.pow(2,-10*(2*e-1))),easeInCirc:e=>e>=1?e:-(Math.sqrt(1-e*e)-1),easeOutCirc:e=>Math.sqrt(1-(e-=1)*e),easeInOutCirc:e=>(e/=.5)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1),easeInElastic:e=>Wi(e)?e:Bi(e,.075,.3),easeOutElastic:e=>Wi(e)?e:zi(e,.075,.3),easeInOutElastic(e){const t=.1125,s=.45;return Wi(e)?e:e<.5?.5*Bi(2*e,t,s):.5+.5*zi(2*e-1,t,s)},easeInBack(e){const t=1.70158;return e*e*((t+1)*e-t)},easeOutBack(e){const t=1.70158;return(e-=1)*e*((t+1)*e+t)+1},easeInOutBack(e){let t=1.70158;return(e/=.5)<1?e*e*((1+(t*=1.525))*e-t)*.5:.5*((e-=2)*e*((1+(t*=1.525))*e+t)+2)},easeInBounce:e=>1-Ni.easeOutBounce(1-e),easeOutBounce(e){const t=7.5625,s=2.75;return e<1/s?t*e*e:e<2/s?t*(e-=1.5/s)*e+.75:e<2.5/s?t*(e-=2.25/s)*e+.9375:t*(e-=2.625/s)*e+.984375},easeInOutBounce:e=>e<.5?.5*Ni.easeInBounce(2*e):.5*Ni.easeOutBounce(2*e-1)+.5};function ji(e){if(e&&"object"===typeof e){const t=e.toString();return"[object CanvasPattern]"===t||"[object CanvasGradient]"===t}return!1}function qi(e){return ji(e)?e:new ks(e)}function Hi(e){return ji(e)?e:new ks(e).saturate(.5).darken(.1).hexString()}const Xi=["x","y","borderWidth","radius","tension"],Ki=["color","borderColor","backgroundColor"];function Qi(e){e.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0}),e.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:e=>"onProgress"!==e&&"onComplete"!==e&&"fn"!==e}),e.set("animations",{colors:{type:"color",properties:Ki},numbers:{type:"number",properties:Xi}}),e.describe("animations",{_fallback:"animation"}),e.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:e=>0|e}}}})}function Yi(e){e.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})}const Gi=new Map;
vendor: 3,237 bytes, line 15
15function Ji(e,t){t=t||{};const s=e+JSON.stringify(t);let i=Gi.get(s);return i||(i=new Intl.NumberFormat(e,t),Gi.set(s,i)),i}function Zi(e,t,s){return Ji(t,s).format(e)}const en={values(e){return Ss(e)?e:""+e},numeric(e,t,s){if(0===e)return"0";const i=this.chart.options.locale;let n,a=e;if(s.length>1){const t=Math.max(Math.abs(s[0].value),Math.abs(s[s.length-1].value));(t<1e-4||t>1e15)&&(n="scientific"),a=tn(e,s)}const o=ni(Math.abs(a)),l=isNaN(o)?1:Math.max(Math.min(-1*Math.floor(o),20),0),r={notation:n,minimumFractionDigits:l,maximumFractionDigits:l};return Object.assign(r,this.options.ticks.format),Zi(e,i,r)},logarithmic(e,t,s){if(0===e)return"0";const i=s[t].significand||e/Math.pow(10,Math.floor(ni(e)));return[1,2,3,5,10,15].includes(i)||t>.8*s.length?en.numeric.call(this,e,t,s):""}};function tn(e,t){let s=t.length>3?t[2].value-t[1].value:t[1].value-t[0].value;return Math.abs(s)>=1&&e!==Math.floor(e)&&(s=e-Math.floor(e)),s}var sn={formatters:en};function nn(e){e.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",clip:!0,grace:0,grid:{display:!0,lineWidth:1,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(e,t)=>t.lineWidth,tickColor:(e,t)=>t.color,offset:!1},border:{display:!0,dash:[],dashOffset:0,width: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:sn.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),e.route("scale.ticks","color","","color"),e.route("scale.grid","color","","borderColor"),e.route("scale.border","color","","borderColor"),e.route("scale.title","color","","color"),e.describe("scale",{_fallback:!1,_scriptable:e=>!e.startsWith("before")&&!e.startsWith("after")&&"callback"!==e&&"parser"!==e,_indexable:e=>"borderDash"!==e&&"tickBorderDash"!==e&&"dash"!==e}),e.describe("scales",{_fallback:"scale"}),e.describe("scale.ticks",{_scriptable:e=>"backdropPadding"!==e&&"callback"!==e,_indexable:e=>"backdropPadding"!==e})}const an=Object.create(null),on=Object.create(null);function ln(e,t){if(!t)return e;const s=t.split(".");for(let i=0,n=s.length;i<n;++i){const t=s[i];e=e[t]||(e[t]=Object.create(null))}return e}function rn(e,t,s){return"string"===typeof t?Os(ln(e,t),s):Os(ln(e,""),t)}class dn{constructor(e,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=e=>e.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=(e,t)=>Hi(t.backgroundColor),this.hoverBorderColor=(e,t)=>Hi(t.borderColor),this.hoverColor=(e,t)=>Hi(t.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={}
vendor: 5,137 bytes, line 15
15,this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(e),this.apply(t)}set(e,t){return rn(this,e,t)}get(e){return ln(this,e)}describe(e,t){return rn(on,e,t)}override(e,t){return rn(an,e,t)}route(e,t,s,i){const n=ln(this,e),a=ln(this,s),o="_"+t;Object.defineProperties(n,{[o]:{value:n[t],writable:!0},[t]:{enumerable:!0,get(){const e=this[o],t=a[i];return Fs(e)?Object.assign({},t,e):Ps(e,t)},set(e){this[o]=e}}})}apply(e){e.forEach(e=>e(this))}}var cn=new dn({_scriptable:e=>!e.startsWith("on"),_indexable:e=>"events"!==e,hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[Qi,Yi,nn]);function hn(e){return!e||Cs(e.size)||Cs(e.family)?null:(e.style?e.style+" ":"")+(e.weight?e.weight+" ":"")+e.size+"px "+e.family}function un(e,t,s,i,n){let a=t[n];return a||(a=t[n]=e.measureText(n).width,s.push(n)),a>i&&(i=a),i}function pn(e,t,s,i){i=i||{};let n=i.data=i.data||{},a=i.garbageCollect=i.garbageCollect||[];i.font!==t&&(n=i.data={},a=i.garbageCollect=[],i.font=t),e.save(),e.font=t;let o=0;const l=s.length;let r,d,c,h,u;for(r=0;r<l;r++)if(h=s[r],void 0===h||null===h||Ss(h)){if(Ss(h))for(d=0,c=h.length;d<c;d++)u=h[d],void 0===u||null===u||Ss(u)||(o=un(e,n,a,o,u))}else o=un(e,n,a,o,h);e.restore();const p=a.length/2;if(p>s.length){for(r=0;r<p;r++)delete n[a[r]];a.splice(0,p)}return o}function gn(e,t,s){const i=e.currentDevicePixelRatio,n=0!==s?Math.max(s/2,.5):0;return Math.round((t-n)*i)/i+n}function fn(e,t){(t||e)&&(t=t||e.getContext("2d"),t.save(),t.resetTransform(),t.clearRect(0,0,e.width,e.height),t.restore())}function mn(e,t,s,i){bn(e,t,s,i,null)}function bn(e,t,s,i,n){let a,o,l,r,d,c,h,u;const p=t.pointStyle,g=t.rotation,f=t.radius;let m=(g||0)*ei;if(p&&"object"===typeof p&&(a=p.toString(),"[object HTMLImageElement]"===a||"[object HTMLCanvasElement]"===a))return e.save(),e.translate(s,i),e.rotate(m),e.drawImage(p,-p.width/2,-p.height/2,p.width,p.height),void e.restore();if(!(isNaN(f)||f<=0)){switch(e.beginPath(),p){default:n?e.ellipse(s,i,n/2,f,0,0,Gs):e.arc(s,i,f,0,Gs),e.closePath();break;case"triangle":c=n?n/2:f,e.moveTo(s+Math.sin(m)*c,i-Math.cos(m)*f),m+=ii,e.lineTo(s+Math.sin(m)*c,i-Math.cos(m)*f),m+=ii,e.lineTo(s+Math.sin(m)*c,i-Math.cos(m)*f),e.closePath();break;case"rectRounded":d=.516*f,r=f-d,o=Math.cos(m+si)*r,h=Math.cos(m+si)*(n?n/2-d:r),l=Math.sin(m+si)*r,u=Math.sin(m+si)*(n?n/2-d:r),e.arc(s-h,i-l,d,m-Ys,m-ti),e.arc(s+u,i-o,d,m-ti,m),e.arc(s+h,i+l,d,m,m+ti),e.arc(s-u,i+o,d,m+ti,m+Ys),e.closePath();break;case"rect":if(!g){r=Math.SQRT1_2*f,c=n?n/2:r,e.rect(s-c,i-r,2*c,2*r);break}m+=si;case"rectRot":h=Math.cos(m)*(n?n/2:f),o=Math.cos(m)*f,l=Math.sin(m)*f,u=Math.sin(m)*(n?n/2:f),e.moveTo(s-h,i-l),e.lineTo(s+u,i-o),e.lineTo(s+h,i+l),e.lineTo(s-u,i+o),e.closePath();break;case"crossRot":m+=si;case"cross":h=Math.cos(m)*(n?n/2:f),o=Math.cos(m)*f,l=Math.sin(m)*f,u=Math.sin(m)*(n?n/2:f),e.moveTo(s-h,i-l),e.lineTo(s+h,i+l),e.moveTo(s+u,i-o),e.lineTo(s-u,i+o);break;case"star":h=Math.cos(m)*(n?n/2:f),o=Math.cos(m)*f,l=Math.sin(m)*f,u=Math.sin(m)*(n?n/2:f),e.moveTo(s-h,i-l),e.lineTo(s+h,i+l),e.moveTo(s+u,i-o),e.lineTo(s-u,i+o),m+=si,h=Math.cos(m)*(n?n/2:f),o=Math.cos(m)*f,l=Math.sin(m)*f,u=Math.sin(m)*(n?n/2:f),e.moveTo(s-h,i-l),e.lineTo(s+h,i+l),e.moveTo(s+u,i-o),e.lineTo(s-u,i+o);break;case"line":o=n?n/2:Math.cos(m)*f,l=Math.sin(m)*f,e.moveTo(s-o,i-l),e.lineTo(s+o,i+l);break;case"dash":e.moveTo(s,i),e.lineTo(s+Math.cos(m)*(n?n/2:f),i+Math.sin(m)*f);break;case!1:e.closePath();break}e.fill(),t.borderWidth>0&&e.stroke()}}function yn(e,t,s){return s=s||.5,!t||e&&e.x>t.left-s&&e.x<t.right+s&&e.y>t.top-s&&e.y<t.bottom+s}function xn(e,t){e.save(),e.beginPath(),e.rect(t.left,t.top,t.right-t.left,t.bottom-t.top),e.clip()}function vn(e){e.restore()}function kn(e,t,s,i,n){if(!t)return e.lineTo(s.x,s.y);if("middle"===n){const i=(t.x+s.x)/2;e.lineTo(i,t.y),e.lineTo(i,s.y)}else"after"===n!==!!i?e.lineTo(t.x,s.y):e.lineTo(s.x,t.y);e.lineTo(s.x,s.y)}function _n(e,t,s,i){if(!t)return e.lineTo(s.x,s.y);e.bezierCurveTo(i?t.cp1x:t.cp2x,i?t.cp1y:t.cp2y,i?s.cp2x:s.cp1x,i?s.cp2y:s.cp1y,s.x,s.y)}function wn(e,t){t.translation&&e.translate(t.translation[0],t.translation[1]),Cs(t.rotation)||e.rotate(t.rotation),t.color&&(e.fillStyle=t.color),t.textAlign&&(e.textAlign=t.textAlign),t.textBaseline&&(e.textBaseline=t.textBaseline)}function Cn(e,t,s,i,n){if(n.strikethrough||n.underline){const a=e.measureText(i),o=t-a.actualBoundingBoxLeft,l=t+a.actualBoundingBoxRight,r=s-a.actualBoundingBoxAscent,d=s+a.actualBoundingBoxDescent,c=n.strikethrough?(r+d)/2:d;e.strokeStyle=e.fillStyle,e.beginPath(),e.lineWidth=n.decorationWidth||2,e.moveTo(o,c),e.lineTo(l,c),e.stroke()}}function Sn(e,t){const s=e.fillStyle;e.fillStyle=t.color,e.fillRect(t.left,t.top,t.width,t.height),e.fillStyle=s}function Fn(e,t,s,i,n,a={}){const o=Ss(t)?t:[t],l=a.strokeWidth>0&&""!==a.strokeColor;let r,d;for(e.save(),e.font=n.string,wn(e,a),r=0;r<o.length;++r)d=o[r],a.backdrop&&Sn(e,a.backdrop),l&&(a.strokeColor&&(e.strokeStyle=a.strokeColor),Cs(a.strokeWidth)||(e.lineWidth=a.strokeWidth),e.strokeText(d,s,i,a.maxWidth)),e.fillText(d,s,i,a.maxWidth),Cn(e,s,i,d,a),i+=Number(n.lineHeight);
vendor: 8,789 bytes, line 15
15e.restore()}function Tn(e,t){const{x:s,y:i,w:n,h:a,radius:o}=t;e.arc(s+o.topLeft,i+o.topLeft,o.topLeft,1.5*Ys,Ys,!0),e.lineTo(s,i+a-o.bottomLeft),e.arc(s+o.bottomLeft,i+a-o.bottomLeft,o.bottomLeft,Ys,ti,!0),e.lineTo(s+n-o.bottomRight,i+a),e.arc(s+n-o.bottomRight,i+a-o.bottomRight,o.bottomRight,ti,0,!0),e.lineTo(s+n,i+o.topRight),e.arc(s+n-o.topRight,i+o.topRight,o.topRight,0,-ti,!0),e.lineTo(s+o.topLeft,i)}const Mn=/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/,Pn=/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/;function Dn(e,t){const s=(""+e).match(Mn);if(!s||"normal"===s[1])return 1.2*t;switch(e=+s[2],s[3]){case"px":return e;case"%":e/=100;break}return t*e}const An=e=>+e||0;function $n(e,t){const s={},i=Fs(t),n=i?Object.keys(t):t,a=Fs(e)?i?s=>Ps(e[s],e[t[s]]):t=>e[t]:()=>e;for(const o of n)s[o]=An(a(o));return s}function Vn(e){return $n(e,{top:"y",right:"x",bottom:"y",left:"x"})}function Ln(e){return $n(e,["topLeft","topRight","bottomLeft","bottomRight"])}function En(e){const t=Vn(e);return t.width=t.left+t.right,t.height=t.top+t.bottom,t}function Un(e,t){e=e||{},t=t||cn.font;let s=Ps(e.size,t.size);"string"===typeof s&&(s=parseInt(s,10));let i=Ps(e.style,t.style);i&&!(""+i).match(Pn)&&(console.warn('Invalid font style specified: "'+i+'"'),i=void 0);const n={family:Ps(e.family,t.family),lineHeight:Dn(Ps(e.lineHeight,t.lineHeight),s),size:s,style:i,weight:Ps(e.weight,t.weight),string:""};return n.string=hn(n),n}function In(e,t,s,i){let n,a,o,l=!0;for(n=0,a=e.length;n<a;++n)if(o=e[n],void 0!==o&&(void 0!==t&&"function"===typeof o&&(o=o(t),l=!1),void 0!==s&&Ss(o)&&(o=o[s%o.length],l=!1),void 0!==o))return i&&!l&&(i.cacheable=!1),o}function On(e,t,s){const{min:i,max:n}=e,a=As(t,(n-i)/2),o=(e,t)=>s&&0===e?0:e+t;return{min:o(i,-Math.abs(a)),max:o(n,a)}}function Rn(e,t){return Object.assign(Object.create(e),t)}function Wn(e,t=[""],s,i,n=()=>e[0]){const a=s||e;"undefined"===typeof i&&(i=sa("_fallback",e));const o={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:e,_rootScopes:a,_fallback:i,_getTarget:n,override:s=>Wn([s,...e],t,a,i)};return new Proxy(o,{deleteProperty(t,s){return delete t[s],delete t._keys,delete e[0][s],!0},get(s,i){return qn(s,i,()=>ta(i,t,e,s))},getOwnPropertyDescriptor(e,t){return Reflect.getOwnPropertyDescriptor(e._scopes[0],t)},getPrototypeOf(){return Reflect.getPrototypeOf(e[0])},has(e,t){return ia(e).includes(t)},ownKeys(e){return ia(e)},set(e,t,s){const i=e._storage||(e._storage=n());return e[t]=i[t]=s,delete e._keys,!0}})}function Bn(e,t,s,i){const n={_cacheable:!1,_proxy:e,_context:t,_subProxy:s,_stack:new Set,_descriptors:zn(e,i),setContext:t=>Bn(e,t,s,i),override:n=>Bn(e.override(n),t,s,i)};return new Proxy(n,{deleteProperty(t,s){return delete t[s],delete e[s],!0},get(e,t,s){return qn(e,t,()=>Hn(e,t,s))},getOwnPropertyDescriptor(t,s){return t._descriptors.allKeys?Reflect.has(e,s)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(e,s)},getPrototypeOf(){return Reflect.getPrototypeOf(e)},has(t,s){return Reflect.has(e,s)},ownKeys(){return Reflect.ownKeys(e)},set(t,s,i){return e[s]=i,delete t[s],!0}})}function zn(e,t={scriptable:!0,indexable:!0}){const{_scriptable:s=t.scriptable,_indexable:i=t.indexable,_allKeys:n=t.allKeys}=e;return{allKeys:n,scriptable:s,indexable:i,isScriptable:Xs(s)?s:()=>s,isIndexable:Xs(i)?i:()=>i}}const Nn=(e,t)=>e?e+qs(t):t,jn=(e,t)=>Fs(t)&&"adapters"!==e&&(null===Object.getPrototypeOf(t)||t.constructor===Object);function qn(e,t,s){if(Object.prototype.hasOwnProperty.call(e,t)||"constructor"===t)return e[t];const i=s();return e[t]=i,i}function Hn(e,t,s){const{_proxy:i,_context:n,_subProxy:a,_descriptors:o}=e;let l=i[t];return Xs(l)&&o.isScriptable(t)&&(l=Xn(t,l,e,s)),Ss(l)&&l.length&&(l=Kn(t,l,e,o.isIndexable)),jn(t,l)&&(l=Bn(l,n,a&&a[t],o)),l}function Xn(e,t,s,i){const{_proxy:n,_context:a,_subProxy:o,_stack:l}=s;if(l.has(e))throw new Error("Recursion detected: "+Array.from(l).join("->")+"->"+e);l.add(e);let r=t(a,o||i);return l.delete(e),jn(e,r)&&(r=Jn(n._scopes,n,e,r)),r}function Kn(e,t,s,i){const{_proxy:n,_context:a,_subProxy:o,_descriptors:l}=s;if("undefined"!==typeof a.index&&i(e))return t[a.index%t.length];if(Fs(t[0])){const s=t,i=n._scopes.filter(e=>e!==s);t=[];for(const r of s){const s=Jn(i,n,e,r);t.push(Bn(s,a,o&&o[e],l))}}return t}function Qn(e,t,s){return Xs(e)?e(t,s):e}const Yn=(e,t)=>!0===e?t:"string"===typeof e?js(t,e):void 0;function Gn(e,t,s,i,n){for(const a of t){const t=Yn(s,a);if(t){e.add(t);const a=Qn(t._fallback,s,n);if("undefined"!==typeof a&&a!==s&&a!==i)return a}else if(!1===t&&"undefined"!==typeof i&&s!==i)return null}return!1}function Jn(e,t,s,i){const n=t._rootScopes,a=Qn(t._fallback,s,i),o=[...e,...n],l=new Set;l.add(i);let r=Zn(l,o,s,a||s,i);return null!==r&&(("undefined"===typeof a||a===s||(r=Zn(l,o,a,r,i),null!==r))&&Wn(Array.from(l),[""],n,a,()=>ea(t,s,i)))}function Zn(e,t,s,i,n){while(s)s=Gn(e,t,s,i,n);return s}function ea(e,t,s){const i=e._getTarget();t in i||(i[t]={});const n=i[t];return Ss(n)&&Fs(s)?s:n||{}}function ta(e,t,s,i){let n;for(const a of t)if(n=sa(Nn(a,e),s),"undefined"!==typeof n)return jn(e,n)?Jn(s,i,e,n):n}function sa(e,t){for(const s of t){if(!s)continue;const t=s[e];if("undefined"!==typeof t)return t}}function ia(e){let t=e._keys;return t||(t=e._keys=na(e._scopes)),t}function na(e){const t=new Set;for(const s of e)for(const e of Object.keys(s).filter(e=>!e.startsWith("_")))t.add(e);return Array.from(t)}function aa(e,t,s,i){const{iScale:n}=e,{key:a="r"}=this._parsing,o=new Array(i);let l,r,d,c;for(l=0,r=i;l<r;++l)d=l+s,c=t[d],o[l]={r:n.parse(js(c,a),d)};return o}const oa=Number.EPSILON||1e-14,la=(e,t)=>t<e.length&&!e[t].skip&&e[t],ra=e=>"x"===e?"y":"x";function da(e,t,s,i){const n=e.skip?t:e,a=t,o=s.skip?t:s,l=bi(a,n),r=bi(o,a);let d=l/(l+r),c=r/(l+r);d=isNaN(d)?0:d,c=isNaN(c)?0:c;const h=i*d,u=i*c;return{previous:{x:a.x-h*(o.x-n.x),y:a.y-h*(o.y-n.y)},next:{x:a.x+u*(o.x-n.x),y:a.y+u*(o.y-n.y)}}}function ca(e,t,s){const i=e.length;let n,a,o,l,r,d=la(e,0);for(let c=0;c<i-1;++c)r=d,d=la(e,c+1),r&&d&&(oi(t[c],0,oa)?s[c]=s[c+1]=0:(n=s[c]/t[c],a=s[c+1]/t[c],l=Math.pow(n,2)+Math.pow(a,2),l<=9||(o=3/Math.sqrt(l),s[c]=n*o*t[c],s[c+1]=a*o*t[c])))}function ha(e,t,s="x"){const i=ra(s),n=e.length;let a,o,l,r=la(e,0);for(let d=0;d<n;++d){if(o=l,l=r,r=la(e,d+1),!l)continue;const n=l[s],c=l[i];o&&(a=(n-o[s])/3,l[`cp1${s}`]=n-a,l[`cp1${i}`]=c-a*t[d]),r&&(a=(r[s]-n)/3,l[`cp2${s}`]=n+a,l[`cp2${i}`]=c+a*t[d])}}function ua(e,t="x"){const s=ra(t),i=e.length,n=Array(i).fill(0),a=Array(i);let o,l,r,d=la(e,0);for(o=0;o<i;++o)if(l=r,r=d,d=la(e,o+1),r){if(d){const e=d[t]-r[t];n[o]=0!==e?(d[s]-r[s])/e:0}a[o]=l?d?ai(n[o-1])!==ai(n[o])?0:(n[o-1]+n[o])/2:n[o-1]:n[o]}ca(e,n,a),ha(e,a,t)}function pa(e,t,s){return Math.max(Math.min(e,s),t)}function ga(e,t){let s,i,n,a,o,l=yn(e[0],t);for(s=0,i=e.length;s<i;++s)o=a,a=l,l=s<i-1&&yn(e[s+1],t),a&&(n=e[s],o&&(n.cp1x=pa(n.cp1x,t.left,t.right),n.cp1y=pa(n.cp1y,t.top,t.bottom)),l&&(n.cp2x=pa(n.cp2x,t.left,t.right),n.cp2y=pa(n.cp2y,t.top,t.bottom)))}function fa(e,t,s,i,n){let a,o,l,r;if(t.spanGaps&&(e=e.filter(e=>!e.skip)),"monotone"===t.cubicInterpolationMode)ua(e,n);else{let s=i?e[e.length-1]:e[0];for(a=0,o=e.length;a<o;++a)l=e[a],r=da(s,l,e[Math.min(a+1,o-(i?0:1))%o],t.tension),l.cp1x=r.previous.x,l.cp1y=r.previous.y,l.cp2x=r.next.x,l.cp2y=r.next.y,s=l}t.capBezierPoints&&ga(e,s)}function ma(){return"undefined"!==typeof window&&"undefined"!==typeof document}function ba(e){let t=e.parentNode;return t&&"[object ShadowRoot]"===t.toString()&&(t=t.host),t}function ya(e,t,s){let i;return"string"===typeof e?(i=parseInt(e,10),-1!==e.indexOf("%")&&(i=i/100*t.parentNode[s])):i=e,i}const xa=e=>e.ownerDocument.defaultView.getComputedStyle(e,null);function va(e,t){return xa(e).getPropertyValue(t)}const ka=["top","right","bottom","left"];function _a(e,t,s){const i={};s=s?"-"+s:"";for(let n=0;n<4;n++){const a=ka[n];i[a]=parseFloat(e[t+"-"+a+s])||0}return i.width=i.left+i.right,i.height=i.top+i.bottom,i}const wa=(e,t,s)=>(e>0||t>0)&&(!s||!s.shadowRoot);function Ca(e,t){const s=e.touches,i=s&&s.length?s[0]:e,{offsetX:n,offsetY:a}=i;let o,l,r=!1;if(wa(n,a,e.target))o=n,l=a;else{const e=t.getBoundingClientRect();o=i.clientX-e.left,l=i.clientY-e.top,r=!0}return{x:o,y:l,box:r}}function Sa(e,t){if("native"in e)return e;const{canvas:s,currentDevicePixelRatio:i}=t,n=xa(s),a="border-box"===n.boxSizing,o=_a(n,"padding"),l=_a(n,"border","width"),{x:r,y:d,box:c}=Ca(e,s),h=o.left+(c&&l.left),u=o.top+(c&&l.top);let{width:p,height:g}=t;return a&&(p-=o.width+l.width,g-=o.height+l.height),{x:Math.round((r-h)/p*s.width/i),y:Math.round((d-u)/g*s.height/i)}}function Fa(e,t,s){let i,n;if(void 0===t||void 0===s){const a=e&&ba(e);if(a){const e=a.getBoundingClientRect(),o=xa(a),l=_a(o,"border","width"),r=_a(o,"padding");
15t=e.width-r.width-l.width,s=e.height-r.height-l.height,i=ya(o.maxWidth,a,"clientWidth"),n=ya(o.maxHeight,a,"clientHeight")}else t=e.clientWidth,s=e.clientHeight}return{width:t,height:s,maxWidth:i||Zs,maxHeight:n||Zs}}const Ta=e=>Math.round(10*e)/10;function Ma(e,t,s,i){const n=xa(e),a=_a(n,"margin"),o=ya(n.maxWidth,e,"clientWidth")||Zs,l=ya(n.maxHeight,e,"clientHeight")||Zs,r=Fa(e,t,s);let{width:d,height:c}=r;if("content-box"===n.boxSizing){const e=_a(n,"border","width"),t=_a(n,"padding");d-=t.width+e.width,c-=t.height+e.height}d=Math.max(0,d-a.width),c=Math.max(0,i?d/i:c-a.height),d=Ta(Math.min(d,o,r.maxWidth)),c=Ta(Math.min(c,l,r.maxHeight)),d&&!c&&(c=Ta(d/2));const h=void 0!==t||void 0!==s;return h&&i&&r.height&&c>r.height&&(c=r.height,d=Ta(Math.floor(c*i))),{width:d,height:c}}function Pa(e,t,s){const i=t||1,n=Ta(e.height*i),a=Ta(e.width*i);e.height=Ta(e.height),e.width=Ta(e.width);const o=e.canvas;return o.style&&(s||!o.style.height&&!o.style.width)&&(o.style.height=`${e.height}px`,o.style.width=`${e.width}px`),(e.currentDevicePixelRatio!==i||o.height!==n||o.width!==a)&&(e.currentDevicePixelRatio=i,o.height=n,o.width=a,e.ctx.setTransform(i,0,0,i,0,0),!0)}const Da=function(){let e=!1;try{const t={get passive(){return e=!0,!1}};ma()&&(window.addEventListener("test",null,t),window.removeEventListener("test",null,t))}catch(t){}return e}();function Aa(e,t){const s=va(e,t),i=s&&s.match(/^(\d+)(\.\d+)?px$/);return i?+i[1]:void 0}function $a(e,t,s,i){return{x:e.x+s*(t.x-e.x),y:e.y+s*(t.y-e.y)}}function Va(e,t,s,i){return{x:e.x+s*(t.x-e.x),y:"middle"===i?s<.5?e.y:t.y:"after"===i?s<1?e.y:t.y:s>0?t.y:e.y}}function La(e,t,s,i){const n={x:e.cp2x,y:e.cp2y},a={x:t.cp1x,y:t.cp1y},o=$a(e,n,s),l=$a(n,a,s),r=$a(a,t,s),d=$a(o,l,s),c=$a(l,r,s);return $a(d,c,s)}const Ea=function(e,t){return{x(s){return e+e+t-s},setWidth(e){t=e},textAlign(e){return"center"===e?e:"right"===e?"left":"right"},xPlus(e,t){return e-t},leftForLtr(e,t){return e-t}}},Ua=function(){return{x(e){return e},setWidth(e){},textAlign(e){return e},xPlus(e,t){return e+t},leftForLtr(e,t){return e}}};function Ia(e,t,s){return e?Ea(t,s):Ua()}function Oa(e,t){let s,i;"ltr"!==t&&"rtl"!==t||(s=e.canvas.style,i=[s.getPropertyValue("direction"),s.getPropertyPriority("direction")],s.setProperty("direction",t,"important"),e.prevTextDirection=i)}function Ra(e,t){void 0!==t&&(delete e.prevTextDirection,e.canvas.style.setProperty("direction",t[0],t[1]))}function Wa(e){return"angle"===e?{between:vi,compare:yi,normalize:xi}:{between:wi,compare:(e,t)=>e-t,normalize:e=>e}}function Ba({start:e,end:t,count:s,loop:i,style:n}){return{start:e%s,end:t%s,loop:i&&(t-e+1)%s===0,style:n}}function za(e,t,s){const{property:i,start:n,end:a}=s,{between:o,normalize:l}=Wa(i),r=t.length;let d,c,{start:h,end:u,loop:p}=e;if(p){for(h+=r,u+=r,d=0,c=r;d<c;++d){if(!o(l(t[h%r][i]),n,a))break;h--,u--}h%=r,u%=r}return u<h&&(u+=r),{start:h,end:u,loop:p,style:e.style}}function Na(e,t,s){if(!s)return[e];const{property:i,start:n,end:a}=s,o=t.length,{compare:l,between:r,normalize:d}=Wa(i),{start:c,end:h,loop:u,style:p}=za(e,t,s),g=[];let f,m,b,y=!1,x=null;const v=()=>r(n,b,f)&&0!==l(n,b),k=()=>0===l(a,f)||r(a,b,f),_=()=>y||v(),w=()=>!y||k();for(let C=c,S=c;C<=h;++C)m=t[C%o],m.skip||(f=d(m[i]),f!==b&&(y=r(f,n,a),null===x&&_()&&(x=0===l(f,n)?C:S),null!==x&&w()&&(g.push(Ba({start:x,end:C,loop:u,count:o,style:p})),x=null),S=C,b=f));return null!==x&&g.push(Ba({start:x,end:h,loop:u,count:o,style:p})),g}function ja(e,t){const s=[],i=e.segments;for(let n=0;n<i.length;n++){const a=Na(i[n],e.points,t);a.length&&s.push(...a)}return s}function qa(e,t,s,i){let n=0,a=t-1;if(s&&!i)while(n<t&&!e[n].skip)n++;while(n<t&&e[n].skip)n++;n%=t,s&&(a+=n);while(a>n&&e[a%t].skip)a--;return a%=t,{start:n,end:a}}function Ha(e,t,s,i){const n=e.length,a=[];let o,l=t,r=e[t];for(o=t+1;o<=s;++o){const s=e[o%n];s.skip||s.stop?r.skip||(i=!1,a.push({start:t%n,end:(o-1)%n,loop:i}),t=l=s.stop?o:null):(l=o,r.skip&&(t=o)),r=s}return null!==l&&a.push({start:t%n,end:l%n,loop:i}),a}function Xa(e,t){const s=e.points,i=e.options.spanGaps,n=s.length;if(!n)return[];const a=!!e._loop,{start:o,end:l}=qa(s,n,a,i);if(!0===i)return Ka(e,[{start:o,end:l,loop:a}],s,t);const r=l<o?l+n:l,d=!!e._fullLoop&&0===o&&l===n-1;return Ka(e,Ha(s,o,r,d),s,t)}function Ka(e,t,s,i){return i&&i.setContext&&s?Qa(e,t,s,i):t}function Qa(e,t,s,i){const n=e._chart.getContext(),a=Ya(e.options),{_datasetIndex:o,options:{spanGaps:l}}=e,r=s.length,d=[];let c=a,h=t[0].start,u=h;function p(e,t,i,n){const a=l?-1:1;if(e!==t){e+=r;while(s[e%r].skip)e-=a;while(s[t%r].skip)t+=a;e%r!==t%r&&(d.push({start:e%r,end:t%r,loop:i,style:n}),c=n,h=t%r)}}for(const g of t){h=l?h:g.start;let e,t=s[h%r];for(u=h+1;u<=g.end;u++){const a=s[u%r];e=Ya(i.setContext(Rn(n,{type:"segment",p0:t,p1:a,p0DataIndex:(u-1)%r,p1DataIndex:u%r,datasetIndex:o}))),Ga(e,c)&&p(h,u-1,g.loop,c),t=a,c=e}h<u-1&&p(h,u-1,g.loop,c)}return d}function Ya(e){return{backgroundColor:e.backgroundColor,borderCapStyle:e.borderCapStyle,borderDash:e.borderDash,borderDashOffset:e.borderDashOffset,borderJoinStyle:e.borderJoinStyle,borderWidth:e.borderWidth,borderColor:e.borderColor}}function Ga(e,t){if(!t)return!1;const s=[],i=function(e,t){return ji(t)?(s.includes(t)||s.push(t),s.indexOf(t)):t};return JSON.stringify(e,i)!==JSON.stringify(t,i)}function Ja(e,t,s){return e.options.clip?e[s]:t[s]}function Za(e,t){const{xScale:s,yScale:i}=e;
vendor: 2,252 bytes, lines 15-22
15return s&&i?{left:Ja(s,t,"left"),right:Ja(s,t,"right"),top:Ja(i,t,"top"),bottom:Ja(i,t,"bottom")}:t}function eo(e,t){const s=t._clip;if(s.disabled)return!1;const i=Za(t,e.chartArea);return{left:!1===s.left?0:i.left-(!0===s.left?0:s.left),right:!1===s.right?e.width:i.right+(!0===s.right?0:s.right),top:!1===s.top?0:i.top-(!0===s.top?0:s.top),bottom:!1===s.bottom?e.height:i.bottom+(!0===s.bottom?0:s.bottom)}} 16/*! 17 * Chart.js v4.5.1 18 * https://www.chartjs.org 19 * (c) 2025 Chart.js Contributors 20 * Released under the MIT License 21 */ 22class to{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(e,t,s,i){const n=t.listeners[i],a=t.duration;n.forEach(i=>i({chart:e,initial:t.initial,numSteps:a,currentStep:Math.min(s-t.start,a)}))}_refresh(){this._request||(this._running=!0,this._request=$i.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(e=Date.now()){let t=0;this._charts.forEach((s,i)=>{if(!s.running||!s.items.length)return;const n=s.items;let a,o=n.length-1,l=!1;for(;o>=0;--o)a=n[o],a._active?(a._total>s.duration&&(s.duration=a._total),a.tick(e),l=!0):(n[o]=n[n.length-1],n.pop());l&&(i.draw(),this._notify(i,s,e,"progress")),n.length||(s.running=!1,this._notify(i,s,e,"complete"),s.initial=!1),t+=n.length}),this._lastDate=e,0===t&&(this._running=!1)}_getAnims(e){const t=this._charts;let s=t.get(e);return s||(s={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},t.set(e,s)),s}listen(e,t,s){this._getAnims(e).listeners[t].push(s)}add(e,t){t&&t.length&&this._getAnims(e).items.push(...t)}has(e){return this._getAnims(e).items.length>0}start(e){const t=this._charts.get(e);t&&(t.running=!0,t.start=Date.now(),t.duration=t.items.reduce((e,t)=>Math.max(e,t._duration),0),this._refresh())}running(e){if(!this._running)return!1;const t=this._charts.get(e);return!!(t&&t.running&&t.items.length)}stop(e){const t=this._charts.get(e);if(!t||!t.items.length)return;const s=t.items;let i=s.length-1;for(;i>=0;--i)s[i].cancel();t.items=[],this._notify(e,t,Date.now(),"complete")}remove(e){return this._charts.delete(e)}}var so=new to;const io="transparent",no={boolean(e,t,s){return s>.5?t:e},color(e,t,s){const i=qi(e||io),n=i.valid&&qi(t||io);
vendor: 4,165 bytes, line 22
22return n&&n.valid?n.mix(i,s).hexString():t},number(e,t,s){return e+(t-e)*s}};class ao{constructor(e,t,s,i){const n=t[s];i=In([e.to,i,n,e.from]);const a=In([e.from,n,i]);this._active=!0,this._fn=e.fn||no[e.type||typeof a],this._easing=Ni[e.easing]||Ni.linear,this._start=Math.floor(Date.now()+(e.delay||0)),this._duration=this._total=Math.floor(e.duration),this._loop=!!e.loop,this._target=t,this._prop=s,this._from=a,this._to=i,this._promises=void 0}active(){return this._active}update(e,t,s){if(this._active){this._notify(!1);const i=this._target[this._prop],n=s-this._start,a=this._duration-n;this._start=s,this._duration=Math.floor(Math.max(a,e.duration)),this._total+=n,this._loop=!!e.loop,this._to=In([e.to,t,i,e.from]),this._from=In([e.from,i,t])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(e){const t=e-this._start,s=this._duration,i=this._prop,n=this._from,a=this._loop,o=this._to;let l;if(this._active=n!==o&&(a||t<s),!this._active)return this._target[i]=o,void this._notify(!0);t<0?this._target[i]=n:(l=t/s%2,l=a&&l>1?2-l:l,l=this._easing(Math.min(1,Math.max(0,l))),this._target[i]=this._fn(n,o,l))}wait(){const e=this._promises||(this._promises=[]);return new Promise((t,s)=>{e.push({res:t,rej:s})})}_notify(e){const t=e?"res":"rej",s=this._promises||[];for(let i=0;i<s.length;i++)s[i][t]()}}class oo{constructor(e,t){this._chart=e,this._properties=new Map,this.configure(t)}configure(e){if(!Fs(e))return;const t=Object.keys(cn.animation),s=this._properties;Object.getOwnPropertyNames(e).forEach(i=>{const n=e[i];if(!Fs(n))return;const a={};for(const e of t)a[e]=n[e];(Ss(n.properties)&&n.properties||[i]).forEach(e=>{e!==i&&s.has(e)||s.set(e,a)})})}_animateOptions(e,t){const s=t.options,i=ro(e,s);if(!i)return[];const n=this._createAnimations(i,s);return s.$shared&&lo(e.options.$animations,s).then(()=>{e.options=s},()=>{}),n}_createAnimations(e,t){const s=this._properties,i=[],n=e.$animations||(e.$animations={}),a=Object.keys(t),o=Date.now();let l;for(l=a.length-1;l>=0;--l){const r=a[l];if("$"===r.charAt(0))continue;if("options"===r){i.push(...this._animateOptions(e,t));continue}const d=t[r];let c=n[r];const h=s.get(r);if(c){if(h&&c.active()){c.update(h,d,o);continue}c.cancel()}h&&h.duration?(n[r]=c=new ao(h,e,r,d),i.push(c)):e[r]=d}return i}update(e,t){if(0===this._properties.size)return void Object.assign(e,t);const s=this._createAnimations(e,t);return s.length?(so.add(this._chart,s),!0):void 0}}function lo(e,t){const s=[],i=Object.keys(t);for(let n=0;n<i.length;n++){const t=e[i[n]];t&&t.active()&&s.push(t.wait())}return Promise.all(s)}function ro(e,t){if(!t)return;let s=e.options;if(s)return s.$shared&&(e.options=s=Object.assign({},s,{$shared:!1,$animations:{}})),s;e.options=t}function co(e,t){const s=e&&e.options||{},i=s.reverse,n=void 0===s.min?t:0,a=void 0===s.max?t:0;return{start:i?a:n,end:i?n:a}}function ho(e,t,s){if(!1===s)return!1;const i=co(e,s),n=co(t,s);return{top:n.end,right:i.end,bottom:n.start,left:i.start}}function uo(e){let t,s,i,n;return Fs(e)?(t=e.top,s=e.right,i=e.bottom,n=e.left):t=s=i=n=e,{top:t,right:s,bottom:i,left:n,disabled:!1===e}}function po(e,t){const s=[],i=e._getSortedDatasetMetas(t);let n,a;for(n=0,a=i.length;n<a;++n)s.push(i[n].index);return s}function go(e,t,s,i={}){const n=e.keys,a="single"===i.mode;let o,l,r,d;if(null===t)return;let c=!1;for(o=0,l=n.length;o<l;++o){if(r=+n[o],r===s){if(c=!0,i.all)continue;break}d=e.values[r],Ts(d)&&(a||0===t||ai(t)===ai(d))&&(t+=d)}return c||i.all?t:0}function fo(e,t){const{iScale:s,vScale:i}=t,n="x"===s.axis?"x":"y",a="x"===i.axis?"x":"y",o=Object.keys(e),l=new Array(o.length);let r,d,c;for(r=0,d=o.length;r<d;++r)c=o[r],l[r]={[n]:c,[a]:e[c]};return l}function mo(e,t){const s=e&&e.options.stacked;return s||void 0===s&&void 0!==t.stack}function bo(e,t,s){return`${e.id}.${t.id}.${s.stack||s.type}`}function yo(e){const{min:t,max:s,minDefined:i,maxDefined:n}=e.getUserBounds();return{min:i?t:Number.NEGATIVE_INFINITY,max:n?s:Number.POSITIVE_INFINITY}}function xo(e,t,s){const i=e[t]||(e[t]={});return i[s]||(i[s]={})}function vo(e,t,s,i){for(const n of t.getMatchingVisibleMetas(i).reverse()){const t=e[
vendor: 4,716 bytes, line 22
22n.index];if(s&&t>0||!s&&t<0)return n.index}return null}function ko(e,t){const{chart:s,_cachedMeta:i}=e,n=s._stacks||(s._stacks={}),{iScale:a,vScale:o,index:l}=i,r=a.axis,d=o.axis,c=bo(a,o,i),h=t.length;let u;for(let p=0;p<h;++p){const e=t[p],{[r]:s,[d]:a}=e,h=e._stacks||(e._stacks={});u=h[d]=xo(n,c,s),u[l]=a,u._top=vo(u,o,!0,i.type),u._bottom=vo(u,o,!1,i.type);const g=u._visualValues||(u._visualValues={});g[l]=a}}function _o(e,t){const s=e.scales;return Object.keys(s).filter(e=>s[e].axis===t).shift()}function wo(e,t){return Rn(e,{active:!1,dataset:void 0,datasetIndex:t,index:t,mode:"default",type:"dataset"})}function Co(e,t,s){return Rn(e,{active:!1,dataIndex:t,parsed:void 0,raw:void 0,element:s,index:t,mode:"default",type:"data"})}function So(e,t){const s=e.controller.index,i=e.vScale&&e.vScale.axis;if(i){t=t||e._parsed;for(const e of t){const t=e._stacks;if(!t||void 0===t[i]||void 0===t[i][s])return;delete t[i][s],void 0!==t[i]._visualValues&&void 0!==t[i]._visualValues[s]&&delete t[i]._visualValues[s]}}}const Fo=e=>"reset"===e||"none"===e,To=(e,t)=>t?e:Object.assign({},e),Mo=(e,t,s)=>e&&!t.hidden&&t._stacked&&{keys:po(s,!0),values:null};class Po{constructor(e,t){this.chart=e,this._ctx=e.ctx,this.index=t,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.supportsDecimation=!1,this.$context=void 0,this._syncList=[],this.datasetElementType=new.target.datasetElementType,this.dataElementType=new.target.dataElementType,this.initialize()}initialize(){const e=this._cachedMeta;this.configure(),this.linkScales(),e._stacked=mo(e.vScale,e),this.addElements(),this.options.fill&&!this.chart.isPluginEnabled("filler")&&console.warn("Tried to use the 'fill' option without the 'Filler' plugin enabled. Please import and register the 'Filler' plugin and make sure it is not disabled in the options")}updateIndex(e){this.index!==e&&So(this._cachedMeta),this.index=e}linkScales(){const e=this.chart,t=this._cachedMeta,s=this.getDataset(),i=(e,t,s,i)=>"x"===e?t:"r"===e?i:s,n=t.xAxisID=Ps(s.xAxisID,_o(e,"x")),a=t.yAxisID=Ps(s.yAxisID,_o(e,"y")),o=t.rAxisID=Ps(s.rAxisID,_o(e,"r")),l=t.indexAxis,r=t.iAxisID=i(l,n,a,o),d=t.vAxisID=i(l,a,n,o);t.xScale=this.getScaleForId(n),t.yScale=this.getScaleForId(a),t.rScale=this.getScaleForId(o),t.iScale=this.getScaleForId(r),t.vScale=this.getScaleForId(d)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(e){return this.chart.scales[e]}_getOtherScale(e){const t=this._cachedMeta;return e===t.iScale?t.vScale:t.iScale}reset(){this._update("reset")}_destroy(){const e=this._cachedMeta;this._data&&Di(this._data,this),e._stacked&&So(e)}_dataCheck(){const e=this.getDataset(),t=e.data||(e.data=[]),s=this._data;if(Fs(t)){const e=this._cachedMeta;this._data=fo(t,e)}else if(s!==t){if(s){Di(s,this);const e=this._cachedMeta;So(e),e._parsed=[]}t&&Object.isExtensible(t)&&Pi(t,this),this._syncList=[],this._data=t}}addElements(){const e=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(e.dataset=new this.datasetElementType)}buildOrUpdateElements(e){const t=this._cachedMeta,s=this.getDataset();let i=!1;this._dataCheck();const n=t._stacked;t._stacked=mo(t.vScale,t),t.stack!==s.stack&&(i=!0,So(t),t.stack=s.stack),this._resyncElements(e),(i||n!==t._stacked)&&(ko(this,t._parsed),t._stacked=mo(t.vScale,t))}configure(){const e=this.chart.config,t=e.datasetScopeKeys(this._type),s=e.getOptionScopes(this.getDataset(),t,!0);this.options=e.createResolver(s,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(e,t){const{_cachedMeta:s,_data:i}=this,{iScale:n,_stacked:a}=s,o=n.axis;let l,r,d,c=0===e&&t===i.length||s._sorted,h=e>0&&s._parsed[e-1];if(!1===this._parsing)s._parsed=i,s._sorted=!0,d=i;else{d=Ss(i[e])?this.parseArrayData(s,i,e,t):Fs(i[e])?this.parseObjectData(s,i,e,t):this.parsePrimitiveData(s,i,e,t);const n=()=>null===r[o]||h&&r[o]<h[o];for(l=0;l<t;++l)s._parsed[l+e]=r=d[l],c&&(n()&&(c=!1),h=r);s._sorted=c}a&&ko(this,d)}parsePrimitiveData(e,t,s,i){const{iScale:n,vScale:a}=e,o=n.axis,l=a.axis,r=n.getLabels(),d=n===a,c=new Array(i);let h,u,p;for(h=0,u=i;h<u;++h)p=h+s,c[h]={[o]:d||n.parse(r[p],p),[l]:a.parse(t[p],p)};return c}parseArrayData(e,t,s,i){const{xScale:n,yScale:a}=e,o=new Array(i);let l,r,d,c;for(l=0,r=i;l<r;++l)d=l+s,c=t[d],o[l]={x:n.parse(c[0],d),y:a.parse(c[1],d)};return o}parseObjectData(e,t,s,i){const{xScale:n,yScale:a}=e,{xAxisKey:o="x",yAxisKey:l="y"}=this._parsing,r=new Array(i);let d,c,h,u;
vendor: 10,129 bytes, line 22
22for(d=0,c=i;d<c;++d)h=d+s,u=t[h],r[d]={x:n.parse(js(u,o),h),y:a.parse(js(u,l),h)};return r}getParsed(e){return this._cachedMeta._parsed[e]}getDataElement(e){return this._cachedMeta.data[e]}applyStack(e,t,s){const i=this.chart,n=this._cachedMeta,a=t[e.axis],o={keys:po(i,!0),values:t._stacks[e.axis]._visualValues};return go(o,a,n.index,{mode:s})}updateRangeFromParsed(e,t,s,i){const n=s[t.axis];let a=null===n?NaN:n;const o=i&&s._stacks[t.axis];i&&o&&(i.values=o,a=go(i,n,this._cachedMeta.index)),e.min=Math.min(e.min,a),e.max=Math.max(e.max,a)}getMinMax(e,t){const s=this._cachedMeta,i=s._parsed,n=s._sorted&&e===s.iScale,a=i.length,o=this._getOtherScale(e),l=Mo(t,s,this.chart),r={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:d,max:c}=yo(o);let h,u;function p(){u=i[h];const t=u[o.axis];return!Ts(u[e.axis])||d>t||c<t}for(h=0;h<a;++h)if(!p()&&(this.updateRangeFromParsed(r,e,u,l),n))break;if(n)for(h=a-1;h>=0;--h)if(!p()){this.updateRangeFromParsed(r,e,u,l);break}return r}getAllParsedValues(e){const t=this._cachedMeta._parsed,s=[];let i,n,a;for(i=0,n=t.length;i<n;++i)a=t[i][e.axis],Ts(a)&&s.push(a);return s}getMaxOverflow(){return!1}getLabelAndValue(e){const t=this._cachedMeta,s=t.iScale,i=t.vScale,n=this.getParsed(e);return{label:s?""+s.getLabelForValue(n[s.axis]):"",value:i?""+i.getLabelForValue(n[i.axis]):""}}_update(e){const t=this._cachedMeta;this.update(e||"default"),t._clip=uo(Ps(this.options.clip,ho(t.xScale,t.yScale,this.getMaxOverflow())))}update(e){}draw(){const e=this._ctx,t=this.chart,s=this._cachedMeta,i=s.data||[],n=t.chartArea,a=[],o=this._drawStart||0,l=this._drawCount||i.length-o,r=this.options.drawActiveElementsOnTop;let d;for(s.dataset&&s.dataset.draw(e,n,o,l),d=o;d<o+l;++d){const t=i[d];t.hidden||(t.active&&r?a.push(t):t.draw(e,n))}for(d=0;d<a.length;++d)a[d].draw(e,n)}getStyle(e,t){const s=t?"active":"default";return void 0===e&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(s):this.resolveDataElementOptions(e||0,s)}getContext(e,t,s){const i=this.getDataset();let n;if(e>=0&&e<this._cachedMeta.data.length){const t=this._cachedMeta.data[e];n=t.$context||(t.$context=Co(this.getContext(),e,t)),n.parsed=this.getParsed(e),n.raw=i.data[e],n.index=n.dataIndex=e}else n=this.$context||(this.$context=wo(this.chart.getContext(),this.index)),n.dataset=i,n.index=n.datasetIndex=this.index;return n.active=!!t,n.mode=s,n}resolveDatasetElementOptions(e){return this._resolveElementOptions(this.datasetElementType.id,e)}resolveDataElementOptions(e,t){return this._resolveElementOptions(this.dataElementType.id,t,e)}_resolveElementOptions(e,t="default",s){const i="active"===t,n=this._cachedDataOpts,a=e+"-"+t,o=n[a],l=this.enableOptionSharing&&Hs(s);if(o)return To(o,l);const r=this.chart.config,d=r.datasetElementScopeKeys(this._type,e),c=i?[`${e}Hover`,"hover",e,""]:[e,""],h=r.getOptionScopes(this.getDataset(),d),u=Object.keys(cn.elements[e]),p=()=>this.getContext(s,i,t),g=r.resolveNamedOptions(h,u,p,c);return g.$shared&&(g.$shared=l,n[a]=Object.freeze(To(g,l))),g}_resolveAnimations(e,t,s){const i=this.chart,n=this._cachedDataOpts,a=`animation-${t}`,o=n[a];if(o)return o;let l;if(!1!==i.options.animation){const i=this.chart.config,n=i.datasetAnimationScopeKeys(this._type,t),a=i.getOptionScopes(this.getDataset(),n);l=i.createResolver(a,this.getContext(e,s,t))}const r=new oo(i,l&&l.animations);return l&&l._cacheable&&(n[a]=Object.freeze(r)),r}getSharedOptions(e){if(e.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},e))}includeOptions(e,t){return!t||Fo(e)||this.chart._animationsDisabled}_getSharedOptions(e,t){const s=this.resolveDataElementOptions(e,t),i=this._sharedOptions,n=this.getSharedOptions(s),a=this.includeOptions(t,n)||n!==i;return this.updateSharedOptions(n,t,s),{sharedOptions:n,includeOptions:a}}updateElement(e,t,s,i){Fo(i)?Object.assign(e,s):this._resolveAnimations(t,i).update(e,s)}updateSharedOptions(e,t,s){e&&!Fo(t)&&this._resolveAnimations(void 0,t).update(e,s)}_setStyle(e,t,s,i){e.active=i;const n=this.getStyle(t,i);this._resolveAnimations(t,s,i).update(e,{options:!i&&this.getSharedOptions(n)||n})}removeHoverStyle(e,t,s){this._setStyle(e,s,"active",!1)}setHoverStyle(e,t,s){this._setStyle(e,s,"active",!0)}_removeDatasetHoverStyle(){const e=this._cachedMeta.dataset;e&&this._setStyle(e,void 0,"active",!1)}_setDatasetHoverStyle(){const e=this._cachedMeta.dataset;e&&this._setStyle(e,void 0,"active",!0)}_resyncElements(e){const t=this._data,s=this._cachedMeta.data;for(const[o,l,r]of this._syncList)this[o](l,r);this._syncList=[];const i=s.length,n=t.length,a=Math.min(n,i);a&&this.parse(0,a),n>i?this._insertElements(i,n-i,e):n<i&&this._removeElements(n,i-n)}_insertElements(e,t,s=!0){const i=this._cachedMeta,n=i.data,a=e+t;let o;const l=e=>{for(e.length+=t,o=e.length-1;o>=a;o--)e[o]=e[o-t]};for(l(n),o=e;o<a;++o)n[o]=new this.dataElementType;this._parsing&&l(i._parsed),this.parse(e,t),s&&this.updateElements(n,e,t,"reset")}updateElements(e,t,s,i){}_removeElements(e,t){const s=this._cachedMeta;if(this._parsing){const i=s._parsed.splice(e,t);s._stacked&&So(s,i)}s.data.splice(e,t)}_sync(e){if(this._parsing)this._syncList.push(e);else{const[t,s,i]=e;this[t](s,i)}this.chart._dataChanges.push([this.index,...e])}_onDataPush(){const e=arguments.length;this._sync(["_insertElements",this.getDataset().data.length-e,e])}_onDataPop(){this._sync(["_removeElements",this._cachedMeta.data.length-1,1])}_onDataShift(){this._sync(["_removeElements",0,1])}_onDataSplice(e,t){t&&this._sync(["_removeElements",e,t]);const s=arguments.length-2;s&&this._sync(["_insertElements",e,s])}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length])}}function Do(e,t){if(!e._cache.$bar){const s=e.getMatchingVisibleMetas(t);let i=[];for(let t=0,n=s.length;t<n;t++)i=i.concat(s[t].controller.getAllParsedValues(e));e._cache.$bar=Ai(i.sort((e,t)=>e-t))}return e._cache.$bar}function Ao(e){const t=e.iScale,s=Do(t,e.type);let i,n,a,o,l=t._length;const r=()=>{32767!==a&&-32768!==a&&(Hs(o)&&(l=Math.min(l,Math.abs(a-o)||l)),o=a)};for(i=0,n=s.length;i<n;++i)a=t.getPixelForValue(s[i]),r();for(o=void 0,i=0,n=t.ticks.length;i<n;++i)a=t.getPixelForTick(i),r();return l}function $o(e,t,s,i){const n=s.barThickness;let a,o;return Cs(n)?(a=t.min*s.categoryPercentage,o=s.barPercentage):(a=n*i,o=1),{chunk:a/i,ratio:o,start:t.pixels[e]-a/2}}function Vo(e,t,s,i){const n=t.pixels,a=n[e];let o=e>0?n[e-1]:null,l=e<n.length-1?n[e+1]:null;const r=s.categoryPercentage;null===o&&(o=a-(null===l?t.end-t.start:l-a)),null===l&&(l=a+a-o);const d=a-(a-Math.min(o,l))/2*r,c=Math.abs(l-o)/2*r;return{chunk:c/i,ratio:s.barPercentage,start:d}}function Lo(e,t,s,i){const n=s.parse(e[0],i),a=s.parse(e[1],i),o=Math.min(n,a),l=Math.max(n,a);let r=o,d=l;Math.abs(o)>Math.abs(l)&&(r=l,d=o),t[s.axis]=d,t._custom={barStart:r,barEnd:d,start:n,end:a,min:o,max:l}}function Eo(e,t,s,i){return Ss(e)?Lo(e,t,s,i):t[s.axis]=s.parse(e,i),t}function Uo(e,t,s,i){const n=e.iScale,a=e.vScale,o=n.getLabels(),l=n===a,r=[];let d,c,h,u;for(d=s,c=s+i;d<c;++d)u=t[d],h={},h[n.axis]=l||n.parse(o[d],d),r.push(Eo(u,h,a,d));return r}function Io(e){return e&&void 0!==e.barStart&&void 0!==e.barEnd}function Oo(e,t,s){return 0!==e?ai(e):(t.isHorizontal()?1:-1)*(t.min>=s?1:-1)}function Ro(e){let t,s,i,n,a;return e.horizontal?(t=e.base>e.x,s="left",i="right"):(t=e.base<e.y,s="bottom",i="top"),t?(n="end",a="start"):(n="start",a="end"),{start:s,end:i,reverse:t,top:n,bottom:a}}function Wo(e,t,s,i){let n=t.borderSkipped;const a={};if(!n)return void(e.borderSkipped=a);if(!0===n)return void(e.borderSkipped={top:!0,right:!0,bottom:!0,left:!0});const{start:o,end:l,reverse:r,top:d,bottom:c}=Ro(e);"middle"===n&&s&&(e.enableBorderRadius=!0,(s._top||0)===i?n=d:(s._bottom||0)===i?n=c:(a[Bo(c,o,l,r)]=!0,n=d)),a[Bo(n,o,l,r)]=!0,e.borderSkipped=a}function Bo(e,t,s,i){return i?(e=zo(e,t,s),e=No(e,s,t)):e=No(e,t,s),e}function zo(e,t,s){return e===t?s:e===s?t:e}function No(e,t,s){return"start"===e?t:"end"===e?s:e}function jo(e,{inflateAmount:t},s){e.inflateAmount="auto"===t?1===s?.33:0:t}(0,Dt.A)(Po,"defaults",{}),(0,Dt.A)(Po,"datasetElementType",null),(0,Dt.A)(Po,"dataElementType",null);class qo extends Po{parsePrimitiveData(e,t,s,i){return Uo(e,t,s,i)}parseArrayData(e,t,s,i){return Uo(e,t,s,i)}parseObjectData(e,t,s,i){const{iScale:n,vScale:a}=e,{xAxisKey:o="x",yAxisKey:l="y"}=this._parsing,r="x"===n.axis?o:l,d="x"===a.axis?o:l,c=[];let h,u,p,g;for(h=s,u=s+i;h<u;++h)g=t[h],p={},p[n.axis]=n.parse(js(g,r),h),c.push(Eo(js(g,d),p,a,h));return c}updateRangeFromParsed(e,t,s,i){super.updateRangeFromParsed(e,t,s,i);const n=s._custom;n&&t===this._cachedMeta.vScale&&(e.min=Math.min(e.min,n.min),e.max=Math.max(e.max,n.max))}getMaxOverflow(){return 0}getLabelAndValue(e){const t=this._cachedMeta,{iScale:s,vScale:i}=t,n=this.getParsed(e),a=n._custom,o=Io(a)?"["+a.start+", "+a.end+"]":""+i.getLabelForValue(n[i.axis]);return{label:""+s.getLabelForValue(n[s.axis]),value:o}}initialize(){this.enableOptionSharing=!0,super.initialize();const e=this._cachedMeta;e.stack=this.getDataset().stack}update(e){const t=this._cachedMeta;this.updateElements(t.data,0,t.data.length,e)}updateElements(e,t,s,i){const n="reset"===i,{index:a,_cachedMeta:{vScale:o}}=this,l=o.getBasePixel(),r=o.isHorizontal(),d=this._getRuler(),{sharedOptions:c,includeOptions:h}=this._getSharedOptions(t,i);for(let u=t;u<t+s;u++){const t=this.getParsed(u),s=n||Cs(t[o.axis])?{base:l,head:l}:this._calculateBarValuePixels(u),p=this._calculateBarIndexPixels(u,d),g=(t._stacks||{})[o.axis],f={horizontal:r,base:s.base,enableBorderRadius:!g||Io(t._custom)||a===g._top||a===g._bottom,x:r?s.head:p.center,y:r?p.center:s.head,height:r?p.size:Math.abs(s.size),width:r?Math.abs(s.size):p.size};h&&(f.options=c||this.resolveDataElementOptions(u,e[u].active?"active":i));const m=f.options||e[u].options;Wo(f,m,g,a),jo(f,m,d.ratio),this.updateElement(e[u],u,f,i)}}_getStacks(e,t){const{iScale:s}=this._cachedMeta,i=s.getMatchingVisibleMetas(this._type).filter(e=>e.controller.options.grouped),n=s.options.stacked,a=[],o=this._cachedMeta.controller.getParsed(t),l=o&&o[s.axis],r=e=>{const t=e._parsed.find(e=>
vendor: 7,549 bytes, line 22
22e[s.axis]===l),i=t&&t[e.vScale.axis];if(Cs(i)||isNaN(i))return!0};for(const d of i)if((void 0===t||!r(d))&&((!1===n||-1===a.indexOf(d.stack)||void 0===n&&void 0===d.stack)&&a.push(d.stack),d.index===e))break;return a.length||a.push(void 0),a}_getStackCount(e){return this._getStacks(void 0,e).length}_getAxisCount(){return this._getAxis().length}getFirstScaleIdForIndexAxis(){const e=this.chart.scales,t=this.chart.options.indexAxis;return Object.keys(e).filter(s=>e[s].axis===t).shift()}_getAxis(){const e={},t=this.getFirstScaleIdForIndexAxis();for(const s of this.chart.data.datasets)e[Ps("x"===this.chart.options.indexAxis?s.xAxisID:s.yAxisID,t)]=!0;return Object.keys(e)}_getStackIndex(e,t,s){const i=this._getStacks(e,s),n=void 0!==t?i.indexOf(t):-1;return-1===n?i.length-1:n}_getRuler(){const e=this.options,t=this._cachedMeta,s=t.iScale,i=[];let n,a;for(n=0,a=t.data.length;n<a;++n)i.push(s.getPixelForValue(this.getParsed(n)[s.axis],n));const o=e.barThickness,l=o||Ao(t);return{min:l,pixels:i,start:s._startPixel,end:s._endPixel,stackCount:this._getStackCount(),scale:s,grouped:e.grouped,ratio:o?1:e.categoryPercentage*e.barPercentage}}_calculateBarValuePixels(e){const{_cachedMeta:{vScale:t,_stacked:s,index:i},options:{base:n,minBarLength:a}}=this,o=n||0,l=this.getParsed(e),r=l._custom,d=Io(r);let c,h,u=l[t.axis],p=0,g=s?this.applyStack(t,l,s):u;g!==u&&(p=g-u,g=u),d&&(u=r.barStart,g=r.barEnd-r.barStart,0!==u&&ai(u)!==ai(r.barEnd)&&(p=0),p+=u);const f=Cs(n)||d?p:n;let m=t.getPixelForValue(f);if(c=this.chart.getDataVisibility(e)?t.getPixelForValue(p+g):m,h=c-m,Math.abs(h)<a){h=Oo(h,t,o)*a,u===o&&(m-=h/2);const e=t.getPixelForDecimal(0),n=t.getPixelForDecimal(1),r=Math.min(e,n),p=Math.max(e,n);m=Math.max(Math.min(m,p),r),c=m+h,s&&!d&&(l._stacks[t.axis]._visualValues[i]=t.getValueForPixel(c)-t.getValueForPixel(m))}if(m===t.getPixelForValue(o)){const e=ai(h)*t.getLineWidthForValue(o)/2;m+=e,h-=e}return{size:h,base:m,head:c,center:c+h/2}}_calculateBarIndexPixels(e,t){const s=t.scale,i=this.options,n=i.skipNull,a=Ps(i.maxBarThickness,1/0);let o,l;const r=this._getAxisCount();if(t.grouped){const s=n?this._getStackCount(e):t.stackCount,d="flex"===i.barThickness?Vo(e,t,i,s*r):$o(e,t,i,s*r),c="x"===this.chart.options.indexAxis?this.getDataset().xAxisID:this.getDataset().yAxisID,h=this._getAxis().indexOf(Ps(c,this.getFirstScaleIdForIndexAxis())),u=this._getStackIndex(this.index,this._cachedMeta.stack,n?e:void 0)+h;o=d.start+d.chunk*u+d.chunk/2,l=Math.min(a,d.chunk*d.ratio)}else o=s.getPixelForValue(this.getParsed(e)[s.axis],e),l=Math.min(a,t.min*t.ratio);return{base:o-l/2,head:o+l/2,center:o,size:l}}draw(){const e=this._cachedMeta,t=e.vScale,s=e.data,i=s.length;let n=0;for(;n<i;++n)null===this.getParsed(n)[t.axis]||s[n].hidden||s[n].draw(this._ctx)}}(0,Dt.A)(qo,"id","bar"),(0,Dt.A)(qo,"defaults",{datasetElementType:!1,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}}),(0,Dt.A)(qo,"overrides",{scales:{_index_:{type:"category",offset:!0,grid:{offset:!0}},_value_:{type:"linear",beginAtZero:!0}}});class Ho extends Po{initialize(){this.enableOptionSharing=!0,super.initialize()}parsePrimitiveData(e,t,s,i){const n=super.parsePrimitiveData(e,t,s,i);for(let a=0;a<n.length;a++)n[a]._custom=this.resolveDataElementOptions(a+s).radius;return n}parseArrayData(e,t,s,i){const n=super.parseArrayData(e,t,s,i);for(let a=0;a<n.length;a++){const e=t[s+a];n[a]._custom=Ps(e[2],this.resolveDataElementOptions(a+s).radius)}return n}parseObjectData(e,t,s,i){const n=super.parseObjectData(e,t,s,i);for(let a=0;a<n.length;a++){const e=t[s+a];n[a]._custom=Ps(e&&e.r&&+e.r,this.resolveDataElementOptions(a+s).radius)}return n}getMaxOverflow(){const e=this._cachedMeta.data;let t=0;for(let s=e.length-1;s>=0;--s)t=Math.max(t,e[s].size(this.resolveDataElementOptions(s))/2);return t>0&&t}getLabelAndValue(e){const t=this._cachedMeta,s=this.chart.data.labels||[],{xScale:i,yScale:n}=t,a=this.getParsed(e),o=i.getLabelForValue(a.x),l=n.getLabelForValue(a.y),r=a._custom;return{label:s[e]||"",value:"("+o+", "+l+(r?", "+r:"")+")"}}update(e){const t=this._cachedMeta.data;this.updateElements(t,0,t.length,e)}updateElements(e,t,s,i){const n="reset"===i,{iScale:a,vScale:o}=this._cachedMeta,{sharedOptions:l,includeOptions:r}=this._getSharedOptions(t,i),d=a.axis,c=o.axis;for(let h=t;h<t+s;h++){const t=e[h],s=!n&&this.getParsed(h),u={},p=u[d]=n?a.getPixelForDecimal(.5):a.getPixelForValue(s[d]),g=u[c]=n?o.getBasePixel():o.getPixelForValue(s[c]);u.skip=isNaN(p)||isNaN(g),r&&(u.options=l||this.resolveDataElementOptions(h,t.active?"active":i),n&&(u.options.radius=0)),this.updateElement(t,h,u,i)}}resolveDataElementOptions(e,t){const s=this.getParsed(e);let i=super.resolveDataElementOptions(e,t);i.$shared&&(i=Object.assign({},i,{$shared:!1}));const n=i.radius;return"active"!==t&&(i.radius=0),i.radius+=Ps(s&&s._custom,n),i}}function Xo(e,t,s){let i=1,n=1,a=0,o=0;if(t<Gs){const l=e,r=l+t,d=Math.cos(l),c=Math.sin(l),h=Math.cos(r),u=Math.sin(r),p=(e,t,i)=>vi(e,l,r,!0)?1:Math.max(t,t*s,i,i*s),g=(e,t,i)=>vi(e,l,r,!0)?-1:Math.min(t,t*s,i,i*s),f=p(0,d,h),m=p(ti,c,u),b=g(Ys,d,h),y=g(Ys+ti,c,u);i=(f-b)/2,n=(m-y)/2,a=-(f+b)/2,o=-(m+y)/2}return{ratioX:i,ratioY:n,offsetX:a,offsetY:o}}(0,Dt.A)(Ho,"id","bubble"),(0,Dt.A)(Ho,"defaults",{datasetElementType:!1,dataElementType:"point",animations:{numbers:{type:"number",properties:["x","y","borderWidth","radius"]}}}),(0,Dt.A)(Ho,"overrides",{scales:{x:{type:"linear"},y:{type:"linear"}}});class Ko extends Po{constructor(e,t){super(e,t),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(e,t){const s=this.getDataset().data,i=this._cachedMeta;if(!1===this._parsing)i._parsed=s;else{let n,a,o=e=>+s[e];if(Fs(s[e])){const{key:e="value"}=this._parsing;o=t=>+js(s[t],e)}for(n=e,a=e+t;n<a;++n)i._parsed[n]=o(n)}}_getRotation(){return pi(this.options.rotation-90)}_getCircumference(){return pi(this.options.circumference)}_getRotationExtents(){let e=Gs,t=-Gs;for(let s=0;s<this.chart.data.datasets.length;++s)if(this.chart.isDatasetVisible(s)&&this.chart.getDatasetMeta(s).type===this._type){const i=this.chart.getDatasetMeta(s).controller,n=i._getRotation(),a=i._getCircumference();e=Math.min(e,n),t=Math.max(t,n+a)}return{rotation:e,circumference:t-e}}update(e){const t=this.chart,{chartArea:s}=t,i=this._cachedMeta,n=i.data,a=this.getMaxBorderWidth()+this.getMaxOffset(n)+this.options.spacing,o=Math.max((Math.min(s.width,s.height)-a)/2,0),l=Math.min(Ds(this.options.cutout,o),1),r=this._getRingWeight(this.index),{circumference:d,rotation:c}=this._getRotationExtents(),{ratioX:h,ratioY:u,offsetX:p,offsetY:g}=Xo(c,d,l),f=(s.width-a)/h,m=(s.height-a)/u,b=Math.max(Math.min(f,m)/2,0),y=As(this.options.radius,b),x=Math.max(y*l,0),v=(y-x)/this._getVisibleDatasetWeightTotal();this.offsetX=p*y,this.offsetY=g*y,i.total=this.calculateTotal(),this.outerRadius=y-v*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-v*r,0),this.updateElements(n,0,n.length,e)}_circumference(e,t){const s=this.options,i=this._cachedMeta,n=this._getCircumference();return t&&s.animation.animateRotate||!this.chart.getDataVisibility(e)||null===i._parsed[e]||i.data[e].hidden?0:this.calculateCircumference(i._parsed[e]*n/Gs)}updateElements(e,t,s,i){const n="reset"===i,a=this.chart,o=a.chartArea,l=a.options,r=l.animation,d=(o.left+o.right)/2,c=(o.top+o.bottom)/2,h=n&&r.animateScale,u=h?0:this.innerRadius,p=
22h?0:this.outerRadius,{sharedOptions:g,includeOptions:f}=this._getSharedOptions(t,i);let m,b=this._getRotation();for(m=0;m<t;++m)b+=this._circumference(m,n);for(m=t;m<t+s;++m){const t=this._circumference(m,n),s=e[m],a={x:d+this.offsetX,y:c+this.offsetY,startAngle:b,endAngle:b+t,circumference:t,outerRadius:p,innerRadius:u};f&&(a.options=g||this.resolveDataElementOptions(m,s.active?"active":i)),b+=t,this.updateElement(s,m,a,i)}}calculateTotal(){const e=this._cachedMeta,t=e.data;let s,i=0;for(s=0;s<t.length;s++){const n=e._parsed[s];null===n||isNaN(n)||!this.chart.getDataVisibility(s)||t[s].hidden||(i+=Math.abs(n))}return i}calculateCircumference(e){const t=this._cachedMeta.total;return t>0&&!isNaN(e)?Gs*(Math.abs(e)/t):0}getLabelAndValue(e){const t=this._cachedMeta,s=this.chart,i=s.data.labels||[],n=Zi(t._parsed[e],s.options.locale);return{label:i[e]||"",value:n}}getMaxBorderWidth(e){let t=0;const s=this.chart;let i,n,a,o,l;if(!e)for(i=0,n=s.data.datasets.length;i<n;++i)if(s.isDatasetVisible(i)){a=s.getDatasetMeta(i),e=a.data,o=a.controller;break}if(!e)return 0;for(i=0,n=e.length;i<n;++i)l=o.resolveDataElementOptions(i),"inner"!==l.borderAlign&&(t=Math.max(t,l.borderWidth||0,l.hoverBorderWidth||0));return t}getMaxOffset(e){let t=0;for(let s=0,i=e.length;s<i;++s){const e=this.resolveDataElementOptions(s);t=Math.max(t,e.offset||0,e.hoverOffset||0)}return t}_getRingWeightOffset(e){let t=0;for(let s=0;s<e;++s)this.chart.isDatasetVisible(s)&&(t+=this._getRingWeight(s));return t}_getRingWeight(e){return Math.max(Ps(this.chart.data.datasets[e].weight,1),0)}_getVisibleDatasetWeightTotal(){return this._getRingWeightOffset(this.chart.data.datasets.length)||1}}(0,Dt.A)(Ko,"id","doughnut"),(0,Dt.A)(Ko,"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"}),(0,Dt.A)(Ko,"descriptors",{_scriptable:e=>"spacing"!==e,_indexable:e=>"spacing"!==e&&!e.startsWith("borderDash")&&!e.startsWith("hoverBorderDash")}),(0,Dt.A)(Ko,"overrides",{aspectRatio:1,plugins:{legend:{labels:{generateLabels(e){const t=e.data,{labels:{pointStyle:s,textAlign:i,color:n,useBorderRadius:a,borderRadius:o}}=e.legend.options;return t.labels.length&&t.datasets.length?t.labels.map((t,l)=>{const r=e.getDatasetMeta(0),d=r.controller.getStyle(l);return{text:t,fillStyle:d.backgroundColor,fontColor:n,hidden:!e.getDataVisibility(l),lineDash:d.borderDash,lineDashOffset:d.borderDashOffset,lineJoin:d.borderJoinStyle,lineWidth:d.borderWidth,strokeStyle:d.borderColor,textAlign:i,pointStyle:s,borderRadius:a&&(o||d.borderRadius),index:l}}):[]}},onClick(e,t,s){s.chart.toggleDataVisibility(t.index),s.chart.update()}}}});class Qo extends Po{initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(e){const t=this._cachedMeta,{dataset:s,data:i=[],_dataset:n}=t,a=this.chart._animationsDisabled;let{start:o,count:l}=Oi(t,i,a);this._drawStart=o,this._drawCount=l,Ri(t)&&(o=0,l=i.length),s._chart=this.chart,s._datasetIndex=this.index,s._decimated=!!n._decimated,s.points=i;const r=this.resolveDatasetElementOptions(e);this.options.showLine||(r.borderWidth=0),r.segment=this.options.segment,this.updateElement(s,void 0,{animated:!a,options:r},e),this.updateElements(i,o,l,e)}updateElements(e,t,s,i){const n="reset"===i,{iScale:a,vScale:o,_stacked:l,_dataset:r}=this._cachedMeta,{sharedOptions:d,includeOptions:c}=this._getSharedOptions(t,i),h=a.axis,u=o.axis,{spanGaps:p,segment:g}=this.options,f=ci(p)?p:Number.POSITIVE_INFINITY,m=this.chart._animationsDisabled||n||"none"===i,b=t+s,y=e.length;let x=t>0&&this.getParsed(t-1);for(let v=0;v<y;++v){const s=e[v],p=m?s:{};if(v<t||v>=b){p.skip=!0;continue}const y=this.getParsed(v),k=Cs(y[u]),_=p[h]=a.getPixelForValue(y[h],v),w=p[u]=n||k?o.getBasePixel():o.getPixelForValue(l?this.applyStack(o,y,l):y[u],v);p.skip=isNaN(_)||isNaN(w)||k,p.stop=v>0&&Math.abs(y[h]-x[h])>f,g&&(p.parsed=y,p.raw=r.data[v]),c&&(p.options=d||this.resolveDataElementOptions(v,s.active?"active":i)),m||this.updateElement(s,v,p,i),x=y}}getMaxOverflow(){const e=this._cachedMeta,t=e.dataset,s=t.options&&t.options.borderWidth||0,i=e.data||[];if(!i.length)return s;const n=i[0].size(this.resolveDataElementOptions(0)),a=i[i.length-1].size(this.resolveDataElementOptions(i.length-1));return Math.max(s,n,a)/2}draw(){const e=this._cachedMeta;e.dataset.updateControlPoints(this.chart.chartArea,e.iScale.axis),super.draw()}}(0,Dt.A)(Qo,"id","line"),(0,Dt.A)(Qo,"defaults",{datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1}),(0,Dt.A)(Qo,"overrides",{scales:{_index_:{type:"category"},_value_:{type:"linear"}}});class Yo extends Po{constructor(e,t){super(e,t),this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(e){const t=this._cachedMeta,s=this.chart,i=s.data.labels||[],n=Zi(t._parsed[e].r,s.options.locale);return{label:i[e]||"",value:n}}parseObjectData(e,t,s,i){return aa.bind(this)(e,t,s,i)}update(e){const t=this._cachedMeta.data;this._updateRadius(),this.updateElements(t,0,t.length,e)}getMinMax(){const e=this._cachedMeta,t={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY};return e.data.forEach((e,s)=>{const i=this.getParsed(s).r;!isNaN(i)&&this.chart.getDataVisibility(s)&&(i<t.min&&(t.min=i),i>t.max&&(t.max=i))}),t}_updateRadius(){const e=this.chart,t=e.chartArea,s=e.options,i=Math.min(t.right-t.left,t.bottom-t.top),n=Math.max(i/2,0),a=Math.max(s.cutoutPercentage?n/100*s.cutoutPercentage:1,0),o=(n-a)/e.getVisibleDatasetCount();this.outerRadius=n-o*this.index,this.innerRadius=this.outerRadius-o}updateElements(e,t,s,i){const n="reset"===i,a=this.chart,o=a.options,l=o.animation,r=this._cachedMeta.rScale,d=r.xCenter,c=r.yCenter,h=r.getIndexAngle(0)-.5*Ys;let u,p=h;const g=360/this.countVisibleElements();for(u=0;
22u<t;++u)p+=this._computeAngle(u,i,g);for(u=t;u<t+s;u++){const t=e[u];let s=p,o=p+this._computeAngle(u,i,g),f=a.getDataVisibility(u)?r.getDistanceFromCenterForValue(this.getParsed(u).r):0;p=o,n&&(l.animateScale&&(f=0),l.animateRotate&&(s=o=h));const m={x:d,y:c,innerRadius:0,outerRadius:f,startAngle:s,endAngle:o,options:this.resolveDataElementOptions(u,t.active?"active":i)};this.updateElement(t,u,m,i)}}countVisibleElements(){const e=this._cachedMeta;let t=0;return e.data.forEach((e,s)=>{!isNaN(this.getParsed(s).r)&&this.chart.getDataVisibility(s)&&t++}),t}_computeAngle(e,t,s){return this.chart.getDataVisibility(e)?pi(this.resolveDataElementOptions(e,t).angle||s):0}}(0,Dt.A)(Yo,"id","polarArea"),(0,Dt.A)(Yo,"defaults",{dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0}),(0,Dt.A)(Yo,"overrides",{aspectRatio:1,plugins:{legend:{labels:{generateLabels(e){const t=e.data;if(t.labels.length&&t.datasets.length){const{labels:{pointStyle:s,color:i}}=e.legend.options;return t.labels.map((t,n)=>{const a=e.getDatasetMeta(0),o=a.controller.getStyle(n);return{text:t,fillStyle:o.backgroundColor,strokeStyle:o.borderColor,fontColor:i,lineWidth:o.borderWidth,pointStyle:s,hidden:!e.getDataVisibility(n),index:n}})}return[]}},onClick(e,t,s){s.chart.toggleDataVisibility(t.index),s.chart.update()}}},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}});class Go extends Ko{}(0,Dt.A)(Go,"id","pie"),(0,Dt.A)(Go,"defaults",{cutout:0,rotation:0,circumference:360,radius:"100%"});class Jo extends Po{getLabelAndValue(e){const t=this._cachedMeta.vScale,s=this.getParsed(e);return{label:t.getLabels()[e],value:""+t.getLabelForValue(s[t.axis])}}parseObjectData(e,t,s,i){return aa.bind(this)(e,t,s,i)}update(e){const t=this._cachedMeta,s=t.dataset,i=t.data||[],n=t.iScale.getLabels();if(s.points=i,"resize"!==e){const t=this.resolveDatasetElementOptions(e);this.options.showLine||(t.borderWidth=0);const a={_loop:!0,_fullLoop:n.length===i.length,options:t};this.updateElement(s,void 0,a,e)}this.updateElements(i,0,i.length,e)}updateElements(e,t,s,i){const n=this._cachedMeta.rScale,a="reset"===i;for(let o=t;o<t+s;o++){const t=e[o],s=this.resolveDataElementOptions(o,t.active?"active":i),l=n.getPointPositionForValue(o,this.getParsed(o).r),r=a?n.xCenter:l.x,d=a?n.yCenter:l.y,c={x:r,y:d,angle:l.angle,skip:isNaN(r)||isNaN(d),options:s};this.updateElement(t,o,c,i)}}}(0,Dt.A)(Jo,"id","radar"),(0,Dt.A)(Jo,"defaults",{datasetElementType:"line",dataElementType:"point",indexAxis:"r",showLine:!0,elements:{line:{fill:"start"}}}),(0,Dt.A)(Jo,"overrides",{aspectRatio:1,scales:{r:{type:"radialLinear"}}});class Zo extends Po{getLabelAndValue(e){const t=this._cachedMeta,s=this.chart.data.labels||[],{xScale:i,yScale:n}=t,a=this.getParsed(e),o=i.getLabelForValue(a.x),l=n.getLabelForValue(a.y);return{label:s[e]||"",value:"("+o+", "+l+")"}}update(e){const t=this._cachedMeta,{data:s=[]}=t,i=this.chart._animationsDisabled;let{start:n,count:a}=Oi(t,s,i);if(this._drawStart=n,this._drawCount=a,Ri(t)&&(n=0,a=s.length),this.options.showLine){this.datasetElementType||this.addElements();const{dataset:n,_dataset:a}=t;n._chart=this.chart,n._datasetIndex=this.index,n._decimated=!!a._decimated,n.points=s;const o=this.resolveDatasetElementOptions(e);o.segment=this.options.segment,this.updateElement(n,void 0,{animated:!i,options:o},e)}else this.datasetElementType&&(delete t.dataset,this.datasetElementType=!1);this.updateElements(s,n,a,e)}addElements(){const{showLine:e}=this.options;!this.datasetElementType&&e&&(this.datasetElementType=this.chart.registry.getElement("line")),super.addElements()}updateElements(e,t,s,i){const n="reset"===i,{iScale:a,vScale:o,_stacked:l,_dataset:r}=this._cachedMeta,d=this.resolveDataElementOptions(t,i),c=this.getSharedOptions(d),h=this.includeOptions(i,c),u=a.axis,p=o.axis,{spanGaps:g,segment:f}=this.options,m=ci(g)?g:Number.POSITIVE_INFINITY,b=this.chart._animationsDisabled||n||"none"===i;let y=t>0&&this.getParsed(t-1);for(let x=t;x<t+s;++x){const t=e[x],s=this.getParsed(x),d=b?t:{},g=Cs(s[p]),v=d[u]=a.getPixelForValue(s[u],x),k=d[p]=n||g?o.getBasePixel():o.getPixelForValue(l?this.applyStack(o,s,l):s[p],x);d.skip=isNaN(v)||isNaN(k)||g,d.stop=x>0&&Math.abs(s[u]-y[u])>m,f&&(d.parsed=s,d.raw=r.data[x]),h&&(d.options=c||this.resolveDataElementOptions(x,t.active?"active":i)),b||this.updateElement(t,x,d,i),y=s}this.updateSharedOptions(c,i,d)}getMaxOverflow(){const e=this._cachedMeta,t=e.data||[];if(!this.options.showLine){let e=0;for(let s=t.length-1;s>=0;--s)e=Math.max(e,t[s].size(this.resolveDataElementOptions(s))/2);return e>0&&e}const s=e.dataset,i=s.options&&s.options.borderWidth||0;if(!t.length)return i;const n=t[0].size(this.resolveDataElementOptions(0)),a=t[t.length-1].size(this.resolveDataElementOptions(t.length-1));return Math.max(i,n,a)/2}}(0,Dt.A)(Zo,"id","scatter"),(0,Dt.A)(Zo,"defaults",{datasetElementType:!1,dataElementType:"point",showLine:!1,fill:!1}),(0,Dt.A)(Zo,"overrides",{interaction:{mode:"point"},scales:{x:{type:"linear"},y:{type:"linear"}}});function el(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class tl{static override(e){Object.assign(tl.prototype,e)}constructor(e){(0,Dt.A)(this,"options",void 0),this.options=e||{}}init(){}
vendor: 16,514 bytes, line 22
22formats(){return el()}parse(){return el()}format(){return el()}add(){return el()}diff(){return el()}startOf(){return el()}endOf(){return el()}}var sl={_date:tl};function il(e,t,s,i){const{controller:n,data:a,_sorted:o}=e,l=n._cachedMeta.iScale,r=e.dataset&&e.dataset.options?e.dataset.options.spanGaps:null;if(l&&t===l.axis&&"r"!==t&&o&&a.length){const o=l._reversePixels?Fi:Si;if(!i){const i=o(a,t,s);if(r){const{vScale:t}=n._cachedMeta,{_parsed:s}=e,a=s.slice(0,i.lo+1).reverse().findIndex(e=>!Cs(e[t.axis]));i.lo-=Math.max(0,a);const o=s.slice(i.hi).findIndex(e=>!Cs(e[t.axis]));i.hi+=Math.max(0,o)}return i}if(n._sharedOptions){const e=a[0],i="function"===typeof e.getRange&&e.getRange(t);if(i){const e=o(a,t,s-i),n=o(a,t,s+i);return{lo:e.lo,hi:n.hi}}}}return{lo:0,hi:a.length-1}}function nl(e,t,s,i,n){const a=e.getSortedVisibleDatasetMetas(),o=s[t];for(let l=0,r=a.length;l<r;++l){const{index:e,data:s}=a[l],{lo:r,hi:d}=il(a[l],t,o,n);for(let t=r;t<=d;++t){const n=s[t];n.skip||i(n,e,t)}}}function al(e){const t=-1!==e.indexOf("x"),s=-1!==e.indexOf("y");return function(e,i){const n=t?Math.abs(e.x-i.x):0,a=s?Math.abs(e.y-i.y):0;return Math.sqrt(Math.pow(n,2)+Math.pow(a,2))}}function ol(e,t,s,i,n){const a=[];if(!n&&!e.isPointInArea(t))return a;const o=function(s,o,l){(n||yn(s,e.chartArea,0))&&s.inRange(t.x,t.y,i)&&a.push({element:s,datasetIndex:o,index:l})};return nl(e,s,t,o,!0),a}function ll(e,t,s,i){let n=[];function a(e,s,a){const{startAngle:o,endAngle:l}=e.getProps(["startAngle","endAngle"],i),{angle:r}=mi(e,{x:t.x,y:t.y});vi(r,o,l)&&n.push({element:e,datasetIndex:s,index:a})}return nl(e,s,t,a),n}function rl(e,t,s,i,n,a){let o=[];const l=al(s);let r=Number.POSITIVE_INFINITY;function d(s,d,c){const h=s.inRange(t.x,t.y,n);if(i&&!h)return;const u=s.getCenterPoint(n),p=!!a||e.isPointInArea(u);if(!p&&!h)return;const g=l(t,u);g<r?(o=[{element:s,datasetIndex:d,index:c}],r=g):g===r&&o.push({element:s,datasetIndex:d,index:c})}return nl(e,s,t,d),o}function dl(e,t,s,i,n,a){return a||e.isPointInArea(t)?"r"!==s||i?rl(e,t,s,i,n,a):ll(e,t,s,n):[]}function cl(e,t,s,i,n){const a=[],o="x"===s?"inXRange":"inYRange";let l=!1;return nl(e,s,t,(e,i,r)=>{e[o]&&e[o](t[s],n)&&(a.push({element:e,datasetIndex:i,index:r}),l=l||e.inRange(t.x,t.y,n))}),i&&!l?[]:a}var hl={evaluateInteractionItems:nl,modes:{index(e,t,s,i){const n=Sa(t,e),a=s.axis||"x",o=s.includeInvisible||!1,l=s.intersect?ol(e,n,a,i,o):dl(e,n,a,!1,i,o),r=[];return l.length?(e.getSortedVisibleDatasetMetas().forEach(e=>{const t=l[0].index,s=e.data[t];s&&!s.skip&&r.push({element:s,datasetIndex:e.index,index:t})}),r):[]},dataset(e,t,s,i){const n=Sa(t,e),a=s.axis||"xy",o=s.includeInvisible||!1;let l=s.intersect?ol(e,n,a,i,o):dl(e,n,a,!1,i,o);if(l.length>0){const t=l[0].datasetIndex,s=e.getDatasetMeta(t).data;l=[];for(let e=0;e<s.length;++e)l.push({element:s[e],datasetIndex:t,index:e})}return l},point(e,t,s,i){const n=Sa(t,e),a=s.axis||"xy",o=s.includeInvisible||!1;return ol(e,n,a,i,o)},nearest(e,t,s,i){const n=Sa(t,e),a=s.axis||"xy",o=s.includeInvisible||!1;return dl(e,n,a,s.intersect,i,o)},x(e,t,s,i){const n=Sa(t,e);return cl(e,n,"x",s.intersect,i)},y(e,t,s,i){const n=Sa(t,e);return cl(e,n,"y",s.intersect,i)}}};const ul=["left","top","right","bottom"];function pl(e,t){return e.filter(e=>e.pos===t)}function gl(e,t){return e.filter(e=>-1===ul.indexOf(e.pos)&&e.box.axis===t)}function fl(e,t){return e.sort((e,s)=>{const i=t?s:e,n=t?e:s;return i.weight===n.weight?i.index-n.index:i.weight-n.weight})}function ml(e){const t=[];let s,i,n,a,o,l;for(s=0,i=(e||[]).length;s<i;++s)n=e[s],({position:a,options:{stack:o,stackWeight:l=1}}=n),t.push({index:s,box:n,pos:a,horizontal:n.isHorizontal(),weight:n.weight,stack:o&&a+o,stackWeight:l});return t}function bl(e){const t={};for(const s of e){const{stack:e,pos:i,stackWeight:n}=s;if(!e||!ul.includes(i))continue;const a=t[e]||(t[e]={count:0,placed:0,weight:0,size:0});a.count++,a.weight+=n}return t}function yl(e,t){const s=bl(e),{vBoxMaxWidth:i,hBoxMaxHeight:n}=t;let a,o,l;for(a=0,o=e.length;a<o;++a){l=e[a];const{fullSize:o}=l.box,r=s[l.stack],d=r&&l.stackWeight/r.weight;l.horizontal?(l.width=d?d*i:o&&t.availableWidth,l.height=n):(l.width=i,l.height=d?d*n:o&&t.availableHeight)}return s}function xl(e){const t=ml(e),s=fl(t.filter(e=>e.box.fullSize),!0),i=fl(pl(t,"left"),!0),n=fl(pl(t,"right")),a=fl(pl(t,"top"),!0),o=fl(pl(t,"bottom")),l=gl(t,"x"),r=gl(t,"y");return{fullSize:s,leftAndTop:i.concat(a),rightAndBottom:n.concat(r).concat(o).concat(l),chartArea:pl(t,"chartArea"),vertical:i.concat(n).concat(r),horizontal:a.concat(o).concat(l)}}function vl(e,t,s,i){return Math.max(e[s],t[s])+Math.max(e[i],t[i])}function kl(e,t){e.top=Math.max(e.top,t.top),e.left=Math.max(e.left,t.left),e.bottom=Math.max(e.bottom,t.bottom),e.right=Math.max(e.right,t.right)}function _l(e,t,s,i){const{pos:n,box:a}=s,o=e.maxPadding;if(!Fs(n)){s.size&&(e[n]-=s.size);const t=i[s.stack]||{size:0,count:1};t.size=Math.max(t.size,s.horizontal?a.height:a.width),s.size=t.size/t.count,e[n]+=s.size}a.getPadding&&kl(o,a.getPadding());const l=Math.max(0,t.outerWidth-vl(o,e,"left","right")),r=Math.max(0,t.outerHeight-vl(o,e,"top","bottom")),d=l!==e.w,c=r!==e.h;return e.w=l,e.h=r,s.horizontal?{same:d,other:c}:{same:c,other:d}}function wl(e){const t=e.maxPadding;function s(s){const i=Math.max(t[s]-e[s],0);return e[s]+=i,i}e.y+=s("top"),e.x+=s("left"),s("right"),s("bottom")}function Cl(e,t){const s=t.maxPadding;function i(e){const i={left:0,top:0,right:0,bottom:0};return e.forEach(e=>{i[e]=Math.max(t[e],s[e])}),i}return i(e?["left","right"]:["top","bottom"])}function Sl(e,t,s,i){const n=[];let a,o,l,r,d,c;for(a=0,o=e.length,d=0;a<o;++a){l=e[a],r=l.box,r.update(l.width||t.w,l.height||t.h,Cl(l.horizontal,t));const{same:o,other:h}=_l(t,s,l,i);d|=o&&n.length,c=c||h,r.fullSize||n.push(l)}return d&&Sl(n,t,s,i)||c}function Fl(e,t,s,i,n){e.top=s,e.left=t,e.right=t+i,e.bottom=s+n,e.width=i,e.height=n}function Tl(e,t,s,i){const n=s.padding;let{x:a,y:o}=t;for(const l of e){const e=l.box,r=i[l.stack]||{count:1,placed:0,weight:1},d=l.stackWeight/r.weight||1;if(l.horizontal){const i=t.w*d,a=r.size||e.height;Hs(r.start)&&(o=r.start),e.fullSize?Fl(e,n.left,o,s.outerWidth-n.right-n.left,a):Fl(e,t.left+r.placed,o,i,a),r.start=o,r.placed+=i,o=e.bottom}else{const i=t.h*d,o=r.size||e.width;Hs(r.start)&&(a=r.start),e.fullSize?Fl(e,a,n.top,o,s.outerHeight-n.bottom-n.top):Fl(e,a,t.top+r.placed,o,i),r.start=a,r.placed+=i,a=e.right}}t.x=a,t.y=o}var Ml={addBox(e,t){e.boxes||(e.boxes=[]),t.fullSize=t.fullSize||!1,t.position=t.position||"top",t.weight=t.weight||0,t._layers=t._layers||function(){return[{z:0,draw(e){t.draw(e)}}]},e.boxes.push(t)},removeBox(e,t){const s=e.boxes?e.boxes.indexOf(t):-1;-1!==s&&e.boxes.splice(s,1)},configure(e,t,s){t.fullSize=s.fullSize,t.position=s.position,t.weight=s.weight},update(e,t,s,i){if(!e)return;const n=En(e.options.layout.padding),a=Math.max(t-n.width,0),o=Math.max(s-n.height,0),l=xl(e.boxes),r=l.vertical,d=l.horizontal;Vs(e.boxes,e=>{"function"===typeof e.beforeLayout&&e.beforeLayout()});const c=r.reduce((e,t)=>t.box.options&&!1===t.box.options.display?e:e+1,0)||1,h=Object.freeze({outerWidth:t,outerHeight:s,padding:n,availableWidth:a,availableHeight:o,vBoxMaxWidth:a/2/c,hBoxMaxHeight:o/2}),u=Object.assign({},n);kl(u,En(i));const p=Object.assign({maxPadding:u,w:a,h:o,x:n.left,y:n.top},n),g=yl(r.concat(d),h);Sl(l.fullSize,p,h,g),Sl(r,p,h,g),Sl(d,p,h,g)&&Sl(r,p,h,g),wl(p),Tl(l.leftAndTop,p,h,g),p.x+=p.w,p.y+=p.h,Tl(l.rightAndBottom,p,h,g),e.chartArea={left:p.left,top:p.top,right:p.left+p.w,bottom:p.top+p.h,height:p.h,width:p.w},Vs(l.chartArea,t=>{const s=t.box;Object.assign(s,e.chartArea),s.update(p.w,p.h,{left:0,top:0,right:0,bottom:0})})}};class Pl{acquireContext(e,t){}releaseContext(e){return!1}addEventListener(e,t,s){}removeEventListener(e,t,s){}getDevicePixelRatio(){return 1}getMaximumSize(e,t,s,i){return t=Math.max(0,t||e.width),s=s||e.height,{width:t,height:Math.max(0,i?Math.floor(t/i):s)}}isAttached(e){return!0}updateConfig(e){}}class Dl extends Pl{acquireContext(e){return e&&e.getContext&&e.getContext("2d")||null}updateConfig(e){e.options.animation=!1}}const Al="$chartjs",$l={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},Vl=e=>null===e||""===e;function Ll(e,t){const s=e.style,i=e.getAttribute("height"),n=e.getAttribute("width");if(e[Al]={initial:{height:i,width:n,style:{display:s.display,height:s.height,width:s.width}}},s.display=s.display||"block",s.boxSizing=s.boxSizing||"border-box",Vl(n)){const t=Aa(e,"width");void 0!==t&&(e.width=t)}if(Vl(i))if(""===e.style.height)e.height=e.width/(t||2);else{const t=Aa(e,"height");void 0!==t&&(e.height=t)}return e}const El=!!Da&&{passive:!0};function Ul(e,t,s){e&&e.addEventListener(t,s,El)}function Il(e,t,s){e&&e.canvas&&e.canvas.removeEventListener(t,s,El)}function Ol(e,t){const s=$l[e.type]||e.type,{x:i,y:n}=Sa(e,t);return{type:s,chart:t,native:e,x:void 0!==i?i:null,y:void 0!==n?n:null}}function Rl(e,t){for(const s of e)if(s===t||s.contains(t))return!0}function Wl(e,t,s){const i=e.canvas,n=new MutationObserver(e=>{let t=!1;for(const s of e)t=t||Rl(s.addedNodes,i),t=t&&!Rl(s.removedNodes,i);t&&s()});return n.observe(document,{childList:!0,subtree:!0}),n}function Bl(e,t,s){const i=e.canvas,n=new MutationObserver(e=>{let t=!1;for(const s of e)t=t||Rl(s.removedNodes,i),t=t&&!Rl(s.addedNodes,i);t&&s()});return n.observe(document,{childList:!0,subtree:!0}),n}const zl=new Map;let Nl=0;function jl(){const e=window.devicePixelRatio;e!==Nl&&(Nl=e,zl.forEach((t,s)=>{s.currentDevicePixelRatio!==e&&t()}))}function ql(e,t){zl.size||window.addEventListener("resize",jl),zl.set(e,t)}function Hl(e){zl.delete(e),zl.size||window.removeEventListener("resize",jl)}function Xl(e,t,s){const i=e.canvas,n=i&&ba(i);if(!n)return;const a=Vi((e,t)=>{const i=n.clientWidth;s(e,t),i<n.clientWidth&&s()},window),o=new ResizeObserver(e=>{const t=e[0],s=t.contentRect.width,i=t.contentRect.height;0===s&&0===i||a(s,i)});return o.observe(n),ql(e,a),o}function Kl(e,t,s){s&&s.disconnect(),"resize"===t&&Hl(e)}function Ql(e,t,s){const i=e.canvas,n=Vi(t=>{null!==e.ctx&&s(Ol(t,e))},e);return Ul(i,t,n),n}class Yl extends Pl{acquireContext(e,t){const s=e&&e.getContext&&e.getContext("2d");return s&&s.canvas===e?(Ll(e,t),s):null}releaseContext(e){const t=e.canvas;if(!t[Al])return!1;const s=t[Al].initial;["height","width"].forEach(e=>{const i=s[e];Cs(i)?t.removeAttribute(e):t.setAttribute(e,i)});const i=s.style||{};return Object.keys(i).forEach(e=>{t.style[e]=i[e]}),t.width=t.width,delete t[Al],!0}addEventListener(e,t,s){this.removeEventListener(e,t);const i=e.$proxies||(e.$proxies={}),n={attach:Wl,detach:Bl,resize:Xl},a=n[t]||Ql;i[t]=a(e,t,s)}removeEventListener(e,t){const s=e.$proxies||(e.$proxies={}),i=s[t];if(!i)return;const n={attach:Kl,detach:Kl,resize:Kl},a=n[t]||Il;a(e,t,i),s[t]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(e,t,s,i){return Ma(e,t,s,i)}isAttached(e){const t=e&&ba(e);return!(!t||!t.isConnected)}}function Gl(e){return!ma()||"undefined"!==typeof OffscreenCanvas&&e instanceof OffscreenCanvas?Dl:Yl}class Jl{constructor(){(0,Dt.A)(this,"x",void 0),(0,Dt.A)(this,"y",void 0),(0,Dt.A)(this,"active",!1),(0,Dt.A)(this,"options",void 0),(0,Dt.A)(this,"$animations",void 0)}tooltipPosition(e){const{x:t,y:s}=this.getProps(["x","y"],e);return{x:t,y:s}}hasValue(){return ci(this.x)&&ci(this.y)}getProps(e,t){const s=this.$animations;if(!t||!s)return this;const i={};return e.forEach(e=>{i[e]=s[e]&&s[e].active()?s[e]._to:this[e]}),i}}function Zl(e,t){const s=e.options.ticks,i=er(e),n=Math.min(s.maxTicksLimit||i,i),a=s.major.enabled?sr(t):[],o=a.length,l=a[0],r=a[o-1],d=[];if(o>n)return ir(t,d,a,o/n),d;const c=tr(a,t,n);if(o>0){let e,s;const i=o>1?Math.round((r-l)/(o-1)):null;for(nr(t,d,c,Cs(i)?0:l-i,l),e=0,s=o-1;e<s;e++)nr(t,d,c,a[e],a[e+1]);return nr(t,d,c,r,Cs(i)?t.length:r+i),d}return nr(t,d,c),d}function er(e){const t=e.options.offset,s=e._tickSize(),i=e._length/s+(t?0:1),n=e._maxLength/s;return Math.floor(Math.min(i,n))}function tr(e,t,s){const i=ar(e),n=t.length/s;if(!i)return Math.max(n,1);const a=ri(i);for(let o=0,l=a.length-1;o<l;o++){const e=a[o];if(e>n)return e}return Math.max(n,1)}function sr(e){const t=[];let s,i;for(s=0,i=e.length;s<i;s++)e[s].major&&t.push(s);return t}function ir(e,t,s,i){let n,a=0,o=s[0];for(i=Math.ceil(i),n=0;n<e.length;n++)n===o&&(t.push(e[n]),a++,o=s[a*i])}function nr(e,t,s,i,n){const a=Ps(i,0),o=Math.min(Ps(n,e.length),e.length);let l,r,d,c=0;s=Math.ceil(s),n&&(l=n-i,s=l/Math.floor(l/s)),d=a;while(d<0)c++,d=Math.round(a+c*s);for(r=Math.max(a,0);r<o;r++)r===d&&(t.push(e[r]),c++,d=Math.round(a+c*s))}function ar(e){const t=e.length;let s,i;if(t<2)return!1;for(i=e[0],s=1;s<t;++s)if(e[s]-e[s-1]!==i)return!1;return i}(0,Dt.A)(Jl,"defaults",{}),(0,Dt.A)(Jl,"defaultRoutes",void 0);const or=e=>"left"===e?"right":"right"===e?"left":e,lr=(e,t,s)=>"top"===t||"left"===t?e[t]+s:e[t]-s,rr=(e,t)=>Math.min(t||e,e);function dr(e,t){const s=[],i=e.length/t,n=e.length;let a=0;for(;a<n;a+=i)s.push(e[Math.floor(a)]);return s}function cr(e,t,s){const i=e.ticks.length,n=Math.min(t,i-1),a=e._startPixel,o=e._endPixel,l=1e-6;let r,d=e.getPixelForTick(n);if(!(s&&(r=1===i?Math.max(d-a,o-d):0===t?(e.getPixelForTick(1)-d)/2:(d-e.getPixelForTick(n-1))/2,d+=n<t?r:-r,d<a-l||d>o+l)))return d}function hr(e,t){Vs(e,e=>{const s=e.gc,i=s.length/2;let n;if(i>t){for(n=0;n<i;++n)delete e.data[s[n]];s.splice(0,i)}})}function ur(e){return e.drawTicks?e.tickLength:0}function pr(e,t){if(!e.display)return 0;const s=Un(e.font,t),i=En(e.padding),n=Ss(e.text)?e.text.length:1;return n*s.lineHeight+i.height}function gr(e,t){return Rn(e,{scale:t,type:"scale"})}function fr(e,t,s){return Rn(e,{tick:s,index:t,type:"tick"})}function mr(e,t,s){let i=Ei(e);return(s&&"right"!==t||!s&&"right"===t)&&(i=or(i)),i}function br(e,t,s,i){const{top:n,left:a,bottom:o,right:l,chart:r}=e,{chartArea:d,scales:c}=r;let h,u,p,g=0;const f=o-n,m=l-a;if(e.isHorizontal()){if(u=Ui(i,a,l),Fs(s)){const e=Object.keys(s)[0],i=s[e];p=c[e].getPixelForValue(i)+f-t}else p="center"===s?(d.bottom+d.top)/2+f-t:lr(e,s,t);h=l-a}else{if(Fs(s)){const e=Object.keys(s)[0],i=s[e];u=c[e].getPixelForValue(i)-m+t}else u="center"===s?(d.left+d.right)/2-m+t:lr(e,s,t);p=Ui(i,o,n),g="left"===s?-ti:ti}return{titleX:u,titleY:p,maxWidth:h,rotation:g}}class yr extends Jl{constructor(e){super(),this.id=e.id,this.type=e.type,this.options=void 0,this.ctx=e.ctx,this.chart=e.chart,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this._margins={left:0,right:0,top:0,bottom:0},this.maxWidth=void 0,this.maxHeight=void 0,this.paddingTop=void 0,this.paddingBottom=void 0,this.paddingLeft=void 0,this.paddingRight=void 0,this.axis=void 0,this.labelRotation=void 0,this.min=void 0,this.max=void 0,this._range=void 0,this.ticks=[],this._gridLineItems=null,this._labelItems=null,this._labelSizes=null,this._length=0,this._maxLength=0,this._longestTextCache={},this._startPixel=void 0,this._endPixel=void 0,this._reversePixels=!1,this._userMax=void 0,this._userMin=void 0,this._suggestedMax=void 0,this._suggestedMin=void 0,this._ticksLength=0,this._borderValue=0,this._cache={},this._dataLimitsCached=!1,this.$context=void 0}init(e){this.options=e.setContext(this.getContext()),this.axis=e.axis,this._userMin=this.parse(e.min),this._userMax=this.parse(e.max),this._suggestedMin=this.parse(e.suggestedMin),this._suggestedMax=this.parse(e.suggestedMax)}parse(e,t){return e}getUserBounds(){let{_userMin:e,_userMax:t,_suggestedMin:s,_suggestedMax:i}=this;return e=Ms(e,Number.POSITIVE_INFINITY),t=Ms(t,Number.NEGATIVE_INFINITY),s=Ms(s,Number.POSITIVE_INFINITY),i=Ms(i,Number.NEGATIVE_INFINITY),{min:Ms(e,s),max:Ms(t,i),minDefined:Ts(e),maxDefined:Ts(t)}}getMinMax(e){let t,{min:s,max:i,minDefined:n,maxDefined:a}=this.getUserBounds();if(n&&a)return{min:s,max:i};const o=this.getMatchingVisibleMetas();for(let l=0,r=o.length;l<r;++l)t=o[l].controller.getMinMax(this,e),n||(s=Math.min(s,t.min)),a||(i=Math.max(i,t.max));return s=a&&s>i?i:s,i=n&&s>i?s:i,{min:Ms(s,Ms(i,s)),max:Ms(i,Ms(s,i))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const e=this.chart.data;return this.options.labels||(this.isHorizontal()?e.xLabels:e.yLabels)||e.labels||[]}
vendor: 10,495 bytes, line 22
22getLabelItems(e=this.chart.chartArea){const t=this._labelItems||(this._labelItems=this._computeLabelItems(e));return t}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){$s(this.options.beforeUpdate,[this])}update(e,t,s){const{beginAtZero:i,grace:n,ticks:a}=this.options,o=a.sampleSize;this.beforeUpdate(),this.maxWidth=e,this.maxHeight=t,this._margins=s=Object.assign({left:0,right:0,top:0,bottom:0},s),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+s.left+s.right:this.height+s.top+s.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=On(this,n,i),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const l=o<this.ticks.length;this._convertTicksToLabels(l?dr(this.ticks,o):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),a.display&&(a.autoSkip||"auto"===a.source)&&(this.ticks=Zl(this,this.ticks),this._labelSizes=null,this.afterAutoSkip()),l&&this._convertTicksToLabels(this.ticks),this.beforeFit(),this.fit(),this.afterFit(),this.afterUpdate()}configure(){let e,t,s=this.options.reverse;this.isHorizontal()?(e=this.left,t=this.right):(e=this.top,t=this.bottom,s=!s),this._startPixel=e,this._endPixel=t,this._reversePixels=s,this._length=t-e,this._alignToPixels=this.options.alignToPixels}afterUpdate(){$s(this.options.afterUpdate,[this])}beforeSetDimensions(){$s(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(){$s(this.options.afterSetDimensions,[this])}_callHooks(e){this.chart.notifyPlugins(e,this.getContext()),$s(this.options[e],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){$s(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(e){const t=this.options.ticks;let s,i,n;for(s=0,i=e.length;s<i;s++)n=e[s],n.label=$s(t.callback,[n.value,s,e],this)}afterTickToLabelConversion(){$s(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){$s(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){const e=this.options,t=e.ticks,s=rr(this.ticks.length,e.ticks.maxTicksLimit),i=t.minRotation||0,n=t.maxRotation;let a,o,l,r=i;if(!this._isVisible()||!t.display||i>=n||s<=1||!this.isHorizontal())return void(this.labelRotation=i);const d=this._getLabelSizes(),c=d.widest.width,h=d.highest.height,u=ki(this.chart.width-c,0,this.maxWidth);a=e.offset?this.maxWidth/s:u/(s-1),c+6>a&&(a=u/(s-(e.offset?.5:1)),o=this.maxHeight-ur(e.grid)-t.padding-pr(e.title,this.chart.options.font),l=Math.sqrt(c*c+h*h),r=gi(Math.min(Math.asin(ki((d.highest.height+6)/a,-1,1)),Math.asin(ki(o/l,-1,1))-Math.asin(ki(h/l,-1,1)))),r=Math.max(i,Math.min(n,r))),this.labelRotation=r}afterCalculateLabelRotation(){$s(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){$s(this.options.beforeFit,[this])}fit(){const e={width:0,height:0},{chart:t,options:{ticks:s,title:i,grid:n}}=this,a=this._isVisible(),o=this.isHorizontal();if(a){const a=pr(i,t.options.font);if(o?(e.width=this.maxWidth,e.height=ur(n)+a):(e.height=this.maxHeight,e.width=ur(n)+a),s.display&&this.ticks.length){const{first:t,last:i,widest:n,highest:a}=this._getLabelSizes(),l=2*s.padding,r=pi(this.labelRotation),d=Math.cos(r),c=Math.sin(r);if(o){const t=s.mirror?0:c*n.width+d*a.height;e.height=Math.min(this.maxHeight,e.height+t+l)}else{const t=s.mirror?0:d*n.width+c*a.height;e.width=Math.min(this.maxWidth,e.width+t+l)}this._calculatePadding(t,i,c,d)}}this._handleMargins(),o?(this.width=this._length=t.width-this._margins.left-this._margins.right,this.height=e.height):(this.width=e.width,this.height=this._length=t.height-this._margins.top-this._margins.bottom)}_calculatePadding(e,t,s,i){const{ticks:{align:n,padding:a},position:o}=this.options,l=0!==this.labelRotation,r="top"!==o&&"x"===this.axis;if(this.isHorizontal()){const o=this.getPixelForTick(0)-this.left,d=this.right-this.getPixelForTick(this.ticks.length-1);let c=0,h=0;l?r?(c=i*e.width,h=s*t.height):(c=s*e.height,h=i*t.width):"start"===n?h=t.width:"end"===n?c=e.width:"inner"!==n&&(c=e.width/2,h=t.width/2),this.paddingLeft=Math.max((c-o+a)*this.width/(this.width-o),0),this.paddingRight=Math.max((h-d+a)*this.width/(this.width-d),0)}else{let s=t.height/2,i=e.height/2;"start"===n?(s=0,i=e.height):"end"===n&&(s=t.height,i=0),this.paddingTop=s+a,this.paddingBottom=i+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(){$s(this.options.afterFit,[this])}isHorizontal(){const{axis:e,position:t}=this.options;return"top"===t||"bottom"===t||"x"===e}isFullSize(){return this.options.fullSize}_convertTicksToLabels(e){let t,s;for(this.beforeTickToLabelConversion(),this.generateTickLabels(e),t=0,s=e.length;t<s;t++)Cs(e[t].label)&&(e.splice(t,1),s--,t--);this.afterTickToLabelConversion()}_getLabelSizes(){let e=this._labelSizes;if(!e){const t=this.options.ticks.sampleSize;let s=this.ticks;t<s.length&&(s=dr(s,t)),this._labelSizes=e=this._computeLabelSizes(s,s.length,this.options.ticks.maxTicksLimit)}return e}_computeLabelSizes(e,t,s){const{ctx:i,_longestTextCache:n}=this,a=[],o=[],l=Math.floor(t/rr(t,s));let r,d,c,h,u,p,g,f,m,b,y,x=0,v=0;for(r=0;r<t;r+=l){if(h=e[r].label,u=this._resolveTickFontOptions(r),i.font=p=u.string,g=n[p]=n[p]||{data:{},gc:[]},f=u.lineHeight,m=b=0,Cs(h)||Ss(h)){if(Ss(h))for(d=0,c=h.length;d<c;++d)y=h[d],Cs(y)||Ss(y)||(m=un(i,g.data,g.gc,m,y),b+=f)}else m=un(i,g.data,g.gc,m,h),b=f;a.push(m),o.push(b),x=Math.max(m,x),v=Math.max(b,v)}hr(n,t);const k=a.indexOf(x),_=o.indexOf(v),w=e=>({width:a[e]||0,height:o[e]||0});return{first:w(0),last:w(t-1),widest:w(k),highest:w(_),widths:a,heights:o}}getLabelForValue(e){return e}getPixelForValue(e,t){return NaN}getValueForPixel(e){}getPixelForTick(e){const t=this.ticks;return e<0||e>t.length-1?null:this.getPixelForValue(t[e].value)}getPixelForDecimal(e){this._reversePixels&&(e=1-e);const t=this._startPixel+e*this._length;return _i(this._alignToPixels?gn(this.chart,t,0):t)}getDecimalForPixel(e){const t=(e-this._startPixel)/this._length;return this._reversePixels?1-t:t}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:e,max:t}=this;return e<0&&t<0?t:e>0&&t>0?e:0}getContext(e){const t=this.ticks||[];if(e>=0&&e<t.length){const s=t[e];return s.$context||(s.$context=fr(this.getContext(),e,s))}return this.$context||(this.$context=gr(this.chart.getContext(),this))}_tickSize(){const e=this.options.ticks,t=pi(this.labelRotation),s=Math.abs(Math.cos(t)),i=Math.abs(Math.sin(t)),n=this._getLabelSizes(),a=e.autoSkipPadding||0,o=n?n.widest.width+a:0,l=n?n.highest.height+a:0;return this.isHorizontal()?l*s>o*i?o/s:l/i:l*i<o*s?l/s:o/i}_isVisible(){const e=this.options.display;return"auto"!==e?!!e:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(e){const t=this.axis,s=this.chart,i=this.options,{grid:n,position:a,border:o}=i,l=n.offset,r=this.isHorizontal(),d=this.ticks,c=d.length+(l?1:0),h=ur(n),u=[],p=o.setContext(this.getContext()),g=p.display?p.width:0,f=g/2,m=function(e){return gn(s,e,g)};let b,y,x,v,k,_,w,C,S,F,T,M;if("top"===a)b=m(this.bottom),_=this.bottom-h,C=b-f,F=m(e.top)+f,M=e.bottom;else if("bottom"===a)b=m(this.top),F=e.top,M=m(e.bottom)-f,_=b+f,C=this.top+h;else if("left"===a)b=m(this.right),k=this.right-h,w=b-f,S=m(e.left)+f,T=e.right;else if("right"===a)b=m(this.left),S=e.left,T=m(e.right)-f,k=b+f,w=this.left+h;else if("x"===t){if("center"===a)b=m((e.top+e.bottom)/2+.5);else if(Fs(a)){const e=Object.keys(a)[0],t=a[e];b=m(this.chart.scales[e].getPixelForValue(t))}F=e.top,M=e.bottom,_=b+f,C=_+h}else if("y"===t){if("center"===a)b=m((e.left+e.right)/2);else if(Fs(a)){const e=Object.keys(a)[0],t=a[e];b=m(this.chart.scales[e].getPixelForValue(t))}k=b-f,w=k-h,S=e.left,T=e.right}const P=Ps(i.ticks.maxTicksLimit,c),D=Math.max(1,Math.ceil(c/P));for(y=0;y<c;y+=D){const e=this.getContext(y),t=n.setContext(e),i=o.setContext(e),a=t.lineWidth,d=t.color,c=i.dash||[],h=i.dashOffset,p=t.tickWidth,g=t.tickColor,f=t.tickBorderDash||[],m=t.tickBorderDashOffset;x=cr(this,y,l),void 0!==x&&(v=gn(s,x,a),r?k=w=S=T=v:_=C=F=M=v,u.push({tx1:k,ty1:_,tx2:w,ty2:C,x1:S,y1:F,x2:T,y2:M,width:a,color:d,borderDash:c,borderDashOffset:h,tickWidth:p,tickColor:g,tickBorderDash:f,tickBorderDashOffset:m}))}return this._ticksLength=c,this._borderValue=b,u}_computeLabelItems(e){const t=this.axis,s=this.options,{position:i,ticks:n}=s,a=this.isHorizontal(),o=this.ticks,{align:l,crossAlign:r,padding:d,mirror:c}=n,h=ur(s.grid),u=h+d,p=c?-d:u,g=-pi(this.labelRotation),f=[];let m,b,y,x,v,k,_,w,C,S,F,T,M="middle";if("top"===i)k=this.bottom-p,_=this._getXAxisLabelAlignment();else if("bottom"===i)k=this.top+p,_=this._getXAxisLabelAlignment();else if("left"===i){const e=this._getYAxisLabelAlignment(h);_=e.textAlign,v=e.x}else if("right"===i){const e=this._getYAxisLabelAlignment(h);_=e.textAlign,v=e.x}else if("x"===t){if("center"===i)k=(e.top+e.bottom)/2+u;else if(Fs(i)){const e=Object.keys(i)[0],t=i[e];k=this.chart.scales[e].getPixelForValue(t)+u}_=this._getXAxisLabelAlignment()}else if("y"===t){if("center"===i)v=(e.left+e.right)/2-u;else if(Fs(i)){const e=Object.keys(i)[0],t=i[e];v=this.chart.scales[e].getPixelForValue(t)}_=this._getYAxisLabelAlignment(h).textAlign}"y"===t&&("start"===l?M="top":"end"===l&&(M="bottom"));const P=this._getLabelSizes();for(m=0,b=o.length;m<b;++m){y=o[m],x=y.label;const e=n.setContext(this.getContext(m));w=this.getPixelForTick(m)+n.labelOffset,C=this._resolveTickFontOptions(m),S=C.lineHeight,F=Ss(x)?x.length:1;const t=F/2,s=e.color,l=e.textStrokeColor,d=e.textStrokeWidth;let h,u=_;
22if(a?(v=w,"inner"===_&&(u=m===b-1?this.options.reverse?"left":"right":0===m?this.options.reverse?"right":"left":"center"),T="top"===i?"near"===r||0!==g?-F*S+S/2:"center"===r?-P.highest.height/2-t*S+S:-P.highest.height+S/2:"near"===r||0!==g?S/2:"center"===r?P.highest.height/2-t*S:P.highest.height-F*S,c&&(T*=-1),0===g||e.showLabelBackdrop||(v+=S/2*Math.sin(g))):(k=w,T=(1-F)*S/2),e.showLabelBackdrop){const t=En(e.backdropPadding),s=P.heights[m],i=P.widths[m];let n=T-t.top,a=0-t.left;switch(M){case"middle":n-=s/2;break;case"bottom":n-=s;break}switch(_){case"center":a-=i/2;break;case"right":a-=i;break;case"inner":m===b-1?a-=i:m>0&&(a-=i/2);break}h={left:a,top:n,width:i+t.width,height:s+t.height,color:e.backdropColor}}f.push({label:x,font:C,textOffset:T,options:{rotation:g,color:s,strokeColor:l,strokeWidth:d,textAlign:u,textBaseline:M,translation:[v,k],backdrop:h}})}return f}_getXAxisLabelAlignment(){const{position:e,ticks:t}=this.options,s=-pi(this.labelRotation);if(s)return"top"===e?"left":"right";let i="center";return"start"===t.align?i="left":"end"===t.align?i="right":"inner"===t.align&&(i="inner"),i}_getYAxisLabelAlignment(e){const{position:t,ticks:{crossAlign:s,mirror:i,padding:n}}=this.options,a=this._getLabelSizes(),o=e+n,l=a.widest.width;let r,d;return"left"===t?i?(d=this.right+n,"near"===s?r="left":"center"===s?(r="center",d+=l/2):(r="right",d+=l)):(d=this.right-o,"near"===s?r="right":"center"===s?(r="center",d-=l/2):(r="left",d=this.left)):"right"===t?i?(d=this.left+n,"near"===s?r="right":"center"===s?(r="center",d-=l/2):(r="left",d-=l)):(d=this.left+o,"near"===s?r="left":"center"===s?(r="center",d+=l/2):(r="right",d=this.right)):r="right",{textAlign:r,x:d}}_computeLabelArea(){if(this.options.ticks.mirror)return;const e=this.chart,t=this.options.position;return"left"===t||"right"===t?{top:0,left:this.left,bottom:e.height,right:this.right}
vendor: 7,750 bytes, line 22
22:"top"===t||"bottom"===t?{top:this.top,left:0,bottom:this.bottom,right:e.width}:void 0}drawBackground(){const{ctx:e,options:{backgroundColor:t},left:s,top:i,width:n,height:a}=this;t&&(e.save(),e.fillStyle=t,e.fillRect(s,i,n,a),e.restore())}getLineWidthForValue(e){const t=this.options.grid;if(!this._isVisible()||!t.display)return 0;const s=this.ticks,i=s.findIndex(t=>t.value===e);if(i>=0){const e=t.setContext(this.getContext(i));return e.lineWidth}return 0}drawGrid(e){const t=this.options.grid,s=this.ctx,i=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(e));let n,a;const o=(e,t,i)=>{i.width&&i.color&&(s.save(),s.lineWidth=i.width,s.strokeStyle=i.color,s.setLineDash(i.borderDash||[]),s.lineDashOffset=i.borderDashOffset,s.beginPath(),s.moveTo(e.x,e.y),s.lineTo(t.x,t.y),s.stroke(),s.restore())};if(t.display)for(n=0,a=i.length;n<a;++n){const e=i[n];t.drawOnChartArea&&o({x:e.x1,y:e.y1},{x:e.x2,y:e.y2},e),t.drawTicks&&o({x:e.tx1,y:e.ty1},{x:e.tx2,y:e.ty2},{color:e.tickColor,width:e.tickWidth,borderDash:e.tickBorderDash,borderDashOffset:e.tickBorderDashOffset})}}drawBorder(){const{chart:e,ctx:t,options:{border:s,grid:i}}=this,n=s.setContext(this.getContext()),a=s.display?n.width:0;if(!a)return;const o=i.setContext(this.getContext(0)).lineWidth,l=this._borderValue;let r,d,c,h;this.isHorizontal()?(r=gn(e,this.left,a)-a/2,d=gn(e,this.right,o)+o/2,c=h=l):(c=gn(e,this.top,a)-a/2,h=gn(e,this.bottom,o)+o/2,r=d=l),t.save(),t.lineWidth=n.width,t.strokeStyle=n.color,t.beginPath(),t.moveTo(r,c),t.lineTo(d,h),t.stroke(),t.restore()}drawLabels(e){const t=this.options.ticks;if(!t.display)return;const s=this.ctx,i=this._computeLabelArea();i&&xn(s,i);const n=this.getLabelItems(e);for(const a of n){const e=a.options,t=a.font,i=a.label,n=a.textOffset;Fn(s,i,0,n,t,e)}i&&vn(s)}drawTitle(){const{ctx:e,options:{position:t,title:s,reverse:i}}=this;if(!s.display)return;const n=Un(s.font),a=En(s.padding),o=s.align;let l=n.lineHeight/2;"bottom"===t||"center"===t||Fs(t)?(l+=a.bottom,Ss(s.text)&&(l+=n.lineHeight*(s.text.length-1))):l+=a.top;const{titleX:r,titleY:d,maxWidth:c,rotation:h}=br(this,l,t,o);Fn(e,s.text,0,0,n,{color:s.color,maxWidth:c,rotation:h,textAlign:mr(o,t,i),textBaseline:"middle",translation:[r,d]})}draw(e){this._isVisible()&&(this.drawBackground(),this.drawGrid(e),this.drawBorder(),this.drawTitle(),this.drawLabels(e))}_layers(){const e=this.options,t=e.ticks&&e.ticks.z||0,s=Ps(e.grid&&e.grid.z,-1),i=Ps(e.border&&e.border.z,0);return this._isVisible()&&this.draw===yr.prototype.draw?[{z:s,draw:e=>{this.drawBackground(),this.drawGrid(e),this.drawTitle()}},{z:i,draw:()=>{this.drawBorder()}},{z:t,draw:e=>{this.drawLabels(e)}}]:[{z:t,draw:e=>{this.draw(e)}}]}getMatchingVisibleMetas(e){const t=this.chart.getSortedVisibleDatasetMetas(),s=this.axis+"AxisID",i=[];let n,a;for(n=0,a=t.length;n<a;++n){const a=t[n];a[s]!==this.id||e&&a.type!==e||i.push(a)}return i}_resolveTickFontOptions(e){const t=this.options.ticks.setContext(this.getContext(e));return Un(t.font)}_maxDigits(){const e=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/e}}class xr{constructor(e,t,s){this.type=e,this.scope=t,this.override=s,this.items=Object.create(null)}isForType(e){return Object.prototype.isPrototypeOf.call(this.type.prototype,e.prototype)}register(e){const t=Object.getPrototypeOf(e);let s;_r(t)&&(s=this.register(t));const i=this.items,n=e.id,a=this.scope+"."+n;if(!n)throw new Error("class does not have id: "+e);return n in i||(i[n]=e,vr(e,a,s),this.override&&cn.override(e.id,e.overrides)),a}get(e){return this.items[e]}unregister(e){const t=this.items,s=e.id,i=this.scope;s in t&&delete t[s],i&&s in cn[i]&&(delete cn[i][s],this.override&&delete an[s])}}function vr(e,t,s){const i=Os(Object.create(null),[s?cn.get(s):{},cn.get(t),e.defaults]);cn.set(t,i),e.defaultRoutes&&kr(t,e.defaultRoutes),e.descriptors&&cn.describe(t,e.descriptors)}function kr(e,t){Object.keys(t).forEach(s=>{const i=s.split("."),n=i.pop(),a=[e].concat(i).join("."),o=t[s].split("."),l=o.pop(),r=o.join(".");cn.route(a,n,r,l)})}function _r(e){return"id"in e&&"defaults"in e}class wr{constructor(){this.controllers=new xr(Po,"datasets",!0),this.elements=new xr(Jl,"elements"),this.plugins=new xr(Object,"plugins"),this.scales=new xr(yr,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...e){this._each("register",e)}remove(...e){this._each("unregister",e)}addControllers(...e){this._each("register",e,this.controllers)}addElements(...e){this._each("register",e,this.elements)}addPlugins(...e){this._each("register",e,this.plugins)}addScales(...e){this._each("register",e,this.scales)}getController(e){return this._get(e,this.controllers,"controller")}getElement(e){return this._get(e,this.elements,"element")}getPlugin(e){return this._get(e,this.plugins,"plugin")}getScale(e){return this._get(e,this.scales,"scale")}removeControllers(...e){this._each("unregister",e,this.controllers)}removeElements(...e){this._each("unregister",e,this.elements)}removePlugins(...e){this._each("unregister",e,this.plugins)}removeScales(...e){this._each("unregister",e,this.scales)}_each(e,t,s){[...t].forEach(t=>{const i=s||this._getRegistryForType(t);s||i.isForType(t)||i===this.plugins&&t.id?this._exec(e,i,t):Vs(t,t=>{const i=s||this._getRegistryForType(t);this._exec(e,i,t)})})}_exec(e,t,s){const i=qs(e);$s(s["before"+i],[],s),t[e](s),$s(s["after"+i],[],s)}_getRegistryForType(e){for(let t=0;t<this._typedRegistries.length;t++){const s=this._typedRegistries[t];if(s.isForType(e))return s}return this.plugins}_get(e,t,s){const i=t.get(e);if(void 0===i)throw new Error('"'+e+'" is not a registered '+s+".");return i}}var Cr=new wr;class Sr{constructor(){this._init=void 0}notify(e,t,s,i){if("beforeInit"===t&&(this._init=this._createDescriptors(e,!0),this._notify(this._init,e,"install")),void 0===this._init)return;const n=i?this._descriptors(e).filter(i):this._descriptors(e),a=this._notify(n,e,t,s);return"afterDestroy"===t&&(this._notify(n,e,"stop"),this._notify(this._init,e,"uninstall"),this._init=void 0),a}_notify(e,t,s,i){i=i||{};for(const n of e){const e=n.plugin,a=e[s],o=[t,i,n.options];if(!1===$s(a,o,e)&&i.cancelable)return!1}return!0}invalidate(){Cs(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(e){if(this._cache)return this._cache;const t=this._cache=this._createDescriptors(e);return this._notifyStateChanges(e),t}_createDescriptors(e,t){const s=e&&e.config,i=Ps(s.options&&s.options.plugins,{}),n=Fr(s);return!1!==i||t?Mr(e,n,i,t):[]}_notifyStateChanges(e){const t=this._oldCache||[],s=this._cache,i=(e,t)=>e.filter(e=>!t.some(t=>e.plugin.id===t.plugin.id));this._notify(i(t,s),e,"stop"),this._notify(i(s,t),e,"start")}}function Fr(e){const t={},s=[],i=Object.keys(Cr.plugins.items);for(let a=0;a<i.length;a++)s.push(Cr.getPlugin(i[a]));const n=e.plugins||[];for(let a=0;a<n.length;a++){const e=n[a];-1===s.indexOf(e)&&(s.push(e),t[e.id]=!0)}return{plugins:s,localIds:t}}function Tr(e,t){return t||!1!==e?!0===e?{}:e:null}function Mr(e,{plugins:t,localIds:s},i,n){const a=[],o=e.getContext();for(const l of t){const t=l.id,r=Tr(i[t],n);null!==r&&a.push({plugin:l,options:Pr(e.config,{plugin:l,local:s[t]},r,o)})}return a}function Pr(e,{plugin:t,local:s},i,n){const a=e.pluginScopeKeys(t),o=e.getOptionScopes(i,a);return s&&t.defaults&&o.push(t.defaults),e.createResolver(o,n,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function Dr(e,t){const s=cn.datasets[e]||{},i=(t.datasets||{})[e]||{};return i.indexAxis||t.indexAxis||s.indexAxis||"x"}function Ar(e,t){let s=e;return"_index_"===e?s=t:"_value_"===e&&(s="x"===t?"y":"x"),s}function $r(e,t){return e===t?"_index_":"_value_"}function Vr(e){if("x"===e||"y"===e||"r"===e)return e}
vendor: 4,716 bytes, line 22
22function Lr(e){return"top"===e||"bottom"===e?"x":"left"===e||"right"===e?"y":void 0}function Er(e,...t){if(Vr(e))return e;for(const s of t){const t=s.axis||Lr(s.position)||e.length>1&&Vr(e[0].toLowerCase());if(t)return t}throw new Error(`Cannot determine type of '${e}' axis. Please provide 'axis' or 'position' option.`)}function Ur(e,t,s){if(s[t+"AxisID"]===e)return{axis:t}}function Ir(e,t){if(t.data&&t.data.datasets){const s=t.data.datasets.filter(t=>t.xAxisID===e||t.yAxisID===e);if(s.length)return Ur(e,"x",s[0])||Ur(e,"y",s[0])}return{}}function Or(e,t){const s=an[e.type]||{scales:{}},i=t.scales||{},n=Dr(e.type,t),a=Object.create(null);return Object.keys(i).forEach(t=>{const o=i[t];if(!Fs(o))return console.error(`Invalid scale configuration for scale: ${t}`);if(o._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${t}`);const l=Er(t,o,Ir(t,e),cn.scales[o.type]),r=$r(l,n),d=s.scales||{};a[t]=Rs(Object.create(null),[{axis:l},o,d[l],d[r]])}),e.data.datasets.forEach(s=>{const n=s.type||e.type,o=s.indexAxis||Dr(n,t),l=an[n]||{},r=l.scales||{};Object.keys(r).forEach(e=>{const t=Ar(e,o),n=s[t+"AxisID"]||t;a[n]=a[n]||Object.create(null),Rs(a[n],[{axis:t},i[n],r[e]])})}),Object.keys(a).forEach(e=>{const t=a[e];Rs(t,[cn.scales[t.type],cn.scale])}),a}function Rr(e){const t=e.options||(e.options={});t.plugins=Ps(t.plugins,{}),t.scales=Or(e,t)}function Wr(e){return e=e||{},e.datasets=e.datasets||[],e.labels=e.labels||[],e}function Br(e){return e=e||{},e.data=Wr(e.data),Rr(e),e}const zr=new Map,Nr=new Set;function jr(e,t){let s=zr.get(e);return s||(s=t(),zr.set(e,s),Nr.add(s)),s}const qr=(e,t,s)=>{const i=js(t,s);void 0!==i&&e.add(i)};class Hr{constructor(e){this._config=Br(e),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(e){this._config.type=e}get data(){return this._config.data}set data(e){this._config.data=Wr(e)}get options(){return this._config.options}set options(e){this._config.options=e}get plugins(){return this._config.plugins}update(){const e=this._config;this.clearCache(),Rr(e)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(e){return jr(e,()=>[[`datasets.${e}`,""]])}datasetAnimationScopeKeys(e,t){return jr(`${e}.transition.${t}`,()=>[[`datasets.${e}.transitions.${t}`,`transitions.${t}`],[`datasets.${e}`,""]])}datasetElementScopeKeys(e,t){return jr(`${e}-${t}`,()=>[[`datasets.${e}.elements.${t}`,`datasets.${e}`,`elements.${t}`,""]])}pluginScopeKeys(e){const t=e.id,s=this.type;return jr(`${s}-plugin-${t}`,()=>[[`plugins.${t}`,...e.additionalOptionScopes||[]]])}_cachedScopes(e,t){const s=this._scopeCache;let i=s.get(e);return i&&!t||(i=new Map,s.set(e,i)),i}getOptionScopes(e,t,s){const{options:i,type:n}=this,a=this._cachedScopes(e,s),o=a.get(t);if(o)return o;const l=new Set;t.forEach(t=>{e&&(l.add(e),t.forEach(t=>qr(l,e,t))),t.forEach(e=>qr(l,i,e)),t.forEach(e=>qr(l,an[n]||{},e)),t.forEach(e=>qr(l,cn,e)),t.forEach(e=>qr(l,on,e))});const r=Array.from(l);return 0===r.length&&r.push(Object.create(null)),Nr.has(t)&&a.set(t,r),r}chartOptionScopes(){const{options:e,type:t}=this;return[e,an[t]||{},cn.datasets[t]||{},{type:t},cn,on]}resolveNamedOptions(e,t,s,i=[""]){const n={$shared:!0},{resolver:a,subPrefixes:o}=Xr(this._resolverCache,e,i);let l=a;if(Qr(a,t)){n.$shared=!1,s=Xs(s)?s():s;const t=this.createResolver(e,s,o);l=Bn(a,s,t)}for(const r of t)n[r]=l[r];return n}createResolver(e,t,s=[""],i){const{resolver:n}=Xr(this._resolverCache,e,s);return Fs(t)?Bn(n,t,void 0,i):n}}function Xr(e,t,s){let i=e.get(t);i||(i=new Map,e.set(t,i));const n=s.join();let a=i.get(n);if(!a){const e=Wn(t,s);a={resolver:e,subPrefixes:s.filter(e=>!e.toLowerCase().includes("hover"))},i.set(n,a)}return a}const Kr=e=>Fs(e)&&Object.getOwnPropertyNames(e).some(t=>Xs(e[t]));function Qr(e,t){const{isScriptable:s,isIndexable:i}=zn(e);for(const n of t){const t=s(n),a=i(n),o=(a||t)&&e[n];if(t&&(Xs(o)||Kr(o))||a&&Ss(o))return!0}return!1}var Yr="4.5.1";const Gr=["top","bottom","left","right","chartArea"];function Jr(e,t){return"top"===e||"bottom"===e||-1===Gr.indexOf(e)&&"x"===t}function Zr(e,t){return function(s,i){return s[e]===i[e]?s[t]-i[t]:s[e]-i[e]}}function ed(e){const t=e.chart,s=t.options.animation;t.notifyPlugins("afterRender"),$s(s&&s.onComplete,[e],t)}function td(e){const t=e.chart,s=t.options.animation;$s(s&&s.onProgress,[e],t)}function sd(e){return ma()&&"string"===typeof e?e=document.getElementById(e):e&&e.length&&(e=e[0]),e&&e.canvas&&(e=e.canvas),e}const id={},nd=e=>{const t=sd(e);return Object.values(id).filter(e=>e.canvas===t).pop()};function ad(e,t,s){const i=Object.keys(e);for(const n of i){const i=+n;
vendor: 4,686 bytes, line 22
22if(i>=t){const a=e[n];delete e[n],(s>0||i>t)&&(e[i+s]=a)}}}function od(e,t,s,i){return s&&"mouseout"!==e.type?i?t:e:null}class ld{static register(...e){Cr.add(...e),rd()}static unregister(...e){Cr.remove(...e),rd()}constructor(e,t){const s=this.config=new Hr(t),i=sd(e),n=nd(i);if(n)throw new Error("Canvas is already in use. Chart with ID '"+n.id+"' must be destroyed before the canvas with ID '"+n.canvas.id+"' can be reused.");const a=s.createResolver(s.chartOptionScopes(),this.getContext());this.platform=new(s.platform||Gl(i)),this.platform.updateConfig(s);const o=this.platform.acquireContext(i,a.aspectRatio),l=o&&o.canvas,r=l&&l.height,d=l&&l.width;this.id=ws(),this.ctx=o,this.canvas=l,this.width=d,this.height=r,this._options=a,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new Sr,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=Li(e=>this.update(e),a.resizeDelay||0),this._dataChanges=[],id[this.id]=this,o&&l?(so.listen(this,"complete",ed),so.listen(this,"progress",td),this._initialize(),this.attached&&this.update()):console.error("Failed to create chart: can't acquire context from the given item")}get aspectRatio(){const{options:{aspectRatio:e,maintainAspectRatio:t},width:s,height:i,_aspectRatio:n}=this;return Cs(e)?t&&n?n:i?s/i:null:e}get data(){return this.config.data}set data(e){this.config.data=e}get options(){return this._options}set options(e){this.config.options=e}get registry(){return Cr}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():Pa(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return fn(this.canvas,this.ctx),this}stop(){return so.stop(this),this}resize(e,t){so.running(this)?this._resizeBeforeDraw={width:e,height:t}:this._resize(e,t)}_resize(e,t){const s=this.options,i=this.canvas,n=s.maintainAspectRatio&&this.aspectRatio,a=this.platform.getMaximumSize(i,e,t,n),o=s.devicePixelRatio||this.platform.getDevicePixelRatio(),l=this.width?"resize":"attach";this.width=a.width,this.height=a.height,this._aspectRatio=this.aspectRatio,Pa(this,o,!0)&&(this.notifyPlugins("resize",{size:a}),$s(s.onResize,[this,a],this),this.attached&&this._doResize(l)&&this.render())}ensureScalesHaveIDs(){const e=this.options,t=e.scales||{};Vs(t,(e,t)=>{e.id=t})}buildOrUpdateScales(){const e=this.options,t=e.scales,s=this.scales,i=Object.keys(s).reduce((e,t)=>(e[t]=!1,e),{});let n=[];t&&(n=n.concat(Object.keys(t).map(e=>{const s=t[e],i=Er(e,s),n="r"===i,a="x"===i;return{options:s,dposition:n?"chartArea":a?"bottom":"left",dtype:n?"radialLinear":a?"category":"linear"}}))),Vs(n,t=>{const n=t.options,a=n.id,o=Er(a,n),l=Ps(n.type,t.dtype);void 0!==n.position&&Jr(n.position,o)===Jr(t.dposition)||(n.position=t.dposition),i[a]=!0;let r=null;if(a in s&&s[a].type===l)r=s[a];else{const e=Cr.getScale(l);r=new e({id:a,type:l,ctx:this.ctx,chart:this}),s[r.id]=r}r.init(n,e)}),Vs(i,(e,t)=>{e||delete s[t]}),Vs(s,e=>{Ml.configure(this,e,e.options),Ml.addBox(this,e)})}_updateMetasets(){const e=this._metasets,t=this.data.datasets.length,s=e.length;if(e.sort((e,t)=>e.index-t.index),s>t){for(let e=t;e<s;++e)this._destroyDatasetMeta(e);e.splice(t,s-t)}this._sortedMetasets=e.slice(0).sort(Zr("order","index"))}_removeUnreferencedMetasets(){const{_metasets:e,data:{datasets:t}}=this;e.length>t.length&&delete this._stacks,e.forEach((e,s)=>{0===t.filter(t=>t===e._dataset).length&&this._destroyDatasetMeta(s)})}buildOrUpdateControllers(){const e=[],t=this.data.datasets;let s,i;for(this._removeUnreferencedMetasets(),s=0,i=t.length;s<i;s++){const i=t[s];let n=this.getDatasetMeta(s);const a=i.type||this.config.type;if(n.type&&n.type!==a&&(this._destroyDatasetMeta(s),n=this.getDatasetMeta(s)),n.type=a,n.indexAxis=i.indexAxis||Dr(a,this.options),n.order=i.order||0,n.index=s,n.label=""+i.label,n.visible=this.isDatasetVisible(s),n.controller)n.controller.updateIndex(s),n.controller.linkScales();else{const t=Cr.getController(a),{datasetElementType:i,dataElementType:o}=cn.datasets[a];Object.assign(t,{dataElementType:Cr.getElement(o),datasetElementType:i&&Cr.getElement(i)}),n.controller=new t(this,s),e.push(n.controller)}}return this._updateMetasets(),e}_resetElements(){Vs(this.data.datasets,(e,t)=>{this.getDatasetMeta(t).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(e){const t=this.config;
vendor: 4,188 bytes, line 22
22t.update();const s=this._options=t.createResolver(t.chartOptionScopes(),this.getContext()),i=this._animationsDisabled=!s.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),!1===this.notifyPlugins("beforeUpdate",{mode:e,cancelable:!0}))return;const n=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let a=0;for(let r=0,d=this.data.datasets.length;r<d;r++){const{controller:e}=this.getDatasetMeta(r),t=!i&&-1===n.indexOf(e);e.buildOrUpdateElements(t),a=Math.max(+e.getMaxOverflow(),a)}a=this._minPadding=s.layout.autoPadding?a:0,this._updateLayout(a),i||Vs(n,e=>{e.reset()}),this._updateDatasets(e),this.notifyPlugins("afterUpdate",{mode:e}),this._layers.sort(Zr("z","_idx"));const{_active:o,_lastEvent:l}=this;l?this._eventHandler(l,!0):o.length&&this._updateHoverStyles(o,o,!0),this.render()}_updateScales(){Vs(this.scales,e=>{Ml.removeBox(this,e)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const e=this.options,t=new Set(Object.keys(this._listeners)),s=new Set(e.events);Ks(t,s)&&!!this._responsiveListeners===e.responsive||(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:e}=this,t=this._getUniformDataChanges()||[];for(const{method:s,start:i,count:n}of t){const t="_removeElements"===s?-n:n;ad(e,i,t)}}_getUniformDataChanges(){const e=this._dataChanges;if(!e||!e.length)return;this._dataChanges=[];const t=this.data.datasets.length,s=t=>new Set(e.filter(e=>e[0]===t).map((e,t)=>t+","+e.splice(1).join(","))),i=s(0);for(let n=1;n<t;n++)if(!Ks(i,s(n)))return;return Array.from(i).map(e=>e.split(",")).map(e=>({method:e[1],start:+e[2],count:+e[3]}))}_updateLayout(e){if(!1===this.notifyPlugins("beforeLayout",{cancelable:!0}))return;Ml.update(this,this.width,this.height,e);const t=this.chartArea,s=t.width<=0||t.height<=0;this._layers=[],Vs(this.boxes,e=>{s&&"chartArea"===e.position||(e.configure&&e.configure(),this._layers.push(...e._layers()))},this),this._layers.forEach((e,t)=>{e._idx=t}),this.notifyPlugins("afterLayout")}_updateDatasets(e){if(!1!==this.notifyPlugins("beforeDatasetsUpdate",{mode:e,cancelable:!0})){for(let e=0,t=this.data.datasets.length;e<t;++e)this.getDatasetMeta(e).controller.configure();for(let t=0,s=this.data.datasets.length;t<s;++t)this._updateDataset(t,Xs(e)?e({datasetIndex:t}):e);this.notifyPlugins("afterDatasetsUpdate",{mode:e})}}_updateDataset(e,t){const s=this.getDatasetMeta(e),i={meta:s,index:e,mode:t,cancelable:!0};!1!==this.notifyPlugins("beforeDatasetUpdate",i)&&(s.controller._update(t),i.cancelable=!1,this.notifyPlugins("afterDatasetUpdate",i))}render(){!1!==this.notifyPlugins("beforeRender",{cancelable:!0})&&(so.has(this)?this.attached&&!so.running(this)&&so.start(this):(this.draw(),ed({chart:this})))}draw(){let e;if(this._resizeBeforeDraw){const{width:e,height:t}=this._resizeBeforeDraw;this._resizeBeforeDraw=null,this._resize(e,t)}if(this.clear(),this.width<=0||this.height<=0)return;if(!1===this.notifyPlugins("beforeDraw",{cancelable:!0}))return;const t=this._layers;for(e=0;e<t.length&&t[e].z<=0;++e)t[e].draw(this.chartArea);for(this._drawDatasets();e<t.length;++e)t[e].draw(this.chartArea);this.notifyPlugins("afterDraw")}_getSortedDatasetMetas(e){const t=this._sortedMetasets,s=[];let i,n;for(i=0,n=t.length;i<n;++i){const n=t[i];e&&!n.visible||s.push(n)}return s}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(!0)}_drawDatasets(){if(!1===this.notifyPlugins("beforeDatasetsDraw",{cancelable:!0}))return;const e=this.getSortedVisibleDatasetMetas();for(let t=e.length-1;t>=0;--t)this._drawDataset(e[t]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(e){const t=this.ctx,s={meta:e,index:e.index,cancelable:!0},i=eo(this,e);!1!==this.notifyPlugins("beforeDatasetDraw",s)&&(i&&xn(t,i),e.controller.draw(),i&&vn(t),s.cancelable=!1,this.notifyPlugins("afterDatasetDraw",s))}isPointInArea(e){return yn(e,this.chartArea,this._minPadding)}getElementsAtEventForMode(e,t,s,i){const n=hl.modes[t];return"function"===typeof n?n(this,e,s,i):[]}getDatasetMeta(e){const t=this.data.datasets[e],s=this._metasets;let i=s.filter(e=>e&&e._dataset===t).pop();
vendor: 5,835 bytes, line 22
22return i||(i={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:t&&t.order||0,index:e,_dataset:t,_parsed:[],_sorted:!1},s.push(i)),i}getContext(){return this.$context||(this.$context=Rn(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(e){const t=this.data.datasets[e];if(!t)return!1;const s=this.getDatasetMeta(e);return"boolean"===typeof s.hidden?!s.hidden:!t.hidden}setDatasetVisibility(e,t){const s=this.getDatasetMeta(e);s.hidden=!t}toggleDataVisibility(e){this._hiddenIndices[e]=!this._hiddenIndices[e]}getDataVisibility(e){return!this._hiddenIndices[e]}_updateVisibility(e,t,s){const i=s?"show":"hide",n=this.getDatasetMeta(e),a=n.controller._resolveAnimations(void 0,i);Hs(t)?(n.data[t].hidden=!s,this.update()):(this.setDatasetVisibility(e,s),a.update(n,{visible:s}),this.update(t=>t.datasetIndex===e?i:void 0))}hide(e,t){this._updateVisibility(e,t,!1)}show(e,t){this._updateVisibility(e,t,!0)}_destroyDatasetMeta(e){const t=this._metasets[e];t&&t.controller&&t.controller._destroy(),delete this._metasets[e]}_stop(){let e,t;for(this.stop(),so.remove(this),e=0,t=this.data.datasets.length;e<t;++e)this._destroyDatasetMeta(e)}destroy(){this.notifyPlugins("beforeDestroy");const{canvas:e,ctx:t}=this;this._stop(),this.config.clearCache(),e&&(this.unbindEvents(),fn(e,t),this.platform.releaseContext(t),this.canvas=null,this.ctx=null),delete id[this.id],this.notifyPlugins("afterDestroy")}toBase64Image(...e){return this.canvas.toDataURL(...e)}bindEvents(){this.bindUserEvents(),this.options.responsive?this.bindResponsiveEvents():this.attached=!0}bindUserEvents(){const e=this._listeners,t=this.platform,s=(s,i)=>{t.addEventListener(this,s,i),e[s]=i},i=(e,t,s)=>{e.offsetX=t,e.offsetY=s,this._eventHandler(e)};Vs(this.options.events,e=>s(e,i))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const e=this._responsiveListeners,t=this.platform,s=(s,i)=>{t.addEventListener(this,s,i),e[s]=i},i=(s,i)=>{e[s]&&(t.removeEventListener(this,s,i),delete e[s])},n=(e,t)=>{this.canvas&&this.resize(e,t)};let a;const o=()=>{i("attach",o),this.attached=!0,this.resize(),s("resize",n),s("detach",a)};a=()=>{this.attached=!1,i("resize",n),this._stop(),this._resize(0,0),s("attach",o)},t.isAttached(this.canvas)?o():a()}unbindEvents(){Vs(this._listeners,(e,t)=>{this.platform.removeEventListener(this,t,e)}),this._listeners={},Vs(this._responsiveListeners,(e,t)=>{this.platform.removeEventListener(this,t,e)}),this._responsiveListeners=void 0}updateHoverStyle(e,t,s){const i=s?"set":"remove";let n,a,o,l;for("dataset"===t&&(n=this.getDatasetMeta(e[0].datasetIndex),n.controller["_"+i+"DatasetHoverStyle"]()),o=0,l=e.length;o<l;++o){a=e[o];const t=a&&this.getDatasetMeta(a.datasetIndex).controller;t&&t[i+"HoverStyle"](a.element,a.datasetIndex,a.index)}}getActiveElements(){return this._active||[]}setActiveElements(e){const t=this._active||[],s=e.map(({datasetIndex:e,index:t})=>{const s=this.getDatasetMeta(e);if(!s)throw new Error("No dataset found at index "+e);return{datasetIndex:e,element:s.data[t],index:t}}),i=!Ls(s,t);i&&(this._active=s,this._lastEvent=null,this._updateHoverStyles(s,t))}notifyPlugins(e,t,s){return this._plugins.notify(this,e,t,s)}isPluginEnabled(e){return 1===this._plugins._cache.filter(t=>t.plugin.id===e).length}_updateHoverStyles(e,t,s){const i=this.options.hover,n=(e,t)=>e.filter(e=>!t.some(t=>e.datasetIndex===t.datasetIndex&&e.index===t.index)),a=n(t,e),o=s?e:n(e,t);a.length&&this.updateHoverStyle(a,i.mode,!1),o.length&&i.mode&&this.updateHoverStyle(o,i.mode,!0)}_eventHandler(e,t){const s={event:e,replay:t,cancelable:!0,inChartArea:this.isPointInArea(e)},i=t=>(t.options.events||this.options.events).includes(e.native.type);if(!1===this.notifyPlugins("beforeEvent",s,i))return;const n=this._handleEvent(e,t,s.inChartArea);return s.cancelable=!1,this.notifyPlugins("afterEvent",s,i),(n||s.changed)&&this.render(),this}_handleEvent(e,t,s){const{_active:i=[],options:n}=this,a=t,o=this._getActiveElements(e,i,s,a),l=Qs(e),r=od(e,this._lastEvent,s,l);s&&(this._lastEvent=null,$s(n.onHover,[e,o,this],this),l&&$s(n.onClick,[e,o,this],this));const d=!Ls(o,i);return(d||t)&&(this._active=o,this._updateHoverStyles(o,i,t)),this._lastEvent=r,d}_getActiveElements(e,t,s,i){if("mouseout"===e.type)return[];if(!s)return t;const n=this.options.hover;return this.getElementsAtEventForMode(e,n.mode,n,i)}}function rd(){return Vs(ld.instances,e=>e._plugins.invalidate())}function dd(e,t,s){const{startAngle:i,x:n,y:a,outerRadius:o,innerRadius:l,options:r}=t,{borderWidth:d,borderJoinStyle:c}=r,h=Math.min(d/o,xi(i-s));if(e.beginPath(),e.arc(n,a,o-d/2,i+h/2,s-h/2),l>0){const t=Math.min(d/l,xi(i-s));e.arc(n,a,l+d/2,s-t/2,i+t/2,!0)}else{const t=Math.min(d/2,o*xi(i-s));if("round"===c)e.arc(n,a,t,s-Ys/2,i+Ys/2,!0);else if("bevel"===c){const o=2*t*t,l=-o*Math.cos(s+Ys/2)+n,r=-o*Math.sin(s+Ys/2)+a,d=o*Math.cos(i+Ys/2)+n,c=o*Math.sin(i+Ys/2)+a;e.lineTo(l,r),e.lineTo(d,c)}}e.closePath(),e.moveTo(0,0),e.rect(0,0,e.canvas.width,e.canvas.height),e.clip("evenodd")}function cd(e,t,s){const{startAngle:i,pixelMargin:n,x:a,y:o,outerRadius:l,innerRadius:r}=t;let d=n/l;e.beginPath(),e.arc(a,o,l,i-d,s+d),r>n?(d=n/r,e.arc(a,o,r,s+d,i-d,!0)):e.arc(a,o,n,s+ti,i-ti),e.closePath(),e.clip()}function hd(e){return $n(e,["outerStart","outerEnd","innerStart","innerEnd"])}function ud(e,t,s,i){const n=hd(e.options.borderRadius),a=(s-t)/2,o=Math.min(a,i*t/2),l=e=>{const t=(s-Math.min(a,e))*i/2;return ki(e,0,Math.min(a,t))};return{outerStart:l(n.outerStart),outerEnd:l(n.outerEnd),innerStart:ki(n.innerStart,0,o),innerEnd:ki(n.innerEnd,0,o)}}function pd(e,t,s,i){return{x:s+e*Math.cos(t),y:i+e*Math.sin(t)}}function gd(e,t,s,i,n,a){const{x:o,y:l,startAngle:r,pixelMargin:d,innerRadius:c}
22=t,h=Math.max(t.outerRadius+i+s-d,0),u=c>0?c+i+s+d:0;let p=0;const g=n-r;if(i){const e=c>0?c-i:0,t=h>0?h-i:0,s=(e+t)/2,n=0!==s?g*s/(s+i):g;p=(g-n)/2}const f=Math.max(.001,g*h-s/Ys)/h,m=(g-f)/2,b=r+m+p,y=n-m-p,{outerStart:x,outerEnd:v,innerStart:k,innerEnd:_}=ud(t,u,h,y-b),w=h-x,C=h-v,S=b+x/w,F=y-v/C,T=u+k,M=u+_,P=b+k/T,D=y-_/M;if(e.beginPath(),a){const t=(S+F)/2;if(e.arc(o,l,h,S,t),e.arc(o,l,h,t,F),v>0){const t=pd(C,F,o,l);e.arc(t.x,t.y,v,F,y+ti)}const s=pd(M,y,o,l);if(e.lineTo(s.x,s.y),_>0){const t=pd(M,D,o,l);e.arc(t.x,t.y,_,y+ti,D+Math.PI)}const i=(y-_/u+(b+k/u))/2;if(e.arc(o,l,u,y-_/u,i,!0),e.arc(o,l,u,i,b+k/u,!0),k>0){const t=pd(T,P,o,l);e.arc(t.x,t.y,k,P+Math.PI,b-ti)}const n=pd(w,b,o,l);if(e.lineTo(n.x,n.y),x>0){const t=pd(w,S,o,l);e.arc(t.x,t.y,x,b-ti,S)}}else{e.moveTo(o,l);const t=Math.cos(S)*h+o,s=Math.sin(S)*h+l;e.lineTo(t,s);const i=Math.cos(F)*h+o,n=Math.sin(F)*h+l;e.lineTo(i,n)}e.closePath()}function fd(e,t,s,i,n){const{fullCircles:a,startAngle:o,circumference:l}=t;let r=t.endAngle;if(a){gd(e,t,s,i,r,n);for(let t=0;t<a;++t)e.fill();isNaN(l)||(r=o+(l%Gs||Gs))}return gd(e,t,s,i,r,n),e.fill(),r}function md(e,t,s,i,n){const{fullCircles:a,startAngle:o,circumference:l,options:r}=t,{borderWidth:d,borderJoinStyle:c,borderDash:h,borderDashOffset:u,borderRadius:p}=r,g="inner"===r.borderAlign;if(!d)return;e.setLineDash(h||[]),e.lineDashOffset=u,g?(e.lineWidth=2*d,e.lineJoin=c||"round"):(e.lineWidth=d,e.lineJoin=c||"bevel");let f=t.endAngle;if(a){gd(e,t,s,i,f,n);for(let t=0;t<a;++t)e.stroke();isNaN(l)||(f=o+(l%Gs||Gs))}g&&cd(e,t,f),r.selfJoin&&f-o>=Ys&&0===p&&"miter"!==c&&dd(e,t,f),a||(gd(e,t,s,i,f,n),e.stroke())}(0,Dt.A)(ld,"defaults",cn),(0,Dt.A)(ld,"instances",id),(0,Dt.A)(ld,"overrides",an),(0,Dt.A)(ld,"registry",Cr),(0,Dt.A)(ld,"version",Yr),(0,Dt.A)(ld,"getChart",nd);class bd extends Jl{constructor(e){super(),(0,Dt.A)(this,"circumference",void 0),(0,Dt.A)(this,"endAngle",void 0),(0,Dt.A)(this,"fullCircles",void 0),(0,Dt.A)(this,"innerRadius",void 0),(0,Dt.A)(this,"outerRadius",void 0),(0,Dt.A)(this,"pixelMargin",void 0),(0,Dt.A)(this,"startAngle",void 0),this.options=void 0,this.circumference=void 0,this.startAngle=void 0,this.endAngle=void 0,this.innerRadius=void 0,this.outerRadius=void 0,this.pixelMargin=0,this.fullCircles=0,e&&Object.assign(this,e)}inRange(e,t,s){const i=this.getProps(["x","y"],s),{angle:n,distance:a}=mi(i,{x:e,y:t}),{startAngle:o,endAngle:l,innerRadius:r,outerRadius:d,circumference:c}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],s),h=(this.options.spacing+this.options.borderWidth)/2,u=Ps(c,l-o),p=vi(n,o,l)&&o!==l,g=u>=Gs||p,f=wi(a,r+h,d+h);return g&&f}getCenterPoint(e){const{x:t,y:s,startAngle:i,endAngle:n,innerRadius:a,outerRadius:o}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius"],e),{offset:l,spacing:r}=this.options,d=(i+n)/2,c=(a+o+r+l)/2;return{x:t+Math.cos(d)*c,y:s+Math.sin(d)*c}}tooltipPosition(e){return this.getCenterPoint(e)}draw(e){const{options:t,circumference:s}=this,i=(t.offset||0)/4,n=(t.spacing||0)/2,a=t.circular;if(this.pixelMargin="inner"===t.borderAlign?.33:0,this.fullCircles=s>Gs?Math.floor(s/Gs):0,0===s||this.innerRadius<0||this.outerRadius<0)return;e.save();const o=(this.startAngle+this.endAngle)/2;e.translate(Math.cos(o)*i,Math.sin(o)*i);const l=1-Math.sin(Math.min(Ys,s||0)),r=i*l;e.fillStyle=t.backgroundColor,e.strokeStyle=t.borderColor,fd(e,this,r,n,a),md(e,this,r,n,a),e.restore()}}function yd(e,t,s=t){e.lineCap=Ps(s.borderCapStyle,t.borderCapStyle),e.setLineDash(Ps(s.borderDash,t.borderDash)),e.lineDashOffset=Ps(s.borderDashOffset,t.borderDashOffset),e.lineJoin=Ps(s.borderJoinStyle,t.borderJoinStyle),e.lineWidth=Ps(s.borderWidth,t.borderWidth),e.strokeStyle=Ps(s.borderColor,t.borderColor)}function xd(e,t,s){e.lineTo(s.x,s.y)}function vd(e){return e.stepped?kn:e.tension||"monotone"===e.cubicInterpolationMode?_n:xd}function kd(e,t,s={}){const i=e.length,{start:n=0,end:a=i-1}=s,{start:o,end:l}=t,r=Math.max(n,o),d=Math.min(a,l),c=n<o&&a<o||n>l&&a>l;return{count:i,start:r,loop:t.loop,ilen:d<r&&!c?i+d-r:d-r}}function _d(e,t,s,i){const{points:n,options:a}=t,{count:o,start:l,loop:r,ilen:d}=kd(n,s,i),c=vd(a);let h,u,p,{move:g=!0,reverse:f}=i||{};for(h=0;h<=d;++h)u=n[(l+(f?d-h:h))%o],u.skip||(g?(e.moveTo(u.x,u.y),g=!1):c(e,p,u,f,a.stepped),p=u);return r&&(u=n[(l+(f?d:0))%o],c(e,p,u,f,a.stepped)),!!r}function wd(e,t,s,i){const n=t.points,{count:a,start:o,ilen:l}=kd(n,s,i),{move:r=!0,reverse:d}=i||{};let c,h,u,p,g,f,m=0,b=0;const y=e=>(o+(d?l-e:e))%a,x=()=>{p!==g&&(e.lineTo(m,g),e.lineTo(m,p),e.lineTo(m,f))};for(r&&(h=n[y(0)],e.moveTo(h.x,h.y)),c=0;c<=l;++c){if(h=n[y(c)],h.skip)continue;const t=h.x,s=h.y,i=0|t;i===u?(s<p?p=s:s>g&&(g=s),m=(b*m+t)/++b):(x(),e.lineTo(t,s),u=i,b=0,p=g=s),f=s}x()}function Cd(e){const t=e.options,s=t.borderDash&&t.borderDash.length,i=!e._decimated&&!e._loop&&!t.tension&&"monotone"!==t.cubicInterpolationMode&&!t.stepped&&!s;return i?wd:_d}function Sd(e){return e.stepped?Va:e.tension||"monotone"===e.cubicInterpolationMode?La:$a}function Fd(e,t,s,i){let n=t._path;n||(n=t._path=new Path2D,t.path(n,s,i)&&n.closePath()),yd(e,t.options),e.stroke(n)}function Td(e,t,s,i){const{segments:n,options:a}=t,o=Cd(t);for(const l of n)yd(e,a,l.style),e.beginPath(),o(e,t,l,{start:s,end:s+i-1})&&e.closePath(),e.stroke()}(0,Dt.A)(bd,"id","arc"),(0,Dt.A)(bd,"defaults",{borderAlign:"center",borderColor:"#fff",borderDash:[],borderDashOffset:0,borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0,selfJoin:!1}),(0,Dt.A)(bd,"defaultRoutes",{backgroundColor:"backgroundColor"}),(0,Dt.A)(bd,"descriptors",{_scriptable:!0,_indexable:e=>"borderDash"!==e});const Md="function"===typeof Path2D;function Pd(e,t,s,i){Md&&!t.options.segment?Fd(e,t,s,i):Td(e,t,s,i)}class Dd extends Jl{constructor(e){super(),this.animated=!0,this.options=void 0,this._chart=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,this._datasetIndex=void 0,e&&Object.assign(this,e)}updateControlPoints(e,t){const s=this.options;if((s.tension||"monotone"===s.cubicInterpolationMode)&&!s.stepped&&!this._pointsUpdated){const i=s.spanGaps?this._loop:this._fullLoop;fa(this._points,s,e,i,t),this._pointsUpdated=!0}}set points(e){this._points=e,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=Xa(this,this.options.segment))}first(){const e=this.segments,t=this.points;return e.length&&t[e[0].start]}last(){const e=this.segments,t=this.points,s=e.length;return s&&t[e[s-1].end]}interpolate(e,t){const s=this.options,i=e[t],n=this.points,a=ja(this,{property:t,start:i,end:i});if(!a.length)return;const o=[],l=Sd(s);let r,d;for(r=0,d=a.length;r<d;++r){const{start:d,end:c}=a[r],h=n[d],u=n[c];if(h===u){o.push(h);continue}const p=Math.abs((i-h[t])/(u[t]-h[t])),g=l(h,u,p,s.stepped);g[t]=e[t],o.push(g)}return 1===o.length?o[0]:o}pathSegment(e,t,s){const i=Cd(this);return i(e,this,t,s)}path(e,t,s){const i=this.segments,n=Cd(this);let a=this._loop;t=t||0,s=s||this.points.length-t;for(const o of i)a&=n(e,this,o,{start:t,end:t+s-1});return!!a}draw(e,t,s,i){const n=this.options||{},a=this.points||[];
22a.length&&n.borderWidth&&(e.save(),Pd(e,this,s,i),e.restore()),this.animated&&(this._pointsUpdated=!1,this._path=void 0)}}function Ad(e,t,s,i){const n=e.options,{[s]:a}=e.getProps([s],i);return Math.abs(t-a)<n.radius+n.hitRadius}(0,Dt.A)(Dd,"id","line"),(0,Dt.A)(Dd,"defaults",{borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0}),(0,Dt.A)(Dd,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"}),(0,Dt.A)(Dd,"descriptors",{_scriptable:!0,_indexable:e=>"borderDash"!==e&&"fill"!==e});class $d extends Jl{constructor(e){super(),(0,Dt.A)(this,"parsed",void 0),(0,Dt.A)(this,"skip",void 0),(0,Dt.A)(this,"stop",void 0),this.options=void 0,this.parsed=void 0,this.skip=void 0,this.stop=void 0,e&&Object.assign(this,e)}inRange(e,t,s){const i=this.options,{x:n,y:a}=this.getProps(["x","y"],s);return Math.pow(e-n,2)+Math.pow(t-a,2)<Math.pow(i.hitRadius+i.radius,2)}inXRange(e,t){return Ad(this,e,"x",t)}inYRange(e,t){return Ad(this,e,"y",t)}getCenterPoint(e){const{x:t,y:s}=this.getProps(["x","y"],e);return{x:t,y:s}}size(e){e=e||this.options||{};let t=e.radius||0;t=Math.max(t,t&&e.hoverRadius||0);const s=t&&e.borderWidth||0;return 2*(t+s)}draw(e,t){const s=this.options;this.skip||s.radius<.1||!yn(this,t,this.size(s)/2)||(e.strokeStyle=s.borderColor,e.lineWidth=s.borderWidth,e.fillStyle=s.backgroundColor,mn(e,s,this.x,this.y))}getRange(){const e=this.options||{};return e.radius+e.hitRadius}}function Vd(e,t){const{x:s,y:i,base:n,width:a,height:o}=e.getProps(["x","y","base","width","height"],t);let l,r,d,c,h;return e.horizontal?(h=o/2,l=Math.min(s,n),r=Math.max(s,n),d=i-h,c=i+h):(h=a/2,l=s-h,r=s+h,d=Math.min(i,n),c=Math.max(i,n)),{left:l,top:d,right:r,bottom:c}}function Ld(e,t,s,i){return e?0:ki(t,s,i)}function Ed(e,t,s){const i=e.options.borderWidth,n=e.borderSkipped,a=Vn(i);return{t:Ld(n.top,a.top,0,s),r:Ld(n.right,a.right,0,t),b:Ld(n.bottom,a.bottom,0,s),l:Ld(n.left,a.left,0,t)}}function Ud(e,t,s){const{enableBorderRadius:i}=e.getProps(["enableBorderRadius"]),n=e.options.borderRadius,a=Ln(n),o=Math.min(t,s),l=e.borderSkipped,r=i||Fs(n);return{topLeft:Ld(!r||l.top||l.left,a.topLeft,0,o),topRight:Ld(!r||l.top||l.right,a.topRight,0,o),bottomLeft:Ld(!r||l.bottom||l.left,a.bottomLeft,0,o),bottomRight:Ld(!r||l.bottom||l.right,a.bottomRight,0,o)}}function Id(e){const t=Vd(e),s=t.right-t.left,i=t.bottom-t.top,n=Ed(e,s/2,i/2),a=Ud(e,s/2,i/2);return{outer:{x:t.left,y:t.top,w:s,h:i,radius:a},inner:{x:t.left+n.l,y:t.top+n.t,w:s-n.l-n.r,h:i-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 Od(e,t,s,i){const n=null===t,a=null===s,o=n&&a,l=e&&!o&&Vd(e,i);return l&&(n||wi(t,l.left,l.right))&&(a||wi(s,l.top,l.bottom))}function Rd(e){return e.topLeft||e.topRight||e.bottomLeft||e.bottomRight}function Wd(e,t){e.rect(t.x,t.y,t.w,t.h)}function Bd(e,t,s={}){const i=e.x!==s.x?-t:0,n=e.y!==s.y?-t:0,a=(e.x+e.w!==s.x+s.w?t:0)-i,o=(e.y+e.h!==s.y+s.h?t:0)-n;return{x:e.x+i,y:e.y+n,w:e.w+a,h:e.h+o,radius:e.radius}}(0,Dt.A)($d,"id","point"),(0,Dt.A)($d,"defaults",{borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0}),(0,Dt.A)($d,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"});class zd extends Jl{constructor(e){super(),this.options=void 0,this.horizontal=void 0,this.base=void 0,this.width=void 0,this.height=void 0,this.inflateAmount=void 0,e&&Object.assign(this,e)}draw(e){const{inflateAmount:t,options:{borderColor:s,backgroundColor:i}}=this,{inner:n,outer:a}=Id(this),o=Rd(a.radius)?Tn:Wd;e.save(),a.w===n.w&&a.h===n.h||(e.beginPath(),o(e,Bd(a,t,n)),e.clip(),o(e,Bd(n,-t,a)),e.fillStyle=s,e.fill("evenodd")),e.beginPath(),o(e,Bd(n,t)),e.fillStyle=i,e.fill(),e.restore()}inRange(e,t,s){return Od(this,e,t,s)}inXRange(e,t){return Od(this,e,null,t)}inYRange(e,t){return Od(this,null,e,t)}getCenterPoint(e){const{x:t,y:s,base:i,horizontal:n}
vendor: 4,100 bytes, line 22
22=this.getProps(["x","y","base","horizontal"],e);return{x:n?(t+i)/2:t,y:n?s:(s+i)/2}}getRange(e){return"x"===e?this.width/2:this.height/2}}(0,Dt.A)(zd,"id","bar"),(0,Dt.A)(zd,"defaults",{borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0}),(0,Dt.A)(zd,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"});function Nd(e,t,s){const i=e.segments,n=e.points,a=t.points,o=[];for(const l of i){let{start:e,end:i}=l;i=Hd(e,i,n);const r=jd(s,n[e],n[i],l.loop);if(!t.segments){o.push({source:l,target:r,start:n[e],end:n[i]});continue}const d=ja(t,r);for(const t of d){const e=jd(s,a[t.start],a[t.end],t.loop),i=Na(l,n,e);for(const n of i)o.push({source:n,target:t,start:{[s]:Xd(r,e,"start",Math.max)},end:{[s]:Xd(r,e,"end",Math.min)}})}}return o}function jd(e,t,s,i){if(i)return;let n=t[e],a=s[e];return"angle"===e&&(n=xi(n),a=xi(a)),{property:e,start:n,end:a}}function qd(e,t){const{x:s=null,y:i=null}=e||{},n=t.points,a=[];return t.segments.forEach(({start:e,end:t})=>{t=Hd(e,t,n);const o=n[e],l=n[t];null!==i?(a.push({x:o.x,y:i}),a.push({x:l.x,y:i})):null!==s&&(a.push({x:s,y:o.y}),a.push({x:s,y:l.y}))}),a}function Hd(e,t,s){for(;t>e;t--){const e=s[t];if(!isNaN(e.x)&&!isNaN(e.y))break}return t}function Xd(e,t,s,i){return e&&t?i(e[s],t[s]):e?e[s]:t?t[s]:0}function Kd(e,t){let s=[],i=!1;return Ss(e)?(i=!0,s=e):s=qd(e,t),s.length?new Dd({points:s,options:{tension:0},_loop:i,_fullLoop:i}):null}function Qd(e){return e&&!1!==e.fill}function Yd(e,t,s){const i=e[t];let n=i.fill;const a=[t];let o;if(!s)return n;while(!1!==n&&-1===a.indexOf(n)){if(!Ts(n))return n;if(o=e[n],!o)return!1;if(o.visible)return n;a.push(n),n=o.fill}return!1}function Gd(e,t,s){const i=tc(e);if(Fs(i))return!isNaN(i.value)&&i;let n=parseFloat(i);return Ts(n)&&Math.floor(n)===n?Jd(i[0],t,n,s):["origin","start","end","stack","shape"].indexOf(i)>=0&&i}function Jd(e,t,s,i){return"-"!==e&&"+"!==e||(s=t+s),!(s===t||s<0||s>=i)&&s}function Zd(e,t){let s=null;return"start"===e?s=t.bottom:"end"===e?s=t.top:Fs(e)?s=t.getPixelForValue(e.value):t.getBasePixel&&(s=t.getBasePixel()),s}function ec(e,t,s){let i;return i="start"===e?s:"end"===e?t.options.reverse?t.min:t.max:Fs(e)?e.value:t.getBaseValue(),i}function tc(e){const t=e.options,s=t.fill;let i=Ps(s&&s.target,s);return void 0===i&&(i=!!t.backgroundColor),!1!==i&&null!==i&&(!0===i?"origin":i)}function sc(e){const{scale:t,index:s,line:i}=e,n=[],a=i.segments,o=i.points,l=ic(t,s);l.push(Kd({x:null,y:t.bottom},i));for(let r=0;r<a.length;r++){const e=a[r];for(let t=e.start;t<=e.end;t++)nc(n,o[t],l)}return new Dd({points:n,options:{}})}function ic(e,t){const s=[],i=e.getMatchingVisibleMetas("line");for(let n=0;n<i.length;n++){const e=i[n];if(e.index===t)break;e.hidden||s.unshift(e.dataset)}return s}function nc(e,t,s){const i=[];for(let n=0;n<s.length;n++){const a=s[n],{first:o,last:l,point:r}=ac(a,t,"x");if(!(!r||o&&l))if(o)i.unshift(r);else if(e.push(r),!l)break}e.push(...i)}function ac(e,t,s){const i=e.interpolate(t,s);if(!i)return{};const n=i[s],a=e.segments,o=e.points;let l=!1,r=!1;for(let d=0;d<a.length;d++){const e=a[d],t=o[e.start][s],i=o[e.end][s];if(wi(n,t,i)){l=n===t,r=n===i;break}}return{first:l,last:r,point:i}}class oc{constructor(e){this.x=e.x,this.y=e.y,this.radius=e.radius}pathSegment(e,t,s){const{x:i,y:n,radius:a}=this;return t=t||{start:0,end:Gs},e.arc(i,n,a,t.end,t.start,!0),!s.bounds}interpolate(e){const{x:t,y:s,radius:i}=this,n=e.angle;return{x:t+Math.cos(n)*i,y:s+Math.sin(n)*i,angle:n}}}function lc(e){const{chart:t,fill:s,line:i}=e;if(Ts(s))return rc(t,s);if("stack"===s)return sc(e);if("shape"===s)return!0;const n=dc(e);return n instanceof oc?n:Kd(n,i)}function rc(e,t){const s=e.getDatasetMeta(t),i=s&&e.isDatasetVisible(t);return i?s.dataset:null}function dc(e){const t=e.scale||{};return t.getPointPositionForValue?hc(e):cc(e)}function cc(e){const{scale:t={},fill:s}=e,i=Zd(s,t);if(Ts(i)){const e=t.isHorizontal();return{x:e?i:null,y:e?null:i}}return null}function hc(e){const{scale:t,fill:s}=e,i=t.options,n=t.getLabels().length,a=i.reverse?t.max:t.min,o=ec(s,t,a),l=[];
vendor: 4,114 bytes, line 22
22if(i.grid.circular){const e=t.getPointPositionForValue(0,a);return new oc({x:e.x,y:e.y,radius:t.getDistanceFromCenterForValue(o)})}for(let r=0;r<n;++r)l.push(t.getPointPositionForValue(r,o));return l}function uc(e,t,s){const i=lc(t),{chart:n,index:a,line:o,scale:l,axis:r}=t,d=o.options,c=d.fill,h=d.backgroundColor,{above:u=h,below:p=h}=c||{},g=n.getDatasetMeta(a),f=eo(n,g);i&&o.points.length&&(xn(e,s),pc(e,{line:o,target:i,above:u,below:p,area:s,scale:l,axis:r,clip:f}),vn(e))}function pc(e,t){const{line:s,target:i,above:n,below:a,area:o,scale:l,clip:r}=t,d=s._loop?"angle":t.axis;e.save();let c=a;a!==n&&("x"===d?(gc(e,i,o.top),mc(e,{line:s,target:i,color:n,scale:l,property:d,clip:r}),e.restore(),e.save(),gc(e,i,o.bottom)):"y"===d&&(fc(e,i,o.left),mc(e,{line:s,target:i,color:a,scale:l,property:d,clip:r}),e.restore(),e.save(),fc(e,i,o.right),c=n)),mc(e,{line:s,target:i,color:c,scale:l,property:d,clip:r}),e.restore()}function gc(e,t,s){const{segments:i,points:n}=t;let a=!0,o=!1;e.beginPath();for(const l of i){const{start:i,end:r}=l,d=n[i],c=n[Hd(i,r,n)];a?(e.moveTo(d.x,d.y),a=!1):(e.lineTo(d.x,s),e.lineTo(d.x,d.y)),o=!!t.pathSegment(e,l,{move:o}),o?e.closePath():e.lineTo(c.x,s)}e.lineTo(t.first().x,s),e.closePath(),e.clip()}function fc(e,t,s){const{segments:i,points:n}=t;let a=!0,o=!1;e.beginPath();for(const l of i){const{start:i,end:r}=l,d=n[i],c=n[Hd(i,r,n)];a?(e.moveTo(d.x,d.y),a=!1):(e.lineTo(s,d.y),e.lineTo(d.x,d.y)),o=!!t.pathSegment(e,l,{move:o}),o?e.closePath():e.lineTo(s,c.y)}e.lineTo(s,t.first().y),e.closePath(),e.clip()}function mc(e,t){const{line:s,target:i,property:n,color:a,scale:o,clip:l}=t,r=Nd(s,i,n);for(const{source:d,target:c,start:h,end:u}of r){const{style:{backgroundColor:t=a}={}}=d,r=!0!==i;e.save(),e.fillStyle=t,bc(e,o,l,r&&jd(n,h,u)),e.beginPath();const p=!!s.pathSegment(e,d);let g;if(r){p?e.closePath():yc(e,i,u,n);const t=!!i.pathSegment(e,c,{move:p,reverse:!0});g=p&&t,g||yc(e,i,h,n)}e.closePath(),e.fill(g?"evenodd":"nonzero"),e.restore()}}function bc(e,t,s,i){const n=t.chart.chartArea,{property:a,start:o,end:l}=i||{};if("x"===a||"y"===a){let t,i,r,d;"x"===a?(t=o,i=n.top,r=l,d=n.bottom):(t=n.left,i=o,r=n.right,d=l),e.beginPath(),s&&(t=Math.max(t,s.left),r=Math.min(r,s.right),i=Math.max(i,s.top),d=Math.min(d,s.bottom)),e.rect(t,i,r-t,d-i),e.clip()}}function yc(e,t,s,i){const n=t.interpolate(s,i);n&&e.lineTo(n.x,n.y)}var xc={id:"filler",afterDatasetsUpdate(e,t,s){const i=(e.data.datasets||[]).length,n=[];let a,o,l,r;for(o=0;o<i;++o)a=e.getDatasetMeta(o),l=a.dataset,r=null,l&&l.options&&l instanceof Dd&&(r={visible:e.isDatasetVisible(o),index:o,fill:Gd(l,o,i),chart:e,axis:a.controller.options.indexAxis,scale:a.vScale,line:l}),a.$filler=r,n.push(r);for(o=0;o<i;++o)r=n[o],r&&!1!==r.fill&&(r.fill=Yd(n,o,s.propagate))},beforeDraw(e,t,s){const i="beforeDraw"===s.drawTime,n=e.getSortedVisibleDatasetMetas(),a=e.chartArea;for(let o=n.length-1;o>=0;--o){const t=n[o].$filler;t&&(t.line.updateControlPoints(a,t.axis),i&&t.fill&&uc(e.ctx,t,a))}},beforeDatasetsDraw(e,t,s){if("beforeDatasetsDraw"!==s.drawTime)return;const i=e.getSortedVisibleDatasetMetas();for(let n=i.length-1;n>=0;--n){const t=i[n].$filler;Qd(t)&&uc(e.ctx,t,e.chartArea)}},beforeDatasetDraw(e,t,s){const i=t.meta.$filler;Qd(i)&&"beforeDatasetDraw"===s.drawTime&&uc(e.ctx,i,e.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};const vc=(e,t)=>{let{boxHeight:s=t,boxWidth:i=t}=e;return e.usePointStyle&&(s=Math.min(s,t),i=e.pointStyleWidth||Math.min(i,t)),{boxWidth:i,boxHeight:s,itemHeight:Math.max(t,s)}},kc=(e,t)=>null!==e&&null!==t&&e.datasetIndex===t.datasetIndex&&e.index===t.index;class _c extends Jl{constructor(e){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=e.chart,this.options=e.options,this.ctx=e.ctx,this.legendItems=void 0,this.columnSizes=void 0,this.lineWidths=void 0,this.maxHeight=void 0,this.maxWidth=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.height=void 0,this.width=void 0,this._margins=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}
vendor: 4,972 bytes, line 22
22update(e,t,s){this.maxWidth=e,this.maxHeight=t,this._margins=s,this.setDimensions(),this.buildLabels(),this.fit()}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=this._margins.left,this.right=this.width):(this.height=this.maxHeight,this.top=this._margins.top,this.bottom=this.height)}buildLabels(){const e=this.options.labels||{};let t=$s(e.generateLabels,[this.chart],this)||[];e.filter&&(t=t.filter(t=>e.filter(t,this.chart.data))),e.sort&&(t=t.sort((t,s)=>e.sort(t,s,this.chart.data))),this.options.reverse&&t.reverse(),this.legendItems=t}fit(){const{options:e,ctx:t}=this;if(!e.display)return void(this.width=this.height=0);const s=e.labels,i=Un(s.font),n=i.size,a=this._computeTitleHeight(),{boxWidth:o,itemHeight:l}=vc(s,n);let r,d;t.font=i.string,this.isHorizontal()?(r=this.maxWidth,d=this._fitRows(a,n,o,l)+10):(d=this.maxHeight,r=this._fitCols(a,i,o,l)+10),this.width=Math.min(r,e.maxWidth||this.maxWidth),this.height=Math.min(d,e.maxHeight||this.maxHeight)}_fitRows(e,t,s,i){const{ctx:n,maxWidth:a,options:{labels:{padding:o}}}=this,l=this.legendHitBoxes=[],r=this.lineWidths=[0],d=i+o;let c=e;n.textAlign="left",n.textBaseline="middle";let h=-1,u=-d;return this.legendItems.forEach((e,p)=>{const g=s+t/2+n.measureText(e.text).width;(0===p||r[r.length-1]+g+2*o>a)&&(c+=d,r[r.length-(p>0?0:1)]=0,u+=d,h++),l[p]={left:0,top:u,row:h,width:g,height:i},r[r.length-1]+=g+o}),c}_fitCols(e,t,s,i){const{ctx:n,maxHeight:a,options:{labels:{padding:o}}}=this,l=this.legendHitBoxes=[],r=this.columnSizes=[],d=a-e;let c=o,h=0,u=0,p=0,g=0;return this.legendItems.forEach((e,a)=>{const{itemWidth:f,itemHeight:m}=wc(s,t,n,e,i);a>0&&u+m+2*o>d&&(c+=h+o,r.push({width:h,height:u}),p+=h+o,g++,h=u=0),l[a]={left:p,top:u,col:g,width:f,height:m},h=Math.max(h,f),u+=m+o}),c+=h,r.push({width:h,height:u}),c}adjustHitBoxes(){if(!this.options.display)return;const e=this._computeTitleHeight(),{legendHitBoxes:t,options:{align:s,labels:{padding:i},rtl:n}}=this,a=Ia(n,this.left,this.width);if(this.isHorizontal()){let n=0,o=Ui(s,this.left+i,this.right-this.lineWidths[n]);for(const l of t)n!==l.row&&(n=l.row,o=Ui(s,this.left+i,this.right-this.lineWidths[n])),l.top+=this.top+e+i,l.left=a.leftForLtr(a.x(o),l.width),o+=l.width+i}else{let n=0,o=Ui(s,this.top+e+i,this.bottom-this.columnSizes[n].height);for(const l of t)l.col!==n&&(n=l.col,o=Ui(s,this.top+e+i,this.bottom-this.columnSizes[n].height)),l.top=o,l.left+=this.left+i,l.left=a.leftForLtr(a.x(l.left),l.width),o+=l.height+i}}isHorizontal(){return"top"===this.options.position||"bottom"===this.options.position}draw(){if(this.options.display){const e=this.ctx;xn(e,this),this._draw(),vn(e)}}_draw(){const{options:e,columnSizes:t,lineWidths:s,ctx:i}=this,{align:n,labels:a}=e,o=cn.color,l=Ia(e.rtl,this.left,this.width),r=Un(a.font),{padding:d}=a,c=r.size,h=c/2;let u;this.drawTitle(),i.textAlign=l.textAlign("left"),i.textBaseline="middle",i.lineWidth=.5,i.font=r.string;const{boxWidth:p,boxHeight:g,itemHeight:f}=vc(a,c),m=function(e,t,s){if(isNaN(p)||p<=0||isNaN(g)||g<0)return;i.save();const n=Ps(s.lineWidth,1);if(i.fillStyle=Ps(s.fillStyle,o),i.lineCap=Ps(s.lineCap,"butt"),i.lineDashOffset=Ps(s.lineDashOffset,0),i.lineJoin=Ps(s.lineJoin,"miter"),i.lineWidth=n,i.strokeStyle=Ps(s.strokeStyle,o),i.setLineDash(Ps(s.lineDash,[])),a.usePointStyle){const o={radius:g*Math.SQRT2/2,pointStyle:s.pointStyle,rotation:s.rotation,borderWidth:n},r=l.xPlus(e,p/2),d=t+h;bn(i,o,r,d,a.pointStyleWidth&&p)}else{const a=t+Math.max((c-g)/2,0),o=l.leftForLtr(e,p),r=Ln(s.borderRadius);i.beginPath(),Object.values(r).some(e=>0!==e)?Tn(i,{x:o,y:a,w:p,h:g,radius:r}):i.rect(o,a,p,g),i.fill(),0!==n&&i.stroke()}i.restore()},b=function(e,t,s){Fn(i,s.text,e,t+f/2,r,{strikethrough:s.hidden,textAlign:l.textAlign(s.textAlign)})},y=this.isHorizontal(),x=this._computeTitleHeight();u=y?{x:Ui(n,this.left+d,this.right-s[0]),y:this.top+d+x,line:0}:{x:this.left+d,y:Ui(n,this.top+x+d,this.bottom-t[0].height),line:0},Oa(this.ctx,e.textDirection);const v=f+d;this.legendItems.forEach((o,c)=>{i.strokeStyle=o.fontColor,i.fillStyle=o.fontColor;const g=i.measureText(o.text).width,f=l.textAlign(o.textAlign||(o.textAlign=a.textAlign)),k=p+h+g;let _=u.x,w=u.y;l.setWidth(this.width),y?c>0&&_+k+d>this.right&&(w=u.y+=v,u.line++,_=u.x=Ui(n,this.left+d,this.right-s[u.line])):c>0&&w+v>this.bottom&&(_=u.x=_+t[u.line].width+d,u.line++,w=u.y=Ui(n,this.top+x+d,this.bottom-t[u.line].height));const C=l.x(_);if(m(C,w,o),_=Ii(f,_+p+h,y?_+k:this.right,e.rtl),b(l.x(_),w,o),y)u.x+=k+d;else if("string"!==typeof o.text){const e=r.lineHeight;u.y+=Fc(o,e)+d}else u.y+=v}),Ra(this.ctx,e.textDirection)}drawTitle(){const e=this.options,t=e.title,s=Un(t.font),i=En(t.padding);if(!t.display)return;const n=Ia(e.rtl,this.left,this.width),a=this.ctx,o=t.position,l=s.size/2,r=i.top+l;let d,c=this.left,h=this.width;if(this.isHorizontal())h=Math.max(...this.lineWidths),d=this.top+r,c=Ui(e.align,c,this.right-h);else{const t=this.columnSizes.reduce((e,t)=>
22Math.max(e,t.height),0);d=r+Ui(e.align,this.top,this.bottom-t-e.labels.padding-this._computeTitleHeight())}const u=Ui(o,c,c+h);a.textAlign=n.textAlign(Ei(o)),a.textBaseline="middle",a.strokeStyle=t.color,a.fillStyle=t.color,a.font=s.string,Fn(a,t.text,u,d,s)}_computeTitleHeight(){const e=this.options.title,t=Un(e.font),s=En(e.padding);return e.display?t.lineHeight+s.height:0}_getLegendItemAt(e,t){let s,i,n;if(wi(e,this.left,this.right)&&wi(t,this.top,this.bottom))for(n=this.legendHitBoxes,s=0;s<n.length;++s)if(i=n[s],wi(e,i.left,i.left+i.width)&&wi(t,i.top,i.top+i.height))return this.legendItems[s];return null}handleEvent(e){const t=this.options;if(!Tc(e.type,t))return;const s=this._getLegendItemAt(e.x,e.y);if("mousemove"===e.type||"mouseout"===e.type){const i=this._hoveredItem,n=kc(i,s);i&&!n&&$s(t.onLeave,[e,i,this],this),this._hoveredItem=s,s&&!n&&$s(t.onHover,[e,s,this],this)}else s&&$s(t.onClick,[e,s,this],this)}}function wc(e,t,s,i,n){const a=Cc(i,e,t,s),o=Sc(n,i,t.lineHeight);return{itemWidth:a,itemHeight:o}}function Cc(e,t,s,i){let n=e.text;return n&&"string"!==typeof n&&(n=n.reduce((e,t)=>e.length>t.length?e:t)),t+s.size/2+i.measureText(n).width}function Sc(e,t,s){let i=e;return"string"!==typeof t.text&&(i=Fc(t,s)),i}function Fc(e,t){const s=e.text?e.text.length:0;return t*s}function Tc(e,t){return!("mousemove"!==e&&"mouseout"!==e||!t.onHover&&!t.onLeave)||!(!t.onClick||"click"!==e&&"mouseup"!==e)}var Mc={id:"legend",_element:_c,start(e,t,s){const i=e.legend=new _c({ctx:e.ctx,options:s,chart:e});Ml.configure(e,i,s),Ml.addBox(e,i)},stop(e){Ml.removeBox(e,e.legend),delete e.legend},beforeUpdate(e,t,s){const i=e.legend;Ml.configure(e,i,s),i.options=s},afterUpdate(e){const t=e.legend;t.buildLabels(),t.adjustHitBoxes()},afterEvent(e,t){t.replay||e.legend.handleEvent(t.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(e,t,s){const i=t.datasetIndex,n=s.chart;n.isDatasetVisible(i)?(n.hide(i),t.hidden=!0):(n.show(i),t.hidden=!1)},onHover:null,onLeave:null,labels:{color:e=>e.chart.options.color,boxWidth:40,padding:10,generateLabels(e){const t=e.data.datasets,{labels:{usePointStyle:s,pointStyle:i,textAlign:n,color:a,useBorderRadius:o,borderRadius:l}}=e.legend.options;return e._getSortedDatasetMetas().map(e=>{const r=e.controller.getStyle(s?0:void 0),d=En(r.borderWidth);return{text:t[e.index].label,fillStyle:r.backgroundColor,fontColor:a,hidden:!e.visible,lineCap:r.borderCapStyle,lineDash:r.borderDash,lineDashOffset:r.borderDashOffset,lineJoin:r.borderJoinStyle,lineWidth:(d.width+d.height)/4,strokeStyle:r.borderColor,pointStyle:i||r.pointStyle,rotation:r.rotation,textAlign:n||r.textAlign,borderRadius:o&&(l||r.borderRadius),datasetIndex:e.index}},this)}},title:{color:e=>e.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:e=>!e.startsWith("on"),labels:{_scriptable:e=>!["generateLabels","filter","sort"].includes(e)}}};new WeakMap;const Pc={average(e){if(!e.length)return!1;let t,s,i=new Set,n=0,a=0;for(t=0,s=e.length;t<s;++t){const s=e[t].element;if(s&&s.hasValue()){const e=s.tooltipPosition();i.add(e.x),n+=e.y,++a}}if(0===a||0===i.size)return!1;const o=[...i].reduce((e,t)=>e+t)/i.size;return{x:o,y:n/a}},nearest(e,t){if(!e.length)return!1;let s,i,n,a=t.x,o=t.y,l=Number.POSITIVE_INFINITY;for(s=0,i=e.length;s<i;++s){const i=e[s].element;if(i&&i.hasValue()){const e=i.getCenterPoint(),s=bi(t,e);s<l&&(l=s,n=i)}}if(n){const e=n.tooltipPosition();a=e.x,o=e.y}return{x:a,y:o}}};function Dc(e,t){return t&&(Ss(t)?Array.prototype.push.apply(e,t):e.push(t)),e}function Ac(e){return("string"===typeof e||e instanceof String)&&e.indexOf("\n")>-1?e.split("\n"):e}function $c(e,t){const{element:s,datasetIndex:i,index:n}=t,a=e.getDatasetMeta(i).controller,{label:o,value:l}=a.getLabelAndValue(n);return{chart:e,label:o,parsed:a.getParsed(n),raw:e.data.datasets[i].data[n],formattedValue:l,dataset:a.getDataset(),dataIndex:n,datasetIndex:i,element:s}}function Vc(e,t){const s=e.chart.ctx,{body:i,footer:n,title:a}=e,{boxWidth:o,boxHeight:l}=t,r=Un(t.bodyFont),d=Un(t.titleFont),c=Un(t.footerFont),h=a.length,u=n.length,p=i.length,g=En(t.padding);let f=g.height,m=0,b=i.reduce((e,t)=>
vendor: 4,620 bytes, line 22
22e+t.before.length+t.lines.length+t.after.length,0);if(b+=e.beforeBody.length+e.afterBody.length,h&&(f+=h*d.lineHeight+(h-1)*t.titleSpacing+t.titleMarginBottom),b){const e=t.displayColors?Math.max(l,r.lineHeight):r.lineHeight;f+=p*e+(b-p)*r.lineHeight+(b-1)*t.bodySpacing}u&&(f+=t.footerMarginTop+u*c.lineHeight+(u-1)*t.footerSpacing);let y=0;const x=function(e){m=Math.max(m,s.measureText(e).width+y)};return s.save(),s.font=d.string,Vs(e.title,x),s.font=r.string,Vs(e.beforeBody.concat(e.afterBody),x),y=t.displayColors?o+2+t.boxPadding:0,Vs(i,e=>{Vs(e.before,x),Vs(e.lines,x),Vs(e.after,x)}),y=0,s.font=c.string,Vs(e.footer,x),s.restore(),m+=g.width,{width:m,height:f}}function Lc(e,t){const{y:s,height:i}=t;return s<i/2?"top":s>e.height-i/2?"bottom":"center"}function Ec(e,t,s,i){const{x:n,width:a}=i,o=s.caretSize+s.caretPadding;return"left"===e&&n+a+o>t.width||("right"===e&&n-a-o<0||void 0)}function Uc(e,t,s,i){const{x:n,width:a}=s,{width:o,chartArea:{left:l,right:r}}=e;let d="center";return"center"===i?d=n<=(l+r)/2?"left":"right":n<=a/2?d="left":n>=o-a/2&&(d="right"),Ec(d,e,t,s)&&(d="center"),d}function Ic(e,t,s){const i=s.yAlign||t.yAlign||Lc(e,s);return{xAlign:s.xAlign||t.xAlign||Uc(e,t,s,i),yAlign:i}}function Oc(e,t){let{x:s,width:i}=e;return"right"===t?s-=i:"center"===t&&(s-=i/2),s}function Rc(e,t,s){let{y:i,height:n}=e;return"top"===t?i+=s:i-="bottom"===t?n+s:n/2,i}function Wc(e,t,s,i){const{caretSize:n,caretPadding:a,cornerRadius:o}=e,{xAlign:l,yAlign:r}=s,d=n+a,{topLeft:c,topRight:h,bottomLeft:u,bottomRight:p}=Ln(o);let g=Oc(t,l);const f=Rc(t,r,d);return"center"===r?"left"===l?g+=d:"right"===l&&(g-=d):"left"===l?g-=Math.max(c,u)+n:"right"===l&&(g+=Math.max(h,p)+n),{x:ki(g,0,i.width-t.width),y:ki(f,0,i.height-t.height)}}function Bc(e,t,s){const i=En(s.padding);return"center"===t?e.x+e.width/2:"right"===t?e.x+e.width-i.right:e.x+i.left}function zc(e){return Dc([],Ac(e))}function Nc(e,t,s){return Rn(e,{tooltip:t,tooltipItems:s,type:"tooltip"})}function jc(e,t){const s=t&&t.dataset&&t.dataset.tooltip&&t.dataset.tooltip.callbacks;return s?e.override(s):e}const qc={beforeTitle:_s,title(e){if(e.length>0){const t=e[0],s=t.chart.data.labels,i=s?s.length:0;if(this&&this.options&&"dataset"===this.options.mode)return t.dataset.label||"";if(t.label)return t.label;if(i>0&&t.dataIndex<i)return s[t.dataIndex]}return""},afterTitle:_s,beforeBody:_s,beforeLabel:_s,label(e){if(this&&this.options&&"dataset"===this.options.mode)return e.label+": "+e.formattedValue||e.formattedValue;let t=e.dataset.label||"";t&&(t+=": ");const s=e.formattedValue;return Cs(s)||(t+=s),t},labelColor(e){const t=e.chart.getDatasetMeta(e.datasetIndex),s=t.controller.getStyle(e.dataIndex);return{borderColor:s.borderColor,backgroundColor:s.backgroundColor,borderWidth:s.borderWidth,borderDash:s.borderDash,borderDashOffset:s.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(e){const t=e.chart.getDatasetMeta(e.datasetIndex),s=t.controller.getStyle(e.dataIndex);return{pointStyle:s.pointStyle,rotation:s.rotation}},afterLabel:_s,afterBody:_s,beforeFooter:_s,footer:_s,afterFooter:_s};function Hc(e,t,s,i){const n=e[t].call(s,i);return"undefined"===typeof n?qc[t].call(s,i):n}class Xc extends Jl{constructor(e){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=e.chart,this.options=e.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(e){this.options=e,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const e=this._cachedAnimations;if(e)return e;const t=this.chart,s=this.options.setContext(this.getContext()),i=s.enabled&&t.options.animation&&s.animations,n=new oo(this.chart,i);return i._cacheable&&(this._cachedAnimations=Object.freeze(n)),n}getContext(){return this.$context||(this.$context=Nc(this.chart.getContext(),this,this._tooltipItems))}getTitle(e,t){const{callbacks:s}=t,i=Hc(s,"beforeTitle",this,e),n=Hc(s,"title",this,e),a=Hc(s,"afterTitle",this,e);let o=[];return o=Dc(o,Ac(i)),o=Dc(o,Ac(n)),o=Dc(o,Ac(a)),o}getBeforeBody(e,t){return zc(Hc(t.callbacks,"beforeBody",this,e))}getBody(e,t){const{callbacks:s}=t,i=[];return Vs(e,e=>{const t={before:[],lines:[],after:[]},n=jc(s,e);
vendor: 9,364 bytes, line 22
22Dc(t.before,Ac(Hc(n,"beforeLabel",this,e))),Dc(t.lines,Hc(n,"label",this,e)),Dc(t.after,Ac(Hc(n,"afterLabel",this,e))),i.push(t)}),i}getAfterBody(e,t){return zc(Hc(t.callbacks,"afterBody",this,e))}getFooter(e,t){const{callbacks:s}=t,i=Hc(s,"beforeFooter",this,e),n=Hc(s,"footer",this,e),a=Hc(s,"afterFooter",this,e);let o=[];return o=Dc(o,Ac(i)),o=Dc(o,Ac(n)),o=Dc(o,Ac(a)),o}_createItems(e){const t=this._active,s=this.chart.data,i=[],n=[],a=[];let o,l,r=[];for(o=0,l=t.length;o<l;++o)r.push($c(this.chart,t[o]));return e.filter&&(r=r.filter((t,i,n)=>e.filter(t,i,n,s))),e.itemSort&&(r=r.sort((t,i)=>e.itemSort(t,i,s))),Vs(r,t=>{const s=jc(e.callbacks,t);i.push(Hc(s,"labelColor",this,t)),n.push(Hc(s,"labelPointStyle",this,t)),a.push(Hc(s,"labelTextColor",this,t))}),this.labelColors=i,this.labelPointStyles=n,this.labelTextColors=a,this.dataPoints=r,r}update(e,t){const s=this.options.setContext(this.getContext()),i=this._active;let n,a=[];if(i.length){const e=Pc[s.position].call(this,i,this._eventPosition);a=this._createItems(s),this.title=this.getTitle(a,s),this.beforeBody=this.getBeforeBody(a,s),this.body=this.getBody(a,s),this.afterBody=this.getAfterBody(a,s),this.footer=this.getFooter(a,s);const t=this._size=Vc(this,s),o=Object.assign({},e,t),l=Ic(this.chart,s,o),r=Wc(s,o,l,this.chart);this.xAlign=l.xAlign,this.yAlign=l.yAlign,n={opacity:1,x:r.x,y:r.y,width:t.width,height:t.height,caretX:e.x,caretY:e.y}}else 0!==this.opacity&&(n={opacity:0});this._tooltipItems=a,this.$context=void 0,n&&this._resolveAnimations().update(this,n),e&&s.external&&s.external.call(this,{chart:this.chart,tooltip:this,replay:t})}drawCaret(e,t,s,i){const n=this.getCaretPosition(e,s,i);t.lineTo(n.x1,n.y1),t.lineTo(n.x2,n.y2),t.lineTo(n.x3,n.y3)}getCaretPosition(e,t,s){const{xAlign:i,yAlign:n}=this,{caretSize:a,cornerRadius:o}=s,{topLeft:l,topRight:r,bottomLeft:d,bottomRight:c}=Ln(o),{x:h,y:u}=e,{width:p,height:g}=t;let f,m,b,y,x,v;return"center"===n?(x=u+g/2,"left"===i?(f=h,m=f-a,y=x+a,v=x-a):(f=h+p,m=f+a,y=x-a,v=x+a),b=f):(m="left"===i?h+Math.max(l,d)+a:"right"===i?h+p-Math.max(r,c)-a:this.caretX,"top"===n?(y=u,x=y-a,f=m-a,b=m+a):(y=u+g,x=y+a,f=m+a,b=m-a),v=y),{x1:f,x2:m,x3:b,y1:y,y2:x,y3:v}}drawTitle(e,t,s){const i=this.title,n=i.length;let a,o,l;if(n){const r=Ia(s.rtl,this.x,this.width);for(e.x=Bc(this,s.titleAlign,s),t.textAlign=r.textAlign(s.titleAlign),t.textBaseline="middle",a=Un(s.titleFont),o=s.titleSpacing,t.fillStyle=s.titleColor,t.font=a.string,l=0;l<n;++l)t.fillText(i[l],r.x(e.x),e.y+a.lineHeight/2),e.y+=a.lineHeight+o,l+1===n&&(e.y+=s.titleMarginBottom-o)}}_drawColorBox(e,t,s,i,n){const a=this.labelColors[s],o=this.labelPointStyles[s],{boxHeight:l,boxWidth:r}=n,d=Un(n.bodyFont),c=Bc(this,"left",n),h=i.x(c),u=l<d.lineHeight?(d.lineHeight-l)/2:0,p=t.y+u;if(n.usePointStyle){const t={radius:Math.min(r,l)/2,pointStyle:o.pointStyle,rotation:o.rotation,borderWidth:1},s=i.leftForLtr(h,r)+r/2,d=p+l/2;e.strokeStyle=n.multiKeyBackground,e.fillStyle=n.multiKeyBackground,mn(e,t,s,d),e.strokeStyle=a.borderColor,e.fillStyle=a.backgroundColor,mn(e,t,s,d)}else{e.lineWidth=Fs(a.borderWidth)?Math.max(...Object.values(a.borderWidth)):a.borderWidth||1,e.strokeStyle=a.borderColor,e.setLineDash(a.borderDash||[]),e.lineDashOffset=a.borderDashOffset||0;const t=i.leftForLtr(h,r),s=i.leftForLtr(i.xPlus(h,1),r-2),o=Ln(a.borderRadius);Object.values(o).some(e=>0!==e)?(e.beginPath(),e.fillStyle=n.multiKeyBackground,Tn(e,{x:t,y:p,w:r,h:l,radius:o}),e.fill(),e.stroke(),e.fillStyle=a.backgroundColor,e.beginPath(),Tn(e,{x:s,y:p+1,w:r-2,h:l-2,radius:o}),e.fill()):(e.fillStyle=n.multiKeyBackground,e.fillRect(t,p,r,l),e.strokeRect(t,p,r,l),e.fillStyle=a.backgroundColor,e.fillRect(s,p+1,r-2,l-2))}e.fillStyle=this.labelTextColors[s]}drawBody(e,t,s){const{body:i}=this,{bodySpacing:n,bodyAlign:a,displayColors:o,boxHeight:l,boxWidth:r,boxPadding:d}=s,c=Un(s.bodyFont);let h=c.lineHeight,u=0;const p=Ia(s.rtl,this.x,this.width),g=function(s){t.fillText(s,p.x(e.x+u),e.y+h/2),e.y+=h+n},f=p.textAlign(a);let m,b,y,x,v,k,_;for(t.textAlign=a,t.textBaseline="middle",t.font=c.string,e.x=Bc(this,f,s),t.fillStyle=s.bodyColor,Vs(this.beforeBody,g),u=o&&"right"!==f?"center"===a?r/2+d:r+2+d:0,x=0,k=i.length;x<k;++x){for(m=i[x],b=this.labelTextColors[x],t.fillStyle=b,Vs(m.before,g),y=m.lines,o&&y.length&&(this._drawColorBox(t,e,x,p,s),h=Math.max(c.lineHeight,l)),v=0,_=y.length;v<_;++v)g(y[v]),h=c.lineHeight;Vs(m.after,g)}u=0,h=c.lineHeight,Vs(this.afterBody,g),e.y-=n}drawFooter(e,t,s){const i=this.footer,n=i.length;let a,o;if(n){const l=Ia(s.rtl,this.x,this.width);for(e.x=Bc(this,s.footerAlign,s),e.y+=s.footerMarginTop,t.textAlign=l.textAlign(s.footerAlign),t.textBaseline="middle",a=Un(s.footerFont),t.fillStyle=s.footerColor,t.font=a.string,o=0;o<n;++o)t.fillText(i[o],l.x(e.x),e.y+a.lineHeight/2),e.y+=a.lineHeight+s.footerSpacing}}drawBackground(e,t,s,i){const{xAlign:n,yAlign:a}=this,{x:o,y:l}=e,{width:r,height:d}=s,{topLeft:c,topRight:h,bottomLeft:u,bottomRight:p}=Ln(i.cornerRadius);t.fillStyle=i.backgroundColor,t.strokeStyle=i.borderColor,t.lineWidth=i.borderWidth,t.beginPath(),t.moveTo(o+c,l),"top"===a&&this.drawCaret(e,t,s,i),t.lineTo(o+r-h,l),t.quadraticCurveTo(o+r,l,o+r,l+h),"center"===a&&"right"===n&&this.drawCaret(e,t,s,i),t.lineTo(o+r,l+d-p),t.quadraticCurveTo(o+r,l+d,o+r-p,l+d),"bottom"===a&&this.drawCaret(e,t,s,i),t.lineTo(o+u,l+d),t.quadraticCurveTo(o,l+d,o,l+d-u),"center"===a&&"left"===n&&this.drawCaret(e,t,s,i),t.lineTo(o,l+c),t.quadraticCurveTo(o,l,o+c,l),t.closePath(),t.fill(),i.borderWidth>0&&t.stroke()}_updateAnimationTarget(e){const t=this.chart,s=this.$animations,i=s&&s.x,n=s&&s.y;if(i||n){const s=Pc[e.position].call(this,this._active,this._eventPosition);if(!s)return;const a=this._size=Vc(this,e),o=Object.assign({},s,this._size),l=Ic(t,e,o),r=Wc(e,o,l,t);i._to===r.x&&n._to===r.y||(this.xAlign=l.xAlign,this.yAlign=l.yAlign,this.width=a.width,this.height=a.height,this.caretX=s.x,this.caretY=s.y,this._resolveAnimations().update(this,r))}}_willRender(){return!!this.opacity}draw(e){const t=this.options.setContext(this.getContext());let s=this.opacity;if(!s)return;this._updateAnimationTarget(t);const i={width:this.width,height:this.height},n={x:this.x,y:this.y};s=Math.abs(s)<.001?0:s;const a=En(t.padding),o=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;t.enabled&&o&&(e.save(),e.globalAlpha=s,this.drawBackground(n,e,i,t),Oa(e,t.textDirection),n.y+=a.top,this.drawTitle(n,e,t),this.drawBody(n,e,t),this.drawFooter(n,e,t),Ra(e,t.textDirection),e.restore())}getActiveElements(){return this._active||[]}setActiveElements(e,t){const s=this._active,i=e.map(({datasetIndex:e,index:t})=>{const s=this.chart.getDatasetMeta(e);if(!s)throw new Error("Cannot find a dataset at index "+e);return{datasetIndex:e,element:s.data[t],index:t}}),n=!Ls(s,i),a=this._positionChanged(i,t);(n||a)&&(this._active=i,this._eventPosition=t,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(e,t,s=!0){if(t&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const i=this.options,n=this._active||[],a=this._getActiveElements(e,n,t,s),o=this._positionChanged(a,e),l=t||!Ls(a,n)||o;return l&&(this._active=a,(i.enabled||i.external)&&(this._eventPosition={x:e.x,y:e.y},this.update(!0,t))),l}_getActiveElements(e,t,s,i){const n=this.options;if("mouseout"===e.type)return[];if(!i)return t.filter(e=>this.chart.data.datasets[e.datasetIndex]&&void 0!==this.chart.getDatasetMeta(e.datasetIndex).controller.getParsed(e.index));const a=this.chart.getElementsAtEventForMode(e,n.mode,n,s);return n.reverse&&a.reverse(),a}_positionChanged(e,t){const{caretX:s,caretY:i,options:n}=this,a=Pc[n.position].call(this,e,t);return!1!==a&&(s!==a.x||i!==a.y)}}(0,Dt.A)(Xc,"positioners",Pc);var Kc={id:"tooltip",_element:Xc,positioners:Pc,afterInit(e,t,s){s&&(e.tooltip=new Xc({chart:e,options:s}))},beforeUpdate(e,t,s){e.tooltip&&e.tooltip.initialize(s)},reset(e,t,s){e.tooltip&&e.tooltip.initialize(s)},afterDraw(e){const t=e.tooltip;if(t&&t._willRender()){const s={tooltip:t};if(!1===e.notifyPlugins("beforeTooltipDraw",{...s,cancelable:!0}))return;t.draw(e.ctx),e.notifyPlugins("afterTooltipDraw",s)}},afterEvent(e,t){if(e.tooltip){const s=t.replay;e.tooltip.handleEvent(t.event,s,t.inChartArea)&&(t.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(e,t)=>t.bodyFont.size,boxWidth:(e,t)=>t.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:qc},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:e=>"filter"!==e&&"itemSort"!==e&&"external"!==e,_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]};const Qc=(e,t,s,i)=>
22("string"===typeof t?(s=e.push(t)-1,i.unshift({index:s,label:t})):isNaN(t)&&(s=null),s);function Yc(e,t,s,i){const n=e.indexOf(t);if(-1===n)return Qc(e,t,s,i);const a=e.lastIndexOf(t);return n!==a?s:n}const Gc=(e,t)=>null===e?null:ki(Math.round(e),0,t);function Jc(e){const t=this.getLabels();return e>=0&&e<t.length?t[e]:e}class Zc extends yr{constructor(e){super(e),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(e){const t=this._addedLabels;if(t.length){const e=this.getLabels();for(const{index:s,label:i}of t)e[s]===i&&e.splice(s,1);this._addedLabels=[]}super.init(e)}parse(e,t){if(Cs(e))return null;const s=this.getLabels();return t=isFinite(t)&&s[t]===e?t:Yc(s,e,Ps(t,e),this._addedLabels),Gc(t,s.length-1)}determineDataLimits(){const{minDefined:e,maxDefined:t}=this.getUserBounds();let{min:s,max:i}=this.getMinMax(!0);"ticks"===this.options.bounds&&(e||(s=0),t||(i=this.getLabels().length-1)),this.min=s,this.max=i}buildTicks(){const e=this.min,t=this.max,s=this.options.offset,i=[];let n=this.getLabels();n=0===e&&t===n.length-1?n:n.slice(e,t+1),this._valueRange=Math.max(n.length-(s?0:1),1),this._startValue=this.min-(s?.5:0);for(let a=e;a<=t;a++)i.push({value:a});return i}getLabelForValue(e){return Jc.call(this,e)}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(e){return"number"!==typeof e&&(e=this.parse(e)),null===e?NaN:this.getPixelForDecimal((e-this._startValue)/this._valueRange)}getPixelForTick(e){const t=this.ticks;return e<0||e>t.length-1?null:this.getPixelForValue(t[e].value)}getValueForPixel(e){return Math.round(this._startValue+this.getDecimalForPixel(e)*this._valueRange)}getBasePixel(){return this.bottom}}function eh(e,t){const s=[],i=1e-14,{bounds:n,step:a,min:o,max:l,precision:r,count:d,maxTicks:c,maxDigits:h,includeBounds:u}=e,p=a||1,g=c-1,{min:f,max:m}=t,b=!Cs(o),y=!Cs(l),x=!Cs(d),v=(m-f)/(h+1);let k,_,w,C,S=li((m-f)/g/p)*p;if(S<i&&!b&&!y)return[{value:f},{value:m}];C=Math.ceil(m/S)-Math.floor(f/S),C>g&&(S=li(C*S/g/p)*p),Cs(r)||(k=Math.pow(10,r),S=Math.ceil(S*k)/k),"ticks"===n?(_=Math.floor(f/S)*S,w=Math.ceil(m/S)*S):(_=f,w=m),b&&y&&a&&hi((l-o)/a,S/1e3)?(C=Math.round(Math.min((l-o)/S,c)),S=(l-o)/C,_=o,w=l):x?(_=b?o:_,w=y?l:w,C=d-1,S=(w-_)/C):(C=(w-_)/S,C=oi(C,Math.round(C),S/1e3)?Math.round(C):Math.ceil(C));const F=Math.max(fi(S),fi(_));k=Math.pow(10,Cs(r)?F:r),_=Math.round(_*k)/k,w=Math.round(w*k)/k;let T=0;for(b&&(u&&_!==o?(s.push({value:o}),_<o&&T++,oi(Math.round((_+T*S)*k)/k,o,th(o,v,e))&&T++):_<o&&T++);T<C;++T){const e=Math.round((_+T*S)*k)/k;if(y&&e>l)break;s.push({value:e})}return y&&u&&w!==l?s.length&&oi(s[s.length-1].value,l,th(l,v,e))?s[s.length-1].value=l:s.push({value:l}):y&&w!==l||s.push({value:w}),s}function th(e,t,{horizontal:s,minRotation:i}){const n=pi(i),a=(s?Math.sin(n):Math.cos(n))||.001,o=.75*t*(""+e).length;return Math.min(t/a,o)}(0,Dt.A)(Zc,"id","category"),(0,Dt.A)(Zc,"defaults",{ticks:{callback:Jc}});class sh extends yr{constructor(e){super(e),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(e,t){return Cs(e)||("number"===typeof e||e instanceof Number)&&!isFinite(+e)?null:+e}handleTickRangeOptions(){const{beginAtZero:e}=this.options,{minDefined:t,maxDefined:s}=this.getUserBounds();let{min:i,max:n}=this;const a=e=>i=t?i:e,o=e=>n=s?n:e;if(e){const e=ai(i),t=ai(n);e<0&&t<0?o(0):e>0&&t>0&&a(0)}if(i===n){let t=0===n?1:Math.abs(.05*n);o(n+t),e||a(i-t)}this.min=i,this.max=n}getTickLimit(){const e=this.options.ticks;let t,{maxTicksLimit:s,stepSize:i}=e;return i?(t=Math.ceil(this.max/i)-Math.floor(this.min/i)+1,t>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${i} would result generating up to ${t} ticks. Limiting to 1000.`),t=1e3)):(t=this.computeTickLimit(),s=s||11),s&&(t=Math.min(s,t)),t}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const e=this.options,t=e.ticks;let s=this.getTickLimit();s=Math.max(2,s);const i={maxTicks:s,bounds:e.bounds,min:e.min,max:e.max,precision:t.precision,step:t.stepSize,count:t.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:t.minRotation||0,includeBounds:!1!==t.includeBounds},n=this._range||this,a=eh(i,n);return"ticks"===e.bounds&&ui(a,this,"value"),e.reverse?(a.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),a}configure(){const e=this.ticks;let t=this.min,s=this.max;if(super.configure(),this.options.offset&&e.length){const i=(s-t)/Math.max(e.length-1,1)/2;t-=i,s+=i}this._startValue=t,this._endValue=s,this._valueRange=s-t}getLabelForValue(e){return Zi(e,this.chart.options.locale,this.options.ticks.format)}}class ih extends sh{determineDataLimits(){const{min:e,max:t}=this.getMinMax(!0);this.min=Ts(e)?e:0,this.max=Ts(t)?t:1,this.handleTickRangeOptions()}computeTickLimit(){const e=this.isHorizontal(),t=e?this.width:this.height,s=pi(this.options.ticks.minRotation),i=(e?Math.sin(s):Math.cos(s))||.001,n=this._resolveTickFontOptions(0);return Math.ceil(t/Math.min(40,n.lineHeight/i))}getPixelForValue(e){return null===e?NaN:this.getPixelForDecimal((e-this._startValue)/this._valueRange)}getValueForPixel(e){return this._startValue+this.getDecimalForPixel(e)*this._valueRange}}(0,Dt.A)(ih,"id","linear"),(0,Dt.A)(ih,"defaults",{ticks:{callback:sn.formatters.numeric}});const nh=e=>Math.floor(ni(e)),ah=(e,t)=>Math.pow(10,nh(e)+t);function oh(e){const t=e/Math.pow(10,nh(e));return 1===t}function lh(e,t,s){const i=Math.pow(10,s),n=Math.floor(e/i),a=Math.ceil(t/i);return a-n}function rh(e,t){const s=t-e;let i=nh(s);while(lh(e,t,i)>10)i++;while(lh(e,t,i)<10)i--;return Math.min(i,nh(e))}function dh(e,{min:t,max:s}){t=Ms(e.min,t);const i=[],n=nh(t);
vendor: 4,160 bytes, line 22
22let a=rh(t,s),o=a<0?Math.pow(10,Math.abs(a)):1;const l=Math.pow(10,a),r=n>a?Math.pow(10,n):0,d=Math.round((t-r)*o)/o,c=Math.floor((t-r)/l/10)*l*10;let h=Math.floor((d-c)/Math.pow(10,a)),u=Ms(e.min,Math.round((r+c+h*Math.pow(10,a))*o)/o);while(u<s)i.push({value:u,major:oh(u),significand:h}),h>=10?h=h<15?15:20:h++,h>=20&&(a++,h=2,o=a>=0?1:o),u=Math.round((r+c+h*Math.pow(10,a))*o)/o;const p=Ms(e.max,u);return i.push({value:p,major:oh(p),significand:h}),i}class ch extends yr{constructor(e){super(e),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(e,t){const s=sh.prototype.parse.apply(this,[e,t]);if(0!==s)return Ts(s)&&s>0?s:null;this._zero=!0}determineDataLimits(){const{min:e,max:t}=this.getMinMax(!0);this.min=Ts(e)?Math.max(0,e):null,this.max=Ts(t)?Math.max(0,t):null,this.options.beginAtZero&&(this._zero=!0),this._zero&&this.min!==this._suggestedMin&&!Ts(this._userMin)&&(this.min=e===ah(this.min,0)?ah(this.min,-1):ah(this.min,0)),this.handleTickRangeOptions()}handleTickRangeOptions(){const{minDefined:e,maxDefined:t}=this.getUserBounds();let s=this.min,i=this.max;const n=t=>s=e?s:t,a=e=>i=t?i:e;s===i&&(s<=0?(n(1),a(10)):(n(ah(s,-1)),a(ah(i,1)))),s<=0&&n(ah(i,-1)),i<=0&&a(ah(s,1)),this.min=s,this.max=i}buildTicks(){const e=this.options,t={min:this._userMin,max:this._userMax},s=dh(t,this);return"ticks"===e.bounds&&ui(s,this,"value"),e.reverse?(s.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),s}getLabelForValue(e){return void 0===e?"0":Zi(e,this.chart.options.locale,this.options.ticks.format)}configure(){const e=this.min;super.configure(),this._startValue=ni(e),this._valueRange=ni(this.max)-ni(e)}getPixelForValue(e){return void 0!==e&&0!==e||(e=this.min),null===e||isNaN(e)?NaN:this.getPixelForDecimal(e===this.min?0:(ni(e)-this._startValue)/this._valueRange)}getValueForPixel(e){const t=this.getDecimalForPixel(e);return Math.pow(10,this._startValue+t*this._valueRange)}}function hh(e){const t=e.ticks;if(t.display&&e.display){const e=En(t.backdropPadding);return Ps(t.font&&t.font.size,cn.font.size)+e.height}return 0}function uh(e,t,s){return s=Ss(s)?s:[s],{w:pn(e,t.string,s),h:s.length*t.lineHeight}}function ph(e,t,s,i,n){return e===i||e===n?{start:t-s/2,end:t+s/2}:e<i||e>n?{start:t-s,end:t}:{start:t,end:t+s}}function gh(e){const t={l:e.left+e._padding.left,r:e.right-e._padding.right,t:e.top+e._padding.top,b:e.bottom-e._padding.bottom},s=Object.assign({},t),i=[],n=[],a=e._pointLabels.length,o=e.options.pointLabels,l=o.centerPointLabels?Ys/a:0;for(let r=0;r<a;r++){const a=o.setContext(e.getPointLabelContext(r));n[r]=a.padding;const d=e.getPointPosition(r,e.drawingArea+n[r],l),c=Un(a.font),h=uh(e.ctx,c,e._pointLabels[r]);i[r]=h;const u=xi(e.getIndexAngle(r)+l),p=Math.round(gi(u)),g=ph(p,d.x,h.w,0,180),f=ph(p,d.y,h.h,90,270);fh(s,t,u,g,f)}e.setCenterPoint(t.l-s.l,s.r-t.r,t.t-s.t,s.b-t.b),e._pointLabelItems=yh(e,i,n)}function fh(e,t,s,i,n){const a=Math.abs(Math.sin(s)),o=Math.abs(Math.cos(s));let l=0,r=0;i.start<t.l?(l=(t.l-i.start)/a,e.l=Math.min(e.l,t.l-l)):i.end>t.r&&(l=(i.end-t.r)/a,e.r=Math.max(e.r,t.r+l)),n.start<t.t?(r=(t.t-n.start)/o,e.t=Math.min(e.t,t.t-r)):n.end>t.b&&(r=(n.end-t.b)/o,e.b=Math.max(e.b,t.b+r))}function mh(e,t,s){const i=e.drawingArea,{extra:n,additionalAngle:a,padding:o,size:l}=s,r=e.getPointPosition(t,i+n+o,a),d=Math.round(gi(xi(r.angle+ti))),c=kh(r.y,l.h,d),h=xh(d),u=vh(r.x,l.w,h);return{visible:!0,x:r.x,y:c,textAlign:h,left:u,top:c,right:u+l.w,bottom:c+l.h}}function bh(e,t){if(!t)return!0;const{left:s,top:i,right:n,bottom:a}=e,o=yn({x:s,y:i},t)||yn({x:s,y:a},t)||yn({x:n,y:i},t)||yn({x:n,y:a},t);return!o}function yh(e,t,s){const i=[],n=e._pointLabels.length,a=e.options,{centerPointLabels:o,display:l}=a.pointLabels,r={extra:hh(a)/2,additionalAngle:o?Ys/n:0};let d;for(let c=0;c<n;c++){r.padding=s[c],r.size=t[c];const n=mh(e,c,r);i.push(n),"auto"===l&&(n.visible=bh(n,d),n.visible&&(d=n))}return i}function xh(e){return 0===e||180===e?"center":e<180?"left":"right"}function vh(e,t,s){return"right"===s?e-=t:"center"===s&&(e-=t/2),e}function kh(e,t,s){return 90===s||270===s?e-=t/2:(s>270||s<90)&&(e-=t),e}
vendor: 4,400 bytes, line 22
22function _h(e,t,s){const{left:i,top:n,right:a,bottom:o}=s,{backdropColor:l}=t;if(!Cs(l)){const s=Ln(t.borderRadius),r=En(t.backdropPadding);e.fillStyle=l;const d=i-r.left,c=n-r.top,h=a-i+r.width,u=o-n+r.height;Object.values(s).some(e=>0!==e)?(e.beginPath(),Tn(e,{x:d,y:c,w:h,h:u,radius:s}),e.fill()):e.fillRect(d,c,h,u)}}function wh(e,t){const{ctx:s,options:{pointLabels:i}}=e;for(let n=t-1;n>=0;n--){const t=e._pointLabelItems[n];if(!t.visible)continue;const a=i.setContext(e.getPointLabelContext(n));_h(s,a,t);const o=Un(a.font),{x:l,y:r,textAlign:d}=t;Fn(s,e._pointLabels[n],l,r+o.lineHeight/2,o,{color:a.color,textAlign:d,textBaseline:"middle"})}}function Ch(e,t,s,i){const{ctx:n}=e;if(s)n.arc(e.xCenter,e.yCenter,t,0,Gs);else{let s=e.getPointPosition(0,t);n.moveTo(s.x,s.y);for(let a=1;a<i;a++)s=e.getPointPosition(a,t),n.lineTo(s.x,s.y)}}function Sh(e,t,s,i,n){const a=e.ctx,o=t.circular,{color:l,lineWidth:r}=t;!o&&!i||!l||!r||s<0||(a.save(),a.strokeStyle=l,a.lineWidth=r,a.setLineDash(n.dash||[]),a.lineDashOffset=n.dashOffset,a.beginPath(),Ch(e,s,o,i),a.closePath(),a.stroke(),a.restore())}function Fh(e,t,s){return Rn(e,{label:s,index:t,type:"pointLabel"})}(0,Dt.A)(ch,"id","logarithmic"),(0,Dt.A)(ch,"defaults",{ticks:{callback:sn.formatters.logarithmic,major:{enabled:!0}}});class Th extends sh{constructor(e){super(e),this.xCenter=void 0,this.yCenter=void 0,this.drawingArea=void 0,this._pointLabels=[],this._pointLabelItems=[]}setDimensions(){const e=this._padding=En(hh(this.options)/2),t=this.width=this.maxWidth-e.width,s=this.height=this.maxHeight-e.height;this.xCenter=Math.floor(this.left+t/2+e.left),this.yCenter=Math.floor(this.top+s/2+e.top),this.drawingArea=Math.floor(Math.min(t,s)/2)}determineDataLimits(){const{min:e,max:t}=this.getMinMax(!1);this.min=Ts(e)&&!isNaN(e)?e:0,this.max=Ts(t)&&!isNaN(t)?t:0,this.handleTickRangeOptions()}computeTickLimit(){return Math.ceil(this.drawingArea/hh(this.options))}generateTickLabels(e){sh.prototype.generateTickLabels.call(this,e),this._pointLabels=this.getLabels().map((e,t)=>{const s=$s(this.options.pointLabels.callback,[e,t],this);return s||0===s?s:""}).filter((e,t)=>this.chart.getDataVisibility(t))}fit(){const e=this.options;e.display&&e.pointLabels.display?gh(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(e,t,s,i){this.xCenter+=Math.floor((e-t)/2),this.yCenter+=Math.floor((s-i)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(e,t,s,i))}getIndexAngle(e){const t=Gs/(this._pointLabels.length||1),s=this.options.startAngle||0;return xi(e*t+pi(s))}getDistanceFromCenterForValue(e){if(Cs(e))return NaN;const t=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-e)*t:(e-this.min)*t}getValueForDistanceFromCenter(e){if(Cs(e))return NaN;const t=e/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-t:this.min+t}getPointLabelContext(e){const t=this._pointLabels||[];if(e>=0&&e<t.length){const s=t[e];return Fh(this.getContext(),e,s)}}getPointPosition(e,t,s=0){const i=this.getIndexAngle(e)-ti+s;return{x:Math.cos(i)*t+this.xCenter,y:Math.sin(i)*t+this.yCenter,angle:i}}getPointPositionForValue(e,t){return this.getPointPosition(e,this.getDistanceFromCenterForValue(t))}getBasePosition(e){return this.getPointPositionForValue(e||0,this.getBaseValue())}getPointLabelPosition(e){const{left:t,top:s,right:i,bottom:n}=this._pointLabelItems[e];return{left:t,top:s,right:i,bottom:n}}drawBackground(){const{backgroundColor:e,grid:{circular:t}}=this.options;if(e){const s=this.ctx;s.save(),s.beginPath(),Ch(this,this.getDistanceFromCenterForValue(this._endValue),t,this._pointLabels.length),s.closePath(),s.fillStyle=e,s.fill(),s.restore()}}drawGrid(){const e=this.ctx,t=this.options,{angleLines:s,grid:i,border:n}=t,a=this._pointLabels.length;let o,l,r;if(t.pointLabels.display&&wh(this,a),i.display&&this.ticks.forEach((e,t)=>{if(0!==t||0===t&&this.min<0){l=this.getDistanceFromCenterForValue(e.value);const s=this.getContext(t),o=i.setContext(s),r=n.setContext(s);Sh(this,o,l,a,r)}}),s.display){for(e.save(),o=a-1;o>=0;o--){const i=s.setContext(this.getPointLabelContext(o)),{color:n,lineWidth:a}=i;a&&n&&(e.lineWidth=a,e.strokeStyle=n,e.setLineDash(i.borderDash),e.lineDashOffset=i.borderDashOffset,l=this.getDistanceFromCenterForValue(t.reverse?this.min:this.max),r=this.getPointPosition(o,l),e.beginPath(),e.moveTo(this.xCenter,this.yCenter),e.lineTo(r.x,r.y),e.stroke())}
vendor: 6,202 bytes, line 22
22e.restore()}}drawBorder(){}drawLabels(){const e=this.ctx,t=this.options,s=t.ticks;if(!s.display)return;const i=this.getIndexAngle(0);let n,a;e.save(),e.translate(this.xCenter,this.yCenter),e.rotate(i),e.textAlign="center",e.textBaseline="middle",this.ticks.forEach((i,o)=>{if(0===o&&this.min>=0&&!t.reverse)return;const l=s.setContext(this.getContext(o)),r=Un(l.font);if(n=this.getDistanceFromCenterForValue(this.ticks[o].value),l.showLabelBackdrop){e.font=r.string,a=e.measureText(i.label).width,e.fillStyle=l.backdropColor;const t=En(l.backdropPadding);e.fillRect(-a/2-t.left,-n-r.size/2-t.top,a+t.width,r.size+t.height)}Fn(e,i.label,0,-n,r,{color:l.color,strokeColor:l.textStrokeColor,strokeWidth:l.textStrokeWidth})}),e.restore()}drawTitle(){}}(0,Dt.A)(Th,"id","radialLinear"),(0,Dt.A)(Th,"defaults",{display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:sn.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback(e){return e},padding:5,centerPointLabels:!1}}),(0,Dt.A)(Th,"defaultRoutes",{"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"}),(0,Dt.A)(Th,"descriptors",{angleLines:{_fallback:"grid"}});const Mh={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}},Ph=Object.keys(Mh);function Dh(e,t){return e-t}function Ah(e,t){if(Cs(t))return null;const s=e._adapter,{parser:i,round:n,isoWeekday:a}=e._parseOpts;let o=t;return"function"===typeof i&&(o=i(o)),Ts(o)||(o="string"===typeof i?s.parse(o,i):s.parse(o)),null===o?null:(n&&(o="week"!==n||!ci(a)&&!0!==a?s.startOf(o,n):s.startOf(o,"isoWeek",a)),+o)}function $h(e,t,s,i){const n=Ph.length;for(let a=Ph.indexOf(e);a<n-1;++a){const e=Mh[Ph[a]],n=e.steps?e.steps:Number.MAX_SAFE_INTEGER;if(e.common&&Math.ceil((s-t)/(n*e.size))<=i)return Ph[a]}return Ph[n-1]}function Vh(e,t,s,i,n){for(let a=Ph.length-1;a>=Ph.indexOf(s);a--){const s=Ph[a];if(Mh[s].common&&e._adapter.diff(n,i,s)>=t-1)return s}return Ph[s?Ph.indexOf(s):0]}function Lh(e){for(let t=Ph.indexOf(e)+1,s=Ph.length;t<s;++t)if(Mh[Ph[t]].common)return Ph[t]}function Eh(e,t,s){if(s){if(s.length){const{lo:i,hi:n}=Ci(s,t),a=s[i]>=t?s[i]:s[n];e[a]=!0}}else e[t]=!0}function Uh(e,t,s,i){const n=e._adapter,a=+n.startOf(t[0].value,i),o=t[t.length-1].value;let l,r;for(l=a;l<=o;l=+n.add(l,1,i))r=s[l],r>=0&&(t[r].major=!0);return t}function Ih(e,t,s){const i=[],n={},a=t.length;let o,l;for(o=0;o<a;++o)l=t[o],n[l]=o,i.push({value:l,major:!1});return 0!==a&&s?Uh(e,i,n,s):i}class Oh extends yr{constructor(e){super(e),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(e,t={}){const s=e.time||(e.time={}),i=this._adapter=new sl._date(e.adapters.date);i.init(t),Rs(s.displayFormats,i.formats()),this._parseOpts={parser:s.parser,round:s.round,isoWeekday:s.isoWeekday},super.init(e),this._normalized=t.normalized}parse(e,t){return void 0===e?null:Ah(this,e)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const e=this.options,t=this._adapter,s=e.time.unit||"day";let{min:i,max:n,minDefined:a,maxDefined:o}=this.getUserBounds();function l(e){a||isNaN(e.min)||(i=Math.min(i,e.min)),o||isNaN(e.max)||(n=Math.max(n,e.max))}a&&o||(l(this._getLabelBounds()),"ticks"===e.bounds&&"labels"===e.ticks.source||l(this.getMinMax(!1))),i=Ts(i)&&!isNaN(i)?i:+t.startOf(Date.now(),s),n=Ts(n)&&!isNaN(n)?n:+t.endOf(Date.now(),s)+1,this.min=Math.min(i,n-1),this.max=Math.max(i+1,n)}_getLabelBounds(){const e=this.getLabelTimestamps();let t=Number.POSITIVE_INFINITY,s=Number.NEGATIVE_INFINITY;return e.length&&(t=e[0],s=e[e.length-1]),{min:t,max:s}}buildTicks(){const e=this.options,t=e.time,s=e.ticks,i="labels"===s.source?this.getLabelTimestamps():this._generate();"ticks"===e.bounds&&i.length&&(this.min=this._userMin||i[0],this.max=this._userMax||i[i.length-1]);const n=this.min,a=this.max,o=Ti(i,n,a);return this._unit=t.unit||(s.autoSkip?$h(t.minUnit,this.min,this.max,this._getLabelCapacity(n)):Vh(this,o.length,t.minUnit,this.min,this.max)),this._majorUnit=s.major.enabled&&"year"!==this._unit?Lh(this._unit):void 0,this.initOffsets(i),e.reverse&&o.reverse(),Ih(this,o,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map(e=>+e.value))}initOffsets(e=[]){let t,s,i=0,n=0;this.options.offset&&e.length&&(t=this.getDecimalForValue(e[0]),i=1===e.length?1-t:(this.getDecimalForValue(e[1])-t)/2,s=this.getDecimalForValue(e[e.length-1]),n=1===e.length?s:(s-this.getDecimalForValue(e[e.length-2]))/2);const a=e.length<3?.5:.25;i=ki(i,0,a),n=ki(n,0,a),this._offsets={start:i,end:n,factor:1/(i+1+n)}}_generate(){const e=this._adapter,t=this.min,s=this.max,i=this.options,n=i.time,a=n.unit||$h(n.minUnit,t,s,this._getLabelCapacity(t)),o=Ps(i.ticks.stepSize,1),l="week"===a&&n.isoWeekday,r=ci(l)||!0===l,d={};let c,h,u=t;if(r&&(u=+e.startOf(u,"isoWeek",l)),u=+e.startOf(u,r?"day":a),e.diff(s,t,a)>1e5*o)throw new Error(t+" and "+s+" are too far apart with stepSize of "+o+" "+a);const p="data"===i.ticks.source&&this.getDataTimestamps();for(c=u,h=0;c<s;c=+e.add(c,o,a),h++)Eh(d,c,p);return c!==s&&"ticks"!==i.bounds&&1!==h||Eh(d,c,p),Object.keys(d).sort(Dh).map(e=>+e)}getLabelForValue(e){const t=this._adapter,s=this.options.time;return s.tooltipFormat?t.format(e,s.tooltipFormat):t.format(e,s.displayFormats.datetime)}format(e,t){const s=this.options,i=s.time.displayFormats,n=this._unit,a=t||i[n];return this._adapter.format(e,a)}_tickFormatFunction(e,t,s,i){const n=this.options,a=n.ticks.callback;if(a)return $s(a,[e,t,s],this);const o=n.time.displayFormats,l=this._unit,r=this._majorUnit,d=l&&o[l],c=r&&o[r],h=s[t],u=r&&c&&h&&h.major;return this._adapter.format(e,i||(u?c:d))}generateTickLabels(e){let t,s,i;for(t=0,s=e.length;t<s;
22++t)i=e[t],i.label=this._tickFormatFunction(i.value,t,e)}getDecimalForValue(e){return null===e?NaN:(e-this.min)/(this.max-this.min)}getPixelForValue(e){const t=this._offsets,s=this.getDecimalForValue(e);return this.getPixelForDecimal((t.start+s)*t.factor)}getValueForPixel(e){const t=this._offsets,s=this.getDecimalForPixel(e)/t.factor-t.end;return this.min+s*(this.max-this.min)}_getLabelSize(e){const t=this.options.ticks,s=this.ctx.measureText(e).width,i=pi(this.isHorizontal()?t.maxRotation:t.minRotation),n=Math.cos(i),a=Math.sin(i),o=this._resolveTickFontOptions(0).size;return{w:s*n+o*a,h:s*a+o*n}}_getLabelCapacity(e){const t=this.options.time,s=t.displayFormats,i=s[t.unit]||s.millisecond,n=this._tickFormatFunction(e,0,Ih(this,[e],this._majorUnit),i),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 e,t,s=this._cache.data||[];if(s.length)return s;const i=this.getMatchingVisibleMetas();if(this._normalized&&i.length)return this._cache.data=i[0].controller.getAllParsedValues(this);for(e=0,t=i.length;e<t;++e)s=s.concat(i[e].controller.getAllParsedValues(this));return this._cache.data=this.normalize(s)}getLabelTimestamps(){const e=this._cache.labels||[];let t,s;if(e.length)return e;const i=this.getLabels();for(t=0,s=i.length;t<s;++t)e.push(Ah(this,i[t]));return this._cache.labels=this._normalized?e:this.normalize(e)}normalize(e){return Ai(e.sort(Dh))}}function Rh(e,t,s){let i,n,a,o,l=0,r=e.length-1;s?(t>=e[l].pos&&t<=e[r].pos&&({lo:l,hi:r}=Si(e,"pos",t)),({pos:i,time:a}=e[l]),({pos:n,time:o}=e[r])):(t>=e[l].time&&t<=e[r].time&&({lo:l,hi:r}=Si(e,"time",t)),({time:i,pos:a}=e[l]),({time:n,pos:o}=e[r]));const d=n-i;return d?a+(o-a)*(t-i)/d:a}(0,Dt.A)(Oh,"id","time"),(0,Dt.A)(Oh,"defaults",{bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",callback:!1,major:{enabled:!1}}});class Wh extends Oh{constructor(e){super(e),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const e=this._getTimestampsForTable(),t=this._table=this.buildLookupTable(e);this._minPos=Rh(t,this.min),this._tableRange=Rh(t,this.max)-this._minPos,super.initOffsets(e)}buildLookupTable(e){const{min:t,max:s}=this,i=[],n=[];let a,o,l,r,d;for(a=0,o=e.length;a<o;++a)r=e[a],r>=t&&r<=s&&i.push(r);if(i.length<2)return[{time:t,pos:0},{time:s,pos:1}];for(a=0,o=i.length;a<o;++a)d=i[a+1],l=i[a-1],r=i[a],Math.round((d+l)/2)!==r&&n.push({time:r,pos:a/(o-1)});return n}_generate(){const e=this.min,t=this.max;let s=super.getDataTimestamps();return s.includes(e)&&s.length||s.splice(0,0,e),s.includes(t)&&1!==s.length||s.push(t),s.sort((e,t)=>e-t)}_getTimestampsForTable(){let e=this._cache.all||[];if(e.length)return e;const t=this.getDataTimestamps(),s=this.getLabelTimestamps();return e=t.length&&s.length?this.normalize(t.concat(s)):t.length?t:s,e=this._cache.all=e,e}getDecimalForValue(e){return(Rh(this._table,e)-this._minPos)/this._tableRange}getValueForPixel(e){const t=this._offsets,s=this.getDecimalForPixel(e)/t.factor-t.end;return Rh(this._table,s*this._tableRange+this._minPos,!0)}}(0,Dt.A)(Wh,"id","timeseries"),(0,Dt.A)(Wh,"defaults",Oh.defaults);var Bh=s(90144);const zh={data:{type:Object,required:!0},options:{type:Object,default:()=>({})},plugins:{type:Array,default:()=>[]},datasetIdKey:{type:String,default:"label"},updateMode:{type:String,default:void 0}},Nh={ariaLabel:{type:String},ariaDescribedby:{type:String}},jh={type:{type:String,required:!0},destroyDelay:{type:Number,default:0},...zh,...Nh},qh="2"===i.rE[0]?(e,t)=>Object.assign(e,{attrs:t}):(e,t)=>Object.assign(e,t);function Hh(e){return(0,Bh.ju)(e)?(0,Bh.ux)(e):e}function Xh(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e;return(0,Bh.ju)(t)?new Proxy(e,{}):e}function Kh(e,t){const s=e.options;s&&t&&Object.assign(s,t)}function Qh(e,t){e.labels=t}function Yh(e,t,s){const i=[];e.datasets=t.map(t=>{const n=e.datasets.find(e=>e[s]===t[s]);return n&&t.data&&!i.includes(n)?(i.push(n),Object.assign(n,t),n):{...t}})}function Gh(e,t){const s={labels:[],datasets:[]};return Qh(s,e.labels),Yh(s,e.datasets,t),s}const Jh=(0,i.pM)({props:jh,setup(e,t){let{expose:s,slots:n}=t;const a=(0,Bh.KR)(null),o=(0,Bh.IJ)(null);s({chart:o});const l=()=>{if(!a.value)return;const{type:t,data:s,options:i,plugins:n,datasetIdKey:l}=e,r=Gh(s,l),d=Xh(r,s);o.value=new ld(a.value,{type:t,data:d,options:{...i},plugins:n})},r=()=>{const t=(0,Bh.ux)(o.value);t&&(e.destroyDelay>0?setTimeout(()=>{t.destroy(),o.value=null},e.destroyDelay):(t.destroy(),o.value=null))},d=t=>{t.update(e.updateMode)};return(0,i.sV)(l),(0,i.hi)(r),(0,i.wB)([()=>
22e.options,()=>e.data],(t,s)=>{let[n,a]=t,[l,r]=s;const c=(0,Bh.ux)(o.value);if(!c)return;let h=!1;if(n){const e=Hh(n),t=Hh(l);e&&e!==t&&(Kh(c,e),h=!0)}if(a){const t=Hh(a.labels),s=Hh(r.labels),i=Hh(a.datasets),n=Hh(r.datasets);t!==s&&(Qh(c.config.data,t),h=!0),i&&i!==n&&(Yh(c.config.data,i,e.datasetIdKey),h=!0)}h&&(0,i.dY)(()=>{d(c)})},{deep:!0}),()=>(0,i.h)("canvas",{role:"img","aria-label":e.ariaLabel,"aria-describedby":e.ariaDescribedby,ref:a},[(0,i.h)("p",{},[n.default?n.default():""])])}});function Zh(e,t){return ld.register(t),(0,i.pM)({props:zh,setup(t,s){let{expose:n}=s;const a=(0,Bh.IJ)(null),o=e=>{a.value=e?.chart};return n({chart:a}),()=>(0,i.h)(Jh,qh({ref:o},{type:e,...t}))}})}const eu=Zh("doughnut",Ko),tu=Zh("line",Qo);s(79577),s(41549),s(49797),s(49631),s(35623);class su extends Error{constructor(e,t,s=!1,i=""){super(e),this.name="BatchOperationError",this.code=t,this.recoverable=s,this.suggestion=i}}const iu={401:()=>new su("认è¯å¤±è´¥ï¼è¯·éæ°ç»å½","AUTH_FAILED",!1,"è¯·å·æ°é¡µé¢å¹¶éæ°ç»å½"),403:()=>new su("æéä¸è¶³æè¯·æ±è¢«æç»","FORBIDDEN",!1,"è¯·ç¡®è®¤æ¨æç®¡çåæé"),400:e=>new su(`è¯·æ±æ°æ®æ æ: ${e}`,"INVALID_DATA",!0,"è¯·æ£æ¥æ°æ®æ ¼å¼åéè¯"),500:()=>new su("æå¡å¨å
é¨é误","SERVER_ERROR",!0,"请ç¨åéè¯ï¼å¦æé®é¢æç»è¯·è系管çå"),NETWORK:()=>new su("ç½ç»è¿æ¥å¤±è´¥","NETWORK_ERROR",!0,"è¯·æ£æ¥ç½ç»è¿æ¥åéè¯"),ABORT:()=>new su("æä½å·²åæ¶","ABORTED",!1,"")};function nu(e,t=""){if("AbortError"===e.name)return iu.ABORT();if(e instanceof Response||e&&"number"===typeof e.status){const s=iu[e.status];return s?s(t):new su(`请æ±å¤±è´¥: ${e.status}`,"HTTP_ERROR",!0,"请ç¨åéè¯")}return e instanceof TypeError&&e.message.includes("fetch")?iu.NETWORK():new su(e.message||"æªç¥é误","UNKNOWN_ERROR",!0,"请ç¨åéè¯")}class au{constructor(e={}){this.batchSize=e.batchSize||1e3,this.onProgress=e.onProgress||(()=>{}),this.onError=e.onError||(()=>{}),this.abortController=null}async fetchAllRecords(e=!1){this.abortController=new AbortController;const t=[];let s=null,i=0,n=0;try{do{if(this.abortController.signal.aborted)break;const a=await this.fetchBatch(s,e);t.push(...a.records),s=a.nextCursor,i+=a.records.length,n++,this.onProgress({phase:"fetching",current:i,batchCount:n,message:`å·²è·å ${i} æ¡è®°å½...`})}while(s&&!this.abortController.signal.aborted);if(this.abortController.signal.aborted)throw iu.ABORT();return t}catch(a){const e=a instanceof su?a:nu(a);throw this.onError(e),e}}async fetchBatch(e,t){const s=new URLSearchParams;e&&s.set("cursor",e),t&&s.set("includeValue","true"),s.set("limit",String(this.batchSize));try{const e=await(0,Mt.A)(`/api/manage/batch/list?${s}`,{signal:this.abortController.signal});if(!e.ok){let t="";try{const s=await e.json();t=s.error||""}catch{}throw nu(e,t)}const t=await e.json();if(!t.success)throw new su(t.error||"请æ±å¤±è´¥","API_ERROR",!0,"请ç¨åéè¯");return{records:t.records||[],nextCursor:t.nextCursor||null,totalProcessed:t.totalProcessed||0}}catch(i){if(i instanceof su)throw i;throw nu(i)}}abort(){this.abortController&&this.abortController.abort()}isAborted(){return!!this.abortController&&this.abortController.signal.aborted}reset(){this.abortController=null}}var ou=au;class lu{constructor(e={}){this.chunkSize=e.chunkSize||null,this.maxRetries=e.maxRetries||3,this.retryDelay=e.retryDelay||1e3,this.onProgress=e.onProgress||(()=>{}),this.onError=e.onError||(()=>{}),this.sessionId=this.generateSessionId(),this.aborted=!1}async fetchConfig(){try{const e=await(0,Mt.A)("/api/manage/batch/index/config");if(!e.ok)throw new Error("è·åé
置失败");const t=await e.json();if(t.success)return{chunkSize:t.chunkSize||500,databaseType:t.databaseType||"unknown"};throw new Error(t.error||"è·åé
置失败")}catch(e){return console.warn("Failed to fetch index config, using default:",e),{chunkSize:500,databaseType:"unknown"}}}async rebuild(){this.aborted=!1;try{if(!this.chunkSize){const e=await this.fetchConfig();this.chunkSize=e.chunkSize}this.onProgress({phase:"fetching",message:"æ£å¨è·åæ°æ®...",current:0});const e=new ou({onProgress:e=>this.onProgress({...e,phase:"fetching"}),onError:e=>this.onError(e)}),t=await e.fetchAllRecords(!1);if(this.aborted)throw new su("æä½å·²åæ¶","ABORTED",!1,"");if(this.onProgress({phase:"sorting",message:"æ£å¨æåº...",current:0,total:t.length}),this.sortByTimestampDescending(t),this.aborted)throw new su("æä½å·²åæ¶","ABORTED",!1,"");const s=this.splitIntoChunks(t);for(let i=0;i<s.length;i++){if(this.aborted)throw new su("æä½å·²åæ¶","ABORTED",!1,"");await this.uploadChunkWithRetry(s[i],i),this.onProgress({phase:"uploading",current:i+1,total:s.length,message:`æ£å¨ä¸ä¼ åå ${i+1}/${s.length}...`})}return this.onProgress({phase:"finalizing",message:"æ£å¨å®æé建...",current:s.length,total:s.length}),await this.finalize(s.length,t.length),this.onProgress({phase:"completed",message:`ç´¢å¼éå»ºå®æï¼å
± ${t.length} 个æä»¶`,current:t.length,total:t.length}),{success:!0,totalFiles:t.length}}catch(e){const t=e instanceof su?e:new su(e.message||"ç´¢å¼é建失败","REBUILD_ERROR",!0,"请ç¨åéè¯");throw this.onError(t),t}}sortByTimestampDescending(e){e.sort((e,t)=>
22{const s=e.metadata&&e.metadata.TimeStamp||0,i=t.metadata&&t.metadata.TimeStamp||0;return i-s})}splitIntoChunks(e){const t=[];for(let s=0;s<e.length;s+=this.chunkSize)t.push(e.slice(s,s+this.chunkSize));return t}async uploadChunkWithRetry(e,t){let s;for(let n=1;n<=this.maxRetries;n++)try{return await this.uploadChunk(e,t)}catch(i){if(s=i,i instanceof su&&("AUTH_FAILED"===i.code||"FORBIDDEN"===i.code||"ABORTED"===i.code))throw i;if(n<this.maxRetries){const e=this.retryDelay*Math.pow(2,n-1);await this.sleep(e),this.onProgress({phase:"retrying",message:`åå ${t+1} ä¸ä¼ å¤±è´¥ï¼æ£å¨éè¯ (${n}/${this.maxRetries})...`,current:t,attempt:n})}}throw s instanceof su?s:new su(`åå ${t+1} ä¸ä¼ 失败ï¼å·²éè¯ ${this.maxRetries} 次`,"CHUNK_UPLOAD_FAILED",!1,"è¯·æ£æ¥ç½ç»è¿æ¥åéæ°å¼å§é建")}async uploadChunk(e,t){const s=await this.calculateChecksum(e);try{const i=await(0,Mt.A)("/api/manage/batch/index/chunk",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({chunkId:String(t),sessionId:this.sessionId,data:e,checksum:s})});if(!i.ok){let e="";try{const t=await i.json();e=t.error||""}catch{}throw this.createHttpError(i.status,e)}const n=await i.json();if(!n.success)throw new su(n.error||"ååä¸ä¼ 失败","CHUNK_UPLOAD_FAILED",!0,"请ç¨åéè¯");return n}catch(i){if(i instanceof su)throw i;if(i instanceof TypeError&&i.message.includes("fetch"))throw new su("ç½ç»è¿æ¥å¤±è´¥","NETWORK_ERROR",!0,"è¯·æ£æ¥ç½ç»è¿æ¥åéè¯");throw new su(i.message||"ååä¸ä¼ 失败","CHUNK_UPLOAD_FAILED",!0,"请ç¨åéè¯")}}async finalize(e,t){try{const s=await(0,Mt.A)("/api/manage/batch/index/finalize",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({sessionId:this.sessionId,totalChunks:e,totalFiles:t})});if(!s.ok){let e="";try{const t=await s.json();e=t.error||""}catch{}throw this.createHttpError(s.status,e)}const i=await s.json();if(!i.success)throw new su(i.error||"ç´¢å¼å®æå¤±è´¥","FINALIZE_FAILED",!0,"请ç¨åéè¯");return i}catch(s){if(s instanceof su)throw s;throw new su(s.message||"ç´¢å¼å®æå¤±è´¥","FINALIZE_FAILED",!0,"请ç¨åéè¯")}}generateSessionId(){return`rebuild_${Date.now()}_${Math.random().toString(36).slice(2)}`}async calculateChecksum(e){const t=JSON.stringify(e),s=new TextEncoder,i=s.encode(t);if("undefined"!==typeof crypto&&crypto.subtle){const e=await crypto.subtle.digest("SHA-256",i),t=Array.from(new Uint8Array(e));return t.map(e=>e.toString(16).padStart(2,"0")).join("")}let n=2166136261,a=2166136261;for(let o=0;o<i.length;o++)n=Math.imul(n^i[o],16777619)>>>0,a=Math.imul(a^i[o],16777635)>>>0;return n.toString(16).padStart(8,"0")+a.toString(16).padStart(8,"0")}createHttpError(e,t=""){switch(e){case 401:return new su("认è¯å¤±è´¥ï¼è¯·éæ°ç»å½","AUTH_FAILED",!1,"è¯·å·æ°é¡µé¢å¹¶éæ°ç»å½");case 403:return new su("æéä¸è¶³æè¯·æ±è¢«æç»","FORBIDDEN",!1,"è¯·ç¡®è®¤æ¨æç®¡çåæé");case 400:return new su(`è¯·æ±æ°æ®æ æ: ${t}`,"INVALID_DATA",!0,"è¯·æ£æ¥æ°æ®æ ¼å¼åéè¯");case 404:return new su("ä¼è¯ä¸åå¨","SESSION_NOT_FOUND",!1,"è¯·éæ°å¼å§ç´¢å¼é建");case 410:return new su("ä¼è¯å·²è¿æ","SESSION_EXPIRED",!1,"è¯·éæ°å¼å§ç´¢å¼é建");case 500:default:return new su(`æå¡å¨é误: ${t||e}`,"SERVER_ERROR",!0,"请ç¨åéè¯")}}sleep(e){return new Promise(t=>setTimeout(t,e))}abort(){this.aborted=!0}reset(){this.aborted=!1,this.sessionId=this.generateSessionId()}}var ru=lu;class du{constructor(e={}){this.onProgress=e.onProgress||(()=>{}),this.processor=null}async generateBackup(){this.processor=new ou({onProgress:e=>this.onProgress({...e,phase:"fetching"})});const e=await this.processor.fetchAllRecords(!0);this.onProgress({phase:"building",message:"æ£å¨æå»ºå¤ä»½æ°æ®..."});const t={timestamp:Date.now(),version:Pt.rE,data:{fileCount:e.length,files:{},settings:{}}};for(const n of e)t.data.files[n.id]={metadata:n.metadata,value:n.value||null};const s=await this.fetchSettings();t.data.settings=s,this.onProgress({phase:"downloading",message:"æ£å¨çæä¸è½½..."}),this.downloadBackup(t);const i=Object.keys(s).length;return{success:!0,fileCount:e.length,settingsCount:i}}async fetchSettings(){try{const e=await(0,Mt.A)("/api/manage/batch/settings");if(!e.ok)return console.warn("Failed to fetch settings:",e.status),{};const t=await e.json();return t.settings||{}}catch(e){return console.warn("Failed to fetch settings:",e),{}}}downloadBackup(e){const t=JSON.stringify(e,null,2),s=new Blob([t],{type:"application/json"}),i=URL.createObjectURL(s),n=document.createElement("a");n.href=i,n.download=`imgbed_backup_${(new Date).toISOString().split("T")[0]}.json`,document.body.appendChild(n),n.click(),document.body.removeChild(n),URL.revokeObjectURL(i)}abort(){this.processor&&this.processor.abort()}isAborted(){return!!this.processor&&this.processor.isAborted()}}var cu=du;class hu{constructor(e={}){this.chunkSize=e.chunkSize||50,this.maxRetries=e.maxRetries||3,this.retryDelay=e.retryDelay||1e3,this.onProgress=e.onProgress||(()=>{}),this.onError=e.onError||(()=>{}),this.aborted=!1}async restore(e){if(this.aborted=!1,!e||!e.data)throw new su("å¤ä»½æä»¶æ ¼å¼æ æ","INVALID_BACKUP",!1,"è¯·éæ©ææçå¤ä»½æä»¶");const{files:t={},settings:s={}}=e.data,i=Object.entries(t),n=Object.entries(s),a=i.length,o=n.length,l=a+o;let r=0,d=0,c=0,h=0;try{this.onProgress({phase:"restoring_files",message:"æ£å¨æ¢å¤æä»¶æ°æ®...",current:0,total:l});const t=this.splitIntoChunks(i,this.chunkSize);for(let e=0;e<t.length;e++){if(this.aborted)throw new su("æä½å·²åæ¶","ABORTED",!1,"");const s=t[e],i=Object.fromEntries(s),n=await this.uploadChunkWithRetry("files",i);r+=n.restoredCount,c+=n.failedCount,this.onProgress({phase:"restoring_files",message:`æ£å¨æ¢å¤æä»¶æ°æ® ${r}/${a}...`,current:r,total:l,percentage:r/l*80})}this.onProgress({phase:"restoring_settings",message:"æ£å¨æ¢å¤ç³»ç»è®¾ç½®...",current:r,total:l});const s=this.splitIntoChunks(n,this.chunkSize);for(let e=0;e<s.length;e++){if(this.aborted)throw new su("æä½å·²åæ¶","ABORTED",!1,"");const t=s[e],i=Object.fromEntries(t),n=await this.uploadChunkWithRetry("settings",i);d+=n.restoredCount,h+=n.failedCount,this.onProgress({phase:"restoring_settings",message:`æ£å¨æ¢å¤ç³»ç»è®¾ç½® ${d}/${o}...`,current:r+d,total:l,percentage:80+d/o*20})}return this.onProgress({phase:"completed",message:"æ¢å¤å®æ",current:l,total:l,percentage:100}),{success:!0,restoredFiles:r,restoredSettings:d,failedFiles:c,failedSettings:h,backupTimestamp:e.timestamp}}catch(u){const e=u instanceof su?u:new su(u.message||"æ¢å¤å¤±è´¥","RESTORE_ERROR",!0,"请ç¨åéè¯");throw this.onError(e),e}}splitIntoChunks(e,t){const s=[];for(let i=0;i<e.length;i+=t)s.push(e.slice(i,i+t));return s}async uploadChunkWithRetry(e,t){let s;for(let n=1;n<=this.maxRetries;n++)try{return await this.uploadChunk(e,t)}catch(i){if(s=i,i instanceof su&&("AUTH_FAILED"===i.code||"FORBIDDEN"===i.code||"ABORTED"===i.code))throw i;if(n<this.maxRetries){const e=this.retryDelay*Math.pow(2,n-1);await this.sleep(e)}}throw s}async uploadChunk(e,t){try{const s=await(0,Mt.A)("/api/manage/batch/restore/chunk",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({type:e,data:t})});if(!s.ok){let e="";try{const t=await s.json();e=t.error||""}catch{}throw this.createHttpError(s.status,e)}const i=await s.json();if(!i.success)throw new su(i.error||"æ¢å¤åå失败","CHUNK_RESTORE_FAILED",!0,"请ç¨åéè¯");return i}catch(s){if(s instanceof su)throw s;if(s instanceof TypeError&&s.message.includes("fetch"))throw new su("ç½ç»è¿æ¥å¤±è´¥","NETWORK_E
22RROR",!0,"è¯·æ£æ¥ç½ç»è¿æ¥åéè¯");throw new su(s.message||"æ¢å¤åå失败","CHUNK_RESTORE_FAILED",!0,"请ç¨åéè¯")}}createHttpError(e,t=""){switch(e){case 401:return new su("认è¯å¤±è´¥ï¼è¯·éæ°ç»å½","AUTH_FAILED",!1,"è¯·å·æ°é¡µé¢å¹¶éæ°ç»å½");case 403:return new su("æéä¸è¶³æè¯·æ±è¢«æç»","FORBIDDEN",!1,"è¯·ç¡®è®¤æ¨æç®¡çåæé");case 400:return new su(`è¯·æ±æ°æ®æ æ: ${t}`,"INVALID_DATA",!0,"è¯·æ£æ¥å¤ä»½æä»¶æ ¼å¼");case 500:default:return new su(`æå¡å¨é误: ${t||e}`,"SERVER_ERROR",!0,"请ç¨åéè¯")}}sleep(e){return new Promise(t=>setTimeout(t,e))}abort(){this.aborted=!0}}var uu=hu;ld.register(bd,Kc,Mc,Zc,ih,$d,Dd,xc);const pu=864e5;function gu(e){return String(e).padStart(2,"0")}function fu(e){return`${e.getFullYear()}-${gu(e.getMonth()+1)}-${gu(e.getDate())}`}function mu(){const e=new Date;e.setHours(0,0,0,0);const t=new Date(e.getTime()-6*pu);return[fu(t),fu(e)]}var bu={name:"SysCogStatus",components:{Doughnut:eu,Line:tu,DateRangeCalendar:H},data(){return{loading:!1,rebuilding:!1,backing:!1,restoring:!1,indexInfo:{},version:Pt.rE,loadErrors:{newest:!1,oldest:!1},trendGroupBy:"channel",trendDatePickerVisible:!1,trendDateRange:mu(),channelColors:["#8B5CF6","#EC4899","#06B6D4","#10B981","#F59E0B","#EF4444","#2563EB","#84CC16"],typeColors:["#10B981","#3B82F6","#F59E0B","#EF4444","#8B5CF6","#EC4899","#06B6D4","#84CC16"],trendColors:["#2563EB","#10B981","#F59E0B","#EF4444","#8B5CF6","#06B6D4","#EC4899","#84CC16","#64748B"],isProcessing:!1,processingPhase:"",processingProgress:{current:0,total:0,message:"",percentage:0},processingError:null,processingStartTime:null,currentRebuilder:null,currentBackupGenerator:null,currentRestoreProcessor:null}},computed:{channelChartData(){const e=this.indexInfo.channelStats||{};return{labels:Object.keys(e),datasets:[{data:Object.values(e),backgroundColor:this.channelColors.slice(0,Object.keys(e).length),borderWidth:0}]}},typeChartData(){const e=this.aggregatedTypeStats;return{labels:Object.keys(e),datasets:[{data:Object.values(e),backgroundColor:this.typeColors.slice(0,Object.keys(e).length),borderWidth:0}]}},aggregatedTypeStats(){const e=this.indexInfo.typeStats||{},t={};for(const[s,i]of Object.entries(e)){const e="Block"===s?this.$t("sysStatus.blocked"):this.$t("sysStatus.normalStatus");t[e]=(t[e]||0)+i}return t},currentTrendGroup(){const e=this.indexInfo.uploadTrend||{},t=e.groupBy||{};return t[this.trendGroupBy]||{series:[]}},trendRawLabels(){const e=this.indexInfo.uploadTrend||{};return e.labels||[]},trendRangeCrossesYear(){const e=new Set;
22return this.trendRawLabels.forEach(t=>{this.extractTrendLabelDates(t).forEach(t=>e.add(t.year))}),e.size>1},trendDisplayLabels(){return this.trendRawLabels.map(e=>this.formatTrendAxisLabel(e))},hasTrendData(){const e=this.indexInfo.uploadTrend||{};return(e.labels||[]).length>0},trendDateDialogWidth(){return window.innerWidth>768?"420px":"90%"},uploadTrendChartData(){const e=this.indexInfo.uploadTrend||{},t=this.currentTrendGroup.series||[],s="#F97316";return{labels:this.trendDisplayLabels,datasets:[{label:this.$t("sysStatus.totalUploads"),data:e.total||[],borderColor:s,backgroundColor:this.hexToRgba(s,.1),pointBackgroundColor:s,pointBorderColor:s,borderWidth:3,pointRadius:2,pointHoverRadius:5,tension:.28,fill:!1},...t.map((e,t)=>{const s=this.getTrendColor(t);return{label:this.formatTrendSeriesName(e),data:e.data||[],borderColor:s,backgroundColor:this.hexToRgba(s,.12),pointBackgroundColor:s,pointBorderColor:s,borderWidth:2,pointRadius:2,pointHoverRadius:5,tension:.32,fill:!1}})]}},lineChartOptions(){const e="#64748B";return{responsive:!0,maintainAspectRatio:!1,interaction:{mode:"index",intersect:!1},plugins:{legend:{display:!0,position:"bottom",labels:{usePointStyle:!0,boxWidth:8,boxHeight:8,padding:16,color:e}},tooltip:{backgroundColor:"rgba(0, 0, 0, 0.8)",titleColor:"#fff",bodyColor:"#fff",padding:12,cornerRadius:8,displayColors:!0,callbacks:{title:e=>{const t=e?.[0]?.dataIndex;return this.trendRawLabels[t]||""},label:e=>{const t=e.parsed||{},s=void 0!==t.y?t.y:e.raw;return` ${e.dataset.label}: ${Number(s||0).toLocaleString()} ${this.$t("sysStatus.uploadsUnit")}`}}}},scales:{x:{grid:{display:!1},ticks:{color:e,maxTicksLimit:8,autoSkip:!0}},y:{beginAtZero:!0,grid:{color:"rgba(148, 163, 184, 0.18)"},ticks:{color:e,precision:0,callback:e=>Number(e).toLocaleString()}}}}},chartOptions(){return{responsive:!0,maintainAspectRatio:!0,cutout:"65%",hoverOffset:8,layout:{padding:10},plugins:{legend:{display:!1},tooltip:{backgroundColor:"rgba(0, 0, 0, 0.8)",titleColor:"#fff",bodyColor:"#fff",padding:12,cornerRadius:8,displayColors:!0,z:100,callbacks:{label:e=>{const t=e.raw,s=e.dataset.data.reduce((e,t)=>e+t,0),i=(t/s*100).toFixed(1);return` ${t.toLocaleString()} (${i}%)`}}}},animation:{animateRotate:!0,animateScale:!0}}},estimatedTimeRemaining(){if(!this.isProcessing||!this.processingStartTime)return"";if(0===this.processingProgress.current||0===this.processingProgress.percentage)return"";const e=Date.now()-this.processingStartTime,t=this.processingProgress.percentage/100;if(t<=0)return"";const s=e/t,i=s-e;if(i<=0)return this.$t("sysStatus.aboutToComplete");const n=Math.ceil(i/1e3);if(n<60)return this.$t("sysStatus.seconds",{count:n});const a=Math.ceil(n/60);if(a<60)return this.$t("sysStatus.minutes",{count:a});const o=Math.floor(a/60),l=a%60;return this.$t("sysStatus.hoursMinutes",{hours:o,minutes:l})},phaseDescription(){const e={fetching:this.$t("sysStatus.phaseFetching"),sorting:this.$t("sysStatus.phaseSorting"),uploading:this.$t("sysStatus.phaseUploading"),finalizing:this.$t("sysStatus.phaseFinalizing"),building:this.$t("sysStatus.phaseBuilding"),downloading:this.$t("sysStatus.phaseDownloading"),restoring_files:this.$t("sysStatus.phaseRestoringFiles"),restoring_settings:this.$t("sysStatus.phaseRestoringSettings"),completed:this.$t("sysStatus.phaseCompleted"),retrying:this.$t("sysStatus.phaseRetrying")};return e[this.processingPhase]||this.processingPhase}},mounted(){this.fetchIndexInfo()},methods:{getChartColor(e){return this.channelColors[e%this.channelColors.length]},getTypeChartColor(e){return this.typeColors[e%this.typeColors.length]},getTrendColor(e){return this.trendColors[e%this.trendColors.length]},formatTrendSeriesName(e){return e?.isOther||"__other__"===e?.name?this.$t("sysStatus.otherChannels"):e?.name||this.$t("sysStatus.unknown")},hexToRgba(e,t){const s=(e||"").replace("#","");if(6!==s.length)return`rgba(37, 99, 235, ${t})`;const i=parseInt(s.slice(0,2),16),n=parseInt(s.slice(2,4),16),a=parseInt(s.slice(4,6),16);return`rgba(${i}, ${n}, ${a}, ${t})`},extractTrendLabelDates(e){const t=String(e||"").match(/\d{4}-\d{2}-\d{2}/g)||[];return t.map(e=>{const[t,s,i]=e.split("-").map(Number);return{year:t,month:s,day:i}})},formatTrendAxisLabel(e){const t=this.extractTrendLabelDates(e);if(0===t.length)return e;const s=(e,t)=>{const s=`${e.month}/${e.day}`;return t?`${e.year}/${s}`:s};if(1===t.length)return s(t[0],this.trendRangeCrossesYear);const[i,n]=t;if(!this.trendRangeCrossesYear)return`${s(i,!1)}-${s(n,!1)}`;
22const a=i.year===n.year?s(n,!1):s(n,!0);return`${s(i,!0)}-${a}`},openTrendDateDialog(){this.trendDatePickerVisible=!0},handleTrendDateRangeChange(e){Array.isArray(e)&&2===e.length&&e[0]&&e[1]&&(this.trendDatePickerVisible=!1,this.fetchIndexInfo())},getTrendDateRangeParams(){return Array.isArray(this.trendDateRange)&&2===this.trendDateRange.length||(this.trendDateRange=mu()),{startDate:this.trendDateRange[0],endDate:this.trendDateRange[1]}},async fetchIndexInfo(){this.loading=!0;try{const{startDate:e,endDate:t}=this.getTrendDateRangeParams(),s=new URLSearchParams({action:"info",timezoneOffset:String((new Date).getTimezoneOffset()),trendMaxPoints:"90",trendSeriesLimit:"8",trendStartDate:e,trendEndDate:t}),i=await(0,Mt.A)(`/api/manage/list?${s.toString()}`,{method:"GET"});if(!i.ok)throw new Error("API请æ±å¤±è´¥");{const e=await i.json();this.indexInfo=e}}catch(e){console.error("è·åç´¢å¼ä¿¡æ¯å¤±è´¥:",e),this.$message.error(this.$t("sysStatus.fetchIndexFailed"))}finally{this.loading=!1}},async rebuildIndex(){if(this.isProcessing)this.$message.warning(this.$t("sysStatus.operationInProgress"));else{this.rebuilding=!0,this.isProcessing=!0,this.processingError=null,this.processingStartTime=Date.now(),this.processingProgress={current:0,total:0,message:"",percentage:0},this.currentRebuilder=new ru({onProgress:e=>this.handleProgress(e),onError:e=>this.handleError(e)});try{const e=await this.currentRebuilder.rebuild();this.$message.success(this.$t("sysStatus.rebuildSuccess",{count:e.totalFiles.toLocaleString()})),setTimeout(()=>{this.fetchIndexInfo()},1e3)}catch(e){if("ABORTED"!==e.code){const t=e.suggestion?`${e.message}ã${e.suggestion}`:e.message;this.$message.error(t),this.processingError={message:e.message,suggestion:e.suggestion,recoverable:e.recoverable}}}finally{this.rebuilding=!1,this.isProcessing=!1,this.currentRebuilder=null,this.processingStartTime=null}}},async backupData(){if(this.isProcessing)this.$message.warning(this.$t("sysStatus.operationInProgress"));else{this.backing=!0,this.isProcessing=!0,this.processingError=null,this.processingStartTime=Date.now(),this.processingProgress={current:0,total:0,message:"",percentage:0},this.currentBackupGenerator=new cu({onProgress:e=>this.handleProgress(e)});try{const e=await this.currentBackupGenerator.generateBackup(),t=e.settingsCount>0?this.$t("sysStatus.backupSuccessWithSettings",{fileCount:e.fileCount.toLocaleString(),settingsCount:e.settingsCount}):this.$t("sysStatus.backupSuccess",{count:e.fileCount.toLocaleString()});this.$message.success(t)}catch(e){if("ABORTED"!==e.code){const t=e.suggestion?`${e.message}ã${e.suggestion}`:e.message;this.$message.error(t),this.processingError={message:e.message,suggestion:e.suggestion,recoverable:e.recoverable}}}finally{this.backing=!1,this.isProcessing=!1,this.currentBackupGenerator=null,this.processingStartTime=null}}},selectRestoreFile(){this.restoring||this.$refs.fileInput.click()},async handleFileSelect(e){const t=e.target.files[0];if(t)if(t.name.endsWith(".json")){try{await this.$confirm(this.$t("sysStatus.restoreConfirmMessage"),this.$t("sysStatus.restoreConfirmTitle"),{confirmButtonText:this.$t("sysStatus.restoreConfirmOk"),cancelButtonText:this.$t("sysStatus.restoreConfirmCancel"),type:"warning"}),await this.restoreData(t)}catch(s){"cancel"!==s&&console.error("确认æ¢å¤å¤±è´¥:",s)}e.target.value=""}else this.$message.error(this.$t("sysStatus.selectJsonFile"))},async restoreData(e){if(this.isProcessing)this.$message.warning(this.$t("sysStatus.operationInProgress"));else{this.restoring=!0,this.isProcessing=!0,this.processingError=null,this.processingStartTime=Date.now(),this.processingProgress={current:0,total:0,message:"",percentage:0};try{const s=await e.text();let i;try{i=JSON.parse(s)}catch(t){throw new Error(this.$t("sysStatus.invalidBackupFile"))}this.currentRestoreProcessor=new uu({chunkSize:100,onProgress:e=>this.handleProgress(e),onError:e=>this.handleError(e)});const n=await this.currentRestoreProcessor.restore(i);this.restoring=!1,this.isProcessing=!1,this.currentRestoreProcessor=null,this.processingStartTime=null,this.$message.success(this.$t("sysStatus.restoreSuccess",{files:n.restoredFiles,settings:n.restoredSettings})),await new Promise(e=>setTimeout(e,500)),await this.rebuildIndex()}catch(s){if(console.error("æ¢å¤æ°æ®å¤±è´¥:",s),this.restoring=!1,this.isProcessing=!1,this.currentRestoreProcessor=null,this.processingStartTime=null,"ABORTED"!==s.code){const e=s.suggestion?`${s.message}ã${s.suggestion}`:s.message;this.$message.error(this.$t("sysStatus.restoreFailed")+": "+e),this.processingError={message:s.message,suggestion:s.suggestion,recoverable:s.recoverable}}}}},formatTime(e){if(!e)return this.$t("sysStatus.unknown");const t=new Date(e);
22return t.toLocaleString("zh-CN",{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"})},getPercentage(e,t){return t&&0!==t?Math.round(e/t*100):0},getTimeAgo(e){if(!e)return"";const t=Date.now(),s=t-e,i=Math.floor(s/6e4),n=Math.floor(s/36e5),a=Math.floor(s/864e5);return a>0?this.$t("sysStatus.daysAgo",{count:a}):n>0?this.$t("sysStatus.hoursAgo",{count:n}):i>0?this.$t("sysStatus.minutesAgo",{count:i}):this.$t("sysStatus.justNow")},handleImageError(e){this.loadErrors[e]=!0},isValidPreview(e,t){return!this.loadErrors[e]&&(!!t?.metadata?.FileType&&(t.metadata.FileType.includes("image")||t.metadata.FileType.includes("video")))},openReleases(){window.open("https://github.com/MarSeventh/CloudFlare-ImgBed/releases","_blank")},isImageFile(e){if(!e)return!1;if(e.metadata?.FileType?.includes("image"))return!0;const t=e.metadata?.FileName||e.id||"",s=t.substring(t.lastIndexOf(".")+1).toLowerCase(),i=["jpg","jpeg","png","gif","bmp","webp","svg","ico","tiff","tif","avif","heic","heif"];return i.includes(s)},isVideoFile(e){if(!e)return!1;if(e.metadata?.FileType?.includes("video"))return!0;const t=e.metadata?.FileName||e.id||"",s=t.substring(t.lastIndexOf(".")+1).toLowerCase(),i=["mp4","webm","ogg","avi","mov","flv","wmv","mkv","m4v","3gp","mpeg","mpg"];return i.includes(s)},openFileInNewTab(e){e?.id&&window.open("/file/"+e.id+"?from=admin","_blank")},handleProgress(e){this.processingPhase=e.phase,this.processingProgress.message=e.message||"",this.processingProgress.current=e.current||0,"fetching"===e.phase?(this.processingProgress.total=e.total||0,e.total&&e.total>0?this.processingProgress.percentage=Math.min(60,e.current/e.total*60):this.processingProgress.percentage=Math.min(50,15*Math.log10(e.current+1))):"sorting"===e.phase?(this.processingProgress.percentage=65,this.processingProgress.total=e.total||this.processingProgress.total):"uploading"===e.phase?(this.processingProgress.total=e.total||0,e.total&&e.total>0&&(this.processingProgress.percentage=70+e.current/e.total*25)):"finalizing"===e.phase?this.processingProgress.percentage=97:"building"===e.phase?this.processingProgress.percentage=80:"downloading"===e.phase?this.processingProgress.percentage=95:"restoring_files"===e.phase?(this.processingProgress.total=e.total||0,this.processingProgress.percentage=e.percentage||0):"restoring_settings"===e.phase?(this.processingProgress.total=e.total||0,this.processingProgress.percentage=e.percentage||80):"completed"===e.phase?this.processingProgress.percentage=100:"retrying"===e.phase&&(this.processingProgress.message=e.message)},handleError(e){console.error("æ¹éæä½é误:",e),this.processingError={message:e.message,suggestion:e.suggestion,recoverable:e.recoverable}},cancelOperation(){this.currentRebuilder&&(this.currentRebuilder.abort(),this.$message.info(this.$t("sysStatus.cancellingRebuild"))),this.currentBackupGenerator&&(this.currentBackupGenerator.abort(),this.$message.info(this.$t("sysStatus.cancellingRebuild"))),this.currentRestoreProcessor&&(this.currentRestoreProcessor.abort(),this.$message.info(this.$t("sysStatus.cancellingRebuild")))},retryOperation(){this.processingError=null,this.rebuilding?(this.rebuilding=!1,this.isProcessing=!1,this.$nextTick(()=>{this.rebuildIndex()})):this.backing&&(this.backing=!1,this.isProcessing=!1,this.$nextTick(()=>{this.backupData()}))},dismissError(){this.processingError=null}}};const yu=(0,c.A)(bu,[["render",Tt],["__scopeId","data-v-0f8731a4"]]);var xu=yu,vu=s(59869),ku=(s(70415),s(73565),s(82006)),_u=(s(98642),s(81418)),wu=(s(50333),s(39623)),Cu=(s(29092),s(63003),s(76018)),Su=(s(96808),s(67819),s(55558)),Fu=(s(10456),s(12687)),Tu=(s(18785),s(97769));const Mu=["onClick"];function Pu(e,t,s,a,o,l){const r=(0,i.g2)("font-awesome-icon"),d=Tu.A;return(0,i.uX)(),(0,i.CE)("div",{class:(0,n.C4)(["custom-select",{"is-open":o.isOpen}]),style:(0,n.Tr)({width:s.width})},[(0,i.Lk)("div",{class:"custom-select-trigger",onClick:t[0]||(t[0]=(...e)=>l.toggleDropdown&&l.toggleDropdown(...e))},[(0,i.Lk)("span",{class:(0,n.C4)(["custom-select-value",{"is-placeholder":!s.modelValue}])},(0,n.v_)(l.displayLabel),3),(0,i.bF)(r,{icon:"chevron-down",class:"custom-select-arrow"})]),(0,i.bF)(C.eB,{name:"dropdown-fade"},{default:(0,i.k6)(()=>[(0,i.bo)((0,i.Lk)("div",{class:"custom-select-dropdown",onClick:t[1]||(t[1]=(0,C.D$)(()=>{},["stop"]))},[((0,i.uX)(!0),(0,i.CE)(i.FK,null,(0,i.pI)(s.options,t=>((0,i.uX)(),(0,i.CE)("div",{key:t.value,class:(0,n.C4)(["custom-select-option",{"is-selected":s.modelValue===t.value}]),onClick:e=>l.selectOption(t.value)},[(0,i.RG)(e.$slots,"option",{option:t},()=>
22[t.channelType?((0,i.uX)(),(0,i.Wv)(d,{key:0,type:t.channelType,class:(0,n.C4)(["option-icon",t.iconClass])},null,8,["type","class"])):t.icon?((0,i.uX)(),(0,i.Wv)(r,{key:1,icon:t.icon,class:(0,n.C4)(["option-icon",t.iconClass])},null,8,["icon","class"])):(0,i.Q3)("",!0),(0,i.Lk)("span",null,(0,n.v_)(t.label),1)],!0)],10,Mu))),128))],512),[[C.aG,o.isOpen]])]),_:3})],6)}var Du={name:"CustomSelect",components:{ChannelIcon:Tu.A},props:{modelValue:{type:[String,Number],default:""},options:{type:Array,required:!0},placeholder:{type:String,default:""},width:{type:String,default:"160px"}},emits:["update:modelValue","change"],data(){return{isOpen:!1}},computed:{resolvedPlaceholder(){return this.placeholder||this.$t("common.select")},displayLabel(){const e=this.options.find(e=>e.value===this.modelValue);return e?e.label:this.resolvedPlaceholder}},mounted(){document.addEventListener("click",this.handleClickOutside)},beforeUnmount(){document.removeEventListener("click",this.handleClickOutside)},methods:{toggleDropdown(){this.isOpen=!this.isOpen},selectOption(e){this.$emit("update:modelValue",e),this.$emit("change",e),this.isOpen=!1},handleClickOutside(e){this.$el.contains(e.target)||(this.isOpen=!1)}}};const Au=(0,c.A)(Du,[["render",Pu],["__scopeId","data-v-8c87e03e"]]);var $u=Au;const Vu={class:"upload-settings"},Lu={class:"page-header"},Eu={class:"first-title"},Uu={class:"header-actions"},Iu={class:"group-header"},Ou={class:"group-title"},Ru={key:0,class:"load-balance-switch"},Wu={class:"switch-label"},Bu={key:0,class:"channel-cards"},zu=["onMousemove","onMouseleave"],Nu={class:"card-header"},ju={class:"card-title"},qu={class:"channel-name"},Hu={class:"card-body"},Xu={class:"card-info"},Ku={class:"info-item"},Qu={class:"info-text"},Yu={key:0,class:"info-item"},Gu={class:"info-text"},Ju={key:1,class:"info-item"},Zu=["title"],ep={class:"info-item"},tp={class:"info-text"},sp={key:0,class:"info-item"},ip=["title"],np={class:"info-item"},ap={class:"info-text"},op={class:"info-item"},lp={class:"info-text"},rp={class:"info-item"},dp={class:"info-text"},cp={class:"info-item"},hp=["title"],up={key:0,class:"info-item"},pp=["title"],gp={key:0,class:"quota-mini"},fp={class:"quota-text"},mp={class:"card-actions"},bp={key:1,class:"empty-tip"},yp={class:"channel-type-option"},xp={key:0,class:"form-warning",style:{"margin-top":"0"}},vp=["innerHTML"],kp={class:"form-warning"},_p={class:"quota-label"},wp={class:"quota-status"};function Cp(e,t,s,a,o,l){const r=(0,i.g2)("font-awesome-icon"),d=g.R7,c=$u,h=K.S2,u=Tu.A,p=Fu.u,f=Su.qi,m=_.ve,b=Cu.P9,y=Cu.AV,x=ku.xE,k=wu.WK,S=_u.lq,F=ku.US,T=w.kZ,M=vu.MF,P=vu.TS,D=v.A;return(0,i.bo)(((0,i.uX)(),(0,i.CE)("div",Vu,[(0,i.Lk)("div",Lu,[(0,i.Lk)("h3",Eu,[(0,i.eW)((0,n.v_)(e.$t("sysUpload.title"))+" ",1),(0,i.bF)(d,{content:e.$t("sysUpload.titleTooltip"),placement:"right"},{default:(0,i.k6)(()=>[(0,i.bF)(r,{icon:"question-circle",class:"help-icon"})]),_:1},8,["content"])]),(0,i.Lk)("div",Uu,[(0,i.bF)(c,{modelValue:o.channelFilter,"onUpdate:modelValue":t[0]||(t[0]=e=>o.channelFilter=e),options:l.filterOptions,placeholder:e.$t("sysUpload.filterPlaceholder"),width:"160px"},null,8,["modelValue","options","placeholder"]),(0,i.bF)(h,{type:"primary",onClick:t[1]||(t[1]=e=>o.showAddDialog=!0),class:"add-btn"},{default:(0,i.k6)(()=>[(0,i.bF)(r,{icon:"plus",style:{"margin-right":"6px"}}),(0,i.eW)(" "+(0,n.v_)(e.$t("sysUpload.addChannel")),1)]),_:1})])]),((0,i.uX)(!0),(0,i.CE)(i.FK,null,(0,i.pI)(l.filteredChannels,s=>((0,i.uX)(),(0,i.CE)("div",{key:s.value,class:"channel-group"},[(0,i.Lk)("div",Iu,[(0,i.Lk)("div",Ou,[(0,i.bF)(u,{type:s.value,class:"group-icon"},null,8,["type"]),(0,i.Lk)("span",null,(0,n.v_)(s.label),1),(0,i.bF)(p,{size:"small",type:"info",class:"channel-count"},{default:(0,i.k6)(()=>[(0,i.eW)((0,n.v_)(l.getChannelList(s.value).length),1)]),_:2},1024)]),l.hasLoadBalance(s.value)?((0,i.uX)(),(0,i.CE)("div",Ru,[(0,i.Lk)("span",Wu,(0,n.v_)(e.$t("sysUpload.loadBalance")),1),(0,i.bF)(f,{modelValue:l.getSettings(s.value).loadBalance.enabled,"onUpdate:modelValue":e=>l.getSettings(s.value).loadBalance.enabled=e,size:"small",onChange:l.saveSettings},null,8,["modelValue","onUpdate:modelValue","onChange"])])):(0,i.Q3)("",!0)]),l.getChannelList(s.value).length>0?((0,i.uX)(),(0,i.CE)("div",Bu,[((0,i.uX)(!0),(0,i.CE)(i.FK,null,(0,i.pI)(l.getChannelList(s.value),(a,o)=>((0,i.uX)(),(0,i.CE)("div",{key:a.name||o,class:(0,n.C4)(["channel-card",[s.value,{disabled:!a.enabled,fixed:a.fixed}]]),onMousemove:e=>l.handleCardMouseMove(e,s.value,o),onMouseleave:e=>l.handleCardMouseLeave(s.value,o)},[(0,i.Lk)("div",{class:"card-glow",ref_for:!0,ref:`glow-${s.value}-${o}`},null,512),(0,i.Lk)("div",Nu,[(0,i.Lk)("div",ju,[(0,i.Lk)("span",qu,(0,n.v_)(a.name||e.$t("sysUpload.unnamedChannel")),1),a.fixed?((0,i.uX)(),(0,i.Wv)(p,{key:0,size:"small",type:"warning"},{default:(0,i.k6)(()=>[(0,i.eW)((0,n.v_)(e.$t("sysUpload.envVariable")),1)]),_:1})):(0,i.Q3)("",!0)]),(0,i.bF)(f,{modelValue:a.enabled,"onUpdate:modelValue":e=>a.enabled=e,size:"small",onClick:t[2]||(t[2]=(0,C.D$)(()=>{},["stop"])),onChange:l.saveSettings},null,8,["modelValue","onUpdate:modelValue","onChange"])]),(0,i.Lk)("div",Hu,[(0,i.Lk)("div",Xu,["telegram"===s.value?((0,i.uX)(),(0,i.CE)(i.FK,{key:0},[(0,i.Lk)("div",Ku,[(0,i.bF)(r,{icon:"robot",class:"info-icon"}),(0,i.Lk)("span",Qu,"Bot: "+(0,n.v_)(l.maskText(a.botToken)),1)]),a.chatId?((0,i.uX)(),(0,i.CE)("div",Yu,[(0,i.bF)(r,{icon:"comments",class:"info-icon"}),(0,i.Lk)("span",Gu,"Channel: "+(0,n.v_)(l.maskText(a.chatId)),1)])):(0,i.Q3)("",!0)],64)):"cfr2"===s.value?((0,i.uX)(),(0,i.CE)("div",Ju,[(0,i.bF)(r,{icon:"link",class:"info-icon"}),(0,i.Lk)("span",{class:"info-text",title:a.publicUrl},(0,n.v_)(a.publicUrl||e.$t("sysUpload.notSet")),9,Zu)])):"s3"===s.value?((0,i.uX)(),(0,i.CE)(i.FK,{key:2},[(0,i.Lk)("div",ep,[(0,i.bF)(r,{icon:"server",class:"info-icon"}
22),(0,i.Lk)("span",tp,(0,n.v_)(a.bucketName||e.$t("sysUpload.notSet")),1)]),a.endpoint?((0,i.uX)(),(0,i.CE)("div",sp,[(0,i.bF)(r,{icon:"link",class:"info-icon"}),(0,i.Lk)("span",{class:"info-text",title:a.endpoint},(0,n.v_)(a.endpoint),9,ip)])):(0,i.Q3)("",!0)],64)):"discord"===s.value?((0,i.uX)(),(0,i.CE)(i.FK,{key:3},[(0,i.Lk)("div",np,[(0,i.bF)(r,{icon:"robot",class:"info-icon"}),(0,i.Lk)("span",ap,"Bot: "+(0,n.v_)(l.maskText(a.botToken)),1)]),(0,i.Lk)("div",op,[(0,i.bF)(r,{icon:"hashtag",class:"info-icon"}),(0,i.Lk)("span",lp,"Channel: "+(0,n.v_)(l.maskText(a.channelId)),1)]),a.isNitro?((0,i.uX)(),(0,i.Wv)(p,{key:0,size:"small",type:"success"},{default:(0,i.k6)(()=>[...t[78]||(t[78]=[(0,i.eW)("Nitro",-1)])]),_:1})):(0,i.Q3)("",!0)],64)):"huggingface"===s.value?((0,i.uX)(),(0,i.CE)(i.FK,{key:4},[(0,i.Lk)("div",rp,[(0,i.bF)(r,{icon:"database",class:"info-icon"}),(0,i.Lk)("span",dp,(0,n.v_)(a.repo||e.$t("sysUpload.notSet")),1)]),a.isPrivate?((0,i.uX)(),(0,i.Wv)(p,{key:0,size:"small",type:"warning"},{default:(0,i.k6)(()=>[(0,i.eW)((0,n.v_)(e.$t("sysUpload.privateRepo")),1)]),_:1})):(0,i.Q3)("",!0)],64)):"webdav"===s.value?((0,i.uX)(),(0,i.CE)(i.FK,{key:5},[(0,i.Lk)("div",cp,[(0,i.bF)(r,{icon:"folder",class:"info-icon"}),(0,i.Lk)("span",{class:"info-text",title:a.baseUrl},(0,n.v_)(a.baseUrl||e.$t("sysUpload.notSet")),9,hp)]),a.publicUrl?((0,i.uX)(),(0,i.CE)("div",up,[(0,i.bF)(r,{icon:"link",class:"info-icon"}),(0,i.Lk)("span",{class:"info-text",title:a.publicUrl},(0,n.v_)(a.publicUrl),9,pp)])):(0,i.Q3)("",!0)],64)):(0,i.Q3)("",!0)]),a.quota?.enabled?((0,i.uX)(),(0,i.CE)("div",gp,[(0,i.bF)(m,{percentage:l.getQuotaPercentage(a),status:l.getQuotaStatus(a),"stroke-width":6},null,8,["percentage","status"]),(0,i.Lk)("span",fp,(0,n.v_)(l.getQuotaText(a)),1)])):(0,i.Q3)("",!0)]),(0,i.Lk)("div",mp,[(0,i.bF)(h,{text:"",type:"primary",size:"small",onClick:e=>l.openDetailDialog(s.value,o)},{default:(0,i.k6)(()=>[(0,i.bF)(r,{icon:"eye",style:{"margin-right":"4px"}}),(0,i.eW)((0,n.v_)(e.$t("sysUpload.detail")),1)]),_:1},8,["onClick"]),(0,i.bF)(h,{text:"",type:"primary",size:"small",onClick:e=>l.openEditDialog(s.value,o)},{default:(0,i.k6)(()=>[(0,i.bF)(r,{icon:"edit",style:{"margin-right":"4px"}}),(0,i.eW)((0,n.v_)(e.$t("sysUpload.editBtn")),1)]),_:1},8,["onClick"]),(0,i.bF)(h,{text:"",type:"danger",size:"small",onClick:e=>l.deleteChannel(s.value,o),disabled:a.fixed},{default:(0,i.k6)(()=>[(0,i.bF)(r,{icon:"trash-alt",style:{"margin-right":"4px"}}),(0,i.eW)((0,n.v_)(e.$t("sysUpload.deleteBtn")),1)]),_:1},8,["onClick","disabled"])])],42,zu))),128))])):((0,i.uX)(),(0,i.CE)("div",bp,[(0,i.bF)(r,{icon:"inbox",class:"empty-icon"}),(0,i.Lk)("span",null,(0,n.v_)(e.$t("sysUpload.noChannels",{type:s.label})),1)]))]))),128)),(0,i.bF)(T,{modelValue:o.showAddDialog,"onUpdate:modelValue":t[35]||(t[35]=e=>o.showAddDialog=e),title:e.$t("sysUpload.addDialogTitle"),class:"channel-dialog","destroy-on-close":"",onClosed:l.resetAddForm},{footer:(0,i.k6)(()=>[(0,i.bF)(h,{onClick:t[34]||(t[34]=e=>o.showAddDialog=!1)},{default:(0,i.k6)(()=>[(0,i.eW)((0,n.v_)(e.$t("sysUpload.cancel")),1)]),_:1}),"cfr2"!==o.newChannel.type?((0,i.uX)(),(0,i.Wv)(h,{key:0,type:"primary",onClick:l.confirmAddChannel},{default:(0,i.k6)(()=>[(0,i.eW)((0,n.v_)(e.$t("sysUpload.confirmAdd")),1)]),_:1},8,["onClick"])):(0,i.Q3)("",!0)]),default:(0,i.k6)(()=>[(0,i.bF)(F,{model:o.newChannel,"label-position":"top",ref:"addForm",rules:l.addRules},{default:(0,i.k6)(()=>[(0,i.bF)(x,{label:e.$t("sysUpload.channelTypeLabel"),prop:"type"},{default:(0,i.k6)(()=>[(0,i.bF)(y,{modelValue:o.newChannel.type,"onUpdate:modelValue":t[3]||(t[3]=e=>o.newChannel.type=e),placeholder:e.$t("sysUpload.channelTypePlaceholder"),style:{width:"100%"},onChange:l.onChannelTypeChange},{default:(0,i.k6)(()=>[((0,i.uX)(!0),(0,i.CE)(i.FK,null,(0,i.pI)(o.addableChannels,e=>((0,i.uX)(),(0,i.Wv)(b,{key:e.value,label:e.label,value:e.value},{default:(0,i.k6)(()=>[(0,i.Lk)("span",yp,[(0,i.bF)(u,{type:e.value,class:"select-option-icon"},null,8,["type"]),(0,i.Lk)("span",null,(0,n.v_)(e.label),1)])]),_:2},1032,["label","value"]))),128))]),_:1},8,["modelValue","placeholder","onChange"])]),_:1},8,["label"]),"cfr2"===o.newChannel.type?((0,i.uX)(),(0,i.CE)("div",xp,[(0,i.bF)(r,{icon:"info-circle",style:{"margin-right":"6px"}}),(0,i.Lk)("span",{innerHTML:e.$t("sysUpload.r2ConfigNote")},null,8,vp)])):((0,i.uX)(),(0,i.CE)(i.FK,{key:1},[(0,i.bF)(x,{prop:"name"},{label:(0,i.k6)(()=>[(0,i.eW)((0,n.v_)(e.$t("sysUpload.channelNameLabel"))+" ",1),(0,i.bF)(d,{content:e.$t("sysUpload.channelNameImmutableTip"),placement:"top"},{default:(0,i.k6)(()=>[(0,i.bF)(r,{icon:"exclamation-triangle",class:"inline-warning-icon"})]),_:1},8,["content"])]),default:(0,i.k6)(()=>[(0,i.bF)(k,{modelValue:o.newChannel.name,"onUpdate:modelValue":t[4]||(t[4]=e=>o.newChannel.name=e),placeholder:e.$t("sysUpload.channelNamePlaceholder")},null,8,["modelValue","placeholder"])]),_:1}),"telegram"===o.newChannel.type?((0,i.uX)(),(0,i.CE)(i.FK,{key:0},[(0,i.bF)(x,{label:e.$t("sysUpload.botTokenLabel"),prop:"botToken"},{default:(0,i.k6)(()=>[(0,i.bF)(k,{modelValue:o.newChannel.botToken,"onUpdate:modelValue":t[5]||(t[5]=e=>o.newChannel.botToken=e),type:"password","show-password":"",placeholder:e.$t("sysUpload.botTokenPlaceholder")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),(0,i.bF)(x,{label:e.$t("sysUpload.chatIdLabel"),prop:"chatId"},{default:(0,i.k6)(()=>[(0,i.bF)(k,{modelValue:o.newChannel.chatId,"onUpdate:modelValue":t[6]||(t[6]=e=>o.newChannel.chatId=e),type:"password","show-password":"",placeholder:e.$t("sysUpload.chatIdPlaceholder")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),(0,i.bF)(x,{label:e.$t("sysUpload.proxyDomain")},{default:(0,i.k6)(()=>[(0,i.bF)(k,{modelValue:o.newChannel.proxyUrl,"onUpdate:modelValue":t[7]||(t[7]=e=>o.newChannel.proxyUrl=e),placeholder:e.$t("sysUpload.proxyDomainPlaceholder")},null,8,["modelValue","placeholder"])]),_:1},8,["label"])],64)):"s3"===o.newChannel.type?((0,i.uX)(),(0,i.CE)(i.FK,{key:1},[(0,i.bF)(x,{label:e.$t("sysUpload.endpointLabel"),prop:"endpoint"},{default:(0,i.k6)(()=>[(0,i.bF)(k,{modelValue:o.newChannel.endpoint,"onUpdate:modelValue":t[8]||(t[8]=e=>o.newChannel.endpoint=e),placeholder:e.$t("sysUpload.endpointPlaceholder")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),(0,i.bF)(x,null,{label:(0,i.k6)(()=>[(0,i.eW)((0,n.v_)(e.$t("sysUpload.cdnDomain"))+" ",1),(0,i.bF)(d,{content:e.$t("sysUpload.cdnDomainTip"),placement:"top"},{default:(0,i.k6)(()=>[(0,i.bF)(r,{icon:"question-circle",class:"inline-help-icon"})]),_:1},8,["content"])]),default:(0,i.k6)(()=>[(0,i.bF)(k,{modelValue:o.newChannel.cdnDomain,"onUpdate:modelValue":t[9]||(t[9]=e=>o.newChannel.cdnDomain=e),placeholder:e.$t("sysUpload.cdnDomainPlaceholder")},null,8,["modelValue","placeholder"])]),_:1}
22),(0,i.bF)(x,{label:e.$t("sysUpload.bucketName"),prop:"bucketName"},{default:(0,i.k6)(()=>[(0,i.bF)(k,{modelValue:o.newChannel.bucketName,"onUpdate:modelValue":t[10]||(t[10]=e=>o.newChannel.bucketName=e),placeholder:e.$t("sysUpload.bucketNamePlaceholder")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),(0,i.bF)(x,{label:e.$t("sysUpload.bucketRegion"),prop:"region"},{default:(0,i.k6)(()=>[(0,i.bF)(k,{modelValue:o.newChannel.region,"onUpdate:modelValue":t[11]||(t[11]=e=>o.newChannel.region=e),placeholder:e.$t("sysUpload.bucketRegionPlaceholder")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),(0,i.bF)(x,{label:e.$t("sysUpload.accessKeyId"),prop:"accessKeyId"},{default:(0,i.k6)(()=>[(0,i.bF)(k,{modelValue:o.newChannel.accessKeyId,"onUpdate:modelValue":t[12]||(t[12]=e=>o.newChannel.accessKeyId=e),type:"password","show-password":"",placeholder:e.$t("sysUpload.accessKeyIdPlaceholder")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),(0,i.bF)(x,{label:e.$t("sysUpload.secretAccessKey"),prop:"secretAccessKey"},{default:(0,i.k6)(()=>[(0,i.bF)(k,{modelValue:o.newChannel.secretAccessKey,"onUpdate:modelValue":t[13]||(t[13]=e=>o.newChannel.secretAccessKey=e),type:"password","show-password":"",placeholder:e.$t("sysUpload.secretAccessKeyPlaceholder")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),(0,i.bF)(x,null,{label:(0,i.k6)(()=>[(0,i.eW)((0,n.v_)(e.$t("sysUpload.pathStyle"))+" ",1),(0,i.bF)(d,{content:e.$t("sysUpload.pathStyleTip"),placement:"top"},{default:(0,i.k6)(()=>[(0,i.bF)(r,{icon:"question-circle",class:"inline-help-icon"})]),_:1},8,["content"])]),default:(0,i.k6)(()=>[(0,i.bF)(f,{modelValue:o.newChannel.pathStyle,"onUpdate:modelValue":t[14]||(t[14]=e=>o.newChannel.pathStyle=e)},null,8,["modelValue"])]),_:1}),(0,i.bF)(x,{label:e.$t("sysUpload.quotaLimit")},{default:(0,i.k6)(()=>[(0,i.bF)(f,{modelValue:o.newChannel.quota.enabled,"onUpdate:modelValue":t[15]||(t[15]=e=>o.newChannel.quota.enabled=e)},null,8,["modelValue"])]),_:1},8,["label"]),o.newChannel.quota?.enabled?((0,i.uX)(),(0,i.CE)(i.FK,{key:0},[(0,i.bF)(x,{label:e.$t("sysUpload.quotaLimitGB")},{default:(0,i.k6)(()=>[(0,i.bF)(S,{modelValue:o.newChannel.quota.limitGB,"onUpdate:modelValue":t[16]||(t[16]=e=>o.newChannel.quota.limitGB=e),min:.1,step:1,precision:1},null,8,["modelValue"])]),_:1},8,["label"]),(0,i.bF)(x,{label:e.$t("sysUpload.quotaThreshold")},{default:(0,i.k6)(()=>[(0,i.bF)(S,{modelValue:o.newChannel.quota.threshold,"onUpdate:modelValue":t[17]||(t[17]=e=>o.newChannel.quota.threshold=e),min:50,max:100,step:5},null,8,["modelValue"])]),_:1},8,["label"])],64)):(0,i.Q3)("",!0)],64)):"discord"===o.newChannel.type?((0,i.uX)(),(0,i.CE)(i.FK,{key:2},[(0,i.bF)(x,{label:e.$t("sysUpload.botTokenLabel"),prop:"botToken"},{default:(0,i.k6)(()=>[(0,i.bF)(k,{modelValue:o.newChannel.botToken,"onUpdate:modelValue":t[18]||(t[18]=e=>o.newChannel.botToken=e),type:"password","show-password":"",placeholder:e.$t("sysUpload.botTokenPlaceholder")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),(0,i.bF)(x,{label:e.$t("sysUpload.channelIdLabel"),prop:"channelId"},{default:(0,i.k6)(()=>[(0,i.bF)(k,{modelValue:o.newChannel.channelId,"onUpdate:modelValue":t[19]||(t[19]=e=>o.newChannel.channelId=e),type:"password","show-password":"",placeholder:e.$t("sysUpload.channelIdPlaceholder")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),(0,i.bF)(x,{label:e.$t("sysUpload.proxyDomain")},{default:(0,i.k6)(()=>[(0,i.bF)(k,{modelValue:o.newChannel.proxyUrl,"onUpdate:modelValue":t[20]||(t[20]=e=>o.newChannel.proxyUrl=e),placeholder:e.$t("sysUpload.proxyDomainPlaceholder")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),(0,i.bF)(x,null,{label:(0,i.k6)(()=>[(0,i.eW)((0,n.v_)(e.$t("sysUpload.nitroMember"))+" ",1),(0,i.bF)(d,{content:e.$t("sysUpload.nitroTip"),placement:"top"},{default:(0,i.k6)(()=>[(0,i.bF)(r,{icon:"question-circle",class:"inline-help-icon"})]),_:1},8,["content"])]),default:(0,i.k6)(()=>[(0,i.bF)(f,{modelValue:o.newChannel.isNitro,"onUpdate:modelValue":t[21]||(t[21]=e=>o.newChannel.isNitro=e)},null,8,["modelValue"])]),_:1}),(0,i.Lk)("div",kp,[(0,i.bF)(r,{icon:"exclamation-triangle",style:{"margin-right":"6px"}}),(0,i.eW)(" "+(0,n.v_)(e.$t("sysUpload.discordWarning")),1)])],64)):"huggingface"===o.newChannel.type?((0,i.uX)(),(0,i.CE)(i.FK,{key:3},[(0,i.bF)(x,{label:e.$t("sysUpload.repoName"),prop:"repo"},{default:(0,i.k6)(()=>[(0,i.bF)(k,{modelValue:o.newChannel.repo,"onUpdate:modelValue":t[22]||(t[22]=e=>o.newChannel.repo=e),placeholder:e.$t("sysUpload.repoNamePlaceholder")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),(0,i.bF)(x,{label:e.$t("sysUpload.accessToken"),prop:"token"},{default:(0,i.k6)(()=>[(0,i.bF)(k,{modelValue:o.newChannel.token,"onUpdate:modelValue":t[23]||(t[23]=e=>o.newChannel.token=e),type:"password","show-password":"",placeholder:e.$t("sysUpload.accessTokenPlaceholder")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),(0,i.bF)(x,null,{label:(0,i.k6)(()=>[(0,i.eW)((0,n.v_)(e.$t("sysUpload.privateRepo"))+" ",1),(0,i.bF)(d,{content:e.$t("sysUpload.privateRepoTip"),placement:"top"},{default:(0,i.k6)(()=>[(0,i.bF)(r,{icon:"question-circle",class:"inline-help-icon"})]),_:1},8,["content"])]),default:(0,i.k6)(()=>[(0,i.bF)(f,{modelValue:o.newChannel.isPrivate,"onUpdate:modelValue":t[24]||(t[24]=e=>o.newChannel.isPrivate=e)},null,8,["modelValue"])]),_:1})],64)):"webdav"===o.newChannel.type?((0,i.uX)(),(0,i.CE)(i.FK,{key:4},[(0,i.bF)(x,{label:e.$t("sysUpload.webdavBaseUrl"),prop:"baseUrl"},{default:(0,i.k6)(()=>[(0,i.bF)(k,{modelValue:o.newChannel.baseUrl,"onUpdate:modelValue":t[25]||(t[25]=e=>o.newChannel.baseUrl=e),placeholder:e.$t("sysUpload.webdavBaseUrlPlaceholder")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),(0,i.bF)(x,{label:e.$t("sysUpload.webdavUsername")},{default:(0,i.k6)(()=>[(0,i.bF)(k,{modelValue:o.newChannel.username,"onUpdate:modelValue":t[26]||(t[26]=e=>o.newChannel.username=e),placeholder:e.$t("sysUpload.webdavUsernamePlaceholder")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),(0,i.bF)(x,{label:e.$t("sysUpload.webdavPassword")},{default:(0,i.k6)(()=>[(0,i.bF)(k,{modelValue:o.newChannel.password,"onUpdate:modelValue":t[27]||(t[27]=e=>o.newChannel.password=e),type:"password","show-password":"",placeholder:e.$t("sysUpload.webdavPasswordPlaceholder")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),(0,i.bF)(x,null,{label:(0,i.k6)(()=>[(0,i.eW)((0,n.v_)(e.$t("sysUpload.publicUrl"))+" ",1),(0,i.bF)(d,{content:e.$t("sysUpload.webdavPublicUrlTip"),placement:"top"},{default:(0,i.k6)(()=>[(0,i.bF)(r,{icon:"question-circle",class:"inline-help-icon"})]),_:1},8,["content"])]),default:(0,i.k6)(()=>[(0,i.bF)(k,{modelValue:o.newChannel.publicUrl,"onUpdate:modelValue":t[28]||(t[28]=e=>o.newChannel.publicUrl=e),placeholder:e.$t("sysUpload.webdavPublicUrlPlaceholder")},null,8,["modelValue","placeholder"])]),_:1}),(0,i.bF)(x,{label:e.$t("sysUpload.webdavHeaders")},{default:(0,i.k6)(()=>[(0,i.bF)(k,{modelValue:o.newChannel.headersText,"onUpdate:modelValue":t[29]||(t[29]=e=>o.newChannel.headersText=e),type:"textarea",autosize:{minRows:2},placeholder:e.$t("sysUpload.webdavHeadersPlaceholder")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),(0,i.bF)(x,null,{label:(0,i.k6)(()=>[(0,i.eW)((0,n.v_)(e.$t("sysUpload.webdavCreateDirectory"))+" ",1),(0,i.bF)(d,{content:e.$t("sysUpload.webdavCreateDirectoryTip"),placement:"top"},{default:(0,i.k6)(()=>[(0,i.bF)(r,{icon:"question-circle",class:"inline-help-icon"})]),_:1},8,["content"])]),default:(0,i.k6)(()=>[(0,i.bF)(f,{modelValue:o.newChannel.createDirectory,"onUpdate:modelValue":t[30]||(t[30]=e=>o.newChannel.createDirectory=e)},null,8,["modelValue"])]),_:1}),(0,i.bF)(x,{label:e.$t("sysUpload.quotaLimit")},{default:(0,i.k6)(()=>[(0,i.bF)(f,{modelValue:o.newChannel.quota.enabled,"onUpdate:modelValue":t[31]||(t[31]=e=>o.newChannel.quota.enabled=e)},null,8,["modelValue"])]),_:1},8,["label"]),o.newChannel.quota?.enabled?((0,i.uX)(),(0,i.CE)(i.FK,{key:0},[(0,i.bF)(x,{label:e.$t("sysUpload.quotaLimitGB")},{default:(0,i.k6)(()=>[(0,i.bF)(S,{modelValue:o.newChannel.quota.limitGB,"onUpdate:modelValue":t[32]||(t[32]=e=>o.newChannel.quota.limitGB=e),min:.1,step:1,precision:1},null,8,["modelValue"])]),_:1},8,["label"]),(0,i.bF)(x,{label:e.$t("sysUpload.quotaThreshold")},{default:(0,i.k6)(()=>[(0,i.bF)(S,{modelValue:o.newChannel.quota.threshold,"onUpdate:modelValue":t[33]||(t[33]=e=>o.newChannel.quota.threshold=e),min:50,max:100,step:5},null,8,["modelValue"])]),_:1},8,["label"])],64)):(0,i.Q3)("",!0)],64)):(0,i.Q3)("",!0)],64))]),_:1},8,["model","rules"])]),_:1},8,["modelValue","title","onClosed"]),(0,i.bF)(T,{modelValue:o.showDetailDialog,"onUpdate:modelValue":t[37]||(t[37]=e=>o.showDetailDialog=e),title:e.$t("sysUpload.detailDialogTitle",{name:o.currentChannel?.name||""}),class:"channel-dialog",onClosed:l.resetDetailData},{footer:(0,i.k6)(()=>[(0,i.bF)(h,{onClick:t[36]||(t[36]=e=>o.showDetailDialog=!1)},{default:(0,i.k6)(()=>[(0,i.eW)((0,n.v_)(e.$t("sysUpload.closeBtn")),1)]),_:1}),(0,i.bF)(h,{type:"primary",onClick:l.openEditFromDetail},{default:(0,i.k6)(()=>[(0,i.eW)((0,n.v_)(e.$t("sysUpload.editBtn")),1)]),_:1},8,["onClick"])]),default:(0,i.k6)(()=>[(0,i.bF)(P,{column:1,border:""},{default:(0,i.k6)(()=>[(0,i.bF)(M,{label:e.$t("sysUpload.channelNameDetail")},{default:(0,i.k6)(()=>[(0,i.eW)((0,n.v_)(o.currentChannel?.name),1)]),_:1},8,["label"]),(0,i.bF)(M,{label:e.$t("sysUpload.channelTypeDetail")},{default:(0,i.k6)(()=>[(0,i.eW)((0,n.v_)(l.getChannelTypeLabel(o.currentChannelType)),1)]),_:1},8,["label"]),(0,i.bF)(M,{label:e.$t("sysUpload.statusLabel")},{default:(0,i.k6)(()=>[(0,i.bF)(p,{type:o.currentChannel?.enabled?"success":"info"},{default:(0,i.k6)(()=>[(0,i.eW)((0,n.v_)(o.currentChannel?.enabled?e.$t("sysUpload.enabled"):e.$t("sysUpload.disabled")),1)]),_:1},8,["type"])]),_:1},8,["label"]),o.currentChannel?.fixed?((0,i.uX)(),(0,i.Wv)(M,{key:0,label:e.$t("sysUpload.configSource")},{default:(0,i.k6)(()=>[(0,i.bF)(p,{type:"warning"},{default:(0,i.k6)(()=>[(0,i.eW)((0,n.v_)(e.$t("sysUpload.envVariable")),1)]),_:1})]),_:1},8,["label"])):(0,i.Q3)("",!0),"telegram"===o.currentChannelType?((0,i.uX)(),(0,i.CE)(i.FK,{key:1},[(0,i.bF)(M,{label:e.$t("sysUpload.botTokenLabel")},{default:(0,i.k6)(()=>[(0,i.eW)((0,n.v_)(l.maskText(o.currentChannel?.botToken,10)),1)]),_:1},8,["label"]),(0,i.bF)(M,{label:e.$t("sysUpload.chatIdLabel")},{default:(0,i.k6)(()=>[(0,i.eW)((0,n.v_)(l.maskText(o.currentChannel?.chatId,6)),1)]),_:1},8,["label"]),(0,i.bF)(M,{label:e.$t("sysUpload.proxyDomain")},{default:(0,i.k6)(()=>[(0,i.eW)((0,n.v_)(o.currentChannel?.proxyUrl||e.$t("sysUpload.notSet")),1)]),_:1},8,["label"])],64)):"cfr2"===o.currentChannelType?((0,i.uX)(),(0,i.Wv)(M,{key:2,label:e.$t("sysUpload.publicUrl")},{default:(0,i.k6)(()=>[(0,i.bF)(k,{"model-value":o.currentChannel?.publicUrl||e.$t("sysUpload.notSet"),readonly:""},null,8,["model-value"])]),_:1},8,["label"])):"s3"===o.currentChannelType?((0,i.uX)(),(0,i.CE)(i.FK,{key:3},[(0,i.bF)(M,{label:e.$t("sysUpload.endpointLabel")},{default:(0,i.k6)(()=>[(0,i.bF)(k,{"model-value":o.currentChannel?.endpoint,readonly:""},null,8,["model-value"])]),_:1},8,["label"]),(0,i.bF)(M,{label:e.$t("sysUpload.cdnDomain")},{default:(0,i.k6)(()=>[(0,i.bF)(k,{"model-value":o.currentChannel?.cdnDomain||e.$t("sysUpload.notSet"),readonly:""},null,8,["model-value"])]),_:1}
22,8,["label"]),(0,i.bF)(M,{label:e.$t("sysUpload.bucketName")},{default:(0,i.k6)(()=>[(0,i.eW)((0,n.v_)(o.currentChannel?.bucketName),1)]),_:1},8,["label"]),(0,i.bF)(M,{label:e.$t("sysUpload.bucketRegion")},{default:(0,i.k6)(()=>[(0,i.eW)((0,n.v_)(o.currentChannel?.region),1)]),_:1},8,["label"]),(0,i.bF)(M,{label:e.$t("sysUpload.pathStyle")},{default:(0,i.k6)(()=>[(0,i.eW)((0,n.v_)(o.currentChannel?.pathStyle?e.$t("sysUpload.isPathStyle"):e.$t("sysUpload.isNotPathStyle")),1)]),_:1},8,["label"])],64)):"discord"===o.currentChannelType?((0,i.uX)(),(0,i.CE)(i.FK,{key:4},[(0,i.bF)(M,{label:e.$t("sysUpload.botTokenLabel")},{default:(0,i.k6)(()=>[(0,i.eW)((0,n.v_)(l.maskText(o.currentChannel?.botToken,10)),1)]),_:1},8,["label"]),(0,i.bF)(M,{label:e.$t("sysUpload.channelIdLabel")},{default:(0,i.k6)(()=>[(0,i.eW)((0,n.v_)(l.maskText(o.currentChannel?.channelId,6)),1)]),_:1},8,["label"]),(0,i.bF)(M,{label:e.$t("sysUpload.proxyDomain")},{default:(0,i.k6)(()=>[(0,i.eW)((0,n.v_)(o.currentChannel?.proxyUrl||e.$t("sysUpload.notSet")),1)]),_:1},8,["label"]),(0,i.bF)(M,{label:e.$t("sysUpload.nitroMember")},{default:(0,i.k6)(()=>[(0,i.eW)((0,n.v_)(o.currentChannel?.isNitro?e.$t("sysUpload.isPathStyle"):e.$t("sysUpload.isNotPathStyle")),1)]),_:1},8,["label"])],64)):"huggingface"===o.currentChannelType?((0,i.uX)(),(0,i.CE)(i.FK,{key:5},[(0,i.bF)(M,{label:e.$t("sysUpload.repoName")},{default:(0,i.k6)(()=>[(0,i.eW)((0,n.v_)(o.currentChannel?.repo),1)]),_:1},8,["label"]),(0,i.bF)(M,{label:e.$t("sysUpload.privateRepo")},{default:(0,i.k6)(()=>[(0,i.eW)((0,n.v_)(o.currentChannel?.isPrivate?e.$t("sysUpload.isPathStyle"):e.$t("sysUpload.isNotPathStyle")),1)]),_:1},8,["label"])],64)):"webdav"===o.currentChannelType?((0,i.uX)(),(0,i.CE)(i.FK,{key:6},[(0,i.bF)(M,{label:e.$t("sysUpload.webdavBaseUrl")},{default:(0,i.k6)(()=>[(0,i.bF)(k,{"model-value":o.currentChannel?.baseUrl,readonly:""},null,8,["model-value"])]),_:1},8,["label"]),(0,i.bF)(M,{label:e.$t("sysUpload.publicUrl")},{default:(0,i.k6)(()=>[(0,i.bF)(k,{"model-value":o.currentChannel?.publicUrl||e.$t("sysUpload.notSet"),readonly:""},null,8,["model-value"])]),_:1},8,["label"]),(0,i.bF)(M,{label:e.$t("sysUpload.webdavUsername")},{default:(0,i.k6)(()=>[(0,i.eW)((0,n.v_)(o.currentChannel?.username||e.$t("sysUpload.notSet")),1)]),_:1},8,["label"]),(0,i.bF)(M,{label:e.$t("sysUpload.webdavHeaders")},{default:(0,i.k6)(()=>[(0,i.bF)(k,{"model-value":l.formatHeaders(o.currentChannel?.headers),type:"textarea",autosize:{minRows:2},readonly:""},null,8,["model-value"])]),_:1},8,["label"]),(0,i.bF)(M,{label:e.$t("sysUpload.webdavCreateDirectory")},{default:(0,i.k6)(()=>[(0,i.eW)((0,n.v_)(!1!==o.currentChannel?.createDirectory?e.$t("sysUpload.isPathStyle"):e.$t("sysUpload.isNotPathStyle")),1)]),_:1},8,["label"])],64)):(0,i.Q3)("",!0),o.currentChannel?.quota?.enabled?((0,i.uX)(),(0,i.CE)(i.FK,{key:7},[(0,i.bF)(M,{label:e.$t("sysUpload.quotaLimit")},{default:(0,i.k6)(()=>[(0,i.eW)((0,n.v_)(o.currentChannel?.quota?.limitGB)+" GB",1)]),_:1},8,["label"]),(0,i.bF)(M,{label:e.$t("sysUpload.quotaThreshold")},{default:(0,i.k6)(()=>[(0,i.eW)((0,n.v_)(o.currentChannel?.quota?.threshold)+"%",1)]),_:1},8,["label"]),(0,i.bF)(M,null,{label:(0,i.k6)(()=>[(0,i.Lk)("span",_p,[(0,i.eW)((0,n.v_)(e.$t("sysUpload.currentUsage"))+" ",1),(0,i.bF)(h,{link:"",type:"primary",onClick:l.refreshQuota,class:"refresh-btn"},{default:(0,i.k6)(()=>[(0,i.bF)(r,{icon:"sync-alt",class:(0,n.C4)({"fa-spin":o.quotaLoading})},null,8,["class"])]),_:1},8,["onClick"])])]),default:(0,i.k6)(()=>[(0,i.Lk)("div",wp,[(0,i.bF)(m,{percentage:l.getQuotaPercentage(o.currentChannel),status:l.getQuotaStatus(o.currentChannel),"stroke-width":16,"text-inside":!0,format:()=>l.getQuotaText(o.currentChannel)},null,8,["percentage","status","format"]),(0,i.Lk)("div",{class:(0,n.C4)(["quota-info",{"quota-warning":l.isQuotaExceeded(o.currentChannel)}])},(0,n.v_)(l.getQuotaStatusText(o.currentChannel)),3)])]),_:1})],64)):(0,i.Q3)("",!0)]),_:1})]),_:1},8,["modelValue","title","onClosed"]),(0,i.bF)(T,{modelValue:o.showEditDialog,"onUpdate:modelValue":t[77]||(t[77]=e=>o.showEditDialog=e),title:e.$t("sysUpload.editDialogTitle",{name:o.edit
22Channel?.name||""}),class:"channel-dialog","destroy-on-close":"",onClosed:l.resetEditData},{footer:(0,i.k6)(()=>[(0,i.bF)(h,{onClick:t[76]||(t[76]=e=>o.showEditDialog=!1)},{default:(0,i.k6)(()=>[(0,i.eW)((0,n.v_)(e.$t("sysUpload.cancel")),1)]),_:1}),(0,i.bF)(h,{type:"primary",onClick:l.confirmEditChannel},{default:(0,i.k6)(()=>[(0,i.eW)((0,n.v_)(e.$t("sysUpload.saveChanges")),1)]),_:1},8,["onClick"])]),default:(0,i.k6)(()=>[(0,i.bF)(F,{model:o.editChannel,"label-position":"top",ref:"editForm",rules:l.editRules},{default:(0,i.k6)(()=>[(0,i.bF)(x,{prop:"name"},{label:(0,i.k6)(()=>[(0,i.eW)((0,n.v_)(e.$t("sysUpload.channelNameLabel"))+" ",1),(0,i.bF)(d,{content:e.$t("sysUpload.channelNameEditDisabledTip"),placement:"top"},{default:(0,i.k6)(()=>[(0,i.bF)(r,{icon:"exclamation-triangle",class:"inline-warning-icon"})]),_:1},8,["content"])]),default:(0,i.k6)(()=>[(0,i.bF)(k,{modelValue:o.editChannel.name,"onUpdate:modelValue":t[38]||(t[38]=e=>o.editChannel.name=e),disabled:""},null,8,["modelValue"])]),_:1}),(0,i.bF)(x,{label:e.$t("sysUpload.enableChannel")},{default:(0,i.k6)(()=>[(0,i.bF)(f,{modelValue:o.editChannel.enabled,"onUpdate:modelValue":t[39]||(t[39]=e=>
22o.editChannel.enabled=e)},null,8,["modelValue"])]),_:1},8,["label"]),"telegram"===o.currentChannelType?((0,i.uX)(),(0,i.CE)(i.FK,{key:0},[(0,i.bF)(x,{label:e.$t("sysUpload.botTokenLabel"),prop:"botToken"},{default:(0,i.k6)(()=>[(0,i.bF)(k,{modelValue:o.editChannel.botToken,"onUpdate:modelValue":t[40]||(t[40]=e=>o.editChannel.botToken=e),disabled:o.editChannel.fixed,type:"password","show-password":""},null,8,["modelValue","disabled"])]),_:1},8,["label"]),(0,i.bF)(x,{label:e.$t("sysUpload.chatIdLabel"),prop:"chatId"},{default:(0,i.k6)(()=>[(0,i.bF)(k,{modelValue:o.editChannel.chatId,"onUpdate:modelValue":t[41]||(t[41]=e=>o.editChannel.chatId=e),disabled:o.editChannel.fixed,type:"password","show-password":""},null,8,["modelValue","disabled"])]),_:1},8,["label"]),(0,i.bF)(x,{label:e.$t("sysUpload.proxyDomain")},{default:(0,i.k6)(()=>[(0,i.bF)(k,{modelValue:o.editChannel.proxyUrl,"onUpdate:modelValue":t[42]||(t[42]=e=>o.editChannel.proxyUrl=e),placeholder:e.$t("sysUpload.proxyDomainPlaceholder")},null,8,["modelValue","placeholder"])]),_:1},8,["label"])],64)):"cfr2"===o.currentChannelType?((0,i.uX)(),(0,i.CE)(i.FK,{key:1},[(0,i.bF)(x,{label:e.$t("sysUpload.publicUrl")},{default:(0,i.k6)(()=>[(0,i.bF)(k,{modelValue:o.editChannel.publicUrl,"onUpdate:modelValue":t[43]||(t[43]=e=>
22o.editChannel.publicUrl=e)},null,8,["modelValue"])]),_:1},8,["label"]),(0,i.bF)(x,{label:e.$t("sysUpload.quotaLimit")},{default:(0,i.k6)(()=>[(0,i.bF)(f,{modelValue:o.editChannel.quota.enabled,"onUpdate:modelValue":t[44]||(t[44]=e=>o.editChannel.quota.enabled=e),onChange:t[45]||(t[45]=e=>l.onQuotaEnabledChange(e,o.editChannel))},null,8,["modelValue"])]),_:1},8,["label"]),o.editChannel.quota?.enabled?((0,i.uX)(),(0,i.CE)(i.FK,{key:0},[(0,i.bF)(x,{label:e.$t("sysUpload.quotaLimitGB")},{default:(0,i.k6)(()=>[(0,i.bF)(S,{modelValue:o.editChannel.quota.limitGB,"onUpdate:modelValue":t[46]||(t[46]=e=>o.editChannel.quota.limitGB=e),min:.1,step:1,precision:1},null,8,["modelValue"])]),_:1},8,["label"]),(0,i.bF)(x,{label:e.$t("sysUpload.quotaThreshold")},{default:(0,i.k6)(()=>[(0,i.bF)(S,{modelValue:o.editChannel.quota.threshold,"onUpdate:modelValue":t[47]||(t[47]=e=>o.editChannel.quota.threshold=e),min:50,max:100,step:5},null,8,["modelValue"])]),_:1},8,["label"])],64)):(0,i.Q3)("",!0)],64)):"s3"===o.currentChannelType?((0,i.uX)(),(0,i.CE)(i.FK,{key:2},[(0,i.bF)(x,{label:e.$t("sysUpload.endpointLabel"),prop:"endpoint"},{default:(0,i.k6)(()=>[(0,i.bF)(k,{modelValue:o.editChannel.endpoint,"onUpdate:modelValue":t[48]||(t[48]=e=>
22o.editChannel.endpoint=e),disabled:o.editChannel.fixed},null,8,["modelValue","disabled"])]),_:1},8,["label"]),(0,i.bF)(x,null,{label:(0,i.k6)(()=>[(0,i.eW)((0,n.v_)(e.$t("sysUpload.cdnDomain"))+" ",1),(0,i.bF)(d,{content:e.$t("sysUpload.cdnDomainTip"),placement:"top"},{default:(0,i.k6)(()=>[(0,i.bF)(r,{icon:"question-circle",class:"inline-help-icon"})]),_:1},8,["content"])]),default:(0,i.k6)(()=>[(0,i.bF)(k,{modelValue:o.editChannel.cdnDomain,"onUpdate:modelValue":t[49]||(t[49]=e=>o.editChannel.cdnDomain=e),placeholder:e.$t("sysUpload.cdnDomainPlaceholder")},null,8,["modelValue","placeholder"])]),_:1}),(0,i.bF)(x,{label:e.$t("sysUpload.bucketName"),prop:"bucketName"},{default:(0,i.k6)(()=>[(0,i.bF)(k,{modelValue:o.editChannel.bucketName,"onUpdate:modelValue":t[50]||(t[50]=e=>o.editChannel.bucketName=e),disabled:o.editChannel.fixed},null,8,["modelValue","disabled"])]),_:1},8,["label"]),(0,i.bF)(x,{label:e.$t("sysUpload.bucketRegion"),prop:"region"},{default:(0,i.k6)(()=>[(0,i.bF)(k,{modelValue:o.editChannel.region,"onUpdate:modelValue":t[51]||(t[51]=e=>o.editChannel.region=e),disabled:o.editChannel.fixed},null,8,["modelValue","disabled"])]),_:1},8,["label"]),(0,i.bF)(x,{label:e.$t("sysUpload.accessKeyId"),prop:"accessKeyId"},{default:(0,i.k6)(()=>[(0,i.bF)(k,{modelValue:o.editChannel.accessKeyId,"onUpdate:modelValue":t[52]||(t[52]=e=>
22o.editChannel.accessKeyId=e),disabled:o.editChannel.fixed,type:"password","show-password":""},null,8,["modelValue","disabled"])]),_:1},8,["label"]),(0,i.bF)(x,{label:e.$t("sysUpload.secretAccessKey"),prop:"secretAccessKey"},{default:(0,i.k6)(()=>[(0,i.bF)(k,{modelValue:o.editChannel.secretAccessKey,"onUpdate:modelValue":t[53]||(t[53]=e=>o.editChannel.secretAccessKey=e),disabled:o.editChannel.fixed,type:"password","show-password":""},null,8,["modelValue","disabled"])]),_:1},8,["label"]),(0,i.bF)(x,null,{label:(0,i.k6)(()=>[(0,i.eW)((0,n.v_)(e.$t("sysUpload.pathStyle"))+" ",1),(0,i.bF)(d,{content:e.$t("sysUpload.pathStyleTip"),placement:"top"},{default:(0,i.k6)(()=>[(0,i.bF)(r,{icon:"question-circle",class:"inline-help-icon"})]),_:1},8,["content"])]),default:(0,i.k6)(()=>[(0,i.bF)(f,{modelValue:o.editChannel.pathStyle,"onUpdate:modelValue":t[54]||(t[54]=e=>o.editChannel.pathStyle=e),disabled:o.editChannel.fixed},null,8,["modelValue","disabled"])]),_:1}),(0,i.bF)(x,{label:e.$t("sysUpload.quotaLimit")},{default:(0,i.k6)(()=>[(0,i.bF)(f,{modelValue:o.editChannel.quota.enabled,"onUpdate:modelValue":t[55]||(t[55]=e=>o.editChannel.quota.enabled=e),onChange:t[56]||(t[56]=e=>l.onQuotaEnabledChange(e,o.editChannel))},null,8,["modelValue"])]),_:1},8,["label"]),o.editChannel.quota?.enabled?((0,i.uX)(),(0,i.CE)(i.FK,{key:0},[(0,i.bF)(x,{label:e.$t("sysUpload.quotaLimitGB")},{default:(0,i.k6)(()=>[(0,i.bF)(S,{modelValue:o.editChannel.quota.limitGB,"onUpdate:modelValue":t[57]||(t[57]=e=>o.editChannel.quota.limitGB=e),min:.1,step:1,precision:1},null,8,["modelValue"])]),_:1},8,["label"]),(0,i.bF)(x,{label:e.$t("sysUpload.quotaThreshold")},{default:(0,i.k6)(()=>[(0,i.bF)(S,{modelValue:o.editChannel.quota.threshold,"onUpdate:modelValue":t[58]||(t[58]=e=>o.editChannel.quota.threshold=e),min:50,max:100,step:5},null,8,["modelValue"])]),_:1},8,["label"])],64)):(0,i.Q3)("",!0)],64)):"discord"===o.currentChannelType?((0,i.uX)(),(0,i.CE)(i.FK,{key:3},[(0,i.bF)(x,{label:e.$t("sysUpload.botTokenLabel"),prop:"botToken"},{default:(0,i.k6)(()=>[(0,i.bF)(k,{modelValue:o.editChannel.botToken,"onUpdate:modelValue":t[59]||(t[59]=e=>o.editChannel.botToken=e),disabled:o.editChannel.fixed,type:"password","show-password":""},null,8,["modelValue","disabled"])]),_:1},8,["label"]),(0,i.bF)(x,{label:e.$t("sysUpload.channelIdLabel"),prop:"channelId"},{default:(0,i.k6)(()=>[(0,i.bF)(k,{modelValue:o.editChannel.channelId,"onUpdate:modelValue":t[60]||(t[60]=e=>o.editChannel.channelId=e),disabled:o.editChannel.fixed,type:"password","show-password":""},null,8,["modelValue","disabled"])]),_:1},8,["label"]),(0,i.bF)(x,{label:e.$t("sysUpload.proxyDomain")},{default:(0,i.k6)(()=>[(0,i.bF)(k,{modelValue:o.editChannel.proxyUrl,"onUpdate:modelValue":t[61]||(t[61]=e=>o.editChannel.proxyUrl=e),placeholder:e.$t("sysUpload.proxyDomainPlaceholder")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),(0,i.bF)(x,null,{label:(0,i.k6)(()=>[(0,i.eW)((0,n.v_)(e.$t("sysUpload.nitroMember"))+" ",1),(0,i.bF)(d,{content:e.$t("sysUpload.nitroTip"),placement:"top"},{default:(0,i.k6)(()=>[(0,i.bF)(r,{icon:"question-circle",class:"inline-help-icon"})]),_:1},8,["content"])]),default:(0,i.k6)(()=>[(0,i.bF)(f,{modelValue:o.editChannel.isNitro,"onUpdate:modelValue":t[62]||(t[62]=e=>
22o.editChannel.isNitro=e)},null,8,["modelValue"])]),_:1})],64)):"huggingface"===o.currentChannelType?((0,i.uX)(),(0,i.CE)(i.FK,{key:4},[(0,i.bF)(x,{label:e.$t("sysUpload.repoName"),prop:"repo"},{default:(0,i.k6)(()=>[(0,i.bF)(k,{modelValue:o.editChannel.repo,"onUpdate:modelValue":t[63]||(t[63]=e=>o.editChannel.repo=e),disabled:o.editChannel.fixed},null,8,["modelValue","disabled"])]),_:1},8,["label"]),(0,i.bF)(x,{label:e.$t("sysUpload.accessToken"),prop:"token"},{default:(0,i.k6)(()=>[(0,i.bF)(k,{modelValue:o.editChannel.token,"onUpdate:modelValue":t[64]||(t[64]=e=>o.editChannel.token=e),disabled:o.editChannel.fixed,type:"password","show-password":""},null,8,["modelValue","disabled"])]),_:1},8,["label"]),(0,i.bF)(x,null,{label:(0,i.k6)(()=>[(0,i.eW)((0,n.v_)(e.$t("sysUpload.privateRepo"))+" ",1),(0,i.bF)(d,{content:e.$t("sysUpload.privateRepoTip"),placement:"top"},{default:(0,i.k6)(()=>[(0,i.bF)(r,{icon:"question-circle",class:"inline-help-icon"})]),_:1},8,["content"])]),default:(0,i.k6)(()=>[(0,i.bF)(f,{modelValue:o.editChannel.isPrivate,"onUpdate:modelValue":t[65]||(t[65]=e=>o.editChannel.isPrivate=e)},null,8,["modelValue"])]),_:1})],64)):"webdav"===o.currentChannelType?((0,i.uX)(),(0,i.CE)(i.FK,{key:5},[(0,i.bF)(x,{label:e.$t("sysUpload.webdavBaseUrl"),prop:"baseUrl"},{default:(0,i.k6)(()=>[(0,i.bF)(k,{modelValue:o.editChannel.baseUrl,"onUpdate:modelValue":t[66]||(t[66]=e=>o.editChannel.baseUrl=e),disabled:o.editChannel.fixed},null,8,["modelValue","disabled"])]),_:1},8,["label"]),(0,i.bF)(x,{label:e.$t("sysUpload.webdavUsername")},{default:(0,i.k6)(()=>[(0,i.bF)(k,{modelValue:o.editChannel.username,"onUpdate:modelValue":t[67]||(t[67]=e=>o.editChannel.username=e),disabled:o.editChannel.fixed},null,8,["modelValue","disabled"])]),_:1},8,["label"]),(0,i.bF)(x,{label:e.$t("sysUpload.webdavPassword")},{default:(0,i.k6)(()=>[(0,i.bF)(k,{modelValue:o.editChannel.password,"onUpdate:modelValue":t[68]||(t[68]=e=>o.editChannel.password=e),disabled:o.editChannel.fixed,type:"password","show-password":""},null,8,["modelValue","disabled"])]),_:1},8,["label"]),(0,i.bF)(x,null,{label:(0,i.k6)(()=>[(0,i.eW)((0,n.v_)(e.$t("sysUpload.publicUrl"))+" ",1),(0,i.bF)(d,{content:e.$t("sysUpload.webdavPublicUrlTip"),placement:"top"},{default:(0,i.k6)(()=>[(0,i.bF)(r,{icon:"question-circle",class:"inline-help-icon"})]),_:1},8,["content"])]),default:(0,i.k6)(()=>[(0,i.bF)(k,{modelValue:o.editChannel.publicUrl,"onUpdate:modelValue":t[69]||(t[69]=e=>o.editChannel.publicUrl=e),placeholder:e.$t("sysUpload.webdavPublicUrlPlaceholder")},null,8,["modelValue","placeholder"])]),_:1}),(0,i.bF)(x,{label:e.$t("sysUpload.webdavHeaders")},{default:(0,i.k6)(()=>[(0,i.bF)(k,{modelValue:o.editChannel.headersText,"onUpdate:modelValue":t[70]||(t[70]=e=>o.editChannel.headersText=e),type:"textarea",autosize:{minRows:2},placeholder:e.$t("sysUpload.webdavHeadersPlaceholder")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),(0,i.bF)(x,null,{label:(0,i.k6)(()=>[(0,i.eW)((0,n.v_)(e.$t("sysUpload.webdavCreateDirectory"))+" ",1),(0,i.bF)(d,{content:e.$t("sysUpload.webdavCreateDirectoryTip"),placement:"top"},{default:(0,i.k6)(()=>[(0,i.bF)(r,{icon:"question-circle",class:"inline-help-icon"})]),_:1},8,["content"])]),default:(0,i.k6)(()=>[(0,i.bF)(f,{modelValue:o.editChannel.createDirectory,"onUpdate:modelValue":t[71]||(t[71]=e=>o.editChannel.createDirectory=e)},null,8,["modelValue"])]),_:1}),(0,i.bF)(x,{label:e.$t("sysUpload.quotaLimit")},{default:(0,i.k6)(()=>[(0,i.bF)(f,{modelValue:o.editChannel.quota.enabled,"onUpdate:modelValue":t[72]||(t[72]=e=>
22o.editChannel.quota.enabled=e),onChange:t[73]||(t[73]=e=>l.onQuotaEnabledChange(e,o.editChannel))},null,8,["modelValue"])]),_:1},8,["label"]),o.editChannel.quota?.enabled?((0,i.uX)(),(0,i.CE)(i.FK,{key:0},[(0,i.bF)(x,{label:e.$t("sysUpload.quotaLimitGB")},{default:(0,i.k6)(()=>[(0,i.bF)(S,{modelValue:o.editChannel.quota.limitGB,"onUpdate:modelValue":t[74]||(t[74]=e=>o.editChannel.quota.limitGB=e),min:.1,step:1,precision:1},null,8,["modelValue"])]),_:1},8,["label"]),(0,i.bF)(x,{label:e.$t("sysUpload.quotaThreshold")},{default:(0,i.k6)(()=>[(0,i.bF)(S,{modelValue:o.editChannel.quota.threshold,"onUpdate:modelValue":t[75]||(t[75]=e=>o.editChannel.quota.threshold=e),min:50,max:100,step:5},null,8,["modelValue"])]),_:1},8,["label"])],64)):(0,i.Q3)("",!0)],64)):(0,i.Q3)("",!0)]),_:1},8,["model","rules"])]),_:1},8,["modelValue","title","onClosed"])])),[[D,o.loading]])}var Sp={components:{ChannelIcon:Tu.A,CustomSelect:$u},data(){return{channelFilter:"",channels:[{value:"telegram",label:"Telegram"},{value:"cfr2",label:"CloudFlare R2"},{value:"s3",label:"S3"},{value:"discord",label:"Discord"},{value:"huggingface",label:"HuggingFace"},{value:"webdav",label:"WebDAV"}],addableChannels:[{value:"telegram",label:"Telegram"},{value:"cfr2",label:"CloudFlare R2"},{value:"s3",label:"S3"},{value:"discord",label:"Discord"},{value:"huggingface",label:"HuggingFace"},{value:"webdav",label:"WebDAV"}],telegramSettings:{loadBalance:{enabled:!1},channels:[]},cfr2Settings:{channels:[]},s3Settings:{loadBalance:{enabled:!1},channels:[]},discordSettings:{loadBalance:{enabled:!1},channels:[]},huggingfaceSettings:{loadBalance:{enabled:!1},channels:[]},webdavSettings:{loadBalance:{enabled:!1},channels:[]},showAddDialog:!1,showDetailDialog:!1,showEditDialog:!1,currentChannelType:"",currentChannelIndex:-1,currentChannel:null,editChannel:{},newChannel:{type:"",name:"",enabled:!0,botToken:"",chatId:"",proxyUrl:"",endpoint:"",cdnDomain:"",bucketName:"",region:"auto",accessKeyId:"",secretAccessKey:"",pathStyle:!1,quota:{enabled:!1,limitGB:10,threshold:95},channelId:"",isNitro:!1,repo:"",token:"",isPrivate:!1,baseUrl:"",username:"",password:"",publicUrl:"",headersText:"",createDirectory:!0},quotaStats:{},quotaLoading:!1,loading:!1}},computed:{filterOptions(){return[{value:"",label:this.$t("common.all")},...this.channels.map(e=>({value:e.value,label:e.label,channelType:e.value}))]},filteredChannels(){return this.channelFilter?this.channels.filter(e=>e.value===this.channelFilter):this.channels},addRules(){return{type:[{required:!0,message:this.$t("sysUpload.channelTypePlaceholder"),trigger:"change"}],name:[{required:!0,message:this.$t("sysUpload.channelNamePlaceholder"),trigger:"blur"},{pattern:/^[\u4e00-\u9fa5a-zA-Z0-9_-]+$/,message:this.$t("sysUpload.channelNamePlaceholder"),trigger:"blur"}],botToken:[{required:!0,message:this.$t("sysUpload.botTokenPlaceholder"),trigger:"blur"}],chatId:[{required:!0,message:this.$t("sysUpload.chatIdPlaceholder"),trigger:"blur"}],channelId:[{required:!0,message:this.$t("sysUpload.channelIdPlaceholder"),trigger:"blur"}],endpoint:[{required:!0,message:this.$t("sysUpload.endpointPlaceholder"),trigger:"blur"}],bucketName:[{required:!0,message:this.$t("sysUpload.bucketNamePlaceholder"),trigger:"blur"}],region:[{required:!0,message:this.$t("sysUpload.bucketRegionPlaceholder"),trigger:"blur"}],accessKeyId:[{required:!0,message:this.$t("sysUpload.accessKeyIdPlaceholder"),trigger:"blur"}],secretAccessKey:[{required:!0,message:this.$t("sysUpload.secretAccessKeyPlaceholder"),trigger:"blur"}],repo:[{required:!0,message:this.$t("sysUpload.repoNamePlaceholder"),trigger:"blur"}],token:[{required:!0,message:this.$t("sysUpload.accessTokenPlaceholder"),trigger:"blur"}],baseUrl:[{required:!0,message:this.$t("sysUpload.webdavBaseUrlPlaceholder"),trigger:"blur"}]}},editRules(){return{name:[{required:!0,message:this.$t("sysUpload.channelNamePlaceholder"),trigger:"blur"},{pattern:/^[\u4e00-\u9fa5a-zA-Z0-9_-]+$/,message:this.$t("sysUpload.channelNamePlaceholder"),trigger:"blur"}],botToken:[{required:!0,message:this.$t("sysUpload.botTokenPlaceholder"),trigger:"blur"}],chatId:[{required:!0,message:this.$t("sysUpload.chatIdPlaceholder"),trigger:"blur"}],channelId:[{required:!0,message:this.$t("sysUpload.channelIdPlaceholder"),trigger:"blur"}],endpoint:[{required:!0,message:this.$t("sysUpload.endpointPlaceholder"),trigger:"blur"}
22],bucketName:[{required:!0,message:this.$t("sysUpload.bucketNamePlaceholder"),trigger:"blur"}],region:[{required:!0,message:this.$t("sysUpload.bucketRegionPlaceholder"),trigger:"blur"}],accessKeyId:[{required:!0,message:this.$t("sysUpload.accessKeyIdPlaceholder"),trigger:"blur"}],secretAccessKey:[{required:!0,message:this.$t("sysUpload.secretAccessKeyPlaceholder"),trigger:"blur"}],repo:[{required:!0,message:this.$t("sysUpload.repoNamePlaceholder"),trigger:"blur"}],token:[{required:!0,message:this.$t("sysUpload.accessTokenPlaceholder"),trigger:"blur"}],baseUrl:[{required:!0,message:this.$t("sysUpload.webdavBaseUrlPlaceholder"),trigger:"blur"}]}}},methods:{handleCardMouseMove(e,t,s){const i=e.currentTarget,n=i.getBoundingClientRect(),a=e.clientX-n.left,o=e.clientY-n.top,l=`glow-${t}-${s}`,r=this.$refs[l];r&&r[0]&&(r[0].style.opacity="1",r[0].style.left=`${a}px`,r[0].style.top=`${o}px`)},handleCardMouseLeave(e,t){const s=`glow-${e}-${t}`,i=this.$refs[s];i&&i[0]&&(i[0].style.opacity="0")},getChannelTypeLabel(e){const t=this.channels.find(t=>t.value===e);return t?t.label:e},getChannelList(e){return this.getSettings(e)?.channels||[]},getSettings(e){const t={telegram:this.telegramSettings,cfr2:this.cfr2Settings,s3:this.s3Settings,discord:this.discordSettings,huggingface:this.huggingfaceSettings,webdav:this.webdavSettings};return t[e]},hasLoadBalance(e){return["telegram","s3","discord","huggingface","webdav"].includes(e)},maskText(e,t=4){return e?e.length<=2*t?"****":e.slice(0,t)+"****"+e.slice(-t):this.$t("sysUpload.notSet")},formatHeaders(e){return!e||"object"===typeof e&&0===Object.keys(e).length?this.$t("sysUpload.notSet"):"string"===typeof e?e:JSON.stringify(e,null,2)},headersToText(e){return e?"string"===typeof e?e:JSON.stringify(e,null,2):""},parseHeadersText(e){if(!e||!e.trim())return{};try{const t=JSON.parse(e);return!t||"object"!==typeof t||Array.isArray(t)?null:t}catch(t){return null}},openDetailDialog(e,t){this.currentChannelType=e,this.currentChannelIndex=t,this.currentChannel=this.getChannelList(e)[t],this.showDetailDialog=!0},openEditDialog(e,t){this.currentChannelType=e,this.currentChannelIndex=t;const s=this.getChannelList(e)[t];this.editChannel=JSON.parse(JSON.stringify(s)),"webdav"===e&&(this.editChannel.headersText=this.headersToText(this.editChannel.headers),this.editChannel.createDirectory=!1!==this.editChannel.createDirectory),this.editChannel.quota||(this.editChannel.quota={enabled:!1,limitGB:10,threshold:95}),this.showEditDialog=!0},openEditFromDetail(){this.showDetailDialog=!1,this.openEditDialog(this.currentChannelType,this.currentChannelIndex)},resetAddForm(){this.newChannel={type:"",name:"",enabled:!0,botToken:"",chatId:"",proxyUrl:"",endpoint:"",bucketName:"",region:"auto",accessKeyId:"",secretAccessKey:"",pathStyle:!1,quota:{enabled:!1,limitGB:10,threshold:95},channelId:"",isNitro:!1,repo:"",token:"",isPrivate:!1,baseUrl:"",username:"",password:"",publicUrl:"",headersText:"",createDirectory:!0}},resetDetailData(){this.currentChannel=null},resetEditData(){this.editChannel={}},onChannelTypeChange(){const{type:e,name:t}=this.newChannel;this.newChannel={type:e,name:t,enabled:!0,botToken:"",chatId:"",proxyUrl:"",endpoint:"",cdnDomain:"",bucketName:"",region:"auto",accessKeyId:"",secretAccessKey:"",pathStyle:!1,quota:{enabled:!1,limitGB:10,threshold:95},channelId:"",isNitro:!1,repo:"",token:"",isPrivate:!1,baseUrl:"",username:"",password:"",publicUrl:"",headersText:"",createDirectory:!0}},confirmAddChannel(){this.$refs.addForm.validate(e=>{if(!e)return;const{type:t,name:s}=this.newChannel,i=this.getSettings(t),n=["Telegram_env","R2_env","S3_env","Discord_env","HuggingFace_env","WebDAV_env"];if(n.includes(s))return void this.$message.warning(this.$t("sysUpload.reservedName"));const a=i.channels.some(e=>e.name===s);if(a)return void this.$message.warning(this.$t("sysUpload.duplicateName"));let o={id:i.channels.length+1,name:this.newChannel.name,type:t,savePath:"database",enabled:!0,fixed:!1};if("telegram"===t)Object.assign(o,{botToken:this.newChannel.botToken,chatId:this.newChannel.chatId,proxyUrl:this.newChannel.proxyUrl});else if("s3"===t)Object.assign(o,{endpoint:this.newChannel.endpoint,cdnDomain:this.newChannel.cdnDomain,bucketN
22ame:this.newChannel.bucketName,region:this.newChannel.region,accessKeyId:this.newChannel.accessKeyId,secretAccessKey:this.newChannel.secretAccessKey,pathStyle:this.newChannel.pathStyle,quota:{...this.newChannel.quota}});else if("discord"===t)Object.assign(o,{botToken:this.newChannel.botToken,channelId:this.newChannel.channelId,proxyUrl:this.newChannel.proxyUrl,isNitro:this.newChannel.isNitro});else if("huggingface"===t)Object.assign(o,{repo:this.newChannel.repo,token:this.newChannel.token,isPrivate:this.newChannel.isPrivate});else if("webdav"===t){const e=this.parseHeadersText(this.newChannel.headersText);if(null===e)return void this.$message.warning(this.$t("sysUpload.webdavHeadersInvalid"));Object.assign(o,{baseUrl:this.newChannel.baseUrl,username:this.newChannel.username,password:this.newChannel.password,publicUrl:this.newChannel.publicUrl,headers:e,createDirectory:!1!==this.newChannel.createDirectory,quota:{...this.newChannel.quota}})}i.channels.push(o),this.showAddDialog=!1,this.saveSettings()})},confirmEditChannel(){this.$refs.editForm.validate(e=>{if(!e)return;const t=this.getSettings(this.currentChannelType),s=this.currentChannelIndex,i=t.channels[s]?.name||this.editChannel.name,n={...this.editChannel,name:i};if("webdav"===this.currentChannelType){const e=this.parseHeadersText(n.headersText);if(null===e)return void this.$message.warning(this.$t("sysUpload.webdavHeadersInvalid"));n.headers=e,n.createDirectory=!1!==n.createDirectory,delete n.headersText}t.channels[this.currentChannelIndex]=n,this.showEditDialog=!1,this.saveSettings()})},deleteChannel(e,t){const s=this.getChannelList(e)[t];s.fixed?this.$message.warning(this.$t("sysUpload.fixedChannelCannotDelete")):this.$confirm(this.$t("sysUpload.deleteChannelConfirm"),this.$t("common.warning"),{confirmButtonText:this.$t("common.confirm"),cancelButtonText:this.$t("common.cancel"),type:"warning"}).then(()=>{const s=this.getSettings(e);s.channels.splice(t,1),s.channels.forEach((e,t)=>{e.id=t+1}),this.saveSettings()}).catch(()=>{})},saveSettings(){const e={telegram:this.telegramSettings,cfr2:this.cfr2Settings,s3:this.s3Settings,discord:this.discordSettings,huggingface:this.huggingfaceSettings,webdav:this.webdavSettings};(0,Mt.A)("/api/manage/sysConfig/upload",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}).then(()=>{this.$message.success(this.$t("sysOthers.settingsSaved"))})},async refreshQuota(){this.quotaLoading=!0;try{const e=await(0,Mt.A)("/api/manage/quota",{method:"POST"}),t=await e.json();if(t.success)this.quotaStats=t.channelStats||{};else{const e=await(0,Mt.A)("/api/manage/quota"),t=await e.json();t.success&&(this.quotaStats=t.quotaStats||{})}}catch(e){console.error("Failed to refresh quota stats:",e)}finally{this.quotaLoading=!1}},async loadQuotaStats(){try{const e=await(0,Mt.A)("/api/manage/quota"),t=await e.json();t.success&&(this.quotaStats=t.quotaStats||{})}catch(e){console.error("Failed to load quota stats:",e)}},getChannelUsedGB(e){const t=this.quotaStats[e.name];return t?(t.usedMB||0)/1024:0},getQuotaPercentage(e){const t=this.getChannelUsedGB(e),s=e.quota?.limitGB||10,i=t/s*100;return Math.min(100,Math.round(10*i)/10)},getQuotaStatus(e){const t=this.getQuotaPercentage(e),s=e.quota?.threshold||95;return t>=s?"exception":t>=80?"warning":"success"},getQuotaText(e){const t=this.getChannelUsedGB(e),s=e.quota?.limitGB||10;return`${t.toFixed(2)} / ${s} GB`},isQuotaExceeded(e){const t=this.getQuotaPercentage(e),s=e.quota?.threshold||95;return t>=s},getQuotaStatusText(e){const t=this.getQuotaPercentage(e),s=e.quota?.threshold||95;return t>=s?`â ï¸ å·²è¾¾å°å®¹ééå¼ (${s}%)ï¼æ¸ éåå
¥å·²æå`:t>=80?"⡠容é使ç¨è¾é«ï¼æ¥è¿éå¼":"â 容鿣叏"},async onQuotaEnabledChange(e,t){if(e&&t.name){const e=this.quotaStats[t.name];e||this.$confirm(this.$t("sysUpload.quotaInitConfirm"),this.$t("sysUpload.quotaInitTitle"),{confirmButtonText:this.$t("sysUpload.quotaInitConfirmBtn"),cancelButtonText:this.$t("sysUpload.quotaInitCancelBtn"),type:"info"}).then(async()=>{await this.recalculateQuota()}).catch(()=>{this.$message.info(this.$t("sysUpload.quotaInitLater"))})}},async recalculateQuota(){this.quotaLoading=!0;try{this.$message.info(this.$t("sysUpload.quotaCalculating"));const e=await(0,Mt.A)("/api/manage/quota",{method:"POST"}),t=await e.json();t.success?(this.quotaStats=t.channelStats||{},this.$message.success(this.$t("sysUpload.quotaCalculateSuccess"))):this.$message.error(this.$t("sysUpload.quotaCalculateError")+(t.error||""))}catch(e){console.error("Failed to recalculate quota:",e),this.$message.error(this.$t("sysUpload.quotaCalculateFailed"))}finally{this.quotaLoading=!1}}},mounted(){this.loading=!0,(0,Mt.A)("/api/manage/sysConfig/upload").then(e=>e.json()).then(e=>{this.telegramSettings=e.telegram,e.cfr2&&e.cfr2.channels&&(e.cfr2.channels=e.cfr2.channels.map(e=>({...e,quota:e.quota||{enabled:!1,limitGB:10,threshold:95}}))),this.cfr2Settings=e.cfr2,e.s3&&e.s3.channels&&(e.s3.channels=e.s3.channels.map(e=>({...e,quota:e.quota||{enabled:!1,limitGB:10,threshold:95}}))),this.s3Settings=e.s3,e.discord&&e.discord.channels&&(e.discord.channels=e.discord.channels.map(e=>({...e,proxyUrl:e.proxyUrl||""}))),this.discordSettings=e.discord||{loadBalance:{},channels:[]},e.huggingface&&e.huggingface.channels&&(e.huggingface.channels=e.huggingface.channels.map(e=>({...e,isPrivate:e.isPrivate||!1}))),this.huggingfaceSettings=e.huggingface||{loadBalance:{},channels:[]},e.webdav&&e.webdav.channels&&(e.webdav.channels=e.webdav.channels.map(e=>({...e,username:e.username||"",password:e.password||"",publicUrl:e.publicUrl||"",headers:e.headers||{},createDirectory:!1!==e.createDirectory,quota:e.quota||{enabled:!1,limitGB:10,threshold:95}}))),this.webdavSettings=e.webdav||{loadBalance:{},channels:[]},this.loadQuotaStats()}).finally(()=>{this.loading=!1})}};const Fp=(0,c.A)(Sp,[["render",Cp],["__scopeId","data-v-0082a519"]]);var Tp=Fp,Mp=s(98469);s(49187);const Pp={class:"save-text"};function Dp(e,t,s,a,o,l){const r=(0,i.g2)("font-awesome-icon");return(0,i.uX)(),(0,i.Wv)(C.eB,{name:"fade-up"},{default:(0,i.k6)(()=>[(0,i.bo)((0,i.Lk)("div",{class:(0,n.C4)(["floating-save-btn",{"is-loading":s.loading}]),onClick:t[0]||(t[0]=(...e)=>l.handleClick&&l.handleClick(...e))},[s.loading?((0,i.uX)(),(0,i.Wv)(r,{key:0,icon:"spinner",spin:""})):((0,i.uX)(),(0,i.Wv)(r,{key:1,icon:"save"})),(0,i.Lk)("span",Pp,(0,n.v_)(s.loading?e.$t("floatingSave.saving"):e.$t("floatingSave.save")),1)],2),[[C.aG,o.visible]])]),_:1})}var Ap={name:"FloatingSaveButton",emits:["click"],props:{loading:{type:Boolean,default:!1},show:{type:Boolean,default:!0}},data(){return{visible:!1}},watch:{show:{immediate:!0,handler(e){e?setTimeout(()=>{this.visible=!0},600):this.visible=!1}}},methods:{handleClick(){this.loading||this.$emit("click")}}};const $p=(0,c.A)(Ap,[["render",Dp],["__scopeId","data-v-9cef95d2"]]);var Vp=$p,Lp=s(84757);s(5802),s(64752),s(38736);const Ep={class:"security-settings"},Up={class:"first-settings"},Ip={class:"first-title"},Op={class:"second-title"},Rp={style:{display:"flex",gap:"8px",width:"100%"}},Wp={class:"second-title"},Bp={style:{display:"flex",gap:"8px",width:"100%"}},zp={class:"second-title token-title"},Np={class:"token-actions"},jp={class:"token-table-container"},qp={class:"table-cell-content"},Hp={class:"table-cell-content"},Xp={class:"token-display"},Kp={class:"table-cell-content"},Qp={class:"table-cell-content"},Yp={class:"table-cell-content"},Gp={class:"table-cell-content"},Jp={class:"table-cell-content action-buttons"},Zp={class:"first-settings"},eg={class:"first-title"},tg={class:"second-title"},sg={class:"second-title"},ig={class:"query-param-list"},ng={class:"query-param-list"},ag={class:"first-settings"},og={class:"first-title"},lg={class:"second-title"},rg={class:"second-title"},dg={class:"second-title"},cg={class:"second-title"},hg={class:"form-item-hint"},ug={class:"form-item-hint"},pg={style:{display:"flex",gap:"10px",width:"100%"}},gg={class:"dialog-footer"}
22,fg={style:{display:"flex",gap:"10px",width:"100%"}},mg={class:"dialog-footer"},bg={class:"token-result"},yg={style:{"margin-bottom":"15px",color:"#e6a23c"}},xg={class:"dialog-footer"};function vg(e,t,s,a,o,l){const r=wu.WK,d=Mp.dI,c=ku.xE,h=ku.US,u=(0,i.g2)("font-awesome-icon"),p=K.S2,f=Lp.o8,m=Fu.u,b=Lp.Up,y=g.R7,x=Su.qi,k=Cu.P9,_=Cu.AV,S=_u.lq,F=Vp,T=Mp.o5,M=w.kZ,P=v.A;return(0,i.bo)(((0,i.uX)(),(0,i.CE)("div",Ep,[(0,i.Lk)("div",Up,[(0,i.Lk)("h3",Ip,(0,n.v_)(e.$t("sysSecurity.authManagement")),1),(0,i.Lk)("h4",Op,(0,n.v_)(e.$t("sysSecurity.userAuth")),1),(0,i.bF)(h,{model:o.authSettings.user,rules:l.userPassRules,ref:"userPassForm","label-width":"120px"},{default:(0,i.k6)(()=>[(0,i.bF)(c,{label:e.$t("sysSecurity.uploadPassword"),prop:"authCode"},{default:(0,i.k6)(()=>[(0,i.Lk)("div",Rp,[(0,i.bF)(r,{modelValue:o.authSettings.user.authCode,"onUpdate:modelValue":t[0]||(t[0]=e=>o.authSettings.user.authCode=e),type:"password","show-password":"",onInput:l.handleUserPassInput,autocomplete:"new-password",placeholder:o.authSettings.user._hasPassword?e.$t("sysSecurity.passwordUnchanged"):"",disabled:o.clearUserPassword},null,8,["modelValue","onInput","placeholder","disabled"]),o.authSettings.user._hasPassword?((0,i.uX)(),(0,i.Wv)(d,{key:0,modelValue:o.clearUserPassword,"onUpdate:modelValue":t[1]||(t[1]=e=>o.clearUserPassword=e),onChange:l.handleClearUserPassword},{default:(0,i.k6)(()=>[(0,i.eW)((0,n.v_)(e.$t("sysSecurity.clearPassword")),1)]),_:1},8,["modelValue","onChange"])):(0,i.Q3)("",!0)])]),_:1},8,["label"]),(0,i.bF)(C.eB,{name:"fade-slide",mode:"out-in"},{default:(0,i.k6)(()=>[o.showUserPassConfirm?((0,i.uX)(),(0,i.Wv)(c,{label:e.$t("sysSecurity.confirmPassword"),prop:"confirmNewUserPassword",key:"user-confirm"},{default:(0,i.k6)(()=>[(0,i.bF)(r,{modelValue:o.authSettings.user.confirmNewUserPassword,"onUpdate:modelValue":t[2]||(t[2]=e=>o.authSettings.user.confirmNewUserPassword=e),type:"password","show-password":"",autocomplete:"new-password"},null,8,["modelValue"])]),_:1},8,["label"])):(0,i.Q3)("",!0)]),_:1})]),_:1},8,["model","rules"]),(0,i.Lk)("h4",Wp,(0,n.v_)(e.$t("sysSecurity.adminAuth")),1),(0,i.bF)(h,{model:o.authSettings.admin,rules:l.adminPassRules,ref:"adminPassForm","label-width":"120px"},{default:(0,i.k6)(()=>[(0,i.bF)(c,{label:e.$t("sysSecurity.adminUsername"),prop:"adminUsername"},{default:(0,i.k6)(()=>[(0,i.bF)(r,{modelValue:o.authSettings.admin.adminUsername,"onUpdate:modelValue":t[3]||(t[3]=e=>o.authSettings.admin.adminUsername=e),autocomplete:"new-password",disabled:o.clearAdminPassword},null,8,["modelValue","disabled"])]),_:1},8,["label"]),(0,i.bF)(c,{label:e.$t("sysSecurity.adminPassword"),prop:"adminPassword"},{default:(0,i.k6)(()=>[(0,i.Lk)("div",Bp,[(0,i.bF)(r,{modelValue:o.authSettings.admin.adminPassword,"onUpdate:modelValue":t[4]||(t[4]=e=>o.authSettings.admin.adminPassword=e),type:"password","show-password":"",onInput:l.handleAdminPassInput,autocomplete:"new-password",placeholder:o.authSettings.admin._hasPassword?e.$t("sysSecurity.passwordUnchanged"):"",disabled:o.clearAdminPassword},null,8,["modelValue","onInput","placeholder","disabled"]),o.authSettings.admin._hasPassword?((0,i.uX)(),(0,i.Wv)(d,{key:0,modelValue:o.clearAdminPassword,"onUpdate:modelValue":t[5]||(t[5]=e=>o.clearAdminPassword=e),onChange:l.handleClearAdminPassword},{default:(0,i.k6)(()=>[(0,i.eW)((0,n.v_)(e.$t("sysSecurity.clearPassword")),1)]),_:1},8,["modelValue","onChange"])):(0,i.Q3)("",!0)])]),_:1},8,["label"]),(0,i.bF)(C.eB,{name:"fade-slide",mode:"out-in"},{default:(0,i.k6)(()=>[o.showAdminPassConfirm?((0,i.uX)(),(0,i.Wv)(c,{label:e.$t("sysSecurity.confirmPassword"),prop:"confirmNewAdminPassword",key:"admin-confirm"},{default:(0,i.k6)(()=>[(0,i.bF)(r,{modelValue:o.authSettings.admin.confirmNewAdminPassword,"onUpdate:modelValue":t[6]||(t[6]=e=>o.authSettings.admin.confirmNewAdminPassword=e),type:"password","show-password":"",autocomplete:"new-password"},null,8,["modelValue"])]),_:1},8,["label"])):(0,i.Q3)("",!0)]),_:1})]),_:1},8,["model","rules"]),(0,i.Lk)("h4",zp,[(0,i.eW)((0,n.v_)(e.$t("sysSecurity.apiTokenManagement"))+" ",1),(0,i.Lk)("a",Np,[(0,i.bF)(p,{type:"primary",size:"small",onClick:t[7]||(t[7]=e=>o.showCreateTokenDialog=!0),circle:""},{default:(0,i.k6)(()=>[(0,i.bF)(u,{icon:"plus"})]),_:1})])]),(0,i.Lk)("div",jp,[(0,i.bo)(((0,i.uX)(),(0,i.Wv)(b,{data:o.apiTokens,class:"token-table"},{default:(0,i.k6)(()=>[(0,i.bF)(f,{prop:"name",label:e.$t("sysSecurity.tokenName"),"header-align":"center"},{default:(0,i.k6)(e=>[(0,i.Lk)("div",qp,(0,n.v_)(e.row.name),1)]),_:1},8,["label"]),(0,i.bF)(f,{prop:"token",label:e.$t("sysSecurity.tokenValue"),"header-align":"center"},{default:(0,i.k6)(e=>[(0,i.Lk)("div",Hp,[(0,i.Lk)("span",Xp,(0,n.v_)(e.row.token),1)])]),_:1},8,["label"]),(0,i.bF)(f,{prop:"permissions",label:e.$t("sysSecurity.permissions"),"header-align":"center"},{default:(0,i.k6)(e=>[(0,i.Lk)("div",Kp,[((0,i.uX)(!0),(0,i.CE)(i.FK,null,(0,i.pI)(e.row.permissions,e=>((0,i.uX)(),(0,i.Wv)(m,{key:e,size:"small",class:"permission-tag"},{default:(0,i.k6)(()=>[(0,i.eW)((0,n.v_)(l.getPermissionText(e)),1)]),_:2},1024))),128))])]),_:1},8,["label"]),(0,i.bF)(f,{prop:"createdAt",label:e.$t("sysSecurity.createdAt"),"header-align":"center"},{default:(0,i.k6)(e=>[(0,i.Lk)("div",Qp,(0,n.v_)(l.formatDate(e.row.createdAt)),1)]),_:1},8,["label"]),(0,i.bF)(f,{label:e.$t("sysSecurity.status"),"header-align":"center",width:"90"},{default:(0,i.k6)(e=>[(0,i.Lk)("div",Yp,[(0,i.bF)(m,{type:"active"===l.getTokenStatus(e.row.expiresAt).status?"success":"danger",size:"small"},{default:(0,i.k6)(()=>[(0,i.eW)((0,n.v_)(l.getTokenStatus(e.row.expiresAt).label),1)]),_:2},1032,["type"])])]),_:1},8,["label"]),(0,i.bF)(f,{label:e.$t("sysSecurity.expiresAt"),"header-align":"center"},{default:(0,i.k6)(e=>[(0,i.Lk)("div",Gp,(0,n.v_)(l.getTokenStatus(e.row.expiresAt).expiresText),1)]),_:1},8,["label"]),(0,i.bF)(f,{label:e.$t("sysSecurity.operation"),fixed:"right","header-align":"center"},{default:(0,i.k6)(t=>[(0,i.Lk)("div",Jp,[(0,i.bF)(p,{class:"action-button",size:"small",onClick:e=>l.editToken(t.row)},{default:(0,i.k6)(()=>[(0,i.eW)((0,n.v_)(e.$t("sysSecurity.editBtn")),1)]),_:1},8,["onClick"]),(0,i.bF)(p,{class:"action-button",size:"small",type:"danger",onClick:e=>
22l.deleteToken(t.row.id)},{default:(0,i.k6)(()=>[(0,i.eW)((0,n.v_)(e.$t("sysSecurity.deleteBtn")),1)]),_:1},8,["onClick"])])]),_:1},8,["label"])]),_:1},8,["data"])),[[P,o.tokenLoading]])])]),(0,i.Lk)("div",Zp,[(0,i.Lk)("h3",eg,(0,n.v_)(e.$t("sysSecurity.uploadManagement")),1),(0,i.Lk)("h4",tg,[(0,i.eW)((0,n.v_)(e.$t("sysSecurity.imageReview"))+" ",1),(0,i.bF)(y,{content:e.$t("sysSecurity.imageReviewTooltip"),placement:"top"},{default:(0,i.k6)(()=>[(0,i.bF)(u,{icon:"question-circle",style:{"margin-left":"5px",cursor:"pointer"}})]),_:1},8,["content"])]),(0,i.bF)(h,{model:o.uploadSettings.moderate,"label-width":"120px"},{default:(0,i.k6)(()=>[(0,i.bF)(c,{label:e.$t("sysSecurity.enableReview")},{default:(0,i.k6)(()=>[(0,i.bF)(x,{modelValue:o.uploadSettings.moderate.enabled,"onUpdate:modelValue":t[8]||(t[8]=e=>o.uploadSettings.moderate.enabled=e)},null,8,["modelValue"])]),_:1},8,["label"]),(0,i.bF)(c,{label:e.$t("sysSecurity.reviewChannel")},{default:(0,i.k6)(()=>[(0,i.bF)(_,{modelValue:o.uploadSettings.moderate.channel,"onUpdate:modelValue":t[9]||(t[9]=e=>o.uploadSettings.moderate.channel=e),placeholder:e.$t("sysSecurity.reviewChannelPlaceholder")},{default:(0,i.k6)(()=>[(0,i.bF)(k,{label:"moderatecontent.com",value:"moderatecontent.com"}),(0,i.bF)(k,{label:"nsfwjs",value:"nsfwjs"})]),_:1},8,["modelValue","placeholder"])]),_:1},8,["label"]),"moderatecontent.com"===o.uploadSettings.moderate.channel?((0,i.uX)(),(0,i.Wv)(c,{key:0,label:e.$t("sysSecurity.apiKey")},{default:(0,i.k6)(()=>[(0,i.bF)(r,{modelValue:o.uploadSettings.moderate.moderateContentApiKey,"onUpdate:modelValue":t[10]||(t[10]=e=>o.uploadSettings.moderate.moderateContentApiKey=e)},null,8,["modelValue"])]),_:1},8,["label"])):(0,i.Q3)("",!0),"nsfwjs"===o.uploadSettings.moderate.channel?((0,i.uX)(),(0,i.Wv)(c,{key:1,label:e.$t("sysSecurity.apiPath")},{default:(0,i.k6)(()=>[(0,i.bF)(r,{modelValue:o.uploadSettings.moderate.nsfwApiPath,"onUpdate:modelValue":t[11]||(t[11]=e=>o.uploadSettings.moderate.nsfwApiPath=e),placeholder:"https://nsfwjs.your.domain"},null,8,["modelValue"])]),_:1},8,["label"])):(0,i.Q3)("",!0)]),_:1},8,["model"]),(0,i.Lk)("h4",sg,[(0,i.eW)((0,n.v_)(e.$t("sysSecurity.ipQuery"))+" ",1),(0,i.bF)(y,{content:e.$t("sysSecurity.ipQueryTooltip"),placement:"top"},{default:(0,i.k6)(()=>[(0,i.bF)(u,{icon:"question-circle",style:{"margin-left":"5px",cursor:"pointer"}})]),_:1},8,["content"])]),(0,i.bF)(h,{model:o.uploadSettings.ipQuery,"label-width":"120px"},{default:(0,i.k6)(()=>[(0,i.bF)(c,{label:e.$t("sysSecurity.enableIpQuery")},{default:(0,i.k6)(()=>[(0,i.bF)(x,{modelValue:o.uploadSettings.ipQuery.enabled,"onUpdate:modelValue":t[12]||(t[12]=e=>o.uploadSettings.ipQuery.enabled=e)},null,8,["modelValue"])]),_:1},8,["label"]),(0,i.bF)(c,{label:e.$t("sysSecurity.ipQueryChannel")},{default:(0,i.k6)(()=>[(0,i.bF)(_,{modelValue:o.uploadSettings.ipQuery.channel,"onUpdate:modelValue":t[13]||(t[13]=e=>o.uploadSettings.ipQuery.channel=e),placeholder:e.$t("sysSecurity.ipQueryChannelPlaceholder")},{default:(0,i.k6)(()=>[(0,i.bF)(k,{label:e.$t("sysSecurity.customApi"),value:"customApi"},null,8,["label"])]),_:1},8,["modelValue","placeholder"])]),_:1},8,["label"]),"customApi"===o.uploadSettings.ipQuery.channel?((0,i.uX)(),(0,i.CE)(i.FK,{key:0},[(0,i.bF)(c,{label:e.$t("sysSecurity.apiPath")},{default:(0,i.k6)(()=>[(0,i.bF)(r,{modelValue:o.uploadSettings.ipQuery.customApi.url,"onUpdate:modelValue":t[14]||(t[14]=e=>o.uploadSettings.ipQuery.customApi.url=e),placeholder:"https://api.example.com/ip"},null,8,["modelValue"])]),_:1},8,["label"]),(0,i.bF)(c,{label:e.$t("sysSecurity.queryParams")},{default:(0,i.k6)(()=>[(0,i.Lk)("div",ig,[((0,i.uX)(!0),(0,i.CE)(i.FK,null,(0,i.pI)(o.uploadSettings.ipQuery.customApi.params,(t,s)=>((0,i.uX)(),(0,i.CE)("div",{key:s,class:"query-param-row"},[(0,i.bF)(r,{modelValue:t.key,"onUpdate:modelValue":e=>t.key=e,placeholder:e.$t("sysSecurity.paramNamePlaceholder")},null,8,["modelValue","onUpdate:modelValue","placeholder"]),(0,i.bF)(r,{modelValue:t.value,"onUpdate:modelValue":e=>t.value=e,placeholder:e.$t("sysSecurity.paramValuePlaceholder")},null,8,["modelValue","onUpdate:modelValue","placeholder"]),(0,i.bF)(p,{type:"danger",plain:"",circle:"",onClick:e=>l.removeIpQueryParam(s),disabled:o.uploadSettings.ipQuery.customApi.params.length<=1},{default:(0,i.k6)(()=>[(0,i.bF)(u,{icon:"trash-alt"})]),_:1},8,["onClick","disabled"])]))),128)),(0,i.bF)(p,{type:"primary",plain:"",onClick:l.addIpQueryParam},{default:(0,i.k6)(()=>[(0,i.bF)(u,{icon:"plus"}),(0,i.Lk)("span",null,(0,n.v_)(e.$t("sysSecurity.addQueryParam")),1)]),_:1},8,["onClick"])])]),_:1},8,["label"]),(0,i.bF)(c,null,{label:(0,i.k6)(()=>[(0,i.eW)((0,n.v_)(e.$t("sysSecurity.responseFields"))+" ",1),(0,i.bF)(y,{content:e.$t("sysSecurity.responseFieldsTip"),placement:"top"},{default:(0,i.k6)(()=>[(0,i.bF)(u,{icon:"question-circle",style:{"margin-left":"5px",cursor:"pointer"}})]),_:1},8,["content"])]),default:(0,i.k6)(()=>[(0,i.Lk)("div",ng,[((0,i.uX)(!0),(0,i.CE)(i.FK,null,(0,i.pI)(o.uploadSettings.ipQuery.customApi.responseFields,(t,s)=>((0,i.uX)(),(0,i.CE)("div",{key:s,class:"response-field-row"},[(0,i.bF)(r,{modelValue:o.uploadSettings.ipQuery.customApi.responseFields[s],"onUpdate:modelValue":e=>o.uploadSettings.ipQuery.customApi.responseFields[s]=e,placeholder:e.$t("sysSecurity.responseFieldPathPlaceholder")},null,8,["modelValue","onUpdate:modelValue","placeholder"]),(0,i.bF)(p,{plain:"",circle:"",onClick:e=>l.moveIpQueryResponseField(s,-1),disabled:0===s},{default:(0,i.k6)(()=>[(0,i.bF)(u,{icon:"arrow-up"})]),_:1},8,["onClick","disabled"]),(0,i.bF)(p,{plain:"",circle:"",onClick:e=>l.moveIpQueryResponseField(s,1),disabled:s===o.uploadSettings.ipQuery.customApi.responseFields.length-1},{default:(0,i.k6)(()=>[(0,i.bF)(u,{icon:"arrow-down"})]),_:1},8,["onClick","disabled"]),(0,i.bF)(p,{type:"danger",plain:"",circle:"",onClick:e=>l.removeIpQueryResponseField(s)},{default:(0,i.k6)(()=>[(0,i.bF)(u,{icon:"trash-alt"})]),_:1},8,["onClick"])]))),128)),(0,i.bF)(p,{type:"primary",plain:"",onClick:l.addIpQueryResponseField},{default:(0,i.k6)(()=>[(0,i.bF)(u,{icon:"plus"}),(0,i.Lk)("span",null,(0,n.v_)(e.$t("sysSecurity.addResponseField")),1)]),_:1},8,["onClick"])])]),_:1})],64)):(0,i.Q3)("",!0)]),_:1},8,["model"])]),(0,i.Lk)("div",ag,[(0,i.Lk)("h3",og,(0,n.v_)(e.$t("sysSecurity.accessManagement")),1),(0,i.Lk)("h4",lg,(0,n.v_)(e.$t("sysSecurity.domainFilter")),1),(0,i.bF)(h,{model:o.accessSettings,"label-width":"120px"},{default:(0,i.k6)(()=>[(0,i.bF)(c,null,{label:(0,i.k6)(()=>[(0,i.eW)((0,n.v_)(e.$t("sysSecurity.allowedDomains"))+" ",1),(0,i.bF)(y,{content:e.$t("sysSecurity.allowedDomainsTooltip"),placement:"top","raw-content":""},{default:(0,i.k6)(()=>[(0,i.bF)(u,{icon:"question-circle",style:{"margin-left":"5px",cursor:"pointer"}})]),_:1},8,["content"])]),default:(0,i.k6)(()=>[(0,i.bF)(r,{modelValue:o.accessSettings.allowedDomains,"onUpdate:modelValue":t[15]||(t[15]=e=>o.accessSettings.allowedDomains=e)},null,8,["modelValue"])]),_:1})]),_:1},8,["model"]),(0,i.Lk)("h4",rg,(0,n.v_)(e.$t("sysSecurity.whiteListMode")),1),(0,i.bF)(h,{model:o.accessSettings,rules:l.accessRules,ref:"accessForm","label-width":"120px"},{default:(0,i.k6)(()=>[(0,i.bF)(c,null,{label:(0,i.k6)(()=>[(0,i.eW)((0,n.v_)(e.$t("sysSecurity.enableWhiteList"))+" ",1),(0,i.bF)(y,{content:e.$t("sysSecurity.enableWhiteListTooltip"),placement:"top","raw-content":""},{default:(0,i.k6)(()=>[(0,i.bF)(u,{icon:"question-circle",style:{"margin-left":"5px",cursor:"pointer"}})]),_:1},8,["content"])]),default:(0,i.k6)(()=>[(0,i.bF)(x,{modelValue:o.accessSettings.whiteListMode,"onUpdate:modelValue":t[16]||(t[16]=e=>o.accessSettings.whiteListMode=e)},null,8,["modelValue"])]),_:1})]),_:1},8,["model","rules"]),(0,i.Lk)("h4",dg,(0,n.v_)(e.$t("sysSecurity.imageTransform")),1),(0,i.bF)(h,{model:o.accessSettings,rules:l.accessRules,ref:"imageTransformForm","label-width":"120px"},{default:(0,i.k6)(()=>[(0,i.bF)(c,null,{label:(0,i.k6)(()=>[(0,i.eW)((0,n.v_)(e.$t("sysSecurity.enableImageTransform"))+" ",1),(0,i.bF)(y,{content:e.$t("sysSecurity.enableImageTransformTooltip"),placement:"top","raw-content":""},{default:(0,i.k6)(()=>[(0,i.bF)(u,{icon:"question-circle",style:{"margin-left":"5px",cursor:"pointer"}})]),_:1},8,["content"])]),default:(0,i.k6)(()=>[(0,i.bF)(x,{modelValue:o.accessSettings.imageTransformEnabled,"onUpdate:modelValue":t[17]||(t[17]=e=>o.accessSettings.imageTransformEnabled=e)},null,8,["modelValue"])]),_:1}),o.accessSettings.imageTransformEnabled?((0,i.uX)(),(0,i.Wv)(c,{key:0,prop:"imageTransformAllowedSizes"},{label:(0,i.k6)(()=>[(0,i.eW)((0,n.v_)(e.$t("sysSecurity.imageTransformAllowedSizes"))+" ",1),(0,i.bF)(y,{content:e.$t("sysSecurity.imageTransformAllowedSizesHint"),placement:"top","raw-content":""},{default:(0,i.k6)(()=>[(0,i.bF)(u,{icon:"question-circle",style:{"margin-left":"5px",cursor:"pointer"}})]),_:1},8,["content"])]),default:(0,i.k6)(()=>[(0,i.bF)(r,{modelValue:o.accessSettings.imageTransformAllowedSizes,"onUpdate:modelValue":t[18]||(t[18]=e=>o.accessSettings.imageTransformAllowedSizes=e),placeholder:e.$t("sysSecurity.imageTransformAllowedSizesPlaceholder")},null,8,["modelValue","placeholder"])]),_:1})):(0,i.Q3)("",!0)]),_:1},8,["model","rules"]),(0,i.Lk)("h4",cg,(0,n.v_)(e.$t("sysSecurity.sessionSecurityPolicy")),1),(0,i.bF)(h,{model:o.accessSettings,"label-width":"120px"},{default:(0,i.k6)(()=>[(0,i.bF)(c,null,{label:(0,i.k6)(()=>[(0,i.eW)((0,n.v_)(e.$t("sysSecurity.secureMode"))+" ",1),(0,i.bF)(y,{content:e.$t("sysSecurity.secureModeTooltip"),placement:"top"},{default:(0,i.k6)(()=>[(0,i.bF)(u,{icon:"question-circle",style:{"margin-left":"5px",cursor:"pointer"}})]),_:1},8,["content"])]),default:(0,i.k6)(()=>[(0,i.bF)(x,{modelValue:o.accessSettings.sessionSecure,"onUpdate:modelValue":t[19]||(t[19]=e=>o.accessSettings.sessionSecure=e)},null,8,["modelValue"])]),_:1}),(0,i.bF)(c,{label:e.$t("sysSecurity.userSessionMaxAge"),prop:"userSessionMaxAge"},{default:(0,i.k6)(()=>[(0,i.bF)(S,{modelValue:o.accessSettings.userSessionMaxAge,"onUpdate:modelValue":t[20]||(t[20]=e=>o.accessSettings.userSessionMaxAge=e),min:1,max:3650,step:1,precision:0,"controls-position":"right"},null,8,["modelValue"]),(0,i.Lk)("span",hg,(0,n.v_)(e.$t("sysSecurity.sessionMaxAgeUnit")),1)]),_:1},8,["label"]),(0,i.bF)(c,{label:e.$t("sysSecurity.adminSessionMaxAge"),prop:"adminSessionMaxAge"},{default:(0,i.k6)(()=>[(0,i.bF)(S,{modelValue:o.accessSettings.adminSessionMaxAge,"onUpdate:modelValue":t[21]||(t[21]=e=>o.accessSettings.adminSessionMaxAge=e),min:1,max:3650,step:1,precision:0,"controls-position":"right"},null,8,["modelValue"]),(0,i.Lk)("span",ug,(0,n.v_)(e.$t("sysSecurity.sessionMaxAgeUnit")),1)]),_:1},8,["label"])]),_:1},8,["model"])]),(0,i.bF)(F,{show:!o.loading,onClick:l.saveSettings},null,8,["show","onClick"]),(0,i.bF)(M,{modelValue:o.showCreateTokenDialog,"onUpdate:modelValue":t[29]||(t[29]=e=>o.showCreateTokenDialog=e),title:e.$t("sysSecurity.createTokenTitle"),width:l.dialogWidth},{footer:(0,i.k6)(()=>[(0,i.Lk)("span",gg,[(0,i.bF)(p,{onClick:t[28]||(t[28]=e=>o.showCreateTokenDialog=!1)},{default:(0,i.k6)(()=>[(0,i.eW)((0,n.v_)(e.$t("common.cancel")),1)]),_:1}),(0,i.bF)(p,{type:"primary",onClick:l.createToken},{default:(0,i.k6)(()=>[(0,i.eW)((0,n.v_)(e.$t("sysSecurity.createBtn")),1)]),_:1},8,["onClick"])])]),default:(0,i.k6)(()=>[(0,i.bF)(h,{model:o.newToken,rules:l.tokenRules,ref:"tokenForm","label-width":"100px"},{default:(0,i.k6)(()=>[(0,i.bF)(c,{label:e.$t("sysSecurity.tokenNameLabel"),prop:"name"},{default:(0,i.k6)(()=>[(0,i.bF)(r,{modelValue:o.newToken.name,"onUpdate:modelValue":t[22]||(t[22]=e=>o.newToken.name=e),placeholder:e.$t("sysSecurity.tokenNamePlaceholder")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),(0,i.bF)(c,{label:e.$t("sysSecurity.permissionsLabel"),prop:"permissions"},{default:(0,i.k6)(()=>[(0,i.bF)(T,{modelValue:o.newToken.permissions,"onUpdate:modelValue":t[23]||(t[23]=e=>o.newToken.permissions=e)},{default:(0,i.k6)(()=>[(0,i.bF)(d,{label:"upload"},{default:(0,i.k6)(()=>[(0,i.eW)((0,n.v_)(e.$t("sysSecurity.permUpload")),1)]),_:1}),(0,i.bF)(d,{label:"delete"},{default:(0,i.k6)(()=>[(0,i.eW)((0,n.v_)(e.$t("sysSecurity.permDelete")),1)]),_:1}),(0,i.bF)(d,{label:"list"},{default:(0,i.k6)(()=>[(0,i.eW)((0,n.v_)(e.$t("sysSecurity.permList")),1)]),_:1}),(0,i.bF)(d,{label:"manage"},{default:(0,i.k6)(()=>[(0,i.eW)((0,n.v_)(e.$t("sysSecurity.permManage")),1)]),_:1})]),_:1},8,["modelValue"])]),_:1},8,["label"]),(0,i.bF)(c,{label:e.$t("sysSecurity.neverExpire")},{default:(0,i.k6)(()=>[(0,i.bF)(x,{modelValue:o.newToken.neverExpire,"onUpdate:modelValue":t[24]||(t[24]=e=>o.newToken.neverExpire=e),onChange:l.onCreateNeverExpireChange},null,8,["modelValue","onChange"])]),_:1},8,["label"]),o.newToken.neverExpire?(0,i.Q3)("",!0):((0,i.uX)(),(0,i.Wv)(c,{key:0,label:e.$t("sysSecurity.validPeriod"),prop:"expirationValue"},{default:(0,i.k6)(()=>[(0,i.Lk)("div",pg,[(0,i.bF)(S,{modelValue:o.newToken.expirationValue,"onUpdate:modelValue":t[25]||(t[25]=e=>o.newToken.expirationValue=e),min:1,step:1,"controls-position":"right",style:{flex:"1"}},null,8,["modelValue"]),(0,i.bF)(_,{modelValue:o.newToken.expirationUnit,"onUpdate:modelValue":t[26]||(t[26]=e=>o.newToken.expirationUnit=e),style:{width:"100px"}},{default:(0,i.k6)(()=>[((0,i.uX)(!0),(0,i.CE)(i.FK,null,(0,i.pI)(o.timeUnitOptions,t=>((0,i.uX)(),(0,i.Wv)(k,{key:t.value,label:e.$t(t.labelKey),value:t.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])])]),_:1},8,["label"])),o.newToken.neverExpire?(0,i.Q3)("",!0):((0,i.uX)(),(0,i.Wv)(c,{key:1,label:e.$t("sysSecurity.autoDeleteOnExpire")},{default:(0,i.k6)(()=>[(0,i.bF)(x,{modelValue:o.newToken.autoDelete,"onUpdate:modelValue":t[27]||(t[27]=e=>o.newToken.autoDelete=e)},null,8,["modelValue"])]),_:1},8,["label"]))]),_:1},8,["model","rules"])]),_:1},8,["modelValue","title","width"]),(0,i.bF)(M,{modelValue:o.showEditTokenDialog,"onUpdate:modelValue":t[37]||(t[37]=e=>o.showEditTokenDialog=e),title:e.$t("sysSecurity.editTokenTitle"),width:l.dialogWidth},{footer:(0,i.k6)(()=>[(0,i.Lk)("span",mg,[(0,i.bF)(p,{onClick:t[36]||(t[36]=e=>o.showEditTokenDialog=!1)},{default:(0,i.k6)(()=>[(0,i.eW)((0,n.v_)(e.$t("common.cancel")),1)]),_:1}),(0,i.bF)(p,{type:"primary",onClick:l.updateToken},{default:(0,i.k6)(()=>[(0,i.eW)((0,n.v_)(e.$t("sysSecurity.updateBtn")),1)]),_:1},8,["onClick"])])]),default:(0,i.k6)(()=>[(0,i.bF)(h,{model:o.editingToken,rules:l.editTokenRules,ref:"editTokenForm","label-width":"100px"},{default:(0,i.k6)(()=>[(0,i.bF)(c,{label:e.$t("sysSecurity.tokenNameLabel")},{default:(0,i.k6)(()=>[(0,i.bF)(r,{modelValue:o.editingToken.name,"onUpdate:modelValue":t[30]||(t[30]=e=>o.editingToken.name=e),disabled:""},null,8,["modelValue"])]),_:1},8,["label"]),(0,i.bF)(c,{label:e.$t("sysSecurity.permissionsLabel"),prop:"permissions"},{default:(0,i.k6)(()=>[(0,i.bF)(T,{modelValue:o.editingToken.permissions,"onUpdate:modelValue":t[31]||(t[31]=e=>o.editingToken.permissions=e)},{default:(0,i.k6)(()=>[(0,i.bF)(d,{label:"upload"},{default:(0,i.k6)(()=>[(0,i.eW)((0,n.v_)(e.$t("sysSecurity.permUpload")),1)]),_:1}),(0,i.bF)(d,{label:"delete"},{default:(0,i.k6)(()=>[(0,i.eW)((0,n.v_)(e.$t("sysSecurity.permDelete")),1)]),_:1}),(0,i.bF)(d,{label:"list"},{default:(0,i.k6)(()=>[(0,i.eW)((0,n.v_)(e.$t("sysSecurity.permList")),1)]),_:1}),(0,i.bF)(d,{label:"manage"},{default:(0,i.k6)(()=>[(0,i.eW)((0,n.v_)(e.$t("sysSecurity.permManage")),1)]),_:1})]),_:1},8,["modelValue"])]),_:1},8,["label"]),(0,i.bF)(c,{label:e.$t("sysSecurity.neverExpire")},{default:(0,i.k6)(()=>[(0,i.bF)(x,{modelValue:o.editingToken.neverExpire,"onUpdate:modelValue":t[32]||(t[32]=e=>o.editingToken.neverExpire=e),onChange:l.onEditNeverExpireChange},null,8,["modelValue","onChange"])]),_:1},8,["label"]),o.editingToken.neverExpire?(0,i.Q3)("",!0):((0,i.uX)(),(0,i.Wv)(c,{key:0,label:e.$t("sysSecurity.validPeriod"),prop:"expirationValue"},{default:(0,i.k6)(()=>[(0,i.Lk)("div",fg,[(0,i.bF)(S,{modelValue:o.editingToken.expirationValue,"onUpdate:modelValue":t[33]||(t[33]=e=>o.editingToken.expirationValue=e),min:1,step:1,"controls-position":"right",style:{flex:"1"}},null,8,["modelValue"]),(0,i.bF)(_,{modelValue:o.editingToken.expirationUnit,"onUpdate:modelValue":t[34]||(t[34]=e=>o.editingToken.expirationUnit=e),style:{width:"100px"}},{default:(0,i.k6)(()=>[((0,i.uX)(!0),(0,i.CE)(i.FK,null,(0,i.pI)(o.timeUnitOptions,t=>((0,i.uX)(),(0,i.Wv)(k,{key:t.va
22lue,label:e.$t(t.labelKey),value:t.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])])]),_:1},8,["label"])),o.editingToken.neverExpire?(0,i.Q3)("",!0):((0,i.uX)(),(0,i.Wv)(c,{key:1,label:e.$t("sysSecurity.autoDeleteOnExpire")},{default:(0,i.k6)(()=>[(0,i.bF)(x,{modelValue:o.editingToken.autoDelete,"onUpdate:modelValue":t[35]||(t[35]=e=>o.editingToken.autoDelete=e)},null,8,["modelValue"])]),_:1},8,["label"]))]),_:1},8,["model","rules"])]),_:1},8,["modelValue","title","width"]),(0,i.bF)(M,{modelValue:o.showTokenResultDialog,"onUpdate:modelValue":t[40]||(t[40]=e=>o.showTokenResultDialog=e),title:e.$t("sysSecurity.tokenCreatedTitle"),width:l.dialogWidth},{footer:(0,i.k6)(()=>[(0,i.Lk)("span",xg,[(0,i.bF)(p,{type:"primary",onClick:t[39]||(t[39]=e=>o.showTokenResultDialog=!1)},{default:(0,i.k6)(()=>[(0,i.eW)((0,n.v_)(e.$t("sysSecurity.savedBtn")),1)]),_:1})])]),default:(0,i.k6)(()=>[(0,i.Lk)("div",bg,[(0,i.Lk)("p",yg,[(0,i.bF)(u,{icon:"exclamation-triangle",style:{"margin-right":"5px"}}),(0,i.eW)(" "+(0,n.v_)(e.$t("sysSecurity.tokenCreatedWarning")),1)]),(0,i.bF)(h,{"label-width":"100px"},{default:(0,i.k6)(()=>[(0,i.bF)(c,{label:e.$t("sysSecurity.tokenNameLabel")},{default:(0,i.k6)(()=>[(0,i.Lk)("span",null,(0,n.v_)(o.createdToken.name),1)]),_:1},8,["label"]),(0,i.bF)(c,{label:e.$t("sysSecurity.fullToken")},{default:(0,i.k6)(()=>[(0,i.bF)(r,{modelValue:o.createdToken.token,"onUpdate:modelValue":t[38]||(t[38]=e=>o.createdToken.token=e),readonly:""},{append:(0,i.k6)(()=>[(0,i.bF)(p,{onClick:l.copyToken},{default:(0,i.k6)(()=>[(0,i.eW)((0,n.v_)(e.$t("sysSecurity.copyBtn")),1)]),_:1},8,["onClick"])]),_:1},8,["modelValue"])]),_:1},8,["label"])]),_:1})])]),_:1},8,["modelValue","title","width"])])),[[P,o.loading]])}s(81148);const kg={s:1e3,m:6e4,h:36e5,d:864e5};function _g(e,t,s){if(!Number.isFinite(t)||t<=0)throw new Error("ææææ°å¼å¿
é¡»å¤§äº 0");const i="string"===typeof e?new Date(e):new Date(e.getTime());if(kg[s])return new Date(i.getTime()+t*kg[s]).toISOString();if("M"===s)return i.setUTCMonth(i.getUTCMonth()+t),i.toISOString();if("Y"===s)return i.setUTCFullYear(i.getUTCFullYear()+t),i.toISOString();throw new Error(`æ æçæ¶é´åä½: ${s}`)}function wg(e){const t=new Date(e),s=t.getFullYear(),i=String(t.getMonth()+1).padStart(2,"0"),n=String(t.getDate()).padStart(2,"0"),a=String(t.getHours()).padStart(2,"0"),o=String(t.getMinutes()).padStart(2,"0"),l=String(t.getSeconds()).padStart(2,"0");return`${s}-${i}-${n} ${a}:${o}:${l}`}function Cg(e,t=new Date){if(null===e||void 0===e)return{status:"active",label:"ææ",expiresText:"æ°¸ä¸è¿æ"};const s=new Date(e),i=t instanceof Date?t:new Date(t),n=wg(e);return i.getTime()>s.getTime()?{status:"expired",label:"å·²è¿æ",expiresText:n}:{status:"active",label:"ææ",expiresText:n}}var Sg={components:{FloatingSaveButton:Vp},data(){return{authSettings:{user:{},admin:{}},uploadSettings:{moderate:{},ipQuery:{enabled:!1,channel:"customApi",customApi:{url:"",params:[{key:"ip",value:"{ip}"}],responseFields:[]}}},accessSettings:{},apiTokens:[],loading:!0,tokenLoading:!1,oriUserPassword:"",oriAdminPassword:"",showUserPassConfirm:!1,showAdminPassConfirm:!1,clearUserPassword:!1,clearAdminPassword:!1,showCreateTokenDialog:!1,showEditTokenDialog:!1,showTokenResultDialog:!1,timeUnitOptions:[{labelKey:"sysSecurity.timeUnitSeconds",value:"s"},{labelKey:"sysSecurity.timeUnitMinutes",value:"m"},{labelKey:"sysSecurity.timeUnitHours",value:"h"},{labelKey:"sysSecurity.timeUnitDays",value:"d"},{labelKey:"sysSecurity.timeUnitMonths",value:"M"},{labelKey:"sysSecurity.timeUnitYears",value:"Y"}],newToken:{name:"",owner:"",permissions:[],neverExpire:!0,expirationValue:1,expirationUnit:"d",autoDelete:!1},editingToken:{id:"",name:"",owner:"",permissions:[],neverExpire:!0,expirationValue:1,expirationUnit:"d",autoDelete:!1},createdToken:{name:"",token:""}}},computed:{dialogWidth(){return window.innerWidth>768?"50%":"90%"},userPassRules(){return{authCode:[{validator:(e,t,s)=>{const i=["%","&","?","#","/"],n=i.some(e=>t&&t.includes(e));n?s(new Error(this.$t("sysSecurity.passwordUrlReserved"))):s()},trigger:"blur"}],confirmNewUserPassword:[{validator:(e,t,s)=>{t?t!==this.authSettings.user.authCode?s(new Error(this.$t("sysSecurity.passwordMismatch"))):s():s(new Error(this.$t("sysSecurity.confirmUploadPassword")))},trigger:"blur"}]}},adminPassRules(){return{confirmNewAdminPassword:[{validator:(e,t,s)=>{t?t!==this.authSettings.admin.adminPassword?s(new Error(this.$t("sysSecurity.passwordMismatch"))):s():s(new Error(this.$t("sysSecurity.confirmAdminPassword")))},trigger:"blur"}]}},accessRules(){const e=(e,t,s)=>{!Number.isInteger(t)||t<1||t>3650?s(new Error(this.$t("sysSecurity.sessionMaxAgeInvalid"))):s()},t=(e,t,s)=>{if(!this.accessSettings.imageTransformEnabled||!t||!t.trim())return void s();const i=t.split(",").map(e=>
22e.trim().toLowerCase()).filter(Boolean),n=i.every(e=>{const t=e.match(/^(auto|[1-9]\d*)x(auto|[1-9]\d*)$/);return!(!t||"auto"===t[1]&&"auto"===t[2])&&t.slice(1).every(e=>"auto"===e||Number(e)<=4096)});n?s():s(new Error(this.$t("sysSecurity.imageTransformAllowedSizesInvalid")))};return{userSessionMaxAge:[{validator:e,trigger:"change"}],adminSessionMaxAge:[{validator:e,trigger:"change"}],imageTransformAllowedSizes:[{validator:t,trigger:["blur","change"]}]}},tokenRules(){return{name:[{required:!0,message:this.$t("sysSecurity.tokenNameRequired"),trigger:"blur"}],permissions:[{required:!0,message:this.$t("sysSecurity.permissionsRequired"),trigger:"change"}],expirationValue:[{validator:(e,t,s)=>{this.newToken.neverExpire||t&&!(t<=0)?s():s(new Error(this.$t("sysSecurity.validPeriodRequired")))},trigger:"blur"}]}},editTokenRules(){return{permissions:[{required:!0,message:this.$t("sysSecurity.permissionsRequired"),trigger:"change"}],expirationValue:[{validator:(e,t,s)=>{this.editingToken.neverExpire||t&&!(t<=0)?s():s(new Error(this.$t("sysSecurity.validPeriodRequired")))},trigger:"blur"}]}}},methods:{normalizeIpQuerySettings(e={}){const t=e.ipQuery||{},s=t.customApi||{},i=Array.isArray(s.params)&&s.params.length>0?s.params.map(e=>({key:e?.key||"",value:e?.value||""})):[{key:"ip",value:"{ip}"}],n=Array.isArray(s.responseFields)?s.responseFields.map(e=>"string"===typeof e?e:e?.path||""):[];return{...e,moderate:e.moderate||{},ipQuery:{enabled:t.enabled??!1,channel:t.channel||"customApi",customApi:{url:s.url||"",params:i,responseFields:n}}}},addIpQueryParam(){this.uploadSettings.ipQuery.customApi.params.push({key:"",value:""})},removeIpQueryParam(e){this.uploadSettings.ipQuery.customApi.params.length<=1||this.uploadSettings.ipQuery.customApi.params.splice(e,1)},addIpQueryResponseField(){this.uploadSettings.ipQuery.customApi.responseFields.push("")},removeIpQueryResponseField(e){this.uploadSettings.ipQuery.customApi.responseFields.splice(e,1)},moveIpQueryResponseField(e,t){const s=this.uploadSettings.ipQuery.customApi.responseFields,i=e+t;if(i<0||i>=s.length)return;const[n]=s.splice(e,1);s.splice(i,0,n)},handleUserPassInput(){this.authSettings.user.authCode!==this.oriUserPassword?this.showUserPassConfirm=!0:this.showUserPassConfirm=!1},handleAdminPassInput(){this.authSettings.admin.adminPassword!==this.oriAdminPassword?this.showAdminPassConfirm=!0:this.showAdminPassConfirm=!1},handleClearUserPassword(e){e&&(this.authSettings.user.authCode="",this.showUserPassConfirm=!1)},handleClearAdminPassword(e){e&&(this.authSettings.admin.adminPassword="",this.authSettings.admin.adminUsername="",this.showAdminPassConfirm=!1)},getPermissionText(e){const t={upload:this.$t("sysSecurity.permUpload"),delete:this.$t("sysSecurity.permDelete"),list:this.$t("sysSecurity.permList"),manage:this.$t("sysSecurity.permManage")};return t[e]||e},formatDate(e){return new Date(e).toLocaleString("zh-CN")},async loadApiTokens(){this.tokenLoading=!0;try{const e=await(0,Mt.A)("/api/manage/apiTokens"),t=await e.json();this.apiTokens=t.tokens||[]}catch(e){this.$message.error(this.$t("sysSecurity.tokenListFailed"))}finally{this.tokenLoading=!1}},createToken(){this.$refs.tokenForm.validate(async e=>{if(e)try{this.newToken.owner="admin";let e=null,t=!1;this.newToken.neverExpire||(e=_g(new Date,this.newToken.expirationValue,this.newToken.expirationUnit),t=this.newToken.autoDelete);const s=await(0,Mt.A)("/api/manage/apiTokens",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:this.newToken.name,owner:this.newToken.owner,permissions:this.newToken.permissions,expiresAt:e,autoDelete:t})}),i=await s.json();s.ok?(this.createdToken={name:i.name,token:i.token},this.showCreateTokenDialog=!1,this.showTokenResultDialog=!0,this.newToken={name:"",owner:"",permissions:[],neverExpire:!0,expirationValue:1,expirationUnit:"d",autoDelete:!1},await this.loadApiTokens(),this.$message.success(this.$t("sysSecurity.tokenCreateSuccess"))):this.$message.error(i.error||this.$t("sysSecurity.tokenCreateFailed"))}catch(t){this.$message.error(this.$t("sysSecurity.tokenCreateFailed"))}})},editToken(e){const t=null!==e.expiresAt&&void 0!==e.expiresAt;this.editingToken={id:e.id,name:e.name,owner:e.owner,permissions:[...e.permissions],neverExpire:!t,expirationValue:1,expirationUnit:"d",autoDelete:e.autoDelete||!1},this.showEditTokenDialog=!0},updateToken(){this.$refs.editTokenForm.validate(async e=>{if(e)try{let e=null,t=!1;this.editingToken.neverExpire||(e=_g(new Date,this.editingToken.expirationValue,this.editingToken.expirationUnit),t=this.editingToken.autoDelete);const s=await(0,Mt.A)("/api/manage/apiTokens",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({tokenId:this.editingToken.id,permissions:this.editingToken.permissions,expiresAt:e,autoDelete:t})}),i=await s.json();s.ok?(this.showEditTokenDialog=!1,await this.loadApiTokens(),this.$message.success(this.$t("sysSecurity.tokenUpdateSuccess"))):this.$message.error(i.error||this.$t("sysSecurity.tokenUpdateFailed"))}catch(t){this.$message.error(this.$t("sysSecurity.tokenUpdateFailed"))}})},async deleteToken(e){try{await this.$confirm(this.$t("sysSecurity.tokenDeleteConfirm"),this.$t("sysSecurity.tokenDeleteConfirmTitle"),{confirmButtonText:this.$t("sysSecurity.tokenDeleteConfirmOk"),cancelButtonText:this.$t("sysSecurity.tokenDeleteConfirmCancel"),type:"warning"});const t=await(0,Mt.A)(`/api/manage/apiTokens?id=${e}`,{method:"DELETE"}),s=await t.json();t.ok?(await this.loadApiTokens(),this.$message.success(this.$t("sysSecurity.tokenDeleteSuccess"))):this.$message.error(s.error||this.$t("sysSecurity.tokenDeleteFailed"))}catch(t){"cancel"!==t&&this.$message.error(this.$t("sysSecurity.tokenDeleteFailed"))}},async copyToken(){try{await navigator.clipboard.writeText(this.createdToken.token),this.$message.success(this.$t("sysSecurity.tokenCopied"))}catch(e){this.$message.error(this.$t("sysSecurity.copyFailed"))}},onCreateNeverExpireChange(e){e&&(this.newToken.autoDelete=!1)},onEditNeverExpireChange(e){e&&(this.editingToken.autoDelete=!1)},getTokenStatus(e){return Cg(e)},saveSettings(){let e=[];e.push(new Promise(e=>
22{this.$refs.userPassForm.validate(t=>{e(t)})})),e.push(new Promise(e=>{this.$refs.adminPassForm.validate(t=>{e(t)})})),e.push(new Promise(e=>{this.$refs.accessForm.validate(t=>{e(t)})})),e.push(new Promise(e=>{this.$refs.imageTransformForm.validate(t=>{e(t)})})),Promise.all(e).then(e=>{const t=e.every(e=>e);if(!t)return;if(this.accessSettings.userSessionMaxAge<1||!Number.isInteger(this.accessSettings.userSessionMaxAge)||this.accessSettings.userSessionMaxAge>3650||this.accessSettings.adminSessionMaxAge<1||!Number.isInteger(this.accessSettings.adminSessionMaxAge)||this.accessSettings.adminSessionMaxAge>3650)return void this.$message.error(this.$t("sysSecurity.sessionMaxAgeInvalid"));const s={auth:this.authSettings,upload:this.uploadSettings,access:this.accessSettings};delete s.auth.user.confirmNewUserPassword,delete s.auth.admin.confirmNewAdminPassword,this.clearUserPassword&&(s.auth.user._clear=!0,s.auth.user.authCode=""),this.clearAdminPassword&&(s.auth.admin._clear=!0,s.auth.admin.adminPassword=""),(0,Mt.A)("/api/manage/sysConfig/security",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(s)}).then(e=>e.json()).then(e=>{if(e.adminPasswordChanged){const e=this.$t("sysSecurity.adminPasswordChangedRelogin");return this.$message.warning(e),void setTimeout(()=>{this.$store.commit("setAdminLoggedIn",!1),this.$router.push("/adminLogin")},1500)}this.$message.success(this.$t("sysSecurity.settingsSaved")),this.authSettings.user.authCode="",this.authSettings.admin.adminPassword="",this.oriUserPassword="",this.oriAdminPassword="",s.auth.user.authCode&&!s.auth.user._clear?this.authSettings.user._hasPassword=!0:s.auth.user._clear&&(this.authSettings.user._hasPassword=!1),s.auth.admin.adminPassword&&!s.auth.admin._clear?this.authSettings.admin._hasPassword=!0:s.auth.admin._clear&&(this.authSettings.admin._hasPassword=!1),this.showUserPassConfirm=!1,this.showAdminPassConfirm=!1,this.clearUserPassword=!1,this.clearAdminPassword=!1}).catch(()=>{})})}},mounted(){this.loading=!0,(0,Mt.A)("/api/manage/sysConfig/security").then(e=>e.json()).then(e=>{this.authSettings=e.auth,this.uploadSettings=this.normalizeIpQuerySettings(e.upload),this.accessSettings={imageTransformEnabled:!1,imageTransformAllowedSizes:"",...e.access},this.oriUserPassword="",this.oriAdminPassword="",this.authSettings.user.confirmNewUserPassword="",this.authSettings.admin.confirmNewAdminPassword="",this.loadApiTokens()}).finally(()=>{this.loading=!1})}};const Fg=(0,c.A)(Sg,[["render",vg],["__scopeId","data-v-264510a6"]]);var Tg=Fg;const Mg={class:"page-settings"},Pg={class:"first-title"},Dg={key:5,class:"announcement-refresh-option"};function Ag(e,t,s,a,o,l){const r=(0,i.g2)("font-awesome-icon"),d=g.R7,c=Cu.P9,h=Cu.AV,u=Su.qi,p=wu.WK,f=Mp.dI,m=ku.xE,b=ku.US,y=Vp,x=v.A;return(0,i.bo)(((0,i.uX)(),(0,i.CE)("div",Mg,[((0,i.uX)(!0),(0,i.CE)(i.FK,null,(0,i.pI)(l.groupedSettings,(s,a)=>((0,i.uX)(),(0,i.CE)("div",{key:a,class:"first-settings"},[(0,i.Lk)("h3",Pg,(0,n.v_)(a),1),(0,i.bF)(b,{model:o.settings,"label-width":"150px"},{default:(0,i.k6)(()=>[((0,i.uX)(!0),(0,i.CE)(i.FK,null,(0,i.pI)(s,(s,a)=>((0,i.uX)(),(0,i.Wv)(m,{key:s.id,class:(0,n.C4)({"announcement-manual-height":"announcement"===s.id&&null!==o.announcementManualHeight}),style:(0,n.Tr)("announcement"===s.id&&null!==o.announcementManualHeight?{"--announcement-manual-height":`${o.announcementManualHeight}px`}:void 0)},{label:(0,i.k6)(()=>[(0,i.eW)((0,n.v_)(l.localized(s,"label"))+" ",1),s.tooltip?((0,i.uX)(),(0,i.Wv)(d,{key:0,content:l.localized(s,"tooltip"),placement:"top","raw-content":""},{default:(0,i.k6)(()=>[(0,i.bF)(r,{icon:"question-circle",style:{"margin-left":"5px",cursor:"pointer"}})]),_:1},8,["content"])):(0,i.Q3)("",!0)]),default:(0,i.k6)(()=>["select"===s.type?((0,i.uX)(),(0,i.Wv)(h,{key:0,modelValue:s.value,"onUpdate:modelValue":e=>s.value=e,disabled:s.fixed,placeholder:l.localized(s,"placeholder"),style:{width:"100%"}},{default:(0,i.k6)(()=>[((0,i.uX)(!0),(0,i.CE)(i.FK,null,(0,i.pI)(s.options,e=>((0,i.uX)(),(0,i.Wv)(c,{key:e.value,label:l.localizedOption(e),value:e.value},null,8,["label","value"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue","disabled","placeholder"])):"channelName"===s.type?((0,i.uX)(),(0,i.Wv)(h,{key:1,modelValue:s.value,"onUpdate:modelValue":e=>s.value=e,disabled:!l.currentUploadChannel||0===l.currentChannelList.length,placeholder:e.$t("sysPage.channelSelectPlaceholder"),clearable:"",style:{width:"100%"}},{default:(0,i.k6)(()=>[((0,i.uX)(!0),(0,i.CE)(i.FK,null,(0,i.pI)(l.currentChannelList,e=>((0,i.uX)(),(0,i.Wv)(c,{key:e.name,label:e.name,value:e.name},null,8,["label","value"]))),128))]),_:1},8,["modelValue","onUpdate:modelValue","disabled","placeholder"])):"boolean"===s.type?((0,i.uX)(),(0,i.Wv)(u,{key:2,modelValue:s.value,"onUpdate:modelValue":e=>s.value=e,disabled:s.fixed},null,8,["modelValue","onUpdate:modelValue","disabled"])):"textarea"===s.type?((0,i.uX)(),(0,i.Wv)(p,{key:3,modelValue:s.value,"onUpdate:modelValue":e=>s.value=e,type:"textarea",autosize:{minRows:2,maxRows:"announcement"===s.id?8:void 0},resize:"vertical",disabled:s.fixed,placeholder:l.localized(s,"placeholder"),onMousedown:e=>l.handleAnnouncementResizeStart(e,s)},null,8,["modelValue","onUpdate:modelValue","autosize","disabled","placeholder","onMousedown"])):((0,i.uX)(),(0,i.Wv)(p,{key:4,modelValue:s.value,"onUpdate:modelValue":e=>s.value=e,disabled:s.fixed,placeholder:l.localized(s,"placeholder")},null,8,["modelValue","onUpdate:modelValue","disabled","placeholder"])),"announcement"===s.id?((0,i.uX)(),(0,i.CE)("div",Dg,[(0,i.bF)(f,{modelValue:o.refreshAnnouncement,"onUpdate:modelValue":t[0]||(t[0]=e=>o.refreshAnnouncement=e)},{default:(0,i.k6)(()=>[(0,i.eW)((0,n.v_)(e.$t("sysPage.refreshAnnouncement")),1)]),_:1},8,["modelValue"])])):(0,i.Q3)("",!0)]),_:2},1032,["class","style"]))),128))]),_:2}
22,1032,["model"])]))),128)),(0,i.bF)(y,{show:!o.loading,onClick:l.saveSettings},null,8,["show","onClick"])])),[[x,o.loading]])}var $g=s(457),Vg={components:{FloatingSaveButton:Vp},data(){return{settings:{config:[]},loading:!0,refreshAnnouncement:!1,announcementManualHeight:null,announcementResizeMouseUpHandler:null,availableChannels:{}}},computed:{isEn(){return"en"===this.$i18n.locale},groupedSettings(){const e={};return this.settings.config&&this.settings.config.forEach(t=>{const s=this.isEn?t.category_en||t.category||this.$t("sysPage.otherSettings"):t.category||this.$t("sysPage.otherSettings");e[s]||(e[s]=[]),e[s].push(t)}),e},currentUploadChannel(){const e=this.settings.config?.find(e=>"defaultUploadChannel"===e.id);return e?.value||""},currentChannelList(){return this.availableChannels[this.currentUploadChannel]||[]}},watch:{currentUploadChannel(e,t){if(e!==t){const t=this.settings.config?.find(e=>"defaultChannelName"===e.id);if(t){const s=this.availableChannels[e]||[];s.some(e=>e.name===t.value)||(t.value="")}}}},methods:{localized(e,t){return this.isEn&&e[t+"_en"]?e[t+"_en"]:e[t]||""},localizedOption(e){return this.isEn&&e.label_en?e.label_en:e.label},handleAnnouncementResizeStart(e,t){if("announcement"!==t.id)return;const s=e.target.closest?.("textarea");if(!s)return;const i=s.getBoundingClientRect(),n=24,a=e.clientX>=i.right-n&&e.clientY>=i.bottom-n;if(!a)return;const o=s.closest(".el-form-item");this.announcementResizeMouseUpHandler&&window.removeEventListener("mouseup",this.announcementResizeMouseUpHandler);const l=s.offsetHeight;s.style.height=`${l}px`,o?.classList.remove("announcement-manual-height"),this.announcementResizeMouseUpHandler=()=>{const e=s.offsetHeight,t=Math.abs(e-l)>1?e:this.announcementManualHeight;null!==t&&(this.announcementManualHeight=t,o?.style.setProperty("--announcement-manual-height",`${t}px`),o?.classList.add("announcement-manual-height")),this.announcementResizeMouseUpHandler=null},window.addEventListener("mouseup",this.announcementResizeMouseUpHandler,{once:!0})},saveSettings(){(0,Mt.A)("/api/manage/sysConfig/page",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({...this.settings,refreshAnnouncement:this.refreshAnnouncement})}).then(()=>{this.refreshAnnouncement=!1,this.$message.success(this.$t("sysPage.settingsSaved"))})},async fetchAvailableChannels(){try{const e=await $g.A.get("/api/channels");e.data&&(this.availableChannels=e.data)}catch(e){console.error("Failed to fetch available channels:",e)}}},beforeUnmount(){this.announcementResizeMouseUpHandler&&window.removeEventListener("mouseup",this.announcementResizeMouseUpHandler)},mounted(){this.loading=!0,this.fetchAvailableChannels(),(0,Mt.A)("/api/manage/sysConfig/page").then(e=>e.json()).then(e=>{this.settings=e,this.settings.config&&this.settings.config.forEach(e=>{"boolean"===e.type&&("string"===typeof e.value?e.value="true"===e.value:void 0!==e.value&&null!==e.value||(e.value=e.default||!1))})}).finally(()=>{this.loading=!1})}};const Lg=(0,c.A)(Vg,[["render",Ag],["__scopeId","data-v-15272e42"]]);var Eg=Lg;const Ug={class:"others-settings"},Ig={class:"first-settings"},Og={class:"first-title"},Rg={class:"first-title"},Wg={class:"first-title"},Bg={class:"first-title"},zg=["innerHTML"],Ng={class:"first-title"};function jg(e,t,s,a,o,l){const r=(0,i.g2)("font-awesome-icon"),d=g.R7,c=Su.qi,h=ku.xE,u=ku.US,p=wu.WK,f=Cu.P9,m=Cu.AV,b=Vp,y=v.A;return(0,i.bo)(((0,i.uX)(),(0,i.CE)("div",Ug,[(0,i.Lk)("div",Ig,[(0,i.Lk)("h3",Og,[(0,i.eW)((0,n.v_)(e.$t("sysOthers.remoteTelemetry"))+" ",1),(0,i.bF)(d,{content:e.$t("sysOthers.remoteTelemetryTooltip"),placement:"right"},{default:(0,i.k6)(()=>[(0,i.bF)(r,{icon:"question-circle",style:{"margin-left":"5px",cursor:"pointer"}})]),_:1},8,["content"])]),(0,i.bF)(u,{model:o.settings.telemetry,"label-width":"120px"},{default:(0,i.k6)(()=>[(0,i.bF)(h,{label:e.$t("sysOthers.enable")},{default:(0,i.k6)(()=>[(0,i.bF)(c,{modelValue:o.settings.telemetry.enabled,"onUpdate:modelValue":t[0]||(t[0]=e=>o.settings.telemetry.enabled=e),disabled:o.settings.telemetry.fixed},null,8,["modelValue","disabled"])]),_:1},8,["label"])]),_:1},8,["model"]),(0,i.Lk)("h3",Rg,[(0,i.eW)((0,n.v_)(e.$t("sysOthers.cloudflareApiToken"))+" ",1),(0,i.bF)(d,{content:e.$t("sysOthers.cloudflareApiTokenTooltip"),placement:"right","raw-content":""},{default:(0,i.k6)(()=>[(0,i.bF)(r,{icon:"question-circle",style:{"margin-left":"5px",cursor:"pointer"}})]),_:1},8,["content"])]),(0,i.bF)(u,{model:o.settings.cloudflareApiToken,"label-width":"120px"},{default:(0,i.k6)(()=>[(0,i.bF)(h,{label:e.$t("sysOthers.zoneId")},{default:(0,i.k6)(()=>[(0,i.bF)(p,{modelValue:o.settings.cloudflareApiToken.CF_ZONE_ID,"onUpdate:modelValue":t[1]||(t[1]=e=>o.settings.cloudflareApiToken.CF_ZONE_ID=e),disabled:o.settings.cloudflareApiToken.fixed},null,8,["modelValue","disabled"])]),_:1},8,["label"]),(0,i.bF)(h,{label:e.$t("sysOthers.accountEmail")},{default:(0,i.k6)(()=>[(0,i.bF)(p,{modelValue:o.settings.cloudflareApiToken.CF_EMAIL,"onUpdate:modelValue":t[2]||(t[2]=e=>o.settings.cloudflareApiToken.CF_EMAIL=e),disabled:o.settings.cloudflareApiToken.fixed},null,8,["modelValue","disabled"])]),_:1},8,["label"]),(0,i.bF)(h,{label:"API Key"},{default:(0,i.k6)(()=>[(0,i.bF)(p,{modelValue:o.settings.cloudflareApiToken.CF_API_KEY,"onUpdate:modelValue":t[3]||(t[3]=e=>o.settings.cloudflareApiToken.CF_API_KEY=e),disabled:o.settings.cloudflareApiToken.fixed,type:"password","show-password":"",autocomplete:"new-password"},null,8,["modelValue","disabled"])]),_:1})]),_:1},8,["model"]),(0,i.Lk)("h3",Wg,[(0,i.eW)((0,n.v_)(e.$t("sysOthers.randomImageApi"))+" ",1),(0,i.bF)(d,{content:e.$t("sysOthers.randomImageApiTooltip"),placement:"right"},{default:(0,i.k6)(()=>[(0,i.bF)(r,{icon:"question-circle",style:{"margin-left":"5px",cursor:"pointer"}})]),_:1},8,["content"])]),(0,i.bF)(u,{model:o.settings.randomImageAPI,"label-width":"120px"},{default:(0,i.k6)(()=>[(0,i.bF)(h,{label:e.$t("sysOthers.enable")},{default:(0,i.k6)(()=>[(0,i.bF)(c,{modelValue:o.settings.randomImageAPI.enabled,"onUpdate:modelValue":t[4]||(t[4]=e=>o.settings.randomImageAPI.enabled=e),disabled:o.settings.randomImageAPI.fixed},null,8,["modelValue","disabled"])]),_:1},8,["label"]),(0,i.bF)(h,{prop:"randomImageAPI.allowedDir"},{label:(0,i.k6)(()=>[(0,i.Lk)("span",null,(0,n.v_)(e.$t("sysOthers.directory")),1),(0,i.bF)(d,{content:e.$t("sysOthers.directoryTooltip"),placement:"right","raw-content":""},{default:(0,i.k6)(()=>[(0,i.bF)(r,{icon:"question-circle",style:{"margin-left":"5px",cursor:"pointer"}})]),_:1},8,["content"])]),default:(0,i.k6)(()=>[(0,i.bF)(p,{modelValue:o.settings.randomImageAPI.allowedDir,"onUpdate:modelValue":t[5]||(t[5]=e=>o.settings.randomImageAPI.allowedDir=e),disabled:o.settings.randomImageAPI.fixed},null,8,["modelValue","disabled"])]),_:1})]),_:1},8,["model"]),(0,i.Lk)("h3",Bg,[(0,i.eW)((0,n.v_)(e.$t("sysOthers.publicBrowse"))+" ",1),(0,i.bF)(d,{content:e.$t("sysOthers.publicBrowseTooltip"),placement:"right","raw-content":""},{default:(0,i.k6)(()=>[(0,i.bF)(r,{icon:"question-circle",style:{"margin-left":"5px",cursor:"pointer"}})]),_:1},8,["content"])]),(0,i.bF)(u,{model:o.settings.publicBrowse,"label-width":"120px"},{default:(0,i.k6)(()=>[(0,i.bF)(h,{label:e.$t("sysOthers.enable")},{default:(0,i.k6)(()=>[(0,i.bF)(c,{modelValue:o.settings.publicBrowse.enabled,"onUpdate:modelValue":t[6]||(t[6]=e=>o.settings.publicBrowse.enabled=e),disabled:o.settings.publicBrowse.fixed},null,8,["modelValue","disabled"])]),_:1},8,["label"]),(0,i.bF)(h,{prop:"publicBrowse.allowedDir"},{label:(0,i.k6)(()=>[(0,i.Lk)("span",null,(0,n.v_)(e.$t("sysOthers.openDirectory")),1),(0,i.bF)(d,{placement:"right","raw-content":""},{content:(0,i.k6)(()=>[(0,i.Lk)("div",{style:{"max-width":"320px","line-height":"1.6"},innerHTML:e.$t("sysOthers.openDirectoryTooltip")},null,8,zg)]),default:(0,i.k6)(()=>[(0,i.bF)(r,{icon:"question-circle",style:{"margin-left":"5px",cursor:"pointer"}})]),_:1})]),default:(0,i.k6)(()=>[(0,i.bF)(p,{modelValue:o.settings.publicBrowse.allowedDir,"onUpdate:modelValue":t[7]||(t[7]=e=>o.settings.publicBrowse.allowedDir=e),disabled:o.settings.publicBrowse.fixed,placeholder:"wallpaper,photos,album"},null,8,["modelValue","disabled"])]),_:1})]),_:1},8,["model"]),(0,i.Lk)("h3",Ng,[(0,i.eW)((0,n.v_)(e.$t("sysOthers.webdav"))+" ",1),(0,i.bF)(d,{content:e.$t("sysOthers.webdavTooltip"),placement:"right","raw-content":""},{default:(0,i.k6)(()=>[(0,i.bF)(r,{icon:"question-circle",style:{"margin-left":"5px",cursor:"pointer"}})]),_:1},8,["content"])]),(0,i.bF)(u,{model:o.settings.webDAV,"label-width":"120px"},{default:(0,i.k6)(()=>[(0,i.bF)(h,{label:e.$t("sysOthers.enable")},{default:(0,i.k6)(()=>[(0,i.bF)(c,{modelValue:o.settings.webDAV.enabled,"onUpdate:modelValue":t[8]||(t[8]=e=>o.settings.webDAV.enabled=e),disabled:o.settings.webDAV.fixed},null,8,["modelValue","disabled"])]),_:1},8,["label"]),(0,i.bF)(h,{label:e.$t("sysOthers.webdavUsername")},{default:(0,i.k6)(()=>[(0,i.bF)(p,{modelValue:o.settings.webDAV.username,"onUpdate:modelValue":t[9]||(t[9]=e=>o.settings.webDAV.username=e),disabled:o.settings.webDAV.fixed},null,8,["modelValue","disabled"])]),_:1},8,["label"]),(0,i.bF)(h,{label:e.$t("sysOthers.webdavPassword")},{default:(0,i.k6)(()=>[(0,i.bF)(p,{modelValue:o.settings.webDAV.password,"onUpdate:modelValue":t[10]||(t[10]=e=>o.settings.webDAV.password=e),disabled:o.settings.webDAV.fixed,type:"password","show-password":"",autocomplete:"new-password"},null,8,["modelValue","disabled"])]),_:1},8,["label"]),(0,i.bF)(h,{label:e.$t("sysOthers.webdavUploadChannel")},{default:(0,i.k6)(()=>[(0,i.bF)(m,{modelValue:o.settings.webDAV.uploadChannel,"onUpdate:modelValue":t[11]||(t[11]=e=>o.settings.webDAV.uploadChannel=e),disabled:o.settings.webDAV.fixed,placeholder:e.$t("sysOthers.webdavDefaultChannel"),clearable:""},{default:(0,i.k6)(()=>[(0,i.bF)(f,{label:"Telegram",value:"telegram"}),(0,i.bF)(f,{label:"Cloudflare R2",value:"cfr2"}),(0,i.bF)(f,{label:"S3",value:"s3"}),(0,i.bF)(f,{label:"Discord",value:"discord"}),(0,i.bF)(f,{label:"HuggingFace",value:"huggingface"}),(0,i.bF)(f,{label:"WebDAV",value:"webdav"})]),_:1},8,["modelValue","disabled","placeholder"])]),_:1},8,["label"]),o.settings.webDAV.uploadChannel&&l.webdavChannelList.length>1?((0,i.uX)(),(0,i.Wv)(h,{key:0,label:e.$t("sysOthers.webdavChannelName")},{default:(0,i.k6)(()=>[(0,i.bF)(m,{modelValue:o.settings.webDAV.channelName,"onUpdate:modelValue":t[12]||(t[12]=e=>o.settings.webDAV.channelName=e),disabled:o.settings.webDAV.fixed,placeholder:e.$t("uploadSettings.autoSelect"),clearable:""},{default:(0,i.k6)(()=>[((0,i.uX)(!0),(0,i.CE)(i.FK,null,(0,i.pI)(l.webdavChannelList,e=>((0,i.uX)(),(0,i.Wv)(f,{key:e.name,label:e.name,value:e.name},null,8,["label","value"]))),128))]),_:1},8,["modelValue","disabled","placeholder"])]),_:1},8,["label"])):(0,i.Q3)("",!0)]),_:1},8,["model"])]),(0,i.bF)(b,{show:!o.loading,onClick:l.saveSettings},null,8,["show","onClick"])])),[[y,o.loading]])}var qg={components:{FloatingSaveButton:Vp},data(){return{settings:{telemetry:{},randomImageAPI:{},cloudflareApiToken:{},webDAV:{},publicBrowse:{}},availableChannels:{},loading:!0}},computed:{webdavChannelList(){const e=this.settings.webDAV?.uploadChannel;return e&&this.availableChannels[e]||[]}},watch:{"settings.webDAV.uploadChannel"(){this.settings.webDAV&&(this.settings.webDAV.channelName="")}},methods:{saveSettings(){(0,Mt.A)("/api/manage/sysConfig/others",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(this.settings)}).then(()=>this.$message.success(this.$t("sysOthers.settingsSaved")))},async fetchAvailableChannels(){try{const e=await(0,Mt.A)("/api/channels");e.ok&&(this.availableChannels=await e.json())}catch(e){console.error("Failed to fetch available channels:",e)}}},mounted(){this.loading=!0,(0,Mt.A)("/api/manage/sysConfig/others").then(e=>e.json()).then(e=>{this.settings=e}).finally(()=>{this.loading=!1}),this.fetchAvailableChannels()}};const Hg=(0,c.A)(qg,[["render",jg],["__scopeId","data-v-69ae97d8"]]);var Xg=Hg,Kg=s(48903),Qg={name:"SystemConfig",mixins:[Kg.A],data(){return{activeIndex:"status",isSidebarCollapse:!1}},watch:{"$route.hash":{immediate:!0,handler(e){this.activeIndex=e.replace("#",""),window.scrollTo(0,0)}},activeIndex(e){const t=`#${e}`;this.$router.push({hash:t})}},components:{DashboardTabs:f.A,SysConfigTabs:u,SysCogStatus:xu,SysCogUpload:Tp,SysCogSecurity:Tg,SysCogPage:Eg,SysCogOthers:Xg},computed:{disableTooltip(){return window.innerWidth<768},currentComponent(){const e=this.$route.hash.replace("#","");switch(e){case"status":return xu;case"upload":return Tp;case"security":return Tg;case"page":return Eg;case"others":return Xg;default:return xu}}},methods:{handleLogout(){const e="/api/auth/logout";fetch(e,{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({authType:"admin"})}).finally(()=>{this.$store.commit("setAdminLoggedIn",!1),this.$router.push("/adminLogin")})},setDefaultHash(){const e="#status";window.location.hash=e,this.activeIndex=e.replace("#","")}}
22,mounted(){this.initializeBackground("adminBkImg",".container",!1,!0),window.location.hash||this.setDefaultHash()}};const Yg=(0,c.A)(Qg,[["render",x],["__scopeId","data-v-5c6339bf"]]);var Gg=Yg},34396:function(e,t,s){s(85331),s(4885)},49187:function(e,t,s){s(85331),s(38736)},50333:function(e,t,s){s(85331),s(29092)},63003:function(e,t,s){s(85331)},64752:function(e,t,s){s(85331),s(38736),s(18785)},70415:function(e,t,s){s(85331),s(73565)},73565:function(e,t,s){s(85331)},91114:function(e,t,s){function i(e){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}function n(e,t){if("object"!=i(e)||!e)return e;var s=e[Symbol.toPrimitive];if(void 0!==s){var n=s.call(e,t||"default");if("object"!=i(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function a(e){var t=n(e,"string");return"symbol"==i(t)?t:t+""}function o(e,t,s){return(t=a(t))in e?Object.defineProperty(e,t,{value:s,enumerable:!0,configurable:!0,writable:!0}):e[t]=s,e}s.d(t,{A:function(){return o}})},97769:function(e,t,s){s.d(t,{A:function(){return h}});var i=s(56768);const n={key:0,class:"channel-svg-icon",viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg"},a={key:1,class:"channel-svg-icon",viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg"},o={key:2,class:"channel-svg-icon",viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg"};function l(e,t,s,l,r,d){const c=(0,i.g2)("font-awesome-icon");return(0,i.uX)(),(0,i.CE)("span",(0,i.v6)(e.$attrs,{class:["channel-icon-wrapper",`channel-brand-${s.type}`]}),["telegram"===s.type?((0,i.uX)(),(0,i.CE)("svg",n,[...t[0]||(t[0]=[(0,i.Lk)("path",{d:"M417.28 795.733333 429.226667 615.253333 756.906667 320C771.413333 306.773333 753.92 300.373333 734.72 311.893333L330.24 567.466667 155.306667 512C117.76 501.333333 117.333333 475.306667 163.84 456.533333L845.226667 193.706667C876.373333 179.626667 906.24 201.386667 894.293333 249.173333L778.24 795.733333C770.133333 834.56 746.666667 843.946667 714.24 826.026667L537.6 695.466667 452.693333 777.813333C442.88 787.626667 434.773333 795.733333 417.28 795.733333Z"},null,-1)])])):"huggingface"===s.type?((0,i.uX)(),(0,i.CE)("svg",a,[...t[1]||(t[1]=[(0,i.Fv)('<path d="M509.0304 870.656c94.6432 0 185.4464-37.3504 252.3904-103.8336a353.28 353.28 0 0 0 104.5504-250.6752 353.28 353.28 0 0 0-104.5504-250.6752 358.1952 358.1952 0 0 0-252.416-103.8336 358.1696 358.1696 0 0 0-252.3904 103.8336 353.28 353.28 0 0 0-104.5504 250.6752 353.28 353.28 0 0 0 104.5504 250.6752 358.1696 358.1696 0 0 0 252.416 103.8336z" fill="#FFD21E" data-v-ce6ff2ce></path><path d="M865.9712 516.1472a353.28 353.28 0 0 0-104.5504-250.6752 358.1952 358.1952 0 0 0-252.416-103.8336 358.1952 358.1952 0 0 0-252.3904 103.8336 353.28 353.28 0 0 0-104.5504 250.6752 353.28 353.28 0 0 0 104.5504 250.6752 358.1952 358.1952 0 0 0 252.416 103.8336c94.6432 0 185.4464-37.3504 252.3904-103.8336a353.28 353.28 0 0 0 104.5504-250.6752z m-754.9952 0c0-51.9168 10.3168-103.3216 30.3104-151.296a395.1616 395.1616 0 0 1 86.272-128.2304 398.208 398.208 0 0 1 129.152-85.6832 400.384 400.384 0 0 1 304.64 0c48.2816 19.8656 92.16 48.9728 129.1264 85.6832a395.1616 395.1616 0 0 1 86.272 128.256 392.96 392.96 0 0 1 30.2848 151.296c0 104.832-41.9328 205.3632-116.5568 279.5008a399.4112 399.4112 0 0 1-281.472 115.7888A399.4112 399.4112 0 0 1 227.584 795.6736a393.9584 393.9584 0 0 1-116.5824-279.5264z" fill="#FF9D0B" data-v-ce6ff2ce></path><path d="M624.9984 419.7376c13.1328 4.5056 18.2784 31.232 31.5136 24.2944a51.2 51.2 0 0 0 21.1456-20.8896 50.688 50.688 0 0 0-5.4272-56.4224 51.3792 51.3792 0 0 0-54.5792-16.5888c-9.728 2.8928-18.3552 8.6016-24.832 16.384a50.8416 50.8416 0 0 0-5.7344 56.3968c6.272 11.7248 26.1888-7.3472 38.016-3.2768l-0.1024 0.1024z m-241.92 0c-13.1328 4.5056-18.3808 31.232-31.5136 24.2944a51.2 51.2 0 0 1-21.1456-20.8896 50.688 50.688 0 0 1 5.4272-56.4224 51.4048 51.4048 0 0 1 54.5792-16.5888c9.728 2.8928 18.3808 8.6016 24.832 16.384a50.8416 50.8416 0 0 1 5.7344 56.3968c-6.272 11.7248-26.2912-7.3472-38.016-3.2768l0.1024 0.1024z" fill="#3A3B45" data-v-ce6ff2ce></path><path d="M506.4448 664.4736c100.9664 0 133.5296-89.344 133.5296-135.2704 0-23.8592-16.128-16.3072-41.984-3.6608-23.9616 11.7248-56.0896 27.9552-91.4432 27.9552-73.8304 0-133.5296-70.1952-133.5296-24.2944 0 45.9008 32.4608 135.2704 133.5296 135.2704h-0.1024z" fill="#FF323D" data-v-ce6ff2ce></path><path d="M429.1072 641.1264a88.8832 88.8832 0 0 1 54.4512-45.824c4.096-1.2032 8.32 5.8368 12.7232 13.056 4.096 6.9
22632 8.448 14.0032 12.7488 14.0032 4.608 0 9.216-6.9376 13.6448-13.7728 4.6336-7.168 9.1392-14.08 13.568-12.7488a88.32 88.32 0 0 1 51.3536 42.5216C625.92 608.384 640 559.4112 640 529.2032c0-23.8592-16.128-16.3072-42.0352-3.6608l-1.4336 0.7168c-23.7312 11.7248-55.3472 27.2384-90.0608 27.2384-34.7392 0-66.2528-15.5136-90.112-27.2384-26.7008-13.1584-43.4432-21.4272-43.4432 2.944 0 31.1296 15.0016 82.2272 56.192 111.9232z" fill="#3A3B45" data-v-ce6ff2ce></path><path d="M750.4128 467.712c8.8576 0 17.3312-3.5072 23.6032-9.728a33.024 33.024 0 0 0 0-46.8992 33.5104 33.5104 0 0 0-47.2064 0 33.024 33.024 0 0 0 0 46.8992c6.2464 6.2208 14.7456 9.728 23.6032 9.728z m-477.6448 0c8.8576 0 17.3568-3.5072 23.6032-9.728a33.024 33.024 0 0 0 0-46.8992 33.5104 33.5104 0 0 0-47.2064 0 33.024 33.024 0 0 0 0 46.8992c6.272 6.2208 14.7456 9.728 23.6032 9.728z m-68.7104 112.2048c-16.64 0-31.4368 6.7328-41.8048 19.072a60.6464 60.6464 0 0 0-13.6704 38.3488 73.472 73.472 0 0 0-19.9168-3.072c-15.9232 0-30.3104 6.0416-40.4736 16.9472a59.008 59.008 0 0 0-8.2176 71.424 54.016 54.016 0 0 0-18.3808 28.7744 59.3152 59.3152 0 0 0 8.192 48.3584 53.0176 53.0176 0 0 0-3.7888 51.2c10.496 23.68 36.6848 42.24 87.5264 62.2336 31.5392 12.4416 60.4928 20.4032 60.6976 20.5056a458.24 458.24 0 0 0 112.2816 16.3328c60.16 0 103.2192-18.3808 127.9744-54.4768 39.8592-58.0608 34.2016-111.2064-17.4592-162.432-28.4672-28.3648-47.4624-70.0672-51.3536-79.2576-8.0128-27.136-29.184-57.344-64.2048-57.344a58.88 58.88 0 0 0-47.2576 25.088c-10.2656-12.8256-20.3264-22.9376-29.3632-28.7488a76.3648 76.3648 0 0 0-40.7808-12.9536z m0 40.8064c5.2224 0 11.6992 2.2528 18.688 6.6304 21.9904 13.8752 64.2048 86.016 79.7184 114.048 5.12 9.3952 14.08 13.3632 21.9648 13.3632 15.9232 0 28.2624-15.616 1.536-35.5072-40.2432-29.8752-26.1888-78.7456-6.9632-81.7152 0.8192-0.2048 1.7408-0.2048 2.4576-0.2048 17.4592 0 25.1648 29.9008 25.1648 29.9008s22.6048 56.32 61.44 94.8736c38.7072 38.4768 40.7552 69.376 12.5184 110.4896-19.3024 28.0576-56.192 36.5312-94.08 36.5312-39.168 0-79.4112-9.216-101.888-14.8992-1.152-0.3072-138.1632-38.784-120.832-71.424 2.8928-5.504 7.7312-7.7568 13.7728-7.7568 24.448 0 68.8384 36.1216 88.0384 36.1216 4.1984 0 7.168-1.7408 8.5248-6.1184 8.1152-29.0816-123.8784-41.3184-112.7936-83.3536 2.048-7.424 7.296-10.3936 14.7968-10.3936 32.256 0 104.7808 56.3968 119.9872 56.3968 1.1264 0 2.048-0.2816 2.4576-1.024 7.6032-12.2368 3.3792-20.7872-50.3296-53.0432-53.504-32.2304-91.2128-51.6096-69.8624-74.752 2.4832-2.6624 5.9648-3.8912 10.2912-3.8912 32.5632 0 109.4912 69.5808 109.4912 69.5808s20.736 21.4272 33.3824 21.4272c2.8672 0 5.3504-1.024 6.9888-3.8912 8.832-14.8992-82.7904-83.8656-87.936-112.3072-3.4816-19.4048 2.4576-29.0816 13.4656-29.0816z" fill="#FF9D0B" data-v-ce6ff2ce></path><path d="M420.5824 872.6016c28.2368-41.216 26.1888-72.1152-12.544-110.592-38.8096-38.4512-61.4144-94.8736-61.4144-94.8736s-8.4224-32.64-27.648-29.5936c-19.2 3.072-33.28 51.84 7.0144 81.7152 40.1408 29.9008-8.0128 50.2016-23.552 22.144-15.3856-28.0576-57.7024-100.1728-79.6928-114.048-21.888-13.7728-37.2736-6.144-32.1536 22.4512 5.12 28.4416 96.8704 97.408 87.936 112.2048-8.96 15.0016-40.3712-17.4336-40.3712-17.4336s-98.304-88.8576-119.7568-65.7152c-21.376 23.168 16.3328 42.5472 69.8368 74.7776 53.7088 32.256 57.9328 40.8064 50.3296 53.0688-7.68 12.2368-126.1312-87.04-137.216-44.9024-11.1104 41.9328 120.8832 54.0672 112.768 83.1488-8.192 29.0816-93.056-54.8864-110.336-22.2464-17.4336 32.768 119.68 71.2192 120.832 71.5264 44.16 11.4176 156.6208 35.584 195.968-21.632z" fill="#FFD21E" data-v-ce6ff2ce></path><path d="M819.1232 579.9168c16.64 0 31.5392 6.7328 41.8048 19.072 8.8576 10.8544 13.6704 24.3968 13.6704 38.3488 6.5024-1.92 13.2352-2.9696 20.0192-3.072 15.9232 0 30.3104 6.0416 40.4736 16.9472a58.9824 58.9824 0 0 1 8.2176 71.424c9.0624 7.3728 15.4624 17.4592 18.2784 28.7744a59.2896 59.2896 0 0 1-8.192 48.3584 52.992 52.992 0 0 1 3.7888 51.2c-10.496 23.68-36.6848 42.24-87.424 62.208-31.6416 12.4672-60.5952 20.4288-60.8 20.5312-36.608 10.0608-74.3168 15.5392-112.2816 16.3328-60.1856 0-103.2192-18.3808-128-54.4768-39.8336-58.0608-34.176-111.2064 17.4848-162.432 28.544-28.3648 47.5648-70.0672 51.456-79.2576 8.0128-27.136 29.0816-57.344 64.1024-57.344a58.88 58.88 0 0 1 47.232 25.088c10.2912-12.8256 20.352-22.9376 29.4912-28.7488a76.3904 76.3904 0 0 1 40.6784-12.9536z m0 40.8064c-5.248 0-11.5968 2.2272-18.688 6.6304-21.888 13.8752-64.2048 86.016-79.7184 114.048a24.832 24.832 0 0 1-21.9648 13.3632c-15.8208 0-28.2624-15.616-1.4592-35.5072 40.192-29.8752 26.112-78.7456 6.912-81.7152a15.872 15.872 0 0 0-2.4832-0.2048c-17.4592 0-25.1648 29.9008-25.1648 29.9008s-22.6048 56.32-61.3376 94.8736c-38.8096 38.4512-40.8576 69.376-12.544 110.4896 19.2256 28.0576 56.2176 36.5312 94.0032 36.5312 39.2448 0 79.4112-9.216 102.016-14.8992 1.024-0.3072 138.1376-38.784 120.7808-71.424-2.9696-5.504-7.68-7.7568-13.7728-7.7568-24.4224 0-68.9152 36.1216-88.0128 36.1216-4.3264 0-7.296-1.7408-8.5248-6.144-8.2176-29.056 123.776-41.2928 112.6656-83.328-1.9456-
227.424-7.168-10.3936-14.7712-10.3936-32.256 0-104.7808 56.3968-119.9872 56.3968-1.024 0-1.9456-0.3072-2.3552-1.024-7.6032-12.2368-3.5072-20.7872 50.1248-53.0432 53.7088-32.2304 91.392-51.6096 69.8368-74.752-2.3552-2.6624-5.8368-3.8912-10.0608-3.8912-32.6656 0-109.5936 69.5808-109.5936 69.5808s-20.736 21.4272-33.28 21.4272a7.6288 7.6288 0 0 1-6.9888-3.8912c-8.9344-14.8992 82.688-83.8656 87.808-112.3072 3.5072-19.4048-2.4576-29.0816-13.44-29.0816z" fill="#FF9D0B" data-v-ce6ff2ce></path><path d="M602.7008 872.6016c-28.2368-41.216-26.2912-72.1152 12.544-110.592 38.7072-38.4512 61.312-94.8736 61.312-94.8736s8.4224-32.64 27.7248-29.5936c19.1232 3.072 33.1776 51.84-6.9888 81.7152-40.2432 29.9008 8.0128 50.2016 23.424 22.144 15.5136-28.0576 57.856-100.1728 79.7184-114.048 21.8624-13.7728 37.376-6.144 32.1536 22.4512-5.12 28.4416-96.768 97.408-87.808 112.2048 8.8064 15.0016 40.2432-17.4336 40.2432-17.4336s98.4064-88.8576 119.7568-65.7152c21.376 23.168-16.2304 42.5472-69.8368 74.7776-53.7344 32.256-57.8304 40.8064-50.3296 53.0688 7.68 12.2368 126.1312-87.04 137.216-44.9024 11.1104 41.9328-120.7808 54.0672-112.6656 83.1488 8.192 29.0816 92.9536-54.8864 110.336-22.2464 17.3312 32.768-119.68 71.2192-120.832 71.5264-44.2624 11.4176-156.7232 35.584-195.968-21.632z" fill="#FFD21E" data-v-ce6ff2ce></path>',9)])])):"webdav"===s.type?((0,i.uX)(),(0,i.CE)("svg",o,[...t[2]||(t[2]=[(0,i.Lk)("path",{d:"M446.293333 810.666667C384 898.986667 262.4 921.173333 174.506667 859.733333c-87.466667-61.44-107.946667-183.893333-46.506667-273.066666a195.626667 195.626667 0 0 1 152.746667-84.48l2.133333 61.013333c-38.826667 2.986667-76.373333 23.04-100.693333 58.026667-42.666667 61.44-29.44 144.213333 29.013333 185.6 58.88 40.96 141.226667 25.173333 183.893333-35.84 13.226667-19.2 20.906667-40.106667 23.893334-61.44v-43.093334l238.08-1.706666 2.986666-4.693334c22.613333-39.253333 71.68-52.906667 110.08-30.72a81.066667 81.066667 0 0 1 29.013334 110.933334c-22.613333 38.826667-72.106667 52.48-110.506667 30.293333-17.493333-9.813333-29.866667-25.6-35.413333-43.52l-173.653334 0.853333a211.626667 211.626667 0 0 1-33.28 82.773334m310.613334-304.64c107.946667 13.226667 184.746667 110.08 171.52 216.32-13.226667 106.666667-111.36 182.186667-219.306667 168.96a197.504 197.504 0 0 1-146.346667-94.293334l52.906667-30.72a137.386667 137.386667 0 0 0 98.986667 61.866667c74.666667 8.96 140.8-41.813333 149.76-113.066667 8.96-71.253333-43.946667-136.533333-117.76-145.493333-23.04-2.56-45.226667 0.426667-65.28 7.68l-36.266667 18.773333-110.08-203.52h-9.386667a81.322667 81.322667 0 0 1-78.933333-83.2c1.28-44.373333 39.68-78.933333 84.48-77.226666 44.8 2.56 80.213333 38.826667 78.933333 83.2-0.853333 18.773333-8.106667 35.84-19.626666 49.066666l81.066666 149.76c26.453333-8.533333 55.466667-11.52 85.333334-8.106666M352 389.973333c-42.666667-100.266667 2.56-215.04 101.12-256.853333 98.986667-41.813333 213.333333 5.546667 256 105.813333 25.173333 58.453333 20.053333 122.453333-8.533333 173.653334l-52.906667-30.72c17.92-34.56 20.906667-76.8 3.84-116.48-29.013333-68.266667-106.24-101.12-172.373333-73.386667-66.56 28.16-96.426667 106.666667-67.413334 174.933333 11.946667 28.16 32 49.92 56.32 64.426667l16.64 8.96-130.986666 212.906667c1.28 2.133333 2.986667 4.693333 4.266666 8.106666 20.906667 38.826667 6.4 87.893333-32.853333 108.8-38.826667 20.906667-87.893333 5.546667-109.226667-34.56-20.906667-39.68-6.4-88.746667 32.853334-109.653333 16.64-8.96 34.986667-11.093333 52.48-7.253333l98.56-160.853334c-20.053333-18.346667-37.12-41.386667-47.786667-67.84z"},null,-1)])])):((0,i.uX)(),(0,i.Wv)(c,{key:3,icon:d.fontAwesomeIcon},null,8,["icon"]))],16)}var r={name:"ChannelIcon",inheritAttrs:!1,props:{type:{type:String,required:!0}},computed:{fontAwesomeIcon(){const e={cfr2:["fab","cloudflare"],s3:["fab","aws"],discord:["fab","discord"]};return e[this.type]||"server"}}},d=s(71241);const c=(0,d.A)(r,[["render",l],["__scopeId","data-v-ce6ff2ce"]]);var h=c},98642:function(e,t,s){s(85331)}}]); 23//# sourceMappingURL=339.7edc2fbc.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.