1! function(t) { 2var a = function() { 3var a = '<div class="colpick"><div class="colpick_color"><div class="colpick_color_overlay1"><div class="colpick_color_overlay2"><div class="colpick_selector_outer"><div class="colpick_selector_inner"></div></div></div></div></div><div class="colpick_hue"><div class="colpick_hue_arrs"><div class="colpick_hue_larr"></div><div class="colpick_hue_rarr"></div></div></div><div class="colpick_new_color"></div><div class="colpick_current_color"></div><div class="colpick_hex_field"><div class="colpick_field_letter">#</div><input type="text" maxlength="6" size="6" /></div><div class="colpick_rgb_r colpick_field"><div class="colpick_field_letter">R</div><input type="text" maxlength="3" size="3" /><div class="colpick_field_arrs"><div class="colpick_field_uarr"></div><div class="colpick_field_darr"></div></div></div><div class="colpick_rgb_g colpick_field"><div class="colpick_field_letter">G</div><input type="text" maxlength="3" size="3" /><div class="colpick_field_arrs"><div class="colpick_field_uarr"></div><div class="colpick_field_darr"></div></div></div><div class="colpick_rgb_b colpick_field"><div class="colpick_field_letter">B</div><input type="text" maxlength="3" size="3" /><div class="colpick_field_arrs"><div class="colpick_field_uarr"></div><div class="colpick_field_darr"></div></div></div><div class="colpick_hsb_h colpick_field"><div class="colpick_field_letter">H</div><input type="text" maxlength="3" size="3" /><div class="colpick_field_arrs"><div class="colpick_field_uarr"></div><div class="colpick_field_darr"></div></div></div><div class="colpick_hsb_s colpick_field"><div class="colpick_field_letter">S</div><input type="text" maxlength="3" size="3" /><div class="colpick_field_arrs"><div class="colpick_field_uarr"></div><div class="colpick_field_darr"></div></div></div><div class="colpick_hsb_b colpick_field"><div class="colpick_field_letter">B</div><input type="text" maxlength="3" size="3" /><div class="colpick_field_arrs"><div class="colpick_field_uarr"></div><div class="colpick_field_darr"></div></div></div><div class="colpick_submit"></div></div>', 4 e = { 5 showEvent: "click", 6 onShow: function() {}, 7 onBeforeShow: function() {}, 8 onHide: function() {}, 9 onChange: function() {}, 10 onSubmit: function() {}, 11 colorScheme: "light", 12 color: "3289c7", 13 livePreview: !0, 14 flat: !1, 15 layout: "full", 16 submit: 1, 17 submitText: "OK", 18 height: 156 19 }, 20 l = function(a, e) { 21 var i = c(a); 22 t(e).data("colpick").fields.eq(1).val(i.r).end().eq(2).val(i.g).end().eq(3).val(i.b).end() 23 }, 24 r = function(a, e) { 25 t(e).data("colpick").fields.eq(4).val(Math.round(a.h)).end().eq(5).val(Math.round(a.s)).end().eq(6).val(Math.round(a.b)).end() 26 }, 27 n = function(a, e) { 28 t(e).data("colpick").fields.eq(0).val(d(a)) 29 }, 30 s = function(a, e) { 31 t(e).data("colpick").selector.css("backgroundColor", "#" + d({ 32 h: a.h, 33 s: 100, 34 b: 100 35 })), t(e).data("colpick").selectorIndic.css({ 36 left: parseInt(t(e).data("colpick").height * a.s / 100, 10), 37 top: parseInt(t(e).data("colpick").height * (100 - a.b) / 100, 10) 38 }) 39 }, 40 p = function(a, e) { 41 t(e).data("colpick").hue.css("top", parseInt(t(e).data("colpick").height - t(e).data("colpick").height * a.h / 360, 10)) 42 }, 43 h = function(a, e) { 44 t(e).data("colpick").currentColor.css("backgroundColor", "#" + d(a)) 45 }, 46 u = function(a, e) { 47 t(e).data("colpick").newColor.css("backgroundColor", "#" + d(a)) 48 }, 49 f = function(a) { 50 var e, h = t(this).parent().parent(); 51 this.parentNode.className.indexOf("_hex") > 0 ? (h.data("colpick").color = e = i(L(this.value)), l(e, h.get(0)), r(e, h.get(0))) : this.parentNode.className.indexOf("_hsb") >
51 0 ? (h.data("colpick").color = e = X({ 52 h: parseInt(h.data("colpick").fields.eq(4).val(), 10), 53 s: parseInt(h.data("colpick").fields.eq(5).val(), 10), 54 b: parseInt(h.data("colpick").fields.eq(6).val(), 10) 55 }), l(e, h.get(0)), n(e, h.get(0))) : (h.data("colpick").color = e = o(E({ 56 r: parseInt(h.data("colpick").fields.eq(1).val(), 10), 57 g: parseInt(h.data("colpick").fields.eq(2).val(), 10), 58 b: parseInt(h.data("colpick").fields.eq(3).val(), 10) 59 })), n(e, h.get(0)), r(e, h.get(0))), s(e, h.get(0)), p(e, h.get(0)), u(e, h.get(0)), h.data("colpick").onChange.apply(h.parent(), [e, d(e), c(e), h.data("colpick").el, 0]) 60 }, 61 v = function(a) { 62 t(this).parent().removeClass("colpick_focus") 63 }, 64 g = function() { 65 t(this).parent().parent().data("colpick").fields.parent().removeClass("colpick_focus"), t(this).parent().addClass("colpick_focus") 66 }, 67 k = function(a) { 68 a.preventDefault ? a.preventDefault() : a.returnValue = !1; 69 var e = t(this).parent().find("input").focus(), 70 i = { 71 el: t(this).parent().addClass("colpick_slider"), 72 max: this.parentNode.className.indexOf("_hsb_h") > 0 ? 360 : this.parentNode.className.indexOf("_hsb") > 0 ? 100 : 255, 73 y: a.pageY, 74 field: e, 75 val: parseInt(e.val(), 10), 76 preview: t(this).parent().parent().data("colpick").livePreview 77 }; 78 t(document).mouseup(i, m), t(document).mousemove(i, _) 79 }, 80 _ = function(t) { 81 return t.data.field.val(Math.max(0, Math.min(t.data.max, parseInt(t.data.val - t.pageY + t.data.y, 10)))), t.data.preview && f.apply(t.data.field.get(0), [!0]), !1 82 }, 83 m = function(a) { 84 return f.apply(a.data.field.get(0), [!0]), a.data.el.removeClass("colpick_slider").find("input").focus(), t(document).off("mouseup", m), t(document).off("mousemove", _), !1 85 }, 86 b = function(a) { 87 a.preventDefault ? a.preventDefault() : a.returnValue = !1; 88 var e = { 89 cal: t(this).parent(), 90 y: t(this).offset().top 91 }; 92 t(document).on("mouseup touchend", e, y), t(document).on("mousemove touchmove", e, x); 93 var i = "touchstart" == a.type ? a.originalEvent.changedTouches[0].pageY : a.pageY; 94 return f.apply(e.cal.data("colpick").fields.eq(4).val(parseInt(360 * (e.cal.data("colpick").height - (i - e.y)) / e.cal.data("colpick").height, 10)).get(0), [e.cal.data("colpick").livePreview]), !1 95 }, 96 x = function(t) { 97 var a = "touchmove" == t.type ? t.originalEvent.changedTouches[0].pageY : t.pageY; 98 return f.apply(t.data.cal.data("colpick").fields.eq(4).val(parseInt(360 * (t.data.cal.data("colpick").height - Math.max(0, Math.min(t.data.cal.data("colpick").height, a - t.data.y))) / t.data.cal.data("colpick").height, 10)).get(0), [t.data.preview]), !1 99 }, 100 y = function(a) { 101 return l(a.data.cal.data("colpick").color, a.data.cal.get(0)), n(a.data.cal.data("colpick").color, a.data.cal.get(0)), t(document).off("mouseup touchend", y), t(document).off("mousemove touchmove", x), !1 102 }, 103 w = function(a) { 104 a.preventDefault ? a.preventDefault() : a.returnValue = !1; 105 var e = { 106 cal: t(this).parent(), 107 pos: t(this).offset() 108 }; 109 e.preview = e.cal.data("colpick").livePreview, t(document).on("mouseup touchend", e, I), t(document).on("mousemove touchmove", e, M); 110 var i; 111 return "touchstart" == a.type ? (pageX = a.originalEvent.changedTouches[0].pageX, i = a.originalEvent.changedTouches[0].pageY) : (pageX = a.pageX, i = a.pageY), f.apply(e.cal.data("colpick").fields.eq(6).val(parseInt(100 * (e.cal.data("colpick").height - (i - e.pos.top)) / e.cal.data("colpick").height, 10)).end().eq(5).val(parseInt(100 * (pageX - e.pos.left) / e.cal.data("colpick").height, 10)).get(0), [e.preview]), !1 112 }, 113 M = function(t) { 114 var a; 115 return "touchmove" == t.type ? (pageX = t.originalEvent.changedTouches[0].pageX, a = t.originalEvent.changedTouches[0].pageY) : (pageX = t.pageX, a = t.pageY), f.apply(t.data.cal.data("colpick").fields.eq(6).val(parseInt(100 * (t.data.cal.data("colpick").height - Math.max(0, Math.min(t.data.cal.data("colpick").height, a - t.data.pos.top))) / t.data.cal.data("colpick").height, 10)).end().eq(5).val(parseInt(100 * Math.max(0, Math.min(t.data.cal.data("colpick").height, pageX
115- t.data.pos.left)) / t.data.cal.data("colpick").height, 10)).get(0), [t.data.preview]), !1 116 }, 117 I = function(a) { 118 return l(a.data.cal.data("colpick").color, a.data.cal.get(0)), n(a.data.cal.data("colpick").color, a.data.cal.get(0)), t(document).off("mouseup touchend", I), t(document).off("mousemove touchmove", M), !1 119 }, 120 C = function(a) { 121 var e = t(this).parent(), 122 i = e.data("colpick").color; 123 e.data("colpick").origColor = i, h(i, e.get(0)), e.data("colpick").onSubmit(i, d(i), c(i), e.data("colpick").el), t(e.get(0)).css("display", "none") 124 }, 125 T = function(a) { 126 a.stopPropagation(); 127 var e = t("#" + t(this).data("colpickId")); 128 e.data("colpick").onBeforeShow.apply(this, [e.get(0)]); 129 var i = t(this).offset(), 130 o = i.top + this.offsetHeight, 131 c = i.left, 132 l = S(), 133 d = e.width(); 134 c + d > l.l + l.w && (c -= d), e.css({ 135 left: c + "px", 136 top: o + "px" 137 }), 0 != e.data("colpick").onShow.apply(this, [e.get(0)]) && e.show(), t("html").mousedown({ 138 cal: e 139 }, q), e.mousedown(function(t) { 140 t.stopPropagation() 141 }) 142 }, 143 q = function(a) { 144 0 != a.data.cal.data("colpick").onHide.apply(this, [a.data.cal.get(0)]) && a.data.cal.hide(), t("html").off("mousedown", q) 145 }, 146 S = function() { 147 var t = "CSS1Compat" == document.compatMode; 148 return { 149 l: window.pageXOffset || (t ? document.documentElement.scrollLeft : document.body.scrollLeft), 150 w: window.innerWidth || (t ? document.documentElement.clientWidth : document.body.clientWidth) 151 } 152 }, 153 X = function(t) { 154 return { 155 h: Math.min(360, Math.max(0, t.h)), 156 s: Math.min(100, Math.max(0, t.s)), 157 b: Math.min(100, Math.max(0, t.b)) 158 } 159 }, 160 E = function(t) { 161 return { 162 r: Math.min(255, Math.max(0, t.r)), 163 g: Math.min(255, Math.max(0, t.g)), 164 b: Math.min(255, Math.max(0, t.b)) 165 } 166 }, 167 L = function(t) { 168 var a = 6 - t.length; 169 if (a > 0) { 170 for (var e = [], i = 0; a > i; i++) e.push("0"); 171 e.push(t), t = e.join("") 172 } 173 return t 174 }, 175 P = function() { 176 var a = t(this).parent(), 177 e = a.data("colpick").origColor; 178 a.data("colpick").color = e, l(e, a.get(0)), n(e, a.get(0)), r(e, a.get(0)), s(e, a.get(0)), p(e, a.get(0)), u(e, a.get(0)) 179 }; 180 return { 181 init: function(c) { 182 if (c = t.extend({}, e, c || {}), "string" == typeof c.color) c.color = i(c.color); 183 else if (void 0 != c.color.r && void 0 != c.color.g && void 0 != c.color.b) c.color = o(c.color); 184 else { 185 if (void 0 == c.color.h || void 0 == c.color.s || void 0 == c.color.b) return this; 186 c.color = X(c.color) 187 } 188 return this.each(function() { 189 if (!t(this).data("colpickId")) { 190 var e = t.extend({}, c); 191 e.origColor = c.color; 192 var i = "collorpicker_" + parseInt(1e3 * Math.random()); 193 t(this).data("colpickId", i); 194 var o = t(a).attr("id", i); 195 o.addClass("colpick_" + e.layout + (e.submit ? "" : " colpick_" + e.layout + "_ns")), "light" != e.colorScheme && o.addClass("colpick_" + e.colorScheme), o.find("div.colpick_submit").html(e.submitText).click(C), e.fields = o.find("input").change(f).blur(v).focus(g), o.find("div.colpick_field_arrs").mousedown(k).end().find("div.colpick_current_color").click(P), e.selector = o.find("div.colpick_color").on("mousedown touchstart", w), e.selectorIndic = e.selector.find("div.colpick_selector_outer"), e.el = this, e.hue = o.find("div.colpick_hue_arrs"), huebar = e.hue.parent(); 196 var d = navigator.userAgent.toLowerCase(), 197 _ = "Microsoft Internet Explorer" === navigator.appName, 198 m = _ ? parseFloat(d.match(/msie ([0-9]{1,}[\.0-9]{0,})/)[1]) : 0, 199 x = _ && 10 > m, 200 y = ["#ff0000", "#ff0080", "#ff00ff", "#8000ff", "#0000ff", "#0080ff", "#00ffff", "#00ff80", "#00ff00", "#80ff00", "#ffff00", "#ff8000", "#ff0000"]; 201 if (x) { 202 var M, I; 203 for (M = 0; 11 >= M; M++) I = t("<div></div>").attr("style", "height:8.333333%; filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr=" + y[M] + ", endColorstr=" + y[M + 1] + '); -ms-filter: "progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr=' + y[M] + ", endColorstr=" + y[M + 1] + ')";'), huebar.append(I) 204 } else stopList = y.join(","), huebar.attr("style", "background:-webkit-linear-gradient(top," + stopList + "); background: -o-linear-gradient(top," + stopList + "); background: -ms-linear-gradient(top," + stopList + "); background:-moz-linear-gradient(top," + stopList + "); -webkit-linear-gradient(top," + stopList + "); background:linear-gradient(to bottom," + stopList + "); "); 205 o.find("div.colpick_hue").on("mousedown touchstart", b), e.newColor = o.find("div.colpick_new_color"), e.currentColor = o.find("div.colpick_current_color"), o.data("c
205olpick", e), l(e.color, o.get(0)), r(e.color, o.get(0)), n(e.color, o.get(0)), p(e.color, o.get(0)), s(e.color, o.get(0)), h(e.color, o.get(0)), u(e.color, o.get(0)), e.flat ? (o.appendTo(this).show(), o.css({ 206 position: "relative", 207 display: "block" 208 })) : (o.appendTo(document.body), t(this).on(e.showEvent, T), o.css({ 209 position: "absolute" 210 })) 211 } 212 }) 213 }, 214 showPicker: function() { 215 return this.each(function() { 216 t(this).data("colpickId") && T.apply(this) 217 }) 218 }, 219 hidePicker: function() { 220 return this.each(function() { 221 t(this).data("colpickId") && t("#" + t(this).data("colpickId")).hide() 222 }) 223 }, 224 setColor: function(a, e) { 225 if (e = "undefined" == typeof e ? 1 : e, "string" == typeof a) a = i(a); 226 else if (void 0 != a.r && void 0 != a.g && void 0 != a.b) a = o(a); 227 else { 228 if (void 0 == a.h || void 0 == a.s || void 0 == a.b) return this; 229 a = X(a) 230 } 231 return this.each(function() { 232 if (t(this).data("colpickId")) { 233 var i = t("#" + t(this).data("colpickId")); 234 i.data("colpick").color = a, i.data("colpick").origColor = a, l(a, i.get(0)), r(a, i.get(0)), n(a, i.get(0)), p(a, i.get(0)), s(a, i.get(0)), u(a, i.get(0)), i.data("colpick").onChange.apply(i.parent(), [a, d(a), c(a), i.data("colpick").el, 1]), e && h(a, i.get(0)) 235 } 236 }) 237 } 238 } 239}(), 240 e = function(t) { 241 var t = parseInt(t.indexOf("#") > - 1 ? t.substring(1) : t, 16); 242 return { 243 r: t >> 16, 244 g: (65280 & t) >> 8, 245 b: 255 & t 246 } 247 }, 248 i = function(t) { 249 return o(e(t)) 250 }, 251 o = function(t) { 252 var a = { 253 h: 0, 254 s: 0, 255 b: 0 256 }, 257 e = Math.min(t.r, t.g, t.b), 258 i = Math.max(t.r, t.g, t.b), 259 o = i - e; 260 return a.b = i, a.s = 0 != i ? 255 * o / i : 0, 0 != a.s ? t.r == i ? a.h = (t.g - t.b) / o : t.g == i ? a.h = 2 + (t.b - t.r) / o : a.h = 4 + (t.r - t.g) / o : a.h = - 1, a.h *= 60, a.h < 0 && (a.h += 360), a.s *= 100 / 255, a.b *= 100 / 255, a 261 }, 262 c = function(t) { 263 var a = {}, 264 e = t.h, 265 i = 255 * t.s / 100, 266 o = 255 * t.b / 100; 267 if (0 == i) a.r = a.g = a.b = o; 268 else { 269 var c = o, 270 l = (255 - i) * o / 255, 271 d = (c - l) * (e % 60) / 60; 272 360 == e && (e = 0), 60 > e ? (a.r = c, a.b = l, a.g = l + d) : 120 > e ? (a.g = c, a.b = l, a.r = c - d) : 180 > e ? (a.g = c, a.r = l, a.b = l + d) : 240 > e ? (a.b = c, a.r = l, a.g = c - d) : 300 > e ? (a.b = c, a.g = l, a.r = l + d) : 360 > e ? (a.r = c, a.g = l, a.b = c - d) : (a.r = 0, a.g = 0, a.b = 0) 273 } 274 return { 275 r: Math.round(a.r), 276 g: Math.round(a.g), 277 b: Math.round(a.b) 278 } 279 }, 280 l = function(a) { 281 var e = [a.r.toString(16), a.g.toString(16), a.b.toString(16)]; 282 return t.each(e, function(t, a) { 283 1 == a.length && (e[t] = "0" + a) 284 }), e.join("") 285 }, 286 d = function(t) { 287 return l(c(t)) 288 }; 289 t.fn.extend({ 290 colpick: a.init, 291 colpickHide: a.hidePicker, 292 colpickShow: a.showPicker, 293 colpickSetColor: a.setColor 294 }), t.extend({ 295colpick: { 296rgbToHex: l, 297 rgbToHsb: o, 298 hsbToHex: d, 299 hsbToRgb: c, 300 hexToHsb: i, 301 hexToRgb: e 302 } 303}) 304}(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.