1; (function(d) { 2 var t = { 3 mode: "horizontal", 4 slideSelector: "", 5 infiniteLoop: !0, 6 hideControlOnEnd: !1, 7 speed: 500, 8 easing: null, 9 slideMargin: 0, 10 startSlide: 0, 11 randomStart: !1, 12 captions: !1, 13 ticker: !1, 14 tickerHover: !1, 15 adaptiveHeight: !1, 16 adaptiveHeightSpeed: 500, 17 video: !1, 18 useCSS: !0, 19 preloadImages: "visible", 20 responsive: !0, 21 slideZIndex: 50, 22 wrapperClass: "bx-wrapper", 23 touchEnabled: !0, 24 swipeThreshold: 50, 25 oneToOneTouch: !0, 26 preventDefaultSwipeX: !0, 27 preventDefaultSwipeY: !1, 28 pager: !0, 29 pagerType: "full", 30 pagerShortSeparator: " / ", 31 pagerSelector: null, 32 buildPager: null, 33 pagerCustom: null, 34 controls: !0, 35 nextText: "Next", 36 prevText: "Prev", 37 nextSelector: null, 38 prevSelector: null, 39 autoControls: !1, 40 startText: "Start", 41 stopText: "Stop", 42 autoControlsCombine: !1, 43 autoControlsSelector: null, 44 auto: !1, 45 pause: 4E3, 46 autoStart: !0, 47 autoDirection: "next", 48 autoHover: !1, 49 autoDelay: 0, 50 autoSlideForOnePage: !1, 51 minSlides: 1, 52 maxSlides: 1, 53 moveSlides: 0, 54 slideWidth: 0, 55 onSliderLoad: function() {}, 56 onSlideBefore: function() {}, 57 onSlideAfter: function() {}, 58 onSlideNext: function() {}, 59 onSlidePrev: function() {}, 60 onSliderResize: function() {} 61 }; 62 d.fn.bxSlider = function(b) { 63 if (0 == this.length) return this; 64 if (1 < this.length) return this.each(function() { 65 d(this).bxSlider(b) 66 }), 67 this; 68 var a = {}, 69 c = this, 70 e = d(window).width(), 71 g = d(window).height(), 72 l = function() { 73 a.settings = d.extend({}, 74 t, b); 75 a.settings.slideWidth = parseInt(a.settings.slideWidth); 76 a.children = c.children(a.settings.slideSelector); 77 a.children.length < a.settings.minSlides && (a.settings.minSlides = a.children.length); 78 a.children.length < a.settings.maxSlides && (a.settings.maxSlides = a.children.length); 79 a.settings.randomStart && (a.settings.startSlide = Math.floor(Math.random() * a.children.length)); 80 a.active = { 81 index: a.settings.startSlide 82 }; 83 a.carousel = 1 < a.settings.minSlides || 1 < a.settings.maxSlides; 84 a.carousel && (a.settings.preloadImages = "all"); 85 a.minThreshold = a.settings.minSlides * a.settings.slideWidth + (a.settings.minSlides - 1) * a.settings.slideMargin; 86 a.maxThreshold = a.settings.maxSlides * a.settings.slideWidth + (a.settings.maxSlides - 1) * a.settings.slideMargin; 87 a.working = !1; 88 a.controls = {}; 89 a.interval = null; 90 a.animProp = "vertical" == a.settings.mode ? "top": "left"; 91 a.usingCSS = a.settings.useCSS && "fade" != a.settings.mode && 92 function() { 93 var f = document.createElement("div"), 94 b = ["WebkitPerspective", "MozPerspective", "OPerspective", "msPerspective"], 95 m; 96 for (m in b) if (void 0 !== f.style[b[m]]) return a.cssPrefix = b[m].replace("Perspective", "").toLowerCase(), 97 a.animProp = "-" + a.cssPrefix + "-transform", 98 !0; 99 return ! 1 100 } (); 101 "vertical" == a.settings.mode && (a.settings.maxSlides = a.settings.minSlides); 102 c.data("origStyle", c.attr("style")); 103 c.children(a.settings.slideSelector).each(function() { 104 d(this).data("origStyle", d(this).attr("style")) 105 }); 106 k() 107 }, 108 k = function() { 109 c.wrap('<div class="' + a.settings.wrapperClass + '"><div class="bx-viewport"></div></div>'); 110 a.viewport = c.parent(); 111 a.loader = d('<div class="bx-loading" />'); 112 a.viewport.prepend(a.loader); 113 c.css({ 114 width: "horizontal" == a.settings.mode ? 100 * a.children.length + 215 + "%": "auto", 115 position: "relative" 116 }); 117 a.usingCSS && a.settings.easing ? c.css("-" + a.cssPrefix + "-transition-timing-function", a.settings.easing) : a.settings.easing || (a.settings.easing = "swing"); 118 m(); 119 a.viewport.css({ 120 width: "100%", 121 overflow: "hidden", 122 position: "relative" 123 }); 124 a.viewport.parent().css({ 125 maxWidth: A() 126 }); 127 a.settings.pager || a.viewport.parent().css({ 128 margin: "0 auto 0px" 129 }); 130 a.children.css({ 131 "float": "horizontal" == a.settings.mode ? "left": "none", 132 listStyle: "none", 133 position: "relative" 134 }); 135 a.children.css("width", f()); 136 "horizontal" == a.settings.mode && 0 < a.settings.slideMargin && a.children.css("marginRight", a.settings.slideMargin); 137 "vertical" == a.settings.mode && 0 < a.settings.slideMargin && a.children.css("marginBottom", a.settings.slideMargin); 138 "fade" == a.settings.mode && (a.children.css({ 139 position: "absolute",
140 zIndex: 0, 141 display: "none" 142 }), a.children.eq(a.settings.startSlide).css({ 143 zIndex: a.settings.slideZIndex, 144 display: "block" 145 })); 146 a.controls.el = d('<div class="bx-controls" />'); 147 a.settings.captions && n(); 148 a.active.last = a.settings.startSlide == p() - 1; 149 a.settings.video && c.fitVids(); 150 var b = a.children.eq(a.settings.startSlide); 151 "all" == a.settings.preloadImages && (b = a.children); 152 a.settings.ticker ? a.settings.pager = !1 : (a.settings.pager && (a.settings.pagerCustom ? a.pagerEl = d(a.settings.pagerCustom) : (a.pagerEl = d('<div class="bx-pager" />'), a.settings.pagerSelector ? d(a.settings.pagerSelector).html(a.pagerEl) : a.controls.el.addClass("bx-has-pager").append(a.pagerEl), y()), a.pagerEl.on("click", "a", I)), a.settings.controls && (a.controls.next = d('<a class="bx-next" href="">' + a.settings.nextText + "</a>"), a.controls.prev = d('<a class="bx-prev" href="">' + a.settings.prevText + "</a>"), a.controls.next.bind("click", r), a.controls.prev.bind("click", J), a.settings.nextSelector && d(a.settings.nextSelector).append(a.controls.next), a.settings.prevSelector && d(a.settings.prevSelector).append(a.controls.prev), a.settings.nextSelector || a.settings.prevSelector || (a.controls.directionEl = d('<div class="bx-controls-direction" />'), a.controls.directionEl.append(a.controls.prev).append(a.controls.next), a.controls.el.addClass("bx-has-controls-direction").append(a.controls.directionEl))), a.settings.auto && a.settings.autoControls && (a.controls.start = d('<div class="bx-controls-auto-item"><a class="bx-start" href="">' + a.settings.startText + "</a></div>"), a.controls.stop = d('<div class="bx-controls-auto-item"><a class="bx-stop" href="">' + a.settings.stopText + "</a></div>"), a.controls.autoEl = d('<div class="bx-controls-auto" />'), a.controls.autoEl.on("click", ".bx-start", q), a.controls.autoEl.on("click", ".bx-stop", K), a.settings.autoControlsCombine ? a.controls.autoEl.append(a.controls.start) : a.controls.autoEl.append(a.controls.start).append(a.controls.stop), a.settings.autoControlsSelector ? d(a.settings.autoControlsSelector).html(a.controls.autoEl) : a.controls.el.addClass("bx-has-controls-auto").append(a.controls.autoEl), B(a.settings.autoStart ? "stop": "start")), (a.settings.controls || a.settings.autoControls || a.settings.pager) && a.viewport.after(a.controls.el)); 153 v(b, u) 154 }, 155 v = function(a, f) { 156 var b = a.find("img, iframe").length; 157 if (0 == b) f(); 158 else { 159 var m = 0; 160 a.find("img, iframe").each(function() { 161 d(this).one("load", 162 function() {++m == b && f() 163 }).each(function() { 164 this.complete && d(this).load() 165 }) 166 }) 167 } 168 }, 169 u = function() { 170 if (a.settings.infiniteLoop && "fade" != a.settings.mode && !a.settings.ticker) { 171 var f = "vertical" == a.settings.mode ? a.settings.minSlides: a.settings.maxSlides, 172 b = a.children.slice(0, f).clone().addClass("bx-clone"), 173 f = a.children.slice( - f).clone().addClass("bx-clone"); 174 c.append(b).prepend(f) 175 } 176 a.loader.remove(); 177 s(); 178 "vertical" == a.settings.mode && (a.settings.adaptiveHeight = !0); 179 a.viewport.height(x()); 180 c.redrawSlider(); 181 a.settings.onSliderLoad(a.active.index); 182 a.initialized = !0; 183 a.settings.responsive && d(window).bind("resize", E); 184 a.settings.auto && a.settings.autoStart && (1 < p() || a.settings.autoSlideForOnePage) && L(); 185 a.settings.ticker && M(); 186 a.settings.pager && C(a.settings.startSlide); 187 a.settings.controls && F(); 188 a.settings.touchEnabled && !a.settings.ticker && (a.touch = { 189 start: { 190 x: 0, 191 y: 0 192 }, 193 end: { 194 x: 0, 195 y: 0 196 } 197 }, 198 a.viewport.bind("touchstart", N)) 199 }, 200 x = function() { 201 var f = 0, 202 b = d(); 203 if ("vertical" == a.settings.mode || a.settings.adaptiveHeight) if (a.carousel) { 204 var m = 1 == a.settings.moveSlides ? a.active.index: a.active.index * h(), 205 b = a.children.eq(m); 206 for (i = 1; i <= a.settings.maxSlides - 1; i++) b = m + i >= a.children.length ? b.add(a.children.eq(i - 1)) : b.add(a.children.eq(m + i)) 207 } else b = a.children.eq(a.active.index); 208 else b = a.children; 209 "vertical" == a.settings.mode ? (b.each(function(a) { 210 f += d(this).outerHeight() 211 }), 0 < a.settings.slideMargin && (f += a.settings.slideMargin * (a.settings.minSlides - 1))) : f = Math.max.apply(Math, b.map(function() { 212 return d(this).outerHeight(!1) 213 }).get()); 214 "border-box" == a.viewport.css("box-sizing") ? f += parseFloat(a.viewport.css("padding-top")) + parseFloat(a.viewport.css("padding-bottom")) + parseFloat(a.viewport.css("border-top-width")) + parseFloat(a.viewport.css("border-bottom-width")) : "padding-box" == a.viewport.css("box-sizing") && (f += parseFloat(a.viewport.css("padding-top")) + parseFloat(a.viewport.css("padding-bottom"))); 215 return f 216 }, 217 A = function() { 218 var f = "100%"; 219 0 < a.settings.slideWidth && (f = "horizontal" == a.settings.mode ? a.settings.maxSlides * a.settings.slideWidth + (a.settings.maxSlides - 1) * a.settings.slideMargin: a.settings.slideWidth);
220 return f 221 }, 222 f = function() { 223 var f = a.settings.slideWidth, 224 b = a.viewport.width(); 225 0 == a.settings.slideWidth || a.settings.slideWidth > b && !a.carousel || "vertical" == a.settings.mode ? f = b: 1 < a.settings.maxSlides && "horizontal" == a.settings.mode && !(b > a.maxThreshold) && b < a.minThreshold && (f = (b - a.settings.slideMargin * (a.settings.minSlides - 1)) / a.settings.minSlides); 226 return f 227 }, 228 m = function() { 229 var f = 1; 230 "horizontal" == a.settings.mode && 0 < a.settings.slideWidth ? a.viewport.width() < a.minThreshold ? f = a.settings.minSlides: a.viewport.width() > a.maxThreshold ? f = a.settings.maxSlides: (f = a.children.first().width() + a.settings.slideMargin, f = Math.floor((a.viewport.width() + a.settings.slideMargin) / f)) : "vertical" == a.settings.mode && (f = a.settings.minSlides); 231 return f 232 }, 233 p = function() { 234 var f = 0; 235 if (0 < a.settings.moveSlides) if (a.settings.infiniteLoop) f = Math.ceil(a.children.length / h()); 236 else for (var b = 0, 237 p = 0; b < a.children.length;)++f, 238 b = p + m(), 239 p += a.settings.moveSlides <= m() ? a.settings.moveSlides: m(); 240 else f = Math.ceil(a.children.length / m()); 241 return f 242 }, 243 h = function() { 244 return 0 < a.settings.moveSlides && a.settings.moveSlides <= m() ? a.settings.moveSlides: m() 245 }, 246 s = function() { 247 if (a.children.length > a.settings.maxSlides && a.active.last && !a.settings.infiniteLoop) if ("horizontal" == a.settings.mode) { 248 var f = a.children.last(), 249 b = f.position(); 250 w( - (b.left - (a.viewport.width() - f.outerWidth())), "reset", 0) 251 } else "vertical" == a.settings.mode && (b = a.children.eq(a.children.length - a.settings.minSlides).position(), w( - b.top, "reset", 0)); 252 else b = a.children.eq(a.active.index * h()).position(), 253 a.active.index == p() - 1 && (a.active.last = !0), 254 void 0 != b && ("horizontal" == a.settings.mode ? w( - b.left, "reset", 0) : "vertical" == a.settings.mode && w( - b.top, "reset", 0)) 255 }, 256 w = function(f, b, m, h) { 257 if (a.usingCSS) f = "vertical" == a.settings.mode ? "translate3d(0, " + f + "px, 0)": "translate3d(" + f + "px, 0, 0)", 258 c.css("-" + a.cssPrefix + "-transition-duration", m / 1E3 + "s"), 259 "slide" == b ? (c.css(a.animProp, f), c.bind("transitionend webkitTransitionEnd oTransitionEnd MSTransitionEnd", 260 function() { 261 c.unbind("transitionend webkitTransitionEnd oTransitionEnd MSTransitionEnd"); 262 D() 263 })) : "reset" == b ? c.css(a.animProp, f) : "ticker" == b && (c.css("-" + a.cssPrefix + "-transition-timing-function", "linear"), c.css(a.animProp, f), c.bind("transitionend webkitTransitionEnd oTransitionEnd MSTransitionEnd", 264 function() { 265 c.unbind("transitionend webkitTransitionEnd oTransitionEnd MSTransitionEnd"); 266 w(h.resetValue, "reset", 0); 267 z() 268 })); 269 else { 270 var p = {}; 271 p[a.animProp] = f; 272 "slide" == b ? c.animate(p, m, a.settings.easing, 273 function() { 274 D() 275 }) : "reset" == b ? c.css(a.animProp, f) : "ticker" == b && c.animate(p, speed, "linear", 276 function() { 277 w(h.resetValue, "reset", 0); 278 z() 279 }) 280 } 281 }, 282 y = function() { 283 for (var f = "", 284 b = p(), m = 0; m < b; m++) { 285 var h = ""; 286 a.settings.buildPager && d.isFunction(a.settings.buildPager) ? (h = a.settings.buildPager(m), a.pagerEl.addClass("bx-custom-pager")) : (h = m + 1, a.pagerEl.addClass("bx-default-pager")); 287 f += '<div class="bx-pager-item">
287<a href="" data-slide-index="' + m + '" class="bx-pager-link">' + h + "</a></div>" 288 } 289 a.pagerEl.html(f) 290 }, 291 n = function() { 292 a.children.each(function(a) { 293 a = d(this).find("img:first").attr("title"); 294 void 0 != a && ("" + a).length && d(this).append('<div class="bx-caption"><span>' + a + "</span></div>") 295 }) 296 }, 297 r = function(f) { 298 a.settings.auto && c.stopAuto(); 299 c.goToNextSlide(); 300 f.preventDefault() 301 }, 302 J = function(f) { 303 a.settings.auto && c.stopAuto(); 304 c.goToPrevSlide(); 305 f.preventDefault() 306 }, 307 q = function(a) { 308 c.startAuto(); 309 a.preventDefault() 310 }, 311 K = function(a) { 312 c.stopAuto(); 313 a.preventDefault() 314 }, 315 I = function(f) { 316 a.settings.auto && c.stopAuto(); 317 var b = d(f.currentTarget); 318 void 0 !== b.attr("data-slide-index") && (b = parseInt(b.attr("data-slide-index")), b != a.active.index && c.goToSlide(b), f.preventDefault()) 319 }, 320 C = function(f) { 321 var b = a.children.length; 322 "short" == a.settings.pagerType ? (1 < a.settings.maxSlides && (b = Math.ceil(a.children.length / a.settings.maxSlides)), a.pagerEl.html(f + 1 + a.settings.pagerShortSeparator + b)) : (a.pagerEl.find("a").removeClass("active"), a.pagerEl.each(function(a, b) { 323 d(b).find("a").eq(f).addClass("active") 324 })) 325 }, 326 D = function() { 327 if (a.settings.infiniteLoop) { 328 var f = ""; 329 0 == a.active.index ? f = a.children.eq(0).position() : a.active.index == p() - 1 && a.carousel ? f = a.children.eq((p() - 1) * h()).position() : a.active.index == a.children.length - 1 && (f = a.children.eq(a.children.length - 1).position()); 330 f && ("horizontal" == a.settings.mode ? w( - f.left, "reset", 0) : "vertical" == a.settings.mode && w( - f.top, "reset", 0)) 331 } 332 a.working = !1; 333 a.settings.onSlideAfter(a.children.eq(a.active.index), a.oldIndex, a.active.index) 334 }, 335 B = function(f) { 336 a.settings.autoControlsCombine ? a.controls.autoEl.html(a.controls[f]) : (a.controls.autoEl.find("a").removeClass("active"), a.controls.autoEl.find("a:not(.bx-" + f + ")").addClass("active")) 337 }, 338 F = function() { 339 1 == p() ? (a.controls.prev.addClass("disabled"), a.controls.next.addClass("disabled")) : !a.settings.infiniteLoop && a.settings.hideControlOnEnd && (0 == a.active.index ? (a.controls.prev.addClass("disabled"), a.controls.next.removeClass("disabled")) : a.active.index == p() - 1 ? (
339a.controls.next.addClass("disabled"), a.controls.prev.removeClass("disabled")) : (a.controls.prev.removeClass("disabled"), a.controls.next.removeClass("disabled"))) 340 }, 341 L = function() { 342 0 < a.settings.autoDelay ? setTimeout(c.startAuto, a.settings.autoDelay) : c.startAuto(); 343 a.settings.autoHover && c.hover(function() { 344 a.interval && (c.stopAuto(!0), a.autoPaused = !0) 345 }, 346 function() { 347 a.autoPaused && (c.startAuto(!0), a.autoPaused = null) 348 }) 349 }, 350 M = function() { 351 var f = 0; 352 "next" == a.settings.autoDirection ? c.append(a.children.clone().addClass("bx-clone")) : (c.prepend(a.children.clone().addClass("bx-clone")), f = a.children.first().position(), f = "horizontal" == a.settings.mode ? -f.left: -f.top); 353 w(f, "reset", 0); 354 a.settings.pager = !1; 355 a.settings.controls = !1; 356 a.settings.autoControls = !1; 357 a.settings.tickerHover && !a.usingCSS && a.viewport.hover(function() { 358 c.stop() 359 }, 360 function() { 361 var f = 0; 362 a.children.each(function(b) { 363 f += "horizontal" == a.settings.mode ? d(this).outerWidth(!0) : d(this).outerHeight(!0) 364 }); 365 var b = a.settings.speed / f * (f - Math.abs(parseInt(c.css("horizontal" == a.settings.mode ? "left": "top")))); 366 z(b) 367 }); 368 z() 369 }, 370 z = function(f) { 371 speed = f ? f: a.settings.speed; 372 f = { 373 left: 0, 374 top: 0 375 }; 376 var b = { 377 left: 0, 378 top: 0 379 }; 380 "next" == a.settings.autoDirection ? f = c.find(".bx-clone").first().position() : b = a.children.first().position(); 381 w("horizontal" == a.settings.mode ? -f.left: -f.top, "ticker", speed, { 382 resetValue: "horizontal" == a.settings.mode ? -b.left: -b.top 383 }) 384 }, 385 N = function(f) { 386 a.working ? f.preventDefault() : (a.touch.originalPos = c.position(), f = f.originalEvent, a.touch.start.x = f.changedTouches[0].pageX, a.touch.start.y = f.changedTouches[0].pageY, a.viewport.bind("touchmove", G), a.viewport.bind("touchend", H)) 387 }, 388 G = function(f) { 389 var b = f.originalEvent, 390 m = Math.abs(b.changedTouches[0].pageX - a.touch.start.x), 391 h = Math.abs(b.changedTouches[0].pageY - a.touch.start.y); 392 3 * m > h && a.settings.preventDefaultSwipeX ? f.preventDefault() : 3 * h > m && a.settings.preventDefaultSwipeY && f.preventDefault(); 393 "fade" != a.settings.mode && a.settings.oneToOneTouch && ("horizontal" == a.settings.mode ? (b = b.changedTouches[0].pageX - a.touch.start.x, f = a.touch.originalPos.left + b) : (b = b.changedTouches[0].pageY - a.touch.start.y, f = a.touch.originalPos.top + b), w(f, "reset", 0)) 394 }, 395 H = function(f) { 396 a.viewport.unbind("touchmove", G); 397 var b = f.originalEvent; 398 f = 0; 399 a.touch.end.x = b.changedTouches[0].pageX; 400 a.touch.end.y = b.changedTouches[0].pageY; 401 "fade" == a.settings.mode ? (b = Math.abs(a.touch.start.x - a.touch.end.x), b >= a.settings.swipeThreshold && (a.touch.start.x > a.touch.end.x ? c.goToNextSlide() : c.goToPrevSlide(), c.stopAuto())) : ("horizontal" == a.settings.mode ? (b = a.touch.end.x - a.touch.start.x, f = a.touch.originalPos.left) : (b = a.touch.end.y - a.touch.start.y, f = a.touch.originalPos.top), !a.settings.infiniteLoop && (0 == a.active.index && 0 < b || a.active.last && 0 > b) ? w(f, "reset", 200) : Math.abs(b) >= a.settings.swipeThreshold ? (0 > b ? c.goToNextSlide() : c.goToPrevSlide(), c.stopAuto()) : w(f, "reset", 200)); 402 a.viewport.unbind("touchend", H) 403 }, 404 E = function(f) { 405 if (a.initialized) { 406 f = d(window).width(); 407 var b = d(window).height(); 408 if (e != f || g != b) e = f, 409 g = b, 410 c.redrawSlider(), 411 a.settings.onSliderResize.call(c, a.active.index) 412 } 413 }; 414 c.goToSlide = function(f, b) { 415 if (!a.working && a.active.index != f) { 416 a.working = !0; 417 a.oldIndex = a.active.index; 418 0 > f ? a.active.index = p() - 1 : f >= p() ? a.active.index = 0 : a.active.index = f; 419 a.settings.onSlideBefore(a.children.eq(a.active.index), a.oldIndex, a.active.index); 420 if ("next" == b) a.settings.onSlideNext(a.children.eq(a.active.index), a.oldIndex, a.active.index); 421 else if ("prev" == b) a.settings.onSlidePrev(a.children.eq(a.active.index), a.oldIndex, a.active.index); 422 a.active.last = a.active.index >= p() - 1; 423 a.settings.pager && C(a.active.index); 424 a.settings.controls && F(); 425 if ("fade" == a.settings.mode) a.settings.adaptiveHeight && a.viewport.height() != x() && a.viewport.animate({ 426 height: x() 427 }, 428 a.settings.adaptiveHeightSpeed), 429 a.children.filter(":visible").fadeOut(a.settings.speed).css({ 430 zIndex: 0 431 }), 432 a.children.eq(a.active.index).css("zIndex", a.settings.slideZIndex + 1).fadeIn(a.settings.speed, 433 function() { 434 d(this).css("zIndex", a.settings.slideZIndex); 435 D() 436 }); 437 else { 438 a.settings.adaptiveHeight && a.viewport.height() != x() && a.viewport.animate({ 439 height: x() 440 }, 441 a.settings.adaptiveHeightSpeed); 442 var m = 0, 443 k = { 444 left: 0, 445 top: 0 446 }; 447 if (!a.settings.infiniteLoop && a.carousel && a.active.last) if ("horizontal" == a.settings.mode) var s = a.children.eq(a.children.length - 1), 448 k = s.position(), 449 m = a.viewport.width() - s.outerWidth(); 450 else k = a.children.eq(a.children.length - a.settings.minSlides).position(); 451 else a.carousel && a.active.last && "prev" == b ? (k = 1 == a.settings.moveSlides ? a.settings.maxSlides - h() : (p() - 1) * h() - (a.children.length - a.settings.maxSlides), s = c.children(".bx-clone").eq(k), k = s.position()) : "next" == b && 0 == a.active.index ? (k = c.find("> .bx-clone").eq(a.settings.maxSlides).position(), a.active.last = !1) : 0 <= f && (k = f * h(), k = a.children.eq(k).position()); 452 "undefined" !== typeof k && w("horizontal" == a.settings.mode ? -(k.left - m) : -k.top, "slide", a.settings.speed) 453 } 454 } 455 }; 456 c.goToNextSlide = function() { 457 if (a.settings.infiniteLoop || !a.active.last) { 458 var f = parseInt(a.active.index) + 1; 459 c.goToSlide(f, "next") 460 } 461 }; 462 c.goToPrevSlide = function() { 463 if (a.settings.infiniteLoop || 0 != a.active.index) { 464 var f = parseInt(a.active.index) - 1; 465 c.goToSlide(f, "prev") 466 } 467 }; 468 c.startAuto = function(f) { 469 a.interval || (a.interval = setInterval(function() { 470 "next" == a.settings.autoDirection ? c.goToNextSlide() : c.goToPrevSlide() 471 }, 472 a.settings.pause), a.settings.autoControls && !0 != f && B("stop")) 473 }; 474 c.stopAuto = function(f) { 475 a.interval && (clearInterval(a.interval), a.interval = null, a.settings.autoControls && !0 != f && B("start")) 476 }; 477 c.getCurrentSlide = function() { 478 return a.active.index 479 }; 480 c.getCurrentSlideElement = function() { 481 return a.children.eq(a.active.index) 482 }; 483 c.getSlideCount = function() { 484 return a.children.length 485 }; 486 c.redrawSlider = function() { 487 a.children.add(c.find(".bx-clone")).width(f()); 488 a.viewport.css("height", x()); 489 a.settings.ticker || s(); 490 a.active.last && (a.active.index = p() - 1); 491 a.active.index >= p() && (a.active.last = !0); 492 a.settings.pager && !a.settings.pagerCustom && (y(), C(a.active.index)) 493 }; 494 c.destroySlider = function() { 495 a.initialized && (a.initialized = !1, d(".bx-clone", this).remove(), a.children.each(function() { 496 void 0 != d(this).data("origStyle") ? d(this).attr("style", d(this).data("origStyle")) : d(this).removeAttr("style") 497 }), void 0 != d(this).data("origStyle") ? this.attr("style", d(this).data("origStyle")) : d(this).removeAttr("style"), d(this).unwrap().unwrap(), a.controls.el && a.controls.el.remove(), a.controls.next && a.controls.next.remove(), a.controls.prev && a.controls.prev.remove(), a.pagerEl && a.settings.controls && a.pagerEl.remove(), d(".bx-caption", this).remove(), a.controls.autoEl && a.controls.autoEl.remove(), clearInterval(a.interval), a.settings.responsive && d(window).unbind("resize", E)) 498 }; 499 c.reloadSlider = function(a) { 500 void 0 != a && (b = a); 501 c.destroySlider(); 502 l() 503 }; 504 l(); 505 return this 506 } 507})(jQuery); (function(d) { 508 d.easing.jswing = d.easing.swing; 509 d.extend(d.easing, { 510 def: "easeOutQuad", 511 swing: function(t, b, a, c, e) { 512 return d.easing[d.easing.def](t, b, a, c, e) 513 }, 514 easeInQuad: function(d, b, a, c, e) { 515 return c * (b /= e) * b + a 516 }, 517 easeOutQuad: function(d, b, a, c, e) { 518 return - c * (b /= e) * (b - 2) + a 519 }, 520 easeInOutQuad: function(d, b, a, c, e) { 521 return 1 > (b /= e / 2) ? c / 2 * b * b + a: -c / 2 * (--b * (b - 2) - 1) + a 522 }, 523 easeInCubic: function(d, b, a, c, e) { 524 return c * (b /= e) * b * b + a 525 }, 526 easeOutCubic: function(d, b, a, c, e) { 527 return c * ((b = b / e - 1) * b * b + 1) + a 528 }, 529 easeInOutCubic: function(d, b, a, c, e) { 530 return 1 > (b /= e / 2) ? c / 2 * b * b * b + a: c / 2 * ((b -= 2) * b * b + 2) + a 531 }, 532 easeInQuart: function(d, b, a, c, e) { 533 return c * (b /= e) * b * b * b + a 534 }, 535 easeOutQuart: function(d, b, a, c, e) { 536 return - c * ((b = b / e - 1) * b * b * b - 1) + a 537 }, 538 easeInOutQuart: function(d, b, a, c, e) { 539 return 1 > (b /= e / 2) ? c / 2 * b * b * b * b + a: -c / 2 * ((b -= 2) * b * b * b - 2) + a 540 }, 541 easeInQuint: function(d, b, a, c, e) { 542 return c * (b /= e) * b * b * b * b + a 543 }, 544 easeOutQuint: function(d, b, a, c, e) { 545 return c * ((b = b / e - 1) * b * b * b * b + 1) + a 546 }, 547 easeInOutQuint: function(d, b, a, c, e) { 548 return 1 > (b /= e / 2) ? c / 2 * b * b * b * b * b + a: c / 2 * ((b -= 2) * b * b * b * b + 2) + a 549 }, 550 easeInSine: function(d, b, a, c, e) {
551 return - c * Math.cos(b / e * (Math.PI / 2)) + c + a 552 }, 553 easeOutSine: function(d, b, a, c, e) { 554 return c * Math.sin(b / e * (Math.PI / 2)) + a 555 }, 556 easeInOutSine: function(d, b, a, c, e) { 557 return - c / 2 * (Math.cos(Math.PI * b / e) - 1) + a 558 }, 559 easeInExpo: function(d, b, a, c, e) { 560 return 0 == b ? a: c * Math.pow(2, 10 * (b / e - 1)) + a 561 }, 562 easeOutExpo: function(d, b, a, c, e) { 563 return b == e ? a + c: c * ( - Math.pow(2, -10 * b / e) + 1) + a 564 }, 565 easeInOutExpo: function(d, b, a, c, e) { 566 return 0 == b ? a: b == e ? a + c: 1 > (b /= e / 2) ? c / 2 * Math.pow(2, 10 * (b - 1)) + a: c / 2 * ( - Math.pow(2, -10 * --b) + 2) + a 567 }, 568 easeInCirc: function(d, b, a, c, e) { 569 return - c * (Math.sqrt(1 - (b /= e) * b) - 1) + a 570 }, 571 easeOutCirc: function(d, b, a, c, e) { 572 return c * Math.sqrt(1 - (b = b / e - 1) * b) + a 573 }, 574 easeInOutCirc: function(d, b, a, c, e) { 575 return 1 > (b /= e / 2) ? -c / 2 * (Math.sqrt(1 - b * b) - 1) + a: c / 2 * (Math.sqrt(1 - (b -= 2) * b) + 1) + a 576 }, 577 easeInElastic: function(d, b, a, c, e) { 578 d = 1.70158; 579 var g = 0, 580 l = c; 581 if (0 == b) return a; 582 if (1 == (b /= e)) return a + c; 583 g || (g = 0.3 * e); 584 l < Math.abs(c) ? (l = c, d = g / 4) : d = g / (2 * Math.PI) * Math.asin(c / l); 585 return - (l * Math.pow(2, 10 * --b) * Math.sin(2 * (b * e - d) * Math.PI / g)) + a 586 }, 587 easeOutElastic: function(d, b, a, c, e) { 588 d = 1.70158; 589 var g = 0, 590 l = c; 591 if (0 == b) return a; 592 if (1 == (b /= e)) return a + c; 593 g || (g = 0.3 * e); 594 l < Math.abs(c) ? (l = c, d = g / 4) : d = g / (2 * Math.PI) * Math.asin(c / l); 595 return l * Math.pow(2, -10 * b) * Math.sin(2 * (b * e - d) * Math.PI / g) + c + a 596 }, 597 easeInOutElastic: function(d, b, a, c, e) { 598 d = 1.70158; 599 var g = 0, 600 l = c; 601 if (0 == b) return a; 602 if (2 == (b /= e / 2)) return a + c; 603 g || (g = 0.3 * e * 1.5); 604 l < Math.abs(c) ? (l = c, d = g / 4) : d = g / (2 * Math.PI) * Math.asin(c / l); 605 return 1 > b ? -0.5 * l * Math.pow(2, 10 * --b) * Math.sin(2 * (b * e - d) * Math.PI / g) + a: l * Math.pow(2, -10 * --b) * Math.sin(2 * (b * e - d) * Math.PI / g) * 0.5 + c + a 606 }, 607 easeInBack: function(d, b, a, c, e, g) { 608 void 0 == g && (g = 1.70158); 609 return c * (b /= e) * b * ((g + 1) * b - g) + a 610 }, 611 easeOutBack: function(d, b, a, c, e, g) { 612 void 0 == g && (g = 1.70158); 613 return c * ((b = b / e - 1) * b * ((g + 1) * b + g) + 1) + a 614 }, 615 easeInOutBack: function(d, b, a, c, e, g) { 616 void 0 == g && (g = 1.70158); 617 return 1 > (b /= e / 2) ? c / 2 * b * b * (((g *= 1.525) + 1) * b - g) + a: c / 2 * ((b -= 2) * b * (((g *= 1.525) + 1) * b + g) + 2) + a 618 }, 619 easeInBounce: function(t, b, a, c, e) { 620 return c - d.easing.easeOutBounce(t, e - b, 0, c, e) + a 621 }, 622 easeOutBounce: function(d, b, a, c, e) { 623 return (b /= e) < 1 / 2.75 ? 7.5625 * c * b * b + a: b < 2 / 2.75 ? c * (7.5625 * (b -= 1.5 / 2.75) * b + 0.75) + a: b < 2.5 / 2.75 ? c * (7.5625 * (b -= 2.25 / 2.75) * b + 0.9375) + a: c * (7.5625 * (b -= 2.625 / 2.75) * b + 0.984375) + a 624 }, 625 easeInOutBounce: function(t, b, a, c, e) { 626 return b < e / 2 ? 0.5 * d.easing.easeInBounce(t, 2 * b, 0, c, e) + a: 0.5 * d.easing.easeOutBounce(t, 2 * b - e, 0, c, e) + 0.5 * c + a 627 } 628 }) 629})(jQuery); (function() { 630 var d, t, b, a, c, e = function(a, b) { 631 return function() { 632 return a.apply(b, arguments) 633 } 634 }, 635 g = [].indexOf || 636 function(a) { 637 for (var b = 0, 638 c = this.length; c > b; b++) if (b in this && this[b] === a) return b; 639 return - 1 640 }; 641 t = function() { 642 function a() {} 643 return a.prototype.extend = function(a, b) { 644 var c, d; 645 for (c in b) d = b[c], 646 null == a[c] && (a[c] = d); 647 return a 648 }, 649 a.prototype.isMobile = function(a) { 650 return /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(a) 651 }, 652 a.prototype.createEvent = function(a, b, c, d) { 653 var e; 654 return null == b && (b = !1), 655 null == c && (c = !1), 656 null == d && (d = null), 657 null != document.createEvent ? (e = document.createEvent("CustomEvent"), e.initCustomEvent(a, b, c, d)) : null != document.createEventObject ? (e = document.createEventObject(), e.eventType = a) : e.eventName = a, 658 e 659 }, 660 a.prototype.emitEvent = function(a, b) { 661 return null != a.dispatchEvent ? a.dispatchEvent(b) : b in (null != a) ? a[b]() : "on" + b in (null != a) ? a["on"
661+ b]() : void 0 662 }, 663 a.prototype.addEvent = function(a, b, c) { 664 return null != a.addEventListener ? a.addEventListener(b, c, !1) : null != a.attachEvent ? a.attachEvent("on" + b, c) : a[b] = c 665 }, 666 a.prototype.removeEvent = function(a, b, c) { 667 return null != a.removeEventListener ? a.removeEventListener(b, c, !1) : null != a.detachEvent ? a.detachEvent("on" + b, c) : delete a[b] 668 }, 669 a.prototype.innerHeight = function() { 670 return "innerHeight" in window ? window.innerHeight: document.documentElement.clientHeight 671 }, 672 a 673 } (); 674 b = this.WeakMap || this.MozWeakMap || (b = function() { 675 function a() { 676 this.keys = []; 677 this.values = [] 678 } 679 return a.prototype.get = function(a) { 680 var b, c, d, e, f; 681 f = this.keys; 682 b = d = 0; 683 for (e = f.length; e > d; b = ++d) if (c = f[b], c === a) return this.values[b] 684 }, 685 a.prototype.set = function(a, b) { 686 var c, d, e, f, m; 687 m = this.keys; 688 c = e = 0; 689 for (f = m.length; f > e; c = ++e) if (d = m[c], d === a) return void(this.values[c] = b); 690 return this.keys.push(a), 691 this.values.push(b) 692 }, 693 a 694 } ()); 695 d = this.MutationObserver || this.WebkitMutationObserver || this.MozMutationObserver || (d = function() { 696 function a() { 697 "undefined" != typeof console && null !== console && console.warn("MutationObserver is not supported by your browser."); 698 "undefined" != typeof console && null !== console && console.warn("WOW.js cannot detect dom mutations, please call .sync() after loading new content.") 699 } 700 return a.notSupported = !0, 701 a.prototype.observe = function() {}, 702 a 703 } ()); 704 a = this.getComputedStyle || 705 function(a) { 706 return this.getPropertyValue = function(b) { 707 var d; 708 return "float" === b && (b = "styleFloat"), 709 c.test(b) && b.replace(c, 710 function(a, b) { 711 return b.toUpperCase() 712 }), 713 (null != (d = a.currentStyle) ? d[b] : void 0) || null 714 }, 715 this 716 }; 717 c = /(\-([a-z]){1})/g; 718 this.WOW = function() { 719 function c(a) { 720 null == a && (a = {}); 721 this.scrollCallback = e(this.scrollCallback, this); 722 this.scrollHandler = e(this.scrollHandler, this); 723 this.resetAnimation = e(this.resetAnimation, this); 724 this.start = e(this.start, this); 725 this.scrolled = !0; 726 this.config = this.util().extend(a, this.defaults); 727 this.animationNameCache = new b; 728 this.wowEvent = this.util().createEvent(this.config.boxClass) 729 } 730 return c.prototype.defaults = { 731 boxClass: "wow", 732 animateClass: "animated", 733 offset: 0, 734 mobile: !0, 735 live: !0, 736 callback: null 737 }, 738 c.prototype.init = function() { 739 var a; 740 return this.element = window.document.documentElement, 741 "interactive" === (a = document.readyState) || "complete" === a ? this.start() : this.util().addEvent(document, "DOMContentLoaded", this.start), 742 this.finished = [] 743 }, 744 c.prototype.start = function() { 745 var a, b, c, e; 746 if (this.stopped = !1, this.boxes = function() { 747 var b, f, c, p; 748 c = this.element.querySelectorAll("." + this.config.boxClass); 749 p = []; 750 b = 0; 751 for (f = c.length; f > b; b++) a = c[b], 752 p.push(a); 753 return p 754 }.call(this), this.all = function() { 755 var b, f, c, p; 756 c = this.boxes; 757 p = []; 758 b = 0; 759 for (f = c.length; f > b; b++) a = c[b], 760 p.push(a); 761 return p 762 }.call(this), this.boxes.length) if (this.disabled()) this.resetStyle(); 763 else for (e = this.boxes, b = 0, c = e.length; c > b; b++) a = e[b], 764 this.applyStyle(a, !0); 765 return this.disabled() || (this.util().addEvent(window, "scroll", this.scrollHandler), this.util().addEvent(window, "resize", this.scrollHandler), this.interval = setInterval(this.scrollCallback, 50)), 766 this.config.live ? (new d(function(a) { 767 return function(f) { 768 var b, c, h, d, k; 769 k = []; 770 b = 0; 771 for (c = f.length; c > b; b++) d = f[b], 772 k.push(function() { 773 var a, f, b, c; 774 b = d.addedNodes || []; 775 c = []; 776 a = 0; 777 for (f = b.length; f > a; a++) h = b[a], 778 c.push(this.doSync(h)); 779 return c 780 }.call(a)); 781 return k 782 } 783 } (this))).observe(document.body, { 784 childList: !0, 785 subtree: !0 786 }) : void 0 787 }, 788 c.prototype.stop = function() { 789 return this.stopped = !0, 790 this.util().removeEvent(window, "scroll", this.scrollHandler), 791 this.util().removeEvent(window, "resize", this.scrollHandler), 792 null != this.interval ? clearInterval(this.interval) : void 0 793 }, 794 c.prototype.sync = function() { 795 return d.notSupported ? this.doSync(this.element) : void 0 796 }, 797 c.prototype.doSync = function(a) { 798 var b, c, d, e; 799 if (null == a && (a = this.element), 1 === a.nodeType) { 800 a = a.parentNode || a; 801 d = a.querySelectorAll("." + this.config.boxClass); 802 e = []; 803 b = 0; 804 for (c = d.length; c > b; b++) a = d[b], 805 0 > g.call(this.all, a) ? (this.boxes.push(a), this.all.push(a), this.stopped || this.disabled() ? this.resetStyle() : this.applyStyle(a, !0), e.push(this.scrolled = !0)) : e.push(void 0); 806 return e 807 } 808 }, 809 c.prototype.show = function(a) { 810 return this.applyStyle(a), 811 a.className = a.className + " " + this.config.animateClass, 812 null != this.config.callback && this.config.callback(a), 813 this.util().emitEvent(a, this.wowEvent), 814 this.util().addEvent(a, "animationend", this.resetAnimation), 815 this.util().addEvent(a, "oanimationend", this.resetAnimation), 816 this.util().addEvent(a, "webkitAnimationEnd", this.resetAnimation), 817 this.util().addEvent(a, "MSAnimationEnd", this.resetAnimation), 818 a 819 }, 820 c.prototype.applyStyle = function(a, b) { 821 var c, d, e; 822 return d = a.getAttribute("data-wow-duration"), 823 c = a.getAttribute("data-wow-delay"), 824 e = a.getAttribute("data-wow-iteration"), 825 this.animate(function(f) { 826 return function() { 827 return f.customStyle(a, b, d, c, e) 828 } 829 } (this)) 830 }, 831 c.prototype.animate = function() { 832 return "requestAnimationFrame" in window ? 833 function(a) { 834 return window.requestAnimationFrame(a) 835 }: function(a) { 836 return a() 837 } 838 } (), 839 c.prototype.resetStyle = function() { 840 var a, b, c, d, e; 841 d = this.boxes; 842 e = []; 843 b = 0; 844 for (c = d.length; c > b; b++) a = d[b], 845 e.push(a.style.visibility = "visible"); 846 return e 847 }, 848 c.prototype.resetAnimation = function(a) { 849 var b; 850 return 0 <= a.type.toLowerCase().indexOf("animationend") ? (b = a.target || a.srcElement, b.className = b.className.replace(this.config.animateClass, "").trim()) : void 0 851 }, 852 c.prototype.customStyle = function(a, b, c, d, e) { 853 return b && this.cacheAnimationName(a), 854 a.style.visibility = b ? "hidden": "visible", 855 c && this.vendorSet(a.style, { 856 animationDuration: c 857 }), 858 d && this.vendorSet(a.style, { 859 animationDelay: d 860 }), 861 e && this.vendorSet(a.style, { 862 animationIterationCount: e 863 }), 864 this.vendorSet(a.style, { 865 animationName: b ? "none": this.cachedAnimationName(a) 866 }), 867 a 868 },
869 c.prototype.vendors = ["moz", "webkit"], 870 c.prototype.vendorSet = function(a, b) { 871 var c, d, e, f; 872 d = []; 873 for (c in b) e = b[c], 874 a["" + c] = e, 875 d.push(function() { 876 var b, p, h, d; 877 h = this.vendors; 878 d = []; 879 b = 0; 880 for (p = h.length; p > b; b++) f = h[b], 881 d.push(a["" + f + c.charAt(0).toUpperCase() + c.substr(1)] = e); 882 return d 883 }.call(this)); 884 return d 885 }, 886 c.prototype.vendorCSS = function(b, c) { 887 var d, e, g, f, m, p; 888 m = a(b); 889 f = m.getPropertyCSSValue(c); 890 g = this.vendors; 891 d = 0; 892 for (e = g.length; e > d; d++) p = g[d], 893 f = f || m.getPropertyCSSValue("-" + p + "-" + c); 894 return f 895 }, 896 c.prototype.animationName = function(b) { 897 var c; 898 try { 899 c = this.vendorCSS(b, "animation-name").cssText 900 } catch(d) { 901 c = a(b).getPropertyValue("animation-name") 902 } 903 return "none" === c ? "": c 904 }, 905 c.prototype.cacheAnimationName = function(a) { 906 return this.animationNameCache.set(a, this.animationName(a)) 907 }, 908 c.prototype.cachedAnimationName = function(a) { 909 return this.animationNameCache.get(a) 910 }, 911 c.prototype.scrollHandler = function() { 912 return this.scrolled = !0 913 }, 914 c.prototype.scrollCallback = function() { 915 var a; 916 if (! (a = !this.scrolled)) { 917 this.scrolled = !1; 918 var b, c, d, e; 919 d = this.boxes; 920 e = []; 921 b = 0; 922 for (c = d.length; c > b; b++)(a = d[b]) && (this.isVisible(a) ? this.show(a) : e.push(a)); 923 a = (this.boxes = e, this.boxes.length || this.config.live) 924 } 925 return a ? void 0 : this.stop() 926 }, 927 c.prototype.offsetTop = function(a) { 928 for (var b; void 0 === a.offsetTop;) a = a.parentNode; 929 for (b = a.offsetTop; a = a.offsetParent;) b += a.offsetTop; 930 return b 931 }, 932 c.prototype.isVisible = function(a) { 933 var b, c, d, e, f; 934 return c = a.getAttribute("data-wow-offset") || this.config.offset, 935 f = window.pageYOffset, 936 e = f + Math.min(this.element.clientHeight, this.util().innerHeight()) - c, 937 d = this.offsetTop(a), 938 b = d + a.clientHeight, 939 e >= d && b >= f 940 }, 941 c.prototype.util = function() { 942 return null != this._util ? this._util: this._util = new t 943 }, 944 c.prototype.disabled = function() { 945 return ! this.config.mobile && this.util().isMobile(navigator.userAgent) 946 }, 947 c 948 } () 949}).call(this); 950var QRCode; ! 951function() { 952 function d(a) { 953 this.mode = g.MODE_8BIT_BYTE; 954 this.data = a; 955 this.parsedData = []; 956 a = []; 957 for (var b = 0, 958 c = this.data.length; c > b; b++) { 959 var h = this.data.charCodeAt(b); 960 65536 < h ? (a[0] = 240 | (1835008 & h) >>> 18, a[1] = 128 | (258048 & h) >>> 12, a[2] = 128 | (4032 & h) >>> 6, a[3] = 128 | 63 & h) : 2048 < h ? (a[0] = 224 | (61440 & h) >>> 12, a[1] = 128 | (4032 & h) >>> 6, a[2] = 128 | 63 & h) : 128 < h ? (a[0] = 192 | (1984 & h) >>> 6, a[1] = 128 | 63 & h) : a[0] = h; 961 this.parsedData = this.parsedData.concat(a) 962 } 963 this.parsedData.length != this.data.length && (this.parsedData.unshift(191), this.parsedData.unshift(187), this.parsedData.unshift(239)) 964 } 965 function t(a, b) { 966 this.typeNumber = a; 967 this.errorCorrectLevel = b; 968 this.modules = null; 969 this.moduleCount = 0; 970 this.dataCache = null; 971 this.dataList = [] 972 } 973 function b(a, b) { 974 if (void 0 == a.length) throw Error(a.length + "/" + b); 975 for (var c = 0; c < a.length && 0 == a[c];) c++; 976 this.num = Array(a.length - c + b); 977 for (var h = 0; h < a.length - c; h++) this.num[h] = a[h + c] 978 } 979 function a(a, b) { 980 this.totalCount = a; 981 this.dataCount = b 982 } 983 function c() { 984 this.buffer = []; 985 this.length = 0 986 } 987 function e() { 988 var a = !1, 989 b = navigator.userAgent; 990 return /android/i.test(b) && (a = !0, aMat = b.toString().match(/android ([0-9]\.[0-9])/i), aMat && aMat[1] && (a = parseFloat(aMat[1]))), 991 a 992 } 993 d.prototype = { 994 getLength: function() { 995 return this.parsedData.length 996 }, 997 write: function(a) { 998 for (var b = 0, 999 c = this.parsedData.length; c > b; b++) a.put(this.parsedData[b], 8) 1000 } 1001 }; 1002 t.prototype = { 1003 addData: function(a) { 1004 a = new d(a); 1005 this.dataList.push(a); 1006 this.dataCache = null 1007 }, 1008 isDark: function(a, b) { 1009 if (0 > a || this.moduleCount <= a || 0 > b || this.moduleCount <= b) throw Error(a + "," + b); 1010 return this.modules[a][b] 1011 }, 1012 getModuleCount: function() { 1013 return this.moduleCount 1014 }, 1015 make: function() { 1016 this.makeImpl(!1, this.getBestMaskPattern()) 1017 }, 1018 makeImpl: function(a, b) { 1019 this.moduleCount = 4 * this.typeNumber + 17; 1020 this.modules = Array(this.moduleCount); 1021 for (var c = 0; c < this.moduleCount; c++) { 1022 this.modules[c] = Array(this.moduleCount); 1023 for (var h = 0; h < this.moduleCount; h++) this.modules[c][h] = null 1024 } 1025 this.setupPositionProbePattern(0, 0); 1026 this.setupPositionProbePattern(this.moduleCount - 7, 0); 1027 this.setupPositionProbePattern(0, this.moduleCount - 7); 1028 this.setupPositionAdjustPattern(); 1029 this.setupTimingPattern(); 1030 this.setupTypeInfo(a, b); 1031 7 <= this.typeNumber && this.setupTypeNumber(a); 1032 null == this.dataCache && (this.dataCache = t.createData(this.typeNumber, this.errorCorrectLevel, this.dataList)); 1033 this.mapData(this.dataCache, b) 1034 }, 1035 setupPositionProbePattern: function(a, b) { 1036 for (var c = -1; 7 >= c; c++) if (! ( - 1 >= a + c || this.moduleCount <= a + c)) for (var h = -1; 7 >= h; h++) - 1 >= b + h || this.moduleCount <= b + h || (this.modules[a + c][b + h] = 0 <= c && 6 >= c && (0 == h || 6 == h) || 0 <= h && 6 >= h && (0 == c || 6 == c) || 2 <= c && 4 >= c && 2 <= h && 4 >= h ? !0 : !1) 1037 }, 1038 getBestMaskPattern: function() { 1039 for (var a = 0, 1040 b = 0, 1041 c = 0; 8 > c; c++) { 1042 this.makeImpl(!0, c); 1043 var h = k.getLostPoint(this); (0 == c || a > h) && (a = h, b = c) 1044 } 1045 return b 1046 }, 1047 createMovieClip: function(a, b, c) { 1048 a = a.createEmptyMovieClip(b, c); 1049 this.make(); 1050 for (b = 0; b < this.modules.length; b++) { 1051 c = 1 * b; 1052 for (var h = 0; h < this.modules[b].length; h++) { 1053 var d = 1 * h; 1054 this.modules[b][h] && (a.beginFill(0, 100), a.moveTo(d, c
1054), a.lineTo(d + 1, c), a.lineTo(d + 1, c + 1), a.lineTo(d, c + 1), a.endFill()) 1055 } 1056 } 1057 return a 1058 }, 1059 setupTimingPattern: function() { 1060 for (var a = 8; a < this.moduleCount - 8; a++) null == this.modules[a][6] && (this.modules[a][6] = 0 == a % 2); 1061 for (a = 8; a < this.moduleCount - 8; a++) null == this.modules[6][a] && (this.modules[6][a] = 0 == a % 2) 1062 }, 1063 setupPositionAdjustPattern: function() { 1064 for (var a = k.getPatternPosition(this.typeNumber), b = 0; b < a.length; b++) for (var c = 0; c < a.length; c++) { 1065 var h = a[b], 1066 d = a[c]; 1067 if (null == this.modules[h][d]) for (var e = -2; 2 >= e; e++) for (var g = -2; 2 >= g; g++) this.modules[h + e][d + g] = -2 == e || 2 == e || -2 == g || 2 == g || 0 == e && 0 == g ? !0 : !1 1068 } 1069 }, 1070 setupTypeNumber: function(a) { 1071 for (var b = k.getBCHTypeNumber(this.typeNumber), c = 0; 18 > c; c++) { 1072 var h = !a && 1 == (1 & b >> c); 1073 this.modules[Math.floor(c / 3)][c % 3 + this.moduleCount - 8 - 3] = h 1074 } 1075 for (c = 0; 18 > c; c++) h = !a && 1 == (1 & b >> c), 1076 this.modules[c % 3 + this.moduleCount - 8 - 3][Math.floor(c / 3)] = h 1077 }, 1078 setupTypeInfo: function(a, b) { 1079 for (var c = k.getBCHTypeInfo(this.errorCorrectLevel << 3 | b), h = 0; 15 > h; h++) { 1080 var d = !a && 1 == (1 & c >> h); 1081 6 > h ? this.modules[h][8] = d: 8 > h ? this.modules[h + 1][8] = d: this.modules[this.moduleCount - 15 + h][8] = d 1082 } 1083 for (h = 0; 15 > h; h++) d = !a && 1 == (1 & c >> h), 1084 8 > h ? this.modules[8][this.moduleCount - h - 1] = d: 9 > h ? this.modules[8][15 - h - 1 + 1] = d: this.modules[8][15 - h - 1] = d; 1085 this.modules[this.moduleCount - 8][8] = !a 1086 }, 1087 mapData: function(a, b) { 1088 for (var c = -1, 1089 h = this.moduleCount - 1, 1090 d = 7, 1091 e = 0, 1092 g = this.moduleCount - 1; 0 < g; g -= 2) for (6 == g && g--;;) { 1093 for (var n = 0; 2 > n; n++) if (null == this.modules[h][g - n]) { 1094 var r = !1; 1095 e < a.length && (r = 1 == (1 & a[e] >>> d)); 1096 k.getMask(b, h, g - n) && (r = !r); 1097 this.modules[h][g - n] = r; 1098 d--; - 1 == d && (e++, d = 7) 1099 } 1100 if (h += c, 0 > h || this.moduleCount <= h) { 1101 h -= c; 1102 c = -c; 1103 break 1104 } 1105 } 1106 } 1107 }; 1108 t.PAD0 = 236; 1109 t.PAD1 = 17; 1110 t.createData = function(b, d, e) { 1111 d = a.getRSBlocks(b, d); 1112 for (var h = new c, 1113 s = 0; s < e.length; s++) { 1114 var g = e[s]; 1115 h.put(g.mode, 4); 1116 h.put(g.getLength(), k.getLengthInBits(g.mode, b)); 1117 g.write(h) 1118 } 1119 for (s = b = 0; s < d.length; s++) b += d[s].dataCount; 1120 if (h.getLengthInBits() > 8 * b) throw Error("code length overflow. (" + h.getLengthInBits() + ">" + 8 * b + ")"); 1121 for (h.getLengthInBits() + 4 <= 8 * b && h.put(0, 4); 0 != h.getLengthInBits() % 8;) h.putBit(!1); 1122 for (; ! (h.getLengthInBits() >= 8 * b || (h.put(t.PAD0, 8), h.getLengthInBits() >= 8 * b));) h.put(t.PAD1, 8); 1123 return t.createBytes(h, d) 1124 }; 1125 t.createBytes = function(a, c) { 1126 for (var d = 0, 1127 h = 0, 1128 e = 0, 1129 g = Array(c.length), y = Array(c.length), n = 0; n < c.length; n++) { 1130 var r = c[n].dataCount, 1131 l = c[n].totalCount - r, 1132 h = Math.max(h, r), 1133 e = Math.max(e, l); 1134 g[n] = Array(r); 1135 for (var q = 0; q < g[n].length; q++) g[n][q] = 255 & a.buffer[q + d]; 1136 d += r; 1137 q = k.getErrorCorrectPolynomial(l); 1138 r = (new b(g[n], q.getLength() - 1)).mod(q); 1139 y[n] = Array(q.getLength() - 1); 1140 for (q = 0; q < y[n].length; q++) l = q + r.getLength() - y[n].length, 1141 y[n][q] = 0 <= l ? r.get(l) : 0 1142 } 1143 for (q = n = 0; q < c.length; q++) n += c[q].totalCount; 1144 d = Array(n);
1145 for (q = r = 0; h > q; q++) for (n = 0; n < c.length; n++) q < g[n].length && (d[r++] = g[n][q]); 1146 for (q = 0; e > q; q++) for (n = 0; n < c.length; n++) q < y[n].length && (d[r++] = y[n][q]); 1147 return d 1148 }; 1149 for (var g = { 1150 MODE_NUMBER: 1, 1151 MODE_ALPHA_NUM: 2, 1152 MODE_8BIT_BYTE: 4, 1153 MODE_KANJI: 8 1154 }, 1155 l = { 1156 L: 1, 1157 M: 0, 1158 Q: 3, 1159 H: 2 1160 }, 1161 k = { 1162 PATTERN_POSITION_TABLE: [[], [6, 18], [6, 22], [6, 26], [6, 30], [6, 34], [6, 22, 38], [6, 24, 42], [6, 26, 46], [6, 28, 50], [6, 30, 54], [6, 32, 58], [6, 34, 62], [6, 26, 46, 66], [6, 26, 48, 70], [6, 26, 50, 74], [6, 30, 54, 78], [6, 30, 56, 82], [6, 30, 58, 86], [6, 34, 62, 90], [6, 28, 50, 72, 94], [6, 26, 50, 74, 98], [6, 30, 54, 78, 102], [6, 28, 54, 80, 106], [6, 32, 58, 84, 110], [6, 30, 58, 86, 114], [6, 34, 62, 90, 118], [6, 26, 50, 74, 98, 122], [6, 30, 54, 78, 102, 126], [6, 26, 52, 78, 104, 130], [6, 30, 56, 82, 108, 134], [6, 34, 60, 86, 112, 138], [6, 30, 58, 86, 114, 142], [6, 34, 62, 90, 118, 146], [6, 30, 54, 78, 102, 126, 150], [6, 24, 50, 76, 102, 128, 154], [6, 28, 54, 80, 106, 132, 158], [6, 32, 58, 84, 110, 136, 162], [6, 26, 54, 82, 110, 138, 166], [6, 30, 58, 86, 114, 142, 170]], 1163 G15: 1335, 1164 G18: 7973, 1165 G15_MASK: 21522, 1166 getBCHTypeInfo: function(a) { 1167 for (var b = a << 10; 0 <= k.getBCHDigit(b) - k.getBCHDigit(k.G15);) b ^= k.G15 << k.getBCHDigit(b) - k.getBCHDigit(k.G15); 1168 return (a << 10 | b) ^ k.G15_MASK 1169 }, 1170 getBCHTypeNumber: function(a) { 1171 for (var b = a << 12; 0 <= k.getBCHDigit(b) - k.getBCHDigit(k.G18);) b ^= k.G18 << k.getBCHDigit(b) - k.getBCHDigit(k.G18); 1172 return a << 12 | b 1173 }, 1174 getBCHDigit: function(a) { 1175 for (var b = 0; 0 != a;) b++, 1176 a >>>= 1; 1177 return b 1178 }, 1179 getPatternPosition: function(a) { 1180 return k.PATTERN_POSITION_TABLE[a - 1] 1181 }, 1182 getMask: function(a, b, c) { 1183 switch (a) { 1184 case 0: 1185 return 0 == (b + c) % 2; 1186 case 1: 1187 return 0 == b % 2; 1188 case 2: 1189 return 0 == c % 3; 1190 case 3: 1191 return 0 == (b + c) % 3; 1192 case 4: 1193 return 0 == (Math.floor(b / 2) + Math.floor(c / 3)) % 2; 1194 case 5: 1195 return 0 == b * c % 2 + b * c % 3; 1196 case 6: 1197 return 0 == (b * c % 2 + b * c % 3) % 2; 1198 case 7: 1199 return 0 == (b * c % 3 + (b + c) % 2) % 2; 1200 default: 1201 throw Error("bad maskPattern:" + a); 1202 } 1203 }, 1204 getErrorCorrectPolynomial: function(a) { 1205 for (var c = new b([1], 0), d = 0; a > d; d++) c = c.multiply(new b([1, v.gexp(d)], 0)); 1206 return c 1207 }, 1208 getLengthInBits: function(a, b) { 1209 if (1 <= b && 10 > b) switch (a) { 1210 case g.MODE_NUMBER: 1211 return 10; 1212 case g.MODE_ALPHA_NUM: 1213 return 9; 1214 case g.MODE_8BIT_BYTE: 1215 return 8; 1216 case g.MODE_KANJI: 1217 return 8; 1218 default: 1219 throw Error("mode:" + a); 1220 } else if (27 > b) switch (a) { 1221 case g.MODE_NUMBER: 1222 return 12; 1223 case g.MODE_ALPHA_NUM: 1224 return 11; 1225 case g.MODE_8BIT_BYTE: 1226 return 16; 1227 case g.MODE_KANJI: 1228 return 10; 1229 default: 1230 throw Error("mode:" + a); 1231 } else { 1232 if (! (41 > b)) throw Error("type:" + b); 1233 switch (a) { 1234 case g.MODE_NUMBER: 1235 return 14; 1236 case g.MODE_ALPHA_NUM: 1237 return 13; 1238 case g.MODE_8BIT_BYTE: 1239 return 16; 1240 case g.MODE_KANJI: 1241 return 12; 1242 default: 1243 throw Error("mode:" + a); 1244 } 1245 } 1246 }, 1247 getLostPoint: function(a) { 1248 for (var b = a.getModuleCount(), c = 0, d = 0; b > d; d++) for (var e = 0; b > e; e++) { 1249 for (var g = 0, 1250 k = a.isDark(d, e), n = -1; 1 >= n; n++) if (! (0 > d + n || d + n >= b)) for (var r = -1; 1 >= r; r++) 0 > e + r || e + r >= b || (0 != n || 0 != r) && k == a.isDark(d + n, e + r) && g++; 1251 5 < g && (c += 3 + g - 5) 1252 } 1253 for (d = 0; b - 1 > d; d++) for (e = 0; b - 1 > e; e++) g = 0, 1254 a.isDark(d, e) && g++, 1255 a.isDark(d + 1, e) && g++, 1256 a.isDark(d, e + 1) && g++, 1257 a.isDark(d + 1, e + 1) && g++, 1258 0 != g && 4 != g || (c += 3); 1259 for (d = 0; b > d; d++) for (e = 0; b - 6 > e; e++) a.isDark(d, e) && !a.isDark(d, e + 1) && a.isDark(d, e + 2) && a.isDark(d, e + 3) && a.isDark(d, e + 4) && !a.isDark(d, e + 5) && a.isDark(d, e + 6) && (c += 40); 1260 for (e = 0; b > e; e++) for (d = 0; b - 6 > d; d++) a.isDark(d, e) && !a.isDark(d + 1, e) && a.isDark(d + 2, e) && a.isDark(d + 3, e) && a.isDark(d + 4, e) && !a.isDark(d + 5, e) && a.isDark(d + 6, e) && (c += 40); 1261 for (e = g = 0; b > e; e++) for (d = 0; b > d; d++) a.isDark(d, e) && g++; 1262 a = Math.abs(100 * g / b / b - 50) / 5; 1263 return c + 10 * a 1264 } 1265 }, 1266 v = { 1267 glog: function(a) { 1268 if (1 > a) throw Error("glog(" + a + ")"); 1269 return v.LOG_TABLE[a] 1270 }, 1271 gexp: function(a) { 1272 for (; 0 > a;) a += 255; 1273 for (; 256 <= a;) a -= 255; 1274 return v.EXP_TABLE[a] 1275 }, 1276 EXP_TABLE: Array(256), 1277 LOG_TABLE: Array(256) 1278 }, 1279 u = 0; 8 > u; u++) v.EXP_TABLE[u] = 1 << u; 1280 for (u = 8; 256 > u; u++) v.EXP_TABLE[u] = v.EXP_TABLE[u - 4] ^ v.EXP_TABLE[u - 5] ^ v.EXP_TABLE[u - 6] ^ v.EXP_TABLE[u - 8]; 1281 for (u = 0; 255 > u; u++) v.LOG_TABLE[v.EXP_TABLE[u]] = u; 1282 b.prototype = { 1283 get: function(a) { 1284 return this.num[a] 1285 }, 1286 getLength: function() { 1287 return this.num.length 1288 }, 1289 multiply: function(a) { 1290 for (var c = Array(this.getLength() + a.getLength() - 1), d = 0; d < this.getLength(); d++) for (var e = 0; e < a.getLength(); e++) c[d + e] ^= v.gexp(v.glog(this.get(d)) + v.glog(a.get(e))); 1291 return new b(c, 0) 1292 }, 1293 mod: function(a) { 1294 if (0 > this.getLength() - a.getLength()) return this; 1295 for (var c = v.glog(this.get(0)) - v.glog(a.get(0)), d = Array(this.getLength()), e = 0; e < this.getLength();
1295 e++) d[e] = this.get(e); 1296 for (e = 0; e < a.getLength(); e++) d[e] ^= v.gexp(v.glog(a.get(e)) + c); 1297 return (new b(d, 0)).mod(a) 1298 } 1299 }; 1300 a.RS_BLOCK_TABLE = [[1, 26, 19], [1, 26, 16], [1, 26, 13], [1, 26, 9], [1, 44, 34], [1, 44, 28], [1, 44, 22], [1, 44, 16], [1, 70, 55], [1, 70, 44], [2, 35, 17], [2, 35, 13], [1, 100, 80], [2, 50, 32], [2, 50, 24], [4, 25, 9], [1, 134, 108], [2, 67, 43], [2, 33, 15, 2, 34, 16], [2, 33, 11, 2, 34, 12], [2, 86, 68], [4, 43, 27], [4, 43, 19], [4, 43, 15], [2, 98, 78], [4, 49, 31], [2, 32, 14, 4, 33, 15], [4, 39, 13, 1, 40, 14], [2, 121, 97], [2, 60, 38, 2, 61, 39], [4, 40, 18, 2, 41, 19], [4, 40, 14, 2, 41, 15], [2, 146, 116], [3, 58, 36, 2, 59, 37], [4, 36, 16, 4, 37, 17], [4, 36, 12, 4, 37, 13], [2, 86, 68, 2, 87, 69], [4, 69, 43, 1, 70, 44], [6, 43, 19, 2, 44, 20], [6, 43, 15, 2, 44, 16], [4, 101, 81], [1, 80, 50, 4, 81, 51], [4, 50, 22, 4, 51, 23], [3, 36, 12, 8, 37, 13], [2, 116, 92, 2, 117, 93], [6, 58, 36, 2, 59, 37], [4, 46, 20, 6, 47, 21], [7, 42, 14, 4, 43, 15], [4, 133, 107], [8, 59, 37, 1, 60, 38], [8, 44, 20, 4, 45, 21], [12, 33, 11, 4, 34, 12], [3, 145, 115, 1, 146, 116], [4, 64, 40, 5, 65, 41], [11, 36, 16, 5, 37, 17], [11, 36, 12, 5, 37, 13], [5, 109, 87, 1, 110, 88], [5, 65, 41, 5, 66, 42], [5, 54, 24, 7, 55, 25], [11, 36, 12], [5, 122, 98, 1, 123, 99], [7, 73, 45, 3, 74, 46], [15, 43, 19, 2, 44, 20], [3, 45, 15, 13, 46, 16], [1, 135, 107, 5, 136, 108], [10, 74, 46, 1, 75, 47], [1, 50, 22, 15, 51, 23], [2, 42, 14, 17, 43, 15], [5, 150, 120, 1, 151, 121], [9, 69, 43, 4, 70, 44], [17, 50, 22, 1, 51, 23], [2, 42, 14, 19, 43, 15], [3, 141, 113, 4, 142, 114], [3, 70, 44, 11, 71, 45], [17, 47, 21, 4, 48, 22], [9, 39, 13, 16, 40, 14], [3, 135, 107, 5, 136, 108], [3, 67, 41, 13, 68, 42], [15, 54, 24, 5, 55, 25], [15, 43, 15, 10, 44, 16], [4, 144, 116, 4, 145, 117], [17, 68, 42], [17, 50, 22, 6, 51, 23], [19, 46, 16, 6, 47, 17], [2, 139, 111, 7, 140, 112], [17, 74, 46], [7, 54, 24, 16, 55, 25], [34, 37, 13], [4, 151, 121, 5, 152, 122], [4, 75, 47, 14, 76, 48], [11, 54, 24, 14, 55, 25], [16, 45, 15, 14, 46, 16], [6, 147, 117, 4, 148, 118], [6, 73, 45, 14, 74, 46], [11, 54, 24, 16, 55, 25], [30, 46, 16, 2, 47, 17], [8, 132, 106, 4, 133, 107], [8, 75, 47, 13, 76, 48], [7, 54, 24, 22, 55, 25], [22, 45, 15, 13, 46, 16], [10, 142, 114, 2, 143, 115], [19, 74, 46, 4, 75, 47], [28, 50, 22, 6, 51, 23], [33, 46, 16, 4, 47, 17], [8, 152, 122, 4, 153, 123], [22, 73, 45, 3, 74, 46], [8, 53, 23, 26, 54, 24], [12, 45, 15, 28, 46, 16], [3, 147, 117, 10, 148, 118], [3, 73, 45, 23, 74, 46], [4, 54, 24, 31, 55, 25], [11, 45, 15, 31, 46, 16], [7, 146, 116, 7, 147, 117], [21, 73, 45, 7, 74, 46], [1, 53, 23, 37, 54, 24], [19, 45, 15, 26, 46, 16], [5, 145, 115, 10, 146, 116], [19, 75, 47, 10, 76, 48], [15, 54, 24, 25, 55, 25], [23, 45, 15, 25, 46, 16], [13, 145, 115, 3, 146, 116], [2, 74, 46, 29, 75, 47], [42, 54, 24, 1, 55, 25], [23, 45, 15, 28, 46, 16], [17, 145, 115], [10, 74, 46, 23, 75, 47], [10, 54, 24, 35, 55, 25], [19, 45, 15, 35, 46, 16], [17, 145, 115, 1, 146, 116], [14, 74, 46, 21, 75, 47], [29, 54, 24, 19, 55, 25], [11, 45, 15, 46, 46, 16], [13, 145, 115, 6, 146, 116], [14, 74, 46, 23, 75, 47], [44, 54, 24, 7, 55, 25], [59, 46, 16, 1, 47, 17], [12, 151, 121, 7, 152, 122], [12, 75, 47, 26, 76, 48], [39, 54, 24, 14, 55, 25], [22, 45, 15, 41, 46, 16], [6, 151, 121, 14, 152, 122], [6, 75, 47, 34, 76, 48], [46, 54, 24, 10, 55, 25], [2, 45, 15, 64, 46, 16], [17, 152, 122, 4, 153, 123], [29, 74, 46, 14, 75, 47], [49, 54, 24, 10, 55, 25], [24, 45, 15, 46, 46, 16], [4, 152, 122, 18, 153, 123], [13, 74, 46, 32, 75, 47], [48, 54, 24, 14, 55, 25], [42, 45, 15, 32, 46, 16], [20, 147, 117, 4, 148, 118], [40, 75, 47, 7, 76, 48], [43, 54, 24, 22, 55, 25], [10, 45, 15, 67, 46, 16], [19, 148, 118, 6, 149, 119], [18, 75, 47, 31, 76, 48], [34, 54, 24, 34, 55, 25], [20, 45, 15, 61, 46, 16]]; 1301 a.getRSBlocks = function(b, c) { 1302 var d = a.getRsBlockTable(b, c); 1303 if (void 0 == d) throw Error("bad rs block @ typeNumber:" + b + "/errorCorrectLevel:" + c); 1304 for (var e = d.length / 3, 1305 g = [], w = 0; e > w; w++) for (var k = d[3 * w + 0], n = d[3 * w + 1], r = d[3 * w + 2], l = 0; k > l; l++) g.push(new a(n, r)); 1306 return g 1307 }; 1308 a.getRsBlockTable = function(b, c) { 1309 switch (c) { 1310 case l.L: 1311 return a.RS_BLOCK_TABLE[4 * (b - 1) + 0]; 1312 case l.M: 1313 return a.RS_BLOCK_TABLE[4 * (b - 1) + 1];
1314 case l.Q: 1315 return a.RS_BLOCK_TABLE[4 * (b - 1) + 2]; 1316 case l.H: 1317 return a.RS_BLOCK_TABLE[4 * (b - 1) + 3] 1318 } 1319 }; 1320 c.prototype = { 1321 get: function(a) { 1322 return 1 == (1 & this.buffer[Math.floor(a / 8)] >>> 7 - a % 8) 1323 }, 1324 put: function(a, b) { 1325 for (var c = 0; b > c; c++) this.putBit(1 == (1 & a >>> b - c - 1)) 1326 }, 1327 getLengthInBits: function() { 1328 return this.length 1329 }, 1330 putBit: function(a) { 1331 var b = Math.floor(this.length / 8); 1332 this.buffer.length <= b && this.buffer.push(0); 1333 a && (this.buffer[b] |= 128 >>> this.length % 8); 1334 this.length++ 1335 } 1336 }; 1337 var x = [[17, 14, 11, 7], [32, 26, 20, 14], [53, 42, 32, 24], [78, 62, 46, 34], [106, 84, 60, 44], [134, 106, 74, 58], [154, 122, 86, 64], [192, 152, 108, 84], [230, 180, 130, 98], [271, 213, 151, 119], [321, 251, 177, 137], [367, 287, 203, 155], [425, 331, 241, 177], [458, 362, 258, 194], [520, 412, 292, 220], [586, 450, 322, 250], [644, 504, 364, 280], [718, 560, 394, 310], [792, 624, 442, 338], [858, 666, 482, 382], [929, 711, 509, 403], [1003, 779, 565, 439], [1091, 857, 611, 461], [1171, 911, 661, 511], [1273, 997, 715, 535], [1367, 1059, 751, 593], [1465, 1125, 805, 625], [1528, 1190, 868, 658], [1628, 1264, 908, 698], [1732, 1370, 982, 742], [1840, 1452, 1030, 790], [1952, 1538, 1112, 842], [2068, 1628, 1168, 898], [2188, 1722, 1228, 958], [2303, 1809, 1283, 983], [2431, 1911, 1351, 1051], [2563, 1989, 1423, 1093], [2699, 2099, 1499, 1139], [2809, 2213, 1579, 1219], [2953, 2331, 1663, 1273]], 1338 u = function() { 1339 var a = function(a, b) { 1340 this._el = a; 1341 this._htOption = b 1342 }; 1343 return a.prototype.draw = function(a) { 1344 function b(a, c) { 1345 var d = document.createElementNS("http://www.w3.org/2000/svg", a), 1346 e; 1347 for (e in c) c.hasOwnProperty(e) && d.setAttribute(e, c[e]); 1348 return d 1349 } 1350 var c = this._htOption, 1351 d = this._el, 1352 e = a.getModuleCount(); 1353 Math.floor(c.width / e); 1354 Math.floor(c.height / e); 1355 this.clear(); 1356 var f = b("svg", {
1357 viewBox: "0 0 " + String(e) + " " + String(e), 1358 width: "100%", 1359 height: "100%", 1360 fill: c.colorLight 1361 }); 1362 f.setAttributeNS("http://www.w3.org/2000/xmlns/", "xmlns:xlink", "http://www.w3.org/1999/xlink"); 1363 d.appendChild(f); 1364 f.appendChild(b("rect", { 1365 fill: c.colorDark, 1366 width: "1", 1367 height: "1", 1368 id: "template" 1369 })); 1370 for (c = 0; e > c; c++) for (d = 0; e > d; d++) if (a.isDark(c, d)) { 1371 var g = b("use", { 1372 x: String(c), 1373 y: String(d) 1374 }); 1375 g.setAttributeNS("http://www.w3.org/1999/xlink", "href", "#template"); 1376 f.appendChild(g) 1377 } 1378 }, 1379 a.prototype.clear = function() { 1380 for (; this._el.hasChildNodes();) this._el.removeChild(this._el.lastChild) 1381 }, 1382 a 1383 } (), 1384 A = "svg" === document.documentElement.tagName.toLowerCase() ? u: "undefined" != typeof CanvasRenderingContext2D ? 1385 function() { 1386 function a() { 1387 this._elImage.src = this._elCanvas.toDataURL("image/png"); 1388 this._elImage.style.display = "block"; 1389 this._elCanvas.style.display = "none" 1390 } 1391 function b(a, c) { 1392 var d = this; 1393 if (d._fFail = c, d._fSuccess = a, null === d._bSupportDataURI) { 1394 var e = document.createElement("img"), 1395 f = function() { 1396 d._bSupportDataURI = !1; 1397 d._fFail && _fFail.call(d) 1398 }; 1399 return e.onabort = f, 1400 e.onerror = f, 1401 e.onload = function() { 1402 d._bSupportDataURI = !0; 1403 d._fSuccess && d._fSuccess.call(d) 1404 }, 1405 e.src = "data:image/gif;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg==", 1406 void 0 1407 } ! 0 === d._bSupportDataURI && d._fSuccess ? d._fSuccess.call(d) : !1 === d._bSupportDataURI && d._fFail && d._fFail.call(d) 1408 } 1409 if (this._android && 2.1 >= this._android) { 1410 var c = 1 / window.devicePixelRatio, 1411 d = CanvasRenderingContext2D.prototype.drawImage; 1412 CanvasRenderingContext2D.prototype.drawImage = function(a, b, e, f, g, m, k, l) { 1413 if ("nodeName" in a && /img/i.test(a.nodeName)) for (var s = arguments.length - 1; 1 <= s; s--) arguments[s] *= c; 1414 else "undefined" == typeof l && (arguments[1] *= c, arguments[2] *= c, arguments[3] *= c, arguments[4] *= c); 1415 d.apply(this, arguments) 1416 } 1417 } 1418 var g = function(a, b) { 1419 this._bIsPainted = !1; 1420 this._android = e(); 1421 this._htOption = b; 1422 this._elCanvas = document.createElement("canvas"); 1423 this._elCanvas.width = b.width;
1424 this._elCanvas.height = b.height; 1425 a.appendChild(this._elCanvas); 1426 this._el = a; 1427 this._oContext = this._elCanvas.getContext("2d"); 1428 this._bIsPainted = !1; 1429 this._elImage = document.createElement("img"); 1430 this._elImage.style.display = "none"; 1431 this._el.appendChild(this._elImage); 1432 this._bSupportDataURI = null 1433 }; 1434 return g.prototype.draw = function(a) { 1435 var b = this._elImage, 1436 c = this._oContext, 1437 d = this._htOption, 1438 e = a.getModuleCount(), 1439 f = d.width / e, 1440 h = d.height / e, 1441 g = Math.round(f), 1442 m = Math.round(h); 1443 b.style.display = "none"; 1444 this.clear(); 1445 for (b = 0; e > b; b++) for (var p = 0; e > p; p++) { 1446 var k = a.isDark(b, p), 1447 l = p * f, 1448 s = b * h; 1449 c.strokeStyle = k ? d.colorDark: d.colorLight; 1450 c.lineWidth = 1; 1451 c.fillStyle = k ? d.colorDark: d.colorLight; 1452 c.fillRect(l, s, f, h); 1453 c.strokeRect(Math.floor(l) + 0.5, Math.floor(s) + 0.5, g, m); 1454 c.strokeRect(Math.ceil(l) - 0.5, Math.ceil(s) - 0.5, g, m) 1455 } 1456 this._bIsPainted = !0 1457 }, 1458 g.prototype.makeImage = function() { 1459 this._bIsPainted && b.call(this, a) 1460 }, 1461 g.prototype.isPainted = function() { 1462 return this._bIsPainted 1463 }, 1464 g.prototype.clear = function() { 1465 this._oContext.clearRect(0, 0, this._elCanvas.width, this._elCanvas.height); 1466 this._bIsPainted = !1 1467 }, 1468 g.prototype.round = function(a) { 1469 return a ? Math.floor(1E3 * a) / 1E3: a 1470 }, 1471 g 1472 } () : function() { 1473 var a = function(a, b) { 1474 this._el = a; 1475 this._htOption = b 1476 }; 1477 return a.prototype.draw = function(a) { 1478 for (var b = this._htOption, 1479 c = this._el, 1480 d = a.getModuleCount(), e = Math.floor(b.width / d), f = Math.floor(b.height / d), g = ['<table style="border:0;border-collapse:collapse;">'], k = 0; d > k; k++) { 1481 g.push("<tr>"); 1482 for (var l = 0; d > l; l++) g.push('<td style="border:0;border-collapse:collapse;padding:0;margin:0;width:' + e + "px;height:" + f + "px;background-color:" + (a.isDark(k, l) ? b.colorDark: b.colorLight) + ';"></td>'); 1483 g.push("</tr>") 1484 } 1485 g.push("</table>"); 1486 c.innerHTML = g.join(""); 1487 a = c.childNodes[0]; 1488 c = (b.width - a.offsetWidth) / 2; 1489 b = (b.height - a.offsetHeight) / 2; 1490 0 < c && 0 < b && (a.style.margin = b + "px " + c + "px") 1491 }, 1492 a.prototype.clear = function() { 1493 this._el.innerHTML = "" 1494 }, 1495 a 1496 } (); 1497 QRCode = function(a, b) { 1498 if (this._htOption = { 1499 width: 256, 1500 height: 256, 1501 typeNumber: 4, 1502 colorDark: "#000000", 1503 colorLight: "#ffffff", 1504 correctLevel: l.H 1505 }, 1506 "string" == typeof b && (b = { 1507 text: b 1508 }), b) for (var c in b) this._htOption[c] = b[c]; 1509 "string" == typeof a && (a = document.getElementById(a)); 1510 this._android = e(); 1511 this._el = a; 1512 this._oQRCode = null; 1513 this._oDrawing = new A(this._el, this._htOption); 1514 this._htOption.text && this.makeCode(this._htOption.text) 1515 }; 1516 QRCode.prototype.makeCode = function(a) { 1517 var b = this._htOption.correctLevel, 1518 c = 1, 1519 d; 1520 d = encodeURI(a).toString().replace(/\%[0-9a-fA-F]{2}/g, "a"); 1521 d = d.length + (d.length != a ? 3 : 0); 1522 for (var e = 0, 1523 g = x.length; g >= e; e++) { 1524 var k = 0; 1525 switch (b) { 1526 case l.L: 1527 k = x[e][0]; 1528 break; 1529 case l.M: 1530 k = x[e][1]; 1531 break; 1532 case l.Q: 1533 k = x[e][2]; 1534 break; 1535 case l.H: 1536 k = x[e][3] 1537 } 1538 if (k >= d) break; 1539 c++ 1540 } 1541 if (c > x.length) throw Error("Too long data"); 1542 this._oQRCode = new t(c, this._htOption.correctLevel); 1543 this._oQRCode.addData(a); 1544 this._oQRCode.make(); 1545 this._el.title = a; 1546 this._oDrawing.draw(this._oQRCode); 1547 this.makeImage() 1548 }; 1549 QRCode.prototype.makeImage = function() { 1550 "function" == typeof this._oDrawing.makeImage && (!this._android || 3 <= this._android) && this._oDrawing.makeImage() 1551 }; 1552 QRCode.prototype.clear = function() { 1553 this._oDrawing.clear() 1554 }; 1555 QRCode.CorrectLevel = l 1556} ();; (function(a, b, c) { 1557 "use strict"; 1558 var d = b.event, 1559 e = b.event.handle ? "handle": "dispatch", 1560 f; 1561 d.special.smartresize = { 1562 setup: function() { 1563 b(this).bind("resize", d.special.smartresize.handler) 1564 }, 1565 teardown: function() { 1566 b(this).unbind("resize", d.special.smartresize.handler) 1567 }, 1568 handler: function(a, b) { 1569 var c = this, 1570 g = arguments; 1571 a.type = "smartresize", 1572 f && clearTimeout(f), 1573 f = setTimeout(function() { 1574 d[e].apply(c, g) 1575 }, 1576 b === "execAsap" ? 0 : 100) 1577 } 1578 }, 1579 b.fn.smartresize = function(a) { 1580 return a ? this.bind("smartresize", a) : this.trigger("smartresize", ["execAsap"]) 1581 }, 1582 b.Mason = function(a, c) { 1583 this.element = b(c), 1584 this._create(a), 1585 this._init() 1586 }, 1587 b.Mason.settings = { 1588 isResizable: !0, 1589 isAnimated: !1, 1590 animationOptions: { 1591 queue: !1, 1592 duration: 500 1593 }, 1594 gutterWidth: 0, 1595 isRTL: !1, 1596 isFitWidth: !1, 1597 containerStyle: { 1598 position: "relative" 1599 } 1600 }, 1601 b.Mason.prototype = { 1602 _filterFindBricks: function(a) { 1603 var b = this.options.itemSelector; 1604 return b ? a.filter(b).add(a.find(b)) : a 1605 }, 1606 _getBricks: function(a) { 1607 var b = this._filterFindBricks(a).css({ 1608 position: "absolute" 1609 }).addClass("masonry-brick"); 1610 return b 1611 }, 1612 _create: function(c) { 1613 this.options = b.extend(!0, {}, 1614 b.Mason.settings, c), 1615 this.styleQueue = []; 1616 var d = this.element[0].style; 1617 this.originalStyle = { 1618 height: d.height || "" 1619 }; 1620 var e = this.options.containerStyle; 1621 for (var f in e) this.originalStyle[f] = d[f] || ""; 1622 this.element.css(e), 1623 this.horizontalDirection = this.options.isRTL ? "right": "left"; 1624 var g = this.element.css("padding-" + this.horizontalDirection), 1625 h = this.element.css("padding-top"); 1626 this.offset = { 1627 x: g ? parseInt(g, 10) : 0, 1628 y: h ? parseInt(h, 10) : 0 1629 }, 1630 this.isFluid = this.options.columnWidth && typeof this.options.columnWidth == "function"; 1631 var i = this; 1632 setTimeout(function() { 1633 i.element.addClass("masonry") 1634 }, 1635 0), 1636 this.options.isResizable && b(a).bind("smartresize.masonry", 1637 function() { 1638 i.resize() 1639 }), 1640 this.reloadItems() 1641 }, 1642 _init: function(a) { 1643 this._getColumns(), 1644 this._reLayout(a) 1645 }, 1646 option: function(a, c) { 1647 b.isPlainObject(a) && (this.options = b.extend(!0, this.options, a)) 1648 }, 1649 layout: function(a, b) { 1650 for (var c = 0, 1651 d = a.length; c < d; c++) this._placeBrick(a[c]); 1652 var e = {}; 1653 e.height = Math.max.apply(Math, this.colYs); 1654 if (this.options.isFitWidth) { 1655 var f = 0; 1656 c = this.cols; 1657 while (--c) { 1658 if (this.colYs[c] !== 0) break; 1659 f++ 1660 }
1661 e.width = (this.cols - f) * this.columnWidth - this.options.gutterWidth 1662 } 1663 this.styleQueue.push({ 1664 $el: this.element, 1665 style: e 1666 }); 1667 var g = this.isLaidOut ? this.options.isAnimated ? "animate": "css": "css", 1668 h = this.options.animationOptions, 1669 i; 1670 for (c = 0, d = this.styleQueue.length; c < d; c++) i = this.styleQueue[c], 1671 i.$el[g](i.style, h); 1672 this.styleQueue = [], 1673 b && b.call(a), 1674 this.isLaidOut = !0 1675 }, 1676 _getColumns: function() { 1677 var a = this.options.isFitWidth ? this.element.parent() : this.element, 1678 b = a.width(); 1679 this.columnWidth = this.isFluid ? this.options.columnWidth(b) : this.options.columnWidth || this.$bricks.outerWidth(!0) || b, 1680 this.columnWidth += this.options.gutterWidth, 1681 this.cols = Math.floor((b + this.options.gutterWidth) / this.columnWidth), 1682 this.cols = Math.max(this.cols, 1) 1683 }, 1684 _placeBrick: function(a) { 1685 var c = b(a), 1686 d, 1687 e, 1688 f, 1689 g, 1690 h; 1691 d = Math.ceil(c.outerWidth(!0) / this.columnWidth), 1692 d = Math.min(d, this.cols); 1693 if (d === 1) f = this.colYs; 1694 else { 1695 e = this.cols + 1 - d, 1696 f = []; 1697 for (h = 0; h < e; h++) g = this.colYs.slice(h, h + d), 1698 f[h] = Math.max.apply(Math, g) 1699 } 1700 var i = Math.min.apply(Math, f), 1701 j = 0; 1702 for (var k = 0, 1703 l = f.length; k < l; k++) if (f[k] === i) { 1704 j = k; 1705 break 1706 } 1707 var m = { 1708 top: i + this.offset.y 1709 }; 1710 m[this.horizontalDirection] = this.columnWidth * j + this.offset.x, 1711 this.styleQueue.push({ 1712 $el: c, 1713 style: m 1714 }); 1715 var n = i + c.outerHeight(!0), 1716 o = this.cols + 1 - l; 1717 for (k = 0; k < o; k++) this.colYs[j + k] = n 1718 }, 1719 resize: function() { 1720 var a = this.cols; 1721 this._getColumns(), 1722 (this.isFluid || this.cols !== a) && this._reLayout() 1723 }, 1724 _reLayout: function(a) { 1725 var b = this.cols; 1726 this.colYs = []; 1727 while (b--) this.colYs.push(0); 1728 this.layout(this.$bricks, a) 1729 }, 1730 reloadItems: function() { 1731 this.$bricks = this._getBricks(this.element.children()) 1732 }, 1733 reload: function(a) { 1734 this.reloadItems(), 1735 this._init(a) 1736 }, 1737 appended: function(a, b, c) { 1738 if (b) { 1739 this._filterFindBricks(a).css({ 1740 top: this.element.height() 1741 }); 1742 var d = this; 1743 setTimeout(function() { 1744 d._appended(a, c) 1745 }, 1746 1) 1747 } else this._appended(a, c) 1748 }, 1749 _appended: function(a, b) { 1750 var c = this._getBricks(a); 1751 this.$bricks = this.$bricks.add(c), 1752 this.layout(c, b) 1753 }, 1754 remove: function(a) { 1755 this.$bricks = this.$bricks.not(a), 1756 a.remove() 1757 }, 1758 destroy: function() { 1759 this.$bricks.removeClass("masonry-brick").each(function() { 1760 this.style.position = "", 1761 this.style.top = "", 1762 this.style.left = "" 1763 }); 1764 var c = this.element[0].style; 1765 for (var d in this.originalStyle) c[d] = this.originalStyle[d]; 1766 this.element.unbind(".masonry").removeClass("masonry").removeData("masonry"), 1767 b(a).unbind(".masonry") 1768 } 1769 }, 1770 b.fn.imagesLoaded = function(a) { 1771 function h() { 1772 a.call(c, d) 1773 } 1774 function i(a) { 1775 var c = a.target; 1776 c.src !== f && b.inArray(c, g) === -1 && (g.push(c), --e <= 0 && (setTimeout(h), d.unbind(".imagesLoaded", i))) 1777 } 1778 var c = this, 1779 d = c.find("img").add(c.filter("img")), 1780 e = d.length, 1781 f = "data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///ywAAAAAAQABAAACAUwAOw==", 1782 g = []; 1783 return e || h(), 1784 d.bind("load.imagesLoaded error.imagesLoaded", i).each(function() { 1785 var a = this.src; 1786 this.src = f, 1787 this.src = a 1788 }), 1789 c 1790 }; 1791 var g = function(b) { 1792 a.console && a.console.error(b) 1793 }; 1794 b.fn.masonry = function(a) { 1795 if (typeof a == "string") { 1796 var c = Array.prototype.slice.call(arguments, 1); 1797 this.each(function() { 1798 var d = b.data(this, "masonry"); 1799 if (!d) { 1800 g("cannot call methods on masonry prior to initialization; attempted to call method '" + a + "'"); 1801 return 1802 } 1803 if (!b.isFunction(d[a]) || a.charAt(0) === "_") { 1804 g("no such method '" + a + "' for masonry instance"); 1805 return 1806 } 1807 d[a].apply(d, c) 1808 }) 1809 } else this.each(function() { 1810 var c = b.data(this, "masonry"); 1811 c ? (c.option(a || {}), c._init()) : b.data(this, "masonry", new b.Mason(a, this)) 1812 }); 1813 return this 1814 } 1815})(window, 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.