" : "", c = parseInt(this._get(t, "firstDay"), 10), c = isNaN(c) ? 0 : c, u = this._get(t, "showWeek"), d = this._get(t, "dayNames"), p = this._get(t, "dayNamesMin"), f = this._get(t, "monthNames"), m = this._get(t, "monthNamesShort"), g = this._get(t, "beforeShowDay"), v = this._get(t, "showOtherMonths"), _ = this._get(t, "selectOtherMonths"), b = this._getDefaultDate(t), y = "", k = 0; Q[0] > k; k++) {
+ for (w = "", this.maxRows = 4, D = 0; Q[1] > D; D++) {
+ if (T = this._daylightSavingAdjust(new Date(te, Z, t.selectedDay)), C = " ui-corner-all", M = "", q) {
+ if (M += "
"
+ }
+ for (M += "
" + (/all|left/.test(C) && 0 === k ? Y ? a : s : "") + (/all|right/.test(C) && 0 === k ? Y ? s : a : "") + this._generateMonthYearHeader(t, Z, te, G, $, k > 0 || D > 0, f, m) + "
" + "
", S = u ? "
" + this._get(t, "weekHeader") + "
" : "", x = 0; 7 > x; x++) N = (x + c) % 7, S += "
", I = this._getDaysInMonth(te, Z), te === t.selectedYear && Z === t.selectedMonth && (t.selectedDay = Math.min(t.selectedDay, I)), P = (this._getFirstDayOfMonth(te, Z) - c + 7) % 7, A = Math.ceil((P + I) / 7), z = q ? this.maxRows > A ? this.maxRows : A : A, this.maxRows = z, H = this._daylightSavingAdjust(new Date(te, Z, 1 - P)), E = 0; z > E; E++) {
+ for (M += "
", F = u ? "
" + this._get(t, "calculateWeek")(H) + "
" : "", x = 0; 7 > x; x++) O = g ? g.apply(t.input ? t.input[0] : null, [H]) : [!0, ""], W = H.getMonth() !== Z, j = W && !_ || !O[0] || G && G > H || $ && H > $, F += "
", H.setDate(H.getDate() + 1), H = this._daylightSavingAdjust(H);
+ M += F + "
"
+ }
+ Z++, Z > 11 && (Z = 0, te++), M += "
" + (q ? "
" + (Q[0] > 0 && D === Q[1] - 1 ? "" : "") : ""), w += M
+ }
+ y += w
+ }
+ return y += l, t._keyEvent = !1, y
+ },
+ _generateMonthYearHeader: function (t, e, i, s, n, a, r, o) {
+ var h, l, c, u, d, p, f, m, g = this._get(t, "changeMonth"), v = this._get(t, "changeYear"),
+ _ = this._get(t, "showMonthAfterYear"), b = "
", y = "";
+ if (a || !g) y += "" + r[e] + ""; else {
+ for (h = s && s.getFullYear() === i, l = n && n.getFullYear() === i, y += ""
+ }
+ if (_ || (b += y + (!a && g && v ? "" : " ")), !t.yearshtml) if (t.yearshtml = "", a || !v) b += "" + i + ""; else {
+ for (u = this._get(t, "yearRange").split(":"), d = (new Date).getFullYear(), p = function (t) {
+ var e = t.match(/c[+\-].*/) ? i + parseInt(t.substring(1), 10) : t.match(/[+\-].*/) ? d + parseInt(t, 10) : parseInt(t, 10);
+ return isNaN(e) ? d : e
+ }, f = p(u[0]), m = Math.max(f, p(u[1] || "")), f = s ? Math.max(f, s.getFullYear()) : f, m = n ? Math.min(m, n.getFullYear()) : m, t.yearshtml += "", b += t.yearshtml, t.yearshtml = null
+ }
+ return b += this._get(t, "yearSuffix"), _ && (b += (!a && g && v ? "" : " ") + y), b += "
"
+ },
+ _adjustInstDate: function (t, e, i) {
+ var s = t.drawYear + ("Y" === i ? e : 0), n = t.drawMonth + ("M" === i ? e : 0),
+ a = Math.min(t.selectedDay, this._getDaysInMonth(s, n)) + ("D" === i ? e : 0),
+ r = this._restrictMinMax(t, this._daylightSavingAdjust(new Date(s, n, a)));
+ t.selectedDay = r.getDate(), t.drawMonth = t.selectedMonth = r.getMonth(), t.drawYear = t.selectedYear = r.getFullYear(), ("M" === i || "Y" === i) && this._notifyChange(t)
+ },
+ _restrictMinMax: function (t, e) {
+ var i = this._getMinMaxDate(t, "min"), s = this._getMinMaxDate(t, "max"), n = i && i > e ? i : e;
+ return s && n > s ? s : n
+ },
+ _notifyChange: function (t) {
+ var e = this._get(t, "onChangeMonthYear");
+ e && e.apply(t.input ? t.input[0] : null, [t.selectedYear, t.selectedMonth + 1, t])
+ },
+ _getNumberOfMonths: function (t) {
+ var e = this._get(t, "numberOfMonths");
+ return null == e ? [1, 1] : "number" == typeof e ? [1, e] : e
+ },
+ _getMinMaxDate: function (t, e) {
+ return this._determineDate(t, this._get(t, e + "Date"), null)
+ },
+ _getDaysInMonth: function (t, e) {
+ return 32 - this._daylightSavingAdjust(new Date(t, e, 32)).getDate()
+ },
+ _getFirstDayOfMonth: function (t, e) {
+ return new Date(t, e, 1).getDay()
+ },
+ _canAdjustMonth: function (t, e, i, s) {
+ var n = this._getNumberOfMonths(t),
+ a = this._daylightSavingAdjust(new Date(i, s + (0 > e ? e : n[0] * n[1]), 1));
+ return 0 > e && a.setDate(this._getDaysInMonth(a.getFullYear(), a.getMonth())), this._isInRange(t, a)
+ },
+ _isInRange: function (t, e) {
+ var i, s, n = this._getMinMaxDate(t, "min"), a = this._getMinMaxDate(t, "max"), r = null, o = null,
+ h = this._get(t, "yearRange");
+ return h && (i = h.split(":"), s = (new Date).getFullYear(), r = parseInt(i[0], 10), o = parseInt(i[1], 10), i[0].match(/[+\-].*/) && (r += s), i[1].match(/[+\-].*/) && (o += s)), (!n || e.getTime() >= n.getTime()) && (!a || e.getTime() <= a.getTime()) && (!r || e.getFullYear() >= r) && (!o || o >= e.getFullYear())
+ },
+ _getFormatConfig: function (t) {
+ var e = this._get(t, "shortYearCutoff");
+ return e = "string" != typeof e ? e : (new Date).getFullYear() % 100 + parseInt(e, 10), {
+ shortYearCutoff: e,
+ dayNamesShort: this._get(t, "dayNamesShort"),
+ dayNames: this._get(t, "dayNames"),
+ monthNamesShort: this._get(t, "monthNamesShort"),
+ monthNames: this._get(t, "monthNames")
+ }
+ },
+ _formatDate: function (t, e, i, s) {
+ e || (t.currentDay = t.selectedDay, t.currentMonth = t.selectedMonth, t.currentYear = t.selectedYear);
+ var n = e ? "object" == typeof e ? e : this._daylightSavingAdjust(new Date(s, i, e)) : this._daylightSavingAdjust(new Date(t.currentYear, t.currentMonth, t.currentDay));
+ return this.formatDate(this._get(t, "dateFormat"), n, this._getFormatConfig(t))
+ }
+ }), t.fn.datepicker = function (e) {
+ if (!this.length) return this;
+ t.datepicker.initialized || (t(document).mousedown(t.datepicker._checkExternalClick), t.datepicker.initialized = !0), 0 === t("#" + t.datepicker._mainDivId).length && t("body").append(t.datepicker.dpDiv);
+ var i = Array.prototype.slice.call(arguments, 1);
+ return "string" != typeof e || "isDisabled" !== e && "getDate" !== e && "widget" !== e ? "option" === e && 2 === arguments.length && "string" == typeof arguments[1] ? t.datepicker["_" + e + "Datepicker"].apply(t.datepicker, [this[0]].concat(i)) : this.each(function () {
+ "string" == typeof e ? t.datepicker["_" + e + "Datepicker"].apply(t.datepicker, [this].concat(i)) : t.datepicker._attachDatepicker(this, e)
+ }) : t.datepicker["_" + e + "Datepicker"].apply(t.datepicker, [this[0]].concat(i))
+ }, t.datepicker = new i, t.datepicker.initialized = !1, t.datepicker.uuid = (new Date).getTime(), t.datepicker.version = "1.10.3"
+})(jQuery);
+(function (t) {
+ var e = 5;
+ t.widget("ui.slider", t.ui.mouse, {
+ version: "1.10.3",
+ widgetEventPrefix: "slide",
+ options: {
+ animate: !1,
+ distance: 0,
+ max: 100,
+ min: 0,
+ orientation: "horizontal",
+ range: !1,
+ step: 1,
+ value: 0,
+ values: null,
+ change: null,
+ slide: null,
+ start: null,
+ stop: null
+ },
+ _create: function () {
+ this._keySliding = !1, this._mouseSliding = !1, this._animateOff = !0, this._handleIndex = null, this._detectOrientation(), this._mouseInit(), this.element.addClass("ui-slider ui-slider-" + this.orientation + " ui-widget" + " ui-widget-content" + " ui-corner-all"), this._refresh(), this._setOption("disabled", this.options.disabled), this._animateOff = !1
+ },
+ _refresh: function () {
+ this._createRange(), this._createHandles(), this._setupEvents(), this._refreshValue()
+ },
+ _createHandles: function () {
+ var e, i, s = this.options,
+ n = this.element.find(".ui-slider-handle").addClass("ui-state-default ui-corner-all"),
+ a = "", o = [];
+ for (i = s.values && s.values.length || 1, n.length > i && (n.slice(i).remove(), n = n.slice(0, i)), e = n.length; i > e; e++) o.push(a);
+ this.handles = n.add(t(o.join("")).appendTo(this.element)), this.handle = this.handles.eq(0), this.handles.each(function (e) {
+ t(this).data("ui-slider-handle-index", e)
+ })
+ },
+ _createRange: function () {
+ var e = this.options, i = "";
+ e.range ? (e.range === !0 && (e.values ? e.values.length && 2 !== e.values.length ? e.values = [e.values[0], e.values[0]] : t.isArray(e.values) && (e.values = e.values.slice(0)) : e.values = [this._valueMin(), this._valueMin()]), this.range && this.range.length ? this.range.removeClass("ui-slider-range-min ui-slider-range-max").css({
+ left: "",
+ bottom: ""
+ }) : (this.range = t("").appendTo(this.element), i = "ui-slider-range ui-widget-header ui-corner-all"), this.range.addClass(i + ("min" === e.range || "max" === e.range ? " ui-slider-range-" + e.range : ""))) : this.range = t([])
+ },
+ _setupEvents: function () {
+ var t = this.handles.add(this.range).filter("a");
+ this._off(t), this._on(t, this._handleEvents), this._hoverable(t), this._focusable(t)
+ },
+ _destroy: function () {
+ this.handles.remove(), this.range.remove(), this.element.removeClass("ui-slider ui-slider-horizontal ui-slider-vertical ui-widget ui-widget-content ui-corner-all"), this._mouseDestroy()
+ },
+ _mouseCapture: function (e) {
+ var i, s, n, a, o, r, h, l, u = this, c = this.options;
+ return c.disabled ? !1 : (this.elementSize = {
+ width: this.element.outerWidth(),
+ height: this.element.outerHeight()
+ }, this.elementOffset = this.element.offset(), i = {
+ x: e.pageX,
+ y: e.pageY
+ }, s = this._normValueFromMouse(i), n = this._valueMax() - this._valueMin() + 1, this.handles.each(function (e) {
+ var i = Math.abs(s - u.values(e));
+ (n > i || n === i && (e === u._lastChangedValue || u.values(e) === c.min)) && (n = i, a = t(this), o = e)
+ }), r = this._start(e, o), r === !1 ? !1 : (this._mouseSliding = !0, this._handleIndex = o, a.addClass("ui-state-active").focus(), h = a.offset(), l = !t(e.target).parents().addBack().is(".ui-slider-handle"), this._clickOffset = l ? {
+ left: 0,
+ top: 0
+ } : {
+ left: e.pageX - h.left - a.width() / 2,
+ top: e.pageY - h.top - a.height() / 2 - (parseInt(a.css("borderTopWidth"), 10) || 0) - (parseInt(a.css("borderBottomWidth"), 10) || 0) + (parseInt(a.css("marginTop"), 10) || 0)
+ }, this.handles.hasClass("ui-state-hover") || this._slide(e, o, s), this._animateOff = !0, !0))
+ },
+ _mouseStart: function () {
+ return !0
+ },
+ _mouseDrag: function (t) {
+ var e = {x: t.pageX, y: t.pageY}, i = this._normValueFromMouse(e);
+ return this._slide(t, this._handleIndex, i), !1
+ },
+ _mouseStop: function (t) {
+ return this.handles.removeClass("ui-state-active"), this._mouseSliding = !1, this._stop(t, this._handleIndex), this._change(t, this._handleIndex), this._handleIndex = null, this._clickOffset = null, this._animateOff = !1, !1
+ },
+ _detectOrientation: function () {
+ this.orientation = "vertical" === this.options.orientation ? "vertical" : "horizontal"
+ },
+ _normValueFromMouse: function (t) {
+ var e, i, s, n, a;
+ return "horizontal" === this.orientation ? (e = this.elementSize.width, i = t.x - this.elementOffset.left - (this._clickOffset ? this._clickOffset.left : 0)) : (e = this.elementSize.height, i = t.y - this.elementOffset.top - (this._clickOffset ? this._clickOffset.top : 0)), s = i / e, s > 1 && (s = 1), 0 > s && (s = 0), "vertical" === this.orientation && (s = 1 - s), n = this._valueMax() - this._valueMin(), a = this._valueMin() + s * n, this._trimAlignValue(a)
+ },
+ _start: function (t, e) {
+ var i = {handle: this.handles[e], value: this.value()};
+ return this.options.values && this.options.values.length && (i.value = this.values(e), i.values = this.values()), this._trigger("start", t, i)
+ },
+ _slide: function (t, e, i) {
+ var s, n, a;
+ this.options.values && this.options.values.length ? (s = this.values(e ? 0 : 1), 2 === this.options.values.length && this.options.range === !0 && (0 === e && i > s || 1 === e && s > i) && (i = s), i !== this.values(e) && (n = this.values(), n[e] = i, a = this._trigger("slide", t, {
+ handle: this.handles[e],
+ value: i,
+ values: n
+ }), s = this.values(e ? 0 : 1), a !== !1 && this.values(e, i, !0))) : i !== this.value() && (a = this._trigger("slide", t, {
+ handle: this.handles[e],
+ value: i
+ }), a !== !1 && this.value(i))
+ },
+ _stop: function (t, e) {
+ var i = {handle: this.handles[e], value: this.value()};
+ this.options.values && this.options.values.length && (i.value = this.values(e), i.values = this.values()), this._trigger("stop", t, i)
+ },
+ _change: function (t, e) {
+ if (!this._keySliding && !this._mouseSliding) {
+ var i = {handle: this.handles[e], value: this.value()};
+ this.options.values && this.options.values.length && (i.value = this.values(e), i.values = this.values()), this._lastChangedValue = e, this._trigger("change", t, i)
+ }
+ },
+ value: function (t) {
+ return arguments.length ? (this.options.value = this._trimAlignValue(t), this._refreshValue(), this._change(null, 0), undefined) : this._value()
+ },
+ values: function (e, i) {
+ var s, n, a;
+ if (arguments.length > 1) return this.options.values[e] = this._trimAlignValue(i), this._refreshValue(), this._change(null, e), undefined;
+ if (!arguments.length) return this._values();
+ if (!t.isArray(arguments[0])) return this.options.values && this.options.values.length ? this._values(e) : this.value();
+ for (s = this.options.values, n = arguments[0], a = 0; s.length > a; a += 1) s[a] = this._trimAlignValue(n[a]), this._change(null, a);
+ this._refreshValue()
+ },
+ _setOption: function (e, i) {
+ var s, n = 0;
+ switch ("range" === e && this.options.range === !0 && ("min" === i ? (this.options.value = this._values(0), this.options.values = null) : "max" === i && (this.options.value = this._values(this.options.values.length - 1), this.options.values = null)), t.isArray(this.options.values) && (n = this.options.values.length), t.Widget.prototype._setOption.apply(this, arguments), e) {
+ case"orientation":
+ this._detectOrientation(), this.element.removeClass("ui-slider-horizontal ui-slider-vertical").addClass("ui-slider-" + this.orientation), this._refreshValue();
+ break;
+ case"value":
+ this._animateOff = !0, this._refreshValue(), this._change(null, 0), this._animateOff = !1;
+ break;
+ case"values":
+ for (this._animateOff = !0, this._refreshValue(), s = 0; n > s; s += 1) this._change(null, s);
+ this._animateOff = !1;
+ break;
+ case"min":
+ case"max":
+ this._animateOff = !0, this._refreshValue(), this._animateOff = !1;
+ break;
+ case"range":
+ this._animateOff = !0, this._refresh(), this._animateOff = !1
+ }
+ },
+ _value: function () {
+ var t = this.options.value;
+ return t = this._trimAlignValue(t)
+ },
+ _values: function (t) {
+ var e, i, s;
+ if (arguments.length) return e = this.options.values[t], e = this._trimAlignValue(e);
+ if (this.options.values && this.options.values.length) {
+ for (i = this.options.values.slice(), s = 0; i.length > s; s += 1) i[s] = this._trimAlignValue(i[s]);
+ return i
+ }
+ return []
+ },
+ _trimAlignValue: function (t) {
+ if (this._valueMin() >= t) return this._valueMin();
+ if (t >= this._valueMax()) return this._valueMax();
+ var e = this.options.step > 0 ? this.options.step : 1, i = (t - this._valueMin()) % e, s = t - i;
+ return 2 * Math.abs(i) >= e && (s += i > 0 ? e : -e), parseFloat(s.toFixed(5))
+ },
+ _valueMin: function () {
+ return this.options.min
+ },
+ _valueMax: function () {
+ return this.options.max
+ },
+ _refreshValue: function () {
+ var e, i, s, n, a, o = this.options.range, r = this.options, h = this,
+ l = this._animateOff ? !1 : r.animate, u = {};
+ this.options.values && this.options.values.length ? this.handles.each(function (s) {
+ i = 100 * ((h.values(s) - h._valueMin()) / (h._valueMax() - h._valueMin())), u["horizontal" === h.orientation ? "left" : "bottom"] = i + "%", t(this).stop(1, 1)[l ? "animate" : "css"](u, r.animate), h.options.range === !0 && ("horizontal" === h.orientation ? (0 === s && h.range.stop(1, 1)[l ? "animate" : "css"]({left: i + "%"}, r.animate), 1 === s && h.range[l ? "animate" : "css"]({width: i - e + "%"}, {
+ queue: !1,
+ duration: r.animate
+ })) : (0 === s && h.range.stop(1, 1)[l ? "animate" : "css"]({bottom: i + "%"}, r.animate), 1 === s && h.range[l ? "animate" : "css"]({height: i - e + "%"}, {
+ queue: !1,
+ duration: r.animate
+ }))), e = i
+ }) : (s = this.value(), n = this._valueMin(), a = this._valueMax(), i = a !== n ? 100 * ((s - n) / (a - n)) : 0, u["horizontal" === this.orientation ? "left" : "bottom"] = i + "%", this.handle.stop(1, 1)[l ? "animate" : "css"](u, r.animate), "min" === o && "horizontal" === this.orientation && this.range.stop(1, 1)[l ? "animate" : "css"]({width: i + "%"}, r.animate), "max" === o && "horizontal" === this.orientation && this.range[l ? "animate" : "css"]({width: 100 - i + "%"}, {
+ queue: !1,
+ duration: r.animate
+ }), "min" === o && "vertical" === this.orientation && this.range.stop(1, 1)[l ? "animate" : "css"]({height: i + "%"}, r.animate), "max" === o && "vertical" === this.orientation && this.range[l ? "animate" : "css"]({height: 100 - i + "%"}, {
+ queue: !1,
+ duration: r.animate
+ }))
+ },
+ _handleEvents: {
+ keydown: function (i) {
+ var s, n, a, o, r = t(i.target).data("ui-slider-handle-index");
+ switch (i.keyCode) {
+ case t.ui.keyCode.HOME:
+ case t.ui.keyCode.END:
+ case t.ui.keyCode.PAGE_UP:
+ case t.ui.keyCode.PAGE_DOWN:
+ case t.ui.keyCode.UP:
+ case t.ui.keyCode.RIGHT:
+ case t.ui.keyCode.DOWN:
+ case t.ui.keyCode.LEFT:
+ if (i.preventDefault(), !this._keySliding && (this._keySliding = !0, t(i.target).addClass("ui-state-active"), s = this._start(i, r), s === !1)) return
+ }
+ switch (o = this.options.step, n = a = this.options.values && this.options.values.length ? this.values(r) : this.value(), i.keyCode) {
+ case t.ui.keyCode.HOME:
+ a = this._valueMin();
+ break;
+ case t.ui.keyCode.END:
+ a = this._valueMax();
+ break;
+ case t.ui.keyCode.PAGE_UP:
+ a = this._trimAlignValue(n + (this._valueMax() - this._valueMin()) / e);
+ break;
+ case t.ui.keyCode.PAGE_DOWN:
+ a = this._trimAlignValue(n - (this._valueMax() - this._valueMin()) / e);
+ break;
+ case t.ui.keyCode.UP:
+ case t.ui.keyCode.RIGHT:
+ if (n === this._valueMax()) return;
+ a = this._trimAlignValue(n + o);
+ break;
+ case t.ui.keyCode.DOWN:
+ case t.ui.keyCode.LEFT:
+ if (n === this._valueMin()) return;
+ a = this._trimAlignValue(n - o)
+ }
+ this._slide(i, r, a)
+ }, click: function (t) {
+ t.preventDefault()
+ }, keyup: function (e) {
+ var i = t(e.target).data("ui-slider-handle-index");
+ this._keySliding && (this._keySliding = !1, this._stop(e, i), this._change(e, i), t(e.target).removeClass("ui-state-active"))
+ }
+ }
+ })
+})(jQuery);
+(function (t, e) {
+ var i = "ui-effects-";
+ t.effects = {effect: {}}, function (t, e) {
+ function i(t, e, i) {
+ var s = u[e.type] || {};
+ return null == t ? i || !e.def ? null : e.def : (t = s.floor ? ~~t : parseFloat(t), isNaN(t) ? e.def : s.mod ? (t + s.mod) % s.mod : 0 > t ? 0 : t > s.max ? s.max : t)
+ }
+
+ function s(i) {
+ var s = l(), n = s._rgba = [];
+ return i = i.toLowerCase(), f(h, function (t, a) {
+ var o, r = a.re.exec(i), h = r && a.parse(r), l = a.space || "rgba";
+ return h ? (o = s[l](h), s[c[l].cache] = o[c[l].cache], n = s._rgba = o._rgba, !1) : e
+ }), n.length ? ("0,0,0,0" === n.join() && t.extend(n, a.transparent), s) : a[i]
+ }
+
+ function n(t, e, i) {
+ return i = (i + 1) % 1, 1 > 6 * i ? t + 6 * (e - t) * i : 1 > 2 * i ? e : 2 > 3 * i ? t + 6 * (e - t) * (2 / 3 - i) : t
+ }
+
+ var a,
+ o = "backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor",
+ r = /^([\-+])=\s*(\d+\.?\d*)/, h = [{
+ re: /rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,
+ parse: function (t) {
+ return [t[1], t[2], t[3], t[4]]
+ }
+ }, {
+ re: /rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,
+ parse: function (t) {
+ return [2.55 * t[1], 2.55 * t[2], 2.55 * t[3], t[4]]
+ }
+ }, {
+ re: /#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})/, parse: function (t) {
+ return [parseInt(t[1], 16), parseInt(t[2], 16), parseInt(t[3], 16)]
+ }
+ }, {
+ re: /#([a-f0-9])([a-f0-9])([a-f0-9])/, parse: function (t) {
+ return [parseInt(t[1] + t[1], 16), parseInt(t[2] + t[2], 16), parseInt(t[3] + t[3], 16)]
+ }
+ }, {
+ re: /hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,
+ space: "hsla",
+ parse: function (t) {
+ return [t[1], t[2] / 100, t[3] / 100, t[4]]
+ }
+ }], l = t.Color = function (e, i, s, n) {
+ return new t.Color.fn.parse(e, i, s, n)
+ }, c = {
+ rgba: {
+ props: {
+ red: {idx: 0, type: "byte"},
+ green: {idx: 1, type: "byte"},
+ blue: {idx: 2, type: "byte"}
+ }
+ },
+ hsla: {
+ props: {
+ hue: {idx: 0, type: "degrees"},
+ saturation: {idx: 1, type: "percent"},
+ lightness: {idx: 2, type: "percent"}
+ }
+ }
+ }, u = {"byte": {floor: !0, max: 255}, percent: {max: 1}, degrees: {mod: 360, floor: !0}}, d = l.support = {},
+ p = t("
")[0], f = t.each;
+ p.style.cssText = "background-color:rgba(1,1,1,.5)", d.rgba = p.style.backgroundColor.indexOf("rgba") > -1, f(c, function (t, e) {
+ e.cache = "_" + t, e.props.alpha = {idx: 3, type: "percent", def: 1}
+ }), l.fn = t.extend(l.prototype, {
+ parse: function (n, o, r, h) {
+ if (n === e) return this._rgba = [null, null, null, null], this;
+ (n.jquery || n.nodeType) && (n = t(n).css(o), o = e);
+ var u = this, d = t.type(n), p = this._rgba = [];
+ return o !== e && (n = [n, o, r, h], d = "array"), "string" === d ? this.parse(s(n) || a._default) : "array" === d ? (f(c.rgba.props, function (t, e) {
+ p[e.idx] = i(n[e.idx], e)
+ }), this) : "object" === d ? (n instanceof l ? f(c, function (t, e) {
+ n[e.cache] && (u[e.cache] = n[e.cache].slice())
+ }) : f(c, function (e, s) {
+ var a = s.cache;
+ f(s.props, function (t, e) {
+ if (!u[a] && s.to) {
+ if ("alpha" === t || null == n[t]) return;
+ u[a] = s.to(u._rgba)
+ }
+ u[a][e.idx] = i(n[t], e, !0)
+ }), u[a] && 0 > t.inArray(null, u[a].slice(0, 3)) && (u[a][3] = 1, s.from && (u._rgba = s.from(u[a])))
+ }), this) : e
+ }, is: function (t) {
+ var i = l(t), s = !0, n = this;
+ return f(c, function (t, a) {
+ var o, r = i[a.cache];
+ return r && (o = n[a.cache] || a.to && a.to(n._rgba) || [], f(a.props, function (t, i) {
+ return null != r[i.idx] ? s = r[i.idx] === o[i.idx] : e
+ })), s
+ }), s
+ }, _space: function () {
+ var t = [], e = this;
+ return f(c, function (i, s) {
+ e[s.cache] && t.push(i)
+ }), t.pop()
+ }, transition: function (t, e) {
+ var s = l(t), n = s._space(), a = c[n], o = 0 === this.alpha() ? l("transparent") : this,
+ r = o[a.cache] || a.to(o._rgba), h = r.slice();
+ return s = s[a.cache], f(a.props, function (t, n) {
+ var a = n.idx, o = r[a], l = s[a], c = u[n.type] || {};
+ null !== l && (null === o ? h[a] = l : (c.mod && (l - o > c.mod / 2 ? o += c.mod : o - l > c.mod / 2 && (o -= c.mod)), h[a] = i((l - o) * e + o, n)))
+ }), this[n](h)
+ }, blend: function (e) {
+ if (1 === this._rgba[3]) return this;
+ var i = this._rgba.slice(), s = i.pop(), n = l(e)._rgba;
+ return l(t.map(i, function (t, e) {
+ return (1 - s) * n[e] + s * t
+ }))
+ }, toRgbaString: function () {
+ var e = "rgba(", i = t.map(this._rgba, function (t, e) {
+ return null == t ? e > 2 ? 1 : 0 : t
+ });
+ return 1 === i[3] && (i.pop(), e = "rgb("), e + i.join() + ")"
+ }, toHslaString: function () {
+ var e = "hsla(", i = t.map(this.hsla(), function (t, e) {
+ return null == t && (t = e > 2 ? 1 : 0), e && 3 > e && (t = Math.round(100 * t) + "%"), t
+ });
+ return 1 === i[3] && (i.pop(), e = "hsl("), e + i.join() + ")"
+ }, toHexString: function (e) {
+ var i = this._rgba.slice(), s = i.pop();
+ return e && i.push(~~(255 * s)), "#" + t.map(i, function (t) {
+ return t = (t || 0).toString(16), 1 === t.length ? "0" + t : t
+ }).join("")
+ }, toString: function () {
+ return 0 === this._rgba[3] ? "transparent" : this.toRgbaString()
+ }
+ }), l.fn.parse.prototype = l.fn, c.hsla.to = function (t) {
+ if (null == t[0] || null == t[1] || null == t[2]) return [null, null, null, t[3]];
+ var e, i, s = t[0] / 255, n = t[1] / 255, a = t[2] / 255, o = t[3], r = Math.max(s, n, a),
+ h = Math.min(s, n, a), l = r - h, c = r + h, u = .5 * c;
+ return e = h === r ? 0 : s === r ? 60 * (n - a) / l + 360 : n === r ? 60 * (a - s) / l + 120 : 60 * (s - n) / l + 240, i = 0 === l ? 0 : .5 >= u ? l / c : l / (2 - c), [Math.round(e) % 360, i, u, null == o ? 1 : o]
+ }, c.hsla.from = function (t) {
+ if (null == t[0] || null == t[1] || null == t[2]) return [null, null, null, t[3]];
+ var e = t[0] / 360, i = t[1], s = t[2], a = t[3], o = .5 >= s ? s * (1 + i) : s + i - s * i, r = 2 * s - o;
+ return [Math.round(255 * n(r, o, e + 1 / 3)), Math.round(255 * n(r, o, e)), Math.round(255 * n(r, o, e - 1 / 3)), a]
+ }, f(c, function (s, n) {
+ var a = n.props, o = n.cache, h = n.to, c = n.from;
+ l.fn[s] = function (s) {
+ if (h && !this[o] && (this[o] = h(this._rgba)), s === e) return this[o].slice();
+ var n, r = t.type(s), u = "array" === r || "object" === r ? s : arguments, d = this[o].slice();
+ return f(a, function (t, e) {
+ var s = u["object" === r ? t : e.idx];
+ null == s && (s = d[e.idx]), d[e.idx] = i(s, e)
+ }), c ? (n = l(c(d)), n[o] = d, n) : l(d)
+ }, f(a, function (e, i) {
+ l.fn[e] || (l.fn[e] = function (n) {
+ var a, o = t.type(n), h = "alpha" === e ? this._hsla ? "hsla" : "rgba" : s, l = this[h](),
+ c = l[i.idx];
+ return "undefined" === o ? c : ("function" === o && (n = n.call(this, c), o = t.type(n)), null == n && i.empty ? this : ("string" === o && (a = r.exec(n), a && (n = c + parseFloat(a[2]) * ("+" === a[1] ? 1 : -1))), l[i.idx] = n, this[h](l)))
+ })
+ })
+ }), l.hook = function (e) {
+ var i = e.split(" ");
+ f(i, function (e, i) {
+ t.cssHooks[i] = {
+ set: function (e, n) {
+ var a, o, r = "";
+ if ("transparent" !== n && ("string" !== t.type(n) || (a = s(n)))) {
+ if (n = l(a || n), !d.rgba && 1 !== n._rgba[3]) {
+ for (o = "backgroundColor" === i ? e.parentNode : e; ("" === r || "transparent" === r) && o && o.style;) try {
+ r = t.css(o, "backgroundColor"), o = o.parentNode
+ } catch (h) {
+ }
+ n = n.blend(r && "transparent" !== r ? r : "_default")
+ }
+ n = n.toRgbaString()
+ }
+ try {
+ e.style[i] = n
+ } catch (h) {
+ }
+ }
+ }, t.fx.step[i] = function (e) {
+ e.colorInit || (e.start = l(e.elem, i), e.end = l(e.end), e.colorInit = !0), t.cssHooks[i].set(e.elem, e.start.transition(e.end, e.pos))
+ }
+ })
+ }, l.hook(o), t.cssHooks.borderColor = {
+ expand: function (t) {
+ var e = {};
+ return f(["Top", "Right", "Bottom", "Left"], function (i, s) {
+ e["border" + s + "Color"] = t
+ }), e
+ }
+ }, a = t.Color.names = {
+ aqua: "#00ffff",
+ black: "#000000",
+ blue: "#0000ff",
+ fuchsia: "#ff00ff",
+ gray: "#808080",
+ green: "#008000",
+ lime: "#00ff00",
+ maroon: "#800000",
+ navy: "#000080",
+ olive: "#808000",
+ purple: "#800080",
+ red: "#ff0000",
+ silver: "#c0c0c0",
+ teal: "#008080",
+ white: "#ffffff",
+ yellow: "#ffff00",
+ transparent: [null, null, null, 0],
+ _default: "#ffffff"
+ }
+ }(jQuery), function () {
+ function i(e) {
+ var i, s,
+ n = e.ownerDocument.defaultView ? e.ownerDocument.defaultView.getComputedStyle(e, null) : e.currentStyle,
+ a = {};
+ if (n && n.length && n[0] && n[n[0]]) for (s = n.length; s--;) i = n[s], "string" == typeof n[i] && (a[t.camelCase(i)] = n[i]); else for (i in n) "string" == typeof n[i] && (a[i] = n[i]);
+ return a
+ }
+
+ function s(e, i) {
+ var s, n, o = {};
+ for (s in i) n = i[s], e[s] !== n && (a[s] || (t.fx.step[s] || !isNaN(parseFloat(n))) && (o[s] = n));
+ return o
+ }
+
+ var n = ["add", "remove", "toggle"], a = {
+ border: 1,
+ borderBottom: 1,
+ borderColor: 1,
+ borderLeft: 1,
+ borderRight: 1,
+ borderTop: 1,
+ borderWidth: 1,
+ margin: 1,
+ padding: 1
+ };
+ t.each(["borderLeftStyle", "borderRightStyle", "borderBottomStyle", "borderTopStyle"], function (e, i) {
+ t.fx.step[i] = function (t) {
+ ("none" !== t.end && !t.setAttr || 1 === t.pos && !t.setAttr) && (jQuery.style(t.elem, i, t.end), t.setAttr = !0)
+ }
+ }), t.fn.addBack || (t.fn.addBack = function (t) {
+ return this.add(null == t ? this.prevObject : this.prevObject.filter(t))
+ }), t.effects.animateClass = function (e, a, o, r) {
+ var h = t.speed(a, o, r);
+ return this.queue(function () {
+ var a, o = t(this), r = o.attr("class") || "", l = h.children ? o.find("*").addBack() : o;
+ l = l.map(function () {
+ var e = t(this);
+ return {el: e, start: i(this)}
+ }), a = function () {
+ t.each(n, function (t, i) {
+ e[i] && o[i + "Class"](e[i])
+ })
+ }, a(), l = l.map(function () {
+ return this.end = i(this.el[0]), this.diff = s(this.start, this.end), this
+ }), o.attr("class", r), l = l.map(function () {
+ var e = this, i = t.Deferred(), s = t.extend({}, h, {
+ queue: !1, complete: function () {
+ i.resolve(e)
+ }
+ });
+ return this.el.animate(this.diff, s), i.promise()
+ }), t.when.apply(t, l.get()).done(function () {
+ a(), t.each(arguments, function () {
+ var e = this.el;
+ t.each(this.diff, function (t) {
+ e.css(t, "")
+ })
+ }), h.complete.call(o[0])
+ })
+ })
+ }, t.fn.extend({
+ addClass: function (e) {
+ return function (i, s, n, a) {
+ return s ? t.effects.animateClass.call(this, {add: i}, s, n, a) : e.apply(this, arguments)
+ }
+ }(t.fn.addClass), removeClass: function (e) {
+ return function (i, s, n, a) {
+ return arguments.length > 1 ? t.effects.animateClass.call(this, {remove: i}, s, n, a) : e.apply(this, arguments)
+ }
+ }(t.fn.removeClass), toggleClass: function (i) {
+ return function (s, n, a, o, r) {
+ return "boolean" == typeof n || n === e ? a ? t.effects.animateClass.call(this, n ? {add: s} : {remove: s}, a, o, r) : i.apply(this, arguments) : t.effects.animateClass.call(this, {toggle: s}, n, a, o)
+ }
+ }(t.fn.toggleClass), switchClass: function (e, i, s, n, a) {
+ return t.effects.animateClass.call(this, {add: i, remove: e}, s, n, a)
+ }
+ })
+ }(), function () {
+ function s(e, i, s, n) {
+ return t.isPlainObject(e) && (i = e, e = e.effect), e = {effect: e}, null == i && (i = {}), t.isFunction(i) && (n = i, s = null, i = {}), ("number" == typeof i || t.fx.speeds[i]) && (n = s, s = i, i = {}), t.isFunction(s) && (n = s, s = null), i && t.extend(e, i), s = s || i.duration, e.duration = t.fx.off ? 0 : "number" == typeof s ? s : s in t.fx.speeds ? t.fx.speeds[s] : t.fx.speeds._default, e.complete = n || i.complete, e
+ }
+
+ function n(e) {
+ return !e || "number" == typeof e || t.fx.speeds[e] ? !0 : "string" != typeof e || t.effects.effect[e] ? t.isFunction(e) ? !0 : "object" != typeof e || e.effect ? !1 : !0 : !0
+ }
+
+ t.extend(t.effects, {
+ version: "1.10.3", save: function (t, e) {
+ for (var s = 0; e.length > s; s++) null !== e[s] && t.data(i + e[s], t[0].style[e[s]])
+ }, restore: function (t, s) {
+ var n, a;
+ for (a = 0; s.length > a; a++) null !== s[a] && (n = t.data(i + s[a]), n === e && (n = ""), t.css(s[a], n))
+ }, setMode: function (t, e) {
+ return "toggle" === e && (e = t.is(":hidden") ? "show" : "hide"), e
+ }, getBaseline: function (t, e) {
+ var i, s;
+ switch (t[0]) {
+ case"top":
+ i = 0;
+ break;
+ case"middle":
+ i = .5;
+ break;
+ case"bottom":
+ i = 1;
+ break;
+ default:
+ i = t[0] / e.height
+ }
+ switch (t[1]) {
+ case"left":
+ s = 0;
+ break;
+ case"center":
+ s = .5;
+ break;
+ case"right":
+ s = 1;
+ break;
+ default:
+ s = t[1] / e.width
+ }
+ return {x: s, y: i}
+ }, createWrapper: function (e) {
+ if (e.parent().is(".ui-effects-wrapper")) return e.parent();
+ var i = {width: e.outerWidth(!0), height: e.outerHeight(!0), "float": e.css("float")},
+ s = t("
").addClass("ui-effects-wrapper").css({
+ fontSize: "100%",
+ background: "transparent",
+ border: "none",
+ margin: 0,
+ padding: 0
+ }), n = {width: e.width(), height: e.height()}, a = document.activeElement;
+ try {
+ a.id
+ } catch (o) {
+ a = document.body
+ }
+ return e.wrap(s), (e[0] === a || t.contains(e[0], a)) && t(a).focus(), s = e.parent(), "static" === e.css("position") ? (s.css({position: "relative"}), e.css({position: "relative"})) : (t.extend(i, {
+ position: e.css("position"),
+ zIndex: e.css("z-index")
+ }), t.each(["top", "left", "bottom", "right"], function (t, s) {
+ i[s] = e.css(s), isNaN(parseInt(i[s], 10)) && (i[s] = "auto")
+ }), e.css({
+ position: "relative",
+ top: 0,
+ left: 0,
+ right: "auto",
+ bottom: "auto"
+ })), e.css(n), s.css(i).show()
+ }, removeWrapper: function (e) {
+ var i = document.activeElement;
+ return e.parent().is(".ui-effects-wrapper") && (e.parent().replaceWith(e), (e[0] === i || t.contains(e[0], i)) && t(i).focus()), e
+ }, setTransition: function (e, i, s, n) {
+ return n = n || {}, t.each(i, function (t, i) {
+ var a = e.cssUnit(i);
+ a[0] > 0 && (n[i] = a[0] * s + a[1])
+ }), n
+ }
+ }), t.fn.extend({
+ effect: function () {
+ function e(e) {
+ function s() {
+ t.isFunction(a) && a.call(n[0]), t.isFunction(e) && e()
+ }
+
+ var n = t(this), a = i.complete, r = i.mode;
+ (n.is(":hidden") ? "hide" === r : "show" === r) ? (n[r](), s()) : o.call(n[0], i, s)
+ }
+
+ var i = s.apply(this, arguments), n = i.mode, a = i.queue, o = t.effects.effect[i.effect];
+ return t.fx.off || !o ? n ? this[n](i.duration, i.complete) : this.each(function () {
+ i.complete && i.complete.call(this)
+ }) : a === !1 ? this.each(e) : this.queue(a || "fx", e)
+ }, show: function (t) {
+ return function (e) {
+ if (n(e)) return t.apply(this, arguments);
+ var i = s.apply(this, arguments);
+ return i.mode = "show", this.effect.call(this, i)
+ }
+ }(t.fn.show), hide: function (t) {
+ return function (e) {
+ if (n(e)) return t.apply(this, arguments);
+ var i = s.apply(this, arguments);
+ return i.mode = "hide", this.effect.call(this, i)
+ }
+ }(t.fn.hide), toggle: function (t) {
+ return function (e) {
+ if (n(e) || "boolean" == typeof e) return t.apply(this, arguments);
+ var i = s.apply(this, arguments);
+ return i.mode = "toggle", this.effect.call(this, i)
+ }
+ }(t.fn.toggle), cssUnit: function (e) {
+ var i = this.css(e), s = [];
+ return t.each(["em", "px", "%", "pt"], function (t, e) {
+ i.indexOf(e) > 0 && (s = [parseFloat(i), e])
+ }), s
+ }
+ })
+ }(), function () {
+ var e = {};
+ t.each(["Quad", "Cubic", "Quart", "Quint", "Expo"], function (t, i) {
+ e[i] = function (e) {
+ return Math.pow(e, t + 2)
+ }
+ }), t.extend(e, {
+ Sine: function (t) {
+ return 1 - Math.cos(t * Math.PI / 2)
+ }, Circ: function (t) {
+ return 1 - Math.sqrt(1 - t * t)
+ }, Elastic: function (t) {
+ return 0 === t || 1 === t ? t : -Math.pow(2, 8 * (t - 1)) * Math.sin((80 * (t - 1) - 7.5) * Math.PI / 15)
+ }, Back: function (t) {
+ return t * t * (3 * t - 2)
+ }, Bounce: function (t) {
+ for (var e, i = 4; ((e = Math.pow(2, --i)) - 1) / 11 > t;) ;
+ return 1 / Math.pow(4, 3 - i) - 7.5625 * Math.pow((3 * e - 2) / 22 - t, 2)
+ }
+ }), t.each(e, function (e, i) {
+ t.easing["easeIn" + e] = i, t.easing["easeOut" + e] = function (t) {
+ return 1 - i(1 - t)
+ }, t.easing["easeInOut" + e] = function (t) {
+ return .5 > t ? i(2 * t) / 2 : 1 - i(-2 * t + 2) / 2
+ }
+ })
+ }()
+})(jQuery);
+(function (t) {
+ t.effects.effect.slide = function (e, i) {
+ var s, n = t(this), a = ["position", "top", "bottom", "left", "right", "width", "height"],
+ o = t.effects.setMode(n, e.mode || "show"), r = "show" === o, h = e.direction || "left",
+ l = "up" === h || "down" === h ? "top" : "left", c = "up" === h || "left" === h, u = {};
+ t.effects.save(n, a), n.show(), s = e.distance || n["top" === l ? "outerHeight" : "outerWidth"](!0), t.effects.createWrapper(n).css({overflow: "hidden"}), r && n.css(l, c ? isNaN(s) ? "-" + s : -s : s), u[l] = (r ? c ? "+=" : "-=" : c ? "-=" : "+=") + s, n.animate(u, {
+ queue: !1,
+ duration: e.duration,
+ easing: e.easing,
+ complete: function () {
+ "hide" === o && n.hide(), t.effects.restore(n, a), t.effects.removeWrapper(n), i()
+ }
+ })
+ }
+})(jQuery);
+/*!
+ * jquery.customscroll 1.0
+ *
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://www.opensource.org/licenses/mit-license.php
+ * http://www.gnu.org/licenses/gpl-2.0.html
+ */
+;(function ($) {
+
+ $.customscrollOptions = {
+ always: false,
+ show: {
+ on: 'mouseenter scrollstart',
+ effect: 'fadeIn',
+ speed: 250,
+ delay: 0
+ },
+ hide: {
+ on: 'mouseleave scrollstop',
+ effect: 'fadeOut',
+ speed: 250,
+ delay: 750
+ },
+ grow: {
+ size: 3,
+ speed: 100
+ },
+ pageUpnDown: {
+ speed: 100
+ }
+ };
+
+ $.fn.customscroll = function (options) {
+ options = $.extend(true, {}, $.customscrollOptions, options || {});
+ return this.each(function () {
+ var object = $(this);
+
+ // build template
+ object.addClass('customscroll');
+ object.html([
+ '
',
+ '
',
+ object.html(),
+ '
',
+ '
',
+ '
',
+ '
',
+ '',
+ '
',
+ '
'
+ ].join(''));
+
+ // get elements
+ var wrapper = object.children('.wrapper'),
+ placeholder = object.children('.placeholder'),
+ track = placeholder.children('.track'),
+ grip = track.children('.grip');
+
+ // object hover
+ var showHideTimer,
+ show = function (event) {
+ if (object.height() >= wrapper[0].scrollHeight) {
+ // we dont need scroll
+ return;
+ }
+ if (wrapper[0].scrollHeight < parseInt(object.css('max-height'))) {
+ // this is a fix for IE
+ return;
+ }
+ // show
+ clearInterval(showHideTimer);
+ showHideTimer = setTimeout(function () {
+ track[options.show.effect](options.show.speed);
+ }, options.show.delay);
+ if (!event || event.type !== 'scrollstart') {
+ // used for adjusting sizes
+ wrapper.trigger('scroll');
+ }
+ };
+ wrapper.on(options.show.on, show);
+ wrapper.on(options.hide.on, function callback() {
+ // don't hide if always is true
+ if (options.always) {
+ return;
+ }
+ if (wrapper.hasClass('keep')) {
+ // someone says do not hide, try again later
+ return setTimeout(function () {
+ callback();
+ }, 250);
+ }
+ // hide
+ clearInterval(showHideTimer);
+ showHideTimer = setTimeout(function () {
+ track[options.hide.effect](options.hide.speed);
+ }, options.hide.delay);
+ });
+
+ // bind scroll event
+ var scrollingTimer;
+ wrapper.on('scroll', function (event) {
+ var height = object.height();
+ grip.css({
+ // grip height is view height / scroll height * 200 (4 is for margins)
+ height: height / this.scrollHeight * height - parseInt(object.css('paddingTop')) - parseInt(object.css('paddingBottom')),
+ // scroll position
+ marginTop: this.scrollTop * 100 / this.scrollHeight * height / 100 + 'px'
+ });
+ // custom scroll start / end events
+ if (!scrollingTimer) {
+ wrapper.trigger('scrollstart');
+ }
+ clearInterval(scrollingTimer);
+ scrollingTimer = setTimeout(function () {
+ wrapper.trigger('scrollstop');
+ scrollingTimer = null;
+ }, 200);
+ });
+
+ // placeholder and track hover
+ wrapper.on('mouseover', function () {
+ // do not hide track and show
+ wrapper.addClass('keep');
+ show();
+ });
+
+ // placeholder and track hover
+ wrapper.on('mouseleave', function () {
+ // do not hide track and show
+ wrapper.removeClass('keep');
+ });
+ placeholder.on('mouseover', function () {
+ // do not hide track and show
+ wrapper.addClass('keep');
+ show();
+ });
+ placeholder.on('mouseleave', function () {
+ // hide track
+ wrapper.removeClass('keep');
+ });
+ track.on('mouseenter', function () {
+ track.addClass('hover');
+ if (options.grow) {
+ // stop animation queue and animate
+ track.stop(true, true);
+ track.animate({width: '+=' + options.grow.size + 'px'}, options.grow.speed);
+ }
+ });
+ track.on('mouseleave', function hover() {
+ track.removeClass('hover');
+ if (options.grow) {
+ // stop animation queue and animate
+ track.stop(true, true);
+ track.animate({width: '-=' + options.grow.size + 'px'}, options.grow.speed);
+ }
+ });
+
+ // page up / down (track click)
+ track.on('click', function (event) {
+ if ($(event.target).hasClass('grip')) {
+ // do not trigger when clicking the egrip
+ return;
+ }
+ if (event.pageY - track.offset().top > parseInt(grip.css('marginTop'))) {
+ // clicked after grip
+ var operation = '+';
+ } else {
+ // clicked before grip
+ var operation = '-';
+ }
+ // scroll
+ wrapper.animate({
+ scrollTop: operation + '=' + object.height() + 'px'
+ }, options.pageUpnDown.speed);
+ });
+
+ // show initially if always is true
+ if (options.always) {
+ show();
+ }
+ // grip drag
+ var dragging = false;
+ grip.on('mousedown', function (event) {
+ // do not hide
+ wrapper.addClass('keep');
+ // mark as dragging
+ dragging = true;
+ // prevent text selection
+ $('body').addClass('dragging');
+ });
+ $(document).on('mousemove', function (event) {
+ if (dragging) {
+ // we have drag, move
+ wrapper.scrollTop(wrapper[0].scrollHeight * (event.pageY - track.offset().top - grip.height() / 2) / object.height());
+ event.preventDefault();
+ }
+ });
+ $(document).on('mouseup', function () {
+ if (dragging) {
+ // we have drag, remove
+ wrapper.removeClass('keep');
+ dragging = false;
+ $('body').removeClass('dragging');
+ }
+ });
+
+ });
+ };
+})(jQuery);
+!function (e, t, n) {
+ "use strict";
+ !function o(e, t, n) {
+ function a(s, l) {
+ if (!t[s]) {
+ if (!e[s]) {
+ var i = "function" == typeof require && require;
+ if (!l && i) return i(s, !0);
+ if (r) return r(s, !0);
+ var u = new Error("Cannot find module '" + s + "'");
+ throw u.code = "MODULE_NOT_FOUND", u
+ }
+ var c = t[s] = {exports: {}};
+ e[s][0].call(c.exports, function (t) {
+ var n = e[s][1][t];
+ return a(n ? n : t)
+ }, c, c.exports, o, e, t, n)
+ }
+ return t[s].exports
+ }
+
+ for (var r = "function" == typeof require && require, s = 0; s < n.length; s++) a(n[s]);
+ return a
+ }({
+ 1: [function (o, a, r) {
+ var s = function (e) {
+ return e && e.__esModule ? e : {"default": e}
+ };
+ Object.defineProperty(r, "__esModule", {value: !0});
+ var l, i, u, c, d = o("./modules/handle-dom"), f = o("./modules/utils"), p = o("./modules/handle-swal-dom"),
+ m = o("./modules/handle-click"), v = o("./modules/handle-key"), y = s(v),
+ h = o("./modules/default-params"), b = s(h), g = o("./modules/set-params"), w = s(g);
+ r["default"] = u = c = function () {
+ function o(e) {
+ var t = a;
+ return t[e] === n ? b["default"][e] : t[e]
+ }
+
+ var a = arguments[0];
+ if (d.addClass(t.body, "stop-scrolling"), p.resetInput(), a === n) return f.logStr("SweetAlert expects at least 1 attribute!"), !1;
+ var r = f.extend({}, b["default"]);
+ switch (typeof a) {
+ case"string":
+ r.title = a, r.text = arguments[1] || "", r.type = arguments[2] || "";
+ break;
+ case"object":
+ if (a.title === n) return f.logStr('Missing "title" argument!'), !1;
+ r.title = a.title;
+ for (var s in b["default"]) r[s] = o(s);
+ r.confirmButtonText = r.showCancelButton ? "Confirm" : b["default"].confirmButtonText, r.confirmButtonText = o("confirmButtonText"), r.doneFunction = arguments[1] || null;
+ break;
+ default:
+ return f.logStr('Unexpected type of argument! Expected "string" or "object", got ' + typeof a), !1
+ }
+ w["default"](r), p.fixVerticalPosition(), p.openModal(arguments[1]);
+ for (var u = p.getModal(), v = u.querySelectorAll("button"), h = ["onclick", "onmouseover", "onmouseout", "onmousedown", "onmouseup", "onfocus"], g = function (e) {
+ return m.handleButton(e, r, u)
+ }, C = 0; C < v.length; C++) for (var S = 0; S < h.length; S++) {
+ var x = h[S];
+ v[C][x] = g
+ }
+ p.getOverlay().onclick = g, l = e.onkeydown;
+ var k = function (e) {
+ return y["default"](e, r, u)
+ };
+ e.onkeydown = k, e.onfocus = function () {
+ setTimeout(function () {
+ i !== n && (i.focus(), i = n)
+ }, 0)
+ }, c.enableButtons()
+ }, u.setDefaults = c.setDefaults = function (e) {
+ if (!e) throw new Error("userParams is required");
+ if ("object" != typeof e) throw new Error("userParams has to be a object");
+ f.extend(b["default"], e)
+ }, u.close = c.close = function () {
+ var o = p.getModal();
+ d.fadeOut(p.getOverlay(), 5), d.fadeOut(o, 5), d.removeClass(o, "showSweetAlert"), d.addClass(o, "hideSweetAlert"), d.removeClass(o, "visible");
+ var a = o.querySelector(".sa-icon.sa-success");
+ d.removeClass(a, "animate"), d.removeClass(a.querySelector(".sa-tip"), "animateSuccessTip"), d.removeClass(a.querySelector(".sa-long"), "animateSuccessLong");
+ var r = o.querySelector(".sa-icon.sa-error");
+ d.removeClass(r, "animateErrorIcon"), d.removeClass(r.querySelector(".sa-x-mark"), "animateXMark");
+ var s = o.querySelector(".sa-icon.sa-warning");
+ return d.removeClass(s, "pulseWarning"), d.removeClass(s.querySelector(".sa-body"), "pulseWarningIns"), d.removeClass(s.querySelector(".sa-dot"), "pulseWarningIns"), setTimeout(function () {
+ var e = o.getAttribute("data-custom-class");
+ d.removeClass(o, e)
+ }, 300), d.removeClass(t.body, "stop-scrolling"), e.onkeydown = l, e.previousActiveElement && e.previousActiveElement.focus(), i = n, clearTimeout(o.timeout), !0
+ }, u.showInputError = c.showInputError = function (e) {
+ var t = p.getModal(), n = t.querySelector(".sa-input-error");
+ d.addClass(n, "show");
+ var o = t.querySelector(".sa-error-container");
+ d.addClass(o, "show"), o.querySelector("p").innerHTML = e, setTimeout(function () {
+ u.enableButtons()
+ }, 1), t.querySelector("input").focus()
+ }, u.resetInputError = c.resetInputError = function (e) {
+ if (e && 13 === e.keyCode) return !1;
+ var t = p.getModal(), n = t.querySelector(".sa-input-error");
+ d.removeClass(n, "show");
+ var o = t.querySelector(".sa-error-container");
+ d.removeClass(o, "show")
+ }, u.disableButtons = c.disableButtons = function () {
+ var e = p.getModal(), t = e.querySelector("button.confirm"), n = e.querySelector("button.cancel");
+ t.disabled = !0, n.disabled = !0
+ }, u.enableButtons = c.enableButtons = function () {
+ var e = p.getModal(), t = e.querySelector("button.confirm"), n = e.querySelector("button.cancel");
+ t.disabled = !1, n.disabled = !1
+ }, "undefined" != typeof e ? e.sweetAlert = e.swal = u : f.logStr("SweetAlert is a frontend module!"), a.exports = r["default"]
+ }, {
+ "./modules/default-params": 2,
+ "./modules/handle-click": 3,
+ "./modules/handle-dom": 4,
+ "./modules/handle-key": 5,
+ "./modules/handle-swal-dom": 6,
+ "./modules/set-params": 8,
+ "./modules/utils": 9
+ }], 2: [function (e, t, n) {
+ Object.defineProperty(n, "__esModule", {value: !0});
+ var o = {
+ title: "",
+ text: "",
+ type: null,
+ allowOutsideClick: !1,
+ showConfirmButton: !0,
+ showCancelButton: !1,
+ closeOnConfirm: !0,
+ closeOnCancel: !0,
+ confirmButtonText: "OK",
+ confirmButtonColor: "#8CD4F5",
+ cancelButtonText: "Cancel",
+ imageUrl: null,
+ imageSize: null,
+ timer: null,
+ customClass: "",
+ html: !1,
+ animation: !0,
+ allowEscapeKey: !0,
+ inputType: "text",
+ inputPlaceholder: "",
+ inputValue: "",
+ showLoaderOnConfirm: !1
+ };
+ n["default"] = o, t.exports = n["default"]
+ }, {}], 3: [function (t, n, o) {
+ Object.defineProperty(o, "__esModule", {value: !0});
+ var a = t("./utils"), r = (t("./handle-swal-dom"), t("./handle-dom")), s = function (t, n, o) {
+ function s(e) {
+ m && n.confirmButtonColor && (p.style.backgroundColor = e)
+ }
+
+ var u, c, d, f = t || e.event, p = f.target || f.srcElement, m = -1 !== p.className.indexOf("confirm"),
+ v = -1 !== p.className.indexOf("sweet-overlay"), y = r.hasClass(o, "visible"),
+ h = n.doneFunction && "true" === o.getAttribute("data-has-done-function");
+ switch (m && n.confirmButtonColor && (u = n.confirmButtonColor, c = a.colorLuminance(u, -.04), d = a.colorLuminance(u, -.14)), f.type) {
+ case"mouseover":
+ s(c);
+ break;
+ case"mouseout":
+ s(u);
+ break;
+ case"mousedown":
+ s(d);
+ break;
+ case"mouseup":
+ s(c);
+ break;
+ case"focus":
+ var b = o.querySelector("button.confirm"), g = o.querySelector("button.cancel");
+ m ? g.style.boxShadow = "none" : b.style.boxShadow = "none";
+ break;
+ case"click":
+ var w = o === p, C = r.isDescendant(o, p);
+ if (!w && !C && y && !n.allowOutsideClick) break;
+ m && h && y ? l(o, n) : h && y || v ? i(o, n) : r.isDescendant(o, p) && "BUTTON" === p.tagName && sweetAlert.close()
+ }
+ }, l = function (e, t) {
+ var n = !0;
+ r.hasClass(e, "show-input") && (n = e.querySelector("input").value, n || (n = "")), t.doneFunction(n), t.closeOnConfirm && sweetAlert.close(), t.showLoaderOnConfirm && sweetAlert.disableButtons()
+ }, i = function (e, t) {
+ var n = String(t.doneFunction).replace(/\s/g, ""),
+ o = "function(" === n.substring(0, 9) && ")" !== n.substring(9, 10);
+ o && t.doneFunction(!1), t.closeOnCancel && sweetAlert.close()
+ };
+ o["default"] = {handleButton: s, handleConfirm: l, handleCancel: i}, n.exports = o["default"]
+ }, {"./handle-dom": 4, "./handle-swal-dom": 6, "./utils": 9}], 4: [function (n, o, a) {
+ Object.defineProperty(a, "__esModule", {value: !0});
+ var r = function (e, t) {
+ return new RegExp(" " + t + " ").test(" " + e.className + " ")
+ }, s = function (e, t) {
+ r(e, t) || (e.className += " " + t)
+ }, l = function (e, t) {
+ var n = " " + e.className.replace(/[\t\r\n]/g, " ") + " ";
+ if (r(e, t)) {
+ for (; n.indexOf(" " + t + " ") >= 0;) n = n.replace(" " + t + " ", " ");
+ e.className = n.replace(/^\s+|\s+$/g, "")
+ }
+ }, i = function (e) {
+ var n = t.createElement("div");
+ return n.appendChild(t.createTextNode(e)), n.innerHTML
+ }, u = function (e) {
+ e.style.opacity = "", e.style.display = "block"
+ }, c = function (e) {
+ if (e && !e.length) return u(e);
+ for (var t = 0; t < e.length; ++t) u(e[t])
+ }, d = function (e) {
+ e.style.opacity = "", e.style.display = "none"
+ }, f = function (e) {
+ if (e && !e.length) return d(e);
+ for (var t = 0; t < e.length; ++t) d(e[t])
+ }, p = function (e, t) {
+ for (var n = t.parentNode; null !== n;) {
+ if (n === e) return !0;
+ n = n.parentNode
+ }
+ return !1
+ }, m = function (e) {
+ e.style.left = "-9999px", e.style.display = "block";
+ var t, n = e.clientHeight;
+ return t = "undefined" != typeof getComputedStyle ? parseInt(getComputedStyle(e).getPropertyValue("padding-top"), 10) : parseInt(e.currentStyle.padding), e.style.left = "", e.style.display = "none", "-" + parseInt((n + t) / 2) + "px"
+ }, v = function (e, t) {
+ if (+e.style.opacity < 1) {
+ t = t || 16, e.style.opacity = 0, e.style.display = "block";
+ var n = +new Date, o = function (e) {
+ function t() {
+ return e.apply(this, arguments)
+ }
+
+ return t.toString = function () {
+ return e.toString()
+ }, t
+ }(function () {
+ e.style.opacity = +e.style.opacity + (new Date - n) / 100, n = +new Date, +e.style.opacity < 1 && setTimeout(o, t)
+ });
+ o()
+ }
+ e.style.display = "block"
+ }, y = function (e, t) {
+ t = t || 16, e.style.opacity = 1;
+ var n = +new Date, o = function (e) {
+ function t() {
+ return e.apply(this, arguments)
+ }
+
+ return t.toString = function () {
+ return e.toString()
+ }, t
+ }(function () {
+ e.style.opacity = +e.style.opacity - (new Date - n) / 100, n = +new Date, +e.style.opacity > 0 ? setTimeout(o, t) : e.style.display = "none"
+ });
+ o()
+ }, h = function (n) {
+ if ("function" == typeof MouseEvent) {
+ var o = new MouseEvent("click", {view: e, bubbles: !1, cancelable: !0});
+ n.dispatchEvent(o)
+ } else if (t.createEvent) {
+ var a = t.createEvent("MouseEvents");
+ a.initEvent("click", !1, !1), n.dispatchEvent(a)
+ } else t.createEventObject ? n.fireEvent("onclick") : "function" == typeof n.onclick && n.onclick()
+ }, b = function (t) {
+ "function" == typeof t.stopPropagation ? (t.stopPropagation(), t.preventDefault()) : e.event && e.event.hasOwnProperty("cancelBubble") && (e.event.cancelBubble = !0)
+ };
+ a.hasClass = r, a.addClass = s, a.removeClass = l, a.escapeHtml = i, a._show = u, a.show = c, a._hide = d, a.hide = f, a.isDescendant = p, a.getTopMargin = m, a.fadeIn = v, a.fadeOut = y, a.fireClick = h, a.stopEventPropagation = b
+ }, {}], 5: [function (t, o, a) {
+ Object.defineProperty(a, "__esModule", {value: !0});
+ var r = t("./handle-dom"), s = t("./handle-swal-dom"), l = function (t, o, a) {
+ var l = t || e.event, i = l.keyCode || l.which, u = a.querySelector("button.confirm"),
+ c = a.querySelector("button.cancel"), d = a.querySelectorAll("button[tabindex]");
+ if (-1 !== [9, 13, 32, 27].indexOf(i)) {
+ for (var f = l.target || l.srcElement, p = -1, m = 0; m < d.length; m++) if (f === d[m]) {
+ p = m;
+ break
+ }
+ 9 === i ? (f = -1 === p ? u : p === d.length - 1 ? d[0] : d[p + 1], r.stopEventPropagation(l), f.focus(), o.confirmButtonColor && s.setFocusStyle(f, o.confirmButtonColor)) : 13 === i ? ("INPUT" === f.tagName && (f = u, u.focus()), f = -1 === p ? u : n) : 27 === i && o.allowEscapeKey === !0 ? (f = c, r.fireClick(f, l)) : f = n
+ }
+ };
+ a["default"] = l, o.exports = a["default"]
+ }, {"./handle-dom": 4, "./handle-swal-dom": 6}], 6: [function (n, o, a) {
+ var r = function (e) {
+ return e && e.__esModule ? e : {"default": e}
+ };
+ Object.defineProperty(a, "__esModule", {value: !0});
+ var s = n("./utils"), l = n("./handle-dom"), i = n("./default-params"), u = r(i), c = n("./injected-html"),
+ d = r(c), f = ".sweet-alert", p = ".sweet-overlay", m = function () {
+ var e = t.createElement("div");
+ for (e.innerHTML = d["default"]; e.firstChild;) t.body.appendChild(e.firstChild)
+ }, v = function (e) {
+ function t() {
+ return e.apply(this, arguments)
+ }
+
+ return t.toString = function () {
+ return e.toString()
+ }, t
+ }(function () {
+ var e = t.querySelector(f);
+ return e || (m(), e = v()), e
+ }), y = function () {
+ var e = v();
+ return e ? e.querySelector("input") : void 0
+ }, h = function () {
+ return t.querySelector(p)
+ }, b = function (e, t) {
+ var n = s.hexToRgb(t);
+ e.style.boxShadow = "0 0 2px rgba(" + n + ", 0.8), inset 0 0 0 1px rgba(0, 0, 0, 0.05)"
+ }, g = function (n) {
+ var o = v();
+ l.fadeIn(h(), 10), l.show(o), l.addClass(o, "showSweetAlert"), l.removeClass(o, "hideSweetAlert"), e.previousActiveElement = t.activeElement;
+ var a = o.querySelector("button.confirm");
+ a.focus(), setTimeout(function () {
+ l.addClass(o, "visible")
+ }, 500);
+ var r = o.getAttribute("data-timer");
+ if ("null" !== r && "" !== r) {
+ var s = n;
+ o.timeout = setTimeout(function () {
+ var e = (s || null) && "true" === o.getAttribute("data-has-done-function");
+ e ? s(null) : sweetAlert.close()
+ }, r)
+ }
+ }, w = function () {
+ var e = v(), t = y();
+ l.removeClass(e, "show-input"), t.value = u["default"].inputValue, t.setAttribute("type", u["default"].inputType), t.setAttribute("placeholder", u["default"].inputPlaceholder), C()
+ }, C = function (e) {
+ if (e && 13 === e.keyCode) return !1;
+ var t = v(), n = t.querySelector(".sa-input-error");
+ l.removeClass(n, "show");
+ var o = t.querySelector(".sa-error-container");
+ l.removeClass(o, "show")
+ }, S = function () {
+ var e = v();
+ e.style.marginTop = l.getTopMargin(v())
+ };
+ a.sweetAlertInitialize = m, a.getModal = v, a.getOverlay = h, a.getInput = y, a.setFocusStyle = b, a.openModal = g, a.resetInput = w, a.resetInputError = C, a.fixVerticalPosition = S
+ }, {"./default-params": 2, "./handle-dom": 4, "./injected-html": 7, "./utils": 9}], 7: [function (e, t, n) {
+ Object.defineProperty(n, "__esModule", {value: !0});
+ var o = '
\n \n \n \n \n
\n \n \n
\n \n \n\n \n \n
Title
\n
Text
\n
\n
!
\n
Not valid!
\n
\n \n
\n
\n \n \n \n
\n
\n
';
+ n["default"] = o, t.exports = n["default"]
+ }, {}], 8: [function (e, t, o) {
+ Object.defineProperty(o, "__esModule", {value: !0});
+ var a = e("./utils"), r = e("./handle-swal-dom"), s = e("./handle-dom"),
+ l = ["error", "warning", "info", "success", "input", "prompt"], i = function (e) {
+ var t = r.getModal(), o = t.querySelector("h2"), i = t.querySelector("p"),
+ u = t.querySelector("button.cancel"), c = t.querySelector("button.confirm");
+ if (o.innerHTML = e.html ? e.title : s.escapeHtml(e.title).split("\n").join(" "), i.innerHTML = e.html ? e.text : s.escapeHtml(e.text || "").split("\n").join(" "), e.text && s.show(i), e.customClass) s.addClass(t, e.customClass), t.setAttribute("data-custom-class", e.customClass); else {
+ var d = t.getAttribute("data-custom-class");
+ s.removeClass(t, d), t.setAttribute("data-custom-class", "")
+ }
+ if (s.hide(t.querySelectorAll(".sa-icon")), e.type && !a.isIE8()) {
+ var f = function () {
+ for (var o = !1, a = 0; a < l.length; a++) if (e.type === l[a]) {
+ o = !0;
+ break
+ }
+ if (!o) return logStr("Unknown alert type: " + e.type), {v: !1};
+ var i = ["success", "error", "warning", "info"], u = n;
+ -1 !== i.indexOf(e.type) && (u = t.querySelector(".sa-icon.sa-" + e.type), s.show(u));
+ var c = r.getInput();
+ switch (e.type) {
+ case"success":
+ s.addClass(u, "animate"), s.addClass(u.querySelector(".sa-tip"), "animateSuccessTip"), s.addClass(u.querySelector(".sa-long"), "animateSuccessLong");
+ break;
+ case"error":
+ s.addClass(u, "animateErrorIcon"), s.addClass(u.querySelector(".sa-x-mark"), "animateXMark");
+ break;
+ case"warning":
+ s.addClass(u, "pulseWarning"), s.addClass(u.querySelector(".sa-body"), "pulseWarningIns"), s.addClass(u.querySelector(".sa-dot"), "pulseWarningIns");
+ break;
+ case"input":
+ case"prompt":
+ c.setAttribute("type", e.inputType), c.value = e.inputValue, c.setAttribute("placeholder", e.inputPlaceholder), s.addClass(t, "show-input"), setTimeout(function () {
+ c.focus(), c.addEventListener("keyup", swal.resetInputError)
+ }, 400)
+ }
+ }();
+ if ("object" == typeof f) return f.v
+ }
+ if (e.imageUrl) {
+ var p = t.querySelector(".sa-icon.sa-custom");
+ p.style.backgroundImage = "url(" + e.imageUrl + ")", s.show(p);
+ var m = 80, v = 80;
+ if (e.imageSize) {
+ var y = e.imageSize.toString().split("x"), h = y[0], b = y[1];
+ h && b ? (m = h, v = b) : logStr("Parameter imageSize expects value with format WIDTHxHEIGHT, got " + e.imageSize)
+ }
+ p.setAttribute("style", p.getAttribute("style") + "width:" + m + "px; height:" + v + "px")
+ }
+ t.setAttribute("data-has-cancel-button", e.showCancelButton), e.showCancelButton ? u.style.display = "inline-block" : s.hide(u), t.setAttribute("data-has-confirm-button", e.showConfirmButton), e.showConfirmButton ? c.style.display = "inline-block" : s.hide(c), e.cancelButtonText && (u.innerHTML = s.escapeHtml(e.cancelButtonText)), e.confirmButtonText && (c.innerHTML = s.escapeHtml(e.confirmButtonText)), e.confirmButtonColor && (c.style.backgroundColor = e.confirmButtonColor, c.style.borderLeftColor = e.confirmLoadingButtonColor, c.style.borderRightColor = e.confirmLoadingButtonColor, r.setFocusStyle(c, e.confirmButtonColor)), t.setAttribute("data-allow-outside-click", e.allowOutsideClick);
+ var g = e.doneFunction ? !0 : !1;
+ t.setAttribute("data-has-done-function", g), e.animation ? "string" == typeof e.animation ? t.setAttribute("data-animation", e.animation) : t.setAttribute("data-animation", "pop") : t.setAttribute("data-animation", "none"), t.setAttribute("data-timer", e.timer)
+ };
+ o["default"] = i, t.exports = o["default"]
+ }, {"./handle-dom": 4, "./handle-swal-dom": 6, "./utils": 9}], 9: [function (t, n, o) {
+ Object.defineProperty(o, "__esModule", {value: !0});
+ var a = function (e, t) {
+ for (var n in t) t.hasOwnProperty(n) && (e[n] = t[n]);
+ return e
+ }, r = function (e) {
+ var t = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);
+ return t ? parseInt(t[1], 16) + ", " + parseInt(t[2], 16) + ", " + parseInt(t[3], 16) : null
+ }, s = function () {
+ return e.attachEvent && !e.addEventListener
+ }, l = function (t) {
+ e.console && e.console.log("SweetAlert: " + t)
+ }, i = function (e, t) {
+ e = String(e).replace(/[^0-9a-f]/gi, ""), e.length < 6 && (e = e[0] + e[0] + e[1] + e[1] + e[2] + e[2]), t = t || 0;
+ var n, o, a = "#";
+ for (o = 0; 3 > o; o++) n = parseInt(e.substr(2 * o, 2), 16), n = Math.round(Math.min(Math.max(0, n + n * t), 255)).toString(16), a += ("00" + n).substr(n.length);
+ return a
+ };
+ o.extend = a, o.hexToRgb = r, o.isIE8 = s, o.logStr = l, o.colorLuminance = i
+ }, {}]
+ }, {}, [1]), "function" == typeof define && define.amd ? define(function () {
+ return sweetAlert
+ }) : "undefined" != typeof module && module.exports && (module.exports = sweetAlert)
+}(window, document);
+/*!
+ * Bootstrap v3.3.1 (http://getbootstrap.com)
+ * Copyright 2011-2014 Twitter, Inc.
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
+ */
+if ("undefined" == typeof jQuery) throw new Error("Bootstrap's JavaScript requires jQuery");
++function (a) {
+ var b = a.fn.jquery.split(" ")[0].split(".");
+ if (b[0] < 2 && b[1] < 9 || 1 == b[0] && 9 == b[1] && b[2] < 1) throw new Error("Bootstrap's JavaScript requires jQuery version 1.9.1 or higher")
+}(jQuery), +function (a) {
+ "use strict";
+
+ function b() {
+ var a = document.createElement("bootstrap"), b = {
+ WebkitTransition: "webkitTransitionEnd",
+ MozTransition: "transitionend",
+ OTransition: "oTransitionEnd otransitionend",
+ transition: "transitionend"
+ };
+ for (var c in b) if (void 0 !== a.style[c]) return {end: b[c]};
+ return !1
+ }
+
+ a.fn.emulateTransitionEnd = function (b) {
+ var c = !1, d = this;
+ a(this).one("bsTransitionEnd", function () {
+ c = !0
+ });
+ var e = function () {
+ c || a(d).trigger(a.support.transition.end)
+ };
+ return setTimeout(e, b), this
+ }, a(function () {
+ a.support.transition = b(), a.support.transition && (a.event.special.bsTransitionEnd = {
+ bindType: a.support.transition.end,
+ delegateType: a.support.transition.end,
+ handle: function (b) {
+ return a(b.target).is(this) ? b.handleObj.handler.apply(this, arguments) : void 0
+ }
+ })
+ })
+}(jQuery), +function (a) {
+ "use strict";
+
+ function b(b) {
+ return this.each(function () {
+ var c = a(this), e = c.data("bs.alert");
+ e || c.data("bs.alert", e = new d(this)), "string" == typeof b && e[b].call(c)
+ })
+ }
+
+ var c = '[data-dismiss="alert"]', d = function (b) {
+ a(b).on("click", c, this.close)
+ };
+ d.VERSION = "3.3.1", d.TRANSITION_DURATION = 150, d.prototype.close = function (b) {
+ function c() {
+ g.detach().trigger("closed.bs.alert").remove()
+ }
+
+ var e = a(this), f = e.attr("data-target");
+ f || (f = e.attr("href"), f = f && f.replace(/.*(?=#[^\s]*$)/, ""));
+ var g = a(f);
+ b && b.preventDefault(), g.length || (g = e.closest(".alert")), g.trigger(b = a.Event("close.bs.alert")), b.isDefaultPrevented() || (g.removeClass("in"), a.support.transition && g.hasClass("fade") ? g.one("bsTransitionEnd", c).emulateTransitionEnd(d.TRANSITION_DURATION) : c())
+ };
+ var e = a.fn.alert;
+ a.fn.alert = b, a.fn.alert.Constructor = d, a.fn.alert.noConflict = function () {
+ return a.fn.alert = e, this
+ }, a(document).on("click.bs.alert.data-api", c, d.prototype.close)
+}(jQuery), +function (a) {
+ "use strict";
+
+ function b(b) {
+ return this.each(function () {
+ var d = a(this), e = d.data("bs.button"), f = "object" == typeof b && b;
+ e || d.data("bs.button", e = new c(this, f)), "toggle" == b ? e.toggle() : b && e.setState(b)
+ })
+ }
+
+ var c = function (b, d) {
+ this.$element = a(b), this.options = a.extend({}, c.DEFAULTS, d), this.isLoading = !1
+ };
+ c.VERSION = "3.3.1", c.DEFAULTS = {loadingText: "loading..."}, c.prototype.setState = function (b) {
+ var c = "disabled", d = this.$element, e = d.is("input") ? "val" : "html", f = d.data();
+ b += "Text", null == f.resetText && d.data("resetText", d[e]()), setTimeout(a.proxy(function () {
+ d[e](null == f[b] ? this.options[b] : f[b]), "loadingText" == b ? (this.isLoading = !0, d.addClass(c).attr(c, c)) : this.isLoading && (this.isLoading = !1, d.removeClass(c).removeAttr(c))
+ }, this), 0)
+ }, c.prototype.toggle = function () {
+ var a = !0, b = this.$element.closest('[data-toggle="buttons"]');
+ if (b.length) {
+ var c = this.$element.find("input");
+ "radio" == c.prop("type") && (c.prop("checked") && this.$element.hasClass("active") ? a = !1 : b.find(".active").removeClass("active")), a && c.prop("checked", !this.$element.hasClass("active")).trigger("change")
+ } else this.$element.attr("aria-pressed", !this.$element.hasClass("active"));
+ a && this.$element.toggleClass("active")
+ };
+ var d = a.fn.button;
+ a.fn.button = b, a.fn.button.Constructor = c, a.fn.button.noConflict = function () {
+ return a.fn.button = d, this
+ }, a(document).on("click.bs.button.data-api", '[data-toggle^="button"]', function (c) {
+ var d = a(c.target);
+ d.hasClass("btn") || (d = d.closest(".btn")), b.call(d, "toggle"), c.preventDefault()
+ }).on("focus.bs.button.data-api blur.bs.button.data-api", '[data-toggle^="button"]', function (b) {
+ a(b.target).closest(".btn").toggleClass("focus", /^focus(in)?$/.test(b.type))
+ })
+}(jQuery), +function (a) {
+ "use strict";
+
+ function b(b) {
+ return this.each(function () {
+ var d = a(this), e = d.data("bs.carousel"),
+ f = a.extend({}, c.DEFAULTS, d.data(), "object" == typeof b && b),
+ g = "string" == typeof b ? b : f.slide;
+ e || d.data("bs.carousel", e = new c(this, f)), "number" == typeof b ? e.to(b) : g ? e[g]() : f.interval && e.pause().cycle()
+ })
+ }
+
+ var c = function (b, c) {
+ this.$element = a(b), this.$indicators = this.$element.find(".carousel-indicators"), this.options = c, this.paused = this.sliding = this.interval = this.$active = this.$items = null, this.options.keyboard && this.$element.on("keydown.bs.carousel", a.proxy(this.keydown, this)), "hover" == this.options.pause && !("ontouchstart" in document.documentElement) && this.$element.on("mouseenter.bs.carousel", a.proxy(this.pause, this)).on("mouseleave.bs.carousel", a.proxy(this.cycle, this))
+ };
+ c.VERSION = "3.3.1", c.TRANSITION_DURATION = 600, c.DEFAULTS = {
+ interval: 5e3,
+ pause: "hover",
+ wrap: !0,
+ keyboard: !0
+ }, c.prototype.keydown = function (a) {
+ if (!/input|textarea/i.test(a.target.tagName)) {
+ switch (a.which) {
+ case 37:
+ this.prev();
+ break;
+ case 39:
+ this.next();
+ break;
+ default:
+ return
+ }
+ a.preventDefault()
+ }
+ }, c.prototype.cycle = function (b) {
+ return b || (this.paused = !1), this.interval && clearInterval(this.interval), this.options.interval && !this.paused && (this.interval = setInterval(a.proxy(this.next, this), this.options.interval)), this
+ }, c.prototype.getItemIndex = function (a) {
+ return this.$items = a.parent().children(".item"), this.$items.index(a || this.$active)
+ }, c.prototype.getItemForDirection = function (a, b) {
+ var c = "prev" == a ? -1 : 1, d = this.getItemIndex(b), e = (d + c) % this.$items.length;
+ return this.$items.eq(e)
+ }, c.prototype.to = function (a) {
+ var b = this, c = this.getItemIndex(this.$active = this.$element.find(".item.active"));
+ return a > this.$items.length - 1 || 0 > a ? void 0 : this.sliding ? this.$element.one("slid.bs.carousel", function () {
+ b.to(a)
+ }) : c == a ? this.pause().cycle() : this.slide(a > c ? "next" : "prev", this.$items.eq(a))
+ }, c.prototype.pause = function (b) {
+ return b || (this.paused = !0), this.$element.find(".next, .prev").length && a.support.transition && (this.$element.trigger(a.support.transition.end), this.cycle(!0)), this.interval = clearInterval(this.interval), this
+ }, c.prototype.next = function () {
+ return this.sliding ? void 0 : this.slide("next")
+ }, c.prototype.prev = function () {
+ return this.sliding ? void 0 : this.slide("prev")
+ }, c.prototype.slide = function (b, d) {
+ var e = this.$element.find(".item.active"), f = d || this.getItemForDirection(b, e), g = this.interval,
+ h = "next" == b ? "left" : "right", i = "next" == b ? "first" : "last", j = this;
+ if (!f.length) {
+ if (!this.options.wrap) return;
+ f = this.$element.find(".item")[i]()
+ }
+ if (f.hasClass("active")) return this.sliding = !1;
+ var k = f[0], l = a.Event("slide.bs.carousel", {relatedTarget: k, direction: h});
+ if (this.$element.trigger(l), !l.isDefaultPrevented()) {
+ if (this.sliding = !0, g && this.pause(), this.$indicators.length) {
+ this.$indicators.find(".active").removeClass("active");
+ var m = a(this.$indicators.children()[this.getItemIndex(f)]);
+ m && m.addClass("active")
+ }
+ var n = a.Event("slid.bs.carousel", {relatedTarget: k, direction: h});
+ return a.support.transition && this.$element.hasClass("slide") ? (f.addClass(b), f[0].offsetWidth, e.addClass(h), f.addClass(h), e.one("bsTransitionEnd", function () {
+ f.removeClass([b, h].join(" ")).addClass("active"), e.removeClass(["active", h].join(" ")), j.sliding = !1, setTimeout(function () {
+ j.$element.trigger(n)
+ }, 0)
+ }).emulateTransitionEnd(c.TRANSITION_DURATION)) : (e.removeClass("active"), f.addClass("active"), this.sliding = !1, this.$element.trigger(n)), g && this.cycle(), this
+ }
+ };
+ var d = a.fn.carousel;
+ a.fn.carousel = b, a.fn.carousel.Constructor = c, a.fn.carousel.noConflict = function () {
+ return a.fn.carousel = d, this
+ };
+ var e = function (c) {
+ var d, e = a(this), f = a(e.attr("data-target") || (d = e.attr("href")) && d.replace(/.*(?=#[^\s]+$)/, ""));
+ if (f.hasClass("carousel")) {
+ var g = a.extend({}, f.data(), e.data()), h = e.attr("data-slide-to");
+ h && (g.interval = !1), b.call(f, g), h && f.data("bs.carousel").to(h), c.preventDefault()
+ }
+ };
+ a(document).on("click.bs.carousel.data-api", "[data-slide]", e).on("click.bs.carousel.data-api", "[data-slide-to]", e), a(window).on("load", function () {
+ a('[data-ride="carousel"]').each(function () {
+ var c = a(this);
+ b.call(c, c.data())
+ })
+ })
+}(jQuery), +function (a) {
+ "use strict";
+
+ function b(b) {
+ var c, d = b.attr("data-target") || (c = b.attr("href")) && c.replace(/.*(?=#[^\s]+$)/, "");
+ return a(d)
+ }
+
+ function c(b) {
+ return this.each(function () {
+ var c = a(this), e = c.data("bs.collapse"),
+ f = a.extend({}, d.DEFAULTS, c.data(), "object" == typeof b && b);
+ !e && f.toggle && "show" == b && (f.toggle = !1), e || c.data("bs.collapse", e = new d(this, f)), "string" == typeof b && e[b]()
+ })
+ }
+
+ var d = function (b, c) {
+ this.$element = a(b), this.options = a.extend({}, d.DEFAULTS, c), this.$trigger = a(this.options.trigger).filter('[href="#' + b.id + '"], [data-target="#' + b.id + '"]'), this.transitioning = null, this.options.parent ? this.$parent = this.getParent() : this.addAriaAndCollapsedClass(this.$element, this.$trigger), this.options.toggle && this.toggle()
+ };
+ d.VERSION = "3.3.1", d.TRANSITION_DURATION = 350, d.DEFAULTS = {
+ toggle: !0,
+ trigger: '[data-toggle="collapse"]'
+ }, d.prototype.dimension = function () {
+ var a = this.$element.hasClass("width");
+ return a ? "width" : "height"
+ }, d.prototype.show = function () {
+ if (!this.transitioning && !this.$element.hasClass("in")) {
+ var b, e = this.$parent && this.$parent.find("> .panel").children(".in, .collapsing");
+ if (!(e && e.length && (b = e.data("bs.collapse"), b && b.transitioning))) {
+ var f = a.Event("show.bs.collapse");
+ if (this.$element.trigger(f), !f.isDefaultPrevented()) {
+ e && e.length && (c.call(e, "hide"), b || e.data("bs.collapse", null));
+ var g = this.dimension();
+ this.$element.removeClass("collapse").addClass("collapsing")[g](0).attr("aria-expanded", !0), this.$trigger.removeClass("collapsed").attr("aria-expanded", !0), this.transitioning = 1;
+ var h = function () {
+ this.$element.removeClass("collapsing").addClass("collapse in")[g](""), this.transitioning = 0, this.$element.trigger("shown.bs.collapse")
+ };
+ if (!a.support.transition) return h.call(this);
+ var i = a.camelCase(["scroll", g].join("-"));
+ this.$element.one("bsTransitionEnd", a.proxy(h, this)).emulateTransitionEnd(d.TRANSITION_DURATION)[g](this.$element[0][i])
+ }
+ }
+ }
+ }, d.prototype.hide = function () {
+ if (!this.transitioning && this.$element.hasClass("in")) {
+ var b = a.Event("hide.bs.collapse");
+ if (this.$element.trigger(b), !b.isDefaultPrevented()) {
+ var c = this.dimension();
+ this.$element[c](this.$element[c]())[0].offsetHeight, this.$element.addClass("collapsing").removeClass("collapse in").attr("aria-expanded", !1), this.$trigger.addClass("collapsed").attr("aria-expanded", !1), this.transitioning = 1;
+ var e = function () {
+ this.transitioning = 0, this.$element.removeClass("collapsing").addClass("collapse").trigger("hidden.bs.collapse")
+ };
+ return a.support.transition ? void this.$element[c](0).one("bsTransitionEnd", a.proxy(e, this)).emulateTransitionEnd(d.TRANSITION_DURATION) : e.call(this)
+ }
+ }
+ }, d.prototype.toggle = function () {
+ this[this.$element.hasClass("in") ? "hide" : "show"]()
+ }, d.prototype.getParent = function () {
+ return a(this.options.parent).find('[data-toggle="collapse"][data-parent="' + this.options.parent + '"]').each(a.proxy(function (c, d) {
+ var e = a(d);
+ this.addAriaAndCollapsedClass(b(e), e)
+ }, this)).end()
+ }, d.prototype.addAriaAndCollapsedClass = function (a, b) {
+ var c = a.hasClass("in");
+ a.attr("aria-expanded", c), b.toggleClass("collapsed", !c).attr("aria-expanded", c)
+ };
+ var e = a.fn.collapse;
+ a.fn.collapse = c, a.fn.collapse.Constructor = d, a.fn.collapse.noConflict = function () {
+ return a.fn.collapse = e, this
+ }, a(document).on("click.bs.collapse.data-api", '[data-toggle="collapse"]', function (d) {
+ var e = a(this);
+ e.attr("data-target") || d.preventDefault();
+ var f = b(e), g = f.data("bs.collapse"), h = g ? "toggle" : a.extend({}, e.data(), {trigger: this});
+ c.call(f, h)
+ })
+}(jQuery), +function (a) {
+ "use strict";
+
+ function b(b) {
+ b && 3 === b.which || (a(e).remove(), a(f).each(function () {
+ var d = a(this), e = c(d), f = {relatedTarget: this};
+ e.hasClass("open") && (e.trigger(b = a.Event("hide.bs.dropdown", f)), b.isDefaultPrevented() || (d.attr("aria-expanded", "false"), e.removeClass("open").trigger("hidden.bs.dropdown", f)))
+ }))
+ }
+
+ function c(b) {
+ var c = b.attr("data-target");
+ c || (c = b.attr("href"), c = c && /#[A-Za-z]/.test(c) && c.replace(/.*(?=#[^\s]*$)/, ""));
+ var d = c && a(c);
+ return d && d.length ? d : b.parent()
+ }
+
+ function d(b) {
+ return this.each(function () {
+ var c = a(this), d = c.data("bs.dropdown");
+ d || c.data("bs.dropdown", d = new g(this)), "string" == typeof b && d[b].call(c)
+ })
+ }
+
+ var e = ".dropdown-backdrop", f = '[data-toggle="dropdown"]', g = function (b) {
+ a(b).on("click.bs.dropdown", this.toggle)
+ };
+ g.VERSION = "3.3.1", g.prototype.toggle = function (d) {
+ var e = a(this);
+ if (!e.is(".disabled, :disabled")) {
+ var f = c(e), g = f.hasClass("open");
+ if (b(), !g) {
+ "ontouchstart" in document.documentElement && !f.closest(".navbar-nav").length && a('').insertAfter(a(this)).on("click", b);
+ var h = {relatedTarget: this};
+ if (f.trigger(d = a.Event("show.bs.dropdown", h)), d.isDefaultPrevented()) return;
+ e.trigger("focus").attr("aria-expanded", "true"), f.toggleClass("open").trigger("shown.bs.dropdown", h)
+ }
+ return !1
+ }
+ }, g.prototype.keydown = function (b) {
+ if (/(38|40|27|32)/.test(b.which) && !/input|textarea/i.test(b.target.tagName)) {
+ var d = a(this);
+ if (b.preventDefault(), b.stopPropagation(), !d.is(".disabled, :disabled")) {
+ var e = c(d), g = e.hasClass("open");
+ if (!g && 27 != b.which || g && 27 == b.which) return 27 == b.which && e.find(f).trigger("focus"), d.trigger("click");
+ var h = " li:not(.divider):visible a", i = e.find('[role="menu"]' + h + ', [role="listbox"]' + h);
+ if (i.length) {
+ var j = i.index(b.target);
+ 38 == b.which && j > 0 && j--, 40 == b.which && j < i.length - 1 && j++, ~j || (j = 0), i.eq(j).trigger("focus")
+ }
+ }
+ }
+ };
+ var h = a.fn.dropdown;
+ a.fn.dropdown = d, a.fn.dropdown.Constructor = g, a.fn.dropdown.noConflict = function () {
+ return a.fn.dropdown = h, this
+ }, a(document).on("click.bs.dropdown.data-api", b).on("click.bs.dropdown.data-api", ".dropdown form", function (a) {
+ a.stopPropagation()
+ }).on("click.bs.dropdown.data-api", f, g.prototype.toggle).on("keydown.bs.dropdown.data-api", f, g.prototype.keydown).on("keydown.bs.dropdown.data-api", '[role="menu"]', g.prototype.keydown).on("keydown.bs.dropdown.data-api", '[role="listbox"]', g.prototype.keydown)
+}(jQuery), +function (a) {
+ "use strict";
+
+ function b(b, d) {
+ return this.each(function () {
+ var e = a(this), f = e.data("bs.modal"), g = a.extend({}, c.DEFAULTS, e.data(), "object" == typeof b && b);
+ f || e.data("bs.modal", f = new c(this, g)), "string" == typeof b ? f[b](d) : g.show && f.show(d)
+ })
+ }
+
+ var c = function (b, c) {
+ this.options = c, this.$body = a(document.body), this.$element = a(b), this.$backdrop = this.isShown = null, this.scrollbarWidth = 0, this.options.remote && this.$element.find(".modal-content").load(this.options.remote, a.proxy(function () {
+ this.$element.trigger("loaded.bs.modal")
+ }, this))
+ };
+ c.VERSION = "3.3.1", c.TRANSITION_DURATION = 300, c.BACKDROP_TRANSITION_DURATION = 150, c.DEFAULTS = {
+ backdrop: !0,
+ keyboard: !0,
+ show: !0
+ }, c.prototype.toggle = function (a) {
+ return this.isShown ? this.hide() : this.show(a)
+ }, c.prototype.show = function (b) {
+ var d = this, e = a.Event("show.bs.modal", {relatedTarget: b});
+ this.$element.trigger(e), this.isShown || e.isDefaultPrevented() || (this.isShown = !0, this.checkScrollbar(), this.setScrollbar(), this.$body.addClass("modal-open"), this.escape(), this.resize(), this.$element.on("click.dismiss.bs.modal", '[data-dismiss="modal"]', a.proxy(this.hide, this)), this.backdrop(function () {
+ var e = a.support.transition && d.$element.hasClass("fade");
+ d.$element.parent().length || d.$element.appendTo(d.$body), d.$element.show().scrollTop(0), d.options.backdrop && d.adjustBackdrop(), d.adjustDialog(), e && d.$element[0].offsetWidth, d.$element.addClass("in").attr("aria-hidden", !1), d.enforceFocus();
+ var f = a.Event("shown.bs.modal", {relatedTarget: b});
+ e ? d.$element.find(".modal-dialog").one("bsTransitionEnd", function () {
+ d.$element.trigger("focus").trigger(f)
+ }).emulateTransitionEnd(c.TRANSITION_DURATION) : d.$element.trigger("focus").trigger(f)
+ }))
+ }, c.prototype.hide = function (b) {
+ b && b.preventDefault(), b = a.Event("hide.bs.modal"), this.$element.trigger(b), this.isShown && !b.isDefaultPrevented() && (this.isShown = !1, this.escape(), this.resize(), a(document).off("focusin.bs.modal"), this.$element.removeClass("in").attr("aria-hidden", !0).off("click.dismiss.bs.modal"), a.support.transition && this.$element.hasClass("fade") ? this.$element.one("bsTransitionEnd", a.proxy(this.hideModal, this)).emulateTransitionEnd(c.TRANSITION_DURATION) : this.hideModal())
+ }, c.prototype.enforceFocus = function () {
+ a(document).off("focusin.bs.modal").on("focusin.bs.modal", a.proxy(function (a) {
+ this.$element[0] === a.target || this.$element.has(a.target).length || this.$element.trigger("focus")
+ }, this))
+ }, c.prototype.escape = function () {
+ this.isShown && this.options.keyboard ? this.$element.on("keydown.dismiss.bs.modal", a.proxy(function (a) {
+ 27 == a.which && this.hide()
+ }, this)) : this.isShown || this.$element.off("keydown.dismiss.bs.modal")
+ }, c.prototype.resize = function () {
+ this.isShown ? a(window).on("resize.bs.modal", a.proxy(this.handleUpdate, this)) : a(window).off("resize.bs.modal")
+ }, c.prototype.hideModal = function () {
+ var a = this;
+ this.$element.hide(), this.backdrop(function () {
+ a.$body.removeClass("modal-open"), a.resetAdjustments(), a.resetScrollbar(), a.$element.trigger("hidden.bs.modal")
+ })
+ }, c.prototype.removeBackdrop = function () {
+ this.$backdrop && this.$backdrop.remove(), this.$backdrop = null
+ }, c.prototype.backdrop = function (b) {
+ var d = this, e = this.$element.hasClass("fade") ? "fade" : "";
+ if (this.isShown && this.options.backdrop) {
+ var f = a.support.transition && e;
+ if (this.$backdrop = a('').prependTo(this.$element).on("click.dismiss.bs.modal", a.proxy(function (a) {
+ a.target === a.currentTarget && ("static" == this.options.backdrop ? this.$element[0].focus.call(this.$element[0]) : this.hide.call(this))
+ }, this)), f && this.$backdrop[0].offsetWidth, this.$backdrop.addClass("in"), !b) return;
+ f ? this.$backdrop.one("bsTransitionEnd", b).emulateTransitionEnd(c.BACKDROP_TRANSITION_DURATION) : b()
+ } else if (!this.isShown && this.$backdrop) {
+ this.$backdrop.removeClass("in");
+ var g = function () {
+ d.removeBackdrop(), b && b()
+ };
+ a.support.transition && this.$element.hasClass("fade") ? this.$backdrop.one("bsTransitionEnd", g).emulateTransitionEnd(c.BACKDROP_TRANSITION_DURATION) : g()
+ } else b && b()
+ }, c.prototype.handleUpdate = function () {
+ this.options.backdrop && this.adjustBackdrop(), this.adjustDialog()
+ }, c.prototype.adjustBackdrop = function () {
+ this.$backdrop.css("height", 0).css("height", this.$element[0].scrollHeight)
+ }, c.prototype.adjustDialog = function () {
+ var a = this.$element[0].scrollHeight > document.documentElement.clientHeight;
+ this.$element.css({
+ paddingLeft: !this.bodyIsOverflowing && a ? this.scrollbarWidth : "",
+ paddingRight: this.bodyIsOverflowing && !a ? this.scrollbarWidth : ""
+ })
+ }, c.prototype.resetAdjustments = function () {
+ this.$element.css({paddingLeft: "", paddingRight: ""})
+ }, c.prototype.checkScrollbar = function () {
+ this.bodyIsOverflowing = document.body.scrollHeight > document.documentElement.clientHeight, this.scrollbarWidth = this.measureScrollbar()
+ }, c.prototype.setScrollbar = function () {
+ var a = parseInt(this.$body.css("padding-right") || 0, 10);
+ this.bodyIsOverflowing && this.$body.css("padding-right", a + this.scrollbarWidth)
+ }, c.prototype.resetScrollbar = function () {
+ this.$body.css("padding-right", "")
+ }, c.prototype.measureScrollbar = function () {
+ var a = document.createElement("div");
+ a.className = "modal-scrollbar-measure", this.$body.append(a);
+ var b = a.offsetWidth - a.clientWidth;
+ return this.$body[0].removeChild(a), b
+ };
+ var d = a.fn.modal;
+ a.fn.modal = b, a.fn.modal.Constructor = c, a.fn.modal.noConflict = function () {
+ return a.fn.modal = d, this
+ }, a(document).on("click.bs.modal.data-api", '[data-toggle="modal"]', function (c) {
+ var d = a(this), e = d.attr("href"), f = a(d.attr("data-target") || e && e.replace(/.*(?=#[^\s]+$)/, "")),
+ g = f.data("bs.modal") ? "toggle" : a.extend({remote: !/#/.test(e) && e}, f.data(), d.data());
+ d.is("a") && c.preventDefault(), f.one("show.bs.modal", function (a) {
+ a.isDefaultPrevented() || f.one("hidden.bs.modal", function () {
+ d.is(":visible") && d.trigger("focus")
+ })
+ }), b.call(f, g, this)
+ })
+}(jQuery), +function (a) {
+ "use strict";
+
+ function b(b) {
+ return this.each(function () {
+ var d = a(this), e = d.data("bs.tooltip"), f = "object" == typeof b && b, g = f && f.selector;
+ (e || "destroy" != b) && (g ? (e || d.data("bs.tooltip", e = {}), e[g] || (e[g] = new c(this, f))) : e || d.data("bs.tooltip", e = new c(this, f)), "string" == typeof b && e[b]())
+ })
+ }
+
+ var c = function (a, b) {
+ this.type = this.options = this.enabled = this.timeout = this.hoverState = this.$element = null, this.init("tooltip", a, b)
+ };
+ c.VERSION = "3.3.1", c.TRANSITION_DURATION = 150, c.DEFAULTS = {
+ animation: !0,
+ placement: "top",
+ selector: !1,
+ template: '
',
+ trigger: "hover focus",
+ title: "",
+ delay: 0,
+ html: !1,
+ container: !1,
+ viewport: {selector: "body", padding: 0}
+ }, c.prototype.init = function (b, c, d) {
+ this.enabled = !0, this.type = b, this.$element = a(c), this.options = this.getOptions(d), this.$viewport = this.options.viewport && a(this.options.viewport.selector || this.options.viewport);
+ for (var e = this.options.trigger.split(" "), f = e.length; f--;) {
+ var g = e[f];
+ if ("click" == g) this.$element.on("click." + this.type, this.options.selector, a.proxy(this.toggle, this)); else if ("manual" != g) {
+ var h = "hover" == g ? "mouseenter" : "focusin", i = "hover" == g ? "mouseleave" : "focusout";
+ this.$element.on(h + "." + this.type, this.options.selector, a.proxy(this.enter, this)), this.$element.on(i + "." + this.type, this.options.selector, a.proxy(this.leave, this))
+ }
+ }
+ this.options.selector ? this._options = a.extend({}, this.options, {
+ trigger: "manual",
+ selector: ""
+ }) : this.fixTitle()
+ }, c.prototype.getDefaults = function () {
+ return c.DEFAULTS
+ }, c.prototype.getOptions = function (b) {
+ return b = a.extend({}, this.getDefaults(), this.$element.data(), b), b.delay && "number" == typeof b.delay && (b.delay = {
+ show: b.delay,
+ hide: b.delay
+ }), b
+ }, c.prototype.getDelegateOptions = function () {
+ var b = {}, c = this.getDefaults();
+ return this._options && a.each(this._options, function (a, d) {
+ c[a] != d && (b[a] = d)
+ }), b
+ }, c.prototype.enter = function (b) {
+ var c = b instanceof this.constructor ? b : a(b.currentTarget).data("bs." + this.type);
+ return c && c.$tip && c.$tip.is(":visible") ? void(c.hoverState = "in") : (c || (c = new this.constructor(b.currentTarget, this.getDelegateOptions()), a(b.currentTarget).data("bs." + this.type, c)), clearTimeout(c.timeout), c.hoverState = "in", c.options.delay && c.options.delay.show ? void(c.timeout = setTimeout(function () {
+ "in" == c.hoverState && c.show()
+ }, c.options.delay.show)) : c.show())
+ }, c.prototype.leave = function (b) {
+ var c = b instanceof this.constructor ? b : a(b.currentTarget).data("bs." + this.type);
+ return c || (c = new this.constructor(b.currentTarget, this.getDelegateOptions()), a(b.currentTarget).data("bs." + this.type, c)), clearTimeout(c.timeout), c.hoverState = "out", c.options.delay && c.options.delay.hide ? void(c.timeout = setTimeout(function () {
+ "out" == c.hoverState && c.hide()
+ }, c.options.delay.hide)) : c.hide()
+ }, c.prototype.show = function () {
+ var b = a.Event("show.bs." + this.type);
+ if (this.hasContent() && this.enabled) {
+ this.$element.trigger(b);
+ var d = a.contains(this.$element[0].ownerDocument.documentElement, this.$element[0]);
+ if (b.isDefaultPrevented() || !d) return;
+ var e = this, f = this.tip(), g = this.getUID(this.type);
+ this.setContent(), f.attr("id", g), this.$element.attr("aria-describedby", g), this.options.animation && f.addClass("fade");
+ var h = "function" == typeof this.options.placement ? this.options.placement.call(this, f[0], this.$element[0]) : this.options.placement,
+ i = /\s?auto?\s?/i, j = i.test(h);
+ j && (h = h.replace(i, "") || "top"), f.detach().css({
+ top: 0,
+ left: 0,
+ display: "block"
+ }).addClass(h).data("bs." + this.type, this), this.options.container ? f.appendTo(this.options.container) : f.insertAfter(this.$element);
+ var k = this.getPosition(), l = f[0].offsetWidth, m = f[0].offsetHeight;
+ if (j) {
+ var n = h, o = this.options.container ? a(this.options.container) : this.$element.parent(),
+ p = this.getPosition(o);
+ h = "bottom" == h && k.bottom + m > p.bottom ? "top" : "top" == h && k.top - m < p.top ? "bottom" : "right" == h && k.right + l > p.width ? "left" : "left" == h && k.left - l < p.left ? "right" : h, f.removeClass(n).addClass(h)
+ }
+ var q = this.getCalculatedOffset(h, k, l, m);
+ this.applyPlacement(q, h);
+ var r = function () {
+ var a = e.hoverState;
+ e.$element.trigger("shown.bs." + e.type), e.hoverState = null, "out" == a && e.leave(e)
+ };
+ a.support.transition && this.$tip.hasClass("fade") ? f.one("bsTransitionEnd", r).emulateTransitionEnd(c.TRANSITION_DURATION) : r()
+ }
+ }, c.prototype.applyPlacement = function (b, c) {
+ var d = this.tip(), e = d[0].offsetWidth, f = d[0].offsetHeight, g = parseInt(d.css("margin-top"), 10),
+ h = parseInt(d.css("margin-left"), 10);
+ isNaN(g) && (g = 0), isNaN(h) && (h = 0), b.top = b.top + g, b.left = b.left + h, a.offset.setOffset(d[0], a.extend({
+ using: function (a) {
+ d.css({top: Math.round(a.top), left: Math.round(a.left)})
+ }
+ }, b), 0), d.addClass("in");
+ var i = d[0].offsetWidth, j = d[0].offsetHeight;
+ "top" == c && j != f && (b.top = b.top + f - j);
+ var k = this.getViewportAdjustedDelta(c, b, i, j);
+ k.left ? b.left += k.left : b.top += k.top;
+ var l = /top|bottom/.test(c), m = l ? 2 * k.left - e + i : 2 * k.top - f + j,
+ n = l ? "offsetWidth" : "offsetHeight";
+ d.offset(b), this.replaceArrow(m, d[0][n], l)
+ }, c.prototype.replaceArrow = function (a, b, c) {
+ this.arrow().css(c ? "left" : "top", 50 * (1 - a / b) + "%").css(c ? "top" : "left", "")
+ }, c.prototype.setContent = function () {
+ var a = this.tip(), b = this.getTitle();
+ a.find(".tooltip-inner")[this.options.html ? "html" : "text"](b), a.removeClass("fade in top bottom left right")
+ }, c.prototype.hide = function (b) {
+ function d() {
+ "in" != e.hoverState && f.detach(), e.$element.removeAttr("aria-describedby").trigger("hidden.bs." + e.type), b && b()
+ }
+
+ var e = this, f = this.tip(), g = a.Event("hide.bs." + this.type);
+ return this.$element.trigger(g), g.isDefaultPrevented() ? void 0 : (f.removeClass("in"), a.support.transition && this.$tip.hasClass("fade") ? f.one("bsTransitionEnd", d).emulateTransitionEnd(c.TRANSITION_DURATION) : d(), this.hoverState = null, this)
+ }, c.prototype.fixTitle = function () {
+ var a = this.$element;
+ (a.attr("title") || "string" != typeof a.attr("data-original-title")) && a.attr("data-original-title", a.attr("title") || "").attr("title", "")
+ }, c.prototype.hasContent = function () {
+ return this.getTitle()
+ }, c.prototype.getPosition = function (b) {
+ b = b || this.$element;
+ var c = b[0], d = "BODY" == c.tagName, e = c.getBoundingClientRect();
+ null == e.width && (e = a.extend({}, e, {width: e.right - e.left, height: e.bottom - e.top}));
+ var f = d ? {top: 0, left: 0} : b.offset(),
+ g = {scroll: d ? document.documentElement.scrollTop || document.body.scrollTop : b.scrollTop()},
+ h = d ? {width: a(window).width(), height: a(window).height()} : null;
+ return a.extend({}, e, g, h, f)
+ }, c.prototype.getCalculatedOffset = function (a, b, c, d) {
+ return "bottom" == a ? {
+ top: b.top + b.height,
+ left: b.left + b.width / 2 - c / 2
+ } : "top" == a ? {
+ top: b.top - d,
+ left: b.left + b.width / 2 - c / 2
+ } : "left" == a ? {top: b.top + b.height / 2 - d / 2, left: b.left - c} : {
+ top: b.top + b.height / 2 - d / 2,
+ left: b.left + b.width
+ }
+ }, c.prototype.getViewportAdjustedDelta = function (a, b, c, d) {
+ var e = {top: 0, left: 0};
+ if (!this.$viewport) return e;
+ var f = this.options.viewport && this.options.viewport.padding || 0, g = this.getPosition(this.$viewport);
+ if (/right|left/.test(a)) {
+ var h = b.top - f - g.scroll, i = b.top + f - g.scroll + d;
+ h < g.top ? e.top = g.top - h : i > g.top + g.height && (e.top = g.top + g.height - i)
+ } else {
+ var j = b.left - f, k = b.left + f + c;
+ j < g.left ? e.left = g.left - j : k > g.width && (e.left = g.left + g.width - k)
+ }
+ return e
+ }, c.prototype.getTitle = function () {
+ var a, b = this.$element, c = this.options;
+ return a = b.attr("data-original-title") || ("function" == typeof c.title ? c.title.call(b[0]) : c.title)
+ }, c.prototype.getUID = function (a) {
+ do a += ~~(1e6 * Math.random()); while (document.getElementById(a));
+ return a
+ }, c.prototype.tip = function () {
+ return this.$tip = this.$tip || a(this.options.template)
+ }, c.prototype.arrow = function () {
+ return this.$arrow = this.$arrow || this.tip().find(".tooltip-arrow")
+ }, c.prototype.enable = function () {
+ this.enabled = !0
+ }, c.prototype.disable = function () {
+ this.enabled = !1
+ }, c.prototype.toggleEnabled = function () {
+ this.enabled = !this.enabled
+ }, c.prototype.toggle = function (b) {
+ var c = this;
+ b && (c = a(b.currentTarget).data("bs." + this.type), c || (c = new this.constructor(b.currentTarget, this.getDelegateOptions()), a(b.currentTarget).data("bs." + this.type, c))), c.tip().hasClass("in") ? c.leave(c) : c.enter(c)
+ }, c.prototype.destroy = function () {
+ var a = this;
+ clearTimeout(this.timeout), this.hide(function () {
+ a.$element.off("." + a.type).removeData("bs." + a.type)
+ })
+ };
+ var d = a.fn.tooltip;
+ a.fn.tooltip = b, a.fn.tooltip.Constructor = c, a.fn.tooltip.noConflict = function () {
+ return a.fn.tooltip = d, this
+ }
+}(jQuery), +function (a) {
+ "use strict";
+
+ function b(b) {
+ return this.each(function () {
+ var d = a(this), e = d.data("bs.popover"), f = "object" == typeof b && b, g = f && f.selector;
+ (e || "destroy" != b) && (g ? (e || d.data("bs.popover", e = {}), e[g] || (e[g] = new c(this, f))) : e || d.data("bs.popover", e = new c(this, f)), "string" == typeof b && e[b]())
+ })
+ }
+
+ var c = function (a, b) {
+ this.init("popover", a, b)
+ };
+ if (!a.fn.tooltip) throw new Error("Popover requires tooltip.js");
+ c.VERSION = "3.3.1", c.DEFAULTS = a.extend({}, a.fn.tooltip.Constructor.DEFAULTS, {
+ placement: "right",
+ trigger: "click",
+ content: "",
+ template: '
'
+ }), c.prototype = a.extend({}, a.fn.tooltip.Constructor.prototype), c.prototype.constructor = c, c.prototype.getDefaults = function () {
+ return c.DEFAULTS
+ }, c.prototype.setContent = function () {
+ var a = this.tip(), b = this.getTitle(), c = this.getContent();
+ a.find(".popover-title")[this.options.html ? "html" : "text"](b), a.find(".popover-content").children().detach().end()[this.options.html ? "string" == typeof c ? "html" : "append" : "text"](c), a.removeClass("fade top bottom left right in"), a.find(".popover-title").html() || a.find(".popover-title").hide()
+ }, c.prototype.hasContent = function () {
+ return this.getTitle() || this.getContent()
+ }, c.prototype.getContent = function () {
+ var a = this.$element, b = this.options;
+ return a.attr("data-content") || ("function" == typeof b.content ? b.content.call(a[0]) : b.content)
+ }, c.prototype.arrow = function () {
+ return this.$arrow = this.$arrow || this.tip().find(".arrow")
+ }, c.prototype.tip = function () {
+ return this.$tip || (this.$tip = a(this.options.template)), this.$tip
+ };
+ var d = a.fn.popover;
+ a.fn.popover = b, a.fn.popover.Constructor = c, a.fn.popover.noConflict = function () {
+ return a.fn.popover = d, this
+ }
+}(jQuery), +function (a) {
+ "use strict";
+
+ function b(c, d) {
+ var e = a.proxy(this.process, this);
+ this.$body = a("body"), this.$scrollElement = a(a(c).is("body") ? window : c), this.options = a.extend({}, b.DEFAULTS, d), this.selector = (this.options.target || "") + " .nav li > a", this.offsets = [], this.targets = [], this.activeTarget = null, this.scrollHeight = 0, this.$scrollElement.on("scroll.bs.scrollspy", e), this.refresh(), this.process()
+ }
+
+ function c(c) {
+ return this.each(function () {
+ var d = a(this), e = d.data("bs.scrollspy"), f = "object" == typeof c && c;
+ e || d.data("bs.scrollspy", e = new b(this, f)), "string" == typeof c && e[c]()
+ })
+ }
+
+ b.VERSION = "3.3.1", b.DEFAULTS = {offset: 10}, b.prototype.getScrollHeight = function () {
+ return this.$scrollElement[0].scrollHeight || Math.max(this.$body[0].scrollHeight, document.documentElement.scrollHeight)
+ }, b.prototype.refresh = function () {
+ var b = "offset", c = 0;
+ a.isWindow(this.$scrollElement[0]) || (b = "position", c = this.$scrollElement.scrollTop()), this.offsets = [], this.targets = [], this.scrollHeight = this.getScrollHeight();
+ var d = this;
+ this.$body.find(this.selector).map(function () {
+ var d = a(this), e = d.data("target") || d.attr("href"), f = /^#./.test(e) && a(e);
+ return f && f.length && f.is(":visible") && [[f[b]().top + c, e]] || null
+ }).sort(function (a, b) {
+ return a[0] - b[0]
+ }).each(function () {
+ d.offsets.push(this[0]), d.targets.push(this[1])
+ })
+ }, b.prototype.process = function () {
+ var a, b = this.$scrollElement.scrollTop() + this.options.offset, c = this.getScrollHeight(),
+ d = this.options.offset + c - this.$scrollElement.height(), e = this.offsets, f = this.targets,
+ g = this.activeTarget;
+ if (this.scrollHeight != c && this.refresh(), b >= d) return g != (a = f[f.length - 1]) && this.activate(a);
+ if (g && b < e[0]) return this.activeTarget = null, this.clear();
+ for (a = e.length; a--;) g != f[a] && b >= e[a] && (!e[a + 1] || b <= e[a + 1]) && this.activate(f[a])
+ }, b.prototype.activate = function (b) {
+ this.activeTarget = b, this.clear();
+ var c = this.selector + '[data-target="' + b + '"],' + this.selector + '[href="' + b + '"]',
+ d = a(c).parents("li").addClass("active");
+ d.parent(".dropdown-menu").length && (d = d.closest("li.dropdown").addClass("active")), d.trigger("activate.bs.scrollspy")
+ }, b.prototype.clear = function () {
+ a(this.selector).parentsUntil(this.options.target, ".active").removeClass("active")
+ };
+ var d = a.fn.scrollspy;
+ a.fn.scrollspy = c, a.fn.scrollspy.Constructor = b, a.fn.scrollspy.noConflict = function () {
+ return a.fn.scrollspy = d, this
+ }, a(window).on("load.bs.scrollspy.data-api", function () {
+ a('[data-spy="scroll"]').each(function () {
+ var b = a(this);
+ c.call(b, b.data())
+ })
+ })
+}(jQuery), +function (a) {
+ "use strict";
+
+ function b(b) {
+ return this.each(function () {
+ var d = a(this), e = d.data("bs.tab");
+ e || d.data("bs.tab", e = new c(this)), "string" == typeof b && e[b]()
+ })
+ }
+
+ var c = function (b) {
+ this.element = a(b)
+ };
+ c.VERSION = "3.3.1", c.TRANSITION_DURATION = 150, c.prototype.show = function () {
+ var b = this.element, c = b.closest("ul:not(.dropdown-menu)"), d = b.data("target");
+ if (d || (d = b.attr("href"), d = d && d.replace(/.*(?=#[^\s]*$)/, "")), !b.parent("li").hasClass("active")) {
+ var e = c.find(".active:last a"), f = a.Event("hide.bs.tab", {relatedTarget: b[0]}),
+ g = a.Event("show.bs.tab", {relatedTarget: e[0]});
+ if (e.trigger(f), b.trigger(g), !g.isDefaultPrevented() && !f.isDefaultPrevented()) {
+ var h = a(d);
+ this.activate(b.closest("li"), c), this.activate(h, h.parent(), function () {
+ e.trigger({type: "hidden.bs.tab", relatedTarget: b[0]}), b.trigger({
+ type: "shown.bs.tab",
+ relatedTarget: e[0]
+ })
+ })
+ }
+ }
+ }, c.prototype.activate = function (b, d, e) {
+ function f() {
+ g.removeClass("active").find("> .dropdown-menu > .active").removeClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded", !1), b.addClass("active").find('[data-toggle="tab"]').attr("aria-expanded", !0), h ? (b[0].offsetWidth, b.addClass("in")) : b.removeClass("fade"), b.parent(".dropdown-menu") && b.closest("li.dropdown").addClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded", !0), e && e()
+ }
+
+ var g = d.find("> .active"),
+ h = e && a.support.transition && (g.length && g.hasClass("fade") || !!d.find("> .fade").length);
+ g.length && h ? g.one("bsTransitionEnd", f).emulateTransitionEnd(c.TRANSITION_DURATION) : f(), g.removeClass("in")
+ };
+ var d = a.fn.tab;
+ a.fn.tab = b, a.fn.tab.Constructor = c, a.fn.tab.noConflict = function () {
+ return a.fn.tab = d, this
+ };
+ var e = function (c) {
+ c.preventDefault(), b.call(a(this), "show")
+ };
+ a(document).on("click.bs.tab.data-api", '[data-toggle="tab"]', e).on("click.bs.tab.data-api", '[data-toggle="pill"]', e)
+}(jQuery), +function (a) {
+ "use strict";
+
+ function b(b) {
+ return this.each(function () {
+ var d = a(this), e = d.data("bs.affix"), f = "object" == typeof b && b;
+ e || d.data("bs.affix", e = new c(this, f)), "string" == typeof b && e[b]()
+ })
+ }
+
+ var c = function (b, d) {
+ this.options = a.extend({}, c.DEFAULTS, d), this.$target = a(this.options.target).on("scroll.bs.affix.data-api", a.proxy(this.checkPosition, this)).on("click.bs.affix.data-api", a.proxy(this.checkPositionWithEventLoop, this)), this.$element = a(b), this.affixed = this.unpin = this.pinnedOffset = null, this.checkPosition()
+ };
+ c.VERSION = "3.3.1", c.RESET = "affix affix-top affix-bottom", c.DEFAULTS = {
+ offset: 0,
+ target: window
+ }, c.prototype.getState = function (a, b, c, d) {
+ var e = this.$target.scrollTop(), f = this.$element.offset(), g = this.$target.height();
+ if (null != c && "top" == this.affixed) return c > e ? "top" : !1;
+ if ("bottom" == this.affixed) return null != c ? e + this.unpin <= f.top ? !1 : "bottom" : a - d >= e + g ? !1 : "bottom";
+ var h = null == this.affixed, i = h ? e : f.top, j = h ? g : b;
+ return null != c && c >= i ? "top" : null != d && i + j >= a - d ? "bottom" : !1
+ }, c.prototype.getPinnedOffset = function () {
+ if (this.pinnedOffset) return this.pinnedOffset;
+ this.$element.removeClass(c.RESET).addClass("affix");
+ var a = this.$target.scrollTop(), b = this.$element.offset();
+ return this.pinnedOffset = b.top - a
+ }, c.prototype.checkPositionWithEventLoop = function () {
+ setTimeout(a.proxy(this.checkPosition, this), 1)
+ }, c.prototype.checkPosition = function () {
+ if (this.$element.is(":visible")) {
+ var b = this.$element.height(), d = this.options.offset, e = d.top, f = d.bottom, g = a("body").height();
+ "object" != typeof d && (f = e = d), "function" == typeof e && (e = d.top(this.$element)), "function" == typeof f && (f = d.bottom(this.$element));
+ var h = this.getState(g, b, e, f);
+ if (this.affixed != h) {
+ null != this.unpin && this.$element.css("top", "");
+ var i = "affix" + (h ? "-" + h : ""), j = a.Event(i + ".bs.affix");
+ if (this.$element.trigger(j), j.isDefaultPrevented()) return;
+ this.affixed = h, this.unpin = "bottom" == h ? this.getPinnedOffset() : null, this.$element.removeClass(c.RESET).addClass(i).trigger(i.replace("affix", "affixed") + ".bs.affix")
+ }
+ "bottom" == h && this.$element.offset({top: g - b - f})
+ }
+ };
+ var d = a.fn.affix;
+ a.fn.affix = b, a.fn.affix.Constructor = c, a.fn.affix.noConflict = function () {
+ return a.fn.affix = d, this
+ }, a(window).on("load", function () {
+ a('[data-spy="affix"]').each(function () {
+ var c = a(this), d = c.data();
+ d.offset = d.offset || {}, null != d.offsetBottom && (d.offset.bottom = d.offsetBottom), null != d.offsetTop && (d.offset.top = d.offsetTop), b.call(c, d)
+ })
+ })
+}(jQuery);
+/*
+ * metismenu - v2.0.2
+ * A jQuery menu plugin
+ * https://github.com/onokumus/metisMenu
+ *
+ * Made by Osman Nuri Okumus
+ * Under MIT License
+ */
+
+!function (a) {
+ "use strict";
+
+ function b() {
+ var a = document.createElement("mm"), b = {
+ WebkitTransition: "webkitTransitionEnd",
+ MozTransition: "transitionend",
+ OTransition: "oTransitionEnd otransitionend",
+ transition: "transitionend"
+ };
+ for (var c in b) if (void 0 !== a.style[c]) return {end: b[c]};
+ return !1
+ }
+
+ function c(b) {
+ return this.each(function () {
+ var c = a(this), d = c.data("mm"), f = a.extend({}, e.DEFAULTS, c.data(), "object" == typeof b && b);
+ d || c.data("mm", d = new e(this, f)), "string" == typeof b && d[b]()
+ })
+ }
+
+ a.fn.emulateTransitionEnd = function (b) {
+ var c = !1, e = this;
+ a(this).one("mmTransitionEnd", function () {
+ c = !0
+ });
+ var f = function () {
+ c || a(e).trigger(d.end)
+ };
+ return setTimeout(f, b), this
+ };
+ var d = b();
+ d && (a.event.special.mmTransitionEnd = {
+ bindType: d.end, delegateType: d.end, handle: function (b) {
+ return a(b.target).is(this) ? b.handleObj.handler.apply(this, arguments) : void 0
+ }
+ });
+ var e = function (b, c) {
+ this.$element = a(b), this.options = a.extend({}, e.DEFAULTS, c), this.transitioning = null, this.init()
+ };
+ e.TRANSITION_DURATION = 350, e.DEFAULTS = {
+ toggle: !0,
+ doubleTapToGo: !1,
+ activeClass: "active"
+ }, e.prototype.init = function () {
+ var b = this, c = this.options.activeClass;
+ this.$element.find("li." + c).has("ul").children("ul").addClass("collapse in"), this.$element.find("li").not("." + c).has("ul").children("ul").addClass("collapse"), this.options.doubleTapToGo && this.$element.find("li." + c).has("ul").children("a").addClass("doubleTapToGo"), this.$element.find("li").has("ul").children("a").on("click.metisMenu", function (d) {
+ var e = a(this), f = e.parent("li"), g = f.children("ul");
+ return d.preventDefault(), f.hasClass(c) ? b.hide(g) : b.show(g), b.options.doubleTapToGo && b.doubleTapToGo(e) && "#" !== e.attr("href") && "" !== e.attr("href") ? (d.stopPropagation(), void(document.location = e.attr("href"))) : void 0
+ })
+ }, e.prototype.doubleTapToGo = function (a) {
+ var b = this.$element;
+ return a.hasClass("doubleTapToGo") ? (a.removeClass("doubleTapToGo"), !0) : a.parent().children("ul").length ? (b.find(".doubleTapToGo").removeClass("doubleTapToGo"), a.addClass("doubleTapToGo"), !1) : void 0
+ }, e.prototype.show = function (b) {
+ var c = this.options.activeClass, f = a(b), g = f.parent("li");
+ if (!this.transitioning && !f.hasClass("in")) {
+ g.addClass(c), this.options.toggle && this.hide(g.siblings().children("ul.in")), f.removeClass("collapse").addClass("collapsing").height(0), this.transitioning = 1;
+ var h = function () {
+ f.removeClass("collapsing").addClass("collapse in").height(""), this.transitioning = 0
+ };
+ return d ? void f.one("mmTransitionEnd", a.proxy(h, this)).emulateTransitionEnd(e.TRANSITION_DURATION).height(f[0].scrollHeight) : h.call(this)
+ }
+ }, e.prototype.hide = function (b) {
+ var c = this.options.activeClass, f = a(b);
+ if (!this.transitioning && f.hasClass("in")) {
+ f.parent("li").removeClass(c), f.height(f.height())[0].offsetHeight, f.addClass("collapsing").removeClass("collapse").removeClass("in"), this.transitioning = 1;
+ var g = function () {
+ this.transitioning = 0, f.removeClass("collapsing").addClass("collapse")
+ };
+ return d ? void f.height(0).one("mmTransitionEnd", a.proxy(g, this)).emulateTransitionEnd(e.TRANSITION_DURATION) : g.call(this)
+ }
+ };
+ var f = a.fn.metisMenu;
+ a.fn.metisMenu = c, a.fn.metisMenu.Constructor = e, a.fn.metisMenu.noConflict = function () {
+ return a.fn.metisMenu = f, this
+ }
+}(jQuery);
+/*! Copyright (c) 2011 Piotr Rochala (http://rocha.la)
+ * Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php)
+ * and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses.
+ *
+ * Version: 1.3.6
+ *
+ */
+(function (e) {
+ e.fn.extend({
+ slimScroll: function (g) {
+ var a = e.extend({
+ width: "auto",
+ height: "250px",
+ size: "7px",
+ color: "#000",
+ position: "right",
+ distance: "1px",
+ start: "top",
+ opacity: .4,
+ alwaysVisible: !1,
+ disableFadeOut: !1,
+ railVisible: !1,
+ railColor: "#333",
+ railOpacity: .2,
+ railDraggable: !0,
+ railClass: "slimScrollRail",
+ barClass: "slimScrollBar",
+ wrapperClass: "slimScrollDiv",
+ allowPageScroll: !1,
+ wheelStep: 20,
+ touchScrollStep: 200,
+ borderRadius: "7px",
+ railBorderRadius: "7px"
+ }, g);
+ this.each(function () {
+ function v(d) {
+ if (r) {
+ d = d || window.event;
+ var c = 0;
+ d.wheelDelta && (c = -d.wheelDelta / 120);
+ d.detail && (c = d.detail / 3);
+ e(d.target || d.srcTarget || d.srcElement).closest("." + a.wrapperClass).is(b.parent()) && m(c, !0);
+ d.preventDefault && !k && d.preventDefault();
+ k || (d.returnValue = !1)
+ }
+ }
+
+ function m(d, e, g) {
+ k = !1;
+ var f = d, h = b.outerHeight() - c.outerHeight();
+ e && (f = parseInt(c.css("top")) + d * parseInt(a.wheelStep) / 100 * c.outerHeight(), f = Math.min(Math.max(f, 0), h), f = 0 < d ? Math.ceil(f) : Math.floor(f), c.css({top: f + "px"}));
+ l = parseInt(c.css("top")) / (b.outerHeight() - c.outerHeight());
+ f = l * (b[0].scrollHeight - b.outerHeight());
+ g && (f = d, d = f / b[0].scrollHeight * b.outerHeight(), d = Math.min(Math.max(d, 0), h), c.css({top: d + "px"}));
+ b.scrollTop(f);
+ b.trigger("slimscrolling", ~~f);
+ w();
+ p()
+ }
+
+ function x() {
+ u = Math.max(b.outerHeight() / b[0].scrollHeight * b.outerHeight(), 30);
+ c.css({height: u + "px"});
+ var a = u == b.outerHeight() ? "none" : "block";
+ c.css({display: a})
+ }
+
+ function w() {
+ x();
+ clearTimeout(B);
+ l == ~~l ? (k = a.allowPageScroll, C != l && b.trigger("slimscroll", 0 == ~~l ? "top" : "bottom")) : k = !1;
+ C = l;
+ u >= b.outerHeight() ? k = !0 : (c.stop(!0,
+ !0).fadeIn("fast"), a.railVisible && h.stop(!0, !0).fadeIn("fast"))
+ }
+
+ function p() {
+ a.alwaysVisible || (B = setTimeout(function () {
+ a.disableFadeOut && r || y || z || (c.fadeOut("slow"), h.fadeOut("slow"))
+ }, 1E3))
+ }
+
+ var r, y, z, B, A, u, l, C, k = !1, b = e(this);
+ if (b.parent().hasClass(a.wrapperClass)) {
+ var n = b.scrollTop(), c = b.closest("." + a.barClass), h = b.closest("." + a.railClass);
+ x();
+ if (e.isPlainObject(g)) {
+ if ("height" in g && "auto" == g.height) {
+ b.parent().css("height", "auto");
+ b.css("height", "auto");
+ var q = b.parent().parent().height();
+ b.parent().css("height",
+ q);
+ b.css("height", q)
+ }
+ if ("scrollTo" in g) n = parseInt(a.scrollTo); else if ("scrollBy" in g) n += parseInt(a.scrollBy); else if ("destroy" in g) {
+ c.remove();
+ h.remove();
+ b.unwrap();
+ return
+ }
+ m(n, !1, !0)
+ }
+ } else if (!(e.isPlainObject(g) && "destroy" in g)) {
+ a.height = "auto" == a.height ? b.parent().height() : a.height;
+ n = e("").addClass(a.wrapperClass).css({
+ position: "relative",
+ overflow: "hidden",
+ width: a.width,
+ height: a.height
+ });
+ b.css({overflow: "hidden", width: a.width, height: a.height});
+ var h = e("").addClass(a.railClass).css({
+ width: a.size,
+ height: "100%",
+ position: "absolute",
+ top: 0,
+ display: a.alwaysVisible && a.railVisible ? "block" : "none",
+ "border-radius": a.railBorderRadius,
+ background: a.railColor,
+ opacity: a.railOpacity,
+ zIndex: 90
+ }), c = e("").addClass(a.barClass).css({
+ background: a.color,
+ width: a.size,
+ position: "absolute",
+ top: 0,
+ opacity: a.opacity,
+ display: a.alwaysVisible ? "block" : "none",
+ "border-radius": a.borderRadius,
+ BorderRadius: a.borderRadius,
+ MozBorderRadius: a.borderRadius,
+ WebkitBorderRadius: a.borderRadius,
+ zIndex: 99
+ }), q = "right" == a.position ?
+ {right: a.distance} : {left: a.distance};
+ h.css(q);
+ c.css(q);
+ b.wrap(n);
+ b.parent().append(c);
+ b.parent().append(h);
+ a.railDraggable && c.bind("mousedown", function (a) {
+ var b = e(document);
+ z = !0;
+ t = parseFloat(c.css("top"));
+ pageY = a.pageY;
+ b.bind("mousemove.slimscroll", function (a) {
+ currTop = t + a.pageY - pageY;
+ c.css("top", currTop);
+ m(0, c.position().top, !1)
+ });
+ b.bind("mouseup.slimscroll", function (a) {
+ z = !1;
+ p();
+ b.unbind(".slimscroll")
+ });
+ return !1
+ }).bind("selectstart.slimscroll", function (a) {
+ a.stopPropagation();
+ a.preventDefault();
+ return !1
+ });
+ h.hover(function () {
+ w()
+ }, function () {
+ p()
+ });
+ c.hover(function () {
+ y = !0
+ }, function () {
+ y = !1
+ });
+ b.hover(function () {
+ r = !0;
+ w();
+ p()
+ }, function () {
+ r = !1;
+ p()
+ });
+ b.bind("touchstart", function (a, b) {
+ a.originalEvent.touches.length && (A = a.originalEvent.touches[0].pageY)
+ });
+ b.bind("touchmove", function (b) {
+ k || b.originalEvent.preventDefault();
+ b.originalEvent.touches.length && (m((A - b.originalEvent.touches[0].pageY) / a.touchScrollStep, !0), A = b.originalEvent.touches[0].pageY)
+ });
+ x();
+ "bottom" === a.start ? (c.css({top: b.outerHeight() - c.outerHeight()}),
+ m(0, !0)) : "top" !== a.start && (m(e(a.start).position().top, null, !0), a.alwaysVisible || c.hide());
+ window.addEventListener ? (this.addEventListener("DOMMouseScroll", v, !1), this.addEventListener("mousewheel", v, !1)) : document.attachEvent("onmousewheel", v)
+ }
+ });
+ return this
+ }
+ });
+ e.fn.extend({slimscroll: e.fn.slimScroll})
+})(jQuery);
+
+$(document).ready(function () {
+
+ // Add body-small class if window less than 768px
+ if ($(this).width() < 769) {
+ $('body').addClass('body-small')
+ } else {
+ $('body').removeClass('body-small')
+ }
+
+ // MetsiMenu
+ $('#side-menu').metisMenu();
+
+ // Collapse ibox function
+ $('.collapse-link').click(function () {
+ var ibox = $(this).closest('div.ibox');
+ var button = $(this).find('i');
+ var content = ibox.find('div.ibox-content');
+ content.slideToggle(200);
+ button.toggleClass('fa-chevron-up').toggleClass('fa-chevron-down');
+ ibox.toggleClass('').toggleClass('border-bottom');
+ setTimeout(function () {
+ ibox.resize();
+ ibox.find('[id^=map-]').resize();
+ }, 50);
+ });
+
+ // Close ibox function
+ $('.close-link').click(function () {
+ var content = $(this).closest('div.ibox');
+ content.remove();
+ });
+
+ // Close menu in canvas mode
+ $('.close-canvas-menu').click(function () {
+ $("body").toggleClass("mini-navbar");
+ SmoothlyMenu();
+ });
+
+ // Open close right sidebar
+ $('.right-sidebar-toggle').click(function () {
+ $('#right-sidebar').toggleClass('sidebar-open');
+ });
+
+ // Initialize slimscroll for right sidebar
+ $('.sidebar-container').slimScroll({
+ height: '100%',
+ railOpacity: 0.4,
+ wheelStep: 10
+ });
+
+ // Open close small chat
+ $('.open-small-chat').click(function () {
+ $(this).children().toggleClass('fa-comments').toggleClass('fa-remove');
+ $('.small-chat-box').toggleClass('active');
+ });
+
+ // Initialize slimscroll for small chat
+ $('.small-chat-box .content').slimScroll({
+ height: '234px',
+ railOpacity: 0.4
+ });
+
+ // Small todo handler
+ $('.check-link').click(function () {
+ var button = $(this).find('i');
+ var label = $(this).next('span');
+ button.toggleClass('fa-check-square').toggleClass('fa-square-o');
+ label.toggleClass('todo-completed');
+ return false;
+ });
+
+ // Minimalize menu
+ $('.navbar-minimalize').click(function () {
+ $("body").toggleClass("mini-navbar");
+ SmoothlyMenu();
+
+ });
+
+ // Tooltips demo
+ $('.tooltip-demo').tooltip({
+ selector: "[data-toggle=tooltip]",
+ container: "body"
+ });
+
+ // Move modal to body
+ // Fix Bootstrap backdrop issu with animation.css
+ $('.modal').appendTo("body");
+
+ // Full height of sidebar
+ function fix_height() {
+ var heightWithoutNavbar = $("body > #wrapper").height() - 61;
+ $(".sidebard-panel").css("min-height", heightWithoutNavbar + "px");
+
+ var navbarHeigh = $('nav.navbar-default').height();
+ var wrapperHeigh = $('#page-wrapper').height();
+
+ if (navbarHeigh > wrapperHeigh) {
+ $('#page-wrapper').css("min-height", navbarHeigh + "px");
+ }
+
+ if (navbarHeigh < wrapperHeigh) {
+ $('#page-wrapper').css("min-height", $(window).height() + "px");
+ }
+
+ if ($('body').hasClass('fixed-nav')) {
+ $('#page-wrapper').css("min-height", $(window).height() - 60 + "px");
+ }
+
+ }
+
+ fix_height();
+
+ // Fixed Sidebar
+ $(window).bind("load", function () {
+ if ($("body").hasClass('fixed-sidebar')) {
+ $('.sidebar-collapse').slimScroll({
+ height: '100%',
+ railOpacity: 0.9
+ });
+ }
+ })
+
+ // Move right sidebar top after scroll
+ $(window).scroll(function () {
+ if ($(window).scrollTop() > 0 && !$('body').hasClass('fixed-nav')) {
+ $('#right-sidebar').addClass('sidebar-top');
+ } else {
+ $('#right-sidebar').removeClass('sidebar-top');
+ }
+ });
+
+ $(window).bind("load resize scroll", function () {
+ if (!$("body").hasClass('body-small')) {
+ fix_height();
+ }
+ });
+
+ $("[data-toggle=popover]")
+ .popover();
+
+ // Add slimscroll to element
+ $('.full-height-scroll').slimscroll({
+ height: '100%'
+ })
+});
+
+
+// Minimalize menu when screen is less than 768px
+$(window).bind("resize", function () {
+ if ($(this).width() < 769) {
+ $('body').addClass('body-small')
+ } else {
+ $('body').removeClass('body-small')
+ }
+});
+
+// For demo purpose - animation css script
+function animationHover(element, animation) {
+ element = $(element);
+ element.hover(
+ function () {
+ element.addClass('animated ' + animation);
+ },
+ function () {
+ //wait for animation to finish before removing classes
+ window.setTimeout(function () {
+ element.removeClass('animated ' + animation);
+ }, 2000);
+ });
+}
+
+function SmoothlyMenu() {
+ if (!$('body').hasClass('mini-navbar') || $('body').hasClass('body-small')) {
+ // Hide menu in order to smoothly turn on when maximize menu
+ $('#side-menu').hide();
+ // For smoothly turn on menu
+ setTimeout(
+ function () {
+ $('#side-menu').fadeIn(500);
+ }, 100);
+ } else if ($('body').hasClass('fixed-sidebar')) {
+ $('#side-menu').hide();
+ setTimeout(
+ function () {
+ $('#side-menu').fadeIn(500);
+ }, 300);
+ } else {
+ // Remove all inline style from jquery fadeIn function to reset menu state
+ $('#side-menu').removeAttr('style');
+ }
+}
+
+
+/*! pace 1.0.0 */
+(function () {
+ var a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, A, B, C, D, E, F, G, H, I, J, K,
+ L, M, N, O, P, Q, R, S, T, U, V, W, X = [].slice, Y = {}.hasOwnProperty, Z = function (a, b) {
+ function c() {
+ this.constructor = a
+ }
+
+ for (var d in b) Y.call(b, d) && (a[d] = b[d]);
+ return c.prototype = b.prototype, a.prototype = new c, a.__super__ = b.prototype, a
+ }, $ = [].indexOf || function (a) {
+ for (var b = 0, c = this.length; c > b; b++) if (b in this && this[b] === a) return b;
+ return -1
+ };
+ for (u = {
+ catchupTime: 100,
+ initialRate: .03,
+ minTime: 250,
+ ghostTime: 100,
+ maxProgressPerFrame: 20,
+ easeFactor: 1.25,
+ startOnPageLoad: !0,
+ restartOnPushState: !0,
+ restartOnRequestAfter: 500,
+ target: "body",
+ elements: {checkInterval: 100, selectors: ["body"]},
+ eventLag: {minSamples: 10, sampleCount: 3, lagThreshold: 3},
+ ajax: {trackMethods: ["GET"], trackWebSockets: !0, ignoreURLs: []}
+ }, C = function () {
+ var a;
+ return null != (a = "undefined" != typeof performance && null !== performance && "function" == typeof performance.now ? performance.now() : void 0) ? a : +new Date
+ }, E = window.requestAnimationFrame || window.mozRequestAnimationFrame || window.webkitRequestAnimationFrame || window.msRequestAnimationFrame, t = window.cancelAnimationFrame || window.mozCancelAnimationFrame, null == E && (E = function (a) {
+ return setTimeout(a, 50)
+ }, t = function (a) {
+ return clearTimeout(a)
+ }), G = function (a) {
+ var b, c;
+ return b = C(), (c = function () {
+ var d;
+ return d = C() - b, d >= 33 ? (b = C(), a(d, function () {
+ return E(c)
+ })) : setTimeout(c, 33 - d)
+ })()
+ }, F = function () {
+ var a, b, c;
+ return c = arguments[0], b = arguments[1], a = 3 <= arguments.length ? X.call(arguments, 2) : [], "function" == typeof c[b] ? c[b].apply(c, a) : c[b]
+ }, v = function () {
+ var a, b, c, d, e, f, g;
+ for (b = arguments[0], d = 2 <= arguments.length ? X.call(arguments, 1) : [], f = 0, g = d.length; g > f; f++) if (c = d[f]) for (a in c) Y.call(c, a) && (e = c[a], null != b[a] && "object" == typeof b[a] && null != e && "object" == typeof e ? v(b[a], e) : b[a] = e);
+ return b
+ }, q = function (a) {
+ var b, c, d, e, f;
+ for (c = b = 0, e = 0, f = a.length; f > e; e++) d = a[e], c += Math.abs(d), b++;
+ return c / b
+ }, x = function (a, b) {
+ var c, d, e;
+ if (null == a && (a = "options"), null == b && (b = !0), e = document.querySelector("[data-pace-" + a + "]")) {
+ if (c = e.getAttribute("data-pace-" + a), !b) return c;
+ try {
+ return JSON.parse(c)
+ } catch (f) {
+ return d = f, "undefined" != typeof console && null !== console ? console.error("Error parsing inline pace options", d) : void 0
+ }
+ }
+ }, g = function () {
+ function a() {
+ }
+
+ return a.prototype.on = function (a, b, c, d) {
+ var e;
+ return null == d && (d = !1), null == this.bindings && (this.bindings = {}), null == (e = this.bindings)[a] && (e[a] = []), this.bindings[a].push({
+ handler: b,
+ ctx: c,
+ once: d
+ })
+ }, a.prototype.once = function (a, b, c) {
+ return this.on(a, b, c, !0)
+ }, a.prototype.off = function (a, b) {
+ var c, d, e;
+ if (null != (null != (d = this.bindings) ? d[a] : void 0)) {
+ if (null == b) return delete this.bindings[a];
+ for (c = 0, e = []; c < this.bindings[a].length;) e.push(this.bindings[a][c].handler === b ? this.bindings[a].splice(c, 1) : c++);
+ return e
+ }
+ }, a.prototype.trigger = function () {
+ var a, b, c, d, e, f, g, h, i;
+ if (c = arguments[0], a = 2 <= arguments.length ? X.call(arguments, 1) : [], null != (g = this.bindings) ? g[c] : void 0) {
+ for (e = 0, i = []; e < this.bindings[c].length;) h = this.bindings[c][e], d = h.handler, b = h.ctx, f = h.once, d.apply(null != b ? b : this, a), i.push(f ? this.bindings[c].splice(e, 1) : e++);
+ return i
+ }
+ }, a
+ }(), j = window.Pace || {}, window.Pace = j, v(j, g.prototype), D = j.options = v({}, u, window.paceOptions, x()), U = ["ajax", "document", "eventLag", "elements"], Q = 0, S = U.length; S > Q; Q++) K = U[Q], D[K] === !0 && (D[K] = u[K]);
+ i = function (a) {
+ function b() {
+ return V = b.__super__.constructor.apply(this, arguments)
+ }
+
+ return Z(b, a), b
+ }(Error), b = function () {
+ function a() {
+ this.progress = 0
+ }
+
+ return a.prototype.getElement = function () {
+ var a;
+ if (null == this.el) {
+ if (a = document.querySelector(D.target), !a) throw new i;
+ this.el = document.createElement("div"), this.el.className = "pace pace-active", document.body.className = document.body.className.replace(/pace-done/g, ""), document.body.className += " pace-running", this.el.innerHTML = '
\n \n
\n', null != a.firstChild ? a.insertBefore(this.el, a.firstChild) : a.appendChild(this.el)
+ }
+ return this.el
+ }, a.prototype.finish = function () {
+ var a;
+ return a = this.getElement(), a.className = a.className.replace("pace-active", ""), a.className += " pace-inactive", document.body.className = document.body.className.replace("pace-running", ""), document.body.className += " pace-done"
+ }, a.prototype.update = function (a) {
+ return this.progress = a, this.render()
+ }, a.prototype.destroy = function () {
+ try {
+ this.getElement().parentNode.removeChild(this.getElement())
+ } catch (a) {
+ i = a
+ }
+ return this.el = void 0
+ }, a.prototype.render = function () {
+ var a, b, c, d, e, f, g;
+ if (null == document.querySelector(D.target)) return !1;
+ for (a = this.getElement(), d = "translate3d(" + this.progress + "%, 0, 0)", g = ["webkitTransform", "msTransform", "transform"], e = 0, f = g.length; f > e; e++) b = g[e], a.children[0].style[b] = d;
+ return (!this.lastRenderedProgress || this.lastRenderedProgress | 0 !== this.progress | 0) && (a.children[0].setAttribute("data-progress-text", "" + (0 | this.progress) + "%"), this.progress >= 100 ? c = "99" : (c = this.progress < 10 ? "0" : "", c += 0 | this.progress), a.children[0].setAttribute("data-progress", "" + c)), this.lastRenderedProgress = this.progress
+ }, a.prototype.done = function () {
+ return this.progress >= 100
+ }, a
+ }(), h = function () {
+ function a() {
+ this.bindings = {}
+ }
+
+ return a.prototype.trigger = function (a, b) {
+ var c, d, e, f, g;
+ if (null != this.bindings[a]) {
+ for (f = this.bindings[a], g = [], d = 0, e = f.length; e > d; d++) c = f[d], g.push(c.call(this, b));
+ return g
+ }
+ }, a.prototype.on = function (a, b) {
+ var c;
+ return null == (c = this.bindings)[a] && (c[a] = []), this.bindings[a].push(b)
+ }, a
+ }(), P = window.XMLHttpRequest, O = window.XDomainRequest, N = window.WebSocket, w = function (a, b) {
+ var c, d, e, f;
+ f = [];
+ for (d in b.prototype) try {
+ e = b.prototype[d], f.push(null == a[d] && "function" != typeof e ? a[d] = e : void 0)
+ } catch (g) {
+ c = g
+ }
+ return f
+ }, A = [], j.ignore = function () {
+ var a, b, c;
+ return b = arguments[0], a = 2 <= arguments.length ? X.call(arguments, 1) : [], A.unshift("ignore"), c = b.apply(null, a), A.shift(), c
+ }, j.track = function () {
+ var a, b, c;
+ return b = arguments[0], a = 2 <= arguments.length ? X.call(arguments, 1) : [], A.unshift("track"), c = b.apply(null, a), A.shift(), c
+ }, J = function (a) {
+ var b;
+ if (null == a && (a = "GET"), "track" === A[0]) return "force";
+ if (!A.length && D.ajax) {
+ if ("socket" === a && D.ajax.trackWebSockets) return !0;
+ if (b = a.toUpperCase(), $.call(D.ajax.trackMethods, b) >= 0) return !0
+ }
+ return !1
+ }, k = function (a) {
+ function b() {
+ var a, c = this;
+ b.__super__.constructor.apply(this, arguments), a = function (a) {
+ var b;
+ return b = a.open, a.open = function (d, e) {
+ return J(d) && c.trigger("request", {type: d, url: e, request: a}), b.apply(a, arguments)
+ }
+ }, window.XMLHttpRequest = function (b) {
+ var c;
+ return c = new P(b), a(c), c
+ };
+ try {
+ w(window.XMLHttpRequest, P)
+ } catch (d) {
+ }
+ if (null != O) {
+ window.XDomainRequest = function () {
+ var b;
+ return b = new O, a(b), b
+ };
+ try {
+ w(window.XDomainRequest, O)
+ } catch (d) {
+ }
+ }
+ if (null != N && D.ajax.trackWebSockets) {
+ window.WebSocket = function (a, b) {
+ var d;
+ return d = null != b ? new N(a, b) : new N(a), J("socket") && c.trigger("request", {
+ type: "socket",
+ url: a,
+ protocols: b,
+ request: d
+ }), d
+ };
+ try {
+ w(window.WebSocket, N)
+ } catch (d) {
+ }
+ }
+ }
+
+ return Z(b, a), b
+ }(h), R = null, y = function () {
+ return null == R && (R = new k), R
+ }, I = function (a) {
+ var b, c, d, e;
+ for (e = D.ajax.ignoreURLs, c = 0, d = e.length; d > c; c++) if (b = e[c], "string" == typeof b) {
+ if (-1 !== a.indexOf(b)) return !0
+ } else if (b.test(a)) return !0;
+ return !1
+ }, y().on("request", function (b) {
+ var c, d, e, f, g;
+ return f = b.type, e = b.request, g = b.url, I(g) ? void 0 : j.running || D.restartOnRequestAfter === !1 && "force" !== J(f) ? void 0 : (d = arguments, c = D.restartOnRequestAfter || 0, "boolean" == typeof c && (c = 0), setTimeout(function () {
+ var b, c, g, h, i, k;
+ if (b = "socket" === f ? e.readyState < 2 : 0 < (h = e.readyState) && 4 > h) {
+ for (j.restart(), i = j.sources, k = [], c = 0, g = i.length; g > c; c++) {
+ if (K = i[c], K instanceof a) {
+ K.watch.apply(K, d);
+ break
+ }
+ k.push(void 0)
+ }
+ return k
+ }
+ }, c))
+ }), a = function () {
+ function a() {
+ var a = this;
+ this.elements = [], y().on("request", function () {
+ return a.watch.apply(a, arguments)
+ })
+ }
+
+ return a.prototype.watch = function (a) {
+ var b, c, d, e;
+ return d = a.type, b = a.request, e = a.url, I(e) ? void 0 : (c = "socket" === d ? new n(b) : new o(b), this.elements.push(c))
+ }, a
+ }(), o = function () {
+ function a(a) {
+ var b, c, d, e, f, g, h = this;
+ if (this.progress = 0, null != window.ProgressEvent) for (c = null, a.addEventListener("progress", function (a) {
+ return h.progress = a.lengthComputable ? 100 * a.loaded / a.total : h.progress + (100 - h.progress) / 2
+ }, !1), g = ["load", "abort", "timeout", "error"], d = 0, e = g.length; e > d; d++) b = g[d], a.addEventListener(b, function () {
+ return h.progress = 100
+ }, !1); else f = a.onreadystatechange, a.onreadystatechange = function () {
+ var b;
+ return 0 === (b = a.readyState) || 4 === b ? h.progress = 100 : 3 === a.readyState && (h.progress = 50), "function" == typeof f ? f.apply(null, arguments) : void 0
+ }
+ }
+
+ return a
+ }(), n = function () {
+ function a(a) {
+ var b, c, d, e, f = this;
+ for (this.progress = 0, e = ["error", "open"], c = 0, d = e.length; d > c; c++) b = e[c], a.addEventListener(b, function () {
+ return f.progress = 100
+ }, !1)
+ }
+
+ return a
+ }(), d = function () {
+ function a(a) {
+ var b, c, d, f;
+ for (null == a && (a = {}), this.elements = [], null == a.selectors && (a.selectors = []), f = a.selectors, c = 0, d = f.length; d > c; c++) b = f[c], this.elements.push(new e(b))
+ }
+
+ return a
+ }(), e = function () {
+ function a(a) {
+ this.selector = a, this.progress = 0, this.check()
+ }
+
+ return a.prototype.check = function () {
+ var a = this;
+ return document.querySelector(this.selector) ? this.done() : setTimeout(function () {
+ return a.check()
+ }, D.elements.checkInterval)
+ }, a.prototype.done = function () {
+ return this.progress = 100
+ }, a
+ }(), c = function () {
+ function a() {
+ var a, b, c = this;
+ this.progress = null != (b = this.states[document.readyState]) ? b : 100, a = document.onreadystatechange, document.onreadystatechange = function () {
+ return null != c.states[document.readyState] && (c.progress = c.states[document.readyState]), "function" == typeof a ? a.apply(null, arguments) : void 0
+ }
+ }
+
+ return a.prototype.states = {loading: 0, interactive: 50, complete: 100}, a
+ }(), f = function () {
+ function a() {
+ var a, b, c, d, e, f = this;
+ this.progress = 0, a = 0, e = [], d = 0, c = C(), b = setInterval(function () {
+ var g;
+ return g = C() - c - 50, c = C(), e.push(g), e.length > D.eventLag.sampleCount && e.shift(), a = q(e), ++d >= D.eventLag.minSamples && a < D.eventLag.lagThreshold ? (f.progress = 100, clearInterval(b)) : f.progress = 100 * (3 / (a + 3))
+ }, 50)
+ }
+
+ return a
+ }(), m = function () {
+ function a(a) {
+ this.source = a, this.last = this.sinceLastUpdate = 0, this.rate = D.initialRate, this.catchup = 0, this.progress = this.lastProgress = 0, null != this.source && (this.progress = F(this.source, "progress"))
+ }
+
+ return a.prototype.tick = function (a, b) {
+ var c;
+ return null == b && (b = F(this.source, "progress")), b >= 100 && (this.done = !0), b === this.last ? this.sinceLastUpdate += a : (this.sinceLastUpdate && (this.rate = (b - this.last) / this.sinceLastUpdate), this.catchup = (b - this.progress) / D.catchupTime, this.sinceLastUpdate = 0, this.last = b), b > this.progress && (this.progress += this.catchup * a), c = 1 - Math.pow(this.progress / 100, D.easeFactor), this.progress += c * this.rate * a, this.progress = Math.min(this.lastProgress + D.maxProgressPerFrame, this.progress), this.progress = Math.max(0, this.progress), this.progress = Math.min(100, this.progress), this.lastProgress = this.progress, this.progress
+ }, a
+ }(), L = null, H = null, r = null, M = null, p = null, s = null, j.running = !1, z = function () {
+ return D.restartOnPushState ? j.restart() : void 0
+ }, null != window.history.pushState && (T = window.history.pushState, window.history.pushState = function () {
+ return z(), T.apply(window.history, arguments)
+ }), null != window.history.replaceState && (W = window.history.replaceState, window.history.replaceState = function () {
+ return z(), W.apply(window.history, arguments)
+ }), l = {ajax: a, elements: d, document: c, eventLag: f}, (B = function () {
+ var a, c, d, e, f, g, h, i;
+ for (j.sources = L = [], g = ["ajax", "elements", "document", "eventLag"], c = 0, e = g.length; e > c; c++) a = g[c], D[a] !== !1 && L.push(new l[a](D[a]));
+ for (i = null != (h = D.extraSources) ? h : [], d = 0, f = i.length; f > d; d++) K = i[d], L.push(new K(D));
+ return j.bar = r = new b, H = [], M = new m
+ })(), j.stop = function () {
+ return j.trigger("stop"), j.running = !1, r.destroy(), s = !0, null != p && ("function" == typeof t && t(p), p = null), B()
+ }, j.restart = function () {
+ return j.trigger("restart"), j.stop(), j.start()
+ }, j.go = function () {
+ var a;
+ return j.running = !0, r.render(), a = C(), s = !1, p = G(function (b, c) {
+ var d, e, f, g, h, i, k, l, n, o, p, q, t, u, v, w;
+ for (l = 100 - r.progress, e = p = 0, f = !0, i = q = 0, u = L.length; u > q; i = ++q) for (K = L[i], o = null != H[i] ? H[i] : H[i] = [], h = null != (w = K.elements) ? w : [K], k = t = 0, v = h.length; v > t; k = ++t) g = h[k], n = null != o[k] ? o[k] : o[k] = new m(g), f &= n.done, n.done || (e++, p += n.tick(b));
+ return d = p / e, r.update(M.tick(b, d)), r.done() || f || s ? (r.update(100), j.trigger("done"), setTimeout(function () {
+ return r.finish(), j.running = !1, j.trigger("hide")
+ }, Math.max(D.ghostTime, Math.max(D.minTime - (C() - a), 0)))) : c()
+ })
+ }, j.start = function (a) {
+ v(D, a), j.running = !0;
+ try {
+ r.render()
+ } catch (b) {
+ i = b
+ }
+ return document.querySelector(".pace") ? (j.trigger("start"), j.go()) : setTimeout(j.start, 50)
+ }, "function" == typeof define && define.amd ? define(function () {
+ return j
+ }) : "object" == typeof exports ? module.exports = j : D.startOnPageLoad && j.start()
+}).call(this);
+var QRCode;
+!function () {
+ function a(a) {
+ this.mode = c.MODE_8BIT_BYTE, this.data = a, this.parsedData = [];
+ for (var b = [], d = 0, e = this.data.length; e > d; d++) {
+ var f = this.data.charCodeAt(d);
+ f > 65536 ? (b[0] = 240 | (1835008 & f) >>> 18, b[1] = 128 | (258048 & f) >>> 12, b[2] = 128 | (4032 & f) >>> 6, b[3] = 128 | 63 & f) : f > 2048 ? (b[0] = 224 | (61440 & f) >>> 12, b[1] = 128 | (4032 & f) >>> 6, b[2] = 128 | 63 & f) : f > 128 ? (b[0] = 192 | (1984 & f) >>> 6, b[1] = 128 | 63 & f) : b[0] = f, this.parsedData = this.parsedData.concat(b)
+ }
+ this.parsedData.length != this.data.length && (this.parsedData.unshift(191), this.parsedData.unshift(187), this.parsedData.unshift(239))
+ }
+
+ function b(a, b) {
+ this.typeNumber = a, this.errorCorrectLevel = b, this.modules = null, this.moduleCount = 0, this.dataCache = null, this.dataList = []
+ }
+
+ function i(a, b) {
+ if (void 0 == a.length) throw new Error(a.length + "/" + b);
+ for (var c = 0; c < a.length && 0 == a[c];) c++;
+ this.num = new Array(a.length - c + b);
+ for (var d = 0; d < a.length - c; d++) this.num[d] = a[d + c]
+ }
+
+ function j(a, b) {
+ this.totalCount = a, this.dataCount = b
+ }
+
+ function k() {
+ this.buffer = [], this.length = 0
+ }
+
+ function m() {
+ return "undefined" != typeof CanvasRenderingContext2D
+ }
+
+ function n() {
+ var a = !1, b = navigator.userAgent;
+ return /android/i.test(b) && (a = !0, aMat = b.toString().match(/android ([0-9]\.[0-9])/i), aMat && aMat[1] && (a = parseFloat(aMat[1]))), a
+ }
+
+ function r(a, b) {
+ for (var c = 1, e = s(a), f = 0, g = l.length; g >= f; f++) {
+ var h = 0;
+ switch (b) {
+ case d.L:
+ h = l[f][0];
+ break;
+ case d.M:
+ h = l[f][1];
+ break;
+ case d.Q:
+ h = l[f][2];
+ break;
+ case d.H:
+ h = l[f][3]
+ }
+ if (h >= e) break;
+ c++
+ }
+ if (c > l.length) throw new Error("Too long data");
+ return c
+ }
+
+ function s(a) {
+ var b = encodeURI(a).toString().replace(/\%[0-9a-fA-F]{2}/g, "a");
+ return b.length + (b.length != a ? 3 : 0)
+ }
+
+ a.prototype = {
+ getLength: function () {
+ return this.parsedData.length
+ }, write: function (a) {
+ for (var b = 0, c = this.parsedData.length; c > b; b++) a.put(this.parsedData[b], 8)
+ }
+ }, b.prototype = {
+ addData: function (b) {
+ var c = new a(b);
+ this.dataList.push(c), this.dataCache = null
+ }, isDark: function (a, b) {
+ if (0 > a || this.moduleCount <= a || 0 > b || this.moduleCount <= b) throw new Error(a + "," + b);
+ return this.modules[a][b]
+ }, getModuleCount: function () {
+ return this.moduleCount
+ }, make: function () {
+ this.makeImpl(!1, this.getBestMaskPattern())
+ }, makeImpl: function (a, c) {
+ this.moduleCount = 4 * this.typeNumber + 17, this.modules = new Array(this.moduleCount);
+ for (var d = 0; d < this.moduleCount; d++) {
+ this.modules[d] = new Array(this.moduleCount);
+ for (var e = 0; e < this.moduleCount; e++) this.modules[d][e] = null
+ }
+ this.setupPositionProbePattern(0, 0), this.setupPositionProbePattern(this.moduleCount - 7, 0), this.setupPositionProbePattern(0, this.moduleCount - 7), this.setupPositionAdjustPattern(), this.setupTimingPattern(), this.setupTypeInfo(a, c), this.typeNumber >= 7 && this.setupTypeNumber(a), null == this.dataCache && (this.dataCache = b.createData(this.typeNumber, this.errorCorrectLevel, this.dataList)), this.mapData(this.dataCache, c)
+ }, setupPositionProbePattern: function (a, b) {
+ for (var c = -1; 7 >= c; c++) if (!(-1 >= a + c || this.moduleCount <= a + c)) for (var d = -1; 7 >= d; d++) -1 >= b + d || this.moduleCount <= b + d || (this.modules[a + c][b + d] = c >= 0 && 6 >= c && (0 == d || 6 == d) || d >= 0 && 6 >= d && (0 == c || 6 == c) || c >= 2 && 4 >= c && d >= 2 && 4 >= d ? !0 : !1)
+ }, getBestMaskPattern: function () {
+ for (var a = 0, b = 0, c = 0; 8 > c; c++) {
+ this.makeImpl(!0, c);
+ var d = f.getLostPoint(this);
+ (0 == c || a > d) && (a = d, b = c)
+ }
+ return b
+ }, createMovieClip: function (a, b, c) {
+ var d = a.createEmptyMovieClip(b, c), e = 1;
+ this.make();
+ for (var f = 0; f < this.modules.length; f++) for (var g = f * e, h = 0; h < this.modules[f].length; h++) {
+ var i = h * e, j = this.modules[f][h];
+ j && (d.beginFill(0, 100), d.moveTo(i, g), d.lineTo(i + e, g), d.lineTo(i + e, g + e), d.lineTo(i, g + e), d.endFill())
+ }
+ return d
+ }, setupTimingPattern: function () {
+ for (var a = 8; a < this.moduleCount - 8; a++) null == this.modules[a][6] && (this.modules[a][6] = 0 == a % 2);
+ for (var b = 8; b < this.moduleCount - 8; b++) null == this.modules[6][b] && (this.modules[6][b] = 0 == b % 2)
+ }, setupPositionAdjustPattern: function () {
+ for (var a = f.getPatternPosition(this.typeNumber), b = 0; b < a.length; b++) for (var c = 0; c < a.length; c++) {
+ var d = a[b], e = a[c];
+ if (null == this.modules[d][e]) for (var g = -2; 2 >= g; g++) for (var h = -2; 2 >= h; h++) this.modules[d + g][e + h] = -2 == g || 2 == g || -2 == h || 2 == h || 0 == g && 0 == h ? !0 : !1
+ }
+ }, setupTypeNumber: function (a) {
+ for (var b = f.getBCHTypeNumber(this.typeNumber), c = 0; 18 > c; c++) {
+ var d = !a && 1 == (1 & b >> c);
+ this.modules[Math.floor(c / 3)][c % 3 + this.moduleCount - 8 - 3] = d
+ }
+ for (var c = 0; 18 > c; c++) {
+ var d = !a && 1 == (1 & b >> c);
+ this.modules[c % 3 + this.moduleCount - 8 - 3][Math.floor(c / 3)] = d
+ }
+ }, setupTypeInfo: function (a, b) {
+ for (var c = this.errorCorrectLevel << 3 | b, d = f.getBCHTypeInfo(c), e = 0; 15 > e; e++) {
+ var g = !a && 1 == (1 & d >> e);
+ 6 > e ? this.modules[e][8] = g : 8 > e ? this.modules[e + 1][8] = g : this.modules[this.moduleCount - 15 + e][8] = g
+ }
+ for (var e = 0; 15 > e; e++) {
+ var g = !a && 1 == (1 & d >> e);
+ 8 > e ? this.modules[8][this.moduleCount - e - 1] = g : 9 > e ? this.modules[8][15 - e - 1 + 1] = g : this.modules[8][15 - e - 1] = g
+ }
+ this.modules[this.moduleCount - 8][8] = !a
+ }, mapData: function (a, b) {
+ for (var c = -1, d = this.moduleCount - 1, e = 7, g = 0, h = this.moduleCount - 1; h > 0; h -= 2) for (6 == h && h--; ;) {
+ for (var i = 0; 2 > i; i++) if (null == this.modules[d][h - i]) {
+ var j = !1;
+ g < a.length && (j = 1 == (1 & a[g] >>> e));
+ var k = f.getMask(b, d, h - i);
+ k && (j = !j), this.modules[d][h - i] = j, e--, -1 == e && (g++, e = 7)
+ }
+ if (d += c, 0 > d || this.moduleCount <= d) {
+ d -= c, c = -c;
+ break
+ }
+ }
+ }
+ }, b.PAD0 = 236, b.PAD1 = 17, b.createData = function (a, c, d) {
+ for (var e = j.getRSBlocks(a, c), g = new k, h = 0; h < d.length; h++) {
+ var i = d[h];
+ g.put(i.mode, 4), g.put(i.getLength(), f.getLengthInBits(i.mode, a)), i.write(g)
+ }
+ for (var l = 0, h = 0; h < e.length; h++) l += e[h].dataCount;
+ if (g.getLengthInBits() > 8 * l) throw new Error("code length overflow. (" + g.getLengthInBits() + ">" + 8 * l + ")");
+ for (g.getLengthInBits() + 4 <= 8 * l && g.put(0, 4); 0 != g.getLengthInBits() % 8;) g.putBit(!1);
+ for (; ;) {
+ if (g.getLengthInBits() >= 8 * l) break;
+ if (g.put(b.PAD0, 8), g.getLengthInBits() >= 8 * l) break;
+ g.put(b.PAD1, 8)
+ }
+ return b.createBytes(g, e)
+ }, b.createBytes = function (a, b) {
+ for (var c = 0, d = 0, e = 0, g = new Array(b.length), h = new Array(b.length), j = 0; j < b.length; j++) {
+ var k = b[j].dataCount, l = b[j].totalCount - k;
+ d = Math.max(d, k), e = Math.max(e, l), g[j] = new Array(k);
+ for (var m = 0; m < g[j].length; m++) g[j][m] = 255 & a.buffer[m + c];
+ c += k;
+ var n = f.getErrorCorrectPolynomial(l), o = new i(g[j], n.getLength() - 1), p = o.mod(n);
+ h[j] = new Array(n.getLength() - 1);
+ for (var m = 0; m < h[j].length; m++) {
+ var q = m + p.getLength() - h[j].length;
+ h[j][m] = q >= 0 ? p.get(q) : 0
+ }
+ }
+ for (var r = 0, m = 0; m < b.length; m++) r += b[m].totalCount;
+ for (var s = new Array(r), t = 0, m = 0; d > m; m++) for (var j = 0; j < b.length; j++) m < g[j].length && (s[t++] = g[j][m]);
+ for (var m = 0; e > m; m++) for (var j = 0; j < b.length; j++) m < h[j].length && (s[t++] = h[j][m]);
+ return s
+ };
+ for (var c = {MODE_NUMBER: 1, MODE_ALPHA_NUM: 2, MODE_8BIT_BYTE: 4, MODE_KANJI: 8}, d = {
+ L: 1,
+ M: 0,
+ Q: 3,
+ H: 2
+ }, e = {
+ PATTERN000: 0,
+ PATTERN001: 1,
+ PATTERN010: 2,
+ PATTERN011: 3,
+ PATTERN100: 4,
+ PATTERN101: 5,
+ PATTERN110: 6,
+ PATTERN111: 7
+ }, f = {
+ 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]],
+ G15: 1335,
+ G18: 7973,
+ G15_MASK: 21522,
+ getBCHTypeInfo: function (a) {
+ for (var b = a << 10; f.getBCHDigit(b) - f.getBCHDigit(f.G15) >= 0;) b ^= f.G15 << f.getBCHDigit(b) - f.getBCHDigit(f.G15);
+ return (a << 10 | b) ^ f.G15_MASK
+ },
+ getBCHTypeNumber: function (a) {
+ for (var b = a << 12; f.getBCHDigit(b) - f.getBCHDigit(f.G18) >= 0;) b ^= f.G18 << f.getBCHDigit(b) - f.getBCHDigit(f.G18);
+ return a << 12 | b
+ },
+ getBCHDigit: function (a) {
+ for (var b = 0; 0 != a;) b++, a >>>= 1;
+ return b
+ },
+ getPatternPosition: function (a) {
+ return f.PATTERN_POSITION_TABLE[a - 1]
+ },
+ getMask: function (a, b, c) {
+ switch (a) {
+ case e.PATTERN000:
+ return 0 == (b + c) % 2;
+ case e.PATTERN001:
+ return 0 == b % 2;
+ case e.PATTERN010:
+ return 0 == c % 3;
+ case e.PATTERN011:
+ return 0 == (b + c) % 3;
+ case e.PATTERN100:
+ return 0 == (Math.floor(b / 2) + Math.floor(c / 3)) % 2;
+ case e.PATTERN101:
+ return 0 == b * c % 2 + b * c % 3;
+ case e.PATTERN110:
+ return 0 == (b * c % 2 + b * c % 3) % 2;
+ case e.PATTERN111:
+ return 0 == (b * c % 3 + (b + c) % 2) % 2;
+ default:
+ throw new Error("bad maskPattern:" + a)
+ }
+ },
+ getErrorCorrectPolynomial: function (a) {
+ for (var b = new i([1], 0), c = 0; a > c; c++) b = b.multiply(new i([1, g.gexp(c)], 0));
+ return b
+ },
+ getLengthInBits: function (a, b) {
+ if (b >= 1 && 10 > b) switch (a) {
+ case c.MODE_NUMBER:
+ return 10;
+ case c.MODE_ALPHA_NUM:
+ return 9;
+ case c.MODE_8BIT_BYTE:
+ return 8;
+ case c.MODE_KANJI:
+ return 8;
+ default:
+ throw new Error("mode:" + a)
+ } else if (27 > b) switch (a) {
+ case c.MODE_NUMBER:
+ return 12;
+ case c.MODE_ALPHA_NUM:
+ return 11;
+ case c.MODE_8BIT_BYTE:
+ return 16;
+ case c.MODE_KANJI:
+ return 10;
+ default:
+ throw new Error("mode:" + a)
+ } else {
+ if (!(41 > b)) throw new Error("type:" + b);
+ switch (a) {
+ case c.MODE_NUMBER:
+ return 14;
+ case c.MODE_ALPHA_NUM:
+ return 13;
+ case c.MODE_8BIT_BYTE:
+ return 16;
+ case c.MODE_KANJI:
+ return 12;
+ default:
+ throw new Error("mode:" + a)
+ }
+ }
+ },
+ getLostPoint: function (a) {
+ for (var b = a.getModuleCount(), c = 0, d = 0; b > d; d++) for (var e = 0; b > e; e++) {
+ for (var f = 0, g = a.isDark(d, e), h = -1; 1 >= h; h++) if (!(0 > d + h || d + h >= b)) for (var i = -1; 1 >= i; i++) 0 > e + i || e + i >= b || (0 != h || 0 != i) && g == a.isDark(d + h, e + i) && f++;
+ f > 5 && (c += 3 + f - 5)
+ }
+ for (var d = 0; b - 1 > d; d++) for (var e = 0; b - 1 > e; e++) {
+ var j = 0;
+ a.isDark(d, e) && j++, a.isDark(d + 1, e) && j++, a.isDark(d, e + 1) && j++, a.isDark(d + 1, e + 1) && j++, (0 == j || 4 == j) && (c += 3)
+ }
+ for (var d = 0; b > d; d++) for (var 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);
+ for (var e = 0; b > e; e++) for (var 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);
+ for (var k = 0, e = 0; b > e; e++) for (var d = 0; b > d; d++) a.isDark(d, e) && k++;
+ var l = Math.abs(100 * k / b / b - 50) / 5;
+ return c += 10 * l
+ }
+ }, g = {
+ glog: function (a) {
+ if (1 > a) throw new Error("glog(" + a + ")");
+ return g.LOG_TABLE[a]
+ }, gexp: function (a) {
+ for (; 0 > a;) a += 255;
+ for (; a >= 256;) a -= 255;
+ return g.EXP_TABLE[a]
+ }, EXP_TABLE: new Array(256), LOG_TABLE: new Array(256)
+ }, h = 0; 8 > h; h++) g.EXP_TABLE[h] = 1 << h;
+ for (var h = 8; 256 > h; h++) g.EXP_TABLE[h] = g.EXP_TABLE[h - 4] ^ g.EXP_TABLE[h - 5] ^ g.EXP_TABLE[h - 6] ^ g.EXP_TABLE[h - 8];
+ for (var h = 0; 255 > h; h++) g.LOG_TABLE[g.EXP_TABLE[h]] = h;
+ i.prototype = {
+ get: function (a) {
+ return this.num[a]
+ }, getLength: function () {
+ return this.num.length
+ }, multiply: function (a) {
+ for (var b = new Array(this.getLength() + a.getLength() - 1), c = 0; c < this.getLength(); c++) for (var d = 0; d < a.getLength(); d++) b[c + d] ^= g.gexp(g.glog(this.get(c)) + g.glog(a.get(d)));
+ return new i(b, 0)
+ }, mod: function (a) {
+ if (this.getLength() - a.getLength() < 0) return this;
+ for (var b = g.glog(this.get(0)) - g.glog(a.get(0)), c = new Array(this.getLength()), d = 0; d < this.getLength(); d++) c[d] = this.get(d);
+ for (var d = 0; d < a.getLength(); d++) c[d] ^= g.gexp(g.glog(a.get(d)) + b);
+ return new i(c, 0).mod(a)
+ }
+ }, j.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]], j.getRSBlocks = function (a, b) {
+ var c = j.getRsBlockTable(a, b);
+ if (void 0 == c) throw new Error("bad rs block @ typeNumber:" + a + "/errorCorrectLevel:" + b);
+ for (var d = c.length / 3, e = [], f = 0; d > f; f++) for (var g = c[3 * f + 0], h = c[3 * f + 1], i = c[3 * f + 2], k = 0; g > k; k++) e.push(new j(h, i));
+ return e
+ }, j.getRsBlockTable = function (a, b) {
+ switch (b) {
+ case d.L:
+ return j.RS_BLOCK_TABLE[4 * (a - 1) + 0];
+ case d.M:
+ return j.RS_BLOCK_TABLE[4 * (a - 1) + 1];
+ case d.Q:
+ return j.RS_BLOCK_TABLE[4 * (a - 1) + 2];
+ case d.H:
+ return j.RS_BLOCK_TABLE[4 * (a - 1) + 3];
+ default:
+ return void 0
+ }
+ }, k.prototype = {
+ get: function (a) {
+ var b = Math.floor(a / 8);
+ return 1 == (1 & this.buffer[b] >>> 7 - a % 8)
+ }, put: function (a, b) {
+ for (var c = 0; b > c; c++) this.putBit(1 == (1 & a >>> b - c - 1))
+ }, getLengthInBits: function () {
+ return this.length
+ }, putBit: function (a) {
+ var b = Math.floor(this.length / 8);
+ this.buffer.length <= b && this.buffer.push(0), a && (this.buffer[b] |= 128 >>> this.length % 8), this.length++
+ }
+ };
+ var l = [[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]],
+ o = function () {
+ var a = function (a, b) {
+ this._el = a, this._htOption = b
+ };
+ return a.prototype.draw = function (a) {
+ function g(a, b) {
+ var c = document.createElementNS("http://www.w3.org/2000/svg", a);
+ for (var d in b) b.hasOwnProperty(d) && c.setAttribute(d, b[d]);
+ return c
+ }
+
+ var b = this._htOption, c = this._el, d = a.getModuleCount();
+ Math.floor(b.width / d), Math.floor(b.height / d), this.clear();
+ var h = g("svg", {
+ viewBox: "0 0 " + String(d) + " " + String(d),
+ width: "100%",
+ height: "100%",
+ fill: b.colorLight
+ });
+ h.setAttributeNS("http://www.w3.org/2000/xmlns/", "xmlns:xlink", "http://www.w3.org/1999/xlink"), c.appendChild(h), h.appendChild(g("rect", {
+ fill: b.colorDark,
+ width: "1",
+ height: "1",
+ id: "template"
+ }));
+ for (var i = 0; d > i; i++) for (var j = 0; d > j; j++) if (a.isDark(i, j)) {
+ var k = g("use", {x: String(i), y: String(j)});
+ k.setAttributeNS("http://www.w3.org/1999/xlink", "href", "#template"), h.appendChild(k)
+ }
+ }, a.prototype.clear = function () {
+ for (; this._el.hasChildNodes();) this._el.removeChild(this._el.lastChild)
+ }, a
+ }(), p = "svg" === document.documentElement.tagName.toLowerCase(), q = p ? o : m() ? function () {
+ function a() {
+ this._elImage.src = this._elCanvas.toDataURL("image/png"), this._elImage.style.display = "block", this._elCanvas.style.display = "none"
+ }
+
+ function d(a, b) {
+ var c = this;
+ if (c._fFail = b, c._fSuccess = a, null === c._bSupportDataURI) {
+ var d = document.createElement("img"), e = function () {
+ c._bSupportDataURI = !1, c._fFail && _fFail.call(c)
+ }, f = function () {
+ c._bSupportDataURI = !0, c._fSuccess && c._fSuccess.call(c)
+ };
+ return d.onabort = e, d.onerror = e, d.onload = f, d.src = "data:image/gif;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg==", void 0
+ }
+ c._bSupportDataURI === !0 && c._fSuccess ? c._fSuccess.call(c) : c._bSupportDataURI === !1 && c._fFail && c._fFail.call(c)
+ }
+
+ if (this._android && this._android <= 2.1) {
+ var b = 1 / window.devicePixelRatio, c = CanvasRenderingContext2D.prototype.drawImage;
+ CanvasRenderingContext2D.prototype.drawImage = function (a, d, e, f, g, h, i, j) {
+ if ("nodeName" in a && /img/i.test(a.nodeName)) for (var l = arguments.length - 1; l >= 1; l--) arguments[l] = arguments[l] * b; else "undefined" == typeof j && (arguments[1] *= b, arguments[2] *= b, arguments[3] *= b, arguments[4] *= b);
+ c.apply(this, arguments)
+ }
+ }
+ var e = function (a, b) {
+ this._bIsPainted = !1, this._android = n(), this._htOption = b, this._elCanvas = document.createElement("canvas"), this._elCanvas.width = b.width, this._elCanvas.height = b.height, a.appendChild(this._elCanvas), this._el = a, this._oContext = this._elCanvas.getContext("2d"), this._bIsPainted = !1, this._elImage = document.createElement("img"), this._elImage.style.display = "none", this._el.appendChild(this._elImage), this._bSupportDataURI = null
+ };
+ return e.prototype.draw = function (a) {
+ var b = this._elImage, c = this._oContext, d = this._htOption, e = a.getModuleCount(), f = d.width / e,
+ g = d.height / e, h = Math.round(f), i = Math.round(g);
+ b.style.display = "none", this.clear();
+ for (var j = 0; e > j; j++) for (var k = 0; e > k; k++) {
+ var l = a.isDark(j, k), m = k * f, n = j * g;
+ c.strokeStyle = l ? d.colorDark : d.colorLight, c.lineWidth = 1, c.fillStyle = l ? d.colorDark : d.colorLight, c.fillRect(m, n, f, g), c.strokeRect(Math.floor(m) + .5, Math.floor(n) + .5, h, i), c.strokeRect(Math.ceil(m) - .5, Math.ceil(n) - .5, h, i)
+ }
+ this._bIsPainted = !0
+ }, e.prototype.makeImage = function () {
+ this._bIsPainted && d.call(this, a)
+ }, e.prototype.isPainted = function () {
+ return this._bIsPainted
+ }, e.prototype.clear = function () {
+ this._oContext.clearRect(0, 0, this._elCanvas.width, this._elCanvas.height), this._bIsPainted = !1
+ }, e.prototype.round = function (a) {
+ return a ? Math.floor(1e3 * a) / 1e3 : a
+ }, e
+ }() : function () {
+ var a = function (a, b) {
+ this._el = a, this._htOption = b
+ };
+ return a.prototype.draw = function (a) {
+ for (var b = this._htOption, c = this._el, d = a.getModuleCount(), e = Math.floor(b.width / d), f = Math.floor(b.height / d), g = ['
'], h = 0; d > h; h++) {
+ g.push("
");
+ for (var i = 0; d > i; i++) g.push('
');
+ g.push("
")
+ }
+ g.push("
"), c.innerHTML = g.join("");
+ var j = c.childNodes[0], k = (b.width - j.offsetWidth) / 2, l = (b.height - j.offsetHeight) / 2;
+ k > 0 && l > 0 && (j.style.margin = l + "px " + k + "px")
+ }, a.prototype.clear = function () {
+ this._el.innerHTML = ""
+ }, a
+ }();
+ QRCode = function (a, b) {
+ if (this._htOption = {
+ width: 256,
+ height: 256,
+ typeNumber: 4,
+ colorDark: "#000000",
+ colorLight: "#ffffff",
+ correctLevel: d.H
+ }, "string" == typeof b && (b = {text: b}), b) for (var c in b) this._htOption[c] = b[c];
+ "string" == typeof a && (a = document.getElementById(a)), this._android = n(), this._el = a, this._oQRCode = null, this._oDrawing = new q(this._el, this._htOption), this._htOption.text && this.makeCode(this._htOption.text)
+ }, QRCode.prototype.makeCode = function (a) {
+ this._oQRCode = new b(r(a, this._htOption.correctLevel), this._htOption.correctLevel), this._oQRCode.addData(a), this._oQRCode.make(), this._el.title = a, this._oDrawing.draw(this._oQRCode), this.makeImage()
+ }, QRCode.prototype.makeImage = function () {
+ "function" == typeof this._oDrawing.makeImage && (!this._android || this._android >= 3) && this._oDrawing.makeImage()
+ }, QRCode.prototype.clear = function () {
+ this._oDrawing.clear()
+ }, QRCode.CorrectLevel = d
+}();
+/*
+Copyright 2012 Igor Vaynberg
+
+Version: 3.4.1 Timestamp: Thu Jun 27 18:02:10 PDT 2013
+
+This software is licensed under the Apache License, Version 2.0 (the "Apache License") or the GNU
+General Public License version 2 (the "GPL License"). You may choose either license to govern your
+use of this software only upon the condition that you accept all of the terms of either the Apache
+License or the GPL License.
+
+You may obtain a copy of the Apache License and the GPL License at:
+
+ http://www.apache.org/licenses/LICENSE-2.0
+ http://www.gnu.org/licenses/gpl-2.0.html
+
+Unless required by applicable law or agreed to in writing, software distributed under the
+Apache License or the GPL Licesnse is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
+CONDITIONS OF ANY KIND, either express or implied. See the Apache License and the GPL License for
+the specific language governing permissions and limitations under the Apache License and the GPL License.
+*/
+(function ($) {
+ if (typeof $.fn.each2 == "undefined") {
+ $.fn.extend({
+ /*
+ * 4-10 times faster .each replacement
+ * use it carefully, as it overrides jQuery context of element on each iteration
+ */
+ each2: function (c) {
+ var j = $([0]), i = -1, l = this.length;
+ while (
+ ++i < l
+ && (j.context = j[0] = this[i])
+ && c.call(j[0], i, j) !== false //"this"=DOM, i=index, j=jQuery object
+ ) ;
+ return this;
+ }
+ });
+ }
+})(jQuery);
+
+(function ($, undefined) {
+ "use strict";
+ /*global document, window, jQuery, console */
+
+ if (window.Select2 !== undefined) {
+ return;
+ }
+
+ var KEY, AbstractSelect2, SingleSelect2, MultiSelect2, nextUid, sizer,
+ lastMousePosition = {x: 0, y: 0}, $document, scrollBarDimensions,
+
+ KEY = {
+ TAB: 9,
+ ENTER: 13,
+ ESC: 27,
+ SPACE: 32,
+ LEFT: 37,
+ UP: 38,
+ RIGHT: 39,
+ DOWN: 40,
+ SHIFT: 16,
+ CTRL: 17,
+ ALT: 18,
+ PAGE_UP: 33,
+ PAGE_DOWN: 34,
+ HOME: 36,
+ END: 35,
+ BACKSPACE: 8,
+ DELETE: 46,
+ isArrow: function (k) {
+ k = k.which ? k.which : k;
+ switch (k) {
+ case KEY.LEFT:
+ case KEY.RIGHT:
+ case KEY.UP:
+ case KEY.DOWN:
+ return true;
+ }
+ return false;
+ },
+ isControl: function (e) {
+ var k = e.which;
+ switch (k) {
+ case KEY.SHIFT:
+ case KEY.CTRL:
+ case KEY.ALT:
+ return true;
+ }
+
+ if (e.metaKey) return true;
+
+ return false;
+ },
+ isFunctionKey: function (k) {
+ k = k.which ? k.which : k;
+ return k >= 112 && k <= 123;
+ }
+ },
+ MEASURE_SCROLLBAR_TEMPLATE = "";
+
+ $document = $(document);
+
+ nextUid = (function () {
+ var counter = 1;
+ return function () {
+ return counter++;
+ };
+ }());
+
+ function indexOf(value, array) {
+ var i = 0, l = array.length;
+ for (; i < l; i = i + 1) {
+ if (equal(value, array[i])) return i;
+ }
+ return -1;
+ }
+
+ function measureScrollbar() {
+ var $template = $(MEASURE_SCROLLBAR_TEMPLATE);
+ $template.appendTo('body');
+
+ var dim = {
+ width: $template.width() - $template[0].clientWidth,
+ height: $template.height() - $template[0].clientHeight
+ };
+ $template.remove();
+
+ return dim;
+ }
+
+ /**
+ * Compares equality of a and b
+ * @param a
+ * @param b
+ */
+ function equal(a, b) {
+ if (a === b) return true;
+ if (a === undefined || b === undefined) return false;
+ if (a === null || b === null) return false;
+ // Check whether 'a' or 'b' is a string (primitive or object).
+ // The concatenation of an empty string (+'') converts its argument to a string's primitive.
+ if (a.constructor === String) return a + '' === b + ''; // a+'' - in case 'a' is a String object
+ if (b.constructor === String) return b + '' === a + ''; // b+'' - in case 'b' is a String object
+ return false;
+ }
+
+ /**
+ * Splits the string into an array of values, trimming each value. An empty array is returned for nulls or empty
+ * strings
+ * @param string
+ * @param separator
+ */
+ function splitVal(string, separator) {
+ var val, i, l;
+ if (string === null || string.length < 1) return [];
+ val = string.split(separator);
+ for (i = 0, l = val.length; i < l; i = i + 1) val[i] = $.trim(val[i]);
+ return val;
+ }
+
+ function getSideBorderPadding(element) {
+ return element.outerWidth(false) - element.width();
+ }
+
+ function installKeyUpChangeEvent(element) {
+ var key = "keyup-change-value";
+ element.on("keydown", function () {
+ if ($.data(element, key) === undefined) {
+ $.data(element, key, element.val());
+ }
+ });
+ element.on("keyup", function () {
+ var val = $.data(element, key);
+ if (val !== undefined && element.val() !== val) {
+ $.removeData(element, key);
+ element.trigger("keyup-change");
+ }
+ });
+ }
+
+ $document.on("mousemove", function (e) {
+ lastMousePosition.x = e.pageX;
+ lastMousePosition.y = e.pageY;
+ });
+
+ /**
+ * filters mouse events so an event is fired only if the mouse moved.
+ *
+ * filters out mouse events that occur when mouse is stationary but
+ * the elements under the pointer are scrolled.
+ */
+ function installFilteredMouseMove(element) {
+ element.on("mousemove", function (e) {
+ var lastpos = lastMousePosition;
+ if (lastpos === undefined || lastpos.x !== e.pageX || lastpos.y !== e.pageY) {
+ $(e.target).trigger("mousemove-filtered", e);
+ }
+ });
+ }
+
+ /**
+ * Debounces a function. Returns a function that calls the original fn function only if no invocations have been made
+ * within the last quietMillis milliseconds.
+ *
+ * @param quietMillis number of milliseconds to wait before invoking fn
+ * @param fn function to be debounced
+ * @param ctx object to be used as this reference within fn
+ * @return debounced version of fn
+ */
+ function debounce(quietMillis, fn, ctx) {
+ ctx = ctx || undefined;
+ var timeout;
+ return function () {
+ var args = arguments;
+ window.clearTimeout(timeout);
+ timeout = window.setTimeout(function () {
+ fn.apply(ctx, args);
+ }, quietMillis);
+ };
+ }
+
+ /**
+ * A simple implementation of a thunk
+ * @param formula function used to lazily initialize the thunk
+ * @return {Function}
+ */
+ function thunk(formula) {
+ var evaluated = false,
+ value;
+ return function () {
+ if (evaluated === false) {
+ value = formula();
+ evaluated = true;
+ }
+ return value;
+ };
+ };
+
+ function installDebouncedScroll(threshold, element) {
+ var notify = debounce(threshold, function (e) {
+ element.trigger("scroll-debounced", e);
+ });
+ element.on("scroll", function (e) {
+ if (indexOf(e.target, element.get()) >= 0) notify(e);
+ });
+ }
+
+ function focus($el) {
+ if ($el[0] === document.activeElement) return;
+
+ /* set the focus in a 0 timeout - that way the focus is set after the processing
+ of the current event has finished - which seems like the only reliable way
+ to set focus */
+ window.setTimeout(function () {
+ var el = $el[0], pos = $el.val().length, range;
+
+ $el.focus();
+
+ /* make sure el received focus so we do not error out when trying to manipulate the caret.
+ sometimes modals or others listeners may steal it after its set */
+ if ($el.is(":visible") && el === document.activeElement) {
+
+ /* after the focus is set move the caret to the end, necessary when we val()
+ just before setting focus */
+ if (el.setSelectionRange) {
+ el.setSelectionRange(pos, pos);
+ }
+ else if (el.createTextRange) {
+ range = el.createTextRange();
+ range.collapse(false);
+ range.select();
+ }
+ }
+ }, 0);
+ }
+
+ function getCursorInfo(el) {
+ el = $(el)[0];
+ var offset = 0;
+ var length = 0;
+ if ('selectionStart' in el) {
+ offset = el.selectionStart;
+ length = el.selectionEnd - offset;
+ } else if ('selection' in document) {
+ el.focus();
+ var sel = document.selection.createRange();
+ length = document.selection.createRange().text.length;
+ sel.moveStart('character', -el.value.length);
+ offset = sel.text.length - length;
+ }
+ return {offset: offset, length: length};
+ }
+
+ function killEvent(event) {
+ event.preventDefault();
+ event.stopPropagation();
+ }
+
+ function killEventImmediately(event) {
+ event.preventDefault();
+ event.stopImmediatePropagation();
+ }
+
+ function measureTextWidth(e) {
+ if (!sizer) {
+ var style = e[0].currentStyle || window.getComputedStyle(e[0], null);
+ sizer = $(document.createElement("div")).css({
+ position: "absolute",
+ left: "-10000px",
+ top: "-10000px",
+ display: "none",
+ fontSize: style.fontSize,
+ fontFamily: style.fontFamily,
+ fontStyle: style.fontStyle,
+ fontWeight: style.fontWeight,
+ letterSpacing: style.letterSpacing,
+ textTransform: style.textTransform,
+ whiteSpace: "nowrap"
+ });
+ sizer.attr("class", "select2-sizer");
+ $("body").append(sizer);
+ }
+ sizer.text(e.val());
+ return sizer.width();
+ }
+
+ function syncCssClasses(dest, src, adapter) {
+ var classes, replacements = [], adapted;
+
+ classes = dest.attr("class");
+ if (classes) {
+ classes = '' + classes; // for IE which returns object
+ $(classes.split(" ")).each2(function () {
+ if (this.indexOf("select2-") === 0) {
+ replacements.push(this);
+ }
+ });
+ }
+ classes = src.attr("class");
+ if (classes) {
+ classes = '' + classes; // for IE which returns object
+ $(classes.split(" ")).each2(function () {
+ if (this.indexOf("select2-") !== 0) {
+ adapted = adapter(this);
+ if (adapted) {
+ replacements.push(this);
+ }
+ }
+ });
+ }
+ dest.attr("class", replacements.join(" "));
+ }
+
+
+ function markMatch(text, term, markup, escapeMarkup) {
+ var match = text.toUpperCase().indexOf(term.toUpperCase()),
+ tl = term.length;
+
+ if (match < 0) {
+ markup.push(escapeMarkup(text));
+ return;
+ }
+
+ markup.push(escapeMarkup(text.substring(0, match)));
+ markup.push("");
+ markup.push(escapeMarkup(text.substring(match, match + tl)));
+ markup.push("");
+ markup.push(escapeMarkup(text.substring(match + tl, text.length)));
+ }
+
+ function defaultEscapeMarkup(markup) {
+ var replace_map = {
+ '\\': '\',
+ '&': '&',
+ '<': '<',
+ '>': '>',
+ '"': '"',
+ "'": ''',
+ "/": '/'
+ };
+
+ return String(markup).replace(/[&<>"'\/\\]/g, function (match) {
+ return replace_map[match];
+ });
+ }
+
+ /**
+ * Produces an ajax-based query function
+ *
+ * @param options object containing configuration paramters
+ * @param options.params parameter map for the transport ajax call, can contain such options as cache, jsonpCallback, etc. see $.ajax
+ * @param options.transport function that will be used to execute the ajax request. must be compatible with parameters supported by $.ajax
+ * @param options.url url for the data
+ * @param options.data a function(searchTerm, pageNumber, context) that should return an object containing query string parameters for the above url.
+ * @param options.dataType request data type: ajax, jsonp, other datatatypes supported by jQuery's $.ajax function or the transport function if specified
+ * @param options.quietMillis (optional) milliseconds to wait before making the ajaxRequest, helps debounce the ajax function if invoked too often
+ * @param options.results a function(remoteData, pageNumber) that converts data returned form the remote request to the format expected by Select2.
+ * The expected format is an object containing the following keys:
+ * results array of objects that will be used as choices
+ * more (optional) boolean indicating whether there are more results available
+ * Example: {results:[{id:1, text:'Red'},{id:2, text:'Blue'}], more:true}
+ */
+ function ajax(options) {
+ var timeout, // current scheduled but not yet executed request
+ requestSequence = 0, // sequence used to drop out-of-order responses
+ handler = null,
+ quietMillis = options.quietMillis || 100,
+ ajaxUrl = options.url,
+ self = this;
+
+ return function (query) {
+ window.clearTimeout(timeout);
+ timeout = window.setTimeout(function () {
+ requestSequence += 1; // increment the sequence
+ var requestNumber = requestSequence, // this request's sequence number
+ data = options.data, // ajax data function
+ url = ajaxUrl, // ajax url string or function
+ transport = options.transport || $.fn.select2.ajaxDefaults.transport,
+ // deprecated - to be removed in 4.0 - use params instead
+ deprecated = {
+ type: options.type || 'GET', // set type of request (GET or POST)
+ cache: options.cache || false,
+ jsonpCallback: options.jsonpCallback || undefined,
+ dataType: options.dataType || "json"
+ },
+ params = $.extend({}, $.fn.select2.ajaxDefaults.params, deprecated);
+
+ data = data ? data.call(self, query.term, query.page, query.context) : null;
+ url = (typeof url === 'function') ? url.call(self, query.term, query.page, query.context) : url;
+
+ if (handler) {
+ handler.abort();
+ }
+
+ if (options.params) {
+ if ($.isFunction(options.params)) {
+ $.extend(params, options.params.call(self));
+ } else {
+ $.extend(params, options.params);
+ }
+ }
+
+ $.extend(params, {
+ url: url,
+ dataType: options.dataType,
+ data: data,
+ success: function (data) {
+ if (requestNumber < requestSequence) {
+ return;
+ }
+ // TODO - replace query.page with query so users have access to term, page, etc.
+ var results = options.results(data, query.page);
+ query.callback(results);
+ }
+ });
+ handler = transport.call(self, params);
+ }, quietMillis);
+ };
+ }
+
+ /**
+ * Produces a query function that works with a local array
+ *
+ * @param options object containing configuration parameters. The options parameter can either be an array or an
+ * object.
+ *
+ * If the array form is used it is assumed that it contains objects with 'id' and 'text' keys.
+ *
+ * If the object form is used ti is assumed that it contains 'data' and 'text' keys. The 'data' key should contain
+ * an array of objects that will be used as choices. These objects must contain at least an 'id' key. The 'text'
+ * key can either be a String in which case it is expected that each element in the 'data' array has a key with the
+ * value of 'text' which will be used to match choices. Alternatively, text can be a function(item) that can extract
+ * the text.
+ */
+ function local(options) {
+ var data = options, // data elements
+ dataText,
+ tmp,
+ text = function (item) {
+ return "" + item.text;
+ }; // function used to retrieve the text portion of a data item that is matched against the search
+
+ if ($.isArray(data)) {
+ tmp = data;
+ data = {results: tmp};
+ }
+
+ if ($.isFunction(data) === false) {
+ tmp = data;
+ data = function () {
+ return tmp;
+ };
+ }
+
+ var dataItem = data();
+ if (dataItem.text) {
+ text = dataItem.text;
+ // if text is not a function we assume it to be a key name
+ if (!$.isFunction(text)) {
+ dataText = dataItem.text; // we need to store this in a separate variable because in the next step data gets reset and data.text is no longer available
+ text = function (item) {
+ return item[dataText];
+ };
+ }
+ }
+
+ return function (query) {
+ var t = query.term, filtered = {results: []}, process;
+ if (t === "") {
+ query.callback(data());
+ return;
+ }
+
+ process = function (datum, collection) {
+ var group, attr;
+ datum = datum[0];
+ if (datum.children) {
+ group = {};
+ for (attr in datum) {
+ if (datum.hasOwnProperty(attr)) group[attr] = datum[attr];
+ }
+ group.children = [];
+ $(datum.children).each2(function (i, childDatum) {
+ process(childDatum, group.children);
+ });
+ if (group.children.length || query.matcher(t, text(group), datum)) {
+ collection.push(group);
+ }
+ } else {
+ if (query.matcher(t, text(datum), datum)) {
+ collection.push(datum);
+ }
+ }
+ };
+
+ $(data().results).each2(function (i, datum) {
+ process(datum, filtered.results);
+ });
+ query.callback(filtered);
+ };
+ }
+
+ // TODO javadoc
+ function tags(data) {
+ var isFunc = $.isFunction(data);
+ return function (query) {
+ var t = query.term, filtered = {results: []};
+ $(isFunc ? data() : data).each(function () {
+ var isObject = this.text !== undefined,
+ text = isObject ? this.text : this;
+ if (t === "" || query.matcher(t, text)) {
+ filtered.results.push(isObject ? this : {id: this, text: this});
+ }
+ });
+ query.callback(filtered);
+ };
+ }
+
+ /**
+ * Checks if the formatter function should be used.
+ *
+ * Throws an error if it is not a function. Returns true if it should be used,
+ * false if no formatting should be performed.
+ *
+ * @param formatter
+ */
+ function checkFormatter(formatter, formatterName) {
+ if ($.isFunction(formatter)) return true;
+ if (!formatter) return false;
+ throw new Error(formatterName + " must be a function or a falsy value");
+ }
+
+ function evaluate(val) {
+ return $.isFunction(val) ? val() : val;
+ }
+
+ function countResults(results) {
+ var count = 0;
+ $.each(results, function (i, item) {
+ if (item.children) {
+ count += countResults(item.children);
+ } else {
+ count++;
+ }
+ });
+ return count;
+ }
+
+ /**
+ * Default tokenizer. This function uses breaks the input on substring match of any string from the
+ * opts.tokenSeparators array and uses opts.createSearchChoice to create the choice object. Both of those
+ * two options have to be defined in order for the tokenizer to work.
+ *
+ * @param input text user has typed so far or pasted into the search field
+ * @param selection currently selected choices
+ * @param selectCallback function(choice) callback tho add the choice to selection
+ * @param opts select2's opts
+ * @return undefined/null to leave the current input unchanged, or a string to change the input to the returned value
+ */
+ function defaultTokenizer(input, selection, selectCallback, opts) {
+ var original = input, // store the original so we can compare and know if we need to tell the search to update its text
+ dupe = false, // check for whether a token we extracted represents a duplicate selected choice
+ token, // token
+ index, // position at which the separator was found
+ i, l, // looping variables
+ separator; // the matched separator
+
+ if (!opts.createSearchChoice || !opts.tokenSeparators || opts.tokenSeparators.length < 1) return undefined;
+
+ while (true) {
+ index = -1;
+
+ for (i = 0, l = opts.tokenSeparators.length; i < l; i++) {
+ separator = opts.tokenSeparators[i];
+ index = input.indexOf(separator);
+ if (index >= 0) break;
+ }
+
+ if (index < 0) break; // did not find any token separator in the input string, bail
+
+ token = input.substring(0, index);
+ input = input.substring(index + separator.length);
+
+ if (token.length > 0) {
+ token = opts.createSearchChoice.call(this, token, selection);
+ if (token !== undefined && token !== null && opts.id(token) !== undefined && opts.id(token) !== null) {
+ dupe = false;
+ for (i = 0, l = selection.length; i < l; i++) {
+ if (equal(opts.id(token), opts.id(selection[i]))) {
+ dupe = true;
+ break;
+ }
+ }
+
+ if (!dupe) selectCallback(token);
+ }
+ }
+ }
+
+ if (original !== input) return input;
+ }
+
+ /**
+ * Creates a new class
+ *
+ * @param superClass
+ * @param methods
+ */
+ function clazz(SuperClass, methods) {
+ var constructor = function () {
+ };
+ constructor.prototype = new SuperClass;
+ constructor.prototype.constructor = constructor;
+ constructor.prototype.parent = SuperClass.prototype;
+ constructor.prototype = $.extend(constructor.prototype, methods);
+ return constructor;
+ }
+
+ AbstractSelect2 = clazz(Object, {
+
+ // abstract
+ bind: function (func) {
+ var self = this;
+ return function () {
+ func.apply(self, arguments);
+ };
+ },
+
+ // abstract
+ init: function (opts) {
+ var results, search, resultsSelector = ".select2-results", disabled, readonly;
+
+ // prepare options
+ this.opts = opts = this.prepareOpts(opts);
+
+ this.id = opts.id;
+
+ // destroy if called on an existing component
+ if (opts.element.data("select2") !== undefined &&
+ opts.element.data("select2") !== null) {
+ opts.element.data("select2").destroy();
+ }
+
+ this.container = this.createContainer();
+
+ this.containerId = "s2id_" + (opts.element.attr("id") || "autogen" + nextUid());
+ this.containerSelector = "#" + this.containerId.replace(/([;&,\.\+\*\~':"\!\^#$%@\[\]\(\)=>\|])/g, '\\$1');
+ this.container.attr("id", this.containerId);
+
+ // cache the body so future lookups are cheap
+ this.body = thunk(function () {
+ return opts.element.closest("body");
+ });
+
+ syncCssClasses(this.container, this.opts.element, this.opts.adaptContainerCssClass);
+
+ this.container.css(evaluate(opts.containerCss));
+ this.container.addClass(evaluate(opts.containerCssClass));
+
+ this.elementTabIndex = this.opts.element.attr("tabindex");
+
+ // swap container for the element
+ this.opts.element
+ .data("select2", this)
+ .attr("tabindex", "-1")
+ .before(this.container);
+ this.container.data("select2", this);
+
+ this.dropdown = this.container.find(".select2-drop");
+ this.dropdown.addClass(evaluate(opts.dropdownCssClass));
+ this.dropdown.data("select2", this);
+
+ this.results = results = this.container.find(resultsSelector);
+ this.search = search = this.container.find("input.select2-input");
+
+ this.resultsPage = 0;
+ this.context = null;
+
+ // initialize the container
+ this.initContainer();
+
+ installFilteredMouseMove(this.results);
+ this.dropdown.on("mousemove-filtered touchstart touchmove touchend", resultsSelector, this.bind(this.highlightUnderEvent));
+
+ installDebouncedScroll(80, this.results);
+ this.dropdown.on("scroll-debounced", resultsSelector, this.bind(this.loadMoreIfNeeded));
+
+ // do not propagate change event from the search field out of the component
+ $(this.container).on("change", ".select2-input", function (e) {
+ e.stopPropagation();
+ });
+ $(this.dropdown).on("change", ".select2-input", function (e) {
+ e.stopPropagation();
+ });
+
+ // if jquery.mousewheel plugin is installed we can prevent out-of-bounds scrolling of results via mousewheel
+ if ($.fn.mousewheel) {
+ results.mousewheel(function (e, delta, deltaX, deltaY) {
+ var top = results.scrollTop(), height;
+ if (deltaY > 0 && top - deltaY <= 0) {
+ results.scrollTop(0);
+ killEvent(e);
+ } else if (deltaY < 0 && results.get(0).scrollHeight - results.scrollTop() + deltaY <= results.height()) {
+ results.scrollTop(results.get(0).scrollHeight - results.height());
+ killEvent(e);
+ }
+ });
+ }
+
+ installKeyUpChangeEvent(search);
+ search.on("keyup-change input paste", this.bind(this.updateResults));
+ search.on("focus", function () {
+ search.addClass("select2-focused");
+ });
+ search.on("blur", function () {
+ search.removeClass("select2-focused");
+ });
+
+ this.dropdown.on("mouseup", resultsSelector, this.bind(function (e) {
+ if ($(e.target).closest(".select2-result-selectable").length > 0) {
+ this.highlightUnderEvent(e);
+ this.selectHighlighted(e);
+ }
+ }));
+
+ // trap all mouse events from leaving the dropdown. sometimes there may be a modal that is listening
+ // for mouse events outside of itself so it can close itself. since the dropdown is now outside the select2's
+ // dom it will trigger the popup close, which is not what we want
+ this.dropdown.on("click mouseup mousedown", function (e) {
+ e.stopPropagation();
+ });
+
+ if ($.isFunction(this.opts.initSelection)) {
+ // initialize selection based on the current value of the source element
+ this.initSelection();
+
+ // if the user has provided a function that can set selection based on the value of the source element
+ // we monitor the change event on the element and trigger it, allowing for two way synchronization
+ this.monitorSource();
+ }
+
+ if (opts.maximumInputLength !== null) {
+ this.search.attr("maxlength", opts.maximumInputLength);
+ }
+
+ var disabled = opts.element.prop("disabled");
+ if (disabled === undefined) disabled = false;
+ this.enable(!disabled);
+
+ var readonly = opts.element.prop("readonly");
+ if (readonly === undefined) readonly = false;
+ this.readonly(readonly);
+
+ // Calculate size of scrollbar
+ scrollBarDimensions = scrollBarDimensions || measureScrollbar();
+
+ this.autofocus = opts.element.prop("autofocus")
+ opts.element.prop("autofocus", false);
+ if (this.autofocus) this.focus();
+ },
+
+ // abstract
+ destroy: function () {
+ var element = this.opts.element, select2 = element.data("select2");
+
+ if (this.propertyObserver) {
+ delete this.propertyObserver;
+ this.propertyObserver = null;
+ }
+
+ if (select2 !== undefined) {
+ select2.container.remove();
+ select2.dropdown.remove();
+ element
+ .removeClass("select2-offscreen")
+ .removeData("select2")
+ .off(".select2")
+ .prop("autofocus", this.autofocus || false);
+ if (this.elementTabIndex) {
+ element.attr({tabindex: this.elementTabIndex});
+ } else {
+ element.removeAttr("tabindex");
+ }
+ element.show();
+ }
+ },
+
+ // abstract
+ optionToData: function (element) {
+ if (element.is("option")) {
+ return {
+ id: element.prop("value"),
+ text: element.text(),
+ element: element.get(),
+ css: element.attr("class"),
+ disabled: element.prop("disabled"),
+ locked: equal(element.attr("locked"), "locked") || equal(element.data("locked"), true)
+ };
+ } else if (element.is("optgroup")) {
+ return {
+ text: element.attr("label"),
+ children: [],
+ element: element.get(),
+ css: element.attr("class")
+ };
+ }
+ },
+
+ // abstract
+ prepareOpts: function (opts) {
+ var element, select, idKey, ajaxUrl, self = this;
+
+ element = opts.element;
+
+ if (element.get(0).tagName.toLowerCase() === "select") {
+ this.select = select = opts.element;
+ }
+
+ if (select) {
+ // these options are not allowed when attached to a select because they are picked up off the element itself
+ $.each(["id", "multiple", "ajax", "query", "createSearchChoice", "initSelection", "data", "tags"], function () {
+ if (this in opts) {
+ throw new Error("Option '" + this + "' is not allowed for Select2 when attached to a
"] || (!c.indexOf("
", "
"] || [0, "", ""];
+ a = "ignored
" + c[1] + a + c[2] + "
";
+ for ("function" == typeof w.innerShiv ? d.appendChild(w.innerShiv(a)) : d.innerHTML = a; c[0]--;) d = d.lastChild;
+ d = b.a.L(d.lastChild.childNodes)
+ }
+ return d
+ };
+ b.a.ca = function (a, d) {
+ b.a.ka(a);
+ d = b.a.d(d);
+ if (d !== n && d !== H) if ("string" != typeof d && (d = d.toString()), "undefined" != typeof E) E(a).html(d); else for (var c =
+ b.a.sa(d), e = 0; e < c.length; e++) a.appendChild(c[e])
+ };
+ b.b("utils.parseHtmlFragment", b.a.sa);
+ b.b("utils.setHtml", b.a.ca);
+ var Q = {};
+ b.s = {
+ qa: function (a) {
+ "function" != typeof a && i(Error("You can only pass a function to ko.memoization.memoize()"));
+ var b = (4294967296 * (1 + Math.random()) | 0).toString(16).substring(1) + (4294967296 * (1 + Math.random()) | 0).toString(16).substring(1);
+ Q[b] = a;
+ return "<\!--[ko_memo:" + b + "]--\>"
+ }, gb: function (a, b) {
+ var c = Q[a];
+ c === H && i(Error("Couldn't find any memo with ID " + a + ". Perhaps it's already been unmemoized."));
+ try {
+ return c.apply(n, b || []), l
+ } finally {
+ delete Q[a]
+ }
+ }, hb: function (a, d) {
+ var c = [];
+ ba(a, c);
+ for (var e = 0, f = c.length; e < f; e++) {
+ var g = c[e].rb, h = [g];
+ d && b.a.P(h, d);
+ b.s.gb(c[e].Eb, h);
+ g.nodeValue = "";
+ g.parentNode && g.parentNode.removeChild(g)
+ }
+ }, Ta: function (a) {
+ return (a = a.match(/^\[ko_memo\:(.*?)\]$/)) ? a[1] : n
+ }
+ };
+ b.b("memoization", b.s);
+ b.b("memoization.memoize", b.s.qa);
+ b.b("memoization.unmemoize", b.s.gb);
+ b.b("memoization.parseMemoText", b.s.Ta);
+ b.b("memoization.unmemoizeDomNodeAndDescendants", b.s.hb);
+ b.La = {
+ throttle: function (a,
+ d) {
+ a.throttleEvaluation = d;
+ var c = n;
+ return b.j({
+ read: a, write: function (b) {
+ clearTimeout(c);
+ c = setTimeout(function () {
+ a(b)
+ }, d)
+ }
+ })
+ }, notify: function (a, d) {
+ a.equalityComparer = "always" == d ? t(q) : b.m.fn.equalityComparer;
+ return a
+ }
+ };
+ b.b("extenders", b.La);
+ b.eb = function (a, d, c) {
+ this.target = a;
+ this.ha = d;
+ this.qb = c;
+ b.p(this, "dispose", this.B)
+ };
+ b.eb.prototype.B = function () {
+ this.Bb = l;
+ this.qb()
+ };
+ b.S = function () {
+ this.w = {};
+ b.a.extend(this, b.S.fn);
+ b.p(this, "subscribe", this.xa);
+ b.p(this, "extend", this.extend);
+ b.p(this, "getSubscriptionsCount",
+ this.xb)
+ };
+ b.S.fn = {
+ xa: function (a, d, c) {
+ var c = c || "change", a = d ? a.bind(d) : a, e = new b.eb(this, a, function () {
+ b.a.ga(this.w[c], e)
+ }.bind(this));
+ this.w[c] || (this.w[c] = []);
+ this.w[c].push(e);
+ return e
+ }, notifySubscribers: function (a, d) {
+ d = d || "change";
+ this.w[d] && b.r.K(function () {
+ b.a.o(this.w[d].slice(0), function (b) {
+ b && b.Bb !== l && b.ha(a)
+ })
+ }, this)
+ }, xb: function () {
+ var a = 0, b;
+ for (b in this.w) this.w.hasOwnProperty(b) && (a += this.w[b].length);
+ return a
+ }, extend: function (a) {
+ var d = this;
+ if (a) for (var c in a) {
+ var e = b.La[c];
+ "function" ==
+ typeof e && (d = e(d, a[c]))
+ }
+ return d
+ }
+ };
+ b.Pa = function (a) {
+ return "function" == typeof a.xa && "function" == typeof a.notifySubscribers
+ };
+ b.b("subscribable", b.S);
+ b.b("isSubscribable", b.Pa);
+ var B = [];
+ b.r = {
+ lb: function (a) {
+ B.push({ha: a, Ka: []})
+ }, end: function () {
+ B.pop()
+ }, Va: function (a) {
+ b.Pa(a) || i(Error("Only subscribable things can act as dependencies"));
+ if (0 < B.length) {
+ var d = B[B.length - 1];
+ d && !(0 <= b.a.i(d.Ka, a)) && (d.Ka.push(a), d.ha(a))
+ }
+ }, K: function (a, b, c) {
+ try {
+ return B.push(n), a.apply(b, c || [])
+ } finally {
+ B.pop()
+ }
+ }
+ };
+ var la = {
+ undefined: l,
+ "boolean": l, number: l, string: l
+ };
+ b.m = function (a) {
+ function d() {
+ if (0 < arguments.length) {
+ if (!d.equalityComparer || !d.equalityComparer(c, arguments[0])) d.H(), c = arguments[0], d.G();
+ return this
+ }
+ b.r.Va(d);
+ return c
+ }
+
+ var c = a;
+ b.S.call(d);
+ d.t = function () {
+ return c
+ };
+ d.G = function () {
+ d.notifySubscribers(c)
+ };
+ d.H = function () {
+ d.notifySubscribers(c, "beforeChange")
+ };
+ b.a.extend(d, b.m.fn);
+ b.p(d, "peek", d.t);
+ b.p(d, "valueHasMutated", d.G);
+ b.p(d, "valueWillMutate", d.H);
+ return d
+ };
+ b.m.fn = {
+ equalityComparer: function (a, b) {
+ return a === n || typeof a in
+ la ? a === b : q
+ }
+ };
+ var D = b.m.Jb = "__ko_proto__";
+ b.m.fn[D] = b.m;
+ b.la = function (a, d) {
+ return a === n || a === H || a[D] === H ? q : a[D] === d ? l : b.la(a[D], d)
+ };
+ b.$ = function (a) {
+ return b.la(a, b.m)
+ };
+ b.Qa = function (a) {
+ return "function" == typeof a && a[D] === b.m || "function" == typeof a && a[D] === b.j && a.yb ? l : q
+ };
+ b.b("observable", b.m);
+ b.b("isObservable", b.$);
+ b.b("isWriteableObservable", b.Qa);
+ b.R = function (a) {
+ 0 == arguments.length && (a = []);
+ a !== n && (a !== H && !("length" in a)) && i(Error("The argument passed when initializing an observable array must be an array, or null, or undefined."));
+ var d = b.m(a);
+ b.a.extend(d, b.R.fn);
+ return d
+ };
+ b.R.fn = {
+ remove: function (a) {
+ for (var b = this.t(), c = [], e = "function" == typeof a ? a : function (b) {
+ return b === a
+ }, f = 0; f < b.length; f++) {
+ var g = b[f];
+ e(g) && (0 === c.length && this.H(), c.push(g), b.splice(f, 1), f--)
+ }
+ c.length && this.G();
+ return c
+ }, removeAll: function (a) {
+ if (a === H) {
+ var d = this.t(), c = d.slice(0);
+ this.H();
+ d.splice(0, d.length);
+ this.G();
+ return c
+ }
+ return !a ? [] : this.remove(function (d) {
+ return 0 <= b.a.i(a, d)
+ })
+ }, destroy: function (a) {
+ var b = this.t(), c = "function" == typeof a ? a : function (b) {
+ return b ===
+ a
+ };
+ this.H();
+ for (var e = b.length - 1; 0 <= e; e--) c(b[e]) && (b[e]._destroy = l);
+ this.G()
+ }, destroyAll: function (a) {
+ return a === H ? this.destroy(t(l)) : !a ? [] : this.destroy(function (d) {
+ return 0 <= b.a.i(a, d)
+ })
+ }, indexOf: function (a) {
+ var d = this();
+ return b.a.i(d, a)
+ }, replace: function (a, b) {
+ var c = this.indexOf(a);
+ 0 <= c && (this.H(), this.t()[c] = b, this.G())
+ }
+ };
+ b.a.o("pop push reverse shift sort splice unshift".split(" "), function (a) {
+ b.R.fn[a] = function () {
+ var b = this.t();
+ this.H();
+ b = b[a].apply(b, arguments);
+ this.G();
+ return b
+ }
+ });
+ b.a.o(["slice"],
+ function (a) {
+ b.R.fn[a] = function () {
+ var b = this();
+ return b[a].apply(b, arguments)
+ }
+ });
+ b.b("observableArray", b.R);
+ b.j = function (a, d, c) {
+ function e() {
+ b.a.o(y, function (a) {
+ a.B()
+ });
+ y = []
+ }
+
+ function f() {
+ var a = h.throttleEvaluation;
+ a && 0 <= a ? (clearTimeout(s), s = setTimeout(g, a)) : g()
+ }
+
+ function g() {
+ if (!p) if (m && v()) z(); else {
+ p = l;
+ try {
+ var a = b.a.V(y, function (a) {
+ return a.target
+ });
+ b.r.lb(function (c) {
+ var d;
+ 0 <= (d = b.a.i(a, c)) ? a[d] = H : y.push(c.xa(f))
+ });
+ for (var c = r.call(d), e = a.length - 1; 0 <= e; e--) a[e] && y.splice(e, 1)[0].B();
+ m = l;
+ h.notifySubscribers(k,
+ "beforeChange");
+ k = c
+ } finally {
+ b.r.end()
+ }
+ h.notifySubscribers(k);
+ p = q;
+ y.length || z()
+ }
+ }
+
+ function h() {
+ if (0 < arguments.length) return "function" === typeof u ? u.apply(d, arguments) : i(Error("Cannot write a value to a ko.computed unless you specify a 'write' option. If you wish to read the current value, don't pass any parameters.")), this;
+ m || g();
+ b.r.Va(h);
+ return k
+ }
+
+ function j() {
+ return !m || 0 < y.length
+ }
+
+ var k, m = q, p = q, r = a;
+ r && "object" == typeof r ? (c = r, r = c.read) : (c = c || {}, r || (r = c.read));
+ "function" != typeof r && i(Error("Pass a function that returns the value of the ko.computed"));
+ var u = c.write, F = c.disposeWhenNodeIsRemoved || c.W || n, v = c.disposeWhen || c.Ja || t(q), z = e,
+ y = [], s = n;
+ d || (d = c.owner);
+ h.t = function () {
+ m || g();
+ return k
+ };
+ h.wb = function () {
+ return y.length
+ };
+ h.yb = "function" === typeof c.write;
+ h.B = function () {
+ z()
+ };
+ h.oa = j;
+ b.S.call(h);
+ b.a.extend(h, b.j.fn);
+ b.p(h, "peek", h.t);
+ b.p(h, "dispose", h.B);
+ b.p(h, "isActive", h.oa);
+ b.p(h, "getDependenciesCount", h.wb);
+ c.deferEvaluation !== l && g();
+ if (F && j()) {
+ z = function () {
+ b.a.F.Wa(F, arguments.callee);
+ e()
+ };
+ b.a.F.Ba(F, z);
+ var C = v, v = function () {
+ return !b.a.X(F) || C()
+ }
+ }
+ return h
+ };
+ b.Ab = function (a) {
+ return b.la(a, b.j)
+ };
+ v = b.m.Jb;
+ b.j[v] = b.m;
+ b.j.fn = {};
+ b.j.fn[v] = b.j;
+ b.b("dependentObservable", b.j);
+ b.b("computed", b.j);
+ b.b("isComputed", b.Ab);
+ b.fb = function (a) {
+ 0 == arguments.length && i(Error("When calling ko.toJS, pass the object you want to convert."));
+ return aa(a, function (a) {
+ for (var c = 0; b.$(a) && 10 > c; c++) a = a();
+ return a
+ })
+ };
+ b.toJSON = function (a, d, c) {
+ a = b.fb(a);
+ return b.a.wa(a, d, c)
+ };
+ b.b("toJS", b.fb);
+ b.b("toJSON", b.toJSON);
+ b.k = {
+ q: function (a) {
+ switch (b.a.u(a)) {
+ case "option":
+ return a.__ko__hasDomDataOptionValue__ ===
+ l ? b.a.f.get(a, b.c.options.ra) : 7 >= b.a.Z ? a.getAttributeNode("value").specified ? a.value : a.text : a.value;
+ case "select":
+ return 0 <= a.selectedIndex ? b.k.q(a.options[a.selectedIndex]) : H;
+ default:
+ return a.value
+ }
+ }, T: function (a, d) {
+ switch (b.a.u(a)) {
+ case "option":
+ switch (typeof d) {
+ case "string":
+ b.a.f.set(a, b.c.options.ra, H);
+ "__ko__hasDomDataOptionValue__" in a && delete a.__ko__hasDomDataOptionValue__;
+ a.value = d;
+ break;
+ default:
+ b.a.f.set(a, b.c.options.ra, d), a.__ko__hasDomDataOptionValue__ = l, a.value = "number" === typeof d ?
+ d : ""
+ }
+ break;
+ case "select":
+ for (var c = a.options.length - 1; 0 <= c; c--) if (b.k.q(a.options[c]) == d) {
+ a.selectedIndex = c;
+ break
+ }
+ break;
+ default:
+ if (d === n || d === H) d = "";
+ a.value = d
+ }
+ }
+ };
+ b.b("selectExtensions", b.k);
+ b.b("selectExtensions.readValue", b.k.q);
+ b.b("selectExtensions.writeValue", b.k.T);
+ var ja = /\@ko_token_(\d+)\@/g, ma = ["true", "false"],
+ na = /^(?:[$_a-z][$\w]*|(.+)(\.\s*[$_a-z][$\w]*|\[.+\]))$/i;
+ b.g = {
+ Q: [], aa: function (a) {
+ var d = b.a.D(a);
+ if (3 > d.length) return [];
+ "{" === d.charAt(0) && (d = d.substring(1, d.length - 1));
+ for (var a = [],
+ c = n, e, f = 0; f < d.length; f++) {
+ var g = d.charAt(f);
+ if (c === n) switch (g) {
+ case '"':
+ case "'":
+ case "/":
+ c = f, e = g
+ } else if (g == e && "\\" !== d.charAt(f - 1)) {
+ g = d.substring(c, f + 1);
+ a.push(g);
+ var h = "@ko_token_" + (a.length - 1) + "@", d = d.substring(0, c) + h + d.substring(f + 1),
+ f = f - (g.length - h.length), c = n
+ }
+ }
+ e = c = n;
+ for (var j = 0, k = n, f = 0; f < d.length; f++) {
+ g = d.charAt(f);
+ if (c === n) switch (g) {
+ case "{":
+ c = f;
+ k = g;
+ e = "}";
+ break;
+ case "(":
+ c = f;
+ k = g;
+ e = ")";
+ break;
+ case "[":
+ c = f, k = g, e = "]"
+ }
+ g === k ? j++ : g === e && (j--, 0 === j && (g = d.substring(c, f + 1), a.push(g), h = "@ko_token_" + (a.length -
+ 1) + "@", d = d.substring(0, c) + h + d.substring(f + 1), f -= g.length - h.length, c = n))
+ }
+ e = [];
+ d = d.split(",");
+ c = 0;
+ for (f = d.length; c < f; c++) j = d[c], k = j.indexOf(":"), 0 < k && k < j.length - 1 ? (g = j.substring(k + 1), e.push({
+ key: O(j.substring(0, k), a),
+ value: O(g, a)
+ })) : e.push({unknown: O(j, a)});
+ return e
+ }, ba: function (a) {
+ for (var d = "string" === typeof a ? b.g.aa(a) : a, c = [], a = [], e, f = 0; e = d[f]; f++) if (0 < c.length && c.push(","), e.key) {
+ var g;
+ a:{
+ g = e.key;
+ var h = b.a.D(g);
+ switch (h.length && h.charAt(0)) {
+ case "'":
+ case '"':
+ break a;
+ default:
+ g = "'" + h + "'"
+ }
+ }
+ e = e.value;
+ c.push(g);
+ c.push(":");
+ c.push(e);
+ e = b.a.D(e);
+ 0 <= b.a.i(ma, b.a.D(e).toLowerCase()) ? e = q : (h = e.match(na), e = h === n ? q : h[1] ? "Object(" + h[1] + ")" + h[2] : e);
+ e && (0 < a.length && a.push(", "), a.push(g + " : function(__ko_value) { " + e + " = __ko_value; }"))
+ } else e.unknown && c.push(e.unknown);
+ d = c.join("");
+ 0 < a.length && (d = d + ", '_ko_property_writers' : { " + a.join("") + " } ");
+ return d
+ }, Db: function (a, d) {
+ for (var c = 0; c < a.length; c++) if (b.a.D(a[c].key) == d) return l;
+ return q
+ }, ea: function (a, d, c, e, f) {
+ if (!a || !b.Qa(a)) {
+ if ((a = d()._ko_property_writers) &&
+ a[c]) a[c](e)
+ } else (!f || a.t() !== e) && a(e)
+ }
+ };
+ b.b("expressionRewriting", b.g);
+ b.b("expressionRewriting.bindingRewriteValidators", b.g.Q);
+ b.b("expressionRewriting.parseObjectLiteral", b.g.aa);
+ b.b("expressionRewriting.preProcessBindings", b.g.ba);
+ b.b("jsonExpressionRewriting", b.g);
+ b.b("jsonExpressionRewriting.insertPropertyAccessorsIntoJson", b.g.ba);
+ var J = "<\!--test--\>" === x.createComment("test").text,
+ ia = J ? /^<\!--\s*ko(?:\s+(.+\s*\:[\s\S]*))?\s*--\>$/ : /^\s*ko(?:\s+(.+\s*\:[\s\S]*))?\s*$/,
+ ha = J ? /^<\!--\s*\/ko\s*--\>$/ :
+ /^\s*\/ko\s*$/, oa = {ul: l, ol: l};
+ b.e = {
+ I: {}, childNodes: function (a) {
+ return A(a) ? $(a) : a.childNodes
+ }, Y: function (a) {
+ if (A(a)) for (var a = b.e.childNodes(a), d = 0, c = a.length; d < c; d++) b.removeNode(a[d]); else b.a.ka(a)
+ }, N: function (a, d) {
+ if (A(a)) {
+ b.e.Y(a);
+ for (var c = a.nextSibling, e = 0, f = d.length; e < f; e++) c.parentNode.insertBefore(d[e], c)
+ } else b.a.N(a, d)
+ }, Ua: function (a, b) {
+ A(a) ? a.parentNode.insertBefore(b, a.nextSibling) : a.firstChild ? a.insertBefore(b, a.firstChild) : a.appendChild(b)
+ }, Oa: function (a, d, c) {
+ c ? A(a) ? a.parentNode.insertBefore(d,
+ c.nextSibling) : c.nextSibling ? a.insertBefore(d, c.nextSibling) : a.appendChild(d) : b.e.Ua(a, d)
+ }, firstChild: function (a) {
+ return !A(a) ? a.firstChild : !a.nextSibling || G(a.nextSibling) ? n : a.nextSibling
+ }, nextSibling: function (a) {
+ A(a) && (a = Z(a));
+ return a.nextSibling && G(a.nextSibling) ? n : a.nextSibling
+ }, ib: function (a) {
+ return (a = A(a)) ? a[1] : n
+ }, Sa: function (a) {
+ if (oa[b.a.u(a)]) {
+ var d = a.firstChild;
+ if (d) {
+ do if (1 === d.nodeType) {
+ var c;
+ c = d.firstChild;
+ var e = n;
+ if (c) {
+ do if (e) e.push(c); else if (A(c)) {
+ var f = Z(c, l);
+ f ? c = f : e = [c]
+ } else G(c) &&
+ (e = [c]); while (c = c.nextSibling)
+ }
+ if (c = e) {
+ e = d.nextSibling;
+ for (f = 0; f < c.length; f++) e ? a.insertBefore(c[f], e) : a.appendChild(c[f])
+ }
+ } while (d = d.nextSibling)
+ }
+ }
+ }
+ };
+ b.b("virtualElements", b.e);
+ b.b("virtualElements.allowedBindings", b.e.I);
+ b.b("virtualElements.emptyNode", b.e.Y);
+ b.b("virtualElements.insertAfter", b.e.Oa);
+ b.b("virtualElements.prepend", b.e.Ua);
+ b.b("virtualElements.setDomNodeChildren", b.e.N);
+ b.J = function () {
+ this.Ga = {}
+ };
+ b.a.extend(b.J.prototype, {
+ nodeHasBindings: function (a) {
+ switch (a.nodeType) {
+ case 1:
+ return a.getAttribute("data-bind") !=
+ n;
+ case 8:
+ return b.e.ib(a) != n;
+ default:
+ return q
+ }
+ }, getBindings: function (a, b) {
+ var c = this.getBindingsString(a, b);
+ return c ? this.parseBindingsString(c, b, a) : n
+ }, getBindingsString: function (a) {
+ switch (a.nodeType) {
+ case 1:
+ return a.getAttribute("data-bind");
+ case 8:
+ return b.e.ib(a);
+ default:
+ return n
+ }
+ }, parseBindingsString: function (a, d, c) {
+ try {
+ var e;
+ if (!(e = this.Ga[a])) {
+ var f = this.Ga, g = "with($context){with($data||{}){return{" + b.g.ba(a) + "}}}";
+ e = f[a] = new Function("$context", "$element", g)
+ }
+ return e(d, c)
+ } catch (h) {
+ i(Error("Unable to parse bindings.\nMessage: " +
+ h + ";\nBindings value: " + a))
+ }
+ }
+ });
+ b.J.instance = new b.J;
+ b.b("bindingProvider", b.J);
+ b.c = {};
+ b.z = function (a, d, c) {
+ d ? (b.a.extend(this, d), this.$parentContext = d, this.$parent = d.$data, this.$parents = (d.$parents || []).slice(0), this.$parents.unshift(this.$parent)) : (this.$parents = [], this.$root = a, this.ko = b);
+ this.$data = a;
+ c && (this[c] = a)
+ };
+ b.z.prototype.createChildContext = function (a, d) {
+ return new b.z(a, this, d)
+ };
+ b.z.prototype.extend = function (a) {
+ var d = b.a.extend(new b.z, this);
+ return b.a.extend(d, a)
+ };
+ b.cb = function (a, d) {
+ if (2 ==
+ arguments.length) b.a.f.set(a, "__ko_bindingContext__", d); else return b.a.f.get(a, "__ko_bindingContext__")
+ };
+ b.Ea = function (a, d, c) {
+ 1 === a.nodeType && b.e.Sa(a);
+ return W(a, d, c, l)
+ };
+ b.Da = function (a, b) {
+ (1 === b.nodeType || 8 === b.nodeType) && Y(a, b, l)
+ };
+ b.Ca = function (a, b) {
+ b && (1 !== b.nodeType && 8 !== b.nodeType) && i(Error("ko.applyBindings: first parameter should be your view model; second parameter should be a DOM node"));
+ b = b || w.document.body;
+ X(a, b, l)
+ };
+ b.ja = function (a) {
+ switch (a.nodeType) {
+ case 1:
+ case 8:
+ var d = b.cb(a);
+ if (d) return d;
+ if (a.parentNode) return b.ja(a.parentNode)
+ }
+ return H
+ };
+ b.ob = function (a) {
+ return (a = b.ja(a)) ? a.$data : H
+ };
+ b.b("bindingHandlers", b.c);
+ b.b("applyBindings", b.Ca);
+ b.b("applyBindingsToDescendants", b.Da);
+ b.b("applyBindingsToNode", b.Ea);
+ b.b("contextFor", b.ja);
+ b.b("dataFor", b.ob);
+ var ea = {"class": "className", "for": "htmlFor"};
+ b.c.attr = {
+ update: function (a, d) {
+ var c = b.a.d(d()) || {}, e;
+ for (e in c) if ("string" == typeof e) {
+ var f = b.a.d(c[e]), g = f === q || f === n || f === H;
+ g && a.removeAttribute(e);
+ 8 >= b.a.Z && e in ea ? (e = ea[e], g ? a.removeAttribute(e) :
+ a[e] = f) : g || a.setAttribute(e, f.toString());
+ "name" === e && b.a.$a(a, g ? "" : f.toString())
+ }
+ }
+ };
+ b.c.checked = {
+ init: function (a, d, c) {
+ b.a.n(a, "click", function () {
+ var e;
+ if ("checkbox" == a.type) e = a.checked; else if ("radio" == a.type && a.checked) e = a.value; else return;
+ var f = d(), g = b.a.d(f);
+ "checkbox" == a.type && g instanceof Array ? (e = b.a.i(g, a.value), a.checked && 0 > e ? f.push(a.value) : !a.checked && 0 <= e && f.splice(e, 1)) : b.g.ea(f, c, "checked", e, l)
+ });
+ "radio" == a.type && !a.name && b.c.uniqueName.init(a, t(l))
+ }, update: function (a, d) {
+ var c = b.a.d(d());
+ "checkbox" == a.type ? a.checked = c instanceof Array ? 0 <= b.a.i(c, a.value) : c : "radio" == a.type && (a.checked = a.value == c)
+ }
+ };
+ b.c.css = {
+ update: function (a, d) {
+ var c = b.a.d(d());
+ if ("object" == typeof c) for (var e in c) {
+ var f = b.a.d(c[e]);
+ b.a.da(a, e, f)
+ } else c = String(c || ""), b.a.da(a, a.__ko__cssValue, q), a.__ko__cssValue = c, b.a.da(a, c, l)
+ }
+ };
+ b.c.enable = {
+ update: function (a, d) {
+ var c = b.a.d(d());
+ c && a.disabled ? a.removeAttribute("disabled") : !c && !a.disabled && (a.disabled = l)
+ }
+ };
+ b.c.disable = {
+ update: function (a, d) {
+ b.c.enable.update(a, function () {
+ return !b.a.d(d())
+ })
+ }
+ };
+ b.c.event = {
+ init: function (a, d, c, e) {
+ var f = d() || {}, g;
+ for (g in f) (function () {
+ var f = g;
+ "string" == typeof f && b.a.n(a, f, function (a) {
+ var g, m = d()[f];
+ if (m) {
+ var p = c();
+ try {
+ var r = b.a.L(arguments);
+ r.unshift(e);
+ g = m.apply(e, r)
+ } finally {
+ g !== l && (a.preventDefault ? a.preventDefault() : a.returnValue = q)
+ }
+ p[f + "Bubble"] === q && (a.cancelBubble = l, a.stopPropagation && a.stopPropagation())
+ }
+ })
+ })()
+ }
+ };
+ b.c.foreach = {
+ Ra: function (a) {
+ return function () {
+ var d = a(), c = b.a.ta(d);
+ if (!c || "number" == typeof c.length) return {foreach: d, templateEngine: b.C.na};
+ b.a.d(d);
+ return {
+ foreach: c.data,
+ as: c.as,
+ includeDestroyed: c.includeDestroyed,
+ afterAdd: c.afterAdd,
+ beforeRemove: c.beforeRemove,
+ afterRender: c.afterRender,
+ beforeMove: c.beforeMove,
+ afterMove: c.afterMove,
+ templateEngine: b.C.na
+ }
+ }
+ }, init: function (a, d) {
+ return b.c.template.init(a, b.c.foreach.Ra(d))
+ }, update: function (a, d, c, e, f) {
+ return b.c.template.update(a, b.c.foreach.Ra(d), c, e, f)
+ }
+ };
+ b.g.Q.foreach = q;
+ b.e.I.foreach = l;
+ b.c.hasfocus = {
+ init: function (a, d, c) {
+ function e(e) {
+ a.__ko_hasfocusUpdating = l;
+ var f = a.ownerDocument;
+ "activeElement" in
+ f && (e = f.activeElement === a);
+ f = d();
+ b.g.ea(f, c, "hasfocus", e, l);
+ a.__ko_hasfocusUpdating = q
+ }
+
+ var f = e.bind(n, l), g = e.bind(n, q);
+ b.a.n(a, "focus", f);
+ b.a.n(a, "focusin", f);
+ b.a.n(a, "blur", g);
+ b.a.n(a, "focusout", g)
+ }, update: function (a, d) {
+ var c = b.a.d(d());
+ a.__ko_hasfocusUpdating || (c ? a.focus() : a.blur(), b.r.K(b.a.Aa, n, [a, c ? "focusin" : "focusout"]))
+ }
+ };
+ b.c.html = {
+ init: function () {
+ return {controlsDescendantBindings: l}
+ }, update: function (a, d) {
+ b.a.ca(a, d())
+ }
+ };
+ var ca = "__ko_withIfBindingData";
+ P("if");
+ P("ifnot", q, l);
+ P("with", l, q, function (a,
+ b) {
+ return a.createChildContext(b)
+ });
+ b.c.options = {
+ update: function (a, d, c) {
+ "select" !== b.a.u(a) && i(Error("options binding applies only to SELECT elements"));
+ for (var e = 0 == a.length, f = b.a.V(b.a.fa(a.childNodes, function (a) {
+ return a.tagName && "option" === b.a.u(a) && a.selected
+ }), function (a) {
+ return b.k.q(a) || a.innerText || a.textContent
+ }), g = a.scrollTop, h = b.a.d(d()); 0 < a.length;) b.A(a.options[0]), a.remove(0);
+ if (h) {
+ var c = c(), j = c.optionsIncludeDestroyed;
+ "number" != typeof h.length && (h = [h]);
+ if (c.optionsCaption) {
+ var k = x.createElement("option");
+ b.a.ca(k, c.optionsCaption);
+ b.k.T(k, H);
+ a.appendChild(k)
+ }
+ for (var d = 0, m = h.length; d < m; d++) {
+ var p = h[d];
+ if (!p || !p._destroy || j) {
+ var k = x.createElement("option"), r = function (a, b, c) {
+ var d = typeof b;
+ return "function" == d ? b(a) : "string" == d ? a[b] : c
+ }, u = r(p, c.optionsValue, p);
+ b.k.T(k, b.a.d(u));
+ p = r(p, c.optionsText, u);
+ b.a.bb(k, p);
+ a.appendChild(k)
+ }
+ }
+ h = a.getElementsByTagName("option");
+ d = j = 0;
+ for (m = h.length; d < m; d++) 0 <= b.a.i(f, b.k.q(h[d])) && (b.a.ab(h[d], l), j++);
+ a.scrollTop = g;
+ e && "value" in c && da(a, b.a.ta(c.value), l);
+ b.a.tb(a)
+ }
+ }
+ };
+ b.c.options.ra = "__ko.optionValueDomData__";
+ b.c.selectedOptions = {
+ init: function (a, d, c) {
+ b.a.n(a, "change", function () {
+ var e = d(), f = [];
+ b.a.o(a.getElementsByTagName("option"), function (a) {
+ a.selected && f.push(b.k.q(a))
+ });
+ b.g.ea(e, c, "value", f)
+ })
+ }, update: function (a, d) {
+ "select" != b.a.u(a) && i(Error("values binding applies only to SELECT elements"));
+ var c = b.a.d(d());
+ c && "number" == typeof c.length && b.a.o(a.getElementsByTagName("option"), function (a) {
+ var d = 0 <= b.a.i(c, b.k.q(a));
+ b.a.ab(a, d)
+ })
+ }
+ };
+ b.c.style = {
+ update: function (a,
+ d) {
+ var c = b.a.d(d() || {}), e;
+ for (e in c) if ("string" == typeof e) {
+ var f = b.a.d(c[e]);
+ a.style[e] = f || ""
+ }
+ }
+ };
+ b.c.submit = {
+ init: function (a, d, c, e) {
+ "function" != typeof d() && i(Error("The value for a submit binding must be a function"));
+ b.a.n(a, "submit", function (b) {
+ var c, h = d();
+ try {
+ c = h.call(e, a)
+ } finally {
+ c !== l && (b.preventDefault ? b.preventDefault() : b.returnValue = q)
+ }
+ })
+ }
+ };
+ b.c.text = {
+ update: function (a, d) {
+ b.a.bb(a, d())
+ }
+ };
+ b.e.I.text = l;
+ b.c.uniqueName = {
+ init: function (a, d) {
+ if (d()) {
+ var c = "ko_unique_" + ++b.c.uniqueName.nb;
+ b.a.$a(a,
+ c)
+ }
+ }
+ };
+ b.c.uniqueName.nb = 0;
+ b.c.value = {
+ init: function (a, d, c) {
+ function e() {
+ h = q;
+ var e = d(), f = b.k.q(a);
+ b.g.ea(e, c, "value", f)
+ }
+
+ var f = ["change"], g = c().valueUpdate, h = q;
+ g && ("string" == typeof g && (g = [g]), b.a.P(f, g), f = b.a.Fa(f));
+ if (b.a.Z && ("input" == a.tagName.toLowerCase() && "text" == a.type && "off" != a.autocomplete && (!a.form || "off" != a.form.autocomplete)) && -1 == b.a.i(f, "propertychange")) b.a.n(a, "propertychange", function () {
+ h = l
+ }), b.a.n(a, "blur", function () {
+ h && e()
+ });
+ b.a.o(f, function (c) {
+ var d = e;
+ b.a.Nb(c, "after") && (d = function () {
+ setTimeout(e,
+ 0)
+ }, c = c.substring(5));
+ b.a.n(a, c, d)
+ })
+ }, update: function (a, d) {
+ var c = "select" === b.a.u(a), e = b.a.d(d()), f = b.k.q(a), g = e != f;
+ 0 === e && (0 !== f && "0" !== f) && (g = l);
+ g && (f = function () {
+ b.k.T(a, e)
+ }, f(), c && setTimeout(f, 0));
+ c && 0 < a.length && da(a, e, q)
+ }
+ };
+ b.c.visible = {
+ update: function (a, d) {
+ var c = b.a.d(d()), e = "none" != a.style.display;
+ c && !e ? a.style.display = "" : !c && e && (a.style.display = "none")
+ }
+ };
+ b.c.click = {
+ init: function (a, d, c, e) {
+ return b.c.event.init.call(this, a, function () {
+ var a = {};
+ a.click = d();
+ return a
+ }, c, e)
+ }
+ };
+ b.v = function () {
+ };
+ b.v.prototype.renderTemplateSource =
+ function () {
+ i(Error("Override renderTemplateSource"))
+ };
+ b.v.prototype.createJavaScriptEvaluatorBlock = function () {
+ i(Error("Override createJavaScriptEvaluatorBlock"))
+ };
+ b.v.prototype.makeTemplateSource = function (a, d) {
+ if ("string" == typeof a) {
+ var d = d || x, c = d.getElementById(a);
+ c || i(Error("Cannot find template with ID " + a));
+ return new b.l.h(c)
+ }
+ if (1 == a.nodeType || 8 == a.nodeType) return new b.l.O(a);
+ i(Error("Unknown template type: " + a))
+ };
+ b.v.prototype.renderTemplate = function (a, b, c, e) {
+ a = this.makeTemplateSource(a, e);
+ return this.renderTemplateSource(a, b, c)
+ };
+ b.v.prototype.isTemplateRewritten = function (a, b) {
+ return this.allowTemplateRewriting === q ? l : this.makeTemplateSource(a, b).data("isRewritten")
+ };
+ b.v.prototype.rewriteTemplate = function (a, b, c) {
+ a = this.makeTemplateSource(a, c);
+ b = b(a.text());
+ a.text(b);
+ a.data("isRewritten", l)
+ };
+ b.b("templateEngine", b.v);
+ var pa = /(<[a-z]+\d*(\s+(?!data-bind=)[a-z0-9\-]+(=(\"[^\"]*\"|\'[^\']*\'))?)*\s+)data-bind=(["'])([\s\S]*?)\5/gi,
+ qa = /<\!--\s*ko\b\s*([\s\S]*?)\s*--\>/g;
+ b.ya = {
+ ub: function (a,
+ d, c) {
+ d.isTemplateRewritten(a, c) || d.rewriteTemplate(a, function (a) {
+ return b.ya.Fb(a, d)
+ }, c)
+ }, Fb: function (a, b) {
+ return a.replace(pa, function (a, e, f, g, h, j, k) {
+ return V(k, e, b)
+ }).replace(qa, function (a, e) {
+ return V(e, "<\!-- ko --\>", b)
+ })
+ }, jb: function (a) {
+ return b.s.qa(function (d, c) {
+ d.nextSibling && b.Ea(d.nextSibling, a, c)
+ })
+ }
+ };
+ b.b("__tr_ambtns", b.ya.jb);
+ b.l = {};
+ b.l.h = function (a) {
+ this.h = a
+ };
+ b.l.h.prototype.text = function () {
+ var a = b.a.u(this.h), a = "script" === a ? "text" : "textarea" === a ? "value" : "innerHTML";
+ if (0 == arguments.length) return this.h[a];
+ var d = arguments[0];
+ "innerHTML" === a ? b.a.ca(this.h, d) : this.h[a] = d
+ };
+ b.l.h.prototype.data = function (a) {
+ if (1 === arguments.length) return b.a.f.get(this.h, "templateSourceData_" + a);
+ b.a.f.set(this.h, "templateSourceData_" + a, arguments[1])
+ };
+ b.l.O = function (a) {
+ this.h = a
+ };
+ b.l.O.prototype = new b.l.h;
+ b.l.O.prototype.text = function () {
+ if (0 == arguments.length) {
+ var a = b.a.f.get(this.h, "__ko_anon_template__") || {};
+ a.za === H && a.ia && (a.za = a.ia.innerHTML);
+ return a.za
+ }
+ b.a.f.set(this.h, "__ko_anon_template__", {za: arguments[0]})
+ };
+ b.l.h.prototype.nodes =
+ function () {
+ if (0 == arguments.length) return (b.a.f.get(this.h, "__ko_anon_template__") || {}).ia;
+ b.a.f.set(this.h, "__ko_anon_template__", {ia: arguments[0]})
+ };
+ b.b("templateSources", b.l);
+ b.b("templateSources.domElement", b.l.h);
+ b.b("templateSources.anonymousTemplate", b.l.O);
+ var N;
+ b.va = function (a) {
+ a != H && !(a instanceof b.v) && i(Error("templateEngine must inherit from ko.templateEngine"));
+ N = a
+ };
+ b.ua = function (a, d, c, e, f) {
+ c = c || {};
+ (c.templateEngine || N) == H && i(Error("Set a template engine before calling renderTemplate"));
+ f = f || "replaceChildren";
+ if (e) {
+ var g = M(e);
+ return b.j(function () {
+ var h = d && d instanceof b.z ? d : new b.z(b.a.d(d)),
+ j = "function" == typeof a ? a(h.$data, h) : a, h = S(e, f, j, h, c);
+ "replaceNode" == f && (e = h, g = M(e))
+ }, n, {
+ Ja: function () {
+ return !g || !b.a.X(g)
+ }, W: g && "replaceNode" == f ? g.parentNode : g
+ })
+ }
+ return b.s.qa(function (e) {
+ b.ua(a, d, c, e, "replaceNode")
+ })
+ };
+ b.Lb = function (a, d, c, e, f) {
+ function g(a, b) {
+ T(b, j);
+ c.afterRender && c.afterRender(b, a)
+ }
+
+ function h(d, e) {
+ j = f.createChildContext(b.a.d(d), c.as);
+ j.$index = e;
+ var g = "function" == typeof a ?
+ a(d, j) : a;
+ return S(n, "ignoreTargetNode", g, j, c)
+ }
+
+ var j;
+ return b.j(function () {
+ var a = b.a.d(d) || [];
+ "undefined" == typeof a.length && (a = [a]);
+ a = b.a.fa(a, function (a) {
+ return c.includeDestroyed || a === H || a === n || !b.a.d(a._destroy)
+ });
+ b.r.K(b.a.Za, n, [e, a, h, c, g])
+ }, n, {W: e})
+ };
+ b.c.template = {
+ init: function (a, d) {
+ var c = b.a.d(d());
+ if ("string" != typeof c && !c.name && (1 == a.nodeType || 8 == a.nodeType)) c = 1 == a.nodeType ? a.childNodes : b.e.childNodes(a), c = b.a.Gb(c), (new b.l.O(a)).nodes(c);
+ return {controlsDescendantBindings: l}
+ }, update: function (a,
+ d, c, e, f) {
+ var d = b.a.d(d()), c = {}, e = l, g, h = n;
+ "string" != typeof d && (c = d, d = c.name, "if" in c && (e = b.a.d(c["if"])), e && "ifnot" in c && (e = !b.a.d(c.ifnot)), g = b.a.d(c.data));
+ "foreach" in c ? h = b.Lb(d || a, e && c.foreach || [], c, a, f) : e ? (f = "data" in c ? f.createChildContext(g, c.as) : f, h = b.ua(d || a, f, c, a)) : b.e.Y(a);
+ f = h;
+ (g = b.a.f.get(a, "__ko__templateComputedDomDataKey__")) && "function" == typeof g.B && g.B();
+ b.a.f.set(a, "__ko__templateComputedDomDataKey__", f && f.oa() ? f : H)
+ }
+ };
+ b.g.Q.template = function (a) {
+ a = b.g.aa(a);
+ return 1 == a.length && a[0].unknown ||
+ b.g.Db(a, "name") ? n : "This template engine does not support anonymous templates nested within its templates"
+ };
+ b.e.I.template = l;
+ b.b("setTemplateEngine", b.va);
+ b.b("renderTemplate", b.ua);
+ b.a.Ia = function (a, b, c) {
+ a = a || [];
+ b = b || [];
+ return a.length <= b.length ? R(a, b, "added", "deleted", c) : R(b, a, "deleted", "added", c)
+ };
+ b.b("utils.compareArrays", b.a.Ia);
+ b.a.Za = function (a, d, c, e, f) {
+ function g(a, b) {
+ s = k[b];
+ v !== b && (y[a] = s);
+ s.ma(v++);
+ L(s.M);
+ r.push(s);
+ z.push(s)
+ }
+
+ function h(a, c) {
+ if (a) for (var d = 0, e = c.length; d < e; d++) c[d] && b.a.o(c[d].M,
+ function (b) {
+ a(b, d, c[d].U)
+ })
+ }
+
+ for (var d = d || [], e = e || {}, j = b.a.f.get(a, "setDomNodeChildrenFromArrayMapping_lastMappingResult") === H, k = b.a.f.get(a, "setDomNodeChildrenFromArrayMapping_lastMappingResult") || [], m = b.a.V(k, function (a) {
+ return a.U
+ }), p = b.a.Ia(m, d), r = [], u = 0, v = 0, A = [], z = [], d = [], y = [], m = [], s, C = 0, B, D; B = p[C]; C++) switch (D = B.moved, B.status) {
+ case "deleted":
+ D === H && (s = k[u], s.j && s.j.B(), A.push.apply(A, L(s.M)), e.beforeRemove && (d[C] = s, z.push(s)));
+ u++;
+ break;
+ case "retained":
+ g(C, u++);
+ break;
+ case "added":
+ D !== H ? g(C,
+ D) : (s = {U: B.value, ma: b.m(v++)}, r.push(s), z.push(s), j || (m[C] = s))
+ }
+ h(e.beforeMove, y);
+ b.a.o(A, e.beforeRemove ? b.A : b.removeNode);
+ for (var C = 0, j = b.e.firstChild(a), G; s = z[C]; C++) {
+ s.M || b.a.extend(s, ga(a, c, s.U, f, s.ma));
+ for (u = 0; p = s.M[u]; j = p.nextSibling, G = p, u++) p !== j && b.e.Oa(a, p, G);
+ !s.zb && f && (f(s.U, s.M, s.ma), s.zb = l)
+ }
+ h(e.beforeRemove, d);
+ h(e.afterMove, y);
+ h(e.afterAdd, m);
+ b.a.f.set(a, "setDomNodeChildrenFromArrayMapping_lastMappingResult", r)
+ };
+ b.b("utils.setDomNodeChildrenFromArrayMapping", b.a.Za);
+ b.C = function () {
+ this.allowTemplateRewriting =
+ q
+ };
+ b.C.prototype = new b.v;
+ b.C.prototype.renderTemplateSource = function (a) {
+ var d = !(9 > b.a.Z) && a.nodes ? a.nodes() : n;
+ if (d) return b.a.L(d.cloneNode(l).childNodes);
+ a = a.text();
+ return b.a.sa(a)
+ };
+ b.C.na = new b.C;
+ b.va(b.C.na);
+ b.b("nativeTemplateEngine", b.C);
+ b.pa = function () {
+ var a = this.Cb = function () {
+ if ("undefined" == typeof E || !E.tmpl) return 0;
+ try {
+ if (0 <= E.tmpl.tag.tmpl.open.toString().indexOf("__")) return 2
+ } catch (a) {
+ }
+ return 1
+ }();
+ this.renderTemplateSource = function (b, c, e) {
+ e = e || {};
+ 2 > a && i(Error("Your version of jQuery.tmpl is too old. Please upgrade to jQuery.tmpl 1.0.0pre or later."));
+ var f = b.data("precompiled");
+ f || (f = b.text() || "", f = E.template(n, "{{ko_with $item.koBindingContext}}" + f + "{{/ko_with}}"), b.data("precompiled", f));
+ b = [c.$data];
+ c = E.extend({koBindingContext: c}, e.templateOptions);
+ c = E.tmpl(f, b, c);
+ c.appendTo(x.createElement("div"));
+ E.fragments = {};
+ return c
+ };
+ this.createJavaScriptEvaluatorBlock = function (a) {
+ return "{{ko_code ((function() { return " + a + " })()) }}"
+ };
+ this.addTemplate = function (a, b) {
+ x.write("
+ ```
+
+- `tabReplace` and `useBR` that were used in different places are also unified
+ into the global options object and are to be set using `configure(options)`.
+ This function is documented in our [API docs][]. Also note that these
+ parameters are gone from `highlightBlock` and `fixMarkup` which are now also
+ rely on `configure`.
+
+- We removed public-facing (though undocumented) object `hljs.LANGUAGES` which
+ was used to register languages with the library in favor of two new methods:
+ `registerLanguage` and `getLanguage`. Both are documented in our [API docs][].
+
+- Result returned from `highlight` and `highlightAuto` no longer contains two
+ separate attributes contributing to relevance score, `relevance` and
+ `keyword_count`. They are now unified in `relevance`.
+
+Another technically compatible change that nonetheless might need attention:
+
+- The structure of the NPM package was refactored, so if you had installed it
+ locally, you'll have to update your paths. The usual `require('highlight.js')`
+ works as before. This is contributed by [Dmitry Smolin][].
+
+New features:
+
+- Languages now can be recognized by multiple names like "js" for JavaScript or
+ "html" for, well, HTML (which earlier insisted on calling it "xml"). These
+ aliases can be specified in the class attribute of the code container in your
+ HTML as well as in various API calls. For now there are only a few very common
+ aliases but we'll expand it in the future. All of them are listed in the
+ [class reference][].
+
+- Language detection can now be restricted to a subset of languages relevant in
+ a given context — a web page or even a single highlighting call. This is
+ especially useful for node.js build that includes all the known languages.
+ Another example is a StackOverflow-style site where users specify languages
+ as tags rather than in the markdown-formatted code snippets. This is
+ documented in the [API reference][] (see methods `highlightAuto` and
+ `configure`).
+
+- Language definition syntax streamlined with [variants][] and
+ [beginKeywords][].
+
+New languages and styles:
+
+- *Oxygene* by [Carlo Kok][]
+- *Mathematica* by [Daniel Kvasnička][]
+- *Autohotkey* by [Seongwon Lee][]
+- *Atelier* family of styles in 10 variants by [Bram de Haan][]
+- *Paraíso* styles by [Jan T. Sott][]
+
+Miscelleanous improvements:
+
+- Highlighting `=>` prompts in Clojure.
+- [Jeremy Hull][] fixed a lot of styles for consistency.
+- Finally, highlighting PHP and HTML [mixed in peculiar ways][php-html].
+- Objective C and C# now properly highlight titles in method definition.
+- Big overhaul of relevance counting for a number of languages. Please do report
+ bugs about mis-detection of non-trivial code snippets!
+
+[cr]: http://highlightjs.readthedocs.org/en/latest/css-classes-reference.html
+[api docs]: http://highlightjs.readthedocs.org/en/latest/api.html
+[variants]: https://groups.google.com/d/topic/highlightjs/VoGC9-1p5vk/discussion
+[beginKeywords]: https://github.com/isagalaev/highlight.js/commit/6c7fdea002eb3949577a85b3f7930137c7c3038d
+[php-html]: https://twitter.com/highlightjs/status/408890903017689088
+
+[Carlo Kok]: https://github.com/carlokok
+[Bram de Haan]: https://github.com/atelierbram
+[Daniel Kvasnička]: https://github.com/dkvasnicka
+[Dmitry Smolin]: https://github.com/dimsmol
+[Jeremy Hull]: https://github.com/sourrust
+[Seongwon Lee]: https://github.com/dlimpid
+[Jan T. Sott]: https://github.com/idleberg
+
+
+## Version 7.5
+
+A catch-up release dealing with some of the accumulated contributions. This one
+is probably will be the last before the 8.0 which will be slightly backwards
+incompatible regarding some advanced use-cases.
+
+One outstanding change in this version is the addition of 6 languages to the
+[hosted script][d]: Markdown, ObjectiveC, CoffeeScript, Apache, Nginx and
+Makefile. It now weighs about 6K more but we're going to keep it under 30K.
+
+New languages:
+
+- OCaml by [Mehdi Dogguy][mehdid] and [Nicolas Braud-Santoni][nbraud]
+- [LiveCode Server][lcs] by [Ralf Bitter][revig]
+- Scilab by [Sylvestre Ledru][sylvestre]
+- basic support for Makefile by [Ivan Sagalaev][isagalaev]
+
+Improvements:
+
+- Ruby's got support for characters like `?A`, `?1`, `?\012` etc. and `%r{..}`
+ regexps.
+- Clojure now allows a function call in the beginning of s-expressions
+ `(($filter "myCount") (arr 1 2 3 4 5))`.
+- Haskell's got new keywords and now recognizes more things like pragmas,
+ preprocessors, modules, containers, FFIs etc. Thanks to [Zena Treep][treep]
+ for the implementation and to [Jeremy Hull][sourrust] for guiding it.
+- Miscelleanous fixes in PHP, Brainfuck, SCSS, Asciidoc, CMake, Python and F#.
+
+[mehdid]: https://github.com/mehdid
+[nbraud]: https://github.com/nbraud
+[revig]: https://github.com/revig
+[lcs]: http://livecode.com/developers/guides/server/
+[sylvestre]: https://github.com/sylvestre
+[isagalaev]: https://github.com/isagalaev
+[treep]: https://github.com/treep
+[sourrust]: https://github.com/sourrust
+[d]: http://highlightjs.org/download/
+
+
+## New core developers
+
+The latest long period of almost complete inactivity in the project coincided
+with growing interest to it led to a decision that now seems completely obvious:
+we need more core developers.
+
+So without further ado let me welcome to the core team two long-time
+contributors: [Jeremy Hull][] and [Oleg
+Efimov][].
+
+Hope now we'll be able to work through stuff faster!
+
+P.S. The historical commit is [here][1] for the record.
+
+[Jeremy Hull]: https://github.com/sourrust
+[Oleg Efimov]: https://github.com/sannis
+[1]: https://github.com/isagalaev/highlight.js/commit/f3056941bda56d2b72276b97bc0dd5f230f2473f
+
+
+## Version 7.4
+
+This long overdue version is a snapshot of the current source tree with all the
+changes that happened during the past year. Sorry for taking so long!
+
+Along with the changes in code highlight.js has finally got its new home at
+, moving from its craddle on Software Maniacs which it
+outgrew a long time ago. Be sure to report any bugs about the site to
+.
+
+On to what's new…
+
+New languages:
+
+- Handlebars templates by [Robin Ward][]
+- Oracle Rules Language by [Jason Jacobson][]
+- F# by [Joans Follesø][]
+- AsciiDoc and Haml by [Dan Allen][]
+- Lasso by [Eric Knibbe][]
+- SCSS by [Kurt Emch][]
+- VB.NET by [Poren Chiang][]
+- Mizar by [Kelley van Evert][]
+
+[Robin Ward]: https://github.com/eviltrout
+[Jason Jacobson]: https://github.com/jayce7
+[Joans Follesø]: https://github.com/follesoe
+[Dan Allen]: https://github.com/mojavelinux
+[Eric Knibbe]: https://github.com/EricFromCanada
+[Kurt Emch]: https://github.com/kemch
+[Poren Chiang]: https://github.com/rschiang
+[Kelley van Evert]: https://github.com/kelleyvanevert
+
+New style themes:
+
+- Monokai Sublime by [noformnocontent][]
+- Railscasts by [Damien White][]
+- Obsidian by [Alexander Marenin][]
+- Docco by [Simon Madine][]
+- Mono Blue by [Ivan Sagalaev][] (uses a single color hue for everything)
+- Foundation by [Dan Allen][]
+
+[noformnocontent]: http://nn.mit-license.org/
+[Damien White]: https://github.com/visoft
+[Alexander Marenin]: https://github.com/ioncreature
+[Simon Madine]: https://github.com/thingsinjars
+[Ivan Sagalaev]: https://github.com/isagalaev
+
+Other notable changes:
+
+- Corrected many corner cases in CSS.
+- Dropped Python 2 version of the build tool.
+- Implemented building for the AMD format.
+- Updated Rust keywords (thanks to [Dmitry Medvinsky][]).
+- Literal regexes can now be used in language definitions.
+- CoffeeScript highlighting is now significantly more robust and rich due to
+ input from [Cédric Néhémie][].
+
+[Dmitry Medvinsky]: https://github.com/dmedvinsky
+[Cédric Néhémie]: https://github.com/abe33
+
+
+## Version 7.3
+
+- Since this version highlight.js no longer works in IE version 8 and older.
+ It's made it possible to reduce the library size and dramatically improve code
+ readability and made it easier to maintain. Time to go forward!
+
+- New languages: AppleScript (by [Nathan Grigg][ng] and [Dr. Drang][dd]) and
+ Brainfuck (by [Evgeny Stepanischev][bolk]).
+
+- Improvements to existing languages:
+
+ - interpreter prompt in Python (`>>>` and `...`)
+ - @-properties and classes in CoffeeScript
+ - E4X in JavaScript (by [Oleg Efimov][oe])
+ - new keywords in Perl (by [Kirk Kimmel][kk])
+ - big Ruby syntax update (by [Vasily Polovnyov][vast])
+ - small fixes in Bash
+
+- Also Oleg Efimov did a great job of moving all the docs for language and style
+ developers and contributors from the old wiki under the source code in the
+ "docs" directory. Now these docs are nicely presented at
+ .
+
+[ng]: https://github.com/nathan11g
+[dd]: https://github.com/drdrang
+[bolk]: https://github.com/bolknote
+[oe]: https://github.com/Sannis
+[kk]: https://github.com/kimmel
+[vast]: https://github.com/vast
+
+
+## Version 7.2
+
+A regular bug-fix release without any significant new features. Enjoy!
+
+
+## Version 7.1
+
+A Summer crop:
+
+- [Marc Fornos][mf] made the definition for Clojure along with the matching
+ style Rainbow (which, of course, works for other languages too).
+- CoffeeScript support continues to improve getting support for regular
+ expressions.
+- Yoshihide Jimbo ported to highlight.js [five Tomorrow styles][tm] from the
+ [project by Chris Kempson][tm0].
+- Thanks to [Casey Duncun][cd] the library can now be built in the popular
+ [AMD format][amd].
+- And last but not least, we've got a fair number of correctness and consistency
+ fixes, including a pretty significant refactoring of Ruby.
+
+[mf]: https://github.com/mfornos
+[tm]: http://jmblog.github.com/color-themes-for-highlightjs/
+[tm0]: https://github.com/ChrisKempson/Tomorrow-Theme
+[cd]: https://github.com/caseman
+[amd]: http://requirejs.org/docs/whyamd.html
+
+
+## Version 7.0
+
+The reason for the new major version update is a global change of keyword syntax
+which resulted in the library getting smaller once again. For example, the
+hosted build is 2K less than at the previous version while supporting two new
+languages.
+
+Notable changes:
+
+- The library now works not only in a browser but also with [node.js][]. It is
+ installable with `npm install highlight.js`. [API][] docs are available on our
+ wiki.
+
+- The new unique feature (apparently) among syntax highlighters is highlighting
+ *HTTP* headers and an arbitrary language in the request body. The most useful
+ languages here are *XML* and *JSON* both of which highlight.js does support.
+ Here's [the detailed post][p] about the feature.
+
+- Two new style themes: a dark "south" *[Pojoaque][]* by Jason Tate and an
+ emulation of*XCode* IDE by [Angel Olloqui][ao].
+
+- Three new languages: *D* by [Aleksandar Ružičić][ar], *R* by [Joe Cheng][jc]
+ and *GLSL* by [Sergey Tikhomirov][st].
+
+- *Nginx* syntax has become a million times smaller and more universal thanks to
+ remaking it in a more generic manner that doesn't require listing all the
+ directives in the known universe.
+
+- Function titles are now highlighted in *PHP*.
+
+- *Haskell* and *VHDL* were significantly reworked to be more rich and correct
+ by their respective maintainers [Jeremy Hull][sr] and [Igor Kalnitsky][ik].
+
+And last but not least, many bugs have been fixed around correctness and
+language detection.
+
+Overall highlight.js currently supports 51 languages and 20 style themes.
+
+[node.js]: http://nodejs.org/
+[api]: http://softwaremaniacs.org/wiki/doku.php/highlight.js:api
+[p]: http://softwaremaniacs.org/blog/2012/05/10/http-and-json-in-highlight-js/en/
+[pojoaque]: http://web-cms-designs.com/ftopict-10-pojoaque-style-for-highlight-js-code-highlighter.html
+[ao]: https://github.com/angelolloqui
+[ar]: https://github.com/raleksandar
+[jc]: https://github.com/jcheng5
+[st]: https://github.com/tikhomirov
+[sr]: https://github.com/sourrust
+[ik]: https://github.com/ikalnitsky
+
+
+## Version 6.2
+
+A lot of things happened in highlight.js since the last version! We've got nine
+new contributors, the discussion group came alive, and the main branch on GitHub
+now counts more than 350 followers. Here are most significant results coming
+from all this activity:
+
+- 5 (five!) new languages: Rust, ActionScript, CoffeeScript, MatLab and
+ experimental support for markdown. Thanks go to [Andrey Vlasovskikh][av],
+ [Alexander Myadzel][am], [Dmytrii Nagirniak][dn], [Oleg Efimov][oe], [Denis
+ Bardadym][db] and [John Crepezzi][jc].
+
+- 2 new style themes: Monokai by [Luigi Maselli][lm] and stylistic imitation of
+ another well-known highlighter Google Code Prettify by [Aahan Krish][ak].
+
+- A vast number of [correctness fixes and code refactorings][log], mostly made
+ by [Oleg Efimov][oe] and [Evgeny Stepanischev][es].
+
+[av]: https://github.com/vlasovskikh
+[am]: https://github.com/myadzel
+[dn]: https://github.com/dnagir
+[oe]: https://github.com/Sannis
+[db]: https://github.com/btd
+[jc]: https://github.com/seejohnrun
+[lm]: http://grigio.org/
+[ak]: https://github.com/geekpanth3r
+[es]: https://github.com/bolknote
+[log]: https://github.com/isagalaev/highlight.js/commits/
+
+
+## Version 6.1 — Solarized
+
+[Jeremy Hull][jh] has implemented my dream feature — a port of [Solarized][]
+style theme famous for being based on the intricate color theory to achieve
+correct contrast and color perception. It is now available for highlight.js in
+both variants — light and dark.
+
+This version also adds a new original style Arta. Its author pumbur maintains a
+[heavily modified fork of highlight.js][pb] on GitHub.
+
+[jh]: https://github.com/sourrust
+[solarized]: http://ethanschoonover.com/solarized
+[pb]: https://github.com/pumbur/highlight.js
+
+
+## Version 6.0
+
+New major version of the highlighter has been built on a significantly
+refactored syntax. Due to this it's even smaller than the previous one while
+supporting more languages!
+
+New languages are:
+
+- Haskell by [Jeremy Hull][sourrust]
+- Erlang in two varieties — module and REPL — made collectively by [Nikolay
+ Zakharov][desh], [Dmitry Kovega][arhibot] and [Sergey Ignatov][ignatov]
+- Objective C by [Valerii Hiora][vhbit]
+- Vala by [Antono Vasiljev][antono]
+- Go by [Stephan Kountso][steplg]
+
+[sourrust]: https://github.com/sourrust
+[desh]: http://desh.su/
+[arhibot]: https://github.com/arhibot
+[ignatov]: https://github.com/ignatov
+[vhbit]: https://github.com/vhbit
+[antono]: https://github.com/antono
+[steplg]: https://github.com/steplg
+
+Also this version is marginally faster and fixes a number of small long-standing
+bugs.
+
+Developer overview of the new language syntax is available in a [blog post about
+recent beta release][beta].
+
+[beta]: http://softwaremaniacs.org/blog/2011/04/25/highlight-js-60-beta/en/
+
+P.S. New version is not yet available on a Yandex' CDN, so for now you have to
+download [your own copy][d].
+
+[d]: /soft/highlight/en/download/
+
+
+## Version 5.14
+
+Fixed bugs in HTML/XML detection and relevance introduced in previous
+refactoring.
+
+Also test.html now shows the second best result of language detection by
+relevance.
+
+
+## Version 5.13
+
+Past weekend began with a couple of simple additions for existing languages but
+ended up in a big code refactoring bringing along nice improvements for language
+developers.
+
+### For users
+
+- Description of C++ has got new keywords from the upcoming [C++ 0x][] standard.
+- Description of HTML has got new tags from [HTML 5][].
+- CSS-styles have been unified to use consistent padding and also have lost
+ pop-outs with names of detected languages.
+- [Igor Kalnitsky][ik] has sent two new language descriptions: CMake и VHDL.
+
+This makes total number of languages supported by highlight.js to reach 35.
+
+Bug fixes:
+
+- Custom classes on `
` tags are not being overridden anymore
+- More correct highlighting of code blocks inside non-`
` containers:
+ highlighter now doesn't insist on replacing them with its own container and
+ just replaces the contents.
+- Small fixes in browser compatibility and heuristics.
+
+[c++ 0x]: http://ru.wikipedia.org/wiki/C%2B%2B0x
+[html 5]: http://en.wikipedia.org/wiki/HTML5
+[ik]: http://kalnitsky.org.ua/
+
+### For developers
+
+The most significant change is the ability to include language submodes right
+under `contains` instead of defining explicit named submodes in the main array:
+
+ contains: [
+ 'string',
+ 'number',
+ {begin: '\\n', end: hljs.IMMEDIATE_RE}
+ ]
+
+This is useful for auxiliary modes needed only in one place to define parsing.
+Note that such modes often don't have `className` and hence won't generate a
+separate `` in the resulting markup. This is similar in effect to
+`noMarkup: true`. All existing languages have been refactored accordingly.
+
+Test file test.html has at last become a real test. Now it not only puts the
+detected language name under the code snippet but also tests if it matches the
+expected one. Test summary is displayed right above all language snippets.
+
+
+## CDN
+
+Fine people at [Yandex][] agreed to host highlight.js on their big fast servers.
+[Link up][l]!
+
+[yandex]: http://yandex.com/
+[l]: http://softwaremaniacs.org/soft/highlight/en/download/
+
+
+## Version 5.10 — "Paris".
+
+Though I'm on a vacation in Paris, I decided to release a new version with a
+couple of small fixes:
+
+- Tomas Vitvar discovered that TAB replacement doesn't always work when used
+ with custom markup in code
+- SQL parsing is even more rigid now and doesn't step over SmallTalk in tests
+
+
+## Version 5.9
+
+A long-awaited version is finally released.
+
+New languages:
+
+- Andrew Fedorov made a definition for Lua
+- a long-time highlight.js contributor [Peter Leonov][pl] made a definition for
+ Nginx config
+- [Vladimir Moskva][vm] made a definition for TeX
+
+[pl]: http://kung-fu-tzu.ru/
+[vm]: http://fulc.ru/
+
+Fixes for existing languages:
+
+- [Loren Segal][ls] reworked the Ruby definition and added highlighting for
+ [YARD][] inline documentation
+- the definition of SQL has become more solid and now it shouldn't be overly
+ greedy when it comes to language detection
+
+[ls]: http://gnuu.org/
+[yard]: http://yardoc.org/
+
+The highlighter has become more usable as a library allowing to do highlighting
+from initialization code of JS frameworks and in ajax methods (see.
+readme.eng.txt).
+
+Also this version drops support for the [WordPress][wp] plugin. Everyone is
+welcome to [pick up its maintenance][p] if needed.
+
+[wp]: http://wordpress.org/
+[p]: http://bazaar.launchpad.net/~isagalaev/+junk/highlight/annotate/342/src/wp_highlight.js.php
+
+
+## Version 5.8
+
+- Jan Berkel has contributed a definition for Scala. +1 to hotness!
+- All CSS-styles are rewritten to work only inside `
` tags to avoid
+ conflicts with host site styles.
+
+
+## Version 5.7.
+
+Fixed escaping of quotes in VBScript strings.
+
+
+## Version 5.5
+
+This version brings a small change: now .ini-files allow digits, underscores and
+square brackets in key names.
+
+
+## Version 5.4
+
+Fixed small but upsetting bug in the packer which caused incorrect highlighting
+of explicitly specified languages. Thanks to Andrew Fedorov for precise
+diagnostics!
+
+
+## Version 5.3
+
+The version to fulfil old promises.
+
+The most significant change is that highlight.js now preserves custom user
+markup in code along with its own highlighting markup. This means that now it's
+possible to use, say, links in code. Thanks to [Vladimir Dolzhenko][vd] for the
+[initial proposal][1] and for making a proof-of-concept patch.
+
+Also in this version:
+
+- [Vasily Polovnyov][vp] has sent a GitHub-like style and has implemented
+ support for CSS @-rules and Ruby symbols.
+- Yura Zaripov has sent two styles: Brown Paper and School Book.
+- Oleg Volchkov has sent a definition for [Parser 3][p3].
+
+[1]: http://softwaremaniacs.org/forum/highlightjs/6612/
+[p3]: http://www.parser.ru/
+[vp]: http://vasily.polovnyov.ru/
+[vd]: http://dolzhenko.blogspot.com/
+
+
+## Version 5.2
+
+- at last it's possible to replace indentation TABs with something sensible (e.g. 2 or 4 spaces)
+- new keywords and built-ins for 1C by Sergey Baranov
+- a couple of small fixes to Apache highlighting
+
+
+## Version 5.1
+
+This is one of those nice version consisting entirely of new and shiny
+contributions!
+
+- [Vladimir Ermakov][vooon] created highlighting for AVR Assembler
+- [Ruslan Keba][rukeba] created highlighting for Apache config file. Also his
+ original visual style for it is now available for all highlight.js languages
+ under the name "Magula".
+- [Shuen-Huei Guan][drake] (aka Drake) sent new keywords for RenderMan
+ languages. Also thanks go to [Konstantin Evdokimenko][ke] for his advice on
+ the matter.
+
+[vooon]: http://vehq.ru/about/
+[rukeba]: http://rukeba.com/
+[drake]: http://drakeguan.org/
+[ke]: http://k-evdokimenko.moikrug.ru/
+
+
+## Version 5.0
+
+The main change in the new major version of highlight.js is a mechanism for
+packing several languages along with the library itself into a single compressed
+file. Now sites using several languages will load considerably faster because
+the library won't dynamically include additional files while loading.
+
+Also this version fixes a long-standing bug with Javascript highlighting that
+couldn't distinguish between regular expressions and division operations.
+
+And as usually there were a couple of minor correctness fixes.
+
+Great thanks to all contributors! Keep using highlight.js.
+
+
+## Version 4.3
+
+This version comes with two contributions from [Jason Diamond][jd]:
+
+- language definition for C# (yes! it was a long-missed thing!)
+- Visual Studio-like highlighting style
+
+Plus there are a couple of minor bug fixes for parsing HTML and XML attributes.
+
+[jd]: http://jason.diamond.name/weblog/
+
+
+## Version 4.2
+
+The biggest news is highlighting for Lisp, courtesy of Vasily Polovnyov. It's
+somewhat experimental meaning that for highlighting "keywords" it doesn't use
+any pre-defined set of a Lisp dialect. Instead it tries to highlight first word
+in parentheses wherever it makes sense. I'd like to ask people programming in
+Lisp to confirm if it's a good idea and send feedback to [the forum][f].
+
+Other changes:
+
+- Smalltalk was excluded from DEFAULT_LANGUAGES to save traffic
+- [Vladimir Epifanov][voldmar] has implemented javascript style switcher for
+ test.html
+- comments now allowed inside Ruby function definition
+- [MEL][] language from [Shuen-Huei Guan][drake]
+- whitespace now allowed between `
` and ``
+- better auto-detection of C++ and PHP
+- HTML allows embedded VBScript (`<% .. %>`)
+
+[f]: http://softwaremaniacs.org/forum/highlightjs/
+[voldmar]: http://voldmar.ya.ru/
+[mel]: http://en.wikipedia.org/wiki/Maya_Embedded_Language
+[drake]: http://drakeguan.org/
+
+
+## Version 4.1
+
+Languages:
+
+- Bash from Vah
+- DOS bat-files from Alexander Makarov (Sam)
+- Diff files from Vasily Polovnyov
+- Ini files from myself though initial idea was from Sam
+
+Styles:
+
+- Zenburn from Vladimir Epifanov, this is an imitation of a
+ [well-known theme for Vim][zenburn].
+- Ascetic from myself, as a realization of ideals of non-flashy highlighting:
+ just one color in only three gradations :-)
+
+In other news. [One small bug][bug] was fixed, built-in keywords were added for
+Python and C++ which improved auto-detection for the latter (it was shame that
+[my wife's blog][alenacpp] had issues with it from time to time). And lastly
+thanks go to Sam for getting rid of my stylistic comments in code that were
+getting in the way of [JSMin][].
+
+[zenburn]: http://en.wikipedia.org/wiki/Zenburn
+[alenacpp]: http://alenacpp.blogspot.com/
+[bug]: http://softwaremaniacs.org/forum/viewtopic.php?id=1823
+[jsmin]: http://code.google.com/p/jsmin-php/
+
+
+## Version 4.0
+
+New major version is a result of vast refactoring and of many contributions.
+
+Visible new features:
+
+- Highlighting of embedded languages. Currently is implemented highlighting of
+ Javascript and CSS inside HTML.
+- Bundled 5 ready-made style themes!
+
+Invisible new features:
+
+- Highlight.js no longer pollutes global namespace. Only one object and one
+ function for backward compatibility.
+- Performance is further increased by about 15%.
+
+Changing of a major version number caused by a new format of language definition
+files. If you use some third-party language files they should be updated.
+
+
+## Version 3.5
+
+A very nice version in my opinion fixing a number of small bugs and slightly
+increased speed in a couple of corner cases. Thanks to everybody who reports
+bugs in he [forum][f] and by email!
+
+There is also a new language — XML. A custom XML formerly was detected as HTML
+and didn't highlight custom tags. In this version I tried to make custom XML to
+be detected and highlighted by its own rules. Which by the way include such
+things as CDATA sections and processing instructions (` ... ?>`).
+
+[f]: http://softwaremaniacs.org/forum/viewforum.php?id=6
+
+
+## Version 3.3
+
+[Vladimir Gubarkov][xonix] has provided an interesting and useful addition.
+File export.html contains a little program that shows and allows to copy and
+paste an HTML code generated by the highlighter for any code snippet. This can
+be useful in situations when one can't use the script itself on a site.
+
+
+[xonix]: http://xonixx.blogspot.com/
+
+
+## Version 3.2 consists completely of contributions:
+
+- Vladimir Gubarkov has described SmallTalk
+- Yuri Ivanov has described 1C
+- Peter Leonov has packaged the highlighter as a Firefox extension
+- Vladimir Ermakov has compiled a mod for phpBB
+
+Many thanks to you all!
+
+
+## Version 3.1
+
+Three new languages are available: Django templates, SQL and Axapta. The latter
+two are sent by [Dmitri Roudakov][1]. However I've almost entirely rewrote an
+SQL definition but I'd never started it be it from the ground up :-)
+
+The engine itself has got a long awaited feature of grouping keywords
+("keyword", "built-in function", "literal"). No more hacks!
+
+[1]: http://roudakov.ru/
+
+
+## Version 3.0
+
+It is major mainly because now highlight.js has grown large and has become
+modular. Now when you pass it a list of languages to highlight it will
+dynamically load into a browser only those languages.
+
+Also:
+
+- Konstantin Evdokimenko of [RibKit][] project has created a highlighting for
+ RenderMan Shading Language and RenderMan Interface Bytestream. Yay for more
+ languages!
+- Heuristics for C++ and HTML got better.
+- I've implemented (at last) a correct handling of backslash escapes in C-like
+ languages.
+
+There is also a small backwards incompatible change in the new version. The
+function initHighlighting that was used to initialize highlighting instead of
+initHighlightingOnLoad a long time ago no longer works. If you by chance still
+use it — replace it with the new one.
+
+[RibKit]: http://ribkit.sourceforge.net/
+
+
+## Version 2.9
+
+Highlight.js is a parser, not just a couple of regular expressions. That said
+I'm glad to announce that in the new version 2.9 has support for:
+
+- in-string substitutions for Ruby -- `#{...}`
+- strings from from numeric symbol codes (like #XX) for Delphi
+
+
+## Version 2.8
+
+A maintenance release with more tuned heuristics. Fully backwards compatible.
+
+
+## Version 2.7
+
+- Nikita Ledyaev presents highlighting for VBScript, yay!
+- A couple of bugs with escaping in strings were fixed thanks to Mickle
+- Ongoing tuning of heuristics
+
+Fixed bugs were rather unpleasant so I encourage everyone to upgrade!
+
+
+## Version 2.4
+
+- Peter Leonov provides another improved highlighting for Perl
+- Javascript gets a new kind of keywords — "literals". These are the words
+ "true", "false" and "null"
+
+Also highlight.js homepage now lists sites that use the library. Feel free to
+add your site by [dropping me a message][mail] until I find the time to build a
+submit form.
+
+[mail]: mailto:Maniac@SoftwareManiacs.Org
+
+
+## Version 2.3
+
+This version fixes IE breakage in previous version. My apologies to all who have
+already downloaded that one!
+
+
+## Version 2.2
+
+- added highlighting for Javascript
+- at last fixed parsing of Delphi's escaped apostrophes in strings
+- in Ruby fixed highlighting of keywords 'def' and 'class', same for 'sub' in
+ Perl
+
+
+## Version 2.0
+
+- Ruby support by [Anton Kovalyov][ak]
+- speed increased by orders of magnitude due to new way of parsing
+- this same way allows now correct highlighting of keywords in some tricky
+ places (like keyword "End" at the end of Delphi classes)
+
+[ak]: http://anton.kovalyov.net/
+
+
+## Version 1.0
+
+Version 1.0 of javascript syntax highlighter is released!
+
+It's the first version available with English description. Feel free to post
+your comments and question to [highlight.js forum][forum]. And don't be afraid
+if you find there some fancy Cyrillic letters -- it's for Russian users too :-)
+
+[forum]: http://softwaremaniacs.org/forum/viewforum.php?id=6
diff --git a/public/packages/summerblue/administrator/js/ckeditor/plugins/codesnippet/lib/highlight/LICENSE b/public/packages/summerblue/administrator/js/ckeditor/plugins/codesnippet/lib/highlight/LICENSE
new file mode 100644
index 0000000..422deb7
--- /dev/null
+++ b/public/packages/summerblue/administrator/js/ckeditor/plugins/codesnippet/lib/highlight/LICENSE
@@ -0,0 +1,24 @@
+Copyright (c) 2006, Ivan Sagalaev
+All rights reserved.
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+ * Neither the name of highlight.js nor the names of its contributors
+ may be used to endorse or promote products derived from this software
+ without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS AND CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/public/packages/summerblue/administrator/js/ckeditor/plugins/codesnippet/lib/highlight/README.ru.md b/public/packages/summerblue/administrator/js/ckeditor/plugins/codesnippet/lib/highlight/README.ru.md
new file mode 100644
index 0000000..0d0e0fe
--- /dev/null
+++ b/public/packages/summerblue/administrator/js/ckeditor/plugins/codesnippet/lib/highlight/README.ru.md
@@ -0,0 +1,171 @@
+# Highlight.js
+
+Highlight.js нужен для подсветки синтаксиса в примерах кода в блогах,
+форумах и вообще на любых веб-страницах. Пользоваться им очень просто,
+потому что работает он автоматически: сам находит блоки кода, сам
+определяет язык, сам подсвечивает.
+
+Автоопределением языка можно управлять, когда оно не справляется само (см.
+дальше "Эвристика").
+
+
+## Простое использование
+
+Подключите библиотеку и стиль на страницу и повесть вызов подсветки на
+загрузку страницы:
+
+```html
+
+
+
+```
+
+Весь код на странице, обрамлённый в теги `
..
`
+будет автоматически подсвечен. Если вы используете другие теги или хотите
+подсвечивать блоки кода динамически, читайте "Инициализацию вручную" ниже.
+
+- Вы можете скачать собственную версию "highlight.pack.js" или сослаться
+ на захостенный файл, как описано на странице загрузки:
+
+
+- Стилевые темы можно найти в загруженном архиве или также использовать
+ захостенные. Чтобы сделать собственный стиль для своего сайта, вам
+ будет полезен [CSS classes reference][cr], который тоже есть в архиве.
+
+[cr]: http://highlightjs.readthedocs.org/en/latest/css-classes-reference.html
+
+
+## node.js
+
+Highlight.js можно использовать в node.js. Библиотеку со всеми возможными языками можно
+установить с NPM:
+
+ npm install highlight.js
+
+Также её можно собрать из исходников с только теми языками, которые нужны:
+
+ python3 tools/build.py -tnode lang1 lang2 ..
+
+Использование библиотеки:
+
+```javascript
+var hljs = require('highlight.js');
+
+// Если вы знаете язык
+hljs.highlight(lang, code).value;
+
+// Автоопределение языка
+hljs.highlightAuto(code).value;
+```
+
+
+## AMD
+
+Highlight.js можно использовать с загрузчиком AMD-модулей. Для этого его
+нужно собрать из исходников следующей командой:
+
+```bash
+$ python3 tools/build.py -tamd lang1 lang2 ..
+```
+
+Она создаст файл `build/highlight.pack.js`, который является загружаемым
+AMD-модулем и содержит все выбранные при сборке языки. Используется он так:
+
+```javascript
+require(["highlight.js/build/highlight.pack"], function(hljs){
+
+ // Если вы знаете язык
+ hljs.highlight(lang, code).value;
+
+ // Автоопределение языка
+ hljs.highlightAuto(code).value;
+});
+```
+
+
+## Замена TABов
+
+Также вы можете заменить символы TAB ('\x09'), используемые для отступов, на
+фиксированное количество пробелов или на отдельный ``, чтобы задать ему
+какой-нибудь специальный стиль:
+
+```html
+
+```
+
+
+## Инициализация вручную
+
+Если вы используете другие теги для блоков кода, вы можете инициализировать их
+явно с помощью функции `highlightBlock(code)`. Она принимает DOM-элемент с
+текстом расцвечиваемого кода и опционально - строчку для замены символов TAB.
+
+Например с использованием jQuery код инициализации может выглядеть так:
+
+```javascript
+$(document).ready(function() {
+ $('pre code').each(function(i, e) {hljs.highlightBlock(e)});
+});
+```
+
+`highlightBlock` можно также использовать, чтобы подсветить блоки кода,
+добавленные на страницу динамически. Только убедитесь, что вы не делаете этого
+повторно для уже раскрашенных блоков.
+
+Если ваш блок кода использует ` ` вместо переводов строки (т.е. если это не
+`
`), включите опцию `useBR`:
+
+```javascript
+hljs.configure({useBR: true});
+$('div.code').each(function(i, e) {hljs.highlightBlock(e)});
+```
+
+
+## Эвристика
+
+Определение языка, на котором написан фрагмент, делается с помощью
+довольно простой эвристики: программа пытается расцветить фрагмент всеми
+языками подряд, и для каждого языка считает количество подошедших
+синтаксически конструкций и ключевых слов. Для какого языка нашлось больше,
+тот и выбирается.
+
+Это означает, что в коротких фрагментах высока вероятность ошибки, что
+периодически и случается. Чтобы указать язык фрагмента явно, надо написать
+его название в виде класса к элементу ``:
+
+```html
+
...
+```
+
+Можно использовать рекомендованные в HTML5 названия классов:
+"language-html", "language-php". Также можно назначать классы на элемент
+`
`.
+
+Чтобы запретить расцветку фрагмента вообще, используется класс "no-highlight":
+
+```html
+
...
+```
+
+
+## Экспорт
+
+В файле export.html находится небольшая программка, которая показывает и дает
+скопировать непосредственно HTML-код подсветки для любого заданного фрагмента кода.
+Это может понадобится например на сайте, на котором нельзя подключить сам скрипт
+highlight.js.
+
+
+## Координаты
+
+- Версия: 8.0
+- URL: http://highlightjs.org/
+
+Лицензионное соглашение читайте в файле LICENSE.
+Список авторов и соавторов читайте в файле AUTHORS.ru.txt
diff --git a/public/packages/summerblue/administrator/js/ckeditor/plugins/codesnippet/lib/highlight/highlight.pack.js b/public/packages/summerblue/administrator/js/ckeditor/plugins/codesnippet/lib/highlight/highlight.pack.js
new file mode 100644
index 0000000..45d02a9
--- /dev/null
+++ b/public/packages/summerblue/administrator/js/ckeditor/plugins/codesnippet/lib/highlight/highlight.pack.js
@@ -0,0 +1 @@
+var hljs=new function(){function k(v){return v.replace(/&/gm,"&").replace(//gm,">")}function t(v){return v.nodeName.toLowerCase()}function i(w,x){var v=w&&w.exec(x);return v&&v.index==0}function d(v){return Array.prototype.map.call(v.childNodes,function(w){if(w.nodeType==3){return b.useBR?w.nodeValue.replace(/\n/g,""):w.nodeValue}if(t(w)=="br"){return"\n"}return d(w)}).join("")}function r(w){var v=(w.className+" "+(w.parentNode?w.parentNode.className:"")).split(/\s+/);v=v.map(function(x){return x.replace(/^language-/,"")});return v.filter(function(x){return j(x)||x=="no-highlight"})[0]}function o(x,y){var v={};for(var w in x){v[w]=x[w]}if(y){for(var w in y){v[w]=y[w]}}return v}function u(x){var v=[];(function w(y,z){for(var A=y.firstChild;A;A=A.nextSibling){if(A.nodeType==3){z+=A.nodeValue.length}else{if(t(A)=="br"){z+=1}else{if(A.nodeType==1){v.push({event:"start",offset:z,node:A});z=w(A,z);v.push({event:"stop",offset:z,node:A})}}}}return z})(x,0);return v}function q(w,y,C){var x=0;var F="";var z=[];function B(){if(!w.length||!y.length){return w.length?w:y}if(w[0].offset!=y[0].offset){return(w[0].offset"}function E(G){F+=""+t(G)+">"}function v(G){(G.event=="start"?A:E)(G.node)}while(w.length||y.length){var D=B();F+=k(C.substr(x,D[0].offset-x));x=D[0].offset;if(D==w){z.reverse().forEach(E);do{v(D.splice(0,1)[0]);D=B()}while(D==w&&D.length&&D[0].offset==x);z.reverse().forEach(A)}else{if(D[0].event=="start"){z.push(D[0].node)}else{z.pop()}v(D.splice(0,1)[0])}}return F+k(C.substr(x))}function m(y){function v(z){return(z&&z.source)||z}function w(A,z){return RegExp(v(A),"m"+(y.cI?"i":"")+(z?"g":""))}function x(D,C){if(D.compiled){return}D.compiled=true;D.k=D.k||D.bK;if(D.k){var z={};function E(G,F){if(y.cI){F=F.toLowerCase()}F.split(" ").forEach(function(H){var I=H.split("|");z[I[0]]=[G,I[1]?Number(I[1]):1]})}if(typeof D.k=="string"){E("keyword",D.k)}else{Object.keys(D.k).forEach(function(F){E(F,D.k[F])})}D.k=z}D.lR=w(D.l||/\b[A-Za-z0-9_]+\b/,true);if(C){if(D.bK){D.b=D.bK.split(" ").join("|")}if(!D.b){D.b=/\B|\b/}D.bR=w(D.b);if(!D.e&&!D.eW){D.e=/\B|\b/}if(D.e){D.eR=w(D.e)}D.tE=v(D.e)||"";if(D.eW&&C.tE){D.tE+=(D.e?"|":"")+C.tE}}if(D.i){D.iR=w(D.i)}if(D.r===undefined){D.r=1}if(!D.c){D.c=[]}var B=[];D.c.forEach(function(F){if(F.v){F.v.forEach(function(G){B.push(o(F,G))})}else{B.push(F=="self"?D:F)}});D.c=B;D.c.forEach(function(F){x(F,D)});if(D.starts){x(D.starts,C)}var A=D.c.map(function(F){return F.bK?"\\.?\\b("+F.b+")\\b\\.?":F.b}).concat([D.tE]).concat([D.i]).map(v).filter(Boolean);D.t=A.length?w(A.join("|"),true):{exec:function(F){return null}};D.continuation={}}x(y)}function c(S,L,J,R){function v(U,V){for(var T=0;T";U+=Z+'">';return U+X+Y}function N(){var U=k(C);if(!I.k){return U}var T="";var X=0;I.lR.lastIndex=0;var V=I.lR.exec(U);while(V){T+=U.substr(X,V.index-X);var W=E(I,V);if(W){H+=W[1];T+=w(W[0],V[0])}else{T+=V[0]}X=I.lR.lastIndex;V=I.lR.exec(U)}return T+U.substr(X)}function F(){if(I.sL&&!f[I.sL]){return k(C)}var T=I.sL?c(I.sL,C,true,I.continuation.top):g(C);if(I.r>0){H+=T.r}if(I.subLanguageMode=="continuous"){I.continuation.top=T.top}return w(T.language,T.value,false,true)}function Q(){return I.sL!==undefined?F():N()}function P(V,U){var T=V.cN?w(V.cN,"",true):"";if(V.rB){D+=T;C=""}else{if(V.eB){D+=k(U)+T;C=""}else{D+=T;C=U}}I=Object.create(V,{parent:{value:I}})}function G(T,X){C+=T;if(X===undefined){D+=Q();return 0}var V=v(X,I);if(V){D+=Q();P(V,X);return V.rB?0:X.length}var W=z(I,X);if(W){var U=I;if(!(U.rE||U.eE)){C+=X}D+=Q();do{if(I.cN){D+="
"}H+=I.r;I=I.parent}while(I!=W.parent);if(U.eE){D+=k(X)}C="";if(W.starts){P(W.starts,"")}return U.rE?0:X.length}if(A(X,I)){throw new Error('Illegal lexeme "'+X+'" for mode "'+(I.cN||"")+'"')}C+=X;return X.length||1}var M=j(S);if(!M){throw new Error('Unknown language: "'+S+'"')}m(M);var I=R||M;var D="";for(var K=I;K!=M;K=K.parent){if(K.cN){D=w(K.cN,D,true)}}var C="";var H=0;try{var B,y,x=0;while(true){I.t.lastIndex=x;B=I.t.exec(L);if(!B){break}y=G(L.substr(x,B.index-x),B[0]);x=B.index+y}G(L.substr(x));for(var K=I;K.parent;K=K.parent){if(K.cN){D+="
+ If you can see CKEditor below, it means that the installation succeeded.
+ You can now try out your new editor version, see its features, and when you are ready to move on,
+ check some of the most useful resources recommended below.
+
Modular build and numerous
+ configuration options give you nearly endless possibilities to customize CKEditor. Replace the
+ content of your config.js file with the following code and
+ refresh this page (remember to clear the browser cache)!
If you want to reorder toolbar buttons or remove some of them, check this handy tool!
+
+
+
+
More Samples!
+
Visit the CKEditor SDK for a huge collection of samples
+ showcasing editor features, with source code readily available to copy and use in your own
+ implementation.
+
+
+
+
Developer's Guide
+
The most important resource for all developers working with CKEditor, integrating it with their
+ websites and applications, and customizing to their needs. You can start from here:
+
+
Getting Started –
+ Explains most crucial editor concepts and practices as well as the installation process and
+ integration with your website.
+
+
Advanced Installation
+ Concepts – Describes how to upgrade, install additional components (plugins, skins),
+ or create a custom build.
+
+
+
When you have the basics sorted out, feel free to browse some more advanced sections like:
+ This sample shows how to create and destroy CKEditor instances on the fly. After the removal of CKEditor the
+ content created inside the editing
+ area will be displayed in a <div> element.
+
+
+ For details of how to create this setup check the source code of this sample page
+ for JavaScript code responsible for the creation and destruction of a CKEditor instance.
+
+
+
Click the buttons to create and remove a CKEditor instance.
+ The CKEDITOR.appendTo()
+ method serves to to place editors inside existing DOM elements. Unlike CKEDITOR.replace(),
+ a target container to be replaced is no longer necessary. A new editor
+ instance is inserted directly wherever it is desired.
+
+
CKEDITOR.appendTo( 'container_id',
+ { /* Configuration options to be used. */ }
+ 'Editor content to be used.'
+);
+ This sample shows how to configure CKEditor instances to use the
+ AutoGrow (autogrow) plugin that lets the editor window expand
+ and shrink depending on the amount and size of content entered in the editing area.
+
+
+ In its default implementation the AutoGrow feature can expand the
+ CKEditor window infinitely in order to avoid introducing scrollbars to the editing area.
+
+
+ It is also possible to set a maximum height for the editor window. Once CKEditor
+ editing area reaches the value in pixels specified in the
+ autoGrow_maxHeight
+ configuration setting, scrollbars will be added and the editor window will no longer expand.
+
+
+ To add a CKEditor instance using the autogrow plugin and its
+ autoGrow_maxHeight attribute, insert the following JavaScript call to your code:
+
+
+CKEDITOR.replace( 'textarea_id', {
+ extraPlugins: 'autogrow',
+ autoGrow_maxHeight: 800,
+
+ // Remove the Resize plugin as it does not make sense to use it in conjunction with the AutoGrow plugin.
+ removePlugins: 'resize'
+});
+
+ Note that textarea_id in the code above is the id attribute of
+ the <textarea> element to be replaced with CKEditor. The maximum height should
+ be given in pixels.
+
+ This sample shows how to configure CKEditor to output BBCode
+ format instead of HTML.
+ Please note that the editor configuration was modified to reflect what is needed in a BBCode editing
+ environment.
+ Smiley images, for example, were stripped to the emoticons that are commonly used in some BBCode dialects.
+
+
+ Please note that currently there is no standard for the BBCode markup language, so its implementation
+ for different platforms (message boards, blogs etc.) can vary. This means that before using CKEditor to
+ output BBCode you may need to adjust the implementation to your own environment.
+
+
+ A snippet of the configuration code can be seen below; check the source of this page for
+ a full definition:
+
+ This editor is using the Code Snippet
+ plugin which introduces beautiful code snippets.
+ By default the codesnippet plugin depends on the built-in client-side syntax highlighting
+ library highlight.js.
+
+ Please note that this plugin is not compatible with Internet Explorer 8.
+
+
+
+
+
+
Inline editor
+
+
+
+ The following sample shows the Code Snippet plugin running inside
+ an inline CKEditor instance. The CKEditor instance below was created by using the following configuration
+ settings:
+
+ Note: The highlight.js themes
+ must be loaded manually to be applied inside an inline editor instance, as the
+ codeSnippet_theme setting will not work in that case.
+ You need to include the stylesheet in the <head> section of the page, for example:
+
+ This sample page demonstrates the idea of Advanced Content Filter
+ (ACF), a sophisticated
+ tool that takes control over what kind of data is accepted by the editor and what
+ kind of output is produced.
+
+
When and what is being filtered?
+
+ ACF controls
+ every single source of data that comes to the editor.
+ It process both HTML that is inserted manually (i.e. pasted by the user)
+ and programmatically like:
+
+
+editor.setData( '<p>Hello world!</p>' );
+
+
+ ACF discards invalid,
+ useless HTML tags and attributes so the editor remains "clean" during
+ runtime. ACF behaviour
+ can be configured and adjusted for a particular case to prevent the
+ output HTML (i.e. in CMS systems) from being polluted.
+
+ This kind of filtering is a first, client-side line of defense
+ against "tag soups",
+ the tool that precisely restricts which tags, attributes and styles
+ are allowed (desired). When properly configured, ACF
+ is an easy and fast way to produce a high-quality, intentionally filtered HTML.
+
+
+
How to configure or disable ACF?
+
+ Advanced Content Filter is enabled by default, working in "automatic mode", yet
+ it provides a set of easy rules that allow adjusting filtering rules
+ and disabling the entire feature when necessary. The config property
+ responsible for this feature is config.allowedContent.
+
+
+ By "automatic mode" is meant that loaded plugins decide which kind
+ of content is enabled and which is not. For example, if the link
+ plugin is loaded it implies that <a> tag is
+ automatically allowed. Each plugin is given a set
+ of predefined ACF rules
+ that control the editor until
+ config.allowedContent
+ is defined manually.
+
+
+ Let's assume our intention is to restrict the editor to accept (produce) paragraphs
+ only: no attributes, no styles, no other tags.
+ With ACF
+ this is very simple. Basically set
+ config.allowedContent to 'p':
+
+// Trying to insert disallowed tag and attribute.
+editor.setData( '<p style="color: red">Hello <em>world</em>!</p>' );
+alert( editor.getData() );
+
+// Filtered data is returned.
+"<p>Hello world!</p>"
+
+
+ What happened? Since config.allowedContent: 'p' is set the editor assumes
+ that only plain <p> are accepted. Nothing more. This is why
+ style attribute and <em> tag are gone. The same
+ filtering would happen if we pasted disallowed HTML into this editor.
+
+ ACF is far more than
+ I/O control: the entire
+ UI of the editor is adjusted to what
+ filters restrict. For example: if <a> tag is
+ disallowed
+ by ACF,
+ then accordingly link command, toolbar button and link dialog
+ are also disabled. Editor is smart: it knows which features must be
+ removed from the interface to match filtering rules.
+
+
+ CKEditor can be far more specific. If <a> tag is
+ allowed by filtering rules to be used but it is restricted
+ to have only one attribute (href)
+ config.allowedContent = 'a[!href]', then
+ "Target" tab of the link dialog is automatically disabled as target
+ attribute isn't included in ACF rules
+ for <a>. This behaviour applies to dialog fields, context
+ menus and toolbar buttons.
+
+
+
Sample configurations
+
+ There are several editor instances below that present different
+ ACF setups. All of them,
+ except the inline instance, share the same HTML content to visualize
+ how different filtering rules affect the same input data.
+
+
+
+
+
+
+
+ This editor is using default configuration ("automatic mode"). It means that
+
+ config.allowedContent is defined by loaded plugins.
+ Each plugin extends filtering rules to make it's own associated content
+ available for the user.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ This editor is using a custom configuration for
+ ACF:
+
+ The following rules may require additional explanation:
+
+
+
+ h1 h2 h3 p blockquote strong em - These tags
+ are accepted by the editor. Any tag attributes will be discarded.
+
+
+ a[!href] - href attribute is obligatory
+ for <a> tag. Tags without this attribute
+ are disarded. No other attribute will be accepted.
+
+
+ img(left,right)[!src,alt,width,height] - src
+ attribute is obligatory for <img> tag.
+ alt, width, height
+ and class attributes are accepted but
+ class must be either class="left"
+ or class="right"
+
+
+ table tr th td caption - These tags
+ are accepted by the editor. Any tag attributes will be discarded.
+
+
+ span{!font-family}, span{!color},
+ span(!marker) - <span> tags
+ will be accepted if either font-family or
+ color style is set or class="marker"
+ is present.
+
+
+ del ins - These tags
+ are accepted by the editor. Any tag attributes will be discarded.
+
+
+
+ Please note that UI of the
+ editor is different. It's a response to what happened to the filters.
+ Since text-align isn't allowed, the align toolbar is gone.
+ The same thing happened to subscript/superscript, strike, underline
+ (<u>, <sub>, <sup>
+ are disallowed by
+ config.allowedContent) and many other buttons.
+
+
+
+
+
+
+
+
+
+
+
+
+ This editor is using a custom configuration for
+ ACF.
+ Note that filters can be configured as an object literal
+ as an alternative to a string-based definition.
+
+ As you can see, removing plugins and buttons implies filtering.
+ Several tags are not allowed in the editor because there's no
+ plugin/button that is responsible for creating and editing this
+ kind of content (for example: the image is missing because
+ of removeButtons: 'Image'). The conclusion is that
+ ACF works "backwards"
+ as well: modifying UI
+ elements is changing allowed content rules.
+
+
+
+
+
+
+
+
+
+
+
+
+ This editor is built on editable <h1> element.
+ ACF takes care of
+ what can be included in <h1>. Note that there
+ are no block styles in Styles combo. Also why lists, indentation,
+ blockquote, div, form and other buttons are missing.
+
+
+ ACF makes sure that
+ no disallowed tags will come to <h1> so the final
+ markup is valid. If the user tried to paste some invalid HTML
+ into this editor (let's say a list), it would be automatically
+ converted into plain text.
+
+
+
+ Apollo 11 was the spaceflight that landed the first humans, Americans Neil Armstrong and Buzz Aldrin, on the Moon on July 20,
+ 1969, at 20:18 UTC.
+
+
+
+
+
+
+
+
+
+ This editor is using a custom configuration for ACF.
+ It's using the
+ Disallowed Content property of the filter to eliminate all title attributes.
+
+ This editor is using a custom configuration for ACF.
+ It's using the
+ Disallowed Content property of the filter to eliminate all a and img tags,
+ while allowing all other tags.
+
+ This sample shows how to configure CKEditor instances to use the
+ Developer Tools (devtools) plugin that displays
+ information about dialog window elements, including the name of the dialog window,
+ tab, and UI element. Please note that the tooltip also contains a link to the
+ CKEditor JavaScript API
+ documentation for each of the selected elements.
+
+
+ This plugin is aimed at developers who would like to customize their CKEditor
+ instances and create their own plugins. By default it is turned off; it is
+ usually useful to only turn it on in the development phase. Note that it works with
+ all CKEditor dialog windows, including the ones that were created by custom plugins.
+
+
+ To add a CKEditor instance using the devtools plugin, insert
+ the following JavaScript call into your code:
+
+ This sample shows how to use the
+ CKEditor Dialog API
+ to customize CKEditor dialog windows without changing the original editor code.
+ The following customizations are being done in the example below:
+
+
+ For details on how to create this setup check the source code of this sample page.
+
+
+
A custom dialog is added to the editors using the pluginsLoaded event, from an external dialog definition file:
+
+
Creating a custom dialog window – "My Dialog" dialog window opened with the "My Dialog"
+ toolbar button.
+
+
Creating a custom button – Add button to open the dialog with "My Dialog" toolbar button.
+
+
+
+
+
The below editor modify the dialog definition of the above added dialog using the dialogDefinition
+ event:
+
+
Adding dialog tab – Add new tab "My Tab" to dialog window.
+
Removing a dialog window tab – Remove "Second Tab" page from the dialog window.
+
Adding dialog window fields – Add "My Custom Field" to the dialog window.
+
Removing dialog window field – Remove "Select Field" selection field from the dialog
+ window.
+
+
Setting default values for dialog window fields – Set default value of "Text Field" text
+ field.
+
+
Setup initial focus for dialog window – Put initial focus on "My Custom Field" text
+ field.
+
+ This sample shows how to automatically replace <div> elements
+ with a CKEditor instance on the fly, following user's doubleclick. The content
+ that was previously placed inside the <div> element will now
+ be moved into CKEditor editing area.
+
+
+ For details on how to create this setup check the source code of this sample page.
+
+
+
+ Double-click any of the following <div> elements to transform them into
+ editor instances.
+
+
+
+ Part 1
+
+
+ Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Cras et ipsum quis mi
+ semper accumsan. Integer pretium dui id massa. Suspendisse in nisl sit amet urna
+ rutrum imperdiet. Nulla eu tellus. Donec ante nisi, ullamcorper quis, fringilla
+ nec, sagittis eleifend, pede. Nulla commodo interdum massa. Donec id metus. Fusce
+ eu ipsum. Suspendisse auctor. Phasellus fermentum porttitor risus.
+
+
+
+
+ Part 2
+
+
+ Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Cras et ipsum quis mi
+ semper accumsan. Integer pretium dui id massa. Suspendisse in nisl sit amet urna
+ rutrum imperdiet. Nulla eu tellus. Donec ante nisi, ullamcorper quis, fringilla
+ nec, sagittis eleifend, pede. Nulla commodo interdum massa. Donec id metus. Fusce
+ eu ipsum. Suspendisse auctor. Phasellus fermentum porttitor risus.
+
+
+ Donec velit. Mauris massa. Vestibulum non nulla. Nam suscipit arcu nec elit. Phasellus
+ sollicitudin iaculis ante. Ut non mauris et sapien tincidunt adipiscing. Vestibulum
+ vitae leo. Suspendisse nec mi tristique nulla laoreet vulputate.
+
+
+
+
+ Part 3
+
+
+ Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Cras et ipsum quis mi
+ semper accumsan. Integer pretium dui id massa. Suspendisse in nisl sit amet urna
+ rutrum imperdiet. Nulla eu tellus. Donec ante nisi, ullamcorper quis, fringilla
+ nec, sagittis eleifend, pede. Nulla commodo interdum massa. Donec id metus. Fusce
+ eu ipsum. Suspendisse auctor. Phasellus fermentum porttitor risus.
+
+ This sample shows how to configure CKEditor to use the Document Properties plugin.
+ This plugin allows you to set the metadata of the page, including the page encoding, margins,
+ meta tags, or background.
+
+
Note: This plugin is to be used along with the fullPage configuration.
+
+ The CKEditor instance below is inserted with a JavaScript call using the following code:
+
+ Note that textarea_id in the code above is the id attribute of
+ the <textarea> element to be replaced.
+
+
+ The allowedContent in the code above is set to true to disable content
+ filtering.
+ Setting this option is not obligatory, but in full page mode there is a strong chance that one may want be able
+ to freely enter any HTML content in source mode without any limitations.
+
+ This sample shows how to configure the Enter and Shift+Enter keys
+ to perform actions specified in the
+ enterMode
+ and shiftEnterMode
+ parameters, respectively.
+ You can choose from the following options:
+
+
+
ENTER_P – new <p> paragraphs are created;
+
ENTER_BR – lines are broken with <br> elements;
+
ENTER_DIV – new <div> blocks are created.
+
+
+ The sample code below shows how to configure CKEditor to create a <div> block when
+ Enter key is pressed.
+
+ This sample shows how to configure CKEditor to output
+ HTML code that can be used with
+
+ Adobe Flash.
+ The code will contain a subset of standard HTML elements like <b>,
+ <i>, and <p> as well as HTML attributes.
+
+
+ To add a CKEditor instance outputting Flash compliant HTML code, load the editor using a standard
+ JavaScript call, and define CKEditor features to use HTML elements and attributes.
+
+
+ For details on how to create this setup check the source code of this sample page.
+
+
+
+ To see how it works, create some content in the editing area of CKEditor on the left
+ and send it to the Flash object on the right side of the page by using the
+ Send to Flash button.
+
+ This sample shows how to configure CKEditor to output valid
+ HTML 4.01 code.
+ Traditional HTML elements like <b>,
+ <i>, and <font> are used in place of
+ <strong>, <em>, and CSS styles.
+
+
+ To add a CKEditor instance outputting legacy HTML 4.01 code, load the editor using a standard
+ JavaScript call, and define CKEditor features to use the HTML compliant elements and attributes.
+
+
+ A snippet of the configuration code can be seen below; check the source of this page for
+ full definition:
+
This sample page demonstrates the inline editing feature - CKEditor instances will be created automatically
+ from page elements with contentEditable attribute set to value true:
+
<div contenteditable="true" > ... </div>
+
Click inside of any element below to start editing.
+
+
+
+
+
+
+ CKEditor Goes Inline!
+
+
+ Lorem ipsum dolor sit amet dolor duis blandit vestibulum faucibus a, tortor.
+
+
+
+
+
+ Lorem ipsum dolor sit amet enim. Etiam ullamcorper. Suspendisse a pellentesque dui, non felis.
+ Maecenas malesuada elit lectus felis, malesuada ultricies.
+
+
+ Curabitur et ligula. Ut molestie a, ultricies porta urna. Vestibulum commodo volutpat a, convallis
+ ac, laoreet enim. Phasellus fermentum in, dolor. Pellentesque facilisis. Nulla imperdiet sit amet
+ magna. Vestibulum dapibus, mauris nec malesuada fames ac.
+
+
+
+
+
+
+
+
+ Fusce vitae porttitor
+
+
+
+ Lorem ipsum dolor sit amet dolor. Duis blandit vestibulum faucibus a, tortor.
+
+
+
+ Proin nunc justo felis mollis tincidunt, risus risus pede, posuere cubilia Curae, Nullam euismod,
+ enim. Etiam nibh ultricies dolor ac dignissim erat volutpat. Vivamus fermentum nisl nulla sem in metus. Maecenas wisi. Donec nec erat volutpat.
+
+
+
+ Fusce vitae porttitor a, euismod convallis nisl, blandit risus tortor, pretium.
+ Vehicula vitae, imperdiet vel, ornare enim vel sodales rutrum
+
+
+
+
+ Libero nunc, rhoncus ante ipsum non ipsum. Nunc eleifend pede turpis id sollicitudin fringilla.
+ Phasellus ultrices, velit ac arcu.
+
+
+
Pellentesque nunc. Donec suscipit erat. Pellentesque habitant morbi tristique ullamcorper.
+
Mauris mattis feugiat lectus nec mauris. Nullam vitae ante.
+
+
+
+
+
+ Integer condimentum sit amet
+
+
+ Aenean nonummy a, mattis varius. Cras aliquet.
+ Praesent magna non mattis ac, rhoncus nunc, rhoncus eget, cursus
+ pulvinar mollis.
+
Proin id nibh. Sed eu libero posuere sed, lectus. Phasellus dui gravida gravida feugiat mattis ac,
+ felis.
+
Integer condimentum sit amet, tempor elit odio, a dolor non ante at sapien. Sed ac lectus. Nulla
+ ligula quis eleifend mi, id leo velit pede cursus arcu id nulla ac lectus. Phasellus vestibulum.
+ Nunc viverra enim quis diam.
+
+
+
+ Praesent wisi accumsan sit amet nibh
+
+
Donec ullamcorper, risus tortor, pretium porttitor. Morbi quam quis lectus non leo.
+
Integer faucibus scelerisque. Proin faucibus at, aliquet vulputate, odio
+ at eros. Fusce gravida, erat vitae augue. Fusce urna fringilla
+ gravida.
+
In hac habitasse platea dictumst. Praesent wisi accumsan sit amet nibh. Maecenas orci luctus a,
+ lacinia quam sem, posuere commodo, odio condimentum tempor, pede semper risus. Suspendisse pede. In
+ hac habitasse platea dictumst. Nam sed laoreet sit amet erat. Integer.
+
+
+
+
+
+
+
+
Quisque justo neque, mattis sed, fermentum ultrices posuere cubilia Curae,
+ Vestibulum elit metus, quis placerat ut, lectus. Ut sagittis, nunc libero, egestas consequat
+ lobortis velit rutrum ut, faucibus turpis. Fusce porttitor, nulla quis turpis. Nullam laoreet vel,
+ consectetuer tellus suscipit ultricies, hendrerit wisi. Donec odio nec velit ac nunc sit amet,
+ accumsan cursus aliquet. Vestibulum ante sit amet sagittis mi.
+
+ Nullam laoreet vel consectetuer tellus suscipit
+
+
+
Ut sagittis, nunc libero, egestas consequat lobortis velit rutrum ut, faucibus turpis.
Nullam laoreet vel, consectetuer tellus suscipit ultricies, hendrerit wisi. Ut sagittis, nunc libero,
+ egestas consequat lobortis velit rutrum ut, faucibus turpis. Fusce porttitor, nulla quis turpis.
+
Donec odio nec velit ac nunc sit amet, accumsan cursus aliquet. Vestibulum ante sit amet sagittis mi.
+ Sed in nonummy faucibus turpis. Mauris eget tellus. Donec non felis. Nam eget dolor. Vestibulum
+ enim. Donec.
+ This sample shows how to create an inline editor instance of CKEditor. It is created
+ with a JavaScript call using the following code:
+
+
+// This property tells CKEditor to not activate every element with contenteditable=true element.
+CKEDITOR.disableAutoInline = true;
+
+var editor = CKEDITOR.inline( document.getElementById( 'editable' ) );
+
+
+ Note that editable in the code above is the id
+ attribute of the <div> element to be converted into an inline instance.
+
+
+
+
Apollo 11
+
+
Apollo 11 was the spaceflight that landed the first humans, Americans Neil Armstrong and Buzz Aldrin, on the Moon on July 20,
+ 1969, at 20:18 UTC. Armstrong became the first to step onto the lunar surface 6 hours later on July 21 at 02:56
+ UTC.
+
+
Armstrong spent about three and a half two and a half hours outside the spacecraft, Aldrin slightly less;
+ and together they collected 47.5 pounds (21.5 kg) of lunar material for return to Earth. A third member of
+ the mission, Michael Collins, piloted the command
+ spacecraft alone in lunar orbit until Armstrong and Aldrin returned to it for the trip back to Earth.
+
+
Broadcasting and quotes
+
+
Broadcast on live TV to a world-wide audience, Armstrong stepped onto the lunar surface and described the event
+ as:
+
+
+
One small step for [a] man, one giant leap for mankind.
+
+
+
Apollo 11 effectively ended the Space
+ Race and fulfilled a national goal proposed in 1961 by the late U.S. President John F. Kennedy in a speech
+ before the United States Congress:
+
+
+
[...] before this decade is out, of landing a man on the Moon and returning him safely to the Earth.
+
+
+
Technical details
+
+
+
Mission crew
+
+
+
Position
+
Astronaut
+
+
+
+
+
Commander
+
Neil A. Armstrong
+
+
+
Command Module Pilot
+
Michael Collins
+
+
+
Lunar Module Pilot
+
Edwin "Buzz" E. Aldrin, Jr.
+
+
+
+
+
Launched by a Saturn V rocket from Kennedy Space Center in
+ Merritt Island, Florida on July 16, Apollo 11 was the fifth manned mission of NASA's Apollo program. The Apollo
+ spacecraft had three parts:
+
+
+
Command Module with a cabin for the three astronauts which was the only part which landed
+ back on Earth
+
+
Service Module which supported the Command Module with propulsion, electrical power, oxygen
+ and water
+
+
Lunar Module for landing on the Moon.
+
+
+
After being sent to the Moon by the Saturn V's upper stage, the astronauts separated the spacecraft from it
+ and travelled for three days until they entered into lunar orbit. Armstrong and Aldrin then moved into the Lunar
+ Module and landed in the Sea of Tranquility. They stayed a total of about 21
+ and a half hours on the lunar surface. After lifting off in the upper part of the Lunar Module and rejoining
+ Collins in the Command Module, they returned to Earth and landed in the Pacific Ocean on July 24.
+
+ You can also create an inline editor from a textarea
+ element. In this case the textarea will be replaced
+ by a div element with inline editing enabled.
+
+
+// "article-body" is the name of a textarea element.
+var editor = CKEDITOR.inline( 'article-body' );
+
+ This sample shows the advantages of Magicline plugin
+ which is to enhance the editing process. Thanks to this plugin,
+ a number of difficult focus spaces which are inaccessible due to
+ browser issues can now be focused.
+
+
+ Magicline plugin shows a red line with a handler
+ which, when clicked, inserts a paragraph and allows typing. To see this,
+ focus an editor and move your mouse above the focus space you want
+ to access. The plugin is enabled by default so no additional
+ configuration is necessary.
+
+ This sample shows how to configure CKEditor instances to use the
+ Placeholder plugin that lets you insert read-only elements
+ into your content. To enter and modify read-only text, use the
+ Create Placeholder button and
+ its matching dialog window.
+
+
+ To add a CKEditor instance that uses the placeholder plugin and a related
+ Create Placeholder toolbar
+ button, insert the following JavaScript
+ call to your code:
+
+ This sample shows how to use the
+ setReadOnly
+ API to put editor into the read-only state that makes it impossible for users to change the editor contents.
+
+
+ For details on how to create this setup check the source code of this sample page.
+
+
+
+
+
+
diff --git a/public/packages/summerblue/administrator/js/ckeditor/samples/old/replacebyclass.html b/public/packages/summerblue/administrator/js/ckeditor/samples/old/replacebyclass.html
new file mode 100644
index 0000000..28fc2b6
--- /dev/null
+++ b/public/packages/summerblue/administrator/js/ckeditor/samples/old/replacebyclass.html
@@ -0,0 +1,63 @@
+
+
+
+
+
+ Replace Textareas by Class Name — CKEditor Sample
+
+
+
+
+
'
+ );
+ warn.insertBefore(editor.container);
+ }
+ }
+
+ // Set icons.
+ var doc = new CKEDITOR.dom.document(document),
+ icons = doc.find('.button_icon');
+
+ for (i = 0; i < icons.count(); i++) {
+ var icon = icons.getItem(i),
+ name = icon.getAttribute('data-icon'),
+ style = CKEDITOR.skin.getIconStyle(name, (CKEDITOR.lang.dir == 'rtl'));
+
+ icon.addClass('cke_button_icon');
+ icon.addClass('cke_button__' + name + '_icon');
+ icon.setAttribute('style', style);
+ icon.setStyle('float', 'none');
+
+ }
+ });
+})();
diff --git a/public/packages/summerblue/administrator/js/ckeditor/samples/old/sample_posteddata.php b/public/packages/summerblue/administrator/js/ckeditor/samples/old/sample_posteddata.php
new file mode 100644
index 0000000..091f720
--- /dev/null
+++ b/public/packages/summerblue/administrator/js/ckeditor/samples/old/sample_posteddata.php
@@ -0,0 +1,17 @@
+
+
+-------------------------------------------------------------------------------------------
+ CKEditor - Posted Data
+
+ We are sorry, but your Web server does not support the PHP language used in this script.
+
+ Please note that CKEditor can be used with any other server-side language than just PHP.
+ To save the content created with CKEditor you need to read the POST data on the server
+ side and write it to a file or the database.
+
+ Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
+ For licensing, see LICENSE.md or http://ckeditor.com/license
+-------------------------------------------------------------------------------------------
+
+
+ This sample shows several editor instances that share the very same spaces for both the toolbar and the bottom
+ bar.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Integer condimentum sit amet
+
+
+ Aenean nonummy a, mattis varius. Cras aliquet.
+ Praesent magna non mattis ac, rhoncus nunc, rhoncus eget, cursus pulvinar
+ mollis.
+
Proin id nibh. Sed eu libero posuere sed, lectus. Phasellus dui gravida gravida feugiat mattis ac, felis.
+
Integer condimentum sit amet, tempor elit odio, a dolor non ante at sapien. Sed ac lectus. Nulla ligula quis
+ eleifend mi, id leo velit pede cursus arcu id nulla ac lectus. Phasellus vestibulum. Nunc viverra enim quis
+ diam.
+
+
+
+ Praesent wisi accumsan sit amet nibh
+
+
Donec ullamcorper, risus tortor, pretium porttitor. Morbi quam quis lectus non leo.
+
Integer faucibus scelerisque. Proin faucibus at, aliquet vulputate, odio at eros.
+ Fusce gravida, erat vitae augue. Fusce urna fringilla gravida.
+
In hac habitasse platea dictumst. Praesent wisi accumsan sit amet nibh. Maecenas orci luctus a, lacinia quam
+ sem, posuere commodo, odio condimentum tempor, pede semper risus. Suspendisse pede. In hac habitasse platea
+ dictumst. Nam sed laoreet sit amet erat. Integer.
+ Sourcedialog plugin provides an easy way to edit raw HTML content
+ of an editor, similarly to what is possible with Sourcearea
+ plugin for classic (iframe-based) instances but using dialogs. Thanks to that, it's also possible
+ to manipulate raw content of inline editor instances.
+
+
+ This plugin extends the toolbar with a button,
+ which opens a dialog window with a source code editor. It works with both classic
+ and inline instances. To enable this
+ plugin, basically add extraPlugins: 'sourcedialog' to editor's
+ config:
+
+ Note that you may want to include removePlugins: 'sourcearea'
+ in your config when using Sourcedialog in classic editor instances.
+ This prevents feature redundancy.
+
+
+ Note that editable in the code above is the id
+ attribute of the <div> element to be converted into an inline instance.
+
+
+ Note that textarea_id in the code above is the id attribute of
+ the <textarea> element to be replaced with CKEditor.
+
+ This sample shows how to configure CKEditor instances to use the
+ Stylesheet Parser (stylesheetparser) plugin that fills
+ the Styles drop-down list based on the CSS rules available in the document stylesheet.
+
+
+ To add a CKEditor instance using the stylesheetparser plugin, insert
+ the following JavaScript call into your code:
+
+ This sample shows how tab key navigation among editor instances is
+ affected by the tabIndex attribute from
+ the original page element. Use TAB key to move between the editors.
+
+ This sample shows how to configure CKEditor instances to use the
+ TableResize (tableresize) plugin that allows
+ the user to edit table columns by using the mouse.
+
+
+ The TableResize plugin makes it possible to modify table column width. Hover
+ your mouse over the column border to see the cursor change to indicate that
+ the column can be resized. Click and drag your mouse to set the desired width.
+
+
+ By default the plugin is turned off. To add a CKEditor instance using the
+ TableResize plugin, insert the following JavaScript call into your code:
+
+ This sample page demonstrates editor with loaded full toolbar (all registered
+ buttons) and, if
+ current editor's configuration modifies default settings, also editor with modified
+ toolbar.
+
+
+
Since CKEditor 4 there are two ways to configure toolbar buttons.
+ You can explicitly define which buttons are displayed in which groups and in which order.
+ This is the more precise setting, but less flexible. If newly added plugin adds its
+ own button you'll have to add it manually to your config.toolbar setting as well.
+
+
+
To add a CKEditor instance with custom toolbar setting, insert the following JavaScript call to your code:
+
+
+CKEDITOR.replace( 'textarea_id', {
+ toolbar: [
+ { name: 'document', items: [ 'Source', '-', 'NewPage', 'Preview', '-', 'Templates' ] }, // Defines toolbar group with name (used to create voice label) and items in 3 subgroups.
+ [ 'Cut', 'Copy', 'Paste', 'PasteText', 'PasteFromWord', '-', 'Undo', 'Redo' ], // Defines toolbar group without name.
+ '/', // Line break - next group will be placed in new line.
+ { name: 'basicstyles', items: [ 'Bold', 'Italic' ] }
+ ]
+});
+ You can define which groups of buttons (like e.g. basicstyles, clipboard
+ and forms) are displayed and in which order. Registered buttons are associated
+ with toolbar groups by toolbar property in their definition.
+ This setting's advantage is that you don't have to modify toolbar configuration
+ when adding/removing plugins which register their own buttons.
+
+
+
To add a CKEditor instance with custom toolbar groups setting, insert the following JavaScript call to your
+ code:
+
+
+CKEDITOR.replace( 'textarea_id', {
+ toolbarGroups: [
+ { name: 'document', groups: [ 'mode', 'document' ] }, // Displays document group with its two subgroups.
+ { name: 'clipboard', groups: [ 'clipboard', 'undo' ] }, // Group's name will be used to create voice label.
+ '/', // Line break - next group will be placed in new line.
+ { name: 'basicstyles', groups: [ 'basicstyles', 'cleanup' ] },
+ { name: 'links' }
+ ]
+
+ // NOTE: Remember to leave 'toolbar' property with the default value (null).
+});
+
+
+
+
Current toolbar configuration
+
Below you can see editor with current toolbar definition.
+
+
+
+
+
+
Full toolbar configuration
+
Below you can see editor with full toolbar, generated automatically by the editor.
+
+ Note: To create editor instance with full toolbar you don't have to set anything.
+ Just leave toolbar and toolbarGroups with the default, null values.
+
+ This sample shows how to automatically replace <textarea> elements
+ with a CKEditor instance with an option to change the color of its user interface.
+ Note:The UI skin color feature depends on the CKEditor skin
+ compatibility. The Moono and Kama skins are examples of skins that work with it.
+
+ This sample shows how to use the UI Color picker toolbar button to preview the skin color of the editor.
+ Note:The UI skin color feature depends on the CKEditor skin
+ compatibility. The Moono and Kama skins are examples of skins that work with it.
+
+ This sample shows how to automatically replace <textarea> elements
+ with a CKEditor instance with an option to change the language of its user interface.
+
+
+ It pulls the language list from CKEditor _languages.js file that contains the list of supported
+ languages and creates
+ a drop-down list that lets the user change the UI language.
+
+
+ By default, CKEditor automatically localizes the editor to the language of the user.
+ The UI language can be controlled with two configuration options:
+ language
+ and
+
+ defaultLanguage. The defaultLanguage setting specifies the
+ default CKEditor language to be used when a localization suitable for user's settings is not available.
+
+
+ To specify the user interface language that will be used no matter what language is
+ specified in user's browser or operating system, set the language property:
+
+
+CKEDITOR.replace( 'textarea_id', {
+ // Load the German interface.
+ language: 'de'
+});
+
+ Note that textarea_id in the code above is the id attribute of
+ the <textarea> element to be replaced.
+
+ Note that textarea_id in the code above is the id attribute of
+ the <textarea> element to be replaced.
+
+
+ The allowedContent in the code above is set to true to disable content
+ filtering.
+ Setting this option is not obligatory, but in full page mode there is a strong chance that one may want be able
+ to freely enter any HTML content in source mode without any limitations.
+
+ This sample shows how to configure CKEditor to output valid
+ XHTML 1.1 code.
+ Deprecated elements (<font>, <u>) or attributes
+ (size, face) will be replaced with XHTML compliant code.
+
+
+ To add a CKEditor instance outputting valid XHTML code, load the editor using a standard
+ JavaScript call and define CKEditor features to use the XHTML compliant elements and styles.
+
+
+ A snippet of the configuration code can be seen below; check the source of this page for
+ full definition:
+
You can replace the content of the config.js
+ file with the generated configuration. If you already set some configuration options you
+ will need to merge both configurations.
+
+
+
Read more about different ways of setting configuration
+ and do not forget about clearing browser cache.
+
Arranging toolbar groups is the recommended way of configuring the toolbar, but if you
+ need more freedom you can use the advanced configurator.
You can replace the content of the config.js
+ file with the generated configuration. If you already set some configuration options you
+ will need to merge both configurations.
+
+
+
Read more about different ways of setting configuration
+ and do not forget about clearing browser cache.