PageSourceSearch

https://en-us.hikingbook.net/js/3482.01336bb12dc40c0bc4c3.min.js

js hikingbook.net collected 2026-10-02 03:40:22 UTC 4,096 bytes, 2 lines download raw bytes

1"use strict";(self.webpackChunkhikingbook=self.webpackChunkhikingbook||[]).push([[3482],{1940(t,e){e.A=(t,e)=>{const a=t.__vccOpts||t;for(const[t,n]of e)a[t]=n;return a}},63482(t,e,a){a.r(e),a.d(e,{default:()=>f});var n=a(49424);const s={ref:"chart",class:"chart"};a(47144),a(61696);var i=a(30251),o=a(6966),l=a(73821),r=a(85325);const h={parseText:(t,e)=>"function"==typeof t?t(e):t,parseFont:t=>{const e=l.t1.defaults,a=(0,r.v)(t.size,e.font.size),n={family:(0,r.v)(t.family,e.font.family),lineHeight:(0,r.b1)(t.lineHeight,a),size:a,style:(0,r.v)(t.style,e.font.style),weight:(0,r.v)(t.weight,null),string:""};return n.string=h.toFontString(n),n},toFontString:t=>!t||(0,r.k)(t.size)||(0,r.k)(t.family)?"":(t.style?t.style+" ":"")+(t.weight?t.weight+" ":"")+t.size+"px "+t.family,textSize:(t,e)=>{const{ctx:a}=t,n=a.font;let s=0,i=0;e.forEach(e=>{const n="function"==typeof e.text?e.text(t):e.text;a.font=e.font?e.font.string:"",s=Math.max(a.measureText(n).width,s),i+=e.font.lineHeight}),a.font=n;return{height:i,width:s}}},u=(t,e)=>{if(t.chartArea&&e){const{labels:a}=e;if(!a?.length)return;
1const{ctx:n,chartArea:{top:s,right:i,bottom:o,left:u}}=t,c=[];a.forEach(a=>{const s={text:h.parseText(a.text,t),font:h.parseFont((0,r.a)([a.font,e.font,l.t1.defaults.font],n,0)||l.t1.defaults.font),color:(0,r.a)([a.color,e.color,l.t1.defaults.color],n,0)??"#000"};c.push(s)});let d=h.textSize(t,c);const f=Math.sqrt(Math.pow(d.width,2)+Math.pow(d.height,2)),g=2*l.ju.prototype.innerRadius/f;g<1&&(c.forEach(t=>{t.font.size=Math.floor(t.font.size*g),t.font.lineHeight=1.2,t.font=h.parseFont((0,r.a)([t.font,null],n,0)||l.t1.defaults.font)}),d=h.textSize(t,c)),n.textAlign="center",n.textBaseline="middle";const p=(u+i)/2,b=(s+o)/2-d.height/2;let y;const x=c.length;let m=0;for(y=0;y<x;++y){n.fillStyle=c[y].color,n.font=c[y].font.string;const e=b+c[y].font.lineHeight/2+m;m+=c[y].font.lineHeight;const a=h.parseText(c[y].text,t);n.fillText(a,p,e)}}};var c={id:"doughnutLabel",defaults:{font:{family:"sans-serif",size:16,style:"normal",weight:"normal",lineHeight:1.2,string:"16px sans-serif"}},beforeDraw:(t,e,a)=>u(t,a)};a(62655);const d={props:{labels:{type:Array,required:!0},datasets:{type:Array,required:!0},type:{type:String,default:"pie"},isDataLabelSupport:{type:Boolean,default:!0},isClickable:{type:Boolean,default:!1},isLegendEnable:{type:Boolean,default:!0},doughnutSubtitle:{type:String,default:""},unit:{type:String,default:""}},emits:["chart-on-click"],data:()=>({chart:(0,n.IJ)(null)}),computed:{doughnutLabel(){return{labels:[{text:this.doughnutTitle,font:{size:"22"}},{text:this.doughnutSubtitle,font:{size:"14"}}]}},doughnutTitle(){const t=Math.roundPlaces(this.datasets.reduce((t,e)=>t+e.data.reduce((t,e)=>t+e,0),0),2);return this.unit?`${t} ${this.unit}`:`${t}`}},watch:{datasets(){this.chart.data.datasets=this.datasets,this.chart.options.plugins.doughnutLabel=this.doughnutLabel,this.chart.update()},labels(){this.chart.data.labels=this.labels,this.chart.options.plugins.doughnutLabel=this.doughnutLabel,this.chart.update()}},mounted(){this.chart=this.initChart()},beforeUnmount(){this.chart&&this.chart.destroy()},methods:{initChart(){return new i.Ay(this.$refs.chart,{type:this.t
1ype,data:{labels:this.labels,datasets:this.datasets},plugins:this.isDataLabelSupport?[o.A,c]:[c],options:{maintainAspectRatio:!1,cutout:"85%",onClick:(t,e)=>{this.isClickable&&this.$emit("chart-on-click",e)},onHover:(t,e)=>{this.isClickable&&e.length>0?t.native.target.style.cursor="pointer":t.native.target.style.cursor="auto"},plugins:{legend:{display:this.isLegendEnable},tooltip:{callbacks:{title:t=>t[0].label,label:t=>{const e=t.dataset.data[t.dataIndex];return this.unit?`${e} ${this.unit}`:`${e}`}}},datalabels:{formatter(t,e){if(!e.chart)return t;const a=e.chart.data.datasets[0].data.reduce((t,e)=>t+=e,0);return`${e.chart.data.labels[e.dataIndex]}\n${(100*t/a).toFixed(2)} %`}},doughnutLabel:this.doughnutLabel}}})}}};const f=(0,a(1940).A)(d,[["render",function(t,e,a,i,o,l){return(0,n.uX)(),(0,n.CE)("canvas",s,null,512)}]])}}]);
2//# sourceMappingURL=3482.01336bb12dc40c0bc4c3.min.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.