(s=>{var o,e=window,r=s(".ha-reading-progress-bar");r.length<=0||(o={},"yes"===(o=JSON.parse(r.attr("data-ha_rpbsettings"))).ha_rpb_enable&&(o.hasOwnProperty("progress_bar_type")&&"vertical"===o.progress_bar_type&&o.hasOwnProperty("rpb_vertical_position")&&"right"==o.rpb_vertical_position?s("body").addClass("no-scroll"):s("body").removeClass("no-scroll"),s(e).scroll(function(){var r=0,t=(r=(s(e).scrollTop()||0)/((s(document).height()||1)-(s(e).height()||1))*100).toFixed(0);100<r&&(r=100),o.hasOwnProperty("progress_bar_type")&&"horizontal"===o.progress_bar_type?(s(".hm-hrp-bar").css({display:"flex"}),s(".hm-hrp-bar").width(t+"%"),1<t&&0<r?(s(".hm-tool-tip").css({opacity:1,transition:"opacity 0.3s"}),s(".hm-tool-tip").text(t+"%"),98<=t?s(".hm-tool-tip").css({right:"5px"}):s(".hm-tool-tip").css({right:"-28px"})):(s(".hm-tool-tip").css({opacity:0,transition:"opacity 0.3s"}),s(".hm-tool-tip").text("0%"))):o.hasOwnProperty("progress_bar_type")&&"vertical"===o.progress_bar_type?(s(".hm-vrp-bar").css({display:"flex"}),0<r&&1<t?s(".hm-vrp-bar").height(t+"%"):s(".hm-vrp-bar").height("0%")):o.hasOwnProperty("progress_bar_type")&&"circle"===o.progress_bar_type&&(t=2*Math.PI*45,t=Math.round(t-r/100*t),0<=r)&&(s(".hm-progress-circle").css("stroke-dashoffset",t.toFixed(2)),s(".hm-progress-percent-text").text("".concat(r.toFixed(0),"%")))})))})(jQuery);