1 2! function(t) { 3 t.fn.jRate = function(o) { 4 "use strict"; 5 6 function r(t) { 7 return "undefined" != typeof t 8 } 9 10 function e() { 11 return r(M) ? M.rating : void 0 12 } 13 14 function n(t) { 15 if (!r(t) || t < M.min || t > M.max) throw t + " is not in range(" + min + "," + max + ")"; 16 M.rating = t, l(t) 17 } 18 19 function a(t) { 20 var o, r = '<svg width="' + M.width + '" height=' + M.height + ' ', 21 e = M.horizontal, 22 n = _.attr("id"), 23 a = '<defs><linearGradient id="' + n + "_grad" + t + '" x1="0%" y1="0%" x2="' + (e ? 100 : 0) + '%" y2="' + (e ? 0 : 100) + '%"><stop offset="0%" stop-color=' + M.backgroundColor + '/><stop offset="0%" stop-color=' + M.backgroundColor + '/></linearGradient></defs>'; 24 switch (M.shape) { 25 case "STAR": 26 o = r + '>' + a + '<polygon style="fill: url(#' + n + "_grad" + t + ");stroke:" + M.strokeColor + ";fill-opacity:" + +M.transparency + ';stroke-width:1px;" points="14.6315 6.11934 14.5896 5.99592 14.5125 5.88747 14.4096 5.80738 14.3068 5.72729 14.1828 5.67908 14.0528 5.66868 10.2522 5.36668 8.60751 1.72601 8.55514 1.60875 8.46994 1.50916 8.36221 1.43925 8.25448 1.36934 8.12882 1.3321 8.0004 1.33203 7.87197 1.33196 7.74627 1.36906 7.63846 1.43885 7.53066 1.50864 7.44535 1.60814 7.39285 1.72534 5.74818 5.36668 1.94751 5.66868 1.81982 5.67879 1.69774 5.72548 1.59588 5.80316 1.49403 5.88084 1.41671 5.98622 1.37318 6.1067 1.32964 6.22717 1.32174 6.35763 1.35041 6.48248 1.37908 6.60733 1.44311 6.72127 1.53485 6.81068 4.34351 9.54868 3.35018 13.85 3.32002 13.9802 3.32969 14.1165 3.37793 14.2411 3.42617 14.3657 3.51076 14.473 3.62071 14.549 3.73067 14.6249 3.86093 14.6661 3.99457 14.6671 4.12821 14.6681 4.25908 14.629 4.37018 14.5547 8.00018 12.1347 11.6302 14.5547 11.7437 14.6301 11.8777 14.6689 12.0139 14.6659 12.1502 14.6629 12.2823 14.6183 12.3924 14.538 12.5026 14.4577 12.5855 14.3456 12.63 14.2167 12.6746 14.0879 12.6786 13.9485 12.6415 13.8173 11.4222 9.55068 14.4462 6.82934 14.6442 6.65068 14.7168 6.37201 14.6315 6.11934 "/></svg>'; 27 break; 28 case "CIRCLE": 29 o = r + ">" + a + '<circle cx="' + M.width / 2 + '" cy="' + M.height / 2 + '" r="' + M.width / 2 + '" fill="url(#' + n + "_grad" + t + ')" style="stroke:' + M.strokeColor + ";fill-opacity:" + +M.transparency + ';stroke-width:2px;"/></svg>'; 30 break; 31 case "RECTANGLE": 32 o = r + ">" + a + '<rect width="' + M.width + '" height="' + M.height + '" fill="url(#' + n + "_grad" + t + ')" style="stroke:' + M.strokeColor + ";fill-opacity:" + +M.transparency + ';stroke-width:2px;"/></svg>'; 33 break; 34 case "TRIANGLE": 35 o = r + ">" + a + '<polygon points="' + M.width / 2 + ",0 0," + M.height + " " + M.width + "," + M.height + '" fill="url(#' + n + "_grad" + t + ')" style="stroke:' + M.strokeColor + ";fill-opacity:" + +M.transparency + ';stroke-width:2px;"/></svg>'; 36 break; 37 case "RHOMBUS": 38 o = r + ">" + a + '<polygon points="' + M.width / 2 + ",0 " + M.width + "," + M.height / 2 + " " + M.width / 2 + "," + M.height + " 0," + M.height / 2 + '" fill="url(#' + n + "_grad" + t + ')" style="stroke:' + M.strokeColor + ";fill-opacity:" + +M.transparency + ';stroke-width:2px;"/></svg>'; 39 break; 40 case "FOOD": 41 o = r + 'viewBox="0 0 50 50">' + a + '<path fill="url(#' + n + "_grad" + t + ')" style="stroke:' + M.strokeColor + ";fill-opacity:" + +M.transparency + ';"d="M45.694,21.194C45.694,9.764,36.43,0.5,25,0.5S4.306,9.764,4.306,21.194c0,8.621,5.272,16.005,12.764,19.115c-1.882,2.244-3.762,4.486-5.645,6.73c-0.429,0.5-0.458,1.602,0.243,2.145c0.7,0.551,1.757,0.252,2.139-0.289c1.878-2.592,3.753-5.189,5.63-7.783c1.774,0.494,3.633,0.777,5.561,0.777c1.85,0,3.64-0.266,5.349-0.723c1.617,2.563,3.238,5.121,4.862,7.684c0.34,0.555,1.365,0.91,2.088,0.414c0.728-0.492,0.759-1.58,0.368-2.096c-1.663-2.252-3.332-4.508-4.995-6.76C40.3,37.354,45.694,29.91,45.694,21.194z M25,37.824c-1.018,0-2.01-0.105-2.977-0.281c1.07-1.48,2.146-2.965,3.215-4.447c0.939,1.48,1.874,2.959,2.81,4.436C27.058,37.717,26.041,37.824,25,37.824z M30.155,37c-1.305-1.764-2.609-3.527-3.91-5.295c0.724-1,1.446-1.998,2.17-3c1.644,0.746,3.646,0,4.827-1.787c1.239-1.872,0.005,0,0.005,0.002c0.01-0.014,5.822-8.824,5.63-8.97c-0.186-0.15-3.804,4.771-6.387,8.081l-0.548-0.43c2.362-3.481,5.941-8.426,5.757-8.575c-0.189-0.146-3.959,4.655-6.652,7.878l-0.545-0.428c2.463-3.398,6.202-8.228,6.014-8.374c-0.188-0.15-4.115,4.528-6.917,7.67l-0.547-0.43c2.575-3.314,6.463-8.02,6.278-8.169c-0.191-0.15-5.808,6.02
411-7.319,7.651c-1.325,1.424-1.664,3.68-0.562,5.12c-0.703,0.84-1.41,1.678-2.113,2.518c-0.781-1.057-1.563-2.111-2.343-3.17c1.975-1.888,1.984-5.234-0.054-7.626c-2.14-2.565-6.331-5.22-8.51-3.818c-2.093,1.526-1.14,6.396,0.479,9.316c1.498,2.764,4.617,3.965,7.094,2.805c0.778,1.227,1.554,2.455,2.333,3.684c-1.492,1.783-2.984,3.561-4.478,5.342C13.197,34.826,8.38,28.574,8.38,21.191c0-9.183,7.444-16.631,16.632-16.631c9.188,0,16.625,7.447,16.625,16.631C41.63,28.576,36.816,34.828,30.155,37z"/></svg>'; 42 break; 43 case "TWITTER": 44 o = r + 'viewBox="0 0 512 512">' + a + '<path fill="url(#' + n + "_grad" + t + ')" style="stroke:' + M.strokeColor + ";fill-opacity:" + +M.transparency + ';stroke-width:0.7px;"d="M512,97.209c-18.838,8.354-39.082,14.001-60.33,16.54c21.687-13,38.343-33.585,46.187-58.115c-20.299,12.039-42.778,20.78-66.705,25.49c-19.16-20.415-46.461-33.17-76.674-33.17c-58.011,0-105.043,47.029-105.043,105.039c0,8.233,0.929,16.25,2.72,23.939c-87.3-4.382-164.701-46.2-216.509-109.753c-9.042,15.514-14.223,33.558-14.223,52.809c0,36.444,18.544,68.596,46.73,87.433c-17.219-0.546-33.416-5.271-47.577-13.139c-0.01,0.438-0.01,0.878-0.01,1.321c0,50.894,36.209,93.348,84.261,103c-8.813,2.399-18.094,3.686-27.674,3.686c-6.769,0-13.349-0.66-19.764-1.887c13.368,41.73,52.16,72.104,98.126,72.949c-35.95,28.175-81.243,44.967-130.458,44.967c-8.479,0-16.84-0.497-25.058-1.471c46.486,29.806,101.701,47.197,161.021,47.197c193.211,0,298.868-160.062,298.868-298.872c0-4.554-0.103-9.084-0.305-13.59C480.11,136.773,497.918,118.273,512,97.209z"/></svg>'; 45 break; 46 case "BULB": 47 o = r + 'viewBox="0 0 512 512">' + a + '<path fill="url(#' + n + "_grad" + t + ')" style="stroke:' + M.strokeColor + ";fill-opacity:" + +M.transparency + ';stroke-width:0.7px;"d="M384,192c0,64-64,127-64,192H192c0-63-64-128-64-192c0-70.688,57.313-128,128-128S384,121.313,384,192z M304,448h-96c-8.844,0-16,7.
47156-16,16s7.156,16,16,16h2.938c6.594,18.625,24.188,32,45.063,32s38.469-13.375,45.063-32H304c8.844,0,16-7.156,16-16S312.844,448,304,448z M304,400h-96c-8.844,0-16,7.156-16,16s7.156,16,16,16h96c8.844,0,16-7.156,16-16S312.844,400,304,400z M81.719,109.875l28.719,16.563c4.438-9.813,9.844-19,16.094-27.656L97.719,82.125L81.719,109.875z M272,33.625V0h-32v33.625C245.344,33.063,250.5,32,256,32S266.656,33.063,272,33.625z M190.438,46.438l-16.563-28.719l-27.75,16l16.656,28.813C171.438,56.281,180.625,50.875,190.438,46.438z M430.281,109.875l-16-27.75l-28.813,16.656c6.25,8.656,11.688,17.844,16.125,27.656L430.281,109.875z M365.844,33.719l-27.688-16l-16.563,28.719c9.781,4.438,19,9.844,27.625,16.063L365.844,33.719z M96,192c0-5.5,1.063-10.656,1.625-16H64v32h33.688C97.063,202.688,96,197.438,96,192z M414.375,176c0.563,5.344,1.625,10.5,1.625,16c0,5.438-1.063,10.688-1.688,16H448v-32H414.375z M388.094,286.719l26.188,15.125l16-27.719l-29.063-16.75C397.188,267.313,392.813,277.063,388.094,286.719z M81.719,274.125l16,27.719l25.969-14.969c-4.688-9.688-9.063-19.5-13.031-29.438L81.719,274.125z"/></svg>'; 48 break; 49 default: 50 throw Error("No such shape as " + M.shape) 51 } 52 return o 53 } 54 55 function i() { 56 _.css("white-space", "nowrap"), _.css("cursor", "pointer"), _.css("fill", M.shape) 57 } 58 59 function c(t, o) { 60 t.on("mousemove", u(o)).on("mouseenter", u(o)).on("click", m(o)).on("mouseover", u(o)).on("hover", u(o)).on("mouseleave", d).on("mouseout", d).on("JRate.change", y).on("JRate.set", k), M.touch && t.on("touchstart", w(o)).on("touchmove", w(o)).on("touchend", v(o)).on("tap", v(o)) 61 } 62 63 function s() { 64 for (var t = _.attr("id"), o = 0; o < M.count; o++) 65 z.eq(o).find("#" + t + "_grad" + (o + 1)).find("stop").eq(0).attr({ 66 offset: "0%" 67 }), z.eq(o).find("#" + t + "_grad" + (o + 1)).find("stop").eq(0).attr({ 68 "stop-color": M.backgroundColor 69 }), z.eq(o).find("#" + t + "_grad" + (o + 1)).find("stop").eq(1).attr({ 70 offset: "0%" 71 }), z.eq(o).find("#" + t + "_grad" + (o + 1)).find("stop").eq(1).attr({ 72 "stop-color": M.backgroundColor 73 }) 74 } 75 76 function l(t) { 77 s(); 78 var o = (M.max - M.min) / M.count; 79 t = (t - M.min) / o; 80 var e = M.startColor, 81 n = _.attr("id"); 82 if (M.reverse) 83 for (var a = 0; t > a; a++) { 84 var i = M.count - 1 - a; 85 if (z.eq(i).find("#" + n + "_grad" + (i + 1)).find("stop").eq(0).attr({ 86 offset: "100%" 87 }), z.eq(i).find("#" + n + "_grad" + (i + 1)).find("stop").eq(0).attr({ 88 "stop-color": e 89 }), parseInt(t) !== t) { 90 var c = Math.ceil(M.count - t) - 1; 91 z.eq(c).find("#" + n + "_grad" + (c + 1)).find("stop").eq(0).attr({ 92 offset: 100 - 10 * t % 10 * 10 + "%" 93 }), z.eq(c).find("#" + n + "_grad" + (c + 1)).find("stop").eq(0).attr({ 94 "stop-color": M.backgroundColor 95 }), z.eq(c).find("#" + n + "_grad" + (c + 1)).find("stop").eq(1).attr({ 96 offset: 100 - 10 * t % 10 * 10 + "%" 97 }), z.eq(c).find("#" + n + "_grad" + (c + 1)).find("stop").eq(1).attr({ 98 "stop-color": e 99 }) 100 } 101 r(q) && (e = R(M.count - 1, a)) 102 } else 103 for (var a = 0; t > a; a++) z.eq(a).find("#" + n + "_grad" + (a + 1)).find("stop").eq(0).attr({ 104 offset: "100%" 105 }), z.eq(a).find("#" + n + "_grad" + (a + 1)).find("stop").eq(0).attr({ 106 "stop-color": e 107 }), 10 * t % 10 > 0 && (z.eq(Math.ceil(t) - 1).find("#" + n + "_grad" + (a + 1)).find("stop").eq(0).attr({ 108 offset: 10 * t % 10 * 10 + "%" 109 }), z.eq(Math.ceil(t) - 1).find("#" + n + "_grad" + (a + 1)).find("stop").eq(0).attr({ 110 "stop-color": e 111 })), r(q) && (e = R(M.count, a)) 112 } 113 114 function f(t) { 115 var o, r; 116 return o = document.createElement("canvas"), o.height = 1, o.width = 1, r = o.getContext("2d"), r.fillStyle = t, r.fillRect(0, 0, 1, 1), r.getImageData(0, 0, 1, 1).data 117 } 118 119 function d() { 120 M.readOnly || (l(M.rating), y(null, { 121 rating: M.rating 122 })) 123 } 124 125 function h(t) { 126 var o = 1 / M.precision; 127 return Math.round(t * o) / o 128 } 129 130 function g(t, o, r, e) { 131 if (!M.readOnly) { 132 var n, a = z.eq(o - 1); 133 n = M.horizontal ? (t.pageX - a.offset().left) / a.width() : (t.pageY - a.offset().top) / a.height();
134 var i = (M.max - M.min) / M.count; 135 n = M.reverse ? n : 1 - n; 136 var c = ((M.reverse ? M.max - M.min - o + 1 : o) - n) * i; 137 c = M.min + Number(h(c)), c < M.minSelected && (c = M.minSelected), c <= M.max && c >= M.min && (l(c), e && (M.rating = c), a.trigger(r, { 138 rating: c 139 })) 140 } 141 } 142 143 function p(t, o, r, e) { 144 if (!M.readOnly) { 145 var n = t.originalEvent.changedTouches; 146 if (!(n.length > 1)) { 147 var a, i = n[0], 148 c = z.eq(o - 1); 149 a = M.horizontal ? (i.pageX - c.offset().left) / c.width() : (i.pageY - c.offset().top) / c.height(); 150 var s = (M.max - M.min) / M.count; 151 a = M.reverse ? a : 1 - a; 152 var f = ((M.reverse ? M.max - M.min - o + 1 : o) - a) * s; 153 f = M.min + Number(h(f)), f < M.minSelected && (f = M.minSelected), f <= M.max && f >= M.min && (l(f), e && (M.rating = f), c.trigger(r, { 154 rating: f 155 })) 156 } 157 } 158 } 159 160 function u(t) { 161 return function(o) { 162 g(o, t, "JRate.change") 163 } 164 } 165 166 function m(t) { 167 return function(o) { 168 g(o, t, "JRate.set", !0) 169 } 170 } 171 172 function w(t) { 173 return function(o) { 174 p(o, t, "JRate.touch") 175 } 176 } 177 178 function v(t) { 179 return function(o) { 180 p(o, t, "JRate.tap", !0) 181 } 182 } 183 184 function y(t, o) { 185 M.onChange && "function" == typeof M.onChange && M.onChange.apply(this, [o.rating]) 186 } 187 188 function k(t, o) { 189 M.onSet && "function" == typeof M.onSet && M.onSet.apply(this, [o.rating]) 190 } 191 192 function C() { 193 var t, o, r, e; 194 for (o = 0; o < M.count; o++) _.append(a(o + 1)); 195 for (z = _.find("svg"), o = 0; o < M.count; o++) t = z.eq(o), c(t, o + 1), M.horizontal ? t.css("margin-right", M.shapeGap || "0px") : t.css({ 196 display: "block", 197 "margin-bottom": M.shapeGap || "0px" 198 }), M.widthGrowth && (r = "scaleX(" + (1 + M.widthGrowth * o) + ")", t.css({ 199 transform: r, 200 "-webkit-transform": r, 201 "-moz-transform": r, 202 "-ms-transform": r, 203 "-o-transform": r 204 })), M.heightGrowth && (e = "scaleY(" + (1 + M.heightGrowth * o) + ")", t.css({ 205 transform: e, 206 "-webkit-transform": e, 207 "-moz-transform": e, 208 "-ms-transform": e, 209 "-o-transform": e 210 })); 211 s(), l(M.rating), z.attr({ 212 width: M.width, 213 height: M.height 214 }) 215 } 216 var x, q, z, _ = t(this), 217 b = { 218 rating: 0, 219 shape: "STAR", 220 count: 5, 221 width: "20", 222 height: "20", 223 widthGrowth: 0, 224 heightGrowth: 0, 225 backgroundColor: "white", 226 startColor: "Green", // Green 227 endColor: "Yellow", // Yellow 228 strokeColor: "Black", // Black 229 transparency: 1, 230 shapeGap: "0px", 231 opacity: 1, 232 min: 0, 233 max: 5, 234 precision: .1, 235 minSelected: 0, 236 horizontal: !0, 237 reverse: !1, 238 readOnly: !1, 239 touch: !0, 240 onChange: null, 241 onSet: null 242 }, 243 M = t.extend({}, b, o), 244 R = function(t, o) { 245 for (var r = [], e = 0; 3 > e; e++) { 246 var n = Math.round((x[e] - q[e]) / t), 247 a = x[e] + n * (o + 1); 248 r[e] = a / 256 ? (x[e] - n * (o + 1)) % 256 : (x[e] + n * (o + 1)) % 256 249 } 250 return "rgba(" + r[0] + "," + r[1] + "," + r[2] + "," + M.opacity + ")" 251 }; 252 return M.startColor && (x = f(M.startColor)), M.endColor && (q = f(M.endColor)), i(), C(), t.extend({}, this, { 253 getRating: e, 254 setRating: n, 255 setReadOnly: function(t) { 256 M.readOnly = t 257 }, 258 isReadOnly: function() { 259 return M.readOnly 260 } 261 }) 262 } 263}(jQuery);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.