").css({
position: "absolute",
width: e.outerWidth(),
height: e.outerHeight()
}).appendTo(e.parent()).offset(e.offset())[0]
})
},
_unblockFrames: function() {
this.iframeBlocks && (this.iframeBlocks.remove(), delete this.iframeBlocks)
},
_allowInteraction: function(e) {
return !!t(e.target).closest(".ui-dialog").length || !!t(e.target).closest(".ui-datepicker").length
},
_createOverlay: function() {
if (this.options.modal) {
var e = !0;
this._delay(function() {
e = !1
}), this.document.data("ui-dialog-overlays") || this._on(this.document, {
focusin: function(t) {
e || this._allowInteraction(t) || (t.preventDefault(), this._trackingInstances()[0]._focusTabbable())
}
}), this.overlay = t("
").addClass("ui-widget-overlay ui-front").appendTo(this._appendTo()), this._on(this.overlay, {
mousedown: "_keepFocus"
}), this.document.data("ui-dialog-overlays", (this.document.data("ui-dialog-overlays") || 0) + 1)
}
},
_destroyOverlay: function() {
if (this.options.modal && this.overlay) {
var t = this.document.data("ui-dialog-overlays") - 1;
t ? this.document.data("ui-dialog-overlays", t) : this.document.unbind("focusin").removeData("ui-dialog-overlays"), this.overlay.remove(), this.overlay = null
}
}
});
t.widget("ui.droppable", {
version: "1.11.4",
widgetEventPrefix: "drop",
options: {
accept: "*",
activeClass: !1,
addClasses: !0,
greedy: !1,
hoverClass: !1,
scope: "default",
tolerance: "intersect",
activate: null,
deactivate: null,
drop: null,
out: null,
over: null
},
_create: function() {
var e, i = this.options,
s = i.accept;
this.isover = !1, this.isout = !0, this.accept = t.isFunction(s) ? s : function(t) {
return t.is(s)
}, this.proportions = function() {
if (!arguments.length) return e || (e = {
width: this.element[0].offsetWidth,
height: this.element[0].offsetHeight
});
e = arguments[0]
}, this._addToManager(i.scope), i.addClasses && this.element.addClass("ui-droppable")
},
_addToManager: function(e) {
t.ui.ddmanager.droppables[e] = t.ui.ddmanager.droppables[e] || [], t.ui.ddmanager.droppables[e].push(this)
},
_splice: function(t) {
for (var e = 0; e < t.length; e++) t[e] === this && t.splice(e, 1)
},
_destroy: function() {
var e = t.ui.ddmanager.droppables[this.options.scope];
this._splice(e), this.element.removeClass("ui-droppable ui-droppable-disabled")
},
_setOption: function(e, i) {
if ("accept" === e) this.accept = t.isFunction(i) ? i : function(t) {
return t.is(i)
};
else if ("scope" === e) {
var s = t.ui.ddmanager.droppables[this.options.scope];
this._splice(s), this._addToManager(i)
}
this._super(e, i)
},
_activate: function(e) {
var i = t.ui.ddmanager.current;
this.options.activeClass && this.element.addClass(this.options.activeClass), i && this._trigger("activate", e, this.ui(i))
},
_deactivate: function(e) {
var i = t.ui.ddmanager.current;
this.options.activeClass && this.element.removeClass(this.options.activeClass), i && this._trigger("deactivate", e, this.ui(i))
},
_over: function(e) {
var i = t.ui.ddmanager.current;
i && (i.currentItem || i.element)[0] !== this.element[0] && this.accept.call(this.element[0], i.currentItem || i.element) && (this.options.hoverClass && this.element.addClass(this.options.hoverClass), this._trigger("over", e, this.ui(i)))
},
_out: function(e) {
var i = t.ui.ddmanager.current;
i && (i.currentItem || i.element)[0] !== this.element[0] && this.accept.call(this.element[0], i.currentItem || i.element) && (this.options.hoverClass && this.element.removeClass(this.options.hoverClass), this._trigger("out", e, this.ui(i)))
},
_drop: function(e, i) {
var s = i || t.ui.ddmanager.current,
n = !1;
return !(!s || (s.currentItem || s.element)[0] === this.element[0]) && (this.element.find(":data(ui-droppable)").not(".ui-draggable-dragging").each(function() {
var i = t(this).droppable("instance");
if (i.options.greedy && !i.options.disabled && i.options.scope === s.options.scope && i.accept.call(i.element[0], s.currentItem || s.element) && t.ui.intersect(s, t.extend(i, {
offset: i.element.offset()
}), i.options.tolerance, e)) return n = !0, !1
}), !n && (!!this.accept.call(this.element[0], s.currentItem || s.element) && (this.options.activeClass && this.element.removeClass(this.options.activeClass), this.options.hoverClass && this.element.removeClass(this.options.hoverClass), this._trigger("drop", e, this.ui(s)), this.element)))
},
ui: function(t) {
return {
draggable: t.currentItem || t.element,
helper: t.helper,
position: t.position,
offset: t.positionAbs
}
}
}), t.ui.intersect = function() {
function t(t, e, i) {
return t >= e && t < e + i
}
return function(e, i, s, n) {
if (!i.offset) return !1;
var o = (e.positionAbs || e.position.absolute).left + e.margins.left,
a = (e.positionAbs || e.position.absolute).top + e.margins.top,
r = o + e.helperProportions.width,
h = a + e.helperProportions.height,
l = i.offset.left,
c = i.offset.top,
u = l + i.proportions().width,
d = c + i.proportions().height;
switch (s) {
case "fit":
return l <= o && r <= u && c <= a && h <= d;
case "intersect":
return l < o + e.helperProportions.width / 2 && r - e.helperProportions.width / 2 < u && c < a + e.helperProportions.height / 2 && h - e.helperProportions.height / 2 < d;
case "pointer":
return t(n.pageY, c, i.proportions().height) && t(n.pageX, l, i.proportions().width);
case "touch":
return (a >= c && a <= d || h >= c && h <= d || a < c && h > d) && (o >= l && o <= u || r >= l && r <= u || o < l && r > u);
default:
return !1
}
}
}(), t.ui.ddmanager = {
current: null,
droppables: {
default: []
},
prepareOffsets: function(e, i) {
var s, n, o = t.ui.ddmanager.droppables[e.options.scope] || [],
a = i ? i.type : null,
r = (e.currentItem || e.element).find(":data(ui-droppable)").addBack();
t: for (s = 0; s < o.length; s++)
if (!(o[s].options.disabled || e && !o[s].accept.call(o[s].element[0], e.currentItem || e.element))) {
for (n = 0; n < r.length; n++)
if (r[n] === o[s].element[0]) {
o[s].proportions().height = 0;
continue t
}
o[s].visible = "none" !== o[s].element.css("display"), o[s].visible && ("mousedown" === a && o[s]._activate.call(o[s], i), o[s].offset = o[s].element.offset(), o[s].proportions({
width: o[s].element[0].offsetWidth,
height: o[s].element[0].offsetHeight
}))
}
},
drop: function(e, i) {
var s = !1;
return t.each((t.ui.ddmanager.droppables[e.options.scope] || []).slice(), function() {
this.options && (!this.options.disabled && this.visible && t.ui.intersect(e, this, this.options.tolerance, i) && (s = this._drop.call(this, i) || s), !this.options.disabled && this.visible && this.accept.call(this.element[0], e.currentItem || e.element) && (this.isout = !0, this.isover = !1, this._deactivate.call(this, i)))
}), s
},
dragStart: function(e, i) {
e.element.parentsUntil("body").bind("scroll.droppable", function() {
e.options.refreshPositions || t.ui.ddmanager.prepareOffsets(e, i)
})
},
drag: function(e, i) {
e.options.refreshPositions && t.ui.ddmanager.prepareOffsets(e, i), t.each(t.ui.ddmanager.droppables[e.options.scope] || [], function() {
if (!this.options.disabled && !this.greedyChild && this.visible) {
var s, n, o, a = t.ui.intersect(e, this, this.options.tolerance, i),
r = !a && this.isover ? "isout" : a && !this.isover ? "isover" : null;
r && (this.options.greedy && (n = this.options.scope, (o = this.element.parents(":data(ui-droppable)").filter(function() {
return t(this).droppable("instance").options.scope === n
})).length && ((s = t(o[0]).droppable("instance")).greedyChild = "isover" === r)), s && "isover" === r && (s.isover = !1, s.isout = !0, s._out.call(s, i)), this[r] = !0, this["isout" === r ? "isover" : "isout"] = !1, this["isover" === r ? "_over" : "_out"].call(this, i), s && "isout" === r && (s.isout = !1, s.isover = !0, s._over.call(s, i)))
}
})
},
dragStop: function(e, i) {
e.element.parentsUntil("body").unbind("scroll.droppable"), e.options.refreshPositions || t.ui.ddmanager.prepareOffsets(e, i)
}
};
t.ui.droppable;
var _ = t;
t.effects = {
effect: {}
},
function(t, e) {
function i(t, e, i) {
var s = c[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 : s.max < t ? s.max : t)
}
function s(e) {
var i = h(),
s = i._rgba = [];
return e = e.toLowerCase(), p(r, function(t, n) {
var o, a = n.re.exec(e),
r = a && n.parse(a),
h = n.space || "rgba";
if (r) return o = i[h](r), i[l[h].cache] = o[l[h].cache], s = i._rgba = o._rgba, !1
}), s.length ? ("0,0,0,0" === s.join() && t.extend(s, o.transparent), i) : o[e]
}
function n(t, e, i) {
return i = (i + 1) % 1, 6 * i < 1 ? t + (e - t) * i * 6 : 2 * i < 1 ? e : 3 * i < 2 ? t + (e - t) * (2 / 3 - i) * 6 : t
}
var o, a = /^([\-+])=\s*(\d+\.?\d*)/,
r = [{
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]]
}
}],
h = t.Color = function(e, i, s, n) {
return new t.Color.fn.parse(e, i, s, n)
},
l = {
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"
}
}
}
},
c = {
byte: {
floor: !0,
max: 255
},
percent: {
max: 1
},
degrees: {
mod: 360,
floor: !0
}
},
u = h.support = {},
d = t("
")[0],
p = t.each;
d.style.cssText = "background-color:rgba(1,1,1,.5)", u.rgba = d.style.backgroundColor.indexOf("rgba") > -1, p(l, function(t, e) {
e.cache = "_" + t, e.props.alpha = {
idx: 3,
type: "percent",
def: 1
}
}), h.fn = t.extend(h.prototype, {
parse: function(e, n, a, r) {
if (void 0 === e) return this._rgba = [null, null, null, null], this;
(e.jquery || e.nodeType) && (e = t(e).css(n), n = void 0);
var c = this,
u = t.type(e),
d = this._rgba = [];
return void 0 !== n && (e = [e, n, a, r], u = "array"), "string" === u ? this.parse(s(e) || o._default) : "array" === u ? (p(l.rgba.props, function(t, s) {
d[s.idx] = i(e[s.idx], s)
}), this) : "object" === u ? (e instanceof h ? p(l, function(t, i) {
e[i.cache] && (c[i.cache] = e[i.cache].slice())
}) : p(l, function(s, n) {
var o = n.cache;
p(n.props, function(t, s) {
if (!c[o] && n.to) {
if ("alpha" === t || null == e[t]) return;
c[o] = n.to(c._rgba)
}
c[o][s.idx] = i(e[t], s, !0)
}), c[o] && t.inArray(null, c[o].slice(0, 3)) < 0 && (c[o][3] = 1, n.from && (c._rgba = n.from(c[o])))
}), this) : void 0
},
is: function(t) {
var e = h(t),
i = !0,
s = this;
return p(l, function(t, n) {
var o, a = e[n.cache];
return a && (o = s[n.cache] || n.to && n.to(s._rgba) || [], p(n.props, function(t, e) {
if (null != a[e.idx]) return i = a[e.idx] === o[e.idx]
})), i
}), i
},
_space: function() {
var t = [],
e = this;
return p(l, function(i, s) {
e[s.cache] && t.push(i)
}), t.pop()
},
transition: function(t, e) {
var s = h(t),
n = s._space(),
o = l[n],
a = 0 === this.alpha() ? h("transparent") : this,
r = a[o.cache] || o.to(a._rgba),
u = r.slice();
return s = s[o.cache], p(o.props, function(t, n) {
var o = n.idx,
a = r[o],
h = s[o],
l = c[n.type] || {};
null !== h && (null === a ? u[o] = h : (l.mod && (h - a > l.mod / 2 ? a += l.mod : a - h > l.mod / 2 && (a -= l.mod)), u[o] = i((h - a) * e + a, n)))
}), this[n](u)
},
blend: function(e) {
if (1 === this._rgba[3]) return this;
var i = this._rgba.slice(),
s = i.pop(),
n = h(e)._rgba;
return h(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 && e < 3 && (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()
}
}), h.fn.parse.prototype = h.fn, l.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,
o = t[2] / 255,
a = t[3],
r = Math.max(s, n, o),
h = Math.min(s, n, o),
l = r - h,
c = r + h,
u = .5 * c;
return e = h === r ? 0 : s === r ? 60 * (n - o) / l + 360 : n === r ? 60 * (o - s) / l + 120 : 60 * (s - n) / l + 240, i = 0 === l ? 0 : u <= .5 ? l / c : l / (2 - c), [Math.round(e) % 360, i, u, null == a ? 1 : a]
}, l.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],
o = t[3],
a = s <= .5 ? s * (1 + i) : s + i - s * i,
r = 2 * s - a;
return [Math.round(255 * n(r, a, e + 1 / 3)), Math.round(255 * n(r, a, e)), Math.round(255 * n(r, a, e - 1 / 3)), o]
}, p(l, function(e, s) {
var n = s.props,
o = s.cache,
r = s.to,
l = s.from;
h.fn[e] = function(e) {
if (r && !this[o] && (this[o] = r(this._rgba)), void 0 === e) return this[o].slice();
var s, a = t.type(e),
c = "array" === a || "object" === a ? e : arguments,
u = this[o].slice();
return p(n, function(t, e) {
var s = c["object" === a ? t : e.idx];
null == s && (s = u[e.idx]), u[e.idx] = i(s, e)
}), l ? (s = h(l(u)), s[o] = u, s) : h(u)
}, p(n, function(i, s) {
h.fn[i] || (h.fn[i] = function(n) {
var o, r = t.type(n),
h = "alpha" === i ? this._hsla ? "hsla" : "rgba" : e,
l = this[h](),
c = l[s.idx];
return "undefined" === r ? c : ("function" === r && (n = n.call(this, c), r = t.type(n)), null == n && s.empty ? this : ("string" === r && (o = a.exec(n)) && (n = c + parseFloat(o[2]) * ("+" === o[1] ? 1 : -1)), l[s.idx] = n, this[h](l)))
})
})
}), h.hook = function(e) {
var i = e.split(" ");
p(i, function(e, i) {
t.cssHooks[i] = {
set: function(e, n) {
var o, a, r = "";
if ("transparent" !== n && ("string" !== t.type(n) || (o = s(n)))) {
if (n = h(o || n), !u.rgba && 1 !== n._rgba[3]) {
for (a = "backgroundColor" === i ? e.parentNode : e;
("" === r || "transparent" === r) && a && a.style;) try {
r = t.css(a, "backgroundColor"), a = a.parentNode
} catch (t) {}
n = n.blend(r && "transparent" !== r ? r : "_default")
}
n = n.toRgbaString()
}
try {
e.style[i] = n
} catch (t) {}
}
}, t.fx.step[i] = function(e) {
e.colorInit || (e.start = h(e.elem, i), e.end = h(e.end), e.colorInit = !0), t.cssHooks[i].set(e.elem, e.start.transition(e.end, e.pos))
}
})
}, h.hook("backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor"), t.cssHooks.borderColor = {
expand: function(t) {
var e = {};
return p(["Top", "Right", "Bottom", "Left"], function(i, s) {
e["border" + s + "Color"] = t
}), e
}
}, o = 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"
}
}(_),
function() {
function e(e) {
var i, s, n = e.ownerDocument.defaultView ? e.ownerDocument.defaultView.getComputedStyle(e, null) : e.currentStyle,
o = {};
if (n && n.length && n[0] && n[n[0]])
for (s = n.length; s--;) "string" == typeof n[i = n[s]] && (o[t.camelCase(i)] = n[i]);
else
for (i in n) "string" == typeof n[i] && (o[i] = n[i]);
return o
}
function i(e, i) {
var s, o, a = {};
for (s in i) o = i[s], e[s] !== o && (n[s] || !t.fx.step[s] && isNaN(parseFloat(o)) || (a[s] = o));
return a
}
var s = ["add", "remove", "toggle"],
n = {
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) && (_.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(n, o, a, r) {
var h = t.speed(o, a, r);
return this.queue(function() {
var o, a = t(this),
r = a.attr("class") || "",
l = h.children ? a.find("*").addBack() : a;
l = l.map(function() {
return {
el: t(this),
start: e(this)
}
}), (o = function() {
t.each(s, function(t, e) {
n[e] && a[e + "Class"](n[e])
})
})(), l = l.map(function() {
return this.end = e(this.el[0]), this.diff = i(this.start, this.end), this
}), a.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() {
o(), t.each(arguments, function() {
var e = this.el;
t.each(this.diff, function(t) {
e.css(t, "")
})
}), h.complete.call(a[0])
})
})
}, t.fn.extend({
addClass: function(e) {
return function(i, s, n, o) {
return s ? t.effects.animateClass.call(this, {
add: i
}, s, n, o) : e.apply(this, arguments)
}
}(t.fn.addClass),
removeClass: function(e) {
return function(i, s, n, o) {
return arguments.length > 1 ? t.effects.animateClass.call(this, {
remove: i
}, s, n, o) : e.apply(this, arguments)
}
}(t.fn.removeClass),
toggleClass: function(e) {
return function(i, s, n, o, a) {
return "boolean" == typeof s || void 0 === s ? n ? t.effects.animateClass.call(this, s ? {
add: i
} : {
remove: i
}, n, o, a) : e.apply(this, arguments) : t.effects.animateClass.call(this, {
toggle: i
}, s, n, o)
}
}(t.fn.toggleClass),
switchClass: function(e, i, s, n, o) {
return t.effects.animateClass.call(this, {
add: i,
remove: e
}, s, n, o)
}
})
}(),
function() {
function e(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 i(e) {
return !(e && "number" != typeof e && !t.fx.speeds[e]) || ("string" == typeof e && !t.effects.effect[e] || (!!t.isFunction(e) || "object" == typeof e && !e.effect))
}
t.extend(t.effects, {
version: "1.11.4",
save: function(t, e) {
for (var i = 0; i < e.length; i++) null !== e[i] && t.data("ui-effects-" + e[i], t[0].style[e[i]])
},
restore: function(t, e) {
var i, s;
for (s = 0; s < e.length; s++) null !== e[s] && (void 0 === (i = t.data("ui-effects-" + e[s])) && (i = ""), t.css(e[s], i))
},
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()
},
o = document.activeElement;
try {
o.id
} catch (t) {
o = document.body
}
return e.wrap(s), (e[0] === o || t.contains(e[0], o)) && t(o).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 o = e.cssUnit(i);
o[0] > 0 && (n[i] = o[0] * s + o[1])
}), n
}
}), t.fn.extend({
effect: function() {
function i(e) {
function i() {
t.isFunction(o) && o.call(n[0]), t.isFunction(e) && e()
}
var n = t(this),
o = s.complete,
r = s.mode;
(n.is(":hidden") ? "hide" === r : "show" === r) ? (n[r](), i()) : a.call(n[0], s, i)
}
var s = e.apply(this, arguments),
n = s.mode,
o = s.queue,
a = t.effects.effect[s.effect];
return t.fx.off || !a ? n ? this[n](s.duration, s.complete) : this.each(function() {
s.complete && s.complete.call(this)
}) : !1 === o ? this.each(i) : this.queue(o || "fx", i)
},
show: function(t) {
return function(s) {
if (i(s)) return t.apply(this, arguments);
var n = e.apply(this, arguments);
return n.mode = "show", this.effect.call(this, n)
}
}(t.fn.show),
hide: function(t) {
return function(s) {
if (i(s)) return t.apply(this, arguments);
var n = e.apply(this, arguments);
return n.mode = "hide", this.effect.call(this, n)
}
}(t.fn.hide),
toggle: function(t) {
return function(s) {
if (i(s) || "boolean" == typeof s) return t.apply(this, arguments);
var n = e.apply(this, arguments);
return n.mode = "toggle", this.effect.call(this, n)
}
}(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; t < ((e = Math.pow(2, --i)) - 1) / 11;);
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 t < .5 ? i(2 * t) / 2 : 1 - i(-2 * t + 2) / 2
}
})
}();
t.effects, t.effects.effect.blind = function(e, i) {
var s, n, o, a = t(this),
r = /up|down|vertical/,
h = /up|left|vertical|horizontal/,
l = ["position", "top", "bottom", "left", "right", "height", "width"],
c = t.effects.setMode(a, e.mode || "hide"),
u = e.direction || "up",
d = r.test(u),
p = d ? "height" : "width",
f = d ? "top" : "left",
m = h.test(u),
g = {},
v = "show" === c;
a.parent().is(".ui-effects-wrapper") ? t.effects.save(a.parent(), l) : t.effects.save(a, l), a.show(), n = (s = t.effects.createWrapper(a).css({
overflow: "hidden"
}))[p](), o = parseFloat(s.css(f)) || 0, g[p] = v ? n : 0, m || (a.css(d ? "bottom" : "right", 0).css(d ? "top" : "left", "auto").css({
position: "absolute"
}), g[f] = v ? o : n + o), v && (s.css(p, 0), m || s.css(f, o + n)), s.animate(g, {
duration: e.duration,
easing: e.easing,
queue: !1,
complete: function() {
"hide" === c && a.hide(), t.effects.restore(a, l), t.effects.removeWrapper(a), i()
}
})
}, t.effects.effect.bounce = function(e, i) {
var s, n, o, a = t(this),
r = ["position", "top", "bottom", "left", "right", "height", "width"],
h = t.effects.setMode(a, e.mode || "effect"),
l = "hide" === h,
c = "show" === h,
u = e.direction || "up",
d = e.distance,
p = e.times || 5,
f = 2 * p + (c || l ? 1 : 0),
m = e.duration / f,
g = e.easing,
v = "up" === u || "down" === u ? "top" : "left",
_ = "up" === u || "left" === u,
b = a.queue(),
y = b.length;
for ((c || l) && r.push("opacity"), t.effects.save(a, r), a.show(), t.effects.createWrapper(a), d || (d = a["top" === v ? "outerHeight" : "outerWidth"]() / 3), c && ((o = {
opacity: 1
})[v] = 0, a.css("opacity", 0).css(v, _ ? 2 * -d : 2 * d).animate(o, m, g)), l && (d /= Math.pow(2, p - 1)), (o = {})[v] = 0, s = 0; s < p; s++)(n = {})[v] = (_ ? "-=" : "+=") + d, a.animate(n, m, g).animate(o, m, g), d = l ? 2 * d : d / 2;
l && ((n = {
opacity: 0
})[v] = (_ ? "-=" : "+=") + d, a.animate(n, m, g)), a.queue(function() {
l && a.hide(), t.effects.restore(a, r), t.effects.removeWrapper(a), i()
}), y > 1 && b.splice.apply(b, [1, 0].concat(b.splice(y, f + 1))), a.dequeue()
}, t.effects.effect.clip = function(e, i) {
var s, n, o, a = t(this),
r = ["position", "top", "bottom", "left", "right", "height", "width"],
h = "show" === t.effects.setMode(a, e.mode || "hide"),
l = "vertical" === (e.direction || "vertical"),
c = l ? "height" : "width",
u = l ? "top" : "left",
d = {};
t.effects.save(a, r), a.show(), s = t.effects.createWrapper(a).css({
overflow: "hidden"
}), o = (n = "IMG" === a[0].tagName ? s : a)[c](), h && (n.css(c, 0), n.css(u, o / 2)), d[c] = h ? o : 0, d[u] = h ? 0 : o / 2, n.animate(d, {
queue: !1,
duration: e.duration,
easing: e.easing,
complete: function() {
h || a.hide(), t.effects.restore(a, r), t.effects.removeWrapper(a), i()
}
})
}, t.effects.effect.drop = function(e, i) {
var s, n = t(this),
o = ["position", "top", "bottom", "left", "right", "opacity", "height", "width"],
a = t.effects.setMode(n, e.mode || "hide"),
r = "show" === a,
h = e.direction || "left",
l = "up" === h || "down" === h ? "top" : "left",
c = "up" === h || "left" === h ? "pos" : "neg",
u = {
opacity: r ? 1 : 0
};
t.effects.save(n, o), n.show(), t.effects.createWrapper(n), s = e.distance || n["top" === l ? "outerHeight" : "outerWidth"](!0) / 2, r && n.css("opacity", 0).css(l, "pos" === c ? -s : s), u[l] = (r ? "pos" === c ? "+=" : "-=" : "pos" === c ? "-=" : "+=") + s, n.animate(u, {
queue: !1,
duration: e.duration,
easing: e.easing,
complete: function() {
"hide" === a && n.hide(), t.effects.restore(n, o), t.effects.removeWrapper(n), i()
}
})
}, t.effects.effect.explode = function(e, i) {
function s() {
d.css({
visibility: "visible"
}), t(v).remove(), p || d.hide(), i()
}
var n, o, a, r, h, l, c = e.pieces ? Math.round(Math.sqrt(e.pieces)) : 3,
u = c,
d = t(this),
p = "show" === t.effects.setMode(d, e.mode || "hide"),
f = d.show().css("visibility", "hidden").offset(),
m = Math.ceil(d.outerWidth() / u),
g = Math.ceil(d.outerHeight() / c),
v = [];
for (n = 0; n < c; n++)
for (r = f.top + n * g, l = n - (c - 1) / 2, o = 0; o < u; o++) a = f.left + o * m, h = o - (u - 1) / 2, d.clone().appendTo("body").wrap("
").css({
position: "absolute",
visibility: "visible",
left: -o * m,
top: -n * g
}).parent().addClass("ui-effects-explode").css({
position: "absolute",
overflow: "hidden",
width: m,
height: g,
left: a + (p ? h * m : 0),
top: r + (p ? l * g : 0),
opacity: p ? 0 : 1
}).animate({
left: a + (p ? 0 : h * m),
top: r + (p ? 0 : l * g),
opacity: p ? 1 : 0
}, e.duration || 500, e.easing, function() {
v.push(this), v.length === c * u && s()
})
}, t.effects.effect.fade = function(e, i) {
var s = t(this),
n = t.effects.setMode(s, e.mode || "toggle");
s.animate({
opacity: n
}, {
queue: !1,
duration: e.duration,
easing: e.easing,
complete: i
})
}, t.effects.effect.fold = function(e, i) {
var s, n, o = t(this),
a = ["position", "top", "bottom", "left", "right", "height", "width"],
r = t.effects.setMode(o, e.mode || "hide"),
h = "show" === r,
l = "hide" === r,
c = e.size || 15,
u = /([0-9]+)%/.exec(c),
d = !!e.horizFirst,
p = h !== d,
f = p ? ["width", "height"] : ["height", "width"],
m = e.duration / 2,
g = {},
v = {};
t.effects.save(o, a), o.show(), s = t.effects.createWrapper(o).css({
overflow: "hidden"
}), n = p ? [s.width(), s.height()] : [s.height(), s.width()], u && (c = parseInt(u[1], 10) / 100 * n[l ? 0 : 1]), h && s.css(d ? {
height: 0,
width: c
} : {
height: c,
width: 0
}), g[f[0]] = h ? n[0] : c, v[f[1]] = h ? n[1] : 0, s.animate(g, m, e.easing).animate(v, m, e.easing, function() {
l && o.hide(), t.effects.restore(o, a), t.effects.removeWrapper(o), i()
})
}, t.effects.effect.highlight = function(e, i) {
var s = t(this),
n = ["backgroundImage", "backgroundColor", "opacity"],
o = t.effects.setMode(s, e.mode || "show"),
a = {
backgroundColor: s.css("backgroundColor")
};
"hide" === o && (a.opacity = 0), t.effects.save(s, n), s.show().css({
backgroundImage: "none",
backgroundColor: e.color || "#ffff99"
}).animate(a, {
queue: !1,
duration: e.duration,
easing: e.easing,
complete: function() {
"hide" === o && s.hide(), t.effects.restore(s, n), i()
}
})
}, t.effects.effect.size = function(e, i) {
var s, n, o, a = t(this),
r = ["position", "top", "bottom", "left", "right", "width", "height", "overflow", "opacity"],
h = ["position", "top", "bottom", "left", "right", "overflow", "opacity"],
l = ["width", "height", "overflow"],
c = ["fontSize"],
u = ["borderTopWidth", "borderBottomWidth", "paddingTop", "paddingBottom"],
d = ["borderLeftWidth", "borderRightWidth", "paddingLeft", "paddingRight"],
p = t.effects.setMode(a, e.mode || "effect"),
f = e.restore || "effect" !== p,
m = e.scale || "both",
g = e.origin || ["middle", "center"],
v = a.css("position"),
_ = f ? r : h,
b = {
height: 0,
width: 0,
outerHeight: 0,
outerWidth: 0
};
"show" === p && a.show(), s = {
height: a.height(),
width: a.width(),
outerHeight: a.outerHeight(),
outerWidth: a.outerWidth()
}, "toggle" === e.mode && "show" === p ? (a.from = e.to || b, a.to = e.from || s) : (a.from = e.from || ("show" === p ? b : s), a.to = e.to || ("hide" === p ? b : s)), o = {
from: {
y: a.from.height / s.height,
x: a.from.width / s.width
},
to: {
y: a.to.height / s.height,
x: a.to.width / s.width
}
}, "box" !== m && "both" !== m || (o.from.y !== o.to.y && (_ = _.concat(u), a.from = t.effects.setTransition(a, u, o.from.y, a.from), a.to = t.effects.setTransition(a, u, o.to.y, a.to)), o.from.x !== o.to.x && (_ = _.concat(d), a.from = t.effects.setTransition(a, d, o.from.x, a.from), a.to = t.effects.setTransition(a, d, o.to.x, a.to))), "content" !== m && "both" !== m || o.from.y !== o.to.y && (_ = _.concat(c).concat(l), a.from = t.effects.setTransition(a, c, o.from.y, a.from), a.to = t.effects.setTransition(a, c, o.to.y, a.to)), t.effects.save(a, _), a.show(), t.effects.createWrapper(a), a.css("overflow", "hidden").css(a.from), g && (n = t.effects.getBaseline(g, s), a.from.top = (s.outerHeight - a.outerHeight()) * n.y, a.from.left = (s.outerWidth - a.outerWidth()) * n.x, a.to.top = (s.outerHeight - a.to.outerHeight) * n.y, a.to.left = (s.outerWidth - a.to.outerWidth) * n.x), a.css(a.from), "content" !== m && "both" !== m || (u = u.concat(["marginTop", "marginBottom"]).concat(c), d = d.concat(["marginLeft", "marginRight"]), l = r.concat(u).concat(d), a.find("*[width]").each(function() {
var i = t(this),
s = {
height: i.height(),
width: i.width(),
outerHeight: i.outerHeight(),
outerWidth: i.outerWidth()
};
f && t.effects.save(i, l), i.from = {
height: s.height * o.from.y,
width: s.width * o.from.x,
outerHeight: s.outerHeight * o.from.y,
outerWidth: s.outerWidth * o.from.x
}, i.to = {
height: s.height * o.to.y,
width: s.width * o.to.x,
outerHeight: s.height * o.to.y,
outerWidth: s.width * o.to.x
}, o.from.y !== o.to.y && (i.from = t.effects.setTransition(i, u, o.from.y, i.from), i.to = t.effects.setTransition(i, u, o.to.y, i.to)), o.from.x !== o.to.x && (i.from = t.effects.setTransition(i, d, o.from.x, i.from), i.to = t.effects.setTransition(i, d, o.to.x, i.to)), i.css(i.from), i.animate(i.to, e.duration, e.easing, function() {
f && t.effects.restore(i, l)
})
})), a.animate(a.to, {
queue: !1,
duration: e.duration,
easing: e.easing,
complete: function() {
0 === a.to.opacity && a.css("opacity", a.from.opacity), "hide" === p && a.hide(), t.effects.restore(a, _), f || ("static" === v ? a.css({
position: "relative",
top: a.to.top,
left: a.to.left
}) : t.each(["top", "left"], function(t, e) {
a.css(e, function(e, i) {
var s = parseInt(i, 10),
n = t ? a.to.left : a.to.top;
return "auto" === i ? n + "px" : s + n + "px"
})
})), t.effects.removeWrapper(a), i()
}
})
}, t.effects.effect.scale = function(e, i) {
var s = t(this),
n = t.extend(!0, {}, e),
o = t.effects.setMode(s, e.mode || "effect"),
a = parseInt(e.percent, 10) || (0 === parseInt(e.percent, 10) ? 0 : "hide" === o ? 0 : 100),
r = e.direction || "both",
h = e.origin,
l = {
height: s.height(),
width: s.width(),
outerHeight: s.outerHeight(),
outerWidth: s.outerWidth()
},
c = {
y: "horizontal" !== r ? a / 100 : 1,
x: "vertical" !== r ? a / 100 : 1
};
n.effect = "size", n.queue = !1, n.complete = i, "effect" !== o && (n.origin = h || ["middle", "center"], n.restore = !0), n.from = e.from || ("show" === o ? {
height: 0,
width: 0,
outerHeight: 0,
outerWidth: 0
} : l), n.to = {
height: l.height * c.y,
width: l.width * c.x,
outerHeight: l.outerHeight * c.y,
outerWidth: l.outerWidth * c.x
}, n.fade && ("show" === o && (n.from.opacity = 0, n.to.opacity = 1), "hide" === o && (n.from.opacity = 1, n.to.opacity = 0)), s.effect(n)
}, t.effects.effect.puff = function(e, i) {
var s = t(this),
n = t.effects.setMode(s, e.mode || "hide"),
o = "hide" === n,
a = parseInt(e.percent, 10) || 150,
r = a / 100,
h = {
height: s.height(),
width: s.width(),
outerHeight: s.outerHeight(),
outerWidth: s.outerWidth()
};
t.extend(e, {
effect: "scale",
queue: !1,
fade: !0,
mode: n,
complete: i,
percent: o ? a : 100,
from: o ? h : {
height: h.height * r,
width: h.width * r,
outerHeight: h.outerHeight * r,
outerWidth: h.outerWidth * r
}
}), s.effect(e)
}, t.effects.effect.pulsate = function(e, i) {
var s, n = t(this),
o = t.effects.setMode(n, e.mode || "show"),
a = "show" === o,
r = "hide" === o,
h = a || "hide" === o,
l = 2 * (e.times || 5) + (h ? 1 : 0),
c = e.duration / l,
u = 0,
d = n.queue(),
p = d.length;
for (!a && n.is(":visible") || (n.css("opacity", 0).show(), u = 1), s = 1; s < l; s++) n.animate({
opacity: u
}, c, e.easing), u = 1 - u;
n.animate({
opacity: u
}, c, e.easing), n.queue(function() {
r && n.hide(), i()
}), p > 1 && d.splice.apply(d, [1, 0].concat(d.splice(p, l + 1))), n.dequeue()
}, t.effects.effect.shake = function(e, i) {
var s, n = t(this),
o = ["position", "top", "bottom", "left", "right", "height", "width"],
a = t.effects.setMode(n, e.mode || "effect"),
r = e.direction || "left",
h = e.distance || 20,
l = e.times || 3,
c = 2 * l + 1,
u = Math.round(e.duration / c),
d = "up" === r || "down" === r ? "top" : "left",
p = "up" === r || "left" === r,
f = {},
m = {},
g = {},
v = n.queue(),
_ = v.length;
for (t.effects.save(n, o), n.show(), t.effects.createWrapper(n), f[d] = (p ? "-=" : "+=") + h, m[d] = (p ? "+=" : "-=") + 2 * h, g[d] = (p ? "-=" : "+=") + 2 * h, n.animate(f, u, e.easing), s = 1; s < l; s++) n.animate(m, u, e.easing).animate(g, u, e.easing);
n.animate(m, u, e.easing).animate(f, u / 2, e.easing).queue(function() {
"hide" === a && n.hide(), t.effects.restore(n, o), t.effects.removeWrapper(n), i()
}), _ > 1 && v.splice.apply(v, [1, 0].concat(v.splice(_, c + 1))), n.dequeue()
}, t.effects.effect.slide = function(e, i) {
var s, n = t(this),
o = ["position", "top", "bottom", "left", "right", "width", "height"],
a = t.effects.setMode(n, e.mode || "show"),
r = "show" === a,
h = e.direction || "left",
l = "up" === h || "down" === h ? "top" : "left",
c = "up" === h || "left" === h,
u = {};
t.effects.save(n, o), 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" === a && n.hide(), t.effects.restore(n, o), t.effects.removeWrapper(n), i()
}
})
}, t.effects.effect.transfer = function(e, i) {
var s = t(this),
n = t(e.to),
o = "fixed" === n.css("position"),
a = t("body"),
r = o ? a.scrollTop() : 0,
h = o ? a.scrollLeft() : 0,
l = n.offset(),
c = {
top: l.top - r,
left: l.left - h,
height: n.innerHeight(),
width: n.innerWidth()
},
u = s.offset(),
d = t("
").appendTo(document.body).addClass(e.className).css({
top: u.top - r,
left: u.left - h,
height: s.innerHeight(),
width: s.innerWidth(),
position: o ? "fixed" : "absolute"
}).animate(c, e.duration, e.easing, function() {
d.remove(), i()
})
}, t.widget("ui.progressbar", {
version: "1.11.4",
options: {
max: 100,
value: 0,
change: null,
complete: null
},
min: 0,
_create: function() {
this.oldValue = this.options.value = this._constrainedValue(), this.element.addClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").attr({
role: "progressbar",
"aria-valuemin": this.min
}), this.valueDiv = t("").appendTo(this.element), this._refreshValue()
},
_destroy: function() {
this.element.removeClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").removeAttr("role").removeAttr("aria-valuemin").removeAttr("aria-valuemax").removeAttr("aria-valuenow"), this.valueDiv.remove()
},
value: function(t) {
if (void 0 === t) return this.options.value;
this.options.value = this._constrainedValue(t), this._refreshValue()
},
_constrainedValue: function(t) {
return void 0 === t && (t = this.options.value), this.indeterminate = !1 === t, "number" != typeof t && (t = 0), !this.indeterminate && Math.min(this.options.max, Math.max(this.min, t))
},
_setOptions: function(t) {
var e = t.value;
delete t.value, this._super(t), this.options.value = this._constrainedValue(e), this._refreshValue()
},
_setOption: function(t, e) {
"max" === t && (e = Math.max(this.min, e)), "disabled" === t && this.element.toggleClass("ui-state-disabled", !!e).attr("aria-disabled", e), this._super(t, e)
},
_percentage: function() {
return this.indeterminate ? 100 : 100 * (this.options.value - this.min) / (this.options.max - this.min)
},
_refreshValue: function() {
var e = this.options.value,
i = this._percentage();
this.valueDiv.toggle(this.indeterminate || e > this.min).toggleClass("ui-corner-right", e === this.options.max).width(i.toFixed(0) + "%"), this.element.toggleClass("ui-progressbar-indeterminate", this.indeterminate), this.indeterminate ? (this.element.removeAttr("aria-valuenow"), this.overlayDiv || (this.overlayDiv = t("
").appendTo(this.valueDiv))) : (this.element.attr({
"aria-valuemax": this.options.max,
"aria-valuenow": e
}), this.overlayDiv && (this.overlayDiv.remove(), this.overlayDiv = null)), this.oldValue !== e && (this.oldValue = e, this._trigger("change")), e === this.options.max && this._trigger("complete")
}
}), t.widget("ui.selectable", t.ui.mouse, {
version: "1.11.4",
options: {
appendTo: "body",
autoRefresh: !0,
distance: 0,
filter: "*",
tolerance: "touch",
selected: null,
selecting: null,
start: null,
stop: null,
unselected: null,
unselecting: null
},
_create: function() {
var e, i = this;
this.element.addClass("ui-selectable"), this.dragged = !1, this.refresh = function() {
(e = t(i.options.filter, i.element[0])).addClass("ui-selectee"), e.each(function() {
var e = t(this),
i = e.offset();
t.data(this, "selectable-item", {
element: this,
$element: e,
left: i.left,
top: i.top,
right: i.left + e.outerWidth(),
bottom: i.top + e.outerHeight(),
startselected: !1,
selected: e.hasClass("ui-selected"),
selecting: e.hasClass("ui-selecting"),
unselecting: e.hasClass("ui-unselecting")
})
})
}, this.refresh(), this.selectees = e.addClass("ui-selectee"), this._mouseInit(), this.helper = t("
")
},
_destroy: function() {
this.selectees.removeClass("ui-selectee").removeData("selectable-item"), this.element.removeClass("ui-selectable ui-selectable-disabled"), this._mouseDestroy()
},
_mouseStart: function(e) {
var i = this,
s = this.options;
this.opos = [e.pageX, e.pageY], this.options.disabled || (this.selectees = t(s.filter, this.element[0]), this._trigger("start", e), t(s.appendTo).append(this.helper), this.helper.css({
left: e.pageX,
top: e.pageY,
width: 0,
height: 0
}), s.autoRefresh && this.refresh(), this.selectees.filter(".ui-selected").each(function() {
var s = t.data(this, "selectable-item");
s.startselected = !0, e.metaKey || e.ctrlKey || (s.$element.removeClass("ui-selected"), s.selected = !1, s.$element.addClass("ui-unselecting"), s.unselecting = !0, i._trigger("unselecting", e, {
unselecting: s.element
}))
}), t(e.target).parents().addBack().each(function() {
var s, n = t.data(this, "selectable-item");
if (n) return s = !e.metaKey && !e.ctrlKey || !n.$element.hasClass("ui-selected"), n.$element.removeClass(s ? "ui-unselecting" : "ui-selected").addClass(s ? "ui-selecting" : "ui-unselecting"), n.unselecting = !s, n.selecting = s, n.selected = s, s ? i._trigger("selecting", e, {
selecting: n.element
}) : i._trigger("unselecting", e, {
unselecting: n.element
}), !1
}))
},
_mouseDrag: function(e) {
if (this.dragged = !0, !this.options.disabled) {
var i, s = this,
n = this.options,
o = this.opos[0],
a = this.opos[1],
r = e.pageX,
h = e.pageY;
return o > r && (i = r, r = o, o = i), a > h && (i = h, h = a, a = i), this.helper.css({
left: o,
top: a,
width: r - o,
height: h - a
}), this.selectees.each(function() {
var i = t.data(this, "selectable-item"),
l = !1;
i && i.element !== s.element[0] && ("touch" === n.tolerance ? l = !(i.left > r || i.right < o || i.top > h || i.bottom < a) : "fit" === n.tolerance && (l = i.left > o && i.right < r && i.top > a && i.bottom < h), l ? (i.selected && (i.$element.removeClass("ui-selected"), i.selected = !1), i.unselecting && (i.$element.removeClass("ui-unselecting"), i.unselecting = !1), i.selecting || (i.$element.addClass("ui-selecting"), i.selecting = !0, s._trigger("selecting", e, {
selecting: i.element
}))) : (i.selecting && ((e.metaKey || e.ctrlKey) && i.startselected ? (i.$element.removeClass("ui-selecting"), i.selecting = !1, i.$element.addClass("ui-selected"), i.selected = !0) : (i.$element.removeClass("ui-selecting"), i.selecting = !1, i.startselected && (i.$element.addClass("ui-unselecting"), i.unselecting = !0), s._trigger("unselecting", e, {
unselecting: i.element
}))), i.selected && (e.metaKey || e.ctrlKey || i.startselected || (i.$element.removeClass("ui-selected"), i.selected = !1, i.$element.addClass("ui-unselecting"), i.unselecting = !0, s._trigger("unselecting", e, {
unselecting: i.element
})))))
}), !1
}
},
_mouseStop: function(e) {
var i = this;
return this.dragged = !1, t(".ui-unselecting", this.element[0]).each(function() {
var s = t.data(this, "selectable-item");
s.$element.removeClass("ui-unselecting"), s.unselecting = !1, s.startselected = !1, i._trigger("unselected", e, {
unselected: s.element
})
}), t(".ui-selecting", this.element[0]).each(function() {
var s = t.data(this, "selectable-item");
s.$element.removeClass("ui-selecting").addClass("ui-selected"), s.selecting = !1, s.selected = !0, s.startselected = !0, i._trigger("selected", e, {
selected: s.element
})
}), this._trigger("stop", e), this.helper.remove(), !1
}
}), t.widget("ui.selectmenu", {
version: "1.11.4",
defaultElement: "