scope360-core 0.0.134 → 0.0.135
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
`)>-1?t.split(`
|
|
34
34
|
`):t}function Jx(t,e){const{element:n,datasetIndex:r,index:s}=e,i=t.getDatasetMeta(r).controller,{label:a,value:l}=i.getLabelAndValue(s);return{chart:t,label:a,parsed:i.getParsed(s),raw:t.data.datasets[r].data[s],formattedValue:l,dataset:i.getDataset(),dataIndex:s,datasetIndex:r,element:n}}function wm(t,e){const n=t.chart.ctx,{body:r,footer:s,title:i}=t,{boxWidth:a,boxHeight:l}=e,c=rn(e.bodyFont),d=rn(e.titleFont),u=rn(e.footerFont),h=i.length,f=s.length,m=r.length,g=gn(e.padding);let p=g.height,_=0,y=r.reduce((S,M)=>S+M.before.length+M.lines.length+M.after.length,0);if(y+=t.beforeBody.length+t.afterBody.length,h&&(p+=h*d.lineHeight+(h-1)*e.titleSpacing+e.titleMarginBottom),y){const S=e.displayColors?Math.max(l,c.lineHeight):c.lineHeight;p+=m*S+(y-m)*c.lineHeight+(y-1)*e.bodySpacing}f&&(p+=e.footerMarginTop+f*u.lineHeight+(f-1)*e.footerSpacing);let C=0;const b=function(S){_=Math.max(_,n.measureText(S).width+C)};return n.save(),n.font=d.string,Re(t.title,b),n.font=c.string,Re(t.beforeBody.concat(t.afterBody),b),C=e.displayColors?a+2+e.boxPadding:0,Re(r,S=>{Re(S.before,b),Re(S.lines,b),Re(S.after,b)}),C=0,n.font=u.string,Re(t.footer,b),n.restore(),_+=g.width,{width:_,height:p}}function eM(t,e){const{y:n,height:r}=e;return n<r/2?"top":n>t.height-r/2?"bottom":"center"}function tM(t,e,n,r){const{x:s,width:i}=r,a=n.caretSize+n.caretPadding;if(t==="left"&&s+i+a>e.width||t==="right"&&s-i-a<0)return!0}function nM(t,e,n,r){const{x:s,width:i}=n,{width:a,chartArea:{left:l,right:c}}=t;let d="center";return r==="center"?d=s<=(l+c)/2?"left":"right":s<=i/2?d="left":s>=a-i/2&&(d="right"),tM(d,t,e,n)&&(d="center"),d}function bm(t,e,n){const r=n.yAlign||e.yAlign||eM(t,n);return{xAlign:n.xAlign||e.xAlign||nM(t,e,n,r),yAlign:r}}function rM(t,e){let{x:n,width:r}=t;return e==="right"?n-=r:e==="center"&&(n-=r/2),n}function sM(t,e,n){let{y:r,height:s}=t;return e==="top"?r+=n:e==="bottom"?r-=s+n:r-=s/2,r}function km(t,e,n,r){const{caretSize:s,caretPadding:i,cornerRadius:a}=t,{xAlign:l,yAlign:c}=n,d=s+i,{topLeft:u,topRight:h,bottomLeft:f,bottomRight:m}=So(a);let g=rM(e,l);const p=sM(e,c,d);return c==="center"?l==="left"?g+=d:l==="right"&&(g-=d):l==="left"?g-=Math.max(u,f)+s:l==="right"&&(g+=Math.max(h,m)+s),{x:pn(g,0,r.width-e.width),y:pn(p,0,r.height-e.height)}}function ul(t,e,n){const r=gn(n.padding);return e==="center"?t.x+t.width/2:e==="right"?t.x+t.width-r.right:t.x+r.left}function Cm(t){return Qn([],yr(t))}function iM(t,e,n){return Jr(t,{tooltip:e,tooltipItems:n,type:"tooltip"})}function xm(t,e){const n=e&&e.dataset&&e.dataset.tooltip&&e.dataset.tooltip.callbacks;return n?t.override(n):t}const Mm={beforeTitle:mr,title(t){if(t.length>0){const e=t[0],n=e.chart.data.labels,r=n?n.length:0;if(this&&this.options&&this.options.mode==="dataset")return e.dataset.label||"";if(e.label)return e.label;if(r>0&&e.dataIndex<r)return n[e.dataIndex]}return""},afterTitle:mr,beforeBody:mr,beforeLabel:mr,label(t){if(this&&this.options&&this.options.mode==="dataset")return t.label+": "+t.formattedValue||t.formattedValue;let e=t.dataset.label||"";e&&(e+=": ");const n=t.formattedValue;return Ze(n)||(e+=n),e},labelColor(t){const n=t.chart.getDatasetMeta(t.datasetIndex).controller.getStyle(t.dataIndex);return{borderColor:n.borderColor,backgroundColor:n.backgroundColor,borderWidth:n.borderWidth,borderDash:n.borderDash,borderDashOffset:n.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(t){const n=t.chart.getDatasetMeta(t.datasetIndex).controller.getStyle(t.dataIndex);return{pointStyle:n.pointStyle,rotation:n.rotation}},afterLabel:mr,afterBody:mr,beforeFooter:mr,footer:mr,afterFooter:mr};function Ht(t,e,n,r){const s=t[e].call(n,r);return typeof s>"u"?Mm[e].call(n,r):s}class $u extends Bs{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 n=this.chart,r=this.options.setContext(this.getContext()),s=r.enabled&&n.options.animation&&r.animations,i=new S2(this.chart,s);return s._cacheable&&(this._cachedAnimations=Object.freeze(i)),i}getContext(){return this.$context||(this.$context=iM(this.chart.getContext(),this,this._tooltipItems))}getTitle(e,n){const{callbacks:r}=n,s=Ht(r,"beforeTitle",this,e),i=Ht(r,"title",this,e),a=Ht(r,"afterTitle",this,e);let l=[];return l=Qn(l,yr(s)),l=Qn(l,yr(i)),l=Qn(l,yr(a)),l}getBeforeBody(e,n){return Cm(Ht(n.callbacks,"beforeBody",this,e))}getBody(e,n){const{callbacks:r}=n,s=[];return Re(e,i=>{const a={before:[],lines:[],after:[]},l=xm(r,i);Qn(a.before,yr(Ht(l,"beforeLabel",this,i))),Qn(a.lines,Ht(l,"label",this,i)),Qn(a.after,yr(Ht(l,"afterLabel",this,i))),s.push(a)}),s}getAfterBody(e,n){return Cm(Ht(n.callbacks,"afterBody",this,e))}getFooter(e,n){const{callbacks:r}=n,s=Ht(r,"beforeFooter",this,e),i=Ht(r,"footer",this,e),a=Ht(r,"afterFooter",this,e);let l=[];return l=Qn(l,yr(s)),l=Qn(l,yr(i)),l=Qn(l,yr(a)),l}_createItems(e){const n=this._active,r=this.chart.data,s=[],i=[],a=[];let l=[],c,d;for(c=0,d=n.length;c<d;++c)l.push(Jx(this.chart,n[c]));return e.filter&&(l=l.filter((u,h,f)=>e.filter(u,h,f,r))),e.itemSort&&(l=l.sort((u,h)=>e.itemSort(u,h,r))),Re(l,u=>{const h=xm(e.callbacks,u);s.push(Ht(h,"labelColor",this,u)),i.push(Ht(h,"labelPointStyle",this,u)),a.push(Ht(h,"labelTextColor",this,u))}),this.labelColors=s,this.labelPointStyles=i,this.labelTextColors=a,this.dataPoints=l,l}update(e,n){const r=this.options.setContext(this.getContext()),s=this._active;let i,a=[];if(!s.length)this.opacity!==0&&(i={opacity:0});else{const l=Ro[r.position].call(this,s,this._eventPosition);a=this._createItems(r),this.title=this.getTitle(a,r),this.beforeBody=this.getBeforeBody(a,r),this.body=this.getBody(a,r),this.afterBody=this.getAfterBody(a,r),this.footer=this.getFooter(a,r);const c=this._size=wm(this,r),d=Object.assign({},l,c),u=bm(this.chart,r,d),h=km(r,d,u,this.chart);this.xAlign=u.xAlign,this.yAlign=u.yAlign,i={opacity:1,x:h.x,y:h.y,width:c.width,height:c.height,caretX:l.x,caretY:l.y}}this._tooltipItems=a,this.$context=void 0,i&&this._resolveAnimations().update(this,i),e&&r.external&&r.external.call(this,{chart:this.chart,tooltip:this,replay:n})}drawCaret(e,n,r,s){const i=this.getCaretPosition(e,r,s);n.lineTo(i.x1,i.y1),n.lineTo(i.x2,i.y2),n.lineTo(i.x3,i.y3)}getCaretPosition(e,n,r){const{xAlign:s,yAlign:i}=this,{caretSize:a,cornerRadius:l}=r,{topLeft:c,topRight:d,bottomLeft:u,bottomRight:h}=So(l),{x:f,y:m}=e,{width:g,height:p}=n;let _,y,C,b,S,M;return i==="center"?(S=m+p/2,s==="left"?(_=f,y=_-a,b=S+a,M=S-a):(_=f+g,y=_+a,b=S-a,M=S+a),C=_):(s==="left"?y=f+Math.max(c,u)+a:s==="right"?y=f+g-Math.max(d,h)-a:y=this.caretX,i==="top"?(b=m,S=b-a,_=y-a,C=y+a):(b=m+p,S=b+a,_=y+a,C=y-a),M=b),{x1:_,x2:y,x3:C,y1:b,y2:S,y3:M}}drawTitle(e,n,r){const s=this.title,i=s.length;let a,l,c;if(i){const d=yu(r.rtl,this.x,this.width);for(e.x=ul(this,r.titleAlign,r),n.textAlign=d.textAlign(r.titleAlign),n.textBaseline="middle",a=rn(r.titleFont),l=r.titleSpacing,n.fillStyle=r.titleColor,n.font=a.string,c=0;c<i;++c)n.fillText(s[c],d.x(e.x),e.y+a.lineHeight/2),e.y+=a.lineHeight+l,c+1===i&&(e.y+=r.titleMarginBottom-l)}}_drawColorBox(e,n,r,s,i){const a=this.labelColors[r],l=this.labelPointStyles[r],{boxHeight:c,boxWidth:d}=i,u=rn(i.bodyFont),h=ul(this,"left",i),f=s.x(h),m=c<u.lineHeight?(u.lineHeight-c)/2:0,g=n.y+m;if(i.usePointStyle){const p={radius:Math.min(d,c)/2,pointStyle:l.pointStyle,rotation:l.rotation,borderWidth:1},_=s.leftForLtr(f,d)+d/2,y=g+c/2;e.strokeStyle=i.multiKeyBackground,e.fillStyle=i.multiKeyBackground,cu(e,p,_,y),e.strokeStyle=a.borderColor,e.fillStyle=a.backgroundColor,cu(e,p,_,y)}else{e.lineWidth=ve(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 p=s.leftForLtr(f,d),_=s.leftForLtr(s.xPlus(f,1),d-2),y=So(a.borderRadius);Object.values(y).some(C=>C!==0)?(e.beginPath(),e.fillStyle=i.multiKeyBackground,hu(e,{x:p,y:g,w:d,h:c,radius:y}),e.fill(),e.stroke(),e.fillStyle=a.backgroundColor,e.beginPath(),hu(e,{x:_,y:g+1,w:d-2,h:c-2,radius:y}),e.fill()):(e.fillStyle=i.multiKeyBackground,e.fillRect(p,g,d,c),e.strokeRect(p,g,d,c),e.fillStyle=a.backgroundColor,e.fillRect(_,g+1,d-2,c-2))}e.fillStyle=this.labelTextColors[r]}drawBody(e,n,r){const{body:s}=this,{bodySpacing:i,bodyAlign:a,displayColors:l,boxHeight:c,boxWidth:d,boxPadding:u}=r,h=rn(r.bodyFont);let f=h.lineHeight,m=0;const g=yu(r.rtl,this.x,this.width),p=function(O){n.fillText(O,g.x(e.x+m),e.y+f/2),e.y+=f+i},_=g.textAlign(a);let y,C,b,S,M,T,v;for(n.textAlign=a,n.textBaseline="middle",n.font=h.string,e.x=ul(this,_,r),n.fillStyle=r.bodyColor,Re(this.beforeBody,p),m=l&&_!=="right"?a==="center"?d/2+u:d+2+u:0,S=0,T=s.length;S<T;++S){for(y=s[S],C=this.labelTextColors[S],n.fillStyle=C,Re(y.before,p),b=y.lines,l&&b.length&&(this._drawColorBox(n,e,S,g,r),f=Math.max(h.lineHeight,c)),M=0,v=b.length;M<v;++M)p(b[M]),f=h.lineHeight;Re(y.after,p)}m=0,f=h.lineHeight,Re(this.afterBody,p),e.y-=i}drawFooter(e,n,r){const s=this.footer,i=s.length;let a,l;if(i){const c=yu(r.rtl,this.x,this.width);for(e.x=ul(this,r.footerAlign,r),e.y+=r.footerMarginTop,n.textAlign=c.textAlign(r.footerAlign),n.textBaseline="middle",a=rn(r.footerFont),n.fillStyle=r.footerColor,n.font=a.string,l=0;l<i;++l)n.fillText(s[l],c.x(e.x),e.y+a.lineHeight/2),e.y+=a.lineHeight+r.footerSpacing}}drawBackground(e,n,r,s){const{xAlign:i,yAlign:a}=this,{x:l,y:c}=e,{width:d,height:u}=r,{topLeft:h,topRight:f,bottomLeft:m,bottomRight:g}=So(s.cornerRadius);n.fillStyle=s.backgroundColor,n.strokeStyle=s.borderColor,n.lineWidth=s.borderWidth,n.beginPath(),n.moveTo(l+h,c),a==="top"&&this.drawCaret(e,n,r,s),n.lineTo(l+d-f,c),n.quadraticCurveTo(l+d,c,l+d,c+f),a==="center"&&i==="right"&&this.drawCaret(e,n,r,s),n.lineTo(l+d,c+u-g),n.quadraticCurveTo(l+d,c+u,l+d-g,c+u),a==="bottom"&&this.drawCaret(e,n,r,s),n.lineTo(l+m,c+u),n.quadraticCurveTo(l,c+u,l,c+u-m),a==="center"&&i==="left"&&this.drawCaret(e,n,r,s),n.lineTo(l,c+h),n.quadraticCurveTo(l,c,l+h,c),n.closePath(),n.fill(),s.borderWidth>0&&n.stroke()}_updateAnimationTarget(e){const n=this.chart,r=this.$animations,s=r&&r.x,i=r&&r.y;if(s||i){const a=Ro[e.position].call(this,this._active,this._eventPosition);if(!a)return;const l=this._size=wm(this,e),c=Object.assign({},a,this._size),d=bm(n,e,c),u=km(e,c,d,n);(s._to!==u.x||i._to!==u.y)&&(this.xAlign=d.xAlign,this.yAlign=d.yAlign,this.width=l.width,this.height=l.height,this.caretX=a.x,this.caretY=a.y,this._resolveAnimations().update(this,u))}}_willRender(){return!!this.opacity}draw(e){const n=this.options.setContext(this.getContext());let r=this.opacity;if(!r)return;this._updateAnimationTarget(n);const s={width:this.width,height:this.height},i={x:this.x,y:this.y};r=Math.abs(r)<.001?0:r;const a=gn(n.padding),l=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;n.enabled&&l&&(e.save(),e.globalAlpha=r,this.drawBackground(i,e,s,n),Uk(e,n.textDirection),i.y+=a.top,this.drawTitle(i,e,n),this.drawBody(i,e,n),this.drawFooter(i,e,n),qk(e,n.textDirection),e.restore())}getActiveElements(){return this._active||[]}setActiveElements(e,n){const r=this._active,s=e.map(({datasetIndex:l,index:c})=>{const d=this.chart.getDatasetMeta(l);if(!d)throw new Error("Cannot find a dataset at index "+l);return{datasetIndex:l,element:d.data[c],index:c}}),i=!za(r,s),a=this._positionChanged(s,n);(i||a)&&(this._active=s,this._eventPosition=n,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(e,n,r=!0){if(n&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const s=this.options,i=this._active||[],a=this._getActiveElements(e,i,n,r),l=this._positionChanged(a,e),c=n||!za(a,i)||l;return c&&(this._active=a,(s.enabled||s.external)&&(this._eventPosition={x:e.x,y:e.y},this.update(!0,n))),c}_getActiveElements(e,n,r,s){const i=this.options;if(e.type==="mouseout")return[];if(!s)return n.filter(l=>this.chart.data.datasets[l.datasetIndex]&&this.chart.getDatasetMeta(l.datasetIndex).controller.getParsed(l.index)!==void 0);const a=this.chart.getElementsAtEventForMode(e,i.mode,i,r);return i.reverse&&a.reverse(),a}_positionChanged(e,n){const{caretX:r,caretY:s,options:i}=this,a=Ro[i.position].call(this,e,n);return a!==!1&&(r!==a.x||s!==a.y)}}W($u,"positioners",Ro);var oM={id:"tooltip",_element:$u,positioners:Ro,afterInit(t,e,n){n&&(t.tooltip=new $u({chart:t,options:n}))},beforeUpdate(t,e,n){t.tooltip&&t.tooltip.initialize(n)},reset(t,e,n){t.tooltip&&t.tooltip.initialize(n)},afterDraw(t){const e=t.tooltip;if(e&&e._willRender()){const n={tooltip:e};if(t.notifyPlugins("beforeTooltipDraw",{...n,cancelable:!0})===!1)return;e.draw(t.ctx),t.notifyPlugins("afterTooltipDraw",n)}},afterEvent(t,e){if(t.tooltip){const n=e.replay;t.tooltip.handleEvent(e.event,n,e.inChartArea)&&(e.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(t,e)=>e.bodyFont.size,boxWidth:(t,e)=>e.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:Mm},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:t=>t!=="filter"&&t!=="itemSort"&&t!=="external",_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]};const aM=(t,e,n,r)=>(typeof e=="string"?(n=t.push(e)-1,r.unshift({index:n,label:e})):isNaN(e)&&(n=null),n);function lM(t,e,n,r){const s=t.indexOf(e);if(s===-1)return aM(t,e,n,r);const i=t.lastIndexOf(e);return s!==i?n:s}const cM=(t,e)=>t===null?null:pn(Math.round(t),0,e);function vm(t){const e=this.getLabels();return t>=0&&t<e.length?e[t]:t}class hl extends As{constructor(e){super(e),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(e){const n=this._addedLabels;if(n.length){const r=this.getLabels();for(const{index:s,label:i}of n)r[s]===i&&r.splice(s,1);this._addedLabels=[]}super.init(e)}parse(e,n){if(Ze(e))return null;const r=this.getLabels();return n=isFinite(n)&&r[n]===e?n:lM(r,e,Ae(n,e),this._addedLabels),cM(n,r.length-1)}determineDataLimits(){const{minDefined:e,maxDefined:n}=this.getUserBounds();let{min:r,max:s}=this.getMinMax(!0);this.options.bounds==="ticks"&&(e||(r=0),n||(s=this.getLabels().length-1)),this.min=r,this.max=s}buildTicks(){const e=this.min,n=this.max,r=this.options.offset,s=[];let i=this.getLabels();i=e===0&&n===i.length-1?i:i.slice(e,n+1),this._valueRange=Math.max(i.length-(r?0:1),1),this._startValue=this.min-(r?.5:0);for(let a=e;a<=n;a++)s.push({value:a});return s}getLabelForValue(e){return vm.call(this,e)}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(e){return typeof e!="number"&&(e=this.parse(e)),e===null?NaN:this.getPixelForDecimal((e-this._startValue)/this._valueRange)}getPixelForTick(e){const n=this.ticks;return e<0||e>n.length-1?null:this.getPixelForValue(n[e].value)}getValueForPixel(e){return Math.round(this._startValue+this.getDecimalForPixel(e)*this._valueRange)}getBasePixel(){return this.bottom}}W(hl,"id","category"),W(hl,"defaults",{ticks:{callback:vm}});function dM(t,e){const n=[],{bounds:s,step:i,min:a,max:l,precision:c,count:d,maxTicks:u,maxDigits:h,includeBounds:f}=t,m=i||1,g=u-1,{min:p,max:_}=e,y=!Ze(a),C=!Ze(l),b=!Ze(d),S=(_-p)/(h+1);let M=U0((_-p)/g/m)*m,T,v,O,E;if(M<1e-14&&!y&&!C)return[{value:p},{value:_}];E=Math.ceil(_/M)-Math.floor(p/M),E>g&&(M=U0(E*M/g/m)*m),Ze(c)||(T=Math.pow(10,c),M=Math.ceil(M*T)/T),s==="ticks"?(v=Math.floor(p/M)*M,O=Math.ceil(_/M)*M):(v=p,O=_),y&&C&&i&&Ib((l-a)/i,M/1e3)?(E=Math.round(Math.min((l-a)/M,u)),M=(l-a)/E,v=a,O=l):b?(v=y?a:v,O=C?l:O,E=d-1,M=(O-v)/E):(E=(O-v)/M,Co(E,Math.round(E),M/1e3)?E=Math.round(E):E=Math.ceil(E));const I=Math.max(G0(M),G0(v));T=Math.pow(10,Ze(c)?I:c),v=Math.round(v*T)/T,O=Math.round(O*T)/T;let j=0;for(y&&(f&&v!==a?(n.push({value:a}),v<a&&j++,Co(Math.round((v+j*M)*T)/T,a,Sm(a,S,t))&&j++):v<a&&j++);j<E;++j){const $=Math.round((v+j*M)*T)/T;if(C&&$>l)break;n.push({value:$})}return C&&f&&O!==l?n.length&&Co(n[n.length-1].value,l,Sm(l,S,t))?n[n.length-1].value=l:n.push({value:l}):(!C||O===l)&&n.push({value:O}),n}function Sm(t,e,{horizontal:n,minRotation:r}){const s=Qr(r),i=(n?Math.sin(s):Math.cos(s))||.001,a=.75*e*(""+t).length;return Math.min(e/i,a)}class fl extends As{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,n){return Ze(e)||(typeof e=="number"||e instanceof Number)&&!isFinite(+e)?null:+e}handleTickRangeOptions(){const{beginAtZero:e}=this.options,{minDefined:n,maxDefined:r}=this.getUserBounds();let{min:s,max:i}=this;const a=c=>s=n?s:c,l=c=>i=r?i:c;if(e){const c=wi(s),d=wi(i);c<0&&d<0?l(0):c>0&&d>0&&a(0)}if(s===i){let c=i===0?1:Math.abs(i*.05);l(i+c),e||a(s-c)}this.min=s,this.max=i}getTickLimit(){const e=this.options.ticks;let{maxTicksLimit:n,stepSize:r}=e,s;return r?(s=Math.ceil(this.max/r)-Math.floor(this.min/r)+1,s>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${r} would result generating up to ${s} ticks. Limiting to 1000.`),s=1e3)):(s=this.computeTickLimit(),n=n||11),n&&(s=Math.min(n,s)),s}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const e=this.options,n=e.ticks;let r=this.getTickLimit();r=Math.max(2,r);const s={maxTicks:r,bounds:e.bounds,min:e.min,max:e.max,precision:n.precision,step:n.stepSize,count:n.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:n.minRotation||0,includeBounds:n.includeBounds!==!1},i=this._range||this,a=dM(s,i);return e.bounds==="ticks"&&q0(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 n=this.min,r=this.max;if(super.configure(),this.options.offset&&e.length){const s=(r-n)/Math.max(e.length-1,1)/2;n-=s,r+=s}this._startValue=n,this._endValue=r,this._valueRange=r-n}getLabelForValue(e){return ou(e,this.chart.options.locale,this.options.ticks.format)}}class ml extends fl{determineDataLimits(){const{min:e,max:n}=this.getMinMax(!0);this.min=it(e)?e:0,this.max=it(n)?n:1,this.handleTickRangeOptions()}computeTickLimit(){const e=this.isHorizontal(),n=e?this.width:this.height,r=Qr(this.options.ticks.minRotation),s=(e?Math.sin(r):Math.cos(r))||.001,i=this._resolveTickFontOptions(0);return Math.ceil(n/Math.min(40,i.lineHeight/s))}getPixelForValue(e){return e===null?NaN:this.getPixelForDecimal((e-this._startValue)/this._valueRange)}getValueForPixel(e){return this._startValue+this.getDecimalForPixel(e)*this._valueRange}}W(ml,"id","linear"),W(ml,"defaults",{ticks:{callback:Ua.formatters.numeric}});const Fo=t=>Math.floor(Xr(t)),Rs=(t,e)=>Math.pow(10,Fo(t)+e);function Tm(t){return t/Math.pow(10,Fo(t))===1}function Dm(t,e,n){const r=Math.pow(10,n),s=Math.floor(t/r);return Math.ceil(e/r)-s}function uM(t,e){const n=e-t;let r=Fo(n);for(;Dm(t,e,r)>10;)r++;for(;Dm(t,e,r)<10;)r--;return Math.min(r,Fo(t))}function hM(t,{min:e,max:n}){e=Jt(t.min,e);const r=[],s=Fo(e);let i=uM(e,n),a=i<0?Math.pow(10,Math.abs(i)):1;const l=Math.pow(10,i),c=s>i?Math.pow(10,s):0,d=Math.round((e-c)*a)/a,u=Math.floor((e-c)/l/10)*l*10;let h=Math.floor((d-u)/Math.pow(10,i)),f=Jt(t.min,Math.round((c+u+h*Math.pow(10,i))*a)/a);for(;f<n;)r.push({value:f,major:Tm(f),significand:h}),h>=10?h=h<15?15:20:h++,h>=20&&(i++,h=2,a=i>=0?1:a),f=Math.round((c+u+h*Math.pow(10,i))*a)/a;const m=Jt(t.max,f);return r.push({value:m,major:Tm(m),significand:h}),r}class Om extends As{constructor(e){super(e),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(e,n){const r=fl.prototype.parse.apply(this,[e,n]);if(r===0){this._zero=!0;return}return it(r)&&r>0?r:null}determineDataLimits(){const{min:e,max:n}=this.getMinMax(!0);this.min=it(e)?Math.max(0,e):null,this.max=it(n)?Math.max(0,n):null,this.options.beginAtZero&&(this._zero=!0),this._zero&&this.min!==this._suggestedMin&&!it(this._userMin)&&(this.min=e===Rs(this.min,0)?Rs(this.min,-1):Rs(this.min,0)),this.handleTickRangeOptions()}handleTickRangeOptions(){const{minDefined:e,maxDefined:n}=this.getUserBounds();let r=this.min,s=this.max;const i=l=>r=e?r:l,a=l=>s=n?s:l;r===s&&(r<=0?(i(1),a(10)):(i(Rs(r,-1)),a(Rs(s,1)))),r<=0&&i(Rs(s,-1)),s<=0&&a(Rs(r,1)),this.min=r,this.max=s}buildTicks(){const e=this.options,n={min:this._userMin,max:this._userMax},r=hM(n,this);return e.bounds==="ticks"&&q0(r,this,"value"),e.reverse?(r.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),r}getLabelForValue(e){return e===void 0?"0":ou(e,this.chart.options.locale,this.options.ticks.format)}configure(){const e=this.min;super.configure(),this._startValue=Xr(e),this._valueRange=Xr(this.max)-Xr(e)}getPixelForValue(e){return(e===void 0||e===0)&&(e=this.min),e===null||isNaN(e)?NaN:this.getPixelForDecimal(e===this.min?0:(Xr(e)-this._startValue)/this._valueRange)}getValueForPixel(e){const n=this.getDecimalForPixel(e);return Math.pow(10,this._startValue+n*this._valueRange)}}W(Om,"id","logarithmic"),W(Om,"defaults",{ticks:{callback:Ua.formatters.logarithmic,major:{enabled:!0}}});function Pu(t){const e=t.ticks;if(e.display&&t.display){const n=gn(e.backdropPadding);return Ae(e.font&&e.font.size,mt.font.size)+n.height}return 0}function fM(t,e,n){return n=tt(n)?n:[n],{w:ak(t,e.string,n),h:n.length*e.lineHeight}}function Em(t,e,n,r,s){return t===r||t===s?{start:e-n/2,end:e+n/2}:t<r||t>s?{start:e-n,end:e}:{start:e,end:e+n}}function mM(t){const e={l:t.left+t._padding.left,r:t.right-t._padding.right,t:t.top+t._padding.top,b:t.bottom-t._padding.bottom},n=Object.assign({},e),r=[],s=[],i=t._pointLabels.length,a=t.options.pointLabels,l=a.centerPointLabels?vt/i:0;for(let c=0;c<i;c++){const d=a.setContext(t.getPointLabelContext(c));s[c]=d.padding;const u=t.getPointPosition(c,t.drawingArea+s[c],l),h=rn(d.font),f=fM(t.ctx,h,t._pointLabels[c]);r[c]=f;const m=nn(t.getIndexAngle(c)+l),g=Math.round(tu(m)),p=Em(g,u.x,f.w,0,180),_=Em(g,u.y,f.h,90,270);pM(n,e,m,p,_)}t.setCenterPoint(e.l-n.l,n.r-e.r,e.t-n.t,n.b-e.b),t._pointLabelItems=yM(t,r,s)}function pM(t,e,n,r,s){const i=Math.abs(Math.sin(n)),a=Math.abs(Math.cos(n));let l=0,c=0;r.start<e.l?(l=(e.l-r.start)/i,t.l=Math.min(t.l,e.l-l)):r.end>e.r&&(l=(r.end-e.r)/i,t.r=Math.max(t.r,e.r+l)),s.start<e.t?(c=(e.t-s.start)/a,t.t=Math.min(t.t,e.t-c)):s.end>e.b&&(c=(s.end-e.b)/a,t.b=Math.max(t.b,e.b+c))}function gM(t,e,n){const r=t.drawingArea,{extra:s,additionalAngle:i,padding:a,size:l}=n,c=t.getPointPosition(e,r+s+a,i),d=Math.round(tu(nn(c.angle+tn))),u=kM(c.y,l.h,d),h=wM(d),f=bM(c.x,l.w,h);return{visible:!0,x:c.x,y:u,textAlign:h,left:f,top:u,right:f+l.w,bottom:u+l.h}}function _M(t,e){if(!e)return!0;const{left:n,top:r,right:s,bottom:i}=t;return!(pr({x:n,y:r},e)||pr({x:n,y:i},e)||pr({x:s,y:r},e)||pr({x:s,y:i},e))}function yM(t,e,n){const r=[],s=t._pointLabels.length,i=t.options,{centerPointLabels:a,display:l}=i.pointLabels,c={extra:Pu(i)/2,additionalAngle:a?vt/s:0};let d;for(let u=0;u<s;u++){c.padding=n[u],c.size=e[u];const h=gM(t,u,c);r.push(h),l==="auto"&&(h.visible=_M(h,d),h.visible&&(d=h))}return r}function wM(t){return t===0||t===180?"center":t<180?"left":"right"}function bM(t,e,n){return n==="right"?t-=e:n==="center"&&(t-=e/2),t}function kM(t,e,n){return n===90||n===270?t-=e/2:(n>270||n<90)&&(t-=e),t}function CM(t,e,n){const{left:r,top:s,right:i,bottom:a}=n,{backdropColor:l}=e;if(!Ze(l)){const c=So(e.borderRadius),d=gn(e.backdropPadding);t.fillStyle=l;const u=r-d.left,h=s-d.top,f=i-r+d.width,m=a-s+d.height;Object.values(c).some(g=>g!==0)?(t.beginPath(),hu(t,{x:u,y:h,w:f,h:m,radius:c}),t.fill()):t.fillRect(u,h,f,m)}}function xM(t,e){const{ctx:n,options:{pointLabels:r}}=t;for(let s=e-1;s>=0;s--){const i=t._pointLabelItems[s];if(!i.visible)continue;const a=r.setContext(t.getPointLabelContext(s));CM(n,a,i);const l=rn(a.font),{x:c,y:d,textAlign:u}=i;Ga(n,t._pointLabels[s],c,d+l.lineHeight/2,l,{color:a.color,textAlign:u,textBaseline:"middle"})}}function $m(t,e,n,r){const{ctx:s}=t;if(n)s.arc(t.xCenter,t.yCenter,e,0,en);else{let i=t.getPointPosition(0,e);s.moveTo(i.x,i.y);for(let a=1;a<r;a++)i=t.getPointPosition(a,e),s.lineTo(i.x,i.y)}}function MM(t,e,n,r,s){const i=t.ctx,a=e.circular,{color:l,lineWidth:c}=e;!a&&!r||!l||!c||n<0||(i.save(),i.strokeStyle=l,i.lineWidth=c,i.setLineDash(s.dash),i.lineDashOffset=s.dashOffset,i.beginPath(),$m(t,n,a,r),i.closePath(),i.stroke(),i.restore())}function vM(t,e,n){return Jr(t,{label:n,index:e,type:"pointLabel"})}class pl extends fl{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=gn(Pu(this.options)/2),n=this.width=this.maxWidth-e.width,r=this.height=this.maxHeight-e.height;this.xCenter=Math.floor(this.left+n/2+e.left),this.yCenter=Math.floor(this.top+r/2+e.top),this.drawingArea=Math.floor(Math.min(n,r)/2)}determineDataLimits(){const{min:e,max:n}=this.getMinMax(!1);this.min=it(e)&&!isNaN(e)?e:0,this.max=it(n)&&!isNaN(n)?n:0,this.handleTickRangeOptions()}computeTickLimit(){return Math.ceil(this.drawingArea/Pu(this.options))}generateTickLabels(e){fl.prototype.generateTickLabels.call(this,e),this._pointLabels=this.getLabels().map((n,r)=>{const s=ot(this.options.pointLabels.callback,[n,r],this);return s||s===0?s:""}).filter((n,r)=>this.chart.getDataVisibility(r))}fit(){const e=this.options;e.display&&e.pointLabels.display?mM(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(e,n,r,s){this.xCenter+=Math.floor((e-n)/2),this.yCenter+=Math.floor((r-s)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(e,n,r,s))}getIndexAngle(e){const n=en/(this._pointLabels.length||1),r=this.options.startAngle||0;return nn(e*n+Qr(r))}getDistanceFromCenterForValue(e){if(Ze(e))return NaN;const n=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-e)*n:(e-this.min)*n}getValueForDistanceFromCenter(e){if(Ze(e))return NaN;const n=e/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-n:this.min+n}getPointLabelContext(e){const n=this._pointLabels||[];if(e>=0&&e<n.length){const r=n[e];return vM(this.getContext(),e,r)}}getPointPosition(e,n,r=0){const s=this.getIndexAngle(e)-tn+r;return{x:Math.cos(s)*n+this.xCenter,y:Math.sin(s)*n+this.yCenter,angle:s}}getPointPositionForValue(e,n){return this.getPointPosition(e,this.getDistanceFromCenterForValue(n))}getBasePosition(e){return this.getPointPositionForValue(e||0,this.getBaseValue())}getPointLabelPosition(e){const{left:n,top:r,right:s,bottom:i}=this._pointLabelItems[e];return{left:n,top:r,right:s,bottom:i}}drawBackground(){const{backgroundColor:e,grid:{circular:n}}=this.options;if(e){const r=this.ctx;r.save(),r.beginPath(),$m(this,this.getDistanceFromCenterForValue(this._endValue),n,this._pointLabels.length),r.closePath(),r.fillStyle=e,r.fill(),r.restore()}}drawGrid(){const e=this.ctx,n=this.options,{angleLines:r,grid:s,border:i}=n,a=this._pointLabels.length;let l,c,d;if(n.pointLabels.display&&xM(this,a),s.display&&this.ticks.forEach((u,h)=>{if(h!==0||h===0&&this.min<0){c=this.getDistanceFromCenterForValue(u.value);const f=this.getContext(h),m=s.setContext(f),g=i.setContext(f);MM(this,m,c,a,g)}}),r.display){for(e.save(),l=a-1;l>=0;l--){const u=r.setContext(this.getPointLabelContext(l)),{color:h,lineWidth:f}=u;!f||!h||(e.lineWidth=f,e.strokeStyle=h,e.setLineDash(u.borderDash),e.lineDashOffset=u.borderDashOffset,c=this.getDistanceFromCenterForValue(n.ticks.reverse?this.min:this.max),d=this.getPointPosition(l,c),e.beginPath(),e.moveTo(this.xCenter,this.yCenter),e.lineTo(d.x,d.y),e.stroke())}e.restore()}}drawBorder(){}drawLabels(){const e=this.ctx,n=this.options,r=n.ticks;if(!r.display)return;const s=this.getIndexAngle(0);let i,a;e.save(),e.translate(this.xCenter,this.yCenter),e.rotate(s),e.textAlign="center",e.textBaseline="middle",this.ticks.forEach((l,c)=>{if(c===0&&this.min>=0&&!n.reverse)return;const d=r.setContext(this.getContext(c)),u=rn(d.font);if(i=this.getDistanceFromCenterForValue(this.ticks[c].value),d.showLabelBackdrop){e.font=u.string,a=e.measureText(l.label).width,e.fillStyle=d.backdropColor;const h=gn(d.backdropPadding);e.fillRect(-a/2-h.left,-i-u.size/2-h.top,a+h.width,u.size+h.height)}Ga(e,l.label,0,-i,u,{color:d.color,strokeColor:d.textStrokeColor,strokeWidth:d.textStrokeWidth})}),e.restore()}drawTitle(){}}W(pl,"id","radialLinear"),W(pl,"defaults",{display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:Ua.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback(e){return e},padding:5,centerPointLabels:!1}}),W(pl,"defaultRoutes",{"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"}),W(pl,"descriptors",{angleLines:{_fallback:"grid"}});const gl={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}},Yt=Object.keys(gl);function Pm(t,e){return t-e}function Lm(t,e){if(Ze(e))return null;const n=t._adapter,{parser:r,round:s,isoWeekday:i}=t._parseOpts;let a=e;return typeof r=="function"&&(a=r(a)),it(a)||(a=typeof r=="string"?n.parse(a,r):n.parse(a)),a===null?null:(s&&(a=s==="week"&&(xo(i)||i===!0)?n.startOf(a,"isoWeek",i):n.startOf(a,s)),+a)}function Nm(t,e,n,r){const s=Yt.length;for(let i=Yt.indexOf(t);i<s-1;++i){const a=gl[Yt[i]],l=a.steps?a.steps:Number.MAX_SAFE_INTEGER;if(a.common&&Math.ceil((n-e)/(l*a.size))<=r)return Yt[i]}return Yt[s-1]}function SM(t,e,n,r,s){for(let i=Yt.length-1;i>=Yt.indexOf(n);i--){const a=Yt[i];if(gl[a].common&&t._adapter.diff(s,r,a)>=e-1)return a}return Yt[n?Yt.indexOf(n):0]}function TM(t){for(let e=Yt.indexOf(t)+1,n=Yt.length;e<n;++e)if(gl[Yt[e]].common)return Yt[e]}function Vm(t,e,n){if(!n)t[e]=!0;else if(n.length){const{lo:r,hi:s}=ru(n,e),i=n[r]>=e?n[r]:n[s];t[i]=!0}}function DM(t,e,n,r){const s=t._adapter,i=+s.startOf(e[0].value,r),a=e[e.length-1].value;let l,c;for(l=i;l<=a;l=+s.add(l,1,r))c=n[l],c>=0&&(e[c].major=!0);return e}function Bm(t,e,n){const r=[],s={},i=e.length;let a,l;for(a=0;a<i;++a)l=e[a],s[l]=a,r.push({value:l,major:!1});return i===0||!n?r:DM(t,r,s,n)}class _l extends As{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,n={}){const r=e.time||(e.time={}),s=this._adapter=new pC._date(e.adapters.date);s.init(n),ko(r.displayFormats,s.formats()),this._parseOpts={parser:r.parser,round:r.round,isoWeekday:r.isoWeekday},super.init(e),this._normalized=n.normalized}parse(e,n){return e===void 0?null:Lm(this,e)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const e=this.options,n=this._adapter,r=e.time.unit||"day";let{min:s,max:i,minDefined:a,maxDefined:l}=this.getUserBounds();function c(d){!a&&!isNaN(d.min)&&(s=Math.min(s,d.min)),!l&&!isNaN(d.max)&&(i=Math.max(i,d.max))}(!a||!l)&&(c(this._getLabelBounds()),(e.bounds!=="ticks"||e.ticks.source!=="labels")&&c(this.getMinMax(!1))),s=it(s)&&!isNaN(s)?s:+n.startOf(Date.now(),r),i=it(i)&&!isNaN(i)?i:+n.endOf(Date.now(),r)+1,this.min=Math.min(s,i-1),this.max=Math.max(s+1,i)}_getLabelBounds(){const e=this.getLabelTimestamps();let n=Number.POSITIVE_INFINITY,r=Number.NEGATIVE_INFINITY;return e.length&&(n=e[0],r=e[e.length-1]),{min:n,max:r}}buildTicks(){const e=this.options,n=e.time,r=e.ticks,s=r.source==="labels"?this.getLabelTimestamps():this._generate();e.bounds==="ticks"&&s.length&&(this.min=this._userMin||s[0],this.max=this._userMax||s[s.length-1]);const i=this.min,a=this.max,l=jb(s,i,a);return this._unit=n.unit||(r.autoSkip?Nm(n.minUnit,this.min,this.max,this._getLabelCapacity(i)):SM(this,l.length,n.minUnit,this.min,this.max)),this._majorUnit=!r.major.enabled||this._unit==="year"?void 0:TM(this._unit),this.initOffsets(s),e.reverse&&l.reverse(),Bm(this,l,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map(e=>+e.value))}initOffsets(e=[]){let n=0,r=0,s,i;this.options.offset&&e.length&&(s=this.getDecimalForValue(e[0]),e.length===1?n=1-s:n=(this.getDecimalForValue(e[1])-s)/2,i=this.getDecimalForValue(e[e.length-1]),e.length===1?r=i:r=(i-this.getDecimalForValue(e[e.length-2]))/2);const a=e.length<3?.5:.25;n=pn(n,0,a),r=pn(r,0,a),this._offsets={start:n,end:r,factor:1/(n+1+r)}}_generate(){const e=this._adapter,n=this.min,r=this.max,s=this.options,i=s.time,a=i.unit||Nm(i.minUnit,n,r,this._getLabelCapacity(n)),l=Ae(s.ticks.stepSize,1),c=a==="week"?i.isoWeekday:!1,d=xo(c)||c===!0,u={};let h=n,f,m;if(d&&(h=+e.startOf(h,"isoWeek",c)),h=+e.startOf(h,d?"day":a),e.diff(r,n,a)>1e5*l)throw new Error(n+" and "+r+" are too far apart with stepSize of "+l+" "+a);const g=s.ticks.source==="data"&&this.getDataTimestamps();for(f=h,m=0;f<r;f=+e.add(f,l,a),m++)Vm(u,f,g);return(f===r||s.bounds==="ticks"||m===1)&&Vm(u,f,g),Object.keys(u).sort(Pm).map(p=>+p)}getLabelForValue(e){const n=this._adapter,r=this.options.time;return r.tooltipFormat?n.format(e,r.tooltipFormat):n.format(e,r.displayFormats.datetime)}format(e,n){const s=this.options.time.displayFormats,i=this._unit,a=n||s[i];return this._adapter.format(e,a)}_tickFormatFunction(e,n,r,s){const i=this.options,a=i.ticks.callback;if(a)return ot(a,[e,n,r],this);const l=i.time.displayFormats,c=this._unit,d=this._majorUnit,u=c&&l[c],h=d&&l[d],f=r[n],m=d&&h&&f&&f.major;return this._adapter.format(e,s||(m?h:u))}generateTickLabels(e){let n,r,s;for(n=0,r=e.length;n<r;++n)s=e[n],s.label=this._tickFormatFunction(s.value,n,e)}getDecimalForValue(e){return e===null?NaN:(e-this.min)/(this.max-this.min)}getPixelForValue(e){const n=this._offsets,r=this.getDecimalForValue(e);return this.getPixelForDecimal((n.start+r)*n.factor)}getValueForPixel(e){const n=this._offsets,r=this.getDecimalForPixel(e)/n.factor-n.end;return this.min+r*(this.max-this.min)}_getLabelSize(e){const n=this.options.ticks,r=this.ctx.measureText(e).width,s=Qr(this.isHorizontal()?n.maxRotation:n.minRotation),i=Math.cos(s),a=Math.sin(s),l=this._resolveTickFontOptions(0).size;return{w:r*i+l*a,h:r*a+l*i}}_getLabelCapacity(e){const n=this.options.time,r=n.displayFormats,s=r[n.unit]||r.millisecond,i=this._tickFormatFunction(e,0,Bm(this,[e],this._majorUnit),s),a=this._getLabelSize(i),l=Math.floor(this.isHorizontal()?this.width/a.w:this.height/a.h)-1;return l>0?l:1}getDataTimestamps(){let e=this._cache.data||[],n,r;if(e.length)return e;const s=this.getMatchingVisibleMetas();if(this._normalized&&s.length)return this._cache.data=s[0].controller.getAllParsedValues(this);for(n=0,r=s.length;n<r;++n)e=e.concat(s[n].controller.getAllParsedValues(this));return this._cache.data=this.normalize(e)}getLabelTimestamps(){const e=this._cache.labels||[];let n,r;if(e.length)return e;const s=this.getLabels();for(n=0,r=s.length;n<r;++n)e.push(Lm(this,s[n]));return this._cache.labels=this._normalized?e:this.normalize(e)}normalize(e){return Ub(e.sort(Pm))}}W(_l,"id","time"),W(_l,"defaults",{bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",callback:!1,major:{enabled:!1}}});function yl(t,e,n){let r=0,s=t.length-1,i,a,l,c;n?(e>=t[r].pos&&e<=t[s].pos&&({lo:r,hi:s}=Os(t,"pos",e)),{pos:i,time:l}=t[r],{pos:a,time:c}=t[s]):(e>=t[r].time&&e<=t[s].time&&({lo:r,hi:s}=Os(t,"time",e)),{time:i,pos:l}=t[r],{time:a,pos:c}=t[s]);const d=a-i;return d?l+(c-l)*(e-i)/d:l}class Am extends _l{constructor(e){super(e),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const e=this._getTimestampsForTable(),n=this._table=this.buildLookupTable(e);this._minPos=yl(n,this.min),this._tableRange=yl(n,this.max)-this._minPos,super.initOffsets(e)}buildLookupTable(e){const{min:n,max:r}=this,s=[],i=[];let a,l,c,d,u;for(a=0,l=e.length;a<l;++a)d=e[a],d>=n&&d<=r&&s.push(d);if(s.length<2)return[{time:n,pos:0},{time:r,pos:1}];for(a=0,l=s.length;a<l;++a)u=s[a+1],c=s[a-1],d=s[a],Math.round((u+c)/2)!==d&&i.push({time:d,pos:a/(l-1)});return i}_generate(){const e=this.min,n=this.max;let r=super.getDataTimestamps();return(!r.includes(e)||!r.length)&&r.splice(0,0,e),(!r.includes(n)||r.length===1)&&r.push(n),r.sort((s,i)=>s-i)}_getTimestampsForTable(){let e=this._cache.all||[];if(e.length)return e;const n=this.getDataTimestamps(),r=this.getLabelTimestamps();return n.length&&r.length?e=this.normalize(n.concat(r)):e=n.length?n:r,e=this._cache.all=e,e}getDecimalForValue(e){return(yl(this._table,e)-this._minPos)/this._tableRange}getValueForPixel(e){const n=this._offsets,r=this.getDecimalForPixel(e)/n.factor-n.end;return yl(this._table,r*this._tableRange+this._minPos,!0)}}W(Am,"id","timeseries"),W(Am,"defaults",_l.defaults);const Rm={data:{type:Object,required:!0},options:{type:Object,default:()=>({})},plugins:{type:Array,default:()=>[]},datasetIdKey:{type:String,default:"label"},updateMode:{type:String,default:void 0}},OM={type:{type:String,required:!0},destroyDelay:{type:Number,default:0},...Rm,...{ariaLabel:{type:String},ariaDescribedby:{type:String}}},EM=o.version[0]==="2"?(t,e)=>Object.assign(t,{attrs:e}):(t,e)=>Object.assign(t,e);function Ci(t){return o.isProxy(t)?o.toRaw(t):t}function $M(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:t;return o.isProxy(e)?new Proxy(t,{}):t}function PM(t,e){const n=t.options;n&&e&&Object.assign(n,e)}function Fm(t,e){t.labels=e}function Im(t,e,n){const r=[];t.datasets=e.map(s=>{const i=t.datasets.find(a=>a[n]===s[n]);return!i||!s.data||r.includes(i)?{...s}:(r.push(i),Object.assign(i,s),i)})}function LM(t,e){const n={labels:[],datasets:[]};return Fm(n,t.labels),Im(n,t.datasets,e),n}const NM=o.defineComponent({props:OM,setup(t,e){let{expose:n,slots:r}=e;const s=o.ref(null),i=o.shallowRef(null);n({chart:i});const a=()=>{if(!s.value)return;const{type:d,data:u,options:h,plugins:f,datasetIdKey:m}=t,g=LM(u,m),p=$M(g,u);i.value=new Bo(s.value,{type:d,data:p,options:{...h},plugins:f})},l=()=>{const d=o.toRaw(i.value);d&&(t.destroyDelay>0?setTimeout(()=>{d.destroy(),i.value=null},t.destroyDelay):(d.destroy(),i.value=null))},c=d=>{d.update(t.updateMode)};return o.onMounted(a),o.onUnmounted(l),o.watch([()=>t.options,()=>t.data],(d,u)=>{let[h,f]=d,[m,g]=u;const p=o.toRaw(i.value);if(!p)return;let _=!1;if(h){const y=Ci(h),C=Ci(m);y&&y!==C&&(PM(p,y),_=!0)}if(f){const y=Ci(f.labels),C=Ci(g.labels),b=Ci(f.datasets),S=Ci(g.datasets);y!==C&&(Fm(p.config.data,y),_=!0),b&&b!==S&&(Im(p.config.data,b,t.datasetIdKey),_=!0)}_&&o.nextTick(()=>{c(p)})},{deep:!0}),()=>o.h("canvas",{role:"img",ariaLabel:t.ariaLabel,ariaDescribedby:t.ariaDescribedby,ref:s},[o.h("p",{},[r.default?r.default():""])])}});function VM(t,e){return Bo.register(e),o.defineComponent({props:Rm,setup(n,r){let{expose:s}=r;const i=o.shallowRef(null),a=l=>{i.value=l==null?void 0:l.chart};return s({chart:i}),()=>o.h(NM,EM({ref:a},{type:t,...n}))}})}const zm=VM("line",tl),BM={class:"chart-container"},Lu={__name:"LineChart",props:{data:{type:Array,required:!0},dataType:{type:String,required:!0},ticksCallback:{type:Function,default:t=>t},borderColor:{type:String,default:"#007AFF"},gradient:{type:Object,default:{height:450,startColor:"rgba(0, 122, 255, 0.1)",endColor:"rgba(0, 122, 255, 0)"}}},setup(t){Bo.register(hl,ml,Ao,_r,oM,ym);const e=t;let n=o.ref(!1);const r=u=>{const h=new Set,f=[];let m=[];switch(e.dataType){case"balanceChartData":m=u.length!==0?u.map(p=>(h.add(p.date),p.balance)):[0,0];break;case"performanceChartData":m=u.length!==0?u.map(p=>(h.add(p.date),p.pnl/p.pnl_to_deposit*100)):[0,0];break}f.push({data:m});const g=Array.from(h);return g.length===1?(g.push(...g),f.forEach(p=>{p.data.push(...p.data)})):g.length===0&&(n.value=!0,g.push(0,0)),{labels:g,datasets:f}},s=o.computed(()=>r(e.data)),i=u=>{const f=u.chart.ctx.createLinearGradient(0,0,0,e.gradient.height);return f.addColorStop(0,e.gradient.startColor),f.addColorStop(1,e.gradient.endColor),f},a=(u,h)=>{let f=document.querySelector(`#${u}-${e.dataType}`);return f||(f=document.createElement("div"),f.classList.add(u),f.setAttribute("id",`${u}-${e.dataType}`),h.canvas.parentNode.appendChild(f)),f},l=u=>{if(!n.value){const{chart:h,tooltip:f}=u,m=a("chart-tooltip",h);if(f.opacity===0){m.style.opacity="0";return}if(f.body){const S=f.title||[],M=f.body.map(v=>v.lines),T=document.createElement("div");for(T.classList.add("chart-tooltip-middle"),T.innerHTML=`<div class="chart-tooltip-content">
|
|
35
35
|
${e.dataType==="balanceChartData"?`$${eh(M[0])}`:`${eh(M[0])}%`}
|
|
36
|
-
<span> | ${th(S[0])}, ${X6(S[0])}</span></div>`;m.firstChild;)m.firstChild.remove();m.appendChild(T)}const{offsetLeft:g,offsetTop:p,clientWidth:_}=h.canvas;let y=g+f.caretX;const C=p+f.caretY,b=m.clientWidth;y+b>_&&(y-=b),m.style.opacity="1",m.style.left=y+"px",m.style.top=C+"px"}},c=u=>{const{chart:h}=u,f=a("chart-line",h),m=h.chartArea;h.canvas.addEventListener("mousemove",function(g){const p=h.canvas.getBoundingClientRect(),_=g.clientX-p.left,y=g.clientY-p.top;_>=m.left&&_<=m.right&&y>=m.top&&y<=m.bottom?(f.style.left=_+"px",f.style.top=m.top+"px",f.style.height=m.bottom-m.top+"px",f.style.display="flex"):f.style.display="none"}),h.canvas.addEventListener("mouseout",function(){f.style.display="none"})},d=o.computed(()=>({responsive:!0,maintainAspectRatio:!1,animation:{duration:1500},scales:{x:{ticks:{display:!n.value,callback:function(u){return th(this.getLabelForValue(u)).slice(0,3)},color:"#8E8E93",font:{size:14,weight:400,family:"'SF Pro Display', sans-serif"},padding:15,align:"center"},grid:{display:!1},border:{color:"#EDEDED"}},y:{ticks:{display:!n.value,callback:function(u){return e.ticksCallback(u)},color:"#8E8E93",font:{size:14,weight:400,family:"'SF Pro Display', sans-serif"},padding:15},grid:{color:"#EDEDED",drawTicks:!1},border:{display:!1,dash:[4,4],dashOffset:1}}},plugins:{tooltip:{enabled:!1,position:"nearest",external:l},legend:!1},elements:{line:{backgroundColor:u=>i(u),tension:.3,borderWidth:2,borderColor:e.borderColor,fill:"start",spanGaps:!0},point:{pointStyle:"circle",pointRadius:1,pointHoverRadius:8,pointBackgroundColor:e.borderColor,pointBorderWidth:0,pointHoverBorderWidth:3,pointBorderColor:"#fff",pointHoverBorderColor:"#fff",pointHitRadius:50}},onHover:c}));return(u,h)=>(o.openBlock(),o.createElementBlock("div",BM,[o.createVNode(o.unref(zm),{data:s.value,options:d.value},null,8,["data","options"])]))}},Hm={__name:"SimpleLineChart",props:{data:{type:Array,required:!0},borderColor:{type:String,default:"#56B683"},gradient:{type:Object,default:{height:200,startColor:"rgba(86, 182, 131, 0.1)",endColor:"rgba(86, 182, 131, 0)"}}},setup(t){Bo.register(hl,ml,Ao,_r,ym);const e=t,n=a=>{const l=new Set,c=[],d=a.map(h=>(l.add(h.date),h.balance));return c.push({data:d}),{labels:Array.from(l),datasets:c}},r=o.computed(()=>n(e.data)),s=a=>{const c=a.chart.ctx.createLinearGradient(0,0,0,e.gradient.height);return c.addColorStop(0,e.gradient.startColor),c.addColorStop(1,e.gradient.endColor),c},i=o.ref({responsive:!0,maintainAspectRatio:!1,animation:{duration:1500},interaction:{mode:"index",intersect:!1},scales:{x:{display:!1},y:{display:!1}},plugins:{tooltip:!1,legend:!1},elements:{line:{backgroundColor:a=>s(a),tension:.3,borderWidth:2,borderColor:e.borderColor,fill:"start",spanGaps:!0},point:{pointStyle:!1}}});return(a,l)=>(o.openBlock(),o.createBlock(o.unref(zm),{data:r.value,options:i.value},null,8,["data","options"]))}},AM=t=>(o.pushScopeId("data-v-0fba0097"),t=t(),o.popScopeId(),t),RM={class:"account-balance-widget"},FM={class:"account-balance-widget__top"},IM={class:"account-balance-widget__title-wrapper"},zM=AM(()=>o.createElementVNode("div",{class:"account-balance-widget__title"},"Account Balance",-1)),HM=De({__name:"AccountBalanceWidget",props:{balanceChartData:{type:Array,default:[]},isShare:{type:Boolean,default:!1}},setup(t){const e=o.ref("week"),n=r=>r>=1e3||r<=-1e3?Vt(r/1e3,2)+"k":Vt(r,2);return(r,s)=>(o.openBlock(),o.createElementBlock("div",RM,[o.createElementVNode("div",FM,[o.createElementVNode("div",IM,[zM,o.createVNode(o.unref(fn),{alternative:""},{default:o.withCtx(()=>[o.createTextVNode("Reflects your deposit growth over the previous date. One of the most reliable indicator of profit for a trader. ")]),_:1})]),t.isShare?o.createCommentVNode("",!0):(o.openBlock(),o.createBlock(o.unref(Ys),{key:0,modelValue:e.value,"onUpdate:modelValue":s[0]||(s[0]=i=>e.value=i),onOnChange:s[1]||(s[1]=i=>r.$emit("onChange",e.value))},null,8,["modelValue"]))]),o.createVNode(o.unref(Lu),{data:t.balanceChartData,"data-type":"balanceChartData","ticks-callback":n},null,8,["data"])]))}},[["__scopeId","data-v-0fba0097"]]),Nu=t=>(o.pushScopeId("data-v-bea459d0"),t=t(),o.popScopeId(),t),YM={class:"balance-widget"},WM={class:"balance-part"},jM={class:"balance-part__top"},ZM={class:"balance-part__title-wrapper"},UM=Nu(()=>o.createElementVNode("div",{class:"balance-part__title"},"Balance",-1)),qM={class:"balance-part__content"},GM={class:"balance-part__content__wrapper"},KM={class:"balance-part__content__count"},XM={class:"balance-part__content__bitcoin"},QM={key:0,class:"devider"},JM={key:1,class:"personal-target-part"},ev={class:"personal-target-part__top"},tv={class:"personal-target-part__title-wrapper"},nv=Nu(()=>o.createElementVNode("div",{class:"personal-target-part__title"},"Personal target",-1)),rv=Nu(()=>o.createElementVNode("br",null,null,-1)),sv={class:"personal-target-part__content"},iv={class:"personal-target-part__content__current"},ov={class:"personal-target-part__content__from"},av=De({__name:"BalanceWidget",props:{BTC:{type:Number,default:0},USDT:{type:Number,default:0},delta:{type:Number,default:0},balanceChartData:{type:Array,default:[]},currentProfit:{type:Number,default:0},profit:{type:Number,default:0},drawdown:{type:Number,default:0},isPercentage:Boolean,isShare:{type:Boolean,default:!1}},emits:["switchModal"],setup(t,{emit:e}){const n=e,r=t,s=o.ref(!1),i=o.computed(()=>s.value?"****":r.BTC),a=o.computed(()=>s.value?"****":r.USDT),l=()=>{s.value=!s.value};return(c,d)=>(o.openBlock(),o.createElementBlock("div",YM,[o.createElementVNode("div",WM,[o.createElementVNode("div",jM,[o.createElementVNode("div",ZM,[UM,o.createVNode(o.unref(fn),{alternative:""},{default:o.withCtx(()=>[o.createTextVNode("Reflects your deposit size in US Dollars and BTC equivalent and growth over the previous date. One of the most reliable indicator of profit for a trader.")]),_:1})]),t.isShare?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock("div",{key:0,class:"balance-part__visibility-switcher",onClick:l},[o.withDirectives(o.createVNode(o.unref(Ve),{icon:"eye"},null,512),[[o.vShow,s.value]]),o.withDirectives(o.createVNode(o.unref(Ve),{icon:"eye-slash"},null,512),[[o.vShow,!s.value]])]))]),o.createElementVNode("div",qM,[o.createElementVNode("div",GM,[o.createElementVNode("div",KM,o.toDisplayString(o.unref(ln)(a.value)),1),t.delta?(o.openBlock(),o.createBlock(o.unref(Yl),{key:0,"is-hidden":s.value,percentage:"",delta:t.delta},null,8,["is-hidden","delta"])):o.createCommentVNode("",!0)]),o.createElementVNode("div",XM,"= "+o.toDisplayString(i.value)+" BTC",1)]),o.createVNode(o.unref(Hm),{class:"balance-part__chart",data:t.balanceChartData},null,8,["data"])]),t.isShare?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock("div",QM)),t.isShare?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock("div",JM,[o.createElementVNode("div",ev,[o.createElementVNode("div",tv,[nv,o.createVNode(o.unref(fn),{alternative:""},{default:o.withCtx(()=>[o.createTextVNode(" This widget allows you to set a personal profit goal expressed in $ for a certain period "),rv,o.createTextVNode(" Pay attention: in the widget, we calculate Net PNL excluding entry and exit commissions, as well as funding ")]),_:1})]),o.createElementVNode("div",{class:"balance-part__modal-switcher",onClick:d[0]||(d[0]=u=>n("switchModal"))},[o.createVNode(o.unref(Ve),{icon:"settings"})])]),o.createElementVNode("div",sv,[o.createElementVNode("div",iv,o.toDisplayString(o.unref(ln)(t.currentProfit,{isPercentage:t.isPercentage,isFixed:!0})),1),o.createElementVNode("div",ov,"/ "+o.toDisplayString(o.unref(ln)(t.profit,{isPercentage:t.isPercentage,isFixed:!0})),1)]),o.createVNode(o.unref(Yp),{"current-profit":t.currentProfit,drawdown:t.drawdown,profit:t.profit,"is-percentage":t.isPercentage},null,8,["current-profit","drawdown","profit","is-percentage"])]))]))}},[["__scopeId","data-v-bea459d0"]]),Io=t=>(o.pushScopeId("data-v-bd464497"),t=t(),o.popScopeId(),t),lv={class:"calendar-widget"},cv={class:"calendar-widget__calendar"},dv={class:"calendar-widget__top"},uv={class:"calendar-widget__title-wrapper"},hv=Io(()=>o.createElementVNode("div",{class:"calendar-widget__title"},"Calendar",-1)),fv=Io(()=>o.createElementVNode("br",null,null,-1)),mv={class:"stat-calendar"},pv={class:"stat-calendar__week-days"},gv={key:0,class:"stat-calendar__row-wrapper"},_v={class:"stat-calendar__row"},yv=["onClick"],wv=Io(()=>o.createElementVNode("div",{class:"calendar-widget__divider"},null,-1)),bv={key:0,class:"calendar-widget__day"},kv={class:"calendar-widget__day__title"},Cv={class:"calendar-widget__day__content"},xv={class:"calendar-widget__point"},Mv={class:"calendar-widget__point__title"},vv=Io(()=>o.createElementVNode("div",{class:"calendar-widget__point__line"},null,-1)),Sv={class:"calendar-widget__day__trades"},Tv={class:"calendar-widget__point"},Dv={class:"calendar-widget__point__title"},Ov=Io(()=>o.createElementVNode("div",{class:"calendar-widget__point__line"},null,-1)),Ev=De({__name:"CalendarWidget",props:{rows:Array,dailyStatData:Object,currentDate:Date,calendarPointsTop:Array,calendarPointsBottom:Array,isCurrentDate:Function,isCurrentDay:Function},emits:["setNewDate","chooseMonth"],setup(t,{emit:e}){const n=["Su","Mo","Tu","We","Th","Fr","Sa"],r=o.ref(null),s=o.ref(null),i=e,a=l=>{r.value=l.year,s.value=l.month,i("chooseMonth",l)};return o.nextTick(()=>{const l=new Date;r.value=l.getFullYear(),s.value=l.getMonth()}),(l,c)=>{var d,u;return o.openBlock(),o.createElementBlock("div",lv,[o.createElementVNode("div",cv,[o.createElementVNode("div",dv,[o.createElementVNode("div",uv,[hv,o.createVNode(o.unref(fn),{alternative:""},{default:o.withCtx(()=>[o.createTextVNode("Displays profitable days on green, losing days in red and trading days without significant profit or loss in blue. Also when you click on a specific date, more detailed information about trading day is displayed. "),fv,o.createTextVNode("Pay attention: in the widget, we calculate Net PNL excluding entry and exit commissions, as well as funding ")]),_:1})]),t.currentDate?(o.openBlock(),o.createBlock(o.unref(Hp),{key:0,"current-date":t.currentDate,onOnChange:a,year:r.value,"onUpdate:year":c[0]||(c[0]=h=>r.value=h),month:s.value,"onUpdate:month":c[1]||(c[1]=h=>s.value=h)},null,8,["current-date","year","month"])):o.createCommentVNode("",!0)]),o.createElementVNode("div",mv,[o.createElementVNode("div",pv,[(o.openBlock(),o.createElementBlock(o.Fragment,null,o.renderList(n,(h,f)=>o.createElementVNode("div",{class:o.normalizeClass(["stat-calendar__week-day",{"-current":t.isCurrentDay(f)}])},o.toDisplayString(h),3)),64))]),t.rows?(o.openBlock(),o.createElementBlock("div",gv,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(t.rows,h=>(o.openBlock(),o.createElementBlock("div",_v,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(h,f=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(["stat-calendar__day",{"-empty":!f.date,"-current":t.isCurrentDate(f.date),"-positive":f.win,"-negative":f.win===!1}]),onClick:m=>i("setNewDate",f.date)},o.toDisplayString(f.date?f.date:""),11,yv))),256))]))),256))])):o.createCommentVNode("",!0)])]),wv,t.dailyStatData&&!t.dailyStatData.isNull?(o.openBlock(),o.createElementBlock("div",bv,[o.createElementVNode("div",kv,o.toDisplayString(t.currentDate.getDate()+" "+t.currentDate.toLocaleString("en-us",{month:"long"})),1),o.createElementVNode("div",Cv,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(t.calendarPointsTop,h=>(o.openBlock(),o.createElementBlock("div",xv,[o.createElementVNode("div",Mv,o.toDisplayString(h.title),1),vv,o.createElementVNode("div",{class:o.normalizeClass(["calendar-widget__point__value",h.class?h.class:""])},o.toDisplayString(h.value),3)]))),256)),o.createVNode(o.unref(V0),{long:(d=t.dailyStatData)==null?void 0:d.long_count,short:(u=t.dailyStatData)==null?void 0:u.short_count},null,8,["long","short"]),o.createElementVNode("div",Sv,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(t.calendarPointsBottom,h=>(o.openBlock(),o.createElementBlock("div",Tv,[o.createElementVNode("div",Dv,o.toDisplayString(h.title),1),Ov,o.createVNode(o.unref(Yl),{"is-positive":h.isPositive,"is-negative":h.isNegative,delta:h.value},null,8,["is-positive","is-negative","delta"])]))),256))])])])):(o.openBlock(),o.createBlock(o.unref(qd),{key:1,class:"-empty"}))])}}},[["__scopeId","data-v-bd464497"]]),wl=t=>(o.pushScopeId("data-v-5fe5d142"),t=t(),o.popScopeId(),t),$v={class:"commission-widget"},Pv={class:"commission-widget__content"},Lv={class:"commission-widget__top"},Nv={class:"commission-widget__title-wrapper"},Vv=wl(()=>o.createElementVNode("div",{class:"commission-widget__title"},"Commissions and Fees",-1)),Bv=wl(()=>o.createElementVNode("br",null,null,-1)),Av={class:"commission-widget__info"},Rv={class:"commission-widget__total-wrapper"},Fv=wl(()=>o.createElementVNode("div",{class:"commission-widget__total-wrapper__title"},"Total",-1)),Iv={class:"commission-widget__total-wrapper__total"},zv={class:"commission-widget__total-wrapper__value"},Hv={class:"commission-widget__points"},Yv={class:"commission-widget__point"},Wv={class:"commission-widget__point__title"},jv=wl(()=>o.createElementVNode("div",{class:"commission-widget__point__line"},null,-1)),Zv=De({__name:"CommissionsFeesWidget",props:{commission:Number,commissionPoints:Array},emits:["onChange"],setup(t,{emit:e}){const n=o.ref("week"),r=e;return(s,i)=>(o.openBlock(),o.createElementBlock("div",$v,[o.createElementVNode("div",Pv,[o.createElementVNode("div",Lv,[o.createElementVNode("div",Nv,[Vv,o.createVNode(o.unref(fn),{alternative:""},{default:o.withCtx(()=>[o.createTextVNode("The amount of total commissions and fees for the selected previous period including the current date. This widget also shows commission to profit ratio in $/% and average amount of fees per trade."),Bv,o.createTextVNode("Pay attention: in the widget, we calculate Net PNL excluding entry and exit commissions, as well as funding ")]),_:1})]),o.createVNode(o.unref(Ys),{modelValue:n.value,"onUpdate:modelValue":i[0]||(i[0]=a=>n.value=a),onOnChange:i[1]||(i[1]=a=>r("onChange",n.value))},null,8,["modelValue"])]),o.createElementVNode("div",Av,[o.createElementVNode("div",Rv,[Fv,o.createElementVNode("div",Iv,[o.createElementVNode("div",zv," $"+o.toDisplayString(o.unref(Vt)(t.commission)),1)])]),o.createElementVNode("div",Hv,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(t.commissionPoints,(a,l)=>(o.openBlock(),o.createElementBlock("div",Yv,[o.createElementVNode("div",Wv,o.toDisplayString(a.title),1),jv,o.createElementVNode("div",{class:o.normalizeClass(["commission-widget__point__value",a.class?a.class:""])},o.toDisplayString(a.value),3)]))),256))])])])]))}},[["__scopeId","data-v-5fe5d142"]]),Ym=t=>(o.pushScopeId("data-v-71fad3e1"),t=t(),o.popScopeId(),t),Uv={class:"performance-widget"},qv={class:"performance-widget__top"},Gv={class:"performance-widget__title-wrapper"},Kv=Ym(()=>o.createElementVNode("div",{class:"performance-widget__title"},"Performance (cumulative)",-1)),Xv=Ym(()=>o.createElementVNode("br",null,null,-1)),Qv=De({__name:"PerformanceWidget",props:{performanceChartData:{type:Array,default:[]},isShare:{type:Boolean,default:!1}},setup(t){const e=o.ref("week"),n=r=>Vt(r,2)+"%";return(r,s)=>(o.openBlock(),o.createElementBlock("div",Uv,[o.createElementVNode("div",qv,[o.createElementVNode("div",Gv,[Kv,o.createVNode(o.unref(fn),{alternative:""},{default:o.withCtx(()=>[o.createTextVNode("The amount of profit for the selected previous period including the current date. This widget shows the growth or loss of the deposit in %. The widget is available as a line graph."),Xv,o.createTextVNode(" Pay attention: in the widget, we calculate Net PNL excluding entry and exit commissions, as well as funding ")]),_:1})]),t.isShare?o.createCommentVNode("",!0):(o.openBlock(),o.createBlock(o.unref(Ys),{key:0,modelValue:e.value,"onUpdate:modelValue":s[0]||(s[0]=i=>e.value=i),onOnChange:s[1]||(s[1]=i=>r.$emit("onChange",e.value))},null,8,["modelValue"]))]),o.createVNode(o.unref(Lu),{data:t.performanceChartData,"data-type":"performanceChartData","ticks-callback":n},null,8,["data"])]))}},[["__scopeId","data-v-71fad3e1"]]),bl=t=>(o.pushScopeId("data-v-c52bb3a2"),t=t(),o.popScopeId(),t),Jv={class:"return-widget"},eS={class:"return-widget__content"},tS={class:"return-widget__top"},nS={class:"return-widget__title-wrapper"},rS=bl(()=>o.createElementVNode("div",{class:"return-widget__title"},"Return",-1)),sS=bl(()=>o.createElementVNode("br",null,null,-1)),iS={class:"return-widget__info"},oS={class:"return-widget__total-wrapper"},aS=bl(()=>o.createElementVNode("div",{class:"return-widget__total-wrapper__title"},"Total",-1)),lS={class:"return-widget__total-wrapper__total"},cS={class:"return-widget__points"},dS={class:"return-widget__point"},uS={class:"return-widget__point__title"},hS=bl(()=>o.createElementVNode("div",{class:"return-widget__point__line"},null,-1)),fS=["innerHTML"],mS=De({__name:"ReturnWidget",props:{returnData:Object,isShare:{type:Boolean,default:!1}},emits:["onChange"],setup(t,{emit:e}){const n=o.ref("week"),r=e,s=t,i=o.computed(()=>s.returnData?s.returnData.profit_factor:0),a=o.computed(()=>s.returnData?s.returnData.return_period:0),l=o.computed(()=>[{title:"Average return per trade",value:c.value||0,options:{isPlus:!0,isFixed:!0},class:c.value>=0?"-win":"-loss"},{title:"Daily return",value:d.value||0,options:{isPlus:!0,isFixed:!0},class:d.value>=0?"-win":"-loss"},{title:"Return on winners",value:u.value||0},{title:"Return on losers",value:h.value||0}]),c=o.computed(()=>s.returnData&&s.returnData.avarage_total_return),d=o.computed(()=>s.returnData&&s.returnData.daily),u=o.computed(()=>s.returnData&&s.returnData.win),h=o.computed(()=>s.returnData&&s.returnData.lose),f=o.computed(()=>s.returnData&&s.returnData.period_balance_change_rate),m=o.computed(()=>a.value>0),g=o.computed(()=>a.value<0),p=o.computed(()=>i.value>1?"-positive":"-negative"),_=o.computed(()=>i.value>0?`Your profit factor is ${Vt(i.value,2)}. <br /> You earn ${ln(i.value)} on every $1 loss.`:`Your profit factor is ${Vt(i.value,2)}. <br/> You loss ${ln(Math.abs(i.value))} on every $1 earn. `);return(y,C)=>(o.openBlock(),o.createElementBlock("div",Jv,[o.createElementVNode("div",eS,[o.createElementVNode("div",tS,[o.createElementVNode("div",nS,[rS,o.createVNode(o.unref(fn),{alternative:""},{default:o.withCtx(()=>[o.createTextVNode("The amount of profit in $ and % for the selected previous period including the current date. This widget also shows the amount of profit and loss separately."),sS,o.createTextVNode("Pay attention: in the widget, we calculate Net PNL excluding entry and exit commissions, as well as funding ")]),_:1})]),t.isShare?o.createCommentVNode("",!0):(o.openBlock(),o.createBlock(o.unref(Ys),{key:0,modelValue:n.value,"onUpdate:modelValue":C[0]||(C[0]=b=>n.value=b),onOnChange:C[1]||(C[1]=b=>r("onChange",n.value))},null,8,["modelValue"]))]),o.createElementVNode("div",iS,[o.createElementVNode("div",oS,[aS,o.createElementVNode("div",lS,[o.createElementVNode("div",{class:o.normalizeClass(["return-widget__total-wrapper__value",{"-positive":m.value,"-negative":g.value}])},o.toDisplayString(o.unref(ln)(a.value,{isPlus:!0,isFixed:!0})),3),f.value?(o.openBlock(),o.createBlock(o.unref(Yl),{key:0,percentage:"",delta:f.value},null,8,["delta"])):o.createCommentVNode("",!0)])]),o.createElementVNode("div",cS,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(l.value,b=>(o.openBlock(),o.createElementBlock("div",dS,[o.createElementVNode("div",uS,o.toDisplayString(b.title),1),hS,o.createElementVNode("div",{class:o.normalizeClass(["return-widget__point__value",b.class?b.class:""])},o.toDisplayString(o.unref(ln)(b.value,b.options)),3)]))),256))])])]),i.value?(o.openBlock(),o.createElementBlock("div",{key:0,class:o.normalizeClass(["return-widget__profit",p.value])},[o.createVNode(o.unref(Ve),{icon:"tip",class:"return-widget__profit__icon"}),o.createElementVNode("div",{class:"return-widget__profit__text",innerHTML:_.value},null,8,fS)],2)):o.createCommentVNode("",!0)]))}},[["__scopeId","data-v-c52bb3a2"]]),Vu=t=>(o.pushScopeId("data-v-69c2a2fa"),t=t(),o.popScopeId(),t),pS={class:"top-positions-widget"},gS={class:"top-positions-widget__top"},_S={class:"top-positions-widget__title-wrapper"},yS=Vu(()=>o.createElementVNode("div",{class:"top-positions-widget__title"},"Top-3 Positions",-1)),wS=Vu(()=>o.createElementVNode("br",null,null,-1)),bS={key:0,class:"top-positions-widget__returns"},kS={class:"top-positions-widget__return"},CS={class:"top-positions-widget__return__left"},xS=Vu(()=>o.createElementVNode("div",{class:"top-positions-widget__return__line"},null,-1)),MS={class:"top-positions-widget__return__pair"},vS={class:"top-positions-widget__return__right"},SS={class:"top-positions-widget__return__pnl"},TS=De({__name:"TopPositionsWidget",props:{topPositions:{type:Array,default:[]}},emits:["onChange"],setup(t,{emit:e}){const n=o.ref("week"),r=e;return(s,i)=>(o.openBlock(),o.createElementBlock("div",pS,[o.createElementVNode("div",gS,[o.createElementVNode("div",_S,[yS,o.createVNode(o.unref(fn),{alternative:""},{default:o.withCtx(()=>[o.createTextVNode("Displays 3 most profitable trades of the selected period. You can also see the trading pair and trade profit to balance ratio. "),wS,o.createTextVNode("Pay attention: in the widget, we calculate Net PNL excluding entry and exit commissions, as well as funding ")]),_:1})]),o.createVNode(o.unref(Ys),{modelValue:n.value,"onUpdate:modelValue":i[0]||(i[0]=a=>n.value=a),onOnChange:i[1]||(i[1]=a=>r("onChange",n.value))},null,8,["modelValue"])]),t.topPositions&&t.topPositions.length?(o.openBlock(),o.createElementBlock("div",bS,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(t.topPositions,a=>(o.openBlock(),o.createElementBlock("div",kS,[o.createElementVNode("div",CS,[xS,o.createElementVNode("div",MS,o.toDisplayString(o.unref(Q6)(a.pair)),1)]),o.createElementVNode("div",vS,[o.createElementVNode("div",SS,o.toDisplayString(o.unref(ln)(a.pnl,{isFixed:!0,isPlus:!0})),1),o.createElementVNode("div",{class:o.normalizeClass(["top-positions-widget__return__roi",a.roi<0?"-negative":"-positive"])},[o.createVNode(o.unref(Ve),{icon:"bxs_up-arrow"}),o.createElementVNode("span",null,o.toDisplayString(o.unref(ln)(a.roi,{isPercentage:!0,isFixed:!0})),1)],2)])]))),256))])):(o.openBlock(),o.createBlock(o.unref(qd),{key:1,title:"No more pair",subtitle:"No data available for the specified period",icon:"coins-add"}))]))}},[["__scopeId","data-v-69c2a2fa"]]),Bu=t=>(o.pushScopeId("data-v-7b67b5c8"),t=t(),o.popScopeId(),t),DS={class:"trade-widget"},OS={class:"trade-widget__content"},ES={class:"trade-widget__top"},$S={class:"trade-widget__title-wrapper"},PS=Bu(()=>o.createElementVNode("div",{class:"trade-widget__title"},"Trades Performance",-1)),LS={class:"trade-widget__info"},NS={class:"trade-widget__total-wrapper"},VS=Bu(()=>o.createElementVNode("div",{class:"trade-widget__total-wrapper__title"},"Total",-1)),BS={class:"trade-widget__total-wrapper__total"},AS={class:"trade-widget__total-wrapper__value"},RS={class:"trade-widget__points"},FS={class:"trade-widget__point"},IS={class:"trade-widget__point__title"},zS=Bu(()=>o.createElementVNode("div",{class:"trade-widget__point__line"},null,-1)),HS=De({__name:"TradePerformanceWidget",props:{totalTrades:Number,tradePoints:Array},emits:["onChange"],setup(t,{emit:e}){const n=o.ref("week"),r=e;return(s,i)=>(o.openBlock(),o.createElementBlock("div",DS,[o.createElementVNode("div",OS,[o.createElementVNode("div",ES,[o.createElementVNode("div",$S,[PS,o.createVNode(o.unref(fn),{alternative:""},{default:o.withCtx(()=>[o.createTextVNode("This widget displays number of total winning & trades. Also it indicates the average number of trades for selected period. ")]),_:1})]),o.createVNode(o.unref(Ys),{modelValue:n.value,"onUpdate:modelValue":i[0]||(i[0]=a=>n.value=a),onOnChange:i[1]||(i[1]=a=>r("onChange",n.value))},null,8,["modelValue"])]),o.createElementVNode("div",LS,[o.createElementVNode("div",NS,[VS,o.createElementVNode("div",BS,[o.createElementVNode("div",AS,o.toDisplayString(t.totalTrades),1)])]),o.createElementVNode("div",RS,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(t.tradePoints,a=>(o.openBlock(),o.createElementBlock("div",FS,[o.createElementVNode("div",IS,o.toDisplayString(a.title),1),zS,o.createElementVNode("div",{class:o.normalizeClass(["trade-widget__point__value",a.class?a.class:""])},o.toDisplayString(a.value),3)]))),256))])])])]))}},[["__scopeId","data-v-7b67b5c8"]]),kl=t=>(o.pushScopeId("data-v-7a9040de"),t=t(),o.popScopeId(),t),YS={class:"winrate-widget"},WS={class:"winrate-widget__winrate"},jS={class:"winrate-widget__title-wrapper"},ZS=kl(()=>o.createElementVNode("div",{class:"winrate-widget__title"},"Winrate",-1)),US=kl(()=>o.createElementVNode("br",null,null,-1)),qS={class:"winrate-widget__chart"},GS={class:"winrate-widget__data"},KS={class:"winrate-widget__data_value"},XS=kl(()=>o.createElementVNode("div",{class:"winrate-widget__data_title"},"Winrate",-1)),QS={class:"winrate-widget__average-rr"},JS={class:"winrate-widget__title-wrapper"},eT=kl(()=>o.createElementVNode("div",{class:"winrate-widget__title"},"Average RR",-1)),tT=De({__name:"WinrateWidget",props:{winrate:{type:Number,default:0},minRR:{type:Number,default:0},averageRR:{type:Number,default:0},maxRR:{type:Number,default:0}},setup(t){return(e,n)=>(o.openBlock(),o.createElementBlock("div",YS,[o.createElementVNode("div",WS,[o.createElementVNode("div",jS,[ZS,o.createVNode(o.unref(fn),{alternative:""},{default:o.withCtx(()=>[o.createTextVNode("This widget displays the percentage of successful trades and the average RR. "),US,o.createTextVNode("Pay attention: in the widget, we calculate Net PNL excluding entry and exit commissions, as well as funding ")]),_:1})]),o.createElementVNode("div",qS,[o.renderSlot(e.$slots,"roundSlider",{},void 0,!0),o.createElementVNode("div",GS,[o.createElementVNode("div",KS,o.toDisplayString(o.unref(Vt)(t.winrate,2))+"%",1),XS])])]),o.createElementVNode("div",QS,[o.createElementVNode("div",JS,[eT,o.createVNode(o.unref(fn),{alternative:""},{default:o.withCtx(()=>[o.createTextVNode("The risk/reward ratio - marks the prospective reward a trader can earn for every dollar they risk on a trade. ")]),_:1})]),o.createVNode(o.unref(Wm),{avg:t.averageRR,min:t.minRR,max:t.maxRR},null,8,["avg","min","max"])])]))}},[["__scopeId","data-v-7a9040de"]]),nT=t=>(o.pushScopeId("data-v-2f6cbb5e"),t=t(),o.popScopeId(),t),rT={class:"average-rr-line-container"},sT={class:"average-rr-line"},iT={key:0,class:"average-rr-line__progress"},oT=[nT(()=>o.createElementVNode("div",{class:"average-rr-line__dot"},null,-1))],aT={class:"coefficients"},lT={class:"coefficients__value -min"},cT={class:"coefficients__value -avg"},dT={class:"coefficients__value -max"},Wm=De({__name:"AverageRRLine",props:{min:{type:Number,default:0},avg:{type:Number,default:0},max:{type:Number,default:0}},setup(t){return(e,n)=>(o.openBlock(),o.createElementBlock("div",rT,[o.createElementVNode("div",sT,[t.avg&&t.max?(o.openBlock(),o.createElementBlock("div",iT,oT)):o.createCommentVNode("",!0)]),o.createElementVNode("div",aT,[o.createElementVNode("div",lT,o.toDisplayString(t.min),1),o.createElementVNode("div",cT,o.toDisplayString(o.unref(Vt)(t.avg)),1),o.createElementVNode("div",dT,o.toDisplayString(o.unref(Vt)(t.max)),1)])]))}},[["__scopeId","data-v-2f6cbb5e"]]);//! moment.js
|
|
36
|
+
<span> | ${th(S[0])}, ${X6(S[0])}</span></div>`;m.firstChild;)m.firstChild.remove();m.appendChild(T)}const{offsetLeft:g,offsetTop:p,clientWidth:_}=h.canvas;let y=g+f.caretX;const C=p+f.caretY,b=m.clientWidth;y+b>_&&(y-=b),m.style.opacity="1",m.style.left=y+"px",m.style.top=C+"px"}},c=u=>{const{chart:h}=u,f=a("chart-line",h),m=h.chartArea;h.canvas.addEventListener("mousemove",function(g){const p=h.canvas.getBoundingClientRect(),_=g.clientX-p.left,y=g.clientY-p.top;_>=m.left&&_<=m.right&&y>=m.top&&y<=m.bottom?(f.style.left=_+"px",f.style.top=m.top+"px",f.style.height=m.bottom-m.top+"px",f.style.display="flex"):f.style.display="none"}),h.canvas.addEventListener("mouseout",function(){f.style.display="none"})},d=o.computed(()=>({responsive:!0,maintainAspectRatio:!1,animation:{duration:1500},scales:{x:{ticks:{display:!n.value,callback:function(u){return th(this.getLabelForValue(u)).slice(0,3)},color:"#8E8E93",font:{size:14,weight:400,family:"'SF Pro Display', sans-serif"},padding:15,align:"center"},grid:{display:!1},border:{color:"#EDEDED"}},y:{ticks:{display:!n.value,callback:function(u){return e.ticksCallback(u)},color:"#8E8E93",font:{size:14,weight:400,family:"'SF Pro Display', sans-serif"},padding:15},grid:{color:"#EDEDED",drawTicks:!1},border:{display:!1,dash:[4,4],dashOffset:1}}},plugins:{tooltip:{enabled:!1,position:"nearest",external:l},legend:!1},elements:{line:{backgroundColor:u=>i(u),tension:.3,borderWidth:2,borderColor:e.borderColor,fill:"start",spanGaps:!0},point:{pointStyle:"circle",pointRadius:1,pointHoverRadius:8,pointBackgroundColor:e.borderColor,pointBorderWidth:0,pointHoverBorderWidth:3,pointBorderColor:"#fff",pointHoverBorderColor:"#fff",pointHitRadius:50}},onHover:c}));return(u,h)=>(o.openBlock(),o.createElementBlock("div",BM,[o.createVNode(o.unref(zm),{data:s.value,options:d.value},null,8,["data","options"])]))}},Hm={__name:"SimpleLineChart",props:{data:{type:Array,required:!0},borderColor:{type:String,default:"#56B683"},gradient:{type:Object,default:{height:200,startColor:"rgba(86, 182, 131, 0.1)",endColor:"rgba(86, 182, 131, 0)"}}},setup(t){Bo.register(hl,ml,Ao,_r,ym);const e=t,n=a=>{const l=new Set,c=[],d=a.map(h=>(l.add(h.date),h.balance));return c.push({data:d}),{labels:Array.from(l),datasets:c}},r=o.computed(()=>n(e.data)),s=a=>{const c=a.chart.ctx.createLinearGradient(0,0,0,e.gradient.height);return c.addColorStop(0,e.gradient.startColor),c.addColorStop(1,e.gradient.endColor),c},i=o.ref({responsive:!0,maintainAspectRatio:!1,animation:{duration:1500},interaction:{mode:"index",intersect:!1},scales:{x:{display:!1},y:{display:!1}},plugins:{tooltip:!1,legend:!1},elements:{line:{backgroundColor:a=>s(a),tension:.3,borderWidth:4,borderColor:e.borderColor,fill:"start",spanGaps:!0},point:{pointStyle:!1}}});return(a,l)=>(o.openBlock(),o.createBlock(o.unref(zm),{data:r.value,options:i.value},null,8,["data","options"]))}},AM=t=>(o.pushScopeId("data-v-0fba0097"),t=t(),o.popScopeId(),t),RM={class:"account-balance-widget"},FM={class:"account-balance-widget__top"},IM={class:"account-balance-widget__title-wrapper"},zM=AM(()=>o.createElementVNode("div",{class:"account-balance-widget__title"},"Account Balance",-1)),HM=De({__name:"AccountBalanceWidget",props:{balanceChartData:{type:Array,default:[]},isShare:{type:Boolean,default:!1}},setup(t){const e=o.ref("week"),n=r=>r>=1e3||r<=-1e3?Vt(r/1e3,2)+"k":Vt(r,2);return(r,s)=>(o.openBlock(),o.createElementBlock("div",RM,[o.createElementVNode("div",FM,[o.createElementVNode("div",IM,[zM,o.createVNode(o.unref(fn),{alternative:""},{default:o.withCtx(()=>[o.createTextVNode("Reflects your deposit growth over the previous date. One of the most reliable indicator of profit for a trader. ")]),_:1})]),t.isShare?o.createCommentVNode("",!0):(o.openBlock(),o.createBlock(o.unref(Ys),{key:0,modelValue:e.value,"onUpdate:modelValue":s[0]||(s[0]=i=>e.value=i),onOnChange:s[1]||(s[1]=i=>r.$emit("onChange",e.value))},null,8,["modelValue"]))]),o.createVNode(o.unref(Lu),{data:t.balanceChartData,"data-type":"balanceChartData","ticks-callback":n},null,8,["data"])]))}},[["__scopeId","data-v-0fba0097"]]),Nu=t=>(o.pushScopeId("data-v-bea459d0"),t=t(),o.popScopeId(),t),YM={class:"balance-widget"},WM={class:"balance-part"},jM={class:"balance-part__top"},ZM={class:"balance-part__title-wrapper"},UM=Nu(()=>o.createElementVNode("div",{class:"balance-part__title"},"Balance",-1)),qM={class:"balance-part__content"},GM={class:"balance-part__content__wrapper"},KM={class:"balance-part__content__count"},XM={class:"balance-part__content__bitcoin"},QM={key:0,class:"devider"},JM={key:1,class:"personal-target-part"},ev={class:"personal-target-part__top"},tv={class:"personal-target-part__title-wrapper"},nv=Nu(()=>o.createElementVNode("div",{class:"personal-target-part__title"},"Personal target",-1)),rv=Nu(()=>o.createElementVNode("br",null,null,-1)),sv={class:"personal-target-part__content"},iv={class:"personal-target-part__content__current"},ov={class:"personal-target-part__content__from"},av=De({__name:"BalanceWidget",props:{BTC:{type:Number,default:0},USDT:{type:Number,default:0},delta:{type:Number,default:0},balanceChartData:{type:Array,default:[]},currentProfit:{type:Number,default:0},profit:{type:Number,default:0},drawdown:{type:Number,default:0},isPercentage:Boolean,isShare:{type:Boolean,default:!1}},emits:["switchModal"],setup(t,{emit:e}){const n=e,r=t,s=o.ref(!1),i=o.computed(()=>s.value?"****":r.BTC),a=o.computed(()=>s.value?"****":r.USDT),l=()=>{s.value=!s.value};return(c,d)=>(o.openBlock(),o.createElementBlock("div",YM,[o.createElementVNode("div",WM,[o.createElementVNode("div",jM,[o.createElementVNode("div",ZM,[UM,o.createVNode(o.unref(fn),{alternative:""},{default:o.withCtx(()=>[o.createTextVNode("Reflects your deposit size in US Dollars and BTC equivalent and growth over the previous date. One of the most reliable indicator of profit for a trader.")]),_:1})]),t.isShare?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock("div",{key:0,class:"balance-part__visibility-switcher",onClick:l},[o.withDirectives(o.createVNode(o.unref(Ve),{icon:"eye"},null,512),[[o.vShow,s.value]]),o.withDirectives(o.createVNode(o.unref(Ve),{icon:"eye-slash"},null,512),[[o.vShow,!s.value]])]))]),o.createElementVNode("div",qM,[o.createElementVNode("div",GM,[o.createElementVNode("div",KM,o.toDisplayString(o.unref(ln)(a.value)),1),t.delta?(o.openBlock(),o.createBlock(o.unref(Yl),{key:0,"is-hidden":s.value,percentage:"",delta:t.delta},null,8,["is-hidden","delta"])):o.createCommentVNode("",!0)]),o.createElementVNode("div",XM,"= "+o.toDisplayString(i.value)+" BTC",1)]),o.createVNode(o.unref(Hm),{class:"balance-part__chart",data:t.balanceChartData},null,8,["data"])]),t.isShare?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock("div",QM)),t.isShare?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock("div",JM,[o.createElementVNode("div",ev,[o.createElementVNode("div",tv,[nv,o.createVNode(o.unref(fn),{alternative:""},{default:o.withCtx(()=>[o.createTextVNode(" This widget allows you to set a personal profit goal expressed in $ for a certain period "),rv,o.createTextVNode(" Pay attention: in the widget, we calculate Net PNL excluding entry and exit commissions, as well as funding ")]),_:1})]),o.createElementVNode("div",{class:"balance-part__modal-switcher",onClick:d[0]||(d[0]=u=>n("switchModal"))},[o.createVNode(o.unref(Ve),{icon:"settings"})])]),o.createElementVNode("div",sv,[o.createElementVNode("div",iv,o.toDisplayString(o.unref(ln)(t.currentProfit,{isPercentage:t.isPercentage,isFixed:!0})),1),o.createElementVNode("div",ov,"/ "+o.toDisplayString(o.unref(ln)(t.profit,{isPercentage:t.isPercentage,isFixed:!0})),1)]),o.createVNode(o.unref(Yp),{"current-profit":t.currentProfit,drawdown:t.drawdown,profit:t.profit,"is-percentage":t.isPercentage},null,8,["current-profit","drawdown","profit","is-percentage"])]))]))}},[["__scopeId","data-v-bea459d0"]]),Io=t=>(o.pushScopeId("data-v-bd464497"),t=t(),o.popScopeId(),t),lv={class:"calendar-widget"},cv={class:"calendar-widget__calendar"},dv={class:"calendar-widget__top"},uv={class:"calendar-widget__title-wrapper"},hv=Io(()=>o.createElementVNode("div",{class:"calendar-widget__title"},"Calendar",-1)),fv=Io(()=>o.createElementVNode("br",null,null,-1)),mv={class:"stat-calendar"},pv={class:"stat-calendar__week-days"},gv={key:0,class:"stat-calendar__row-wrapper"},_v={class:"stat-calendar__row"},yv=["onClick"],wv=Io(()=>o.createElementVNode("div",{class:"calendar-widget__divider"},null,-1)),bv={key:0,class:"calendar-widget__day"},kv={class:"calendar-widget__day__title"},Cv={class:"calendar-widget__day__content"},xv={class:"calendar-widget__point"},Mv={class:"calendar-widget__point__title"},vv=Io(()=>o.createElementVNode("div",{class:"calendar-widget__point__line"},null,-1)),Sv={class:"calendar-widget__day__trades"},Tv={class:"calendar-widget__point"},Dv={class:"calendar-widget__point__title"},Ov=Io(()=>o.createElementVNode("div",{class:"calendar-widget__point__line"},null,-1)),Ev=De({__name:"CalendarWidget",props:{rows:Array,dailyStatData:Object,currentDate:Date,calendarPointsTop:Array,calendarPointsBottom:Array,isCurrentDate:Function,isCurrentDay:Function},emits:["setNewDate","chooseMonth"],setup(t,{emit:e}){const n=["Su","Mo","Tu","We","Th","Fr","Sa"],r=o.ref(null),s=o.ref(null),i=e,a=l=>{r.value=l.year,s.value=l.month,i("chooseMonth",l)};return o.nextTick(()=>{const l=new Date;r.value=l.getFullYear(),s.value=l.getMonth()}),(l,c)=>{var d,u;return o.openBlock(),o.createElementBlock("div",lv,[o.createElementVNode("div",cv,[o.createElementVNode("div",dv,[o.createElementVNode("div",uv,[hv,o.createVNode(o.unref(fn),{alternative:""},{default:o.withCtx(()=>[o.createTextVNode("Displays profitable days on green, losing days in red and trading days without significant profit or loss in blue. Also when you click on a specific date, more detailed information about trading day is displayed. "),fv,o.createTextVNode("Pay attention: in the widget, we calculate Net PNL excluding entry and exit commissions, as well as funding ")]),_:1})]),t.currentDate?(o.openBlock(),o.createBlock(o.unref(Hp),{key:0,"current-date":t.currentDate,onOnChange:a,year:r.value,"onUpdate:year":c[0]||(c[0]=h=>r.value=h),month:s.value,"onUpdate:month":c[1]||(c[1]=h=>s.value=h)},null,8,["current-date","year","month"])):o.createCommentVNode("",!0)]),o.createElementVNode("div",mv,[o.createElementVNode("div",pv,[(o.openBlock(),o.createElementBlock(o.Fragment,null,o.renderList(n,(h,f)=>o.createElementVNode("div",{class:o.normalizeClass(["stat-calendar__week-day",{"-current":t.isCurrentDay(f)}])},o.toDisplayString(h),3)),64))]),t.rows?(o.openBlock(),o.createElementBlock("div",gv,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(t.rows,h=>(o.openBlock(),o.createElementBlock("div",_v,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(h,f=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(["stat-calendar__day",{"-empty":!f.date,"-current":t.isCurrentDate(f.date),"-positive":f.win,"-negative":f.win===!1}]),onClick:m=>i("setNewDate",f.date)},o.toDisplayString(f.date?f.date:""),11,yv))),256))]))),256))])):o.createCommentVNode("",!0)])]),wv,t.dailyStatData&&!t.dailyStatData.isNull?(o.openBlock(),o.createElementBlock("div",bv,[o.createElementVNode("div",kv,o.toDisplayString(t.currentDate.getDate()+" "+t.currentDate.toLocaleString("en-us",{month:"long"})),1),o.createElementVNode("div",Cv,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(t.calendarPointsTop,h=>(o.openBlock(),o.createElementBlock("div",xv,[o.createElementVNode("div",Mv,o.toDisplayString(h.title),1),vv,o.createElementVNode("div",{class:o.normalizeClass(["calendar-widget__point__value",h.class?h.class:""])},o.toDisplayString(h.value),3)]))),256)),o.createVNode(o.unref(V0),{long:(d=t.dailyStatData)==null?void 0:d.long_count,short:(u=t.dailyStatData)==null?void 0:u.short_count},null,8,["long","short"]),o.createElementVNode("div",Sv,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(t.calendarPointsBottom,h=>(o.openBlock(),o.createElementBlock("div",Tv,[o.createElementVNode("div",Dv,o.toDisplayString(h.title),1),Ov,o.createVNode(o.unref(Yl),{"is-positive":h.isPositive,"is-negative":h.isNegative,delta:h.value},null,8,["is-positive","is-negative","delta"])]))),256))])])])):(o.openBlock(),o.createBlock(o.unref(qd),{key:1,class:"-empty"}))])}}},[["__scopeId","data-v-bd464497"]]),wl=t=>(o.pushScopeId("data-v-5fe5d142"),t=t(),o.popScopeId(),t),$v={class:"commission-widget"},Pv={class:"commission-widget__content"},Lv={class:"commission-widget__top"},Nv={class:"commission-widget__title-wrapper"},Vv=wl(()=>o.createElementVNode("div",{class:"commission-widget__title"},"Commissions and Fees",-1)),Bv=wl(()=>o.createElementVNode("br",null,null,-1)),Av={class:"commission-widget__info"},Rv={class:"commission-widget__total-wrapper"},Fv=wl(()=>o.createElementVNode("div",{class:"commission-widget__total-wrapper__title"},"Total",-1)),Iv={class:"commission-widget__total-wrapper__total"},zv={class:"commission-widget__total-wrapper__value"},Hv={class:"commission-widget__points"},Yv={class:"commission-widget__point"},Wv={class:"commission-widget__point__title"},jv=wl(()=>o.createElementVNode("div",{class:"commission-widget__point__line"},null,-1)),Zv=De({__name:"CommissionsFeesWidget",props:{commission:Number,commissionPoints:Array},emits:["onChange"],setup(t,{emit:e}){const n=o.ref("week"),r=e;return(s,i)=>(o.openBlock(),o.createElementBlock("div",$v,[o.createElementVNode("div",Pv,[o.createElementVNode("div",Lv,[o.createElementVNode("div",Nv,[Vv,o.createVNode(o.unref(fn),{alternative:""},{default:o.withCtx(()=>[o.createTextVNode("The amount of total commissions and fees for the selected previous period including the current date. This widget also shows commission to profit ratio in $/% and average amount of fees per trade."),Bv,o.createTextVNode("Pay attention: in the widget, we calculate Net PNL excluding entry and exit commissions, as well as funding ")]),_:1})]),o.createVNode(o.unref(Ys),{modelValue:n.value,"onUpdate:modelValue":i[0]||(i[0]=a=>n.value=a),onOnChange:i[1]||(i[1]=a=>r("onChange",n.value))},null,8,["modelValue"])]),o.createElementVNode("div",Av,[o.createElementVNode("div",Rv,[Fv,o.createElementVNode("div",Iv,[o.createElementVNode("div",zv," $"+o.toDisplayString(o.unref(Vt)(t.commission)),1)])]),o.createElementVNode("div",Hv,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(t.commissionPoints,(a,l)=>(o.openBlock(),o.createElementBlock("div",Yv,[o.createElementVNode("div",Wv,o.toDisplayString(a.title),1),jv,o.createElementVNode("div",{class:o.normalizeClass(["commission-widget__point__value",a.class?a.class:""])},o.toDisplayString(a.value),3)]))),256))])])])]))}},[["__scopeId","data-v-5fe5d142"]]),Ym=t=>(o.pushScopeId("data-v-71fad3e1"),t=t(),o.popScopeId(),t),Uv={class:"performance-widget"},qv={class:"performance-widget__top"},Gv={class:"performance-widget__title-wrapper"},Kv=Ym(()=>o.createElementVNode("div",{class:"performance-widget__title"},"Performance (cumulative)",-1)),Xv=Ym(()=>o.createElementVNode("br",null,null,-1)),Qv=De({__name:"PerformanceWidget",props:{performanceChartData:{type:Array,default:[]},isShare:{type:Boolean,default:!1}},setup(t){const e=o.ref("week"),n=r=>Vt(r,2)+"%";return(r,s)=>(o.openBlock(),o.createElementBlock("div",Uv,[o.createElementVNode("div",qv,[o.createElementVNode("div",Gv,[Kv,o.createVNode(o.unref(fn),{alternative:""},{default:o.withCtx(()=>[o.createTextVNode("The amount of profit for the selected previous period including the current date. This widget shows the growth or loss of the deposit in %. The widget is available as a line graph."),Xv,o.createTextVNode(" Pay attention: in the widget, we calculate Net PNL excluding entry and exit commissions, as well as funding ")]),_:1})]),t.isShare?o.createCommentVNode("",!0):(o.openBlock(),o.createBlock(o.unref(Ys),{key:0,modelValue:e.value,"onUpdate:modelValue":s[0]||(s[0]=i=>e.value=i),onOnChange:s[1]||(s[1]=i=>r.$emit("onChange",e.value))},null,8,["modelValue"]))]),o.createVNode(o.unref(Lu),{data:t.performanceChartData,"data-type":"performanceChartData","ticks-callback":n},null,8,["data"])]))}},[["__scopeId","data-v-71fad3e1"]]),bl=t=>(o.pushScopeId("data-v-c52bb3a2"),t=t(),o.popScopeId(),t),Jv={class:"return-widget"},eS={class:"return-widget__content"},tS={class:"return-widget__top"},nS={class:"return-widget__title-wrapper"},rS=bl(()=>o.createElementVNode("div",{class:"return-widget__title"},"Return",-1)),sS=bl(()=>o.createElementVNode("br",null,null,-1)),iS={class:"return-widget__info"},oS={class:"return-widget__total-wrapper"},aS=bl(()=>o.createElementVNode("div",{class:"return-widget__total-wrapper__title"},"Total",-1)),lS={class:"return-widget__total-wrapper__total"},cS={class:"return-widget__points"},dS={class:"return-widget__point"},uS={class:"return-widget__point__title"},hS=bl(()=>o.createElementVNode("div",{class:"return-widget__point__line"},null,-1)),fS=["innerHTML"],mS=De({__name:"ReturnWidget",props:{returnData:Object,isShare:{type:Boolean,default:!1}},emits:["onChange"],setup(t,{emit:e}){const n=o.ref("week"),r=e,s=t,i=o.computed(()=>s.returnData?s.returnData.profit_factor:0),a=o.computed(()=>s.returnData?s.returnData.return_period:0),l=o.computed(()=>[{title:"Average return per trade",value:c.value||0,options:{isPlus:!0,isFixed:!0},class:c.value>=0?"-win":"-loss"},{title:"Daily return",value:d.value||0,options:{isPlus:!0,isFixed:!0},class:d.value>=0?"-win":"-loss"},{title:"Return on winners",value:u.value||0},{title:"Return on losers",value:h.value||0}]),c=o.computed(()=>s.returnData&&s.returnData.avarage_total_return),d=o.computed(()=>s.returnData&&s.returnData.daily),u=o.computed(()=>s.returnData&&s.returnData.win),h=o.computed(()=>s.returnData&&s.returnData.lose),f=o.computed(()=>s.returnData&&s.returnData.period_balance_change_rate),m=o.computed(()=>a.value>0),g=o.computed(()=>a.value<0),p=o.computed(()=>i.value>1?"-positive":"-negative"),_=o.computed(()=>i.value>0?`Your profit factor is ${Vt(i.value,2)}. <br /> You earn ${ln(i.value)} on every $1 loss.`:`Your profit factor is ${Vt(i.value,2)}. <br/> You loss ${ln(Math.abs(i.value))} on every $1 earn. `);return(y,C)=>(o.openBlock(),o.createElementBlock("div",Jv,[o.createElementVNode("div",eS,[o.createElementVNode("div",tS,[o.createElementVNode("div",nS,[rS,o.createVNode(o.unref(fn),{alternative:""},{default:o.withCtx(()=>[o.createTextVNode("The amount of profit in $ and % for the selected previous period including the current date. This widget also shows the amount of profit and loss separately."),sS,o.createTextVNode("Pay attention: in the widget, we calculate Net PNL excluding entry and exit commissions, as well as funding ")]),_:1})]),t.isShare?o.createCommentVNode("",!0):(o.openBlock(),o.createBlock(o.unref(Ys),{key:0,modelValue:n.value,"onUpdate:modelValue":C[0]||(C[0]=b=>n.value=b),onOnChange:C[1]||(C[1]=b=>r("onChange",n.value))},null,8,["modelValue"]))]),o.createElementVNode("div",iS,[o.createElementVNode("div",oS,[aS,o.createElementVNode("div",lS,[o.createElementVNode("div",{class:o.normalizeClass(["return-widget__total-wrapper__value",{"-positive":m.value,"-negative":g.value}])},o.toDisplayString(o.unref(ln)(a.value,{isPlus:!0,isFixed:!0})),3),f.value?(o.openBlock(),o.createBlock(o.unref(Yl),{key:0,percentage:"",delta:f.value},null,8,["delta"])):o.createCommentVNode("",!0)])]),o.createElementVNode("div",cS,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(l.value,b=>(o.openBlock(),o.createElementBlock("div",dS,[o.createElementVNode("div",uS,o.toDisplayString(b.title),1),hS,o.createElementVNode("div",{class:o.normalizeClass(["return-widget__point__value",b.class?b.class:""])},o.toDisplayString(o.unref(ln)(b.value,b.options)),3)]))),256))])])]),i.value?(o.openBlock(),o.createElementBlock("div",{key:0,class:o.normalizeClass(["return-widget__profit",p.value])},[o.createVNode(o.unref(Ve),{icon:"tip",class:"return-widget__profit__icon"}),o.createElementVNode("div",{class:"return-widget__profit__text",innerHTML:_.value},null,8,fS)],2)):o.createCommentVNode("",!0)]))}},[["__scopeId","data-v-c52bb3a2"]]),Vu=t=>(o.pushScopeId("data-v-69c2a2fa"),t=t(),o.popScopeId(),t),pS={class:"top-positions-widget"},gS={class:"top-positions-widget__top"},_S={class:"top-positions-widget__title-wrapper"},yS=Vu(()=>o.createElementVNode("div",{class:"top-positions-widget__title"},"Top-3 Positions",-1)),wS=Vu(()=>o.createElementVNode("br",null,null,-1)),bS={key:0,class:"top-positions-widget__returns"},kS={class:"top-positions-widget__return"},CS={class:"top-positions-widget__return__left"},xS=Vu(()=>o.createElementVNode("div",{class:"top-positions-widget__return__line"},null,-1)),MS={class:"top-positions-widget__return__pair"},vS={class:"top-positions-widget__return__right"},SS={class:"top-positions-widget__return__pnl"},TS=De({__name:"TopPositionsWidget",props:{topPositions:{type:Array,default:[]}},emits:["onChange"],setup(t,{emit:e}){const n=o.ref("week"),r=e;return(s,i)=>(o.openBlock(),o.createElementBlock("div",pS,[o.createElementVNode("div",gS,[o.createElementVNode("div",_S,[yS,o.createVNode(o.unref(fn),{alternative:""},{default:o.withCtx(()=>[o.createTextVNode("Displays 3 most profitable trades of the selected period. You can also see the trading pair and trade profit to balance ratio. "),wS,o.createTextVNode("Pay attention: in the widget, we calculate Net PNL excluding entry and exit commissions, as well as funding ")]),_:1})]),o.createVNode(o.unref(Ys),{modelValue:n.value,"onUpdate:modelValue":i[0]||(i[0]=a=>n.value=a),onOnChange:i[1]||(i[1]=a=>r("onChange",n.value))},null,8,["modelValue"])]),t.topPositions&&t.topPositions.length?(o.openBlock(),o.createElementBlock("div",bS,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(t.topPositions,a=>(o.openBlock(),o.createElementBlock("div",kS,[o.createElementVNode("div",CS,[xS,o.createElementVNode("div",MS,o.toDisplayString(o.unref(Q6)(a.pair)),1)]),o.createElementVNode("div",vS,[o.createElementVNode("div",SS,o.toDisplayString(o.unref(ln)(a.pnl,{isFixed:!0,isPlus:!0})),1),o.createElementVNode("div",{class:o.normalizeClass(["top-positions-widget__return__roi",a.roi<0?"-negative":"-positive"])},[o.createVNode(o.unref(Ve),{icon:"bxs_up-arrow"}),o.createElementVNode("span",null,o.toDisplayString(o.unref(ln)(a.roi,{isPercentage:!0,isFixed:!0})),1)],2)])]))),256))])):(o.openBlock(),o.createBlock(o.unref(qd),{key:1,title:"No more pair",subtitle:"No data available for the specified period",icon:"coins-add"}))]))}},[["__scopeId","data-v-69c2a2fa"]]),Bu=t=>(o.pushScopeId("data-v-7b67b5c8"),t=t(),o.popScopeId(),t),DS={class:"trade-widget"},OS={class:"trade-widget__content"},ES={class:"trade-widget__top"},$S={class:"trade-widget__title-wrapper"},PS=Bu(()=>o.createElementVNode("div",{class:"trade-widget__title"},"Trades Performance",-1)),LS={class:"trade-widget__info"},NS={class:"trade-widget__total-wrapper"},VS=Bu(()=>o.createElementVNode("div",{class:"trade-widget__total-wrapper__title"},"Total",-1)),BS={class:"trade-widget__total-wrapper__total"},AS={class:"trade-widget__total-wrapper__value"},RS={class:"trade-widget__points"},FS={class:"trade-widget__point"},IS={class:"trade-widget__point__title"},zS=Bu(()=>o.createElementVNode("div",{class:"trade-widget__point__line"},null,-1)),HS=De({__name:"TradePerformanceWidget",props:{totalTrades:Number,tradePoints:Array},emits:["onChange"],setup(t,{emit:e}){const n=o.ref("week"),r=e;return(s,i)=>(o.openBlock(),o.createElementBlock("div",DS,[o.createElementVNode("div",OS,[o.createElementVNode("div",ES,[o.createElementVNode("div",$S,[PS,o.createVNode(o.unref(fn),{alternative:""},{default:o.withCtx(()=>[o.createTextVNode("This widget displays number of total winning & trades. Also it indicates the average number of trades for selected period. ")]),_:1})]),o.createVNode(o.unref(Ys),{modelValue:n.value,"onUpdate:modelValue":i[0]||(i[0]=a=>n.value=a),onOnChange:i[1]||(i[1]=a=>r("onChange",n.value))},null,8,["modelValue"])]),o.createElementVNode("div",LS,[o.createElementVNode("div",NS,[VS,o.createElementVNode("div",BS,[o.createElementVNode("div",AS,o.toDisplayString(t.totalTrades),1)])]),o.createElementVNode("div",RS,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(t.tradePoints,a=>(o.openBlock(),o.createElementBlock("div",FS,[o.createElementVNode("div",IS,o.toDisplayString(a.title),1),zS,o.createElementVNode("div",{class:o.normalizeClass(["trade-widget__point__value",a.class?a.class:""])},o.toDisplayString(a.value),3)]))),256))])])])]))}},[["__scopeId","data-v-7b67b5c8"]]),kl=t=>(o.pushScopeId("data-v-7a9040de"),t=t(),o.popScopeId(),t),YS={class:"winrate-widget"},WS={class:"winrate-widget__winrate"},jS={class:"winrate-widget__title-wrapper"},ZS=kl(()=>o.createElementVNode("div",{class:"winrate-widget__title"},"Winrate",-1)),US=kl(()=>o.createElementVNode("br",null,null,-1)),qS={class:"winrate-widget__chart"},GS={class:"winrate-widget__data"},KS={class:"winrate-widget__data_value"},XS=kl(()=>o.createElementVNode("div",{class:"winrate-widget__data_title"},"Winrate",-1)),QS={class:"winrate-widget__average-rr"},JS={class:"winrate-widget__title-wrapper"},eT=kl(()=>o.createElementVNode("div",{class:"winrate-widget__title"},"Average RR",-1)),tT=De({__name:"WinrateWidget",props:{winrate:{type:Number,default:0},minRR:{type:Number,default:0},averageRR:{type:Number,default:0},maxRR:{type:Number,default:0}},setup(t){return(e,n)=>(o.openBlock(),o.createElementBlock("div",YS,[o.createElementVNode("div",WS,[o.createElementVNode("div",jS,[ZS,o.createVNode(o.unref(fn),{alternative:""},{default:o.withCtx(()=>[o.createTextVNode("This widget displays the percentage of successful trades and the average RR. "),US,o.createTextVNode("Pay attention: in the widget, we calculate Net PNL excluding entry and exit commissions, as well as funding ")]),_:1})]),o.createElementVNode("div",qS,[o.renderSlot(e.$slots,"roundSlider",{},void 0,!0),o.createElementVNode("div",GS,[o.createElementVNode("div",KS,o.toDisplayString(o.unref(Vt)(t.winrate,2))+"%",1),XS])])]),o.createElementVNode("div",QS,[o.createElementVNode("div",JS,[eT,o.createVNode(o.unref(fn),{alternative:""},{default:o.withCtx(()=>[o.createTextVNode("The risk/reward ratio - marks the prospective reward a trader can earn for every dollar they risk on a trade. ")]),_:1})]),o.createVNode(o.unref(Wm),{avg:t.averageRR,min:t.minRR,max:t.maxRR},null,8,["avg","min","max"])])]))}},[["__scopeId","data-v-7a9040de"]]),nT=t=>(o.pushScopeId("data-v-2f6cbb5e"),t=t(),o.popScopeId(),t),rT={class:"average-rr-line-container"},sT={class:"average-rr-line"},iT={key:0,class:"average-rr-line__progress"},oT=[nT(()=>o.createElementVNode("div",{class:"average-rr-line__dot"},null,-1))],aT={class:"coefficients"},lT={class:"coefficients__value -min"},cT={class:"coefficients__value -avg"},dT={class:"coefficients__value -max"},Wm=De({__name:"AverageRRLine",props:{min:{type:Number,default:0},avg:{type:Number,default:0},max:{type:Number,default:0}},setup(t){return(e,n)=>(o.openBlock(),o.createElementBlock("div",rT,[o.createElementVNode("div",sT,[t.avg&&t.max?(o.openBlock(),o.createElementBlock("div",iT,oT)):o.createCommentVNode("",!0)]),o.createElementVNode("div",aT,[o.createElementVNode("div",lT,o.toDisplayString(t.min),1),o.createElementVNode("div",cT,o.toDisplayString(o.unref(Vt)(t.avg)),1),o.createElementVNode("div",dT,o.toDisplayString(o.unref(Vt)(t.max)),1)])]))}},[["__scopeId","data-v-2f6cbb5e"]]);//! moment.js
|
|
37
37
|
//! version : 2.30.1
|
|
38
38
|
//! authors : Tim Wood, Iskren Chernev, Moment.js contributors
|
|
39
39
|
//! license : MIT
|