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HG8Op7XQ6cuikLaCPODy9VGETLfQ2OrkfmkymnqEvY+ZGjFJvU+g8SaIrftp5sU2JonhlqPywMJZussHPVXtAkWXC8XwXfaGFko2e0N7v8fR6fb5wEQwAn/3BoMccFeXy+Xz91JCPHrRfCoXaKbtZFI29j8MI8De5snZb7Av/TwAAAABJRU5ErkJggg==",c={props:{base:{type:Number,required:!0},extra:{type:Number,required:!0},current:{type:Number,required:!0},max:{type:Number,required:!0},transcendance:{type:Boolean,default:!1},readOnly:{type:Boolean,default:!1},title:{type:String,default:"Uncap level"}},methods:{isStarEnabled(t){return t<=this.current},getImage(t,e){return"/img/star_"+t+(this.isStarEnabled(e)?"1":"0")+".png"},getTranscendanceImage(t){return this.isStarEnabled(t+5)?"/img/star_v"+t+".png":"/img/star_v0.png"},getTranscendanceClass(t){let e="";return this.readOnly||(e+="cursor-pointer "),this.isStarEnabled(t)||(e+="grayscale-80 opacity-70"),e},click(t){if(this.readOnly)return;let e=t;t===1&&this.current!==0?e=0:t===this.current&&(e=t-1),this.$emit("update:current",e)}},computed:{getYellowStarsCount(){return this.base},getBlueStarsCount(){return this.base>this.extra?0:this.transcendance&&this.extra>5?Math.min(this.extra,5)-this.base:this.extra-this.base},getInvisibleStarsCount(){const t=Math.max(this.base,this.extra);return t>this.max?0:this.max-t}}};var l=function(){var e=this,s=e._self._c;return e.base!==void 0?s("div",{staticClass:"flex flex-col flex-nowrap",attrs:{title:e.title}},[s("div",{staticClass:"flex flex-row flex-nowrap"},[e._l(e.getYellowStarsCount,function(r){return s("img",{key:"y"+r,class:e.readOnly?"":"cursor-pointer",style:"width: "+100/e.max+"%;",attrs:{src:e.getImage("y",r)},on:{click:function(a){return e.click(r)}}})}),e._l(e.getBlueStarsCount,function(r){return s("img",{key:"b"+r,class:e.readOnly?"":"cursor-pointer",style:"width: "+100/e.max+"%;",attrs:{src:e.getImage("b",r+e.base)},on:{click:function(a){return e.click(r+e.base)}}})}),e._l(e.getInvisibleStarsCount,function(r){return s("img",{key:"i"+r,staticClass:"hidden",style:"width: "+100/e.max+"%;",attrs:{src:i}})})],2),e.transcendance&&e.extra>5?s("div",{staticClass:"flex flex-row flex-nowrap"},e._l(5,function(r){return s("img",{key:"v"+r,class:e.getTranscendanceClass(5+r),style:"width: 20%;",attrs:{src:e.getTranscendanceImage(r)},on:{click:function(a){return e.click(5+r)}}})}),0):e._e()]):e._e()},u=[],o=n(c,l,u,!1,null,null);const f=o.exports;export{f as S};
