/*! For license information please see rater-js.js.LICENSE.txt */ (()=>{var e={2315:e=>{e.exports=function(){function e(t,r,n){function i(s,o){if(!r[s]){if(!t[s]){if(a)return a(s,!0);var l=new Error("Cannot find module '"+s+"'");throw l.code="MODULE_NOT_FOUND",l}var u=r[s]={exports:{}};t[s][0].call(u.exports,(function(e){return i(t[s][1][e]||e)}),u,u.exports,e,t,r,n)}return r[s].exports}for(var a=void 0,s=0;s1))throw new Error("step must be a number between 0 and 1");var r,n=e.element,i=e.reverse,a=e.max||5,s=e.starSize||16,o=e.step||1,l=e.onHover,u=e.onLeave,c=null;n.classList.add("star-rating");var d=document.createElement("div");d.classList.add("star-value"),i&&d.classList.add("rtl"),d.style.backgroundSize=s+"px",n.appendChild(d),n.style.width=s*a+"px",n.style.height=s+"px",n.style.backgroundSize=s+"px";var g,v,f,m=e.rateCallback,p=!!e.readOnly,b=!1,h=e.isBusyText;if(g=void 0!==e.disableText?e.disableText:"{rating}/{maxRating}",f=void 0!==e.ratingText?e.ratingText:"{rating}/{maxRating}",e.rating)N(e.rating);else{var y=n.dataset.rating;y&&N(+y)}function x(e){w(e,!1)}function w(e,r){if(!0!==p&&!0!==b){var s,u=n.offsetWidth,d=n.getBoundingClientRect();if((s=i?(u-(r?e.changedTouches[0].pageX-d.left:e.pageX-window.scrollX-d.left))/(u/100):(r?e.changedTouches[0].pageX-d.left:e.offsetX)/u*100)<101){if(1===o)v=Math.ceil(s/100*a);else for(var g=s/100*a,m=0;;m+=o)if(m>=g){v=m;break}if(v>a&&(v=a),n.querySelector(".star-value").style.width=v/a*100+"%",t){var h=f.replace("{rating}",v);h=h.replace("{maxRating}",a),n.setAttribute("title",h)}"function"==typeof l&&l(v,c)}}}function L(e){c?(n.querySelector(".star-value").style.width=c/a*100+"%",n.setAttribute("data-rating",c)):(n.querySelector(".star-value").style.width="0%",n.removeAttribute("data-rating")),"function"==typeof u&&u(v,c)}function A(e){!0!==p&&!0!==b&&void 0!==m&&(b=!0,r=v,void 0===h?n.removeAttribute("title"):n.setAttribute("title",h),n.classList.add("is-busy"),m.call(this,r,(function(){!1===p&&n.removeAttribute("title"),b=!1,n.classList.remove("is-busy")})))}function I(){if(p=!0,n.classList.add("disabled"),t&&g){var e=g.replace("{rating}",c||0);e=e.replace("{maxRating}",a),n.setAttribute("title",e)}else n.removeAttribute("title")}function M(){p=!1,n.removeAttribute("title"),n.classList.remove("disabled")}function N(e){if(void 0===e)throw new Error("Value not set.");if(null===e)throw new Error("Value cannot be null.");if("number"!=typeof e)throw new Error("Value must be a number.");if(e<0||e>a)throw new Error("Value too high. Please set a rating of "+a+" or below.");c=e,n.querySelector(".star-value").style.width=e/a*100+"%",n.setAttribute("data-rating",e)}function E(){return c}function z(){c=null,n.querySelector(".star-value").style.width="0px",n.removeAttribute("title")}function S(){n.removeEventListener("mousemove",x),n.removeEventListener("mouseleave",L),n.removeEventListener("click",A),n.removeEventListener("touchmove",T,!1),n.removeEventListener("touchstart",k,!1),n.removeEventListener("touchend",D,!1),n.removeEventListener("touchcancel",j,!1)}c||(n.querySelector(".star-value").style.width="0px"),p&&I(),n.addEventListener("mousemove",x),n.addEventListener("mouseleave",L);var C={setRating:N,getRating:E,disable:I,enable:M,clear:z,dispose:S,get element(){return n}};function T(e){e.preventDefault(),w(e,!0)}function k(e){e.preventDefault(),w(e,!0)}function D(e){e.preventDefault(),w(e,!0),A.call(C)}function j(e){e.preventDefault(),L(e)}return n.addEventListener("click",A.bind(C)),n.addEventListener("touchmove",T,!1),n.addEventListener("touchstart",k,!1),n.addEventListener("touchend",D,!1),n.addEventListener("touchcancel",j,!1),C}},{"./style.css":2}],2:[function(e,t,r){var n=".star-rating {\n width: 0;\n position: relative;\n display: inline-block;\n background-image: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMDguOSIgaGVpZ2h0PSIxMDMuNiIgdmlld0JveD0iMCAwIDEwOC45IDEwMy42Ij48ZGVmcz48c3R5bGU+LmNscy0xe2ZpbGw6I2UzZTZlNjt9PC9zdHlsZT48L2RlZnM+PHRpdGxlPnN0YXJfMDwvdGl0bGU+PGcgaWQ9IkxheWVyXzIiIGRhdGEtbmFtZT0iTGF5ZXIgMiI+PGcgaWQ9IkxheWVyXzEtMiIgZGF0YS1uYW1lPSJMYXllciAxIj48cG9seWdvbiBjbGFzcz0iY2xzLTEiIHBvaW50cz0iMTA4LjkgMzkuNiA3MS4zIDM0LjEgNTQuNCAwIDM3LjYgMzQuMSAwIDM5LjYgMjcuMiA2Ni4xIDIwLjggMTAzLjYgNTQuNCA4NS45IDg4LjEgMTAzLjYgODEuNyA2Ni4xIDEwOC45IDM5LjYiLz48L2c+PC9nPjwvc3ZnPg0K);\n background-position: 0 0;\n background-repeat: repeat-x;\n cursor: pointer;\n}\n.star-rating .star-value {\n position: absolute;\n height: 100%;\n width: 100%;\n background: url('data:image/svg+xml;base64,PHN2Zw0KCXhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgd2lkdGg9IjEwOC45IiBoZWlnaHQ9IjEwMy42IiB2aWV3Qm94PSIwIDAgMTA4LjkgMTAzLjYiPg0KCTxkZWZzPg0KCQk8c3R5bGU+LmNscy0xe2ZpbGw6I2YxYzk0Nzt9PC9zdHlsZT4NCgk8L2RlZnM+DQoJPHRpdGxlPnN0YXIxPC90aXRsZT4NCgk8ZyBpZD0iTGF5ZXJfMiIgZGF0YS1uYW1lPSJMYXllciAyIj4NCgkJPGcgaWQ9IkxheWVyXzEtMiIgZGF0YS1uYW1lPSJMYXllciAxIj4NCgkJCTxwb2x5Z29uIGNsYXNzPSJjbHMtMSIgcG9pbnRzPSI1NC40IDAgNzEuMyAzNC4xIDEwOC45IDM5LjYgODEuNyA2Ni4xIDg4LjEgMTAzLjYgNTQuNCA4NS45IDIwLjggMTAzLjYgMjcuMiA2Ni4xIDAgMzkuNiAzNy42IDM0LjEgNTQuNCAwIi8+DQoJCTwvZz4NCgk8L2c+DQo8L3N2Zz4NCg==');\n background-repeat: repeat-x;\n}\n.star-rating.disabled {\n cursor: default;\n}\n.star-rating.is-busy {\n cursor: wait;\n}\n.star-rating .star-value.rtl {\n -moz-transform: scaleX(-1);\n -o-transform: scaleX(-1);\n -webkit-transform: scaleX(-1);\n transform: scaleX(-1);\n filter: FlipH;\n -ms-filter: \"FlipH\";\n right: 0;\n left: auto;\n}\n";e("browserify-css").createStyle(n,{href:"lib\\style.css"},{insertAt:"bottom"}),t.exports=n},{"browserify-css":3}],3:[function(e,t,r){"use strict";var n=[],i=function(e,t){var r=document.head||document.getElementsByTagName("head")[0],i=n[n.length-1];if((t=t||{}).insertAt=t.insertAt||"bottom","top"===t.insertAt)i?i.nextSibling?r.insertBefore(e,i.nextSibling):r.appendChild(e):r.insertBefore(e,r.firstChild),n.push(e);else{if("bottom"!==t.insertAt)throw new Error("Invalid value for parameter 'insertAt'. Must be 'top' or 'bottom'.");r.appendChild(e)}};t.exports={createLink:function(e,t){var r=document.head||document.getElementsByTagName("head")[0],n=document.createElement("link");for(var i in n.href=e,n.rel="stylesheet",t)if(t.hasOwnProperty(i)){var a=t[i];n.setAttribute("data-"+i,a)}r.appendChild(n)},createStyle:function(e,t,r){r=r||{};var n=document.createElement("style");for(var a in n.type="text/css",t)if(t.hasOwnProperty(a)){var s=t[a];n.setAttribute("data-"+a,s)}n.sheet?(n.innerHTML=e,n.sheet.cssText=e,i(n,{insertAt:r.insertAt})):n.styleSheet?(i(n,{insertAt:r.insertAt}),n.styleSheet.cssText=e):(n.appendChild(document.createTextNode(e)),i(n,{insertAt:r.insertAt}))}}},{}]},{},[1])(1)}},t={};function r(n){var i=t[n];if(void 0!==i)return i.exports;var a=t[n]={exports:{}};return e[n](a,a.exports,r),a.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{"use strict";var e=r(2315),t=r.n(e);t()({element:document.querySelector("#basic"),starSize:32,rateCallback:function(e,t){this.setRating(e),t()}}),t()({element:document.querySelector("#step"),rateCallback:function(e,t){this.setRating(e),t()},starSize:32,step:.5}),t()({element:document.querySelector("#unli1"),rateCallback:function(e,t){this.setRating(e),t()},starSize:32,max:10,step:.5}),t()({element:document.querySelector("#unli2"),rateCallback:function(e,t){this.setRating(e),t()},starSize:32,max:16,step:.5})})()})();