Created
May 21, 2021 14:40
-
-
Save lightswitch05/f4d004083241f8a8a5720e09651d6f56 to your computer and use it in GitHub Desktop.
This file has been truncated, but you can view the full file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function _classCallCheck(e, t) { | |
if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function") | |
} | |
function InfoBox(e) { | |
e = e || {}, google.maps.OverlayView.apply(this, arguments), this.content_ = e.content || "", this.disableAutoPan_ = e.disableAutoPan || !1, this.maxWidth_ = e.maxWidth || 0, this.pixelOffset_ = e.pixelOffset || new google.maps.Size(0, 0), this.position_ = e.position || new google.maps.LatLng(0, 0), this.zIndex_ = e.zIndex || null, this.boxClass_ = e.boxClass || "infoBox", this.boxStyle_ = e.boxStyle || {}, this.closeBoxMargin_ = e.closeBoxMargin || "2px", this.closeBoxURL_ = e.closeBoxURL || "http://www.google.com/intl/en_us/mapfiles/close.gif", "" === e.closeBoxURL && (this.closeBoxURL_ = ""), this.infoBoxClearance_ = e.infoBoxClearance || new google.maps.Size(1, 1), "undefined" == typeof e.visible && ("undefined" == typeof e.isHidden ? e.visible = !0 : e.visible = !e.isHidden), this.isHidden_ = !e.visible, this.alignBottom_ = e.alignBottom || !1, this.pane_ = e.pane || "floatPane", this.enableEventPropagation_ = e.enableEventPropagation || !1, this.div_ = null, this.closeListener_ = null, this.moveListener_ = null, this.mapListener_ = null, this.contextListener_ = null, this.eventListeners_ = null, this.fixedWidthSet_ = null | |
} | |
function MarkerClusterer(e, t, n) { | |
this.extend(MarkerClusterer, google.maps.OverlayView), this.map_ = e, this.markers_ = [], this.clusters_ = [], this.sizes = [53, 56, 66, 78, 90], this.styles_ = [], this.ready_ = !1; | |
var i = n || {}; | |
this.gridSize_ = i.gridSize || 60, this.minClusterSize_ = i.minimumClusterSize || 2, this.maxZoom_ = i.maxZoom || null, this.styles_ = i.styles || [], this.imagePath_ = i.imagePath || this.MARKER_CLUSTER_IMAGE_PATH_, this.imageExtension_ = i.imageExtension || this.MARKER_CLUSTER_IMAGE_EXTENSION_, this.zoomOnClick_ = !0, i.zoomOnClick != undefined && (this.zoomOnClick_ = i.zoomOnClick), this.averageCenter_ = !1, i.averageCenter != undefined && (this.averageCenter_ = i.averageCenter), this.setupStyles_(), this.setMap(e), this.prevZoom_ = this.map_.getZoom(); | |
var o = this; | |
google.maps.event.addListener(this.map_, "zoom_changed", function() { | |
var e = o.map_.getZoom(); | |
o.prevZoom_ != e && (o.prevZoom_ = e, o.resetViewport()) | |
}), google.maps.event.addListener(this.map_, "idle", function() { | |
o.redraw() | |
}), t && t.length && this.addMarkers(t, !1) | |
} | |
function uuidv4() { | |
return ([1e7] + -1e3 + -4e3 + -8e3 + -1e11).replace(/[018]/g, function(e) { | |
return (e ^ crypto.getRandomValues(new Uint8Array(1))[0] & 15 >> e / 4).toString(16) | |
}) | |
} | |
function defaultFor(e, t) { | |
return void 0 !== e ? e : t | |
} | |
function updateQueryStringParameter(e, t, n) { | |
var i = new RegExp("([?|&])" + t + "=.*?(&|$)", "i"), | |
o = -1 !== e.indexOf("?") ? "&" : "?"; | |
return e.match(i) ? e.replace(i, "$1" + t + "=" + n + "$2") : e + o + t + "=" + n | |
} | |
function getURLParameter(e) { | |
var t = decodeURI((RegExp(e + "=(.+?)(&|$)").exec(location.search) || [, null])[1]); | |
return "null" === t ? "" : t | |
} | |
function listenForElementsIn(e, t, n, i) { | |
var o = document.querySelector(e), | |
s = { | |
attributes: !0, | |
childList: !0, | |
characterData: !0 | |
}; | |
new MutationObserver(function(e) { | |
e.forEach(function(e) { | |
"undefined" != typeof e.addedNodes[0] && 0 < e.addedNodes[0].outerHTML.length && (e.addedNodes.length && -1 < e.addedNodes[0].outerHTML.indexOf(t) && n(i)) | |
}) | |
}).observe(o, s) | |
} | |
function isLegalNoticePage() { | |
return "/privacy" === location.pathname || "/terms" === location.pathname || "/cookies" === location.pathname | |
} | |
function isMembershipPage() { | |
return !!document.URL.match(/\/membership/) || !!document.URL.match(/membership_status=complete/) | |
} | |
function isEventShowPage() { | |
return !!document.URL.match(/events\/\w/) || !!document.URL.match(/experiences\/\w/) | |
} | |
function isTripsPage() { | |
return !!document.URL.match(/unusual-trips/) | |
} | |
function isArticleShowPage() { | |
return !!document.URL.match(/articles\/\w/) | |
} | |
function isPlaceShowPage() { | |
return !!document.URL.match(/\/places\/\w/) | |
} | |
function isHomePage() { | |
return "/" === document.location.pathname | |
} | |
function isItineraryPage() { | |
return !!document.URL.match(/itineraries/) | |
} | |
function isObscuraDayPage() { | |
return !!document.URL.match(/obscura-day/) || !!document.URL.match(/obscuraday/) | |
} | |
function isVideoPage() { | |
return !!document.URL.match(/videos/) | |
} | |
function isPageType(e) { | |
return !!document.URL.match(e) | |
} | |
function isPromoPage() { | |
return !!document.URL.match(/oregon-solar-eclipse/) || !!document.URL.match(/newsletter/) || !!document.URL.match(/chase-sapphire/) || !!document.URL.match(/contests\//) || !!location.pathname.match(/^\/shop|^\/shop\//) || $("body").hasClass("sponsored_pages") | |
} | |
function isUserFormPage() { | |
return !!pageType().match(/users.+set_up/) || !!pageType().match(/users.+edit/) | |
} | |
function isSensitivePage() { | |
return !!window.AtlasObscura.is_sensitive | |
} | |
function isSafari() { | |
return navigator.vendor && -1 < navigator.vendor.indexOf("Apple") && navigator.userAgent && !navigator.userAgent.match("CriOS") | |
} | |
function isTouchDevice() { | |
return !!window.matchMedia("(pointer: coarse)").matches && !isIE() | |
} | |
function isTabletPortrait() { | |
var e = window.innerWidth; | |
return 668 < e && e < 970 | |
} | |
function onTouchOutside(n, i) { | |
$("body").on("touchstart", function(e) { | |
if ($(e.target).parents(n).length < 1 && !$(e.target).is(n)) { | |
var t = Array.prototype.slice.call(arguments, 2); | |
i(t) | |
} | |
}) | |
} | |
function pseudoHoverOn(n) { | |
$(n).on("touchstart", function(e) { | |
var t = $(this); | |
return !!t.hasClass("hover") || (e.preventDefault(), resetDesktopNav(), $(n).not(this).removeClass("hover"), t.addClass("hover"), !1) | |
}) | |
} | |
function hoverizeOnFocusIn(e) { | |
$(e).on("focusin", function() { | |
$(this).addClass("hover") | |
}), $("body").on("keydown", e + ".hover", function(e) { | |
9 === e.keyCode && $("body").one("focusin", function() { | |
$(this).find(document.activeElement).length <= 0 && $(this).removeClass("hover") | |
}.bind(this)) | |
}) | |
} | |
function removePseudoHovers() { | |
$(".hover").removeClass("hover") | |
} | |
function hasVideoContent(e) { | |
return 0 < $(e).has("iframe").length | |
} | |
function hasTwitterContent(e) { | |
return $(e).is("blockquote.twitter-tweet") | |
} | |
function hasHeadingContent(e) { | |
return $(e).is("h2") || $(e).is("h3") || $(e).is("h4") || $(e).is("h5") || $(e).is("h6") || $(e).html() && 0 <= $(e).html().indexOf("article-subheading") | |
} | |
function hasImageContent(e) { | |
var t; | |
try { | |
t = 0 < $(e).has("img").length || 0 < $(e).has("[class*=article-caption]").length || 0 < $($(e)[0].outerHTML).has("hr").length | |
} catch (n) { | |
t = !0 | |
} | |
return t | |
} | |
function hasInterruptContent(e) { | |
if (e.hasClass("item-body-text-graf")) return !1; | |
var t, n = e[0].className; | |
try { | |
t = 0 <= n.indexOf("related-articles-interrupt") || 0 < $(e).has("[class*=article-caption]").length || 0 < $(e).has("[class*=ad-wrapper]").length || 0 <= n.indexOf("-subheading-") | |
} catch (i) {} | |
return t | |
} | |
function isNotBodyText(e) { | |
if ($(e).hasClass("item-body-text-graf") || $(e).is("hr")) return !1; | |
var t = hasImageContent(e), | |
n = hasHeadingContent(e), | |
i = $(e).html() && 0 <= $(e).html().indexOf("iframe"); | |
return t || n || i | |
} | |
function isIE() { | |
return /MSIE (\d+\.\d+);/.test(navigator.userAgent) || 0 < navigator.userAgent.indexOf("Trident/") | |
} | |
function debounce(o, s, r) { | |
var a; | |
return function() { | |
var e = this, | |
t = arguments, | |
n = function() { | |
a = null, r || o.apply(e, t) | |
}, | |
i = r && !a; | |
clearTimeout(a), a = setTimeout(n, s), i && o.apply(e, t) | |
} | |
} | |
function isSubscribed() { | |
return Cookies.get("general_subscriber") | |
} | |
function isSubscribedTo(e) { | |
switch (e) { | |
case "gastro": | |
return Cookies.get("gastro_subscriber"); | |
default: | |
return Cookies.get("general_subscriber") | |
} | |
} | |
function generateGuid() { | |
function e() { | |
return Math.floor(65536 * (1 + Math.random())).toString(16).substring(1) | |
} | |
return e() + e() + e() + e() + e() + e() + e() + e() | |
} | |
function setMobileHover(e) { | |
isTouchDevice() && ($("body").on("mouseenter", e, function() { | |
$(this).addClass("hover") | |
}), $("body").on("touchstart", e, function() { | |
$(this).addClass("hover") | |
}), $("body").on("mouseleave", e, function() { | |
$(this).removeClass("hover") | |
}), $("body").on("touchmove", e, function() { | |
$(this).removeClass("hover") | |
}), $("body").on("click", e, function() { | |
$(this).removeClass("hover") | |
})) | |
} | |
function isHiddenInAtlasContext(e) { | |
return !!isSmallScreen() && (1 <= e.closest(".is-slider-hidden-m").length && !e.closest(".is-slider-hidden-m").hasClass("is-slider-shown-m")) | |
} | |
function isElementInViewport(e) { | |
return "function" != typeof jQuery || e instanceof jQuery || (e = $(e)), !isHiddenInAtlasContext(e) && e.visible() | |
} | |
function elementIsInViewAtAll(e) { | |
return "function" != typeof jQuery || e instanceof jQuery || (e = $(e)), !isHiddenInAtlasContext(e) && e.visible(!0) | |
} | |
function elementIsInTopPercentOfViewport(e, t) { | |
return "function" != typeof jQuery || e instanceof jQuery || (e = $(e)), e.offset().top < $(window).scrollTop() + $(window).height() * t | |
} | |
function elementIsInBottomOfViewport(e, t) { | |
"function" != typeof jQuery || e instanceof jQuery || (e = $(e)); | |
var n = e.offset().top, | |
i = $(window).scrollTop(), | |
o = $(window).height(); | |
return t || (t = 10), n < i + o - o * (t / 100) | |
} | |
function elementIsAboveViewPort(e) { | |
var t = e.offset().top + e.outerHeight(); | |
return $(window).scrollTop() > t | |
} | |
function verticalPercentViewed(e) { | |
var t = $(window).scrollTop() + $(window).height(), | |
n = e.offset().top, | |
i = Math.round((t - n) / e.height() * 100); | |
return i <= 0 ? 0 : 100 <= i ? 100 : i | |
} | |
function logPercentBelowViewport(e, t) { | |
var n = verticalPercentViewed(e), | |
i = AtlasObscura[t]; | |
return void 0 === i ? AtlasObscura[t] = n : i < n ? AtlasObscura[t] = n : i | |
} | |
function pixelToInt(e) { | |
return parseInt(e.split("px")[0]) | |
} | |
function setTabletHoverStyles() { | |
if (isTouchDevice() && !isSmallScreen()) { | |
var e = ".vue-js-place-page-add-to-list .popover .popover-content p .view-link {display: inline;} .vue-js-been-there-everywhere-place .popover .popover-content p .view-link {display: inline;}", | |
t = document.head || document.getElementsByTagName("head")[0], | |
n = document.createElement("style"); | |
n.type = "text/css", n.styleSheet ? n.styleSheet.cssText = e : n.appendChild(document.createTextNode(e)), t.appendChild(n) | |
} | |
} | |
function containsAnEmail(e) { | |
var t = new RegExp(/^.+[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,}.+$/, "i"); | |
return !!e.match(t) | |
} | |
function showConfirmationModal(e, t, n) { | |
var i = $(".js-confirmation-modal"); | |
n && i.addClass(n), i.find(".confirmation-modal-heading").text(t.heading).end().find(".confirmation-modal-text").text(t.body).end().find(".submit-button").text(t.submit).end().find(".back-button").text(t.cancel).end().modal("show"), i.find(".submit-button").one("click", function(e) { | |
e.submit() | |
}.bind(null, e)), i.on("hide.bs.modal", function(e) { | |
i.find(".submit-button").off(), i.removeClass(e) | |
}.bind(null, n)) | |
} | |
function precheckNewsletter() { | |
if (AtlasObscura.user_geoip) { | |
var e = AtlasObscura.user_geoip.metro_code, | |
t = $(".newsletter-landing-page .email-signup-checkdisplay[data-dma=" + e + "]"); | |
t.hasClass("checked") || t.click() | |
} | |
} | |
function pageType() { | |
var e = $("body").attr("class"); | |
return 0 < e.length ? e.trim().split(" ").filter(function(e) { | |
return -1 === e.indexOf("safari") && 0 < e.length && "gastro-page" !== e | |
}).join("-") : "" | |
} | |
function storeLocallyWithTimestamp(e, t) { | |
var n = { | |
value: t, | |
timestamp: moment.now() | |
}; | |
return localStorage.setItem(e, JSON.stringify(n)) | |
} | |
function AO_titleize(e) { | |
return e.split(" ").map(function(e) { | |
return e[0].toUpperCase() + e.slice(1) | |
}).join(" ") | |
} | |
function AO_parameterize(e) { | |
return e.trim().toLowerCase().replace(/[^a-zA-Z0-9 -]/, "").replace(/\s/g, "-") | |
} | |
function ensureJquery(e) { | |
return "function" != typeof jQuery || e instanceof jQuery ? e : $(e) | |
} | |
function fixOuterDimensions(e) { | |
var t = ensureJquery(e), | |
n = { | |
height: t.outerHeight(), | |
width: t.outerWidth() | |
}; | |
return t.css(n), n | |
} | |
function spoofGeoIPLosAngeles() { | |
Cookies.set("user_geoip", { | |
metro_code: "", | |
longitude: -118.254206, | |
latitude: 34.044143, | |
city: "Los Angeles" | |
}) | |
} | |
function copyCurrentUrlToClipboard() { | |
clipboard.writeText(location.href) | |
} | |
function californiaVisitor() { | |
return AtlasObscura.user_geoip !== undefined && ("US" == AtlasObscura.user_geoip.country_code && "CA" == AtlasObscura.user_geoip.region_code) | |
} | |
function initCookieConsent() { | |
if (!californiaVisitor() || $(".cc-window.cc-banner").length) return !1; | |
window.cookieconsent.initialise({ | |
container: document.getElementById("cookie-consent-container"), | |
palette: { | |
popup: { | |
background: "#000", | |
text: "#fff" | |
}, | |
button: { | |
background: "#fff", | |
text: "#000" | |
} | |
}, | |
cookie: { | |
name: "cookieconsent_status_v1" | |
}, | |
showLink: !1, | |
theme: "classic", | |
onStatusChange: function() {}, | |
content: { | |
message: 'Atlas Obscura uses cookies on its websites to personalize content and ads, to provide social media features, and to analyze our traffic. We also share information about your use of our site with our social media, advertising, and analytics partners who may combine it with other information that you\'ve provided to them or that they\'ve collected from your use of their services. By clicking "Accept" you are consenting to use of cookies as described in our Cookie Policy. If you do not wish to accept cookies from our website, you can adjust your cookie settings via your browser as described in our <a aria-label="learn more about cookies" role="button" tabindex="0" class="cc-link" href="/cookies" rel="noopener noreferrer nofollow" target="_blank">Cookie Policy</a>.', | |
dismiss: "Accept", | |
link: "", | |
href: "/cookies" | |
} | |
}) | |
} | |
function setAoCookiesOkCookie() { | |
Cookies.set("ao_cookies_ok", "1", { | |
expires: 365 | |
}), gtag("event", "accepted modal", { | |
event_category: "GDPR Consent", | |
event_label: location.pathname | |
}) | |
} | |
function revokeAoCookiesOkCookie() { | |
Cookies.remove("ao_cookies_ok"), alert("You have successfully withdrawn your consent."), gtag("event", "revoked", { | |
event_category: "GDPR Consent", | |
event_label: "privacy page link" | |
}) | |
} | |
function gaTrackGenericEvent(e) { | |
gtag("event", e.action, { | |
event_category: e.category, | |
event_label: e.label | |
}) | |
} | |
function gaLinkEventFor(e) { | |
var t = $(e.target).closest("a").data(); | |
gtag("event", t.action, { | |
event_category: t.category, | |
event_label: t.label | |
}) | |
} | |
function waitForAdBlockDetection() { | |
return new Promise(function(e) { | |
AtlasObscura.adBlockDetectionComplete ? e(!0) : $("body").on("ao-adblock-detection-complete", function() { | |
e(!0) | |
}) | |
}) | |
} | |
function shortenTimeAgoString(e) { | |
return e.replace(/.+/, function(e) { | |
var t = e.match(/\s\w/)[0][1]; | |
return "a few seconds" === e ? "1m" : "a" === e[0] ? "1" + t : e.match(/^\d+/)[0] + t | |
}) | |
} | |
function discourseRelativeTime(e) { | |
var t = moment.utc(e), | |
n = moment().utc(); | |
return 0 == moment.utc().diff(t, "months") ? shortenTimeAgoString(moment.utc(e).fromNow(!0)) : t.year() === n.year() ? t.format("MMM D") : t.format("MMM 'YY") | |
} | |
function truncate(e, t) { | |
var n, i, o = 0; | |
$(e).children().each(function() { | |
if (t <= o) return $(this).hide(), void $(this).addClass("truncated"); | |
n = this.innerText.split(" ").length, t <= o + n && (i = this.innerText.split(" ").slice(0, t - o).join(" "), i += "…", i += "<a class='js-truncate-reveal text-reveal-link'> Show More <svg><use xlink:href='#icon-aoc-add-shape'></svg></a>", $(this).hide(), $(this).addClass("truncated"), $(this).after($('<p class="truncated-text-graf"></p>').html(i))), o += n | |
}) | |
} | |
function isKilometerSession() { | |
return -1 === ["AI", "AG", "BS", "BB", "BM", "VG", "KY", "DM", "GD", "JM", "LR", "MS", "MM", "KN", "LC", "VC", "TT", "TC", "GB", "US"].indexOf(AtlasObscura.user_geoip.country_code) | |
} | |
function milesStringToKm(e) { | |
var t = parseInt(e.split("mile")[0]); | |
return Math.round(t / .621371) + " km" | |
} | |
function searchMapLink(e) { | |
return ' <div class="detail normal-weight no-results"> <span>No results. </span><a class="no-results-search-link js-search-tracked" onclick="submitGeocodedSearch()">Search places<br>near ‘' + e + "’</a>. </div>" | |
} | |
function broadcastMapsInit() { | |
return !window.aoMapsInitDone && (window.aoMapsInitDone = !0, $(document).trigger("ao-init-maps"), (0 < $("body.places.new").length || 0 < $("body.places.edit").length) && (locationPickerInitInterval = setInterval(function() { | |
initLocationPicker(locationPickerInitInterval) | |
}, 1e3)), !0) | |
} | |
function triggerMapsInit() { | |
$(document).ready(function() { | |
broadcastMapsInit() | |
}), "complete" === document.readyState && broadcastMapsInit() | |
} | |
function touchBeforeDrag(t) { | |
if (isTouchDevice() || isSmallScreen()) { | |
t.setOptions({ | |
gestureHandling: "none" | |
}); | |
var n = t.getDiv(); | |
$(n).on("touchend", function() { | |
t.setOptions({ | |
gestureHandling: "auto" | |
}), $("body").on("touchstart", function(e) { | |
$(e.target).parents("#" + n.id).length < 1 && t.setOptions({ | |
gestureHandling: "none" | |
}) | |
}) | |
}) | |
} | |
} | |
function iconOptionsSearch(e, t) { | |
return { | |
path: markerShapeSearch, | |
scale: .8, | |
fillColor: e, | |
fillOpacity: 1, | |
strokeWeight: 1, | |
strokeColor: t, | |
anchor: new google.maps.Point(0, 50) | |
} | |
} | |
function iconOptionsIESafe(e, t) { | |
return { | |
path: markerShapeSearch, | |
scale: .8, | |
fillColor: e, | |
fillOpacity: 1, | |
strokeWeight: 1, | |
strokeColor: t, | |
anchor: new google.maps.Point(0, 50) | |
} | |
} | |
function iconOptionsStaffList(e, t) { | |
return { | |
path: markerShapeSearch, | |
scale: .7, | |
fillColor: e, | |
fillOpacity: 1, | |
strokeWeight: 1, | |
strokeColor: t, | |
anchor: new google.maps.Point(15, 41) | |
} | |
} | |
function iconOptionsMemberList(e, t) { | |
return { | |
path: markerShapeSecondary, | |
scale: .7, | |
fillColor: e, | |
fillOpacity: 1, | |
strokeWeight: 1, | |
strokeColor: t, | |
anchor: new google.maps.Point(15, 41) | |
} | |
} | |
function iconOptionsMuted(e, t) { | |
return { | |
path: google.maps.SymbolPath.CIRCLE, | |
scale: 6, | |
fillColor: e, | |
fillOpacity: .7, | |
strokeWeight: 1, | |
strokeColor: t, | |
anchor: new google.maps.Point(0, .8), | |
labelContent: "" | |
} | |
} | |
function iconOptionsStandard() { | |
return standardSizeSvgIcon(markerSvgSecondary, fillNormal, "#fff") | |
} | |
function iconOptionsStandardSelected() { | |
return standardSizeSvgIcon(markerSvgSecondarySelected, "#fff", fillNormal) | |
} | |
function iconOptionsStandardMuted(e, t) { | |
return { | |
path: google.maps.SymbolPath.CIRCLE, | |
scale: 6, | |
fillColor: e, | |
fillOpacity: .7, | |
strokeWeight: 1, | |
strokeColor: t, | |
anchor: new google.maps.Point(0, 1) | |
} | |
} | |
function foodLocationMarker(e) { | |
return new MarkerWithLabel({ | |
map: map, | |
position: e.coordinates, | |
title: e.title, | |
icon: standardSizeSvgIcon(markerSvgFood, fillNormal, "#fff") | |
}) | |
} | |
function standardSizeSvgIcon(e, t, n) { | |
return isIE() ? iconOptionsIESafe(t, n) : { | |
url: "data:image/svg+xml;charset=UTF-8;base64," + e, | |
size: new google.maps.Size(20, 31), | |
anchor: new google.maps.Point(10, 31) | |
} | |
} | |
function anyLazyMapInViewport() { | |
var e = !1; | |
return $(".lazy-map").each(function() { | |
if (elementIsInViewAtAll(this)) return !(e = !0) | |
}), e | |
} | |
function applySpecialMapFeatures() { | |
AtlasObscura.current_itinerary && (AtlasObscura.mapFeatures.verticalId = AtlasObscura.current_itinerary.vertical_id) | |
} | |
function partialScreenModalIds() { | |
return ["email-roadblock-topographic-modal", "gastro-email-roadblock-modal", "social-follow-ask-modal"] | |
} | |
function isPartialScreenModal(e) { | |
var t = $(e).attr("id"); | |
return -1 < partialScreenModalIds().indexOf(t) | |
} | |
function classifyBodyIfPartialModal(e) { | |
return !!isPartialScreenModal(e) && ($("body").addClass("modal-open-partial-screen"), $(e).one("hidden.bs.modal", function() { | |
$("body").removeClass("modal-open-partial-screen") | |
}), !0) | |
} | |
function generalEmailExitIntentable() { | |
var e = "1" === Cookies.get("general_roadblock_redesign") || "1" === Cookies.get("fb_roadblock"), | |
t = 1 !== window.RoadblockVetoesExitIntent; | |
return !e && !isAGeneralEmailSubscriber() && t && !pageBasedRoadblockExemption() && !AtlasObscura.hideInterrupts && !isPaidMember() | |
} | |
function tripsPageExitIntentable() { | |
var e = 1 !== window.RoadblockVetoesExitIntent; | |
return !isTripsEmailSubscriber() && isTripsPage() && e && !AtlasObscura.hideInterrupts && !fromRoadblockExemptReferrer() | |
} | |
function specialContestExitIntentable() { | |
var e = "1" === Cookies.get("general_roadblock_redesign") || "1" === Cookies.get("gastro email list") || "1" === Cookies.get("fb_roadblock"); | |
return !("1" === Cookies.get("general_subscriber") || 1 === window.RoadblockVetoesExitIntent || pageBasedRoadblockExemption() || AtlasObscura.hideInterrupts || fromRoadblockExemptReferrer() || e) | |
} | |
function useRoadblockAsExitIntent(e) { | |
"gastro-email-roadblock-modal" === e ? (AtlasObscura.subscriptionAskLabel = "Gastro Exit Intent (Original Modal)", AtlasObscura.subscriptionAskCategory = "gastro email list") : AtlasObscura.subscriptionAskCategory = "Exit Intent", AtlasObscura.emailAskFromExitIntent = !0, $("#" + e).modal("show") | |
} | |
function applyRevealAnimationClasses(e) { | |
e.css("display", "none !important"), e.addClass("reveal-animated"), e.addClass(e.data("revealAnimation")), e.css("display", "block") | |
} | |
function classifyBodyIfFullscreenModal(e) { | |
return isSmallScreen() && $(e).hasClass("modal-sm-fullscreen") ? !$(e).hasClass("js-modal-sm-force-backdrop") && ($("body").addClass("no-modal-backdrop"), !0) : !!$(e).hasClass("modal-md-fullscreen") && ($("body").addClass("no-modal-backdrop"), !0) | |
} | |
function logExitIntentListenerInDataLayer() { | |
return "gastro" === AtlasObscura.content_vertical ? dataLayer.push({ | |
event: "page - Exit Intent Listener - Gastro" | |
}) : dataLayer.push({ | |
event: "page - Exit Intent Listener - General" | |
}) | |
} | |
function shownModalId() { | |
return 0 < $(".modal.in").length && $(".modal.in")[0].id | |
} | |
function doNotFocusOnMobile(e) { | |
return $(e).hasClass("modal-sm-fullscreen") || !!$(e).data("avoidInstantFocusMobile") | |
} | |
function airplaneConfirm(e) { | |
var t = ensureJquery(e); | |
isSmallScreen() && document.activeElement.blur(); | |
var n = t.find(".js-animate-airplane-content"); | |
fixOuterDimensions(n), injectAirplaneMarkup(n), setTimeout(function() { | |
applyPlaneAnimations(t) | |
}, 1) | |
} | |
function resetModalForm(e) { | |
formContents = e.find("form *"); | |
for (var t = formContents.length - 1; 0 <= t; t--) "TEXTAREA" !== $(formContents[t]).prop("tagName") && "text" !== $(formContents[t]).attr("type") && "email" !== $(formContents[t]).attr("type") || (formContents[t].value = "") | |
} | |
function applyPlaneAnimations(e) { | |
var t = 4500; | |
e.addClass("--airplane-animating"), setTimeout(function() { | |
$(".modal-backdrop.in").animate({ | |
opacity: 0 | |
}, 400) | |
}, t - 400), setTimeout(function() { | |
e.modal("hide"), e.removeClass("--airplane-animating"), e.find(".athModalPlaneWrap").remove(), resetModalForm(e) | |
}, t) | |
} | |
function injectAirplaneMarkup(e) { | |
var t = ensureJquery(e), | |
n = t.data("airplane-message"), | |
i = '<svg class="planeSvg" height="72" viewBox="0 0 72 72" width="72" xmlns="http://www.w3.org/2000/svg"><path d="m722.575237 574.049123 8.498005 36.648246-10.696104 15.302631c.397663-4.852786.596495-7.832878.596495-8.940277 0-1.41481-.324544-17.797486-.973633-49.148026-.666667 17.937626-1 34.320301-1 49.148026 0 1.312381.198789 4.277945.596366 8.896694l-10.608939-15.327098 8.475915-36.701977-11.68311 36.880025c-6.939627 1.315152-14.096234 3.578138-21.780232 6.78896l36-63.596327 36 63.596327c-7.682119-3.21465-14.838851-5.479203-21.78172-6.79366z" fill="#fff" fill-rule="evenodd" transform="translate(-684 -554)"/></svg>', | |
o = '<svg class="contrailSvg" height="150" viewBox="0 0 4 150" width="4" xmlns="http://www.w3.org/2000/svg"><path d="m720.255 783.145149-.114 8.854851h-.282l-.114-8.854851zm1.745-141.145149-.054 10.53146h-3.892l-.054-10.53146zm-.1406 17.172177-.114 8.854851h-3.49l-.114-8.854851zm-.2002 15.497042-.116 8.854852h-3.088l-.114-8.854852zm-.2012 15.496833-.114 8.854851h-2.688l-.114-8.854851zm-.2002 15.495779-.114 8.854851h-2.288l-.114-8.854851zm-.2002 15.496832-.116 8.854851h-1.884l-.116-8.854851zm-.201 15.497043-.114 8.854851h-1.484l-.114-8.854851zm-.2002 15.495779-.114 8.856957h-1.084l-.114-8.856957zm-.2002 15.496832-.116 8.854851h-.68l-.116-8.854851z" fill="#fff" fill-rule="evenodd" transform="translate(-718 -642)"/></svg>'; | |
t.append(['<div class="athModalPlaneWrap">', i, o, '<div class="planeMessageWrap">', n, "</div>", "</div>"].join(" ")) | |
} | |
function promoExitIntentable() { | |
var e = new Date("November 16, 2019 03:00:00").getTime(); | |
return moment.now() < e && specialContestExitIntentable() | |
} | |
function scrollModalConfirmationUp(e) { | |
var t = $(e).find(".modal-content"), | |
n = $(e).find(".FormModal__thanks-container"), | |
i = t.outerHeight(), | |
o = n.find(".FormModal__thanks-container-inner-wrap").outerHeight(); | |
t.animate({ | |
top: t.offset().top - n.offset().top + (i - o) / 2 | |
}, 200) | |
} | |
function dismissContentBlocker() { | |
var e = Cookies.get("membershipDismissalCountv2"); | |
Cookies.set("membershipContentBlockerDismissedv2", !0, { | |
expires: 3 | |
}), e ? Cookies.set("membershipDismissalCountv2", parseInt(e) + 1) : Cookies.set("membershipDismissalCountv2", 1, { | |
expires: 365 | |
}) | |
} | |
function showNav() { | |
var e; | |
window.AtlasObscura.searchModule.isSearchActive() ? $(this).find(".nav-link").addClass("show-border") : ($(this).find(".nav-link").addClass("show-border"), $(this).find(".nav-dropdown").css("display", "block"), $(this).hasClass("nav-vertical-stable") || ((e = $(".nav-vertical-stable")).removeClass("nav-vertical-stable").find(".nav-dropdown").css("display", "none"), e.find(".nav-link").removeClass("show-border"), $(window).trigger("ao:nav:opened"))) | |
} | |
function hideNav() { | |
$(this).hasClass("nav-vertical-stable") || ($(this).find(".nav-dropdown").css("display", "none"), $(this).find(".nav-link").removeClass("show-border")) | |
} | |
function resetMobileDropdown() { | |
$(".js-nav-toggle").removeClass("icon-menu-close").addClass("icon-menu-open"), $(".js-nav-content").removeClass("is-slider-shown-m").attr("aria-hidden", "true"), $("body").removeClass("nav-open-m") | |
} | |
function resetDesktopNav() { | |
$(".nav-vertical-stable").removeClass("nav-vertical-stable") | |
} | |
function flipArrowIcon(e) { | |
var t = $(e); | |
t.hasClass("icon-expand_more") ? (t.addClass("icon-expand_less"), t.removeClass("icon-expand_more")) : (t.addClass("icon-expand_more"), t.removeClass("icon-expand_less")) | |
} | |
function smoothScrollToAnchor(e, t) { | |
var n = $(e).attr("href"); | |
0 === n.indexOf("#") && (n = n.slice(1)); | |
var i = $('a[name="' + n + '"]'), | |
o = void 0 !== t ? t : 500; | |
return $("html, body").animate({ | |
scrollTop: i.offset().top | |
}, o), i | |
} | |
function navNoticeYSpace() { | |
return document.getElementById("shop-top-offer-link").getBoundingClientRect().bottom | |
} | |
function handleMiniNavNotice() { | |
var e = $("#shop-top-offer-link"), | |
t = $("#mini-nav-wrapper"); | |
elementIsInViewAtAll(e) ? (t.addClass("notice-on-top"), t.css("top", navNoticeYSpace())) : (t.removeClass("notice-on-top"), t.css("top", 0)) | |
} | |
function applyFilterToTarget(e) { | |
var t = $($(e).data("filter-target")); | |
t.attr("filter-state", $(e).data("filter-state")), t.trigger("filter-done") | |
} | |
function updateActiveFilterButton(e) { | |
$(e).siblings(".js-filter-button").removeClass("active"), $(e).addClass("active") | |
} | |
function growToHeight(e, t, n, i) { | |
var o = Array.prototype.slice.call(arguments, 4), | |
s = {}; | |
return s[n] = 0, e.addClass("shown showing"), e.removeClass("hidden"), e.css(n, -1 * t), e.animate(s, 125, function() { | |
e.removeClass("showing"), i.apply(null, o) | |
}), t | |
} | |
function shrinkToZeroFromHeight(e, t, n, i) { | |
var o = Array.prototype.slice.call(arguments, 4), | |
s = {}; | |
return s[n] = -1 * t, e.addClass("hiding"), e.animate(s, 125, function() { | |
e.removeClass("hiding"), i.apply(null, o) | |
}), 0 | |
} | |
function assertBtfNavHeight(e, t) { | |
return 1 < e ? ($("#btf-nav").removeClass("hidden"), $("#btf-nav").addClass("shown"), $("#btf-nav").css(t, 0), $("#btf-nav").css("height", e)) : ($("#btf-nav").addClass("hidden"), $("#btf-nav").removeClass("shown"), $("#btf-nav").css(t, -1 * e)), !0 | |
} | |
function handleBtfNav() { | |
var e = isSmallScreen() ? "bottom" : "top", | |
t = $("#btf-nav"), | |
n = $(".js-item-header"); | |
return $("body").hasClass("DDP-template") && (e = "top"), $("body").hasClass("videos") && (n = $(".page-header")), elementIsAboveViewPort(n) ? !t.hasClass("shown") && !t.hasClass("showing") && growToHeight(t, 50, e, assertBtfNavHeight, 50, e) : !t.hasClass("hidden") && !t.hasClass("hiding") && shrinkToZeroFromHeight(t, 50, e, assertBtfNavHeight, 0, e) | |
} | |
function renumberListItems() { | |
var t, n; | |
t = (AtlasObscura.place_search.current_page - 1) * AtlasObscura.place_search.per_page, $(".search-list-item").each(function(e) { | |
n = t + e + 1, $(this).find(".search-list-item-num").html(n) | |
}) | |
} | |
function showListItemDistance() { | |
$(".search-list-item").each(function(e) { | |
var t = AtlasObscura.place_search.results[e].distance_from_query, | |
n = $(this).find(".js-card-distance"); | |
if (n.html(t + " miles"), isKilometerSession()) { | |
var i = milesStringToKm(n[0].innerText); | |
n[0].innerText = i | |
} | |
}) | |
} | |
function geolocateUser(t) { | |
function e(e) { | |
submitInitSearch(e.coords.latitude, e.coords.longitude, t, { | |
nearby: !0 | |
}) | |
} | |
function n(e) { | |
handleGeoLocationError(e) | |
} | |
if (navigator.geolocation) { | |
userGeolocationPermissionStatus(); | |
var i = { | |
maximumAge: 300 | |
}; | |
navigator.geolocation.getCurrentPosition(e, n, i) | |
} else alert("Geolocation is not supported by your browser.") | |
} | |
function handleGeoLocationError(e) { | |
switch (e.code) { | |
case e.PERMISSION_DENIED: | |
message = "To see what's near you, please enable Location Services in your device settings."; | |
break; | |
case e.POSITION_UNAVAILABLE: | |
message = "Unable to retrieve your location. Please enable Location Services in your device settings."; | |
break; | |
case e.TIMEOUT: | |
message = "The request to get your location timed out. Please check your connection and try again."; | |
break; | |
case e.UNKNOWN_ERROR: | |
message = "An unknown error occurred." | |
} | |
alert(message) | |
} | |
function userGeolocationPermissionStatus() { | |
"undefined" != typeof navigator.permissions && navigator.permissions.query({ | |
name: "geolocation" | |
}).then(function(e) { | |
return e.state | |
}) | |
} | |
function submitInitSearch(e, t, n, i) { | |
var o, s, r, a, l, c, d, u = !1; | |
i && i.nearby && (u = !0), gtag("event", "submitted", { | |
event_category: "new search", | |
event_label: "initial" | |
}), $searchForm = $(".js-search-form-to-submit"), o = n !== undefined ? n : "", gtag("event", "Submitted", { | |
event_category: "Search Suggest", | |
event_label: n | |
}), s = $("#location").val(), r = $("<input>").attr("type", "hidden").attr("name", "q").val(o), a = $("<input>").attr("type", "hidden").attr("name", "lat").val(e), l = $("<input>").attr("type", "hidden").attr("name", "lng").val(t), c = $("<input>").attr("type", "hidden").attr("name", "source").val(u), elNearby = $("<input>").attr("type", "hidden").attr("name", "nearby").val(u), 1 == isMobile ? c.val("mobile") : c.val("desktop"), d = $("<input>").attr("type", "hidden").attr("name", "formatted_address").val(s), $searchForm.append($(a), $(l), $(r), $(d), $(c), $(elNearby)), $searchForm.trigger("submit") | |
} | |
function submitSearch(e, t) { | |
var n, i; | |
void 0 === t && (t = "/search"); | |
var o = {}, | |
s = e == undefined ? 2 : e, | |
r = getURLParameter("q"), | |
a = getURLParameter("kind"), | |
l = getURLParameter("start"), | |
c = getURLParameter("end"); | |
map.fitBounds(bounds), n = wrappedCenterOf(map), i = updateQueryStringParameter(i = updateQueryStringParameter(i = updateQueryStringParameter(i = window.location.search, "page", s), "lat", n.lat()), "lng", n.lng()), history.pushState("", "", i), o = { | |
q: r, | |
lat: n.lat().toFixed(2), | |
lng: n.lng().toFixed(2), | |
page: s, | |
source: isMobile ? "mobile" : "desktop", | |
kind: a, | |
start: l, | |
end: c | |
}, $.ajax({ | |
url: t, | |
method: "GET", | |
data: o, | |
dataType: "script" | |
}).done(function() { | |
$(".js-search-this-map").hide(), muteMarkers(), drawMarkerCollection(AtlasObscura.place_search.results) | |
}) | |
} | |
function wrappedCenterOf(e) { | |
var t = e.getCenter(); | |
return new google.maps.LatLng(t.lat(), t.lng()) | |
} | |
function submitBoundedSearch() { | |
var e, t, n, i = {}, | |
o = 1, | |
s = getURLParameter("q"), | |
r = getURLParameter("kind"); | |
e = map.getBounds(), t = wrappedCenterOf(map); | |
var a = e.getNorthEast(), | |
l = e.getSouthWest(), | |
c = [a.lat(), l.lng()], | |
d = [l.lat(), a.lng()]; | |
c[1] < 0 && 0 < d[1] && (c[1] = 180), n = updateQueryStringParameter(n = updateQueryStringParameter(n = updateQueryStringParameter(n = window.location.search, "lat", t.lat()), "lng", t.lng()), "page", o), history.pushState("", "", n), i = { | |
q: s, | |
lat: t.lat().toFixed(2), | |
lng: t.lng().toFixed(2), | |
bounds: { | |
nw: c, | |
se: d | |
}, | |
page: o, | |
kind: r, | |
source: isMobile ? "mobile" : "desktop" | |
}, $.ajax({ | |
url: "/search", | |
method: "GET", | |
data: i, | |
dataType: "script" | |
}).done(function() { | |
0 < AtlasObscura.place_search.results.length && ($(".js-search-this-map").hide(), bounds = new google.maps.LatLngBounds, clearMarkers(), drawMarkerCollection(AtlasObscura.place_search.results), $(".js-hide-for-map-search").hide(), $(".js-show-for-map-search").show()) | |
}) | |
} | |
function updateMoreResultsButtons() { | |
AtlasObscura.place_search.total <= AtlasObscura.place_search.per_page * AtlasObscura.place_search.current_page ? ($(".js-search-show-more").hide(), $(".js-search-between-show-more").hide()) : ($(".js-search-show-more").show(), $(".js-search-between-show-more").show()) | |
} | |
function foodCaptionCreditFrom(e) { | |
var t = 1 < e.source.length && ' href="' + e.source + '"'; | |
return t ? "<a class='caption-credit text-truncate'" + t + " target='_blank'>" + e.attribution + "</a>" : "<span class='caption-credit text-truncate'>" + e.attribution + "</span>" | |
} | |
function mobileRequireSessionHandler(e) { | |
var t = e.attr("href") !== undefined ? e.attr("href") : location.href, | |
n = e.data("cause-key"); | |
e.data("handleLoggedOut") ? ("/search" == location.pathname && (t = location.href), window.location.assign("https://www.atlasobscura.com/sign-in?intent=" + encodeURIComponent(t) + "&cause=" + encodeURIComponent(n))) : $("body").hasClass("memberships") ? Cookies.get("is_user") ? window.location = "https://www.atlasobscura.com/sign-in?cause=" + encodeURIComponent(n) + "&intent=" + encodeURIComponent(t) : window.location = "https://www.atlasobscura.com/join?cause=" + encodeURIComponent(n) + "&intent=" + encodeURIComponent(t) : mobileNotice('<a href="/sign-in?intent=' + encodeURIComponent(t) + "&cause=" + encodeURIComponent(n) + '">Sign in</a> or <a href="/join">join</a> to continue.') | |
} | |
function desktopRequireSessionHandler(e) { | |
var t = e.attr("href") !== undefined ? e.attr("href") : location.href, | |
n = Cookies.get("is_user"), | |
i = e.data("cause-key"); | |
window.location = 1 == n ? "https://www.atlasobscura.com/sign-in?cause=" + i + "&next=" + encodeURIComponent(t) : "https://www.atlasobscura.com/join?cause=" + i + "&next=" + encodeURIComponent(t) | |
} | |
function requireUserOnClick(t) { | |
t.click(function(e) { | |
return e.preventDefault(), storeIntendedActivityStream(t), isSmallScreen() ? mobileRequireSessionHandler(t) : desktopRequireSessionHandler(t) | |
}) | |
} | |
function recordWorkflowReferringPage() { | |
return localStorage.setItem("workflowReferrer", location.pathname) | |
} | |
function handleWorkflowReferringPage() { | |
return localStorage.removeItem("workflowReferrer") | |
} | |
function getWorkflowReferringPath() { | |
return localStorage.getItem("workflowReferrer") || "/" | |
} | |
function togglePasswordShown(e) { | |
return "password" === e.type ? e.type = "text" : e.type = "password", e | |
} | |
function appendPasswordShowLink(e) { | |
var t = document.createElement("div"); | |
t.classList = "password-show-toggle ", $(t).click("click", function() { | |
togglePasswordShown(e) | |
}), $(e).after(t) | |
} | |
function readSessionVerb() { | |
return { | |
p_add: "Add a Place", | |
l_add: "Continue", | |
been: "Continue", | |
want: "Continue", | |
img: "Add a Photo", | |
p_edit: "Edit a Place", | |
"continue": "Continue", | |
membership: "Continue" | |
}[getURLParameter("cause")] | |
} | |
function buildSessionTitle() { | |
var e = readSessionVerb(); | |
return !!e && ("/sign-in" === location.pathname ? "Sign in to " + e : "Create an Account to " + e) | |
} | |
function requireVueCheckbox(e) { | |
return !!e.$children[0].checked | |
} | |
function persistGivenUserConsents() { | |
localStorage.getItem("user_consents") && $.ajax({ | |
type: "POST", | |
url: "/users/" + AtlasObscura.current_user.id + "/create_consent", | |
data: { | |
consented_to: localStorage.getItem("user_consents"), | |
event_label: "Checked Box Before Oauth" | |
}, | |
dataType: "script" | |
}).success(function() { | |
localStorage.removeItem("user_consents") | |
}) | |
} | |
function cookieOauthSubscribes() { | |
Cookies.set("oauth_email_optins", sessionFormCheckedSubcribes()) | |
} | |
function sessionFormCheckedSubcribes() { | |
return $(".js-session-form .checkbox-input-field").map(function() { | |
if (this.value) return 1 < $(this).attr("name").split("user[").length ? $(this).attr("name").split("user[")[1].split("]")[0] : $(this).attr("name") | |
}).toArray() | |
} | |
function prettyButtonReplace(e, t) { | |
$(e).animate({ | |
opacity: 0 | |
}, 300, function() { | |
$(this).html(t).animate({ | |
opacity: 100 | |
}, 1e3) | |
}) | |
} | |
function quickButtonReplace(e, t) { | |
$(e).html(t) | |
} | |
function modalSessionTitle(e) { | |
$(e + " .modal-sign-in-ask").show(), $(e + " .modal-close").click(function() { | |
$(e + " .modal-sign-in-ask").hide() | |
}) | |
} | |
function mobileNotice(e) { | |
$("#fixed-notice-m-text").html(e), $("#fixed-notice-m").slideDown() | |
} | |
function storeIntendedActivityStream(e) { | |
var t = getStreamKind(e); | |
return !!t && addToPendingActivityStreams({ | |
streamable: getStreamableAttrs(e), | |
kind: t | |
}) | |
} | |
function storeFoodCreatorFlag(e) { | |
if (localStorage.getItem("foodsCreated")) { | |
var t = JSON.parse(localStorage.getItem("foodsCreated")); | |
return -1 === t.indexOf(e) && t.push(e), localStorage.setItem("foodsCreated", JSON.stringify(t)) | |
} | |
return localStorage.setItem("foodsCreated", JSON.stringify([e])) | |
} | |
function addToPendingActivityStreams(t) { | |
if (pendingStreamsPresent()) { | |
var e = JSON.parse(localStorage.getItem("pendingActivityStreams")), | |
n = !0; | |
return e.forEach(function(e) { | |
JSON.stringify(e) == JSON.stringify(t) && (n = !1) | |
}), n && e.push(t), localStorage.setItem("pendingActivityStreams", JSON.stringify(e)) | |
} | |
return localStorage.setItem("pendingActivityStreams", JSON.stringify([t])) | |
} | |
function getStreamKind(e) { | |
return streamKindFromData(e) ? streamKindFromData(e) : e.hasClass("like-place") ? "wants_to" : !!e.hasClass("visit-place") && "has_done" | |
} | |
function streamKindFromData(e) { | |
switch (e.data("causeKey")) { | |
case "want": | |
return "wants_to"; | |
case "been": | |
return "has_done"; | |
default: | |
return !1 | |
} | |
} | |
function getParentVueRootData(e) { | |
return !!e.parents("[class^=vue-js-been-there-everywhere]") && e.parents("[class^=vue-js-been-there-everywhere]").data() | |
} | |
function getStreamableAttrs(e) { | |
if (e.data("streamableId") && e.data("streamableType")) return { | |
id: e.data("streamableId"), | |
type: e.data("streamableType") | |
}; | |
if (getParentVueRootData(e)) { | |
var t = getParentVueRootData(e); | |
return { | |
id: t.placeId || t.itemId, | |
type: t.itemType || "Place", | |
title: t.placeTitle | |
} | |
} | |
return AtlasObscura.current_place ? { | |
type: "Place", | |
id: AtlasObscura.current_place.id | |
} : AtlasObscura.current_thing ? { | |
type: "Thing", | |
id: AtlasObscura.current_thing.id | |
} : void 0 | |
} | |
function handlePendingActivityStreams() { | |
return !!pendingStreamsPresent() && postPendingActivityStreams() | |
} | |
function postPendingActivityStreams() { | |
var n = new Set(JSON.parse(localStorage.getItem("pendingActivityStreams"))); | |
n.forEach(function(t) { | |
"undefined" != typeof t.streamable && (parameters = { | |
activity_stream: { | |
streamable_id: t.streamable.id, | |
streamable_type: t.streamable.type, | |
kind: t.kind, | |
user_id: AtlasObscura.current_user.id | |
} | |
}, $.ajax({ | |
type: "POST", | |
url: "/activity_streams", | |
data: parameters, | |
dataType: "script" | |
}).error(function(e) { | |
-1 < e.responseText.indexOf("duplicate activity") && n["delete"](t) | |
}).success(function(e) { | |
n["delete"](t), displayCreatedStream(e.activity_stream), storeLastLoggedOutActivityStream(t), t.streamable.title && recordGAEventForVueStream(parameters, t.streamable.title) | |
}).always(function() { | |
localStorage.setItem("pendingActivityStreams", JSON.stringify(Array.from(n))) | |
})) | |
}) | |
} | |
function recordGAEventForVueStream(e, t) { | |
var n = isSmallScreen() ? "mobile-" : "", | |
i = { | |
Place: { | |
wants_to: "I Want to Go Here", | |
has_done: "I've Been Here", | |
created: "Created Place", | |
updated: "Updated Place" | |
}, | |
Thing: { | |
wants_to: "I Want to Try This", | |
has_done: "I've Tried This", | |
created: "Created Food", | |
updated: "Updated Food" | |
} | |
}[e.activity_stream.streamable_type][e.activity_stream.kind]; | |
gtag("event", i, { | |
event_category: "Atlas Action", | |
event_label: n + pageType() + " [" + e.activity_stream.streamable_type + " - " + t + "]" | |
}) | |
} | |
function storeLastLoggedOutActivityStream(e) { | |
localStorage.setItem("lastLoggedOutActivityStream", JSON.stringify(e)), $("body").trigger("lastLoggedOutActivityStreamSet") | |
} | |
function pendingStreamsPresent() { | |
var e = JSON.parse(localStorage.getItem("pendingActivityStreams")); | |
return null != e && 0 < e.length | |
} | |
function displayCreatedStream(e) { | |
"object" == typeof AtlasObscuraApplicationStore && handleVueStreamButtons(e) | |
} | |
function handleVueStreamButtons() { | |
$.ajax({ | |
url: "/vue/user-activity", | |
dataType: "json" | |
}).success(function(e) { | |
AtlasObscuraApplicationStore.dispatch("UPDATE_PLACES", e) | |
}) | |
} | |
function clickTargetedSibling(e) { | |
var t = $(e).data("clickSiblingTarget"); | |
return $(e).parent().find(t).click() | |
} | |
function handlePendingFoodsCreated() { | |
var e = JSON.parse(localStorage.getItem("foodsCreated")); | |
return !!(e && 1 <= e.length) && sendFoodAuthorUpdate(e) | |
} | |
function sendFoodAuthorUpdate(e) { | |
parameters = { | |
food_titles: e | |
}, $.ajax({ | |
type: "PATCH", | |
url: "/fill-food-author", | |
data: parameters, | |
dataType: "script" | |
}).always(function(e) { | |
if (404 === e.status || 200 === e.status) return localStorage.removeItem("foodsCreated") | |
}) | |
} | |
function recordShareFor(e, t) { | |
$.post({ | |
url: "https://www.atlasobscura.com/shares/by-email", | |
data: t | |
}) | |
} | |
function isFromFacebook() { | |
return !!navigator.userAgent.match("FBAV") || !!document.referrer.match(/facebook\.com/i) || !!getURLParameter("utm_source").match(/facebook/) | |
} | |
function isFromYoutube() { | |
return !!document.referrer.match(/youtube\.com/i) || !!getURLParameter("utm_source").match(/youtube/) | |
} | |
function isYoutubeFollower() { | |
return "1" === Cookies.get("yt_subscriber") | |
} | |
function isFbFollower() { | |
return "1" === Cookies.get("fb_subscriber") | |
} | |
function isYtFollower() { | |
return "1" === Cookies.get("yt_subscriber") | |
} | |
function setCookieIfFromAtlasFb() { | |
if (!isFromFacebook() || "atlas-page" !== getURLParameter("utm_medium")) return !1; | |
Cookies.set("fb_subscriber", "1", { | |
expires: 200, | |
path: "/" | |
}) | |
} | |
function isFlyawayExemptLayout() { | |
return $("body").hasClass("itinerary_presentations") || $("body").hasClass("sponsored_pages") || $("body").hasClass("videos") || $("body").hasClass("about_us") || $("body").hasClass("user_sessions") || $("body").hasClass("gift-shop-page") || $("body").hasClass("edit") || isUserFormPage() || isSensitivePage() || isPromoPage() || isLegalNoticePage() || isTripsPage() | |
} | |
function displayFbCount(e, n) { | |
"http://www.atlasobscura.com/articles/all-places-in-the-atlas-on-one-map" == e && (e = "http://www.atlasobscura.com/articles/all-12500-places-in-the-atlas-on-one-map"), $.getJSON("//graph.facebook.com/?fields=og_object{engagement}&id=" + e, function(e) { | |
if (e && !e.error) { | |
var t = e.og_object === undefined ? "" : e.og_object.engagement.count; | |
isSafari() ? displayCount = t.toString().replace(/(\d)(?=(\d\d\d)+(?!\d))/g, "$1,") : displayCount = t.toLocaleString(), $(n).text(displayCount) | |
} | |
}) | |
} | |
function fixedYAgainst(n, i) { | |
var o = n.innerHeight() + parseInt(n.css("margin-top")), | |
s = i.outerHeight(), | |
r = 4, | |
a = r + parseInt(n.css("margin-top")), | |
l = $(".js-masthead-logo").offset().left, | |
c = n.offset().top; | |
$(window).resize(function() { | |
o = n.innerHeight() + parseInt(n.css("margin-top")), s = i.outerHeight(), l = $(".js-masthead-logo").offset().left, c = n.offset().top; | |
$(window).scrollTop() | |
}), $(window).scroll(function() { | |
var e = $(window).scrollTop(); | |
s = i.outerHeight(); | |
var t = c + s - (o + r); | |
e <= c - r ? n.css({ | |
position: "relative", | |
top: 0, | |
left: 0, | |
"padding-top": 0 | |
}) : c - a < e && e < t - a ? n.css({ | |
position: "fixed", | |
top: r, | |
left: l, | |
"padding-top": 0 | |
}) : (t - r <= e || t <= c) && n.css({ | |
position: "relative", | |
top: 0, | |
left: 0, | |
"padding-top": s - o + "px" | |
}) | |
}) | |
} | |
function triggerSocialFollowAsk(e) { | |
return "Facebook" !== $(e).data("service") && askForSocialFollow($(e).data("service")) | |
} | |
function askForSocialFollow(e) { | |
return !!roadblockFollowAskable(e) && ($("#social-follow-ask-modal").find('a[data-service="' + e + '"]').css("display", "inline-block"), $("#social-follow-ask-modal").find('p[data-service="' + e + '"]').css("display", "inline-block"), $("#social-follow-ask-modal").modal("show"), gtag("event", "asked for follow", { | |
event_category: "Social CTAs", | |
event_label: e, | |
non_interaction: !0 | |
}), recordRoadblockFollowAsk(e), AtlasObscura.askedForSocialFollow = !0) | |
} | |
function recordRoadblockFollowAsk(e) { | |
return storeLocallyWithTimestamp(e + "socialRoadblockFollowAsk", "1"), "1" | |
} | |
function hasSeenRoadblockFollowAsk(e) { | |
var t = localStorage.getItem(e + "socialRoadblockFollowAsk"); | |
return !!t && "1" == JSON.parse(t).value | |
} | |
function roadblockFollowAskable(e) { | |
return !hasSeenRoadblockFollowAsk(e) && !AtlasObscura.askedForSocialFollow | |
} | |
function willNotSeeFBFlyaway() { | |
return isSmallScreen() || "1" == Cookies.get("facebook_page_plugin_dismissed") || isLegalNoticePage() | |
} | |
function copyUrlToClipboard() { | |
return el = document.createElement("textarea"), el.value = location.href, el.setAttribute("readonly", ""), el.style.position = "absolute", el.style.left = "-9999px", document.body.appendChild(el), el.select(), document.execCommand("copy"), document.body.removeChild(el), location.href | |
} | |
function clipboardBtnComplete(e) { | |
if ($(e).hasClass("js-clipboard-confirming")) return !1; | |
var t = $(e).text(), | |
n = $("<span></span>").text("Copied to Clipboard"); | |
n.css("width", 36), $(e).text(""), $(e).addClass("js-clipboard-confirming"), $(e).append(n), n.animate({ | |
width: "100%" | |
}, 500), setTimeout(function() { | |
n.remove(), $(e).text(t), $(e).removeClass("js-clipboard-confirming") | |
}, 2500) | |
} | |
function validateUserPhotoOwnershipChecked(e) { | |
return $(e).validate({ | |
ignore: "", | |
errorPlacement: function(e, t) { | |
$(e).appendTo($(t).siblings(".validate-message")) | |
}, | |
rules: { | |
user_image_certification: "userTakenPhotos" | |
}, | |
invalidHandler: function() { | |
"#ugc-wizard-photos-form" === e && "undefined" != typeof AtlasWizardRoot && AtlasWizardRoot.enableAlertOnPageUnload() | |
} | |
}) | |
} | |
function errorIcon() { | |
return '<i class="icon-alert-error"></i>' | |
} | |
function validateSingleContentLocationForm() { | |
$(".js-content-location-form").each(function() { | |
$(this).validate({ | |
messages: { | |
"food[content_locations_attributes][0][title]": { | |
required: errorIcon() + "Please let us know where your suggestion is from." | |
}, | |
"food[content_locations_attributes][0][location_input]": { | |
required: errorIcon() + "Please add an address." | |
} | |
} | |
}) | |
}) | |
} | |
function validateBasicFoodForm(e) { | |
var t = $(e).validate({ | |
messages: { | |
"food[title]": { | |
required: errorIcon() + "Please let us know the name of your suggestion." | |
}, | |
"food[subtitle]": { | |
required: errorIcon() + "Please provide a brief description of your suggestion." | |
}, | |
"food[geo_user_input][]": { | |
required: errorIcon() + "Please let us know where your suggestion is from." | |
} | |
}, | |
onfocusout: !1, | |
errorPlacement: function(e, t) { | |
$(t).hasClass("js-select-food-geos") ? $(t).parent(".field").append(e) : t.after(e) | |
} | |
}); | |
return $(".food-form-validated").on("select2:select", function(e) { | |
$(e.target).hasClass("error") && $(this).valid() | |
}), t | |
} | |
function validateBooleanCheckbox(e) { | |
return $(e).validate({ | |
ignore: "", | |
errorPlacement: function(e, t) { | |
$(e).appendTo($(t).siblings(".validate-message")) | |
} | |
}) | |
} | |
function clearEmailServerErrorsOnNewInput() { | |
$(".js-email-server-error").each(function() { | |
$(this).closest("form").find("input[type=email]").one("keyup", function() { | |
$(this).remove() | |
}.bind(this)) | |
}) | |
} | |
function hasRegisteredValidator(e) { | |
return !!$(e).data("validator") | |
} | |
function fromEmailNoRoadblock(e) { | |
var t, n = getURLParameter("utm_source"), | |
i = getURLParameter("utm_medium"); | |
return "string" == typeof e ? t = n === e && "email" === i : (e instanceof RegExp || (e = /Atlas.+Obscura.+Daily.+Newsletter/), t = n.match(e) && "email" === i), !!t && (Cookies.set("general_subscriber", 1, { | |
expires: 200, | |
path: "/" | |
}), !0) | |
} | |
function arrivedFromNewsletter(e) { | |
var t, n = getURLParameter("utm_source"), | |
i = getURLParameter("utm_medium"); | |
return "string" == typeof e ? t = n === e && "email" === i : (e instanceof RegExp || (e = /Atlas.+Obscura.+Daily.+Newsletter/), t = n.match(e) && "email" === i), !!t | |
} | |
function isAGeneralEmailSubscriber() { | |
return "1" == Cookies.get("general_subscriber") | |
} | |
function isAGastroEmailSubscriber() { | |
return "1" == Cookies.get("gastro_subscriber") | |
} | |
function isTripsEmailSubscriber() { | |
return "1" == localStorage.getItem("trips_email_subscriber") | |
} | |
function isWeeklyEmailSubscriber() { | |
return "1" == localStorage.getItem("weekly_email_subscriber") | |
} | |
function setCookieIfFromNewsletter() { | |
arrivedFromNewsletter() && Cookies.set("general_subscriber", 1, { | |
expires: 200, | |
path: "/" | |
}), arrivedFromNewsletter(/Gastro.+Obscura.+Weekly.+E-mail/) && Cookies.set("gastro_subscriber", 1, { | |
expires: 200, | |
path: "/" | |
}), arrivedFromNewsletter(/Atlas.+Obscura.+Journeys/) && localStorage.setItem("trips_email_subscriber", "1") | |
} | |
function gastroSubscriberOnGastro() { | |
return "gastro" === AtlasObscura.content_vertical && isAGastroEmailSubscriber() | |
} | |
function pageBasedRoadblockExemption() { | |
return gastroSubscriberOnGastro() || isEventShowPage() || isItineraryPage() || isPromoPage() || isObscuraDayPage() || isUserFormPage() || isTripsPage() || isVideoPage() || isLegalNoticePage() || isMembershipPage() || -1 < ["/about"].indexOf(window.location.pathname) | |
} | |
function shouldSeeRoadblock(e) { | |
var t = Cookies.get("disable_email_ask") || isPaidMember(), | |
n = isAGeneralEmailSubscriber(), | |
i = void 0 !== e && e; | |
return canShowDelayedRoadblock() && clearSeenRoadblocks(), i ? !(n || t || sawRecentRoadblock() || pageBasedRoadblockExemption() || fromRoadblockExemptReferrer() || AtlasObscura.hideInterrupts || AtlasObscura.hideMobileRoadblocks) : !(n || t || sawRecentRoadblock() || pageBasedRoadblockExemption() || fromRoadblockExemptReferrer() || isSmallScreen() || AtlasObscura.hideInterrupts || AtlasObscura.hideDesktopRoadblocks) | |
} | |
function isPaidMember() { | |
return $("body").hasClass("member") | |
} | |
function fromRoadblockExemptReferrer() { | |
return !!document.referrer.match(/\.reddit\.com/) || !!document.referrer.match(/news\.ycombinator\.com/) || !!document.referrer.match(/atlasobscura\.com.+mexico-city-2018/) | |
} | |
function roadblockReveal(e, t, n) { | |
window.RoadblockVetoesExitIntent = 1, setTimeout(function() { | |
window.AtlasObscura.searchModule.isSearchActive() || (AtlasObscura.hideInterrupts = !0, recordRoadblockSeen(n || "general_roadblock_redesign"), -1 < e.indexOf("email") && isSmallScreen() ? ($(e).modal({ | |
backdrop: !1 | |
}), $("body").addClass("mobile-email-modal-open"), $(e).on("hidden.bs.modal", function() { | |
$("body").removeClass("mobile-email-modal-open") | |
})) : $(e).modal("show")) | |
}, t) | |
} | |
function recordRoadblockSeen(e) { | |
Cookies.set(e, 1, { | |
expires: 200, | |
path: "/" | |
}), Cookies.set("saw_roadblock_in_session", 1, { | |
expires: .01 | |
}), AtlasObscura.subscriptionAskCategory = e, setDelayCookie() | |
} | |
function fillSubmittedEmailOn(n) { | |
$("form.js-society-signup-form-launch").submit(function(e) { | |
e.stopImmediatePropagation(), e.preventDefault(); | |
var t = $(this).find(".js-email-input")[0].value; | |
1 < t.length ? $(n).val(t) : $("#events-society-signup-modal").modal("hide") | |
}) | |
} | |
function getUserPageEventCity() { | |
var e = getGeoSlug(); | |
if (e) { | |
var t = geoSlugToSubscribeCity(e); | |
return t || geoIpEventCity() | |
} | |
return geoIpEventCity() | |
} | |
function geoSlugToSubscribeCity(e) { | |
var t = e.split("-").join("_"), | |
n = !1; | |
return [ | |
["austin"], | |
["berlin"], | |
["boston"], | |
["chicago"], | |
["denver"], | |
["detroit"], | |
["honolulu"], | |
["las_vegas"], | |
["london"], | |
["los_angeles"], | |
["miami"], | |
["minneapolis"], | |
["new_orleans"], | |
["new_york"], | |
["paris"], | |
["philadelphia"], | |
["portland"], | |
["san_diego"], | |
["san_francisco"], | |
["seattle"], | |
["washington"] | |
].forEach(function(e) { | |
if (0 === t.search(e[0])) return n = e[0], !1 | |
}), n | |
} | |
function getGeoSlug() { | |
var e = window.location.pathname.split("/things-to-do/")[1]; | |
return !!(e && 1 < e.length) && e | |
} | |
function geoIpEventCity() { | |
return Cookies.getJSON("user_geoip").region_name.toLowerCase().split(" ").join("_") | |
} | |
function checkEventCity() { | |
var e = getUserPageEventCity(); | |
$("#js-events-society-list").find('input[value="' + e + '"]').attr("checked", !0) | |
} | |
function selectEventCity(e) { | |
var t = getUserPageEventCity(); | |
$(e).val(t) | |
} | |
function mobileRoadblockReveal(e, t) { | |
if (!isFbFollower() && isFromFacebook()) var n = e.fb.domId, | |
i = e.fb.description, | |
o = e.fb.cookieName; | |
else n = e.email.domId, i = e.email.description, o = e.email.cookieName; | |
$(window).one("scroll", function() { | |
setTimeout(function() { | |
AtlasObscura.subscriptionAskLabel = i, roadblockReveal(n, t, o) | |
}, 5e3) | |
}) | |
} | |
function modalShowOnFbLoad(e) { | |
"undefined" != typeof FB && FB.Event.subscribe("xfbml.render", function() { | |
$(e).modal("show"), reportLikeIn(e) | |
}) | |
} | |
function reportLikeIn(n) { | |
"undefined" != typeof FB && FB.Event.subscribe("edge.create", function() { | |
if (!0 === AtlasObscura.liked_page) return !1; | |
var e = (isSmallScreen() ? "mobile-" : "") + n.id; | |
gtag("event", "liked", { | |
event_category: "fb_roadblock", | |
event_label: e | |
}); | |
var t = isSmallScreen() ? "-mobile" : ""; | |
gtag("event", "Like-Roadblock" + t, { | |
event_category: "Facebook", | |
event_label: document.URL | |
}), AtlasObscura.liked_page = !0, $(n).modal("hide") | |
}) | |
} | |
function clearSeenRoadblocks() { | |
Cookies.remove("saw_roadblock_in_session"), Cookies.remove("general_roadblock_redesign"), Cookies.remove("gastro email list"), Cookies.remove("fb_roadblock"), localStorage.removeItem("exit-intent-email-roadblock"), localStorage.removeItem("china-trip-2019-exit-intented") | |
} | |
function sawRecentRoadblock() { | |
return "1" === Cookies.get("general_roadblock_redesign") || "1" === Cookies.get("gastro email list") || "1" === Cookies.get("fb_roadblock") || sawEmailRoadblockAsExitIntent() | |
} | |
function sawRoadblockRecentlyInSession() { | |
return "1" === Cookies.get("saw_roadblock_in_session") | |
} | |
function sawEmailRoadblockAsExitIntent() { | |
return !!localStorage.getItem("exit-intent-email-roadblock") || !!localStorage.getItem("china-trip-2019-exit-intented") | |
} | |
function currentRoadblockCheck() { | |
return isSmallScreen() && shouldSeeRoadblock(!0) ? (mobileRoadblockReveal({ | |
fb: { | |
domId: "#facebook-topographic-modal", | |
cookieName: "fb_roadblock", | |
description: "mobile-facebook-topographic-modal" | |
}, | |
email: { | |
domId: isGastroPage() ? "#gastro-email-roadblock-modal" : "#email-roadblock-topographic-modal", | |
cookieName: isGastroPage() ? "gastro email list" : "general_roadblock_redesign", | |
description: "mobile-email-roadblock-topographic-modal" | |
} | |
}, 0), !0) : !!document.referrer.match(/\.atlasobscura\.com/) && (shouldSeeRoadblock() ? (isGastroPage() ? showGastroRoadblock() : showGeneralRoadblock("#book-contest-email-modal"), !0) : void 0) | |
} | |
function showGastroRoadblock() { | |
roadblockReveal("#gastro-email-roadblock-modal", 0, "gastro email list") | |
} | |
function showGeneralRoadblock(e) { | |
e = e || "#book-contest-email-modal", $(e).addClass("not-fullscreen"), $(e).removeClass("modal-md-fullscreen"), roadblockReveal(e, 0, "general_roadblock_redesign") | |
} | |
function dispatchContestTwitterOddsUpdate() { | |
$("#twitter-odds-update-form").submit() | |
} | |
function modalSeenLabelFrom(e) { | |
return $(e).find('input[name="source"]').val() | |
} | |
function setDelayCookie() { | |
Cookies.get("roadblock_week_delay_start") || Cookies.set("roadblock_week_delay_start", moment().toISOString()) | |
} | |
function canShowDelayedRoadblock() { | |
return !Cookies.get("delayed_roadblock_seen") && (!!(Cookies.get("roadblock_week_delay_start") && getDelayStartTime().add(5, "days") <= moment()) && (Cookies.set("delayed_roadblock_seen", !0), !0)) | |
} | |
function getDelayStartTime() { | |
return moment(Cookies.get("roadblock_week_delay_start")) | |
} | |
function waitForGeoIp() { | |
return new Promise(function(e) { | |
AtlasObscura.user_geoip ? e(!0) : $("body").on("ao-geolocation-complete", function() { | |
e(!0) | |
}) | |
}) | |
} | |
function addBrowseToDropdownLinks() { | |
$("#geo-child-drawer .geo-dropdown-item a").each(function() { | |
var e = $(this).attr("href") + "#browse"; | |
$(this).attr("href", e) | |
}) | |
} | |
function initFoodTopoMap() { | |
if (AtlasObscura.current_geos === undefined || 0 === AtlasObscura.current_geos.length || AtlasObscura.current_trip) return !1; | |
var n = AtlasObscura.current_geos.map(function(e) { | |
return e.region | |
}), | |
e = n.filter(function(e, t) { | |
return n.indexOf(e) == t | |
}), | |
t = 1 < e.length ? 270 : 150, | |
i = 150, | |
o = AtlasObscura.current_geos.map(function(e) { | |
return e.countryCode | |
}), | |
s = o.filter(function(e, t) { | |
return o.indexOf(e) == t | |
}), | |
r = AtlasObscura.current_geos.map(function(e) { | |
return e.level | |
}), | |
a = 1 === s.length && "USA" === s[0] && -1 === r.indexOf("country"), | |
l = 1 === s.length && "RUS" === s[0] && 0 === r.indexOf("country"); | |
if (a) var c = AtlasObscura.current_geos.map(function(e) { | |
return e.stateCode | |
}), | |
d = c.filter(function(e, t) { | |
return c.indexOf(e) == t | |
}); | |
var u, h = { | |
Africa: { | |
rotate: [-20, -5], | |
scale: .6 * t | |
}, | |
"North America": { | |
rotate: [96, -35], | |
scale: t / 1.5 | |
}, | |
Europe: { | |
rotate: [-10, -50], | |
scale: 1.4 * t | |
}, | |
Asia: { | |
rotate: [-100, -40], | |
scale: .73 * t | |
}, | |
"Central America": { | |
rotate: [82, -10], | |
scale: 1.5 * t | |
}, | |
Oceania: { | |
rotate: [-140, 25], | |
scale: .7 * t | |
}, | |
Caribbean: { | |
rotate: [75, -15], | |
scale: 1.8 * t | |
}, | |
"South America": { | |
rotate: [60, 20], | |
scale: .6 * t | |
}, | |
"Middle East": { | |
rotate: [-45, -40], | |
scale: .7 * t | |
}, | |
Antarctica: {}, | |
World: { | |
center: [-30, -30], | |
scale: .2 * t | |
} | |
}, | |
p = 1 < e.length ? h.World : h[e[0]]; | |
l && (p = h.Asia), u = !a && 1 < e.length ? d3.geoInterruptedBoggs().scale(43).translate([t / 2, i / 2]).precision(.3) : a ? d3.geoAlbersUsa().translate([t / 2, i / 2]).scale(1.2 * t) : d3.geoOrthographic().translate([t / 2, i / 2]).scale(p.scale).clipAngle(90).precision(.6).rotate(p.rotate); | |
var f = d3.geoPath().projection(u), | |
m = d3.geoGraticule(); | |
if (AtlasObscura.visit.isMobile) var g = d3.select("#topomap-m").append("svg").attr("width", t).attr("height", i); | |
else g = d3.select("#topomap").append("svg").attr("width", t).attr("height", i); | |
var v, y = g.append("defs"); | |
y.append("path").datum({ | |
type: "Sphere" | |
}).attr("id", "sphere").attr("d", f), y.append("clipPath").attr("id", "clip").append("use").attr("xlink:href", "#sphere"), g.append("use").attr("class", "d3map-stroke").attr("xlink:href", "#sphere"), g.append("use").attr("class", "d3map-fill").attr("xlink:href", "#sphere"), g.append("path").datum(m).attr("class", "d3map-graticule").attr("clip-path", "url(#clip)").attr("d", f), v = a ? "https://assets.atlasobscura.com/topojson/states-10.json" : "https://assets.atlasobscura.com/topojson/world-countries.json", d3.json(v, function(e, t) { | |
if (e) throw e; | |
var n, i = { | |
type: "GeometryCollection" | |
}; | |
a ? (n = t.objects.states, i.geometries = n.geometries.filter(function(e) { | |
return -1 < d.indexOf(e.code) | |
})) : (n = t.objects.countries1, i.geometries = n.geometries.filter(function(e) { | |
return -1 < s.indexOf(e.id) | |
})), g.insert("path", ".d3map-graticule").datum(topojson.feature(t, n)).attr("class", "d3map-land").attr("clip-path", "url(#clip)").attr("d", f), g.insert("path", ".d3map-graticule").datum(topojson.feature(t, i)).attr("class", "d3map-land-selected").attr("clip-path", "url(#clip)").attr("d", f), g.insert("path", ".d3map-graticule").datum(topojson.mesh(t, n, function(e, t) { | |
return e !== t | |
})).attr("class", "d3map-boundary").attr("clip-path", "url(#clip)").attr("d", f) | |
}), d3.select(self.frameElement).style("height", i + "px") | |
} | |
function naiveEventbriteHeightGrow() { | |
$("#event-get-tickets iframe").load(function() { | |
applyGrowthFactorIfNeeded(this); | |
var e = this; | |
$(window).on("resize", function() { | |
applyGrowthFactorIfNeeded(e) | |
}) | |
}) | |
} | |
function applyGrowthFactorIfNeeded(e) { | |
if (1 == $(e).data("m-growth-applied")) return !1; | |
applyGrowthFactorOnMobile(e) | |
} | |
function applyGrowthFactorOnMobile(e) { | |
if (isSmallScreen()) { | |
var t = 1.2; | |
return $(e).attr("height", $(e).attr("height") * t), $(e).data("m-growth-applied", 1) | |
} | |
} | |
function renumberListTiles() { | |
$(".list-places .content-card-place").each(function(e) { | |
$(this).find(".js-content-card-figure .list-item-number span.number").text(e + 1 + pageOffset()) | |
}) | |
} | |
function reflowListTiles() { | |
var e = $(".index-row-wrap"), | |
n = $(".js-reflowable-tile").toArray(); | |
$.each(e, function(e, t) { | |
for ($(t).empty(); $(t).children(".js-reflowable-tile").filter(":visible").length < 3 && 0 < n.length;) $(t).append($(n.shift())), 0 | |
}), n = e = null | |
} | |
function locationPickerAutocomplete(e) { | |
var t = $(e), | |
n = t.find(".location-picker-hidden-map"), | |
i = t.find(".js-address-input"), | |
o = inputChildByName(t, "latitude").val(), | |
s = inputChildByName(t, "longitude").val(), | |
r = hasAddressAutoCompleteFilled(t); | |
n.locationpicker({ | |
location: { | |
latitude: o || 0, | |
longitude: s || 0 | |
}, | |
enableAutocomplete: !0, | |
radius: 0, | |
inputBinding: { | |
preserveInitAddress: r, | |
locationNameInput: i, | |
latitudeInput: inputChildByName(t, "latitude"), | |
longitudeInput: inputChildByName(t, "longitude") | |
}, | |
onchanged: updateLocationPickerInputs | |
}) | |
} | |
function updateLocationPickerInputs() { | |
clearLocationPickerInputs.bind(this)(), updateLocationPickerAddressInputs.bind(this)(), updateLocationPickerLatLng.bind(this)() | |
} | |
function clearLocationPickerInputs() { | |
var e = $(this).parents(".js-address-autocomplete-wrap"); | |
inputChildByName(e, "address1").val(0), inputChildByName(e, "address2").val(0), inputChildByName(e, "city").val(0), inputChildByName(e, "state").val(0), inputChildByName(e, "country").val(0), inputChildByName(e, "postal_code").val(0), inputChildByName(e, "latitude").val(0), inputChildByName(e, "longitude").val(0) | |
} | |
function updateLocationPickerAddressInputs() { | |
var e = $(this).parents(".js-address-autocomplete-wrap"), | |
t = $(this).locationpicker("map").location.addressComponents; | |
inputChildByName(e, "address1").val(t.addressLine1), inputChildByName(e, "address2").val(t.addressLine2), inputChildByName(e, "city").val(t.city), inputChildByName(e, "state").val(t.stateOrProvince), inputChildByName(e, "country").val(t.country), inputChildByName(e, "postal_code").val(t.postalCode) | |
} | |
function updateLocationPickerLatLng() { | |
var e = $(this).parents(".js-address-autocomplete-wrap"), | |
t = $(this).locationpicker("map").location; | |
inputChildByName(e, "latitude").val(t.latitude), inputChildByName(e, "longitude").val(t.longitude) | |
} | |
function inputChildByName(e, t) { | |
var n = e.find("input[name='" + t + "']"), | |
i = e.find("input." + t); | |
return 0 < n.length ? n : i | |
} | |
function initAddressAutocompletes() { | |
$(".js-address-autocomplete-wrap").each(function() { | |
locationPickerAutocomplete(this) | |
}) | |
} | |
function hasAddressAutoCompleteFilled(e) { | |
return 0 < inputChildByName(e, "country").val().length || 0 < inputChildByName(e, "city").val().length | |
} | |
function submitCaptchadTipForm() { | |
return $("#send-a-tip-form").submit(), grecaptcha.reset() | |
} | |
function submitCaptchadShareForm() { | |
return $("#email-share-form").submit(), grecaptcha.reset() | |
} | |
function submitCaptchadFoodTipForm() { | |
return $("#send-a-food-tip-form").submit(), grecaptcha.reset() | |
} | |
function submitCaptchadFoodLocationForm() { | |
return $("#food-content-location-form").submit(), grecaptcha.reset() | |
} | |
function renderEagerRecaptchas() { | |
$(".g-recaptcha").each(function(e, t) { | |
if ("6LfMneoZAAAAAOMRYLYER0vpGwsFBCmoDE6PPWKw" !== $(t).data("sitekey")) return 1 == $(t).attr("eager-recaptcha") ? (grecaptcha.render(t, { | |
sitekey: "6LeCJy0UAAAAAO5grI_UrlSR1oz9AceexUbkcHgC" | |
}), $(t).removeAttr("eager-recaptcha"), !1) : void 0 | |
}) | |
} | |
function submitCaptchadEmailAskForm() { | |
return $(".js-email-ask-form").submit(), grecaptcha.reset() | |
} | |
function submitCaptchadContestForm() { | |
return $("#contest-form").submit(), grecaptcha.reset() | |
} | |
function submitCaptchadMxcForm() { | |
return $("#mxc-contest-form").submit(), grecaptcha.reset() | |
} | |
function submitCaptchadJoinForm() { | |
return $("#join-form").submit(), grecaptcha.reset() | |
} | |
function submitCaptchadFullscreenEmailForm() { | |
return $("#fullscreen-email-form").submit(), grecaptcha.reset() | |
} | |
function submitCaptchadNewFoodForm() { | |
return $("#new_food").submit(), grecaptcha.reset() | |
} | |
function forceImageLoad(e) { | |
return $("<img/>").attr("src", e) | |
} | |
function lazyloadPlaceholderImageInBG(e) { | |
var t = $(e); | |
if (isSmallScreen() && 0 == t.data("load-small-screen")) return !1; | |
forceImageLoad(t.data("lazyload-placeholder")); | |
var n = t.data("lazyload-placeholder"); | |
t.addClass("background-blur"), t.css({ | |
"background-image": "url(" + n + ")" | |
}); | |
var i = t.data("lazyload-background"); | |
forceImageLoad(i).on("load", function() { | |
$(this).remove(); | |
var e = "url(" + i + "), url(" + n + ")"; | |
t.removeClass("background-blur"), t.css({ | |
"background-image": e | |
}), t.trigger("ao:full-bg-loaded") | |
}) | |
} | |
function pictureSrcsForIE() { | |
$("picture").each(function() { | |
var e = $(this).find("img"); | |
e.attr("src", e.data("ieSrc")) | |
}) | |
} | |
function heroSliderWithDots(e) { | |
var t = 0, | |
n = $(e).data("slick-eligible-starts"); | |
n && (t = n[Math.floor(Math.random() * n.length)]); | |
var i = $(e).data("slick-disable-autoplay"), | |
o = !$(e).data("slick-cancel-dots"); | |
$(e).slick({ | |
autoplay: !1, | |
infinite: !0, | |
autoplaySpeed: 8e3, | |
cssEase: "linear", | |
speed: 1e3, | |
fade: !0, | |
dots: o, | |
arrows: !1, | |
lazyLoad: "progressive", | |
initialSlide: t | |
}); | |
$(e).on("ao:slick-start", function() { | |
if (i) return !1; | |
$(this).slick("slickPlay") | |
}) | |
} | |
function setContainedImgBg(e) { | |
var t; | |
return t = 0 < $(e).find("picture source").length ? srcFromPictureSources($(e).find("picture")) : $(e).find("img").attr("src"), $(e).data("lazyload-placeholder") ? ($(e).data("lazyload-background", t), lazyloadPlaceholderImageInBG(e)) : $(e).css("background-image", "url(" + t + ")"), t | |
} | |
function srcFromPictureSources(e) { | |
return isSmallScreen() ? $(e).find('source[data-breakpoint="sm"]').data("srcset") : $(e).find('source[data-breakpoint*="md"]').data("srcset") | |
} | |
function adSlotName(e) { | |
var t = e.adUnitPath.split("/"); | |
return t[t.length - 1] | |
} | |
function enableActiveViewableLogging() { | |
htlbid.cmd.push(function() { | |
htlbid.on("impressionViewable", function(e) { | |
console.log("NEW VIEWABLE IMPRESSION", adSlotName(e), e.details.lineItemId) | |
}) | |
}) | |
} | |
function removeAdSlotIfEmpty(t, n) { | |
htlbid.cmd.push(function() { | |
htlbid.on("slotRenderEnded", function(e) { | |
e.isEmpty && adSlotName(e) == t && $(n).remove() | |
}) | |
}) | |
} | |
function gptSlotIsDefined(e) { | |
for (var t in AtlasAdSlots) | |
if (t == e) return !0 | |
} | |
function addToGPTTargetingArray(e, t, n) { | |
var i; | |
return i = void 0 === n ? googletag.pubads().getTargeting(e) : AtlasAdSlots[n].getTargeting(e), [].concat(i, t) | |
} | |
function updateSlotTargeting(e, t, n) { | |
AtlasAdSlots[e].clearTargeting(t), AtlasAdSlots[e].setTargeting(t, n) | |
} | |
function printDefinedAdSlotsToConsole() { | |
for (var e in AtlasAdSlots) console.log(e) | |
} | |
function tagManagerIdString() { | |
return "110134742" | |
} | |
function reportRecircImpressionToGa(e) { | |
gtag("event", "seen", { | |
event_category: "Sponsored Content Recirc", | |
event_label: e, | |
non_interaction: !0 | |
}) | |
} | |
function displayRecircContentImpression(e) { | |
$("body").trigger("ao_ads:display_recirc_impression_" + e) | |
} | |
function doneRecircContentImpression(e) { | |
$("body").trigger("ao_ads:done_recirc_impression_" + e) | |
} | |
function reportRecircImpression(e) { | |
$("body").trigger("ao_ads:start_recirc_impression_" + $(e).data("recircPid")) | |
} | |
function reportSponsoredRecircIfInViewport(e) { | |
isElementInViewport(e) && reportRecircImpression(e) | |
} | |
function pollSponsoredRecircViewability() { | |
$(".js-tracked-sponsored-recirc").each(function() { | |
reportSponsoredRecircIfInViewport(this) | |
}) | |
} | |
function trackSponsoredRecircClicks() { | |
$(".js-tracked-sponsored-recirc").each(function() { | |
$(this).closest("a").on("click", function() { | |
window.gtag && gtag("event", "Clicked", { | |
event_category: "Sponsored Content Recirc", | |
event_label: this.href | |
}) | |
}) | |
}) | |
} | |
function getAdRecircRecord(e) { | |
return "undefined" == typeof AtlasAdSlots.recircListeners ? (AtlasAdSlots.recircListeners = {}, undefined) : AtlasAdSlots.recircListeners[e] | |
} | |
function setAdRecircRecord(e, t) { | |
return "undefined" == typeof AtlasAdSlots.recircListeners && (AtlasAdSlots.recircListeners = {}), AtlasAdSlots.recircListeners[e] = t | |
} | |
function defineRecircTracker() { | |
if (!AtlasAdSlots.recircTrackerDefined) { | |
var e = document.createElement("div"); | |
return e.className = "always-viewable-pixel-wrap hidden-print", document.body.appendChild(e), AtlasAdSlots.recircTrackerDefined = !0 | |
} | |
} | |
function broadcastSlotFillStatus(e) { | |
e.isEmpty ? $(e.selector).trigger("adSlotEmpty") : $(e.selector).trigger("adSlotFilled") | |
} | |
function applyAdFilledStyles(e) { | |
for (var t in styles = {}, $(e).data()) "ad" === t.slice(0, 2) && (styles[t.slice(2).toLowerCase()] = $(e).data(t)); | |
$(e).css(styles) | |
} | |
function stickyRailBottomOffset(e) { | |
var t = $($(e).data("above-of")); | |
return t.length ? $(document).outerHeight(!0) - t.offset().top + $(e).data("affixed-bottom-margin") : 1490 | |
} | |
function stickyRailTopOffset(e) { | |
var t = $($(e).data("below-of")); | |
return t.offset().top + t.outerHeight(!0) - $(e).data("affixed-top-margin") | |
} | |
function railAlreadyAffixed(e) { | |
return !!$(e).data("bs.affix") | |
} | |
function railInTransit(e) { | |
var t = ensureJquery(e); | |
return t.hasClass("affix") || t.hasClass("affix-bottom") | |
} | |
function railTooShort(e) { | |
var t = 1.2, | |
n = ensureJquery(e); | |
if (n.data("rail-too-short")) return !0; | |
if (railInTransit(e)) return !1; | |
var i = $(n.data("above-of")).offset().top - n.offset().top < n.outerHeight(!0) * t; | |
return n.data("rail-too-short", i), i | |
} | |
function removeRailAffix(e) { | |
var t = ensureJquery(e); | |
t.removeData("bs.affix"), t.removeClass("affix affix-bottom affix-top"), t.css({ | |
top: "inherit", | |
left: "inherit", | |
right: "inherit", | |
bottom: "inherit" | |
}), t.addClass("affix-removed") | |
} | |
function affixRightRail(e) { | |
if (isSmallScreen() || railTooShort(e)) return removeRailAffix(e), !1; | |
var t = { | |
top: stickyRailTopOffset(e), | |
bottom: stickyRailBottomOffset(e) | |
}; | |
return railAlreadyAffixed(e) ? $(e).data("bs.affix").options.offset = t : ($(e).affix({ | |
offset: t | |
}), fixedRailPositionListeners(".js-sticky-siderail")), !0 | |
} | |
function positionFixedRail(e) { | |
$(e).css({ | |
top: $(e).data("affixed-top-margin"), | |
left: $(e).offset().left | |
}) | |
} | |
function positionRailTop(e) { | |
$(e).css({ | |
top: "inherit", | |
left: "inherit" | |
}) | |
} | |
function positionRailBottom(e) { | |
$(e).css({ | |
left: "inherit" | |
}) | |
} | |
function fixedRailPositionListeners(e) { | |
$(e).on("affix.bs.affix", function() { | |
positionFixedRail(e) | |
}), $(e).on("affix-top.bs.affix", function() { | |
positionRailTop(e) | |
}), $(e).on("affix-bottom.bs.affix", function() { | |
positionRailBottom(e) | |
}) | |
} | |
function ensureRelevantMargins(e) { | |
var t = $($(e).data("below-of")), | |
n = t.children(":visible").last().outerHeight(!0) - t.children(":visible").last().outerHeight(); | |
t.css("margin-bottom", n) | |
} | |
function softAriaHide(e) { | |
return e["aria-hidden"] || e["aria-label"] || e.role || e.setAttribute("aria-hidden", !0), e | |
} | |
function deepAriaHide(e) { | |
return e.setAttribute("aria-hidden", !0), e.setAttribute("role", "none"), $(e).find("*").attr("aria-hidden", !0), e | |
} | |
function softMakeTabbable(e) { | |
void 0 === $(e).attr("tabindex") && $(e).attr("tabindex", 0) | |
} | |
function softAriaLabel(e, t) { | |
void 0 === $(e).attr("aria-label") && $(e).attr("aria-label", t) | |
} | |
function softRole(e, t) { | |
void 0 === $(e).attr("role") && $(e).attr("role", t) | |
} | |
function directUploadFrom(e, t) { | |
var n = ["image/jpeg", "image/jpg", "image/png", "image/gif"]; | |
$(e).S3Uploader({ | |
path: t, | |
progress_bar_target: $(".progress-wrap"), | |
additional_data: { | |
image_type: $(e).data("image-type") | |
}, | |
before_add: function(e) { | |
return AtlasObscura.uploadingImgTag = loadImage(e), -1 === $.inArray(e.type, n) ? (alert("Sorry, please upload a valid file (JPG, PNG or GIF)."), !1) : -1 === e.name.indexOf("+") || (alert('Sorry, please rename your file without a "+" character.'), !1) | |
} | |
}) | |
} | |
function loadImageWithProperOrientation(e, i) { | |
var t = e, | |
n = new XMLHttpRequest; | |
n.open("GET", t, !0), n.responseType = "blob", n.onload = function() { | |
var t = 0, | |
n = this.response; | |
200 === this.status && loadImage.parseMetaData(n, function(e) { | |
e.exif && (t = e.exif.get("Orientation")), loadImage(n, function(e) { | |
$(e).addClass("img-responsive"), isSmallScreen() ? i.find(".image-container").prepend(e) : i.find(".image-container").append("Uploaded Image:<br>").append(e) | |
}, { | |
canvas: !0, | |
orientation: t | |
}) | |
}) | |
}, n.send() | |
} | |
function initDirectUploadUI(e) { | |
$(".thing-form-by-member").find(".js-uploader-nested-fields").next(".add_fields").addClass("disabled"), $(".place-form-by-member").find(".js-uploader-nested-fields").next(".add_fields").addClass("hidden"), $(".single-photo-form").find(".add_fields").addClass("disabled"); | |
var t = $(e); | |
if (!t.length) return !1; | |
if ($(".js-select-photo-attribution").each(function() { | |
$(this).rules("add", { | |
required: function(e) { | |
var t = $(e).closest(".js-image-uploader").find(".image-uid-field"); | |
return 0 == t.length || 0 < t.val().length | |
} | |
}) | |
}), t.is(".place-form-by-member")) var n = "uploads/place_images/" + uuidv4(); | |
if (t.is(".thing-form-by-member")) n = "uploads/thing_images/" + uuidv4(); | |
directUploadFrom(".direct-uploader", n), $(".direct-uploader").bind("s3_uploads_start", function() { | |
var e = $(this).closest(".js-uploader-wrap"); | |
e.addClass("in-progress"), e.find(".file-input-ui").hide(), e.find(".progress-bar").addClass("active"); | |
var t = e.find(".image-container"); | |
$(t).html(AtlasObscura.uploadingImgTag) | |
}), $(".direct-uploader").bind("s3_upload_failed", function() { | |
var e = $(this).closest(".image-uploader"); | |
e.find(".file-input-ui").show(), $(".progress-bar").removeClass("active"), e.addClass("by-current-user"), alert("Sorry, file failed to upload. Please try again.") | |
}), $(".direct-uploader").bind("s3_upload_complete", function(e, t) { | |
$(".thing-form-by-member").find(".js-uploader-nested-fields").next(".add_fields").removeClass("disabled"), $(".place-form-by-member").find(".js-uploader-nested-fields").next(".add_fields").removeClass("hidden"), $(".single-photo-form").find(".add_fields").removeClass("disabled"); | |
var n = $(this).closest(".image-uploader"); | |
$(this).closest(".js-uploader-wrap").removeClass("in-progress"), n.addClass("by-current-user"), $(".progress-bar").removeClass("active"), setUserSourceIfCamera(n); | |
var i = t.filepath.replace("/atlas-dev/", ""); | |
i = decodeURIComponent(i).replace(/\+/g, " "); | |
n.find(".image-uid-field").val(i), n.find(".image-name-field").val(t.filename), $(".image-meta-fields").show(), $(".add-photo-btn-wrap").show(), $(this).parent().siblings(".image-actions").removeClass("hidden"), $(this).closest("form").trigger(e.type), $(this).remove() | |
}) | |
} | |
function setUserSourceIfCamera(e) { | |
isSmallScreen() && e.find(".js-select-photo-attribution").val("user") | |
} | |
function applyPlaceClosedNotice(e) { | |
$(e).hasClass("search-list-item") ? $('<div class="content-card-closed-notification detail-sm"> <span class="icon icon-block"></span><span> permanently closed</span> </div>').insertAfter($(e).find("h6.title-md")) : $('<div class="content-card-closed-notification detail-sm"> <span class="icon icon-block"></span><span> permanently closed</span> </div>').insertAfter($(e).find(".content-card-title")) | |
} | |
function applyTripCardPills(e) { | |
-1 < $(e).data("promo-tags").indexOf("new addition") ? $(e).prepend($('<div class="content-card-pill trip-card-pill new-addition-pill">New Addition</div>')) : moment($(e).data("added")) > moment().subtract(21, "days") && $(e).prepend($('<div class="content-card-pill trip-card-pill">Just Announced</div>')) | |
} | |
function fillWizardNav(n, e) { | |
var t = "step-" + e + "-of-4"; | |
$(".js-wiz-step-n-presenter").addClass(t), $.each($(".js-wiz-step-n-link"), function(e, t) { | |
thisHref = n + "/" + $(t).data("step-n"), $(t).attr("href", thisHref) | |
}), addStepDividersToProgressBar(e) | |
} | |
function addStepDividersToProgressBar(e) { | |
var t = Array.apply(null, { | |
length: e - 1 | |
}); | |
for (var n in t) $(".js-wiz-step-n-presenter").append('<div class="wiz-bar-divider"></div>') | |
} | |
function appendHtmlFromSpawnButton(e) { | |
return $($(e).data("insertionNode")).append($(e).data("insertionMarkup")) | |
} | |
function offerFieldRemover(e) { | |
if (0 < $(e).find(".remover").length) return !1; | |
var t = $('<span class="remover icon icon-menu-close"</span>'); | |
$(e).append(t), t.click("click", removeParentRemoveable) | |
} | |
function removeParentRemoveable() { | |
$(this).closest(".js-removeable-field-wrap").remove() | |
} | |
function prepareForAddedImage() { | |
if (0 < $(".vue-js-checkbox").length) { | |
var e = AtlasObscuraApplicationStore.checkboxes[0].$children[0]; | |
e.checked && e.toggle() | |
} | |
} | |
function findAddressFieldsByLatLng(e, t) { | |
var n; | |
return $(".js-address-autocomplete-wrap").each(function() { | |
return thisLat = Number($(this).find(".latitude").val()), thisLng = Number($(this).find(".longitude").val()), e.toFixed(5) === thisLat.toFixed(5) && t.toFixed(5) === thisLng.toFixed(5) ? (n = this, !1) : e.toFixed(4) === thisLat.toFixed(4) && t.toFixed(4) === thisLng.toFixed(4) ? (n = this, !1) : void 0 | |
}), n | |
} | |
function vueWizardBody(e) { | |
return AtlasWizardRoot = new Vue({ | |
el: e, | |
props: ["relevantInputsHaveContent", "wizardBodyClass", "locationForms", "locationCreateCount", "locationSubsReported", "locationSubsAwaited", "alertUserOnPageUnload", "formTouched"], | |
propsData: { | |
relevantInputsHaveContent: this.checkIfUserInput, | |
locationForms: {}, | |
locationCreateCount: 0, | |
alertUserOnPageUnload: !1, | |
formTouched: !1 | |
}, | |
computed: { | |
wizardBodyClass: function() { | |
return this.wizardBodyClassName() | |
} | |
}, | |
created: function() { | |
this.relevantInputsHaveContent = this.checkIfUserInput() | |
}, | |
methods: { | |
checkIfUserInput: function() { | |
var n = !1; | |
return $(".js-vue-wizard-relevant-input").each(function(e, t) { | |
if (0 < $(t).val().length) return !(n = !0) | |
}), n | |
}, | |
updateFormStatus: function() { | |
this.relevantInputsHaveContent = this.checkIfUserInput(), this.updateActiveValidations(), this.formTouched = !0 | |
}, | |
validationsAllowSubmit: function() { | |
return !this.relevantInputsHaveContent || this.isValidInContext() | |
}, | |
reportTinyMceLength: function(e) { | |
return this.updateFormStatus(), 10 < e ? this.relevantInputsHaveContent = !0 : e <= 10 && (this.relevantInputsHaveContent = !1), this.relevantInputsHaveContent | |
}, | |
wizardBodyClassName: function() { | |
return this.relevantInputsHaveContent ? "submit-ready" : "submit-unready" | |
}, | |
storeLocationFields: function(e) { | |
var t = "locationFields" + $(e).data("locationId"); | |
this.locationForms[t] = $(e).closest(".js-content-location-replaceable-form").clone() | |
}, | |
refreshLocationFields: function(e) { | |
var t = "locationFields" + $(e).data("locationId"), | |
n = $(this.locationForms[t]); | |
$(e).closest(".js-content-location-replaceable-form").replaceWith(n) | |
}, | |
updateActiveValidations: function() { | |
this.relevantInputsHaveContent && 0 < $("#ugc-wizard-photos-form").length && (this.photoOwnershipValidator && overridePhotoValidator() ? (console.log("destroying validator", this.photoOwnershipValidator), this.disablePhotoOwnershipValidation()) : (this.photoOwnershipValidator = validateUserPhotoOwnershipChecked("#ugc-wizard-photos-form", "Please confirm that you own these photos."), this.enablePhotoOwnershipValidation())) | |
}, | |
lockNavigation: function() { | |
this.lockPage = !0, this.$dispatch("locked-navigation") | |
}, | |
unlockNavigation: function() { | |
this.lockPage = !1, this.$dispatch("unlocked-navigation") | |
}, | |
incrementLocationCreateCount: function(e) { | |
this.locationCreateCount += e | |
}, | |
reportLocationsCreated: function() {}, | |
checkInLocationUpdate: function(e) { | |
this.locationSubsReported += e, 1 <= this.locationSubsAwaited ? this.locationSubsReported >= this.locationSubsAwaited && (this.reportLocationsCreated(), $(AtlasWizardRoot.$el).trigger("locations-all-checked-in")) : 0 === this.locationSubsAwaited && $(AtlasWizardRoot.$el).trigger("locations-all-checked-in") | |
}, | |
disablePhotoOwnershipValidation: function() { | |
this.photoOwnershipValidator.settings.ignore = "*", $(".food-photo-submit-wrap .vue-js-checkbox").hide() | |
}, | |
enablePhotoOwnershipValidation: function() { | |
this.photoOwnershipValidator.settings.ignore = "", $(".food-photo-submit-wrap .vue-js-checkbox").show() | |
}, | |
enableAlertOnPageUnload: function() { | |
this.alertUserOnPageUnload = !0 | |
}, | |
disableAlertOnPageUnload: function() { | |
this.alertUserOnPageUnload = !1 | |
}, | |
isValidInContext: function() { | |
return contentLocationsValidated() && this.foodPhotosValidated() && this.basicFormValidated() | |
}, | |
foodPhotosValidated: function() { | |
return "object" != typeof this.photoOwnershipValidator || 0 === Object.keys(this.photoOwnershipValidator.invalid).length | |
}, | |
basicFormValidated: function() { | |
return "object" != typeof this.basicFormValidator || 0 === Object.keys(this.basicFormValidator.invalid).length | |
} | |
} | |
}), wizardUpdateStatusOn(AtlasWizardRoot, "input", ".js-vue-wizard-relevant-input"), wizardRefreshesLocations(), AtlasWizardRoot.updateActiveValidations(), 0 < $(".food-form-validated").length && (AtlasWizardRoot.basicFormValidator = validateBasicFoodForm($(".food-form-validated"))), watchForWizAbandonment(), AtlasWizardRoot | |
} | |
function watchForWizAbandonment() { | |
monitoredSubmitMethodsPresent() && (AtlasWizardRoot.enableAlertOnPageUnload(), monitorSubmitsForFormSave()) | |
} | |
function monitorSubmitsForFormSave() { | |
$(".vue-js-wizard-body form").on("submit", function() { | |
AtlasWizardRoot.validationsAllowSubmit() ? AtlasWizardRoot.disableAlertOnPageUnload() : !1 === AtlasWizardRoot.validationsAllowSubmit() && AtlasWizardRoot.enableAlertOnPageUnload() | |
}) | |
} | |
function monitoredSubmitMethodsPresent() { | |
return 0 < $(".js-ugc-wizard-submit").length | |
} | |
function wizardUpdateStatusOn(e, t, n) { | |
$(e.$el).on(t, n, function() { | |
e.updateFormStatus() | |
}) | |
} | |
function photosUploadedToWizardCount() { | |
return $("#ugc-wizard-photos-form .image-tile:visible").length | |
} | |
function wizardShouldAcceptMorePhotos() { | |
return photosUploadedToWizardCount() < 6 | |
} | |
function wizardRefreshesLocations() { | |
$("body").on("click", ".js-remove-disabled", function() { | |
var e = $(this).parent().find(".js-vue-wizard-fresh-location"); | |
AtlasWizardRoot.storeLocationFields(e) | |
}), $("body").on("click", ".js-vue-wizard-fresh-location", function() { | |
AtlasWizardRoot.refreshLocationFields(this) | |
}) | |
} | |
function classifySoleRemainingTile() { | |
1 == $(".image-tile:visible").length ? $(".image-tile:visible").addClass("sole-image-tile") : 1 < $(".image-tile:visible").length && $(".image-tile:visible").removeClass("sole-image-tile") | |
} | |
function submittedNewContentLocation(e) { | |
return 0 === $(e).find('input[name*="content_locations_attributes"][name$="id]"]').length | |
} | |
function insertUgcModalAsFormContent() { | |
$("#ugc-continue-modal").addClass("as-body-content"), isSmallScreen() ? $("#page-content").html($("#ugc-continue-modal")) : ($("#food-form-nav").removeClass("hidden"), $(".ugc-wizard-body").html($("#ugc-continue-modal"))), $("#ugc-continue-modal").removeClass("modal") | |
} | |
function userHasStartedFilling(e) { | |
var t = $(e).find('input[type="text"], textarea'), | |
n = t.filter(function() { | |
return 0 === this.value.length | |
}); | |
return t.length > n.length | |
} | |
function contentLocationsValidated() { | |
var e = !0; | |
return $(".js-content-location-form").each(function() { | |
if (userHasStartedFilling(this) && !1 === (e = $(this).valid())) return !1 | |
}), e | |
} | |
function overridePhotoValidator() { | |
return visibleImageUploadersAreEmpty() | |
} | |
function visibleImageUploadersAreEmpty() { | |
var e = $("#ugc-wizard-photos-form .image-tile:visible"), | |
t = e.filter(function() { | |
return $(this).hasClass("empty") | |
}); | |
return e.length === t.length | |
} | |
function shallowSpoofSeattle() { | |
AtlasObscura.user_geoip.city = "Seattle" | |
} | |
function isSeattleVisitor() { | |
if (window.AtlasObscura && "object" == typeof AtlasObscura.user_geoip) { | |
var e = !!AtlasObscura.user_geoip.city.match(/seattle/i); | |
return e && gtag("event", "Seattle Visitor Detected", { | |
event_category: "Ad Campaigns", | |
event_label: AtlasObscura.user_geoip.city | |
}), e | |
} | |
return !1 | |
}! function(e, t) { | |
"object" == typeof module && "object" == typeof module.exports ? module.exports = e.document ? t(e, !0) : function(e) { | |
if (!e.document) throw new Error("jQuery requires a window with a document"); | |
return t(e) | |
} : t(e) | |
}("undefined" != typeof window ? window : this, function(k, e) { | |
function a(e) { | |
var t = !!e && "length" in e && e.length, | |
n = se.type(e); | |
return "function" !== n && !se.isWindow(e) && ("array" === n || 0 === t || "number" == typeof t && 0 < t && t - 1 in e) | |
} | |
function t(e, n, i) { | |
if (se.isFunction(n)) return se.grep(e, function(e, t) { | |
return !!n.call(e, t, e) !== i | |
}); | |
if (n.nodeType) return se.grep(e, function(e) { | |
return e === n !== i | |
}); | |
if ("string" == typeof n) { | |
if (me.test(n)) return se.filter(n, e, i); | |
n = se.filter(n, e) | |
} | |
return se.grep(e, function(e) { | |
return -1 < Q.call(n, e) !== i | |
}) | |
} | |
function n(e, t) { | |
for (; | |
(e = e[t]) && 1 !== e.nodeType;); | |
return e | |
} | |
function d(e) { | |
var n = {}; | |
return se.each(e.match(_e) || [], function(e, t) { | |
n[t] = !0 | |
}), n | |
} | |
function i() { | |
X.removeEventListener("DOMContentLoaded", i), k.removeEventListener("load", i), se.ready() | |
} | |
function o() { | |
this.expando = se.expando + o.uid++ | |
} | |
function l(e, t, n) { | |
var i; | |
if (n === undefined && 1 === e.nodeType) | |
if (i = "data-" + t.replace($e, "-$&").toLowerCase(), "string" == typeof(n = e.getAttribute(i))) { | |
try { | |
n = "true" === n || "false" !== n && ("null" === n ? null : +n + "" === n ? +n : Te.test(n) ? se.parseJSON(n) : n) | |
} catch (o) {} | |
Se.set(e, t, n) | |
} else n = undefined; | |
return n | |
} | |
function c(e, t, n, i) { | |
var o, s = 1, | |
r = 20, | |
a = i ? function() { | |
return i.cur() | |
} : function() { | |
return se.css(e, t, "") | |
}, | |
l = a(), | |
c = n && n[3] || (se.cssNumber[t] ? "" : "px"), | |
d = (se.cssNumber[t] || "px" !== c && +l) && Ae.exec(se.css(e, t)); | |
if (d && d[3] !== c) | |
for (c = c || d[3], n = n || [], d = +l || 1; d /= s = s || ".5", se.style(e, t, d + c), s !== (s = a() / l) && 1 !== s && --r;); | |
return n && (d = +d || +l || 0, o = n[1] ? d + (n[1] + 1) * n[2] : +n[2], i && (i.unit = c, i.start = d, i.end = o)), o | |
} | |
function m(e, t) { | |
var n = "undefined" != typeof e.getElementsByTagName ? e.getElementsByTagName(t || "*") : "undefined" != typeof e.querySelectorAll ? e.querySelectorAll(t || "*") : []; | |
return t === undefined || t && se.nodeName(e, t) ? se.merge([e], n) : n | |
} | |
function g(e, t) { | |
for (var n = 0, i = e.length; n < i; n++) Ce.set(e[n], "globalEval", !t || Ce.get(t[n], "globalEval")) | |
} | |
function v(e, t, n, i, o) { | |
for (var s, r, a, l, c, d, u = t.createDocumentFragment(), h = [], p = 0, f = e.length; p < f; p++) | |
if ((s = e[p]) || 0 === s) | |
if ("object" === se.type(s)) se.merge(h, s.nodeType ? [s] : s); | |
else if (ze.test(s)) { | |
for (r = r || u.appendChild(t.createElement("div")), a = (Pe.exec(s) || ["", ""])[1].toLowerCase(), l = Ie[a] || Ie._default, r.innerHTML = l[1] + se.htmlPrefilter(s) + l[2], d = l[0]; d--;) r = r.lastChild; | |
se.merge(h, r.childNodes), (r = u.firstChild).textContent = "" | |
} else h.push(t.createTextNode(s)); | |
for (u.textContent = "", p = 0; s = h[p++];) | |
if (i && -1 < se.inArray(s, i)) o && o.push(s); | |
else if (c = se.contains(s.ownerDocument, s), r = m(u.appendChild(s), "script"), c && g(r), n) | |
for (d = 0; s = r[d++];) Le.test(s.type || "") && n.push(s); | |
return u | |
} | |
function s() { | |
return !0 | |
} | |
function u() { | |
return !1 | |
} | |
function r() { | |
try { | |
return X.activeElement | |
} catch (e) {} | |
} | |
function h(e, t, n, i, o, s) { | |
var r, a; | |
if ("object" == typeof t) { | |
for (a in "string" != typeof n && (i = i || n, n = undefined), t) h(e, a, n, i, t[a], s); | |
return e | |
} | |
if (null == i && null == o ? (o = n, i = n = undefined) : null == o && ("string" == typeof n ? (o = i, i = undefined) : (o = i, i = n, n = undefined)), !1 === o) o = u; | |
else if (!o) return e; | |
return 1 === s && (r = o, (o = function(e) { | |
return se().off(e), r.apply(this, arguments) | |
}).guid = r.guid || (r.guid = se.guid++)), e.each(function() { | |
se.event.add(this, t, o, i, n) | |
}) | |
} | |
function p(e, t) { | |
return se.nodeName(e, "table") && se.nodeName(11 !== t.nodeType ? t : t.firstChild, "tr") ? e.getElementsByTagName("tbody")[0] || e.appendChild(e.ownerDocument.createElement("tbody")) : e | |
} | |
function y(e) { | |
return e.type = (null !== e.getAttribute("type")) + "/" + e.type, e | |
} | |
function b(e) { | |
var t = Ve.exec(e.type); | |
return t ? e.type = t[1] : e.removeAttribute("type"), e | |
} | |
function f(e, t) { | |
var n, i, o, s, r, a, l, c; | |
if (1 === t.nodeType) { | |
if (Ce.hasData(e) && (s = Ce.access(e), r = Ce.set(t, s), c = s.events)) | |
for (o in delete r.handle, r.events = {}, c) | |
for (n = 0, i = c[o].length; n < i; n++) se.event.add(t, o, c[o][n]); | |
Se.hasData(e) && (a = Se.access(e), l = se.extend({}, a), Se.set(t, l)) | |
} | |
} | |
function w(e, t) { | |
var n = t.nodeName.toLowerCase(); | |
"input" === n && Me.test(e.type) ? t.checked = e.checked : "input" !== n && "textarea" !== n || (t.defaultValue = e.defaultValue) | |
} | |
function _(n, i, o, s) { | |
i = J.apply([], i); | |
var e, t, r, a, l, c, d = 0, | |
u = n.length, | |
h = u - 1, | |
p = i[0], | |
f = se.isFunction(p); | |
if (f || 1 < u && "string" == typeof p && !ie.checkClone && Ue.test(p)) return n.each(function(e) { | |
var t = n.eq(e); | |
f && (i[0] = p.call(this, e, t.html())), _(t, i, o, s) | |
}); | |
if (u && (t = (e = v(i, n[0].ownerDocument, !1, n, s)).firstChild, 1 === e.childNodes.length && (e = t), t || s)) { | |
for (a = (r = se.map(m(e, "script"), y)).length; d < u; d++) l = e, d !== h && (l = se.clone(l, !0, !0), a && se.merge(r, m(l, "script"))), o.call(n[d], l, d); | |
if (a) | |
for (c = r[r.length - 1].ownerDocument, se.map(r, b), d = 0; d < a; d++) l = r[d], Le.test(l.type || "") && !Ce.access(l, "globalEval") && se.contains(c, l) && (l.src ? se._evalUrl && se._evalUrl(l.src) : se.globalEval(l.textContent.replace(qe, ""))) | |
} | |
return n | |
} | |
function x(e, t, n) { | |
for (var i, o = t ? se.filter(t, e) : e, s = 0; null != (i = o[s]); s++) n || 1 !== i.nodeType || se.cleanData(m(i)), i.parentNode && (n && se.contains(i.ownerDocument, i) && g(m(i, "script")), i.parentNode.removeChild(i)); | |
return e | |
} | |
function C(e, t) { | |
var n = se(t.createElement(e)).appendTo(t.body), | |
i = se.css(n[0], "display"); | |
return n.detach(), i | |
} | |
function S(e) { | |
var t = X, | |
n = Ge[e]; | |
return n || ("none" !== (n = C(e, t)) && n || ((t = (Ye = (Ye || se("<iframe frameborder='0' width='0' height='0'/>")).appendTo(t.documentElement))[0].contentDocument).write(), t.close(), n = C(e, t), Ye.detach()), Ge[e] = n), n | |
} | |
function T(e, t, n) { | |
var i, o, s, r, a = e.style; | |
return "" !== (r = (n = n || Je(e)) ? n.getPropertyValue(t) || n[t] : undefined) && r !== undefined || se.contains(e.ownerDocument, e) || (r = se.style(e, t)), n && !ie.pixelMarginRight() && Ze.test(r) && Xe.test(t) && (i = a.width, o = a.minWidth, s = a.maxWidth, a.minWidth = a.maxWidth = a.width = r, r = n.width, a.width = i, a.minWidth = o, a.maxWidth = s), r !== undefined ? r + "" : r | |
} | |
function $(e, t) { | |
return { | |
get: function() { | |
if (!e()) return (this.get = t).apply(this, arguments); | |
delete this.get | |
} | |
} | |
} | |
function D(e) { | |
if (e in ot) return e; | |
for (var t = e[0].toUpperCase() + e.slice(1), n = it.length; n--;) | |
if ((e = it[n] + t) in ot) return e | |
} | |
function A(e, t, n) { | |
var i = Ae.exec(t); | |
return i ? Math.max(0, i[2] - (n || 0)) + (i[3] || "px") : t | |
} | |
function E(e, t, n, i, o) { | |
for (var s = n === (i ? "border" : "content") ? 4 : "width" === t ? 1 : 0, r = 0; s < 4; s += 2) "margin" === n && (r += se.css(e, n + Ee[s], !0, o)), i ? ("content" === n && (r -= se.css(e, "padding" + Ee[s], !0, o)), "margin" !== n && (r -= se.css(e, "border" + Ee[s] + "Width", !0, o))) : (r += se.css(e, "padding" + Ee[s], !0, o), "padding" !== n && (r += se.css(e, "border" + Ee[s] + "Width", !0, o))); | |
return r | |
} | |
function O(e, t, n) { | |
var i = !0, | |
o = "width" === t ? e.offsetWidth : e.offsetHeight, | |
s = Je(e), | |
r = "border-box" === se.css(e, "boxSizing", !1, s); | |
if (o <= 0 || null == o) { | |
if (((o = T(e, t, s)) < 0 || null == o) && (o = e.style[t]), Ze.test(o)) return o; | |
i = r && (ie.boxSizingReliable() || o === e.style[t]), o = parseFloat(o) || 0 | |
} | |
return o + E(e, t, n || (r ? "border" : "content"), i, s) + "px" | |
} | |
function M(e, t) { | |
for (var n, i, o, s = [], r = 0, a = e.length; r < a; r++)(i = e[r]).style && (s[r] = Ce.get(i, "olddisplay"), n = i.style.display, t ? (s[r] || "none" !== n || (i.style.display = ""), "" === i.style.display && Oe(i) && (s[r] = Ce.access(i, "olddisplay", S(i.nodeName)))) : (o = Oe(i), "none" === n && o || Ce.set(i, "olddisplay", o ? n : se.css(i, "display")))); | |
for (r = 0; r < a; r++)(i = e[r]).style && (t && "none" !== i.style.display && "" !== i.style.display || (i.style.display = t ? s[r] || "" : "none")); | |
return e | |
} | |
function P(e, t, n, i, o) { | |
return new P.prototype.init(e, t, n, i, o) | |
} | |
function L() { | |
return k.setTimeout(function() { | |
st = undefined | |
}), st = se.now() | |
} | |
function I(e, t) { | |
var n, i = 0, | |
o = { | |
height: e | |
}; | |
for (t = t ? 1 : 0; i < 4; i += 2 - t) o["margin" + (n = Ee[i])] = o["padding" + n] = e; | |
return t && (o.opacity = o.width = e), o | |
} | |
function R(e, t, n) { | |
for (var i, o = (j.tweeners[t] || []).concat(j.tweeners["*"]), s = 0, r = o.length; s < r; s++) | |
if (i = o[s].call(n, t, e)) return i | |
} | |
function N(t, e, n) { | |
var i, o, s, r, a, l, c, d = this, | |
u = {}, | |
h = t.style, | |
p = t.nodeType && Oe(t), | |
f = Ce.get(t, "fxshow"); | |
for (i in n.queue || (null == (a = se._queueHooks(t, "fx")).unqueued && (a.unqueued = 0, l = a.empty.fire, a.empty.fire = function() { | |
a.unqueued || l() | |
}), a.unqueued++, d.always(function() { | |
d.always(function() { | |
a.unqueued--, se.queue(t, "fx").length || a.empty.fire() | |
}) | |
})), 1 === t.nodeType && ("height" in e || "width" in e) && (n.overflow = [h.overflow, h.overflowX, h.overflowY], "inline" === ("none" === (c = se.css(t, "display")) ? Ce.get(t, "olddisplay") || S(t.nodeName) : c) && "none" === se.css(t, "float") && (h.display = "inline-block")), n.overflow && (h.overflow = "hidden", d.always(function() { | |
h.overflow = n.overflow[0], h.overflowX = n.overflow[1], h.overflowY = n.overflow[2] | |
})), e) | |
if (o = e[i], dt.exec(o)) { | |
if (delete e[i], s = s || "toggle" === o, o === (p ? "hide" : "show")) { | |
if ("show" !== o || !f || f[i] === undefined) continue; | |
p = !0 | |
} | |
u[i] = f && f[i] || se.style(t, i) | |
} else c = undefined; | |
if (se.isEmptyObject(u)) "inline" === ("none" === c ? S(t.nodeName) : c) && (h.display = c); | |
else | |
for (i in f ? "hidden" in f && (p = f.hidden) : f = Ce.access(t, "fxshow", {}), s && (f.hidden = !p), p ? se(t).show() : d.done(function() { | |
se(t).hide() | |
}), d.done(function() { | |
var e; | |
for (e in Ce.remove(t, "fxshow"), u) se.style(t, e, u[e]) | |
}), u) r = R(p ? f[i] : 0, i, d), i in f || (f[i] = r.start, p && (r.end = r.start, r.start = "width" === i || "height" === i ? 1 : 0)) | |
} | |
function z(e, t) { | |
var n, i, o, s, r; | |
for (n in e) | |
if (o = t[i = se.camelCase(n)], s = e[n], se.isArray(s) && (o = s[1], s = e[n] = s[0]), n !== i && (e[i] = s, delete e[n]), (r = se.cssHooks[i]) && "expand" in r) | |
for (n in s = r.expand(s), delete e[i], s) n in e || (e[n] = s[n], t[n] = o); | |
else t[i] = o | |
} | |
function j(s, e, t) { | |
var n, r, i = 0, | |
o = j.prefilters.length, | |
a = se.Deferred().always(function() { | |
delete l.elem | |
}), | |
l = function() { | |
if (r) return !1; | |
for (var e = st || L(), t = Math.max(0, c.startTime + c.duration - e), n = 1 - (t / c.duration || 0), i = 0, o = c.tweens.length; i < o; i++) c.tweens[i].run(n); | |
return a.notifyWith(s, [c, n, t]), n < 1 && o ? t : (a.resolveWith(s, [c]), !1) | |
}, | |
c = a.promise({ | |
elem: s, | |
props: se.extend({}, e), | |
opts: se.extend(!0, { | |
specialEasing: {}, | |
easing: se.easing._default | |
}, t), | |
originalProperties: e, | |
originalOptions: t, | |
startTime: st || L(), | |
duration: t.duration, | |
tweens: [], | |
createTween: function(e, t) { | |
var n = se.Tween(s, c.opts, e, t, c.opts.specialEasing[e] || c.opts.easing); | |
return c.tweens.push(n), n | |
}, | |
stop: function(e) { | |
var t = 0, | |
n = e ? c.tweens.length : 0; | |
if (r) return this; | |
for (r = !0; t < n; t++) c.tweens[t].run(1); | |
return e ? (a.notifyWith(s, [c, 1, 0]), a.resolveWith(s, [c, e])) : a.rejectWith(s, [c, e]), this | |
} | |
}), | |
d = c.props; | |
for (z(d, c.opts.specialEasing); i < o; i++) | |
if (n = j.prefilters[i].call(c, s, d, c.opts)) return se.isFunction(n.stop) && (se._queueHooks(c.elem, c.opts.queue).stop = se.proxy(n.stop, n)), n; | |
return se.map(d, R, c), se.isFunction(c.opts.start) && c.opts.start.call(s, c), se.fx.timer(se.extend(l, { | |
elem: s, | |
anim: c, | |
queue: c.opts.queue | |
})), c.progress(c.opts.progress).done(c.opts.done, c.opts.complete).fail(c.opts.fail).always(c.opts.always) | |
} | |
function F(e) { | |
return e.getAttribute && e.getAttribute("class") || "" | |
} | |
function H(s) { | |
return function(e, t) { | |
"string" != typeof e && (t = e, e = "*"); | |
var n, i = 0, | |
o = e.toLowerCase().match(_e) || []; | |
if (se.isFunction(t)) | |
for (; n = o[i++];) "+" === n[0] ? (n = n.slice(1) || "*", (s[n] = s[n] || []).unshift(t)) : (s[n] = s[n] || []).push(t) | |
} | |
} | |
function W(t, o, s, r) { | |
function a(e) { | |
var i; | |
return l[e] = !0, se.each(t[e] || [], function(e, t) { | |
var n = t(o, s, r); | |
return "string" != typeof n || c || l[n] ? c ? !(i = n) : void 0 : (o.dataTypes.unshift(n), a(n), !1) | |
}), i | |
} | |
var l = {}, | |
c = t === Et; | |
return a(o.dataTypes[0]) || !l["*"] && a("*") | |
} | |
function B(e, t) { | |
var n, i, o = se.ajaxSettings.flatOptions || {}; | |
for (n in t) t[n] !== undefined && ((o[n] ? e : i || (i = {}))[n] = t[n]); | |
return i && se.extend(!0, e, i), e | |
} | |
function U(e, t, n) { | |
for (var i, o, s, r, a = e.contents, l = e.dataTypes; | |
"*" === l[0];) l.shift(), i === undefined && (i = e.mimeType || t.getResponseHeader("Content-Type")); | |
if (i) | |
for (o in a) | |
if (a[o] && a[o].test(i)) { | |
l.unshift(o); | |
break | |
} | |
if (l[0] in n) s = l[0]; | |
else { | |
for (o in n) { | |
if (!l[0] || e.converters[o + " " + l[0]]) { | |
s = o; | |
break | |
} | |
r || (r = o) | |
} | |
s = s || r | |
} | |
if (s) return s !== l[0] && l.unshift(s), n[s] | |
} | |
function V(e, t, n, i) { | |
var o, s, r, a, l, c = {}, | |
d = e.dataTypes.slice(); | |
if (d[1]) | |
for (r in e.converters) c[r.toLowerCase()] = e.converters[r]; | |
for (s = d.shift(); s;) | |
if (e.responseFields[s] && (n[e.responseFields[s]] = t), !l && i && e.dataFilter && (t = e.dataFilter(t, e.dataType)), l = s, s = d.shift()) | |
if ("*" === s) s = l; | |
else if ("*" !== l && l !== s) { | |
if (!(r = c[l + " " + s] || c["* " + s])) | |
for (o in c) | |
if ((a = o.split(" "))[1] === s && (r = c[l + " " + a[0]] || c["* " + a[0]])) { | |
!0 === r ? r = c[o] : !0 !== c[o] && (s = a[0], d.unshift(a[1])); | |
break | |
} | |
if (!0 !== r) | |
if (r && e["throws"]) t = r(t); | |
else try { | |
t = r(t) | |
} catch (u) { | |
return { | |
state: "parsererror", | |
error: r ? u : "No conversion from " + l + " to " + s | |
} | |
} | |
} | |
return { | |
state: "success", | |
data: t | |
} | |
} | |
function q(n, e, i, o) { | |
var t; | |
if (se.isArray(e)) se.each(e, function(e, t) { | |
i || Lt.test(n) ? o(n, t) : q(n + "[" + ("object" == typeof t && null != t ? e : "") + "]", t, i, o) | |
}); | |
else if (i || "object" !== se.type(e)) o(n, e); | |
else | |
for (t in e) q(n + "[" + t + "]", e[t], i, o) | |
} | |
function Y(e) { | |
return se.isWindow(e) ? e : 9 === e.nodeType && e.defaultView | |
} | |
var G = [], | |
X = k.document, | |
Z = G.slice, | |
J = G.concat, | |
K = G.push, | |
Q = G.indexOf, | |
ee = {}, | |
te = ee.toString, | |
ne = ee.hasOwnProperty, | |
ie = {}, | |
oe = "2.2.4", | |
se = function(e, t) { | |
return new se.fn.init(e, t) | |
}, | |
re = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, | |
ae = /^-ms-/, | |
le = /-([\da-z])/gi, | |
ce = function(e, t) { | |
return t.toUpperCase() | |
}; | |
se.fn = se.prototype = { | |
jquery: oe, | |
constructor: se, | |
selector: "", | |
length: 0, | |
toArray: function() { | |
return Z.call(this) | |
}, | |
get: function(e) { | |
return null != e ? e < 0 ? this[e + this.length] : this[e] : Z.call(this) | |
}, | |
pushStack: function(e) { | |
var t = se.merge(this.constructor(), e); | |
return t.prevObject = this, t.context = this.context, t | |
}, | |
each: function(e) { | |
return se.each(this, e) | |
}, | |
map: function(n) { | |
return this.pushStack(se.map(this, function(e, t) { | |
return n.call(e, t, e) | |
})) | |
}, | |
slice: function() { | |
return this.pushStack(Z.apply(this, arguments)) | |
}, | |
first: function() { | |
return this.eq(0) | |
}, | |
last: function() { | |
return this.eq(-1) | |
}, | |
eq: function(e) { | |
var t = this.length, | |
n = +e + (e < 0 ? t : 0); | |
return this.pushStack(0 <= n && n < t ? [this[n]] : []) | |
}, | |
end: function() { | |
return this.prevObject || this.constructor() | |
}, | |
push: K, | |
sort: G.sort, | |
splice: G.splice | |
}, se.extend = se.fn.extend = function(e) { | |
var t, n, i, o, s, r, a = e || {}, | |
l = 1, | |
c = arguments.length, | |
d = !1; | |
for ("boolean" == typeof a && (d = a, a = arguments[l] || {}, l++), "object" == typeof a || se.isFunction(a) || (a = {}), l === c && (a = this, l--); l < c; l++) | |
if (null != (t = arguments[l])) | |
for (n in t) i = a[n], a !== (o = t[n]) && (d && o && (se.isPlainObject(o) || (s = se.isArray(o))) ? (s ? (s = !1, r = i && se.isArray(i) ? i : []) : r = i && se.isPlainObject(i) ? i : {}, a[n] = se.extend(d, r, o)) : o !== undefined && (a[n] = o)); | |
return a | |
}, se.extend({ | |
expando: "jQuery" + (oe + Math.random()).replace(/\D/g, ""), | |
isReady: !0, | |
error: function(e) { | |
throw new Error(e) | |
}, | |
noop: function() {}, | |
isFunction: function(e) { | |
return "function" === se.type(e) | |
}, | |
isArray: Array.isArray, | |
isWindow: function(e) { | |
return null != e && e === e.window | |
}, | |
isNumeric: function(e) { | |
var t = e && e.toString(); | |
return !se.isArray(e) && 0 <= t - parseFloat(t) + 1 | |
}, | |
isPlainObject: function(e) { | |
var t; | |
if ("object" !== se.type(e) || e.nodeType || se.isWindow(e)) return !1; | |
if (e.constructor && !ne.call(e, "constructor") && !ne.call(e.constructor.prototype || {}, "isPrototypeOf")) return !1; | |
for (t in e); | |
return t === undefined || ne.call(e, t) | |
}, | |
isEmptyObject: function(e) { | |
var t; | |
for (t in e) return !1; | |
return !0 | |
}, | |
type: function(e) { | |
return null == e ? e + "" : "object" == typeof e || "function" == typeof e ? ee[te.call(e)] || "object" : typeof e | |
}, | |
globalEval: function(e) { | |
var t, n = eval; | |
(e = se.trim(e)) && (1 === e.indexOf("use strict") ? ((t = X.createElement("script")).text = e, X.head.appendChild(t).parentNode.removeChild(t)) : n(e)) | |
}, | |
camelCase: function(e) { | |
return e.replace(ae, "ms-").replace(le, ce) | |
}, | |
nodeName: function(e, t) { | |
return e.nodeName && e.nodeName.toLowerCase() === t.toLowerCase() | |
}, | |
each: function(e, t) { | |
var n, i = 0; | |
if (a(e)) | |
for (n = e.length; i < n && !1 !== t.call(e[i], i, e[i]); i++); | |
else | |
for (i in e) | |
if (!1 === t.call(e[i], i, e[i])) break; return e | |
}, | |
trim: function(e) { | |
return null == e ? "" : (e + "").replace(re, "") | |
}, | |
makeArray: function(e, t) { | |
var n = t || []; | |
return null != e && (a(Object(e)) ? se.merge(n, "string" == typeof e ? [e] : e) : K.call(n, e)), n | |
}, | |
inArray: function(e, t, n) { | |
return null == t ? -1 : Q.call(t, e, n) | |
}, | |
merge: function(e, t) { | |
for (var n = +t.length, i = 0, o = e.length; i < n; i++) e[o++] = t[i]; | |
return e.length = o, e | |
}, | |
grep: function(e, t, n) { | |
for (var i = [], o = 0, s = e.length, r = !n; o < s; o++) !t(e[o], o) !== r && i.push(e[o]); | |
return i | |
}, | |
map: function(e, t, n) { | |
var i, o, s = 0, | |
r = []; | |
if (a(e)) | |
for (i = e.length; s < i; s++) null != (o = t(e[s], s, n)) && r.push(o); | |
else | |
for (s in e) null != (o = t(e[s], s, n)) && r.push(o); | |
return J.apply([], r) | |
}, | |
guid: 1, | |
proxy: function(e, t) { | |
var n, i, o; | |
return "string" == typeof t && (n = e[t], t = e, e = n), se.isFunction(e) ? (i = Z.call(arguments, 2), (o = function() { | |
return e.apply(t || this, i.concat(Z.call(arguments))) | |
}).guid = e.guid = e.guid || se.guid++, o) : undefined | |
}, | |
now: Date.now, | |
support: ie | |
}), "function" == typeof Symbol && (se.fn[Symbol.iterator] = G[Symbol.iterator]), se.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "), function(e, t) { | |
ee["[object " + t + "]"] = t.toLowerCase() | |
}); | |
var de = function(n) { | |
function w(e, t, n, i) { | |
var o, s, r, a, l, c, d, u, h = t && t.ownerDocument, | |
p = t ? t.nodeType : 9; | |
if (n = n || [], "string" != typeof e || !e || 1 !== p && 9 !== p && 11 !== p) return n; | |
if (!i && ((t ? t.ownerDocument || t : F) !== M && O(t), t = t || M, L)) { | |
if (11 !== p && (c = ve.exec(e))) | |
if (o = c[1]) { | |
if (9 === p) { | |
if (!(r = t.getElementById(o))) return n; | |
if (r.id === o) return n.push(r), n | |
} else if (h && (r = h.getElementById(o)) && z(t, r) && r.id === o) return n.push(r), n | |
} else { | |
if (c[2]) return K.apply(n, t.getElementsByTagName(e)), n; | |
if ((o = c[3]) && v.getElementsByClassName && t.getElementsByClassName) return K.apply(n, t.getElementsByClassName(o)), n | |
} | |
if (v.qsa && !V[e + " "] && (!I || !I.test(e))) { | |
if (1 !== p) h = t, u = e; | |
else if ("object" !== t.nodeName.toLowerCase()) { | |
for ((a = t.getAttribute("id")) ? a = a.replace(be, "\\$&") : t.setAttribute("id", a = j), s = (d = S(e)).length, l = he.test(a) ? "#" + a : "[id='" + a + "']"; s--;) d[s] = l + " " + g(d[s]); | |
u = d.join(","), h = ye.test(e) && m(t.parentNode) || t | |
} | |
if (u) try { | |
return K.apply(n, h.querySelectorAll(u)), n | |
} catch (f) {} finally { | |
a === j && t.removeAttribute("id") | |
} | |
} | |
} | |
return $(e.replace(ae, "$1"), t, n, i) | |
} | |
function e() { | |
function n(e, t) { | |
return i.push(e + " ") > x.cacheLength && delete n[i.shift()], n[e + " "] = t | |
} | |
var i = []; | |
return n | |
} | |
function l(e) { | |
return e[j] = !0, e | |
} | |
function o(e) { | |
var t = M.createElement("div"); | |
try { | |
return !!e(t) | |
} catch (n) { | |
return !1 | |
} finally { | |
t.parentNode && t.parentNode.removeChild(t), t = null | |
} | |
} | |
function t(e, t) { | |
for (var n = e.split("|"), i = n.length; i--;) x.attrHandle[n[i]] = t | |
} | |
function c(e, t) { | |
var n = t && e, | |
i = n && 1 === e.nodeType && 1 === t.nodeType && (~t.sourceIndex || Y) - (~e.sourceIndex || Y); | |
if (i) return i; | |
if (n) | |
for (; n = n.nextSibling;) | |
if (n === t) return -1; | |
return e ? 1 : -1 | |
} | |
function i(t) { | |
return function(e) { | |
return "input" === e.nodeName.toLowerCase() && e.type === t | |
} | |
} | |
function s(n) { | |
return function(e) { | |
var t = e.nodeName.toLowerCase(); | |
return ("input" === t || "button" === t) && e.type === n | |
} | |
} | |
function r(r) { | |
return l(function(s) { | |
return s = +s, l(function(e, t) { | |
for (var n, i = r([], e.length, s), o = i.length; o--;) e[n = i[o]] && (e[n] = !(t[n] = e[n])) | |
}) | |
}) | |
} | |
function m(e) { | |
return e && "undefined" != typeof e.getElementsByTagName && e | |
} | |
function a() {} | |
function g(e) { | |
for (var t = 0, n = e.length, i = ""; t < n; t++) i += e[t].value; | |
return i | |
} | |
function u(a, e, t) { | |
var l = e.dir, | |
c = t && "parentNode" === l, | |
d = W++; | |
return e.first ? function(e, t, n) { | |
for (; e = e[l];) | |
if (1 === e.nodeType || c) return a(e, t, n) | |
} : function(e, t, n) { | |
var i, o, s, r = [H, d]; | |
if (n) { | |
for (; e = e[l];) | |
if ((1 === e.nodeType || c) && a(e, t, n)) return !0 | |
} else | |
for (; e = e[l];) | |
if (1 === e.nodeType || c) { | |
if ((i = (o = (s = e[j] || (e[j] = {}))[e.uniqueID] || (s[e.uniqueID] = {}))[l]) && i[0] === H && i[1] === d) return r[2] = i[2]; | |
if ((o[l] = r)[2] = a(e, t, n)) return !0 | |
} | |
} | |
} | |
function h(o) { | |
return 1 < o.length ? function(e, t, n) { | |
for (var i = o.length; i--;) | |
if (!o[i](e, t, n)) return !1; | |
return !0 | |
} : o[0] | |
} | |
function y(e, t, n) { | |
for (var i = 0, o = t.length; i < o; i++) w(e, t[i], n); | |
return n | |
} | |
function _(e, t, n, i, o) { | |
for (var s, r = [], a = 0, l = e.length, c = null != t; a < l; a++)(s = e[a]) && (n && !n(s, i, o) || (r.push(s), c && t.push(a))); | |
return r | |
} | |
function b(p, f, m, g, v, e) { | |
return g && !g[j] && (g = b(g)), v && !v[j] && (v = b(v, e)), l(function(e, t, n, i) { | |
var o, s, r, a = [], | |
l = [], | |
c = t.length, | |
d = e || y(f || "*", n.nodeType ? [n] : n, []), | |
u = !p || !e && f ? d : _(d, a, p, n, i), | |
h = m ? v || (e ? p : c || g) ? [] : t : u; | |
if (m && m(u, h, n, i), g) | |
for (o = _(h, l), g(o, [], n, i), s = o.length; s--;)(r = o[s]) && (h[l[s]] = !(u[l[s]] = r)); | |
if (e) { | |
if (v || p) { | |
if (v) { | |
for (o = [], s = h.length; s--;)(r = h[s]) && o.push(u[s] = r); | |
v(null, h = [], o, i) | |
} | |
for (s = h.length; s--;)(r = h[s]) && -1 < (o = v ? ee(e, r) : a[s]) && (e[o] = !(t[o] = r)) | |
} | |
} else h = _(h === t ? h.splice(c, h.length) : h), v ? v(null, t, h, i) : K.apply(t, h) | |
}) | |
} | |
function p(e) { | |
for (var o, t, n, i = e.length, s = x.relative[e[0].type], r = s || x.relative[" "], a = s ? 1 : 0, l = u(function(e) { | |
return e === o | |
}, r, !0), c = u(function(e) { | |
return -1 < ee(o, e) | |
}, r, !0), d = [function(e, t, n) { | |
var i = !s && (n || t !== D) || ((o = t).nodeType ? l(e, t, n) : c(e, t, n)); | |
return o = null, i | |
}]; a < i; a++) | |
if (t = x.relative[e[a].type]) d = [u(h(d), t)]; | |
else { | |
if ((t = x.filter[e[a].type].apply(null, e[a].matches))[j]) { | |
for (n = ++a; n < i && !x.relative[e[n].type]; n++); | |
return b(1 < a && h(d), 1 < a && g(e.slice(0, a - 1).concat({ | |
value: " " === e[a - 2].type ? "*" : "" | |
})).replace(ae, "$1"), t, a < n && p(e.slice(a, n)), n < i && p(e = e.slice(n)), n < i && g(e)) | |
} | |
d.push(t) | |
} | |
return h(d) | |
} | |
function d(g, v) { | |
var y = 0 < v.length, | |
b = 0 < g.length, | |
e = function(e, t, n, i, o) { | |
var s, r, a, l = 0, | |
c = "0", | |
d = e && [], | |
u = [], | |
h = D, | |
p = e || b && x.find.TAG("*", o), | |
f = H += null == h ? 1 : Math.random() || .1, | |
m = p.length; | |
for (o && (D = t === M || t || o); c !== m && null != (s = p[c]); c++) { | |
if (b && s) { | |
for (r = 0, t || s.ownerDocument === M || (O(s), n = !L); a = g[r++];) | |
if (a(s, t || M, n)) { | |
i.push(s); | |
break | |
} | |
o && (H = f) | |
} | |
y && ((s = !a && s) && l--, e && d.push(s)) | |
} | |
if (l += c, y && c !== l) { | |
for (r = 0; a = v[r++];) a(d, u, t, n); | |
if (e) { | |
if (0 < l) | |
for (; c--;) d[c] || u[c] || (u[c] = Z.call(i)); | |
u = _(u) | |
} | |
K.apply(i, u), o && !e && 0 < u.length && 1 < l + v.length && w.uniqueSort(i) | |
} | |
return o && (H = f, D = h), d | |
}; | |
return y ? l(e) : e | |
} | |
var f, v, x, k, C, S, T, $, D, A, E, O, M, P, L, I, R, N, z, j = "sizzle" + 1 * new Date, | |
F = n.document, | |
H = 0, | |
W = 0, | |
B = e(), | |
U = e(), | |
V = e(), | |
q = function(e, t) { | |
return e === t && (E = !0), 0 | |
}, | |
Y = 1 << 31, | |
G = {}.hasOwnProperty, | |
X = [], | |
Z = X.pop, | |
J = X.push, | |
K = X.push, | |
Q = X.slice, | |
ee = function(e, t) { | |
for (var n = 0, i = e.length; n < i; n++) | |
if (e[n] === t) return n; | |
return -1 | |
}, | |
te = "checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped", | |
ne = "[\\x20\\t\\r\\n\\f]", | |
ie = "(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+", | |
oe = "\\[" + ne + "*(" + ie + ")(?:" + ne + "*([*^$|!~]?=)" + ne + "*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|(" + ie + "))|)" + ne + "*\\]", | |
se = ":(" + ie + ")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|" + oe + ")*)|.*)\\)|)", | |
re = new RegExp(ne + "+", "g"), | |
ae = new RegExp("^" + ne + "+|((?:^|[^\\\\])(?:\\\\.)*)" + ne + "+$", "g"), | |
le = new RegExp("^" + ne + "*," + ne + "*"), | |
ce = new RegExp("^" + ne + "*([>+~]|" + ne + ")" + ne + "*"), | |
de = new RegExp("=" + ne + "*([^\\]'\"]*?)" + ne + "*\\]", "g"), | |
ue = new RegExp(se), | |
he = new RegExp("^" + ie + "$"), | |
pe = { | |
ID: new RegExp("^#(" + ie + ")"), | |
CLASS: new RegExp("^\\.(" + ie + ")"), | |
TAG: new RegExp("^(" + ie + "|[*])"), | |
ATTR: new RegExp("^" + oe), | |
PSEUDO: new RegExp("^" + se), | |
CHILD: new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" + ne + "*(even|odd|(([+-]|)(\\d*)n|)" + ne + "*(?:([+-]|)" + ne + "*(\\d+)|))" + ne + "*\\)|)", "i"), | |
bool: new RegExp("^(?:" + te + ")$", "i"), | |
needsContext: new RegExp("^" + ne + "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" + ne + "*((?:-\\d)?\\d*)" + ne + "*\\)|)(?=[^-]|$)", "i") | |
}, | |
fe = /^(?:input|select|textarea|button)$/i, | |
me = /^h\d$/i, | |
ge = /^[^{]+\{\s*\[native \w/, | |
ve = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/, | |
ye = /[+~]/, | |
be = /'|\\/g, | |
we = new RegExp("\\\\([\\da-f]{1,6}" + ne + "?|(" + ne + ")|.)", "ig"), | |
_e = function(e, t, n) { | |
var i = "0x" + t - 65536; | |
return i != i || n ? t : i < 0 ? String.fromCharCode(i + 65536) : String.fromCharCode(i >> 10 | 55296, 1023 & i | 56320) | |
}, | |
xe = function() { | |
O() | |
}; | |
try { | |
K.apply(X = Q.call(F.childNodes), F.childNodes), X[F.childNodes.length].nodeType | |
} catch (ke) { | |
K = { | |
apply: X.length ? function(e, t) { | |
J.apply(e, Q.call(t)) | |
} : function(e, t) { | |
for (var n = e.length, i = 0; e[n++] = t[i++];); | |
e.length = n - 1 | |
} | |
} | |
} | |
for (f in v = w.support = {}, C = w.isXML = function(e) { | |
var t = e && (e.ownerDocument || e).documentElement; | |
return !!t && "HTML" !== t.nodeName | |
}, O = w.setDocument = function(e) { | |
var t, n, i = e ? e.ownerDocument || e : F; | |
return i !== M && 9 === i.nodeType && i.documentElement && (P = (M = i).documentElement, L = !C(M), (n = M.defaultView) && n.top !== n && (n.addEventListener ? n.addEventListener("unload", xe, !1) : n.attachEvent && n.attachEvent("onunload", xe)), v.attributes = o(function(e) { | |
return e.className = "i", !e.getAttribute("className") | |
}), v.getElementsByTagName = o(function(e) { | |
return e.appendChild(M.createComment("")), !e.getElementsByTagName("*").length | |
}), v.getElementsByClassName = ge.test(M.getElementsByClassName), v.getById = o(function(e) { | |
return P.appendChild(e).id = j, !M.getElementsByName || !M.getElementsByName(j).length | |
}), v.getById ? (x.find.ID = function(e, t) { | |
if ("undefined" != typeof t.getElementById && L) { | |
var n = t.getElementById(e); | |
return n ? [n] : [] | |
} | |
}, x.filter.ID = function(e) { | |
var t = e.replace(we, _e); | |
return function(e) { | |
return e.getAttribute("id") === t | |
} | |
}) : (delete x.find.ID, x.filter.ID = function(e) { | |
var n = e.replace(we, _e); | |
return function(e) { | |
var t = "undefined" != typeof e.getAttributeNode && e.getAttributeNode("id"); | |
return t && t.value === n | |
} | |
}), x.find.TAG = v.getElementsByTagName ? function(e, t) { | |
return "undefined" != typeof t.getElementsByTagName ? t.getElementsByTagName(e) : v.qsa ? t.querySelectorAll(e) : void 0 | |
} : function(e, t) { | |
var n, i = [], | |
o = 0, | |
s = t.getElementsByTagName(e); | |
if ("*" !== e) return s; | |
for (; n = s[o++];) 1 === n.nodeType && i.push(n); | |
return i | |
}, x.find.CLASS = v.getElementsByClassName && function(e, t) { | |
if ("undefined" != typeof t.getElementsByClassName && L) return t.getElementsByClassName(e) | |
}, R = [], I = [], (v.qsa = ge.test(M.querySelectorAll)) && (o(function(e) { | |
P.appendChild(e).innerHTML = "<a id='" + j + "'></a><select id='" + j + "-\r\\' msallowcapture=''><option selected=''></option></select>", e.querySelectorAll("[msallowcapture^='']").length && I.push("[*^$]=" + ne + "*(?:''|\"\")"), e.querySelectorAll("[selected]").length || I.push("\\[" + ne + "*(?:value|" + te + ")"), e.querySelectorAll("[id~=" + j + "-]").length || I.push("~="), e.querySelectorAll(":checked").length || I.push(":checked"), e.querySelectorAll("a#" + j + "+*").length || I.push(".#.+[+~]") | |
}), o(function(e) { | |
var t = M.createElement("input"); | |
t.setAttribute("type", "hidden"), e.appendChild(t).setAttribute("name", "D"), e.querySelectorAll("[name=d]").length && I.push("name" + ne + "*[*^$|!~]?="), e.querySelectorAll(":enabled").length || I.push(":enabled", ":disabled"), e.querySelectorAll("*,:x"), I.push(",.*:") | |
})), (v.matchesSelector = ge.test(N = P.matches || P.webkitMatchesSelector || P.mozMatchesSelector || P.oMatchesSelector || P.msMatchesSelector)) && o(function(e) { | |
v.disconnectedMatch = N.call(e, "div"), N.call(e, "[s!='']:x"), R.push("!=", se) | |
}), I = I.length && new RegExp(I.join("|")), R = R.length && new RegExp(R.join("|")), t = ge.test(P.compareDocumentPosition), z = t || ge.test(P.contains) ? function(e, t) { | |
var n = 9 === e.nodeType ? e.documentElement : e, | |
i = t && t.parentNode; | |
return e === i || !(!i || 1 !== i.nodeType || !(n.contains ? n.contains(i) : e.compareDocumentPosition && 16 & e.compareDocumentPosition(i))) | |
} : function(e, t) { | |
if (t) | |
for (; t = t.parentNode;) | |
if (t === e) return !0; | |
return !1 | |
}, q = t ? function(e, t) { | |
if (e === t) return E = !0, 0; | |
var n = !e.compareDocumentPosition - !t.compareDocumentPosition; | |
return n || (1 & (n = (e.ownerDocument || e) === (t.ownerDocument || t) ? e.compareDocumentPosition(t) : 1) || !v.sortDetached && t.compareDocumentPosition(e) === n ? e === M || e.ownerDocument === F && z(F, e) ? -1 : t === M || t.ownerDocument === F && z(F, t) ? 1 : A ? ee(A, e) - ee(A, t) : 0 : 4 & n ? -1 : 1) | |
} : function(e, t) { | |
if (e === t) return E = !0, 0; | |
var n, i = 0, | |
o = e.parentNode, | |
s = t.parentNode, | |
r = [e], | |
a = [t]; | |
if (!o || !s) return e === M ? -1 : t === M ? 1 : o ? -1 : s ? 1 : A ? ee(A, e) - ee(A, t) : 0; | |
if (o === s) return c(e, t); | |
for (n = e; n = n.parentNode;) r.unshift(n); | |
for (n = t; n = n.parentNode;) a.unshift(n); | |
for (; r[i] === a[i];) i++; | |
return i ? c(r[i], a[i]) : r[i] === F ? -1 : a[i] === F ? 1 : 0 | |
}), M | |
}, w.matches = function(e, t) { | |
return w(e, null, null, t) | |
}, w.matchesSelector = function(e, t) { | |
if ((e.ownerDocument || e) !== M && O(e), t = t.replace(de, "='$1']"), v.matchesSelector && L && !V[t + " "] && (!R || !R.test(t)) && (!I || !I.test(t))) try { | |
var n = N.call(e, t); | |
if (n || v.disconnectedMatch || e.document && 11 !== e.document.nodeType) return n | |
} catch (ke) {} | |
return 0 < w(t, M, null, [e]).length | |
}, w.contains = function(e, t) { | |
return (e.ownerDocument || e) !== M && O(e), z(e, t) | |
}, w.attr = function(e, t) { | |
(e.ownerDocument || e) !== M && O(e); | |
var n = x.attrHandle[t.toLowerCase()], | |
i = n && G.call(x.attrHandle, t.toLowerCase()) ? n(e, t, !L) : undefined; | |
return i !== undefined ? i : v.attributes || !L ? e.getAttribute(t) : (i = e.getAttributeNode(t)) && i.specified ? i.value : null | |
}, w.error = function(e) { | |
throw new Error("Syntax error, unrecognized expression: " + e) | |
}, w.uniqueSort = function(e) { | |
var t, n = [], | |
i = 0, | |
o = 0; | |
if (E = !v.detectDuplicates, A = !v.sortStable && e.slice(0), e.sort(q), E) { | |
for (; t = e[o++];) t === e[o] && (i = n.push(o)); | |
for (; i--;) e.splice(n[i], 1) | |
} | |
return A = null, e | |
}, k = w.getText = function(e) { | |
var t, n = "", | |
i = 0, | |
o = e.nodeType; | |
if (o) { | |
if (1 === o || 9 === o || 11 === o) { | |
if ("string" == typeof e.textContent) return e.textContent; | |
for (e = e.firstChild; e; e = e.nextSibling) n += k(e) | |
} else if (3 === o || 4 === o) return e.nodeValue | |
} else | |
for (; t = e[i++];) n += k(t); | |
return n | |
}, (x = w.selectors = { | |
cacheLength: 50, | |
createPseudo: l, | |
match: pe, | |
attrHandle: {}, | |
find: {}, | |
relative: { | |
">": { | |
dir: "parentNode", | |
first: !0 | |
}, | |
" ": { | |
dir: "parentNode" | |
}, | |
"+": { | |
dir: "previousSibling", | |
first: !0 | |
}, | |
"~": { | |
dir: "previousSibling" | |
} | |
}, | |
preFilter: { | |
ATTR: function(e) { | |
return e[1] = e[1].replace(we, _e), e[3] = (e[3] || e[4] || e[5] || "").replace(we, _e), "~=" === e[2] && (e[3] = " " + e[3] + " "), e.slice(0, 4) | |
}, | |
CHILD: function(e) { | |
return e[1] = e[1].toLowerCase(), "nth" === e[1].slice(0, 3) ? (e[3] || w.error(e[0]), e[4] = +(e[4] ? e[5] + (e[6] || 1) : 2 * ("even" === e[3] || "odd" === e[3])), e[5] = +(e[7] + e[8] || "odd" === e[3])) : e[3] && w.error(e[0]), e | |
}, | |
PSEUDO: function(e) { | |
var t, n = !e[6] && e[2]; | |
return pe.CHILD.test(e[0]) ? null : (e[3] ? e[2] = e[4] || e[5] || "" : n && ue.test(n) && (t = S(n, !0)) && (t = n.indexOf(")", n.length - t) - n.length) && (e[0] = e[0].slice(0, t), e[2] = n.slice(0, t)), e.slice(0, 3)) | |
} | |
}, | |
filter: { | |
TAG: function(e) { | |
var t = e.replace(we, _e).toLowerCase(); | |
return "*" === e ? function() { | |
return !0 | |
} : function(e) { | |
return e.nodeName && e.nodeName.toLowerCase() === t | |
} | |
}, | |
CLASS: function(e) { | |
var t = B[e + " "]; | |
return t || (t = new RegExp("(^|" + ne + ")" + e + "(" + ne + "|$)")) && B(e, function(e) { | |
return t.test("string" == typeof e.className && e.className || "undefined" != typeof e.getAttribute && e.getAttribute("class") || "") | |
}) | |
}, | |
ATTR: function(n, i, o) { | |
return function(e) { | |
var t = w.attr(e, n); | |
return null == t ? "!=" === i : !i || (t += "", "=" === i ? t === o : "!=" === i ? t !== o : "^=" === i ? o && 0 === t.indexOf(o) : "*=" === i ? o && -1 < t.indexOf(o) : "$=" === i ? o && t.slice(-o.length) === o : "~=" === i ? -1 < (" " + t.replace(re, " ") + " ").indexOf(o) : "|=" === i && (t === o || t.slice(0, o.length + 1) === o + "-")) | |
} | |
}, | |
CHILD: function(f, e, t, m, g) { | |
var v = "nth" !== f.slice(0, 3), | |
y = "last" !== f.slice(-4), | |
b = "of-type" === e; | |
return 1 === m && 0 === g ? function(e) { | |
return !!e.parentNode | |
} : function(e, t, n) { | |
var i, o, s, r, a, l, c = v !== y ? "nextSibling" : "previousSibling", | |
d = e.parentNode, | |
u = b && e.nodeName.toLowerCase(), | |
h = !n && !b, | |
p = !1; | |
if (d) { | |
if (v) { | |
for (; c;) { | |
for (r = e; r = r[c];) | |
if (b ? r.nodeName.toLowerCase() === u : 1 === r.nodeType) return !1; | |
l = c = "only" === f && !l && "nextSibling" | |
} | |
return !0 | |
} | |
if (l = [y ? d.firstChild : d.lastChild], y && h) { | |
for (p = (a = (i = (o = (s = (r = d)[j] || (r[j] = {}))[r.uniqueID] || (s[r.uniqueID] = {}))[f] || [])[0] === H && i[1]) && i[2], r = a && d.childNodes[a]; r = ++a && r && r[c] || (p = a = 0) || l.pop();) | |
if (1 === r.nodeType && ++p && r === e) { | |
o[f] = [H, a, p]; | |
break | |
} | |
} else if (h && (p = a = (i = (o = (s = (r = e)[j] || (r[j] = {}))[r.uniqueID] || (s[r.uniqueID] = {}))[f] || [])[0] === H && i[1]), !1 === p) | |
for (; | |
(r = ++a && r && r[c] || (p = a = 0) || l.pop()) && ((b ? r.nodeName.toLowerCase() !== u : 1 !== r.nodeType) || !++p || (h && ((o = (s = r[j] || (r[j] = {}))[r.uniqueID] || (s[r.uniqueID] = {}))[f] = [H, p]), r !== e));); | |
return (p -= g) === m || p % m == 0 && 0 <= p / m | |
} | |
} | |
}, | |
PSEUDO: function(e, s) { | |
var t, r = x.pseudos[e] || x.setFilters[e.toLowerCase()] || w.error("unsupported pseudo: " + e); | |
return r[j] ? r(s) : 1 < r.length ? (t = [e, e, "", s], x.setFilters.hasOwnProperty(e.toLowerCase()) ? l(function(e, t) { | |
for (var n, i = r(e, s), o = i.length; o--;) e[n = ee(e, i[o])] = !(t[n] = i[o]) | |
}) : function(e) { | |
return r(e, 0, t) | |
}) : r | |
} | |
}, | |
pseudos: { | |
not: l(function(e) { | |
var i = [], | |
o = [], | |
a = T(e.replace(ae, "$1")); | |
return a[j] ? l(function(e, t, n, i) { | |
for (var o, s = a(e, null, i, []), r = e.length; r--;)(o = s[r]) && (e[r] = !(t[r] = o)) | |
}) : function(e, t, n) { | |
return i[0] = e, a(i, null, n, o), i[0] = null, !o.pop() | |
} | |
}), | |
has: l(function(t) { | |
return function(e) { | |
return 0 < w(t, e).length | |
} | |
}), | |
contains: l(function(t) { | |
return t = t.replace(we, _e), | |
function(e) { | |
return -1 < (e.textContent || e.innerText || k(e)).indexOf(t) | |
} | |
}), | |
lang: l(function(n) { | |
return he.test(n || "") || w.error("unsupported lang: " + n), n = n.replace(we, _e).toLowerCase(), | |
function(e) { | |
var t; | |
do { | |
if (t = L ? e.lang : e.getAttribute("xml:lang") || e.getAttribute("lang")) return (t = t.toLowerCase()) === n || 0 === t.indexOf(n + "-") | |
} while ((e = e.parentNode) && 1 === e.nodeType); | |
return !1 | |
} | |
}), | |
target: function(e) { | |
var t = n.location && n.location.hash; | |
return t && t.slice(1) === e.id | |
}, | |
root: function(e) { | |
return e === P | |
}, | |
focus: function(e) { | |
return e === M.activeElement && (!M.hasFocus || M.hasFocus()) && !!(e.type || e.href || ~e.tabIndex) | |
}, | |
enabled: function(e) { | |
return !1 === e.disabled | |
}, | |
disabled: function(e) { | |
return !0 === e.disabled | |
}, | |
checked: function(e) { | |
var t = e.nodeName.toLowerCase(); | |
return "input" === t && !!e.checked || "option" === t && !!e.selected | |
}, | |
selected: function(e) { | |
return e.parentNode && e.parentNode.selectedIndex, !0 === e.selected | |
}, | |
empty: function(e) { | |
for (e = e.firstChild; e; e = e.nextSibling) | |
if (e.nodeType < 6) return !1; | |
return !0 | |
}, | |
parent: function(e) { | |
return !x.pseudos.empty(e) | |
}, | |
header: function(e) { | |
return me.test(e.nodeName) | |
}, | |
input: function(e) { | |
return fe.test(e.nodeName) | |
}, | |
button: function(e) { | |
var t = e.nodeName.toLowerCase(); | |
return "input" === t && "button" === e.type || "button" === t | |
}, | |
text: function(e) { | |
var t; | |
return "input" === e.nodeName.toLowerCase() && "text" === e.type && (null == (t = e.getAttribute("type")) || "text" === t.toLowerCase()) | |
}, | |
first: r(function() { | |
return [0] | |
}), | |
last: r(function(e, t) { | |
return [t - 1] | |
}), | |
eq: r(function(e, t, n) { | |
return [n < 0 ? n + t : n] | |
}), | |
even: r(function(e, t) { | |
for (var n = 0; n < t; n += 2) e.push(n); | |
return e | |
}), | |
odd: r(function(e, t) { | |
for (var n = 1; n < t; n += 2) e.push(n); | |
return e | |
}), | |
lt: r(function(e, t, n) { | |
for (var i = n < 0 ? n + t : n; 0 <= --i;) e.push(i); | |
return e | |
}), | |
gt: r(function(e, t, n) { | |
for (var i = n < 0 ? n + t : n; ++i < t;) e.push(i); | |
return e | |
}) | |
} | |
}).pseudos.nth = x.pseudos.eq, { | |
radio: !0, | |
checkbox: !0, | |
file: !0, | |
password: !0, | |
image: !0 | |
}) x.pseudos[f] = i(f); | |
for (f in { | |
submit: !0, | |
reset: !0 | |
}) x.pseudos[f] = s(f); | |
return a.prototype = x.filters = x.pseudos, x.setFilters = new a, S = w.tokenize = function(e, t) { | |
var n, i, o, s, r, a, l, c = U[e + " "]; | |
if (c) return t ? 0 : c.slice(0); | |
for (r = e, a = [], l = x.preFilter; r;) { | |
for (s in n && !(i = le.exec(r)) || (i && (r = r.slice(i[0].length) || r), a.push(o = [])), n = !1, (i = ce.exec(r)) && (n = i.shift(), o.push({ | |
value: n, | |
type: i[0].replace(ae, " ") | |
}), r = r.slice(n.length)), x.filter) !(i = pe[s].exec(r)) || l[s] && !(i = l[s](i)) || (n = i.shift(), o.push({ | |
value: n, | |
type: s, | |
matches: i | |
}), r = r.slice(n.length)); | |
if (!n) break | |
} | |
return t ? r.length : r ? w.error(e) : U(e, a).slice(0) | |
}, T = w.compile = function(e, t) { | |
var n, i = [], | |
o = [], | |
s = V[e + " "]; | |
if (!s) { | |
for (t || (t = S(e)), n = t.length; n--;)(s = p(t[n]))[j] ? i.push(s) : o.push(s); | |
(s = V(e, d(o, i))).selector = e | |
} | |
return s | |
}, $ = w.select = function(e, t, n, i) { | |
var o, s, r, a, l, c = "function" == typeof e && e, | |
d = !i && S(e = c.selector || e); | |
if (n = n || [], 1 === d.length) { | |
if (2 < (s = d[0] = d[0].slice(0)).length && "ID" === (r = s[0]).type && v.getById && 9 === t.nodeType && L && x.relative[s[1].type]) { | |
if (!(t = (x.find.ID(r.matches[0].replace(we, _e), t) || [])[0])) return n; | |
c && (t = t.parentNode), e = e.slice(s.shift().value.length) | |
} | |
for (o = pe.needsContext.test(e) ? 0 : s.length; o-- && (r = s[o], !x.relative[a = r.type]);) | |
if ((l = x.find[a]) && (i = l(r.matches[0].replace(we, _e), ye.test(s[0].type) && m(t.parentNode) || t))) { | |
if (s.splice(o, 1), !(e = i.length && g(s))) return K.apply(n, i), n; | |
break | |
} | |
} | |
return (c || T(e, d))(i, t, !L, n, !t || ye.test(e) && m(t.parentNode) || t), n | |
}, v.sortStable = j.split("").sort(q).join("") === j, v.detectDuplicates = !!E, O(), v.sortDetached = o(function(e) { | |
return 1 & e.compareDocumentPosition(M.createElement("div")) | |
}), o(function(e) { | |
return e.innerHTML = "<a href='#'></a>", "#" === e.firstChild.getAttribute("href") | |
}) || t("type|href|height|width", function(e, t, n) { | |
if (!n) return e.getAttribute(t, "type" === t.toLowerCase() ? 1 : 2) | |
}), v.attributes && o(function(e) { | |
return e.innerHTML = "<input/>", e.firstChild.setAttribute("value", ""), "" === e.firstChild.getAttribute("value") | |
}) || t("value", function(e, t, n) { | |
if (!n && "input" === e.nodeName.toLowerCase()) return e.defaultValue | |
}), o(function(e) { | |
return null == e.getAttribute("disabled") | |
}) || t(te, function(e, t, n) { | |
var i; | |
if (!n) return !0 === e[t] ? t.toLowerCase() : (i = e.getAttributeNode(t)) && i.specified ? i.value : null | |
}), w | |
}(k); | |
se.find = de, se.expr = de.selectors, se.expr[":"] = se.expr.pseudos, se.uniqueSort = se.unique = de.uniqueSort, se.text = de.getText, se.isXMLDoc = de.isXML, se.contains = de.contains; | |
var ue = function(e, t, n) { | |
for (var i = [], o = n !== undefined; | |
(e = e[t]) && 9 !== e.nodeType;) | |
if (1 === e.nodeType) { | |
if (o && se(e).is(n)) break; | |
i.push(e) | |
} | |
return i | |
}, | |
he = function(e, t) { | |
for (var n = []; e; e = e.nextSibling) 1 === e.nodeType && e !== t && n.push(e); | |
return n | |
}, | |
pe = se.expr.match.needsContext, | |
fe = /^<([\w-]+)\s*\/?>(?:<\/\1>|)$/, | |
me = /^.[^:#\[\.,]*$/; | |
se.filter = function(e, t, n) { | |
var i = t[0]; | |
return n && (e = ":not(" + e + ")"), 1 === t.length && 1 === i.nodeType ? se.find.matchesSelector(i, e) ? [i] : [] : se.find.matches(e, se.grep(t, function(e) { | |
return 1 === e.nodeType | |
})) | |
}, se.fn.extend({ | |
find: function(e) { | |
var t, n = this.length, | |
i = [], | |
o = this; | |
if ("string" != typeof e) return this.pushStack(se(e).filter(function() { | |
for (t = 0; t < n; t++) | |
if (se.contains(o[t], this)) return !0 | |
})); | |
for (t = 0; t < n; t++) se.find(e, o[t], i); | |
return (i = this.pushStack(1 < n ? se.unique(i) : i)).selector = this.selector ? this.selector + " " + e : e, i | |
}, | |
filter: function(e) { | |
return this.pushStack(t(this, e || [], !1)) | |
}, | |
not: function(e) { | |
return this.pushStack(t(this, e || [], !0)) | |
}, | |
is: function(e) { | |
return !!t(this, "string" == typeof e && pe.test(e) ? se(e) : e || [], !1).length | |
} | |
}); | |
var ge, ve = /^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/; | |
(se.fn.init = function(e, t, n) { | |
var i, o; | |
if (!e) return this; | |
if (n = n || ge, "string" != typeof e) return e.nodeType ? (this.context = this[0] = e, this.length = 1, this) : se.isFunction(e) ? n.ready !== undefined ? n.ready(e) : e(se) : (e.selector !== undefined && (this.selector = e.selector, this.context = e.context), se.makeArray(e, this)); | |
if (!(i = "<" === e[0] && ">" === e[e.length - 1] && 3 <= e.length ? [null, e, null] : ve.exec(e)) || !i[1] && t) return !t || t.jquery ? (t || n).find(e) : this.constructor(t).find(e); | |
if (i[1]) { | |
if (t = t instanceof se ? t[0] : t, se.merge(this, se.parseHTML(i[1], t && t.nodeType ? t.ownerDocument || t : X, !0)), fe.test(i[1]) && se.isPlainObject(t)) | |
for (i in t) se.isFunction(this[i]) ? this[i](t[i]) : this.attr(i, t[i]); | |
return this | |
} | |
return (o = X.getElementById(i[2])) && o.parentNode && (this.length = 1, this[0] = o), this.context = X, this.selector = e, this | |
}).prototype = se.fn, ge = se(X); | |
var ye = /^(?:parents|prev(?:Until|All))/, | |
be = { | |
children: !0, | |
contents: !0, | |
next: !0, | |
prev: !0 | |
}; | |
se.fn.extend({ | |
has: function(e) { | |
var t = se(e, this), | |
n = t.length; | |
return this.filter(function() { | |
for (var e = 0; e < n; e++) | |
if (se.contains(this, t[e])) return !0 | |
}) | |
}, | |
closest: function(e, t) { | |
for (var n, i = 0, o = this.length, s = [], r = pe.test(e) || "string" != typeof e ? se(e, t || this.context) : 0; i < o; i++) | |
for (n = this[i]; n && n !== t; n = n.parentNode) | |
if (n.nodeType < 11 && (r ? -1 < r.index(n) : 1 === n.nodeType && se.find.matchesSelector(n, e))) { | |
s.push(n); | |
break | |
} | |
return this.pushStack(1 < s.length ? se.uniqueSort(s) : s) | |
}, | |
index: function(e) { | |
return e ? "string" == typeof e ? Q.call(se(e), this[0]) : Q.call(this, e.jquery ? e[0] : e) : this[0] && this[0].parentNode ? this.first().prevAll().length : -1 | |
}, | |
add: function(e, t) { | |
return this.pushStack(se.uniqueSort(se.merge(this.get(), se(e, t)))) | |
}, | |
addBack: function(e) { | |
return this.add(null == e ? this.prevObject : this.prevObject.filter(e)) | |
} | |
}), se.each({ | |
parent: function(e) { | |
var t = e.parentNode; | |
return t && 11 !== t.nodeType ? t : null | |
}, | |
parents: function(e) { | |
return ue(e, "parentNode") | |
}, | |
parentsUntil: function(e, t, n) { | |
return ue(e, "parentNode", n) | |
}, | |
next: function(e) { | |
return n(e, "nextSibling") | |
}, | |
prev: function(e) { | |
return n(e, "previousSibling") | |
}, | |
nextAll: function(e) { | |
return ue(e, "nextSibling") | |
}, | |
prevAll: function(e) { | |
return ue(e, "previousSibling") | |
}, | |
nextUntil: function(e, t, n) { | |
return ue(e, "nextSibling", n) | |
}, | |
prevUntil: function(e, t, n) { | |
return ue(e, "previousSibling", n) | |
}, | |
siblings: function(e) { | |
return he((e.parentNode || {}).firstChild, e) | |
}, | |
children: function(e) { | |
return he(e.firstChild) | |
}, | |
contents: function(e) { | |
return e.contentDocument || se.merge([], e.childNodes) | |
} | |
}, function(i, o) { | |
se.fn[i] = function(e, t) { | |
var n = se.map(this, o, e); | |
return "Until" !== i.slice(-5) && (t = e), t && "string" == typeof t && (n = se.filter(t, n)), 1 < this.length && (be[i] || se.uniqueSort(n), ye.test(i) && n.reverse()), this.pushStack(n) | |
} | |
}); | |
var we, _e = /\S+/g; | |
se.Callbacks = function(i) { | |
i = "string" == typeof i ? d(i) : se.extend({}, i); | |
var o, e, t, n, s = [], | |
r = [], | |
a = -1, | |
l = function() { | |
for (n = i.once, t = o = !0; r.length; a = -1) | |
for (e = r.shift(); ++a < s.length;) !1 === s[a].apply(e[0], e[1]) && i.stopOnFalse && (a = s.length, e = !1); | |
i.memory || (e = !1), o = !1, n && (s = e ? [] : "") | |
}, | |
c = { | |
add: function() { | |
return s && (e && !o && (a = s.length - 1, r.push(e)), function n(e) { | |
se.each(e, function(e, t) { | |
se.isFunction(t) ? i.unique && c.has(t) || s.push(t) : t && t.length && "string" !== se.type(t) && n(t) | |
}) | |
}(arguments), e && !o && l()), this | |
}, | |
remove: function() { | |
return se.each(arguments, function(e, t) { | |
for (var n; - 1 < (n = se.inArray(t, s, n));) s.splice(n, 1), n <= a && a-- | |
}), this | |
}, | |
has: function(e) { | |
return e ? -1 < se.inArray(e, s) : 0 < s.length | |
}, | |
empty: function() { | |
return s && (s = []), this | |
}, | |
disable: function() { | |
return n = r = [], s = e = "", this | |
}, | |
disabled: function() { | |
return !s | |
}, | |
lock: function() { | |
return n = r = [], e || (s = e = ""), this | |
}, | |
locked: function() { | |
return !!n | |
}, | |
fireWith: function(e, t) { | |
return n || (t = [e, (t = t || []).slice ? t.slice() : t], r.push(t), o || l()), this | |
}, | |
fire: function() { | |
return c.fireWith(this, arguments), this | |
}, | |
fired: function() { | |
return !!t | |
} | |
}; | |
return c | |
}, se.extend({ | |
Deferred: function(e) { | |
var s = [ | |
["resolve", "done", se.Callbacks("once memory"), "resolved"], | |
["reject", "fail", se.Callbacks("once memory"), "rejected"], | |
["notify", "progress", se.Callbacks("memory")] | |
], | |
o = "pending", | |
r = { | |
state: function() { | |
return o | |
}, | |
always: function() { | |
return a.done(arguments).fail(arguments), this | |
}, | |
then: function() { | |
var o = arguments; | |
return se.Deferred(function(i) { | |
se.each(s, function(e, t) { | |
var n = se.isFunction(o[e]) && o[e]; | |
a[t[1]](function() { | |
var e = n && n.apply(this, arguments); | |
e && se.isFunction(e.promise) ? e.promise().progress(i.notify).done(i.resolve).fail(i.reject) : i[t[0] + "With"](this === r ? i.promise() : this, n ? [e] : arguments) | |
}) | |
}), o = null | |
}).promise() | |
}, | |
promise: function(e) { | |
return null != e ? se.extend(e, r) : r | |
} | |
}, | |
a = {}; | |
return r.pipe = r.then, se.each(s, function(e, t) { | |
var n = t[2], | |
i = t[3]; | |
r[t[1]] = n.add, i && n.add(function() { | |
o = i | |
}, s[1 ^ e][2].disable, s[2][2].lock), a[t[0]] = function() { | |
return a[t[0] + "With"](this === a ? r : this, arguments), this | |
}, a[t[0] + "With"] = n.fireWith | |
}), r.promise(a), e && e.call(a, a), a | |
}, | |
when: function(e) { | |
var o, t, n, i = 0, | |
s = Z.call(arguments), | |
r = s.length, | |
a = 1 !== r || e && se.isFunction(e.promise) ? r : 0, | |
l = 1 === a ? e : se.Deferred(), | |
c = function(t, n, i) { | |
return function(e) { | |
n[t] = this, i[t] = 1 < arguments.length ? Z.call(arguments) : e, i === o ? l.notifyWith(n, i) : --a || l.resolveWith(n, i) | |
} | |
}; | |
if (1 < r) | |
for (o = new Array(r), t = new Array(r), n = new Array(r); i < r; i++) s[i] && se.isFunction(s[i].promise) ? s[i].promise().progress(c(i, t, o)).done(c(i, n, s)).fail(l.reject) : --a; | |
return a || l.resolveWith(n, s), l.promise() | |
} | |
}), se.fn.ready = function(e) { | |
return se.ready.promise().done(e), this | |
}, se.extend({ | |
isReady: !1, | |
readyWait: 1, | |
holdReady: function(e) { | |
e ? se.readyWait++ : se.ready(!0) | |
}, | |
ready: function(e) { | |
(!0 === e ? --se.readyWait : se.isReady) || (se.isReady = !0) !== e && 0 < --se.readyWait || (we.resolveWith(X, [se]), se.fn.triggerHandler && (se(X).triggerHandler("ready"), se(X).off("ready"))) | |
} | |
}), se.ready.promise = function(e) { | |
return we || (we = se.Deferred(), "complete" === X.readyState || "loading" !== X.readyState && !X.documentElement.doScroll ? k.setTimeout(se.ready) : (X.addEventListener("DOMContentLoaded", i), k.addEventListener("load", i))), we.promise(e) | |
}, se.ready.promise(); | |
var xe = function(e, t, n, i, o, s, r) { | |
var a = 0, | |
l = e.length, | |
c = null == n; | |
if ("object" === se.type(n)) | |
for (a in o = !0, n) xe(e, t, a, n[a], !0, s, r); | |
else if (i !== undefined && (o = !0, se.isFunction(i) || (r = !0), c && (r ? (t.call(e, i), t = null) : (c = t, t = function(e, t, n) { | |
return c.call(se(e), n) | |
})), t)) | |
for (; a < l; a++) t(e[a], n, r ? i : i.call(e[a], a, t(e[a], n))); | |
return o ? e : c ? t.call(e) : l ? t(e[0], n) : s | |
}, | |
ke = function(e) { | |
return 1 === e.nodeType || 9 === e.nodeType || !+e.nodeType | |
}; | |
o.uid = 1, o.prototype = { | |
register: function(e, t) { | |
var n = t || {}; | |
return e.nodeType ? e[this.expando] = n : Object.defineProperty(e, this.expando, { | |
value: n, | |
writable: !0, | |
configurable: !0 | |
}), e[this.expando] | |
}, | |
cache: function(e) { | |
if (!ke(e)) return {}; | |
var t = e[this.expando]; | |
return t || (t = {}, ke(e) && (e.nodeType ? e[this.expando] = t : Object.defineProperty(e, this.expando, { | |
value: t, | |
configurable: !0 | |
}))), t | |
}, | |
set: function(e, t, n) { | |
var i, o = this.cache(e); | |
if ("string" == typeof t) o[t] = n; | |
else | |
for (i in t) o[i] = t[i]; | |
return o | |
}, | |
get: function(e, t) { | |
return t === undefined ? this.cache(e) : e[this.expando] && e[this.expando][t] | |
}, | |
access: function(e, t, n) { | |
var i; | |
return t === undefined || t && "string" == typeof t && n === undefined ? (i = this.get(e, t)) !== undefined ? i : this.get(e, se.camelCase(t)) : (this.set(e, t, n), n !== undefined ? n : t) | |
}, | |
remove: function(e, t) { | |
var n, i, o, s = e[this.expando]; | |
if (s !== undefined) { | |
if (t === undefined) this.register(e); | |
else { | |
se.isArray(t) ? i = t.concat(t.map(se.camelCase)) : (o = se.camelCase(t), i = t in s ? [t, o] : (i = o) in s ? [i] : i.match(_e) || []), n = i.length; | |
for (; n--;) delete s[i[n]] | |
}(t === undefined || se.isEmptyObject(s)) && (e.nodeType ? e[this.expando] = undefined : delete e[this.expando]) | |
} | |
}, | |
hasData: function(e) { | |
var t = e[this.expando]; | |
return t !== undefined && !se.isEmptyObject(t) | |
} | |
}; | |
var Ce = new o, | |
Se = new o, | |
Te = /^(?:\{[\w\W]*\}|\[[\w\W]*\])$/, | |
$e = /[A-Z]/g; | |
se.extend({ | |
hasData: function(e) { | |
return Se.hasData(e) || Ce.hasData(e) | |
}, | |
data: function(e, t, n) { | |
return Se.access(e, t, n) | |
}, | |
removeData: function(e, t) { | |
Se.remove(e, t) | |
}, | |
_data: function(e, t, n) { | |
return Ce.access(e, t, n) | |
}, | |
_removeData: function(e, t) { | |
Ce.remove(e, t) | |
} | |
}), se.fn.extend({ | |
data: function(i, e) { | |
var t, n, o, s = this[0], | |
r = s && s.attributes; | |
if (i !== undefined) return "object" == typeof i ? this.each(function() { | |
Se.set(this, i) | |
}) : xe(this, function(t) { | |
var e, n; | |
if (s && t === undefined) return (e = Se.get(s, i) || Se.get(s, i.replace($e, "-$&").toLowerCase())) !== undefined ? e : (n = se.camelCase(i), (e = Se.get(s, n)) !== undefined ? e : (e = l(s, n, undefined)) !== undefined ? e : void 0); | |
n = se.camelCase(i), this.each(function() { | |
var e = Se.get(this, n); | |
Se.set(this, n, t), -1 < i.indexOf("-") && e !== undefined && Se.set(this, i, t) | |
}) | |
}, null, e, 1 < arguments.length, null, !0); | |
if (this.length && (o = Se.get(s), 1 === s.nodeType && !Ce.get(s, "hasDataAttrs"))) { | |
for (t = r.length; t--;) r[t] && 0 === (n = r[t].name).indexOf("data-") && (n = se.camelCase(n.slice(5)), l(s, n, o[n])); | |
Ce.set(s, "hasDataAttrs", !0) | |
} | |
return o | |
}, | |
removeData: function(e) { | |
return this.each(function() { | |
Se.remove(this, e) | |
}) | |
} | |
}), se.extend({ | |
queue: function(e, t, n) { | |
var i; | |
if (e) return t = (t || "fx") + "queue", i = Ce.get(e, t), n && (!i || se.isArray(n) ? i = Ce.access(e, t, se.makeArray(n)) : i.push(n)), i || [] | |
}, | |
dequeue: function(e, t) { | |
t = t || "fx"; | |
var n = se.queue(e, t), | |
i = n.length, | |
o = n.shift(), | |
s = se._queueHooks(e, t), | |
r = function() { | |
se.dequeue(e, t) | |
}; | |
"inprogress" === o && (o = n.shift(), i--), o && ("fx" === t && n.unshift("inprogress"), delete s.stop, o.call(e, r, s)), !i && s && s.empty.fire() | |
}, | |
_queueHooks: function(e, t) { | |
var n = t + "queueHooks"; | |
return Ce.get(e, n) || Ce.access(e, n, { | |
empty: se.Callbacks("once memory").add(function() { | |
Ce.remove(e, [t + "queue", n]) | |
}) | |
}) | |
} | |
}), se.fn.extend({ | |
queue: function(t, n) { | |
var e = 2; | |
return "string" != typeof t && (n = t, t = "fx", e--), arguments.length < e ? se.queue(this[0], t) : n === undefined ? this : this.each(function() { | |
var e = se.queue(this, t, n); | |
se._queueHooks(this, t), "fx" === t && "inprogress" !== e[0] && se.dequeue(this, t) | |
}) | |
}, | |
dequeue: function(e) { | |
return this.each(function() { | |
se.dequeue(this, e) | |
}) | |
}, | |
clearQueue: function(e) { | |
return this.queue(e || "fx", []) | |
}, | |
promise: function(e, t) { | |
var n, i = 1, | |
o = se.Deferred(), | |
s = this, | |
r = this.length, | |
a = function() { | |
--i || o.resolveWith(s, [s]) | |
}; | |
for ("string" != typeof e && (t = e, e = undefined), e = e || "fx"; r--;)(n = Ce.get(s[r], e + "queueHooks")) && n.empty && (i++, n.empty.add(a)); | |
return a(), o.promise(t) | |
} | |
}); | |
var De = /[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source, | |
Ae = new RegExp("^(?:([+-])=|)(" + De + ")([a-z%]*)$", "i"), | |
Ee = ["Top", "Right", "Bottom", "Left"], | |
Oe = function(e, t) { | |
return e = t || e, "none" === se.css(e, "display") || !se.contains(e.ownerDocument, e) | |
}, | |
Me = /^(?:checkbox|radio)$/i, | |
Pe = /<([\w:-]+)/, | |
Le = /^$|\/(?:java|ecma)script/i, | |
Ie = { | |
option: [1, "<select multiple='multiple'>", "</select>"], | |
thead: [1, "<table>", "</table>"], | |
col: [2, "<table><colgroup>", "</colgroup></table>"], | |
tr: [2, "<table><tbody>", "</tbody></table>"], | |
td: [3, "<table><tbody><tr>", "</tr></tbody></table>"], | |
_default: [0, "", ""] | |
}; | |
Ie.optgroup = Ie.option, Ie.tbody = Ie.tfoot = Ie.colgroup = Ie.caption = Ie.thead, Ie.th = Ie.td; | |
var Re, Ne, ze = /<|&#?\w+;/; | |
Re = X.createDocumentFragment().appendChild(X.createElement("div")), (Ne = X.createElement("input")).setAttribute("type", "radio"), Ne.setAttribute("checked", "checked"), Ne.setAttribute("name", "t"), Re.appendChild(Ne), ie.checkClone = Re.cloneNode(!0).cloneNode(!0).lastChild.checked, Re.innerHTML = "<textarea>x</textarea>", ie.noCloneChecked = !!Re.cloneNode(!0).lastChild.defaultValue; | |
var je = /^key/, | |
Fe = /^(?:mouse|pointer|contextmenu|drag|drop)|click/, | |
He = /^([^.]*)(?:\.(.+)|)/; | |
se.event = { | |
global: {}, | |
add: function(t, e, n, i, o) { | |
var s, r, a, l, c, d, u, h, p, f, m, g = Ce.get(t); | |
if (g) | |
for (n.handler && (n = (s = n).handler, o = s.selector), n.guid || (n.guid = se.guid++), (l = g.events) || (l = g.events = {}), (r = g.handle) || (r = g.handle = function(e) { | |
return void 0 !== se && se.event.triggered !== e.type ? se.event.dispatch.apply(t, arguments) : undefined | |
}), c = (e = (e || "").match(_e) || [""]).length; c--;) p = m = (a = He.exec(e[c]) || [])[1], f = (a[2] || "").split(".").sort(), p && (u = se.event.special[p] || {}, p = (o ? u.delegateType : u.bindType) || p, u = se.event.special[p] || {}, d = se.extend({ | |
type: p, | |
origType: m, | |
data: i, | |
handler: n, | |
guid: n.guid, | |
selector: o, | |
needsContext: o && se.expr.match.needsContext.test(o), | |
namespace: f.join(".") | |
}, s), (h = l[p]) || ((h = l[p] = []).delegateCount = 0, u.setup && !1 !== u.setup.call(t, i, f, r) || t.addEventListener && t.addEventListener(p, r)), u.add && (u.add.call(t, d), d.handler.guid || (d.handler.guid = n.guid)), o ? h.splice(h.delegateCount++, 0, d) : h.push(d), se.event.global[p] = !0) | |
}, | |
remove: function(e, t, n, i, o) { | |
var s, r, a, l, c, d, u, h, p, f, m, g = Ce.hasData(e) && Ce.get(e); | |
if (g && (l = g.events)) { | |
for (c = (t = (t || "").match(_e) || [""]).length; c--;) | |
if (p = m = (a = He.exec(t[c]) || [])[1], f = (a[2] || "").split(".").sort(), p) { | |
for (u = se.event.special[p] || {}, h = l[p = (i ? u.delegateType : u.bindType) || p] || [], a = a[2] && new RegExp("(^|\\.)" + f.join("\\.(?:.*\\.|)") + "(\\.|$)"), r = s = h.length; s--;) d = h[s], !o && m !== d.origType || n && n.guid !== d.guid || a && !a.test(d.namespace) || i && i !== d.selector && ("**" !== i || !d.selector) || (h.splice(s, 1), d.selector && h.delegateCount--, u.remove && u.remove.call(e, d)); | |
r && !h.length && (u.teardown && !1 !== u.teardown.call(e, f, g.handle) || se.removeEvent(e, p, g.handle), delete l[p]) | |
} else | |
for (p in l) se.event.remove(e, p + t[c], n, i, !0); | |
se.isEmptyObject(l) && Ce.remove(e, "handle events") | |
} | |
}, | |
dispatch: function(e) { | |
e = se.event.fix(e); | |
var t, n, i, o, s, r = [], | |
a = Z.call(arguments), | |
l = (Ce.get(this, "events") || {})[e.type] || [], | |
c = se.event.special[e.type] || {}; | |
if ((a[0] = e).delegateTarget = this, !c.preDispatch || !1 !== c.preDispatch.call(this, e)) { | |
for (r = se.event.handlers.call(this, e, l), t = 0; | |
(o = r[t++]) && !e.isPropagationStopped();) | |
for (e.currentTarget = o.elem, n = 0; | |
(s = o.handlers[n++]) && !e.isImmediatePropagationStopped();) e.rnamespace && !e.rnamespace.test(s.namespace) || (e.handleObj = s, e.data = s.data, (i = ((se.event.special[s.origType] || {}).handle || s.handler).apply(o.elem, a)) !== undefined && !1 === (e.result = i) && (e.preventDefault(), e.stopPropagation())); | |
return c.postDispatch && c.postDispatch.call(this, e), e.result | |
} | |
}, | |
handlers: function(e, t) { | |
var n, i, o, s, r = [], | |
a = t.delegateCount, | |
l = e.target; | |
if (a && l.nodeType && ("click" !== e.type || isNaN(e.button) || e.button < 1)) | |
for (; l !== this; l = l.parentNode || this) | |
if (1 === l.nodeType && (!0 !== l.disabled || "click" !== e.type)) { | |
for (i = [], n = 0; n < a; n++) i[o = (s = t[n]).selector + " "] === undefined && (i[o] = s.needsContext ? -1 < se(o, this).index(l) : se.find(o, this, null, [l]).length), i[o] && i.push(s); | |
i.length && r.push({ | |
elem: l, | |
handlers: i | |
}) | |
} | |
return a < t.length && r.push({ | |
elem: this, | |
handlers: t.slice(a) | |
}), r | |
}, | |
props: "altKey bubbles cancelable ctrlKey currentTarget detail eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "), | |
fixHooks: {}, | |
keyHooks: { | |
props: "char charCode key keyCode".split(" "), | |
filter: function(e, t) { | |
return null == e.which && (e.which = null != t.charCode ? t.charCode : t.keyCode), e | |
} | |
}, | |
mouseHooks: { | |
props: "button buttons clientX clientY offsetX offsetY pageX pageY screenX screenY toElement".split(" "), | |
filter: function(e, t) { | |
var n, i, o, s = t.button; | |
return null == e.pageX && null != t.clientX && (i = (n = e.target.ownerDocument || X).documentElement, o = n.body, e.pageX = t.clientX + (i && i.scrollLeft || o && o.scrollLeft || 0) - (i && i.clientLeft || o && o.clientLeft || 0), e.pageY = t.clientY + (i && i.scrollTop || o && o.scrollTop || 0) - (i && i.clientTop || o && o.clientTop || 0)), e.which || s === undefined || (e.which = 1 & s ? 1 : 2 & s ? 3 : 4 & s ? 2 : 0), e | |
} | |
}, | |
fix: function(e) { | |
if (e[se.expando]) return e; | |
var t, n, i, o = e.type, | |
s = e, | |
r = this.fixHooks[o]; | |
for (r || (this.fixHooks[o] = r = Fe.test(o) ? this.mouseHooks : je.test(o) ? this.keyHooks : {}), i = r.props ? this.props.concat(r.props) : this.props, e = new se.Event(s), t = i.length; t--;) e[n = i[t]] = s[n]; | |
return e.target || (e.target = X), 3 === e.target.nodeType && (e.target = e.target.parentNode), r.filter ? r.filter(e, s) : e | |
}, | |
special: { | |
load: { | |
noBubble: !0 | |
}, | |
focus: { | |
trigger: function() { | |
if (this !== r() && this.focus) return this.focus(), !1 | |
}, | |
delegateType: "focusin" | |
}, | |
blur: { | |
trigger: function() { | |
if (this === r() && this.blur) return this.blur(), !1 | |
}, | |
delegateType: "focusout" | |
}, | |
click: { | |
trigger: function() { | |
if ("checkbox" === this.type && this.click && se.nodeName(this, "input")) return this.click(), !1 | |
}, | |
_default: function(e) { | |
return se.nodeName(e.target, "a") | |
} | |
}, | |
beforeunload: { | |
postDispatch: function(e) { | |
e.result !== undefined && e.originalEvent && (e.originalEvent.returnValue = e.result) | |
} | |
} | |
} | |
}, se.removeEvent = function(e, t, n) { | |
e.removeEventListener && e.removeEventListener(t, n) | |
}, se.Event = function(e, t) { | |
if (!(this instanceof se.Event)) return new se.Event(e, t); | |
e && e.type ? (this.originalEvent = e, this.type = e.type, this.isDefaultPrevented = e.defaultPrevented || e.defaultPrevented === undefined && !1 === e.returnValue ? s : u) : this.type = e, t && se.extend(this, t), this.timeStamp = e && e.timeStamp || se.now(), this[se.expando] = !0 | |
}, se.Event.prototype = { | |
constructor: se.Event, | |
isDefaultPrevented: u, | |
isPropagationStopped: u, | |
isImmediatePropagationStopped: u, | |
isSimulated: !1, | |
preventDefault: function() { | |
var e = this.originalEvent; | |
this.isDefaultPrevented = s, e && !this.isSimulated && e.preventDefault() | |
}, | |
stopPropagation: function() { | |
var e = this.originalEvent; | |
this.isPropagationStopped = s, e && !this.isSimulated && e.stopPropagation() | |
}, | |
stopImmediatePropagation: function() { | |
var e = this.originalEvent; | |
this.isImmediatePropagationStopped = s, e && !this.isSimulated && e.stopImmediatePropagation(), this.stopPropagation() | |
} | |
}, se.each({ | |
mouseenter: "mouseover", | |
mouseleave: "mouseout", | |
pointerenter: "pointerover", | |
pointerleave: "pointerout" | |
}, function(e, s) { | |
se.event.special[e] = { | |
delegateType: s, | |
bindType: s, | |
handle: function(e) { | |
var t, n = this, | |
i = e.relatedTarget, | |
o = e.handleObj; | |
return i && (i === n || se.contains(n, i)) || (e.type = o.origType, t = o.handler.apply(this, arguments), e.type = s), t | |
} | |
} | |
}), se.fn.extend({ | |
on: function(e, t, n, i) { | |
return h(this, e, t, n, i) | |
}, | |
one: function(e, t, n, i) { | |
return h(this, e, t, n, i, 1) | |
}, | |
off: function(e, t, n) { | |
var i, o; | |
if (e && e.preventDefault && e.handleObj) return i = e.handleObj, se(e.delegateTarget).off(i.namespace ? i.origType + "." + i.namespace : i.origType, i.selector, i.handler), this; | |
if ("object" != typeof e) return !1 !== t && "function" != typeof t || (n = t, t = undefined), !1 === n && (n = u), this.each(function() { | |
se.event.remove(this, e, n, t) | |
}); | |
for (o in e) this.off(o, t, e[o]); | |
return this | |
} | |
}); | |
var We = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:-]+)[^>]*)\/>/gi, | |
Be = /<script|<style|<link/i, | |
Ue = /checked\s*(?:[^=]|=\s*.checked.)/i, | |
Ve = /^true\/(.*)/, | |
qe = /^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g; | |
se.extend({ | |
htmlPrefilter: function(e) { | |
return e.replace(We, "<$1></$2>") | |
}, | |
clone: function(e, t, n) { | |
var i, o, s, r, a = e.cloneNode(!0), | |
l = se.contains(e.ownerDocument, e); | |
if (!(ie.noCloneChecked || 1 !== e.nodeType && 11 !== e.nodeType || se.isXMLDoc(e))) | |
for (r = m(a), i = 0, o = (s = m(e)).length; i < o; i++) w(s[i], r[i]); | |
if (t) | |
if (n) | |
for (s = s || m(e), r = r || m(a), i = 0, o = s.length; i < o; i++) f(s[i], r[i]); | |
else f(e, a); | |
return 0 < (r = m(a, "script")).length && g(r, !l && m(e, "script")), a | |
}, | |
cleanData: function(e) { | |
for (var t, n, i, o = se.event.special, s = 0; | |
(n = e[s]) !== undefined; s++) | |
if (ke(n)) { | |
if (t = n[Ce.expando]) { | |
if (t.events) | |
for (i in t.events) o[i] ? se.event.remove(n, i) : se.removeEvent(n, i, t.handle); | |
n[Ce.expando] = undefined | |
} | |
n[Se.expando] && (n[Se.expando] = undefined) | |
} | |
} | |
}), se.fn.extend({ | |
domManip: _, | |
detach: function(e) { | |
return x(this, e, !0) | |
}, | |
remove: function(e) { | |
return x(this, e) | |
}, | |
text: function(e) { | |
return xe(this, function(e) { | |
return e === undefined ? se.text(this) : this.empty().each(function() { | |
1 !== this.nodeType && 11 !== this.nodeType && 9 !== this.nodeType || (this.textContent = e) | |
}) | |
}, null, e, arguments.length) | |
}, | |
append: function() { | |
return _(this, arguments, function(e) { | |
1 !== this.nodeType && 11 !== this.nodeType && 9 !== this.nodeType || p(this, e).appendChild(e) | |
}) | |
}, | |
prepend: function() { | |
return _(this, arguments, function(e) { | |
if (1 === this.nodeType || 11 === this.nodeType || 9 === this.nodeType) { | |
var t = p(this, e); | |
t.insertBefore(e, t.firstChild) | |
} | |
}) | |
}, | |
before: function() { | |
return _(this, arguments, function(e) { | |
this.parentNode && this.parentNode.insertBefore(e, this) | |
}) | |
}, | |
after: function() { | |
return _(this, arguments, function(e) { | |
this.parentNode && this.parentNode.insertBefore(e, this.nextSibling) | |
}) | |
}, | |
empty: function() { | |
for (var e, t = 0; null != (e = this[t]); t++) 1 === e.nodeType && (se.cleanData(m(e, !1)), e.textContent = ""); | |
return this | |
}, | |
clone: function(e, t) { | |
return e = null != e && e, t = null == t ? e : t, this.map(function() { | |
return se.clone(this, e, t) | |
}) | |
}, | |
html: function(e) { | |
return xe(this, function(e) { | |
var t = this[0] || {}, | |
n = 0, | |
i = this.length; | |
if (e === undefined && 1 === t.nodeType) return t.innerHTML; | |
if ("string" == typeof e && !Be.test(e) && !Ie[(Pe.exec(e) || ["", ""])[1].toLowerCase()]) { | |
e = se.htmlPrefilter(e); | |
try { | |
for (; n < i; n++) 1 === (t = this[n] || {}).nodeType && (se.cleanData(m(t, !1)), t.innerHTML = e); | |
t = 0 | |
} catch (o) {} | |
} | |
t && this.empty().append(e) | |
}, null, e, arguments.length) | |
}, | |
replaceWith: function() { | |
var n = []; | |
return _(this, arguments, function(e) { | |
var t = this.parentNode; | |
se.inArray(this, n) < 0 && (se.cleanData(m(this)), t && t.replaceChild(e, this)) | |
}, n) | |
} | |
}), se.each({ | |
appendTo: "append", | |
prependTo: "prepend", | |
insertBefore: "before", | |
insertAfter: "after", | |
replaceAll: "replaceWith" | |
}, function(e, r) { | |
se.fn[e] = function(e) { | |
for (var t, n = [], i = se(e), o = i.length - 1, s = 0; s <= o; s++) t = s === o ? this : this.clone(!0), se(i[s])[r](t), K.apply(n, t.get()); | |
return this.pushStack(n) | |
} | |
}); | |
var Ye, Ge = { | |
HTML: "block", | |
BODY: "block" | |
}, | |
Xe = /^margin/, | |
Ze = new RegExp("^(" + De + ")(?!px)[a-z%]+$", "i"), | |
Je = function(e) { | |
var t = e.ownerDocument.defaultView; | |
return t && t.opener || (t = k), t.getComputedStyle(e) | |
}, | |
Ke = function(e, t, n, i) { | |
var o, s, r = {}; | |
for (s in t) r[s] = e.style[s], e.style[s] = t[s]; | |
for (s in o = n.apply(e, i || []), t) e.style[s] = r[s]; | |
return o | |
}, | |
Qe = X.documentElement; | |
! function() { | |
function e() { | |
r.style.cssText = "-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;position:relative;display:block;margin:auto;border:1px;padding:1px;top:1%;width:50%", r.innerHTML = "", Qe.appendChild(s); | |
var e = k.getComputedStyle(r); | |
t = "1%" !== e.top, o = "2px" === e.marginLeft, n = "4px" === e.width, r.style.marginRight = "50%", i = "4px" === e.marginRight, Qe.removeChild(s) | |
} | |
var t, n, i, o, s = X.createElement("div"), | |
r = X.createElement("div"); | |
r.style && (r.style.backgroundClip = "content-box", r.cloneNode(!0).style.backgroundClip = "", ie.clearCloneStyle = "content-box" === r.style.backgroundClip, s.style.cssText = "border:0;width:8px;height:0;top:0;left:-9999px;padding:0;margin-top:1px;position:absolute", s.appendChild(r), se.extend(ie, { | |
pixelPosition: function() { | |
return e(), t | |
}, | |
boxSizingReliable: function() { | |
return null == n && e(), n | |
}, | |
pixelMarginRight: function() { | |
return null == n && e(), i | |
}, | |
reliableMarginLeft: function() { | |
return null == n && e(), o | |
}, | |
reliableMarginRight: function() { | |
var e, t = r.appendChild(X.createElement("div")); | |
return t.style.cssText = r.style.cssText = "-webkit-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:0", t.style.marginRight = t.style.width = "0", r.style.width = "1px", Qe.appendChild(s), e = !parseFloat(k.getComputedStyle(t).marginRight), Qe.removeChild(s), r.removeChild(t), e | |
} | |
})) | |
}(); | |
var et = /^(none|table(?!-c[ea]).+)/, | |
tt = { | |
position: "absolute", | |
visibility: "hidden", | |
display: "block" | |
}, | |
nt = { | |
letterSpacing: "0", | |
fontWeight: "400" | |
}, | |
it = ["Webkit", "O", "Moz", "ms"], | |
ot = X.createElement("div").style; | |
se.extend({ | |
cssHooks: { | |
opacity: { | |
get: function(e, t) { | |
if (t) { | |
var n = T(e, "opacity"); | |
return "" === n ? "1" : n | |
} | |
} | |
} | |
}, | |
cssNumber: { | |
animationIterationCount: !0, | |
columnCount: !0, | |
fillOpacity: !0, | |
flexGrow: !0, | |
flexShrink: !0, | |
fontWeight: !0, | |
lineHeight: !0, | |
opacity: !0, | |
order: !0, | |
orphans: !0, | |
widows: !0, | |
zIndex: !0, | |
zoom: !0 | |
}, | |
cssProps: { | |
"float": "cssFloat" | |
}, | |
style: function(e, t, n, i) { | |
if (e && 3 !== e.nodeType && 8 !== e.nodeType && e.style) { | |
var o, s, r, a = se.camelCase(t), | |
l = e.style; | |
if (t = se.cssProps[a] || (se.cssProps[a] = D(a) || a), r = se.cssHooks[t] || se.cssHooks[a], n === undefined) return r && "get" in r && (o = r.get(e, !1, i)) !== undefined ? o : l[t]; | |
"string" === (s = typeof n) && (o = Ae.exec(n)) && o[1] && (n = c(e, t, o), s = "number"), null != n && n == n && ("number" === s && (n += o && o[3] || (se.cssNumber[a] ? "" : "px")), ie.clearCloneStyle || "" !== n || 0 !== t.indexOf("background") || (l[t] = "inherit"), r && "set" in r && (n = r.set(e, n, i)) === undefined || (l[t] = n)) | |
} | |
}, | |
css: function(e, t, n, i) { | |
var o, s, r, a = se.camelCase(t); | |
return t = se.cssProps[a] || (se.cssProps[a] = D(a) || a), (r = se.cssHooks[t] || se.cssHooks[a]) && "get" in r && (o = r.get(e, !0, n)), o === undefined && (o = T(e, t, i)), "normal" === o && t in nt && (o = nt[t]), "" === n || n ? (s = parseFloat(o), !0 === n || isFinite(s) ? s || 0 : o) : o | |
} | |
}), se.each(["height", "width"], function(e, r) { | |
se.cssHooks[r] = { | |
get: function(e, t, n) { | |
if (t) return et.test(se.css(e, "display")) && 0 === e.offsetWidth ? Ke(e, tt, function() { | |
return O(e, r, n) | |
}) : O(e, r, n) | |
}, | |
set: function(e, t, n) { | |
var i, o = n && Je(e), | |
s = n && E(e, r, n, "border-box" === se.css(e, "boxSizing", !1, o), o); | |
return s && (i = Ae.exec(t)) && "px" !== (i[3] || "px") && (e.style[r] = t, t = se.css(e, r)), A(e, t, s) | |
} | |
} | |
}), se.cssHooks.marginLeft = $(ie.reliableMarginLeft, function(e, t) { | |
if (t) return (parseFloat(T(e, "marginLeft")) || e.getBoundingClientRect().left - Ke(e, { | |
marginLeft: 0 | |
}, function() { | |
return e.getBoundingClientRect().left | |
})) + "px" | |
}), se.cssHooks.marginRight = $(ie.reliableMarginRight, function(e, t) { | |
if (t) return Ke(e, { | |
display: "inline-block" | |
}, T, [e, "marginRight"]) | |
}), se.each({ | |
margin: "", | |
padding: "", | |
border: "Width" | |
}, function(o, s) { | |
se.cssHooks[o + s] = { | |
expand: function(e) { | |
for (var t = 0, n = {}, i = "string" == typeof e ? e.split(" ") : [e]; t < 4; t++) n[o + Ee[t] + s] = i[t] || i[t - 2] || i[0]; | |
return n | |
} | |
}, Xe.test(o) || (se.cssHooks[o + s].set = A) | |
}), se.fn.extend({ | |
css: function(e, t) { | |
return xe(this, function(e, t, n) { | |
var i, o, s = {}, | |
r = 0; | |
if (se.isArray(t)) { | |
for (i = Je(e), o = t.length; r < o; r++) s[t[r]] = se.css(e, t[r], !1, i); | |
return s | |
} | |
return n !== undefined ? se.style(e, t, n) : se.css(e, t) | |
}, e, t, 1 < arguments.length) | |
}, | |
show: function() { | |
return M(this, !0) | |
}, | |
hide: function() { | |
return M(this) | |
}, | |
toggle: function(e) { | |
return "boolean" == typeof e ? e ? this.show() : this.hide() : this.each(function() { | |
Oe(this) ? se(this).show() : se(this).hide() | |
}) | |
} | |
}), (se.Tween = P).prototype = { | |
constructor: P, | |
init: function(e, t, n, i, o, s) { | |
this.elem = e, this.prop = n, this.easing = o || se.easing._default, this.options = t, this.start = this.now = this.cur(), this.end = i, this.unit = s || (se.cssNumber[n] ? "" : "px") | |
}, | |
cur: function() { | |
var e = P.propHooks[this.prop]; | |
return e && e.get ? e.get(this) : P.propHooks._default.get(this) | |
}, | |
run: function(e) { | |
var t, n = P.propHooks[this.prop]; | |
return this.options.duration ? this.pos = t = se.easing[this.easing](e, this.options.duration * e, 0, 1, this.options.duration) : this.pos = t = e, this.now = (this.end - this.start) * t + this.start, this.options.step && this.options.step.call(this.elem, this.now, this), n && n.set ? n.set(this) : P.propHooks._default.set(this), this | |
} | |
}, P.prototype.init.prototype = P.prototype, P.propHooks = { | |
_default: { | |
get: function(e) { | |
var t; | |
return 1 !== e.elem.nodeType || null != e.elem[e.prop] && null == e.elem.style[e.prop] ? e.elem[e.prop] : (t = se.css(e.elem, e.prop, "")) && "auto" !== t ? t : 0 | |
}, | |
set: function(e) { | |
se.fx.step[e.prop] ? se.fx.step[e.prop](e) : 1 !== e.elem.nodeType || null == e.elem.style[se.cssProps[e.prop]] && !se.cssHooks[e.prop] ? e.elem[e.prop] = e.now : se.style(e.elem, e.prop, e.now + e.unit) | |
} | |
} | |
}, P.propHooks.scrollTop = P.propHooks.scrollLeft = { | |
set: function(e) { | |
e.elem.nodeType && e.elem.parentNode && (e.elem[e.prop] = e.now) | |
} | |
}, se.easing = { | |
linear: function(e) { | |
return e | |
}, | |
swing: function(e) { | |
return .5 - Math.cos(e * Math.PI) / 2 | |
}, | |
_default: "swing" | |
}, se.fx = P.prototype.init, se.fx.step = {}; | |
var st, rt, at, lt, ct, dt = /^(?:toggle|show|hide)$/, | |
ut = /queueHooks$/; | |
se.Animation = se.extend(j, { | |
tweeners: { | |
"*": [function(e, t) { | |
var n = this.createTween(e, t); | |
return c(n.elem, e, Ae.exec(t), n), n | |
}] | |
}, | |
tweener: function(e, t) { | |
se.isFunction(e) ? (t = e, e = ["*"]) : e = e.match(_e); | |
for (var n, i = 0, o = e.length; i < o; i++) n = e[i], j.tweeners[n] = j.tweeners[n] || [], j.tweeners[n].unshift(t) | |
}, | |
prefilters: [N], | |
prefilter: function(e, t) { | |
t ? j.prefilters.unshift(e) : j.prefilters.push(e) | |
} | |
}), se.speed = function(e, t, n) { | |
var i = e && "object" == typeof e ? se.extend({}, e) : { | |
complete: n || !n && t || se.isFunction(e) && e, | |
duration: e, | |
easing: n && t || t && !se.isFunction(t) && t | |
}; | |
return i.duration = se.fx.off ? 0 : "number" == typeof i.duration ? i.duration : i.duration in se.fx.speeds ? se.fx.speeds[i.duration] : se.fx.speeds._default, null != i.queue && !0 !== i.queue || (i.queue = "fx"), i.old = i.complete, i.complete = function() { | |
se.isFunction(i.old) && i.old.call(this), i.queue && se.dequeue(this, i.queue) | |
}, i | |
}, se.fn.extend({ | |
fadeTo: function(e, t, n, i) { | |
return this.filter(Oe).css("opacity", 0).show().end().animate({ | |
opacity: t | |
}, e, n, i) | |
}, | |
animate: function(t, e, n, i) { | |
var o = se.isEmptyObject(t), | |
s = se.speed(e, n, i), | |
r = function() { | |
var e = j(this, se.extend({}, t), s); | |
(o || Ce.get(this, "finish")) && e.stop(!0) | |
}; | |
return r.finish = r, o || !1 === s.queue ? this.each(r) : this.queue(s.queue, r) | |
}, | |
stop: function(o, e, s) { | |
var r = function(e) { | |
var t = e.stop; | |
delete e.stop, t(s) | |
}; | |
return "string" != typeof o && (s = e, e = o, o = undefined), e && !1 !== o && this.queue(o || "fx", []), this.each(function() { | |
var e = !0, | |
t = null != o && o + "queueHooks", | |
n = se.timers, | |
i = Ce.get(this); | |
if (t) i[t] && i[t].stop && r(i[t]); | |
else | |
for (t in i) i[t] && i[t].stop && ut.test(t) && r(i[t]); | |
for (t = n.length; t--;) n[t].elem !== this || null != o && n[t].queue !== o || (n[t].anim.stop(s), e = !1, n.splice(t, 1)); | |
!e && s || se.dequeue(this, o) | |
}) | |
}, | |
finish: function(r) { | |
return !1 !== r && (r = r || "fx"), this.each(function() { | |
var e, t = Ce.get(this), | |
n = t[r + "queue"], | |
i = t[r + "queueHooks"], | |
o = se.timers, | |
s = n ? n.length : 0; | |
for (t.finish = !0, se.queue(this, r, []), i && i.stop && i.stop.call(this, !0), e = o.length; e--;) o[e].elem === this && o[e].queue === r && (o[e].anim.stop(!0), o.splice(e, 1)); | |
for (e = 0; e < s; e++) n[e] && n[e].finish && n[e].finish.call(this); | |
delete t.finish | |
}) | |
} | |
}), se.each(["toggle", "show", "hide"], function(e, i) { | |
var o = se.fn[i]; | |
se.fn[i] = function(e, t, n) { | |
return null == e || "boolean" == typeof e ? o.apply(this, arguments) : this.animate(I(i, !0), e, t, n) | |
} | |
}), se.each({ | |
slideDown: I("show"), | |
slideUp: I("hide"), | |
slideToggle: I("toggle"), | |
fadeIn: { | |
opacity: "show" | |
}, | |
fadeOut: { | |
opacity: "hide" | |
}, | |
fadeToggle: { | |
opacity: "toggle" | |
} | |
}, function(e, i) { | |
se.fn[e] = function(e, t, n) { | |
return this.animate(i, e, t, n) | |
} | |
}), se.timers = [], se.fx.tick = function() { | |
var e, t = 0, | |
n = se.timers; | |
for (st = se.now(); t < n.length; t++)(e = n[t])() || n[t] !== e || n.splice(t--, 1); | |
n.length || se.fx.stop(), st = undefined | |
}, se.fx.timer = function(e) { | |
se.timers.push(e), e() ? se.fx.start() : se.timers.pop() | |
}, se.fx.interval = 13, se.fx.start = function() { | |
rt || (rt = k.setInterval(se.fx.tick, se.fx.interval)) | |
}, se.fx.stop = function() { | |
k.clearInterval(rt), rt = null | |
}, se.fx.speeds = { | |
slow: 600, | |
fast: 200, | |
_default: 400 | |
}, se.fn.delay = function(i, e) { | |
return i = se.fx && se.fx.speeds[i] || i, e = e || "fx", this.queue(e, function(e, t) { | |
var n = k.setTimeout(e, i); | |
t.stop = function() { | |
k.clearTimeout(n) | |
} | |
}) | |
}, at = X.createElement("input"), lt = X.createElement("select"), ct = lt.appendChild(X.createElement("option")), at.type = "checkbox", ie.checkOn = "" !== at.value, ie.optSelected = ct.selected, lt.disabled = !0, ie.optDisabled = !ct.disabled, (at = X.createElement("input")).value = "t", at.type = "radio", ie.radioValue = "t" === at.value; | |
var ht, pt = se.expr.attrHandle; | |
se.fn.extend({ | |
attr: function(e, t) { | |
return xe(this, se.attr, e, t, 1 < arguments.length) | |
}, | |
removeAttr: function(e) { | |
return this.each(function() { | |
se.removeAttr(this, e) | |
}) | |
} | |
}), se.extend({ | |
attr: function(e, t, n) { | |
var i, o, s = e.nodeType; | |
if (3 !== s && 8 !== s && 2 !== s) return "undefined" == typeof e.getAttribute ? se.prop(e, t, n) : (1 === s && se.isXMLDoc(e) || (t = t.toLowerCase(), o = se.attrHooks[t] || (se.expr.match.bool.test(t) ? ht : undefined)), n !== undefined ? null === n ? void se.removeAttr(e, t) : o && "set" in o && (i = o.set(e, n, t)) !== undefined ? i : (e.setAttribute(t, n + ""), n) : o && "get" in o && null !== (i = o.get(e, t)) ? i : null == (i = se.find.attr(e, t)) ? undefined : i) | |
}, | |
attrHooks: { | |
type: { | |
set: function(e, t) { | |
if (!ie.radioValue && "radio" === t && se.nodeName(e, "input")) { | |
var n = e.value; | |
return e.setAttribute("type", t), n && (e.value = n), t | |
} | |
} | |
} | |
}, | |
removeAttr: function(e, t) { | |
var n, i, o = 0, | |
s = t && t.match(_e); | |
if (s && 1 === e.nodeType) | |
for (; n = s[o++];) i = se.propFix[n] || n, se.expr.match.bool.test(n) && (e[i] = !1), e.removeAttribute(n) | |
} | |
}), ht = { | |
set: function(e, t, n) { | |
return !1 === t ? se.removeAttr(e, n) : e.setAttribute(n, n), n | |
} | |
}, se.each(se.expr.match.bool.source.match(/\w+/g), function(e, t) { | |
var s = pt[t] || se.find.attr; | |
pt[t] = function(e, t, n) { | |
var i, o; | |
return n || (o = pt[t], pt[t] = i, i = null != s(e, t, n) ? t.toLowerCase() : null, pt[t] = o), i | |
} | |
}); | |
var ft = /^(?:input|select|textarea|button)$/i, | |
mt = /^(?:a|area)$/i; | |
se.fn.extend({ | |
prop: function(e, t) { | |
return xe(this, se.prop, e, t, 1 < arguments.length) | |
}, | |
removeProp: function(e) { | |
return this.each(function() { | |
delete this[se.propFix[e] || e] | |
}) | |
} | |
}), se.extend({ | |
prop: function(e, t, n) { | |
var i, o, s = e.nodeType; | |
if (3 !== s && 8 !== s && 2 !== s) return 1 === s && se.isXMLDoc(e) || (t = se.propFix[t] || t, o = se.propHooks[t]), n !== undefined ? o && "set" in o && (i = o.set(e, n, t)) !== undefined ? i : e[t] = n : o && "get" in o && null !== (i = o.get(e, t)) ? i : e[t] | |
}, | |
propHooks: { | |
tabIndex: { | |
get: function(e) { | |
var t = se.find.attr(e, "tabindex"); | |
return t ? parseInt(t, 10) : ft.test(e.nodeName) || mt.test(e.nodeName) && e.href ? 0 : -1 | |
} | |
} | |
}, | |
propFix: { | |
"for": "htmlFor", | |
"class": "className" | |
} | |
}), ie.optSelected || (se.propHooks.selected = { | |
get: function(e) { | |
var t = e.parentNode; | |
return t && t.parentNode && t.parentNode.selectedIndex, null | |
}, | |
set: function(e) { | |
var t = e.parentNode; | |
t && (t.selectedIndex, t.parentNode && t.parentNode.selectedIndex) | |
} | |
}), se.each(["tabIndex", "readOnly", "maxLength", "cellSpacing", "cellPadding", "rowSpan", "colSpan", "useMap", "frameBorder", "contentEditable"], function() { | |
se.propFix[this.toLowerCase()] = this | |
}); | |
var gt = /[\t\r\n\f]/g; | |
se.fn.extend({ | |
addClass: function(t) { | |
var e, n, i, o, s, r, a, l = 0; | |
if (se.isFunction(t)) return this.each(function(e) { | |
se(this).addClass(t.call(this, e, F(this))) | |
}); | |
if ("string" == typeof t && t) | |
for (e = t.match(_e) || []; n = this[l++];) | |
if (o = F(n), i = 1 === n.nodeType && (" " + o + " ").replace(gt, " ")) { | |
for (r = 0; s = e[r++];) i.indexOf(" " + s + " ") < 0 && (i += s + " "); | |
o !== (a = se.trim(i)) && n.setAttribute("class", a) | |
} | |
return this | |
}, | |
removeClass: function(t) { | |
var e, n, i, o, s, r, a, l = 0; | |
if (se.isFunction(t)) return this.each(function(e) { | |
se(this).removeClass(t.call(this, e, F(this))) | |
}); | |
if (!arguments.length) return this.attr("class", ""); | |
if ("string" == typeof t && t) | |
for (e = t.match(_e) || []; n = this[l++];) | |
if (o = F(n), i = 1 === n.nodeType && (" " + o + " ").replace(gt, " ")) { | |
for (r = 0; s = e[r++];) | |
for (; - 1 < i.indexOf(" " + s + " ");) i = i.replace(" " + s + " ", " "); | |
o !== (a = se.trim(i)) && n.setAttribute("class", a) | |
} | |
return this | |
}, | |
toggleClass: function(o, t) { | |
var s = typeof o; | |
return "boolean" == typeof t && "string" === s ? t ? this.addClass(o) : this.removeClass(o) : se.isFunction(o) ? this.each(function(e) { | |
se(this).toggleClass(o.call(this, e, F(this), t), t) | |
}) : this.each(function() { | |
var e, t, n, i; | |
if ("string" === s) | |
for (t = 0, n = se(this), i = o.match(_e) || []; e = i[t++];) n.hasClass(e) ? n.removeClass(e) : n.addClass(e); | |
else o !== undefined && "boolean" !== s || ((e = F(this)) && Ce.set(this, "__className__", e), this.setAttribute && this.setAttribute("class", e || !1 === o ? "" : Ce.get(this, "__className__") || "")) | |
}) | |
}, | |
hasClass: function(e) { | |
var t, n, i = 0; | |
for (t = " " + e + " "; n = this[i++];) | |
if (1 === n.nodeType && -1 < (" " + F(n) + " ").replace(gt, " ").indexOf(t)) return !0; | |
return !1 | |
} | |
}); | |
var vt = /\r/g, | |
yt = /[\x20\t\r\n\f]+/g; | |
se.fn.extend({ | |
val: function(n) { | |
var i, e, o, t = this[0]; | |
return arguments.length ? (o = se.isFunction(n), this.each(function(e) { | |
var t; | |
1 === this.nodeType && (null == (t = o ? n.call(this, e, se(this).val()) : n) ? t = "" : "number" == typeof t ? t += "" : se.isArray(t) && (t = se.map(t, function(e) { | |
return null == e ? "" : e + "" | |
})), (i = se.valHooks[this.type] || se.valHooks[this.nodeName.toLowerCase()]) && "set" in i && i.set(this, t, "value") !== undefined || (this.value = t)) | |
})) : t ? (i = se.valHooks[t.type] || se.valHooks[t.nodeName.toLowerCase()]) && "get" in i && (e = i.get(t, "value")) !== undefined ? e : "string" == typeof(e = t.value) ? e.replace(vt, "") : null == e ? "" : e : void 0 | |
} | |
}), se.extend({ | |
valHooks: { | |
option: { | |
get: function(e) { | |
var t = se.find.attr(e, "value"); | |
return null != t ? t : se.trim(se.text(e)).replace(yt, " ") | |
} | |
}, | |
select: { | |
get: function(e) { | |
for (var t, n, i = e.options, o = e.selectedIndex, s = "select-one" === e.type || o < 0, r = s ? null : [], a = s ? o + 1 : i.length, l = o < 0 ? a : s ? o : 0; l < a; l++) | |
if (((n = i[l]).selected || l === o) && (ie.optDisabled ? !n.disabled : null === n.getAttribute("disabled")) && (!n.parentNode.disabled || !se.nodeName(n.parentNode, "optgroup"))) { | |
if (t = se(n).val(), s) return t; | |
r.push(t) | |
} | |
return r | |
}, | |
set: function(e, t) { | |
for (var n, i, o = e.options, s = se.makeArray(t), r = o.length; r--;)((i = o[r]).selected = -1 < se.inArray(se.valHooks.option.get(i), s)) && (n = !0); | |
return n || (e.selectedIndex = -1), s | |
} | |
} | |
} | |
}), se.each(["radio", "checkbox"], function() { | |
se.valHooks[this] = { | |
set: function(e, t) { | |
if (se.isArray(t)) return e.checked = -1 < se.inArray(se(e).val(), t) | |
} | |
}, ie.checkOn || (se.valHooks[this].get = function(e) { | |
return null === e.getAttribute("value") ? "on" : e.value | |
}) | |
}); | |
var bt = /^(?:focusinfocus|focusoutblur)$/; | |
se.extend(se.event, { | |
trigger: function(e, t, n, i) { | |
var o, s, r, a, l, c, d, u = [n || X], | |
h = ne.call(e, "type") ? e.type : e, | |
p = ne.call(e, "namespace") ? e.namespace.split(".") : []; | |
if (s = r = n = n || X, 3 !== n.nodeType && 8 !== n.nodeType && !bt.test(h + se.event.triggered) && (-1 < h.indexOf(".") && (h = (p = h.split(".")).shift(), p.sort()), l = h.indexOf(":") < 0 && "on" + h, (e = e[se.expando] ? e : new se.Event(h, "object" == typeof e && e)).isTrigger = i ? 2 : 3, e.namespace = p.join("."), e.rnamespace = e.namespace ? new RegExp("(^|\\.)" + p.join("\\.(?:.*\\.|)") + "(\\.|$)") : null, e.result = undefined, e.target || (e.target = n), t = null == t ? [e] : se.makeArray(t, [e]), d = se.event.special[h] || {}, i || !d.trigger || !1 !== d.trigger.apply(n, t))) { | |
if (!i && !d.noBubble && !se.isWindow(n)) { | |
for (a = d.delegateType || h, bt.test(a + h) || (s = s.parentNode); s; s = s.parentNode) u.push(s), r = s; | |
r === (n.ownerDocument || X) && u.push(r.defaultView || r.parentWindow || k) | |
} | |
for (o = 0; | |
(s = u[o++]) && !e.isPropagationStopped();) e.type = 1 < o ? a : d.bindType || h, (c = (Ce.get(s, "events") || {})[e.type] && Ce.get(s, "handle")) && c.apply(s, t), (c = l && s[l]) && c.apply && ke(s) && (e.result = c.apply(s, t), !1 === e.result && e.preventDefault()); | |
return e.type = h, i || e.isDefaultPrevented() || d._default && !1 !== d._default.apply(u.pop(), t) || !ke(n) || l && se.isFunction(n[h]) && !se.isWindow(n) && ((r = n[l]) && (n[l] = null), n[se.event.triggered = h](), se.event.triggered = undefined, r && (n[l] = r)), e.result | |
} | |
}, | |
simulate: function(e, t, n) { | |
var i = se.extend(new se.Event, n, { | |
type: e, | |
isSimulated: !0 | |
}); | |
se.event.trigger(i, null, t) | |
} | |
}), se.fn.extend({ | |
trigger: function(e, t) { | |
return this.each(function() { | |
se.event.trigger(e, t, this) | |
}) | |
}, | |
triggerHandler: function(e, t) { | |
var n = this[0]; | |
if (n) return se.event.trigger(e, t, n, !0) | |
} | |
}), se.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "), function(e, n) { | |
se.fn[n] = function(e, t) { | |
return 0 < arguments.length ? this.on(n, null, e, t) : this.trigger(n) | |
} | |
}), se.fn.extend({ | |
hover: function(e, t) { | |
return this.mouseenter(e).mouseleave(t || e) | |
} | |
}), ie.focusin = "onfocusin" in k, ie.focusin || se.each({ | |
focus: "focusin", | |
blur: "focusout" | |
}, function(n, i) { | |
var o = function(e) { | |
se.event.simulate(i, e.target, se.event.fix(e)) | |
}; | |
se.event.special[i] = { | |
setup: function() { | |
var e = this.ownerDocument || this, | |
t = Ce.access(e, i); | |
t || e.addEventListener(n, o, !0), Ce.access(e, i, (t || 0) + 1) | |
}, | |
teardown: function() { | |
var e = this.ownerDocument || this, | |
t = Ce.access(e, i) - 1; | |
t ? Ce.access(e, i, t) : (e.removeEventListener(n, o, !0), Ce.remove(e, i)) | |
} | |
} | |
}); | |
var wt = k.location, | |
_t = se.now(), | |
xt = /\?/; | |
se.parseJSON = function(e) { | |
return JSON.parse(e + "") | |
}, se.parseXML = function(e) { | |
var t; | |
if (!e || "string" != typeof e) return null; | |
try { | |
t = (new k.DOMParser).parseFromString(e, "text/xml") | |
} catch (n) { | |
t = undefined | |
} | |
return t && !t.getElementsByTagName("parsererror").length || se.error("Invalid XML: " + e), t | |
}; | |
var kt = /#.*$/, | |
Ct = /([?&])_=[^&]*/, | |
St = /^(.*?):[ \t]*([^\r\n]*)$/gm, | |
Tt = /^(?:about|app|app-storage|.+-extension|file|res|widget):$/, | |
$t = /^(?:GET|HEAD)$/, | |
Dt = /^\/\//, | |
At = {}, | |
Et = {}, | |
Ot = "*/".concat("*"), | |
Mt = X.createElement("a"); | |
Mt.href = wt.href, se.extend({ | |
active: 0, | |
lastModified: {}, | |
etag: {}, | |
ajaxSettings: { | |
url: wt.href, | |
type: "GET", | |
isLocal: Tt.test(wt.protocol), | |
global: !0, | |
processData: !0, | |
async: !0, | |
contentType: "application/x-www-form-urlencoded; charset=UTF-8", | |
accepts: { | |
"*": Ot, | |
text: "text/plain", | |
html: "text/html", | |
xml: "application/xml, text/xml", | |
json: "application/json, text/javascript" | |
}, | |
contents: { | |
xml: /\bxml\b/, | |
html: /\bhtml/, | |
json: /\bjson\b/ | |
}, | |
responseFields: { | |
xml: "responseXML", | |
text: "responseText", | |
json: "responseJSON" | |
}, | |
converters: { | |
"* text": String, | |
"text html": !0, | |
"text json": se.parseJSON, | |
"text xml": se.parseXML | |
}, | |
flatOptions: { | |
url: !0, | |
context: !0 | |
} | |
}, | |
ajaxSetup: function(e, t) { | |
return t ? B(B(e, se.ajaxSettings), t) : B(se.ajaxSettings, e) | |
}, | |
ajaxPrefilter: H(At), | |
ajaxTransport: H(Et), | |
ajax: function(e, t) { | |
function n(e, t, n, i) { | |
var o, s, r, a, l, c = t; | |
2 !== _ && (_ = 2, p && k.clearTimeout(p), d = undefined, h = i || "", x.readyState = 0 < e ? 4 : 0, o = 200 <= e && e < 300 || 304 === e, n && (a = U(m, x, n)), a = V(m, a, x, o), o ? (m.ifModified && ((l = x.getResponseHeader("Last-Modified")) && (se.lastModified[u] = l), (l = x.getResponseHeader("etag")) && (se.etag[u] = l)), 204 === e || "HEAD" === m.type ? c = "nocontent" : 304 === e ? c = "notmodified" : (c = a.state, s = a.data, o = !(r = a.error))) : (r = c, !e && c || (c = "error", e < 0 && (e = 0))), x.status = e, x.statusText = (t || c) + "", o ? y.resolveWith(g, [s, c, x]) : y.rejectWith(g, [x, c, r]), x.statusCode(w), w = undefined, f && v.trigger(o ? "ajaxSuccess" : "ajaxError", [x, m, o ? s : r]), b.fireWith(g, [x, c]), f && (v.trigger("ajaxComplete", [x, m]), --se.active || se.event.trigger("ajaxStop"))) | |
} | |
"object" == typeof e && (t = e, e = undefined), t = t || {}; | |
var d, u, h, i, p, o, f, s, m = se.ajaxSetup({}, t), | |
g = m.context || m, | |
v = m.context && (g.nodeType || g.jquery) ? se(g) : se.event, | |
y = se.Deferred(), | |
b = se.Callbacks("once memory"), | |
w = m.statusCode || {}, | |
r = {}, | |
a = {}, | |
_ = 0, | |
l = "canceled", | |
x = { | |
readyState: 0, | |
getResponseHeader: function(e) { | |
var t; | |
if (2 === _) { | |
if (!i) | |
for (i = {}; t = St.exec(h);) i[t[1].toLowerCase()] = t[2]; | |
t = i[e.toLowerCase()] | |
} | |
return null == t ? null : t | |
}, | |
getAllResponseHeaders: function() { | |
return 2 === _ ? h : null | |
}, | |
setRequestHeader: function(e, t) { | |
var n = e.toLowerCase(); | |
return _ || (e = a[n] = a[n] || e, r[e] = t), this | |
}, | |
overrideMimeType: function(e) { | |
return _ || (m.mimeType = e), this | |
}, | |
statusCode: function(e) { | |
var t; | |
if (e) | |
if (_ < 2) | |
for (t in e) w[t] = [w[t], e[t]]; | |
else x.always(e[x.status]); | |
return this | |
}, | |
abort: function(e) { | |
var t = e || l; | |
return d && d.abort(t), n(0, t), this | |
} | |
}; | |
if (y.promise(x).complete = b.add, x.success = x.done, x.error = x.fail, m.url = ((e || m.url || wt.href) + "").replace(kt, "").replace(Dt, wt.protocol + "//"), m.type = t.method || t.type || m.method || m.type, m.dataTypes = se.trim(m.dataType || "*").toLowerCase().match(_e) || [""], null == m.crossDomain) { | |
o = X.createElement("a"); | |
try { | |
o.href = m.url, o.href = o.href, m.crossDomain = Mt.protocol + "//" + Mt.host != o.protocol + "//" + o.host | |
} catch (c) { | |
m.crossDomain = !0 | |
} | |
} | |
if (m.data && m.processData && "string" != typeof m.data && (m.data = se.param(m.data, m.traditional)), W(At, m, t, x), 2 === _) return x; | |
for (s in (f = se.event && m.global) && 0 == se.active++ && se.event.trigger("ajaxStart"), m.type = m.type.toUpperCase(), m.hasContent = !$t.test(m.type), u = m.url, m.hasContent || (m.data && (u = m.url += (xt.test(u) ? "&" : "?") + m.data, delete m.data), !1 === m.cache && (m.url = Ct.test(u) ? u.replace(Ct, "$1_=" + _t++) : u + (xt.test(u) ? "&" : "?") + "_=" + _t++)), m.ifModified && (se.lastModified[u] && x.setRequestHeader("If-Modified-Since", se.lastModified[u]), se.etag[u] && x.setRequestHeader("If-None-Match", se.etag[u])), (m.data && m.hasContent && !1 !== m.contentType || t.contentType) && x.setRequestHeader("Content-Type", m.contentType), x.setRequestHeader("Accept", m.dataTypes[0] && m.accepts[m.dataTypes[0]] ? m.accepts[m.dataTypes[0]] + ("*" !== m.dataTypes[0] ? ", " + Ot + "; q=0.01" : "") : m.accepts["*"]), m.headers) x.setRequestHeader(s, m.headers[s]); | |
if (m.beforeSend && (!1 === m.beforeSend.call(g, x, m) || 2 === _)) return x.abort(); | |
for (s in l = "abort", { | |
success: 1, | |
error: 1, | |
complete: 1 | |
}) x[s](m[s]); | |
if (d = W(Et, m, t, x)) { | |
if (x.readyState = 1, f && v.trigger("ajaxSend", [x, m]), 2 === _) return x; | |
m.async && 0 < m.timeout && (p = k.setTimeout(function() { | |
x.abort("timeout") | |
}, m.timeout)); | |
try { | |
_ = 1, d.send(r, n) | |
} catch (c) { | |
if (!(_ < 2)) throw c; | |
n(-1, c) | |
} | |
} else n(-1, "No Transport"); | |
return x | |
}, | |
getJSON: function(e, t, n) { | |
return se.get(e, t, n, "json") | |
}, | |
getScript: function(e, t) { | |
return se.get(e, undefined, t, "script") | |
} | |
}), se.each(["get", "post"], function(e, o) { | |
se[o] = function(e, t, n, i) { | |
return se.isFunction(t) && (i = i || n, n = t, t = undefined), se.ajax(se.extend({ | |
url: e, | |
type: o, | |
dataType: i, | |
data: t, | |
success: n | |
}, se.isPlainObject(e) && e)) | |
} | |
}), se._evalUrl = function(e) { | |
return se.ajax({ | |
url: e, | |
type: "GET", | |
dataType: "script", | |
async: !1, | |
global: !1, | |
"throws": !0 | |
}) | |
}, se.fn.extend({ | |
wrapAll: function(t) { | |
var e; | |
return se.isFunction(t) ? this.each(function(e) { | |
se(this).wrapAll(t.call(this, e)) | |
}) : (this[0] && (e = se(t, this[0].ownerDocument).eq(0).clone(!0), this[0].parentNode && e.insertBefore(this[0]), e.map(function() { | |
for (var e = this; e.firstElementChild;) e = e.firstElementChild; | |
return e | |
}).append(this)), this) | |
}, | |
wrapInner: function(n) { | |
return se.isFunction(n) ? this.each(function(e) { | |
se(this).wrapInner(n.call(this, e)) | |
}) : this.each(function() { | |
var e = se(this), | |
t = e.contents(); | |
t.length ? t.wrapAll(n) : e.append(n) | |
}) | |
}, | |
wrap: function(t) { | |
var n = se.isFunction(t); | |
return this.each(function(e) { | |
se(this).wrapAll(n ? t.call(this, e) : t) | |
}) | |
}, | |
unwrap: function() { | |
return this.parent().each(function() { | |
se.nodeName(this, "body") || se(this).replaceWith(this.childNodes) | |
}).end() | |
} | |
}), se.expr.filters.hidden = function(e) { | |
return !se.expr.filters.visible(e) | |
}, se.expr.filters.visible = function(e) { | |
return 0 < e.offsetWidth || 0 < e.offsetHeight || 0 < e.getClientRects().length | |
}; | |
var Pt = /%20/g, | |
Lt = /\[\]$/, | |
It = /\r?\n/g, | |
Rt = /^(?:submit|button|image|reset|file)$/i, | |
Nt = /^(?:input|select|textarea|keygen)/i; | |
se.param = function(e, t) { | |
var n, i = [], | |
o = function(e, t) { | |
t = se.isFunction(t) ? t() : null == t ? "" : t, i[i.length] = encodeURIComponent(e) + "=" + encodeURIComponent(t) | |
}; | |
if (t === undefined && (t = se.ajaxSettings && se.ajaxSettings.traditional), se.isArray(e) || e.jquery && !se.isPlainObject(e)) se.each(e, function() { | |
o(this.name, this.value) | |
}); | |
else | |
for (n in e) q(n, e[n], t, o); | |
return i.join("&").replace(Pt, "+") | |
}, se.fn.extend({ | |
serialize: function() { | |
return se.param(this.serializeArray()) | |
}, | |
serializeArray: function() { | |
return this.map(function() { | |
var e = se.prop(this, "elements"); | |
return e ? se.makeArray(e) : this | |
}).filter(function() { | |
var e = this.type; | |
return this.name && !se(this).is(":disabled") && Nt.test(this.nodeName) && !Rt.test(e) && (this.checked || !Me.test(e)) | |
}).map(function(e, t) { | |
var n = se(this).val(); | |
return null == n ? null : se.isArray(n) ? se.map(n, function(e) { | |
return { | |
name: t.name, | |
value: e.replace(It, "\r\n") | |
} | |
}) : { | |
name: t.name, | |
value: n.replace(It, "\r\n") | |
} | |
}).get() | |
} | |
}), se.ajaxSettings.xhr = function() { | |
try { | |
return new k.XMLHttpRequest | |
} catch (e) {} | |
}; | |
var zt = { | |
0: 200, | |
1223: 204 | |
}, | |
jt = se.ajaxSettings.xhr(); | |
ie.cors = !!jt && "withCredentials" in jt, ie.ajax = jt = !!jt, se.ajaxTransport(function(s) { | |
var r, a; | |
if (ie.cors || jt && !s.crossDomain) return { | |
send: function(e, t) { | |
var n, i = s.xhr(); | |
if (i.open(s.type, s.url, s.async, s.username, s.password), s.xhrFields) | |
for (n in s.xhrFields) i[n] = s.xhrFields[n]; | |
for (n in s.mimeType && i.overrideMimeType && i.overrideMimeType(s.mimeType), s.crossDomain || e["X-Requested-With"] || (e["X-Requested-With"] = "XMLHttpRequest"), e) i.setRequestHeader(n, e[n]); | |
r = function(e) { | |
return function() { | |
r && (r = a = i.onload = i.onerror = i.onabort = i.onreadystatechange = null, "abort" === e ? i.abort() : "error" === e ? "number" != typeof i.status ? t(0, "error") : t(i.status, i.statusText) : t(zt[i.status] || i.status, i.statusText, "text" !== (i.responseType || "text") || "string" != typeof i.responseText ? { | |
binary: i.response | |
} : { | |
text: i.responseText | |
}, i.getAllResponseHeaders())) | |
} | |
}, i.onload = r(), a = i.onerror = r("error"), i.onabort !== undefined ? i.onabort = a : i.onreadystatechange = function() { | |
4 === i.readyState && k.setTimeout(function() { | |
r && a() | |
}) | |
}, r = r("abort"); | |
try { | |
i.send(s.hasContent && s.data || null) | |
} catch (o) { | |
if (r) throw o | |
} | |
}, | |
abort: function() { | |
r && r() | |
} | |
} | |
}), se.ajaxSetup({ | |
accepts: { | |
script: "text/javascript, application/javascript, application/ecmascript, application/x-ecmascript" | |
}, | |
contents: { | |
script: /\b(?:java|ecma)script\b/ | |
}, | |
converters: { | |
"text script": function(e) { | |
return se.globalEval(e), e | |
} | |
} | |
}), se.ajaxPrefilter("script", function(e) { | |
e.cache === undefined && (e.cache = !1), e.crossDomain && (e.type = "GET") | |
}), se.ajaxTransport("script", function(n) { | |
var i, o; | |
if (n.crossDomain) return { | |
send: function(e, t) { | |
i = se("<script>").prop({ | |
charset: n.scriptCharset, | |
src: n.url | |
}).on("load error", o = function(e) { | |
i.remove(), o = null, e && t("error" === e.type ? 404 : 200, e.type) | |
}), X.head.appendChild(i[0]) | |
}, | |
abort: function() { | |
o && o() | |
} | |
} | |
}); | |
var Ft = [], | |
Ht = /(=)\?(?=&|$)|\?\?/; | |
se.ajaxSetup({ | |
jsonp: "callback", | |
jsonpCallback: function() { | |
var e = Ft.pop() || se.expando + "_" + _t++; | |
return this[e] = !0, e | |
} | |
}), se.ajaxPrefilter("json jsonp", function(e, t, n) { | |
var i, o, s, r = !1 !== e.jsonp && (Ht.test(e.url) ? "url" : "string" == typeof e.data && 0 === (e.contentType || "").indexOf("application/x-www-form-urlencoded") && Ht.test(e.data) && "data"); | |
if (r || "jsonp" === e.dataTypes[0]) return i = e.jsonpCallback = se.isFunction(e.jsonpCallback) ? e.jsonpCallback() : e.jsonpCallback, r ? e[r] = e[r].replace(Ht, "$1" + i) : !1 !== e.jsonp && (e.url += (xt.test(e.url) ? "&" : "?") + e.jsonp + "=" + i), e.converters["script json"] = function() { | |
return s || se.error(i + " was not called"), s[0] | |
}, e.dataTypes[0] = "json", o = k[i], k[i] = function() { | |
s = arguments | |
}, n.always(function() { | |
o === undefined ? se(k).removeProp(i) : k[i] = o, e[i] && (e.jsonpCallback = t.jsonpCallback, Ft.push(i)), s && se.isFunction(o) && o(s[0]), s = o = undefined | |
}), "script" | |
}), se.parseHTML = function(e, t, n) { | |
if (!e || "string" != typeof e) return null; | |
"boolean" == typeof t && (n = t, t = !1), t = t || X; | |
var i = fe.exec(e), | |
o = !n && []; | |
return i ? [t.createElement(i[1])] : (i = v([e], t, o), o && o.length && se(o).remove(), se.merge([], i.childNodes)) | |
}; | |
var Wt = se.fn.load; | |
se.fn.load = function(e, t, n) { | |
if ("string" != typeof e && Wt) return Wt.apply(this, arguments); | |
var i, o, s, r = this, | |
a = e.indexOf(" "); | |
return -1 < a && (i = se.trim(e.slice(a)), e = e.slice(0, a)), se.isFunction(t) ? (n = t, t = undefined) : t && "object" == typeof t && (o = "POST"), 0 < r.length && se.ajax({ | |
url: e, | |
type: o || "GET", | |
dataType: "html", | |
data: t | |
}).done(function(e) { | |
s = arguments, r.html(i ? se("<div>").append(se.parseHTML(e)).find(i) : e) | |
}).always(n && function(e, t) { | |
r.each(function() { | |
n.apply(this, s || [e.responseText, t, e]) | |
}) | |
}), this | |
}, se.each(["ajaxStart", "ajaxStop", "ajaxComplete", "ajaxError", "ajaxSuccess", "ajaxSend"], function(e, t) { | |
se.fn[t] = function(e) { | |
return this.on(t, e) | |
} | |
}), se.expr.filters.animated = function(t) { | |
return se.grep(se.timers, function(e) { | |
return t === e.elem | |
}).length | |
}, se.offset = { | |
setOffset: function(e, t, n) { | |
var i, o, s, r, a, l, c = se.css(e, "position"), | |
d = se(e), | |
u = {}; | |
"static" === c && (e.style.position = "relative"), a = d.offset(), s = se.css(e, "top"), l = se.css(e, "left"), ("absolute" === c || "fixed" === c) && -1 < (s + l).indexOf("auto") ? (r = (i = d.position()).top, o = i.left) : (r = parseFloat(s) || 0, o = parseFloat(l) || 0), se.isFunction(t) && (t = t.call(e, n, se.extend({}, a))), null != t.top && (u.top = t.top - a.top + r), null != t.left && (u.left = t.left - a.left + o), "using" in t ? t.using.call(e, u) : d.css(u) | |
} | |
}, se.fn.extend({ | |
offset: function(t) { | |
if (arguments.length) return t === undefined ? this : this.each(function(e) { | |
se.offset.setOffset(this, t, e) | |
}); | |
var e, n, i = this[0], | |
o = { | |
top: 0, | |
left: 0 | |
}, | |
s = i && i.ownerDocument; | |
return s ? (e = s.documentElement, se.contains(e, i) ? (o = i.getBoundingClientRect(), n = Y(s), { | |
top: o.top + n.pageYOffset - e.clientTop, | |
left: o.left + n.pageXOffset - e.clientLeft | |
}) : o) : void 0 | |
}, | |
position: function() { | |
if (this[0]) { | |
var e, t, n = this[0], | |
i = { | |
top: 0, | |
left: 0 | |
}; | |
return "fixed" === se.css(n, "position") ? t = n.getBoundingClientRect() : (e = this.offsetParent(), t = this.offset(), se.nodeName(e[0], "html") || (i = e.offset()), i.top += se.css(e[0], "borderTopWidth", !0), i.left += se.css(e[0], "borderLeftWidth", !0)), { | |
top: t.top - i.top - se.css(n, "marginTop", !0), | |
left: t.left - i.left - se.css(n, "marginLeft", !0) | |
} | |
} | |
}, | |
offsetParent: function() { | |
return this.map(function() { | |
for (var e = this.offsetParent; e && "static" === se.css(e, "position");) e = e.offsetParent; | |
return e || Qe | |
}) | |
} | |
}), se.each({ | |
scrollLeft: "pageXOffset", | |
scrollTop: "pageYOffset" | |
}, function(t, o) { | |
var s = "pageYOffset" === o; | |
se.fn[t] = function(e) { | |
return xe(this, function(e, t, n) { | |
var i = Y(e); | |
if (n === undefined) return i ? i[o] : e[t]; | |
i ? i.scrollTo(s ? i.pageXOffset : n, s ? n : i.pageYOffset) : e[t] = n | |
}, t, e, arguments.length) | |
} | |
}), se.each(["top", "left"], function(e, n) { | |
se.cssHooks[n] = $(ie.pixelPosition, function(e, t) { | |
if (t) return t = T(e, n), Ze.test(t) ? se(e).position()[n] + "px" : t | |
}) | |
}), se.each({ | |
Height: "height", | |
Width: "width" | |
}, function(s, r) { | |
se.each({ | |
padding: "inner" + s, | |
content: r, | |
"": "outer" + s | |
}, function(i, e) { | |
se.fn[e] = function(e, t) { | |
var n = arguments.length && (i || "boolean" != typeof e), | |
o = i || (!0 === e || !0 === t ? "margin" : "border"); | |
return xe(this, function(e, t, n) { | |
var i; | |
return se.isWindow(e) ? e.document.documentElement["client" + s] : 9 === e.nodeType ? (i = e.documentElement, Math.max(e.body["scroll" + s], i["scroll" + s], e.body["offset" + s], i["offset" + s], i["client" + s])) : n === undefined ? se.css(e, t, o) : se.style(e, t, n, o) | |
}, r, n ? e : undefined, n, null) | |
} | |
}) | |
}), se.fn.extend({ | |
bind: function(e, t, n) { | |
return this.on(e, null, t, n) | |
}, | |
unbind: function(e, t) { | |
return this.off(e, null, t) | |
}, | |
delegate: function(e, t, n, i) { | |
return this.on(t, e, n, i) | |
}, | |
undelegate: function(e, t, n) { | |
return 1 === arguments.length ? this.off(e, "**") : this.off(t, e || "**", n) | |
}, | |
size: function() { | |
return this.length | |
} | |
}), se.fn.andSelf = se.fn.addBack, "function" == typeof define && define.amd && define("jquery", [], function() { | |
return se | |
}); | |
var Bt = k.jQuery, | |
Ut = k.$; | |
return se.noConflict = function(e) { | |
return k.$ === se && (k.$ = Ut), e && k.jQuery === se && (k.jQuery = Bt), se | |
}, e || (k.jQuery = k.$ = se), se | |
}), | |
function(d, l) { | |
"use strict"; | |
var c; | |
d.rails !== l && d.error("jquery-ujs has already been loaded!"); | |
var e = d(document); | |
d.rails = c = { | |
linkClickSelector: "a[data-confirm], a[data-method], a[data-remote]:not([disabled]), a[data-disable-with], a[data-disable]", | |
buttonClickSelector: "button[data-remote]:not([form]):not(form button), button[data-confirm]:not([form]):not(form button)", | |
inputChangeSelector: "select[data-remote], input[data-remote], textarea[data-remote]", | |
formSubmitSelector: "form", | |
formInputClickSelector: "form input[type=submit], form input[type=image], form button[type=submit], form button:not([type]), input[type=submit][form], input[type=image][form], button[type=submit][form], button[form]:not([type])", | |
disableSelector: "input[data-disable-with]:enabled, button[data-disable-with]:enabled, textarea[data-disable-with]:enabled, input[data-disable]:enabled, button[data-disable]:enabled, textarea[data-disable]:enabled", | |
enableSelector: "input[data-disable-with]:disabled, button[data-disable-with]:disabled, textarea[data-disable-with]:disabled, input[data-disable]:disabled, button[data-disable]:disabled, textarea[data-disable]:disabled", | |
requiredInputSelector: "input[name][required]:not([disabled]), textarea[name][required]:not([disabled])", | |
fileInputSelector: "input[name][type=file]:not([disabled])", | |
linkDisableSelector: "a[data-disable-with], a[data-disable]", | |
buttonDisableSelector: "button[data-remote][data-disable-with], button[data-remote][data-disable]", | |
csrfToken: function() { | |
return d("meta[name=csrf-token]").attr("content") | |
}, | |
csrfParam: function() { | |
return d("meta[name=csrf-param]").attr("content") | |
}, | |
CSRFProtection: function(e) { | |
var t = c.csrfToken(); | |
t && e.setRequestHeader("X-CSRF-Token", t) | |
}, | |
refreshCSRFTokens: function() { | |
d('form input[name="' + c.csrfParam() + '"]').val(c.csrfToken()) | |
}, | |
fire: function(e, t, n) { | |
var i = d.Event(t); | |
return e.trigger(i, n), !1 !== i.result | |
}, | |
confirm: function(e) { | |
return confirm(e) | |
}, | |
ajax: function(e) { | |
return d.ajax(e) | |
}, | |
href: function(e) { | |
return e[0].href | |
}, | |
isRemote: function(e) { | |
return e.data("remote") !== l && !1 !== e.data("remote") | |
}, | |
handleRemote: function(i) { | |
var e, t, n, o, s, r; | |
if (c.fire(i, "ajax:before")) { | |
if (o = i.data("with-credentials") || null, s = i.data("type") || d.ajaxSettings && d.ajaxSettings.dataType, i.is("form")) { | |
e = i.data("ujs:submit-button-formmethod") || i.attr("method"), t = i.data("ujs:submit-button-formaction") || i.attr("action"), n = d(i[0]).serializeArray(); | |
var a = i.data("ujs:submit-button"); | |
a && (n.push(a), i.data("ujs:submit-button", null)), i.data("ujs:submit-button-formmethod", null), i.data("ujs:submit-button-formaction", null) | |
} else i.is(c.inputChangeSelector) ? (e = i.data("method"), t = i.data("url"), n = i.serialize(), i.data("params") && (n = n + "&" + i.data("params"))) : i.is(c.buttonClickSelector) ? (e = i.data("method") || "get", t = i.data("url"), n = i.serialize(), i.data("params") && (n = n + "&" + i.data("params"))) : (e = i.data("method"), t = c.href(i), n = i.data("params") || null); | |
return r = { | |
type: e || "GET", | |
data: n, | |
dataType: s, | |
beforeSend: function(e, t) { | |
if (t.dataType === l && e.setRequestHeader("accept", "*/*;q=0.5, " + t.accepts.script), !c.fire(i, "ajax:beforeSend", [e, t])) return !1; | |
i.trigger("ajax:send", e) | |
}, | |
success: function(e, t, n) { | |
i.trigger("ajax:success", [e, t, n]) | |
}, | |
complete: function(e, t) { | |
i.trigger("ajax:complete", [e, t]) | |
}, | |
error: function(e, t, n) { | |
i.trigger("ajax:error", [e, t, n]) | |
}, | |
crossDomain: c.isCrossDomain(t) | |
}, o && (r.xhrFields = { | |
withCredentials: o | |
}), t && (r.url = t), c.ajax(r) | |
} | |
return !1 | |
}, | |
isCrossDomain: function(e) { | |
var t = document.createElement("a"); | |
t.href = location.href; | |
var n = document.createElement("a"); | |
try { | |
return n.href = e, n.href = n.href, !((!n.protocol || ":" === n.protocol) && !n.host || t.protocol + "//" + t.host == n.protocol + "//" + n.host) | |
} catch (i) { | |
return !0 | |
} | |
}, | |
handleMethod: function(e) { | |
var t = c.href(e), | |
n = e.data("method"), | |
i = e.attr("target"), | |
o = c.csrfToken(), | |
s = c.csrfParam(), | |
r = d('<form method="post" action="' + t + '"></form>'), | |
a = '<input name="_method" value="' + n + '" type="hidden" />'; | |
s === l || o === l || c.isCrossDomain(t) || (a += '<input name="' + s + '" value="' + o + '" type="hidden" />'), i && r.attr("target", i), r.hide().append(a).appendTo("body"), r.submit() | |
}, | |
formElements: function(e, t) { | |
return e.is("form") ? d(e[0].elements).filter(t) : e.find(t) | |
}, | |
disableFormElements: function(e) { | |
c.formElements(e, c.disableSelector).each(function() { | |
c.disableFormElement(d(this)) | |
}) | |
}, | |
disableFormElement: function(e) { | |
var t, n; | |
t = e.is("button") ? "html" : "val", (n = e.data("disable-with")) !== l && (e.data("ujs:enable-with", e[t]()), e[t](n)), e.prop("disabled", !0), e.data("ujs:disabled", !0) | |
}, | |
enableFormElements: function(e) { | |
c.formElements(e, c.enableSelector).each(function() { | |
c.enableFormElement(d(this)) | |
}) | |
}, | |
enableFormElement: function(e) { | |
var t = e.is("button") ? "html" : "val"; | |
e.data("ujs:enable-with") !== l && (e[t](e.data("ujs:enable-with")), e.removeData("ujs:enable-with")), e.prop("disabled", !1), e.removeData("ujs:disabled") | |
}, | |
allowAction: function(e) { | |
var t, n = e.data("confirm"), | |
i = !1; | |
if (!n) return !0; | |
if (c.fire(e, "confirm")) { | |
try { | |
i = c.confirm(n) | |
} catch (o) { | |
(console.error || console.log).call(console, o.stack || o) | |
} | |
t = c.fire(e, "confirm:complete", [i]) | |
} | |
return i && t | |
}, | |
blankInputs: function(e, t, n) { | |
var i, o, s, r = d(), | |
a = t || "input,textarea", | |
l = e.find(a), | |
c = {}; | |
return l.each(function() { | |
(i = d(this)).is("input[type=radio]") ? (s = i.attr("name"), c[s] || (0 === e.find('input[type=radio]:checked[name="' + s + '"]').length && (o = e.find('input[type=radio][name="' + s + '"]'), r = r.add(o)), c[s] = s)) : (i.is("input[type=checkbox],input[type=radio]") ? i.is(":checked") : !!i.val()) === n && (r = r.add(i)) | |
}), !!r.length && r | |
}, | |
nonBlankInputs: function(e, t) { | |
return c.blankInputs(e, t, !0) | |
}, | |
stopEverything: function(e) { | |
return d(e.target).trigger("ujs:everythingStopped"), e.stopImmediatePropagation(), !1 | |
}, | |
disableElement: function(e) { | |
var t = e.data("disable-with"); | |
t !== l && (e.data("ujs:enable-with", e.html()), e.html(t)), e.bind("click.railsDisable", function(e) { | |
return c.stopEverything(e) | |
}), e.data("ujs:disabled", !0) | |
}, | |
enableElement: function(e) { | |
e.data("ujs:enable-with") !== l && (e.html(e.data("ujs:enable-with")), e.removeData("ujs:enable-with")), e.unbind("click.railsDisable"), e.removeData("ujs:disabled") | |
} | |
}, c.fire(e, "rails:attachBindings") && (d.ajaxPrefilter(function(e, t, n) { | |
e.crossDomain || c.CSRFProtection(n) | |
}), d(window).on("pageshow.rails", function() { | |
d(d.rails.enableSelector).each(function() { | |
var e = d(this); | |
e.data("ujs:disabled") && d.rails.enableFormElement(e) | |
}), d(d.rails.linkDisableSelector).each(function() { | |
var e = d(this); | |
e.data("ujs:disabled") && d.rails.enableElement(e) | |
}) | |
}), e.on("ajax:complete", c.linkDisableSelector, function() { | |
c.enableElement(d(this)) | |
}), e.on("ajax:complete", c.buttonDisableSelector, function() { | |
c.enableFormElement(d(this)) | |
}), e.on("click.rails", c.linkClickSelector, function(e) { | |
var t = d(this), | |
n = t.data("method"), | |
i = t.data("params"), | |
o = e.metaKey || e.ctrlKey; | |
if (!c.allowAction(t)) return c.stopEverything(e); | |
if (!o && t.is(c.linkDisableSelector) && c.disableElement(t), c.isRemote(t)) { | |
if (o && (!n || "GET" === n) && !i) return !0; | |
var s = c.handleRemote(t); | |
return !1 === s ? c.enableElement(t) : s.fail(function() { | |
c.enableElement(t) | |
}), !1 | |
} | |
return n ? (c.handleMethod(t), !1) : void 0 | |
}), e.on("click.rails", c.buttonClickSelector, function(e) { | |
var t = d(this); | |
if (!c.allowAction(t) || !c.isRemote(t)) return c.stopEverything(e); | |
t.is(c.buttonDisableSelector) && c.disableFormElement(t); | |
var n = c.handleRemote(t); | |
return !1 === n ? c.enableFormElement(t) : n.fail(function() { | |
c.enableFormElement(t) | |
}), !1 | |
}), e.on("change.rails", c.inputChangeSelector, function(e) { | |
var t = d(this); | |
return c.allowAction(t) && c.isRemote(t) ? (c.handleRemote(t), !1) : c.stopEverything(e) | |
}), e.on("submit.rails", c.formSubmitSelector, function(e) { | |
var t, n, i = d(this), | |
o = c.isRemote(i); | |
if (!c.allowAction(i)) return c.stopEverything(e); | |
if (i.attr("novalidate") === l) | |
if (i.data("ujs:formnovalidate-button") === l) { | |
if ((t = c.blankInputs(i, c.requiredInputSelector, !1)) && c.fire(i, "ajax:aborted:required", [t])) return c.stopEverything(e) | |
} else i.data("ujs:formnovalidate-button", l); | |
if (o) { | |
if (n = c.nonBlankInputs(i, c.fileInputSelector)) { | |
setTimeout(function() { | |
c.disableFormElements(i) | |
}, 13); | |
var s = c.fire(i, "ajax:aborted:file", [n]); | |
return s || setTimeout(function() { | |
c.enableFormElements(i) | |
}, 13), s | |
} | |
return c.handleRemote(i), !1 | |
} | |
setTimeout(function() { | |
c.disableFormElements(i) | |
}, 13) | |
}), e.on("click.rails", c.formInputClickSelector, function(e) { | |
var t = d(this); | |
if (!c.allowAction(t)) return c.stopEverything(e); | |
var n = t.attr("name"), | |
i = n ? { | |
name: n, | |
value: t.val() | |
} : null, | |
o = t.closest("form"); | |
0 === o.length && (o = d("#" + t.attr("form"))), o.data("ujs:submit-button", i), o.data("ujs:formnovalidate-button", t.attr("formnovalidate")), o.data("ujs:submit-button-formaction", t.attr("formaction")), o.data("ujs:submit-button-formmethod", t.attr("formmethod")) | |
}), e.on("ajax:send.rails", c.formSubmitSelector, function(e) { | |
this === e.target && c.disableFormElements(d(this)) | |
}), e.on("ajax:complete.rails", c.formSubmitSelector, function(e) { | |
this === e.target && c.enableFormElements(d(this)) | |
}), d(function() { | |
c.refreshCSRFTokens() | |
})) | |
}(jQuery), "function" != typeof Array.prototype.indexOf && (Array.prototype.indexOf = function(e, t) { | |
for (var n = t || 0, i = this.length; n < i; n += 1) | |
if (e === undefined || null === e) { | |
if (this[n] === e) return n | |
} else if (this[n] === e) return n; | |
return -1 | |
}), | |
function(l) { | |
var c = { | |
gettoaster: function() { | |
var e = l("#" + d.toaster.id); | |
return e.length < 1 && (e = l(d.toaster.template).attr("id", d.toaster.id).css(d.toaster.css).addClass(d.toaster["class"]), d.stylesheet && !l("link[href=" + d.stylesheet + "]").length && l("head").appendTo('<link rel="stylesheet" href="' + d.stylesheet + '">'), l(d.toaster.container).append(e)), e | |
}, | |
notify: function(e, t, n) { | |
var i = this.gettoaster(), | |
o = e && t ? d.toast.defaults.delimiter : "", | |
s = l(d.toast.template.replace("%priority%", n).replace("%delimiter%", o)).hide().css(d.toast.css).addClass(d.toast["class"]); | |
if (l(".title", s).css(d.toast.csst).html(e), l(".message", s).css(d.toast.cssm).html(t), d.debug && window.console && console.log(toast), i.append(d.toast.display(s)), -1 === d.donotdismiss.indexOf(n)) { | |
var r = "number" == typeof d.timeout ? d.timeout : "object" == typeof d.timeout && n in d.timeout ? d.timeout[n] : 1500; | |
setTimeout(function() { | |
d.toast.remove(s, function() { | |
s.remove() | |
}) | |
}, r) | |
} | |
} | |
}, | |
e = { | |
toaster: { | |
id: "toaster", | |
container: "body", | |
template: "<div></div>", | |
"class": "toaster", | |
css: { | |
position: "fixed", | |
top: "10px", | |
right: "10px", | |
width: "300px", | |
zIndex: 5e4 | |
} | |
}, | |
toast: { | |
template: '<div class="alert alert-%priority% alert-dismissible" role="alert"><button type="button" class="close" data-dismiss="alert"><span aria-hidden="true">×</span><span class="sr-only">Close</span></button><span class="title"></span>%delimiter% <span class="message"></span></div>', | |
defaults: { | |
title: "Notice", | |
priority: "success", | |
delimiter: ":" | |
}, | |
css: {}, | |
cssm: {}, | |
csst: { | |
fontWeight: "bold" | |
}, | |
fade: "slow", | |
display: function(e) { | |
return e.fadeIn(d.toast.fade) | |
}, | |
remove: function(e, t) { | |
return e.animate({ | |
opacity: "0", | |
padding: "0px", | |
margin: "0px", | |
height: "0px" | |
}, { | |
duration: d.toast.fade, | |
complete: t | |
}) | |
} | |
}, | |
debug: !1, | |
timeout: 1500, | |
stylesheet: null, | |
donotdismiss: [] | |
}, | |
d = {}; | |
l.extend(d, e), l.toaster = function(e) { | |
if ("object" == typeof e) "settings" in e && (d = l.extend(!0, d, e.settings)); | |
else { | |
var t = Array.prototype.slice.call(arguments, 0), | |
n = ["message", "title", "priority"]; | |
e = {}; | |
for (var i = 0, o = t.length; i < o; i += 1) e[n[i]] = t[i] | |
} | |
var s = "title" in e && "string" == typeof e.title ? e.title : d.toast.defaults.title, | |
r = "message" in e ? e.message : null, | |
a = "priority" in e && "string" == typeof e.priority ? e.priority : d.toast.defaults.priority; | |
null !== r && c.notify(s, r, a) | |
}, l.toaster.reset = function() { | |
d = {}, l.extend(d, e) | |
} | |
}(jQuery), | |
function(t, n) { | |
"function" == typeof define && define.amd ? define(["jquery"], function(e) { | |
return n(t, e) | |
}) : "object" == typeof exports ? n(t, require("jquery")) : n(t, t.jQuery) | |
}("undefined" != typeof window ? window : this, function(e, _) { | |
"use strict"; | |
function x(e, t) { | |
for (var n = e.length; --n;) | |
if (Math.round(+e[n]) !== Math.round(+t[n])) return !1; | |
return !0 | |
} | |
function n(e) { | |
var t = { | |
range: !0, | |
animate: !0 | |
}; | |
return "boolean" == typeof e ? t.animate = e : _.extend(t, e), t | |
} | |
function g(e, t, n, i, o, s, r, a, l) { | |
"array" === _.type(e) ? this.elements = [+e[0], +e[2], +e[4], +e[1], +e[3], +e[5], 0, 0, 1] : this.elements = [e, t, n, i, o, s, r || 0, a || 0, l || 1] | |
} | |
function v(e, t, n) { | |
this.elements = [e, t, n] | |
} | |
function u(e, n) { | |
if (!(this instanceof u)) return new u(e, n); | |
1 !== e.nodeType && _.error("Panzoom called on non-Element node"), _.contains(k, e) || _.error("Panzoom element must be attached to the document"); | |
var t = _.data(e, r); | |
if (t) return t; | |
this.options = n = _.extend({}, u.defaults, n), this.elem = e; | |
var i = this.$elem = _(e); | |
this.$set = n.$set && n.$set.length ? n.$set : i, this.$doc = _(e.ownerDocument || k), this.$parent = i.parent(), this.parent = this.$parent[0], this.isSVG = l.test(e.namespaceURI) && "svg" !== e.nodeName.toLowerCase(), this.panning = !1, this._buildTransform(), this._transform = _.cssProps.transform.replace(a, "-$1").toLowerCase(), this._buildTransition(), this.resetDimensions(); | |
var o = _(), | |
s = this; | |
_.each(["$zoomIn", "$zoomOut", "$zoomRange", "$reset"], function(e, t) { | |
s[t] = n[t] || o | |
}), this.enable(), this.scale = this.getMatrix()[0], this._checkPanWhenZoomed(), _.data(e, r, this) | |
} | |
var k = e.document, | |
r = "__pz__", | |
s = Array.prototype.slice, | |
t = /trident\/7./i, | |
h = function() { | |
if (t.test(navigator.userAgent)) return !1; | |
var e = k.createElement("input"); | |
return e.setAttribute("oninput", "return"), "function" == typeof e.oninput | |
}(), | |
a = /([A-Z])/g, | |
l = /^http:[\w\.\/]+svg$/, | |
i = "(\\-?\\d[\\d\\.e-]*)", | |
o = "\\,?\\s*", | |
c = new RegExp("^matrix\\(" + i + o + i + o + i + o + i + o + i + o + i + "\\)$"); | |
return g.prototype = { | |
x: function(e) { | |
var t = e instanceof v, | |
n = this.elements, | |
i = e.elements; | |
return t && 3 === i.length ? new v(n[0] * i[0] + n[1] * i[1] + n[2] * i[2], n[3] * i[0] + n[4] * i[1] + n[5] * i[2], n[6] * i[0] + n[7] * i[1] + n[8] * i[2]) : i.length === n.length && new g(n[0] * i[0] + n[1] * i[3] + n[2] * i[6], n[0] * i[1] + n[1] * i[4] + n[2] * i[7], n[0] * i[2] + n[1] * i[5] + n[2] * i[8], n[3] * i[0] + n[4] * i[3] + n[5] * i[6], n[3] * i[1] + n[4] * i[4] + n[5] * i[7], n[3] * i[2] + n[4] * i[5] + n[5] * i[8], n[6] * i[0] + n[7] * i[3] + n[8] * i[6], n[6] * i[1] + n[7] * i[4] + n[8] * i[7], n[6] * i[2] + n[7] * i[5] + n[8] * i[8]) | |
}, | |
inverse: function() { | |
var e = 1 / this.determinant(), | |
t = this.elements; | |
return new g(e * (t[8] * t[4] - t[7] * t[5]), e * -(t[8] * t[1] - t[7] * t[2]), e * (t[5] * t[1] - t[4] * t[2]), e * -(t[8] * t[3] - t[6] * t[5]), e * (t[8] * t[0] - t[6] * t[2]), e * -(t[5] * t[0] - t[3] * t[2]), e * (t[7] * t[3] - t[6] * t[4]), e * -(t[7] * t[0] - t[6] * t[1]), e * (t[4] * t[0] - t[3] * t[1])) | |
}, | |
determinant: function() { | |
var e = this.elements; | |
return e[0] * (e[8] * e[4] - e[7] * e[5]) - e[3] * (e[8] * e[1] - e[7] * e[2]) + e[6] * (e[5] * e[1] - e[4] * e[2]) | |
} | |
}, v.prototype.e = g.prototype.e = function(e) { | |
return this.elements[e] | |
}, u.rmatrix = c, u.defaults = { | |
eventNamespace: ".panzoom", | |
transition: !0, | |
cursor: "move", | |
disablePan: !1, | |
disableZoom: !1, | |
disableXAxis: !1, | |
disableYAxis: !1, | |
which: 1, | |
increment: .3, | |
linearZoom: !1, | |
panOnlyWhenZoomed: !1, | |
minScale: .3, | |
maxScale: 6, | |
rangeStep: .05, | |
duration: 200, | |
easing: "ease-in-out", | |
contain: !1 | |
}, u.prototype = { | |
constructor: u, | |
instance: function() { | |
return this | |
}, | |
enable: function() { | |
this._initStyle(), this._bind(), this.disabled = !1 | |
}, | |
disable: function() { | |
this.disabled = !0, this._resetStyle(), this._unbind() | |
}, | |
isDisabled: function() { | |
return this.disabled | |
}, | |
destroy: function() { | |
this.disable(), _.removeData(this.elem, r) | |
}, | |
resetDimensions: function() { | |
this.container = this.parent.getBoundingClientRect(); | |
var e = this.elem, | |
t = e.getBoundingClientRect(), | |
n = Math.abs(this.scale); | |
this.dimensions = { | |
width: t.width, | |
height: t.height, | |
left: _.css(e, "left", !0) || 0, | |
top: _.css(e, "top", !0) || 0, | |
border: { | |
top: _.css(e, "borderTopWidth", !0) * n || 0, | |
bottom: _.css(e, "borderBottomWidth", !0) * n || 0, | |
left: _.css(e, "borderLeftWidth", !0) * n || 0, | |
right: _.css(e, "borderRightWidth", !0) * n || 0 | |
}, | |
margin: { | |
top: _.css(e, "marginTop", !0) * n || 0, | |
left: _.css(e, "marginLeft", !0) * n || 0 | |
} | |
} | |
}, | |
reset: function(e) { | |
e = n(e); | |
var t = this.setMatrix(this._origTransform, e); | |
e.silent || this._trigger("reset", t) | |
}, | |
resetZoom: function(e) { | |
e = n(e); | |
var t = this.getMatrix(this._origTransform); | |
e.dValue = t[3], this.zoom(t[0], e) | |
}, | |
resetPan: function(e) { | |
var t = this.getMatrix(this._origTransform); | |
this.pan(t[4], t[5], n(e)) | |
}, | |
setTransform: function(e) { | |
for (var t = this.$set, n = t.length; n--;) _.style(t[n], "transform", e), this.isSVG && t[n].setAttribute("transform", e) | |
}, | |
getTransform: function(e) { | |
var t = this.$set[0]; | |
return e ? this.setTransform(e) : (e = _.style(t, "transform"), !this.isSVG || e && "none" !== e || (e = _.attr(t, "transform") || "none")), "none" === e || c.test(e) || this.setTransform(e = _.css(t, "transform")), e || "none" | |
}, | |
getMatrix: function(e) { | |
var t = c.exec(e || this.getTransform()); | |
return t && t.shift(), t || [1, 0, 0, 1, 0, 0] | |
}, | |
setMatrix: function(e, t) { | |
if (!this.disabled) { | |
t || (t = {}), "string" == typeof e && (e = this.getMatrix(e)); | |
var n = +e[0], | |
i = "undefined" != typeof t.contain ? t.contain : this.options.contain; | |
if (i) { | |
var o, s, r, a = t.dims; | |
a || (this.resetDimensions(), a = this.dimensions); | |
var l = this.container, | |
c = a.width, | |
d = a.height, | |
u = l.width, | |
h = l.height, | |
p = u / c, | |
f = h / d; | |
"center" !== this.$parent.css("textAlign") || "inline" !== _.css(this.elem, "display") ? (o = (r = (c - this.elem.offsetWidth) / 2) - a.border.left, s = c - u - r + a.border.right) : o = s = (c - u) / 2; | |
var m = (d - h) / 2 + a.border.top, | |
g = (d - h) / 2 - a.border.top - a.border.bottom; | |
e[4] = "invert" === i || "automatic" === i && p < 1.01 ? Math.max(Math.min(e[4], o - a.border.left), -s) : Math.min(Math.max(e[4], o), -s), e[5] = "invert" === i || "automatic" === i && f < 1.01 ? Math.max(Math.min(e[5], m - a.border.top), -g) : Math.min(Math.max(e[5], m), -g) | |
} | |
if ("skip" !== t.animate && this.transition(!t.animate), t.range && this.$zoomRange.val(n), this.options.disableXAxis || this.options.disableYAxis) { | |
var v = this.getMatrix(); | |
this.options.disableXAxis && (e[4] = v[4]), this.options.disableYAxis && (e[5] = v[5]) | |
} | |
return this.setTransform("matrix(" + e.join(",") + ")"), this.scale = n, this._checkPanWhenZoomed(n), t.silent || this._trigger("change", e), e | |
} | |
}, | |
isPanning: function() { | |
return this.panning | |
}, | |
transition: function(e) { | |
if (this._transition) | |
for (var t = e || !this.options.transition ? "none" : this._transition, n = this.$set, i = n.length; i--;) _.style(n[i], "transition") !== t && _.style(n[i], "transition", t) | |
}, | |
pan: function(e, t, n) { | |
if (!this.options.disablePan) { | |
n || (n = {}); | |
var i = n.matrix; | |
i || (i = this.getMatrix()), n.relative && (e += +i[4], t += +i[5]), i[4] = e, i[5] = t, this.setMatrix(i, n), n.silent || this._trigger("pan", i[4], i[5]) | |
} | |
}, | |
zoom: function(e, t) { | |
"object" == typeof e ? (t = e, e = null) : t || (t = {}); | |
var n = _.extend({}, this.options, t); | |
if (!n.disableZoom) { | |
var i = !1, | |
o = n.matrix || this.getMatrix(), | |
s = +o[0]; | |
"number" != typeof e && (e = n.linearZoom ? s + n.increment * (e ? -1 : 1) : e ? s / (1 + n.increment) : s * (1 + n.increment), i = !0), e = Math.max(Math.min(e, n.maxScale), n.minScale); | |
var r = n.focal; | |
if (r && !n.disablePan) { | |
this.resetDimensions(); | |
var a = n.dims = this.dimensions, | |
l = r.clientX, | |
c = r.clientY; | |
this.isSVG || (l -= a.width / s / 2, c -= a.height / s / 2); | |
var d = new v(l, c, 1), | |
u = new g(o), | |
h = this.parentOffset || this.$parent.offset(), | |
p = new g(1, 0, h.left - this.$doc.scrollLeft(), 0, 1, h.top - this.$doc.scrollTop()), | |
f = u.inverse().x(p.inverse().x(d)), | |
m = e / o[0]; | |
u = u.x(new g([m, 0, 0, m, 0, 0])), d = p.x(u.x(f)), o[4] = +o[4] + (l - d.e(0)), o[5] = +o[5] + (c - d.e(1)) | |
} | |
o[0] = e, o[3] = "number" == typeof n.dValue ? n.dValue : e, this.setMatrix(o, { | |
animate: "undefined" != typeof n.animate ? n.animate : i, | |
range: !n.noSetRange | |
}), n.silent || this._trigger("zoom", o[0], n) | |
} | |
}, | |
option: function(e, t) { | |
var n; | |
if (!e) return _.extend({}, this.options); | |
if ("string" == typeof e) { | |
if (1 === arguments.length) return this.options[e] !== undefined ? this.options[e] : null; | |
(n = {})[e] = t | |
} else n = e; | |
this._setOptions(n) | |
}, | |
_setOptions: function(e) { | |
_.each(e, _.proxy(function(e, t) { | |
switch (e) { | |
case "disablePan": | |
this._resetStyle(); | |
case "$zoomIn": | |
case "$zoomOut": | |
case "$zoomRange": | |
case "$reset": | |
case "disableZoom": | |
case "onStart": | |
case "onChange": | |
case "onZoom": | |
case "onPan": | |
case "onEnd": | |
case "onReset": | |
case "eventNamespace": | |
this._unbind() | |
} | |
switch (this.options[e] = t, e) { | |
case "disablePan": | |
this._initStyle(); | |
case "$zoomIn": | |
case "$zoomOut": | |
case "$zoomRange": | |
case "$reset": | |
this[e] = t; | |
case "disableZoom": | |
case "onStart": | |
case "onChange": | |
case "onZoom": | |
case "onPan": | |
case "onEnd": | |
case "onReset": | |
case "eventNamespace": | |
this._bind(); | |
break; | |
case "cursor": | |
_.style(this.elem, "cursor", t); | |
break; | |
case "minScale": | |
this.$zoomRange.attr("min", t); | |
break; | |
case "maxScale": | |
this.$zoomRange.attr("max", t); | |
break; | |
case "rangeStep": | |
this.$zoomRange.attr("step", t); | |
break; | |
case "startTransform": | |
this._buildTransform(); | |
break; | |
case "duration": | |
case "easing": | |
this._buildTransition(); | |
case "transition": | |
this.transition(); | |
break; | |
case "panOnlyWhenZoomed": | |
this._checkPanWhenZoomed(); | |
break; | |
case "$set": | |
t instanceof _ && t.length && (this.$set = t, this._initStyle(), this._buildTransform()) | |
} | |
}, this)) | |
}, | |
_checkPanWhenZoomed: function(e) { | |
var t = this.options; | |
if (t.panOnlyWhenZoomed) { | |
e || (e = this.getMatrix()[0]); | |
var n = e <= t.minScale; | |
t.disablePan !== n && this.option("disablePan", n) | |
} | |
}, | |
_initStyle: function() { | |
var e = { | |
"transform-origin": this.isSVG ? "0 0" : "50% 50%" | |
}; | |
this.options.disablePan || (e.cursor = this.options.cursor), this.$set.css(e); | |
var t = this.$parent; | |
t.length && !_.nodeName(this.parent, "body") && (e = { | |
overflow: "hidden" | |
}, "static" === t.css("position") && (e.position = "relative"), t.css(e)) | |
}, | |
_resetStyle: function() { | |
this.$elem.css({ | |
cursor: "", | |
transition: "" | |
}), this.$parent.css({ | |
overflow: "", | |
position: "" | |
}) | |
}, | |
_bind: function() { | |
var n = this, | |
i = this.options, | |
t = i.eventNamespace, | |
e = "mousedown" + t + " pointerdown" + t + " MSPointerDown" + t, | |
o = "touchstart" + t + " " + e, | |
s = "touchend" + t + " click" + t + " pointerup" + t + " MSPointerUp" + t, | |
r = {}, | |
a = this.$reset, | |
l = this.$zoomRange; | |
if (_.each(["Start", "Change", "Zoom", "Pan", "End", "Reset"], function() { | |
var e = i["on" + this]; | |
_.isFunction(e) && (r["panzoom" + this.toLowerCase() + t] = e) | |
}), i.disablePan && i.disableZoom || (r[o] = function(e) { | |
var t; | |
("touchstart" === e.type ? !(t = e.touches || e.originalEvent.touches) || (1 !== t.length || i.disablePan) && 2 !== t.length : i.disablePan || (e.which || e.originalEvent.which) !== i.which) || (e.preventDefault(), e.stopPropagation(), n._startMove(e, t)) | |
}, 3 === i.which && (r.contextmenu = !1)), this.$elem.on(r), a.length && a.on(s, function(e) { | |
e.preventDefault(), n.reset() | |
}), l.length && l.attr({ | |
step: i.rangeStep === u.defaults.rangeStep && l.attr("step") || i.rangeStep, | |
min: i.minScale, | |
max: i.maxScale | |
}).prop({ | |
value: this.getMatrix()[0] | |
}), !i.disableZoom) { | |
var c = this.$zoomIn, | |
d = this.$zoomOut; | |
c.length && d.length && (c.on(s, function(e) { | |
e.preventDefault(), n.zoom() | |
}), d.on(s, function(e) { | |
e.preventDefault(), n.zoom(!0) | |
})), l.length && ((r = {})[e] = function() { | |
n.transition(!0) | |
}, r[(h ? "input" : "change") + t] = function() { | |
n.zoom(+this.value, { | |
noSetRange: !0 | |
}) | |
}, l.on(r)) | |
} | |
}, | |
_unbind: function() { | |
this.$elem.add(this.$zoomIn).add(this.$zoomOut).add(this.$reset).off(this.options.eventNamespace) | |
}, | |
_buildTransform: function() { | |
return this._origTransform = this.getTransform(this.options.startTransform) | |
}, | |
_buildTransition: function() { | |
if (this._transform) { | |
var e = this.options; | |
this._transition = this._transform + " " + e.duration + "ms " + e.easing | |
} | |
}, | |
_getDistance: function(e) { | |
var t = e[0], | |
n = e[1]; | |
return Math.sqrt(Math.pow(Math.abs(n.clientX - t.clientX), 2) + Math.pow(Math.abs(n.clientY - t.clientY), 2)) | |
}, | |
_getMiddle: function(e) { | |
var t = e[0], | |
n = e[1]; | |
return { | |
clientX: (n.clientX - t.clientX) / 2 + t.clientX, | |
clientY: (n.clientY - t.clientY) / 2 + t.clientY | |
} | |
}, | |
_trigger: function(e) { | |
"string" == typeof e && (e = "panzoom" + e), this.$elem.triggerHandler(e, [this].concat(s.call(arguments, 1))) | |
}, | |
_startMove: function(e, o) { | |
if (!this.panning) { | |
var t, n, s, r, a, l, c, i, d = this, | |
u = this.options, | |
h = u.eventNamespace, | |
p = this.getMatrix(), | |
f = p.slice(0), | |
m = +f[4], | |
g = +f[5], | |
v = { | |
matrix: p, | |
animate: "skip" | |
}, | |
y = e.type; | |
"pointerdown" === y ? (t = "pointermove", n = "pointerup") : "touchstart" === y ? (t = "touchmove", n = "touchend") : "MSPointerDown" === y ? (t = "MSPointerMove", n = "MSPointerUp") : (t = "mousemove", n = "mouseup"), t += h, n += h, this.transition(!0), this._trigger("start", e, o); | |
var b = function(e, t) { | |
if (t) { | |
if (2 === t.length) { | |
if (null != s) return; | |
return s = d._getDistance(t), r = +p[0], void(a = d._getMiddle(t)) | |
} | |
if (null != l) return; | |
(i = t[0]) && (l = i.pageX, c = i.pageY) | |
} | |
null == l && (l = e.pageX, c = e.pageY) | |
}; | |
b(e, o); | |
var w = function(e) { | |
var t; | |
if (e.preventDefault(), o = e.touches || e.originalEvent.touches, b(e, o), o) { | |
if (2 === o.length) { | |
var n = d._getMiddle(o), | |
i = d._getDistance(o) - s; | |
return d.zoom(i * (u.increment / 100) + r, { | |
focal: n, | |
matrix: p, | |
animate: "skip" | |
}), d.pan(+p[4] + n.clientX - a.clientX, +p[5] + n.clientY - a.clientY, v), void(a = n) | |
} | |
t = o[0] || { | |
pageX: 0, | |
pageY: 0 | |
} | |
} | |
t || (t = e), d.pan(m + t.pageX - l, g + t.pageY - c, v) | |
}; | |
_(k).off(h).on(t, w).on(n, function(e) { | |
e.preventDefault(), _(this).off(h), d.panning = !1, e.type = "panzoomend", d._trigger(e, p, !x(p, f)) | |
}) | |
} | |
} | |
}, _.Panzoom = u, _.fn.panzoom = function(e) { | |
var t, n, i, o; | |
return "string" == typeof e ? (o = [], n = s.call(arguments, 1), this.each(function() { | |
(t = _.data(this, r)) ? "_" !== e.charAt(0) && "function" == typeof(i = t[e]) && (i = i.apply(t, n)) !== undefined && o.push(i): o.push(undefined) | |
}), o.length ? 1 === o.length ? o[0] : o : this) : this.each(function() { | |
new u(this, e) | |
}) | |
}, u | |
}), | |
function(e, t) { | |
"object" == typeof exports && "object" == typeof module ? module.exports = t() : "function" == typeof define && define.amd ? define([], t) : "object" == typeof exports ? exports.VueStrap = t() : e.VueStrap = t() | |
}(this, function() { | |
return function(n) { | |
function i(e) { | |
if (o[e]) return o[e].exports; | |
var t = o[e] = { | |
exports: {}, | |
id: e, | |
loaded: !1 | |
}; | |
return n[e].call(t.exports, t, t.exports, i), t.loaded = !0, t.exports | |
} | |
var o = {}; | |
return i.m = n, i.c = o, i.p = "", i(0) | |
}([function(e, t, n) { | |
"use strict"; | |
function i(e) { | |
return e && e.__esModule ? e : { | |
"default": e | |
} | |
} | |
var o = i(n(26)), | |
s = i(n(94)), | |
r = i(n(98)), | |
a = i(n(102)), | |
l = i(n(109)), | |
c = i(n(115)), | |
d = i(n(118)), | |
u = i(n(123)), | |
h = i(n(128)), | |
p = i(n(134)), | |
f = i(n(139)), | |
m = i(n(144)), | |
g = i(n(153)), | |
v = i(n(156)), | |
y = i(n(161)), | |
b = i(n(166)), | |
w = i(n(172)), | |
_ = i(n(175)), | |
x = i(n(180)), | |
k = i(n(201)), | |
C = i(n(204)), | |
S = i(n(209)), | |
T = i(n(212)), | |
$ = i(n(217)), | |
D = i(n(222)), | |
A = i(n(227)), | |
E = { | |
$: o["default"], | |
accordion: s["default"], | |
affix: r["default"], | |
alert: a["default"], | |
aside: l["default"], | |
buttonGroup: c["default"], | |
carousel: d["default"], | |
checkbox: u["default"], | |
datepicker: h["default"], | |
dropdown: p["default"], | |
input: f["default"], | |
modal: m["default"], | |
navbar: g["default"], | |
option: v["default"], | |
panel: y["default"], | |
popover: b["default"], | |
progressbar: w["default"], | |
radio: _["default"], | |
select: x["default"], | |
slider: k["default"], | |
spinner: C["default"], | |
tab: S["default"], | |
tabGroup: T["default"], | |
tabset: $["default"], | |
tooltip: D["default"], | |
typeahead: A["default"] | |
}; | |
e.exports = E | |
}, , , , , , , , , , , , , , , , , , , , , , , , , , function(e, t, n) { | |
"use strict"; | |
function i(e) { | |
return e && e.__esModule ? e : { | |
"default": e | |
} | |
} | |
function h(e, t) { | |
var n = [], | |
i = !0, | |
o = !1, | |
s = void 0; | |
try { | |
for (var r, a = (0, W["default"])(e); !(i = (r = a.next()).done); i = !0) { | |
var l = r.value; | |
if (l instanceof Node || null === l) ~n.indexOf(l) || n.push(l); | |
else { | |
if (!(l instanceof window.NodeList || l instanceof g || l instanceof HTMLCollection || l instanceof Array)) return e.get = b.get, e.set = b.set, e.call = b.call, e.owner = t, e; | |
var c = !0, | |
d = !1, | |
u = void 0; | |
try { | |
for (var h, p = (0, W["default"])(l); !(c = (h = p.next()).done); c = !0) { | |
var f = h.value; | |
n.push(f) | |
} | |
} catch (B) { | |
d = !0, u = B | |
} finally { | |
try { | |
!c && p["return"] && p["return"]() | |
} finally { | |
if (d) throw u | |
} | |
} | |
} | |
} | |
} catch (B) { | |
o = !0, s = B | |
} finally { | |
try { | |
!i && a["return"] && a["return"]() | |
} finally { | |
if (o) throw s | |
} | |
} | |
return new g([n, t]) | |
} | |
function o(l) { | |
var c = this, | |
d = arguments; | |
w[l] instanceof Function ? b[l] = function() { | |
var e = [], | |
t = !0, | |
n = !0, | |
i = !1, | |
o = void 0; | |
try { | |
for (var s, r = (0, W["default"])(b); !(n = (s = r.next()).done); n = !0) { | |
var a = s.value; | |
a && a[l] instanceof Function ? (a = a[l].apply(a, d), e.push(a), t && void 0 !== a && (t = !1)) : e.push(void 0) | |
} | |
} catch (p) { | |
i = !0, o = p | |
} finally { | |
try { | |
!n && r["return"] && r["return"]() | |
} finally { | |
if (i) throw o | |
} | |
} | |
return t ? c : h(e, c) | |
} : (0, f["default"])(b, l, { | |
get: function() { | |
var e = [], | |
t = !0, | |
n = !1, | |
i = void 0; | |
try { | |
for (var o, s = (0, W["default"])(this); !(t = (o = s.next()).done); t = !0) { | |
var r = o.value; | |
null !== r && (r = r[l]), e.push(r) | |
} | |
} catch (u) { | |
n = !0, i = u | |
} finally { | |
try { | |
!t && s["return"] && s["return"]() | |
} finally { | |
if (n) throw i | |
} | |
} | |
return h(e, this) | |
}, | |
set: function(e) { | |
var t = !0, | |
n = !1, | |
i = void 0; | |
try { | |
for (var o, s = (0, W["default"])(this); !(t = (o = s.next()).done); t = !0) { | |
var r = o.value; | |
r && l in r && (r[l] = e) | |
} | |
} catch (f) { | |
n = !0, i = f | |
} finally { | |
try { | |
!t && s["return"] && s["return"]() | |
} finally { | |
if (n) throw i | |
} | |
} | |
} | |
}) | |
} | |
function r() { | |
return new g(arguments) | |
} | |
Object.defineProperty(t, "__esModule", { | |
value: !0 | |
}); | |
var a = n(27), | |
f = i(a), | |
u = n(45), | |
l = i(u), | |
p = i(n(81)), | |
m = n(87), | |
W = i(m), | |
B = i(n(92)), | |
v = i(n(93)), | |
y = Array.prototype, | |
c = new Error("Passed arguments must be of Node"), | |
s = void 0, | |
d = [], | |
U = [], | |
g = function() { | |
function g(e) { | |
(0, B["default"])(this, g); | |
var t = e; | |
if (e[0] === window ? t = [window] : "string" == typeof e[0] ? (t = (e[1] || document).querySelectorAll(e[0]), e[1] && (this.owner = e[1])) : 0 in e && !(e[0] instanceof Node) && e[0] && "length" in e[0] && (t = e[0], e[1] && (this.owner = e[1])), t) { | |
for (var n in t) this[n] = t[n]; | |
this.length = t.length | |
} else this.length = 0 | |
} | |
return (0, v["default"])(g, [{ | |
key: "concat", | |
value: function() { | |
function a(e) { | |
var t = !0, | |
n = !1, | |
i = void 0; | |
try { | |
for (var o, s = (0, W["default"])(e); !(t = (o = s.next()).done); t = !0) { | |
var r = o.value; | |
r instanceof Node ? ~l.indexOf(r) || l.push(r) : r && a(r) | |
} | |
} catch (u) { | |
n = !0, i = u | |
} finally { | |
try { | |
!t && s["return"] && s["return"]() | |
} finally { | |
if (n) throw i | |
} | |
} | |
} | |
var l = y.slice.call(this), | |
e = !0, | |
t = !1, | |
n = void 0; | |
try { | |
for (var i, o = (0, W["default"])(arguments); !(e = (i = o.next()).done); e = !0) { | |
var s = i.value; | |
if (s instanceof Node) ~l.indexOf(s) || l.push(s); | |
else { | |
if (!(s instanceof window.NodeList || s instanceof g || s instanceof HTMLCollection || s instanceof Array)) throw Error("Concat arguments must be of a Node, NodeList, HTMLCollection, or Array of (Node, NodeList, HTMLCollection, Array)"); | |
a(s) | |
} | |
} | |
} catch (u) { | |
t = !0, n = u | |
} finally { | |
try { | |
!e && o["return"] && o["return"]() | |
} finally { | |
if (t) throw n | |
} | |
} | |
return new g([l, this]) | |
} | |
}, { | |
key: "each", | |
value: function() { | |
return y.forEach.apply(this, arguments), this | |
} | |
}, { | |
key: "parent", | |
value: function() { | |
return this.map(function(e) { | |
return e.parentNode | |
}) | |
} | |
}, { | |
key: "filter", | |
value: function() { | |
return new g([y.filter.apply(this, arguments), this]) | |
} | |
}, { | |
key: "find", | |
value: function(e) { | |
var t = [], | |
n = !0, | |
i = !1, | |
o = void 0; | |
try { | |
for (var s, r = (0, W["default"])(h(this)); !(n = (s = r.next()).done); n = !0) { | |
var a = s.value.querySelectorAll(e); | |
a && a.length && t.push(a) | |
} | |
} catch (l) { | |
i = !0, o = l | |
} finally { | |
try { | |
!n && r["return"] && r["return"]() | |
} finally { | |
if (i) throw o | |
} | |
} | |
return h(t, this.owner) | |
} | |
}, { | |
key: "findChildren", | |
value: function(e) { | |
var t = this; | |
return this.find(e).filter(function(e) { | |
return t.includes(e.parentElement) | |
}) | |
} | |
}, { | |
key: "forEach", | |
value: function() { | |
return y.forEach.apply(this, arguments), this | |
} | |
}, { | |
key: "includes", | |
value: function(e, t) { | |
return ~this.indexOf(e, t) | |
} | |
}, { | |
key: "map", | |
value: function() { | |
for (var e = arguments.length, t = Array(e), n = 0; n < e; n++) t[n] = arguments[n]; | |
return h(y.map.apply(this, t), this) | |
} | |
}, { | |
key: "pop", | |
value: function e(t) { | |
"number" != typeof t && (t = 1); | |
for (var n = [], e = y.pop.bind(this); t--;) n.push(e()); | |
return new g([n, this]) | |
} | |
}, { | |
key: "push", | |
value: function() { | |
var e = !0, | |
t = !1, | |
n = void 0; | |
try { | |
for (var i, o = (0, W["default"])(arguments); !(e = (i = o.next()).done); e = !0) { | |
var s = i.value; | |
if (!(s instanceof Node)) throw c; | |
~this.indexOf(s) || y.push.call(this, s) | |
} | |
} catch (r) { | |
t = !0, n = r | |
} finally { | |
try { | |
!e && o["return"] && o["return"]() | |
} finally { | |
if (t) throw n | |
} | |
} | |
return this | |
} | |
}, { | |
key: "delete", | |
value: function() { | |
for (var e = (new g([ | |
[], this.owner | |
]), this.length - 1), t = this[e]; t; t = this[--e]) t.remove ? (t.remove(), y.splice.call(this, e, 1)) : t.parentNode && (t.parentNode.removeChild(t), y.splice.call(this, e, 1)); | |
return this | |
} | |
}, { | |
key: "shift", | |
value: function e(t) { | |
"number" != typeof t && (t = 1); | |
for (var n = [], e = y.shift.bind(this); t--;) n.push(e()); | |
return new g([n, this]) | |
} | |
}, { | |
key: "slice", | |
value: function() { | |
return new g([y.slice.apply(this, arguments), this]) | |
} | |
}, { | |
key: "splice", | |
value: function() { | |
for (var e = 2, t = arguments.length; e < t; e++) | |
if (!(arguments[e] instanceof Node)) throw c; | |
return new g([y.splice.apply(this, arguments), this]) | |
} | |
}, { | |
key: "unshift", | |
value: function e() { | |
var e = y.unshift.bind(this), | |
t = !0, | |
n = !1, | |
i = void 0; | |
try { | |
for (var o, s = (0, W["default"])(arguments); !(t = (o = s.next()).done); t = !0) { | |
var r = o.value; | |
if (!(r instanceof Node)) throw c; | |
~this.indexOf(r) || e(r) | |
} | |
} catch (a) { | |
n = !0, i = a | |
} finally { | |
try { | |
!t && s["return"] && s["return"]() | |
} finally { | |
if (n) throw i | |
} | |
} | |
return this | |
} | |
}, { | |
key: "addClass", | |
value: function(e) { | |
return this.toggleClass(e, !0) | |
} | |
}, { | |
key: "removeClass", | |
value: function(e) { | |
return this.toggleClass(e, !1) | |
} | |
}, { | |
key: "toggleClass", | |
value: function(e, t) { | |
var n = this, | |
i = null == t ? "toggle" : t ? "add" : "remove"; | |
return "string" == typeof e && (e = e.trim().replace(/\s+/, " ").split(" ")), e.forEach(function(t) { | |
return n.each(function(e) { | |
return e.classList[i](t) | |
}) | |
}), this | |
} | |
}, { | |
key: "get", | |
value: function(e) { | |
var t = [], | |
n = !0, | |
i = !1, | |
o = void 0; | |
try { | |
for (var s, r = (0, W["default"])(this); !(n = (s = r.next()).done); n = !0) { | |
var a = s.value; | |
null !== a && (a = a[e]), t.push(a) | |
} | |
} catch (u) { | |
i = !0, o = u | |
} finally { | |
try { | |
!n && r["return"] && r["return"]() | |
} finally { | |
if (i) throw o | |
} | |
} | |
return h(t, this) | |
} | |
}, { | |
key: "set", | |
value: function(e, t) { | |
if (e.constructor === Object) { | |
var n = !0, | |
i = !1, | |
o = void 0; | |
try { | |
for (var s, r = (0, W["default"])(this); !(n = (s = r.next()).done); n = !0) { | |
var a = s.value; | |
if (a) | |
for (key in e) key in a && (a[key] = e[key]) | |
} | |
} catch (f) { | |
i = !0, o = f | |
} finally { | |
try { | |
!n && r["return"] && r["return"]() | |
} finally { | |
if (i) throw o | |
} | |
} | |
} else { | |
var l = !0, | |
c = !1, | |
d = void 0; | |
try { | |
for (var u, h = (0, W["default"])(this); !(l = (u = h.next()).done); l = !0) { | |
var p = u.value; | |
e in p && (p[e] = t) | |
} | |
} catch (f) { | |
c = !0, d = f | |
} finally { | |
try { | |
!l && h["return"] && h["return"]() | |
} finally { | |
if (c) throw d | |
} | |
} | |
} | |
return this | |
} | |
}, { | |
key: "call", | |
value: function() { | |
for (var e = arguments.length, t = Array(e), n = 0; n < e; n++) t[n] = arguments[n]; | |
var i = y.shift.call(t), | |
o = [], | |
s = !0, | |
r = !0, | |
a = !1, | |
l = void 0; | |
try { | |
for (var c, d = (0, W["default"])(this); !(r = (c = d.next()).done); r = !0) { | |
var u = c.value; | |
u && u[i] instanceof Function ? (u = u[i].apply(u, t), o.push(u), s && void 0 !== u && (s = !1)) : o.push(void 0) | |
} | |
} catch (m) { | |
a = !0, l = m | |
} finally { | |
try { | |
!r && d["return"] && d["return"]() | |
} finally { | |
if (a) throw l | |
} | |
} | |
return s ? this : h(o, this) | |
} | |
}, { | |
key: "item", | |
value: function(e) { | |
return new g([ | |
[this[e]], this | |
]) | |
} | |
}, { | |
key: "on", | |
value: function(e, t, n) { | |
if ("string" == typeof e && (e = e.trim().replace(/\s+/, " ").split(" ")), !this || !this.length) return this; | |
if (void 0 === n && (n = t, t = null), !n) return this; | |
var i = n; | |
n = t ? function(n) { | |
var e = new g([t, this]); | |
e.length && e.some(function(e) { | |
var t = e.contains(n.target); | |
return t && i.call(e, n, e), t | |
}) | |
} : function(e) { | |
i.apply(this, [e, this]) | |
}; | |
var o = !0, | |
s = !1, | |
r = void 0; | |
try { | |
for (var a, l = (0, W["default"])(e); !(o = (a = l.next()).done); o = !0) { | |
var c = a.value, | |
d = !0, | |
u = !1, | |
h = void 0; | |
try { | |
for (var p, f = (0, W["default"])(this); !(d = (p = f.next()).done); d = !0) { | |
var m = p.value; | |
m.addEventListener(c, n, !1), U.push({ | |
el: m, | |
event: c, | |
callback: n | |
}) | |
} | |
} catch (v) { | |
u = !0, h = v | |
} finally { | |
try { | |
!d && f["return"] && f["return"]() | |
} finally { | |
if (u) throw h | |
} | |
} | |
} | |
} catch (v) { | |
s = !0, r = v | |
} finally { | |
try { | |
!o && l["return"] && l["return"]() | |
} finally { | |
if (s) throw r | |
} | |
} | |
return this | |
} | |
}, { | |
key: "off", | |
value: function(e, t) { | |
if (e instanceof Function && (t = e, e = null), "string" == typeof e && t instanceof Function) { | |
var n = !0, | |
i = !1, | |
o = void 0; | |
try { | |
for (var s, r = (0, W["default"])(this); !(n = (s = r.next()).done); n = !0) { | |
var a = s.value; | |
for (var l in U) { | |
var c = !0, | |
d = !1, | |
u = void 0; | |
try { | |
for (var h, p = (0, W["default"])(e.split(" ")); !(c = (h = p.next()).done); c = !0) { | |
var f = h.value; | |
U[l] && U[l].el === a && U[l].event === f && U[l].callback === t && (U[l].el.removeEventListener(U[l].event, U[l].callback), delete U[l]) | |
} | |
} catch (B) { | |
d = !0, u = B | |
} finally { | |
try { | |
!c && p["return"] && p["return"]() | |
} finally { | |
if (d) throw u | |
} | |
} | |
} | |
} | |
} catch (B) { | |
i = !0, o = B | |
} finally { | |
try { | |
!n && r["return"] && r["return"]() | |
} finally { | |
if (i) throw o | |
} | |
} | |
} else if ("string" == typeof e) { | |
var m = !0, | |
g = !1, | |
v = void 0; | |
try { | |
for (var y, b = (0, W["default"])(this); !(m = (y = b.next()).done); m = !0) { | |
var w = y.value; | |
for (var _ in U) { | |
var x = !0, | |
k = !1, | |
C = void 0; | |
try { | |
for (var S, T = (0, W["default"])(e.split(" ")); !(x = (S = T.next()).done); x = !0) { | |
var $ = S.value; | |
U[_] && U[_].el === w && U[_].event === $ && (U[_].el.removeEventListener(U[_].event, U[_].callback), delete U[_]) | |
} | |
} catch (B) { | |
k = !0, C = B | |
} finally { | |
try { | |
!x && T["return"] && T["return"]() | |
} finally { | |
if (k) throw C | |
} | |
} | |
} | |
} | |
} catch (B) { | |
g = !0, v = B | |
} finally { | |
try { | |
!m && b["return"] && b["return"]() | |
} finally { | |
if (g) throw v | |
} | |
} | |
} else if (t instanceof Function) { | |
var D = !0, | |
A = !1, | |
E = void 0; | |
try { | |
for (var O, M = (0, W["default"])(this); !(D = (O = M.next()).done); D = !0) { | |
var P = O.value; | |
for (var L in U) U[L] && U[L].el === P && U[L].callback === t && (U[L].el.removeEventListener(U[L].event, U[L].callback), delete U[L]) | |
} | |
} catch (B) { | |
A = !0, E = B | |
} finally { | |
try { | |
!D && M["return"] && M["return"]() | |
} finally { | |
if (A) throw E | |
} | |
} | |
} else { | |
var I = !0, | |
R = !1, | |
N = void 0; | |
try { | |
for (var z, j = (0, W["default"])(this); !(I = (z = j.next()).done); I = !0) { | |
var F = z.value; | |
for (var H in U) U[H] && U[H].el === F && (U[H].el.removeEventListener(U[H].event, U[H].callback), delete U[H]) | |
} | |
} catch (B) { | |
R = !0, N = B | |
} finally { | |
try { | |
!I && j["return"] && j["return"]() | |
} finally { | |
if (R) throw N | |
} | |
} | |
} | |
return U = U.filter(function(e) { | |
return void 0 !== e | |
}), this | |
} | |
}, { | |
key: "onBlur", | |
value: function(t) { | |
return this && this.length && t && (this.each(function(e) { | |
d.push({ | |
el: e, | |
callback: t | |
}) | |
}), s || (s = function(e) { | |
var t = !0, | |
n = !1, | |
i = void 0; | |
try { | |
for (var o, s = (0, W["default"])(d); !(t = (o = s.next()).done); t = !0) { | |
var r = o.value; | |
r.el.contains(e.target) || r.el === e.target || r.callback.call(r.el, e, r.el) | |
} | |
} catch (f) { | |
n = !0, i = f | |
} finally { | |
try { | |
!t && s["return"] && s["return"]() | |
} finally { | |
if (n) throw i | |
} | |
} | |
}, document.addEventListener("click", s, !1), document.addEventListener("touchstart", s, !1))), this | |
} | |
}, { | |
key: "offBlur", | |
value: function(n) { | |
return this.each(function(e) { | |
for (var t in d) !d[t] || d[t].el !== e || n && d[t].callback !== n || delete d[t] | |
}), d = d.filter(function(e) { | |
return void 0 !== e | |
}), this | |
} | |
}, { | |
key: "asArray", | |
get: function() { | |
return y.slice.call(this) | |
} | |
}]), g | |
}(), | |
b = g.prototype; | |
(0, p["default"])(y).forEach(function(e) { | |
"join" !== e && "copyWithin" !== e && "fill" !== e && void 0 === b[e] && (b[e] = y[e]) | |
}), window.Symbol && l["default"] && (b[l["default"]] = b.values = y[l["default"]]); | |
var w = document.createElement("div"); | |
for (var _ in w) o(_); | |
window.NL = r, t["default"] = r | |
}, function(e, t, n) { | |
e.exports = { | |
"default": n(28), | |
__esModule: !0 | |
} | |
}, function(e, t, n) { | |
n(29); | |
var i = n(32).Object; | |
e.exports = function(e, t, n) { | |
return i.defineProperty(e, t, n) | |
} | |
}, function(e, t, n) { | |
var i = n(30); | |
i(i.S + i.F * !n(40), "Object", { | |
defineProperty: n(36).f | |
}) | |
}, function(e, t, n) { | |
var m = n(31), | |
g = n(32), | |
v = n(33), | |
y = n(35), | |
b = "prototype", | |
w = function(e, t, n) { | |
var i, o, s, r = e & w.F, | |
a = e & w.G, | |
l = e & w.S, | |
c = e & w.P, | |
d = e & w.B, | |
u = e & w.W, | |
h = a ? g : g[t] || (g[t] = {}), | |
p = h[b], | |
f = a ? m : l ? m[t] : (m[t] || {})[b]; | |
for (i in a && (n = t), n)(o = !r && f && void 0 !== f[i]) && i in h || (s = o ? f[i] : n[i], h[i] = a && "function" != typeof f[i] ? n[i] : d && o ? v(s, m) : u && f[i] == s ? function(i) { | |
var e = function(e, t, n) { | |
if (this instanceof i) { | |
switch (arguments.length) { | |
case 0: | |
return new i; | |
case 1: | |
return new i(e); | |
case 2: | |
return new i(e, t) | |
} | |
return new i(e, t, n) | |
} | |
return i.apply(this, arguments) | |
}; | |
return e[b] = i[b], e | |
}(s) : c && "function" == typeof s ? v(Function.call, s) : s, c && ((h.virtual || (h.virtual = {}))[i] = s, e & w.R && p && !p[i] && y(p, i, s))) | |
}; | |
w.F = 1, w.G = 2, w.S = 4, w.P = 8, w.B = 16, w.W = 32, w.U = 64, w.R = 128, e.exports = w | |
}, function(e) { | |
var t = e.exports = "undefined" != typeof window && window.Math == Math ? window : "undefined" != typeof self && self.Math == Math ? self : Function("return this")(); | |
"number" == typeof __g && (__g = t) | |
}, function(e) { | |
var t = e.exports = { | |
version: "2.4.0" | |
}; | |
"number" == typeof __e && (__e = t) | |
}, function(e, t, n) { | |
var s = n(34); | |
e.exports = function(i, o, e) { | |
if (s(i), void 0 === o) return i; | |
switch (e) { | |
case 1: | |
return function(e) { | |
return i.call(o, e) | |
}; | |
case 2: | |
return function(e, t) { | |
return i.call(o, e, t) | |
}; | |
case 3: | |
return function(e, t, n) { | |
return i.call(o, e, t, n) | |
} | |
} | |
return function() { | |
return i.apply(o, arguments) | |
} | |
} | |
}, function(e) { | |
e.exports = function(e) { | |
if ("function" != typeof e) throw TypeError(e + " is not a function!"); | |
return e | |
} | |
}, function(e, t, n) { | |
var i = n(36), | |
o = n(44); | |
e.exports = n(40) ? function(e, t, n) { | |
return i.f(e, t, o(1, n)) | |
} : function(e, t, n) { | |
return e[t] = n, e | |
} | |
}, function(e, t, n) { | |
var o = n(37), | |
s = n(39), | |
r = n(43), | |
a = Object.defineProperty; | |
t.f = n(40) ? Object.defineProperty : function(e, t, n) { | |
if (o(e), t = r(t, !0), o(n), s) try { | |
return a(e, t, n) | |
} catch (i) {} | |
if ("get" in n || "set" in n) throw TypeError("Accessors not supported!"); | |
return "value" in n && (e[t] = n.value), e | |
} | |
}, function(e, t, n) { | |
var i = n(38); | |
e.exports = function(e) { | |
if (!i(e)) throw TypeError(e + " is not an object!"); | |
return e | |
} | |
}, function(e) { | |
e.exports = function(e) { | |
return "object" == typeof e ? null !== e : "function" == typeof e | |
} | |
}, function(e, t, n) { | |
e.exports = !n(40) && !n(41)(function() { | |
return 7 != Object.defineProperty(n(42)("div"), "a", { | |
get: function() { | |
return 7 | |
} | |
}).a | |
}) | |
}, function(e, t, n) { | |
e.exports = !n(41)(function() { | |
return 7 != Object.defineProperty({}, "a", { | |
get: function() { | |
return 7 | |
} | |
}).a | |
}) | |
}, function(e) { | |
e.exports = function(e) { | |
try { | |
return !!e() | |
} catch (t) { | |
return !0 | |
} | |
} | |
}, function(e, t, n) { | |
var i = n(38), | |
o = n(31).document, | |
s = i(o) && i(o.createElement); | |
e.exports = function(e) { | |
return s ? o.createElement(e) : {} | |
} | |
}, function(e, t, n) { | |
var o = n(38); | |
e.exports = function(e, t) { | |
if (!o(e)) return e; | |
var n, i; | |
if (t && "function" == typeof(n = e.toString) && !o(i = n.call(e))) return i; | |
if ("function" == typeof(n = e.valueOf) && !o(i = n.call(e))) return i; | |
if (!t && "function" == typeof(n = e.toString) && !o(i = n.call(e))) return i; | |
throw TypeError("Can't convert object to primitive value") | |
} | |
}, function(e) { | |
e.exports = function(e, t) { | |
return { | |
enumerable: !(1 & e), | |
configurable: !(2 & e), | |
writable: !(4 & e), | |
value: t | |
} | |
} | |
}, function(e, t, n) { | |
e.exports = { | |
"default": n(46), | |
__esModule: !0 | |
} | |
}, function(e, t, n) { | |
n(47), n(76), e.exports = n(80).f("iterator") | |
}, function(e, t, n) { | |
"use strict"; | |
var i = n(48)(!0); | |
n(51)(String, "String", function(e) { | |
this._t = String(e), this._i = 0 | |
}, function() { | |
var e, t = this._t, | |
n = this._i; | |
return n >= t.length ? { | |
value: void 0, | |
done: !0 | |
} : (e = i(t, n), this._i += e.length, { | |
value: e, | |
done: !1 | |
}) | |
}) | |
}, function(e, t, n) { | |
var l = n(49), | |
c = n(50); | |
e.exports = function(a) { | |
return function(e, t) { | |
var n, i, o = String(c(e)), | |
s = l(t), | |
r = o.length; | |
return s < 0 || r <= s ? a ? "" : void 0 : (n = o.charCodeAt(s)) < 55296 || 56319 < n || s + 1 === r || (i = o.charCodeAt(s + 1)) < 56320 || 57343 < i ? a ? o.charAt(s) : n : a ? o.slice(s, s + 2) : i - 56320 + (n - 55296 << 10) + 65536 | |
} | |
} | |
}, function(e) { | |
var t = Math.ceil, | |
n = Math.floor; | |
e.exports = function(e) { | |
return isNaN(e = +e) ? 0 : (0 < e ? n : t)(e) | |
} | |
}, function(e) { | |
e.exports = function(e) { | |
if (null == e) throw TypeError("Can't call method on " + e); | |
return e | |
} | |
}, function(e, t, n) { | |
"use strict"; | |
var b = n(52), | |
w = n(30), | |
_ = n(53), | |
x = n(35), | |
k = n(54), | |
C = n(55), | |
S = n(56), | |
T = n(72), | |
$ = n(74), | |
D = n(73)("iterator"), | |
A = !([].keys && "next" in [].keys()), | |
E = "@@iterator", | |
O = "keys", | |
M = "values", | |
P = function() { | |
return this | |
}; | |
e.exports = function(e, t, n, i, o, s, r) { | |
S(n, t, i); | |
var a, l, c, d = function(e) { | |
if (!A && e in f) return f[e]; | |
switch (e) { | |
case O: | |
case M: | |
return function() { | |
return new n(this, e) | |
} | |
} | |
return function() { | |
return new n(this, e) | |
} | |
}, | |
u = t + " Iterator", | |
h = o == M, | |
p = !1, | |
f = e.prototype, | |
m = f[D] || f[E] || o && f[o], | |
g = m || d(o), | |
v = o ? h ? d("entries") : g : void 0, | |
y = "Array" == t && f.entries || m; | |
if (y && ((c = $(y.call(new e))) !== Object.prototype && (T(c, u, !0), b || k(c, D) || x(c, D, P))), h && m && m.name !== M && (p = !0, g = function() { | |
return m.call(this) | |
}), b && !r || !A && !p && f[D] || x(f, D, g), C[t] = g, C[u] = P, o) | |
if (a = { | |
values: h ? g : d(M), | |
keys: s ? g : d(O), | |
entries: v | |
}, r) | |
for (l in a) l in f || _(f, l, a[l]); | |
else w(w.P + w.F * (A || p), t, a); | |
return a | |
} | |
}, function(e) { | |
e.exports = !0 | |
}, function(e, t, n) { | |
e.exports = n(35) | |
}, function(e) { | |
var n = {}.hasOwnProperty; | |
e.exports = function(e, t) { | |
return n.call(e, t) | |
} | |
}, function(e) { | |
e.exports = {} | |
}, function(e, t, n) { | |
"use strict"; | |
var i = n(57), | |
o = n(44), | |
s = n(72), | |
r = {}; | |
n(35)(r, n(73)("iterator"), function() { | |
return this | |
}), e.exports = function(e, t, n) { | |
e.prototype = i(r, { | |
next: o(1, n) | |
}), s(e, t + " Iterator") | |
} | |
}, function(e, t, s) { | |
var i = s(37), | |
o = s(58), | |
r = s(70), | |
a = s(67)("IE_PROTO"), | |
l = function() {}, | |
c = "prototype", | |
d = function() { | |
var e, t = s(42)("iframe"), | |
n = r.length, | |
i = "<", | |
o = ">"; | |
for (t.style.display = "none", s(71).appendChild(t), t.src = "javascript:", (e = t.contentWindow.document).open(), e.write(i + "script" + o + "document.F=Object" + i + "/script" + o), e.close(), d = e.F; n--;) delete d[c][r[n]]; | |
return d() | |
}; | |
e.exports = Object.create || function(e, t) { | |
var n; | |
return null !== e ? (l[c] = i(e), n = new l, l[c] = null, n[a] = e) : n = d(), void 0 === t ? n : o(n, t) | |
} | |
}, function(e, t, n) { | |
var r = n(36), | |
a = n(37), | |
l = n(59); | |
e.exports = n(40) ? Object.defineProperties : function(e, t) { | |
a(e); | |
for (var n, i = l(t), o = i.length, s = 0; s < o;) r.f(e, n = i[s++], t[n]); | |
return e | |
} | |
}, function(e, t, n) { | |
var i = n(60), | |
o = n(70); | |
e.exports = Object.keys || function(e) { | |
return i(e, o) | |
} | |
}, function(e, t, n) { | |
var r = n(54), | |
a = n(61), | |
l = n(64)(!1), | |
c = n(67)("IE_PROTO"); | |
e.exports = function(e, t) { | |
var n, i = a(e), | |
o = 0, | |
s = []; | |
for (n in i) n != c && r(i, n) && s.push(n); | |
for (; t.length > o;) r(i, n = t[o++]) && (~l(s, n) || s.push(n)); | |
return s | |
} | |
}, function(e, t, n) { | |
var i = n(62), | |
o = n(50); | |
e.exports = function(e) { | |
return i(o(e)) | |
} | |
}, function(e, t, n) { | |
var i = n(63); | |
e.exports = Object("z").propertyIsEnumerable(0) ? Object : function(e) { | |
return "String" == i(e) ? e.split("") : Object(e) | |
} | |
}, function(e) { | |
var t = {}.toString; | |
e.exports = function(e) { | |
return t.call(e).slice(8, -1) | |
} | |
}, function(e, t, n) { | |
var l = n(61), | |
c = n(65), | |
d = n(66); | |
e.exports = function(a) { | |
return function(e, t, n) { | |
var i, o = l(e), | |
s = c(o.length), | |
r = d(n, s); | |
if (a && t != t) { | |
for (; r < s;) | |
if ((i = o[r++]) != i) return !0 | |
} else | |
for (; r < s; r++) | |
if ((a || r in o) && o[r] === t) return a || r || 0; return !a && -1 | |
} | |
} | |
}, function(e, t, n) { | |
var i = n(49), | |
o = Math.min; | |
e.exports = function(e) { | |
return 0 < e ? o(i(e), 9007199254740991) : 0 | |
} | |
}, function(e, t, n) { | |
var i = n(49), | |
o = Math.max, | |
s = Math.min; | |
e.exports = function(e, t) { | |
return (e = i(e)) < 0 ? o(e + t, 0) : s(e, t) | |
} | |
}, function(e, t, n) { | |
var i = n(68)("keys"), | |
o = n(69); | |
e.exports = function(e) { | |
return i[e] || (i[e] = o(e)) | |
} | |
}, function(e, t, n) { | |
var i = n(31), | |
o = "__core-js_shared__", | |
s = i[o] || (i[o] = {}); | |
e.exports = function(e) { | |
return s[e] || (s[e] = {}) | |
} | |
}, function(e) { | |
var t = 0, | |
n = Math.random(); | |
e.exports = function(e) { | |
return "Symbol(".concat(void 0 === e ? "" : e, ")_", (++t + n).toString(36)) | |
} | |
}, function(e) { | |
e.exports = "constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",") | |
}, function(e, t, n) { | |
e.exports = n(31).document && document.documentElement | |
}, function(e, t, n) { | |
var i = n(36).f, | |
o = n(54), | |
s = n(73)("toStringTag"); | |
e.exports = function(e, t, n) { | |
e && !o(e = n ? e : e.prototype, s) && i(e, s, { | |
configurable: !0, | |
value: t | |
}) | |
} | |
}, function(e, t, n) { | |
var i = n(68)("wks"), | |
o = n(69), | |
s = n(31).Symbol, | |
r = "function" == typeof s; | |
(e.exports = function(e) { | |
return i[e] || (i[e] = r && s[e] || (r ? s : o)("Symbol." + e)) | |
}).store = i | |
}, function(e, t, n) { | |
var i = n(54), | |
o = n(75), | |
s = n(67)("IE_PROTO"), | |
r = Object.prototype; | |
e.exports = Object.getPrototypeOf || function(e) { | |
return e = o(e), i(e, s) ? e[s] : "function" == typeof e.constructor && e instanceof e.constructor ? e.constructor.prototype : e instanceof Object ? r : null | |
} | |
}, function(e, t, n) { | |
var i = n(50); | |
e.exports = function(e) { | |
return Object(i(e)) | |
} | |
}, function(e, t, n) { | |
n(77); | |
for (var i = n(31), o = n(35), s = n(55), r = n(73)("toStringTag"), a = ["NodeList", "DOMTokenList", "MediaList", "StyleSheetList", "CSSRuleList"], l = 0; l < 5; l++) { | |
var c = a[l], | |
d = i[c], | |
u = d && d.prototype; | |
u && !u[r] && o(u, r, c), s[c] = s.Array | |
} | |
}, function(e, t, n) { | |
"use strict"; | |
var i = n(78), | |
o = n(79), | |
s = n(55), | |
r = n(61); | |
e.exports = n(51)(Array, "Array", function(e, t) { | |
this._t = r(e), this._i = 0, this._k = t | |
}, function() { | |
var e = this._t, | |
t = this._k, | |
n = this._i++; | |
return !e || n >= e.length ? (this._t = void 0, o(1)) : o(0, "keys" == t ? n : "values" == t ? e[n] : [n, e[n]]) | |
}, "values"), s.Arguments = s.Array, i("keys"), i("values"), i("entries") | |
}, function(e) { | |
e.exports = function() {} | |
}, function(e) { | |
e.exports = function(e, t) { | |
return { | |
value: t, | |
done: !!e | |
} | |
} | |
}, function(e, t, n) { | |
t.f = n(73) | |
}, function(e, t, n) { | |
e.exports = { | |
"default": n(82), | |
__esModule: !0 | |
} | |
}, function(e, t, n) { | |
n(83); | |
var i = n(32).Object; | |
e.exports = function(e) { | |
return i.getOwnPropertyNames(e) | |
} | |
}, function(e, t, n) { | |
n(84)("getOwnPropertyNames", function() { | |
return n(85).f | |
}) | |
}, function(e, t, n) { | |
var o = n(30), | |
s = n(32), | |
r = n(41); | |
e.exports = function(e, t) { | |
var n = (s.Object || {})[e] || Object[e], | |
i = {}; | |
i[e] = t(n), o(o.S + o.F * r(function() { | |
n(1) | |
}), "Object", i) | |
} | |
}, function(e, t, n) { | |
var i = n(61), | |
o = n(86).f, | |
s = {}.toString, | |
r = "object" == typeof window && window && Object.getOwnPropertyNames ? Object.getOwnPropertyNames(window) : [], | |
a = function(e) { | |
try { | |
return o(e) | |
} catch (t) { | |
return r.slice() | |
} | |
}; | |
e.exports.f = function(e) { | |
return r && "[object Window]" == s.call(e) ? a(e) : o(i(e)) | |
} | |
}, function(e, t, n) { | |
var i = n(60), | |
o = n(70).concat("length", "prototype"); | |
t.f = Object.getOwnPropertyNames || function(e) { | |
return i(e, o) | |
} | |
}, function(e, t, n) { | |
e.exports = { | |
"default": n(88), | |
__esModule: !0 | |
} | |
}, function(e, t, n) { | |
n(76), n(47), e.exports = n(89) | |
}, function(e, t, n) { | |
var i = n(37), | |
o = n(90); | |
e.exports = n(32).getIterator = function(e) { | |
var t = o(e); | |
if ("function" != typeof t) throw TypeError(e + " is not iterable!"); | |
return i(t.call(e)) | |
} | |
}, function(e, t, n) { | |
var i = n(91), | |
o = n(73)("iterator"), | |
s = n(55); | |
e.exports = n(32).getIteratorMethod = function(e) { | |
if (null != e) return e[o] || e["@@iterator"] || s[i(e)] | |
} | |
}, function(e, t, n) { | |
var o = n(63), | |
s = n(73)("toStringTag"), | |
r = "Arguments" == o(function() { | |
return arguments | |
}()), | |
a = function(e, t) { | |
try { | |
return e[t] | |
} catch (n) {} | |
}; | |
e.exports = function(e) { | |
var t, n, i; | |
return void 0 === e ? "Undefined" : null === e ? "Null" : "string" == typeof(n = a(t = Object(e), s)) ? n : r ? o(t) : "Object" == (i = o(t)) && "function" == typeof t.callee ? "Arguments" : i | |
} | |
}, function(e, t) { | |
"use strict"; | |
t.__esModule = !0, t["default"] = function(e, t) { | |
if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function") | |
} | |
}, function(e, t, n) { | |
"use strict"; | |
function i(e) { | |
return e && e.__esModule ? e : { | |
"default": e | |
} | |
} | |
t.__esModule = !0; | |
var o = i(n(27)); | |
t["default"] = function() { | |
function i(e, t) { | |
for (var n = 0; n < t.length; n++) { | |
var i = t[n]; | |
i.enumerable = i.enumerable || !1, i.configurable = !0, "value" in i && (i.writable = !0), (0, o["default"])(e, i.key, i) | |
} | |
} | |
return function(e, t, n) { | |
return t && i(e.prototype, t), n && i(e, n), e | |
} | |
}() | |
}, function(e, t, n) { | |
e.exports = n(95), e.exports.__esModule && (e.exports = e.exports["default"]), ("function" == typeof e.exports ? e.exports.options : e.exports).template = n(97) | |
}, function(e, t, n) { | |
"use strict"; | |
function i(e) { | |
return e && e.__esModule ? e : { | |
"default": e | |
} | |
} | |
Object.defineProperty(t, "__esModule", { | |
value: !0 | |
}); | |
var o = i(n(96)); | |
t["default"] = { | |
props: { | |
type: { | |
type: String, | |
"default": null | |
}, | |
oneAtAtime: { | |
type: Boolean, | |
coerce: o["default"], | |
"default": !1 | |
} | |
}, | |
computed: { | |
isAccordion: function() { | |
return !0 | |
} | |
}, | |
created: function() { | |
var e = this; | |
this.$on("isOpenEvent", function(t) { | |
e.oneAtAtime && e.$children.forEach(function(e) { | |
t !== e && (e.isOpen = !1) | |
}) | |
}) | |
} | |
} | |
}, function(e, t) { | |
"use strict"; | |
Object.defineProperty(t, "__esModule", { | |
value: !0 | |
}), t["default"] = function(e) { | |
return "string" != typeof e ? e : "true" === e || "false" !== e && "null" !== e && "undefined" !== e && e | |
} | |
}, function(e) { | |
e.exports = "<div class=panel-group> <slot></slot> </div>" | |
}, function(e, t, n) { | |
e.exports = n(99), e.exports.__esModule && (e.exports = e.exports["default"]), ("function" == typeof e.exports ? e.exports.options : e.exports).template = n(101) | |
}, function(e, t, n) { | |
"use strict"; | |
function i(e) { | |
return e && e.__esModule ? e : { | |
"default": e | |
} | |
} | |
Object.defineProperty(t, "__esModule", { | |
value: !0 | |
}); | |
var o = i(n(100)), | |
s = i(n(26)); | |
t["default"] = { | |
props: { | |
offset: { | |
type: Number, | |
coerce: o["default"], | |
"default": 0 | |
} | |
}, | |
data: function() { | |
return { | |
affixed: !1 | |
} | |
}, | |
computed: { | |
top: function() { | |
return 0 < this.offset ? this.offset + "px" : null | |
} | |
}, | |
methods: { | |
checkScroll: function() { | |
if (this.$el.offsetWidth || this.$el.offsetHeight || this.$el.getClientRects().length) { | |
for (var e = {}, t = {}, n = this.$el.getBoundingClientRect(), i = document.body, o = ["Top", "Left"], s = 0; s < o.length; s++) { | |
var r = o[s], | |
a = r.toLowerCase(), | |
l = window["page" + ("Top" === r ? "Y" : "X") + "Offset"], | |
c = "scroll" + r; | |
"number" != typeof l && ("number" != typeof(l = document.documentElement[c]) && (l = document.body[c])), e[a] = l, t[a] = e[a] + n[a] - (this.$el["client" + r] || i["client" + r] || 0) | |
} | |
var d = e.top > t.top - this.offset; | |
this.affixed !== d && (this.affixed = d) | |
} | |
} | |
}, | |
ready: function() { | |
var e = this; | |
this.checkScroll(), (0, s["default"])(window).on("scroll resize", function() { | |
return e.checkScroll() | |
}) | |
}, | |
beforeDestroy: function() { | |
var e = this; | |
(0, s["default"])(window).off("scroll resize", function() { | |
return e.checkScroll() | |
}) | |
} | |
} | |
}, function(e, t) { | |
"use strict"; | |
Object.defineProperty(t, "__esModule", { | |
value: !0 | |
}), t["default"] = function(e, t) { | |
var n = arguments.length <= 1 || void 0 === t ? null : arguments[1]; | |
return "number" == typeof e ? e : null == e || isNaN(Number(e)) ? n : Number(e) | |
} | |
}, function(e) { | |
e.exports = '<div class="hidden-print hidden-xs hidden-sm"> <nav class=bs-docs-sidebar :class={affix:affixed} :style={marginTop:top}> <slot></slot> </nav> </div>' | |
}, function(e, t, n) { | |
n(103), e.exports = n(107), e.exports.__esModule && (e.exports = e.exports["default"]), ("function" == typeof e.exports ? e.exports.options : e.exports).template = n(108) | |
}, function(e, t, n) { | |
var i = n(104); | |
"string" == typeof i && (i = [ | |
[e.id, i, ""] | |
]), n(106)(i, {}), i.locals && (e.exports = i.locals) | |
}, function(e, t, n) { | |
(e.exports = n(105)()).push([e.id, ".fade-transition{-webkit-transition:opacity .3s ease;transition:opacity .3s ease}.fade-enter,.fade-leave{height:0;opacity:0}.alert.top{margin:0 auto;left:0;right:0}.alert.top,.alert.top-right{position:fixed;top:30px;z-index:1050}.alert.top-right{right:50px}", ""]) | |
}, function(e) { | |
e.exports = function() { | |
var r = []; | |
return r.toString = function() { | |
for (var e = [], t = 0; t < this.length; t++) { | |
var n = this[t]; | |
n[2] ? e.push("@media " + n[2] + "{" + n[1] + "}") : e.push(n[1]) | |
} | |
return e.join("") | |
}, r.i = function(e, t) { | |
"string" == typeof e && (e = [ | |
[null, e, ""] | |
]); | |
for (var n = {}, i = 0; i < this.length; i++) { | |
var o = this[i][0]; | |
"number" == typeof o && (n[o] = !0) | |
} | |
for (i = 0; i < e.length; i++) { | |
var s = e[i]; | |
"number" == typeof s[0] && n[s[0]] || (t && !s[2] ? s[2] = t : t && (s[2] = "(" + s[2] + ") and (" + t + ")"), r.push(s)) | |
} | |
}, r | |
} | |
}, function(e) { | |
function l(e, t) { | |
for (var n = 0; n < e.length; n++) { | |
var i = e[n], | |
o = m[i.id]; | |
if (o) { | |
o.refs++; | |
for (var s = 0; s < o.parts.length; s++) o.parts[s](i.parts[s]); | |
for (; s < i.parts.length; s++) o.parts.push(u(i.parts[s], t)) | |
} else { | |
var r = []; | |
for (s = 0; s < i.parts.length; s++) r.push(u(i.parts[s], t)); | |
m[i.id] = { | |
id: i.id, | |
refs: 1, | |
parts: r | |
} | |
} | |
} | |
} | |
function c(e) { | |
for (var t = [], n = {}, i = 0; i < e.length; i++) { | |
var o = e[i], | |
s = o[0], | |
r = { | |
css: o[1], | |
media: o[2], | |
sourceMap: o[3] | |
}; | |
n[s] ? n[s].parts.push(r) : t.push(n[s] = { | |
id: s, | |
parts: [r] | |
}) | |
} | |
return t | |
} | |
function n(e, t) { | |
var n = o(), | |
i = s[s.length - 1]; | |
if ("top" === e.insertAt) i ? i.nextSibling ? n.insertBefore(t, i.nextSibling) : n.appendChild(t) : n.insertBefore(t, n.firstChild), s.push(t); | |
else { | |
if ("bottom" !== e.insertAt) throw new Error("Invalid value for parameter 'insertAt'. Must be 'top' or 'bottom'."); | |
n.appendChild(t) | |
} | |
} | |
function r(e) { | |
e.parentNode.removeChild(e); | |
var t = s.indexOf(e); | |
0 <= t && s.splice(t, 1) | |
} | |
function a(e) { | |
var t = document.createElement("style"); | |
return t.type = "text/css", n(e, t), t | |
} | |
function d(e) { | |
var t = document.createElement("link"); | |
return t.rel = "stylesheet", n(e, t), t | |
} | |
function u(t, e) { | |
var n, i, o; | |
if (e.singleton) { | |
var s = v++; | |
n = g || (g = a(e)), i = h.bind(null, n, s, !1), o = h.bind(null, n, s, !0) | |
} else t.sourceMap && "function" == typeof URL && "function" == typeof URL.createObjectURL && "function" == typeof URL.revokeObjectURL && "function" == typeof Blob && "function" == typeof btoa ? (n = d(e), i = f.bind(null, n), o = function() { | |
r(n), n.href && URL.revokeObjectURL(n.href) | |
}) : (n = a(e), i = p.bind(null, n), o = function() { | |
r(n) | |
}); | |
return i(t), | |
function(e) { | |
if (e) { | |
if (e.css === t.css && e.media === t.media && e.sourceMap === t.sourceMap) return; | |
i(t = e) | |
} else o() | |
} | |
} | |
function h(e, t, n, i) { | |
var o = n ? "" : i.css; | |
if (e.styleSheet) e.styleSheet.cssText = b(t, o); | |
else { | |
var s = document.createTextNode(o), | |
r = e.childNodes; | |
r[t] && e.removeChild(r[t]), r.length ? e.insertBefore(s, r[t]) : e.appendChild(s) | |
} | |
} | |
function p(e, t) { | |
var n = t.css, | |
i = t.media; | |
if (i && e.setAttribute("media", i), e.styleSheet) e.styleSheet.cssText = n; | |
else { | |
for (; e.firstChild;) e.removeChild(e.firstChild); | |
e.appendChild(document.createTextNode(n)) | |
} | |
} | |
function f(e, t) { | |
var n = t.css, | |
i = t.sourceMap; | |
i && (n += "\n/*# sourceMappingURL=data:application/json;base64," + btoa(unescape(encodeURIComponent(JSON.stringify(i)))) + " */"); | |
var o = new Blob([n], { | |
type: "text/css" | |
}), | |
s = e.href; | |
e.href = URL.createObjectURL(o), s && URL.revokeObjectURL(s) | |
} | |
var m = {}, | |
t = function(e) { | |
var t; | |
return function() { | |
return void 0 === t && (t = e.apply(this, arguments)), t | |
} | |
}, | |
i = t(function() { | |
return /msie [6-9]\b/.test(window.navigator.userAgent.toLowerCase()) | |
}), | |
o = t(function() { | |
return document.head || document.getElementsByTagName("head")[0] | |
}), | |
g = null, | |
v = 0, | |
s = []; | |
e.exports = function(e, r) { | |
"undefined" == typeof(r = r || {}).singleton && (r.singleton = i()), "undefined" == typeof r.insertAt && (r.insertAt = "bottom"); | |
var a = c(e); | |
return l(a, r), | |
function(e) { | |
for (var t = [], n = 0; n < a.length; n++) { | |
var i = a[n]; | |
(o = m[i.id]).refs--, t.push(o) | |
} | |
e && l(c(e), r); | |
for (n = 0; n < t.length; n++) { | |
var o; | |
if (0 === (o = t[n]).refs) { | |
for (var s = 0; s < o.parts.length; s++) o.parts[s](); | |
delete m[o.id] | |
} | |
} | |
} | |
}; | |
var y, b = (y = [], function(e, t) { | |
return y[e] = t, y.filter(Boolean).join("\n") | |
}) | |
}, function(e, t, n) { | |
"use strict"; | |
function i(e) { | |
return e && e.__esModule ? e : { | |
"default": e | |
} | |
} | |
Object.defineProperty(t, "__esModule", { | |
value: !0 | |
}); | |
var o = i(n(96)), | |
s = i(n(100)); | |
t["default"] = { | |
props: { | |
type: { | |
type: String | |
}, | |
dismissable: { | |
type: Boolean, | |
coerce: o["default"], | |
"default": !1 | |
}, | |
show: { | |
type: Boolean, | |
coerce: o["default"], | |
"default": !0, | |
twoWay: !0 | |
}, | |
duration: { | |
type: Number, | |
coerce: s["default"], | |
"default": 0 | |
}, | |
width: { | |
type: String | |
}, | |
placement: { | |
type: String | |
} | |
}, | |
watch: { | |
show: function(e) { | |
var t = this; | |
this._timeout && clearTimeout(this._timeout), e && Boolean(this.duration) && (this._timeout = setTimeout(function() { | |
t.show = !1 | |
}, this.duration)) | |
} | |
} | |
} | |
}, function(e) { | |
e.exports = "<div v-show=show v-bind:class=\"{\r\n 'alert':\t\ttrue,\r\n 'alert-success':(type == 'success'),\r\n 'alert-warning':(type == 'warning'),\r\n 'alert-info':\t(type == 'info'),\r\n 'alert-danger':\t(type == 'danger'),\r\n 'top': \t\t\t(placement === 'top'),\r\n 'top-right': \t(placement === 'top-right')\r\n }\" transition=fade v-bind:style={width:width} role=alert> <button v-show=dismissable type=button class=close @click=\"show = false\"> <span>×</span> </button> <slot></slot> </div>" | |
}, function(e, t, n) { | |
n(110), e.exports = n(112), e.exports.__esModule && (e.exports = e.exports["default"]), ("function" == typeof e.exports ? e.exports.options : e.exports).template = n(114) | |
}, function(e, t, n) { | |
var i = n(111); | |
"string" == typeof i && (i = [ | |
[e.id, i, ""] | |
]), n(106)(i, {}), i.locals && (e.exports = i.locals) | |
}, function(e, t, n) { | |
(e.exports = n(105)()).push([e.id, ".aside-open{-webkit-transition:-webkit-transform .3s;transition:-webkit-transform .3s;transition:transform .3s;transition:transform .3s,-webkit-transform .3s}.aside-open.has-push-right{-webkit-transform:translateX(-300px);transform:translateX(-300px)}.aside{position:fixed;top:0;bottom:0;z-index:1049;overflow:auto;background:#fff}.aside.left{left:0;right:auto}.aside.right{left:auto;right:0}.slideleft-enter{-webkit-animation:slideleft-in .3s;animation:slideleft-in .3s}.slideleft-leave{-webkit-animation:slideleft-out .3s;animation:slideleft-out .3s}@-webkit-keyframes slideleft-in{0%{-webkit-transform:translateX(-100%);transform:translateX(-100%);opacity:0}to{-webkit-transform:translateX(0);transform:translateX(0);opacity:1}}@keyframes slideleft-in{0%{-webkit-transform:translateX(-100%);transform:translateX(-100%);opacity:0}to{-webkit-transform:translateX(0);transform:translateX(0);opacity:1}}@-webkit-keyframes slideleft-out{0%{-webkit-transform:translateX(0);transform:translateX(0);opacity:1}to{-webkit-transform:translateX(-100%);transform:translateX(-100%);opacity:0}}@keyframes slideleft-out{0%{-webkit-transform:translateX(0);transform:translateX(0);opacity:1}to{-webkit-transform:translateX(-100%);transform:translateX(-100%);opacity:0}}.slideright-enter{-webkit-animation:slideright-in .3s;animation:slideright-in .3s}.slideright-leave{-webkit-animation:slideright-out .3s;animation:slideright-out .3s}@-webkit-keyframes slideright-in{0%{-webkit-transform:translateX(100%);transform:translateX(100%);opacity:0}to{-webkit-transform:translateX(0);transform:translateX(0);opacity:1}}@keyframes slideright-in{0%{-webkit-transform:translateX(100%);transform:translateX(100%);opacity:0}to{-webkit-transform:translateX(0);transform:translateX(0);opacity:1}}@-webkit-keyframes slideright-out{0%{-webkit-transform:translateX(0);transform:translateX(0);opacity:1}to{-webkit-transform:translateX(100%);transform:translateX(100%);opacity:0}}@keyframes slideright-out{0%{-webkit-transform:translateX(0);transform:translateX(0);opacity:1}to{-webkit-transform:translateX(100%);transform:translateX(100%);opacity:0}}.aside:focus{outline:0}@media (max-width:991px){.aside{min-width:240px}}.aside.left{right:auto;left:0}.aside.right{right:0;left:auto}.aside .aside-dialog .aside-header{border-bottom:1px solid #e5e5e5;min-height:16.43px;padding:6px 15px;background:#337ab7;color:#fff}.aside .aside-dialog .aside-header .close{margin-right:-8px;padding:4px 8px;color:#fff;font-size:25px;opacity:.8}.aside .aside-dialog .aside-body{position:relative;padding:15px}.aside .aside-dialog .aside-footer{padding:15px;text-align:right;border-top:1px solid #e5e5e5}.aside .aside-dialog .aside-footer .btn+.btn{margin-left:5px;margin-bottom:0}.aside .aside-dialog .aside-footer .btn-group .btn+.btn{margin-left:-1px}.aside .aside-dialog .aside-footer .btn-block+.btn-block{margin-left:0}.aside-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1040;opacity:0;-webkit-transition:opacity .3s ease;transition:opacity .3s ease;background-color:#000}.aside-backdrop.in{opacity:.5;filter:alpha(opacity=50)}", ""]) | |
}, function(e, t, n) { | |
"use strict"; | |
function i(e) { | |
return e && e.__esModule ? e : { | |
"default": e | |
} | |
} | |
Object.defineProperty(t, "__esModule", { | |
value: !0 | |
}); | |
var o = i(n(113)), | |
s = i(n(96)), | |
r = i(n(100)), | |
a = i(n(26)); | |
t["default"] = { | |
props: { | |
show: { | |
type: Boolean, | |
coerce: s["default"], | |
required: !0, | |
twoWay: !0 | |
}, | |
placement: { | |
type: String, | |
"default": "right" | |
}, | |
header: { | |
type: String | |
}, | |
width: { | |
type: Number, | |
coerce: r["default"], | |
"default": 320 | |
} | |
}, | |
watch: { | |
show: function(e) { | |
var t = this, | |
n = document.body, | |
i = (0, o["default"])(); | |
e ? (this._backdrop || (this._backdrop = document.createElement("div")), this._backdrop.className = "aside-backdrop", n.appendChild(this._backdrop), n.classList.add("modal-open"), 0 !== i && (n.style.paddingRight = i + "px"), this._backdrop.clientHeight, this._backdrop.classList.add("in"), (0, a["default"])(this._backdrop).on("click", function() { | |
return t.close() | |
})) : ((0, a["default"])(this._backdrop).on("transitionend", function() { | |
(0, a["default"])(t._backdrop).off(); | |
try { | |
n.classList.remove("modal-open"), n.style.paddingRight = "0", n.removeChild(t._backdrop), t._backdrop = null | |
} catch (e) {} | |
}), this._backdrop.className = "aside-backdrop") | |
} | |
}, | |
methods: { | |
close: function() { | |
this.show = !1 | |
} | |
} | |
} | |
}, function(e, t) { | |
"use strict"; | |
Object.defineProperty(t, "__esModule", { | |
value: !0 | |
}), t["default"] = function() { | |
if (document.documentElement.scrollHeight <= document.documentElement.clientHeight) return 0; | |
var e = document.createElement("p"); | |
e.style.width = "100%", e.style.height = "200px"; | |
var t = document.createElement("div"); | |
t.style.position = "absolute", t.style.top = "0px", t.style.left = "0px", t.style.visibility = "hidden", t.style.width = "200px", t.style.height = "150px", t.style.overflow = "hidden", t.appendChild(e), document.body.appendChild(t); | |
var n = e.offsetWidth; | |
t.style.overflow = "scroll"; | |
var i = e.offsetWidth; | |
return n === i && (i = t.clientWidth), document.body.removeChild(t), n - i | |
} | |
}, function(e) { | |
e.exports = "<div class=aside v-bind:style=\"{width:width + 'px'}\" v-bind:class=\"{\r\n left:placement === 'left',\r\n right:placement === 'right'\r\n }\" v-show=show :transition=\"(this.placement === 'left') ? 'slideleft' : 'slideright'\"> <div class=aside-dialog> <div class=aside-content> <div class=aside-header> <button type=button class=close @click=close><span>×</span></button> <h4 class=aside-title> <slot name=header> {{ header }} </slot> </h4> </div> <div class=aside-body> <slot></slot> </div> </div> </div> </div>" | |
}, function(e, t, n) { | |
e.exports = n(116), e.exports.__esModule && (e.exports = e.exports["default"]), ("function" == typeof e.exports ? e.exports.options : e.exports).template = n(117) | |
}, function(e, t, n) { | |
"use strict"; | |
function i(e) { | |
return e && e.__esModule ? e : { | |
"default": e | |
} | |
} | |
Object.defineProperty(t, "__esModule", { | |
value: !0 | |
}); | |
var o = i(n(96)); | |
t["default"] = { | |
props: { | |
value: null, | |
buttons: { | |
type: Boolean, | |
coerce: o["default"], | |
"default": !0 | |
}, | |
type: { | |
type: String, | |
"default": "default" | |
} | |
}, | |
watch: { | |
value: { | |
deep: !0, | |
handler: function() { | |
this.$children.forEach(function(e) { | |
e.group && e.eval && e.eval() | |
}) | |
} | |
} | |
}, | |
created: function() { | |
this._btnGroup = !0 | |
} | |
} | |
}, function(e) { | |
e.exports = "<div :class=\"{'btn-group':buttons}\" :data-toggle=\"buttons&&'buttons'\"> <slot></slot> </div>" | |
}, function(e, t, n) { | |
n(119), e.exports = n(121), e.exports.__esModule && (e.exports = e.exports["default"]), ("function" == typeof e.exports ? e.exports.options : e.exports).template = n(122) | |
}, function(e, t, n) { | |
var i = n(120); | |
"string" == typeof i && (i = [ | |
[e.id, i, ""] | |
]), n(106)(i, {}), i.locals && (e.exports = i.locals) | |
}, function(e, t, n) { | |
(e.exports = n(105)()).push([e.id, ".carousel-control[_v-4b6e4443]{cursor:pointer}", ""]) | |
}, function(e, t, n) { | |
"use strict"; | |
function i(e) { | |
return e && e.__esModule ? e : { | |
"default": e | |
} | |
} | |
Object.defineProperty(t, "__esModule", { | |
value: !0 | |
}); | |
var o = i(n(96)), | |
s = i(n(100)), | |
r = i(n(26)); | |
t["default"] = { | |
props: { | |
indicators: { | |
type: Boolean, | |
coerce: o["default"], | |
"default": !0 | |
}, | |
controls: { | |
type: Boolean, | |
coerce: o["default"], | |
"default": !0 | |
}, | |
interval: { | |
type: Number, | |
coerce: s["default"], | |
"default": 5e3 | |
} | |
}, | |
data: function() { | |
return { | |
indicator: [], | |
index: 0, | |
isAnimating: !1 | |
} | |
}, | |
computed: { | |
slider: function() { | |
return this.$el.querySelectorAll(".item") | |
} | |
}, | |
watch: { | |
index: function(e, t) { | |
this.slide(t < e ? "left" : "right", e, t) | |
} | |
}, | |
methods: { | |
indicatorClick: function(e) { | |
return !this.isAnimating && this.index !== e && (this.isAnimating = !0, void(this.index = e)) | |
}, | |
slide: function(e, t, n) { | |
var i = this, | |
o = this.slider[t]; | |
(0, r["default"])(o).addClass("left" === e ? "next" : "prev"), o.clientHeight, (0, r["default"])([this.slider[n], o]).addClass(e).on("transitionend", function() { | |
(0, r["default"])(i.slider).off("transitionend").className = "item", (0, r["default"])(o).addClass("active"), i.isAnimating = !1 | |
}) | |
}, | |
next: function() { | |
return !this.isAnimating && (this.isAnimating = !0, void(this.index + 1 < this.slider.length ? this.index += 1 : this.index = 0)) | |
}, | |
prev: function() { | |
return !this.isAnimating && (this.isAnimating = !0, void(0 === this.index ? this.index = this.slider.length - 1 : this.index -= 1)) | |
} | |
}, | |
ready: function() { | |
var e, t, n = this; | |
0 < this.interval && (e = null, t = function() { | |
e = setInterval(n.next, n.interval) | |
}, (0, r["default"])(n.$el).on("mouseenter", function() { | |
return clearInterval(e) | |
}).on("mouseleave", function() { | |
return t() | |
}), t()) | |
} | |
} | |
}, function(e) { | |
e.exports = '<div class="carousel slide" data-ride=carousel _v-4b6e4443=""> <ol class=carousel-indicators v-show=indicators _v-4b6e4443=""> <li v-for="i in indicator" @click=indicatorClick($index) v-bind:class="{active:$index === index}" _v-4b6e4443=""><span _v-4b6e4443=""></span></li> </ol> <div class=carousel-inner role=listbox _v-4b6e4443=""> <slot _v-4b6e4443=""></slot> </div> <div v-show=controls class="carousel-controls hidden-xs" _v-4b6e4443=""> <a class="left carousel-control" role=button @click=prev _v-4b6e4443=""> <span class="glyphicon glyphicon-chevron-left" aria-hidden=true _v-4b6e4443=""></span> </a> <a class="right carousel-control" role=button @click=next _v-4b6e4443=""> <span class="glyphicon glyphicon-chevron-right" aria-hidden=true _v-4b6e4443=""></span> </a> </div> </div>' | |
}, function(e, t, n) { | |
n(124), e.exports = n(126), e.exports.__esModule && (e.exports = e.exports["default"]), ("function" == typeof e.exports ? e.exports.options : e.exports).template = n(127) | |
}, function(e, t, n) { | |
var i = n(125); | |
"string" == typeof i && (i = [ | |
[e.id, i, ""] | |
]), n(106)(i, {}), i.locals && (e.exports = i.locals) | |
}, function(e, t, n) { | |
(e.exports = n(105)()).push([e.id, ".checkbox[_v-fb39d5b4]{position:relative}.checkbox>label>input[_v-fb39d5b4]{box-sizing:border-box;position:absolute;z-index:-1;padding:0;opacity:0;margin:0}.checkbox>label>.icon[_v-fb39d5b4]{position:absolute;top:.2rem;left:0;display:block;width:1.4rem;height:1.4rem;line-height:1rem;text-align:center;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;border-radius:.35rem;background-repeat:no-repeat;background-position:50%;background-size:50% 50%}.checkbox:not(.active)>label>.icon[_v-fb39d5b4]{background-color:#ddd;border:1px solid #bbb}.checkbox>label>input:focus~.icon[_v-fb39d5b4]{outline:0;border:1px solid #66afe9;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6)}.checkbox.active>label>.icon[_v-fb39d5b4]{background-size:1rem 1rem;background-image:url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB3aWR0aD0iNyIgaGVpZ2h0PSI3Ij48cGF0aCBmaWxsPSIjZmZmIiBkPSJtNS43MywwLjUybC0zLjEyNDIyLDMuMzQxNjFsLTEuMzM4OTUsLTEuNDMyMTJsLTEuMjQ5NjksMS4zMzY2NWwyLjU4ODYzLDIuNzY4NzZsNC4zNzM5LC00LjY3ODI2bC0xLjI0OTY5LC0xLjMzNjY1bDAsMGwwLjAwMDAyLDAuMDAwMDF6Ii8+PC9zdmc+)}.checkbox.active .btn-default[_v-fb39d5b4]{-webkit-filter:brightness(75%);filter:brightness(75%)}.btn.readonly[_v-fb39d5b4],.checkbox.disabled>label>.icon[_v-fb39d5b4],.checkbox.readonly>label>.icon[_v-fb39d5b4]{filter:alpha(opacity=65);box-shadow:none;opacity:.65}label.btn>input[type=checkbox][_v-fb39d5b4]{position:absolute;clip:rect(0,0,0,0);pointer-events:none}", ""]) | |
}, function(e, t, n) { | |
"use strict"; | |
function i(e) { | |
return e && e.__esModule ? e : { | |
"default": e | |
} | |
} | |
Object.defineProperty(t, "__esModule", { | |
value: !0 | |
}); | |
var o = i(n(96)); | |
t["default"] = { | |
props: { | |
value: { | |
"default": !0 | |
}, | |
checked: { | |
twoWay: !0 | |
}, | |
button: { | |
type: Boolean, | |
coerce: o["default"], | |
"default": !1 | |
}, | |
disabled: { | |
type: Boolean, | |
coerce: o["default"], | |
"default": !1 | |
}, | |
name: { | |
type: String, | |
"default": null | |
}, | |
readonly: { | |
type: Boolean, | |
coerce: o["default"], | |
"default": !1 | |
}, | |
type: { | |
type: String, | |
"default": null | |
} | |
}, | |
computed: { | |
active: function() { | |
return "boolean" != typeof this.value && this.group ? ~this.$parent.value.indexOf(this.value) : this.checked === this.value | |
}, | |
buttonStyle: function() { | |
return this.button || this.group && this.$parent.buttons | |
}, | |
group: function() { | |
return this.$parent && this.$parent._checkboxGroup | |
}, | |
typeColor: function() { | |
return this.type || this.$parent && this.$parent.type || "default" | |
} | |
}, | |
watch: { | |
checked: function() { | |
"boolean" != typeof this.value && this.group && (this.checked && !~this.$parent.value.indexOf(this.value) && this.$parent.value.push(this.value), !this.checked && ~this.$parent.value.indexOf(this.value) && this.$parent.value.$remove(this.value)) | |
} | |
}, | |
created: function() { | |
if ("boolean" != typeof this.value) { | |
var e = this.$parent; | |
e && e._btnGroup && !e._radioGroup && (e._checkboxGroup = !0, e.value instanceof Array || (e.value = [])) | |
} | |
}, | |
ready: function() { | |
this.$parent._checkboxGroup && "boolean" != typeof this.value && (this.$parent.value.length ? this.checked = ~this.$parent.value.indexOf(this.value) : this.checked && this.$parent.value.push(this.value)) | |
}, | |
methods: { | |
eval: function() { | |
"boolean" != typeof this.value && this.group && (this.checked = ~this.$parent.value.indexOf(this.value)) | |
}, | |
focus: function() { | |
this.$els.input.focus() | |
}, | |
toggle: function() { | |
if (!this.disabled && (this.focus(), !this.readonly && (this.checked = this.checked ? null : this.value, this.group && "boolean" != typeof this.value))) { | |
var e = this.$parent.value.indexOf(this.value); | |
this.$parent.value[~e ? "$remove" : "push"](this.value) | |
} | |
return !1 | |
} | |
} | |
} | |
}, function(e) { | |
e.exports = '<label v-if=buttonStyle :class="[\'btn btn-\'+typeColor,{active:checked,disabled:disabled,readonly:readonly}]" @click.prevent=toggle _v-fb39d5b4=""> <input type=checkbox autocomplete=off v-el:input="" v-show=!readonly :checked=active :value=value :name=name :readonly=readonly :disabled=disabled _v-fb39d5b4=""> <slot _v-fb39d5b4=""></slot> </label> <div v-else="" :class="[\'checkbox\',typeColor,{active:checked,disabled:disabled,readonly:readonly}]" @click.prevent=toggle _v-fb39d5b4=""> <label class=open _v-fb39d5b4=""> <input type=checkbox autocomplete=off v-el:input="" :checked=active :value=value :name=name :readonly=readonly :disabled=disabled _v-fb39d5b4=""> <span class="icon dropdown-toggle" :class="[active?\'btn-\'+typeColor:\'\',{bg:typeColor===\'default\'}]" _v-fb39d5b4=""></span> <span v-if="active&&typeColor===\'default\'" class=icon _v-fb39d5b4=""></span> <slot _v-fb39d5b4=""></slot> </label> </div>' | |
}, function(e, t, n) { | |
n(129), e.exports = n(131), e.exports.__esModule && (e.exports = e.exports["default"]), ("function" == typeof e.exports ? e.exports.options : e.exports).template = n(133) | |
}, function(e, t, n) { | |
var i = n(130); | |
"string" == typeof i && (i = [ | |
[e.id, i, ""] | |
]), n(106)(i, {}), i.locals && (e.exports = i.locals) | |
}, function(e, t, n) { | |
(e.exports = n(105)()).push([e.id, ".datepicker{position:relative;display:inline-block}input.datepicker-input.with-reset-button{padding-right:25px}.datepicker>button.close{position:absolute;top:0;right:0;outline:none;z-index:2;display:block;width:34px;height:34px;line-height:34px;text-align:center}.datepicker>button.close:focus{opacity:.2}.datepicker-popup{position:absolute;border:1px solid #ccc;border-radius:5px;background:#fff;margin-top:2px;z-index:1000;box-shadow:0 6px 12px rgba(0,0,0,.175)}.datepicker-inner{width:218px}.datepicker-body{padding:10px}.datepicker-body span,.datepicker-ctrl p,.datepicker-ctrl span{display:inline-block;width:28px;line-height:28px;height:28px;border-radius:4px}.datepicker-ctrl p{width:65%}.datepicker-ctrl span{position:absolute}.datepicker-body span{text-align:center}.datepicker-monthRange span{width:48px;height:50px;line-height:45px}.datepicker-item-disable{background-color:#fff!important;cursor:not-allowed!important}.datepicker-item-disable,.datepicker-item-gray,.decadeRange span:first-child,.decadeRange span:last-child{color:#999}.datepicker-dateRange-item-active,.datepicker-dateRange-item-active:hover{background:#3276b1!important;color:#fff!important}.datepicker-monthRange{margin-top:10px}.datepicker-ctrl p,.datepicker-ctrl span,.datepicker-dateRange span,.datepicker-monthRange span{cursor:pointer}.datepicker-ctrl i:hover,.datepicker-ctrl p:hover,.datepicker-dateRange-item-hover,.datepicker-dateRange span:hover,.datepicker-monthRange span:hover{background-color:#eee}.datepicker-weekRange span{font-weight:700}.datepicker-label{background-color:#f8f8f8;font-weight:700;padding:7px 0;text-align:center}.datepicker-ctrl{position:relative;height:30px;line-height:30px;font-weight:700;text-align:center}.month-btn{font-weight:700;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.datepicker-preBtn{left:2px}.datepicker-nextBtn{right:2px}", ""]) | |
}, function(e, t, n) { | |
"use strict"; | |
function i(e) { | |
return e && e.__esModule ? e : { | |
"default": e | |
} | |
} | |
Object.defineProperty(t, "__esModule", { | |
value: !0 | |
}); | |
var o = i(n(132)), | |
s = i(n(26)); | |
t["default"] = { | |
props: { | |
value: { | |
type: String, | |
twoWay: !0 | |
}, | |
format: { | |
"default": "MM/dd/yyyy" | |
}, | |
disabledDaysOfWeek: { | |
type: Array, | |
"default": function() { | |
return [] | |
} | |
}, | |
width: { | |
type: String, | |
"default": "200px" | |
}, | |
clearButton: { | |
type: Boolean, | |
"default": !1 | |
}, | |
lang: { | |
type: String, | |
"default": navigator.language | |
} | |
}, | |
ready: function() { | |
var t = this; | |
this._blur = function(e) { | |
t.$el.contains(e.target) || t.close() | |
}, this.$dispatch("child-created", this), this.currDate = this.parse(this.value) || this.parse(new Date), (0, s["default"])(window).on("click", this._blur) | |
}, | |
beforeDestroy: function() { | |
(0, s["default"])(window).off("click", this._blur) | |
}, | |
data: function() { | |
return { | |
currDate: new Date, | |
dateRange: [], | |
decadeRange: [], | |
displayDayView: !1, | |
displayMonthView: !1, | |
displayYearView: !1 | |
} | |
}, | |
watch: { | |
currDate: function() { | |
this.getDateRange() | |
} | |
}, | |
computed: { | |
text: function() { | |
return (0, o["default"])(this.lang) | |
} | |
}, | |
methods: { | |
close: function() { | |
this.displayDayView = this.displayMonthView = this.displayYearView = !1 | |
}, | |
inputClick: function() { | |
this.displayMonthView || this.displayYearView ? this.displayDayView = !1 : this.displayDayView = !this.displayDayView | |
}, | |
preNextDecadeClick: function(e) { | |
var t = this.currDate.getFullYear(), | |
n = this.currDate.getMonth(), | |
i = this.currDate.getDate(); | |
this.currDate = 0 === e ? new Date(t - 10, n, i) : new Date(t + 10, n, i) | |
}, | |
preNextMonthClick: function(e) { | |
var t = this.currDate.getFullYear(), | |
n = this.currDate.getMonth(), | |
i = this.currDate.getDate(); | |
if (0 === e) { | |
var o = this.getYearMonth(t, n - 1); | |
this.currDate = new Date(o.year, o.month, i) | |
} else { | |
var s = this.getYearMonth(t, n + 1); | |
this.currDate = new Date(s.year, s.month, i) | |
} | |
}, | |
preNextYearClick: function(e) { | |
var t = this.currDate.getFullYear(), | |
n = this.currDate.getMonth(), | |
i = this.currDate.getDate(); | |
this.currDate = 0 === e ? new Date(t - 1, n, i) : new Date(t + 1, n, i) | |
}, | |
yearSelect: function(e) { | |
this.displayYearView = !1, this.displayMonthView = !0, this.currDate = new Date(e, this.currDate.getMonth(), this.currDate.getDate()) | |
}, | |
daySelect: function(e, t) { | |
return "datepicker-item-disable" !== t.$el.classList[0] && (this.currDate = e, this.value = this.stringify(this.currDate), void(this.displayDayView = !1)) | |
}, | |
switchMonthView: function() { | |
this.displayDayView = !1, this.displayMonthView = !0 | |
}, | |
switchDecadeView: function() { | |
this.displayMonthView = !1, this.displayYearView = !0 | |
}, | |
monthSelect: function(e) { | |
this.displayMonthView = !1, this.displayDayView = !0, this.currDate = new Date(this.currDate.getFullYear(), e, this.currDate.getDate()) | |
}, | |
getYearMonth: function(e, t) { | |
return 11 < t ? (e++, t = 0) : t < 0 && (e--, t = 11), { | |
year: e, | |
month: t | |
} | |
}, | |
stringifyDecadeHeader: function(e) { | |
var t = e.getFullYear().toString(), | |
n = t.substring(0, t.length - 1) + 0; | |
return n + "-" + (parseInt(n, 10) + 10) | |
}, | |
stringifyDayHeader: function(e) { | |
return this.text.months[e.getMonth()] + " " + e.getFullYear() | |
}, | |
parseMonth: function(e) { | |
return this.text.months[e.getMonth()] | |
}, | |
stringifyYearHeader: function(e) { | |
return e.getFullYear() | |
}, | |
stringify: function(e, t) { | |
var n = arguments.length <= 1 || void 0 === t ? this.format : arguments[1]; | |
if (e || (e = this.parse()), !e) return ""; | |
var i = e.getFullYear(), | |
o = e.getMonth() + 1, | |
s = e.getDate(), | |
r = this.parseMonth(e); | |
return n.replace(/yyyy/g, i).replace(/MMMM/g, r).replace(/MMM/g, r.substring(0, 3)).replace(/MM/g, ("0" + o).slice(-2)).replace(/dd/g, ("0" + s).slice(-2)).replace(/yy/g, i).replace(/M(?!a)/g, o).replace(/d/g, s) | |
}, | |
parse: function(e) { | |
var t = arguments.length <= 0 || void 0 === e ? this.value : arguments[0], | |
n = void 0; | |
return n = 10 !== t.length || "dd-MM-yyyy" !== this.format && "dd/MM/yyyy" !== this.format ? new Date(t) : new Date(t.substring(6, 10), t.substring(3, 5), t.substring(0, 2)), isNaN(n.getFullYear()) ? null : n | |
}, | |
getDayCount: function(e, t) { | |
return 1 === t && (e % 400 == 0 || e % 4 == 0 && e % 100 != 0) ? 29 : [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31][t] | |
}, | |
getDateRange: function() { | |
var s = this; | |
this.dateRange = [], this.decadeRange = []; | |
for (var r = { | |
year: this.currDate.getFullYear(), | |
month: this.currDate.getMonth(), | |
day: this.currDate.getDate() | |
}, e = r.year.toString(), t = e.substring(0, e.length - 1) + 0 - 1, n = 0; n < 12; n++) this.decadeRange.push({ | |
text: t + n | |
}); | |
var i = new Date(r.year, r.month, 1).getDay() + 1; | |
0 === i && (i = 7); | |
var o = this.getDayCount(r.year, r.month); | |
if (1 < i) | |
for (var a = this.getYearMonth(r.year, r.month - 1), l = this.getDayCount(a.year, a.month), c = 1; c < i; c++) { | |
var d = l - i + c + 1; | |
this.dateRange.push({ | |
text: d, | |
date: new Date(a.year, a.month, d), | |
sclass: "datepicker-item-gray" | |
}) | |
} | |
for (var u = function(e) { | |
var t = new Date(r.year, r.month, e), | |
n = t.getDay(), | |
i = ""; | |
if (s.disabledDaysOfWeek.forEach(function(e) { | |
n === parseInt(e, 10) && (i = "datepicker-item-disable") | |
}), e === r.day && s.value) { | |
var o = s.parse(s.value); | |
o && o.getFullYear() === r.year && o.getMonth() === r.month && (i = "datepicker-dateRange-item-active") | |
} | |
s.dateRange.push({ | |
text: e, | |
date: t, | |
sclass: i | |
}) | |
}, h = 1; h <= o; h++) u(h); | |
if (this.dateRange.length < 42) | |
for (var p = 42 - this.dateRange.length, f = this.getYearMonth(r.year, r.month + 1), m = 1; m <= p; m++) this.dateRange.push({ | |
text: m, | |
date: new Date(f.year, f.month, m), | |
sclass: "datepicker-item-gray" | |
}) | |
} | |
} | |
} | |
}, function(e, t) { | |
"use strict"; | |
Object.defineProperty(t, "__esModule", { | |
value: !0 | |
}); | |
var o = { | |
daysOfWeek: { | |
en: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"], | |
es: ["Do", "Lu", "Ma", "Mi", "Ju", "Vi", "Sa"], | |
"pt-BR": ["Do", "Se", "Te", "Qa", "Qi", "Sx", "Sa"] | |
}, | |
limit: { | |
en: "Limit reached ({{limit}} items max).", | |
es: "Limite alcanzado (m\xe1ximo {{limit}} items).", | |
"pt-BR": "Limite atingido (m\xe1ximo {{limit}} items)." | |
}, | |
loading: { | |
en: "Loading...", | |
es: "Cargando...", | |
"pt-BR": "Cargando..." | |
}, | |
minLength: { | |
en: "Min. Length", | |
es: "Tama\xf1o M\xednimo", | |
"pt-BR": "Tamanho M\xednimo" | |
}, | |
months: { | |
en: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"], | |
es: ["Enero", "Febrero", "Marzo", "Abril", "Mayo", "Junio", "Julio", "Agosto", "Septiembre", "Octubre", "Noviembre", "Diciembre"], | |
"pt-BR": ["Janeiro", "Fevereiro", "Mar\xe7o", "Abril", "Maio", "Junho", "Julho", "Agosto", "Setembro", "Outubro", "Novembro", "Dezembro"] | |
}, | |
notSelected: { | |
en: "Nothing Selected", | |
es: "Nada seleccionado", | |
"pt-BR": "Nada selecionado" | |
}, | |
required: { | |
en: "Required", | |
es: "Requerido", | |
"pt-BR": "Requerido" | |
}, | |
search: { | |
en: "Search", | |
es: "Buscar", | |
"pt-BR": "Buscar" | |
} | |
}; | |
t["default"] = function(e) { | |
var t = arguments.length <= 0 || void 0 === e ? "en" : arguments[0], | |
n = {}; | |
for (var i in o) n[i] = o[i][t] || o[i].en; | |
return n | |
} | |
}, function(e) { | |
e.exports = '<div class=datepicker> <input class="form-control datepicker-input" :class="{\'with-reset-button\': clearButton}" type=text :style={width:width} @click=inputClick v-model=value /> <button v-if="clearButton && value" type=button class=close @click="value = \'\'"> <span>×</span> </button> <div class=datepicker-popup v-show=displayDayView> <div class=datepicker-inner> <div class=datepicker-body> <div class=datepicker-ctrl> <span class="datepicker-preBtn glyphicon glyphicon-chevron-left" aria-hidden=true @click=preNextMonthClick(0)></span> <span class="datepicker-nextBtn glyphicon glyphicon-chevron-right" aria-hidden=true @click=preNextMonthClick(1)></span> <p @click=switchMonthView>{{stringifyDayHeader(currDate)}}</p> </div> <div class=datepicker-weekRange> <span v-for="w in text.daysOfWeek">{{w}}</span> </div> <div class=datepicker-dateRange> <span v-for="d in dateRange" :class=d.sclass @click=daySelect(d.date,this)>{{d.text}}</span> </div> </div> </div> </div> <div class=datepicker-popup v-show=displayMonthView> <div class=datepicker-inner> <div class=datepicker-body> <div class=datepicker-ctrl> <span class="datepicker-preBtn glyphicon glyphicon-chevron-left" aria-hidden=true @click=preNextYearClick(0)></span> <span class="datepicker-nextBtn glyphicon glyphicon-chevron-right" aria-hidden=true @click=preNextYearClick(1)></span> <p @click=switchDecadeView>{{stringifyYearHeader(currDate)}}</p> </div> <div class=datepicker-monthRange> <template v-for="m in text.months"> <span :class="{\'datepicker-dateRange-item-active\':\r\n (this.text.months[this.parse(this.value).getMonth()] === m) &&\r\n this.currDate.getFullYear() === this.parse(this.value).getFullYear()}" @click=monthSelect($index)>{{m.substr(0,3)}}</span> </template> </div> </div> </div> </div> <div class=datepicker-popup v-show=displayYearView> <div class=datepicker-inner> <div class=datepicker-body> <div class=datepicker-ctrl> <span class="datepicker-preBtn glyphicon glyphicon-chevron-left" aria-hidden=true @click=preNextDecadeClick(0)></span> <span class="datepicker-nextBtn glyphicon glyphicon-chevron-right" aria-hidden=true @click=preNextDecadeClick(1)></span> <p>{{stringifyDecadeHeader(currDate)}}</p> </div> <div class="datepicker-monthRange decadeRange"> <template v-for="decade in decadeRange"> <span :class="{\'datepicker-dateRange-item-active\':\r\n this.parse(this.value).getFullYear() === decade.text}" @click.stop=yearSelect(decade.text)>{{decade.text}}</span> </template> </div> </div> </div> </div> </div>' | |
}, function(e, t, n) { | |
n(135), e.exports = n(137), e.exports.__esModule && (e.exports = e.exports["default"]), ("function" == typeof e.exports ? e.exports.options : e.exports).template = n(138) | |
}, function(e, t, n) { | |
var i = n(136); | |
"string" == typeof i && (i = [ | |
[e.id, i, ""] | |
]), n(106)(i, {}), i.locals && (e.exports = i.locals) | |
}, function(e, t, n) { | |
(e.exports = n(105)()).push([e.id, ".secret[_v-52fe6674]{position:absolute;clip:rect(0 0 0 0);overflow:hidden;margin:-1px;height:1px;width:1px;padding:0;border:0}", ""]) | |
}, function(e, t, n) { | |
"use strict"; | |
function i(e) { | |
return e && e.__esModule ? e : { | |
"default": e | |
} | |
} | |
Object.defineProperty(t, "__esModule", { | |
value: !0 | |
}); | |
var o = i(n(96)), | |
s = i(n(26)); | |
t["default"] = { | |
props: { | |
show: { | |
twoWay: !0, | |
type: Boolean, | |
coerce: o["default"], | |
"default": !1 | |
}, | |
"class": null, | |
disabled: { | |
type: Boolean, | |
coerce: o["default"], | |
"default": !1 | |
}, | |
text: { | |
type: String, | |
"default": null | |
}, | |
type: { | |
type: String, | |
"default": null | |
} | |
}, | |
computed: { | |
classes: function() { | |
return [{ | |
open: this.show, | |
disabled: this.disabled | |
}, this["class"]] | |
}, | |
menu: function() { | |
return !this.$parent || this.$parent.navbar | |
}, | |
submenu: function() { | |
return this.$parent && (this.$parent.menu || this.$parent.submenu) | |
}, | |
slots: function() { | |
return this._slotContents | |
} | |
}, | |
methods: { | |
blur: function() { | |
var e = this; | |
this.unblur(), this._hide = setTimeout(function() { | |
e._hide = null, e.show = !1 | |
}, 100) | |
}, | |
unblur: function() { | |
this._hide && (clearTimeout(this._hide), this._hide = null) | |
} | |
}, | |
ready: function() { | |
var t = this, | |
e = (0, s["default"])(this.$els.dropdown); | |
e.onBlur(function() { | |
t.show = !1 | |
}), e.findChildren("a,button").on("click", function(e) { | |
return e.preventDefault(), !t.disabled && (t.show = !t.show, !1) | |
}), e.findChildren("ul").on("click", "li>a", function() { | |
t.show = !1 | |
}) | |
}, | |
beforeDestroy: function() { | |
var e = (0, s["default"])(this.$els.dropdown); | |
e.offBlur(), e.findChildren("a,button").off(), e.findChildren("ul").off() | |
} | |
} | |
}, function(e) { | |
e.exports = '<li v-if=$parent._navbar||$parent.menu||$parent._tabset v-el:dropdown="" class=dropdown :class=classes _v-52fe6674=""> <a v-if=text class=dropdown-toggle role=button :class="{disabled: disabled}" @keyup.esc="show = false" _v-52fe6674=""> {{ text }} <span class=caret _v-52fe6674=""></span> </a> <slot v-else="" name=button _v-52fe6674=""></slot> <slot v-if="slots[\'dropdown-menu\']" name=dropdown-menu _v-52fe6674=""></slot> <ul v-else="" class=dropdown-menu _v-52fe6674=""> <slot _v-52fe6674=""></slot> </ul> </li> <div v-else="" v-el:dropdown="" class=btn-group :class=classes _v-52fe6674=""> <button v-if=text type=button class="btn btn-{{type||\'default\'}} dropdown-toggle" @keyup.esc="show = false" :disabled=disabled _v-52fe6674=""> {{ text }} <span class=caret _v-52fe6674=""></span> </button> <slot v-else="" name=button _v-52fe6674=""></slot> <slot v-if="slots[\'dropdown-menu\']" name=dropdown-menu _v-52fe6674=""></slot> <ul v-else="" class=dropdown-menu _v-52fe6674=""> <slot _v-52fe6674=""></slot> </ul> </div>' | |
}, function(e, t, n) { | |
n(140), e.exports = n(142), e.exports.__esModule && (e.exports = e.exports["default"]), ("function" == typeof e.exports ? e.exports.options : e.exports).template = n(143) | |
}, function(e, t, n) { | |
var i = n(141); | |
"string" == typeof i && (i = [ | |
[e.id, i, ""] | |
]), n(106)(i, {}), i.locals && (e.exports = i.locals) | |
}, function(e, t, n) { | |
(e.exports = n(105)()).push([e.id, ".form-group[_v-27d010f7]{position:relative}label~.close[_v-27d010f7]{top:25px}.close[_v-27d010f7]{position:absolute;top:0;right:0;z-index:2;display:block;width:34px;height:34px;line-height:34px;text-align:center}.has-feedback.has-error button.close[_v-27d010f7],.has-feedback.has-success button.close[_v-27d010f7]{right:20px}", ""]) | |
}, function(e, t, n) { | |
"use strict"; | |
function i(e) { | |
return e && e.__esModule ? e : { | |
"default": e | |
} | |
} | |
Object.defineProperty(t, "__esModule", { | |
value: !0 | |
}); | |
var o = i(n(96)), | |
s = i(n(100)), | |
r = i(n(132)), | |
a = i(n(26)); | |
t["default"] = { | |
props: { | |
value: { | |
twoWay: !0, | |
"default": null | |
}, | |
match: { | |
type: String, | |
"default": null | |
}, | |
clearButton: { | |
type: Boolean, | |
coerce: o["default"], | |
"default": !1 | |
}, | |
disabled: { | |
type: Boolean, | |
coerce: o["default"], | |
"default": !1 | |
}, | |
enterSubmit: { | |
type: Boolean, | |
coerce: o["default"], | |
"default": !1 | |
}, | |
error: { | |
type: String, | |
"default": null | |
}, | |
help: { | |
type: String, | |
"default": null | |
}, | |
hideHelp: { | |
type: Boolean, | |
coerce: o["default"], | |
"default": !0 | |
}, | |
icon: { | |
type: Boolean, | |
coerce: o["default"], | |
"default": !1 | |
}, | |
label: { | |
type: String, | |
"default": null | |
}, | |
lang: { | |
type: String, | |
"default": navigator.language | |
}, | |
mask: null, | |
maxlength: { | |
type: Number, | |
coerce: s["default"], | |
"default": null | |
}, | |
minlength: { | |
type: Number, | |
coerce: s["default"], | |
"default": 0 | |
}, | |
name: { | |
type: String, | |
"default": null | |
}, | |
noValidate: { | |
type: Boolean, | |
coerce: o["default"], | |
"default": !1 | |
}, | |
onfocus: null, | |
pattern: null, | |
placeholder: { | |
type: String, | |
"default": null | |
}, | |
readonly: { | |
type: Boolean, | |
coerce: o["default"], | |
"default": !1 | |
}, | |
required: { | |
type: Boolean, | |
coerce: o["default"], | |
"default": !1 | |
}, | |
rows: { | |
type: Number, | |
coerce: s["default"], | |
"default": 3 | |
}, | |
type: { | |
type: String, | |
"default": "text" | |
}, | |
validationDelay: { | |
type: Number, | |
coerce: s["default"], | |
"default": 250 | |
} | |
}, | |
data: function() { | |
return { | |
valid: null, | |
timeout: null | |
} | |
}, | |
computed: { | |
slots: function() { | |
return this._slotContents || {} | |
}, | |
bsForm: function() { | |
return !0 | |
}, | |
input: function() { | |
return !0 | |
}, | |
text: function() { | |
return (0, r["default"])(this.lang) | |
}, | |
showHelp: function() { | |
return this.help && (!this.showError || !this.hideHelp) | |
}, | |
showError: function() { | |
return this.error && !1 === this.valid | |
}, | |
errorText: function() { | |
var e = this.value, | |
t = [this.error]; | |
return !e && this.required && t.push("(" + this.text.required.toLowerCase() + ")"), e && e.length < this.minlength && t.push("(" + this.text.minLength.toLowerCase() + ": " + this.minlength + ")"), t.join(" ") | |
} | |
}, | |
watch: { | |
match: function() { | |
this.eval() | |
}, | |
valid: function() { | |
this.$parent.eval && this.$parent.eval() | |
} | |
}, | |
methods: { | |
focus: function() { | |
this.$els.input.focus() | |
}, | |
eval: function() { | |
var e = this, | |
t = this.value || ""; | |
this.mask instanceof Function && (t = this.mask(t)), this.value !== t && (this.value = t), this.timeout && clearTimeout(this.timeout), this.noValidate ? null !== this.valid && (this.valid = null) : this.timeout = setTimeout(function() { | |
e.valid = e.validate(), e.timeout = null | |
}, (0, s["default"])(this.validationDelay, 250)) | |
}, | |
submit: function() { | |
if (this.$els.input.form) { | |
var e = (0, a["default"])(".form-group.validate:not(.has-success)", this.$els.input.form); | |
e.length ? e.find("input,textarea,select")[0].focus() : this.$els.input.form.submit() | |
} | |
}, | |
validate: function() { | |
var e = (this.value || "").trim(); | |
if (!e) return !this.required; | |
if (null !== this.match && this.match !== e) return !1; | |
if (e.length < this.minlength) return !1; | |
var t = !0; | |
if (this.$els.input.checkValidity && !this.$els.input.checkValidity()) return !1; | |
(this.pattern instanceof Function && (t = this.pattern(this.value)), "string" == typeof this.pattern) && (t = new RegExp(this.pattern).test(this.value)); | |
return t | |
} | |
}, | |
ready: function() { | |
var t = this; | |
(0, a["default"])(this.$els.input).on("change keypress keydown keyup", function() { | |
return t.eval() | |
}).on("blur", function() { | |
t.noValidate || (t.valid = t.validate()) | |
}).on("focus", function(e) { | |
t.onfocus instanceof Function && t.onfocus.call(t, e) | |
}) | |
}, | |
beforeDestroy: function() { | |
(0, a["default"])(this.$els.input).off() | |
} | |
} | |
}, function(e) { | |
e.exports = '<div class=form-group @click=focus() :class="{\'has-feedback\':icon,\'has-error\':valid===false,\'has-success\':valid===true,validate:!noValidate}" _v-27d010f7=""> <label v-if=label class=control-label _v-27d010f7="">{{label}}</label> <textarea v-if="type==\'textarea\'" class=form-control v-el:input="" v-model=value :cols=cols :rows=rows :name=name :readonly=readonly :required=required :disabled=disabled :maxlength=maxlength :placeholder=placeholder _v-27d010f7=""></textarea> <template v-else="" _v-27d010f7=""> <div v-if=slots.before||slots.after class=input-group _v-27d010f7=""> <slot name=before _v-27d010f7=""></slot> <input class=form-control v-el:input="" v-model=value :name=name :type=type :readonly=readonly :required=required :disabled=disabled :maxlength=maxlength :placeholder=placeholder @keyup.enter=enterSubmit&&submit() _v-27d010f7=""> <slot name=after _v-27d010f7=""></slot> </div> <input v-else="" class=form-control v-el:input="" v-model=value :name=name :type=type :readonly=readonly :required=required :disabled=disabled :maxlength=maxlength :placeholder=placeholder @keyup.enter=enterSubmit&&submit() _v-27d010f7=""> </template> <span v-if="clearButton && value" class=close @click="value = \'\'" _v-27d010f7="">\xd7</span> <span v-if="icon&&valid!==null" class="glyphicon glyphicon-{{valid?\'ok\':\'remove\'}} form-control-feedback" aria-hidden=true _v-27d010f7=""></span> <div v-if=showHelp class=help-block _v-27d010f7="">{{help}}</div> <div v-if=showError class="help-block with-errors" _v-27d010f7="">{{errorText}}</div> </div>' | |
}, function(e, t, n) { | |
n(145), e.exports = n(147), e.exports.__esModule && (e.exports = e.exports["default"]), ("function" == typeof e.exports ? e.exports.options : e.exports).template = n(152) | |
}, function(e, t, n) { | |
var i = n(146); | |
"string" == typeof i && (i = [ | |
[e.id, i, ""] | |
]), n(106)(i, {}), i.locals && (e.exports = i.locals) | |
}, function(e, t, n) { | |
(e.exports = n(105)()).push([e.id, ".modal{-webkit-transition:all .3s ease;transition:all .3s ease}.modal.in{background-color:rgba(0,0,0,.5)}.modal.zoom .modal-dialog{-webkit-transform:scale(.1);transform:scale(.1);top:300px;opacity:0;-webkit-transition:all .3s;transition:all .3s}.modal.zoom.in .modal-dialog{-webkit-transform:scale(1);transform:scale(1);-webkit-transform:translate3d(0,-300px,0);transform:translate3d(0,-300px,0);opacity:1}", ""]) | |
}, function(e, t, n) { | |
"use strict"; | |
function i(e) { | |
return e && e.__esModule ? e : { | |
"default": e | |
} | |
} | |
Object.defineProperty(t, "__esModule", { | |
value: !0 | |
}); | |
var o = i(n(148)), | |
s = i(n(113)), | |
r = i(n(96)), | |
a = i(n(26)); | |
t["default"] = { | |
props: { | |
okText: { | |
type: String, | |
"default": "Save changes" | |
}, | |
cancelText: { | |
type: String, | |
"default": "Close" | |
}, | |
title: { | |
type: String, | |
"default": "" | |
}, | |
show: { | |
required: !0, | |
type: Boolean, | |
coerce: r["default"], | |
twoWay: !0 | |
}, | |
width: { | |
"default": null | |
}, | |
callback: { | |
type: Function, | |
"default": function() {} | |
}, | |
effect: { | |
type: String, | |
"default": null | |
}, | |
backdrop: { | |
type: Boolean, | |
coerce: r["default"], | |
"default": !0 | |
}, | |
large: { | |
type: Boolean, | |
coerce: r["default"], | |
"default": !1 | |
}, | |
small: { | |
type: Boolean, | |
coerce: r["default"], | |
"default": !1 | |
} | |
}, | |
computed: { | |
optionalWidth: function() { | |
return null === this.width ? null : (0, o["default"])(this.width) ? this.width + "px" : this.width | |
} | |
}, | |
watch: { | |
show: function(e) { | |
var t = this, | |
n = this.$el, | |
i = document.body, | |
o = (0, s["default"])(); | |
e ? ((0, a["default"])(n).find(".modal-content").focus(), n.style.display = "block", setTimeout(function() { | |
return (0, a["default"])(n).addClass("in") | |
}, 0), (0, a["default"])(i).addClass("modal-open"), 0 !== o && (i.style.paddingRight = o + "px"), this.backdrop && (0, a["default"])(n).on("click", function(e) { | |
e.target === n && (t.show = !1) | |
})) : ((0, a["default"])(n).on("transitionend", function() { | |
(0, a["default"])(n).off("click transitionend"), n.style.display = "none", i.style.paddingRight = "0" | |
}).removeClass("in"), (0, a["default"])(i).removeClass("modal-open")) | |
} | |
}, | |
methods: { | |
close: function() { | |
this.show = !1 | |
} | |
} | |
} | |
}, function(e, t, n) { | |
e.exports = { | |
"default": n(149), | |
__esModule: !0 | |
} | |
}, function(e, t, n) { | |
n(150), e.exports = n(32).Number.isInteger | |
}, function(e, t, n) { | |
var i = n(30); | |
i(i.S, "Number", { | |
isInteger: n(151) | |
}) | |
}, function(e, t, n) { | |
var i = n(38), | |
o = Math.floor; | |
e.exports = function(e) { | |
return !i(e) && isFinite(e) && o(e) === e | |
} | |
}, function(e) { | |
e.exports = "<div role=dialog v-bind:class=\"{\r\n 'modal':true,\r\n 'fade':effect === 'fade',\r\n 'zoom':effect === 'zoom'\r\n }\"> <div v-bind:class=\"{'modal-dialog':true,'modal-lg':large,'modal-sm':small}\" role=document v-bind:style=\"{width: optionalWidth}\"> <div class=modal-content> <slot name=modal-header> <div class=modal-header> <button type=button class=close @click=close><span>×</span></button> <h4 class=modal-title> <slot name=title> {{title}} </slot> </h4> </div> </slot> <slot name=modal-body> <div class=modal-body></div> </slot> <slot name=modal-footer> <div class=modal-footer> <button type=button class=\"btn btn-default\" @click=close>{{ cancelText }}</button> <button type=button class=\"btn btn-primary\" @click=callback>{{ okText }}</button> </div> </slot> </div> </div> </div>" | |
}, function(e, t, n) { | |
e.exports = n(154), e.exports.__esModule && (e.exports = e.exports["default"]), ("function" == typeof e.exports ? e.exports.options : e.exports).template = n(155) | |
}, function(e, t, n) { | |
"use strict"; | |
function i(e) { | |
return e && e.__esModule ? e : { | |
"default": e | |
} | |
} | |
Object.defineProperty(t, "__esModule", { | |
value: !0 | |
}); | |
var o = i(n(26)); | |
t["default"] = { | |
props: { | |
type: { | |
type: String, | |
"default": "default" | |
}, | |
placement: { | |
type: String, | |
"default": "top" | |
} | |
}, | |
data: function() { | |
return { | |
id: "bs-example-navbar-collapse-1", | |
collapsed: !0, | |
styles: {} | |
} | |
}, | |
computed: { | |
slots: function() { | |
return this._slotContents | |
} | |
}, | |
methods: { | |
toggleCollapse: function(e) { | |
e && e.preventDefault(), this.collapsed = !this.collapsed | |
} | |
}, | |
created: function() { | |
this._navbar = !0 | |
}, | |
ready: function() { | |
var t = this, | |
e = (0, o["default"])('.dropdown>[data-toggle="dropdown"]', this.$el).parent(); | |
e.on("click", ".dropdown-toggle", function(t) { | |
t.preventDefault(), e.each(function(e) { | |
e.contains(t.target) && e.classList.toggle("open") | |
}) | |
}).on("click", ".dropdown-menu>li>a", function(t) { | |
e.each(function(e) { | |
e.contains(t.target) && e.classList.remove("open") | |
}) | |
}).onBlur(function(t) { | |
e.each(function(e) { | |
e.contains(t.target) || e.classList.remove("open") | |
}) | |
}); | |
var n = this.$el.offsetHeight; | |
"top" === this.placement && (document.body.style.paddingTop = n + "px"), "bottom" === this.placement && (document.body.style.paddingBottom = n + "px"), this.slots.collapse && (0, o["default"])('[data-toggle="collapse"]', this.$el).on("click", function(e) { | |
return t.toggleCollapse(e) | |
}) | |
}, | |
beforeDestroy: function() { | |
(0, o["default"])(".dropdown", this.$el).off("click").offBlur(), this.slots.collapse && (0, o["default"])('[data-toggle="collapse"]', this.$el).off("click") | |
} | |
} | |
}, function(e) { | |
e.exports = "<nav v-el:navbar :class=\"['navbar',{\r\n 'navbar-inverse':(type == 'inverse'),\r\n 'navbar-default':(type == 'default'),\r\n 'navbar-fixed-top':(placement === 'top'),\r\n 'navbar-fixed-bottom':(placement === 'bottom'),\r\n 'navbar-static-top':(placement === 'static')\r\n }]\"> <div class=container-fluid> <div class=navbar-header> <button v-if=!slots.collapse type=button class=\"navbar-toggle collapsed\" aria-expanded=false @click=toggleCollapse> <span class=sr-only>Toggle navigation</span> <span class=icon-bar></span> <span class=icon-bar></span> <span class=icon-bar></span> </button> <slot name=collapse></slot> <slot name=brand></slot> </div> <div :class=\"['navbar-collapse',{collapse:collapsed}]\"> <ul class=\"nav navbar-nav\"> <slot></slot> </ul> <ul v-if=slots.right class=\"nav navbar-nav navbar-right\"> <slot name=right></slot> </ul> </div> </div> </nav>" | |
}, function(e, t, n) { | |
n(157), e.exports = n(159), e.exports.__esModule && (e.exports = e.exports["default"]), ("function" == typeof e.exports ? e.exports.options : e.exports).template = n(160) | |
}, function(e, t, n) { | |
var i = n(158); | |
"string" == typeof i && (i = [ | |
[e.id, i, ""] | |
]), n(106)(i, {}), i.locals && (e.exports = i.locals) | |
}, function(e, t, n) { | |
(e.exports = n(105)()).push([e.id, "a span.check-mark[_v-57eb20d0]{position:absolute;display:inline-block;right:15px;margin-top:5px}", ""]) | |
}, function(e, t) { | |
"use strict"; | |
Object.defineProperty(t, "__esModule", { | |
value: !0 | |
}), t["default"] = { | |
props: { | |
value: { | |
type: String | |
} | |
}, | |
data: function() { | |
return { | |
chosen: !1 | |
} | |
}, | |
computed: { | |
chosen: function() { | |
return -1 !== this.$parent.value.indexOf(this.value) | |
} | |
}, | |
methods: { | |
handleClick: function() { | |
var e = this.$parent; | |
if (e.multiple) { | |
var t = e.value.indexOf(this.value); | |
e.value[~t ? "$remove" : "push"](this.value) | |
} else e.value = [this.value], e.show = !1 | |
} | |
} | |
} | |
}, function(e) { | |
e.exports = '<li style=position:relative _v-57eb20d0=""> <a @mousedown.prevent=handleClick style=cursor:pointer _v-57eb20d0=""> <span v-el:v="" _v-57eb20d0=""><slot _v-57eb20d0=""></slot></span> <span class="glyphicon glyphicon-ok check-mark" v-show=chosen _v-57eb20d0=""></span> </a> </li>' | |
}, function(e, t, n) { | |
n(162), e.exports = n(164), e.exports.__esModule && (e.exports = e.exports["default"]), ("function" == typeof e.exports ? e.exports.options : e.exports).template = n(165) | |
}, function(e, t, n) { | |
var i = n(163); | |
"string" == typeof i && (i = [ | |
[e.id, i, ""] | |
]), n(106)(i, {}), i.locals && (e.exports = i.locals) | |
}, function(e, t, n) { | |
(e.exports = n(105)()).push([e.id, ".accordion-toggle{cursor:pointer}.collapse-transition{-webkit-transition:max-height .5s ease;transition:max-height .5s ease}.collapse-enter,.collapse-leave{max-height:0!important}", ""]) | |
}, function(e, t, n) { | |
"use strict"; | |
function i(e) { | |
return e && e.__esModule ? e : { | |
"default": e | |
} | |
} | |
Object.defineProperty(t, "__esModule", { | |
value: !0 | |
}); | |
var o = i(n(96)); | |
t["default"] = { | |
props: { | |
header: { | |
type: String | |
}, | |
isOpen: { | |
type: Boolean, | |
coerce: o["default"], | |
"default": !1 | |
}, | |
type: { | |
type: String, | |
"default": null | |
} | |
}, | |
computed: { | |
panelType: function() { | |
return "panel-" + (this.type || this.$parent && this.$parent.type || "default") | |
} | |
}, | |
methods: { | |
toggle: function() { | |
this.isOpen = !this.isOpen, this.$dispatch("isOpenEvent", this) | |
} | |
}, | |
transitions: { | |
collapse: { | |
afterEnter: function(e) { | |
e.style.maxHeight = "", e.style.overflow = "" | |
}, | |
beforeLeave: function(e) { | |
return e.style.maxHeight = e.offsetHeight + "px", e.style.overflow = "hidden", e.offsetHeight | |
} | |
} | |
} | |
} | |
}, function(e) { | |
e.exports = '<div class="panel {{panelType}}"> <div class=panel-heading> <h4 class=panel-title> <a class=accordion-toggle @click=toggle()> <slot name=header> {{ header }} </slot> </a> </h4> </div> <div class=panel-collapse v-el:panel v-show=isOpen transition=collapse> <div class=panel-body> <slot></slot> </div> </div> </div>' | |
}, function(e, t, n) { | |
n(167), e.exports = n(169), e.exports.__esModule && (e.exports = e.exports["default"]), ("function" == typeof e.exports ? e.exports.options : e.exports).template = n(171) | |
}, function(e, t, n) { | |
var i = n(168); | |
"string" == typeof i && (i = [ | |
[e.id, i, ""] | |
]), n(106)(i, {}), i.locals && (e.exports = i.locals) | |
}, function(e, t, n) { | |
(e.exports = n(105)()).push([e.id, ".fade-transition,.scale-transition{display:block}.scale-enter{-webkit-animation:scale-in .15s ease-in;animation:scale-in .15s ease-in}.scale-leave{-webkit-animation:scale-out .15s ease-out;animation:scale-out .15s ease-out}@-webkit-keyframes scale-in{0%{-webkit-transform:scale(0);transform:scale(0);opacity:0}to{-webkit-transform:scale(1);transform:scale(1);opacity:1}}@keyframes scale-in{0%{-webkit-transform:scale(0);transform:scale(0);opacity:0}to{-webkit-transform:scale(1);transform:scale(1);opacity:1}}@-webkit-keyframes scale-out{0%{-webkit-transform:scale(1);transform:scale(1);opacity:1}to{-webkit-transform:scale(0);transform:scale(0);opacity:0}}@keyframes scale-out{0%{-webkit-transform:scale(1);transform:scale(1);opacity:1}to{-webkit-transform:scale(0);transform:scale(0);opacity:0}}", ""]) | |
}, function(e, t, n) { | |
"use strict"; | |
function i(e) { | |
return e && e.__esModule ? e : { | |
"default": e | |
} | |
} | |
Object.defineProperty(t, "__esModule", { | |
value: !0 | |
}); | |
var o = i(n(170)); | |
t["default"] = { | |
mixins: [o["default"]], | |
props: { | |
trigger: { | |
type: String, | |
"default": "click" | |
} | |
} | |
} | |
}, function(e, t, n) { | |
"use strict"; | |
function i(e) { | |
return e && e.__esModule ? e : { | |
"default": e | |
} | |
} | |
Object.defineProperty(t, "__esModule", { | |
value: !0 | |
}); | |
var o = i(n(96)), | |
s = i(n(26)); | |
t["default"] = { | |
props: { | |
trigger: { | |
type: String | |
}, | |
effect: { | |
type: String, | |
"default": "fadein" | |
}, | |
title: { | |
type: String | |
}, | |
content: { | |
type: String | |
}, | |
header: { | |
type: Boolean, | |
coerce: o["default"], | |
"default": !0 | |
}, | |
placement: { | |
type: String | |
} | |
}, | |
data: function() { | |
return { | |
position: { | |
top: 0, | |
left: 0 | |
}, | |
show: !0 | |
} | |
}, | |
methods: { | |
toggle: function(e) { | |
this.show = e instanceof Boolean ? e : !this.show | |
} | |
}, | |
ready: function() { | |
var e = this, | |
t = this.$els.popover; | |
if (!t) return console.error("Could not find popover v-el in your component that uses popoverMixin."); | |
var n = this.$els.trigger.children[0]; | |
switch (this.placement) { | |
case "top": | |
this.position.left = n.offsetLeft - t.offsetWidth / 2 + n.offsetWidth / 2, this.position.top = n.offsetTop - t.offsetHeight; | |
break; | |
case "left": | |
this.position.left = n.offsetLeft - t.offsetWidth, this.position.top = n.offsetTop + n.offsetHeight / 2 - t.offsetHeight / 2; | |
break; | |
case "right": | |
this.position.left = n.offsetLeft + n.offsetWidth, this.position.top = n.offsetTop + n.offsetHeight / 2 - t.offsetHeight / 2; | |
break; | |
case "bottom": | |
this.position.left = n.offsetLeft - t.offsetWidth / 2 + n.offsetWidth / 2, this.position.top = n.offsetTop + n.offsetHeight; | |
break; | |
default: | |
console.warn("Wrong placement prop") | |
} | |
t.style.top = this.position.top + "px", t.style.left = this.position.left + "px", t.style.display = "none", this.show = !this.show; | |
var i = "contextmenu" === this.trigger ? "contextmenu" : "hover" === this.trigger ? ["mouseleave", "mouseenter"] : "focus" === this.trigger ? ["blur", "focus"] : ["click"]; | |
(0, s["default"])(n).on(i, function() { | |
return e.toggle() | |
}) | |
}, | |
beforeDestroy: function() { | |
(0, s["default"])(this.$els.trigger.children[0]).off() | |
} | |
} | |
}, function(e) { | |
e.exports = "<span v-el:trigger> <slot></slot> </span> <div v-el:popover v-show=show :class=\"['popover',placement]\" :transition=effect> <div class=arrow></div> <h3 class=popover-title v-if=title> <slot name=title>{{title}}</slot> </h3> <div class=popover-content> <slot name=content>{{{content}}}</slot> </div> </div>" | |
}, function(e, t, n) { | |
e.exports = n(173), e.exports.__esModule && (e.exports = e.exports["default"]), ("function" == typeof e.exports ? e.exports.options : e.exports).template = n(174) | |
}, function(e, t, n) { | |
"use strict"; | |
function i(e) { | |
return e && e.__esModule ? e : { | |
"default": e | |
} | |
} | |
Object.defineProperty(t, "__esModule", { | |
value: !0 | |
}); | |
var o = i(n(96)), | |
s = i(n(100)); | |
t["default"] = { | |
props: { | |
now: { | |
type: Number, | |
coerce: s["default"], | |
required: !0 | |
}, | |
label: { | |
type: Boolean, | |
coerce: o["default"], | |
"default": !1 | |
}, | |
type: { | |
type: String | |
}, | |
striped: { | |
type: Boolean, | |
coerce: o["default"], | |
"default": !1 | |
}, | |
animated: { | |
type: Boolean, | |
coerce: o["default"], | |
"default": !1 | |
} | |
} | |
} | |
}, function(e) { | |
e.exports = "<div role=progressbar :class=\"['progress-bar',{\r\n 'progress-bar-success':type == 'success',\r\n 'progress-bar-warning':type == 'warning',\r\n 'progress-bar-info':type == 'info',\r\n 'progress-bar-danger':type == 'danger',\r\n 'progress-bar-striped':striped,\r\n 'active':animated\r\n }]\" :style=\"{width: now + '%'}\"> {{label ? now + '%' : ''}} </div>" | |
}, function(e, t, n) { | |
n(176), e.exports = n(178), e.exports.__esModule && (e.exports = e.exports["default"]), ("function" == typeof e.exports ? e.exports.options : e.exports).template = n(179) | |
}, function(e, t, n) { | |
var i = n(177); | |
"string" == typeof i && (i = [ | |
[e.id, i, ""] | |
]), n(106)(i, {}), i.locals && (e.exports = i.locals) | |
}, function(e, t, n) { | |
(e.exports = n(105)()).push([e.id, ".radio{position:relative}.radio>label>input{position:absolute;margin:0;padding:0;opacity:0;z-index:-1;box-sizing:border-box}.radio>label>.icon{position:absolute;top:.15rem;left:0;display:block;width:1.4rem;height:1.4rem;text-align:center;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;border-radius:.7rem;background-repeat:no-repeat;background-position:50%;background-size:50% 50%}.radio:not(.active)>label>.icon{background-color:#ddd;border:1px solid #bbb}.radio>label>input:focus~.icon{outline:0;border:1px solid #66afe9;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6)}.radio.active>label>.icon{background-size:1rem 1rem;background-image:url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjxzdmcgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxjaXJjbGUgY3g9IjUiIGN5PSI1IiByPSI0IiBmaWxsPSIjZmZmIi8+PC9zdmc+)}.radio.active .btn-default{-webkit-filter:brightness(75%);filter:brightness(75%)}.btn.readonly,.radio.disabled>label>.icon,.radio.readonly>label>.icon{filter:alpha(opacity=65);box-shadow:none;opacity:.65}label.btn>input[type=radio]{position:absolute;clip:rect(0,0,0,0);pointer-events:none}", ""]) | |
}, function(e, t, n) { | |
"use strict"; | |
function i(e) { | |
return e && e.__esModule ? e : { | |
"default": e | |
} | |
} | |
Object.defineProperty(t, "__esModule", { | |
value: !0 | |
}); | |
var o = i(n(96)); | |
t["default"] = { | |
props: { | |
value: { | |
"default": !0 | |
}, | |
checked: { | |
twoWay: !0 | |
}, | |
button: { | |
type: Boolean, | |
coerce: o["default"], | |
"default": !1 | |
}, | |
disabled: { | |
type: Boolean, | |
coerce: o["default"], | |
"default": !1 | |
}, | |
name: { | |
type: String, | |
"default": null | |
}, | |
readonly: { | |
type: Boolean, | |
coerce: o["default"], | |
"default": !1 | |
}, | |
type: { | |
type: String, | |
"default": null | |
} | |
}, | |
computed: { | |
active: function() { | |
return this.group ? this.$parent.value === this.value : this.value === this.checked | |
}, | |
buttonStyle: function() { | |
return this.button || this.group && this.$parent.buttons | |
}, | |
group: function() { | |
return this.$parent && this.$parent._radioGroup | |
}, | |
typeColor: function() { | |
return this.type || this.$parent && this.$parent.type || "default" | |
} | |
}, | |
created: function() { | |
var e = this.$parent; | |
e && e._btnGroup && !e._checkboxGroup && (e._radioGroup = !0) | |
}, | |
ready: function() { | |
this.$parent._radioGroup && (this.$parent.value ? this.checked = this.$parent.value === this.value : this.checked && (this.$parent.value = this.value)) | |
}, | |
methods: { | |
focus: function() { | |
this.$els.input.focus() | |
}, | |
toggle: function() { | |
this.disabled || (this.focus(), this.readonly || (this.checked = this.value, this.group && (this.$parent.value = this.value))) | |
} | |
} | |
} | |
}, function(e) { | |
e.exports = "<label v-if=buttonStyle :class=\"['btn btn-'+typeColor,{active:active,disabled:disabled,readonly:readonly}]\" @click.prevent=toggle> <input type=radio autocomplete=off v-el:input v-show=!readonly :checked=active :value=value :name=name :readonly=readonly :disabled=disabled /> <slot></slot> </label> <div v-else :class=\"['radio',typeColor,{active:active,disabled:disabled,readonly:readonly}]\" @click.prevent=toggle> <label class=open> <input type=radio autocomplete=off v-el:input :checked=active :value=value :name=name :readonly=readonly :disabled=disabled /> <span class=\"icon dropdown-toggle\" :class=\"[active?'btn-'+typeColor:'',{bg:typeColor==='default'}]\"></span> <span v-if=\"active&&typeColor==='default'\" class=icon></span> <slot></slot> </label> </div>" | |
}, function(e, t, n) { | |
n(181), e.exports = n(183), e.exports.__esModule && (e.exports = e.exports["default"]), ("function" == typeof e.exports ? e.exports.options : e.exports).template = n(200) | |
}, function(e, t, n) { | |
var i = n(182); | |
"string" == typeof i && (i = [ | |
[e.id, i, ""] | |
]), n(106)(i, {}), i.locals && (e.exports = i.locals) | |
}, function(e, t, n) { | |
(e.exports = n(105)()).push([e.id, ".btn-select[_v-1f77809f]{display:inline-block}.btn-select>.btn-group>.dropdown-menu>li[_v-1f77809f]{position:relative}.btn-select>.btn-group>.dropdown-menu>li>a[_v-1f77809f]{cursor:pointer}.bs-searchbox[_v-1f77809f]{position:relative;margin:4px 8px}.bs-searchbox .close[_v-1f77809f]{position:absolute;top:0;right:0;z-index:2;display:block;width:34px;height:34px;line-height:34px;text-align:center}button>.close[_v-1f77809f]{margin-left:5px}.btn-group>.notify[_v-1f77809f]{position:relative}.btn-group .dropdown-menu .notify[_v-1f77809f],.btn-group .notify>div[_v-1f77809f]{position:absolute;width:96%;margin:0 2%;min-height:26px;padding:3px 5px;background:#f5f5f5;border:1px solid #e3e3e3;box-shadow:inset 0 1px 1px rgba(0,0,0,.05);pointer-events:none}.btn-group .notify>div[_v-1f77809f]{top:5px;z-index:1}.btn-group .dropdown-menu .notify[_v-1f77809f]{opacity:.9;bottom:5px}.btn-group.btn-group-justified .dropdown-menu[_v-1f77809f]{width:100%}span.caret[_v-1f77809f]{float:right;margin-top:9px;margin-left:5px}.secret[_v-1f77809f]{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.bs-searchbox input[_v-1f77809f]:focus,.secret:focus+button[_v-1f77809f]{outline:0;border-color:#66afe9!important;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6)}", ""]) | |
}, function(e, t, n) { | |
"use strict"; | |
function i(e) { | |
return e && e.__esModule ? e : { | |
"default": e | |
} | |
} | |
Object.defineProperty(t, "__esModule", { | |
value: !0 | |
}); | |
var c = i(n(184)), | |
d = i(n(87)), | |
o = i(n(199)), | |
u = n(96), | |
h = i(u), | |
s = i(n(100)), | |
r = i(n(132)), | |
a = i(n(26)), | |
l = {}; | |
t["default"] = { | |
props: { | |
value: { | |
twoWay: !0 | |
}, | |
options: { | |
twoWay: !0, | |
type: Array, | |
"default": function() { | |
return [] | |
} | |
}, | |
multiple: { | |
type: Boolean, | |
coerce: h["default"], | |
"default": !1 | |
}, | |
clearButton: { | |
type: Boolean, | |
coerce: h["default"], | |
"default": !1 | |
}, | |
closeOnSelect: { | |
type: Boolean, | |
coerce: h["default"], | |
"default": !1 | |
}, | |
disabled: { | |
type: Boolean, | |
coerce: h["default"], | |
"default": !1 | |
}, | |
justified: { | |
type: Boolean, | |
coerce: h["default"], | |
"default": !1 | |
}, | |
lang: { | |
type: String, | |
"default": navigator.language | |
}, | |
limit: { | |
type: Number, | |
coerce: s["default"], | |
"default": 1024 | |
}, | |
name: { | |
type: String, | |
"default": null | |
}, | |
parent: { | |
"default": !0 | |
}, | |
placeholder: { | |
type: String, | |
"default": null | |
}, | |
readonly: { | |
type: Boolean, | |
coerce: h["default"], | |
"default": null | |
}, | |
required: { | |
type: Boolean, | |
coerce: h["default"], | |
"default": null | |
}, | |
minSearch: { | |
type: Number, | |
coerce: s["default"], | |
"default": 0 | |
}, | |
search: { | |
type: Boolean, | |
coerce: h["default"], | |
"default": !1 | |
}, | |
searchText: { | |
type: String, | |
"default": null | |
}, | |
url: { | |
type: String, | |
"default": null | |
} | |
}, | |
data: function() { | |
return { | |
loading: null, | |
searchValue: null, | |
show: !1, | |
showNotify: !1 | |
} | |
}, | |
computed: { | |
selectedItems: function() { | |
var e = [], | |
t = this.values; | |
if (t.length) { | |
var n = !0, | |
i = !1, | |
o = void 0; | |
try { | |
for (var s, r = (0, d["default"])(t); !(n = (s = r.next()).done); n = !0) { | |
var a = s.value; | |
if (0 === this.options.length) e = t; | |
else if (~["number", "string"].indexOf(void 0 === a ? "undefined" : (0, c["default"])(a))) { | |
var l = void 0; | |
this.options.some(function(e) { | |
if (e instanceof Object && e.value === a || e === a) return l = e, !0 | |
}), l && e.push(l.label || l) | |
} | |
} | |
} catch (h) { | |
i = !0, o = h | |
} finally { | |
try { | |
!n && r["return"] && r["return"]() | |
} finally { | |
if (i) throw o | |
} | |
} | |
} | |
return e.join(", ") | |
}, | |
canSearch: function() { | |
return this.minSearch ? this.options.length >= this.minSearch : this.search | |
}, | |
limitText: function() { | |
return this.text.limit.replace("{{limit}}", this.limit) | |
}, | |
showPlaceholder: function() { | |
return 0 !== this.values.length && this.hasParent ? null : this.placeholder || this.text.notSelected | |
}, | |
text: function() { | |
return (0, r["default"])(this.lang) | |
}, | |
hasParent: function() { | |
return this.parent instanceof Array ? this.parent.length : this.parent | |
}, | |
values: function() { | |
return this.value instanceof Array ? this.value : null !== this.value && void 0 !== this.value ? [this.value] : [] | |
} | |
}, | |
watch: { | |
options: function(e) { | |
var t = !1; | |
if (e instanceof Array && e.length) | |
for (var n in e) e[n] instanceof Object || (e[n] = { | |
label: e[n], | |
value: e[n] | |
}, t = !0); | |
t && (this.options = e) | |
}, | |
value: function(e) { | |
var t = this; | |
this.value instanceof Array && e.length > this.limit && (this.showNotify = !0, l.limit && clearTimeout(l.limit), l.limit = setTimeout(function() { | |
l.limit = !1, t.showNotify = !1 | |
}, 1500)), this.checkValue() | |
}, | |
show: function(e) { | |
e && (this.$els.sel.focus(), this.$els.search && this.$els.search.focus()) | |
}, | |
url: function() { | |
this.update() | |
} | |
}, | |
methods: { | |
select: function(e) { | |
this.value instanceof Array ? (~this.value.indexOf(e) ? this.value.$remove(e) : this.value.push(e), this.closeOnSelect && this.toggle()) : (this.value = e, this.toggle()) | |
}, | |
clear: function() { | |
this.disabled || this.readonly || (this.value = this.value instanceof Array ? [] : null, this.toggle()) | |
}, | |
clearSearch: function() { | |
this.searchValue = "", this.$els.search.focus() | |
}, | |
checkValue: function() { | |
!this.multiple || this.value instanceof Array || (this.value = null === this.value || void 0 === this.value ? [] : [this.value]), !this.multiple && this.value instanceof Array && (this.value = this.value.length ? this.value.pop() : null), this.limit < 1 && (this.limit = 1), this.values.length > this.limit && (this.value = this.value.slice(0, this.limit)) | |
}, | |
isSelected: function(e) { | |
return -1 < this.values.indexOf(e) | |
}, | |
toggle: function() { | |
this.show = !this.show | |
}, | |
blur: function() { | |
this.show = !1 | |
}, | |
update: function() { | |
var l = this; | |
this.url && (this.loading = !0, (0, o["default"])(this.url, function(e) { | |
var t = [], | |
n = !0, | |
i = !1, | |
o = void 0; | |
try { | |
for (var s, r = (0, d["default"])(e); !(n = (s = r.next()).done); n = !0) { | |
var a = s.value; | |
void 0 !== a.value && void 0 !== a.label && t.push({ | |
value: a.value, | |
label: a.label | |
}) | |
} | |
} catch (u) { | |
i = !0, o = u | |
} finally { | |
try { | |
!n && r["return"] && r["return"]() | |
} finally { | |
if (i) throw o | |
} | |
}(l.options = t).length || (l.value = l.value instanceof Array ? [] : null) | |
}).always(function() { | |
l.loading = !1, l.checkValue() | |
})) | |
} | |
}, | |
created: function() { | |
void 0 !== this.value && this.parent || (this.value = null), !this.multiple && this.value instanceof Array && (this.value = this.value.shift()), this.checkValue(), this.url && this.update() | |
}, | |
ready: function() { | |
var e = this; | |
(0, a["default"])(this.$els.select).onBlur(function() { | |
e.show = !1 | |
}) | |
}, | |
beforeDestroy: function() { | |
(0, a["default"])(this.$els.select).offBlur() | |
} | |
} | |
}, function(e, t, n) { | |
"use strict"; | |
function i(e) { | |
return e && e.__esModule ? e : { | |
"default": e | |
} | |
} | |
t.__esModule = !0; | |
var o = i(n(45)), | |
s = i(n(185)), | |
r = "function" == typeof s["default"] && "symbol" == typeof o["default"] ? function(e) { | |
return typeof e | |
} : function(e) { | |
return e && "function" == typeof s["default"] && e.constructor === s["default"] ? "symbol" : typeof e | |
}; | |
t["default"] = "function" == typeof s["default"] && "symbol" === r(o["default"]) ? function(e) { | |
return void 0 === e ? "undefined" : r(e) | |
} : function(e) { | |
return e && "function" == typeof s["default"] && e.constructor === s["default"] ? "symbol" : void 0 === e ? "undefined" : r(e) | |
} | |
}, function(e, t, n) { | |
e.exports = { | |
"default": n(186), | |
__esModule: !0 | |
} | |
}, function(e, t, n) { | |
n(187), n(196), n(197), n(198), e.exports = n(32).Symbol | |
}, function(e, t, n) { | |
"use strict"; | |
var i = n(31), | |
r = n(54), | |
o = n(40), | |
s = n(30), | |
a = n(53), | |
l = n(188).KEY, | |
c = n(41), | |
d = n(68), | |
u = n(72), | |
h = n(69), | |
p = n(73), | |
f = n(80), | |
m = n(189), | |
g = n(190), | |
v = n(191), | |
y = n(194), | |
b = n(37), | |
w = n(61), | |
_ = n(43), | |
x = n(44), | |
k = n(57), | |
C = n(85), | |
S = n(195), | |
T = n(36), | |
$ = n(59), | |
D = S.f, | |
A = T.f, | |
E = C.f, | |
O = i.Symbol, | |
M = i.JSON, | |
P = M && M.stringify, | |
L = "prototype", | |
I = p("_hidden"), | |
R = p("toPrimitive"), | |
N = {}.propertyIsEnumerable, | |
z = d("symbol-registry"), | |
j = d("symbols"), | |
F = d("op-symbols"), | |
H = Object[L], | |
W = "function" == typeof O, | |
B = i.QObject, | |
U = !B || !B[L] || !B[L].findChild, | |
V = o && c(function() { | |
return 7 != k(A({}, "a", { | |
get: function() { | |
return A(this, "a", { | |
value: 7 | |
}).a | |
} | |
})).a | |
}) ? function(e, t, n) { | |
var i = D(H, t); | |
i && delete H[t], A(e, t, n), i && e !== H && A(H, t, i) | |
} : A, | |
q = function(e) { | |
var t = j[e] = k(O[L]); | |
return t._k = e, t | |
}, | |
Y = W && "symbol" == typeof O.iterator ? function(e) { | |
return "symbol" == typeof e | |
} : function(e) { | |
return e instanceof O | |
}, | |
G = function(e, t, n) { | |
return e === H && G(F, t, n), b(e), t = _(t, !0), b(n), r(j, t) ? (n.enumerable ? (r(e, I) && e[I][t] && (e[I][t] = !1), n = k(n, { | |
enumerable: x(0, !1) | |
})) : (r(e, I) || A(e, I, x(1, {})), e[I][t] = !0), V(e, t, n)) : A(e, t, n) | |
}, | |
X = function(e, t) { | |
b(e); | |
for (var n, i = v(t = w(t)), o = 0, s = i.length; o < s;) G(e, n = i[o++], t[n]); | |
return e | |
}, | |
Z = function(e, t) { | |
return void 0 === t ? k(e) : X(k(e), t) | |
}, | |
J = function(e) { | |
var t = N.call(this, e = _(e, !0)); | |
return !(this === H && r(j, e) && !r(F, e)) && (!(t || !r(this, e) || !r(j, e) || r(this, I) && this[I][e]) || t) | |
}, | |
K = function(e, t) { | |
if (e = w(e), t = _(t, !0), e !== H || !r(j, t) || r(F, t)) { | |
var n = D(e, t); | |
return !n || !r(j, t) || r(e, I) && e[I][t] || (n.enumerable = !0), n | |
} | |
}, | |
Q = function(e) { | |
for (var t, n = E(w(e)), i = [], o = 0; n.length > o;) r(j, t = n[o++]) || t == I || t == l || i.push(t); | |
return i | |
}, | |
ee = function(e) { | |
for (var t, n = e === H, i = E(n ? F : w(e)), o = [], s = 0; i.length > s;) !r(j, t = i[s++]) || n && !r(H, t) || o.push(j[t]); | |
return o | |
}; | |
W || (a((O = function(e) { | |
if (this instanceof O) throw TypeError("Symbol is not a constructor!"); | |
var t = h(0 < arguments.length ? e : void 0), | |
n = function(e) { | |
this === H && n.call(F, e), r(this, I) && r(this[I], t) && (this[I][t] = !1), V(this, t, x(1, e)) | |
}; | |
return o && U && V(H, t, { | |
configurable: !0, | |
set: n | |
}), q(t) | |
})[L], "toString", function() { | |
return this._k | |
}), S.f = K, T.f = G, n(86).f = C.f = Q, n(193).f = J, n(192).f = ee, o && !n(52) && a(H, "propertyIsEnumerable", J, !0), f.f = function(e) { | |
return q(p(e)) | |
}), s(s.G + s.W + s.F * !W, { | |
Symbol: O | |
}); | |
for (var te = "hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","), ne = 0; te.length > ne;) p(te[ne++]); | |
for (te = $(p.store), ne = 0; te.length > ne;) m(te[ne++]); | |
s(s.S + s.F * !W, "Symbol", { | |
"for": function(e) { | |
return r(z, e += "") ? z[e] : z[e] = O(e) | |
}, | |
keyFor: function(e) { | |
if (Y(e)) return g(z, e); | |
throw TypeError(e + " is not a symbol!") | |
}, | |
useSetter: function() { | |
U = !0 | |
}, | |
useSimple: function() { | |
U = !1 | |
} | |
}), s(s.S + s.F * !W, "Object", { | |
create: Z, | |
defineProperty: G, | |
defineProperties: X, | |
getOwnPropertyDescriptor: K, | |
getOwnPropertyNames: Q, | |
getOwnPropertySymbols: ee | |
}), M && s(s.S + s.F * (!W || c(function() { | |
var e = O(); | |
return "[null]" != P([e]) || "{}" != P({ | |
a: e | |
}) || "{}" != P(Object(e)) | |
})), "JSON", { | |
stringify: function(e) { | |
if (void 0 !== e && !Y(e)) { | |
for (var t, n, i = [e], o = 1; arguments.length > o;) i.push(arguments[o++]); | |
return "function" == typeof(t = i[1]) && (n = t), !n && y(t) || (t = function(e, t) { | |
if (n && (t = n.call(this, e, t)), !Y(t)) return t | |
}), i[1] = t, P.apply(M, i) | |
} | |
} | |
}), O[L][R] || n(35)(O[L], R, O[L].valueOf), u(O, "Symbol"), u(Math, "Math", !0), u(i.JSON, "JSON", !0) | |
}, function(e, t, n) { | |
var i = n(69)("meta"), | |
o = n(38), | |
s = n(54), | |
r = n(36).f, | |
a = 0, | |
l = Object.isExtensible || function() { | |
return !0 | |
}, | |
c = !n(41)(function() { | |
return l(Object.preventExtensions({})) | |
}), | |
d = function(e) { | |
r(e, i, { | |
value: { | |
i: "O" + ++a, | |
w: {} | |
} | |
}) | |
}, | |
u = function(e, t) { | |
if (!o(e)) return "symbol" == typeof e ? e : ("string" == typeof e ? "S" : "P") + e; | |
if (!s(e, i)) { | |
if (!l(e)) return "F"; | |
if (!t) return "E"; | |
d(e) | |
} | |
return e[i].i | |
}, | |
h = function(e, t) { | |
if (!s(e, i)) { | |
if (!l(e)) return !0; | |
if (!t) return !1; | |
d(e) | |
} | |
return e[i].w | |
}, | |
p = function(e) { | |
return c && f.NEED && l(e) && !s(e, i) && d(e), e | |
}, | |
f = e.exports = { | |
KEY: i, | |
NEED: !1, | |
fastKey: u, | |
getWeak: h, | |
onFreeze: p | |
} | |
}, function(e, t, n) { | |
var i = n(31), | |
o = n(32), | |
s = n(52), | |
r = n(80), | |
a = n(36).f; | |
e.exports = function(e) { | |
var t = o.Symbol || (o.Symbol = s ? {} : i.Symbol || {}); | |
"_" == e.charAt(0) || e in t || a(t, e, { | |
value: r.f(e) | |
}) | |
} | |
}, function(e, t, n) { | |
var a = n(59), | |
l = n(61); | |
e.exports = function(e, t) { | |
for (var n, i = l(e), o = a(i), s = o.length, r = 0; r < s;) | |
if (i[n = o[r++]] === t) return n | |
} | |
}, function(e, t, n) { | |
var a = n(59), | |
l = n(192), | |
c = n(193); | |
e.exports = function(e) { | |
var t = a(e), | |
n = l.f; | |
if (n) | |
for (var i, o = n(e), s = c.f, r = 0; o.length > r;) s.call(e, i = o[r++]) && t.push(i); | |
return t | |
} | |
}, function(e, t) { | |
t.f = Object.getOwnPropertySymbols | |
}, function(e, t) { | |
t.f = {}.propertyIsEnumerable | |
}, function(e, t, n) { | |
var i = n(63); | |
e.exports = Array.isArray || function(e) { | |
return "Array" == i(e) | |
} | |
}, function(e, t, n) { | |
var i = n(193), | |
o = n(44), | |
s = n(61), | |
r = n(43), | |
a = n(54), | |
l = n(39), | |
c = Object.getOwnPropertyDescriptor; | |
t.f = n(40) ? c : function(e, t) { | |
if (e = s(e), t = r(t, !0), l) try { | |
return c(e, t) | |
} catch (n) {} | |
if (a(e, t)) return o(!i.f.call(e, t), e[t]) | |
} | |
}, function() {}, function(e, t, n) { | |
n(189)("asyncIterator") | |
}, function(e, t, n) { | |
n(189)("observable") | |
}, function(e, t, n) { | |
"use strict"; | |
function i(e) { | |
return e && e.__esModule ? e : { | |
"default": e | |
} | |
} | |
Object.defineProperty(t, "__esModule", { | |
value: !0 | |
}); | |
var T = i(n(87)); | |
t["default"] = function(e, t) { | |
for (var C = new window.XMLHttpRequest, S = {}, i = { | |
then: function(e, t, n) { | |
return i.done(e).fail(t).always(n) | |
} | |
}, n = ["done", "fail", "always"], o = function() { | |
var t = n[s]; | |
S[t] = [], i[t] = function(e) { | |
return e instanceof Function && S[t].push(e), i | |
} | |
}, s = 0; s < n.length; s++) o(); | |
return i.done(t), C.onreadystatechange = function() { | |
if (4 === C.readyState) { | |
if (200 === C.status) try { | |
var e = JSON.parse(C.responseText), | |
t = !0, | |
n = !1, | |
i = void 0; | |
try { | |
for (var o, s = (0, T["default"])(S.done); !(t = (o = s.next()).done); t = !0) { | |
(0, o.value)(e) | |
} | |
} catch (x) { | |
n = !0, i = x | |
} finally { | |
try { | |
!t && s["return"] && s["return"]() | |
} finally { | |
if (n) throw i | |
} | |
} | |
} catch (k) { | |
var r = !0, | |
a = !1, | |
l = void 0; | |
try { | |
for (var c, d = (0, T["default"])(S.fail); !(r = (c = d.next()).done); r = !0) { | |
var u = c.value; | |
u(k) | |
} | |
} catch (x) { | |
a = !0, l = x | |
} finally { | |
try { | |
!r && d["return"] && d["return"]() | |
} finally { | |
if (a) throw l | |
} | |
} | |
} else { | |
var h = !0, | |
p = !1, | |
f = void 0; | |
try { | |
for (var m, g = (0, T["default"])(S.fail); !(h = (m = g.next()).done); h = !0) { | |
(0, m.value)({ | |
status: C.status | |
}) | |
} | |
} catch (x) { | |
p = !0, f = x | |
} finally { | |
try { | |
!h && g["return"] && g["return"]() | |
} finally { | |
if (p) throw f | |
} | |
} | |
} | |
var v = !0, | |
y = !1, | |
b = void 0; | |
try { | |
for (var w, _ = (0, T["default"])(S.always); !(v = (w = _.next()).done); v = !0) { | |
(0, w.value)({ | |
status: C.status | |
}) | |
} | |
} catch (x) { | |
y = !0, b = x | |
} finally { | |
try { | |
!v && _["return"] && _["return"]() | |
} finally { | |
if (y) throw b | |
} | |
} | |
} | |
}, C.open("GET", e), C.setRequestHeader("Accept", "application/json"), C.send(), i | |
} | |
}, function(e) { | |
e.exports = '<div v-el:select="" :class="{\'btn-group btn-group-justified\': justified, \'btn-select\': !justified}" _v-1f77809f=""> <slot name=before _v-1f77809f=""></slot> <div :class={open:show,dropdown:!justified} _v-1f77809f=""> <select v-el:sel="" v-model=value v-show=show name={{name}} class=secret :multiple=multiple :required=required :readonly=readonly :disabled=disabled _v-1f77809f=""> <option v-if=required value="" _v-1f77809f=""></option> <option v-for="option in options" :value=option.value||option _v-1f77809f="">{{ option.label||option }}</option> </select> <button type=button class="form-control dropdown-toggle" :disabled="disabled || !hasParent" :readonly=readonly @click=toggle() @keyup.esc="show = false" _v-1f77809f=""> <span class=btn-content _v-1f77809f="">{{ loading ? text.loading : showPlaceholder || selectedItems }}</span> <span class=caret _v-1f77809f=""></span> <span v-if=clearButton&&values.length class=close @click=clear() _v-1f77809f="">\xd7</span> </button> <ul class=dropdown-menu _v-1f77809f=""> <template v-if=options.length _v-1f77809f=""> <li v-if=canSearch class=bs-searchbox _v-1f77809f=""> <input type=text placeholder={{searchText||text.search}} class=form-control autocomplete=off v-el:search="" v-model=searchValue @keyup.esc="show = false" _v-1f77809f=""> <span v-show=searchValue class=close @click=clearSearch _v-1f77809f="">\xd7</span> </li> <li v-if=required&&!clearButton _v-1f77809f=""><a @mousedown.prevent="clear() && blur()" _v-1f77809f="">{{ placeholder || text.notSelected }}</a></li> <li v-for="option in options | filterBy searchValue" :id=option.value||option _v-1f77809f=""> <a @mousedown.prevent=select(option.value||option) _v-1f77809f=""> {{ option.label||option }} <span class="glyphicon glyphicon-ok check-mark" v-show=isSelected(option.value||option) _v-1f77809f=""></span> </a> </li> </template> <slot v-else="" _v-1f77809f=""></slot> <div v-if="showNotify && !closeOnSelect" class=notify transition=fadein _v-1f77809f="">{{limitText}}</div> </ul> <div v-if="showNotify && closeOnSelect" class=notify transition=fadein _v-1f77809f=""><div _v-1f77809f="">{{limitText}}</div></div> </div> <slot name=after _v-1f77809f=""></slot> </div>' | |
}, function(e, t, n) { | |
e.exports = n(202), e.exports.__esModule && (e.exports = e.exports["default"]), ("function" == typeof e.exports ? e.exports.options : e.exports).template = n(203) | |
}, function(e, t) { | |
"use strict"; | |
Object.defineProperty(t, "__esModule", { | |
value: !0 | |
}), t["default"] = { | |
data: function() { | |
return { | |
index: 0, | |
show: !1 | |
} | |
}, | |
computed: { | |
show: function() { | |
return this.$parent.index === this.index | |
} | |
}, | |
ready: function() { | |
for (var e in this.$parent.$children) | |
if (this.$parent.$children[e] === this) { | |
this.index = parseInt(e, 10); | |
break | |
} | |
this.$parent.indicator.push(this.index), 0 === this.index && this.$el.classList.add("active") | |
} | |
} | |
}, function(e) { | |
e.exports = "<div class=item> <slot></slot> </div>" | |
}, function(e, t, n) { | |
e.exports = n(205), e.exports.__esModule && (e.exports = e.exports["default"]), ("function" == typeof e.exports ? e.exports.options : e.exports).template = n(208) | |
}, function(e, t, n) { | |
"use strict"; | |
function i(e) { | |
return e && e.__esModule ? e : { | |
"default": e | |
} | |
} | |
Object.defineProperty(t, "__esModule", { | |
value: !0 | |
}), n(206); | |
var o = i(n(96)), | |
s = 500; | |
t["default"] = { | |
props: { | |
size: { | |
type: String, | |
"default": "md" | |
}, | |
text: { | |
type: String, | |
"default": "" | |
}, | |
fixed: { | |
type: Boolean, | |
coerce: o["default"], | |
"default": !1 | |
} | |
}, | |
data: function() { | |
return { | |
active: !1 | |
} | |
}, | |
computed: { | |
spinnerSize: function() { | |
return this.size ? "spinner-" + this.size : "spinner-sm" | |
} | |
}, | |
ready: function() { | |
this._body = document.querySelector("body"), this._bodyOverflow = this._body.style.overflowY || "" | |
}, | |
methods: { | |
getMinWait: function(e) { | |
return e = e || 0, (new Date).getTime() - this._started.getTime() < s ? s - parseInt((new Date).getTime() - this._started.getTime(), 10) + e : 0 + e | |
}, | |
show: function(e) { | |
e && e.text && (this.text = e.text), e && e.size && (this.size = e.size), e && e.fixed && (this.fixed = e.fixed), this._body.style.overflowY = "hidden", this._started = new Date, this.active = !0, this.$root.$broadcast("shown::spinner") | |
}, | |
hide: function() { | |
var e = this, | |
t = 0; | |
this._spinnerAnimation = setTimeout(function() { | |
e.active = !1, e._body.style.overflowY = e._bodyOverflow, e.$root.$broadcast("hidden::spinner") | |
}, this.getMinWait(t)) | |
} | |
}, | |
events: { | |
"show::spinner": function(e) { | |
this.show(e) | |
}, | |
"hide::spinner": function() { | |
this.hide() | |
}, | |
"start::ajax": function(e) { | |
this.show(e) | |
}, | |
"end::ajax": function() { | |
this.hide() | |
} | |
}, | |
destroyed: function() { | |
clearTimeout(this._spinnerAnimation), this._body.style.overflowY = this._bodyOverflow | |
} | |
} | |
}, function(e, t, n) { | |
var i = n(207); | |
"string" == typeof i && (i = [ | |
[e.id, i, ""] | |
]), n(106)(i, {}), i.locals && (e.exports = i.locals) | |
}, function(e, t, n) { | |
(e.exports = n(105)()).push([e.id, '/*!\r\n *\r\n * Spinner\r\n * With fallback to IE9\r\n *\r\n */@keyframes spin{to{transform:rotate(1turn)}}.spinner-gritcode{top:0;left:0;bottom:0;right:0;z-index:9998;position:absolute;width:100%;text-align:center;background:hsla(0,0%,100%,.9)}.spinner-gritcode.spinner-fixed{position:fixed}.spinner-gritcode .spinner-wrapper{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);-ms-transform:translate(-50%,-50%)}.spinner-gritcode .spinner-circle{position:relative;border:4px solid #ccc;border-right-color:#337ab7;border-radius:50%;display:inline-block;animation:spin .6s linear;animation-iteration-count:infinite;width:3em;height:3em;z-index:2}.spinner-gritcode .spinner-text{position:relative;text-align:center;margin-top:.5em;z-index:2;width:100%;font-size:95%;color:#337ab7}.spinner-gritcode.spinner-sm .spinner-circle{width:1.5em;height:1.5em}.spinner-gritcode.spinner-md .spinner-circle{width:2em;height:2em}.spinner-gritcode.spinner-lg .spinner-circle{width:2.5em;height:2.5em}.spinner-gritcode.spinner-xl .spinner-circle{width:3.5em;height:3.5em}.ie9 .spinner-gritcode .spinner-circle,.lt-ie10 .spinner-gritcode .spinner-circle,.no-csstransforms3d .spinner-gritcode .spinner-circle,.no-csstransitions .spinner-gritcode .spinner-circle,.oldie .spinner-gritcode .spinner-circle{background:url("http://i2.wp.com/www.thegreatnovelingadventure.com/wp-content/plugins/wp-polls/images/loading.gif") 50% no-repeat;animation:none;margin-left:0;margin-top:5px;border:none;width:32px;height:32px}', ""]) | |
}, function(e) { | |
e.exports = "<div :class=\"['spinner spinner-gritcode',spinnerSize,{'spinner-fixed':fixed}]\" v-show=active> <div class=spinner-wrapper> <div class=spinner-circle></div> <div class=spinner-text>{{text}}</div> </div> </div>" | |
}, function(e, t, n) { | |
e.exports = n(210), e.exports.__esModule && (e.exports = e.exports["default"]), ("function" == typeof e.exports ? e.exports.options : e.exports).template = n(211) | |
}, function(e, t, n) { | |
"use strict"; | |
function i(e) { | |
return e && e.__esModule ? e : { | |
"default": e | |
} | |
} | |
Object.defineProperty(t, "__esModule", { | |
value: !0 | |
}); | |
var o = i(n(96)); | |
t["default"] = { | |
props: { | |
header: { | |
type: String | |
}, | |
disabled: { | |
type: Boolean, | |
coerce: o["default"], | |
"default": !1 | |
} | |
}, | |
computed: { | |
active: function() { | |
return this._tabset.show == this | |
}, | |
index: function() { | |
return this._tabset.tabs.indexOf(this) | |
}, | |
show: function() { | |
return this._tabset && this._tabset.show === this | |
}, | |
transition: function() { | |
return this._tabset ? this._tabset.effect : null | |
} | |
}, | |
created: function() { | |
this._ingroup = this.$parent && this.$parent._tabgroup; | |
for (var e = this; e && !0 !== e._tabset && e.$parent;) e = e.$parent; | |
e._tabset ? (e.tabs.push(this), this._ingroup ? ~e.headers.indexOf(this.$parent) || e.headers.push(this.$parent) : e.headers.push(this), this._tabset = e) : (this._tabset = {}, console.warn('Warning: "tab" depend on "tabset" to work properly.')), this._ingroup && this.$parent.tabs.push(this) | |
}, | |
beforeDestroy: function() { | |
this._tabset.active === this.index && (this._tabset.active = 0), this._tabset.tabs.$remove(this) | |
} | |
} | |
}, function(e) { | |
e.exports = '<div role=tabpanel class="tab-pane active" v-show=show :class={hide:!show} :transition=transition> <slot></slot> </div>' | |
}, function(e, t, n) { | |
n(213), e.exports = n(215), e.exports.__esModule && (e.exports = e.exports["default"]), ("function" == typeof e.exports ? e.exports.options : e.exports).template = n(216) | |
}, function(e, t, n) { | |
var i = n(214); | |
"string" == typeof i && (i = [ | |
[e.id, i, ""] | |
]), n(106)(i, {}), i.locals && (e.exports = i.locals) | |
}, function(e, t, n) { | |
(e.exports = n(105)()).push([e.id, ".nav-tabs[_v-6f3b49cd]{margin-bottom:15px}", ""]) | |
}, function(e, t, n) { | |
"use strict"; | |
function i(e) { | |
return e && e.__esModule ? e : { | |
"default": e | |
} | |
} | |
Object.defineProperty(t, "__esModule", { | |
value: !0 | |
}); | |
var o = i(n(96)); | |
i(n(100)), t["default"] = { | |
props: { | |
disabled: { | |
type: Boolean, | |
coerce: o["default"], | |
"default": !1 | |
}, | |
header: { | |
type: String | |
} | |
}, | |
data: function() { | |
return { | |
tabs: [], | |
show: !1 | |
} | |
}, | |
computed: { | |
active: function() { | |
return ~this.tabs.indexOf(this._tabset.show) | |
} | |
}, | |
created: function() { | |
this._tabgroup = !0; | |
var e = this.$parent && !0 === this.$parent._tabset ? this.$parent : {}; | |
for (this.$parent && this.$parent._tabgroup && console.error("Can't nest tabgroups."); e && !e._tabset && e.$parent;) e = e.$parent; | |
e._tabset ? this._tabset = e : (this._tabset = {}, this.show = !0, console.warn("Warning: tabgroup depend on tabset to work properly.")) | |
}, | |
methods: { | |
blur: function() { | |
this.show = !1 | |
}, | |
toggle: function() { | |
this.show = !this.show | |
} | |
} | |
} | |
}, function(e) { | |
e.exports = '<slot _v-6f3b49cd=""></slot>' | |
}, function(e, t, n) { | |
n(218), e.exports = n(220), e.exports.__esModule && (e.exports = e.exports["default"]), ("function" == typeof e.exports ? e.exports.options : e.exports).template = n(221) | |
}, function(e, t, n) { | |
var i = n(219); | |
"string" == typeof i && (i = [ | |
[e.id, i, ""] | |
]), n(106)(i, {}), i.locals && (e.exports = i.locals) | |
}, function(e, t, n) { | |
(e.exports = n(105)()).push([e.id, ".nav-tabs[_v-c8373860]{margin-bottom:15px}", ""]) | |
}, function(e, t, n) { | |
"use strict"; | |
function i(e) { | |
return e && e.__esModule ? e : { | |
"default": e | |
} | |
} | |
Object.defineProperty(t, "__esModule", { | |
value: !0 | |
}); | |
var o = i(n(100)), | |
s = i(n(134)); | |
t["default"] = { | |
components: { | |
dropdown: s["default"] | |
}, | |
props: { | |
navStyle: { | |
type: String, | |
"default": "tabs" | |
}, | |
effect: { | |
type: String, | |
"default": "fadein" | |
}, | |
active: { | |
type: Number, | |
coerce: o["default"], | |
"default": 0 | |
} | |
}, | |
data: function() { | |
return { | |
show: null, | |
headers: [], | |
tabs: [] | |
} | |
}, | |
created: function() { | |
this._tabset = !0 | |
}, | |
watch: { | |
active: function(e) { | |
this.show = this.tabs[e] | |
} | |
}, | |
ready: function() { | |
this.show = this.tabs[this.active] | |
}, | |
methods: { | |
select: function(e) { | |
e.disabled || (this.active = e.index) | |
} | |
} | |
} | |
}, function(e) { | |
e.exports = ' <ul class="nav nav-{{navStyle}}" role=tablist _v-c8373860=""> <template v-for="t in headers" _v-c8373860=""> <li v-if=!t._tabgroup :class="{active:t.active, disabled:t.disabled}" @click.prevent=select(t) _v-c8373860=""> <a href=# _v-c8373860=""><slot name=header _v-c8373860="">{{{t.header}}}</slot></a> </li> <dropdown v-else="" :text=t.header :class={active:t.active} :disabled=t.disabled _v-c8373860=""> <li v-for="tab in t.tabs" :class={disabled:tab.disabled} _v-c8373860=""><a href=# @click.prevent=select(tab) _v-c8373860="">{{tab.header}}</a></li> </dropdown> </template> </ul> <div class=tab-content v-el:tab-content="" _v-c8373860=""> <slot _v-c8373860=""></slot> </div>' | |
}, function(e, t, n) { | |
n(223), e.exports = n(225), e.exports.__esModule && (e.exports = e.exports["default"]), ("function" == typeof e.exports ? e.exports.options : e.exports).template = n(226) | |
}, function(e, t, n) { | |
var i = n(224); | |
"string" == typeof i && (i = [ | |
[e.id, i, ""] | |
]), n(106)(i, {}), i.locals && (e.exports = i.locals) | |
}, function(e, t, n) { | |
(e.exports = n(105)()).push([e.id, ".tooltip{opacity:.9}.fadein-enter{-webkit-animation:fadein-in .3s ease-in;animation:fadein-in .3s ease-in}.fadein-leave{-webkit-animation:fadein-out .3s ease-out;animation:fadein-out .3s ease-out}@-webkit-keyframes fadein-in{0%{opacity:0}to{opacity:.9}}@keyframes fadein-in{0%{opacity:0}to{opacity:.9}}@-webkit-keyframes fadein-out{0%{opacity:.9}to{opacity:0}}@keyframes fadein-out{0%{opacity:.9}to{opacity:0}}", ""]) | |
}, function(e, t, n) { | |
"use strict"; | |
function i(e) { | |
return e && e.__esModule ? e : { | |
"default": e | |
} | |
} | |
Object.defineProperty(t, "__esModule", { | |
value: !0 | |
}); | |
var o = i(n(170)); | |
t["default"] = { | |
mixins: [o["default"]], | |
props: { | |
trigger: { | |
type: String, | |
"default": "hover" | |
}, | |
effect: { | |
type: String, | |
"default": "scale" | |
} | |
} | |
} | |
}, function(e) { | |
e.exports = "<span v-el:trigger> <slot></slot> </span> <div v-el:popover v-show=show role=tooltip :class=\"['tooltip',placement]\" :transition=effect> <div class=tooltip-arrow></div> <div class=tooltip-inner> <slot name=content>{{{content}}}</slot> </div> </div>" | |
}, function(e, t, n) { | |
n(228), e.exports = n(230), e.exports.__esModule && (e.exports = e.exports["default"]), ("function" == typeof e.exports ? e.exports.options : e.exports).template = n(231) | |
}, function(e, t, n) { | |
var i = n(229); | |
"string" == typeof i && (i = [ | |
[e.id, i, ""] | |
]), n(106)(i, {}), i.locals && (e.exports = i.locals) | |
}, function(e, t, n) { | |
(e.exports = n(105)()).push([e.id, ".dropdown-menu>li>a{cursor:pointer}", ""]) | |
}, function(e, t, n) { | |
"use strict"; | |
function i(e) { | |
return e && e.__esModule ? e : { | |
"default": e | |
} | |
} | |
Object.defineProperty(t, "__esModule", { | |
value: !0 | |
}); | |
var o = i(n(199)), | |
s = i(n(96)), | |
r = window.Vue; | |
t["default"] = { | |
created: function() { | |
this.items = this.primitiveData | |
}, | |
partials: { | |
"default": '<span v-html="item | highlight query"></span>' | |
}, | |
props: { | |
data: { | |
type: Array | |
}, | |
limit: { | |
type: Number, | |
"default": 8 | |
}, | |
async: { | |
type: String | |
}, | |
template: { | |
type: String | |
}, | |
templateName: { | |
type: String, | |
"default": "default" | |
}, | |
key: { | |
type: String, | |
"default": null | |
}, | |
matchCase: { | |
type: Boolean, | |
coerce: s["default"], | |
"default": !1 | |
}, | |
matchStart: { | |
type: Boolean, | |
coerce: s["default"], | |
"default": !1 | |
}, | |
onHit: { | |
type: Function, | |
"default": function(e) { | |
this.reset(), this.query = e | |
} | |
}, | |
placeholder: { | |
type: String | |
} | |
}, | |
data: function() { | |
return { | |
query: "", | |
showDropdown: !1, | |
noResults: !0, | |
current: 0, | |
items: [] | |
} | |
}, | |
computed: { | |
primitiveData: function() { | |
var n = this; | |
if (this.data) return this.data.filter(function(e) { | |
e = n.matchCase ? e : e.toLowerCase(); | |
var t = n.matchCase ? n.query : n.query.toLowerCase(); | |
return n.matchStart ? 0 === e.indexOf(t) : -1 !== e.indexOf(t) | |
}).slice(0, this.limit) | |
} | |
}, | |
ready: function() { | |
this.templateName && "default" !== this.templateName && r.partial(this.templateName, this.template) | |
}, | |
methods: { | |
update: function() { | |
var t = this; | |
return this.query ? (this.data && (this.items = this.primitiveData, this.showDropdown = 0 < this.items.length), void(this.async && (0, o["default"])(this.async + this.query, function(e) { | |
t.items = (t.key ? e[t.key] : e).slice(0, t.limit), t.showDropdown = 0 < t.items.length | |
}))) : (this.reset(), !1) | |
}, | |
reset: function() { | |
this.items = [], this.query = "", this.loading = !1, this.showDropdown = !1 | |
}, | |
setActive: function(e) { | |
this.current = e | |
}, | |
isActive: function(e) { | |
return this.current === e | |
}, | |
hit: function(e) { | |
e.preventDefault(), this.onHit(this.items[this.current], this) | |
}, | |
up: function() { | |
0 < this.current && this.current-- | |
}, | |
down: function() { | |
this.current < this.items.length - 1 && this.current++ | |
} | |
}, | |
filters: { | |
highlight: function(e, t) { | |
return e.replace(new RegExp("(" + t + ")", "gi"), "<strong>$1</strong>") | |
} | |
} | |
} | |
}, function(e) { | |
e.exports = '<div style="position: relative" v-bind:class="{\'open\':showDropdown}"> <input type=text class=form-control :placeholder=placeholder autocomplete=off v-model=query @input=update @keydown.up=up @keydown.down=down @keydown.enter=hit @keydown.esc=reset @blur="showDropdown = false"/> <ul class=dropdown-menu v-el:dropdown> <li v-for="item in items" v-bind:class="{\'active\': isActive($index)}"> <a @mousedown.prevent=hit @mousemove=setActive($index)> <partial :name=templateName></partial> </a> </li> </ul> </div>' | |
}]) | |
}), | |
function(r) { | |
"use strict"; | |
function a(i, o) { | |
return this.each(function() { | |
var e = r(this), | |
t = e.data("bs.modal"), | |
n = r.extend({}, s.DEFAULTS, e.data(), "object" == typeof i && i); | |
t || e.data("bs.modal", t = new s(this, n)), "string" == typeof i ? t[i](o) : n.show && t.show(o) | |
}) | |
} | |
var s = function(e, t) { | |
this.options = t, this.$body = r(document.body), this.$element = r(e), this.$dialog = this.$element.find(".modal-dialog"), this.$backdrop = null, this.isShown = null, this.originalBodyPad = null, this.scrollbarWidth = 0, this.ignoreBackdropClick = !1, this.fixedContent = ".navbar-fixed-top, .navbar-fixed-bottom", this.options.remote && this.$element.find(".modal-content").load(this.options.remote, r.proxy(function() { | |
this.$element.trigger("loaded.bs.modal") | |
}, this)) | |
}; | |
s.VERSION = "3.4.1", s.TRANSITION_DURATION = 300, s.BACKDROP_TRANSITION_DURATION = 150, s.DEFAULTS = { | |
backdrop: !0, | |
keyboard: !0, | |
show: !0 | |
}, s.prototype.toggle = function(e) { | |
return this.isShown ? this.hide() : this.show(e) | |
}, s.prototype.show = function(n) { | |
var i = this, | |
e = r.Event("show.bs.modal", { | |
relatedTarget: n | |
}); | |
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"]', r.proxy(this.hide, this)), this.$dialog.on("mousedown.dismiss.bs.modal", function() { | |
i.$element.one("mouseup.dismiss.bs.modal", function(e) { | |
r(e.target).is(i.$element) && (i.ignoreBackdropClick = !0) | |
}) | |
}), this.backdrop(function() { | |
var e = r.support.transition && i.$element.hasClass("fade"); | |
i.$element.parent().length || i.$element.appendTo(i.$body), i.$element.show().scrollTop(0), i.adjustDialog(), e && i.$element[0].offsetWidth, i.$element.addClass("in"), i.enforceFocus(); | |
var t = r.Event("shown.bs.modal", { | |
relatedTarget: n | |
}); | |
e ? i.$dialog.one("bsTransitionEnd", function() { | |
i.$element.trigger("focus").trigger(t) | |
}).emulateTransitionEnd(s.TRANSITION_DURATION) : i.$element.trigger("focus").trigger(t) | |
})) | |
}, s.prototype.hide = function(e) { | |
e && e.preventDefault(), e = r.Event("hide.bs.modal"), this.$element.trigger(e), this.isShown && !e.isDefaultPrevented() && (this.isShown = !1, this.escape(), this.resize(), r(document).off("focusin.bs.modal"), this.$element.removeClass("in").off("click.dismiss.bs.modal").off("mouseup.dismiss.bs.modal"), this.$dialog.off("mousedown.dismiss.bs.modal"), r.support.transition && this.$element.hasClass("fade") ? this.$element.one("bsTransitionEnd", r.proxy(this.hideModal, this)).emulateTransitionEnd(s.TRANSITION_DURATION) : this.hideModal()) | |
}, s.prototype.enforceFocus = function() { | |
r(document).off("focusin.bs.modal").on("focusin.bs.modal", r.proxy(function(e) { | |
document === e.target || this.$element[0] === e.target || this.$element.has(e.target).length || this.$element.trigger("focus") | |
}, this)) | |
}, s.prototype.escape = function() { | |
this.isShown && this.options.keyboard ? this.$element.on("keydown.dismiss.bs.modal", r.proxy(function(e) { | |
27 == e.which && this.hide() | |
}, this)) : this.isShown || this.$element.off("keydown.dismiss.bs.modal") | |
}, s.prototype.resize = function() { | |
this.isShown ? r(window).on("resize.bs.modal", r.proxy(this.handleUpdate, this)) : r(window).off("resize.bs.modal") | |
}, s.prototype.hideModal = function() { | |
var e = this; | |
this.$element.hide(), this.backdrop(function() { | |
e.$body.removeClass("modal-open"), e.resetAdjustments(), e.resetScrollbar(), e.$element.trigger("hidden.bs.modal") | |
}) | |
}, s.prototype.removeBackdrop = function() { | |
this.$backdrop && this.$backdrop.remove(), this.$backdrop = null | |
}, s.prototype.backdrop = function(e) { | |
var t = this, | |
n = this.$element.hasClass("fade") ? "fade" : ""; | |
if (this.isShown && this.options.backdrop) { | |
var i = r.support.transition && n; | |
if (this.$backdrop = r(document.createElement("div")).addClass("modal-backdrop " + n).appendTo(this.$body), this.$element.on("click.dismiss.bs.modal", r.proxy(function(e) { | |
this.ignoreBackdropClick ? this.ignoreBackdropClick = !1 : e.target === e.currentTarget && ("static" == this.options.backdrop ? this.$element[0].focus() : this.hide()) | |
}, this)), i && this.$backdrop[0].offsetWidth, this.$backdrop.addClass("in"), !e) return; | |
i ? this.$backdrop.one("bsTransitionEnd", e).emulateTransitionEnd(s.BACKDROP_TRANSITION_DURATION) : e() | |
} else if (!this.isShown && this.$backdrop) { | |
this.$backdrop.removeClass("in"); | |
var o = function() { | |
t.removeBackdrop(), e && e() | |
}; | |
r.support.transition && this.$element.hasClass("fade") ? this.$backdrop.one("bsTransitionEnd", o).emulateTransitionEnd(s.BACKDROP_TRANSITION_DURATION) : o() | |
} else e && e() | |
}, s.prototype.handleUpdate = function() { | |
this.adjustDialog() | |
}, s.prototype.adjustDialog = function() { | |
var e = this.$element[0].scrollHeight > document.documentElement.clientHeight; | |
this.$element.css({ | |
paddingLeft: !this.bodyIsOverflowing && e ? this.scrollbarWidth : "", | |
paddingRight: this.bodyIsOverflowing && !e ? this.scrollbarWidth : "" | |
}) | |
}, s.prototype.resetAdjustments = function() { | |
this.$element.css({ | |
paddingLeft: "", | |
paddingRight: "" | |
}) | |
}, s.prototype.checkScrollbar = function() { | |
var e = window.innerWidth; | |
if (!e) { | |
var t = document.documentElement.getBoundingClientRect(); | |
e = t.right - Math.abs(t.left) | |
} | |
this.bodyIsOverflowing = document.body.clientWidth < e, this.scrollbarWidth = this.measureScrollbar() | |
}, s.prototype.setScrollbar = function() { | |
var e = parseInt(this.$body.css("padding-right") || 0, 10); | |
this.originalBodyPad = document.body.style.paddingRight || ""; | |
var o = this.scrollbarWidth; | |
this.bodyIsOverflowing && (this.$body.css("padding-right", e + o), r(this.fixedContent).each(function(e, t) { | |
var n = t.style.paddingRight, | |
i = r(t).css("padding-right"); | |
r(t).data("padding-right", n).css("padding-right", parseFloat(i) + o + "px") | |
})) | |
}, s.prototype.resetScrollbar = function() { | |
this.$body.css("padding-right", this.originalBodyPad), r(this.fixedContent).each(function(e, t) { | |
var n = r(t).data("padding-right"); | |
r(t).removeData("padding-right"), t.style.paddingRight = n || "" | |
}) | |
}, s.prototype.measureScrollbar = function() { | |
var e = document.createElement("div"); | |
e.className = "modal-scrollbar-measure", this.$body.append(e); | |
var t = e.offsetWidth - e.clientWidth; | |
return this.$body[0].removeChild(e), t | |
}; | |
var e = r.fn.modal; | |
r.fn.modal = a, r.fn.modal.Constructor = s, r.fn.modal.noConflict = function() { | |
return r.fn.modal = e, this | |
}, r(document).on("click.bs.modal.data-api", '[data-toggle="modal"]', function(e) { | |
var t = r(this), | |
n = t.attr("href"), | |
i = t.attr("data-target") || n && n.replace(/.*(?=#[^\s]+$)/, ""), | |
o = r(document).find(i), | |
s = o.data("bs.modal") ? "toggle" : r.extend({ | |
remote: !/#/.test(n) && n | |
}, o.data(), t.data()); | |
t.is("a") && e.preventDefault(), o.one("show.bs.modal", function(e) { | |
e.isDefaultPrevented() || o.one("hidden.bs.modal", function() { | |
t.is(":visible") && t.trigger("focus") | |
}) | |
}), a.call(o, s, this) | |
}) | |
}(jQuery), | |
function(i) { | |
"use strict"; | |
function e() { | |
var e = document.createElement("bootstrap"), | |
t = { | |
WebkitTransition: "webkitTransitionEnd", | |
MozTransition: "transitionend", | |
OTransition: "oTransitionEnd otransitionend", | |
transition: "transitionend" | |
}; | |
for (var n in t) | |
if (e.style[n] !== undefined) return { | |
end: t[n] | |
}; | |
return !1 | |
} | |
i.fn.emulateTransitionEnd = function(e) { | |
var t = !1, | |
n = this; | |
return i(this).one("bsTransitionEnd", function() { | |
t = !0 | |
}), setTimeout(function() { | |
t || i(n).trigger(i.support.transition.end) | |
}, e), this | |
}, i(function() { | |
i.support.transition = e(), i.support.transition && (i.event.special.bsTransitionEnd = { | |
bindType: i.support.transition.end, | |
delegateType: i.support.transition.end, | |
handle: function(e) { | |
if (i(e.target).is(this)) return e.handleObj.handler.apply(this, arguments) | |
} | |
}) | |
}) | |
}(jQuery), | |
function(r) { | |
"use strict"; | |
function o(e) { | |
var t, n = e.attr("data-target") || (t = e.attr("href")) && t.replace(/.*(?=#[^\s]+$)/, ""); | |
return r(document).find(n) | |
} | |
function a(i) { | |
return this.each(function() { | |
var e = r(this), | |
t = e.data("bs.collapse"), | |
n = r.extend({}, l.DEFAULTS, e.data(), "object" == typeof i && i); | |
!t && n.toggle && /show|hide/.test(i) && (n.toggle = !1), t || e.data("bs.collapse", t = new l(this, n)), "string" == typeof i && t[i]() | |
}) | |
} | |
var l = function(e, t) { | |
this.$element = r(e), this.options = r.extend({}, l.DEFAULTS, t), this.$trigger = r('[data-toggle="collapse"][href="#' + e.id + '"],[data-toggle="collapse"][data-target="#' + e.id + '"]'), this.transitioning = null, this.options.parent ? this.$parent = this.getParent() : this.addAriaAndCollapsedClass(this.$element, this.$trigger), this.options.toggle && this.toggle() | |
}; | |
l.VERSION = "3.4.1", l.TRANSITION_DURATION = 350, l.DEFAULTS = { | |
toggle: !0 | |
}, l.prototype.dimension = function() { | |
return this.$element.hasClass("width") ? "width" : "height" | |
}, l.prototype.show = function() { | |
if (!this.transitioning && !this.$element.hasClass("in")) { | |
var e, t = this.$parent && this.$parent.children(".panel").children(".in, .collapsing"); | |
if (!(t && t.length && (e = t.data("bs.collapse")) && e.transitioning)) { | |
var n = r.Event("show.bs.collapse"); | |
if (this.$element.trigger(n), !n.isDefaultPrevented()) { | |
t && t.length && (a.call(t, "hide"), e || t.data("bs.collapse", null)); | |
var i = this.dimension(); | |
this.$element.removeClass("collapse").addClass("collapsing")[i](0).attr("aria-expanded", !0), this.$trigger.removeClass("collapsed").attr("aria-expanded", !0), this.transitioning = 1; | |
var o = function() { | |
this.$element.removeClass("collapsing").addClass("collapse in")[i](""), this.transitioning = 0, this.$element.trigger("shown.bs.collapse") | |
}; | |
if (!r.support.transition) return o.call(this); | |
var s = r.camelCase(["scroll", i].join("-")); | |
this.$element.one("bsTransitionEnd", r.proxy(o, this)).emulateTransitionEnd(l.TRANSITION_DURATION)[i](this.$element[0][s]) | |
} | |
} | |
} | |
}, l.prototype.hide = function() { | |
if (!this.transitioning && this.$element.hasClass("in")) { | |
var e = r.Event("hide.bs.collapse"); | |
if (this.$element.trigger(e), !e.isDefaultPrevented()) { | |
var t = this.dimension(); | |
this.$element[t](this.$element[t]())[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 n = function() { | |
this.transitioning = 0, this.$element.removeClass("collapsing").addClass("collapse").trigger("hidden.bs.collapse") | |
}; | |
if (!r.support.transition) return n.call(this); | |
this.$element[t](0).one("bsTransitionEnd", r.proxy(n, this)).emulateTransitionEnd(l.TRANSITION_DURATION) | |
} | |
} | |
}, l.prototype.toggle = function() { | |
this[this.$element.hasClass("in") ? "hide" : "show"]() | |
}, l.prototype.getParent = function() { | |
return r(document).find(this.options.parent).find('[data-toggle="collapse"][data-parent="' + this.options.parent + '"]').each(r.proxy(function(e, t) { | |
var n = r(t); | |
this.addAriaAndCollapsedClass(o(n), n) | |
}, this)).end() | |
}, l.prototype.addAriaAndCollapsedClass = function(e, t) { | |
var n = e.hasClass("in"); | |
e.attr("aria-expanded", n), t.toggleClass("collapsed", !n).attr("aria-expanded", n) | |
}; | |
var e = r.fn.collapse; | |
r.fn.collapse = a, r.fn.collapse.Constructor = l, r.fn.collapse.noConflict = function() { | |
return r.fn.collapse = e, this | |
}, r(document).on("click.bs.collapse.data-api", '[data-toggle="collapse"]', function(e) { | |
var t = r(this); | |
t.attr("data-target") || e.preventDefault(); | |
var n = o(t), | |
i = n.data("bs.collapse") ? "toggle" : t.data(); | |
a.call(n, i) | |
}) | |
}(jQuery), | |
function(a) { | |
"use strict"; | |
function t(n) { | |
return this.each(function() { | |
var e = a(this), | |
t = e.data("bs.tab"); | |
t || e.data("bs.tab", t = new r(this)), "string" == typeof n && t[n]() | |
}) | |
} | |
var r = function(e) { | |
this.element = a(e) | |
}; | |
r.VERSION = "3.4.1", r.TRANSITION_DURATION = 150, r.prototype.show = function() { | |
var e = this.element, | |
t = e.closest("ul:not(.dropdown-menu)"), | |
n = e.data("target"); | |
if (n || (n = (n = e.attr("href")) && n.replace(/.*(?=#[^\s]*$)/, "")), !e.parent("li").hasClass("active")) { | |
var i = t.find(".active:last a"), | |
o = a.Event("hide.bs.tab", { | |
relatedTarget: e[0] | |
}), | |
s = a.Event("show.bs.tab", { | |
relatedTarget: i[0] | |
}); | |
if (i.trigger(o), e.trigger(s), !s.isDefaultPrevented() && !o.isDefaultPrevented()) { | |
var r = a(document).find(n); | |
this.activate(e.closest("li"), t), this.activate(r, r.parent(), function() { | |
i.trigger({ | |
type: "hidden.bs.tab", | |
relatedTarget: e[0] | |
}), e.trigger({ | |
type: "shown.bs.tab", | |
relatedTarget: i[0] | |
}) | |
}) | |
} | |
} | |
}, r.prototype.activate = function(e, t, n) { | |
function i() { | |
o.removeClass("active").find("> .dropdown-menu > .active").removeClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded", !1), e.addClass("active").find('[data-toggle="tab"]').attr("aria-expanded", !0), s ? (e[0].offsetWidth, e.addClass("in")) : e.removeClass("fade"), e.parent(".dropdown-menu").length && e.closest("li.dropdown").addClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded", !0), n && n() | |
} | |
var o = t.find("> .active"), | |
s = n && a.support.transition && (o.length && o.hasClass("fade") || !!t.find("> .fade").length); | |
o.length && s ? o.one("bsTransitionEnd", i).emulateTransitionEnd(r.TRANSITION_DURATION) : i(), o.removeClass("in") | |
}; | |
var e = a.fn.tab; | |
a.fn.tab = t, a.fn.tab.Constructor = r, a.fn.tab.noConflict = function() { | |
return a.fn.tab = e, this | |
}; | |
var n = function(e) { | |
e.preventDefault(), t.call(a(this), "show") | |
}; | |
a(document).on("click.bs.tab.data-api", '[data-toggle="tab"]', n).on("click.bs.tab.data-api", '[data-toggle="pill"]', n) | |
}(jQuery), | |
function(m) { | |
"use strict"; | |
function f(e, t) { | |
var n = e.nodeName.toLowerCase(); | |
if (-1 !== m.inArray(n, t)) return -1 === m.inArray(n, r) || Boolean(e.nodeValue.match(a) || e.nodeValue.match(l)); | |
for (var i = m(t).filter(function(e, t) { | |
return t instanceof RegExp | |
}), o = 0, s = i.length; o < s; o++) | |
if (n.match(i[o])) return !0; | |
return !1 | |
} | |
function i(e, t, n) { | |
if (0 === e.length) return e; | |
if (n && "function" == typeof n) return n(e); | |
if (!document.implementation || !document.implementation.createHTMLDocument) return e; | |
var i = document.implementation.createHTMLDocument("sanitization"); | |
i.body.innerHTML = e; | |
for (var o = m.map(t, function(e, t) { | |
return t | |
}), s = m(i.body).find("*"), r = 0, a = s.length; r < a; r++) { | |
var l = s[r], | |
c = l.nodeName.toLowerCase(); | |
if (-1 !== m.inArray(c, o)) | |
for (var d = m.map(l.attributes, function(e) { | |
return e | |
}), u = [].concat(t["*"] || [], t[c] || []), h = 0, p = d.length; h < p; h++) f(d[h], u) || l.removeAttribute(d[h].nodeName); | |
else l.parentNode.removeChild(l) | |
} | |
return i.body.innerHTML | |
} | |
function e(i) { | |
return this.each(function() { | |
var e = m(this), | |
t = e.data("bs.tooltip"), | |
n = "object" == typeof i && i; | |
!t && /destroy|hide/.test(i) || (t || e.data("bs.tooltip", t = new g(this, n)), "string" == typeof i && t[i]()) | |
}) | |
} | |
var o = ["sanitize", "whiteList", "sanitizeFn"], | |
r = ["background", "cite", "href", "itemtype", "longdesc", "poster", "src", "xlink:href"], | |
t = { | |
"*": ["class", "dir", "id", "lang", "role", /^aria-[\w-]*$/i], | |
a: ["target", "href", "title", "rel"], | |
area: [], | |
b: [], | |
br: [], | |
col: [], | |
code: [], | |
div: [], | |
em: [], | |
hr: [], | |
h1: [], | |
h2: [], | |
h3: [], | |
h4: [], | |
h5: [], | |
h6: [], | |
i: [], | |
img: ["src", "alt", "title", "width", "height"], | |
li: [], | |
ol: [], | |
p: [], | |
pre: [], | |
s: [], | |
small: [], | |
span: [], | |
sub: [], | |
sup: [], | |
strong: [], | |
u: [], | |
ul: [] | |
}, | |
a = /^(?:(?:https?|mailto|ftp|tel|file):|[^&:/?#]*(?:[/?#]|$))/gi, | |
l = /^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[a-z0-9+/]+=*$/i, | |
g = function(e, t) { | |
this.type = null, this.options = null, this.enabled = null, this.timeout = null, this.hoverState = null, this.$element = null, this.inState = null, this.init("tooltip", e, t) | |
}; | |
g.VERSION = "3.4.1", g.TRANSITION_DURATION = 150, g.DEFAULTS = { | |
animation: !0, | |
placement: "top", | |
selector: !1, | |
template: '<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>', | |
trigger: "hover focus", | |
title: "", | |
delay: 0, | |
html: !1, | |
container: !1, | |
viewport: { | |
selector: "body", | |
padding: 0 | |
}, | |
sanitize: !0, | |
sanitizeFn: null, | |
whiteList: t | |
}, g.prototype.init = function(e, t, n) { | |
if (this.enabled = !0, this.type = e, this.$element = m(t), this.options = this.getOptions(n), this.$viewport = this.options.viewport && m(document).find(m.isFunction(this.options.viewport) ? this.options.viewport.call(this, this.$element) : this.options.viewport.selector || this.options.viewport), this.inState = { | |
click: !1, | |
hover: !1, | |
focus: !1 | |
}, this.$element[0] instanceof document.constructor && !this.options.selector) throw new Error("`selector` option must be specified when initializing " + this.type + " on the window.document object!"); | |
for (var i = this.options.trigger.split(" "), o = i.length; o--;) { | |
var s = i[o]; | |
if ("click" == s) this.$element.on("click." + this.type, this.options.selector, m.proxy(this.toggle, this)); | |
else if ("manual" != s) { | |
var r = "hover" == s ? "mouseenter" : "focusin", | |
a = "hover" == s ? "mouseleave" : "focusout"; | |
this.$element.on(r + "." + this.type, this.options.selector, m.proxy(this.enter, this)), this.$element.on(a + "." + this.type, this.options.selector, m.proxy(this.leave, this)) | |
} | |
} | |
this.options.selector ? this._options = m.extend({}, this.options, { | |
trigger: "manual", | |
selector: "" | |
}) : this.fixTitle() | |
}, g.prototype.getDefaults = function() { | |
return g.DEFAULTS | |
}, g.prototype.getOptions = function(e) { | |
var t = this.$element.data(); | |
for (var n in t) t.hasOwnProperty(n) && -1 !== m.inArray(n, o) && delete t[n]; | |
return (e = m.extend({}, this.getDefaults(), t, e)).delay && "number" == typeof e.delay && (e.delay = { | |
show: e.delay, | |
hide: e.delay | |
}), e.sanitize && (e.template = i(e.template, e.whiteList, e.sanitizeFn)), e | |
}, g.prototype.getDelegateOptions = function() { | |
var n = {}, | |
i = this.getDefaults(); | |
return this._options && m.each(this._options, function(e, t) { | |
i[e] != t && (n[e] = t) | |
}), n | |
}, g.prototype.enter = function(e) { | |
var t = e instanceof this.constructor ? e : m(e.currentTarget).data("bs." + this.type); | |
if (t || (t = new this.constructor(e.currentTarget, this.getDelegateOptions()), m(e.currentTarget).data("bs." + this.type, t)), e instanceof m.Event && (t.inState["focusin" == e.type ? "focus" : "hover"] = !0), t.tip().hasClass("in") || "in" == t.hoverState) t.hoverState = "in"; | |
else { | |
if (clearTimeout(t.timeout), t.hoverState = "in", !t.options.delay || !t.options.delay.show) return t.show(); | |
t.timeout = setTimeout(function() { | |
"in" == t.hoverState && t.show() | |
}, t.options.delay.show) | |
} | |
}, g.prototype.isInStateTrue = function() { | |
for (var e in this.inState) | |
if (this.inState[e]) return !0; | |
return !1 | |
}, g.prototype.leave = function(e) { | |
var t = e instanceof this.constructor ? e : m(e.currentTarget).data("bs." + this.type); | |
if (t || (t = new this.constructor(e.currentTarget, this.getDelegateOptions()), m(e.currentTarget).data("bs." + this.type, t)), e instanceof m.Event && (t.inState["focusout" == e.type ? "focus" : "hover"] = !1), !t.isInStateTrue()) { | |
if (clearTimeout(t.timeout), t.hoverState = "out", !t.options.delay || !t.options.delay.hide) return t.hide(); | |
t.timeout = setTimeout(function() { | |
"out" == t.hoverState && t.hide() | |
}, t.options.delay.hide) | |
} | |
}, g.prototype.show = function() { | |
var e = m.Event("show.bs." + this.type); | |
if (this.hasContent() && this.enabled) { | |
this.$element.trigger(e); | |
var t = m.contains(this.$element[0].ownerDocument.documentElement, this.$element[0]); | |
if (e.isDefaultPrevented() || !t) return; | |
var n = this, | |
i = this.tip(), | |
o = this.getUID(this.type); | |
this.setContent(), i.attr("id", o), this.$element.attr("aria-describedby", o), this.options.animation && i.addClass("fade"); | |
var s = "function" == typeof this.options.placement ? this.options.placement.call(this, i[0], this.$element[0]) : this.options.placement, | |
r = /\s?auto?\s?/i, | |
a = r.test(s); | |
a && (s = s.replace(r, "") || "top"), i.detach().css({ | |
top: 0, | |
left: 0, | |
display: "block" | |
}).addClass(s).data("bs." + this.type, this), this.options.container ? i.appendTo(m(document).find(this.options.container)) : i.insertAfter(this.$element), this.$element.trigger("inserted.bs." + this.type); | |
var l = this.getPosition(), | |
c = i[0].offsetWidth, | |
d = i[0].offsetHeight; | |
if (a) { | |
var u = s, | |
h = this.getPosition(this.$viewport); | |
s = "bottom" == s && l.bottom + d > h.bottom ? "top" : "top" == s && l.top - d < h.top ? "bottom" : "right" == s && l.right + c > h.width ? "left" : "left" == s && l.left - c < h.left ? "right" : s, i.removeClass(u).addClass(s) | |
} | |
var p = this.getCalculatedOffset(s, l, c, d); | |
this.applyPlacement(p, s); | |
var f = function() { | |
var e = n.hoverState; | |
n.$element.trigger("shown.bs." + n.type), n.hoverState = null, "out" == e && n.leave(n) | |
}; | |
m.support.transition && this.$tip.hasClass("fade") ? i.one("bsTransitionEnd", f).emulateTransitionEnd(g.TRANSITION_DURATION) : f() | |
} | |
}, g.prototype.applyPlacement = function(e, t) { | |
var n = this.tip(), | |
i = n[0].offsetWidth, | |
o = n[0].offsetHeight, | |
s = parseInt(n.css("margin-top"), 10), | |
r = parseInt(n.css("margin-left"), 10); | |
isNaN(s) && (s = 0), isNaN(r) && (r = 0), e.top += s, e.left += r, m.offset.setOffset(n[0], m.extend({ | |
using: function(e) { | |
n.css({ | |
top: Math.round(e.top), | |
left: Math.round(e.left) | |
}) | |
} | |
}, e), 0), n.addClass("in"); | |
var a = n[0].offsetWidth, | |
l = n[0].offsetHeight; | |
"top" == t && l != o && (e.top = e.top + o - l); | |
var c = this.getViewportAdjustedDelta(t, e, a, l); | |
c.left ? e.left += c.left : e.top += c.top; | |
var d = /top|bottom/.test(t), | |
u = d ? 2 * c.left - i + a : 2 * c.top - o + l, | |
h = d ? "offsetWidth" : "offsetHeight"; | |
n.offset(e), this.replaceArrow(u, n[0][h], d) | |
}, g.prototype.replaceArrow = function(e, t, n) { | |
this.arrow().css(n ? "left" : "top", 50 * (1 - e / t) + "%").css(n ? "top" : "left", "") | |
}, g.prototype.setContent = function() { | |
var e = this.tip(), | |
t = this.getTitle(); | |
this.options.html ? (this.options.sanitize && (t = i(t, this.options.whiteList, this.options.sanitizeFn)), e.find(".tooltip-inner").html(t)) : e.find(".tooltip-inner").text(t), e.removeClass("fade in top bottom left right") | |
}, g.prototype.hide = function(e) { | |
function t() { | |
"in" != n.hoverState && i.detach(), n.$element && n.$element.removeAttr("aria-describedby").trigger("hidden.bs." + n.type), e && e() | |
} | |
var n = this, | |
i = m(this.$tip), | |
o = m.Event("hide.bs." + this.type); | |
if (this.$element.trigger(o), !o.isDefaultPrevented()) return i.removeClass("in"), m.support.transition && i.hasClass("fade") ? i.one("bsTransitionEnd", t).emulateTransitionEnd(g.TRANSITION_DURATION) : t(), this.hoverState = null, this | |
}, g.prototype.fixTitle = function() { | |
var e = this.$element; | |
(e.attr("title") || "string" != typeof e.attr("data-original-title")) && e.attr("data-original-title", e.attr("title") || "").attr("title", "") | |
}, g.prototype.hasContent = function() { | |
return this.getTitle() | |
}, g.prototype.getPosition = function(e) { | |
var t = (e = e || this.$element)[0], | |
n = "BODY" == t.tagName, | |
i = t.getBoundingClientRect(); | |
null == i.width && (i = m.extend({}, i, { | |
width: i.right - i.left, | |
height: i.bottom - i.top | |
})); | |
var o = window.SVGElement && t instanceof window.SVGElement, | |
s = n ? { | |
top: 0, | |
left: 0 | |
} : o ? null : e.offset(), | |
r = { | |
scroll: n ? document.documentElement.scrollTop || document.body.scrollTop : e.scrollTop() | |
}, | |
a = n ? { | |
width: m(window).width(), | |
height: m(window).height() | |
} : null; | |
return m.extend({}, i, r, a, s) | |
}, g.prototype.getCalculatedOffset = function(e, t, n, i) { | |
return "bottom" == e ? { | |
top: t.top + t.height, | |
left: t.left + t.width / 2 - n / 2 | |
} : "top" == e ? { | |
top: t.top - i, | |
left: t.left + t.width / 2 - n / 2 | |
} : "left" == e ? { | |
top: t.top + t.height / 2 - i / 2, | |
left: t.left - n | |
} : { | |
top: t.top + t.height / 2 - i / 2, | |
left: t.left + t.width | |
} | |
}, g.prototype.getViewportAdjustedDelta = function(e, t, n, i) { | |
var o = { | |
top: 0, | |
left: 0 | |
}; | |
if (!this.$viewport) return o; | |
var s = this.options.viewport && this.options.viewport.padding || 0, | |
r = this.getPosition(this.$viewport); | |
if (/right|left/.test(e)) { | |
var a = t.top - s - r.scroll, | |
l = t.top + s - r.scroll + i; | |
a < r.top ? o.top = r.top - a : l > r.top + r.height && (o.top = r.top + r.height - l) | |
} else { | |
var c = t.left - s, | |
d = t.left + s + n; | |
c < r.left ? o.left = r.left - c : d > r.right && (o.left = r.left + r.width - d) | |
} | |
return o | |
}, g.prototype.getTitle = function() { | |
var e = this.$element, | |
t = this.options; | |
return e.attr("data-original-title") || ("function" == typeof t.title ? t.title.call(e[0]) : t.title) | |
}, g.prototype.getUID = function(e) { | |
for (; e += ~~(1e6 * Math.random()), document.getElementById(e);); | |
return e | |
}, g.prototype.tip = function() { | |
if (!this.$tip && (this.$tip = m(this.options.template), 1 != this.$tip.length)) throw new Error(this.type + " `template` option must consist of exactly 1 top-level element!"); | |
return this.$tip | |
}, g.prototype.arrow = function() { | |
return this.$arrow = this.$arrow || this.tip().find(".tooltip-arrow") | |
}, g.prototype.enable = function() { | |
this.enabled = !0 | |
}, g.prototype.disable = function() { | |
this.enabled = !1 | |
}, g.prototype.toggleEnabled = function() { | |
this.enabled = !this.enabled | |
}, g.prototype.toggle = function(e) { | |
var t = this; | |
e && ((t = m(e.currentTarget).data("bs." + this.type)) || (t = new this.constructor(e.currentTarget, this.getDelegateOptions()), m(e.currentTarget).data("bs." + this.type, t))), e ? (t.inState.click = !t.inState.click, t.isInStateTrue() ? t.enter(t) : t.leave(t)) : t.tip().hasClass("in") ? t.leave(t) : t.enter(t) | |
}, g.prototype.destroy = function() { | |
var e = this; | |
clearTimeout(this.timeout), this.hide(function() { | |
e.$element.off("." + e.type).removeData("bs." + e.type), e.$tip && e.$tip.detach(), e.$tip = null, e.$arrow = null, e.$viewport = null, e.$element = null | |
}) | |
}, g.prototype.sanitizeHtml = function(e) { | |
return i(e, this.options.whiteList, this.options.sanitizeFn) | |
}; | |
var n = m.fn.tooltip; | |
m.fn.tooltip = e, m.fn.tooltip.Constructor = g, m.fn.tooltip.noConflict = function() { | |
return m.fn.tooltip = n, this | |
} | |
}(jQuery), | |
function(l) { | |
"use strict"; | |
function n(i) { | |
return this.each(function() { | |
var e = l(this), | |
t = e.data("bs.affix"), | |
n = "object" == typeof i && i; | |
t || e.data("bs.affix", t = new c(this, n)), "string" == typeof i && t[i]() | |
}) | |
} | |
var c = function(e, t) { | |
this.options = l.extend({}, c.DEFAULTS, t); | |
var n = this.options.target === c.DEFAULTS.target ? l(this.options.target) : l(document).find(this.options.target); | |
this.$target = n.on("scroll.bs.affix.data-api", l.proxy(this.checkPosition, this)).on("click.bs.affix.data-api", l.proxy(this.checkPositionWithEventLoop, this)), this.$element = l(e), this.affixed = null, this.unpin = null, this.pinnedOffset = null, this.checkPosition() | |
}; | |
c.VERSION = "3.4.1", c.RESET = "affix affix-top affix-bottom", c.DEFAULTS = { | |
offset: 0, | |
target: window | |
}, c.prototype.getState = function(e, t, n, i) { | |
var o = this.$target.scrollTop(), | |
s = this.$element.offset(), | |
r = this.$target.height(); | |
if (null != n && "top" == this.affixed) return o < n && "top"; | |
if ("bottom" == this.affixed) return null != n ? !(o + this.unpin <= s.top) && "bottom" : !(o + r <= e - i) && "bottom"; | |
var a = null == this.affixed, | |
l = a ? o : s.top; | |
return null != n && o <= n ? "top" : null != i && e - i <= l + (a ? r : t) && "bottom" | |
}, c.prototype.getPinnedOffset = function() { | |
if (this.pinnedOffset) return this.pinnedOffset; | |
this.$element.removeClass(c.RESET).addClass("affix"); | |
var e = this.$target.scrollTop(), | |
t = this.$element.offset(); | |
return this.pinnedOffset = t.top - e | |
}, c.prototype.checkPositionWithEventLoop = function() { | |
setTimeout(l.proxy(this.checkPosition, this), 1) | |
}, c.prototype.checkPosition = function() { | |
if (this.$element.is(":visible")) { | |
var e = this.$element.height(), | |
t = this.options.offset, | |
n = t.top, | |
i = t.bottom, | |
o = Math.max(l(document).height(), l(document.body).height()); | |
"object" != typeof t && (i = n = t), "function" == typeof n && (n = t.top(this.$element)), "function" == typeof i && (i = t.bottom(this.$element)); | |
var s = this.getState(o, e, n, i); | |
if (this.affixed != s) { | |
null != this.unpin && this.$element.css("top", ""); | |
var r = "affix" + (s ? "-" + s : ""), | |
a = l.Event(r + ".bs.affix"); | |
if (this.$element.trigger(a), a.isDefaultPrevented()) return; | |
this.affixed = s, this.unpin = "bottom" == s ? this.getPinnedOffset() : null, this.$element.removeClass(c.RESET).addClass(r).trigger(r.replace("affix", "affixed") + ".bs.affix") | |
} | |
"bottom" == s && this.$element.offset({ | |
top: o - e - i | |
}) | |
} | |
}; | |
var e = l.fn.affix; | |
l.fn.affix = n, l.fn.affix.Constructor = c, l.fn.affix.noConflict = function() { | |
return l.fn.affix = e, this | |
}, l(window).on("load", function() { | |
l('[data-spy="affix"]').each(function() { | |
var e = l(this), | |
t = e.data(); | |
t.offset = t.offset || {}, null != t.offsetBottom && (t.offset.bottom = t.offsetBottom), null != t.offsetTop && (t.offset.top = t.offsetTop), n.call(e, t) | |
}) | |
}) | |
}(jQuery), | |
function(a) { | |
"use strict"; | |
function l(e) { | |
var t = e.attr("data-target"); | |
t || (t = (t = e.attr("href")) && /#[A-Za-z]/.test(t) && t.replace(/.*(?=#[^\s]*$)/, "")); | |
var n = "#" !== t ? a(document).find(t) : null; | |
return n && n.length ? n : e.parent() | |
} | |
function s(i) { | |
i && 3 === i.which || (a(t).remove(), a(c).each(function() { | |
var e = a(this), | |
t = l(e), | |
n = { | |
relatedTarget: this | |
}; | |
t.hasClass("open") && (i && "click" == i.type && /input|textarea/i.test(i.target.tagName) && a.contains(t[0], i.target) || (t.trigger(i = a.Event("hide.bs.dropdown", n)), i.isDefaultPrevented() || (e.attr("aria-expanded", "false"), t.removeClass("open").trigger(a.Event("hidden.bs.dropdown", n))))) | |
})) | |
} | |
function e(n) { | |
return this.each(function() { | |
var e = a(this), | |
t = e.data("bs.dropdown"); | |
t || e.data("bs.dropdown", t = new i(this)), "string" == typeof n && t[n].call(e) | |
}) | |
} | |
var t = ".dropdown-backdrop", | |
c = '[data-toggle="dropdown"]', | |
i = function(e) { | |
a(e).on("click.bs.dropdown", this.toggle) | |
}; | |
i.VERSION = "3.4.1", i.prototype.toggle = function(e) { | |
var t = a(this); | |
if (!t.is(".disabled, :disabled")) { | |
var n = l(t), | |
i = n.hasClass("open"); | |
if (s(), !i) { | |
"ontouchstart" in document.documentElement && !n.closest(".navbar-nav").length && a(document.createElement("div")).addClass("dropdown-backdrop").insertAfter(a(this)).on("click", s); | |
var o = { | |
relatedTarget: this | |
}; | |
if (n.trigger(e = a.Event("show.bs.dropdown", o)), e.isDefaultPrevented()) return; | |
t.trigger("focus").attr("aria-expanded", "true"), n.toggleClass("open").trigger(a.Event("shown.bs.dropdown", o)) | |
} | |
return !1 | |
} | |
}, i.prototype.keydown = function(e) { | |
if (/(38|40|27|32)/.test(e.which) && !/input|textarea/i.test(e.target.tagName)) { | |
var t = a(this); | |
if (e.preventDefault(), e.stopPropagation(), !t.is(".disabled, :disabled")) { | |
var n = l(t), | |
i = n.hasClass("open"); | |
if (!i && 27 != e.which || i && 27 == e.which) return 27 == e.which && n.find(c).trigger("focus"), t.trigger("click"); | |
var o = " li:not(.disabled):visible a", | |
s = n.find(".dropdown-menu" + o); | |
if (s.length) { | |
var r = s.index(e.target); | |
38 == e.which && 0 < r && r--, 40 == e.which && r < s.length - 1 && r++, ~r || (r = 0), s.eq(r).trigger("focus") | |
} | |
} | |
} | |
}; | |
var n = a.fn.dropdown; | |
a.fn.dropdown = e, a.fn.dropdown.Constructor = i, a.fn.dropdown.noConflict = function() { | |
return a.fn.dropdown = n, this | |
}, a(document).on("click.bs.dropdown.data-api", s).on("click.bs.dropdown.data-api", ".dropdown form", function(e) { | |
e.stopPropagation() | |
}).on("click.bs.dropdown.data-api", c, i.prototype.toggle).on("keydown.bs.dropdown.data-api", c, i.prototype.keydown).on("keydown.bs.dropdown.data-api", ".dropdown-menu", i.prototype.keydown) | |
}(jQuery), | |
function(s) { | |
"use strict"; | |
function e(n) { | |
return this.each(function() { | |
var e = s(this), | |
t = e.data("bs.alert"); | |
t || e.data("bs.alert", t = new r(this)), "string" == typeof n && t[n].call(e) | |
}) | |
} | |
var t = '[data-dismiss="alert"]', | |
r = function(e) { | |
s(e).on("click", t, this.close) | |
}; | |
r.VERSION = "3.4.1", r.TRANSITION_DURATION = 150, r.prototype.close = function(e) { | |
function t() { | |
o.detach().trigger("closed.bs.alert").remove() | |
} | |
var n = s(this), | |
i = n.attr("data-target"); | |
i || (i = (i = n.attr("href")) && i.replace(/.*(?=#[^\s]*$)/, "")), i = "#" === i ? [] : i; | |
var o = s(document).find(i); | |
e && e.preventDefault(), o.length || (o = n.closest(".alert")), o.trigger(e = s.Event("close.bs.alert")), e.isDefaultPrevented() || (o.removeClass("in"), s.support.transition && o.hasClass("fade") ? o.one("bsTransitionEnd", t).emulateTransitionEnd(r.TRANSITION_DURATION) : t()) | |
}; | |
var n = s.fn.alert; | |
s.fn.alert = e, s.fn.alert.Constructor = r, s.fn.alert.noConflict = function() { | |
return s.fn.alert = n, this | |
}, s(document).on("click.bs.alert.data-api", t, r.prototype.close) | |
}(jQuery), | |
function(o) { | |
"use strict"; | |
function e(i) { | |
return this.each(function() { | |
var e = o(this), | |
t = e.data("bs.popover"), | |
n = "object" == typeof i && i; | |
!t && /destroy|hide/.test(i) || (t || e.data("bs.popover", t = new s(this, n)), "string" == typeof i && t[i]()) | |
}) | |
} | |
var s = function(e, t) { | |
this.init("popover", e, t) | |
}; | |
if (!o.fn.tooltip) throw new Error("Popover requires tooltip.js"); | |
s.VERSION = "3.4.1", s.DEFAULTS = o.extend({}, o.fn.tooltip.Constructor.DEFAULTS, { | |
placement: "right", | |
trigger: "click", | |
content: "", | |
template: '<div class="popover" role="tooltip"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>' | |
}), s.prototype = o.extend({}, o.fn.tooltip.Constructor.prototype), (s.prototype.constructor = s).prototype.getDefaults = function() { | |
return s.DEFAULTS | |
}, s.prototype.setContent = function() { | |
var e = this.tip(), | |
t = this.getTitle(), | |
n = this.getContent(); | |
if (this.options.html) { | |
var i = typeof n; | |
this.options.sanitize && (t = this.sanitizeHtml(t), "string" === i && (n = this.sanitizeHtml(n))), e.find(".popover-title").html(t), e.find(".popover-content").children().detach().end()["string" === i ? "html" : "append"](n) | |
} else e.find(".popover-title").text(t), e.find(".popover-content").children().detach().end().text(n); | |
e.removeClass("fade top bottom left right in"), e.find(".popover-title").html() || e.find(".popover-title").hide() | |
}, s.prototype.hasContent = function() { | |
return this.getTitle() || this.getContent() | |
}, s.prototype.getContent = function() { | |
var e = this.$element, | |
t = this.options; | |
return e.attr("data-content") || ("function" == typeof t.content ? t.content.call(e[0]) : t.content) | |
}, s.prototype.arrow = function() { | |
return this.$arrow = this.$arrow || this.tip().find(".arrow") | |
}; | |
var t = o.fn.popover; | |
o.fn.popover = e, o.fn.popover.Constructor = s, o.fn.popover.noConflict = function() { | |
return o.fn.popover = t, this | |
} | |
}(jQuery), | |
function(s) { | |
"use strict"; | |
function o(e, t) { | |
this.$body = s(document.body), this.$scrollElement = s(e).is(document.body) ? s(window) : s(e), this.options = s.extend({}, o.DEFAULTS, t), this.selector = (this.options.target || "") + " .nav li > a", this.offsets = [], this.targets = [], this.activeTarget = null, this.scrollHeight = 0, this.$scrollElement.on("scroll.bs.scrollspy", s.proxy(this.process, this)), this.refresh(), this.process() | |
} | |
function t(i) { | |
return this.each(function() { | |
var e = s(this), | |
t = e.data("bs.scrollspy"), | |
n = "object" == typeof i && i; | |
t || e.data("bs.scrollspy", t = new o(this, n)), "string" == typeof i && t[i]() | |
}) | |
} | |
o.VERSION = "3.4.1", o.DEFAULTS = { | |
offset: 10 | |
}, o.prototype.getScrollHeight = function() { | |
return this.$scrollElement[0].scrollHeight || Math.max(this.$body[0].scrollHeight, document.documentElement.scrollHeight) | |
}, o.prototype.refresh = function() { | |
var e = this, | |
i = "offset", | |
o = 0; | |
this.offsets = [], this.targets = [], this.scrollHeight = this.getScrollHeight(), s.isWindow(this.$scrollElement[0]) || (i = "position", o = this.$scrollElement.scrollTop()), this.$body.find(this.selector).map(function() { | |
var e = s(this), | |
t = e.data("target") || e.attr("href"), | |
n = /^#./.test(t) && s(t); | |
return n && n.length && n.is(":visible") && [ | |
[n[i]().top + o, t] | |
] || null | |
}).sort(function(e, t) { | |
return e[0] - t[0] | |
}).each(function() { | |
e.offsets.push(this[0]), e.targets.push(this[1]) | |
}) | |
}, o.prototype.process = function() { | |
var e, t = this.$scrollElement.scrollTop() + this.options.offset, | |
n = this.getScrollHeight(), | |
i = this.options.offset + n - this.$scrollElement.height(), | |
o = this.offsets, | |
s = this.targets, | |
r = this.activeTarget; | |
if (this.scrollHeight != n && this.refresh(), i <= t) return r != (e = s[s.length - 1]) && this.activate(e); | |
if (r && t < o[0]) return this.activeTarget = null, this.clear(); | |
for (e = o.length; e--;) r != s[e] && t >= o[e] && (o[e + 1] === undefined || t < o[e + 1]) && this.activate(s[e]) | |
}, o.prototype.activate = function(e) { | |
this.activeTarget = e, this.clear(); | |
var t = this.selector + '[data-target="' + e + '"],' + this.selector + '[href="' + e + '"]', | |
n = s(t).parents("li").addClass("active"); | |
n.parent(".dropdown-menu").length && (n = n.closest("li.dropdown").addClass("active")), n.trigger("activate.bs.scrollspy") | |
}, o.prototype.clear = function() { | |
s(this.selector).parentsUntil(this.options.target, ".active").removeClass("active") | |
}; | |
var e = s.fn.scrollspy; | |
s.fn.scrollspy = t, s.fn.scrollspy.Constructor = o, s.fn.scrollspy.noConflict = function() { | |
return s.fn.scrollspy = e, this | |
}, s(window).on("load.bs.scrollspy.data-api", function() { | |
s('[data-spy="scroll"]').each(function() { | |
var e = s(this); | |
t.call(e, e.data()) | |
}) | |
}) | |
}(jQuery), | |
function(e) { | |
"function" == typeof define && define.amd ? define(["jquery"], e) : e("object" == typeof exports ? require("jquery") : jQuery) | |
}(function(C, S) { | |
function T() { | |
return new Date(Date.UTC.apply(Date, arguments)) | |
} | |
function k() { | |
var e = new Date; | |
return T(e.getFullYear(), e.getMonth(), e.getDate()) | |
} | |
function n(e, t) { | |
return e.getUTCFullYear() === t.getUTCFullYear() && e.getUTCMonth() === t.getUTCMonth() && e.getUTCDate() === t.getUTCDate() | |
} | |
function e(e) { | |
return function() { | |
return this[e].apply(this, arguments) | |
} | |
} | |
function c(e) { | |
return e && !isNaN(e.getTime()) | |
} | |
function d(e, t) { | |
function n(e, t) { | |
return t.toLowerCase() | |
} | |
var i = C(e).data(), | |
o = {}, | |
s = new RegExp("^" + t.toLowerCase() + "([A-Z])"); | |
for (var r in t = new RegExp("^" + t.toLowerCase()), i) t.test(r) && (o[r.replace(s, n)] = i[r]); | |
return o | |
} | |
function u(e) { | |
var n = {}; | |
if (D[e] || (e = e.split("-")[0], D[e])) { | |
var i = D[e]; | |
return C.each(r, function(e, t) { | |
t in i && (n[t] = i[t]) | |
}), n | |
} | |
} | |
var t, i = (t = { | |
get: function(e) { | |
return this.slice(e)[0] | |
}, | |
contains: function(e) { | |
for (var t = e && e.valueOf(), n = 0, i = this.length; n < i; n++) | |
if (this[n].valueOf() === t) return n; | |
return -1 | |
}, | |
remove: function(e) { | |
this.splice(e, 1) | |
}, | |
replace: function(e) { | |
e && (C.isArray(e) || (e = [e]), this.clear(), this.push.apply(this, e)) | |
}, | |
clear: function() { | |
this.length = 0 | |
}, | |
copy: function() { | |
var e = new i; | |
return e.replace(this), e | |
} | |
}, function() { | |
var e = []; | |
return e.push.apply(e, arguments), C.extend(e, t), e | |
}), | |
$ = function(e, t) { | |
C(e).data("datepicker", this), this._process_options(t), this.dates = new i, this.viewDate = this.o.defaultViewDate, this.focusDate = null, this.element = C(e), this.isInput = this.element.is("input"), this.inputField = this.isInput ? this.element : this.element.find("input"), this.component = !!this.element.hasClass("date") && this.element.find(".add-on, .input-group-addon, .btn"), this.hasInput = this.component && this.inputField.length, this.component && 0 === this.component.length && (this.component = !1), this.isInline = !this.component && this.element.is("div"), this.picker = C(A.template), this._check_template(this.o.templates.leftArrow) && this.picker.find(".prev").html(this.o.templates.leftArrow), this._check_template(this.o.templates.rightArrow) && this.picker.find(".next").html(this.o.templates.rightArrow), this._buildEvents(), this._attachEvents(), this.isInline ? this.picker.addClass("datepicker-inline").appendTo(this.element) : this.picker.addClass("datepicker-dropdown dropdown-menu"), this.o.rtl && this.picker.addClass("datepicker-rtl"), this.viewMode = this.o.startView, this.o.calendarWeeks && this.picker.find("thead .datepicker-title, tfoot .today, tfoot .clear").attr("colspan", function(e, t) { | |
return parseInt(t) + 1 | |
}), this._allow_update = !1, this.setStartDate(this._o.startDate), this.setEndDate(this._o.endDate), this.setDaysOfWeekDisabled(this.o.daysOfWeekDisabled), this.setDaysOfWeekHighlighted(this.o.daysOfWeekHighlighted), this.setDatesDisabled(this.o.datesDisabled), this.fillDow(), this.fillMonths(), this._allow_update = !0, this.update(), this.showMode(), this.isInline && this.show() | |
}; | |
$.prototype = { | |
constructor: $, | |
_resolveViewName: function(e, t) { | |
return 0 === e || "days" === e || "month" === e ? 0 : 1 === e || "months" === e || "year" === e ? 1 : 2 === e || "years" === e || "decade" === e ? 2 : 3 === e || "decades" === e || "century" === e ? 3 : 4 === e || "centuries" === e || "millennium" === e ? 4 : t !== S && t | |
}, | |
_check_template: function(e) { | |
try { | |
return e !== S && "" !== e && ((e.match(/[<>]/g) || []).length <= 0 || 0 < C(e).length) | |
} catch (n) { | |
return !1 | |
} | |
}, | |
_process_options: function(e) { | |
this._o = C.extend({}, this._o, e); | |
var t = this.o = C.extend({}, this._o), | |
n = t.language; | |
D[n] || (n = n.split("-")[0], D[n] || (n = p.language)), t.language = n, t.startView = this._resolveViewName(t.startView, 0), t.minViewMode = this._resolveViewName(t.minViewMode, 0), t.maxViewMode = this._resolveViewName(t.maxViewMode, 4), t.startView = Math.min(t.startView, t.maxViewMode), t.startView = Math.max(t.startView, t.minViewMode), !0 !== t.multidate && (t.multidate = Number(t.multidate) || !1, !1 !== t.multidate && (t.multidate = Math.max(0, t.multidate))), t.multidateSeparator = String(t.multidateSeparator), t.weekStart %= 7, t.weekEnd = (t.weekStart + 6) % 7; | |
var i = A.parseFormat(t.format); | |
t.startDate !== -1 / 0 && (t.startDate ? t.startDate instanceof Date ? t.startDate = this._local_to_utc(this._zero_time(t.startDate)) : t.startDate = A.parseDate(t.startDate, i, t.language, t.assumeNearbyYear) : t.startDate = -1 / 0), t.endDate !== 1 / 0 && (t.endDate ? t.endDate instanceof Date ? t.endDate = this._local_to_utc(this._zero_time(t.endDate)) : t.endDate = A.parseDate(t.endDate, i, t.language, t.assumeNearbyYear) : t.endDate = 1 / 0), t.daysOfWeekDisabled = t.daysOfWeekDisabled || [], C.isArray(t.daysOfWeekDisabled) || (t.daysOfWeekDisabled = t.daysOfWeekDisabled.split(/[,\s]*/)), t.daysOfWeekDisabled = C.map(t.daysOfWeekDisabled, function(e) { | |
return parseInt(e, 10) | |
}), t.daysOfWeekHighlighted = t.daysOfWeekHighlighted || [], C.isArray(t.daysOfWeekHighlighted) || (t.daysOfWeekHighlighted = t.daysOfWeekHighlighted.split(/[,\s]*/)), t.daysOfWeekHighlighted = C.map(t.daysOfWeekHighlighted, function(e) { | |
return parseInt(e, 10) | |
}), t.datesDisabled = t.datesDisabled || [], C.isArray(t.datesDisabled) || (t.datesDisabled = [t.datesDisabled]), t.datesDisabled = C.map(t.datesDisabled, function(e) { | |
return A.parseDate(e, i, t.language, t.assumeNearbyYear) | |
}); | |
var o = String(t.orientation).toLowerCase().split(/\s+/g), | |
s = t.orientation.toLowerCase(); | |
if (o = C.grep(o, function(e) { | |
return /^auto|left|right|top|bottom$/.test(e) | |
}), t.orientation = { | |
x: "auto", | |
y: "auto" | |
}, s && "auto" !== s) | |
if (1 === o.length) switch (o[0]) { | |
case "top": | |
case "bottom": | |
t.orientation.y = o[0]; | |
break; | |
case "left": | |
case "right": | |
t.orientation.x = o[0] | |
} else s = C.grep(o, function(e) { | |
return /^left|right$/.test(e) | |
}), t.orientation.x = s[0] || "auto", s = C.grep(o, function(e) { | |
return /^top|bottom$/.test(e) | |
}), t.orientation.y = s[0] || "auto"; | |
if (t.defaultViewDate) { | |
var r = t.defaultViewDate.year || (new Date).getFullYear(), | |
a = t.defaultViewDate.month || 0, | |
l = t.defaultViewDate.day || 1; | |
t.defaultViewDate = T(r, a, l) | |
} else t.defaultViewDate = k() | |
}, | |
_events: [], | |
_secondaryEvents: [], | |
_applyEvents: function(e) { | |
for (var t, n, i, o = 0; o < e.length; o++) t = e[o][0], 2 === e[o].length ? (n = S, i = e[o][1]) : 3 === e[o].length && (n = e[o][1], i = e[o][2]), t.on(i, n) | |
}, | |
_unapplyEvents: function(e) { | |
for (var t, n, i, o = 0; o < e.length; o++) t = e[o][0], 2 === e[o].length ? (i = S, n = e[o][1]) : 3 === e[o].length && (i = e[o][1], n = e[o][2]), t.off(n, i) | |
}, | |
_buildEvents: function() { | |
var e = { | |
keyup: C.proxy(function(e) { | |
-1 === C.inArray(e.keyCode, [27, 37, 39, 38, 40, 32, 13, 9]) && this.update() | |
}, this), | |
keydown: C.proxy(this.keydown, this), | |
paste: C.proxy(this.paste, this) | |
}; | |
!0 === this.o.showOnFocus && (e.focus = C.proxy(this.show, this)), this.isInput ? this._events = [ | |
[this.element, e] | |
] : this.component && this.hasInput ? this._events = [ | |
[this.inputField, e], | |
[this.component, { | |
click: C.proxy(this.show, this) | |
}] | |
] : this._events = [ | |
[this.element, { | |
click: C.proxy(this.show, this), | |
keydown: C.proxy(this.keydown, this) | |
}] | |
], this._events.push([this.element, "*", { | |
blur: C.proxy(function(e) { | |
this._focused_from = e.target | |
}, this) | |
}], [this.element, { | |
blur: C.proxy(function(e) { | |
this._focused_from = e.target | |
}, this) | |
}]), this.o.immediateUpdates && this._events.push([this.element, { | |
"changeYear changeMonth": C.proxy(function(e) { | |
this.update(e.date) | |
}, this) | |
}]), this._secondaryEvents = [ | |
[this.picker, { | |
click: C.proxy(this.click, this) | |
}], | |
[C(window), { | |
resize: C.proxy(this.place, this) | |
}], | |
[C(document), { | |
mousedown: C.proxy(function(e) { | |
this.element.is(e.target) || this.element.find(e.target).length || this.picker.is(e.target) || this.picker.find(e.target).length || this.isInline || this.hide() | |
}, this) | |
}] | |
] | |
}, | |
_attachEvents: function() { | |
this._detachEvents(), this._applyEvents(this._events) | |
}, | |
_detachEvents: function() { | |
this._unapplyEvents(this._events) | |
}, | |
_attachSecondaryEvents: function() { | |
this._detachSecondaryEvents(), this._applyEvents(this._secondaryEvents) | |
}, | |
_detachSecondaryEvents: function() { | |
this._unapplyEvents(this._secondaryEvents) | |
}, | |
_trigger: function(e, t) { | |
var n = t || this.dates.get(-1), | |
i = this._utc_to_local(n); | |
this.element.trigger({ | |
type: e, | |
date: i, | |
dates: C.map(this.dates, this._utc_to_local), | |
format: C.proxy(function(e, t) { | |
0 === arguments.length ? (e = this.dates.length - 1, t = this.o.format) : "string" == typeof e && (t = e, e = this.dates.length - 1), t = t || this.o.format; | |
var n = this.dates.get(e); | |
return A.formatDate(n, t, this.o.language) | |
}, this) | |
}) | |
}, | |
show: function() { | |
return this.inputField.prop("disabled") || this.inputField.prop("readonly") && !1 === this.o.enableOnReadonly ? void 0 : (this.isInline || this.picker.appendTo(this.o.container), this.place(), this.picker.show(), this._attachSecondaryEvents(), this._trigger("show"), (window.navigator.msMaxTouchPoints || "ontouchstart" in document) && this.o.disableTouchKeyboard && C(this.element).blur(), this) | |
}, | |
hide: function() { | |
return this.isInline || !this.picker.is(":visible") || (this.focusDate = null, this.picker.hide().detach(), this._detachSecondaryEvents(), this.viewMode = this.o.startView, this.showMode(), this.o.forceParse && this.inputField.val() && this.setValue(), this._trigger("hide")), this | |
}, | |
destroy: function() { | |
return this.hide(), this._detachEvents(), this._detachSecondaryEvents(), this.picker.remove(), delete this.element.data().datepicker, this.isInput || delete this.element.data().date, this | |
}, | |
paste: function(e) { | |
var t; | |
if (e.originalEvent.clipboardData && e.originalEvent.clipboardData.types && -1 !== C.inArray("text/plain", e.originalEvent.clipboardData.types)) t = e.originalEvent.clipboardData.getData("text/plain"); | |
else { | |
if (!window.clipboardData) return; | |
t = window.clipboardData.getData("Text") | |
} | |
this.setDate(t), this.update(), e.preventDefault() | |
}, | |
_utc_to_local: function(e) { | |
return e && new Date(e.getTime() + 6e4 * e.getTimezoneOffset()) | |
}, | |
_local_to_utc: function(e) { | |
return e && new Date(e.getTime() - 6e4 * e.getTimezoneOffset()) | |
}, | |
_zero_time: function(e) { | |
return e && new Date(e.getFullYear(), e.getMonth(), e.getDate()) | |
}, | |
_zero_utc_time: function(e) { | |
return e && new Date(Date.UTC(e.getUTCFullYear(), e.getUTCMonth(), e.getUTCDate())) | |
}, | |
getDates: function() { | |
return C.map(this.dates, this._utc_to_local) | |
}, | |
getUTCDates: function() { | |
return C.map(this.dates, function(e) { | |
return new Date(e) | |
}) | |
}, | |
getDate: function() { | |
return this._utc_to_local(this.getUTCDate()) | |
}, | |
getUTCDate: function() { | |
var e = this.dates.get(-1); | |
return void 0 !== e ? new Date(e) : null | |
}, | |
clearDates: function() { | |
this.inputField && this.inputField.val(""), this.update(), this._trigger("changeDate"), this.o.autoclose && this.hide() | |
}, | |
setDates: function(e) { | |
var t = C.isArray(e) ? e : arguments; | |
return this.update.apply(this, t), this._trigger("changeDate"), this.setValue(), this | |
}, | |
setUTCDates: function(e) { | |
var t = C.isArray(e) ? e : arguments; | |
return this.update.apply(this, C.map(t, this._utc_to_local)), this._trigger("changeDate"), this.setValue(), this | |
}, | |
setDate: e("setDates"), | |
setUTCDate: e("setUTCDates"), | |
remove: e("destroy"), | |
setValue: function() { | |
var e = this.getFormattedDate(); | |
return this.inputField.val(e), this | |
}, | |
getFormattedDate: function(t) { | |
t === S && (t = this.o.format); | |
var n = this.o.language; | |
return C.map(this.dates, function(e) { | |
return A.formatDate(e, t, n) | |
}).join(this.o.multidateSeparator) | |
}, | |
getStartDate: function() { | |
return this.o.startDate | |
}, | |
setStartDate: function(e) { | |
return this._process_options({ | |
startDate: e | |
}), this.update(), this.updateNavArrows(), this | |
}, | |
getEndDate: function() { | |
return this.o.endDate | |
}, | |
setEndDate: function(e) { | |
return this._process_options({ | |
endDate: e | |
}), this.update(), this.updateNavArrows(), this | |
}, | |
setDaysOfWeekDisabled: function(e) { | |
return this._process_options({ | |
daysOfWeekDisabled: e | |
}), this.update(), this.updateNavArrows(), this | |
}, | |
setDaysOfWeekHighlighted: function(e) { | |
return this._process_options({ | |
daysOfWeekHighlighted: e | |
}), this.update(), this | |
}, | |
setDatesDisabled: function(e) { | |
this._process_options({ | |
datesDisabled: e | |
}), this.update(), this.updateNavArrows() | |
}, | |
place: function() { | |
if (this.isInline) return this; | |
var e = this.picker.outerWidth(), | |
t = this.picker.outerHeight(), | |
n = 10, | |
i = C(this.o.container), | |
o = i.width(), | |
s = "body" === this.o.container ? C(document).scrollTop() : i.scrollTop(), | |
r = i.offset(), | |
a = []; | |
this.element.parents().each(function() { | |
var e = C(this).css("z-index"); | |
"auto" !== e && 0 !== e && a.push(parseInt(e)) | |
}); | |
var l = Math.max.apply(Math, a) + this.o.zIndexOffset, | |
c = this.component ? this.component.parent().offset() : this.element.offset(), | |
d = this.component ? this.component.outerHeight(!0) : this.element.outerHeight(!1), | |
u = this.component ? this.component.outerWidth(!0) : this.element.outerWidth(!1), | |
h = c.left - r.left, | |
p = c.top - r.top; | |
"body" !== this.o.container && (p += s), this.picker.removeClass("datepicker-orient-top datepicker-orient-bottom datepicker-orient-right datepicker-orient-left"), "auto" !== this.o.orientation.x ? (this.picker.addClass("datepicker-orient-" + this.o.orientation.x), "right" === this.o.orientation.x && (h -= e - u)) : c.left < 0 ? (this.picker.addClass("datepicker-orient-left"), h -= c.left - n) : o < h + e ? (this.picker.addClass("datepicker-orient-right"), h += u - e) : this.picker.addClass("datepicker-orient-left"); | |
var f = this.o.orientation.y; | |
if ("auto" === f && (f = -s + p - t < 0 ? "bottom" : "top"), this.picker.addClass("datepicker-orient-" + f), "top" === f ? p -= t + parseInt(this.picker.css("padding-top")) : p += d, this.o.rtl) { | |
var m = o - (h + u); | |
this.picker.css({ | |
top: p, | |
right: m, | |
zIndex: l | |
}) | |
} else this.picker.css({ | |
top: p, | |
left: h, | |
zIndex: l | |
}); | |
return this | |
}, | |
_allow_update: !0, | |
update: function() { | |
if (!this._allow_update) return this; | |
var e = this.dates.copy(), | |
n = [], | |
t = !1; | |
return arguments.length ? (C.each(arguments, C.proxy(function(e, t) { | |
t instanceof Date && (t = this._local_to_utc(t)), n.push(t) | |
}, this)), t = !0) : (n = (n = this.isInput ? this.element.val() : this.element.data("date") || this.inputField.val()) && this.o.multidate ? n.split(this.o.multidateSeparator) : [n], delete this.element.data().date), n = C.map(n, C.proxy(function(e) { | |
return A.parseDate(e, this.o.format, this.o.language, this.o.assumeNearbyYear) | |
}, this)), n = C.grep(n, C.proxy(function(e) { | |
return !this.dateWithinRange(e) || !e | |
}, this), !0), this.dates.replace(n), this.dates.length ? this.viewDate = new Date(this.dates.get(-1)) : this.viewDate < this.o.startDate ? this.viewDate = new Date(this.o.startDate) : this.viewDate > this.o.endDate ? this.viewDate = new Date(this.o.endDate) : this.viewDate = this.o.defaultViewDate, t ? this.setValue() : n.length && String(e) !== String(this.dates) && this._trigger("changeDate"), !this.dates.length && e.length && this._trigger("clearDate"), this.fill(), this.element.change(), this | |
}, | |
fillDow: function() { | |
var e = this.o.weekStart, | |
t = "<tr>"; | |
for (this.o.calendarWeeks && (this.picker.find(".datepicker-days .datepicker-switch").attr("colspan", function(e, t) { | |
return parseInt(t) + 1 | |
}), t += '<th class="cw"> </th>'); e < this.o.weekStart + 7;) t += '<th class="dow', -1 < C.inArray(e, this.o.daysOfWeekDisabled) && (t += " disabled"), t += '">' + D[this.o.language].daysMin[e++ % 7] + "</th>"; | |
t += "</tr>", this.picker.find(".datepicker-days thead").append(t) | |
}, | |
fillMonths: function() { | |
for (var e = this._utc_to_local(this.viewDate), t = "", n = 0; n < 12;) { | |
t += '<span class="month' + (e && e.getMonth() === n ? " focused" : "") + '">' + D[this.o.language].monthsShort[n++] + "</span>" | |
} | |
this.picker.find(".datepicker-months td").html(t) | |
}, | |
setRange: function(e) { | |
e && e.length ? this.range = C.map(e, function(e) { | |
return e.valueOf() | |
}) : delete this.range, this.fill() | |
}, | |
getClassNames: function(e) { | |
var t = [], | |
n = this.viewDate.getUTCFullYear(), | |
i = this.viewDate.getUTCMonth(), | |
o = new Date; | |
return e.getUTCFullYear() < n || e.getUTCFullYear() === n && e.getUTCMonth() < i ? t.push("old") : (e.getUTCFullYear() > n || e.getUTCFullYear() === n && e.getUTCMonth() > i) && t.push("new"), this.focusDate && e.valueOf() === this.focusDate.valueOf() && t.push("focused"), this.o.todayHighlight && e.getUTCFullYear() === o.getFullYear() && e.getUTCMonth() === o.getMonth() && e.getUTCDate() === o.getDate() && t.push("today"), -1 !== this.dates.contains(e) && t.push("active"), this.dateWithinRange(e) || t.push("disabled"), this.dateIsDisabled(e) && t.push("disabled", "disabled-date"), -1 !== C.inArray(e.getUTCDay(), this.o.daysOfWeekHighlighted) && t.push("highlighted"), this.range && (e > this.range[0] && e < this.range[this.range.length - 1] && t.push("range"), -1 !== C.inArray(e.valueOf(), this.range) && t.push("selected"), e.valueOf() === this.range[0] && t.push("range-start"), e.valueOf() === this.range[this.range.length - 1] && t.push("range-end")), t | |
}, | |
_fill_yearsView: function(e, t, n, i, o, s, r, a) { | |
var l, c, d, u, h, p, f, m, g, v, y; | |
for (l = "", c = this.picker.find(e), d = parseInt(o / n, 10) * n, h = parseInt(s / i, 10) * i, p = parseInt(r / i, 10) * i, u = C.map(this.dates, function(e) { | |
return parseInt(e.getUTCFullYear() / i, 10) * i | |
}), c.find(".datepicker-switch").text(d + "-" + (d + 9 * i)), f = d - i, m = -1; m < 11; m += 1) g = [t], v = null, -1 === m ? g.push("old") : 10 === m && g.push("new"), -1 !== C.inArray(f, u) && g.push("active"), (f < h || p < f) && g.push("disabled"), f === this.viewDate.getFullYear() && g.push("focused"), a !== C.noop && ((y = a(new Date(f, 0, 1))) === S ? y = {} : "boolean" == typeof y ? y = { | |
enabled: y | |
} : "string" == typeof y && (y = { | |
classes: y | |
}), !1 === y.enabled && g.push("disabled"), y.classes && (g = g.concat(y.classes.split(/\s+/))), y.tooltip && (v = y.tooltip)), l += '<span class="' + g.join(" ") + '"' + (v ? ' title="' + v + '"' : "") + ">" + f + "</span>", f += i; | |
c.find("td").html(l) | |
}, | |
fill: function() { | |
var e, t, n = new Date(this.viewDate), | |
o = n.getUTCFullYear(), | |
i = n.getUTCMonth(), | |
s = this.o.startDate !== -1 / 0 ? this.o.startDate.getUTCFullYear() : -1 / 0, | |
r = this.o.startDate !== -1 / 0 ? this.o.startDate.getUTCMonth() : -1 / 0, | |
a = this.o.endDate !== 1 / 0 ? this.o.endDate.getUTCFullYear() : 1 / 0, | |
l = this.o.endDate !== 1 / 0 ? this.o.endDate.getUTCMonth() : 1 / 0, | |
c = D[this.o.language].today || D.en.today || "", | |
d = D[this.o.language].clear || D.en.clear || "", | |
u = D[this.o.language].titleFormat || D.en.titleFormat; | |
if (!isNaN(o) && !isNaN(i)) { | |
this.picker.find(".datepicker-days .datepicker-switch").text(A.formatDate(n, u, this.o.language)), this.picker.find("tfoot .today").text(c).toggle(!1 !== this.o.todayBtn), this.picker.find("tfoot .clear").text(d).toggle(!1 !== this.o.clearBtn), this.picker.find("thead .datepicker-title").text(this.o.title).toggle("" !== this.o.title), this.updateNavArrows(), this.fillMonths(); | |
var h = T(o, i - 1, 28), | |
p = A.getDaysInMonth(h.getUTCFullYear(), h.getUTCMonth()); | |
h.setUTCDate(p), h.setUTCDate(p - (h.getUTCDay() - this.o.weekStart + 7) % 7); | |
var f = new Date(h); | |
h.getUTCFullYear() < 100 && f.setUTCFullYear(h.getUTCFullYear()), f.setUTCDate(f.getUTCDate() + 42), f = f.valueOf(); | |
for (var m, g = []; h.valueOf() < f;) { | |
if (h.getUTCDay() === this.o.weekStart && (g.push("<tr>"), this.o.calendarWeeks)) { | |
var v = new Date(+h + (this.o.weekStart - h.getUTCDay() - 7) % 7 * 864e5), | |
y = new Date(Number(v) + (11 - v.getUTCDay()) % 7 * 864e5), | |
b = new Date(Number(b = T(y.getUTCFullYear(), 0, 1)) + (11 - b.getUTCDay()) % 7 * 864e5), | |
w = (y - b) / 864e5 / 7 + 1; | |
g.push('<td class="cw">' + w + "</td>") | |
}(m = this.getClassNames(h)).push("day"), this.o.beforeShowDay !== C.noop && ((t = this.o.beforeShowDay(this._utc_to_local(h))) === S ? t = {} : "boolean" == typeof t ? t = { | |
enabled: t | |
} : "string" == typeof t && (t = { | |
classes: t | |
}), !1 === t.enabled && m.push("disabled"), t.classes && (m = m.concat(t.classes.split(/\s+/))), t.tooltip && (e = t.tooltip)), m = C.unique(m), g.push('<td class="' + m.join(" ") + '"' + (e ? ' title="' + e + '"' : "") + (this.o.dateCells ? ' data-date="' + h.getTime().toString() + '"' : "") + ">" + h.getUTCDate() + "</td>"), e = null, h.getUTCDay() === this.o.weekEnd && g.push("</tr>"), h.setUTCDate(h.getUTCDate() + 1) | |
} | |
this.picker.find(".datepicker-days tbody").empty().append(g.join("")); | |
var _ = D[this.o.language].monthsTitle || D.en.monthsTitle || "Months", | |
x = this.picker.find(".datepicker-months").find(".datepicker-switch").text(this.o.maxViewMode < 2 ? _ : o).end().find("span").removeClass("active"); | |
if (C.each(this.dates, function(e, t) { | |
t.getUTCFullYear() === o && x.eq(t.getUTCMonth()).addClass("active") | |
}), (o < s || a < o) && x.addClass("disabled"), o === s && x.slice(0, r).addClass("disabled"), o === a && x.slice(l + 1).addClass("disabled"), this.o.beforeShowMonth !== C.noop) { | |
var k = this; | |
C.each(x, function(e, t) { | |
var n = new Date(o, e, 1), | |
i = k.o.beforeShowMonth(n); | |
i === S ? i = {} : "boolean" == typeof i ? i = { | |
enabled: i | |
} : "string" == typeof i && (i = { | |
classes: i | |
}), !1 !== i.enabled || C(t).hasClass("disabled") || C(t).addClass("disabled"), i.classes && C(t).addClass(i.classes), i.tooltip && C(t).prop("title", i.tooltip) | |
}) | |
} | |
this._fill_yearsView(".datepicker-years", "year", 10, 1, o, s, a, this.o.beforeShowYear), this._fill_yearsView(".datepicker-decades", "decade", 100, 10, o, s, a, this.o.beforeShowDecade), this._fill_yearsView(".datepicker-centuries", "century", 1e3, 100, o, s, a, this.o.beforeShowCentury) | |
} | |
}, | |
updateNavArrows: function() { | |
if (this._allow_update) { | |
var e = new Date(this.viewDate), | |
t = e.getUTCFullYear(), | |
n = e.getUTCMonth(); | |
switch (this.viewMode) { | |
case 0: | |
this.o.startDate !== -1 / 0 && t <= this.o.startDate.getUTCFullYear() && n <= this.o.startDate.getUTCMonth() ? this.picker.find(".prev").addClass("disabled") : this.picker.find(".prev").removeClass("disabled"), this.o.endDate !== 1 / 0 && t >= this.o.endDate.getUTCFullYear() && n >= this.o.endDate.getUTCMonth() ? this.picker.find(".next").addClass("disabled") : this.picker.find(".next").removeClass("disabled"); | |
break; | |
case 1: | |
case 2: | |
case 3: | |
case 4: | |
this.o.startDate !== -1 / 0 && t <= this.o.startDate.getUTCFullYear() || this.o.maxViewMode < 2 ? this.picker.find(".prev").addClass("disabled") : this.picker.find(".prev").removeClass("disabled"), this.o.endDate !== 1 / 0 && t >= this.o.endDate.getUTCFullYear() || this.o.maxViewMode < 2 ? this.picker.find(".next").addClass("disabled") : this.picker.find(".next").removeClass("disabled") | |
} | |
} | |
}, | |
click: function(e) { | |
var t, n, i, o, s, r, a; | |
e.preventDefault(), e.stopPropagation(), (t = C(e.target)).hasClass("datepicker-switch") && this.showMode(1); | |
var l = t.closest(".prev, .next"); | |
0 < l.length && (n = A.modes[this.viewMode].navStep * (l.hasClass("prev") ? -1 : 1), 0 === this.viewMode ? (this.viewDate = this.moveMonth(this.viewDate, n), this._trigger("changeMonth", this.viewDate)) : (this.viewDate = this.moveYear(this.viewDate, n), 1 === this.viewMode && this._trigger("changeYear", this.viewDate)), this.fill()), t.hasClass("today") && !t.hasClass("day") && (this.showMode(-2), this._setDate(k(), "linked" === this.o.todayBtn ? null : "view")), t.hasClass("clear") && this.clearDates(), t.hasClass("disabled") || (t.hasClass("day") && (i = parseInt(t.text(), 10) || 1, o = this.viewDate.getUTCFullYear(), s = this.viewDate.getUTCMonth(), t.hasClass("old") && (0 === s ? (s = 11, o -= 1, a = r = !0) : (s -= 1, r = !0)), t.hasClass("new") && (11 === s ? (o += 1, a = r = !(s = 0)) : (s += 1, r = !0)), this._setDate(T(o, s, i)), a && this._trigger("changeYear", this.viewDate), r && this._trigger("changeMonth", this.viewDate)), t.hasClass("month") && (this.viewDate.setUTCDate(1), i = 1, s = t.parent().find("span").index(t), o = this.viewDate.getUTCFullYear(), this.viewDate.setUTCMonth(s), this._trigger("changeMonth", this.viewDate), 1 === this.o.minViewMode ? (this._setDate(T(o, s, i)), this.showMode()) : this.showMode(-1), this.fill()), (t.hasClass("year") || t.hasClass("decade") || t.hasClass("century")) && (this.viewDate.setUTCDate(1), i = 1, s = 0, o = parseInt(t.text(), 10) || 0, this.viewDate.setUTCFullYear(o), t.hasClass("year") && (this._trigger("changeYear", this.viewDate), 2 === this.o.minViewMode && this._setDate(T(o, s, i))), t.hasClass("decade") && (this._trigger("changeDecade", this.viewDate), 3 === this.o.minViewMode && this._setDate(T(o, s, i))), t.hasClass("century") && (this._trigger("changeCentury", this.viewDate), 4 === this.o.minViewMode && this._setDate(T(o, s, i))), this.showMode(-1), this.fill())), this.picker.is(":visible") && this._focused_from && C(this._focused_from).focus(), delete this._focused_from | |
}, | |
_toggle_multidate: function(e) { | |
var t = this.dates.contains(e); | |
if (e || this.dates.clear(), -1 !== t ? (!0 === this.o.multidate || 1 < this.o.multidate || this.o.toggleActive) && this.dates.remove(t) : (!1 === this.o.multidate && this.dates.clear(), this.dates.push(e)), "number" == typeof this.o.multidate) | |
for (; this.dates.length > this.o.multidate;) this.dates.remove(0) | |
}, | |
_setDate: function(e, t) { | |
t && "date" !== t || this._toggle_multidate(e && new Date(e)), t && "view" !== t || (this.viewDate = e && new Date(e)), this.fill(), this.setValue(), t && "view" === t || this._trigger("changeDate"), this.inputField && this.inputField.change(), !this.o.autoclose || t && "date" !== t || this.hide() | |
}, | |
moveDay: function(e, t) { | |
var n = new Date(e); | |
return n.setUTCDate(e.getUTCDate() + t), n | |
}, | |
moveWeek: function(e, t) { | |
return this.moveDay(e, 7 * t) | |
}, | |
moveMonth: function(e, t) { | |
if (!c(e)) return this.o.defaultViewDate; | |
if (!t) return e; | |
var n, i, o = new Date(e.valueOf()), | |
s = o.getUTCDate(), | |
r = o.getUTCMonth(), | |
a = Math.abs(t); | |
if (t = 0 < t ? 1 : -1, 1 === a) i = -1 === t ? function() { | |
return o.getUTCMonth() === r | |
} : function() { | |
return o.getUTCMonth() !== n | |
}, n = r + t, o.setUTCMonth(n), (n < 0 || 11 < n) && (n = (n + 12) % 12); | |
else { | |
for (var l = 0; l < a; l++) o = this.moveMonth(o, t); | |
n = o.getUTCMonth(), o.setUTCDate(s), i = function() { | |
return n !== o.getUTCMonth() | |
} | |
} | |
for (; i();) o.setUTCDate(--s), o.setUTCMonth(n); | |
return o | |
}, | |
moveYear: function(e, t) { | |
return this.moveMonth(e, 12 * t) | |
}, | |
moveAvailableDate: function(e, t, n) { | |
do { | |
if (e = this[n](e, t), !this.dateWithinRange(e)) return !1; | |
n = "moveDay" | |
} while (this.dateIsDisabled(e)); | |
return e | |
}, | |
weekOfDateIsDisabled: function(e) { | |
return -1 !== C.inArray(e.getUTCDay(), this.o.daysOfWeekDisabled) | |
}, | |
dateIsDisabled: function(t) { | |
return this.weekOfDateIsDisabled(t) || 0 < C.grep(this.o.datesDisabled, function(e) { | |
return n(t, e) | |
}).length | |
}, | |
dateWithinRange: function(e) { | |
return e >= this.o.startDate && e <= this.o.endDate | |
}, | |
keydown: function(e) { | |
if (this.picker.is(":visible")) { | |
var t, n, i = !1, | |
o = this.focusDate || this.viewDate; | |
switch (e.keyCode) { | |
case 27: | |
this.focusDate ? (this.focusDate = null, this.viewDate = this.dates.get(-1) || this.viewDate, this.fill()) : this.hide(), e.preventDefault(), e.stopPropagation(); | |
break; | |
case 37: | |
case 38: | |
case 39: | |
case 40: | |
if (!this.o.keyboardNavigation || 7 === this.o.daysOfWeekDisabled.length) break; | |
t = 37 === e.keyCode || 38 === e.keyCode ? -1 : 1, 0 === this.viewMode ? e.ctrlKey ? (n = this.moveAvailableDate(o, t, "moveYear")) && this._trigger("changeYear", this.viewDate) : e.shiftKey ? (n = this.moveAvailableDate(o, t, "moveMonth")) && this._trigger("changeMonth", this.viewDate) : 37 === e.keyCode || 39 === e.keyCode ? n = this.moveAvailableDate(o, t, "moveDay") : this.weekOfDateIsDisabled(o) || (n = this.moveAvailableDate(o, t, "moveWeek")) : 1 === this.viewMode ? ((38 === e.keyCode || 40 === e.keyCode) && (t *= 4), n = this.moveAvailableDate(o, t, "moveMonth")) : 2 === this.viewMode && ((38 === e.keyCode || 40 === e.keyCode) && (t *= 4), n = this.moveAvailableDate(o, t, "moveYear")), n && (this.focusDate = this.viewDate = n, this.setValue(), this.fill(), e.preventDefault()); | |
break; | |
case 13: | |
if (!this.o.forceParse) break; | |
o = this.focusDate || this.dates.get(-1) || this.viewDate, this.o.keyboardNavigation && (this._toggle_multidate(o), i = !0), this.focusDate = null, this.viewDate = this.dates.get(-1) || this.viewDate, this.setValue(), this.fill(), this.picker.is(":visible") && (e.preventDefault(), e.stopPropagation(), this.o.autoclose && this.hide()); | |
break; | |
case 9: | |
this.focusDate = null, this.viewDate = this.dates.get(-1) || this.viewDate, this.fill(), this.hide() | |
} | |
i && (this.dates.length ? this._trigger("changeDate") : this._trigger("clearDate"), this.inputField && this.inputField.change()) | |
} else(40 === e.keyCode || 27 === e.keyCode) && (this.show(), e.stopPropagation()) | |
}, | |
showMode: function(e) { | |
e && (this.viewMode = Math.max(this.o.minViewMode, Math.min(this.o.maxViewMode, this.viewMode + e))), this.picker.children("div").hide().filter(".datepicker-" + A.modes[this.viewMode].clsName).show(), this.updateNavArrows() | |
} | |
}; | |
var h = function(e, t) { | |
C(e).data("datepicker", this), this.element = C(e), this.inputs = C.map(t.inputs, function(e) { | |
return e.jquery ? e[0] : e | |
}), delete t.inputs, s.call(C(this.inputs), t).on("changeDate", C.proxy(this.dateUpdated, this)), this.pickers = C.map(this.inputs, function(e) { | |
return C(e).data("datepicker") | |
}), this.updateDates() | |
}; | |
h.prototype = { | |
updateDates: function() { | |
this.dates = C.map(this.pickers, function(e) { | |
return e.getUTCDate() | |
}), this.updateRanges() | |
}, | |
updateRanges: function() { | |
var n = C.map(this.dates, function(e) { | |
return e.valueOf() | |
}); | |
C.each(this.pickers, function(e, t) { | |
t.setRange(n) | |
}) | |
}, | |
dateUpdated: function(e) { | |
if (!this.updating) { | |
this.updating = !0; | |
var t = C(e.target).data("datepicker"); | |
if (void 0 !== t) { | |
var n = t.getUTCDate(), | |
i = C.inArray(e.target, this.inputs), | |
o = i - 1, | |
s = i + 1, | |
r = this.inputs.length; | |
if (-1 !== i) { | |
if (C.each(this.pickers, function(e, t) { | |
t.getUTCDate() || t.setUTCDate(n) | |
}), n < this.dates[o]) | |
for (; 0 <= o && n < this.dates[o];) this.pickers[o--].setUTCDate(n); | |
else if (n > this.dates[s]) | |
for (; s < r && n > this.dates[s];) this.pickers[s++].setUTCDate(n); | |
this.updateDates(), delete this.updating | |
} | |
} | |
} | |
}, | |
remove: function() { | |
C.map(this.pickers, function(e) { | |
e.remove() | |
}), delete this.element.data().datepicker | |
} | |
}; | |
var o = C.fn.datepicker, | |
s = function(r) { | |
var a, l = Array.apply(null, arguments); | |
if (l.shift(), this.each(function() { | |
var e = C(this), | |
t = e.data("datepicker"), | |
n = "object" == typeof r && r; | |
if (!t) { | |
var i = d(this, "date"), | |
o = u(C.extend({}, p, i, n).language), | |
s = C.extend({}, p, o, i, n); | |
e.hasClass("input-daterange") || s.inputs ? (C.extend(s, { | |
inputs: s.inputs || e.find("input").toArray() | |
}), t = new h(this, s)) : t = new $(this, s), e.data("datepicker", t) | |
} | |
"string" == typeof r && "function" == typeof t[r] && (a = t[r].apply(t, l)) | |
}), a === S || a instanceof $ || a instanceof h) return this; | |
if (1 < this.length) throw new Error("Using only allowed for the collection of a single element (" + r + " function)"); | |
return a | |
}; | |
C.fn.datepicker = s; | |
var p = C.fn.datepicker.defaults = { | |
assumeNearbyYear: !1, | |
autoclose: !1, | |
beforeShowDay: C.noop, | |
beforeShowMonth: C.noop, | |
beforeShowYear: C.noop, | |
beforeShowDecade: C.noop, | |
beforeShowCentury: C.noop, | |
calendarWeeks: !1, | |
clearBtn: !1, | |
toggleActive: !1, | |
daysOfWeekDisabled: [], | |
daysOfWeekHighlighted: [], | |
datesDisabled: [], | |
endDate: 1 / 0, | |
forceParse: !0, | |
format: "mm/dd/yyyy", | |
keyboardNavigation: !0, | |
language: "en", | |
minViewMode: 0, | |
maxViewMode: 4, | |
multidate: !1, | |
multidateSeparator: ",", | |
orientation: "auto", | |
rtl: !1, | |
startDate: -1 / 0, | |
startView: 0, | |
todayBtn: !1, | |
todayHighlight: !1, | |
weekStart: 0, | |
disableTouchKeyboard: !1, | |
enableOnReadonly: !0, | |
showOnFocus: !0, | |
zIndexOffset: 10, | |
container: "body", | |
immediateUpdates: !1, | |
dateCells: !1, | |
title: "", | |
templates: { | |
leftArrow: "«", | |
rightArrow: "»" | |
} | |
}, | |
r = C.fn.datepicker.locale_opts = ["format", "rtl", "weekStart"]; | |
C.fn.datepicker.Constructor = $; | |
var D = C.fn.datepicker.dates = { | |
en: { | |
days: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"], | |
daysShort: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], | |
daysMin: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"], | |
months: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"], | |
monthsShort: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"], | |
today: "Today", | |
clear: "Clear", | |
titleFormat: "MM yyyy" | |
} | |
}, | |
A = { | |
modes: [{ | |
clsName: "days", | |
navFnc: "Month", | |
navStep: 1 | |
}, { | |
clsName: "months", | |
navFnc: "FullYear", | |
navStep: 1 | |
}, { | |
clsName: "years", | |
navFnc: "FullYear", | |
navStep: 10 | |
}, { | |
clsName: "decades", | |
navFnc: "FullDecade", | |
navStep: 100 | |
}, { | |
clsName: "centuries", | |
navFnc: "FullCentury", | |
navStep: 1e3 | |
}], | |
isLeapYear: function(e) { | |
return e % 4 == 0 && e % 100 != 0 || e % 400 == 0 | |
}, | |
getDaysInMonth: function(e, t) { | |
return [31, A.isLeapYear(e) ? 29 : 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31][t] | |
}, | |
validParts: /dd?|DD?|mm?|MM?|yy(?:yy)?/g, | |
nonpunctuation: /[^ -\/:-@\u5e74\u6708\u65e5\[-`{-~\t\n\r]+/g, | |
parseFormat: function(e) { | |
if ("function" == typeof e.toValue && "function" == typeof e.toDisplay) return e; | |
var t = e.replace(this.validParts, "\0").split("\0"), | |
n = e.match(this.validParts); | |
if (!t || !t.length || !n || 0 === n.length) throw new Error("Invalid date format."); | |
return { | |
separators: t, | |
parts: n | |
} | |
}, | |
parseDate: function(e, t, n, i) { | |
function o(e, t) { | |
return !0 === t && (t = 10), e < 100 && ((e += 2e3) > (new Date).getFullYear() + t && (e -= 100)), e | |
} | |
function s() { | |
var e = this.slice(0, u[l].length), | |
t = u[l].slice(0, e.length); | |
return e.toLowerCase() === t.toLowerCase() | |
} | |
if (!e) return S; | |
if (e instanceof Date) return e; | |
if ("string" == typeof t && (t = A.parseFormat(t)), t.toValue) return t.toValue(e, t, n); | |
var r, a, l, c, d = /([\-+]\d+)([dmwy])/, | |
u = e.match(/([\-+]\d+)([dmwy])/g), | |
h = { | |
d: "moveDay", | |
m: "moveMonth", | |
w: "moveWeek", | |
y: "moveYear" | |
}, | |
p = { | |
yesterday: "-1d", | |
today: "+0d", | |
tomorrow: "+1d" | |
}; | |
if (/^[\-+]\d+[dmwy]([\s,]+[\-+]\d+[dmwy])*$/.test(e)) { | |
for (e = new Date, l = 0; l < u.length; l++) r = d.exec(u[l]), a = parseInt(r[1]), c = h[r[2]], e = $.prototype[c](e, a); | |
return T(e.getUTCFullYear(), e.getUTCMonth(), e.getUTCDate()) | |
} | |
if ("undefined" != typeof p[e] && (e = p[e], u = e.match(/([\-+]\d+)([dmwy])/g), /^[\-+]\d+[dmwy]([\s,]+[\-+]\d+[dmwy])*$/.test(e))) { | |
for (e = new Date, l = 0; l < u.length; l++) r = d.exec(u[l]), a = parseInt(r[1]), c = h[r[2]], e = $.prototype[c](e, a); | |
return T(e.getUTCFullYear(), e.getUTCMonth(), e.getUTCDate()) | |
} | |
u = e && e.match(this.nonpunctuation) || [], e = new Date; | |
var f, m, g = {}, | |
v = ["yyyy", "yy", "M", "MM", "m", "mm", "d", "dd"], | |
y = { | |
yyyy: function(e, t) { | |
return e.setUTCFullYear(i ? o(t, i) : t) | |
}, | |
yy: function(e, t) { | |
return e.setUTCFullYear(i ? o(t, i) : t) | |
}, | |
m: function(e, t) { | |
if (isNaN(e)) return e; | |
for (t -= 1; t < 0;) t += 12; | |
for (t %= 12, e.setUTCMonth(t); e.getUTCMonth() !== t;) e.setUTCDate(e.getUTCDate() - 1); | |
return e | |
}, | |
d: function(e, t) { | |
return e.setUTCDate(t) | |
} | |
}; | |
y.M = y.MM = y.mm = y.m, y.dd = y.d, e = k(); | |
var b = t.parts.slice(); | |
if (u.length !== b.length && (b = C(b).filter(function(e, t) { | |
return -1 !== C.inArray(t, v) | |
}).toArray()), u.length === b.length) { | |
var w, _, x; | |
for (l = 0, w = b.length; l < w; l++) { | |
if (f = parseInt(u[l], 10), r = b[l], isNaN(f)) switch (r) { | |
case "MM": | |
m = C(D[n].months).filter(s), f = C.inArray(m[0], D[n].months) + 1; | |
break; | |
case "M": | |
m = C(D[n].monthsShort).filter(s), f = C.inArray(m[0], D[n].monthsShort) + 1 | |
} | |
g[r] = f | |
} | |
for (l = 0; l < v.length; l++)(x = v[l]) in g && !isNaN(g[x]) && (_ = new Date(e), y[x](_, g[x]), isNaN(_) || (e = _)) | |
} | |
return e | |
}, | |
formatDate: function(e, t, n) { | |
if (!e) return ""; | |
if ("string" == typeof t && (t = A.parseFormat(t)), t.toDisplay) return t.toDisplay(e, t, n); | |
var i = { | |
d: e.getUTCDate(), | |
D: D[n].daysShort[e.getUTCDay()], | |
DD: D[n].days[e.getUTCDay()], | |
m: e.getUTCMonth() + 1, | |
M: D[n].monthsShort[e.getUTCMonth()], | |
MM: D[n].months[e.getUTCMonth()], | |
yy: e.getUTCFullYear().toString().substring(2), | |
yyyy: e.getUTCFullYear() | |
}; | |
i.dd = (i.d < 10 ? "0" : "") + i.d, i.mm = (i.m < 10 ? "0" : "") + i.m, e = []; | |
for (var o = C.extend([], t.separators), s = 0, r = t.parts.length; s <= r; s++) o.length && e.push(o.shift()), e.push(i[t.parts[s]]); | |
return e.join("") | |
}, | |
headTemplate: '<thead><tr><th colspan="7" class="datepicker-title"></th></tr><tr><th class="prev">«</th><th colspan="5" class="datepicker-switch"></th><th class="next">»</th></tr></thead>', | |
contTemplate: '<tbody><tr><td colspan="7"></td></tr></tbody>', | |
footTemplate: '<tfoot><tr><th colspan="7" class="today"></th></tr><tr><th colspan="7" class="clear"></th></tr></tfoot>' | |
}; | |
A.template = '<div class="datepicker"><div class="datepicker-days"><table class="table-condensed">' + A.headTemplate + "<tbody></tbody>" + A.footTemplate + '</table></div><div class="datepicker-months"><table class="table-condensed">' + A.headTemplate + A.contTemplate + A.footTemplate + '</table></div><div class="datepicker-years"><table class="table-condensed">' + A.headTemplate + A.contTemplate + A.footTemplate + '</table></div><div class="datepicker-decades"><table class="table-condensed">' + A.headTemplate + A.contTemplate + A.footTemplate + '</table></div><div class="datepicker-centuries"><table class="table-condensed">' + A.headTemplate + A.contTemplate + A.footTemplate + "</table></div></div>", C.fn.datepicker.DPGlobal = A, C.fn.datepicker.noConflict = function() { | |
return C.fn.datepicker = o, this | |
}, C.fn.datepicker.version = "1.7.0-dev", C(document).on("focus.datepicker.data-api click.datepicker.data-api", '[data-provide="datepicker"]', function(e) { | |
var t = C(this); | |
t.data("datepicker") || (e.preventDefault(), s.call(t, "show")) | |
}), C(function() { | |
s.call(C('[data-provide="datepicker-inline"]')) | |
}) | |
}), | |
function(e) { | |
"use strict"; | |
function x(t, n, i) { | |
var e, o = document.createElement("img"); | |
if (o.onerror = function(e) { | |
return x.onerror(o, e, t, n, i) | |
}, o.onload = function(e) { | |
return x.onload(o, e, t, n, i) | |
}, x.isInstanceOf("Blob", t) || x.isInstanceOf("File", t)) e = o._objectURL = x.createObjectURL(t); | |
else { | |
if ("string" != typeof t) return !1; | |
e = t, i && i.crossOrigin && (o.crossOrigin = i.crossOrigin) | |
} | |
return e ? (o.src = e, o) : x.readFile(t, function(e) { | |
var t = e.target; | |
t && t.result ? o.src = t.result : n && n(e) | |
}) | |
} | |
function s(e, t) { | |
!e._objectURL || t && t.noRevoke || (x.revokeObjectURL(e._objectURL), delete e._objectURL) | |
} | |
var t = window.createObjectURL && window || window.URL && URL.revokeObjectURL && URL || window.webkitURL && webkitURL; | |
x.isInstanceOf = function(e, t) { | |
return Object.prototype.toString.call(t) === "[object " + e + "]" | |
}, x.transform = function(e, t, n, i, o) { | |
n(x.scale(e, t, o), o) | |
}, x.onerror = function(e, t, n, i, o) { | |
s(e, o), i && i.call(e, t) | |
}, x.onload = function(e, t, n, i, o) { | |
s(e, o), i && x.transform(e, o, i, n, {}) | |
}, x.transformCoordinates = function() {}, x.getTransformedOptions = function(e, t) { | |
var n, i, o, s, r = t.aspectRatio; | |
if (!r) return t; | |
for (i in n = {}, t) t.hasOwnProperty(i) && (n[i] = t[i]); | |
return n.crop = !0, r < (o = e.naturalWidth || e.width) / (s = e.naturalHeight || e.height) ? (n.maxWidth = s * r, n.maxHeight = s) : (n.maxWidth = o, n.maxHeight = o / r), n | |
}, x.renderImageToCanvas = function(e, t, n, i, o, s, r, a, l, c) { | |
return e.getContext("2d").drawImage(t, n, i, o, s, r, a, l, c), e | |
}, x.hasCanvasOption = function(e) { | |
return e.canvas || e.crop || !!e.aspectRatio | |
}, x.scale = function(e, t, n) { | |
function i() { | |
var e = Math.max((a || w) / w, (l || _) / _); | |
1 < e && (w *= e, _ *= e) | |
} | |
function o() { | |
var e = Math.min((s || w) / w, (r || _) / _); | |
e < 1 && (w *= e, _ *= e) | |
} | |
t = t || {}; | |
var s, r, a, l, c, d, u, h, p, f, m, g = document.createElement("canvas"), | |
v = e.getContext || x.hasCanvasOption(t) && g.getContext, | |
y = e.naturalWidth || e.width, | |
b = e.naturalHeight || e.height, | |
w = y, | |
_ = b; | |
if (v && (u = (t = x.getTransformedOptions(e, t, n)).left || 0, h = t.top || 0, t.sourceWidth ? (c = t.sourceWidth, void 0 !== t.right && void 0 === t.left && (u = y - c - t.right)) : c = y - u - (t.right || 0), t.sourceHeight ? (d = t.sourceHeight, void 0 !== t.bottom && void 0 === t.top && (h = b - d - t.bottom)) : d = b - h - (t.bottom || 0), w = c, _ = d), s = t.maxWidth, r = t.maxHeight, a = t.minWidth, l = t.minHeight, v && s && r && t.crop ? (m = c / d - (w = s) / (_ = r)) < 0 ? (d = r * c / s, void 0 === t.top && void 0 === t.bottom && (h = (b - d) / 2)) : 0 < m && (c = s * d / r, void 0 === t.left && void 0 === t.right && (u = (y - c) / 2)) : ((t.contain || t.cover) && (a = s = s || a, l = r = r || l), t.cover ? (o(), i()) : (i(), o())), v) { | |
if (1 < (p = t.pixelRatio) && (g.style.width = w + "px", g.style.height = _ + "px", w *= p, _ *= p, g.getContext("2d").scale(p, p)), 0 < (f = t.downsamplingRatio) && f < 1 && w < c && _ < d) | |
for (; w < c * f;) g.width = c * f, g.height = d * f, x.renderImageToCanvas(g, e, u, h, c, d, 0, 0, g.width, g.height), c = g.width, d = g.height, (e = document.createElement("canvas")).width = c, e.height = d, x.renderImageToCanvas(e, g, 0, 0, c, d, 0, 0, c, d); | |
return g.width = w, g.height = _, x.transformCoordinates(g, t), x.renderImageToCanvas(g, e, u, h, c, d, 0, 0, w, _) | |
} | |
return e.width = w, e.height = _, e | |
}, x.createObjectURL = function(e) { | |
return !!t && t.createObjectURL(e) | |
}, x.revokeObjectURL = function(e) { | |
return !!t && t.revokeObjectURL(e) | |
}, x.readFile = function(e, t, n) { | |
if (window.FileReader) { | |
var i = new FileReader; | |
if (i.onload = i.onerror = t, i[n = n || "readAsDataURL"]) return i[n](e), i | |
} | |
return !1 | |
}, "function" == typeof define && define.amd ? define(function() { | |
return x | |
}) : "object" == typeof module && module.exports ? module.exports = x : e.loadImage = x | |
}(window), | |
function(e) { | |
"use strict"; | |
"function" == typeof define && define.amd ? define(["./load-image"], e) : e("object" == typeof module && module.exports ? require("./load-image") : window.loadImage) | |
}(function(f) { | |
"use strict"; | |
var e = window.Blob && (Blob.prototype.slice || Blob.prototype.webkitSlice || Blob.prototype.mozSlice); | |
f.blobSlice = e && function() { | |
return (this.slice || this.webkitSlice || this.mozSlice).apply(this, arguments) | |
}, f.metaDataParsers = { | |
jpeg: { | |
65505: [] | |
} | |
}, f.parseMetaData = function(e, d, u, h) { | |
h = h || {}; | |
var p = this, | |
t = (u = u || {}).maxMetaDataSize || 262144; | |
!!(window.DataView && e && 12 <= e.size && "image/jpeg" === e.type && f.blobSlice) && f.readFile(f.blobSlice.call(e, 0, t), function(e) { | |
if (e.target.error) return console.log(e.target.error), void d(h); | |
var t, n, i, o, s = e.target.result, | |
r = new DataView(s), | |
a = 2, | |
l = r.byteLength - 4, | |
c = a; | |
if (65496 === r.getUint16(0)) { | |
for (; a < l && (65504 <= (t = r.getUint16(a)) && t <= 65519 || 65534 === t);) { | |
if (a + (n = r.getUint16(a + 2) + 2) > r.byteLength) { | |
console.log("Invalid meta data: Invalid segment size."); | |
break | |
} | |
if (i = f.metaDataParsers.jpeg[t]) | |
for (o = 0; o < i.length; o += 1) i[o].call(p, r, a, n, h, u); | |
c = a += n | |
}!u.disableImageHead && 6 < c && (s.slice ? h.imageHead = s.slice(0, c) : h.imageHead = new Uint8Array(s).subarray(0, c)) | |
} else console.log("Invalid JPEG file: Missing JPEG marker."); | |
d(h) | |
}, "readAsArrayBuffer") || d(h) | |
}, f.hasMetaOption = function(e) { | |
return e.meta | |
}; | |
var s = f.transform; | |
f.transform = function(t, n, i, o, e) { | |
f.hasMetaOption(n || {}) ? f.parseMetaData(o, function(e) { | |
s.call(f, t, n, i, o, e) | |
}, n, e) : s.apply(f, arguments) | |
} | |
}), | |
function(e) { | |
"use strict"; | |
"function" == typeof define && define.amd ? define(["./load-image", "./load-image-meta"], e) : "object" == typeof module && module.exports ? e(require("./load-image"), require("./load-image-meta")) : e(window.loadImage) | |
}(function(p) { | |
"use strict"; | |
p.ExifMap = function() { | |
return this | |
}, p.ExifMap.prototype.map = { | |
Orientation: 274 | |
}, p.ExifMap.prototype.get = function(e) { | |
return this[e] || this[this.map[e]] | |
}, p.getExifThumbnail = function(e, t, n) { | |
var i, o, s; | |
if (n && !(t + n > e.byteLength)) { | |
for (i = [], o = 0; o < n; o += 1) s = e.getUint8(t + o), i.push((s < 16 ? "0" : "") + s.toString(16)); | |
return "data:image/jpeg,%" + i.join("%") | |
} | |
console.log("Invalid Exif data: Invalid thumbnail data.") | |
}, p.exifTagTypes = { | |
1: { | |
getValue: function(e, t) { | |
return e.getUint8(t) | |
}, | |
size: 1 | |
}, | |
2: { | |
getValue: function(e, t) { | |
return String.fromCharCode(e.getUint8(t)) | |
}, | |
size: 1, | |
ascii: !0 | |
}, | |
3: { | |
getValue: function(e, t, n) { | |
return e.getUint16(t, n) | |
}, | |
size: 2 | |
}, | |
4: { | |
getValue: function(e, t, n) { | |
return e.getUint32(t, n) | |
}, | |
size: 4 | |
}, | |
5: { | |
getValue: function(e, t, n) { | |
return e.getUint32(t, n) / e.getUint32(t + 4, n) | |
}, | |
size: 8 | |
}, | |
9: { | |
getValue: function(e, t, n) { | |
return e.getInt32(t, n) | |
}, | |
size: 4 | |
}, | |
10: { | |
getValue: function(e, t, n) { | |
return e.getInt32(t, n) / e.getInt32(t + 4, n) | |
}, | |
size: 8 | |
} | |
}, p.exifTagTypes[7] = p.exifTagTypes[1], p.getExifValue = function(e, t, n, i, o, s) { | |
var r, a, l, c, d, u, h = p.exifTagTypes[i]; | |
if (h) { | |
if (!((a = 4 < (r = h.size * o) ? t + e.getUint32(n + 8, s) : n + 8) + r > e.byteLength)) { | |
if (1 === o) return h.getValue(e, a, s); | |
for (l = [], c = 0; c < o; c += 1) l[c] = h.getValue(e, a + c * h.size, s); | |
if (h.ascii) { | |
for (d = "", c = 0; c < l.length && "\0" !== (u = l[c]); c += 1) d += u; | |
return d | |
} | |
return l | |
} | |
console.log("Invalid Exif data: Invalid data offset.") | |
} else console.log("Invalid Exif data: Invalid tag type.") | |
}, p.parseExifTag = function(e, t, n, i, o) { | |
var s = e.getUint16(n, i); | |
o.exif[s] = p.getExifValue(e, t, n, e.getUint16(n + 2, i), e.getUint32(n + 4, i), i) | |
}, p.parseExifTags = function(e, t, n, i, o) { | |
var s, r, a; | |
if (n + 6 > e.byteLength) console.log("Invalid Exif data: Invalid directory offset."); | |
else { | |
if (!((r = n + 2 + 12 * (s = e.getUint16(n, i))) + 4 > e.byteLength)) { | |
for (a = 0; a < s; a += 1) this.parseExifTag(e, t, n + 2 + 12 * a, i, o); | |
return e.getUint32(r, i) | |
} | |
console.log("Invalid Exif data: Invalid directory size.") | |
} | |
}, p.parseExifData = function(e, t, n, i, o) { | |
if (!o.disableExif) { | |
var s, r, a, l = t + 10; | |
if (1165519206 === e.getUint32(t + 4)) { | |
if (l + 8 > e.byteLength) return void console.log("Invalid Exif data: Invalid segment size."); | |
if (0 !== e.getUint16(t + 8)) return void console.log("Invalid Exif data: Missing byte alignment offset."); | |
switch (e.getUint16(l)) { | |
case 18761: | |
s = !0; | |
break; | |
case 19789: | |
s = !1; | |
break; | |
default: | |
return void console.log("Invalid Exif data: Invalid byte alignment marker.") | |
} | |
if (42 !== e.getUint16(l + 2, s)) return void console.log("Invalid Exif data: Missing TIFF marker."); | |
r = e.getUint32(l + 4, s), i.exif = new p.ExifMap, (r = p.parseExifTags(e, l, l + r, s, i)) && !o.disableExifThumbnail && (a = { | |
exif: {} | |
}, r = p.parseExifTags(e, l, l + r, s, a), a.exif[513] && (i.exif.Thumbnail = p.getExifThumbnail(e, l + a.exif[513], a.exif[514]))), i.exif[34665] && !o.disableExifSub && p.parseExifTags(e, l, l + i.exif[34665], s, i), i.exif[34853] && !o.disableExifGps && p.parseExifTags(e, l, l + i.exif[34853], s, i) | |
} | |
} | |
}, p.metaDataParsers.jpeg[65505].push(p.parseExifData) | |
}), | |
function(e) { | |
"use strict"; | |
"function" == typeof define && define.amd ? define(["./load-image", "./load-image-exif"], e) : "object" == typeof module && module.exports ? e(require("./load-image"), require("./load-image-exif")) : e(window.loadImage) | |
}(function(e) { | |
"use strict"; | |
e.ExifMap.prototype.tags = { | |
256: "ImageWidth", | |
257: "ImageHeight", | |
34665: "ExifIFDPointer", | |
34853: "GPSInfoIFDPointer", | |
40965: "InteroperabilityIFDPointer", | |
258: "BitsPerSample", | |
259: "Compression", | |
262: "PhotometricInterpretation", | |
274: "Orientation", | |
277: "SamplesPerPixel", | |
284: "PlanarConfiguration", | |
530: "YCbCrSubSampling", | |
531: "YCbCrPositioning", | |
282: "XResolution", | |
283: "YResolution", | |
296: "ResolutionUnit", | |
273: "StripOffsets", | |
278: "RowsPerStrip", | |
279: "StripByteCounts", | |
513: "JPEGInterchangeFormat", | |
514: "JPEGInterchangeFormatLength", | |
301: "TransferFunction", | |
318: "WhitePoint", | |
319: "PrimaryChromaticities", | |
529: "YCbCrCoefficients", | |
532: "ReferenceBlackWhite", | |
306: "DateTime", | |
270: "ImageDescription", | |
271: "Make", | |
272: "Model", | |
305: "Software", | |
315: "Artist", | |
33432: "Copyright", | |
36864: "ExifVersion", | |
40960: "FlashpixVersion", | |
40961: "ColorSpace", | |
40962: "PixelXDimension", | |
40963: "PixelYDimension", | |
42240: "Gamma", | |
37121: "ComponentsConfiguration", | |
37122: "CompressedBitsPerPixel", | |
37500: "MakerNote", | |
37510: "UserComment", | |
40964: "RelatedSoundFile", | |
36867: "DateTimeOriginal", | |
36868: "DateTimeDigitized", | |
37520: "SubSecTime", | |
37521: "SubSecTimeOriginal", | |
37522: "SubSecTimeDigitized", | |
33434: "ExposureTime", | |
33437: "FNumber", | |
34850: "ExposureProgram", | |
34852: "SpectralSensitivity", | |
34855: "PhotographicSensitivity", | |
34856: "OECF", | |
34864: "SensitivityType", | |
34865: "StandardOutputSensitivity", | |
34866: "RecommendedExposureIndex", | |
34867: "ISOSpeed", | |
34868: "ISOSpeedLatitudeyyy", | |
34869: "ISOSpeedLatitudezzz", | |
37377: "ShutterSpeedValue", | |
37378: "ApertureValue", | |
37379: "BrightnessValue", | |
37380: "ExposureBias", | |
37381: "MaxApertureValue", | |
37382: "SubjectDistance", | |
37383: "MeteringMode", | |
37384: "LightSource", | |
37385: "Flash", | |
37396: "SubjectArea", | |
37386: "FocalLength", | |
41483: "FlashEnergy", | |
41484: "SpatialFrequencyResponse", | |
41486: "FocalPlaneXResolution", | |
41487: "FocalPlaneYResolution", | |
41488: "FocalPlaneResolutionUnit", | |
41492: "SubjectLocation", | |
41493: "ExposureIndex", | |
41495: "SensingMethod", | |
41728: "FileSource", | |
41729: "SceneType", | |
41730: "CFAPattern", | |
41985: "CustomRendered", | |
41986: "ExposureMode", | |
41987: "WhiteBalance", | |
41988: "DigitalZoomRatio", | |
41989: "FocalLengthIn35mmFilm", | |
41990: "SceneCaptureType", | |
41991: "GainControl", | |
41992: "Contrast", | |
41993: "Saturation", | |
41994: "Sharpness", | |
41995: "DeviceSettingDescription", | |
41996: "SubjectDistanceRange", | |
42016: "ImageUniqueID", | |
42032: "CameraOwnerName", | |
42033: "BodySerialNumber", | |
42034: "LensSpecification", | |
42035: "LensMake", | |
42036: "LensModel", | |
42037: "LensSerialNumber", | |
0: "GPSVersionID", | |
1: "GPSLatitudeRef", | |
2: "GPSLatitude", | |
3: "GPSLongitudeRef", | |
4: "GPSLongitude", | |
5: "GPSAltitudeRef", | |
6: "GPSAltitude", | |
7: "GPSTimeStamp", | |
8: "GPSSatellites", | |
9: "GPSStatus", | |
10: "GPSMeasureMode", | |
11: "GPSDOP", | |
12: "GPSSpeedRef", | |
13: "GPSSpeed", | |
14: "GPSTrackRef", | |
15: "GPSTrack", | |
16: "GPSImgDirectionRef", | |
17: "GPSImgDirection", | |
18: "GPSMapDatum", | |
19: "GPSDestLatitudeRef", | |
20: "GPSDestLatitude", | |
21: "GPSDestLongitudeRef", | |
22: "GPSDestLongitude", | |
23: "GPSDestBearingRef", | |
24: "GPSDestBearing", | |
25: "GPSDestDistanceRef", | |
26: "GPSDestDistance", | |
27: "GPSProcessingMethod", | |
28: "GPSAreaInformation", | |
29: "GPSDateStamp", | |
30: "GPSDifferential", | |
31: "GPSHPositioningError" | |
}, e.ExifMap.prototype.stringValues = { | |
ExposureProgram: { | |
0: "Undefined", | |
1: "Manual", | |
2: "Normal program", | |
3: "Aperture priority", | |
4: "Shutter priority", | |
5: "Creative program", | |
6: "Action program", | |
7: "Portrait mode", | |
8: "Landscape mode" | |
}, | |
MeteringMode: { | |
0: "Unknown", | |
1: "Average", | |
2: "CenterWeightedAverage", | |
3: "Spot", | |
4: "MultiSpot", | |
5: "Pattern", | |
6: "Partial", | |
255: "Other" | |
}, | |
LightSource: { | |
0: "Unknown", | |
1: "Daylight", | |
2: "Fluorescent", | |
3: "Tungsten (incandescent light)", | |
4: "Flash", | |
9: "Fine weather", | |
10: "Cloudy weather", | |
11: "Shade", | |
12: "Daylight fluorescent (D 5700 - 7100K)", | |
13: "Day white fluorescent (N 4600 - 5400K)", | |
14: "Cool white fluorescent (W 3900 - 4500K)", | |
15: "White fluorescent (WW 3200 - 3700K)", | |
17: "Standard light A", | |
18: "Standard light B", | |
19: "Standard light C", | |
20: "D55", | |
21: "D65", | |
22: "D75", | |
23: "D50", | |
24: "ISO studio tungsten", | |
255: "Other" | |
}, | |
Flash: { | |
0: "Flash did not fire", | |
1: "Flash fired", | |
5: "Strobe return light not detected", | |
7: "Strobe return light detected", | |
9: "Flash fired, compulsory flash mode", | |
13: "Flash fired, compulsory flash mode, return light not detected", | |
15: "Flash fired, compulsory flash mode, return light detected", | |
16: "Flash did not fire, compulsory flash mode", | |
24: "Flash did not fire, auto mode", | |
25: "Flash fired, auto mode", | |
29: "Flash fired, auto mode, return light not detected", | |
31: "Flash fired, auto mode, return light detected", | |
32: "No flash function", | |
65: "Flash fired, red-eye reduction mode", | |
69: "Flash fired, red-eye reduction mode, return light not detected", | |
71: "Flash fired, red-eye reduction mode, return light detected", | |
73: "Flash fired, compulsory flash mode, red-eye reduction mode", | |
77: "Flash fired, compulsory flash mode, red-eye reduction mode, return light not detected", | |
79: "Flash fired, compulsory flash mode, red-eye reduction mode, return light detected", | |
89: "Flash fired, auto mode, red-eye reduction mode", | |
93: "Flash fired, auto mode, return light not detected, red-eye reduction mode", | |
95: "Flash fired, auto mode, return light detected, red-eye reduction mode" | |
}, | |
SensingMethod: { | |
1: "Undefined", | |
2: "One-chip color area sensor", | |
3: "Two-chip color area sensor", | |
4: "Three-chip color area sensor", | |
5: "Color sequential area sensor", | |
7: "Trilinear sensor", | |
8: "Color sequential linear sensor" | |
}, | |
SceneCaptureType: { | |
0: "Standard", | |
1: "Landscape", | |
2: "Portrait", | |
3: "Night scene" | |
}, | |
SceneType: { | |
1: "Directly photographed" | |
}, | |
CustomRendered: { | |
0: "Normal process", | |
1: "Custom process" | |
}, | |
WhiteBalance: { | |
0: "Auto white balance", | |
1: "Manual white balance" | |
}, | |
GainControl: { | |
0: "None", | |
1: "Low gain up", | |
2: "High gain up", | |
3: "Low gain down", | |
4: "High gain down" | |
}, | |
Contrast: { | |
0: "Normal", | |
1: "Soft", | |
2: "Hard" | |
}, | |
Saturation: { | |
0: "Normal", | |
1: "Low saturation", | |
2: "High saturation" | |
}, | |
Sharpness: { | |
0: "Normal", | |
1: "Soft", | |
2: "Hard" | |
}, | |
SubjectDistanceRange: { | |
0: "Unknown", | |
1: "Macro", | |
2: "Close view", | |
3: "Distant view" | |
}, | |
FileSource: { | |
3: "DSC" | |
}, | |
ComponentsConfiguration: { | |
0: "", | |
1: "Y", | |
2: "Cb", | |
3: "Cr", | |
4: "R", | |
5: "G", | |
6: "B" | |
}, | |
Orientation: { | |
1: "top-left", | |
2: "top-right", | |
3: "bottom-right", | |
4: "bottom-left", | |
5: "left-top", | |
6: "right-top", | |
7: "right-bottom", | |
8: "left-bottom" | |
} | |
}, e.ExifMap.prototype.getText = function(e) { | |
var t = this.get(e); | |
switch (e) { | |
case "LightSource": | |
case "Flash": | |
case "MeteringMode": | |
case "ExposureProgram": | |
case "SensingMethod": | |
case "SceneCaptureType": | |
case "SceneType": | |
case "CustomRendered": | |
case "WhiteBalance": | |
case "GainControl": | |
case "Contrast": | |
case "Saturation": | |
case "Sharpness": | |
case "SubjectDistanceRange": | |
case "FileSource": | |
case "Orientation": | |
return this.stringValues[e][t]; | |
case "ExifVersion": | |
case "FlashpixVersion": | |
if (!t) return; | |
return String.fromCharCode(t[0], t[1], t[2], t[3]); | |
case "ComponentsConfiguration": | |
if (!t) return; | |
return this.stringValues[e][t[0]] + this.stringValues[e][t[1]] + this.stringValues[e][t[2]] + this.stringValues[e][t[3]]; | |
case "GPSVersionID": | |
if (!t) return; | |
return t[0] + "." + t[1] + "." + t[2] + "." + t[3] | |
} | |
return String(t) | |
}, | |
function(e) { | |
var t, n = e.tags, | |
i = e.map; | |
for (t in n) n.hasOwnProperty(t) && (i[n[t]] = t) | |
}(e.ExifMap.prototype), e.ExifMap.prototype.getAll = function() { | |
var e, t, n = {}; | |
for (e in this) this.hasOwnProperty(e) && ((t = this.tags[e]) && (n[t] = this.getText(t))); | |
return n | |
} | |
}), | |
function(e) { | |
"use strict"; | |
"function" == typeof define && define.amd ? define(["./load-image"], e) : e("object" == typeof module && module.exports ? require("./load-image") : window.loadImage) | |
}(function(l) { | |
"use strict"; | |
var t = l.hasCanvasOption, | |
n = l.hasMetaOption, | |
c = l.transformCoordinates, | |
a = l.getTransformedOptions; | |
l.hasCanvasOption = function(e) { | |
return !!e.orientation || t.call(l, e) | |
}, l.hasMetaOption = function(e) { | |
return !0 === e.orientation || n.call(l, e) | |
}, l.transformCoordinates = function(e, t) { | |
c.call(l, e, t); | |
var n = e.getContext("2d"), | |
i = e.width, | |
o = e.height, | |
s = e.style.width, | |
r = e.style.height, | |
a = t.orientation; | |
if (a && !(8 < a)) switch (4 < a && (e.width = o, e.height = i, e.style.width = r, e.style.height = s), a) { | |
case 2: | |
n.translate(i, 0), n.scale(-1, 1); | |
break; | |
case 3: | |
n.translate(i, o), n.rotate(Math.PI); | |
break; | |
case 4: | |
n.translate(0, o), n.scale(1, -1); | |
break; | |
case 5: | |
n.rotate(.5 * Math.PI), n.scale(1, -1); | |
break; | |
case 6: | |
n.rotate(.5 * Math.PI), n.translate(0, -o); | |
break; | |
case 7: | |
n.rotate(.5 * Math.PI), n.translate(i, -o), n.scale(-1, 1); | |
break; | |
case 8: | |
n.rotate(-.5 * Math.PI), n.translate(-i, 0) | |
} | |
}, l.getTransformedOptions = function(e, t, n) { | |
var i, o, s = a.call(l, e, t), | |
r = s.orientation; | |
if (!0 === r && n && n.exif && (r = n.exif.get("Orientation")), !r || 8 < r || 1 === r) return s; | |
for (o in i = {}, s) s.hasOwnProperty(o) && (i[o] = s[o]); | |
switch (i.orientation = r) { | |
case 2: | |
i.left = s.right, i.right = s.left; | |
break; | |
case 3: | |
i.left = s.right, i.top = s.bottom, i.right = s.left, i.bottom = s.top; | |
break; | |
case 4: | |
i.top = s.bottom, i.bottom = s.top; | |
break; | |
case 5: | |
i.left = s.top, i.top = s.left, i.right = s.bottom, i.bottom = s.right; | |
break; | |
case 6: | |
i.left = s.top, i.top = s.right, i.right = s.bottom, i.bottom = s.left; | |
break; | |
case 7: | |
i.left = s.bottom, i.top = s.right, i.right = s.top, i.bottom = s.left; | |
break; | |
case 8: | |
i.left = s.bottom, i.top = s.left, i.right = s.top, i.bottom = s.right | |
} | |
return 4 < i.orientation && (i.maxWidth = s.maxHeight, i.maxHeight = s.maxWidth, i.minWidth = s.minHeight, i.minHeight = s.minWidth, i.sourceWidth = s.sourceHeight, i.sourceHeight = s.sourceWidth), i | |
} | |
}), | |
function(e) { | |
if ("object" == typeof exports && "undefined" != typeof module) module.exports = e(); | |
else if ("function" == typeof define && define.amd) define([], e); | |
else { | |
("undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof self ? self : this).dragula = e() | |
} | |
}(function() { | |
return function d(s, r, a) { | |
function l(n, e) { | |
if (!r[n]) { | |
if (!s[n]) { | |
var t = "function" == typeof require && require; | |
if (!e && t) return t(n, !0); | |
if (c) return c(n, !0); | |
var i = new Error("Cannot find module '" + n + "'"); | |
throw i.code = "MODULE_NOT_FOUND", i | |
} | |
var o = r[n] = { | |
exports: {} | |
}; | |
s[n][0].call(o.exports, function(e) { | |
var t = s[n][1][e]; | |
return l(t || e) | |
}, o, o.exports, d, s, r, a) | |
} | |
return r[n].exports | |
} | |
for (var c = "function" == typeof require && require, e = 0; e < a.length; e++) l(a[e]); | |
return l | |
}({ | |
1: [function(e, t) { | |
"use strict"; | |
function i(e) { | |
var t = s[e]; | |
return t ? t.lastIndex = 0 : s[e] = t = new RegExp(r + e + a, "g"), t | |
} | |
function n(e, t) { | |
var n = e.className; | |
n.length ? i(t).test(n) || (e.className += " " + t) : e.className = t | |
} | |
function o(e, t) { | |
e.className = e.className.replace(i(t), " ").trim() | |
} | |
var s = {}, | |
r = "(?:^|\\s)", | |
a = "(?:\\s|$)"; | |
t.exports = { | |
add: n, | |
rm: o | |
} | |
}, {}], | |
2: [function(i, s) { | |
(function(a) { | |
"use strict"; | |
function e(e, t) { | |
function r(e) { | |
return -1 !== q.containers.indexOf(e) || V.isContainer(e) | |
} | |
function n(e) { | |
var t = e ? "remove" : "add"; | |
Y(ce, t, "mousedown", l), Y(ce, t, "mouseup", v) | |
} | |
function s(e) { | |
Y(ce, e ? "remove" : "add", "mousemove", c) | |
} | |
function a(e) { | |
var t = e ? "remove" : "add"; | |
re[t](ce, "selectstart", o), re[t](ce, "click", o) | |
} | |
function i() { | |
n(!0), v({}) | |
} | |
function o(e) { | |
B && e.preventDefault() | |
} | |
function l(e) { | |
if (N = e.clientX, z = e.clientY, !(1 !== G(e) || e.metaKey || e.ctrlKey)) { | |
var t = e.target, | |
n = d(t); | |
n && (B = n, s(), "mousedown" === e.type && (ne(t) ? t.focus() : e.preventDefault())) | |
} | |
} | |
function c(e) { | |
if (B) { | |
if (0 === G(e)) return void v({}); | |
if (void 0 === e.clientX || e.clientX !== N || void 0 === e.clientY || e.clientY !== z) { | |
if (V.ignoreInputTextSelection) { | |
var t = oe("clientX", e), | |
n = oe("clientY", e); | |
if (ne(le.elementFromPoint(t, n))) return | |
} | |
var i = B; | |
s(!0), a(), m(), p(i); | |
var o = X(L); | |
I = oe("pageX", e) - o.left, R = oe("pageY", e) - o.top, ae.add(H || L, "gu-transit"), $(), C(e) | |
} | |
} | |
} | |
function d(e) { | |
if (!(q.dragging && M || r(e))) { | |
for (var t = e; te(e) && !1 === r(te(e));) { | |
if (V.invalid(e, t)) return; | |
if (!(e = te(e))) return | |
} | |
var n = te(e); | |
if (n && !V.invalid(e, t)) | |
if (V.moves(e, n, t, ie(e))) return { | |
item: e, | |
source: n | |
} | |
} | |
} | |
function u(e) { | |
return !!d(e) | |
} | |
function h(e) { | |
var t = d(e); | |
t && p(t) | |
} | |
function p(e) { | |
O(e.item, e.source) && (H = e.item.cloneNode(!0), q.emit("cloned", H, e.item, "copy")), P = e.source, L = e.item, j = F = ie(e.item), q.dragging = !0, q.emit("drag", L, P) | |
} | |
function f() { | |
return !1 | |
} | |
function m() { | |
if (q.dragging) { | |
var e = H || L; | |
y(e, te(e)) | |
} | |
} | |
function g() { | |
s(!(B = !1)), a(!0) | |
} | |
function v(e) { | |
if (g(), q.dragging) { | |
var t = H || L, | |
n = oe("clientX", e), | |
i = oe("clientY", e), | |
o = k(Z(M, n, i), n, i); | |
o && (H && V.copySortSource || !H || o !== P) ? y(t, o) : V.removeOnSpill ? b() : w() | |
} | |
} | |
function y(e, t) { | |
var n = te(e); | |
H && V.copySortSource && t === P && n.removeChild(L), x(t) ? q.emit("cancel", e, P, P) : q.emit("drop", e, t, P, F), _() | |
} | |
function b() { | |
if (q.dragging) { | |
var e = H || L, | |
t = te(e); | |
t && t.removeChild(e), q.emit(H ? "cancel" : "remove", e, t, P), _() | |
} | |
} | |
function w(e) { | |
if (q.dragging) { | |
var t = 0 < arguments.length ? e : V.revertOnSpill, | |
n = H || L, | |
i = te(n), | |
o = x(i); | |
!1 === o && t && (H ? i && i.removeChild(H) : P.insertBefore(n, j)), o || t ? q.emit("cancel", n, P, P) : q.emit("drop", n, i, P, F), _() | |
} | |
} | |
function _() { | |
var e = H || L; | |
g(), D(), e && ae.rm(e, "gu-transit"), W && clearTimeout(W), q.dragging = !1, U && q.emit("out", e, U, P), q.emit("dragend", e), P = L = H = j = F = W = U = null | |
} | |
function x(e, t) { | |
var n; | |
return n = void 0 !== t ? t : M ? F : ie(H || L), e === P && n === j | |
} | |
function k(n, i, o) { | |
function e() { | |
if (!1 === r(s)) return !1; | |
var e = A(s, n), | |
t = E(s, e, i, o); | |
return !!x(s, t) || V.accepts(L, s, P, t) | |
} | |
for (var s = n; s && !e();) s = te(s); | |
return s | |
} | |
function C(e) { | |
function t(e) { | |
q.emit(e, l, U, P) | |
} | |
function n() { | |
u && t("over") | |
} | |
function i() { | |
U && t("out") | |
} | |
if (M) { | |
e.preventDefault(); | |
var o = oe("clientX", e), | |
s = oe("clientY", e), | |
r = o - I, | |
a = s - R; | |
M.style.left = r + "px", M.style.top = a + "px"; | |
var l = H || L, | |
c = Z(M, o, s), | |
d = k(c, o, s), | |
u = null !== d && d !== U; | |
(u || null === d) && (i(), U = d, n()); | |
var h = te(l); | |
if (d === P && H && !V.copySortSource) return void(h && h.removeChild(l)); | |
var p, f = A(d, c); | |
if (null !== f) p = E(d, f, o, s); | |
else { | |
if (!0 !== V.revertOnSpill || H) return void(H && h && h.removeChild(l)); | |
p = j, d = P | |
}(null === p && u || p !== l && p !== ie(l)) && (F = p, d.insertBefore(l, p), q.emit("shadow", l, d, P)) | |
} | |
} | |
function S(e) { | |
ae.rm(e, "gu-hide") | |
} | |
function T(e) { | |
q.dragging && ae.add(e, "gu-hide") | |
} | |
function $() { | |
if (!M) { | |
var e = L.getBoundingClientRect(); | |
(M = L.cloneNode(!0)).style.width = Q(e) + "px", M.style.height = ee(e) + "px", ae.rm(M, "gu-transit"), ae.add(M, "gu-mirror"), V.mirrorContainer.appendChild(M), Y(ce, "add", "mousemove", C), ae.add(V.mirrorContainer, "gu-unselectable"), q.emit("cloned", M, L, "mirror") | |
} | |
} | |
function D() { | |
M && (ae.rm(V.mirrorContainer, "gu-unselectable"), Y(ce, "remove", "mousemove", C), te(M).removeChild(M), M = null) | |
} | |
function A(e, t) { | |
for (var n = t; n !== e && te(n) !== e;) n = te(n); | |
return n === ce ? null : n | |
} | |
function E(o, t, s, r) { | |
function e() { | |
var e, t, n, i = o.children.length; | |
for (e = 0; e < i; e++) { | |
if (n = (t = o.children[e]).getBoundingClientRect(), a && n.left + n.width / 2 > s) return t; | |
if (!a && n.top + n.height / 2 > r) return t | |
} | |
return null | |
} | |
function n() { | |
var e = t.getBoundingClientRect(); | |
return i(a ? s > e.left + Q(e) / 2 : r > e.top + ee(e) / 2) | |
} | |
function i(e) { | |
return e ? ie(t) : t | |
} | |
var a = "horizontal" === V.direction; | |
return t !== o ? n() : e() | |
} | |
function O(e, t) { | |
return "boolean" == typeof V.copy ? V.copy : V.copy(e, t) | |
} | |
1 === arguments.length && !1 === Array.isArray(e) && (t = e, e = []); | |
var M, P, L, I, R, N, z, j, F, H, W, B, U = null, | |
V = t || {}; | |
void 0 === V.moves && (V.moves = K), void 0 === V.accepts && (V.accepts = K), void 0 === V.invalid && (V.invalid = f), void 0 === V.containers && (V.containers = e || []), void 0 === V.isContainer && (V.isContainer = J), void 0 === V.copy && (V.copy = !1), void 0 === V.copySortSource && (V.copySortSource = !1), void 0 === V.revertOnSpill && (V.revertOnSpill = !1), void 0 === V.removeOnSpill && (V.removeOnSpill = !1), void 0 === V.direction && (V.direction = "vertical"), void 0 === V.ignoreInputTextSelection && (V.ignoreInputTextSelection = !0), void 0 === V.mirrorContainer && (V.mirrorContainer = le.body); | |
var q = se({ | |
containers: V.containers, | |
start: h, | |
end: m, | |
cancel: w, | |
remove: b, | |
destroy: i, | |
canMove: u, | |
dragging: !1 | |
}); | |
return !0 === V.removeOnSpill && q.on("over", S).on("out", T), n(), q | |
} | |
function Y(e, t, n, i) { | |
var o = { | |
mouseup: "touchend", | |
mousedown: "touchstart", | |
mousemove: "touchmove" | |
}, | |
s = { | |
mouseup: "pointerup", | |
mousedown: "pointerdown", | |
mousemove: "pointermove" | |
}, | |
r = { | |
mouseup: "MSPointerUp", | |
mousedown: "MSPointerDown", | |
mousemove: "MSPointerMove" | |
}; | |
a.navigator.pointerEnabled ? re[t](e, s[n], i) : a.navigator.msPointerEnabled ? re[t](e, r[n], i) : (re[t](e, o[n], i), re[t](e, n, i)) | |
} | |
function G(e) { | |
if (void 0 !== e.touches) return e.touches.length; | |
if (void 0 !== e.which && 0 !== e.which) return e.which; | |
if (void 0 !== e.buttons) return e.buttons; | |
var t = e.button; | |
return void 0 !== t ? 1 & t ? 1 : 2 & t ? 3 : 4 & t ? 2 : 0 : void 0 | |
} | |
function X(e) { | |
var t = e.getBoundingClientRect(); | |
return { | |
left: t.left + n("scrollLeft", "pageXOffset"), | |
top: t.top + n("scrollTop", "pageYOffset") | |
} | |
} | |
function n(e, t) { | |
return "undefined" != typeof a[t] ? a[t] : ce.clientHeight ? ce[e] : le.body[e] | |
} | |
function Z(e, t, n) { | |
var i, o = e || {}, | |
s = o.className; | |
return o.className += " gu-hide", i = le.elementFromPoint(t, n), o.className = s, i | |
} | |
function J() { | |
return !1 | |
} | |
function K() { | |
return !0 | |
} | |
function Q(e) { | |
return e.width || e.right - e.left | |
} | |
function ee(e) { | |
return e.height || e.bottom - e.top | |
} | |
function te(e) { | |
return e.parentNode === le ? null : e.parentNode | |
} | |
function ne(e) { | |
return "INPUT" === e.tagName || "TEXTAREA" === e.tagName || "SELECT" === e.tagName || t(e) | |
} | |
function t(e) { | |
return !!e && ("false" !== e.contentEditable && ("true" === e.contentEditable || t(te(e)))) | |
} | |
function ie(t) { | |
function e() { | |
for (var e = t; | |
(e = e.nextSibling) && 1 !== e.nodeType;); | |
return e | |
} | |
return t.nextElementSibling || e() | |
} | |
function o(e) { | |
return e.targetTouches && e.targetTouches.length ? e.targetTouches[0] : e.changedTouches && e.changedTouches.length ? e.changedTouches[0] : e | |
} | |
function oe(e, t) { | |
var n = o(t), | |
i = { | |
pageX: "clientX", | |
pageY: "clientY" | |
}; | |
return e in i && !(e in n) && i[e] in n && (e = i[e]), n[e] | |
} | |
var se = i("contra/emitter"), | |
re = i("crossvent"), | |
ae = i("./classes"), | |
le = document, | |
ce = le.documentElement; | |
s.exports = e | |
}).call(this, "undefined" != typeof global ? global : "undefined" != typeof self ? self : "undefined" != typeof window ? window : {}) | |
}, { | |
"./classes": 1, | |
"contra/emitter": 5, | |
crossvent: 6 | |
}], | |
3: [function(e, t) { | |
t.exports = function(e, t) { | |
return Array.prototype.slice.call(e, t) | |
} | |
}, {}], | |
4: [function(e, t) { | |
"use strict"; | |
var i = e("ticky"); | |
t.exports = function(e, t, n) { | |
e && i(function() { | |
e.apply(n || null, t || []) | |
}) | |
} | |
}, { | |
ticky: 9 | |
}], | |
5: [function(e, t) { | |
"use strict"; | |
var a = e("atoa"), | |
l = e("./debounce"); | |
t.exports = function(o, e) { | |
var s = e || {}, | |
r = {}; | |
return void 0 === o && (o = {}), o.on = function(e, t) { | |
return r[e] ? r[e].push(t) : r[e] = [t], o | |
}, o.once = function(e, t) { | |
return t._once = !0, o.on(e, t), o | |
}, o.off = function(e, t) { | |
var n = arguments.length; | |
if (1 === n) delete r[e]; | |
else if (0 === n) r = {}; | |
else { | |
var i = r[e]; | |
if (!i) return o; | |
i.splice(i.indexOf(t), 1) | |
} | |
return o | |
}, o.emit = function() { | |
var e = a(arguments); | |
return o.emitterSnapshot(e.shift()).apply(this, e) | |
}, o.emitterSnapshot = function(i) { | |
var e = (r[i] || []).slice(0); | |
return function() { | |
var t = a(arguments), | |
n = this || o; | |
if ("error" === i && !1 !== s["throws"] && !e.length) throw 1 === t.length ? t[0] : t; | |
return e.forEach(function(e) { | |
s.async ? l(e, t, n) : e.apply(n, t), e._once && o.off(i, e) | |
}), o | |
} | |
}, o | |
} | |
}, { | |
"./debounce": 4, | |
atoa: 3 | |
}], | |
6: [function(g, v) { | |
(function(o) { | |
"use strict"; | |
function e(e, t, n, i) { | |
return e.addEventListener(t, n, i) | |
} | |
function t(e, t, n) { | |
return e.attachEvent("on" + t, a(e, t, n)) | |
} | |
function n(e, t, n, i) { | |
return e.removeEventListener(t, n, i) | |
} | |
function i(e, t, n) { | |
var i = l(e, t, n); | |
return i ? e.detachEvent("on" + t, i) : void 0 | |
} | |
function s(e, t, n) { | |
function i() { | |
var e; | |
return h.createEvent ? (e = h.createEvent("Event")).initEvent(t, !0, !0) : h.createEventObject && (e = h.createEventObject()), e | |
} | |
function o() { | |
return new d(t, { | |
detail: n | |
}) | |
} | |
var s = -1 === u.indexOf(t) ? o() : i(); | |
e.dispatchEvent ? e.dispatchEvent(s) : e.fireEvent("on" + t, s) | |
} | |
function r(n, e, i) { | |
return function(e) { | |
var t = e || o.event; | |
t.target = t.target || t.srcElement, t.preventDefault = t.preventDefault || function() { | |
t.returnValue = !1 | |
}, t.stopPropagation = t.stopPropagation || function() { | |
t.cancelBubble = !0 | |
}, t.which = t.which || t.keyCode, i.call(n, t) | |
} | |
} | |
function a(e, t, n) { | |
var i = l(e, t, n) || r(e, t, n); | |
return m.push({ | |
wrapper: i, | |
element: e, | |
type: t, | |
fn: n | |
}), i | |
} | |
function l(e, t, n) { | |
var i = c(e, t, n); | |
if (i) { | |
var o = m[i].wrapper; | |
return m.splice(i, 1), o | |
} | |
} | |
function c(e, t, n) { | |
var i, o; | |
for (i = 0; i < m.length; i++) | |
if ((o = m[i]).element === e && o.type === t && o.fn === n) return i | |
} | |
var d = g("custom-event"), | |
u = g("./eventmap"), | |
h = o.document, | |
p = e, | |
f = n, | |
m = []; | |
o.addEventListener || (p = t, f = i), v.exports = { | |
add: p, | |
remove: f, | |
fabricate: s | |
} | |
}).call(this, "undefined" != typeof global ? global : "undefined" != typeof self ? self : "undefined" != typeof window ? window : {}) | |
}, { | |
"./eventmap": 7, | |
"custom-event": 8 | |
}], | |
7: [function(e, o) { | |
(function(e) { | |
"use strict"; | |
var t = [], | |
n = "", | |
i = /^on/; | |
for (n in e) i.test(n) && t.push(n.slice(2)); | |
o.exports = t | |
}).call(this, "undefined" != typeof global ? global : "undefined" != typeof self ? self : "undefined" != typeof window ? window : {}) | |
}, {}], | |
8: [function(e, i) { | |
(function(e) { | |
function t() { | |
try { | |
var e = new n("cat", { | |
detail: { | |
foo: "bar" | |
} | |
}); | |
return "cat" === e.type && "bar" === e.detail.foo | |
} catch (i) {} | |
return !1 | |
} | |
var n = e.CustomEvent; | |
i.exports = t() ? n : "function" == typeof document.createEvent ? function(e, t) { | |
var n = document.createEvent("CustomEvent"); | |
return t ? n.initCustomEvent(e, t.bubbles, t.cancelable, t.detail) : n.initCustomEvent(e, !1, !1, void 0), n | |
} : function(e, t) { | |
var n = document.createEventObject(); | |
return n.type = e, t ? (n.bubbles = Boolean(t.bubbles), n.cancelable = Boolean(t.cancelable), n.detail = t.detail) : (n.bubbles = !1, n.cancelable = !1, n.detail = void 0), n | |
} | |
}).call(this, "undefined" != typeof global ? global : "undefined" != typeof self ? self : "undefined" != typeof window ? window : {}) | |
}, {}], | |
9: [function(e, t) { | |
var n; | |
n = "function" == typeof setImmediate ? function(e) { | |
setImmediate(e) | |
} : function(e) { | |
setTimeout(e, 0) | |
}, t.exports = n | |
}, {}] | |
}, {}, [2])(2) | |
}); | |
var autoScroll = function() { | |
"use strict"; | |
function t(e, t) { | |
return void 0 === e ? void 0 === t ? e : t : e | |
} | |
function $(i, e) { | |
return "function" == typeof(i = t(i, e)) ? function() { | |
for (var e = arguments.length, t = Array(e), n = 0; n < e; n++) t[n] = arguments[n]; | |
return !!i.apply(this, t) | |
} : i ? function() { | |
return !0 | |
} : function() { | |
return !1 | |
} | |
} | |
function o(e, t) { | |
if (t = r(t, !0), !_(t)) return -1; | |
for (var n = 0; n < e.length; n++) | |
if (e[n] === t) return n; | |
return -1 | |
} | |
function D(e, t) { | |
return -1 !== o(e, t) | |
} | |
function s(e, t) { | |
for (var n = 0; n < t.length; n++) D(e, t[n]) || e.push(t[n]); | |
return t | |
} | |
function A(e) { | |
for (var t = arguments.length, n = Array(1 < t ? t - 1 : 0), i = 1; i < t; i++) n[i - 1] = arguments[i]; | |
return s(e, n = n.map(r)) | |
} | |
function E(i) { | |
for (var e = arguments.length, t = Array(1 < e ? e - 1 : 0), n = 1; n < e; n++) t[n - 1] = arguments[n]; | |
return t.map(r).reduce(function(e, t) { | |
var n = o(i, t); | |
return -1 !== n ? e.concat(i.splice(n, 1)) : e | |
}, []) | |
} | |
function r(e, t) { | |
if ("string" == typeof e) try { | |
return document.querySelector(e) | |
} catch (e) { | |
throw e | |
} | |
if (!_(e) && !t) throw new TypeError(e + " is not a DOM element."); | |
return e | |
} | |
function n() { | |
var e = { | |
top: { | |
value: 0, | |
enumerable: !0 | |
}, | |
left: { | |
value: 0, | |
enumerable: !0 | |
}, | |
right: { | |
value: window.innerWidth, | |
enumerable: !0 | |
}, | |
bottom: { | |
value: window.innerHeight, | |
enumerable: !0 | |
}, | |
width: { | |
value: window.innerWidth, | |
enumerable: !0 | |
}, | |
height: { | |
value: window.innerHeight, | |
enumerable: !0 | |
}, | |
x: { | |
value: 0, | |
enumerable: !0 | |
}, | |
y: { | |
value: 0, | |
enumerable: !0 | |
} | |
}; | |
if (Object.create) return Object.create({}, e); | |
var t = {}; | |
return Object.defineProperties(t, e), t | |
} | |
function O(e) { | |
if (e === window) return n(); | |
try { | |
var t = e.getBoundingClientRect(); | |
return void 0 === t.x && (t.x = t.left, t.y = t.top), t | |
} catch (t) { | |
throw new TypeError("Can't call getBoundingClientRect on " + e) | |
} | |
} | |
function i(e, t) { | |
var n = O(t); | |
return e.y > n.top && e.y < n.bottom && e.x > n.left && e.x < n.right | |
} | |
function M(e) { | |
function t(e) { | |
for (var t = 0; t < k.length; t++) r[k[t]] = e[k[t]] | |
} | |
function n() { | |
e && e.removeEventListener("mousemove", t, !1), r = null | |
} | |
var r = { | |
screenX: 0, | |
screenY: 0, | |
clientX: 0, | |
clientY: 0, | |
ctrlKey: !1, | |
shiftKey: !1, | |
altKey: !1, | |
metaKey: !1, | |
button: 0, | |
buttons: 1, | |
relatedTarget: null, | |
region: null | |
}; | |
return void 0 !== e && e.addEventListener("mousemove", t), { | |
destroy: n, | |
dispatch: MouseEvent ? function(e, t, n) { | |
var i = new MouseEvent("mousemove", a(r, t)); | |
return l(i, n), e.dispatchEvent(i) | |
} : "function" == typeof document.createEvent ? function(e, t, n) { | |
var i = a(r, t), | |
o = document.createEvent("MouseEvents"); | |
return o.initMouseEvent("mousemove", !0, !0, window, 0, i.screenX, i.screenY, i.clientX, i.clientY, i.ctrlKey, i.altKey, i.shiftKey, i.metaKey, i.button, i.relatedTarget), l(o, n), e.dispatchEvent(o) | |
} : "function" == typeof document.createEventObject ? function(e, t, n) { | |
var i = document.createEventObject(), | |
o = a(r, t); | |
for (var s in o) i[s] = o[s]; | |
return l(i, n), e.dispatchEvent(i) | |
} : void 0 | |
} | |
} | |
function a(e, t) { | |
t = t || {}; | |
for (var n = x(e), i = 0; i < k.length; i++) void 0 !== t[k[i]] && (n[k[i]] = t[k[i]]); | |
return n | |
} | |
function l(e, t) { | |
console.log("data ", t), e.data = t || {}, e.dispatched = "mousemove" | |
} | |
function c(i, e) { | |
function t(e) { | |
for (var t = 0; t < i.length; t++) | |
if (i[t] === e.target) { | |
v = !0; | |
break | |
} | |
v && L(function() { | |
return v = !1 | |
}) | |
} | |
function n() { | |
_ = !0 | |
} | |
function o() { | |
_ = !1, I(T), I(C) | |
} | |
function s() { | |
_ = !1 | |
} | |
function r(e) { | |
if (!e) return null; | |
if (S === e) return e; | |
if (D(i, e)) return e; | |
for (; e = e.parentNode;) | |
if (D(i, e)) return e; | |
return null | |
} | |
function a() { | |
for (var e = null, t = 0; t < i.length; t++) P(y, i[t]) && (e = i[t]); | |
return e | |
} | |
function l(e) { | |
if (m.autoScroll() && !e.dispatched) { | |
var t = e.target, | |
n = document.body; | |
S && !P(y, S) && (m.scrollWhenOutside || (S = null)), t && t.parentNode === n ? t = a() : (t = r(t)) || (t = a()), t && t !== S && (S = t), k && (I(C), C = L(c)), S && (I(T), T = L(d)) | |
} | |
} | |
function c() { | |
u(k), I(C), C = L(c) | |
} | |
function d() { | |
S && (u(S), I(T), T = L(d)) | |
} | |
function u(e) { | |
var t = O(e), | |
n = void 0, | |
i = void 0; | |
n = y.x < t.left + m.margin ? Math.floor(Math.max(-1, (y.x - t.left) / m.margin - 1) * m.maxSpeed) : y.x > t.right - m.margin ? Math.ceil(Math.min(1, (y.x - t.right) / m.margin + 1) * m.maxSpeed) : 0, i = y.y < t.top + m.margin ? Math.floor(Math.max(-1, (y.y - t.top) / m.margin - 1) * m.maxSpeed) : y.y > t.bottom - m.margin ? Math.ceil(Math.min(1, (y.y - t.bottom) / m.margin + 1) * m.maxSpeed) : 0, m.syncMove() && w.dispatch(e, { | |
pageX: y.pageX + n, | |
pageY: y.pageY + i, | |
clientX: y.x + n, | |
clientY: y.y + i | |
}), setTimeout(function() { | |
i && h(e, i), n && p(e, n) | |
}) | |
} | |
function h(e, t) { | |
e === window ? window.scrollTo(e.pageXOffset, e.pageYOffset + t) : e.scrollTop += t | |
} | |
function p(e, t) { | |
e === window ? window.scrollTo(e.pageXOffset + t, e.pageYOffset) : e.scrollLeft += t | |
} | |
var f = 1 < arguments.length && void 0 !== e ? arguments[1] : {}, | |
m = this, | |
g = 4, | |
v = !1; | |
this.margin = f.margin || -1, this.scrollWhenOutside = f.scrollWhenOutside || !1; | |
var y = {}, | |
b = R(y), | |
w = M(), | |
_ = !1; | |
window.addEventListener("mousemove", b, !1), window.addEventListener("touchmove", b, !1), isNaN(f.maxSpeed) || (g = f.maxSpeed), this.autoScroll = $(f.autoScroll), this.syncMove = $(f.syncMove, !1), this.destroy = function() { | |
window.removeEventListener("mousemove", b, !1), window.removeEventListener("touchmove", b, !1), window.removeEventListener("mousedown", n, !1), window.removeEventListener("touchstart", n, !1), window.removeEventListener("mouseup", o, !1), window.removeEventListener("touchend", o, !1), window.removeEventListener("scroll", t, !0), i = [] | |
}, this.add = function() { | |
for (var e = arguments.length, t = Array(e), n = 0; n < e; n++) t[n] = arguments[n]; | |
return A.apply(void 0, [i].concat(t)), this | |
}, this.remove = function() { | |
for (var e = arguments.length, t = Array(e), n = 0; n < e; n++) t[n] = arguments[n]; | |
return E.apply(void 0, [i].concat(t)) | |
}; | |
var x, k = null, | |
C = void 0; | |
"[object Array]" !== Object.prototype.toString.call(i) && (i = [i]), x = i, i = [], x.forEach(function(e) { | |
e === window ? k = window : m.add(e) | |
}), Object.defineProperties(this, { | |
down: { | |
get: function() { | |
return _ | |
} | |
}, | |
maxSpeed: { | |
get: function() { | |
return g | |
} | |
}, | |
point: { | |
get: function() { | |
return y | |
} | |
}, | |
scrolling: { | |
get: function() { | |
return v | |
} | |
} | |
}); | |
var S = null, | |
T = void 0; | |
window.addEventListener("mousedown", n, !1), window.addEventListener("touchstart", n, !1), window.addEventListener("mouseup", o, !1), window.addEventListener("touchend", o, !1), window.addEventListener("mousemove", l, !1), window.addEventListener("touchmove", l, !1), window.addEventListener("mouseleave", s, !1), window.addEventListener("scroll", t, !0) | |
} | |
function e(e, t) { | |
return new c(e, t) | |
} | |
function P(e, t, n) { | |
return n ? e.y > n.top && e.y < n.bottom && e.x > n.left && e.x < n.right : i(e, t) | |
} | |
var d, u, h, p, f, m, g, v, y, b = ["webkit", "moz", "ms", "o"], | |
L = function() { | |
for (var e = 0, t = b.length; e < t && !window.requestAnimationFrame; ++e) window.requestAnimationFrame = window[b[e] + "RequestAnimationFrame"]; | |
return window.requestAnimationFrame || (o = 0, window.requestAnimationFrame = function(e) { | |
var t = (new Date).getTime(), | |
n = Math.max(0, 16 - t - o), | |
i = window.setTimeout(function() { | |
return e(t + n) | |
}, n); | |
return o = t + n, i | |
}), window.requestAnimationFrame.bind(window); | |
var o | |
}(), | |
I = function() { | |
for (var e = 0, t = b.length; e < t && !window.cancelAnimationFrame; ++e) window.cancelAnimationFrame = window[b[e] + "CancelAnimationFrame"] || window[b[e] + "CancelRequestAnimationFrame"]; | |
return window.cancelAnimationFrame || (window.cancelAnimationFrame = function(e) { | |
window.clearTimeout(e) | |
}), window.cancelAnimationFrame.bind(window) | |
}(), | |
w = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(e) { | |
return typeof e | |
} : function(e) { | |
return e && "function" == typeof Symbol && e.constructor === Symbol ? "symbol" : typeof e | |
}, | |
_ = function(e) { | |
return null != e && "object" === (void 0 === e ? "undefined" : w(e)) && 1 === e.nodeType && "object" === w(e.style) && "object" === w(e.ownerDocument) | |
}, | |
R = (d = function(e) { | |
return "function" == typeof e | |
}, u = function(e) { | |
var t = Number(e); | |
return isNaN(t) ? 0 : 0 !== t && isFinite(t) ? (0 < t ? 1 : -1) * Math.floor(Math.abs(t)) : t | |
}, h = Math.pow(2, 53) - 1, p = function(e) { | |
var t = u(e); | |
return Math.min(Math.max(t, 0), h) | |
}, f = function(e) { | |
if (null != e) { | |
if (-1 < ["string", "number", "boolean", "symbol"].indexOf(typeof e)) return Symbol.iterator; | |
if ("undefined" != typeof Symbol && "iterator" in Symbol && Symbol.iterator in e) return Symbol.iterator; | |
if ("@@iterator" in e) return "@@iterator" | |
} | |
}, m = function(e, t) { | |
if (null != e && null != t) { | |
var n = e[t]; | |
if (null == n) return; | |
if (!d(n)) throw new TypeError(n + " is not a function"); | |
return n | |
} | |
}, g = function(e) { | |
var t = e.next(); | |
return !Boolean(t.done) && t | |
}, "function" == typeof Array.from && Array.from, Array.isArray, Object.prototype.toString, function(o, e) { | |
var s; | |
return s = "function" == typeof(e = e || {}).allowUpdate ? e.allowUpdate : function() { | |
return !0 | |
}, | |
function(e) { | |
if (e = e || window.event, o.target = e.target || e.srcElement || e.originalTarget, o.element = this, o.type = e.type, s(e)) | |
if (e.targetTouches) o.x = e.targetTouches[0].clientX, o.y = e.targetTouches[0].clientY, o.pageX = e.pageX, o.pageY = e.pageY; | |
else { | |
if (null === e.pageX && null !== e.clientX) { | |
var t = e.target && e.target.ownerDocument || document, | |
n = t.documentElement, | |
i = t.body; | |
o.pageX = e.clientX + (n && n.scrollLeft || i && i.scrollLeft || 0) - (n && n.clientLeft || i && i.clientLeft || 0), o.pageY = e.clientY + (n && n.scrollTop || i && i.scrollTop || 0) - (n && n.clientTop || i && i.clientTop || 0) | |
} else o.pageX = e.pageX, o.pageY = e.pageY; | |
o.x = e.clientX, o.y = e.clientY | |
} | |
} | |
}), | |
x = "function" != typeof Object.create ? (y = function() {}, function(e, t) { | |
if (e !== Object(e) && null !== e) throw TypeError("Argument must be an object, or null"); | |
y.prototype = e || {}; | |
var n = new y; | |
return y.prototype = null, t !== v && Object.defineProperties(n, t), null === e && (n.__proto__ = null), n | |
}) : Object.create, | |
k = ["altKey", "button", "buttons", "clientX", "clientY", "ctrlKey", "metaKey", "movementX", "movementY", "offsetX", "offsetY", "pageX", "pageY", "region", "relatedTarget", "screenX", "screenY", "shiftKey", "which", "x", "y"]; | |
return e | |
}(); | |
! function(e, t) { | |
"function" == typeof define && define.amd ? define(e) : "undefined" != typeof module && "object" == typeof exports ? module.exports = e() : t.rangy = e() | |
}(function() { | |
function l(e, t) { | |
var n = typeof e[t]; | |
return n == x || !(n != _ || !e[t]) || "unknown" == n | |
} | |
function t(e, t) { | |
return !(typeof e[t] != _ || !e[t]) | |
} | |
function e(e, t) { | |
return typeof e[t] != k | |
} | |
function i(i) { | |
return function(e, t) { | |
for (var n = t.length; n--;) | |
if (!i(e, t[n])) return !1; | |
return !0 | |
} | |
} | |
function c(e) { | |
return e && D(e, $) && E(e, T) | |
} | |
function d(e) { | |
return t(e, "body") ? e.body : e.getElementsByTagName("body")[0] | |
} | |
function u(e) { | |
typeof console != k && l(console, "log") && console.log(e) | |
} | |
function n(e, t) { | |
P && t ? alert(e) : u(e) | |
} | |
function h(e) { | |
I.initialized = !0, I.supported = !1, n("Rangy is not supported in this environment. Reason: " + e, I.config.alertOnFail) | |
} | |
function o(e) { | |
n("Rangy warning: " + e, I.config.alertOnWarn) | |
} | |
function p(e) { | |
return e.message || e.description || String(e) | |
} | |
function s() { | |
if (P && !I.initialized) { | |
var e, t = !1, | |
n = !1; | |
l(document, "createRange") && (e = document.createRange(), D(e, S) && E(e, C) && (t = !0)); | |
var i, o = d(document); | |
if (!o || "body" != o.nodeName.toLowerCase()) return void h("No body element found"); | |
if (o && l(o, "createTextRange") && (c(e = o.createTextRange()) && (n = !0)), !t && !n) return void h("Neither Range nor TextRange are available"); | |
for (var s in I.initialized = !0, I.features = { | |
implementsDomRange: t, | |
implementsTextRange: n | |
}, M)(i = M[s]) instanceof m && i.init(i, I); | |
for (var r = 0, a = R.length; r < a; ++r) try { | |
R[r](I) | |
} catch (g) { | |
u("Rangy init listener threw an exception. Continuing. Detail: " + p(g)) | |
} | |
} | |
} | |
function r(e, t, n) { | |
n && (e += " in module " + n.name), I.warn("DEPRECATED: " + e + " is deprecated. Please use " + t + " instead.") | |
} | |
function a(e, t, n, i) { | |
e[t] = function() { | |
return r(t, n, i), e[n].apply(e, L.toArray(arguments)) | |
} | |
} | |
function f(e) { | |
e = e || window, s(); | |
for (var t = 0, n = N.length; t < n; ++t) N[t](e) | |
} | |
function m(e, t, n) { | |
this.name = e, this.dependencies = t, this.initialized = !1, this.supported = !1, this.initializer = n | |
} | |
function g(n, e, i) { | |
var o = new m(n, e, function(e) { | |
if (!e.initialized) { | |
e.initialized = !0; | |
try { | |
i(I, e), e.supported = !0 | |
} catch (o) { | |
var t = "Module '" + n + "' failed to load: " + p(o); | |
u(t), o.stack && u(o.stack) | |
} | |
} | |
}); | |
return M[n] = o | |
} | |
function v() {} | |
function y() {} | |
var b, w, _ = "object", | |
x = "function", | |
k = "undefined", | |
C = ["startContainer", "startOffset", "endContainer", "endOffset", "collapsed", "commonAncestorContainer"], | |
S = ["setStart", "setStartBefore", "setStartAfter", "setEnd", "setEndBefore", "setEndAfter", "collapse", "selectNode", "selectNodeContents", "compareBoundaryPoints", "deleteContents", "extractContents", "cloneContents", "insertNode", "surroundContents", "cloneRange", "toString", "detach"], | |
T = ["boundingHeight", "boundingLeft", "boundingTop", "boundingWidth", "htmlText", "text"], | |
$ = ["collapse", "compareEndPoints", "duplicate", "moveToElementText", "parentElement", "select", "setEndPoint", "getBoundingClientRect"], | |
D = i(l), | |
A = i(t), | |
E = i(e), | |
O = [].forEach ? function(e, t) { | |
e.forEach(t) | |
} : function(e, t) { | |
for (var n = 0, i = e.length; n < i; ++n) t(e[n], n) | |
}, | |
M = {}, | |
P = typeof window != k && typeof document != k, | |
L = { | |
isHostMethod: l, | |
isHostObject: t, | |
isHostProperty: e, | |
areHostMethods: D, | |
areHostObjects: A, | |
areHostProperties: E, | |
isTextRange: c, | |
getBody: d, | |
forEach: O | |
}, | |
I = { | |
version: "1.3.0", | |
initialized: !1, | |
isBrowser: P, | |
supported: !0, | |
util: L, | |
features: {}, | |
modules: M, | |
config: { | |
alertOnFail: !1, | |
alertOnWarn: !1, | |
preferTextRange: !1, | |
autoInitialize: typeof rangyAutoInitialize == k || rangyAutoInitialize | |
} | |
}; | |
I.fail = h, I.warn = o, !{}.hasOwnProperty ? h("hasOwnProperty not supported") : (L.extend = b = function(e, t, n) { | |
var i, o; | |
for (var s in t) t.hasOwnProperty(s) && (i = e[s], o = t[s], n && null !== i && "object" == typeof i && null !== o && "object" == typeof o && b(i, o, !0), e[s] = o); | |
return t.hasOwnProperty("toString") && (e.toString = t.toString), e | |
}, L.createOptions = function(e, t) { | |
var n = {}; | |
return b(n, t), e && b(n, e), n | |
}), P || h("Rangy can only run in a browser"), | |
function() { | |
var e; | |
if (P) { | |
var t = document.createElement("div"); | |
t.appendChild(document.createElement("span")); | |
var n = [].slice; | |
try { | |
1 == n.call(t.childNodes, 0)[0].nodeType && (e = function(e) { | |
return n.call(e, 0) | |
}) | |
} catch (i) {} | |
} | |
e || (e = function(e) { | |
for (var t = [], n = 0, i = e.length; n < i; ++n) t[n] = e[n]; | |
return t | |
}), L.toArray = e | |
}(), P && (l(document, "addEventListener") ? w = function(e, t, n) { | |
e.addEventListener(t, n, !1) | |
} : l(document, "attachEvent") ? w = function(e, t, n) { | |
e.attachEvent("on" + t, n) | |
} : h("Document does not have required addEventListener or attachEvent method"), L.addListener = w); | |
var R = []; | |
L.deprecationNotice = r, L.createAliasForDeprecatedMethod = a, I.init = s, I.addInitListener = function(e) { | |
I.initialized ? e(I) : R.push(e) | |
}; | |
var N = []; | |
I.addShimListener = function(e) { | |
N.push(e) | |
}, P && (I.shim = I.createMissingNativeApi = f, a(I, "createMissingNativeApi", "shim")), m.prototype = { | |
init: function() { | |
for (var e, t, n = this.dependencies || [], i = 0, o = n.length; i < o; ++i) { | |
if (t = n[i], !((e = M[t]) && e instanceof m)) throw new Error("required module '" + t + "' not found"); | |
if (e.init(), !e.supported) throw new Error("required module '" + t + "' not supported") | |
} | |
this.initializer(this) | |
}, | |
fail: function(e) { | |
throw this.initialized = !0, this.supported = !1, new Error(e) | |
}, | |
warn: function(e) { | |
I.warn("Module " + this.name + ": " + e) | |
}, | |
deprecationNotice: function(e, t) { | |
I.warn("DEPRECATED: " + e + " in module " + this.name + " is deprecated. Please use " + t + " instead") | |
}, | |
createError: function(e) { | |
return new Error("Error in Rangy " + this.name + " module: " + e) | |
} | |
}, I.createModule = function(e, t, n) { | |
var i, o; | |
2 == arguments.length ? (i = t, o = []) : (i = n, o = t); | |
var s = g(e, o, i); | |
I.initialized && I.supported && s.init() | |
}, I.createCoreModule = function(e, t, n) { | |
g(e, t, n) | |
}, I.RangePrototype = v, I.rangePrototype = new v, I.selectionPrototype = new y, I.createCoreModule("DomUtil", [], function(n, c) { | |
function t(e) { | |
var t; | |
return typeof e.namespaceURI == O || null === (t = e.namespaceURI) || "http://www.w3.org/1999/xhtml" == t | |
} | |
function e(e) { | |
var t = e.parentNode; | |
return 1 == t.nodeType ? t : null | |
} | |
function d(e) { | |
for (var t = 0; e = e.previousSibling;) ++t; | |
return t | |
} | |
function i(e) { | |
switch (e.nodeType) { | |
case 7: | |
case 10: | |
return 0; | |
case 3: | |
case 8: | |
return e.length; | |
default: | |
return e.childNodes.length | |
} | |
} | |
function u(e, t) { | |
var n, i = []; | |
for (n = e; n; n = n.parentNode) i.push(n); | |
for (n = t; n; n = n.parentNode) | |
if (N(i, n)) return n; | |
return null | |
} | |
function o(e, t, n) { | |
for (var i = n ? t : t.parentNode; i;) { | |
if (i === e) return !0; | |
i = i.parentNode | |
} | |
return !1 | |
} | |
function s(e, t) { | |
return o(e, t, !0) | |
} | |
function h(e, t, n) { | |
for (var i, o = n ? e : e.parentNode; o;) { | |
if ((i = o.parentNode) === t) return o; | |
o = i | |
} | |
return null | |
} | |
function r(e) { | |
var t = e.nodeType; | |
return 3 == t || 4 == t || 8 == t | |
} | |
function a(e) { | |
if (!e) return !1; | |
var t = e.nodeType; | |
return 3 == t || 8 == t | |
} | |
function l(e, t) { | |
var n = t.nextSibling, | |
i = t.parentNode; | |
return n ? i.insertBefore(e, n) : i.appendChild(e), e | |
} | |
function p(e, t, n) { | |
var i = e.cloneNode(!1); | |
if (i.deleteData(0, t), e.deleteData(t, e.length - t), l(i, e), n) | |
for (var o, s = 0; o = n[s++];) o.node == e && o.offset > t ? (o.node = i, o.offset -= t) : o.node == e.parentNode && o.offset > d(e) && ++o.offset; | |
return i | |
} | |
function f(e) { | |
if (9 == e.nodeType) return e; | |
if (typeof e.ownerDocument != O) return e.ownerDocument; | |
if (typeof e.document != O) return e.document; | |
if (e.parentNode) return f(e.parentNode); | |
throw c.createError("getDocument: no document found for node") | |
} | |
function m(e) { | |
var t = f(e); | |
if (typeof t.defaultView != O) return t.defaultView; | |
if (typeof t.parentWindow != O) return t.parentWindow; | |
throw c.createError("Cannot get a window object for node") | |
} | |
function g(e) { | |
if (typeof e.contentDocument != O) return e.contentDocument; | |
if (typeof e.contentWindow != O) return e.contentWindow.document; | |
throw c.createError("getIframeDocument: No Document object found for iframe element") | |
} | |
function v(e) { | |
if (typeof e.contentWindow != O) return e.contentWindow; | |
if (typeof e.contentDocument != O) return e.contentDocument.defaultView; | |
throw c.createError("getIframeWindow: No Window object found for iframe element") | |
} | |
function y(e) { | |
return e && M.isHostMethod(e, "setTimeout") && M.isHostObject(e, "document") | |
} | |
function b(e, t, n) { | |
var i; | |
if (e ? M.isHostProperty(e, "nodeType") ? i = 1 == e.nodeType && "iframe" == e.tagName.toLowerCase() ? g(e) : f(e) : y(e) && (i = e.document) : i = document, !i) throw t.createError(n + "(): Parameter must be a Window object or DOM node"); | |
return i | |
} | |
function w(e) { | |
for (var t; t = e.parentNode;) e = t; | |
return e | |
} | |
function _(e, t, n, i) { | |
var o, s, r, a, l; | |
if (e == n) return t === i ? 0 : t < i ? -1 : 1; | |
if (o = h(n, e, !0)) return t <= d(o) ? -1 : 1; | |
if (o = h(e, n, !0)) return d(o) < i ? -1 : 1; | |
if (!(s = u(e, n))) throw new Error("comparePoints error: nodes have no common ancestor"); | |
if ((r = e === s ? s : h(e, s, !0)) === (a = n === s ? s : h(n, s, !0))) throw c.createError("comparePoints got to case 4 and childA and childB are the same!"); | |
for (l = s.firstChild; l;) { | |
if (l === r) return -1; | |
if (l === a) return 1; | |
l = l.nextSibling | |
} | |
} | |
function x(e) { | |
try { | |
return e.parentNode, !1 | |
} catch (t) { | |
return !0 | |
} | |
} | |
function k(e) { | |
if (!e) return "[No node]"; | |
if (z && x(e)) return "[Broken node]"; | |
if (r(e)) return '"' + e.data + '"'; | |
if (1 != e.nodeType) return e.nodeName; | |
var t = e.id ? ' id="' + e.id + '"' : ""; | |
return "<" + e.nodeName + t + ">[index:" + d(e) + ",length:" + e.childNodes.length + "][" + (e.innerHTML || "[innerHTML not supported]").slice(0, 25) + "]" | |
} | |
function C(e) { | |
for (var t, n = f(e).createDocumentFragment(); t = e.firstChild;) n.appendChild(t); | |
return n | |
} | |
function S(e, t, n) { | |
var i = P(e), | |
o = e.createElement("div"); | |
o.contentEditable = "" + !!n, t && (o.innerHTML = t); | |
var s = i.firstChild; | |
return s ? i.insertBefore(o, s) : i.appendChild(o), o | |
} | |
function T(e) { | |
return e.parentNode.removeChild(e) | |
} | |
function $(e) { | |
this.root = e, this._next = e | |
} | |
function D(e) { | |
return new $(e) | |
} | |
function A(e, t) { | |
this.node = e, this.offset = t | |
} | |
function E(e) { | |
this.code = this[e], this.codeName = e, this.message = "DOMException: " + this.codeName | |
} | |
var O = "undefined", | |
M = n.util, | |
P = M.getBody; | |
M.areHostMethods(document, ["createDocumentFragment", "createElement", "createTextNode"]) || c.fail("document missing a Node creation method"), M.isHostMethod(document, "getElementsByTagName") || c.fail("document missing getElementsByTagName method"); | |
var L = document.createElement("div"); | |
M.areHostMethods(L, ["insertBefore", "appendChild", "cloneNode"]) || c.fail("Incomplete Element implementation"), M.isHostProperty(L, "innerHTML") || c.fail("Element is missing innerHTML property"); | |
var I = document.createTextNode("test"); | |
M.areHostMethods(I, ["splitText", "deleteData", "insertData", "appendData", "cloneNode"]) || c.fail("Incomplete Text Node implementation"); | |
var R, N = function(e, t) { | |
for (var n = e.length; n--;) | |
if (e[n] === t) return !0; | |
return !1 | |
}, | |
z = !1; | |
! function() { | |
var e = document.createElement("b"); | |
e.innerHTML = "1"; | |
var t = e.firstChild; | |
e.innerHTML = "<br />", z = x(t), n.features.crashyTextNodes = z | |
}(), typeof window.getComputedStyle != O ? R = function(e, t) { | |
return m(e).getComputedStyle(e, null)[t] | |
} : typeof document.documentElement.currentStyle != O ? R = function(e, t) { | |
return e.currentStyle ? e.currentStyle[t] : "" | |
} : c.fail("No means of obtaining computed style properties found"), $.prototype = { | |
_current: null, | |
hasNext: function() { | |
return !!this._next | |
}, | |
next: function() { | |
var e, t, n = this._current = this._next; | |
if (this._current) | |
if (e = n.firstChild) this._next = e; | |
else { | |
for (t = null; n !== this.root && !(t = n.nextSibling);) n = n.parentNode; | |
this._next = t | |
} | |
return this._current | |
}, | |
detach: function() { | |
this._current = this._next = this.root = null | |
} | |
}, A.prototype = { | |
equals: function(e) { | |
return !!e && this.node === e.node && this.offset == e.offset | |
}, | |
inspect: function() { | |
return "[DomPosition(" + k(this.node) + ":" + this.offset + ")]" | |
}, | |
toString: function() { | |
return this.inspect() | |
} | |
}, E.prototype = { | |
INDEX_SIZE_ERR: 1, | |
HIERARCHY_REQUEST_ERR: 3, | |
WRONG_DOCUMENT_ERR: 4, | |
NO_MODIFICATION_ALLOWED_ERR: 7, | |
NOT_FOUND_ERR: 8, | |
NOT_SUPPORTED_ERR: 9, | |
INVALID_STATE_ERR: 11, | |
INVALID_NODE_TYPE_ERR: 24 | |
}, E.prototype.toString = function() { | |
return this.message | |
}, n.dom = { | |
arrayContains: N, | |
isHtmlNamespace: t, | |
parentElement: e, | |
getNodeIndex: d, | |
getNodeLength: i, | |
getCommonAncestor: u, | |
isAncestorOf: o, | |
isOrIsAncestorOf: s, | |
getClosestAncestorIn: h, | |
isCharacterDataNode: r, | |
isTextOrCommentNode: a, | |
insertAfter: l, | |
splitDataNode: p, | |
getDocument: f, | |
getWindow: m, | |
getIframeWindow: v, | |
getIframeDocument: g, | |
getBody: P, | |
isWindow: y, | |
getContentDocument: b, | |
getRootContainer: w, | |
comparePoints: _, | |
isBrokenNode: x, | |
inspectNode: k, | |
getComputedStyleProperty: R, | |
createTestElement: S, | |
removeNode: T, | |
fragmentFromNodeChildren: C, | |
createIterator: D, | |
DomPosition: A | |
}, n.DOMException = E | |
}), I.createCoreModule("DomRange", ["DomUtil"], function(r) { | |
function i(e, t) { | |
return 3 != e.nodeType && (F(e, t.startContainer) || F(e, t.endContainer)) | |
} | |
function a(e) { | |
return e.document || H(e.startContainer) | |
} | |
function l(e) { | |
return Y(e.startContainer) | |
} | |
function c(e) { | |
return new R(e.parentNode, j(e)) | |
} | |
function u(e) { | |
return new R(e.parentNode, j(e) + 1) | |
} | |
function n(e, t, n) { | |
var i = 11 == e.nodeType ? e.firstChild : e; | |
return z(t) ? n == t.length ? L.insertAfter(e, t) : t.parentNode.insertBefore(e, 0 == n ? t : B(t, n)) : n >= t.childNodes.length ? t.appendChild(e) : t.insertBefore(e, t.childNodes[n]), i | |
} | |
function t(e, t, n) { | |
if (C(e), C(t), a(t) != a(e)) throw new N("WRONG_DOCUMENT_ERR"); | |
var i = W(e.startContainer, e.startOffset, t.endContainer, t.endOffset), | |
o = W(e.endContainer, e.endOffset, t.startContainer, t.startOffset); | |
return n ? i <= 0 && 0 <= o : i < 0 && 0 < o | |
} | |
function s(e) { | |
for (var t, n, i, o = a(e.range).createDocumentFragment(); n = e.next();) { | |
if (t = e.isPartiallySelectedSubtree(), n = n.cloneNode(!t), t && (i = e.getSubtreeIterator(), n.appendChild(s(i)), i.detach()), 10 == n.nodeType) throw new N("HIERARCHY_REQUEST_ERR"); | |
o.appendChild(n) | |
} | |
return o | |
} | |
function d(e, t, n) { | |
var i, o, s, r; | |
for (n = n || { | |
stop: !1 | |
}; s = e.next();) | |
if (e.isPartiallySelectedSubtree()) { | |
if (!1 === t(s)) return void(n.stop = !0); | |
if (d(r = e.getSubtreeIterator(), t, n), r.detach(), n.stop) return | |
} else | |
for (i = L.createIterator(s); o = i.next();) | |
if (!1 === t(o)) return void(n.stop = !0) | |
} | |
function h(e) { | |
for (var t; e.next();) e.isPartiallySelectedSubtree() ? (h(t = e.getSubtreeIterator()), t.detach()) : e.remove() | |
} | |
function p(e) { | |
for (var t, n, i = a(e.range).createDocumentFragment(); t = e.next();) { | |
if (e.isPartiallySelectedSubtree() ? (t = t.cloneNode(!1), n = e.getSubtreeIterator(), t.appendChild(p(n)), n.detach()) : e.remove(), 10 == t.nodeType) throw new N("HIERARCHY_REQUEST_ERR"); | |
i.appendChild(t) | |
} | |
return i | |
} | |
function o(i, e, o) { | |
var s, r = !(!e || !e.length), | |
a = !!o; | |
r && (s = new RegExp("^(" + e.join("|") + ")$")); | |
var l = []; | |
return d(new f(i, !1), function(e) { | |
if (!(r && !s.test(e.nodeType) || a && !o(e))) { | |
var t = i.startContainer; | |
if (e != t || !z(t) || i.startOffset != t.length) { | |
var n = i.endContainer; | |
e == n && z(n) && 0 == i.endOffset || l.push(e) | |
} | |
} | |
}), l | |
} | |
function e(e) { | |
return "[" + ("undefined" == typeof e.getName ? "Range" : e.getName()) + "(" + L.inspectNode(e.startContainer) + ":" + e.startOffset + ", " + L.inspectNode(e.endContainer) + ":" + e.endOffset + ")]" | |
} | |
function f(e, t) { | |
if (this.range = e, this.clonePartiallySelectedTextNodes = t, !e.collapsed) { | |
this.sc = e.startContainer, this.so = e.startOffset, this.ec = e.endContainer, this.eo = e.endOffset; | |
var n = e.commonAncestorContainer; | |
this.sc === this.ec && z(this.sc) ? (this.isSingleCharacterDataNode = !0, this._first = this._last = this._next = this.sc) : (this._first = this._next = this.sc !== n || z(this.sc) ? U(this.sc, n, !0) : this.sc.childNodes[this.so], this._last = this.ec !== n || z(this.ec) ? U(this.ec, n, !0) : this.ec.childNodes[this.eo - 1]) | |
} | |
} | |
function m(o) { | |
return function(e, t) { | |
for (var n, i = t ? e : e.parentNode; i;) { | |
if (n = i.nodeType, q(o, n)) return i; | |
i = i.parentNode | |
} | |
return null | |
} | |
} | |
function g(e, t) { | |
if (ie(e, t)) throw new N("INVALID_NODE_TYPE_ERR") | |
} | |
function v(e, t) { | |
if (!q(t, e.nodeType)) throw new N("INVALID_NODE_TYPE_ERR") | |
} | |
function y(e, t) { | |
if (t < 0 || t > (z(e) ? e.length : e.childNodes.length)) throw new N("INDEX_SIZE_ERR") | |
} | |
function b(e, t) { | |
if (te(e, !0) !== te(t, !0)) throw new N("WRONG_DOCUMENT_ERR") | |
} | |
function w(e) { | |
if (ne(e, !0)) throw new N("NO_MODIFICATION_ALLOWED_ERR") | |
} | |
function _(e, t) { | |
if (!e) throw new N(t) | |
} | |
function x(e, t) { | |
return t <= (z(e) ? e.length : e.childNodes.length) | |
} | |
function k(e) { | |
return !!e.startContainer && !!e.endContainer && !(G && (L.isBrokenNode(e.startContainer) || L.isBrokenNode(e.endContainer))) && Y(e.startContainer) == Y(e.endContainer) && x(e.startContainer, e.startOffset) && x(e.endContainer, e.endOffset) | |
} | |
function C(e) { | |
if (!k(e)) throw new Error("Range error: Range is not valid. This usually happens after DOM mutation. Range: (" + e.inspect() + ")") | |
} | |
function S(e, t) { | |
C(e); | |
var n = e.startContainer, | |
i = e.startOffset, | |
o = e.endContainer, | |
s = e.endOffset, | |
r = n === o; | |
z(o) && 0 < s && s < o.length && B(o, s, t), z(n) && 0 < i && i < n.length && (n = B(n, i, t), r ? (s -= i, o = n) : o == n.parentNode && s >= j(n) && s++, i = 0), e.setStartAndEnd(n, i, o, s) | |
} | |
function T(e) { | |
C(e); | |
var t = e.commonAncestorContainer.parentNode.cloneNode(!1); | |
return t.appendChild(e.cloneContents()), t.innerHTML | |
} | |
function $(e) { | |
e.START_TO_START = le, e.START_TO_END = ce, e.END_TO_END = de, e.END_TO_START = ue, e.NODE_BEFORE = he, e.NODE_AFTER = pe, e.NODE_BEFORE_AND_AFTER = fe, e.NODE_INSIDE = me | |
} | |
function D(e) { | |
$(e), $(e.prototype) | |
} | |
function A(r, a) { | |
return function() { | |
C(this); | |
var e, t = this.startContainer, | |
n = this.startOffset, | |
i = this.commonAncestorContainer, | |
o = new f(this, !0); | |
t !== i && (t = (e = u(U(t, i, !0))).node, n = e.offset), d(o, w), o.reset(); | |
var s = r(o); | |
return o.detach(), a(this, t, n, t, n), s | |
} | |
} | |
function E(e, d) { | |
function t(n, i) { | |
return function(e) { | |
v(e, Z), v(Y(e), J); | |
var t = (n ? c : u)(e); | |
(i ? o : s)(this, t.node, t.offset) | |
} | |
} | |
function o(e, t, n) { | |
var i = e.endContainer, | |
o = e.endOffset; | |
(t !== e.startContainer || n !== e.startOffset) && ((Y(t) != Y(i) || 1 == W(t, n, i, o)) && (i = t, o = n), d(e, t, n, i, o)) | |
} | |
function s(e, t, n) { | |
var i = e.startContainer, | |
o = e.startOffset; | |
(t !== e.endContainer || n !== e.endOffset) && ((Y(t) != Y(i) || -1 == W(t, n, i, o)) && (i = t, o = n), d(e, i, o, t, n)) | |
} | |
var n = function() {}; | |
n.prototype = r.rangePrototype, e.prototype = new n, I.extend(e.prototype, { | |
setStart: function(e, t) { | |
g(e, !0), y(e, t), o(this, e, t) | |
}, | |
setEnd: function(e, t) { | |
g(e, !0), y(e, t), s(this, e, t) | |
}, | |
setStartAndEnd: function() { | |
var e = arguments, | |
t = e[0], | |
n = e[1], | |
i = t, | |
o = n; | |
switch (e.length) { | |
case 3: | |
o = e[2]; | |
break; | |
case 4: | |
i = e[2], o = e[3] | |
} | |
d(this, t, n, i, o) | |
}, | |
setBoundary: function(e, t, n) { | |
this["set" + (n ? "Start" : "End")](e, t) | |
}, | |
setStartBefore: t(!0, !0), | |
setStartAfter: t(!1, !0), | |
setEndBefore: t(!0, !1), | |
setEndAfter: t(!1, !1), | |
collapse: function(e) { | |
C(this), e ? d(this, this.startContainer, this.startOffset, this.startContainer, this.startOffset) : d(this, this.endContainer, this.endOffset, this.endContainer, this.endOffset) | |
}, | |
selectNodeContents: function(e) { | |
g(e, !0), d(this, e, 0, e, V(e)) | |
}, | |
selectNode: function(e) { | |
g(e, !1), v(e, Z); | |
var t = c(e), | |
n = u(e); | |
d(this, t.node, t.offset, n.node, n.offset) | |
}, | |
extractContents: A(p, d), | |
deleteContents: A(h, d), | |
canSurroundContents: function() { | |
C(this), w(this.startContainer), w(this.endContainer); | |
var e = new f(this, !0), | |
t = e._first && i(e._first, this) || e._last && i(e._last, this); | |
return e.detach(), !t | |
}, | |
splitBoundaries: function() { | |
S(this) | |
}, | |
splitBoundariesPreservingPositions: function(e) { | |
S(this, e) | |
}, | |
normalizeBoundaries: function() { | |
C(this); | |
var e, o = this.startContainer, | |
s = this.startOffset, | |
r = this.endContainer, | |
a = this.endOffset, | |
t = function(e) { | |
var t = e.nextSibling; | |
t && t.nodeType == e.nodeType && (a = (r = e).length, e.appendData(t.data), X(t)) | |
}, | |
n = function(e) { | |
var t = e.previousSibling; | |
if (t && t.nodeType == e.nodeType) { | |
var n = (o = e).length; | |
if (s = t.length, e.insertData(0, t.data), X(t), o == r) a += s, r = o; | |
else if (r == e.parentNode) { | |
var i = j(e); | |
a == i ? (r = e, a = n) : i < a && a-- | |
} | |
} | |
}, | |
i = !0; | |
if (z(r)) a == r.length ? t(r) : 0 == a && ((e = r.previousSibling) && e.nodeType == r.nodeType && (a = e.length, o == r && (i = !1), e.appendData(r.data), X(r), r = e)); | |
else { | |
if (0 < a) { | |
var l = r.childNodes[a - 1]; | |
l && z(l) && t(l) | |
} | |
i = !this.collapsed | |
} | |
if (i) { | |
if (z(o)) 0 == s ? n(o) : s == o.length && ((e = o.nextSibling) && e.nodeType == o.nodeType && (r == e && (a += (r = o).length), o.appendData(e.data), X(e))); | |
else if (s < o.childNodes.length) { | |
var c = o.childNodes[s]; | |
c && z(c) && n(c) | |
} | |
} else o = r, s = a; | |
d(this, o, s, r, a) | |
}, | |
collapseToPoint: function(e, t) { | |
g(e, !0), y(e, t), this.setStartAndEnd(e, t) | |
} | |
}), D(e) | |
} | |
function O(e) { | |
e.collapsed = e.startContainer === e.endContainer && e.startOffset === e.endOffset, e.commonAncestorContainer = e.collapsed ? e.startContainer : L.getCommonAncestor(e.startContainer, e.endContainer) | |
} | |
function M(e, t, n, i, o) { | |
e.startContainer = t, e.startOffset = n, e.endContainer = i, e.endOffset = o, e.document = L.getDocument(t), O(e) | |
} | |
function P(e) { | |
this.startContainer = e, this.startOffset = 0, this.endContainer = e, this.endOffset = 0, this.document = e, O(this) | |
} | |
var L = r.dom, | |
I = r.util, | |
R = L.DomPosition, | |
N = r.DOMException, | |
z = L.isCharacterDataNode, | |
j = L.getNodeIndex, | |
F = L.isOrIsAncestorOf, | |
H = L.getDocument, | |
W = L.comparePoints, | |
B = L.splitDataNode, | |
U = L.getClosestAncestorIn, | |
V = L.getNodeLength, | |
q = L.arrayContains, | |
Y = L.getRootContainer, | |
G = r.features.crashyTextNodes, | |
X = L.removeNode; | |
f.prototype = { | |
_current: null, | |
_next: null, | |
_first: null, | |
_last: null, | |
isSingleCharacterDataNode: !1, | |
reset: function() { | |
this._current = null, this._next = this._first | |
}, | |
hasNext: function() { | |
return !!this._next | |
}, | |
next: function() { | |
var e = this._current = this._next; | |
return e && (this._next = e !== this._last ? e.nextSibling : null, z(e) && this.clonePartiallySelectedTextNodes && (e === this.ec && (e = e.cloneNode(!0)).deleteData(this.eo, e.length - this.eo), this._current === this.sc && (e = e.cloneNode(!0)).deleteData(0, this.so))), e | |
}, | |
remove: function() { | |
var e, t, n = this._current; | |
!z(n) || n !== this.sc && n !== this.ec ? n.parentNode && X(n) : (e = n === this.sc ? this.so : 0) != (t = n === this.ec ? this.eo : n.length) && n.deleteData(e, t - e) | |
}, | |
isPartiallySelectedSubtree: function() { | |
return i(this._current, this.range) | |
}, | |
getSubtreeIterator: function() { | |
var e; | |
if (this.isSingleCharacterDataNode)(e = this.range.cloneRange()).collapse(!1); | |
else { | |
e = new P(a(this.range)); | |
var t = this._current, | |
n = t, | |
i = 0, | |
o = t, | |
s = V(t); | |
F(t, this.sc) && (n = this.sc, i = this.so), F(t, this.ec) && (o = this.ec, s = this.eo), M(e, n, i, o, s) | |
} | |
return new f(e, this.clonePartiallySelectedTextNodes) | |
}, | |
detach: function() { | |
this.range = this._current = this._next = this._first = this._last = this.sc = this.so = this.ec = this.eo = null | |
} | |
}; | |
var Z = [1, 3, 4, 5, 7, 8, 10], | |
J = [2, 9, 11], | |
K = [5, 6, 10, 12], | |
Q = [1, 3, 4, 5, 7, 8, 10, 11], | |
ee = [1, 3, 4, 5, 7, 8], | |
te = m([9, 11]), | |
ne = m(K), | |
ie = m([6, 10, 12]), | |
oe = document.createElement("style"), | |
se = !1; | |
try { | |
oe.innerHTML = "<b>x</b>", se = 3 == oe.firstChild.nodeType | |
} catch (ge) {} | |
var re = (r.features.htmlParsingConforms = se) ? function(e) { | |
var t = this.startContainer, | |
n = H(t); | |
if (!t) throw new N("INVALID_STATE_ERR"); | |
var i = null; | |
return 1 == t.nodeType ? i = t : z(t) && (i = L.parentElement(t)), (i = null === i || "HTML" == i.nodeName && L.isHtmlNamespace(H(i).documentElement) && L.isHtmlNamespace(i) ? n.createElement("body") : i.cloneNode(!1)).innerHTML = e, L.fragmentFromNodeChildren(i) | |
} : function(e) { | |
var t = a(this).createElement("body"); | |
return t.innerHTML = e, L.fragmentFromNodeChildren(t) | |
}, | |
ae = ["startContainer", "startOffset", "endContainer", "endOffset", "collapsed", "commonAncestorContainer"], | |
le = 0, | |
ce = 1, | |
de = 2, | |
ue = 3, | |
he = 0, | |
pe = 1, | |
fe = 2, | |
me = 3; | |
I.extend(r.rangePrototype, { | |
compareBoundaryPoints: function(e, t) { | |
C(this), b(this.startContainer, t.startContainer); | |
var n, i, o, s, r = e == ue || e == le ? "start" : "end", | |
a = e == ce || e == le ? "start" : "end"; | |
return n = this[r + "Container"], i = this[r + "Offset"], o = t[a + "Container"], s = t[a + "Offset"], W(n, i, o, s) | |
}, | |
insertNode: function(e) { | |
if (C(this), v(e, Q), w(this.startContainer), F(e, this.startContainer)) throw new N("HIERARCHY_REQUEST_ERR"); | |
var t = n(e, this.startContainer, this.startOffset); | |
this.setStartBefore(t) | |
}, | |
cloneContents: function() { | |
var e, t; | |
if (C(this), this.collapsed) return a(this).createDocumentFragment(); | |
if (this.startContainer === this.endContainer && z(this.startContainer)) return (e = this.startContainer.cloneNode(!0)).data = e.data.slice(this.startOffset, this.endOffset), (t = a(this).createDocumentFragment()).appendChild(e), t; | |
var n = new f(this, !0); | |
return e = s(n), n.detach(), e | |
}, | |
canSurroundContents: function() { | |
C(this), w(this.startContainer), w(this.endContainer); | |
var e = new f(this, !0), | |
t = e._first && i(e._first, this) || e._last && i(e._last, this); | |
return e.detach(), !t | |
}, | |
surroundContents: function(e) { | |
if (v(e, ee), !this.canSurroundContents()) throw new N("INVALID_STATE_ERR"); | |
var t = this.extractContents(); | |
if (e.hasChildNodes()) | |
for (; e.lastChild;) e.removeChild(e.lastChild); | |
n(e, this.startContainer, this.startOffset), e.appendChild(t), this.selectNode(e) | |
}, | |
cloneRange: function() { | |
C(this); | |
for (var e, t = new P(a(this)), n = ae.length; n--;) t[e = ae[n]] = this[e]; | |
return t | |
}, | |
toString: function() { | |
C(this); | |
var e = this.startContainer; | |
if (e === this.endContainer && z(e)) return 3 == e.nodeType || 4 == e.nodeType ? e.data.slice(this.startOffset, this.endOffset) : ""; | |
var t = [], | |
n = new f(this, !0); | |
return d(n, function(e) { | |
(3 == e.nodeType || 4 == e.nodeType) && t.push(e.data) | |
}), n.detach(), t.join("") | |
}, | |
compareNode: function(e) { | |
C(this); | |
var t = e.parentNode, | |
n = j(e); | |
if (!t) throw new N("NOT_FOUND_ERR"); | |
var i = this.comparePoint(t, n), | |
o = this.comparePoint(t, n + 1); | |
return i < 0 ? 0 < o ? fe : he : 0 < o ? pe : me | |
}, | |
comparePoint: function(e, t) { | |
return C(this), _(e, "HIERARCHY_REQUEST_ERR"), b(e, this.startContainer), W(e, t, this.startContainer, this.startOffset) < 0 ? -1 : 0 < W(e, t, this.endContainer, this.endOffset) ? 1 : 0 | |
}, | |
createContextualFragment: re, | |
toHtml: function() { | |
return T(this) | |
}, | |
intersectsNode: function(e, t) { | |
if (C(this), Y(e) != l(this)) return !1; | |
var n = e.parentNode, | |
i = j(e); | |
if (!n) return !0; | |
var o = W(n, i, this.endContainer, this.endOffset), | |
s = W(n, i + 1, this.startContainer, this.startOffset); | |
return t ? o <= 0 && 0 <= s : o < 0 && 0 < s | |
}, | |
isPointInRange: function(e, t) { | |
return C(this), _(e, "HIERARCHY_REQUEST_ERR"), b(e, this.startContainer), 0 <= W(e, t, this.startContainer, this.startOffset) && W(e, t, this.endContainer, this.endOffset) <= 0 | |
}, | |
intersectsRange: function(e) { | |
return t(this, e, !1) | |
}, | |
intersectsOrTouchesRange: function(e) { | |
return t(this, e, !0) | |
}, | |
intersection: function(e) { | |
if (this.intersectsRange(e)) { | |
var t = W(this.startContainer, this.startOffset, e.startContainer, e.startOffset), | |
n = W(this.endContainer, this.endOffset, e.endContainer, e.endOffset), | |
i = this.cloneRange(); | |
return -1 == t && i.setStart(e.startContainer, e.startOffset), 1 == n && i.setEnd(e.endContainer, e.endOffset), i | |
} | |
return null | |
}, | |
union: function(e) { | |
if (this.intersectsOrTouchesRange(e)) { | |
var t = this.cloneRange(); | |
return -1 == W(e.startContainer, e.startOffset, this.startContainer, this.startOffset) && t.setStart(e.startContainer, e.startOffset), 1 == W(e.endContainer, e.endOffset, this.endContainer, this.endOffset) && t.setEnd(e.endContainer, e.endOffset), t | |
} | |
throw new N("Ranges do not intersect") | |
}, | |
containsNode: function(e, t) { | |
return t ? this.intersectsNode(e, !1) : this.compareNode(e) == me | |
}, | |
containsNodeContents: function(e) { | |
return 0 <= this.comparePoint(e, 0) && this.comparePoint(e, V(e)) <= 0 | |
}, | |
containsRange: function(e) { | |
var t = this.intersection(e); | |
return null !== t && e.equals(t) | |
}, | |
containsNodeText: function(e) { | |
var t = this.cloneRange(); | |
t.selectNode(e); | |
var n = t.getNodes([3]); | |
if (0 < n.length) { | |
t.setStart(n[0], 0); | |
var i = n.pop(); | |
return t.setEnd(i, i.length), this.containsRange(t) | |
} | |
return this.containsNodeContents(e) | |
}, | |
getNodes: function(e, t) { | |
return C(this), o(this, e, t) | |
}, | |
getDocument: function() { | |
return a(this) | |
}, | |
collapseBefore: function(e) { | |
this.setEndBefore(e), this.collapse(!1) | |
}, | |
collapseAfter: function(e) { | |
this.setStartAfter(e), this.collapse(!0) | |
}, | |
getBookmark: function(e) { | |
var t = a(this), | |
n = r.createRange(t); | |
e = e || L.getBody(t), n.selectNodeContents(e); | |
var i = this.intersection(n), | |
o = 0, | |
s = 0; | |
return i && (n.setEnd(i.startContainer, i.startOffset), s = (o = n.toString().length) + i.toString().length), { | |
start: o, | |
end: s, | |
containerNode: e | |
} | |
}, | |
moveToBookmark: function(e) { | |
var t = e.containerNode, | |
n = 0; | |
this.setStart(t, 0), this.collapse(!0); | |
for (var i, o, s, r, a = [t], l = !1, c = !1; !c && (i = a.pop());) | |
if (3 == i.nodeType) o = n + i.length, !l && e.start >= n && e.start <= o && (this.setStart(i, e.start - n), l = !0), l && e.end >= n && e.end <= o && (this.setEnd(i, e.end - n), c = !0), n = o; | |
else | |
for (s = (r = i.childNodes).length; s--;) a.push(r[s]) | |
}, | |
getName: function() { | |
return "DomRange" | |
}, | |
equals: function(e) { | |
return P.rangesEqual(this, e) | |
}, | |
isValid: function() { | |
return k(this) | |
}, | |
inspect: function() { | |
return e(this) | |
}, | |
detach: function() {} | |
}), E(P, M), I.extend(P, { | |
rangeProperties: ae, | |
RangeIterator: f, | |
copyComparisonConstants: D, | |
createPrototypeRange: E, | |
inspect: e, | |
toHtml: T, | |
getRangeDocument: a, | |
rangesEqual: function(e, t) { | |
return e.startContainer === t.startContainer && e.startOffset === t.startOffset && e.endContainer === t.endContainer && e.endOffset === t.endOffset | |
} | |
}), r.DomRange = P | |
}), I.createCoreModule("WrappedRange", ["DomRange"], function(u, h) { | |
var p, e, x = u.dom, | |
f = u.util, | |
k = x.DomPosition, | |
m = u.DomRange, | |
g = x.getBody, | |
v = x.getContentDocument, | |
C = x.isCharacterDataNode; | |
if (u.features.implementsDomRange && function() { | |
function i(e) { | |
for (var t, n = o.length; n--;) e[t = o[n]] = e.nativeRange[t]; | |
e.collapsed = e.startContainer === e.endContainer && e.startOffset === e.endOffset | |
} | |
function e(e, t, n, i, o) { | |
var s = e.startContainer !== t || e.startOffset != n, | |
r = e.endContainer !== i || e.endOffset != o, | |
a = !e.equals(e.nativeRange); | |
(s || r || a) && (e.setEnd(i, o), e.setStart(t, n)) | |
} | |
var t, n, o = m.rangeProperties; | |
p = function(e) { | |
if (!e) throw h.createError("WrappedRange: Range must be specified"); | |
this.nativeRange = e, i(this) | |
}, m.createPrototypeRange(p, e), (t = p.prototype).selectNode = function(e) { | |
this.nativeRange.selectNode(e), i(this) | |
}, t.cloneContents = function() { | |
return this.nativeRange.cloneContents() | |
}, t.surroundContents = function(e) { | |
this.nativeRange.surroundContents(e), i(this) | |
}, t.collapse = function(e) { | |
this.nativeRange.collapse(e), i(this) | |
}, t.cloneRange = function() { | |
return new p(this.nativeRange.cloneRange()) | |
}, t.refresh = function() { | |
i(this) | |
}, t.toString = function() { | |
return this.nativeRange.toString() | |
}; | |
var s = document.createTextNode("test"); | |
g(document).appendChild(s); | |
var r = document.createRange(); | |
r.setStart(s, 0), r.setEnd(s, 0); | |
try { | |
r.setStart(s, 1), t.setStart = function(e, t) { | |
this.nativeRange.setStart(e, t), i(this) | |
}, t.setEnd = function(e, t) { | |
this.nativeRange.setEnd(e, t), i(this) | |
}, n = function(t) { | |
return function(e) { | |
this.nativeRange[t](e), i(this) | |
} | |
} | |
} catch (y) { | |
t.setStart = function(e, t) { | |
try { | |
this.nativeRange.setStart(e, t) | |
} catch (p) { | |
this.nativeRange.setEnd(e, t), this.nativeRange.setStart(e, t) | |
} | |
i(this) | |
}, t.setEnd = function(e, t) { | |
try { | |
this.nativeRange.setEnd(e, t) | |
} catch (p) { | |
this.nativeRange.setStart(e, t), this.nativeRange.setEnd(e, t) | |
} | |
i(this) | |
}, n = function(t, n) { | |
return function(e) { | |
try { | |
this.nativeRange[t](e) | |
} catch (x) { | |
this.nativeRange[n](e), this.nativeRange[t](e) | |
} | |
i(this) | |
} | |
} | |
} | |
t.setStartBefore = n("setStartBefore", "setEndBefore"), t.setStartAfter = n("setStartAfter", "setEndAfter"), t.setEndBefore = n("setEndBefore", "setStartBefore"), t.setEndAfter = n("setEndAfter", "setStartAfter"), t.selectNodeContents = function(e) { | |
this.setStartAndEnd(e, 0, x.getNodeLength(e)) | |
}, r.selectNodeContents(s), r.setEnd(s, 3); | |
var a = document.createRange(); | |
a.selectNodeContents(s), a.setEnd(s, 4), a.setStart(s, 2), t.compareBoundaryPoints = -1 == r.compareBoundaryPoints(r.START_TO_END, a) && 1 == r.compareBoundaryPoints(r.END_TO_START, a) ? function(e, t) { | |
return e == (t = t.nativeRange || t).START_TO_END ? e = t.END_TO_START : e == t.END_TO_START && (e = t.START_TO_END), this.nativeRange.compareBoundaryPoints(e, t) | |
} : function(e, t) { | |
return this.nativeRange.compareBoundaryPoints(e, t.nativeRange || t) | |
}; | |
var l = document.createElement("div"); | |
l.innerHTML = "123"; | |
var c = l.firstChild, | |
d = g(document); | |
d.appendChild(l), r.setStart(c, 1), r.setEnd(c, 2), r.deleteContents(), "13" == c.data && (t.deleteContents = function() { | |
this.nativeRange.deleteContents(), i(this) | |
}, t.extractContents = function() { | |
var e = this.nativeRange.extractContents(); | |
return i(this), e | |
}), d.removeChild(l), d = null, f.isHostMethod(r, "createContextualFragment") && (t.createContextualFragment = function(e) { | |
return this.nativeRange.createContextualFragment(e) | |
}), g(document).removeChild(s), t.getName = function() { | |
return "WrappedRange" | |
}, u.WrappedRange = p, u.createNativeRange = function(e) { | |
return (e = v(e, h, "createNativeRange")).createRange() | |
} | |
}(), u.features.implementsTextRange) { | |
var o = function(e) { | |
var t = e.parentElement(), | |
n = e.duplicate(); | |
n.collapse(!0); | |
var i = n.parentElement(); | |
(n = e.duplicate()).collapse(!1); | |
var o = n.parentElement(), | |
s = i == o ? i : x.getCommonAncestor(i, o); | |
return s == t ? s : x.getCommonAncestor(t, s) | |
}, | |
s = function(e) { | |
return 0 == e.compareEndPoints("StartToEnd", e) | |
}, | |
r = function(e, t, n, i, o) { | |
var s = e.duplicate(); | |
s.collapse(n); | |
var r = s.parentElement(); | |
if (x.isOrIsAncestorOf(t, r) || (r = t), !r.canHaveHTML) { | |
var a = new k(r.parentNode, x.getNodeIndex(r)); | |
return { | |
boundaryPosition: a, | |
nodeInfo: { | |
nodeIndex: a.offset, | |
containerElement: a.node | |
} | |
} | |
} | |
var l = x.getDocument(r).createElement("span"); | |
l.parentNode && x.removeNode(l); | |
for (var c, d, u, h, p, f = n ? "StartToStart" : "StartToEnd", m = o && o.containerElement == r ? o.nodeIndex : 0, g = r.childNodes.length, v = g, y = v; y == g ? r.appendChild(l) : r.insertBefore(l, r.childNodes[y]), s.moveToElementText(l), 0 != (c = s.compareEndPoints(f, e)) && m != v;) { | |
if (-1 == c) { | |
if (v == m + 1) break; | |
m = y | |
} else v = v == m + 1 ? m : y; | |
y = Math.floor((m + v) / 2), r.removeChild(l) | |
} | |
if (p = l.nextSibling, -1 == c && p && C(p)) { | |
var b; | |
if (s.setEndPoint(n ? "EndToStart" : "EndToEnd", e), /[\r\n]/.test(p.data)) { | |
var w = s.duplicate(), | |
_ = w.text.replace(/\r\n/g, "\r").length; | |
for (b = w.moveStart("character", _); - 1 == (c = w.compareEndPoints("StartToEnd", w));) b++, w.moveStart("character", 1) | |
} else b = s.text.length; | |
h = new k(p, b) | |
} else d = (i || !n) && l.previousSibling, h = (u = (i || n) && l.nextSibling) && C(u) ? new k(u, 0) : d && C(d) ? new k(d, d.data.length) : new k(r, x.getNodeIndex(l)); | |
return x.removeNode(l), { | |
boundaryPosition: h, | |
nodeInfo: { | |
nodeIndex: y, | |
containerElement: r | |
} | |
} | |
}, | |
a = function(e, t) { | |
var n, i, o, s, r = e.offset, | |
a = x.getDocument(e.node), | |
l = g(a).createTextRange(), | |
c = C(e.node); | |
return c ? i = (n = e.node).parentNode : (n = r < (s = e.node.childNodes).length ? s[r] : null, i = e.node), (o = a.createElement("span")).innerHTML = "&#feff;", n ? i.insertBefore(o, n) : i.appendChild(o), l.moveToElementText(o), l.collapse(!t), i.removeChild(o), c && l[t ? "moveStart" : "moveEnd"]("character", r), l | |
}; | |
(e = function(e) { | |
this.textRange = e, this.refresh() | |
}).prototype = new m(document), e.prototype.refresh = function() { | |
var e, t, n, i = o(this.textRange); | |
s(this.textRange) ? t = e = r(this.textRange, i, !0, !0).boundaryPosition : (e = (n = r(this.textRange, i, !0, !1)).boundaryPosition, t = r(this.textRange, i, !1, !1, n.nodeInfo).boundaryPosition), this.setStart(e.node, e.offset), this.setEnd(t.node, t.offset) | |
}, e.prototype.getName = function() { | |
return "WrappedTextRange" | |
}, m.copyComparisonConstants(e); | |
var y = function(e) { | |
if (e.collapsed) return a(new k(e.startContainer, e.startOffset), !0); | |
var t = a(new k(e.startContainer, e.startOffset), !0), | |
n = a(new k(e.endContainer, e.endOffset), !1), | |
i = g(m.getRangeDocument(e)).createTextRange(); | |
return i.setEndPoint("StartToStart", t), i.setEndPoint("EndToEnd", n), i | |
}; | |
if (e.rangeToTextRange = y, e.prototype.toTextRange = function() { | |
return y(this) | |
}, u.WrappedTextRange = e, !u.features.implementsDomRange || u.config.preferTextRange) { | |
var t = Function("return this;")(); | |
"undefined" == typeof t.Range && (t.Range = e), u.createNativeRange = function(e) { | |
return e = v(e, h, "createNativeRange"), g(e).createTextRange() | |
}, u.WrappedRange = e | |
} | |
} | |
u.createRange = function(e) { | |
return e = v(e, h, "createRange"), new u.WrappedRange(u.createNativeRange(e)) | |
}, u.createRangyRange = function(e) { | |
return e = v(e, h, "createRangyRange"), new m(e) | |
}, f.createAliasForDeprecatedMethod(u, "createIframeRange", "createRange"), f.createAliasForDeprecatedMethod(u, "createIframeRangyRange", "createRangyRange"), u.addShimListener(function(e) { | |
var t = e.document; | |
"undefined" == typeof t.createRange && (t.createRange = function() { | |
return u.createRange(t) | |
}), t = e = null | |
}) | |
}), I.createCoreModule("WrappedSelection", ["DomRange", "WrappedRange"], function(u, l) { | |
function s(e) { | |
return "string" == typeof e ? /^backward(s)?$/i.test(e) : !!e | |
} | |
function o(e, t) { | |
if (e) { | |
if (D.isWindow(e)) return e; | |
if (e instanceof b) return e.win; | |
var n = D.getContentDocument(e, l, t); | |
return D.getWindow(n) | |
} | |
return window | |
} | |
function e(e) { | |
return o(e, "getWinSelection").getSelection() | |
} | |
function r(e) { | |
return o(e, "getDocSelection").document.selection | |
} | |
function h(e) { | |
var t = !1; | |
return e.anchorNode && (t = 1 == D.comparePoints(e.anchorNode, e.anchorOffset, e.focusNode, e.focusOffset)), t | |
} | |
function a(e, t, n) { | |
var i = n ? "end" : "start", | |
o = n ? "start" : "end"; | |
e.anchorNode = t[i + "Container"], e.anchorOffset = t[i + "Offset"], e.focusNode = t[o + "Container"], e.focusOffset = t[o + "Offset"] | |
} | |
function c(e) { | |
var t = e.nativeSelection; | |
e.anchorNode = t.anchorNode, e.anchorOffset = t.anchorOffset, e.focusNode = t.focusNode, e.focusOffset = t.focusOffset | |
} | |
function d(e) { | |
e.anchorNode = e.focusNode = null, e.anchorOffset = e.focusOffset = 0, e.rangeCount = 0, e.isCollapsed = !0, e._ranges.length = 0 | |
} | |
function p(e) { | |
var t; | |
return e instanceof O ? ((t = u.createNativeRange(e.getDocument())).setEnd(e.endContainer, e.endOffset), t.setStart(e.startContainer, e.startOffset)) : e instanceof M ? t = e.nativeRange : I.implementsDomRange && e instanceof D.getWindow(e.startContainer).Range && (t = e), t | |
} | |
function n(e) { | |
if (!e.length || 1 != e[0].nodeType) return !1; | |
for (var t = 1, n = e.length; t < n; ++t) | |
if (!D.isAncestorOf(e[0], e[t])) return !1; | |
return !0 | |
} | |
function f(e) { | |
var t = e.getNodes(); | |
if (!n(t)) throw l.createError("getSingleElementFromRange: range " + e.inspect() + " did not consist of a single element"); | |
return t[0] | |
} | |
function m(e) { | |
return !!e && "undefined" != typeof e.text | |
} | |
function g(e, t) { | |
var n = new M(t); | |
e._ranges = [n], a(e, n, !1), e.rangeCount = 1, e.isCollapsed = n.collapsed | |
} | |
function v(e) { | |
if (e._ranges.length = 0, "None" == e.docSelection.type) d(e); | |
else { | |
var t = e.docSelection.createRange(); | |
if (m(t)) g(e, t); | |
else { | |
e.rangeCount = t.length; | |
for (var n, i = N(t.item(0)), o = 0; o < e.rangeCount; ++o)(n = u.createRange(i)).selectNode(t.item(o)), e._ranges.push(n); | |
e.isCollapsed = 1 == e.rangeCount && e._ranges[0].collapsed, a(e, e._ranges[e.rangeCount - 1], !1) | |
} | |
} | |
} | |
function y(e, t) { | |
for (var n = e.docSelection.createRange(), i = f(t), o = N(n.item(0)), s = z(o).createControlRange(), r = 0, a = n.length; r < a; ++r) s.add(n.item(r)); | |
try { | |
s.add(i) | |
} catch (d) { | |
throw l.createError("addRange(): Element within the specified Range could not be added to control selection (does it have layout?)") | |
} | |
s.select(), v(e) | |
} | |
function b(e, t, n) { | |
this.nativeSelection = e, this.docSelection = t, this._ranges = [], this.win = n, this.refresh() | |
} | |
function w(e) { | |
e.win = e.anchorNode = e.focusNode = e._ranges = null, e.rangeCount = e.anchorOffset = e.focusOffset = 0, e.detached = !0 | |
} | |
function _(e, t) { | |
for (var n, i, o = te.length; o--;) | |
if (i = (n = te[o]).selection, "deleteAll" == t) w(i); | |
else if (n.win == e) return "delete" == t ? (te.splice(o, 1), !0) : i; | |
return "deleteAll" == t && (te.length = 0), null | |
} | |
function i(e, t) { | |
for (var n, i = N(t[0].startContainer), o = z(i).createControlRange(), s = 0, r = t.length; s < r; ++s) { | |
n = f(t[s]); | |
try { | |
o.add(n) | |
} catch (c) { | |
throw l.createError("setRanges(): Element within one of the specified Ranges could not be added to control selection (does it have layout?)") | |
} | |
} | |
o.select(), v(e) | |
} | |
function x(e, t) { | |
if (e.win.document != N(t)) throw new P("WRONG_DOCUMENT_ERR") | |
} | |
function t(i) { | |
return function(e, t) { | |
var n; | |
this.rangeCount ? (n = this.getRangeAt(0))["set" + (i ? "Start" : "End")](e, t) : (n = u.createRange(this.win.document)).setStartAndEnd(e, t), this.setSingleRange(n, this.isBackward()) | |
} | |
} | |
function k(e) { | |
var t = [], | |
n = new L(e.anchorNode, e.anchorOffset), | |
i = new L(e.focusNode, e.focusOffset), | |
o = "function" == typeof e.getName ? e.getName() : "Selection"; | |
if ("undefined" != typeof e.rangeCount) | |
for (var s = 0, r = e.rangeCount; s < r; ++s) t[s] = O.inspect(e.getRangeAt(s)); | |
return "[" + o + "(Ranges: " + t.join(", ") + ")(anchor: " + n.inspect() + ", focus: " + i.inspect() + "]" | |
} | |
u.config.checkSelectionRanges = !0; | |
var C, S, T = "boolean", | |
$ = "number", | |
D = u.dom, | |
A = u.util, | |
E = A.isHostMethod, | |
O = u.DomRange, | |
M = u.WrappedRange, | |
P = u.DOMException, | |
L = D.DomPosition, | |
I = u.features, | |
R = "Control", | |
N = D.getDocument, | |
z = D.getBody, | |
j = O.rangesEqual, | |
F = E(window, "getSelection"), | |
H = A.isHostObject(document, "selection"); | |
I.implementsWinGetSelection = F; | |
var W = (I.implementsDocSelection = H) && (!F || u.config.preferTextRange); | |
if (W) C = r, u.isSelectionValid = function(e) { | |
var t = o(e, "isSelectionValid").document, | |
n = t.selection; | |
return "None" != n.type || N(n.createRange().parentElement()) == t | |
}; | |
else { | |
if (!F) return l.fail("Neither document.selection or window.getSelection() detected."), !1; | |
C = e, u.isSelectionValid = function() { | |
return !0 | |
} | |
} | |
var B = (u.getNativeSelection = C)(); | |
if (!B) return l.fail("Native selection was null (possibly issue 138?)"), !1; | |
var U = u.createNativeRange(document), | |
V = z(document), | |
q = A.areHostProperties(B, ["anchorNode", "focusNode", "anchorOffset", "focusOffset"]); | |
I.selectionHasAnchorAndFocus = q; | |
var Y = E(B, "extend"); | |
I.selectionHasExtend = Y; | |
var G = typeof B.rangeCount == $; | |
I.selectionHasRangeCount = G; | |
var X = !1, | |
Z = !0, | |
J = Y ? function(e, t) { | |
var n = O.getRangeDocument(t), | |
i = u.createRange(n); | |
i.collapseToPoint(t.endContainer, t.endOffset), e.addRange(p(i)), e.extend(t.startContainer, t.startOffset) | |
} : null; | |
A.areHostMethods(B, ["addRange", "getRangeAt", "removeAllRanges"]) && typeof B.rangeCount == $ && I.implementsDomRange && function() { | |
var e = window.getSelection(); | |
if (e) { | |
for (var t = e.rangeCount, n = 1 < t, i = [], o = h(e), s = 0; s < t; ++s) i[s] = e.getRangeAt(s); | |
var r = D.createTestElement(document, "", !1), | |
a = r.appendChild(document.createTextNode("\xa0\xa0\xa0")), | |
l = document.createRange(); | |
if (l.setStart(a, 1), l.collapse(!0), e.removeAllRanges(), e.addRange(l), Z = 1 == e.rangeCount, e.removeAllRanges(), !n) { | |
var c = window.navigator.appVersion.match(/Chrome\/(.*?) /); | |
if (c && 36 <= parseInt(c[1])) X = !1; | |
else { | |
var d = l.cloneRange(); | |
l.setStart(a, 0), d.setEnd(a, 3), d.setStart(a, 2), e.addRange(l), e.addRange(d), X = 2 == e.rangeCount | |
} | |
} | |
for (D.removeNode(r), e.removeAllRanges(), s = 0; s < t; ++s) 0 == s && o ? J ? J(e, i[s]) : (u.warn("Rangy initialization: original selection was backwards but selection has been restored forwards because the browser does not support Selection.extend"), e.addRange(i[s])) : e.addRange(i[s]) | |
} | |
}(), I.selectionSupportsMultipleRanges = X, I.collapsedNonEditableSelectionsSupported = Z; | |
var K, Q, ee = !1; | |
V && E(V, "createControlRange") && (K = V.createControlRange(), A.areHostProperties(K, ["item", "add"]) && (ee = !0)), I.implementsControlRange = ee, S = q ? function(e) { | |
return e.anchorNode === e.focusNode && e.anchorOffset === e.focusOffset | |
} : function(e) { | |
return !!e.rangeCount && e.getRangeAt(e.rangeCount - 1).collapsed | |
}, E(B, "getRangeAt") ? Q = function(e, t) { | |
try { | |
return e.getRangeAt(t) | |
} catch (s) { | |
return null | |
} | |
} : q && (Q = function(e) { | |
var t = N(e.anchorNode), | |
n = u.createRange(t); | |
return n.setStartAndEnd(e.anchorNode, e.anchorOffset, e.focusNode, e.focusOffset), n.collapsed !== this.isCollapsed && n.setStartAndEnd(e.focusNode, e.focusOffset, e.anchorNode, e.anchorOffset), n | |
}), b.prototype = u.selectionPrototype; | |
var te = [], | |
ne = function(e) { | |
if (e && e instanceof b) return e.refresh(), e; | |
var t = _(e = o(e, "getNativeSelection")), | |
n = C(e), | |
i = H ? r(e) : null; | |
return t ? (t.nativeSelection = n, t.docSelection = i, t.refresh()) : (t = new b(n, i, e), te.push({ | |
win: e, | |
selection: t | |
})), t | |
}; | |
u.getSelection = ne, A.createAliasForDeprecatedMethod(u, "getIframeSelection", "getSelection"); | |
var ie, oe = b.prototype; | |
if (!W && q && A.areHostMethods(B, ["removeAllRanges", "addRange"])) { | |
oe.removeAllRanges = function() { | |
this.nativeSelection.removeAllRanges(), d(this) | |
}; | |
var se = function(e, t) { | |
J(e.nativeSelection, t), e.refresh() | |
}; | |
oe.addRange = G ? function(e, t) { | |
if (ee && H && this.docSelection.type == R) y(this, e); | |
else if (s(t) && Y) se(this, e); | |
else { | |
var n; | |
X ? n = this.rangeCount : (this.removeAllRanges(), n = 0); | |
var i = p(e).cloneRange(); | |
try { | |
this.nativeSelection.addRange(i) | |
} catch (h) {} | |
if (this.rangeCount = this.nativeSelection.rangeCount, this.rangeCount == n + 1) { | |
if (u.config.checkSelectionRanges) { | |
var o = Q(this.nativeSelection, this.rangeCount - 1); | |
o && !j(o, e) && (e = new M(o)) | |
} | |
this._ranges[this.rangeCount - 1] = e, a(this, e, re(this.nativeSelection)), this.isCollapsed = S(this) | |
} else this.refresh() | |
} | |
} : function(e, t) { | |
s(t) && Y ? se(this, e) : (this.nativeSelection.addRange(p(e)), this.refresh()) | |
}, oe.setRanges = function(e) { | |
if (ee && H && 1 < e.length) i(this, e); | |
else { | |
this.removeAllRanges(); | |
for (var t = 0, n = e.length; t < n; ++t) this.addRange(e[t]) | |
} | |
} | |
} else { | |
if (!(E(B, "empty") && E(U, "select") && ee && W)) return l.fail("No means of selecting a Range or TextRange was found"), !1; | |
oe.removeAllRanges = function() { | |
try { | |
if (this.docSelection.empty(), "None" != this.docSelection.type) { | |
var e; | |
if (this.anchorNode) e = N(this.anchorNode); | |
else if (this.docSelection.type == R) { | |
var t = this.docSelection.createRange(); | |
t.length && (e = N(t.item(0))) | |
} | |
if (e) z(e).createTextRange().select(), this.docSelection.empty() | |
} | |
} catch (o) {} | |
d(this) | |
}, oe.addRange = function(e) { | |
this.docSelection.type == R ? y(this, e) : (u.WrappedTextRange.rangeToTextRange(e).select(), this._ranges[0] = e, this.rangeCount = 1, this.isCollapsed = this._ranges[0].collapsed, a(this, e, !1)) | |
}, oe.setRanges = function(e) { | |
this.removeAllRanges(); | |
var t = e.length; | |
1 < t ? i(this, e) : t && this.addRange(e[0]) | |
} | |
} | |
if (oe.getRangeAt = function(e) { | |
if (e < 0 || e >= this.rangeCount) throw new P("INDEX_SIZE_ERR"); | |
return this._ranges[e].cloneRange() | |
}, W) ie = function(e) { | |
var t; | |
u.isSelectionValid(e.win) ? t = e.docSelection.createRange() : (t = z(e.win.document).createTextRange()).collapse(!0), e.docSelection.type == R ? v(e) : m(t) ? g(e, t) : d(e) | |
}; | |
else if (E(B, "getRangeAt") && typeof B.rangeCount == $) ie = function(e) { | |
if (ee && H && e.docSelection.type == R) v(e); | |
else if (e._ranges.length = e.rangeCount = e.nativeSelection.rangeCount, e.rangeCount) { | |
for (var t = 0, n = e.rangeCount; t < n; ++t) e._ranges[t] = new u.WrappedRange(e.nativeSelection.getRangeAt(t)); | |
a(e, e._ranges[e.rangeCount - 1], re(e.nativeSelection)), e.isCollapsed = S(e) | |
} else d(e) | |
}; | |
else { | |
if (!q || typeof B.isCollapsed != T || typeof U.collapsed != T || !I.implementsDomRange) return l.fail("No means of obtaining a Range or TextRange from the user's selection was found"), !1; | |
ie = function(e) { | |
var t, n = e.nativeSelection; | |
n.anchorNode ? (t = Q(n, 0), e._ranges = [t], e.rangeCount = 1, c(e), e.isCollapsed = S(e)) : d(e) | |
} | |
} | |
oe.refresh = function(e) { | |
var t = e ? this._ranges.slice(0) : null, | |
n = this.anchorNode, | |
i = this.anchorOffset; | |
if (ie(this), e) { | |
var o = t.length; | |
if (o != this._ranges.length) return !0; | |
if (this.anchorNode != n || this.anchorOffset != i) return !0; | |
for (; o--;) | |
if (!j(t[o], this._ranges[o])) return !0; | |
return !1 | |
} | |
}; | |
var re, ae = function(e, t) { | |
var n = e.getAllRanges(); | |
e.removeAllRanges(); | |
for (var i = 0, o = n.length; i < o; ++i) j(t, n[i]) || e.addRange(n[i]); | |
e.rangeCount || d(e) | |
}; | |
oe.removeRange = ee && H ? function(e) { | |
if (this.docSelection.type == R) { | |
for (var t = this.docSelection.createRange(), n = f(e), i = N(t.item(0)), o = z(i).createControlRange(), s = !1, r = 0, a = t.length; r < a; ++r) t.item(r) !== n || s ? o.add(t.item(r)) : s = !0; | |
o.select(), v(this) | |
} else ae(this, e) | |
} : function(e) { | |
ae(this, e) | |
}, !W && q && I.implementsDomRange ? (re = h, oe.isBackward = function() { | |
return re(this) | |
}) : re = oe.isBackward = function() { | |
return !1 | |
}, oe.isBackwards = oe.isBackward, oe.toString = function() { | |
for (var e = [], t = 0, n = this.rangeCount; t < n; ++t) e[t] = "" + this._ranges[t]; | |
return e.join("") | |
}, oe.collapse = function(e, t) { | |
x(this, e); | |
var n = u.createRange(e); | |
n.collapseToPoint(e, t), this.setSingleRange(n), this.isCollapsed = !0 | |
}, oe.collapseToStart = function() { | |
if (!this.rangeCount) throw new P("INVALID_STATE_ERR"); | |
var e = this._ranges[0]; | |
this.collapse(e.startContainer, e.startOffset) | |
}, oe.collapseToEnd = function() { | |
if (!this.rangeCount) throw new P("INVALID_STATE_ERR"); | |
var e = this._ranges[this.rangeCount - 1]; | |
this.collapse(e.endContainer, e.endOffset) | |
}, oe.selectAllChildren = function(e) { | |
x(this, e); | |
var t = u.createRange(e); | |
t.selectNodeContents(e), this.setSingleRange(t) | |
}, oe.deleteFromDocument = function() { | |
if (ee && H && this.docSelection.type == R) { | |
for (var e, t = this.docSelection.createRange(); t.length;) e = t.item(0), t.remove(e), D.removeNode(e); | |
this.refresh() | |
} else if (this.rangeCount) { | |
var n = this.getAllRanges(); | |
if (n.length) { | |
this.removeAllRanges(); | |
for (var i = 0, o = n.length; i < o; ++i) n[i].deleteContents(); | |
this.addRange(n[o - 1]) | |
} | |
} | |
}, oe.eachRange = function(e, t) { | |
for (var n = 0, i = this._ranges.length; n < i; ++n) | |
if (e(this.getRangeAt(n))) return t | |
}, oe.getAllRanges = function() { | |
var t = []; | |
return this.eachRange(function(e) { | |
t.push(e) | |
}), t | |
}, oe.setSingleRange = function(e, t) { | |
this.removeAllRanges(), this.addRange(e, t) | |
}, oe.callMethodOnEachRange = function(t, n) { | |
var i = []; | |
return this.eachRange(function(e) { | |
i.push(e[t].apply(e, n || [])) | |
}), i | |
}, oe.setStart = t(!0), oe.setEnd = t(!1), u.rangePrototype.select = function(e) { | |
ne(this.getDocument()).setSingleRange(this, e) | |
}, oe.changeEachRange = function(t) { | |
var n = [], | |
e = this.isBackward(); | |
this.eachRange(function(e) { | |
t(e), n.push(e) | |
}), this.removeAllRanges(), e && 1 == n.length ? this.addRange(n[0], "backward") : this.setRanges(n) | |
}, oe.containsNode = function(t, n) { | |
return this.eachRange(function(e) { | |
return e.containsNode(t, n) | |
}, !0) || !1 | |
}, oe.getBookmark = function(e) { | |
return { | |
backward: this.isBackward(), | |
rangeBookmarks: this.callMethodOnEachRange("getBookmark", [e]) | |
} | |
}, oe.moveToBookmark = function(e) { | |
for (var t, n, i = [], o = 0; t = e.rangeBookmarks[o++];)(n = u.createRange(this.win)).moveToBookmark(t), i.push(n); | |
e.backward ? this.setSingleRange(i[0], "backward") : this.setRanges(i) | |
}, oe.saveRanges = function() { | |
return { | |
backward: this.isBackward(), | |
ranges: this.callMethodOnEachRange("cloneRange") | |
} | |
}, oe.restoreRanges = function(e) { | |
this.removeAllRanges(); | |
for (var t, n = 0; t = e.ranges[n]; ++n) this.addRange(t, e.backward && 0 == n) | |
}, oe.toHtml = function() { | |
var t = []; | |
return this.eachRange(function(e) { | |
t.push(O.toHtml(e)) | |
}), t.join("") | |
}, I.implementsTextRange && (oe.getNativeTextRange = function() { | |
var e; | |
if (e = this.docSelection) { | |
var t = e.createRange(); | |
if (m(t)) return t; | |
throw l.createError("getNativeTextRange: selection is a control selection") | |
} | |
if (0 < this.rangeCount) return u.WrappedTextRange.rangeToTextRange(this.getRangeAt(0)); | |
throw l.createError("getNativeTextRange: selection contains no range") | |
}), oe.getName = function() { | |
return "WrappedSelection" | |
}, oe.inspect = function() { | |
return k(this) | |
}, oe.detach = function() { | |
_(this.win, "delete"), w(this) | |
}, b.detachAll = function() { | |
_(null, "deleteAll") | |
}, b.inspect = k, b.isDirectionBackward = s, u.Selection = b, u.selectionPrototype = oe, u.addShimListener(function(e) { | |
"undefined" == typeof e.getSelection && (e.getSelection = function() { | |
return ne(e) | |
}), e = null | |
}) | |
}); | |
var z = !1, | |
j = function() { | |
z || (z = !0, !I.initialized && I.config.autoInitialize && s()) | |
}; | |
return P && ("complete" == document.readyState ? j() : (l(document, "addEventListener") && document.addEventListener("DOMContentLoaded", j, !1), w(window, "load", j))), I | |
}, this), | |
function() { | |
function i(e, t) { | |
var n, i; | |
for (n in t) void 0 !== (i = t[n]) && (e[n] = i); | |
return e | |
} | |
var o = function() {}, | |
n = function(e, t) { | |
var n; | |
return n = t && t.hasOwnProperty("constructor") ? t.constructor : function() { | |
return e.apply(this, arguments) | |
}, o.prototype = e.prototype, n.prototype = new o, t && i(n.prototype, t), (n.prototype.constructor = n).__super__ = e.prototype, n | |
}, | |
s = { | |
version: "0.1.15", | |
Stack: function() { | |
this.commands = [], this.stackPosition = -1, this.savePosition = -1 | |
} | |
}; | |
i(s.Stack.prototype, { | |
execute: function(e) { | |
this._clearRedo(), e.execute(), this.commands.push(e), this.stackPosition++, this.changed() | |
}, | |
undo: function() { | |
this.commands[this.stackPosition].undo(), this.stackPosition--, this.changed() | |
}, | |
canUndo: function() { | |
return 0 <= this.stackPosition | |
}, | |
redo: function() { | |
this.stackPosition++, this.commands[this.stackPosition].redo(), this.changed() | |
}, | |
canRedo: function() { | |
return this.stackPosition < this.commands.length - 1 | |
}, | |
save: function() { | |
this.savePosition = this.stackPosition, this.changed() | |
}, | |
dirty: function() { | |
return this.stackPosition != this.savePosition | |
}, | |
_clearRedo: function() { | |
this.commands = this.commands.slice(0, this.stackPosition + 1) | |
}, | |
changed: function() {} | |
}), s.Command = function(e) { | |
this.name = e | |
}; | |
var e = new Error("override me!"); | |
i(s.Command.prototype, { | |
execute: function() { | |
throw e | |
}, | |
undo: function() { | |
throw e | |
}, | |
redo: function() { | |
this.execute() | |
} | |
}), s.Command.extend = function(e) { | |
var t = n(this, e); | |
return t.extend = s.Command.extend, t | |
}, "function" == typeof define && define.amd ? define(s) : "undefined" != typeof module && module.exports ? module.exports = s : this.Undo = s | |
}.call(this), | |
function(v, y) { | |
var e, t, s, i, n, o, r, a, l, b, c = v.rangy || null, | |
m = (v.Undo, v.Key = { | |
backspace: 8, | |
tab: 9, | |
enter: 13, | |
shift: 16, | |
ctrl: 17, | |
alt: 18, | |
pause: 19, | |
capsLock: 20, | |
escape: 27, | |
pageUp: 33, | |
pageDown: 34, | |
end: 35, | |
home: 36, | |
leftArrow: 37, | |
upArrow: 38, | |
rightArrow: 39, | |
downArrow: 40, | |
insert: 45, | |
"delete": 46, | |
0: 48, | |
1: 49, | |
2: 50, | |
3: 51, | |
4: 52, | |
5: 53, | |
6: 54, | |
7: 55, | |
8: 56, | |
9: 57, | |
a: 65, | |
b: 66, | |
c: 67, | |
d: 68, | |
e: 69, | |
f: 70, | |
g: 71, | |
h: 72, | |
i: 73, | |
j: 74, | |
k: 75, | |
l: 76, | |
m: 77, | |
n: 78, | |
o: 79, | |
p: 80, | |
q: 81, | |
r: 82, | |
s: 83, | |
t: 84, | |
u: 85, | |
v: 86, | |
w: 87, | |
x: 88, | |
y: 89, | |
z: 90, | |
leftWindow: 91, | |
rightWindowKey: 92, | |
select: 93, | |
numpad0: 96, | |
numpad1: 97, | |
numpad2: 98, | |
numpad3: 99, | |
numpad4: 100, | |
numpad5: 101, | |
numpad6: 102, | |
numpad7: 103, | |
numpad8: 104, | |
numpad9: 105, | |
multiply: 106, | |
add: 107, | |
subtract: 109, | |
decimalPoint: 110, | |
divide: 111, | |
f1: 112, | |
f2: 113, | |
f3: 114, | |
f4: 115, | |
f5: 116, | |
f6: 117, | |
f7: 118, | |
f8: 119, | |
f9: 120, | |
f10: 121, | |
f11: 122, | |
f12: 123, | |
numLock: 144, | |
scrollLock: 145, | |
semiColon: 186, | |
equalSign: 187, | |
comma: 188, | |
dash: 189, | |
period: 190, | |
forwardSlash: 191, | |
graveAccent: 192, | |
openBracket: 219, | |
backSlash: 220, | |
closeBracket: 221, | |
singleQuote: 222 | |
}), | |
d = ((b = function(e) { | |
var t, n, i, o = this, | |
s = w.deepExtend({}, b.defaultSettings), | |
r = this.settings = w.deepExtend(s, e), | |
a = new b.Cache, | |
l = new b.Selection, | |
c = new b.Action(this), | |
d = new b.Cursor(this), | |
u = new b.Undoable(this); | |
for (i in s) s.hasOwnProperty(i) && "object" != typeof s[i] && s.hasOwnProperty(i) && r.element.getAttribute("data-medium-" + m) && ("false" !== (n = r.element.getAttribute("data-medium-" + m)).toLowerCase() && "true" !== n.toLowerCase() || (n = "true" === n.toLowerCase()), r[i] = n); | |
if (r.modifiers) | |
for (i in r.modifiers) r.modifiers.hasOwnProperty(i) && "undefined" != typeof m[i] && (r.modifiers[m[i]] = r.modifiers[i]); | |
if (r.keyContext) | |
for (i in r.keyContext) r.keyContext.hasOwnProperty(i) && "undefined" != typeof m[i] && (r.keyContext[m[i]] = r.keyContext[i]); | |
(t = r.element).contentEditable = !0, t.className += " " + r.cssClasses.editor + " " + r.cssClasses.editor + "-" + r.mode, r.tags = r.tags || {}, r.tags.outerLevel && (r.tags.outerLevel = r.tags.outerLevel.concat([r.tags.paragraph, r.tags.horizontalRule])), this.settings = r, ((this.element = t).medium = this).action = c, this.cache = a, this.cursor = d, this.utils = w, this.selection = l, o.clean(), o.placeholders(), c.preserveElementFocus(), this.dirty = !1, this.undoable = u, this.makeUndoable = u.makeUndoable, r.drag && (o.drag = new b.Drag(o), o.drag.setup()), c.setup(), a.initialized = !0, this.makeUndoable(!0) | |
}).prototype = { | |
placeholders: function() { | |
if (v.getComputedStyle) { | |
var e = this.settings, | |
t = this.placeholder || (this.placeholder = y.createElement("div")), | |
n = this.element, | |
i = t.style, | |
o = v.getComputedStyle(n, null), | |
s = function(e) { | |
return o.getPropertyValue(e) | |
}, | |
r = w.text(n), | |
a = this.cursor, | |
l = n.children.length, | |
c = b.activeElement === n; | |
if (n.placeholder = t, !c && r.length < 1 && l < 2) { | |
if (n.placeHolderActive) return; | |
n.innerHTML.match("<" + e.tags.paragraph) || (n.innerHTML = ""), 0 < e.placeholder.length && (t.setup || (t.setup = !0, i.background = s("background"), i.backgroundColor = s("background-color"), i.fontSize = s("font-size"), i.color = o.color, i.marginTop = s("margin-top"), i.marginBottom = s("margin-bottom"), i.marginLeft = s("margin-left"), i.marginRight = s("margin-right"), i.paddingTop = s("padding-top"), i.paddingBottom = s("padding-bottom"), i.paddingLeft = s("padding-left"), i.paddingRight = s("padding-right"), i.borderTopWidth = s("border-top-width"), i.borderTopColor = s("border-top-color"), i.borderTopStyle = s("border-top-style"), i.borderBottomWidth = s("border-bottom-width"), i.borderBottomColor = s("border-bottom-color"), i.borderBottomStyle = s("border-bottom-style"), i.borderLeftWidth = s("border-left-width"), i.borderLeftColor = s("border-left-color"), i.borderLeftStyle = s("border-left-style"), i.borderRightWidth = s("border-right-width"), i.borderRightColor = s("border-right-color"), i.borderRightStyle = s("border-right-style"), t.className = e.cssClasses.placeholder + " " + e.cssClasses.placeholder + "-" + e.mode, t.innerHTML = "<div>" + e.placeholder + "</div>", n.parentNode.insertBefore(t, n)), n.className += " " + e.cssClasses.clear, i.display = "", i.minHeight = n.clientHeight + "px", i.minWidth = n.clientWidth + "px", e.mode !== b.inlineMode && e.mode !== b.inlineRichMode && (this.setupContents(), 0 === l && n.firstChild && a.set(this, 0, n.firstChild))), n.placeHolderActive = !0 | |
} else n.placeHolderActive && (n.placeHolderActive = !1, i.display = "none", n.className = w.trim(n.className.replace(e.cssClasses.clear, "")), this.setupContents()) | |
} | |
}, | |
clean: function(e) { | |
var a, l, c, t = this.settings, | |
d = t.cssClasses.placeholder, | |
u = (t.attributes || {}).remove || [], | |
n = t.tags || {}, | |
h = n.outerLevel || null, | |
p = n.innerLevel || null, | |
f = {}, | |
m = {}, | |
g = (n.paragraph || "").toUpperCase(); | |
if (this.html, e = e || t.element, t.mode === b.inlineRichMode && (h = t.tags.innerLevel), null !== h) | |
for (c = 0; c < h.length; c++) f[h[c].toUpperCase()] = !0; | |
if (null !== p) | |
for (c = 0; c < p.length; c++) m[p[c].toUpperCase()] = !0; | |
w.traverseAll(e, { | |
element: function(e, t, n, i) { | |
var o, s = e.nodeName, | |
r = !0; | |
for (c = 0; c < u.length; c++) a = u[c], e.hasAttribute(a) && ((o = e.getAttribute(a)) === d || o.match("medium-") || "class" !== a || e.removeAttribute(a)); | |
if ((null !== h || null !== p) && (1 === n && f[s] !== undefined ? r = !1 : 1 < n && m[s] !== undefined && (r = !1), r)) | |
if ("block" === v.getComputedStyle(e, null).getPropertyValue("display")) { | |
if (0 < g.length && g !== s && w.changeTag(e, g), 1 < n) | |
for (; i.childNodes.length > t;) i.parentNode.insertBefore(i.lastChild, i.nextSibling) | |
} else switch (s) { | |
case "BR": | |
if (e === e.parentNode.lastChild) { | |
if (e === e.parentNode.firstChild) break; | |
(l = y.createTextNode("")).innerHTML = " ", e.parentNode.insertBefore(l, e); | |
break | |
} | |
default: | |
for (; null !== e.firstChild;) e.parentNode.insertBefore(e.firstChild, e); | |
w.detachNode(e) | |
} | |
} | |
}) | |
}, | |
insertHtml: function(e, t, n) { | |
var i = new b.Html(this, e).insert(this.settings.beforeInsertHtml), | |
o = i[i.length - 1]; | |
switch (!0 === n && w.triggerEvent(this.element, "change"), t && t.apply(i), o.nodeName) { | |
case "UL": | |
case "OL": | |
case "DL": | |
if (null !== o.lastChild) { | |
this.cursor.moveCursorToEnd(o.lastChild); | |
break | |
} | |
default: | |
this.cursor.moveCursorToEnd(o) | |
} | |
return this | |
}, | |
addTag: function(e, t, n, i) { | |
if (this.settings.beforeAddTag(e, t, n, i)) return null; | |
var o, s = y.createElement(e); | |
return void 0 !== n && !1 === n && (s.contentEditable = !1), 0 == s.innerHTML.length && (s.innerHTML = " "), i && i.nextSibling ? (i.parentNode.insertBefore(s, i.nextSibling), o = i.nextSibling) : (this.element.appendChild(s), o = this.lastChild()), t && (this.cache.focusedElement = o, this.cursor.set(this, 0, o)), s | |
}, | |
invokeElement: function(e, t, n) { | |
var i = this.settings, | |
o = t.remove || []; | |
switch (t = t || {}, i.mode) { | |
case b.inlineMode: | |
case b.partialMode: | |
return this | |
} | |
return 0 < o.length && (w.arrayContains(i, "class") || o.push("class")), new b.Element(this, e, t).invoke(this.settings.beforeInvokeElement), !0 === n && w.triggerEvent(this.element, "change"), this | |
}, | |
value: function(e) { | |
return void 0 === e ? this.element.innerHTML : (this.element.innerHTML = e, this.clean(), this.placeholders(), this.makeUndoable(), this) | |
}, | |
focus: function() { | |
return this.element.focus(), this | |
}, | |
select: function() { | |
return w.selectNode(b.activeElement = this.element), this | |
}, | |
isActive: function() { | |
return b.activeElement === this.element | |
}, | |
setupContents: function() { | |
var e, t = this.element, | |
n = t.children, | |
i = t.childNodes, | |
o = this.settings; | |
return !o.tags.paragraph || 0 < n.length || o.mode === b.inlineMode || o.mode === b.inlineRichMode ? b.Utilities : (0 < i.length ? (e = y.createElement(o.tags.paragraph), t.innerHTML.match("^[&]nbsp[;]") && (t.innerHTML = t.innerHTML.substring(6, t.innerHTML.length - 1)), e.innerHTML = t.innerHTML, t.innerHTML = "", t.appendChild(e)) : ((e = y.createElement(o.tags.paragraph)).innerHTML = " ", t.appendChild(e), this.cursor.set(this, 0, t.firstChild)), this) | |
}, | |
destroy: function() { | |
var e = this.element, | |
t = this.settings, | |
n = this.placeholder || null; | |
null !== n && n.setup && null !== n.parentNode && (n.parentNode.removeChild(n), delete e.placeHolderActive), e.removeAttribute("contenteditable"), e.className = w.trim(e.className.replace(t.cssClasses.editor, "").replace(t.cssClasses.clear, "").replace(t.cssClasses.editor + "-" + t.mode, "")), this.action.destroy(), this.settings.drag && this.drag.destroy() | |
}, | |
clear: function() { | |
this.element.innerHTML = "", this.placeholders() | |
}, | |
splitAtCaret: function() { | |
if (!this.isActive()) return null; | |
var e = (v.getSelection || y.selection)(), | |
t = e.focusOffset, | |
n = e.focusNode, | |
i = this.element, | |
o = y.createRange(), | |
s = y.createRange(); | |
return o.setStart(n, t), s.selectNodeContents(i), o.setEnd(s.endContainer, s.endOffset), o.extractContents() | |
}, | |
deleteSelection: function() { | |
if (this.isActive()) { | |
var e = c.getSelection(); | |
0 < e.rangeCount && e.getRangeAt(0).deleteContents() | |
} | |
}, | |
lastChild: function() { | |
return this.element.lastChild | |
}, | |
bold: function() { | |
switch (this.settings.mode) { | |
case b.partialMode: | |
case b.inlineMode: | |
return this | |
} | |
return new b.Element(this, "bold").setClean(!1).invoke(this.settings.beforeInvokeElement), this | |
}, | |
underline: function() { | |
switch (this.settings.mode) { | |
case b.partialMode: | |
case b.inlineMode: | |
return this | |
} | |
return new b.Element(this, "underline").setClean(!1).invoke(this.settings.beforeInvokeElement), this | |
}, | |
italicize: function() { | |
switch (this.settings.mode) { | |
case b.partialMode: | |
case b.inlineMode: | |
return this | |
} | |
return new b.Element(this, "italic").setClean(!1).invoke(this.settings.beforeInvokeElement), this | |
}, | |
quote: function() { | |
return this | |
}, | |
paste: function(e) { | |
var t, n = this.value().length, | |
i = this.settings, | |
o = this.selection, | |
s = this.element, | |
r = this, | |
a = function(e) { | |
0 < (e = e || "").length && (s.focus(), b.activeElement = s, o.restoreSelection(l), e = w.encodeHtml(e), t = e.length + n, 0 < i.maxLength && t > i.maxLength && (e = e.substring(0, i.maxLength - n)), i.mode !== b.inlineMode && (e = e.replace(/\n/g, "<br>")), new b.Html(r, e).setClean(!1).insert(i.beforeInsertHtml, !0), r.clean(), r.placeholders()) | |
}; | |
if (r.makeUndoable(), e !== undefined) a(e); | |
else if (i.pasteAsText) { | |
var l = o.saveSelection(); | |
w.pasteHook(this, a) | |
} else setTimeout(function() { | |
r.clean(), r.placeholders() | |
}, 20); | |
return !0 | |
}, | |
undo: function() { | |
var e = this.undoable.stack; | |
return e.canUndo() && e.undo(), this | |
}, | |
redo: function() { | |
var e = this.undoable.stack; | |
return e.canRedo() && e.redo(), this | |
} | |
}, b.inlineMode = "inline", b.partialMode = "partial", b.richMode = "rich", b.inlineRichMode = "inlineRich", b.Messages = { | |
pastHere: "Paste Here" | |
}, b.defaultSettings = { | |
element: null, | |
modifier: "auto", | |
placeholder: "", | |
autofocus: !1, | |
autoHR: !0, | |
mode: b.richMode, | |
maxLength: -1, | |
modifiers: { | |
b: "bold", | |
i: "italicize", | |
u: "underline" | |
}, | |
tags: { | |
"break": "br", | |
horizontalRule: "hr", | |
paragraph: "p", | |
outerLevel: ["pre", "blockquote", "figure"], | |
innerLevel: ["a", "b", "u", "i", "img", "strong"] | |
}, | |
cssClasses: { | |
editor: "Medium", | |
pasteHook: "Medium-paste-hook", | |
placeholder: "Medium-placeholder", | |
clear: "Medium-clear" | |
}, | |
attributes: { | |
remove: ["style", "class"] | |
}, | |
pasteAsText: !0, | |
beforeInvokeElement: function() {}, | |
beforeInsertHtml: function() {}, | |
maxLengthReached: function() {}, | |
beforeAddTag: function() {}, | |
onBlur: function() {}, | |
onFocus: function() {}, | |
keyContext: null, | |
drag: !1 | |
}, function(h, p) { | |
function f(e) { | |
return !e.hasOwnProperty("target") || "false" !== e.target.getAttribute("contenteditable") || (w.preventDefaultEvent(e), !1) | |
} | |
h.Action = function(e) { | |
this.medium = e, this.handledEvents = { | |
keydown: null, | |
keyup: null, | |
blur: null, | |
focus: null, | |
paste: null, | |
click: null | |
} | |
}, h.Action.prototype = { | |
setup: function() { | |
this.handleFocus().handleBlur().handleKeyDown().handleKeyUp().handlePaste().handleClick() | |
}, | |
destroy: function() { | |
var e = this.medium.element; | |
w.removeEvent(e, "focus", this.handledEvents.focus).removeEvent(e, "blur", this.handledEvents.blur).removeEvent(e, "keydown", this.handledEvents.keydown).removeEvent(e, "keyup", this.handledEvents.keyup).removeEvent(e, "paste", this.handledEvents.paste).removeEvent(e, "click", this.handledEvents.click) | |
}, | |
handleFocus: function() { | |
var t = this.medium, | |
n = t.element; | |
return w.addEvent(n, "focus", this.handledEvents.focus = function(e) { | |
if (!f(e = e || p.event)) return !1; | |
h.activeElement = n, t.cache.originalVal = e.target.textContent, t.settings.onFocus(e), t.placeholders() | |
}), this | |
}, | |
handleBlur: function() { | |
var t = this.medium, | |
n = t.element; | |
return w.addEvent(n, "blur", this.handledEvents.blur = function(e) { | |
e = e || p.event, h.activeElement === n && (h.activeElement = null), t.settings.onBlur(e), t.placeholders() | |
}), this | |
}, | |
handleKeyDown: function() { | |
var a = this, | |
l = this.medium, | |
c = l.settings, | |
d = l.cache, | |
u = l.element; | |
return w.addEvent(u, "keydown", this.handledEvents.keydown = function(n) { | |
if (!f(n = n || p.event)) return !1; | |
var i = !0; | |
if (229 !== n.keyCode) { | |
if (w.isCommand(c, n, function() { | |
d.cmd = !0 | |
}, function() { | |
d.cmd = !1 | |
}), w.isShift(n, function() { | |
d.shift = !0 | |
}, function() { | |
d.shift = !1 | |
}), w.isModifier(c, n, function(e) { | |
if (d.cmd) { | |
if (c.mode === h.inlineMode || c.mode === h.partialMode) return w.preventDefaultEvent(n), !1; | |
var t = null; | |
return t = "function" == typeof e ? e : l[e], !1 !== (i = t.call(l, n)) && i !== l || (w.preventDefaultEvent(n), w.stopPropagation(n)), !0 | |
} | |
return !1 | |
}), -1 !== c.maxLength) { | |
var e = w.text(u).length, | |
t = !1, | |
o = p.getSelection(), | |
s = w.isSpecial(n), | |
r = w.isNavigational(n); | |
if (o && (t = !o.isCollapsed), s || r) return !0; | |
if (e >= c.maxLength && !t) return c.maxLengthReached(u), w.preventDefaultEvent(n), !1 | |
} | |
switch (n.keyCode) { | |
case m.enter: | |
!1 === a.enterKey(n) && w.preventDefaultEvent(n); | |
break; | |
case m.escape: | |
!1 === a.escKey(n) && w.preventDefaultEvent(n); | |
break; | |
case m.backspace: | |
case m["delete"]: | |
a.backspaceOrDeleteKey(n) | |
} | |
return i | |
} | |
}), this | |
}, | |
handleKeyUp: function() { | |
var i = this, | |
o = this.medium, | |
s = o.settings, | |
r = o.cache, | |
a = o.cursor, | |
e = o.element; | |
return w.addEvent(e, "keyup", this.handledEvents.keyup = function(e) { | |
if (!f(e = e || p.event)) return !1; | |
var t; | |
if (w.isCommand(s, e, function() { | |
r.cmd = !1 | |
}, function() { | |
r.cmd = !0 | |
}), o.clean(), o.placeholders(), null !== s.keyContext && (t = s.keyContext[e.keyCode])) { | |
var n = a.parent(); | |
n && t.call(o, e, n) | |
} | |
i.preserveElementFocus() | |
}), this | |
}, | |
handlePaste: function() { | |
var t, n, i, o, s = this.medium, | |
e = s.element; | |
return w.addEvent(e, "paste", this.handledEvents.paste = function(e) { | |
if (!f(e = e || p.event)) return !1; | |
if (t = 0, w.preventDefaultEvent(e), (i = e.clipboardData) && i.getData) | |
for (o = i.types, n = o.length, t = 0; t < n; t++) switch (o[t]) { | |
case "text/plain": | |
return s.paste(i.getData("text/plain")) | |
} | |
s.paste() | |
}), this | |
}, | |
handleClick: function() { | |
var e = this.medium, | |
t = e.element, | |
n = e.cursor; | |
return w.addEvent(t, "click", this.handledEvents.click = function(e) { | |
f(e) || n.caretToAfter(e.target) | |
}), this | |
}, | |
escKey: function(e) { | |
var t = this.medium, | |
n = (t.element, t.settings), | |
i = t.cache; | |
if (n.mode === h.inlineMode || n.mode === h.inlineRichMode) return e.target.textContent = i.originalVal, n.element.blur ? n.element.blur() : n.element.onblur && n.element.onblur(), !1 | |
}, | |
enterKey: function(e) { | |
var t = this.medium, | |
n = t.element, | |
i = t.settings, | |
o = t.cache, | |
s = t.cursor; | |
if (i.mode === h.inlineMode || i.mode === h.inlineRichMode) return i.element.blur ? i.element.blur() : i.element.onblur && i.element.onblur(), !1; | |
if (o.shift) { | |
if (i.tags["break"]) return t.addTag(i.tags["break"], !0), !1 | |
} else { | |
var r, a, l = w.atCaret(t) || {}, | |
c = n.children, | |
d = l === n.lastChild ? n.lastChild : null; | |
d && d !== n.firstChild && i.autoHR && i.mode !== h.partialMode && i.tags.horizontalRule && (w.preventDefaultEvent(e), (r = "" === w.text(d) && d.nodeName.toLowerCase() === i.tags.paragraph) && 2 <= c.length && c[c.length - 2].nodeName.toLowerCase() === i.tags.horizontalRule && (r = !1), r && (t.addTag(i.tags.horizontalRule, !1, !0, l), l = l.nextSibling), null !== (a = t.addTag(i.tags.paragraph, !0, null, l)) && (a.innerHTML = "", s.set(t, 0, a))) | |
} | |
return !0 | |
}, | |
backspaceOrDeleteKey: function(e) { | |
var t = this.medium, | |
n = t.cursor, | |
i = t.settings, | |
o = t.element; | |
if ((i.onBackspaceOrDelete === undefined || !i.onBackspaceOrDelete.call(t, e, o)) && null !== o.lastChild) { | |
var s = o.lastChild, | |
r = s.previousSibling, | |
a = c.getSelection().anchorNode; | |
s && i.tags.horizontalRule && s.nodeName.toLocaleLowerCase() === i.tags.horizontalRule ? o.removeChild(s) : s && r && w.text(s).length < 1 && r.nodeName.toLowerCase() === i.tags.horizontalRule && s.nodeName.toLowerCase() === i.tags.paragraph ? (o.removeChild(s), o.removeChild(r)) : 1 === o.childNodes.length && s && !w.text(s).length ? (w.preventDefaultEvent(e), t.setupContents()) : a && a === o && (t.deleteSelection(), t.setupContents(), n.set(t, 0, o.firstChild)) | |
} | |
}, | |
preserveElementFocus: function() { | |
var e = p.getSelection ? p.getSelection().anchorNode : document.activeElement; | |
if (e) { | |
var t, n = this.medium, | |
i = n.cache, | |
o = n.element, | |
s = n.settings, | |
r = e.parentNode, | |
a = o.children, | |
l = r !== i.focusedElement, | |
c = 0; | |
for (r === s.element && (r = e), t = 0; t < a.length; t++) | |
if (r === a[t]) { | |
c = t; | |
break | |
} | |
l && (i.focusedElement = r, i.focusedElementIndex = c) | |
} | |
} | |
} | |
}(b, v), b.Cache = function() { | |
this.initialized = !1, this.cmd = !1, this.focusedElement = null, this.originalVal = null | |
}, (e = b).Cursor = function(e) { | |
this.medium = e | |
}, e.Cursor.prototype = { | |
set: function(e, t) { | |
var n; | |
if (y.createRange) { | |
var i = v.getSelection(), | |
o = this.medium.lastChild(), | |
s = w.text(o).length - 1, | |
r = t || o, | |
a = null != e ? e : s; | |
(n = y.createRange()).setStart(r, a), n.collapse(!0), i.removeAllRanges(), i.addRange(n) | |
} else(n = y.body.createTextRange()).moveToElementText(t), n.collapse(!1), n.select() | |
}, | |
moveCursorToEnd: function(e) { | |
var t = c.getSelection(), | |
n = c.createRange(); | |
n.setStartAfter(e), n.setEnd(e, e.length || e.childNodes.length), t.removeAllRanges(), t.addRange(n) | |
}, | |
moveCursorToAfter: function(e) { | |
var t = c.getSelection(); | |
if (t.rangeCount) { | |
var n = t.getRangeAt(0); | |
n.collapse(!1), n.collapseAfter(e), t.setSingleRange(n) | |
} | |
}, | |
parent: function() { | |
var e = null; | |
return v.getSelection ? e = 1 === (e = v.getSelection().getRangeAt(0).commonAncestorContainer).nodeType ? e : e.parentNode : y.selection && (e = y.selection.createRange().parentElement()), "SPAN" == e.tagName && (e = e.parentNode), e | |
}, | |
caretToBeginning: function(e) { | |
this.set(0, e) | |
}, | |
caretToEnd: function(e) { | |
this.moveCursorToEnd(e) | |
}, | |
caretToAfter: function(e) { | |
this.moveCursorToAfter(e) | |
} | |
}, (t = b).Drag = function(e) { | |
this.medium = e; | |
var n = this, | |
t = this.iconSrc.replace(/[{][{]([a-zA-Z]+)[}][}]/g, function(e, t) { | |
return n.hasOwnProperty(t) ? n[t] : e | |
}), | |
i = this.icon = y.createElement("img"); | |
i.className = this.buttonClass, i.setAttribute("contenteditable", "false"), i.setAttribute("src", t), this.hide(), this.element = null, this.protectedElement = null, this.handledEvents = { | |
dragstart: null, | |
dragend: null, | |
mouseover: null, | |
mouseout: null, | |
mousemove: null | |
} | |
}, t.Drag.prototype = { | |
elementClass: "Medium-focused", | |
buttonClass: "Medium-drag", | |
iconSrc: 'data:image/svg+xml;utf8,<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="21.424px" height="21.424px" viewBox="0 0 21.424 21.424" style="enable-background:new 0 0 21.424 21.424;" xml:space="preserve">\t<g>\t\t<g>\t\t\t<path style="fill:{{iconColor}};" d="M13.616,17.709L13.616,17.709h0.781l-3.686,3.715l-3.685-3.715h0.781l0,0H13.616z M13.616,17.709 M14.007,17.709 M12.555,19.566 M8.87,19.566 M7.418,17.709 M7.809,17.709 M10.712,17.709"/>\t\t\t<path style="fill:{{iconColor}};" d="M13.616,3.715L13.616,3.715h0.781L10.712,0L7.027,3.715h0.781l0,0H13.616z M13.616,3.715 M14.007,3.715 M12.555,1.858 M8.87,1.858 M7.418,3.715 M7.809,3.715 M10.712,3.715"/>\t\t\t<path style="fill:{{iconColor}};" d="M3.716,13.616L3.716,13.616v0.781L0,10.712l3.716-3.685v0.781l0,0V13.616z M3.716,13.616 M3.716,14.007 M1.858,12.555 M1.858,8.87 M3.716,7.417 M3.716,7.808 M3.716,10.712"/>\t\t\t<path style="fill:{{iconColor}};" d="M17.709,13.616L17.709,13.616v0.781l3.715-3.685l-3.715-3.685v0.781l0,0V13.616z M17.709,13.616 M17.709,14.007 M19.566,12.555 M19.566,8.87 M17.709,7.417 M17.709,7.808 M17.709,10.712"/>\t\t</g>\t\t<path style="fill-rule:evenodd;clip-rule:evenodd;fill:{{iconColor}};" d="M10.712,6.608c2.267,0,4.104,1.838,4.104,4.104 c0,2.266-1.837,4.104-4.104,4.104c-2.266,0-4.104-1.837-4.104-4.104C6.608,8.446,8.446,6.608,10.712,6.608L10.712,6.608z M10.712,7.515c-1.765,0-3.196,1.432-3.196,3.197s1.432,3.197,3.196,3.197c1.766,0,3.197-1.432,3.197-3.197 S12.478,7.515,10.712,7.515z"/>\t</g></svg>', | |
iconColor: "#231F20", | |
setup: function() { | |
return this.handleDragstart().handleDragend().handleMouseover().handleMouseout().handleMousemove(), this | |
}, | |
destroy: function() { | |
return w.removeEvent(this.icon, "dragstart", this.handledEvents.dragstart).removeEvent(this.icon, "dragend", this.handledEvents.dragend).removeEvent(this.icon, "mouseover", this.handledEvents.mouseover).removeEvent(this.icon, "mouseout", this.handledEvents.mouseout).removeEvent(this.medium.element, "mousemove", this.handledEvents.mousemove), this | |
}, | |
hide: function() { | |
return w.hide(this.icon), this | |
}, | |
handleDragstart: function() { | |
var t = this; | |
return w.addEvent(this.icon, "dragstart", this.handledEvents.dragstart = function(e) { | |
null === t.protectedElement && (e = e || v.event, t.protectedElement = w.detachNode(t.element), t.icon.style.opacity = 0) | |
}), this | |
}, | |
handleDragend: function() { | |
var e = this; | |
return w.addEvent(this.icon, "dragend", this.handledEvents.dragend = y.body.ondragend = function() { | |
null !== e.protectedElement && setTimeout(function() { | |
e.cleanCanvas(), e.protectedElement = null | |
}, 1) | |
}), this | |
}, | |
handleMouseover: function() { | |
var t = this; | |
return w.addEvent(this.icon, "mouseover", this.handledEvents.mouseover = function(e) { | |
null === t.protectedElement && w.stopPropagation(e).addClass(t.element, t.elementClass) | |
}), this | |
}, | |
handleMouseout: function() { | |
var t = this; | |
return w.addEvent(this.icon, "mouseout", this.handledEvents.mouseout = function(e) { | |
null === t.protectedElement && w.stopPropagation(e).removeClass(t.element, t.elementClass) | |
}), this | |
}, | |
handleMousemove: function() { | |
var n = this; | |
return w.addEvent(this.medium.element, "mousemove", this.handledEvents.mousemove = function(e) { | |
var t = (e = e || v.event).target || {}; | |
"false" === t.getAttribute("contenteditable") && n.show(t) | |
}), this | |
}, | |
show: function(e) { | |
if (e !== this.icon || null !== this.protectedElement) { | |
this.element = e; | |
var t = this.icon.style, | |
n = e.offsetLeft, | |
i = e.offsetTop; | |
return e.dragIcon = this.icon, e.parentNode.appendChild(this.icon), t.opacity = 1, t.left = n + "px", t.top = i + "px", w.show(this.icon), this | |
} | |
}, | |
cleanCanvas: function() { | |
var e, t = !1, | |
n = y.getElementsByClassName(this.buttonClass); | |
for (this.icon.style.opacity = 1; 0 < n.length;) w.isVisible(e = n[0]) && (t || (e.parentNode.insertBefore(this.element, e), t = !0), w.detachNode(e)); | |
return w.detachNode(this.icon), this | |
} | |
}, (s = b).Element = function(e, t, n) { | |
switch (this.medium = e, this.element = e.element, t.toLowerCase()) { | |
case "bold": | |
this.tagName = "b"; | |
break; | |
case "italic": | |
this.tagName = "i"; | |
break; | |
case "underline": | |
this.tagName = "u"; | |
break; | |
default: | |
this.tagName = t | |
} | |
this.attributes = n || {}, this.clean = !0 | |
}, s.Element.prototype = { | |
invoke: function(e) { | |
if (s.activeElement === this.element) { | |
e && e.apply(this); | |
var t, n, i = this.attributes, | |
o = this.tagName.toLowerCase(); | |
i.className !== undefined ? (n = (i.className.split[" "] || [i.className]).shift(), delete i.className) : n = "medium-" + o, t = c.createClassApplier(n, { | |
elementTagName: o, | |
elementAttributes: this.attributes | |
}), this.medium.makeUndoable(), t.toggleSelection(v), this.clean && (this.medium.clean(), this.medium.placeholders()) | |
} | |
}, | |
setClean: function(e) { | |
return this.clean = e, this | |
} | |
}, (i = b).Html = function(e, t) { | |
this.html = t, this.medium = e, this.clean = !0, this.injector = new i.Injector | |
}, i.Html.prototype = { | |
insert: function(e, t) { | |
if (i.activeElement !== this.medium.element) return null; | |
e && e.apply(this); | |
var n = this.injector.inject(this.html, t); | |
return this.clean && (this.medium.clean(), this.medium.placeholders()), this.medium.makeUndoable(), n | |
}, | |
setClean: function(e) { | |
return this.clean = e, this | |
} | |
}, (n = b).Injector = function() {}, n.Injector.prototype = { | |
inject: function(e) { | |
var t, n = [], | |
i = !1; | |
if ("string" == typeof e) { | |
var o = y.createElement("div"); | |
o.innerHTML = e, t = o.childNodes, i = !0 | |
} else t = e; | |
this.insertHTML('<span id="Medium-wedge"></span>'); | |
var s = y.getElementById("Medium-wedge"), | |
r = s.parentNode, | |
a = 0; | |
if (s.removeAttribute("id"), i) { | |
for (; a < t.length;) n.push(t[a]), a++; | |
for (; 0 < t.length;) r.insertBefore(t[0], s) | |
} else n.push(t), r.insertBefore(t, s); | |
return r.removeChild(s), s = null, n | |
}, | |
insertHTML: function(e, t) { | |
var n, i; | |
if (v.getSelection) { | |
if ((n = v.getSelection()).getRangeAt && n.rangeCount) { | |
(i = n.getRangeAt(0)).deleteContents(); | |
var o = y.createElement("div"); | |
o.innerHTML = e; | |
for (var s, r, a = y.createDocumentFragment(); s = o.firstChild;) r = a.appendChild(s); | |
var l = a.firstChild; | |
i.insertNode(a), r && ((i = i.cloneRange()).setStartAfter(r), t ? i.setStartBefore(l) : i.collapse(!0), n.removeAllRanges(), n.addRange(i)) | |
} | |
} else if ((n = y.selection) && "Control" != n.type) { | |
var c = n.createRange(); | |
c.collapse(!0), n.createRange().pasteHTML(e), t && ((i = n.createRange()).setEndPoint("StartToStart", c), i.select()) | |
} | |
} | |
}, (o = b).Selection = function() {}, o.Selection.prototype = { | |
saveSelection: function() { | |
if (v.getSelection) { | |
var e = v.getSelection(); | |
if (0 < e.rangeCount) return e.getRangeAt(0) | |
} else if (y.selection && y.selection.createRange) return y.selection.createRange(); | |
return null | |
}, | |
restoreSelection: function(e) { | |
if (e) | |
if (v.getSelection) { | |
var t = v.getSelection(); | |
t.removeAllRanges(), t.addRange(e) | |
} else y.selection && e.select && e.select() | |
} | |
}, (r = b).Toolbar = function(e, t) { | |
this.medium = e; | |
var n = y.createElement("div"); | |
n.innerHTML = this.html, this.buttons = t, this.element = n.children[0], y.body.appendChild(this.element), this.active = !1, this.busy = !0, this.handledEvents = { | |
scroll: null, | |
mouseup: null, | |
keyup: null | |
} | |
}, r.Toolbar.prototype = { | |
fixedClass: "Medium-toolbar-fixed", | |
showClass: "Medium-toolbar-show", | |
hideClass: "Medium-toolbar-hide", | |
html: '<div class="Medium-toolbar">\t\t\t\t<div class="Medium-tail-outer">\t\t\t\t\t<div class="Medium-tail-inner"></div>\t\t\t\t</div>\t\t\t\t<div id="Medium-buttons"></div>\t\t\t\t<table id="Medium-options">\t\t\t\t\t<tbody>\t\t\t\t\t\t<tr>\t\t\t\t\t\t</tr>\t\t\t\t\t</tbody>\t\t\t\t</table>\t\t\t</div>', | |
setup: function() { | |
this.handleScroll().handleMouseup().handleKeyup() | |
}, | |
destroy: function() { | |
w.removeEvent(v, "scroll", this.handledEvents.scroll).removeEvent(y, "mouseup", this.handledEvents.mouseup).removeEvent(y, "keyup", this.handledEvents.keyup) | |
}, | |
handleScroll: function() { | |
var e = this; | |
return w.addEvent(v, "scroll", this.handledEvents.scroll = function() { | |
e.active && e.goToSelection() | |
}), this | |
}, | |
handleMouseup: function() { | |
var e = this; | |
return w.addEvent(y, "mouseup", this.handledEvents.mouseup = function() { | |
r.activeElement !== e.medium.element || e.busy || e.goToSelection() | |
}), this | |
}, | |
handleKeyup: function() { | |
var e = this; | |
return w.addEvent(y, "keyup", this.handledEvents.keyup = function() { | |
r.activeElement !== e.medium.element || e.busy || e.goToSelection() | |
}), this | |
}, | |
goToSelection: function() { | |
var e = this.getHighlighted(), | |
t = e.boundary.top - 5, | |
n = this.element, | |
i = n.style; | |
0 < v.scrollTop ? w.addClass(n, this.fixedClass) : w.removeClass(n, this.fixedClass), null !== e && (e.range.startOffset !== e.range.endOffset || e.text ? (w.removeClass(n, this.hideClass).removeClass(n, this.showClass), i.opacity = .01, w.addClass(n, this.showClass), i.opacity = 1, i.top = t - 65 + "px", i.left = e.boundary.left + e.boundary.width / 2 - n.clientWidth / 2 + "px", this.active = !0) : (w.removeClass(n, this.showClass).addClass(n, this.hideClass), this.active = !1)) | |
}, | |
getHighlighted: function() { | |
var e = v.getSelection(), | |
t = !!e.anchorNode && e.getRangeAt(0); | |
return t ? { | |
selection: e, | |
range: t, | |
text: w.trim(t.toString()), | |
boundary: t.getBoundingClientRect() | |
} : null | |
} | |
}, b.Undoable = function(n) { | |
var t, i, o = this, | |
s = n.settings.element, | |
r = new Undo.Stack, | |
a = Undo.Command.extend({ | |
constructor: function(e, t) { | |
this.oldValue = e, this.newValue = t | |
}, | |
execute: function() {}, | |
undo: function() { | |
s.innerHTML = this.oldValue, n.canUndo = r.canUndo(), n.canRedo = r.canRedo(), n.dirty = r.dirty() | |
}, | |
redo: function() { | |
s.innerHTML = this.newValue, n.canUndo = r.canUndo(), n.canRedo = r.canRedo(), n.dirty = r.dirty() | |
} | |
}), | |
l = function(e) { | |
var t = s.innerHTML; | |
e ? (i = s.innerHTML, r.execute(new a(i, i))) : t != i && (o.movingThroughStack || (r.execute(new a(i, t)), i = t, n.dirty = r.dirty()), w.triggerEvent(n.settings.element, "change")) | |
}; | |
this.medium = n, this.timer = t, this.stack = r, this.makeUndoable = l, this.EditCommand = a, this.movingThroughStack = !1, w.addEvent(s, "keyup", function(e) { | |
e.ctrlKey || e.keyCode === m.z ? w.preventDefaultEvent(e) : (clearTimeout(t), t = setTimeout(function() { | |
l() | |
}, 250)) | |
}).addEvent(s, "keydown", function(e) { | |
e.ctrlKey && e.keyCode === m.z ? (w.preventDefaultEvent(e), o.movingThroughStack = !0, e.shiftKey ? r.canRedo() && r.redo() : r.canUndo() && r.undo()) : o.movingThroughStack = !1 | |
}) | |
}, b.Utilities = { | |
isCommand: function(e, t, n, i) { | |
return "ctrl" === e.modifier && t.ctrlKey || "cmd" === e.modifier && t.metaKey || "auto" === e.modifier && (t.ctrlKey || t.metaKey) ? n.call() : i.call() | |
}, | |
isShift: function(e, t, n) { | |
return e.shiftKey ? t.call() : n.call() | |
}, | |
isModifier: function(e, t, n) { | |
var i = e.modifiers[t.keyCode]; | |
return !!i && n.call(null, i) | |
}, | |
special: (l = {}, l[m.backspace] = !0, l[m.shift] = !0, l[m.ctrl] = !0, l[m.alt] = !0, l[m["delete"]] = !0, l[m.cmd] = !0, l), | |
isSpecial: function(e) { | |
return "undefined" != typeof b.Utilities.special[e.keyCode] | |
}, | |
navigational: (a = {}, a[m.upArrow] = !0, a[m.downArrow] = !0, a[m.leftArrow] = !0, a[m.rightArrow] = !0, a), | |
isNavigational: function(e) { | |
return "undefined" != typeof b.Utilities.navigational[e.keyCode] | |
}, | |
addEvents: function(e, t, n) { | |
for (var i, o = 0, s = t.split(" "), r = s.length, a = b.Utilities; o < r; o++) 0 < (i = s[o]).length && a.addEvent(e, i, n); | |
return b.Utilities | |
}, | |
addEvent: function u(e, t, n) { | |
return e.addEventListener ? e.addEventListener(t, n, !1) : e.attachEvent ? e.attachEvent("on" + t, n) : e["on" + t] = n, b.Utilities | |
}, | |
removeEvent: function h(e, t, n) { | |
return e.removeEventListener ? e.removeEventListener(t, n, !1) : e.detachEvent ? e.detachEvent("on" + t, n) : e["on" + t] = null, b.Utilities | |
}, | |
preventDefaultEvent: function(e) { | |
return e.preventDefault ? e.preventDefault() : e.returnValue = !1, b.Utilities | |
}, | |
stopPropagation: function(e) { | |
return (e = e || v.event).cancelBubble = !0, e.stopPropagation !== undefined && e.stopPropagation(), b.Utilities | |
}, | |
isEventSupported: function(e, t) { | |
t = "on" + t; | |
var n = y.createElement(e.tagName), | |
i = t in n; | |
return i || (n.setAttribute(t, "return;"), i = "function" == typeof n[t]), n = null, i | |
}, | |
triggerEvent: function(e, t) { | |
var n; | |
return y.createEvent ? ((n = y.createEvent("HTMLEvents")).initEvent(t, !0, !0), n.eventName = t, e.dispatchEvent(n)) : (n = y.createEventObject(), e.fireEvent("on" + t, n)), b.Utilities | |
}, | |
deepExtend: function(e, t) { | |
var n, i; | |
for (n in t) t.hasOwnProperty(n) && ((i = t[n]) !== undefined && null !== i && i.constructor !== undefined && i.constructor === Object ? (e[n] = e[n] || {}, b.Utilities.deepExtend(e[n], i)) : e[n] = i); | |
return e | |
}, | |
pasteHook: function(e, t) { | |
e.makeUndoable(); | |
var n, i, o, s, r = y.createElement("div"), | |
a = e.element, | |
l = e.settings, | |
c = y.body, | |
d = c.parentNode, | |
u = d.scrollTop, | |
h = d.scrollLeft; | |
return r.className = l.cssClasses.pasteHook, r.setAttribute("contenteditable", !0), c.appendChild(r), w.selectNode(r), d.scrollTop = u, d.scrollLeft = h, setTimeout(function() { | |
s = w.text(r), a.focus(), 0 < l.maxLength && (n = w.text(a), i = n.length, o = i + s.length, i < o && (s = s.substring(0, l.maxLength - i))), w.detachNode(r), d.scrollTop = u, d.scrollLeft = h, t(s) | |
}, 0), b.Utilities | |
}, | |
traverseAll: function(e, t, n) { | |
var i, o = e.childNodes, | |
s = o.length, | |
r = 0; | |
if (n = n || 1, t = t || {}, 0 < s) | |
for (; r < s; r++) { | |
switch ((i = o[r]).nodeType) { | |
case 1: | |
b.Utilities.traverseAll(i, t, n + 1), t.element !== undefined && t.element(i, r, n, e); | |
break; | |
case 3: | |
t.fragment !== undefined && t.fragment(i, r, n, e) | |
} | |
s = o.length, i === e.lastChild && (r = s) | |
} | |
return b.Utilities | |
}, | |
trim: function(e) { | |
return e.replace(/^[\s]+|\s+$/g, "") | |
}, | |
arrayContains: function(e, t) { | |
for (var n = e.length; n--;) | |
if (e[n] === t) return !0; | |
return !1 | |
}, | |
addClass: function(e, t) { | |
return e.classList ? e.classList.add(t) : e.className += " " + t, b.Utilities | |
}, | |
removeClass: function(e, t) { | |
return e.classList ? e.classList.remove(t) : e.className = e.className.replace(new RegExp("(^|\b)" + t.split(" ").join("|") + "(\b|$)", "gi"), " "), b.Utilities | |
}, | |
hasClass: function(e, t) { | |
return e.classList ? e.classList.contains(t) : new RegExp("(^| )" + t + "( |$)", "gi").test(e.className) | |
}, | |
isHidden: function(e) { | |
return 0 === e.offsetWidth || 0 === e.offsetHeight | |
}, | |
isVisible: function(e) { | |
return 0 !== e.offsetWidth || 0 !== e.offsetHeight | |
}, | |
encodeHtml: function(e) { | |
return y.createElement("a").appendChild(y.createTextNode(e)).parentNode.innerHTML | |
}, | |
text: function(e, t) { | |
return t !== undefined ? (null === e || (e.textContent !== undefined ? e.textContent = t : e.innerText = t), this) : null === e ? this : e.innerText !== undefined ? w.trim(e.innerText) : e.textContent !== undefined ? w.trim(e.textContent) : e.data !== undefined ? w.trim(e.data) : "" | |
}, | |
changeTag: function(e, t) { | |
var n, i, o = y.createElement(t); | |
for (n = e.firstChild; n;) i = n.nextSibling, o.appendChild(n), n = i; | |
return e.parentNode.insertBefore(o, e), e.parentNode.removeChild(e), o | |
}, | |
detachNode: function(e) { | |
return null !== e.parentNode && e.parentNode.removeChild(e), this | |
}, | |
selectNode: function(e) { | |
var t, n; | |
return e.focus(), y.body.createTextRange ? ((t = y.body.createTextRange()).moveToElementText(e), t.select()) : v.getSelection && (n = v.getSelection(), (t = y.createRange()).selectNodeContents(e), n.removeAllRanges(), n.addRange(t)), this | |
}, | |
baseAtCaret: function(e) { | |
if (!e.isActive()) return null; | |
var t = v.getSelection ? v.getSelection() : document.selection; | |
if (t.rangeCount) { | |
var n = t.getRangeAt(0), | |
i = n.endContainer; | |
switch (i.nodeType) { | |
case 3: | |
if (i.data && i.data.length != n.endOffset) return !1 | |
} | |
return i | |
} | |
return null | |
}, | |
atCaret: function(e) { | |
var t = this.baseAtCaret(e) || {}, | |
n = e.element; | |
if (!1 === t) return null; | |
for (; t && t.parentNode !== n;) t = t.parentNode; | |
return t && 1 == t.nodeType ? t : null | |
}, | |
hide: function(e) { | |
return e.style.display = "none", b.Utilities | |
}, | |
show: function(e) { | |
return e.style.display = "", b.Utilities | |
}, | |
hideAnim: function(e) { | |
return e.style.opacity = 1, b.Utilities | |
}, | |
showAnim: function(e) { | |
return e.style.opacity = .01, e.style.display = "", b.Utilities | |
}, | |
setWindow: function(e) { | |
return v = e, b.Utilities | |
}, | |
setDocument: function(e) { | |
return y = e, b.Utilities | |
} | |
}, c.rangePrototype.insertNodeAtEnd = function(e) { | |
var t = this.cloneRange(); | |
t.collapse(!1), t.insertNode(e), t.detach(), this.setEndAfter(e) | |
}, b), | |
w = d.Utilities; | |
"function" == typeof define && define.amd ? define(function() { | |
return d | |
}) : "undefined" != typeof module && module.exports ? module.exports = d : void 0 !== this && (this.Medium = d) | |
}.call(this, window, document), "function" != typeof Object.create && (Object.create = function(e) { | |
function t() {} | |
return t.prototype = e, new t | |
}), | |
function(r) { | |
var n = { | |
init: function(e, t) { | |
var n = this; | |
n.elem = t, n.$elem = r(t), n.imageSrc = n.$elem.data("zoom-image") ? n.$elem.data("zoom-image") : n.$elem.attr("src"), n.options = r.extend({}, r.fn.elevateZoom.options, e), n.options.tint && (n.options.lensColour = "none", n.options.lensOpacity = "1"), "inner" == n.options.zoomType && (n.options.showLens = !1), n.$elem.parent().removeAttr("title").removeAttr("alt"), n.zoomImage = n.imageSrc, n.refresh(1), r("#" + n.options.gallery + " a").click(function(e) { | |
return n.options.galleryActiveClass && (r("#" + n.options.gallery + " a").removeClass(n.options.galleryActiveClass), r(this).addClass(n.options.galleryActiveClass)), e.preventDefault(), r(this).data("zoom-image") ? n.zoomImagePre = r(this).data("zoom-image") : n.zoomImagePre = r(this).data("image"), n.swaptheimage(r(this).data("image"), n.zoomImagePre), !1 | |
}) | |
}, | |
refresh: function(e) { | |
var t = this; | |
setTimeout(function() { | |
t.fetch(t.imageSrc) | |
}, e || t.options.refresh) | |
}, | |
fetch: function(e) { | |
var t = this, | |
n = new Image; | |
n.onload = function() { | |
t.largeWidth = n.width, t.largeHeight = n.height, t.startZoom(), t.currentImage = t.imageSrc, t.options.onZoomedImageLoaded(t.$elem) | |
}, n.src = e | |
}, | |
startZoom: function() { | |
var n = this; | |
if (n.nzWidth = n.$elem.width(), n.nzHeight = n.$elem.height(), n.isWindowActive = !1, n.isLensActive = !1, n.isTintActive = !1, n.overWindow = !1, n.options.imageCrossfade && (n.zoomWrap = n.$elem.wrap('<div style="height:' + n.nzHeight + "px;width:" + n.nzWidth + 'px;" class="zoomWrapper" />'), n.$elem.css("position", "absolute")), n.zoomLock = 1, n.scrollingLock = !1, n.changeBgSize = !1, n.currentZoomLevel = n.options.zoomLevel, n.nzOffset = n.$elem.offset(), n.widthRatio = n.largeWidth / n.currentZoomLevel / n.nzWidth, n.heightRatio = n.largeHeight / n.currentZoomLevel / n.nzHeight, "window" == n.options.zoomType && (n.zoomWindowStyle = "overflow: hidden;background-position: 0px 0px;text-align:center;background-color: " + String(n.options.zoomWindowBgColour) + ";width: " + String(n.options.zoomWindowWidth) + "px;height: " + String(n.options.zoomWindowHeight) + "px;float: left;background-size: " + n.largeWidth / n.currentZoomLevel + "px " + n.largeHeight / n.currentZoomLevel + "px;display: none;z-index:100;border: " + String(n.options.borderSize) + "px solid " + n.options.borderColour + ";background-repeat: no-repeat;position: absolute;"), "inner" == n.options.zoomType) { | |
var e = n.$elem.css("border-left-width"); | |
n.zoomWindowStyle = "overflow: hidden;margin-left: " + String(e) + ";margin-top: " + String(e) + ";background-position: 0px 0px;width: " + String(n.nzWidth) + "px;height: " + String(n.nzHeight) + "px;float: left;display: none;cursor:" + n.options.cursor + ";px solid " + n.options.borderColour + ";background-repeat: no-repeat;position: absolute;" | |
} | |
"window" == n.options.zoomType && (lensHeight = n.nzHeight < n.options.zoomWindowWidth / n.widthRatio ? n.nzHeight : String(n.options.zoomWindowHeight / n.heightRatio), lensWidth = n.largeWidth < n.options.zoomWindowWidth ? n.nzWidth : n.options.zoomWindowWidth / n.widthRatio, n.lensStyle = "background-position: 0px 0px;width: " + String(n.options.zoomWindowWidth / n.widthRatio) + "px;height: " + String(n.options.zoomWindowHeight / n.heightRatio) + "px;float: right;display: none;overflow: hidden;z-index: 999;-webkit-transform: translateZ(0);opacity:" + n.options.lensOpacity + ";filter: alpha(opacity = " + 100 * n.options.lensOpacity + "); zoom:1;width:" + lensWidth + "px;height:" + lensHeight + "px;background-color:" + n.options.lensColour + ";cursor:" + n.options.cursor + ";border: " + n.options.lensBorderSize + "px solid " + n.options.lensBorderColour + ";background-repeat: no-repeat;position: absolute;"), n.tintStyle = "display: block;position: absolute;background-color: " + n.options.tintColour + ";filter:alpha(opacity=0);opacity: 0;width: " + n.nzWidth + "px;height: " + n.nzHeight + "px;", n.lensRound = "", "lens" == n.options.zoomType && (n.lensStyle = "background-position: 0px 0px;float: left;display: none;border: " + String(n.options.borderSize) + "px solid " + n.options.borderColour + ";width:" + String(n.options.lensSize) + "px;height:" + String(n.options.lensSize) + "px;background-repeat: no-repeat;position: absolute;"), "round" == n.options.lensShape && (n.lensRound = "border-top-left-radius: " + String(n.options.lensSize / 2 + n.options.borderSize) + "px;border-top-right-radius: " + String(n.options.lensSize / 2 + n.options.borderSize) + "px;border-bottom-left-radius: " + String(n.options.lensSize / 2 + n.options.borderSize) + "px;border-bottom-right-radius: " + String(n.options.lensSize / 2 + n.options.borderSize) + "px;"), n.zoomContainer = r('<div class="zoomContainer" style="-webkit-transform: translateZ(0);position:absolute;left:' + n.nzOffset.left + "px;top:" + n.nzOffset.top + "px;height:" + n.nzHeight + "px;width:" + n.nzWidth + 'px;"></div>'), r("body").append(n.zoomContainer), n.options.containLensZoom && "lens" == n.options.zoomType && n.zoomContainer.css("overflow", "hidden"), "inner" != n.options.zoomType && (n.zoomLens = r("<div class='zoomLens' style='" + n.lensStyle + n.lensRound + "'> </div>").appendTo(n.zoomContainer).click(function() { | |
n.$elem.trigger("click") | |
}), n.options.tint && (n.tintContainer = r("<div/>").addClass("tintContainer"), n.zoomTint = r("<div class='zoomTint' style='" + n.tintStyle + "'></div>"), n.zoomLens.wrap(n.tintContainer), n.zoomTintcss = n.zoomLens.after(n.zoomTint), n.zoomTintImage = r('<img style="position: absolute; left: 0px; top: 0px; max-width: none; width: ' + n.nzWidth + "px; height: " + n.nzHeight + 'px;" src="' + n.imageSrc + '">').appendTo(n.zoomLens).click(function() { | |
n.$elem.trigger("click") | |
}))), isNaN(n.options.zoomWindowPosition) ? n.zoomWindow = r("<div style='z-index:999;left:" + n.windowOffsetLeft + "px;top:" + n.windowOffsetTop + "px;" + n.zoomWindowStyle + "' class='zoomWindow'> </div>").appendTo("body").click(function() { | |
n.$elem.trigger("click") | |
}) : n.zoomWindow = r("<div style='z-index:999;left:" + n.windowOffsetLeft + "px;top:" + n.windowOffsetTop + "px;" + n.zoomWindowStyle + "' class='zoomWindow'> </div>").appendTo(n.zoomContainer).click(function() { | |
n.$elem.trigger("click") | |
}), n.zoomWindowContainer = r("<div/>").addClass("zoomWindowContainer").css("width", n.options.zoomWindowWidth), n.zoomWindow.wrap(n.zoomWindowContainer), "lens" == n.options.zoomType && n.zoomLens.css({ | |
backgroundImage: "url('" + n.imageSrc + "')" | |
}), "window" == n.options.zoomType && n.zoomWindow.css({ | |
backgroundImage: "url('" + n.imageSrc + "')" | |
}), "inner" == n.options.zoomType && n.zoomWindow.css({ | |
backgroundImage: "url('" + n.imageSrc + "')" | |
}), n.$elem.bind("touchmove", function(e) { | |
e.preventDefault(), n.setPosition(e.originalEvent.touches[0] || e.originalEvent.changedTouches[0]) | |
}), n.zoomContainer.bind("touchmove", function(e) { | |
"inner" == n.options.zoomType && n.showHideWindow("show"), e.preventDefault(), n.setPosition(e.originalEvent.touches[0] || e.originalEvent.changedTouches[0]) | |
}), n.zoomContainer.bind("touchend", function() { | |
n.showHideWindow("hide"), n.options.showLens && n.showHideLens("hide"), n.options.tint && "inner" != n.options.zoomType && n.showHideTint("hide") | |
}), n.$elem.bind("touchend", function() { | |
n.showHideWindow("hide"), n.options.showLens && n.showHideLens("hide"), n.options.tint && "inner" != n.options.zoomType && n.showHideTint("hide") | |
}), n.options.showLens && (n.zoomLens.bind("touchmove", function(e) { | |
e.preventDefault(), n.setPosition(e.originalEvent.touches[0] || e.originalEvent.changedTouches[0]) | |
}), n.zoomLens.bind("touchend", function() { | |
n.showHideWindow("hide"), n.options.showLens && n.showHideLens("hide"), n.options.tint && "inner" != n.options.zoomType && n.showHideTint("hide") | |
})), n.$elem.bind("mousemove", function(e) { | |
0 == n.overWindow && n.setElements("show"), n.lastX === e.clientX && n.lastY === e.clientY || (n.setPosition(e), n.currentLoc = e), n.lastX = e.clientX, n.lastY = e.clientY | |
}), n.zoomContainer.bind("mousemove", function(e) { | |
0 == n.overWindow && n.setElements("show"), n.lastX === e.clientX && n.lastY === e.clientY || (n.setPosition(e), n.currentLoc = e), n.lastX = e.clientX, n.lastY = e.clientY | |
}), "inner" != n.options.zoomType && n.zoomLens.bind("mousemove", function(e) { | |
n.lastX === e.clientX && n.lastY === e.clientY || (n.setPosition(e), n.currentLoc = e), n.lastX = e.clientX, n.lastY = e.clientY | |
}), n.options.tint && "inner" != n.options.zoomType && n.zoomTint.bind("mousemove", function(e) { | |
n.lastX === e.clientX && n.lastY === e.clientY || (n.setPosition(e), n.currentLoc = e), n.lastX = e.clientX, n.lastY = e.clientY | |
}), "inner" == n.options.zoomType && n.zoomWindow.bind("mousemove", function(e) { | |
n.lastX === e.clientX && n.lastY === e.clientY || (n.setPosition(e), n.currentLoc = e), n.lastX = e.clientX, n.lastY = e.clientY | |
}), n.zoomContainer.add(n.$elem).mouseenter(function() { | |
0 == n.overWindow && n.setElements("show") | |
}).mouseleave(function() { | |
n.scrollLock || n.setElements("hide") | |
}), "inner" != n.options.zoomType && n.zoomWindow.mouseenter(function() { | |
n.overWindow = !0, n.setElements("hide") | |
}).mouseleave(function() { | |
n.overWindow = !1 | |
}), n.minZoomLevel = n.options.minZoomLevel ? n.options.minZoomLevel : 2 * n.options.scrollZoomIncrement, n.options.scrollZoom && n.zoomContainer.add(n.$elem).bind("mousewheel DOMMouseScroll MozMousePixelScroll", function(e) { | |
n.scrollLock = !0, clearTimeout(r.data(this, "timer")), r.data(this, "timer", setTimeout(function() { | |
n.scrollLock = !1 | |
}, 250)); | |
var t = e.originalEvent.wheelDelta || -1 * e.originalEvent.detail; | |
return e.stopImmediatePropagation(), e.stopPropagation(), e.preventDefault(), 0 < t / 120 ? n.currentZoomLevel >= n.minZoomLevel && n.changeZoomLevel(n.currentZoomLevel - n.options.scrollZoomIncrement) : n.options.maxZoomLevel ? n.currentZoomLevel <= n.options.maxZoomLevel && n.changeZoomLevel(parseFloat(n.currentZoomLevel) + n.options.scrollZoomIncrement) : n.changeZoomLevel(parseFloat(n.currentZoomLevel) + n.options.scrollZoomIncrement), !1 | |
}) | |
}, | |
setElements: function(e) { | |
if (!this.options.zoomEnabled) return !1; | |
"show" == e && this.isWindowSet && ("inner" == this.options.zoomType && this.showHideWindow("show"), "window" == this.options.zoomType && this.showHideWindow("show"), this.options.showLens && this.showHideLens("show"), this.options.tint && "inner" != this.options.zoomType && this.showHideTint("show")), "hide" == e && ("window" == this.options.zoomType && this.showHideWindow("hide"), this.options.tint || this.showHideWindow("hide"), this.options.showLens && this.showHideLens("hide"), this.options.tint && this.showHideTint("hide")) | |
}, | |
setPosition: function(e) { | |
if (!this.options.zoomEnabled) return !1; | |
this.nzHeight = this.$elem.height(), this.nzWidth = this.$elem.width(), this.nzOffset = this.$elem.offset(), this.options.tint && "inner" != this.options.zoomType && (this.zoomTint.css({ | |
top: 0 | |
}), this.zoomTint.css({ | |
left: 0 | |
})), this.options.responsive && !this.options.scrollZoom && this.options.showLens && (lensHeight = this.nzHeight < this.options.zoomWindowWidth / this.widthRatio ? this.nzHeight : String(this.options.zoomWindowHeight / this.heightRatio), lensWidth = this.largeWidth < this.options.zoomWindowWidth ? this.nzWidth : this.options.zoomWindowWidth / this.widthRatio, this.widthRatio = this.largeWidth / this.nzWidth, this.heightRatio = this.largeHeight / this.nzHeight, "lens" != this.options.zoomType && (lensHeight = this.nzHeight < this.options.zoomWindowWidth / this.widthRatio ? this.nzHeight : String(this.options.zoomWindowHeight / this.heightRatio), lensWidth = this.options.zoomWindowWidth < this.options.zoomWindowWidth ? this.nzWidth : this.options.zoomWindowWidth / this.widthRatio, this.zoomLens.css("width", lensWidth), this.zoomLens.css("height", lensHeight), this.options.tint && (this.zoomTintImage.css("width", this.nzWidth), this.zoomTintImage.css("height", this.nzHeight))), "lens" == this.options.zoomType && this.zoomLens.css({ | |
width: String(this.options.lensSize) + "px", | |
height: String(this.options.lensSize) + "px" | |
})), this.zoomContainer.css({ | |
top: this.nzOffset.top | |
}), this.zoomContainer.css({ | |
left: this.nzOffset.left | |
}), this.mouseLeft = parseInt(e.pageX - this.nzOffset.left), this.mouseTop = parseInt(e.pageY - this.nzOffset.top), "window" == this.options.zoomType && (this.Etoppos = this.mouseTop < this.zoomLens.height() / 2, this.Eboppos = this.mouseTop > this.nzHeight - this.zoomLens.height() / 2 - 2 * this.options.lensBorderSize, this.Eloppos = this.mouseLeft < 0 + this.zoomLens.width() / 2, this.Eroppos = this.mouseLeft > this.nzWidth - this.zoomLens.width() / 2 - 2 * this.options.lensBorderSize), "inner" == this.options.zoomType && (this.Etoppos = this.mouseTop < this.nzHeight / 2 / this.heightRatio, this.Eboppos = this.mouseTop > this.nzHeight - this.nzHeight / 2 / this.heightRatio, this.Eloppos = this.mouseLeft < 0 + this.nzWidth / 2 / this.widthRatio, this.Eroppos = this.mouseLeft > this.nzWidth - this.nzWidth / 2 / this.widthRatio - 2 * this.options.lensBorderSize), this.mouseLeft <= 0 || this.mouseTop < 0 || this.mouseLeft > this.nzWidth || this.mouseTop > this.nzHeight ? this.setElements("hide") : (this.options.showLens && (this.lensLeftPos = String(this.mouseLeft - this.zoomLens.width() / 2), this.lensTopPos = String(this.mouseTop - this.zoomLens.height() / 2)), this.Etoppos && (this.lensTopPos = 0), this.Eloppos && (this.tintpos = this.lensLeftPos = this.windowLeftPos = 0), "window" == this.options.zoomType && (this.Eboppos && (this.lensTopPos = Math.max(this.nzHeight - this.zoomLens.height() - 2 * this.options.lensBorderSize, 0)), this.Eroppos && (this.lensLeftPos = this.nzWidth - this.zoomLens.width() - 2 * this.options.lensBorderSize)), "inner" == this.options.zoomType && (this.Eboppos && (this.lensTopPos = Math.max(this.nzHeight - 2 * this.options.lensBorderSize, 0)), this.Eroppos && (this.lensLeftPos = this.nzWidth - this.nzWidth - 2 * this.options.lensBorderSize)), "lens" == this.options.zoomType && (this.windowLeftPos = String(-1 * ((e.pageX - this.nzOffset.left) * this.widthRatio - this.zoomLens.width() / 2)), this.windowTopPos = String(-1 * ((e.pageY - this.nzOffset.top) * this.heightRatio - this.zoomLens.height() / 2)), this.zoomLens.css({ | |
backgroundPosition: this.windowLeftPos + "px " + this.windowTopPos + "px" | |
}), this.changeBgSize && (this.nzHeight > this.nzWidth ? ("lens" == this.options.zoomType && this.zoomLens.css({ | |
"background-size": this.largeWidth / this.newvalueheight + "px " + this.largeHeight / this.newvalueheight + "px" | |
}), this.zoomWindow.css({ | |
"background-size": this.largeWidth / this.newvalueheight + "px " + this.largeHeight / this.newvalueheight + "px" | |
})) : ("lens" == this.options.zoomType && this.zoomLens.css({ | |
"background-size": this.largeWidth / this.newvaluewidth + "px " + this.largeHeight / this.newvaluewidth + "px" | |
}), this.zoomWindow.css({ | |
"background-size": this.largeWidth / this.newvaluewidth + "px " + this.largeHeight / this.newvaluewidth + "px" | |
})), this.changeBgSize = !1), this.setWindowPostition(e)), this.options.tint && "inner" != this.options.zoomType && this.setTintPosition(e), "window" == this.options.zoomType && this.setWindowPostition(e), "inner" == this.options.zoomType && this.setWindowPostition(e), this.options.showLens && (this.fullwidth && "lens" != this.options.zoomType && (this.lensLeftPos = 0), this.zoomLens.css({ | |
left: this.lensLeftPos + "px", | |
top: this.lensTopPos + "px" | |
}))) | |
}, | |
showHideWindow: function(e) { | |
"show" != e || this.isWindowActive || (this.options.zoomWindowFadeIn ? this.zoomWindow.stop(!0, !0, !1).fadeIn(this.options.zoomWindowFadeIn) : this.zoomWindow.show(), this.isWindowActive = !0), "hide" == e && this.isWindowActive && (this.options.zoomWindowFadeOut ? this.zoomWindow.stop(!0, !0).fadeOut(this.options.zoomWindowFadeOut) : this.zoomWindow.hide(), this.isWindowActive = !1) | |
}, | |
showHideLens: function(e) { | |
"show" != e || this.isLensActive || (this.options.lensFadeIn ? this.zoomLens.stop(!0, !0, !1).fadeIn(this.options.lensFadeIn) : this.zoomLens.show(), this.isLensActive = !0), "hide" == e && this.isLensActive && (this.options.lensFadeOut ? this.zoomLens.stop(!0, !0).fadeOut(this.options.lensFadeOut) : this.zoomLens.hide(), this.isLensActive = !1) | |
}, | |
showHideTint: function(e) { | |
"show" != e || this.isTintActive || (this.options.zoomTintFadeIn ? this.zoomTint.css({ | |
opacity: this.options.tintOpacity | |
}).animate().stop(!0, !0).fadeIn("slow") : (this.zoomTint.css({ | |
opacity: this.options.tintOpacity | |
}).animate(), this.zoomTint.show()), this.isTintActive = !0), "hide" == e && this.isTintActive && (this.options.zoomTintFadeOut ? this.zoomTint.stop(!0, !0).fadeOut(this.options.zoomTintFadeOut) : this.zoomTint.hide(), this.isTintActive = !1) | |
}, | |
setLensPostition: function() {}, | |
setWindowPostition: function(e) { | |
var t = this; | |
if (isNaN(t.options.zoomWindowPosition)) t.externalContainer = r("#" + t.options.zoomWindowPosition), t.externalContainerWidth = t.externalContainer.width(), t.externalContainerHeight = t.externalContainer.height(), t.externalContainerOffset = t.externalContainer.offset(), t.windowOffsetTop = t.externalContainerOffset.top, t.windowOffsetLeft = t.externalContainerOffset.left; | |
else switch (t.options.zoomWindowPosition) { | |
case 1: | |
t.windowOffsetTop = t.options.zoomWindowOffety, t.windowOffsetLeft = +t.nzWidth; | |
break; | |
case 2: | |
t.options.zoomWindowHeight > t.nzHeight && (t.windowOffsetTop = -1 * (t.options.zoomWindowHeight / 2 - t.nzHeight / 2), t.windowOffsetLeft = t.nzWidth); | |
break; | |
case 3: | |
t.windowOffsetTop = t.nzHeight - t.zoomWindow.height() - 2 * t.options.borderSize, t.windowOffsetLeft = t.nzWidth; | |
break; | |
case 4: | |
t.windowOffsetTop = t.nzHeight, t.windowOffsetLeft = t.nzWidth; | |
break; | |
case 5: | |
t.windowOffsetTop = t.nzHeight, t.windowOffsetLeft = t.nzWidth - t.zoomWindow.width() - 2 * t.options.borderSize; | |
break; | |
case 6: | |
t.options.zoomWindowHeight > t.nzHeight && (t.windowOffsetTop = t.nzHeight, t.windowOffsetLeft = -1 * (t.options.zoomWindowWidth / 2 - t.nzWidth / 2 + 2 * t.options.borderSize)); | |
break; | |
case 7: | |
t.windowOffsetTop = t.nzHeight, t.windowOffsetLeft = 0; | |
break; | |
case 8: | |
t.windowOffsetTop = t.nzHeight, t.windowOffsetLeft = -1 * (t.zoomWindow.width() + 2 * t.options.borderSize); | |
break; | |
case 9: | |
t.windowOffsetTop = t.nzHeight - t.zoomWindow.height() - 2 * t.options.borderSize, t.windowOffsetLeft = -1 * (t.zoomWindow.width() + 2 * t.options.borderSize); | |
break; | |
case 10: | |
t.options.zoomWindowHeight > t.nzHeight && (t.windowOffsetTop = -1 * (t.options.zoomWindowHeight / 2 - t.nzHeight / 2), t.windowOffsetLeft = -1 * (t.zoomWindow.width() + 2 * t.options.borderSize)); | |
break; | |
case 11: | |
t.windowOffsetTop = t.options.zoomWindowOffety, t.windowOffsetLeft = -1 * (t.zoomWindow.width() + 2 * t.options.borderSize); | |
break; | |
case 12: | |
t.windowOffsetTop = -1 * (t.zoomWindow.height() + 2 * t.options.borderSize), t.windowOffsetLeft = -1 * (t.zoomWindow.width() + 2 * t.options.borderSize); | |
break; | |
case 13: | |
t.windowOffsetTop = -1 * (t.zoomWindow.height() + 2 * t.options.borderSize), t.windowOffsetLeft = 0; | |
break; | |
case 14: | |
t.options.zoomWindowHeight > t.nzHeight && (t.windowOffsetTop = -1 * (t.zoomWindow.height() + 2 * t.options.borderSize), t.windowOffsetLeft = -1 * (t.options.zoomWindowWidth / 2 - t.nzWidth / 2 + 2 * t.options.borderSize)); | |
break; | |
case 15: | |
t.windowOffsetTop = -1 * (t.zoomWindow.height() + 2 * t.options.borderSize), t.windowOffsetLeft = t.nzWidth - t.zoomWindow.width() - 2 * t.options.borderSize; | |
break; | |
case 16: | |
t.windowOffsetTop = -1 * (t.zoomWindow.height() + 2 * t.options.borderSize), t.windowOffsetLeft = t.nzWidth; | |
break; | |
default: | |
t.windowOffsetTop = t.options.zoomWindowOffety, t.windowOffsetLeft = t.nzWidth | |
} | |
t.isWindowSet = !0, t.windowOffsetTop += t.options.zoomWindowOffety, t.windowOffsetLeft += t.options.zoomWindowOffetx, t.zoomWindow.css({ | |
top: t.windowOffsetTop | |
}), t.zoomWindow.css({ | |
left: t.windowOffsetLeft | |
}), "inner" == t.options.zoomType && (t.zoomWindow.css({ | |
top: 0 | |
}), t.zoomWindow.css({ | |
left: 0 | |
})), t.windowLeftPos = String(-1 * ((e.pageX - t.nzOffset.left) * t.widthRatio - t.zoomWindow.width() / 2)), t.windowTopPos = String(-1 * ((e.pageY - t.nzOffset.top) * t.heightRatio - t.zoomWindow.height() / 2)), t.Etoppos && (t.windowTopPos = 0), t.Eloppos && (t.windowLeftPos = 0), t.Eboppos && (t.windowTopPos = -1 * (t.largeHeight / t.currentZoomLevel - t.zoomWindow.height())), t.Eroppos && (t.windowLeftPos = -1 * (t.largeWidth / t.currentZoomLevel - t.zoomWindow.width())), t.fullheight && (t.windowTopPos = 0), t.fullwidth && (t.windowLeftPos = 0), "window" != t.options.zoomType && "inner" != t.options.zoomType || (1 == t.zoomLock && (t.widthRatio <= 1 && (t.windowLeftPos = 0), t.heightRatio <= 1 && (t.windowTopPos = 0)), t.largeHeight < t.options.zoomWindowHeight && (t.windowTopPos = 0), t.largeWidth < t.options.zoomWindowWidth && (t.windowLeftPos = 0), t.options.easing ? (t.xp || (t.xp = 0), t.yp || (t.yp = 0), t.loop || (t.loop = setInterval(function() { | |
t.xp += (t.windowLeftPos - t.xp) / t.options.easingAmount, t.yp += (t.windowTopPos - t.yp) / t.options.easingAmount, t.scrollingLock ? (clearInterval(t.loop), t.xp = t.windowLeftPos, t.yp = t.windowTopPos, t.xp = -1 * ((e.pageX - t.nzOffset.left) * t.widthRatio - t.zoomWindow.width() / 2), t.yp = -1 * ((e.pageY - t.nzOffset.top) * t.heightRatio - t.zoomWindow.height() / 2), t.changeBgSize && (t.nzHeight > t.nzWidth ? ("lens" == t.options.zoomType && t.zoomLens.css({ | |
"background-size": t.largeWidth / t.newvalueheight + "px " + t.largeHeight / t.newvalueheight + "px" | |
}), t.zoomWindow.css({ | |
"background-size": t.largeWidth / t.newvalueheight + "px " + t.largeHeight / t.newvalueheight + "px" | |
})) : ("lens" != t.options.zoomType && t.zoomLens.css({ | |
"background-size": t.largeWidth / t.newvaluewidth + "px " + t.largeHeight / t.newvalueheight + "px" | |
}), t.zoomWindow.css({ | |
"background-size": t.largeWidth / t.newvaluewidth + "px " + t.largeHeight / t.newvaluewidth + "px" | |
})), t.changeBgSize = !1), t.zoomWindow.css({ | |
backgroundPosition: t.windowLeftPos + "px " + t.windowTopPos + "px" | |
}), t.scrollingLock = !1, t.loop = !1) : (t.changeBgSize && (t.nzHeight > t.nzWidth ? ("lens" == t.options.zoomType && t.zoomLens.css({ | |
"background-size": t.largeWidth / t.newvalueheight + "px " + t.largeHeight / t.newvalueheight + "px" | |
}), t.zoomWindow.css({ | |
"background-size": t.largeWidth / t.newvalueheight + "px " + t.largeHeight / t.newvalueheight + "px" | |
})) : ("lens" != t.options.zoomType && t.zoomLens.css({ | |
"background-size": t.largeWidth / t.newvaluewidth + "px " + t.largeHeight / t.newvaluewidth + "px" | |
}), t.zoomWindow.css({ | |
"background-size": t.largeWidth / t.newvaluewidth + "px " + t.largeHeight / t.newvaluewidth + "px" | |
})), t.changeBgSize = !1), t.zoomWindow.css({ | |
backgroundPosition: t.xp + "px " + t.yp + "px" | |
})) | |
}, 16))) : (t.changeBgSize && (t.nzHeight > t.nzWidth ? ("lens" == t.options.zoomType && t.zoomLens.css({ | |
"background-size": t.largeWidth / t.newvalueheight + "px " + t.largeHeight / t.newvalueheight + "px" | |
}), t.zoomWindow.css({ | |
"background-size": t.largeWidth / t.newvalueheight + "px " + t.largeHeight / t.newvalueheight + "px" | |
})) : ("lens" == t.options.zoomType && t.zoomLens.css({ | |
"background-size": t.largeWidth / t.newvaluewidth + "px " + t.largeHeight / t.newvaluewidth + "px" | |
}), t.largeHeight / t.newvaluewidth < t.options.zoomWindowHeight ? t.zoomWindow.css({ | |
"background-size": t.largeWidth / t.newvaluewidth + "px " + t.largeHeight / t.newvaluewidth + "px" | |
}) : t.zoomWindow.css({ | |
"background-size": t.largeWidth / t.newvalueheight + "px " + t.largeHeight / t.newvalueheight + "px" | |
})), t.changeBgSize = !1), t.zoomWindow.css({ | |
backgroundPosition: t.windowLeftPos + "px " + t.windowTopPos + "px" | |
}))) | |
}, | |
setTintPosition: function(e) { | |
this.nzOffset = this.$elem.offset(), this.tintpos = String(-1 * (e.pageX - this.nzOffset.left - this.zoomLens.width() / 2)), this.tintposy = String(-1 * (e.pageY - this.nzOffset.top - this.zoomLens.height() / 2)), this.Etoppos && (this.tintposy = 0), this.Eloppos && (this.tintpos = 0), this.Eboppos && (this.tintposy = -1 * (this.nzHeight - this.zoomLens.height() - 2 * this.options.lensBorderSize)), this.Eroppos && (this.tintpos = -1 * (this.nzWidth - this.zoomLens.width() - 2 * this.options.lensBorderSize)), this.options.tint && (this.fullheight && (this.tintposy = 0), this.fullwidth && (this.tintpos = 0), this.zoomTintImage.css({ | |
left: this.tintpos + "px" | |
}), this.zoomTintImage.css({ | |
top: this.tintposy + "px" | |
})) | |
}, | |
swaptheimage: function(e, t) { | |
var n = this, | |
i = new Image; | |
n.options.loadingIcon && (n.spinner = r("<div style=\"background: url('" + n.options.loadingIcon + "') no-repeat center;height:" + n.nzHeight + "px;width:" + n.nzWidth + 'px;z-index: 2000;position: absolute; background-position: center center;"></div>'), n.$elem.after(n.spinner)), n.options.onImageSwap(n.$elem), i.onload = function() { | |
n.largeWidth = i.width, n.largeHeight = i.height, n.zoomImage = t, n.zoomWindow.css({ | |
"background-size": n.largeWidth + "px " + n.largeHeight + "px" | |
}), n.zoomWindow.css({ | |
"background-size": n.largeWidth + "px " + n.largeHeight + "px" | |
}), n.swapAction(e, t) | |
}, i.src = t | |
}, | |
swapAction: function(e, t) { | |
var n = this, | |
i = new Image; | |
if (i.onload = function() { | |
n.nzHeight = i.height, n.nzWidth = i.width, n.options.onImageSwapComplete(n.$elem), n.doneCallback() | |
}, i.src = e, n.currentZoomLevel = n.options.zoomLevel, n.options.maxZoomLevel = !1, "lens" == n.options.zoomType && n.zoomLens.css({ | |
backgroundImage: "url('" + t + "')" | |
}), "window" == n.options.zoomType && n.zoomWindow.css({ | |
backgroundImage: "url('" + t + "')" | |
}), "inner" == n.options.zoomType && n.zoomWindow.css({ | |
backgroundImage: "url('" + t + "')" | |
}), n.currentImage = t, n.options.imageCrossfade) { | |
var o = n.$elem, | |
s = o.clone(); | |
n.$elem.attr("src", e), n.$elem.after(s), s.stop(!0).fadeOut(n.options.imageCrossfade, function() { | |
r(this).remove() | |
}), n.$elem.width("auto").removeAttr("width"), n.$elem.height("auto").removeAttr("height"), o.fadeIn(n.options.imageCrossfade), n.options.tint && "inner" != n.options.zoomType && (s = (o = n.zoomTintImage).clone(), n.zoomTintImage.attr("src", t), n.zoomTintImage.after(s), s.stop(!0).fadeOut(n.options.imageCrossfade, function() { | |
r(this).remove() | |
}), o.fadeIn(n.options.imageCrossfade), n.zoomTint.css({ | |
height: n.$elem.height() | |
}), n.zoomTint.css({ | |
width: n.$elem.width() | |
})), n.zoomContainer.css("height", n.$elem.height()), n.zoomContainer.css("width", n.$elem.width()), "inner" != n.options.zoomType || n.options.constrainType || (n.zoomWrap.parent().css("height", n.$elem.height()), n.zoomWrap.parent().css("width", n.$elem.width()), n.zoomWindow.css("height", n.$elem.height()), n.zoomWindow.css("width", n.$elem.width())) | |
} else n.$elem.attr("src", e), n.options.tint && (n.zoomTintImage.attr("src", t), n.zoomTintImage.attr("height", n.$elem.height()), n.zoomTintImage.css({ | |
height: n.$elem.height() | |
}), n.zoomTint.css({ | |
height: n.$elem.height() | |
})), n.zoomContainer.css("height", n.$elem.height()), n.zoomContainer.css("width", n.$elem.width()); | |
n.options.imageCrossfade && (n.zoomWrap.css("height", n.$elem.height()), n.zoomWrap.css("width", n.$elem.width())), n.options.constrainType && ("height" == n.options.constrainType && (n.zoomContainer.css("height", n.options.constrainSize), n.zoomContainer.css("width", "auto"), n.options.imageCrossfade ? (n.zoomWrap.css("height", n.options.constrainSize), n.zoomWrap.css("width", "auto"), n.constwidth = n.zoomWrap.width()) : (n.$elem.css("height", n.options.constrainSize), n.$elem.css("width", "auto"), n.constwidth = n.$elem.width()), "inner" == n.options.zoomType && (n.zoomWrap.parent().css("height", n.options.constrainSize), n.zoomWrap.parent().css("width", n.constwidth), n.zoomWindow.css("height", n.options.constrainSize), n.zoomWindow.css("width", n.constwidth)), n.options.tint && (n.tintContainer.css("height", n.options.constrainSize), n.tintContainer.css("width", n.constwidth), n.zoomTint.css("height", n.options.constrainSize), n.zoomTint.css("width", n.constwidth), n.zoomTintImage.css("height", n.options.constrainSize), n.zoomTintImage.css("width", n.constwidth))), "width" == n.options.constrainType && (n.zoomContainer.css("height", "auto"), n.zoomContainer.css("width", n.options.constrainSize), n.options.imageCrossfade ? (n.zoomWrap.css("height", "auto"), n.zoomWrap.css("width", n.options.constrainSize), n.constheight = n.zoomWrap.height()) : (n.$elem.css("height", "auto"), n.$elem.css("width", n.options.constrainSize), n.constheight = n.$elem.height()), "inner" == n.options.zoomType && (n.zoomWrap.parent().css("height", n.constheight), n.zoomWrap.parent().css("width", n.options.constrainSize), n.zoomWindow.css("height", n.constheight), n.zoomWindow.css("width", n.options.constrainSize)), n.options.tint && (n.tintContainer.css("height", n.constheight), n.tintContainer.css("width", n.options.constrainSize), n.zoomTint.css("height", n.constheight), n.zoomTint.css("width", n.options.constrainSize), n.zoomTintImage.css("height", n.constheight), n.zoomTintImage.css("width", n.options.constrainSize)))) | |
}, | |
doneCallback: function() { | |
this.options.loadingIcon && this.spinner.hide(), this.nzOffset = this.$elem.offset(), this.nzWidth = this.$elem.width(), this.nzHeight = this.$elem.height(), this.currentZoomLevel = this.options.zoomLevel, this.widthRatio = this.largeWidth / this.nzWidth, this.heightRatio = this.largeHeight / this.nzHeight, "window" == this.options.zoomType && (lensHeight = this.nzHeight < this.options.zoomWindowWidth / this.widthRatio ? this.nzHeight : String(this.options.zoomWindowHeight / this.heightRatio), lensWidth = this.options.zoomWindowWidth < this.options.zoomWindowWidth ? this.nzWidth : this.options.zoomWindowWidth / this.widthRatio, this.zoomLens && (this.zoomLens.css("width", lensWidth), this.zoomLens.css("height", lensHeight))) | |
}, | |
getCurrentImage: function() { | |
return this.zoomImage | |
}, | |
getGalleryList: function() { | |
var t = this; | |
return t.gallerylist = [], t.options.gallery ? r("#" + t.options.gallery + " a").each(function() { | |
var e = ""; | |
r(this).data("zoom-image") ? e = r(this).data("zoom-image") : r(this).data("image") && (e = r(this).data("image")), e == t.zoomImage ? t.gallerylist.unshift({ | |
href: "" + e, | |
title: r(this).find("img").attr("title") | |
}) : t.gallerylist.push({ | |
href: "" + e, | |
title: r(this).find("img").attr("title") | |
}) | |
}) : t.gallerylist.push({ | |
href: "" + t.zoomImage, | |
title: r(this).find("img").attr("title") | |
}), t.gallerylist | |
}, | |
changeZoomLevel: function(e) { | |
this.scrollingLock = !0, this.newvalue = parseFloat(e).toFixed(2), newvalue = parseFloat(e).toFixed(2), maxheightnewvalue = this.largeHeight / (this.options.zoomWindowHeight / this.nzHeight * this.nzHeight), maxwidthtnewvalue = this.largeWidth / (this.options.zoomWindowWidth / this.nzWidth * this.nzWidth), "inner" != this.options.zoomType && (maxheightnewvalue <= newvalue ? (this.heightRatio = this.largeHeight / maxheightnewvalue / this.nzHeight, this.newvalueheight = maxheightnewvalue, this.fullheight = !0) : (this.heightRatio = this.largeHeight / newvalue / this.nzHeight, this.newvalueheight = newvalue, this.fullheight = !1), maxwidthtnewvalue <= newvalue ? (this.widthRatio = this.largeWidth / maxwidthtnewvalue / this.nzWidth, this.newvaluewidth = maxwidthtnewvalue, this.fullwidth = !0) : (this.widthRatio = this.largeWidth / newvalue / this.nzWidth, this.newvaluewidth = newvalue, this.fullwidth = !1), "lens" == this.options.zoomType && (maxheightnewvalue <= newvalue ? (this.fullwidth = !0, this.newvaluewidth = maxheightnewvalue) : (this.widthRatio = this.largeWidth / newvalue / this.nzWidth, this.newvaluewidth = newvalue, this.fullwidth = !1))), "inner" == this.options.zoomType && (maxheightnewvalue = parseFloat(this.largeHeight / this.nzHeight).toFixed(2), maxwidthtnewvalue = parseFloat(this.largeWidth / this.nzWidth).toFixed(2), newvalue > maxheightnewvalue && (newvalue = maxheightnewvalue), newvalue > maxwidthtnewvalue && (newvalue = maxwidthtnewvalue), maxheightnewvalue <= newvalue ? (this.heightRatio = this.largeHeight / newvalue / this.nzHeight, this.newvalueheight = newvalue > maxheightnewvalue ? maxheightnewvalue : newvalue, this.fullheight = !0) : (this.heightRatio = this.largeHeight / newvalue / this.nzHeight, this.newvalueheight = newvalue > maxheightnewvalue ? maxheightnewvalue : newvalue, this.fullheight = !1), maxwidthtnewvalue <= newvalue ? (this.widthRatio = this.largeWidth / newvalue / this.nzWidth, this.newvaluewidth = newvalue > maxwidthtnewvalue ? maxwidthtnewvalue : newvalue, this.fullwidth = !0) : (this.widthRatio = this.largeWidth / newvalue / this.nzWidth, this.newvaluewidth = newvalue, this.fullwidth = !1)), scrcontinue = !1, "inner" == this.options.zoomType && (this.nzWidth > this.nzHeight && (this.newvaluewidth <= maxwidthtnewvalue ? scrcontinue = !0 : (scrcontinue = !1, this.fullwidth = this.fullheight = !0)), this.nzHeight > this.nzWidth && (this.newvaluewidth <= maxwidthtnewvalue ? scrcontinue = !0 : (scrcontinue = !1, this.fullwidth = this.fullheight = !0))), "inner" != this.options.zoomType && (scrcontinue = !0), scrcontinue && (this.zoomLock = 0, this.changeZoom = !0, this.options.zoomWindowHeight / this.heightRatio <= this.nzHeight && (this.currentZoomLevel = this.newvalueheight, "lens" != this.options.zoomType && "inner" != this.options.zoomType && (this.changeBgSize = !0, this.zoomLens.css({ | |
height: String(this.options.zoomWindowHeight / this.heightRatio) + "px" | |
})), "lens" == this.options.zoomType || "inner" == this.options.zoomType) && (this.changeBgSize = !0), this.options.zoomWindowWidth / this.widthRatio <= this.nzWidth && ("inner" != this.options.zoomType && this.newvaluewidth > this.newvalueheight && (this.currentZoomLevel = this.newvaluewidth), "lens" != this.options.zoomType && "inner" != this.options.zoomType && (this.changeBgSize = !0, this.zoomLens.css({ | |
width: String(this.options.zoomWindowWidth / this.widthRatio) + "px" | |
})), "lens" == this.options.zoomType || "inner" == this.options.zoomType) && (this.changeBgSize = !0), "inner" == this.options.zoomType && (this.changeBgSize = !0, this.nzWidth > this.nzHeight && (this.currentZoomLevel = this.newvaluewidth), this.nzHeight > this.nzWidth && (this.currentZoomLevel = this.newvaluewidth))), this.setPosition(this.currentLoc) | |
}, | |
closeAll: function() { | |
self.zoomWindow && self.zoomWindow.hide(), self.zoomLens && self.zoomLens.hide(), self.zoomTint && self.zoomTint.hide() | |
}, | |
changeState: function(e) { | |
"enable" == e && (this.options.zoomEnabled = !0), "disable" == e && (this.options.zoomEnabled = !1) | |
} | |
}; | |
r.fn.elevateZoom = function(t) { | |
return this.each(function() { | |
var e = Object.create(n); | |
e.init(t, this), r.data(this, "elevateZoom", e) | |
}) | |
}, r.fn.elevateZoom.options = { | |
zoomActivation: "hover", | |
zoomEnabled: !0, | |
preloading: 1, | |
zoomLevel: 1, | |
scrollZoom: !1, | |
scrollZoomIncrement: .1, | |
minZoomLevel: !1, | |
maxZoomLevel: !1, | |
easing: !1, | |
easingAmount: 12, | |
lensSize: 200, | |
zoomWindowWidth: 400, | |
zoomWindowHeight: 400, | |
zoomWindowOffetx: 0, | |
zoomWindowOffety: 0, | |
zoomWindowPosition: 1, | |
zoomWindowBgColour: "#fff", | |
lensFadeIn: !1, | |
lensFadeOut: !1, | |
debug: !1, | |
zoomWindowFadeIn: !1, | |
zoomWindowFadeOut: !1, | |
zoomWindowAlwaysShow: !1, | |
zoomTintFadeIn: !1, | |
zoomTintFadeOut: !1, | |
borderSize: 4, | |
showLens: !0, | |
borderColour: "#888", | |
lensBorderSize: 1, | |
lensBorderColour: "#000", | |
lensShape: "square", | |
zoomType: "window", | |
containLensZoom: !1, | |
lensColour: "white", | |
lensOpacity: .4, | |
lenszoom: !1, | |
tint: !1, | |
tintColour: "#333", | |
tintOpacity: .4, | |
gallery: !1, | |
galleryActiveClass: "zoomGalleryActive", | |
imageCrossfade: !1, | |
constrainType: !1, | |
constrainSize: !1, | |
loadingIcon: !1, | |
cursor: "default", | |
responsive: !0, | |
onComplete: r.noop, | |
onZoomedImageLoaded: function() {}, | |
onImageSwap: r.noop, | |
onImageSwapComplete: r.noop | |
} | |
}(jQuery, window, document); | |
var Sticky = function() { | |
function o(e, t) { | |
var n = 0 < arguments.length && void 0 !== e ? e : "", | |
i = 1 < arguments.length && void 0 !== t ? t : {}; | |
_classCallCheck(this, o), this.selector = n, this.elements = [], this.version = "1.2.0", this.vp = this.getViewportSize(), this.body = document.querySelector("body"), this.options = { | |
wrap: i.wrap || !1, | |
marginTop: i.marginTop || 0, | |
stickyFor: i.stickyFor || 0, | |
stickyClass: i.stickyClass || null, | |
stickyContainer: i.stickyContainer || "body" | |
}, this.updateScrollTopPosition = this.updateScrollTopPosition.bind(this), this.updateScrollTopPosition(), window.addEventListener("load", this.updateScrollTopPosition), window.addEventListener("scroll", this.updateScrollTopPosition), this.run() | |
} | |
return o.prototype.run = function() { | |
var t = this, | |
n = setInterval(function() { | |
if ("complete" === document.readyState) { | |
clearInterval(n); | |
var e = document.querySelectorAll(t.selector); | |
t.forEach(e, function(e) { | |
return t.renderElement(e) | |
}) | |
} | |
}, 10) | |
}, o.prototype.renderElement = function(e) { | |
var t = this; | |
e.sticky = {}, e.sticky.active = !1, e.sticky.marginTop = parseInt(e.getAttribute("data-margin-top")) || this.options.marginTop, e.sticky.stickyFor = parseInt(e.getAttribute("data-sticky-for")) || this.options.stickyFor, e.sticky.stickyClass = e.getAttribute("data-sticky-class") || this.options.stickyClass, e.sticky.wrap = !!e.hasAttribute("data-sticky-wrap") || this.options.wrap, e.sticky.stickyContainer = this.options.stickyContainer, e.sticky.container = this.getStickyContainer(e), e.sticky.container.rect = this.getRectangle(e.sticky.container), e.sticky.rect = this.getRectangle(e), "img" === e.tagName.toLowerCase() && (e.onload = function() { | |
return e.sticky.rect = t.getRectangle(e) | |
}), e.sticky.wrap && this.wrapElement(e), this.activate(e) | |
}, o.prototype.wrapElement = function(e) { | |
e.insertAdjacentHTML("beforebegin", "<span></span>"), e.previousSibling.appendChild(e) | |
}, o.prototype.activate = function(e) { | |
e.sticky.rect.top + e.sticky.rect.height < e.sticky.container.rect.top + e.sticky.container.rect.height && e.sticky.stickyFor < this.vp.width && !e.sticky.active && (e.sticky.active = !0), this.elements.indexOf(e) < 0 && this.elements.push(e), e.sticky.resizeEvent || (this.initResizeEvents(e), e.sticky.resizeEvent = !0), e.sticky.scrollEvent || (this.initScrollEvents(e), e.sticky.scrollEvent = !0), this.setPosition(e) | |
}, o.prototype.initResizeEvents = function(e) { | |
var t = this; | |
e.sticky.resizeListener = function() { | |
return t.onResizeEvents(e) | |
}, window.addEventListener("resize", e.sticky.resizeListener) | |
}, o.prototype.destroyResizeEvents = function(e) { | |
window.removeEventListener("resize", e.sticky.resizeListener) | |
}, o.prototype.onResizeEvents = function(e) { | |
this.vp = this.getViewportSize(), e.sticky.rect = this.getRectangle(e), e.sticky.container.rect = this.getRectangle(e.sticky.container), e.sticky.rect.top + e.sticky.rect.height < e.sticky.container.rect.top + e.sticky.container.rect.height && e.sticky.stickyFor < this.vp.width && !e.sticky.active ? e.sticky.active = !0 : (e.sticky.rect.top + e.sticky.rect.height >= e.sticky.container.rect.top + e.sticky.container.rect.height || e.sticky.stickyFor >= this.vp.width && e.sticky.active) && (e.sticky.active = !1), this.setPosition(e) | |
}, o.prototype.initScrollEvents = function(e) { | |
var t = this; | |
e.sticky.scrollListener = function() { | |
return t.onScrollEvents(e) | |
}, window.addEventListener("scroll", e.sticky.scrollListener) | |
}, o.prototype.destroyScrollEvents = function(e) { | |
window.removeEventListener("scroll", e.sticky.scrollListener) | |
}, o.prototype.onScrollEvents = function(e) { | |
e.sticky.active && this.setPosition(e) | |
}, o.prototype.setPosition = function(e) { | |
this.css(e, { | |
position: "", | |
width: "", | |
top: "", | |
left: "" | |
}), this.vp.height < e.sticky.rect.height || !e.sticky.active || (e.sticky.rect.width || (e.sticky.rect = this.getRectangle(e)), e.sticky.wrap && this.css(e.parentNode, { | |
display: "block", | |
width: e.sticky.rect.width + "px", | |
height: e.sticky.rect.height + "px" | |
}), 0 === e.sticky.rect.top && e.sticky.container === this.body ? this.css(e, { | |
position: "fixed", | |
top: e.sticky.rect.top + "px", | |
left: e.sticky.rect.left + "px", | |
width: e.sticky.rect.width + "px" | |
}) : this.scrollTop > e.sticky.rect.top - e.sticky.marginTop ? (this.css(e, { | |
position: "fixed", | |
width: e.sticky.rect.width + "px", | |
left: e.sticky.rect.left + "px" | |
}), this.scrollTop + e.sticky.rect.height + e.sticky.marginTop > e.sticky.container.rect.top + e.sticky.container.offsetHeight ? (e.sticky.stickyClass && e.classList.remove(e.sticky.stickyClass), this.css(e, { | |
top: e.sticky.container.rect.top + e.sticky.container.offsetHeight - (this.scrollTop + e.sticky.rect.height) + "px" | |
})) : (e.sticky.stickyClass && e.classList.add(e.sticky.stickyClass), this.css(e, { | |
top: e.sticky.marginTop + "px" | |
}))) : (e.sticky.stickyClass && e.classList.remove(e.sticky.stickyClass), this.css(e, { | |
position: "", | |
width: "", | |
top: "", | |
left: "" | |
}), e.sticky.wrap && this.css(e.parentNode, { | |
display: "", | |
width: "", | |
height: "" | |
}))) | |
}, o.prototype.update = function() { | |
var t = this; | |
this.forEach(this.elements, function(e) { | |
e.sticky.rect = t.getRectangle(e), e.sticky.container.rect = t.getRectangle(e.sticky.container), t.activate(e), t.setPosition(e) | |
}) | |
}, o.prototype.destroy = function() { | |
var t = this; | |
this.forEach(this.elements, function(e) { | |
t.destroyResizeEvents(e), t.destroyScrollEvents(e), delete e.sticky | |
}) | |
}, o.prototype.getStickyContainer = function(e) { | |
for (var t = e.parentNode; !t.hasAttribute("data-sticky-container") && !t.parentNode.querySelector(e.sticky.stickyContainer) && t !== this.body;) t = t.parentNode; | |
return t | |
}, o.prototype.getRectangle = function(e) { | |
this.css(e, { | |
position: "", | |
width: "", | |
top: "", | |
left: "" | |
}); | |
for (var t = Math.max(e.offsetWidth, e.clientWidth, e.scrollWidth), n = Math.max(e.offsetHeight, e.clientHeight, e.scrollHeight), i = 0, o = 0; i += e.offsetTop || 0, o += e.offsetLeft || 0, e = e.offsetParent;); | |
return { | |
top: i, | |
left: o, | |
width: t, | |
height: n | |
} | |
}, o.prototype.getViewportSize = function() { | |
return { | |
width: Math.max(document.documentElement.clientWidth, window.innerWidth || 0), | |
height: Math.max(document.documentElement.clientHeight, window.innerHeight || 0) | |
} | |
}, o.prototype.updateScrollTopPosition = function() { | |
this.scrollTop = (window.pageYOffset || document.scrollTop) - (document.clientTop || 0) || 0 | |
}, o.prototype.forEach = function(e, t) { | |
for (var n = 0, i = e.length; n < i; n++) t(e[n]) | |
}, o.prototype.css = function(e, t) { | |
for (var n in t) t.hasOwnProperty(n) && (e.style[n] = t[n]) | |
}, o | |
}(); | |
! function(e, t) { | |
"undefined" != typeof exports ? module.exports = t : "function" == typeof define && define.amd ? define([], t) : e.Sticky = t | |
}(this, Sticky), | |
function(e, t) { | |
"object" == typeof exports && "undefined" != typeof module ? module.exports = t() : "function" == typeof define && define.amd ? define(t) : e.Exitent = t() | |
}(this, function() { | |
"use strict"; | |
function e(e, t) { | |
return e(t = { | |
exports: {} | |
}, t.exports), t.exports | |
} | |
var d = { | |
threshold: 50, | |
maxDisplays: 1, | |
eventThrottle: 1e3, | |
checkReferrer: !1, | |
storageName: "exitent-visited", | |
storageLife: 7, | |
preExitent: null, | |
onExitent: null, | |
postExitent: null | |
}, | |
o = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof self ? self : {}, | |
u = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(e) { | |
return typeof e | |
} : function(e) { | |
return e && "function" == typeof Symbol && e.constructor === Symbol ? "symbol" : typeof e | |
}, | |
h = function(e, t) { | |
if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function") | |
}, | |
p = function() { | |
function i(e, t) { | |
for (var n = 0; n < t.length; n++) { | |
var i = t[n]; | |
i.enumerable = i.enumerable || !1, i.configurable = !0, "value" in i && (i.writable = !0), Object.defineProperty(e, i.key, i) | |
} | |
} | |
return function(e, t, n) { | |
return t && i(e.prototype, t), n && i(e, n), e | |
} | |
}(), | |
f = e(function(e, t) { | |
var n, i; | |
n = o, i = function() { | |
var n = function n(e, t) { | |
if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function") | |
}, | |
t = function() { | |
function i(e, t) { | |
for (var n = 0; n < t.length; n++) { | |
var i = t[n]; | |
i.enumerable = i.enumerable || !1, i.configurable = !0, "value" in i && (i.writable = !0), Object.defineProperty(e, i.key, i) | |
} | |
} | |
return function(e, t, n) { | |
return t && i(e.prototype, t), n && i(e, n), e | |
} | |
}(); | |
return function() { | |
function e() { | |
n(this, e) | |
} | |
return t(e, null, [{ | |
key: "contains", | |
value: function a(e) { | |
return null !== this.read(e) | |
} | |
}, { | |
key: "convertDaysToMillis", | |
value: function a(e) { | |
return 24 * e * 60 * 60 * 1e3 | |
} | |
}, { | |
key: "delete", | |
value: function a(e) { | |
return !!this.contains(e) && (this.hasLocalStorage() ? window.localStorage.removeItem(e) : this.write(e, "", -1), !0) | |
} | |
}, { | |
key: "generateStorageValue", | |
value: function a(e, t) { | |
return { | |
value: e, | |
timestamp: this.generateLifetimeTimestamp(t) | |
} | |
} | |
}, { | |
key: "generateLifetimeTimestamp", | |
value: function a(e) { | |
return (new Date).getTime() + this.convertDaysToMillis(e) | |
} | |
}, { | |
key: "hasLocalStorage", | |
value: function a() { | |
return window.localStorage | |
} | |
}, { | |
key: "isTimestampValid", | |
value: function a(e) { | |
return (new Date).getTime() <= e | |
} | |
}, { | |
key: "read", | |
value: function a(e) { | |
if (this.hasLocalStorage()) { | |
var t = JSON.parse(window.localStorage.getItem(e)); | |
if (null !== t && this.isTimestampValid(t.timestamp)) return t | |
} else | |
for (var n = e + "=", i = document.cookie.split(";"), o = 0; o < i.length; o++) { | |
for (var s = i[o]; | |
" " == s.charAt(0);) s = s.substring(1); | |
if (0 == s.indexOf(n)) return s.substring(n.length, s.length) | |
} | |
return null | |
} | |
}, { | |
key: "write", | |
value: function a(e, t, n) { | |
var i = arguments.length <= 2 || void 0 === n ? 7 : arguments[2]; | |
if (this.hasLocalStorage()) { | |
var o = this.generateStorageValue(t, i); | |
window.localStorage.setItem(e, JSON.stringify(o)) | |
} else { | |
var s = new Date; | |
s.setTime(s.getTime() + 24 * i * 60 * 60 * 1e3); | |
var r = "; expires=" + s.toGMTString(); | |
document.cookie = e + " = " + t + r + "; path=/" | |
} | |
} | |
}]), e | |
}() | |
}, "object" == (void 0 === t ? "undefined" : u(t)) && void 0 !== e ? e.exports = i() : "function" == typeof define && define.amd ? define(i) : n.StorageJar = i() | |
}), | |
q = e(function(e) { | |
function t(e) { | |
var t = void 0 === e ? "undefined" : u(e); | |
return !!e && ("object" == t || "function" == t) | |
} | |
e.exports = t | |
}), | |
a = e(function(e) { | |
var t = "object" == u(o) && o && o.Object === Object && o; | |
e.exports = t | |
}), | |
l = e(function(e) { | |
var t = a, | |
n = "object" == ("undefined" == typeof self ? "undefined" : u(self)) && self && self.Object === Object && self, | |
i = t || n || Function("return this")(); | |
e.exports = i | |
}), | |
n = e(function(e) { | |
var t = l, | |
n = function n() { | |
return t.Date.now() | |
}; | |
e.exports = n | |
}), | |
A = e(function(e) { | |
function t(e) { | |
return !!e && "object" == (void 0 === e ? "undefined" : u(e)) | |
} | |
e.exports = t | |
}), | |
m = e(function(e) { | |
function t(e) { | |
return "symbol" == (void 0 === e ? "undefined" : u(e)) || n(e) && o.call(e) == i | |
} | |
var n = A, | |
i = "[object Symbol]", | |
o = Object.prototype.toString; | |
e.exports = t | |
}), | |
i = e(function(e) { | |
function t(e) { | |
if ("number" == typeof e) return e; | |
if (o(e)) return s; | |
if (i(e)) { | |
var t = "function" == typeof e.valueOf ? e.valueOf() : e; | |
e = i(t) ? t + "" : t | |
} | |
if ("string" != typeof e) return 0 === e ? e : +e; | |
e = e.replace(r, ""); | |
var n = l.test(e); | |
return n || c.test(e) ? d(e.slice(2), n ? 2 : 8) : a.test(e) ? s : +e | |
} | |
var i = q, | |
o = m, | |
s = NaN, | |
r = /^\s+|\s+$/g, | |
a = /^[-+]0x[0-9a-f]+$/i, | |
l = /^0b[01]+$/i, | |
c = /^0o[0-7]+$/i, | |
d = parseInt; | |
e.exports = t | |
}), | |
c = e(function(e) { | |
function t(i, n, e) { | |
function o(e) { | |
var t = h, | |
n = p; | |
return h = p = undefined, y = e, m = i.apply(n, t) | |
} | |
function s(e) { | |
return y = e, g = setTimeout(a, n), b ? o(e) : m | |
} | |
function t(e) { | |
var t = n - (e - v); | |
return w ? $(t, f - (e - y)) : t | |
} | |
function r(e) { | |
var t = e - v; | |
return v === undefined || n <= t || t < 0 || w && f <= e - y | |
} | |
function a() { | |
var e = k(); | |
if (r(e)) return l(e); | |
g = setTimeout(a, t(e)) | |
} | |
function l(e) { | |
return g = undefined, _ && h ? o(e) : (h = p = undefined, m) | |
} | |
function c() { | |
g !== undefined && clearTimeout(g), y = 0, h = v = p = g = undefined | |
} | |
function d() { | |
return g === undefined ? m : l(k()) | |
} | |
function u() { | |
var e = k(), | |
t = r(e); | |
if (h = arguments, p = this, v = e, t) { | |
if (g === undefined) return s(v); | |
if (w) return g = setTimeout(a, n), o(v) | |
} | |
return g === undefined && (g = setTimeout(a, n)), m | |
} | |
var h, p, f, m, g, v, y = 0, | |
b = !1, | |
w = !1, | |
_ = !0; | |
if ("function" != typeof i) throw new TypeError(S); | |
return n = C(n) || 0, x(e) && (b = !!e.leading, f = (w = "maxWait" in e) ? T(C(e.maxWait) || 0, n) : f, _ = "trailing" in e ? !!e.trailing : _), u.cancel = c, u.flush = d, u | |
} | |
var x = q, | |
k = n, | |
C = i, | |
S = "Expected a function", | |
T = Math.max, | |
$ = Math.min; | |
e.exports = t | |
}), | |
g = e(function(e) { | |
function t(e, t, n) { | |
var i = !0, | |
o = !0; | |
if ("function" != typeof e) throw new TypeError(a); | |
return r(n) && (i = "leading" in n ? !!n.leading : i, o = "trailing" in n ? !!n.trailing : o), s(e, t, { | |
leading: i, | |
maxWait: t, | |
trailing: o | |
}) | |
} | |
var s = c, | |
r = q, | |
a = "Expected a function"; | |
e.exports = t | |
}), | |
v = e(function(e) { | |
function t() { | |
this.__data__ = [] | |
} | |
e.exports = t | |
}), | |
y = e(function(e) { | |
function t(e, t) { | |
return e === t || e != e && t != t | |
} | |
e.exports = t | |
}), | |
s = e(function(e) { | |
function t(e, t) { | |
for (var n = e.length; n--;) | |
if (i(e[n][0], t)) return n; | |
return -1 | |
} | |
var i = y; | |
e.exports = t | |
}), | |
b = e(function(e) { | |
function t(e) { | |
var t = this.__data__, | |
n = i(t, e); | |
return !(n < 0) && (n == t.length - 1 ? t.pop() : o.call(t, n, 1), !0) | |
} | |
var i = s, | |
o = Array.prototype.splice; | |
e.exports = t | |
}), | |
w = e(function(e) { | |
function t(e) { | |
var t = this.__data__, | |
n = i(t, e); | |
return n < 0 ? undefined : t[n][1] | |
} | |
var i = s; | |
e.exports = t | |
}), | |
_ = e(function(e) { | |
function t(e) { | |
return -1 < n(this.__data__, e) | |
} | |
var n = s; | |
e.exports = t | |
}), | |
x = e(function(e) { | |
function t(e, t) { | |
var n = this.__data__, | |
i = o(n, e); | |
return i < 0 ? n.push([e, t]) : n[i][1] = t, this | |
} | |
var o = s; | |
e.exports = t | |
}), | |
k = e(function(e) { | |
function t(e) { | |
var t = -1, | |
n = e ? e.length : 0; | |
for (this.clear(); ++t < n;) { | |
var i = e[t]; | |
this.set(i[0], i[1]) | |
} | |
} | |
var n = v, | |
i = b, | |
o = w, | |
s = _, | |
r = x; | |
t.prototype.clear = n, t.prototype["delete"] = i, t.prototype.get = o, t.prototype.has = s, t.prototype.set = r, e.exports = t | |
}), | |
C = e(function(e) { | |
function t() { | |
this.__data__ = new n | |
} | |
var n = k; | |
e.exports = t | |
}), | |
S = e(function(e) { | |
function t(e) { | |
return this.__data__["delete"](e) | |
} | |
e.exports = t | |
}), | |
T = e(function(e) { | |
function t(e) { | |
return this.__data__.get(e) | |
} | |
e.exports = t | |
}), | |
$ = e(function(e) { | |
function t(e) { | |
return this.__data__.has(e) | |
} | |
e.exports = t | |
}), | |
D = e(function(e) { | |
function t(e) { | |
var t = n(e) ? s.call(e) : ""; | |
return t == i || t == o | |
} | |
var n = q, | |
i = "[object Function]", | |
o = "[object GeneratorFunction]", | |
s = Object.prototype.toString; | |
e.exports = t | |
}), | |
Y = e(function(e) { | |
function t(e) { | |
var t = !1; | |
if (null != e && "function" != typeof e.toString) try { | |
t = !!(e + "") | |
} catch (n) {} | |
return t | |
} | |
e.exports = t | |
}), | |
r = e(function(e) { | |
var t = l["__core-js_shared__"]; | |
e.exports = t | |
}), | |
E = e(function(e) { | |
function t(e) { | |
return !!o && o in e | |
} | |
var n, i = r, | |
o = (n = /[^.]+$/.exec(i && i.keys && i.keys.IE_PROTO || "")) ? "Symbol(src)_1." + n : ""; | |
e.exports = t | |
}), | |
O = e(function(e) { | |
function t(e) { | |
if (null != e) { | |
try { | |
return n.call(e) | |
} catch (t) {} | |
try { | |
return e + "" | |
} catch (t) {} | |
} | |
return "" | |
} | |
var n = Function.prototype.toString; | |
e.exports = t | |
}), | |
M = e(function(e) { | |
function t(e) { | |
return !(!s(e) || o(e)) && (n(e) || i(e) ? p : l).test(r(e)) | |
} | |
var n = D, | |
i = Y, | |
o = E, | |
s = q, | |
r = O, | |
a = /[\\^$.*+?()[\]{}|]/g, | |
l = /^\[object .+?Constructor\]$/, | |
c = Function.prototype, | |
d = Object.prototype, | |
u = c.toString, | |
h = d.hasOwnProperty, | |
p = RegExp("^" + u.call(h).replace(a, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"); | |
e.exports = t | |
}), | |
P = e(function(e) { | |
function t(e, t) { | |
return null == e ? undefined : e[t] | |
} | |
e.exports = t | |
}), | |
L = e(function(e) { | |
function t(e, t) { | |
var n = o(e, t); | |
return i(n) ? n : undefined | |
} | |
var i = M, | |
o = P; | |
e.exports = t | |
}), | |
I = e(function(e) { | |
var t = L(l, "Map"); | |
e.exports = t | |
}), | |
R = e(function(e) { | |
var t = L(Object, "create"); | |
e.exports = t | |
}), | |
N = e(function(e) { | |
function t() { | |
this.__data__ = n ? n(null) : {} | |
} | |
var n = R; | |
e.exports = t | |
}), | |
z = e(function(e) { | |
function t(e) { | |
return this.has(e) && delete this.__data__[e] | |
} | |
e.exports = t | |
}), | |
j = e(function(e) { | |
function t(e) { | |
var t = this.__data__; | |
if (i) { | |
var n = t[e]; | |
return n === o ? undefined : n | |
} | |
return s.call(t, e) ? t[e] : undefined | |
} | |
var i = R, | |
o = "__lodash_hash_undefined__", | |
s = Object.prototype.hasOwnProperty; | |
e.exports = t | |
}), | |
F = e(function(e) { | |
function t(e) { | |
var t = this.__data__; | |
return n ? t[e] !== undefined : i.call(t, e) | |
} | |
var n = R, | |
i = Object.prototype.hasOwnProperty; | |
e.exports = t | |
}), | |
H = e(function(e) { | |
function t(e, t) { | |
return this.__data__[e] = n && t === undefined ? i : t, this | |
} | |
var n = R, | |
i = "__lodash_hash_undefined__"; | |
e.exports = t | |
}), | |
W = e(function(e) { | |
function t(e) { | |
var t = -1, | |
n = e ? e.length : 0; | |
for (this.clear(); ++t < n;) { | |
var i = e[t]; | |
this.set(i[0], i[1]) | |
} | |
} | |
var n = N, | |
i = z, | |
o = j, | |
s = F, | |
r = H; | |
t.prototype.clear = n, t.prototype["delete"] = i, t.prototype.get = o, t.prototype.has = s, t.prototype.set = r, e.exports = t | |
}), | |
B = e(function(e) { | |
function t() { | |
this.__data__ = { | |
hash: new n, | |
map: new(o || i), | |
string: new n | |
} | |
} | |
var n = W, | |
i = k, | |
o = I; | |
e.exports = t | |
}), | |
U = e(function(e) { | |
function t(e) { | |
var t = void 0 === e ? "undefined" : u(e); | |
return "string" == t || "number" == t || "symbol" == t || "boolean" == t ? "__proto__" !== e : null === e | |
} | |
e.exports = t | |
}), | |
V = e(function(e) { | |
function t(e, t) { | |
var n = e.__data__; | |
return i(t) ? n["string" == typeof t ? "string" : "hash"] : n.map | |
} | |
var i = U; | |
e.exports = t | |
}), | |
G = e(function(e) { | |
function t(e) { | |
return n(this, e)["delete"](e) | |
} | |
var n = V; | |
e.exports = t | |
}), | |
X = e(function(e) { | |
function t(e) { | |
return n(this, e).get(e) | |
} | |
var n = V; | |
e.exports = t | |
}), | |
Z = e(function(e) { | |
function t(e) { | |
return n(this, e).has(e) | |
} | |
var n = V; | |
e.exports = t | |
}), | |
J = e(function(e) { | |
function t(e, t) { | |
return n(this, e).set(e, t), this | |
} | |
var n = V; | |
e.exports = t | |
}), | |
K = e(function(e) { | |
function t(e) { | |
var t = -1, | |
n = e ? e.length : 0; | |
for (this.clear(); ++t < n;) { | |
var i = e[t]; | |
this.set(i[0], i[1]) | |
} | |
} | |
var n = B, | |
i = G, | |
o = X, | |
s = Z, | |
r = J; | |
t.prototype.clear = n, t.prototype["delete"] = i, t.prototype.get = o, t.prototype.has = s, t.prototype.set = r, e.exports = t | |
}), | |
Q = e(function(e) { | |
function t(e, t) { | |
var n = this.__data__; | |
if (n instanceof o) { | |
var i = n.__data__; | |
if (!s || i.length < a - 1) return i.push([e, t]), this; | |
n = this.__data__ = new r(i) | |
} | |
return n.set(e, t), this | |
} | |
var o = k, | |
s = I, | |
r = K, | |
a = 200; | |
e.exports = t | |
}), | |
ee = e(function(e) { | |
function t(e) { | |
this.__data__ = new n(e) | |
} | |
var n = k, | |
i = C, | |
o = S, | |
s = T, | |
r = $, | |
a = Q; | |
t.prototype.clear = i, t.prototype["delete"] = o, t.prototype.get = s, t.prototype.has = r, t.prototype.set = a, e.exports = t | |
}), | |
te = e(function(e) { | |
function t(e, t) { | |
for (var n = -1, i = e ? e.length : 0; ++n < i && !1 !== t(e[n], n, e);); | |
return e | |
} | |
e.exports = t | |
}), | |
ne = e(function(e) { | |
function t(e, t, n) { | |
(n === undefined || i(e[t], n)) && ("number" != typeof t || n !== undefined || t in e) || (e[t] = n) | |
} | |
var i = y; | |
e.exports = t | |
}), | |
ie = e(function(e) { | |
function t(e) { | |
var t = e && e.constructor; | |
return e === ("function" == typeof t && t.prototype || n) | |
} | |
var n = Object.prototype; | |
e.exports = t | |
}), | |
oe = e(function(e) { | |
function t(e) { | |
var t = []; | |
if (null != e) | |
for (var n in Object(e)) t.push(n); | |
return t | |
} | |
e.exports = t | |
}), | |
se = e(function(e) { | |
function t(e) { | |
if (!o(e)) return r(e); | |
var t = s(e), | |
n = []; | |
for (var i in e)("constructor" != i || !t && a.call(e, i)) && n.push(i); | |
return n | |
} | |
var o = q, | |
s = ie, | |
r = oe, | |
a = Object.prototype.hasOwnProperty; | |
e.exports = t | |
}), | |
re = e(function(e) { | |
function t(e, t, n) { | |
var i = e[t]; | |
s.call(e, t) && o(i, n) && (n !== undefined || t in e) || (e[t] = n) | |
} | |
var o = y, | |
s = Object.prototype.hasOwnProperty; | |
e.exports = t | |
}), | |
ae = e(function(e) { | |
function t(e, t, n, i) { | |
n || (n = {}); | |
for (var o = -1, s = t.length; ++o < s;) { | |
var r = t[o], | |
a = i ? i(n[r], e[r], r, n, e) : undefined; | |
l(n, r, a === undefined ? e[r] : a) | |
} | |
return n | |
} | |
var l = re; | |
e.exports = t | |
}), | |
le = e(function(e) { | |
function t(e, t) { | |
for (var n = -1, i = Array(e); ++n < e;) i[n] = t(n); | |
return i | |
} | |
e.exports = t | |
}), | |
ce = e(function(e) { | |
function t(e) { | |
return "number" == typeof e && -1 < e && e % 1 == 0 && e <= n | |
} | |
var n = 9007199254740991; | |
e.exports = t | |
}), | |
de = e(function(e) { | |
function t(e) { | |
return null != e && i(e.length) && !n(e) | |
} | |
var n = D, | |
i = ce; | |
e.exports = t | |
}), | |
ue = e(function(e) { | |
function t(e) { | |
return i(e) && n(e) | |
} | |
var n = de, | |
i = A; | |
e.exports = t | |
}), | |
he = e(function(e) { | |
function t(e) { | |
return n(e) && s.call(e, "callee") && (!a.call(e, "callee") || r.call(e) == i) | |
} | |
var n = ue, | |
i = "[object Arguments]", | |
o = Object.prototype, | |
s = o.hasOwnProperty, | |
r = o.toString, | |
a = o.propertyIsEnumerable; | |
e.exports = t | |
}), | |
pe = e(function(e) { | |
var t = Array.isArray; | |
e.exports = t | |
}), | |
fe = e(function(e) { | |
function t(e, t) { | |
return !!(t = null == t ? n : t) && ("number" == typeof e || i.test(e)) && -1 < e && e % 1 == 0 && e < t | |
} | |
var n = 9007199254740991, | |
i = /^(?:0|[1-9]\d*)$/; | |
e.exports = t | |
}), | |
me = e(function(e) { | |
function t(e, t) { | |
var n = l(e) || a(e) ? r(e.length, String) : [], | |
i = n.length, | |
o = !!i; | |
for (var s in e) !t && !d.call(e, s) || o && ("length" == s || c(s, i)) || n.push(s); | |
return n | |
} | |
var r = le, | |
a = he, | |
l = pe, | |
c = fe, | |
d = Object.prototype.hasOwnProperty; | |
e.exports = t | |
}), | |
ge = e(function(e) { | |
function t(t, n) { | |
return function(e) { | |
return t(n(e)) | |
} | |
} | |
e.exports = t | |
}), | |
ve = e(function(e) { | |
var t = ge(Object.keys, Object); | |
e.exports = t | |
}), | |
ye = e(function(e) { | |
function t(e) { | |
if (!i(e)) return o(e); | |
var t = []; | |
for (var n in Object(e)) s.call(e, n) && "constructor" != n && t.push(n); | |
return t | |
} | |
var i = ie, | |
o = ve, | |
s = Object.prototype.hasOwnProperty; | |
e.exports = t | |
}), | |
be = e(function(e) { | |
function t(e) { | |
return o(e) ? n(e) : i(e) | |
} | |
var n = me, | |
i = ye, | |
o = de; | |
e.exports = t | |
}), | |
we = e(function(e) { | |
function t(e, t) { | |
return e && n(t, i(t), e) | |
} | |
var n = ae, | |
i = be; | |
e.exports = t | |
}), | |
_e = e(function(e) { | |
function t(e, t) { | |
if (t) return e.slice(); | |
var n = new e.constructor(e.length); | |
return e.copy(n), n | |
} | |
e.exports = t | |
}), | |
xe = e(function(e) { | |
function t(e, t) { | |
var n = -1, | |
i = e.length; | |
for (t || (t = Array(i)); ++n < i;) t[n] = e[n]; | |
return t | |
} | |
e.exports = t | |
}), | |
ke = e(function(e) { | |
function t() { | |
return [] | |
} | |
e.exports = t | |
}), | |
Ce = e(function(e) { | |
var t = ge, | |
n = ke, | |
i = Object.getOwnPropertySymbols, | |
o = i ? t(i, Object) : n; | |
e.exports = o | |
}), | |
Se = e(function(e) { | |
function t(e, t) { | |
return n(e, i(e), t) | |
} | |
var n = ae, | |
i = Ce; | |
e.exports = t | |
}), | |
Te = e(function(e) { | |
function t(e, t) { | |
for (var n = -1, i = t.length, o = e.length; ++n < i;) e[o + n] = t[n]; | |
return e | |
} | |
e.exports = t | |
}), | |
$e = e(function(e) { | |
function t(e, t, n) { | |
var i = t(e); | |
return s(e) ? i : o(i, n(e)) | |
} | |
var o = Te, | |
s = pe; | |
e.exports = t | |
}), | |
De = e(function(e) { | |
function t(e) { | |
return n(e, o, i) | |
} | |
var n = $e, | |
i = Ce, | |
o = be; | |
e.exports = t | |
}), | |
Ae = e(function(e) { | |
var t = L(l, "DataView"); | |
e.exports = t | |
}), | |
Ee = e(function(e) { | |
var t = L(l, "Promise"); | |
e.exports = t | |
}), | |
Oe = e(function(e) { | |
var t = L(l, "Set"); | |
e.exports = t | |
}), | |
Me = e(function(e) { | |
var t = L(l, "WeakMap"); | |
e.exports = t | |
}), | |
Pe = e(function(e) { | |
function t(e) { | |
return n.call(e) | |
} | |
var n = Object.prototype.toString; | |
e.exports = t | |
}), | |
Le = e(function(e) { | |
var t = Ae, | |
n = I, | |
i = Ee, | |
o = Oe, | |
s = Me, | |
r = Pe, | |
a = O, | |
l = "[object Map]", | |
c = "[object Object]", | |
d = "[object Promise]", | |
u = "[object Set]", | |
h = "[object WeakMap]", | |
p = "[object DataView]", | |
f = Object.prototype.toString, | |
m = a(t), | |
g = a(n), | |
v = a(i), | |
y = a(o), | |
b = a(s), | |
w = r; | |
(t && w(new t(new ArrayBuffer(1))) != p || n && w(new n) != l || i && w(i.resolve()) != d || o && w(new o) != u || s && w(new s) != h) && (w = function w(e) { | |
var t = f.call(e), | |
n = t == c ? e.constructor : undefined, | |
i = n ? a(n) : undefined; | |
if (i) switch (i) { | |
case m: | |
return p; | |
case g: | |
return l; | |
case v: | |
return d; | |
case y: | |
return u; | |
case b: | |
return h | |
} | |
return t | |
}), e.exports = w | |
}), | |
Ie = e(function(e) { | |
function t(e) { | |
var t = e.length, | |
n = e.constructor(t); | |
return t && "string" == typeof e[0] && i.call(e, "index") && (n.index = e.index, n.input = e.input), n | |
} | |
var i = Object.prototype.hasOwnProperty; | |
e.exports = t | |
}), | |
Re = e(function(e) { | |
var t = l.Uint8Array; | |
e.exports = t | |
}), | |
Ne = e(function(e) { | |
function t(e) { | |
var t = new e.constructor(e.byteLength); | |
return new n(t).set(new n(e)), t | |
} | |
var n = Re; | |
e.exports = t | |
}), | |
ze = e(function(e) { | |
function t(e, t) { | |
var n = t ? i(e.buffer) : e.buffer; | |
return new e.constructor(n, e.byteOffset, e.byteLength) | |
} | |
var i = Ne; | |
e.exports = t | |
}), | |
je = e(function(e) { | |
function t(e, t) { | |
return e.set(t[0], t[1]), e | |
} | |
e.exports = t | |
}), | |
Fe = e(function(e) { | |
function t(e, t, n, i) { | |
var o = -1, | |
s = e ? e.length : 0; | |
for (i && s && (n = e[++o]); ++o < s;) n = t(n, e[o], o, e); | |
return n | |
} | |
e.exports = t | |
}), | |
He = e(function(e) { | |
function t(e) { | |
var n = -1, | |
i = Array(e.size); | |
return e.forEach(function(e, t) { | |
i[++n] = [t, e] | |
}), i | |
} | |
e.exports = t | |
}), | |
We = e(function(e) { | |
function t(e, t, n) { | |
var i = t ? n(r(e), !0) : r(e); | |
return s(i, o, new e.constructor) | |
} | |
var o = je, | |
s = Fe, | |
r = He; | |
e.exports = t | |
}), | |
Be = e(function(e) { | |
function t(e) { | |
var t = new e.constructor(e.source, n.exec(e)); | |
return t.lastIndex = e.lastIndex, t | |
} | |
var n = /\w*$/; | |
e.exports = t | |
}), | |
Ue = e(function(e) { | |
function t(e, t) { | |
return e.add(t), e | |
} | |
e.exports = t | |
}), | |
Ve = e(function(e) { | |
function t(e) { | |
var t = -1, | |
n = Array(e.size); | |
return e.forEach(function(e) { | |
n[++t] = e | |
}), n | |
} | |
e.exports = t | |
}), | |
qe = e(function(e) { | |
function t(e, t, n) { | |
var i = t ? n(r(e), !0) : r(e); | |
return s(i, o, new e.constructor) | |
} | |
var o = Ue, | |
s = Fe, | |
r = Ve; | |
e.exports = t | |
}), | |
Ye = e(function(e) { | |
var t = l.Symbol; | |
e.exports = t | |
}), | |
Ge = e(function(e) { | |
function t(e) { | |
return i ? Object(i.call(e)) : {} | |
} | |
var n = Ye ? Ye.prototype : undefined, | |
i = n ? n.valueOf : undefined; | |
e.exports = t | |
}), | |
Xe = e(function(e) { | |
function t(e, t) { | |
var n = t ? i(e.buffer) : e.buffer; | |
return new e.constructor(n, e.byteOffset, e.length) | |
} | |
var i = Ne; | |
e.exports = t | |
}), | |
Ze = e(function(e) { | |
function t(e, t, n, i) { | |
var o = e.constructor; | |
switch (t) { | |
case w: | |
return s(e); | |
case h: | |
case p: | |
return new o(+e); | |
case _: | |
return r(e, i); | |
case x: | |
case k: | |
case C: | |
case S: | |
case T: | |
case $: | |
case D: | |
case A: | |
case E: | |
return u(e, i); | |
case f: | |
return a(e, i, n); | |
case m: | |
case y: | |
return new o(e); | |
case g: | |
return l(e); | |
case v: | |
return c(e, i, n); | |
case b: | |
return d(e) | |
} | |
} | |
var s = Ne, | |
r = ze, | |
a = We, | |
l = Be, | |
c = qe, | |
d = Ge, | |
u = Xe, | |
h = "[object Boolean]", | |
p = "[object Date]", | |
f = "[object Map]", | |
m = "[object Number]", | |
g = "[object RegExp]", | |
v = "[object Set]", | |
y = "[object String]", | |
b = "[object Symbol]", | |
w = "[object ArrayBuffer]", | |
_ = "[object DataView]", | |
x = "[object Float32Array]", | |
k = "[object Float64Array]", | |
C = "[object Int8Array]", | |
S = "[object Int16Array]", | |
T = "[object Int32Array]", | |
$ = "[object Uint8Array]", | |
D = "[object Uint8ClampedArray]", | |
A = "[object Uint16Array]", | |
E = "[object Uint32Array]"; | |
e.exports = t | |
}), | |
Je = e(function(e) { | |
function t(e) { | |
return n(e) ? i(e) : {} | |
} | |
var n = q, | |
i = Object.create; | |
e.exports = t | |
}), | |
Ke = e(function(e) { | |
var t = ge(Object.getPrototypeOf, Object); | |
e.exports = t | |
}), | |
Qe = e(function(e) { | |
function t(e) { | |
return "function" != typeof e.constructor || o(e) ? {} : n(i(e)) | |
} | |
var n = Je, | |
i = Ke, | |
o = ie; | |
e.exports = t | |
}), | |
et = e(function(e) { | |
function t() { | |
return !1 | |
} | |
e.exports = t | |
}), | |
tt = e(function(e, t) { | |
var n = l, | |
i = et, | |
o = "object" == (void 0 === t ? "undefined" : u(t)) && t && !t.nodeType && t, | |
s = o && "object" == (void 0 === e ? "undefined" : u(e)) && e && !e.nodeType && e, | |
r = s && s.exports === o ? n.Buffer : undefined, | |
a = (r ? r.isBuffer : undefined) || i; | |
e.exports = a | |
}), | |
nt = e(function(e) { | |
function p(n, i, o, s, e, t, r) { | |
var a; | |
if (s && (a = t ? s(n, e, t, r) : s(n)), a !== undefined) return a; | |
if (!A(n)) return n; | |
var l = T(n); | |
if (l) { | |
if (a = k(n), !i) return b(n, a) | |
} else { | |
var c = x(n), | |
d = c == M || c == P; | |
if ($(n)) return y(n, i); | |
if (c == L || c == O || d && !t) { | |
if (D(n)) return t ? n : {}; | |
if (a = S(d ? {} : n), !i) return w(n, v(a, n)) | |
} else { | |
if (!V[c]) return t ? n : {}; | |
a = C(n, c, p, i) | |
} | |
} | |
r || (r = new f); | |
var u = r.get(n); | |
if (u) return u; | |
if (r.set(n, a), !l) var h = o ? _(n) : E(n); | |
return m(h || n, function(e, t) { | |
h && (e = n[t = e]), g(a, t, p(e, i, o, s, t, n, r)) | |
}), a | |
} | |
var f = ee, | |
m = te, | |
g = re, | |
v = we, | |
y = _e, | |
b = xe, | |
w = Se, | |
_ = De, | |
x = Le, | |
k = Ie, | |
C = Ze, | |
S = Qe, | |
T = pe, | |
$ = tt, | |
D = Y, | |
A = q, | |
E = be, | |
O = "[object Arguments]", | |
t = "[object Array]", | |
n = "[object Boolean]", | |
i = "[object Date]", | |
o = "[object Error]", | |
M = "[object Function]", | |
P = "[object GeneratorFunction]", | |
s = "[object Map]", | |
r = "[object Number]", | |
L = "[object Object]", | |
a = "[object RegExp]", | |
l = "[object Set]", | |
c = "[object String]", | |
d = "[object Symbol]", | |
u = "[object WeakMap]", | |
h = "[object ArrayBuffer]", | |
I = "[object DataView]", | |
R = "[object Float32Array]", | |
N = "[object Float64Array]", | |
z = "[object Int8Array]", | |
j = "[object Int16Array]", | |
F = "[object Int32Array]", | |
H = "[object Uint8Array]", | |
W = "[object Uint8ClampedArray]", | |
B = "[object Uint16Array]", | |
U = "[object Uint32Array]", | |
V = {}; | |
V[O] = V[t] = V[h] = V[I] = V[n] = V[i] = V[R] = V[N] = V[z] = V[j] = V[F] = V[s] = V[r] = V[L] = V[a] = V[l] = V[c] = V[d] = V[H] = V[W] = V[B] = V[U] = !0, V[o] = V[M] = V[u] = !1, e.exports = p | |
}), | |
it = e(function(e) { | |
function t(e) { | |
if (!s(e) || u.call(e) != r || o(e)) return !1; | |
var t = i(e); | |
if (null === t) return !0; | |
var n = c.call(t, "constructor") && t.constructor; | |
return "function" == typeof n && n instanceof n && l.call(n) == d | |
} | |
var i = Ke, | |
o = Y, | |
s = A, | |
r = "[object Object]", | |
n = Function.prototype, | |
a = Object.prototype, | |
l = n.toString, | |
c = a.hasOwnProperty, | |
d = l.call(Object), | |
u = a.toString; | |
e.exports = t | |
}), | |
ot = e(function(e) { | |
function t(e) { | |
return i(e) && n(e.length) && !!$[D.call(e)] | |
} | |
var n = ce, | |
i = A, | |
o = "[object Arguments]", | |
s = "[object Array]", | |
r = "[object Boolean]", | |
a = "[object Date]", | |
l = "[object Error]", | |
c = "[object Function]", | |
d = "[object Map]", | |
u = "[object Number]", | |
h = "[object Object]", | |
p = "[object RegExp]", | |
f = "[object Set]", | |
m = "[object String]", | |
g = "[object WeakMap]", | |
v = "[object ArrayBuffer]", | |
y = "[object DataView]", | |
b = "[object Float64Array]", | |
w = "[object Int8Array]", | |
_ = "[object Int16Array]", | |
x = "[object Int32Array]", | |
k = "[object Uint8Array]", | |
C = "[object Uint8ClampedArray]", | |
S = "[object Uint16Array]", | |
T = "[object Uint32Array]", | |
$ = {}; | |
$["[object Float32Array]"] = $[b] = $[w] = $[_] = $[x] = $[k] = $[C] = $[S] = $[T] = !0, $[o] = $[s] = $[v] = $[r] = $[y] = $[a] = $[l] = $[c] = $[d] = $[u] = $[h] = $[p] = $[f] = $[m] = $[g] = !1; | |
var D = Object.prototype.toString; | |
e.exports = t | |
}), | |
st = e(function(e) { | |
function t(t) { | |
return function(e) { | |
return t(e) | |
} | |
} | |
e.exports = t | |
}), | |
rt = e(function(e, t) { | |
var n = a, | |
i = "object" == (void 0 === t ? "undefined" : u(t)) && t && !t.nodeType && t, | |
o = i && "object" == (void 0 === e ? "undefined" : u(e)) && e && !e.nodeType && e, | |
s = o && o.exports === i && n.process, | |
r = function() { | |
try { | |
return s && s.binding("util") | |
} catch (e) {} | |
}(); | |
e.exports = r | |
}), | |
at = e(function(e) { | |
var t = ot, | |
n = st, | |
i = rt && rt.isTypedArray, | |
o = i ? n(i) : t; | |
e.exports = o | |
}), | |
lt = e(function(e) { | |
function t(e) { | |
return o(e) ? n(e, !0) : i(e) | |
} | |
var n = me, | |
i = se, | |
o = de; | |
e.exports = t | |
}), | |
ct = e(function(e) { | |
function t(e) { | |
return n(e, i(e)) | |
} | |
var n = ae, | |
i = lt; | |
e.exports = t | |
}), | |
dt = e(function(e) { | |
function t(e, t, n, i, o, s, r) { | |
var a = e[n], | |
l = t[n], | |
c = r.get(l); | |
if (c) h(e, n, c); | |
else { | |
var d = s ? s(a, l, n + "", e, t, r) : undefined, | |
u = d === undefined; | |
u && (g(d = l) || _(l) ? d = g(a) ? a : v(a) ? f(a) : p(l, !(u = !1)) : w(l) || m(l) ? d = m(a) ? x(a) : !b(a) || i && y(a) ? p(l, !(u = !1)) : a : u = !1), u && (r.set(l, d), o(d, l, i, s, r), r["delete"](l)), h(e, n, d) | |
} | |
} | |
var h = ne, | |
p = nt, | |
f = xe, | |
m = he, | |
g = pe, | |
v = ue, | |
y = D, | |
b = q, | |
w = it, | |
_ = at, | |
x = ct; | |
e.exports = t | |
}), | |
ut = e(function(e) { | |
function c(i, o, s, r, a) { | |
if (i !== o) { | |
if (!p(o) && !m(o)) var l = n(o); | |
t(l || o, function(e, t) { | |
if (l && (e = o[t = e]), f(e)) a || (a = new d), h(i, o, t, s, c, r, a); | |
else { | |
var n = r ? r(i[t], e, t + "", i, o, a) : undefined; | |
n === undefined && (n = e), u(i, t, n) | |
} | |
}) | |
} | |
} | |
var d = ee, | |
t = te, | |
u = ne, | |
n = se, | |
h = dt, | |
p = pe, | |
f = q, | |
m = at; | |
e.exports = c | |
}), | |
ht = e(function(e) { | |
function t(e, t, n) { | |
switch (n.length) { | |
case 0: | |
return e.call(t); | |
case 1: | |
return e.call(t, n[0]); | |
case 2: | |
return e.call(t, n[0], n[1]); | |
case 3: | |
return e.call(t, n[0], n[1], n[2]) | |
} | |
return e.apply(t, n) | |
} | |
e.exports = t | |
}), | |
pt = e(function(e) { | |
function t(s, r) { | |
return r = l(r === undefined ? s.length - 1 : r, 0), | |
function() { | |
for (var e = arguments, t = -1, n = l(e.length - r, 0), i = Array(n); ++t < n;) i[t] = e[r + t]; | |
t = -1; | |
for (var o = Array(r + 1); ++t < r;) o[t] = e[t]; | |
return o[r] = i, a(s, this, o) | |
} | |
} | |
var a = ht, | |
l = Math.max; | |
e.exports = t | |
}), | |
ft = e(function(e) { | |
function t(e, t, n) { | |
if (!a(n)) return !1; | |
var i = void 0 === t ? "undefined" : u(t); | |
return !!("number" == i ? s(n) && r(t, n.length) : "string" == i && t in n) && o(n[t], e) | |
} | |
var o = y, | |
s = de, | |
r = fe, | |
a = q; | |
e.exports = t | |
}), | |
mt = e(function(e) { | |
function t(a) { | |
return n(function(e, t) { | |
var n = -1, | |
i = t.length, | |
o = 1 < i ? t[i - 1] : undefined, | |
s = 2 < i ? t[2] : undefined; | |
for (o = 3 < a.length && "function" == typeof o ? (i--, o) : undefined, s && l(t[0], t[1], s) && (o = i < 3 ? undefined : o, i = 1), e = Object(e); ++n < i;) { | |
var r = t[n]; | |
r && a(e, r, n, o) | |
} | |
return e | |
}) | |
} | |
var n = pt, | |
l = ft; | |
e.exports = t | |
}), | |
gt = e(function(e) { | |
var i = ut, | |
t = mt(function(e, t, n) { | |
i(e, t, n) | |
}); | |
e.exports = t | |
}); | |
return function() { | |
function t(e) { | |
h(this, t), this.eventListeners = new Map, this.displays = 0, this.options = d, 1 === arguments.length && "object" === (void 0 === e ? "undefined" : u(e)) && (this.options = this.mergeOptions(d, e)), this.init() | |
} | |
return p(t, [{ | |
key: "addEvent", | |
value: function o(e, t, n) { | |
var i = "document" === e ? document : document.getElementById(e); | |
i.addEvent ? i.attachEvent("on" + t, n) : i.addEventListener(t, n, !1), this.eventListeners.set(e + ":" + t, { | |
element: i, | |
eventName: t, | |
callback: n | |
}) | |
} | |
}, { | |
key: "executeCallbacks", | |
value: function s() { | |
var e = this.options, | |
t = e.preExitent, | |
n = e.onExitent, | |
i = e.postExitent; | |
null !== t && "function" == typeof t && t(), null !== n && "function" == typeof n && n(), null !== i && "function" == typeof i && i() | |
} | |
}, { | |
key: "handleMouseEvent", | |
value: function e() { | |
this.executeCallbacks(), this.shouldRemoveEvents() | |
} | |
}, { | |
key: "init", | |
value: function i() { | |
var t = this, | |
n = function n(e) { | |
t.mouseDidMove(e) | |
}; | |
this.addEvent("document", "mousemove", g(n, this.options.eventThrottle)) | |
} | |
}, { | |
key: "mergeOptions", | |
value: function n(e, t) { | |
return gt(e, t) | |
} | |
}, { | |
key: "mouseDidMove", | |
value: function a(e) { | |
var t = this.options, | |
n = t.maxDisplays, | |
i = t.storageName, | |
o = t.storageLife, | |
s = t.checkReferrer; | |
if (this.shouldDisplay(e.clientY)) { | |
if (s) { | |
var r = document.createElement("a"); | |
if (r.href = document.referrer, "" === document.referrer || r.host !== document.location.host) return | |
} | |
this.displays !== n || f.contains(i) || f.write(i, i, o), this.handleMouseEvent() | |
} | |
} | |
}, { | |
key: "removeEvent", | |
value: function r(e) { | |
var t = this.eventListeners.get(e), | |
n = t.element, | |
i = t.eventName, | |
o = t.callback; | |
n.removeEventListener(i, o), this.eventListeners["delete"](e) | |
} | |
}, { | |
key: "shouldDisplay", | |
value: function l(e) { | |
var t = this.options, | |
n = t.threshold, | |
i = t.maxDisplays, | |
o = t.storageName; | |
return e <= n && this.displays < i && !f.contains(o) && (this.displays++, !0) | |
} | |
}, { | |
key: "shouldRemoveEvents", | |
value: function c() { | |
var n = this; | |
this.displays >= this.options.maxDisplays && this.eventListeners.forEach(function(e, t) { | |
n.removeEvent(t) | |
}) | |
} | |
}]), t | |
}() | |
}), jQuery.extend({ | |
debounce: function(t, n, i, o) { | |
var s; | |
return 3 == arguments.length && "boolean" != typeof i && (o = i, i = !1), | |
function() { | |
var e = arguments; | |
o = o || this, i && !s && t.apply(o, e), clearTimeout(s), s = setTimeout(function() { | |
!i && t.apply(o, e), s = null | |
}, n) | |
} | |
}, | |
throttle: function(e, t, n) { | |
var i, o, s; | |
return function() { | |
o = arguments, s = !0, n = n || this, i || function() { | |
s ? (e.apply(n, o), s = !1, i = setTimeout(arguments.callee, t)) : i = null | |
}() | |
} | |
} | |
}), | |
function(M) { | |
var P = M(window); | |
M.fn.visible = function(e, t, n, i) { | |
if (!(this.length < 1)) { | |
n = n || "both"; | |
var o = 1 < this.length ? this.eq(0) : this, | |
s = null != i, | |
r = s ? M(i) : P, | |
a = s ? r.position() : 0, | |
l = o.get(0), | |
c = r.outerWidth(), | |
d = r.outerHeight(), | |
u = !0 !== t || l.offsetWidth * l.offsetHeight; | |
if ("function" == typeof l.getBoundingClientRect) { | |
var h = l.getBoundingClientRect(), | |
p = s ? 0 <= h.top - a.top && h.top < d + a.top : 0 <= h.top && h.top < d, | |
f = s ? 0 < h.bottom - a.top && h.bottom <= d + a.top : 0 < h.bottom && h.bottom <= d, | |
m = s ? 0 <= h.left - a.left && h.left < c + a.left : 0 <= h.left && h.left < c, | |
g = s ? 0 < h.right - a.left && h.right < c + a.left : 0 < h.right && h.right <= c, | |
v = e ? p || f : p && f, | |
y = e ? m || g : m && g; | |
v = h.top < 0 && h.bottom > d || v, y = h.left < 0 && h.right > c || y; | |
if ("both" === n) return u && v && y; | |
if ("vertical" === n) return u && v; | |
if ("horizontal" === n) return u && y | |
} else { | |
var b = s ? 0 : a, | |
w = b + d, | |
_ = r.scrollLeft(), | |
x = _ + c, | |
k = o.position(), | |
C = k.top, | |
S = C + o.height(), | |
T = k.left, | |
$ = T + o.width(), | |
D = !0 === e ? S : C, | |
A = !0 === e ? C : S, | |
E = !0 === e ? $ : T, | |
O = !0 === e ? T : $; | |
if ("both" === n) return !!u && A <= w && b <= D && O <= x && _ <= E; | |
if ("vertical" === n) return !!u && A <= w && b <= D; | |
if ("horizontal" === n) return !!u && O <= x && _ <= E | |
} | |
} | |
} | |
}(jQuery), | |
function() { | |
function e(o, e) { | |
function n(e, t) { | |
return d.getComputedStyle || (d.getComputedStyle = function(n) { | |
return this.el = n, this.getPropertyValue = function(e) { | |
var t = /(\-([a-z]){1})/g; | |
return "float" == e && (e = "styleFloat"), t.test(e) && (e = e.replace(t, function(e, t, n) { | |
return n.toUpperCase() | |
})), n.currentStyle && n.currentStyle[e] ? n.currentStyle[e] : null | |
}, this | |
}), d.getComputedStyle(e, null).getPropertyValue(t) | |
} | |
function t(e) { | |
var t = e || o.clientHeight, | |
n = s(o); | |
return Math.max(Math.floor(t / n), 0) | |
} | |
function i(e) { | |
return s(o) * e | |
} | |
function s(e) { | |
var t = n(e, "line-height"); | |
return "normal" == t && (t = 1.2 * parseInt(n(e, "font-size"))), parseInt(t) | |
} | |
function r(e) { | |
return e.lastChild.children && 0 < e.lastChild.children.length ? r(Array.prototype.slice.call(e.children).pop()) : e.lastChild && e.lastChild.nodeValue && "" != e.lastChild.nodeValue && e.lastChild.nodeValue != u.truncationChar ? e.lastChild : (e.lastChild.parentNode.removeChild(e.lastChild), r(o)) | |
} | |
function a(e, t) { | |
function n() { | |
w = u.splitOnChars.slice(0), _ = w[0], y = v = null | |
} | |
if (t) { | |
var i = e.nodeValue.replace(u.truncationChar, ""); | |
if (v || (_ = 0 < w.length ? w.shift() : "", v = i.split(_)), 1 < v.length ? (y = v.pop(), l(e, v.join(_))) : v = null, c && (e.nodeValue = e.nodeValue.replace(u.truncationChar, ""), o.innerHTML = e.nodeValue + " " + c.innerHTML + u.truncationChar), v) { | |
if (o.clientHeight <= t) { | |
if (!(0 <= w.length && "" != _)) return o.innerHTML; | |
l(e, v.join(_) + _ + y), v = null | |
} | |
} else "" == _ && (l(e, ""), e = r(o), n()); | |
if (!u.animate) return a(e, t); | |
setTimeout(function() { | |
a(e, t) | |
}, !0 === u.animate ? 10 : u.animate) | |
} | |
} | |
function l(e, t) { | |
e.nodeValue = t + u.truncationChar | |
} | |
e = e || {}; | |
var c, d = window, | |
u = { | |
clamp: e.clamp || 2, | |
useNativeClamp: "undefined" == typeof e.useNativeClamp || e.useNativeClamp, | |
splitOnChars: e.splitOnChars || [".", "-", "\u2013", "\u2014", " "], | |
animate: e.animate || !1, | |
truncationChar: e.truncationChar || "\u2026", | |
truncationHTML: e.truncationHTML | |
}, | |
h = o.style, | |
p = o.innerHTML, | |
f = "undefined" != typeof o.style.webkitLineClamp, | |
m = u.clamp, | |
g = m.indexOf && (-1 < m.indexOf("px") || -1 < m.indexOf("em")); | |
u.truncationHTML && ((c = document.createElement("span")).innerHTML = u.truncationHTML); | |
var v, y, b, w = u.splitOnChars.slice(0), | |
_ = w[0]; | |
if ("auto" == m ? m = t() : g && (m = t(parseInt(m))), f && u.useNativeClamp) h.overflow = "hidden", h.textOverflow = "ellipsis", h.webkitBoxOrient = "vertical", h.display = "-webkit-box", h.webkitLineClamp = m, g && (h.height = u.clamp + "px"); | |
else { | |
var x = i(m); | |
x <= o.clientHeight && (b = a(r(o), x)) | |
} | |
return { | |
original: p, | |
clamped: b | |
} | |
} | |
window.$clamp = e | |
}(), | |
function(p) { | |
p.Bideo = function() { | |
this.opt = null, this.videoEl = null, this.approxLoadingRate = null, this._resize = null, this._progress = null, this.startTime = null, this.onLoadCalled = !1, this.init = function(e) { | |
this.opt = e = e || {}; | |
var o = this; | |
o._resize = o.resize.bind(this), o.videoEl = e.videoEl, o.videoEl.addEventListener("loadedmetadata", o._resize, !1), o.videoEl.addEventListener("canplay", function() { | |
o.opt.isMobile || (o.opt.onLoad && o.opt.onLoad(), !1 !== o.opt.autoplay && o.videoEl.play()) | |
}), o.opt.resize && p.addEventListener("resize", o._resize, !1), this.startTime = (new Date).getTime(), this.opt.src.forEach(function(e) { | |
var t, n, i = document.createElement("source"); | |
for (t in e) e.hasOwnProperty(t) && (n = e[t], i.setAttribute(t, n)); | |
o.videoEl.appendChild(i) | |
}), o.opt.isMobile && o.opt.playButton && (o.opt.videoEl.addEventListener("timeupdate", function() { | |
o.onLoadCalled || (o.opt.onLoad && o.opt.onLoad(), o.onLoadCalled = !0) | |
}), o.opt.playButton.addEventListener("click", function() { | |
o.opt.pauseButton.style.display = "inline-block", this.style.display = "none", o.videoEl.play() | |
}, !1), o.opt.pauseButton.addEventListener("click", function() { | |
this.style.display = "none", o.opt.playButton.style.display = "inline-block", o.videoEl.pause() | |
}, !1)) | |
}, this.resize = function() { | |
if (!("object-fit" in document.body.style)) { | |
var e = this.videoEl.videoWidth, | |
t = this.videoEl.videoHeight, | |
n = (e / t).toFixed(2), | |
i = this.opt.container, | |
o = p.getComputedStyle(i), | |
s = parseInt(o.getPropertyValue("width")), | |
r = parseInt(o.getPropertyValue("height")); | |
if ("border-box" !== o.getPropertyValue("box-sizing")) { | |
var a = o.getPropertyValue("padding-top"), | |
l = o.getPropertyValue("padding-bottom"), | |
c = o.getPropertyValue("padding-left"), | |
d = o.getPropertyValue("padding-right"); | |
a = parseInt(a), l = parseInt(l), s += (c = parseInt(c)) + (d = parseInt(d)), r += a + l | |
} | |
if (r / t < s / e) var u = s, | |
h = Math.ceil(u / n); | |
else h = r, u = Math.ceil(h * n); | |
this.videoEl.style.width = u + "px", this.videoEl.style.height = h + "px" | |
} | |
} | |
} | |
}(window), | |
function(s, i, e, u) { | |
"use strict"; | |
function a(e, t, n) { | |
return setTimeout(l(e, n), t) | |
} | |
function o(e, t, n) { | |
return !!Array.isArray(e) && (r(e, n[t], n), !0) | |
} | |
function r(e, t, n) { | |
var i; | |
if (e) | |
if (e.forEach) e.forEach(t, n); | |
else if (e.length !== u) | |
for (i = 0; i < e.length;) t.call(n, e[i], i, e), i++; | |
else | |
for (i in e) e.hasOwnProperty(i) && t.call(n, e[i], i, e) | |
} | |
function t(i, e, t) { | |
var o = "DEPRECATED METHOD: " + e + "\n" + t + " AT \n"; | |
return function() { | |
var e = new Error("get-stack-trace"), | |
t = e && e.stack ? e.stack.replace(/^[^\(]+?[\n$]/gm, "").replace(/^\s+at\s+/gm, "").replace(/^Object.<anonymous>\s*\(/gm, "{anonymous}()@") : "Unknown Stack Trace", | |
n = s.console && (s.console.warn || s.console.log); | |
return n && n.call(s.console, o, t), i.apply(this, arguments) | |
} | |
} | |
function n(e, t, n) { | |
var i, o = t.prototype; | |
(i = e.prototype = Object.create(o)).constructor = e, i._super = o, n && ae(i, n) | |
} | |
function l(e, t) { | |
return function() { | |
return e.apply(t, arguments) | |
} | |
} | |
function c(e, t) { | |
return typeof e == de ? e.apply(t && t[0] || u, t) : e | |
} | |
function d(e, t) { | |
return e === u ? t : e | |
} | |
function h(t, e, n) { | |
r(g(e), function(e) { | |
t.addEventListener(e, n, !1) | |
}) | |
} | |
function p(t, e, n) { | |
r(g(e), function(e) { | |
t.removeEventListener(e, n, !1) | |
}) | |
} | |
function f(e, t) { | |
for (; e;) { | |
if (e == t) return !0; | |
e = e.parentNode | |
} | |
return !1 | |
} | |
function m(e, t) { | |
return -1 < e.indexOf(t) | |
} | |
function g(e) { | |
return e.trim().split(/\s+/g) | |
} | |
function v(e, t, n) { | |
if (e.indexOf && !n) return e.indexOf(t); | |
for (var i = 0; i < e.length;) { | |
if (n && e[i][n] == t || !n && e[i] === t) return i; | |
i++ | |
} | |
return -1 | |
} | |
function y(e) { | |
return Array.prototype.slice.call(e, 0) | |
} | |
function b(e, n, t) { | |
for (var i = [], o = [], s = 0; s < e.length;) { | |
var r = n ? e[s][n] : e[s]; | |
v(o, r) < 0 && i.push(e[s]), o[s] = r, s++ | |
} | |
return t && (i = n ? i.sort(function(e, t) { | |
return e[n] > t[n] | |
}) : i.sort()), i | |
} | |
function w(e, t) { | |
for (var n, i, o = t[0].toUpperCase() + t.slice(1), s = 0; s < le.length;) { | |
if ((i = (n = le[s]) ? n + o : t) in e) return i; | |
s++ | |
} | |
return u | |
} | |
function _() { | |
return ge++ | |
} | |
function x(e) { | |
var t = e.ownerDocument || e; | |
return t.defaultView || t.parentWindow || s | |
} | |
function k(t, e) { | |
var n = this; | |
this.manager = t, this.callback = e, this.element = t.element, this.target = t.options.inputTarget, this.domHandler = function(e) { | |
c(t.options.enable, [t]) && n.handler(e) | |
}, this.init() | |
} | |
function C(e) { | |
var t = e.options.inputClass; | |
return new(t || (be ? z : we ? H : ye ? B : N))(e, S) | |
} | |
function S(e, t, n) { | |
var i = n.pointers.length, | |
o = n.changedPointers.length, | |
s = t & Te && i - o == 0, | |
r = t & (De | Ae) && i - o == 0; | |
n.isFirst = !!s, n.isFinal = !!r, s && (e.session = {}), n.eventType = t, T(e, n), e.emit("hammer.input", n), e.recognize(n), e.session.prevInput = n | |
} | |
function T(e, t) { | |
var n = e.session, | |
i = t.pointers, | |
o = i.length; | |
n.firstInput || (n.firstInput = A(t)), 1 < o && !n.firstMultiple ? n.firstMultiple = A(t) : 1 === o && (n.firstMultiple = !1); | |
var s = n.firstInput, | |
r = n.firstMultiple, | |
a = r ? r.center : s.center, | |
l = t.center = E(i); | |
t.timeStamp = pe(), t.deltaTime = t.timeStamp - s.timeStamp, t.angle = L(a, l), t.distance = P(a, l), $(n, t), t.offsetDirection = M(t.deltaX, t.deltaY); | |
var c = O(t.deltaTime, t.deltaX, t.deltaY); | |
t.overallVelocityX = c.x, t.overallVelocityY = c.y, t.overallVelocity = he(c.x) > he(c.y) ? c.x : c.y, t.scale = r ? R(r.pointers, i) : 1, t.rotation = r ? I(r.pointers, i) : 0, t.maxPointers = n.prevInput ? t.pointers.length > n.prevInput.maxPointers ? t.pointers.length : n.prevInput.maxPointers : t.pointers.length, D(n, t); | |
var d = e.element; | |
f(t.srcEvent.target, d) && (d = t.srcEvent.target), t.target = d | |
} | |
function $(e, t) { | |
var n = t.center, | |
i = e.offsetDelta || {}, | |
o = e.prevDelta || {}, | |
s = e.prevInput || {}; | |
(t.eventType === Te || s.eventType === De) && (o = e.prevDelta = { | |
x: s.deltaX || 0, | |
y: s.deltaY || 0 | |
}, i = e.offsetDelta = { | |
x: n.x, | |
y: n.y | |
}), t.deltaX = o.x + (n.x - i.x), t.deltaY = o.y + (n.y - i.y) | |
} | |
function D(e, t) { | |
var n, i, o, s, r = e.lastInterval || t, | |
a = t.timeStamp - r.timeStamp; | |
if (t.eventType != Ae && (Se < a || r.velocity === u)) { | |
var l = t.deltaX - r.deltaX, | |
c = t.deltaY - r.deltaY, | |
d = O(a, l, c); | |
i = d.x, o = d.y, n = he(d.x) > he(d.y) ? d.x : d.y, s = M(l, c), e.lastInterval = t | |
} else n = r.velocity, i = r.velocityX, o = r.velocityY, s = r.direction; | |
t.velocity = n, t.velocityX = i, t.velocityY = o, t.direction = s | |
} | |
function A(e) { | |
for (var t = [], n = 0; n < e.pointers.length;) t[n] = { | |
clientX: ue(e.pointers[n].clientX), | |
clientY: ue(e.pointers[n].clientY) | |
}, n++; | |
return { | |
timeStamp: pe(), | |
pointers: t, | |
center: E(t), | |
deltaX: e.deltaX, | |
deltaY: e.deltaY | |
} | |
} | |
function E(e) { | |
var t = e.length; | |
if (1 === t) return { | |
x: ue(e[0].clientX), | |
y: ue(e[0].clientY) | |
}; | |
for (var n = 0, i = 0, o = 0; o < t;) n += e[o].clientX, i += e[o].clientY, o++; | |
return { | |
x: ue(n / t), | |
y: ue(i / t) | |
} | |
} | |
function O(e, t, n) { | |
return { | |
x: t / e || 0, | |
y: n / e || 0 | |
} | |
} | |
function M(e, t) { | |
return e === t ? Ee : he(e) >= he(t) ? e < 0 ? Oe : Me : t < 0 ? Pe : Le | |
} | |
function P(e, t, n) { | |
n || (n = ze); | |
var i = t[n[0]] - e[n[0]], | |
o = t[n[1]] - e[n[1]]; | |
return Math.sqrt(i * i + o * o) | |
} | |
function L(e, t, n) { | |
n || (n = ze); | |
var i = t[n[0]] - e[n[0]], | |
o = t[n[1]] - e[n[1]]; | |
return 180 * Math.atan2(o, i) / Math.PI | |
} | |
function I(e, t) { | |
return L(t[1], t[0], je) + L(e[1], e[0], je) | |
} | |
function R(e, t) { | |
return P(t[0], t[1], je) / P(e[0], e[1], je) | |
} | |
function N() { | |
this.evEl = He, this.evWin = We, this.allow = !0, this.pressed = !1, k.apply(this, arguments) | |
} | |
function z() { | |
this.evEl = Ve, this.evWin = qe, k.apply(this, arguments), this.store = this.manager.session.pointerEvents = [] | |
} | |
function j() { | |
this.evTarget = Ge, this.evWin = Xe, this.started = !1, k.apply(this, arguments) | |
} | |
function F(e, t) { | |
var n = y(e.touches), | |
i = y(e.changedTouches); | |
return t & (De | Ae) && (n = b(n.concat(i), "identifier", !0)), [n, i] | |
} | |
function H() { | |
this.evTarget = Je, this.targetIds = {}, k.apply(this, arguments) | |
} | |
function W(e, t) { | |
var n = y(e.touches), | |
i = this.targetIds; | |
if (t & (Te | $e) && 1 === n.length) return i[n[0].identifier] = !0, [n, n]; | |
var o, s, r = y(e.changedTouches), | |
a = [], | |
l = this.target; | |
if (s = n.filter(function(e) { | |
return f(e.target, l) | |
}), t === Te) | |
for (o = 0; o < s.length;) i[s[o].identifier] = !0, o++; | |
for (o = 0; o < r.length;) i[r[o].identifier] && a.push(r[o]), t & (De | Ae) && delete i[r[o].identifier], o++; | |
return a.length ? [b(s.concat(a), "identifier", !0), a] : void 0 | |
} | |
function B() { | |
k.apply(this, arguments); | |
var e = l(this.handler, this); | |
this.touch = new H(this.manager, e), this.mouse = new N(this.manager, e) | |
} | |
function U(e, t) { | |
this.manager = e, this.set(t) | |
} | |
function V(e) { | |
if (m(e, it)) return it; | |
var t = m(e, ot), | |
n = m(e, st); | |
return t && n ? it : t || n ? t ? ot : st : m(e, nt) ? nt : tt | |
} | |
function q(e) { | |
this.options = ae({}, this.defaults, e || {}), this.id = _(), this.manager = null, this.options.enable = d(this.options.enable, !0), this.state = rt, this.simultaneous = {}, this.requireFail = [] | |
} | |
function Y(e) { | |
return e & ut ? "cancel" : e & ct ? "end" : e & lt ? "move" : e & at ? "start" : "" | |
} | |
function G(e) { | |
return e == Le ? "down" : e == Pe ? "up" : e == Oe ? "left" : e == Me ? "right" : "" | |
} | |
function X(e, t) { | |
var n = t.manager; | |
return n ? n.get(e) : e | |
} | |
function Z() { | |
q.apply(this, arguments) | |
} | |
function J() { | |
Z.apply(this, arguments), this.pX = null, this.pY = null | |
} | |
function K() { | |
Z.apply(this, arguments) | |
} | |
function Q() { | |
q.apply(this, arguments), this._timer = null, this._input = null | |
} | |
function ee() { | |
Z.apply(this, arguments) | |
} | |
function te() { | |
Z.apply(this, arguments) | |
} | |
function ne() { | |
q.apply(this, arguments), this.pTime = !1, this.pCenter = !1, this._timer = null, this._input = null, this.count = 0 | |
} | |
function ie(e, t) { | |
return (t = t || {}).recognizers = d(t.recognizers, ie.defaults.preset), new oe(e, t) | |
} | |
function oe(e, t) { | |
this.options = ae({}, ie.defaults, t || {}), this.options.inputTarget = this.options.inputTarget || e, this.handlers = {}, this.session = {}, this.recognizers = [], this.element = e, this.input = C(this), this.touchAction = new U(this, this.options.touchAction), se(this, !0), r(this.options.recognizers, function(e) { | |
var t = this.add(new e[0](e[1])); | |
e[2] && t.recognizeWith(e[2]), e[3] && t.requireFailure(e[3]) | |
}, this) | |
} | |
function se(e, n) { | |
var i = e.element; | |
i.style && r(e.options.cssProps, function(e, t) { | |
i.style[w(i.style, t)] = n ? e : "" | |
}) | |
} | |
function re(e, t) { | |
var n = i.createEvent("Event"); | |
n.initEvent(e, !0, !0), (n.gesture = t).target.dispatchEvent(n) | |
} | |
var ae, le = ["", "webkit", "Moz", "MS", "ms", "o"], | |
ce = i.createElement("div"), | |
de = "function", | |
ue = Math.round, | |
he = Math.abs, | |
pe = Date.now; | |
ae = "function" != typeof Object.assign ? function(e) { | |
if (e === u || null === e) throw new TypeError("Cannot convert undefined or null to object"); | |
for (var t = Object(e), n = 1; n < arguments.length; n++) { | |
var i = arguments[n]; | |
if (i !== u && null !== i) | |
for (var o in i) i.hasOwnProperty(o) && (t[o] = i[o]) | |
} | |
return t | |
} : Object.assign; | |
var fe = t(function(e, t, n) { | |
for (var i = Object.keys(t), o = 0; o < i.length;)(!n || n && e[i[o]] === u) && (e[i[o]] = t[i[o]]), o++; | |
return e | |
}, "extend", "Use `assign`."), | |
me = t(function(e, t) { | |
return fe(e, t, !0) | |
}, "merge", "Use `assign`."), | |
ge = 1, | |
ve = /mobile|tablet|ip(ad|hone|od)|android/i, | |
ye = "ontouchstart" in s, | |
be = w(s, "PointerEvent") !== u, | |
we = ye && ve.test(navigator.userAgent), | |
_e = "touch", | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment