"use strict";
angular.module("payment.popup", ["config", "google.analytics", "notifier", "popup", "purse.service", "system.data"]).factory("paymentPopup", ["$q", "$translate", "$window", "CONFIG", "SystemData", "googleAnalytics", "notifier", "popup", "purse", function (e, t, o, r, a, n, i, s, l) {
function c(e) {
return "/proceed/" + [e.requestPath, e.purchaseParams.countryId, e.purchaseParams.pricePointId, e.purchaseParams.paymentMethodId].join("/")
}
function u(e) {
var t = a.getShopCountry();
t !== e && n.trackEvent("Payment", "Country changed", "Used: " + e + ", Default: " + t)
}
var d = {};
return d.getItemName = function (o) {
var r = ["CREDITS_AMOUNT"];
return o.creditAmount ? (o.doubleCredits && r.push("DOUBLE_CREDITS_PREFIX"), t(r, {value: o.creditAmount}).then(function (e) {
return _([e.DOUBLE_CREDITS_PREFIX, e.CREDITS_AMOUNT]).compact().join(" ")
})) : e.when(o.name)
}, d.sendShopTrackingEvents = function (e, t, r) {
var a = "Item: " + t + ", Method: " + r;
switch (e) {
case"SUCCESS":
n.trackEvent("Payment", "Succeeded", a), o.piwikTrack && (o._spef.push(["trackGoal", 2, a]), o.piwikTrack());
break;
case"PENDING":
n.trackEvent("Payment", "Pending", a);
break;
case"ERROR":
n.trackEvent("Payment", "Failed", a);
break;
default:
n.trackEvent("Payment", "Aborted", a)
}
}, d.open = function (e, t) {
function a(o) {
o.originalEvent.data && o.originalEvent.data.status && (p = o.originalEvent.data.status, "SUCCESS" !== p && "PENDING" !== p || (l.update(), u(t.countryCode), d.getItemName(t).then(function (e) {
var r = o.originalEvent.data.txId, a = o.originalEvent.data.currency,
i = o.originalEvent.data.priceInCents, s = _(t.categories).sort().join(", "),
l = Number(i / 100).toFixed(2);
n.trackTransaction(r, e, t.id, s, l, a)
})), d.sendShopTrackingEvents(p, t.id, e.id))
}
function m() {
"SUCCESS" === p && d.getItemName(t).then(function (e) {
i.success("SHOP_PAYMENT_SUCCESS", {name: e})
})
}
var p, h = c(e);
return angular.element(o).on("message", a), s.open(r.shopUrl + h).then(function () {
m(), angular.element(o).off("message", a)
})
}, d
}]), angular.module("sub.product.icons", ["locale", "templates"]).component("habboSubProductIcons", {
bindings: {subProducts: "<"},
controllerAs: "SubProductIconsController",
templateUrl: "shop/payment-details/product-payment-details/sub-product-icons/sub-product-icons.html"
}), angular.module("payment.premium.sms", ["config", "locale", "templates", "voucher.redeem"]).component("habboPremiumSms", {
bindings: {method: "<"},
controller: ["CONFIG", function (e) {
var t = this, o = [e.localizationSite, t.method.localizationKey].join("_");
t.methodSmallPrintKey = ["SHOP_PAYMENTMETHOD_SMALLPRINT", o].join("_").toUpperCase(), t.methodInstructionKey = ["SHOP_PAYMENTMETHOD_INSTRUCTION", o].join("_").toUpperCase()
}],
controllerAs: "PremiumSmsController",
templateUrl: "shop/payment-details/payment-steps/premium-sms/premium-sms.html",
transclude: !0
}), angular.module("payment.methods", ["locale", "payment.button", "security", "shop.filters", "templates"]).component("habboPaymentMethods", {
require: {PaymentStepsController: "^habboPaymentSteps"},
bindings: {item: "<", selectedCategory: "@"},
controllerAs: "PaymentMethodsController",
templateUrl: "shop/payment-details/payment-steps/payment-methods/payment-methods.html"
}), angular.module("payment.disclaimer", ["ngSanitize", "config", "locale", "payment.button", "templates"]).component("habboPaymentDisclaimer", {
bindings: {
item: "<",
method: "<"
},
controller: ["CONFIG", function (e) {
var t = this, o = [e.localizationSite, t.method.localizationKey].join("_");
t.methodSmallPrintKey = ["SHOP_PAYMENTMETHOD_SMALLPRINT", o].join("_").toUpperCase(), t.methodInstructionKey = ["SHOP_PAYMENTMETHOD_INSTRUCTION", o].join("_").toUpperCase()
}],
controllerAs: "PaymentDisclaimerController",
templateUrl: "shop/payment-details/payment-steps/payment-disclaimer/payment-disclaimer.html"
}), angular.module("payment.button", ["events", "locale", "payment.popup", "security", "templates"]).component("habboPaymentButton", {
bindings: {
item: "<",
method: "<"
},
controller: ["$scope", "EVENTS", "Session", "loginModal", "paymentPopup", function (e, t, o, r, a) {
function n() {
return _.includes(i, s.method.category)
}
var i = ["builders", "subscription"], s = this;
s.translationKey = n() ? "SHOP_SUBSCRIPTION_SUBSCRIBE_BUTTON" : "SHOP_PAYMENT_BUTTON", s.paymentInProgress = !1, o.hasSession() ? s.purchase = function () {
s.paymentInProgress = !0, a.open(s.method, s.item).then(function () {
e.$emit(t.shopPaymentClose)
})["finally"](function () {
s.paymentInProgress = !1
})
} : s.purchase = r.open
}],
controllerAs: "PaymentButtonController",
templateUrl: "shop/payment-details/payment-steps/payment-button/payment-button.html"
}), angular.module("adyen.service", ["adyen-cse-js", "config"]).factory("adyen", ["$http", "CONFIG", "adyenCse", function (e, t, o) {
return {
encryptAndSend: function (r, a, n) {
var i = {
number: r.number,
cvc: r.cvc,
holderName: r.name,
expiryMonth: r.expMonth.toString(),
expiryYear: r.expYear.toString(),
generationtime: a
}, s = {
countryId: n.purchaseParams.countryId,
pricePointId: n.purchaseParams.pricePointId,
paymentMethodId: n.id,
creditCardNonce: o.encrypt(i)
};
return e.post(t.shopUrl + "/payment/adyen/", s)
}
}
}]), angular.module("adyen-cse-js", ["config"]).factory("adyenCse", ["$window", "CONFIG", function (e, t) {
var o = t.adyenPublicKey, r = {}, a = e.adyen.encrypt.createEncryption(o, r);
return a
}]), angular.module("payment.adyen", ["adyen.service", "config", "credit.card", "events", "locale", "notifier", "purse.service", "templates"]).component("habboAdyen", {
bindings: {
method: "<",
item: "<"
},
controller: ["$window", "$http", "$scope", "$rootScope", "$translate", "CONFIG", "EVENTS", "adyen", "notifier", "paymentPopup", "purse", function (e, t, o, r, a, n, i, s, l, c, u) {
var d = this;
d.state = "AWAITING_INPUT", d.transactionId = "", d.close = function () {
r.$broadcast(i.accordionClose), r.$broadcast(i.accordionUpdate)
}, d.showInputForm = function () {
d.transactionId = "", d.state = "AWAITING_INPUT"
}, d.onSend = function (e) {
var o = n.apiUrl + "/public/info/time";
return t.get(o).then(function (t) {
var o = new Date(t.data.time).toISOString();
return s.encryptAndSend(e, o, d.method).then(function (e) {
if (e.data.success === !0) u.update(), d.transactionId = e.data.transactionId, d.state = "SUCCESS", d.card = {}, c.getItemName(d.item).then(function (e) {
l.success("SHOP_PAYMENT_SUCCESS", {name: e})
}), c.sendShopTrackingEvents("SUCCESS", d.item.id, d.method.id); else switch (d.state = "FAILURE", e.data.message) {
case"LIMIT_EXCEEDED":
d.errorType = "LIMIT_EXCEEDED";
break;
case"RISK_CHECK_FAILED":
d.errorType = "RISK_CHECK_FAILED";
break;
case"CONNECTION_FAILED:422":
d.errorType = "USER_DATA";
break;
default:
Bugsnag.notify("Adyen integration returned unexpected result", {
groupingHash: "Payments",
response: e.data.message
}, "info"), d.errorType = "HTTP_ERROR"
}
})["catch"](function (e) {
d.state = "FAILURE", d.errorType = "HTTP_ERROR", d.errorMsg = e.data.errorDetail.content.instructions
})
})["catch"](function () {
l.error("ERROR_SERVER")
})
}
}],
controllerAs: "AdyenController",
templateUrl: "shop/payment-details/payment-steps/adyen/adyen.html",
transclude: !0
}), angular.module("remote.data", []).directive("habboRemoteData", function () {
function e(e) {
return "remoteData" + t(e)
}
function t(e) {
return e.charAt(0).toUpperCase() + e.slice(1)
}
function o(e) {
return "$" !== e[0]
}
return {
restrict: "A", require: ["^form", "ngModel"], link: function (t, r, a, n) {
var i, s = n[0], l = n[1], c = t.$eval(a.habboRemoteData);
t.$on("remote-data-invalid", function (t, o) {
_(c).includes(o) && (i = e(o), l.$setValidity(i, !1))
}), t.$watch(function () {
return l.$viewValue
}, function () {
i && _(s).keys().filter(o).forEach(function (e) {
s[e].$setValidity(i, !0)
})
})
}
}
}), angular.module("password.pattern", []).directive("habboPasswordPattern", function () {
return {
require: "ngModel", restrict: "A", link: function (e, t, o, r) {
function a() {
var e = r.$viewValue;
return !e || r.$pristine || i(e)
}
function n(e) {
r.$setValidity("passwordPattern", e)
}
function i(e) {
return /(?=.*[A-Za-z])(?=.*[0-9-=?!@:.])/.test(e)
}
e.$watch(a, n)
}
}
}), angular.module("password.name", []).directive("habboPasswordName", function () {
return {
require: "ngModel", restrict: "A", link: function (e, t, o, r) {
function a(e) {
return n && (_(e).includes(n) || _(e).includes(i))
}
var n, i;
o.$observe("habboPasswordName", function (e) {
n = e, i = n.split("").reverse().join(""), r.$validate()
}), r.$validators.passwordName = function (e, t) {
return r.$isEmpty(e) || !a(t)
}
}
}
}), angular.module("password.email", []).directive("habboPasswordEmail", function () {
return {
require: "ngModel", restrict: "A", link: function (e, t, o, r) {
function a(e) {
return n && (_(e).includes(n) || _(e).includes(i))
}
var n, i;
o.$observe("habboPasswordEmail", function (e) {
n = e, i = n.split("").reverse().join(""), r.$validate()
}), r.$validators.passwordEmail = function (e, t) {
return r.$isEmpty(e) || !a(t)
}
}
}
}), angular.module("matches", []).directive("habboMatches", function () {
return {
require: ["^form", "ngModel"], restrict: "A", scope: {habboMatches: "@"}, link: function (e, t, o, r) {
function a() {
var t = i[e.habboMatches], o = s.$viewValue;
return !o || s.$pristine || t.$invalid || t.$viewValue === o
}
function n(e) {
s.$setValidity("matches", e)
}
var i = r[0], s = r[1];
e.$watch(a, n)
}
}
}), angular.module("email", []).directive("habboEmail", function () {
var e = /^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))$/i;
return {
require: "ngModel", restrict: "A", link: function (t, o, r, a) {
a && a.$validators.email && (a.$validators.email = function (t) {
return a.$isEmpty(t) || e.test(t)
})
}
}
}), angular.module("password.strength.service", []).factory("passwordStrength", function () {
var e = "abcdefghijklmnopqrstuvwxyz", t = "01234567890", o = /\d/g, r = "\\!@#$%&/()=?¿",
a = /[$-\/:-?{-~!^_`\[\]]/g, n = /(?=([a-z]{2}))/g, i = /(?=([A-Z]{2}))/g, s = /(?=(\d{2}))/g, l = /^[0-9]*$/g,
c = /^([a-z]|[A-Z])*$/g;
return function (u) {
var d, m, p, h, f = 0, b = {pos: {}, neg: {}}, g = {pos: {}, neg: {seqLetter: 0, seqNumber: 0, seqSymbol: 0}};
if (u) {
for (b.pos.lower = u.match(/[a-z]/g), b.pos.upper = u.match(/[A-Z]/g), b.pos.numbers = u.match(o), b.pos.symbols = u.match(a), b.pos.middleNumber = u.slice(1, -1).match(o), b.pos.middleSymbol = u.slice(1, -1).match(a), g.pos.lower = b.pos.lower ? b.pos.lower.length : 0, g.pos.upper = b.pos.upper ? b.pos.upper.length : 0, g.pos.numbers = b.pos.numbers ? b.pos.numbers.length : 0, g.pos.symbols = b.pos.symbols ? b.pos.symbols.length : 0, p = _.reduce(g.pos, function (e, t) {
return e + Math.min(1, t)
}, 0), g.pos.numChars = u.length, p += g.pos.numChars >= 8 ? 1 : 0, g.pos.requirements = p >= 3 ? p : 0, g.pos.middleNumber = b.pos.middleNumber ? b.pos.middleNumber.length : 0, g.pos.middleSymbol = b.pos.middleSymbol ? b.pos.middleSymbol.length : 0, b.neg.consecLower = u.match(n), b.neg.consecUpper = u.match(i), b.neg.consecNumbers = u.match(s), b.neg.onlyNumbers = u.match(l), b.neg.onlyLetters = u.match(c), g.neg.consecLower = b.neg.consecLower ? b.neg.consecLower.length : 0, g.neg.consecUpper = b.neg.consecUpper ? b.neg.consecUpper.length : 0, g.neg.consecNumbers = b.neg.consecNumbers ? b.neg.consecNumbers.length : 0, h = 0; h < e.length - 2; h++) {
var v = u.toLowerCase();
m = e.substring(h, parseInt(h + 3, 10)), d = m.split("").reverse().join(""), -1 === v.indexOf(m) && -1 === v.indexOf(d) || g.neg.seqLetter++
}
for (h = 0; h < t.length - 2; h++)m = t.substring(h, parseInt(h + 3, 10)), d = m.split("").reverse().join(""), -1 === u.indexOf(m) && -1 === u.toLowerCase().indexOf(d) || g.neg.seqNumber++;
for (h = 0; h < r.length - 2; h++)m = r.substring(h, parseInt(h + 3, 10)), d = m.split("").reverse().join(""), -1 === u.indexOf(m) && -1 === u.toLowerCase().indexOf(d) || g.neg.seqSymbol++;
return g.neg.repeated = _(u.toLowerCase().split("")).countBy(function (e) {
return e
}).reject(function (e) {
return 1 === e
}).reduce(function (e, t) {
return e + t
}, 0), f += 4 * g.pos.numChars, g.pos.upper && (f += 2 * (g.pos.numChars - g.pos.upper)), g.pos.lower && (f += 2 * (g.pos.numChars - g.pos.lower)), (g.pos.upper || g.pos.lower) && (f += 4 * g.pos.numbers), f += 6 * g.pos.symbols, f += 2 * (g.pos.middleSymbol + g.pos.middleNumber), f += 2 * g.pos.requirements, f -= 2 * g.neg.consecLower, f -= 2 * g.neg.consecUpper, f -= 2 * g.neg.consecNumbers, f -= 3 * g.neg.seqNumber, f -= 3 * g.neg.seqLetter, f -= 3 * g.neg.seqSymbol, b.neg.onlyNumbers && (f -= g.pos.numChars), b.neg.onlyLetters && (f -= g.pos.numChars), g.neg.repeated && (f -= g.neg.repeated / g.pos.numChars * 10), Math.max(0, Math.min(100, Math.round(f)))
}
}
}), angular.module("password.strength.indicator", ["ngAnimate"]).directive("habboPasswordStrengthIndicator", ["$animate", function (e) {
return {
restrict: "A", link: function (t, o, r) {
var a = "10%";
t.$watch(r.habboPasswordStrengthIndicator, function (t) {
var r = t + "%";
e.animate(o, {width: a}, {width: r}), a = r
})
}
}
}]), angular.module("password.strength.filters", []).filter("strengthRating", function () {
return function (e) {
switch (Math.round(e / 25)) {
case 1:
return "poor";
case 2:
return "fair";
case 3:
return "ok";
case 4:
return "good";
default:
return "fail"
}
}
}).filter("ratingTranslation", function () {
return function (e) {
return "PASSWORD_STRENGTH_RATING_" + e.toUpperCase()
}
}), angular.module("password.strength", ["locale", "password.strength.filters", "password.strength.indicator", "password.strength.service", "templates"]).component("habboPasswordStrength", {
require: {FormController: "^form"},
bindings: {modelValue: "<", modelName: "@"},
controller: ["$scope", "passwordStrength", function (e, t) {
var o = this;
e.$watch("PasswordStrengthController.modelValue", function (e) {
o.FormController[o.modelName].$valid && (o.score = t(e))
}), e.$watch("PasswordStrengthController.FormController." + o.modelName + ".$invalid", function (e) {
e && (o.score = 10)
})
}],
controllerAs: "PasswordStrengthController",
templateUrl: "common/form/password-new/password-strength/password-strength.html",
transclude: !0
}), angular.module("voucher.icon", ["templates"]).component("habboVoucherIcon", {
bindings: {
credits: "",
product: ""
}, controllerAs: "VoucherIconController", templateUrl: "shop/voucher-redeem/voucher-icon/voucher-icon.html"
}), angular.module("shop.transactions.history", ["locale", "templates"]).component("habboTransactionsHistory", {
bindings: {
transactions: "<",
limitTo: "@"
},
controllerAs: "TransactionsHistoryController",
templateUrl: "shop/transactions/transactions-history/transactions-history.html"
}), angular.module("subscription.thumbnail", ["credit.icon", "locale", "templates"]).component("habboSubscriptionThumbnail", {
bindings: {item: "<"},
controllerAs: "SubscriptionThumbnailController",
templateUrl: "shop/thumbnails/subscription-thumbnail/subscription-thumbnail.html"
}), angular.module("product.thumbnail", ["product.icon", "templates"]).component("habboProductThumbnail", {
bindings: {item: "<"},
controllerAs: "ProductThumbnailController",
templateUrl: "shop/thumbnails/product-thumbnail/product-thumbnail.html"
}), angular.module("offer.thumbnail", ["locale", "product.icon", "templates"]).component("habboOfferThumbnail", {
bindings: {item: "<"},
controllerAs: "OfferThumbnailController",
templateUrl: "shop/thumbnails/offer-thumbnail/offer-thumbnail.html"
}), angular.module("credit.thumbnail", ["credit.icon", "credit.title", "templates"]).component("habboCreditThumbnail", {
bindings: {item: "<"},
controllerAs: "CreditThumbnailController",
templateUrl: "shop/thumbnails/credit-thumbnail/credit-thumbnail.html"
}), angular.module("shop.targeted.offer", ["accordion", "offer.payment.details", "offer.thumbnail", "templates"]).component("habboTargetedOffer", {
bindings: {offer: "<"},
controller: function () {
var e = this;
e.offerPaymentDetails = {
imageUrl: e.offer.imageUrl,
smallImageUrl: e.offer.smallImageUrl,
name: e.offer.header,
description: e.offer.description,
price: e.offer.pricePoint.price,
paymentMethods: e.offer.pricePoint.paymentMethods
}
},
controllerAs: "TargetedOfferController",
templateUrl: "shop/store/targeted-offer/targeted-offer.html"
}), angular.module("products", ["accordion", "locale", "product.payment.details", "product.thumbnail", "templates"]).component("habboProducts", {
bindings: {
items: "<",
selectedCategory: "@"
}, controllerAs: "ProductsController", templateUrl: "shop/store/inventory/products.html"
}), angular.module("shop.inventory", ["credits", "products", "shop.filters", "templates"]).component("habboInventory", {
bindings: {
inventory: "<",
selectedCategory: "@"
}, controller: ["creditFilter", "paymentFilter", "productFilter", function (e, t, o) {
var r = this, a = t(r.inventory.pricePoints, r.selectedCategory);
r.creditItems = e(a), r.productItems = o(a), r.isDoubleCreditsActive = r.inventory.doubleCredits
}], controllerAs: "InventoryController", templateUrl: "shop/store/inventory/inventory.html"
}), angular.module("credits", ["accordion", "credit.payment.details", "credit.thumbnail", "locale", "templates"]).component("habboCredits", {
bindings: {
items: "<",
selectedCategory: "@"
}, controllerAs: "CreditsController", templateUrl: "shop/store/inventory/credits.html"
}), angular.module("category.filter", ["locale", "templates"]).component("habboCategoryFilter", {
bindings: {
paymentCategories: "<",
selectedCategory: "="
}, controller: ["$location", function (e) {
var t = this;
t.isActive = function (e) {
return e === t.selectedCategory || "all" === e && !t.selectedCategory
}, t.update = function (o) {
var r = t.selectedCategory;
t.selectedCategory = "all" === o ? null : o, t.selectedCategory !== r && e.search(_.extend(e.search(), {category: t.selectedCategory}))
}
}], controllerAs: "CategoryFilterController", templateUrl: "shop/store/category-filter/category-filter.html"
}), angular.module("subscription.payment.details", ["locale", "payment.info", "payment.steps", "product.icon", "templates"]).component("habboSubscriptionPaymentDetails", {
bindings: {item: "<"},
controllerAs: "SubscriptionPaymentDetailsController",
templateUrl: "shop/payment-details/subscription-payment-details/subscription-payment-details.html"
}), angular.module("product.payment.details", ["payment.info", "payment.steps", "product.icon", "sub.product.icons", "templates"]).component("habboProductPaymentDetails", {
bindings: {
item: "<",
selectedCategory: "@"
},
controllerAs: "ProductPaymentDetailsController",
templateUrl: "shop/payment-details/product-payment-details/product-payment-details.html"
}), angular.module("payment.steps", ["config", "locale", "payment.adyen", "payment.disclaimer", "payment.methods", "payment.premium.sms", "security", "templates"]).component("habboPaymentSteps", {
bindings: {
item: "<",
selectedCategory: "@"
},
controller: ["$scope", "CONFIG", "EVENTS", "Session", function (e, t, o, r) {
function a() {
i.disclaimerMethod = null, i.premiumSmsMethod = null, i.adyenMethod = null
}
function n() {
e.$emit(o.accordionUpdate)
}
var i = this;
i.user = r.user, i.disclaimerMethod = null, i.premiumSmsMethod = null, i.adyenMethod = null, i.setDisclaimer = function (e) {
i.disclaimerMethod = e, n()
}, i.setPremiumSms = function (e) {
i.premiumSmsMethod = e, n()
}, i.setAdyen = function (e) {
i.adyenMethod = e, n()
}, i.reset = function () {
a(), n()
}, i.getMethodTitleKey = function (e) {
var o = [t.localizationSite, e.localizationKey].join("_");
return ["SHOP_PAYMENTMETHOD_TITLE", o].join("_").toUpperCase()
}, e.$on(o.accordionClose, a)
}],
controllerAs: "PaymentStepsController",
templateUrl: "shop/payment-details/payment-steps/payment-steps.html",
transclude: !0
}), angular.module("payment.info", ["locale", "templates"]).directive("habboPaymentInfo", function () {
return {
restrict: "E", scope: {}, templateUrl: function (e, t) {
return ["shop/payment-details/payment-info/payment-info-", t.type, ".html"].join("")
}
}
}), angular.module("offer.payment.details", ["locale", "payment.info", "payment.steps", "templates"]).component("habboOfferPaymentDetails", {
bindings: {offerPaymentDetails: "<"},
controllerAs: "OfferPaymentDetailsController",
templateUrl: "shop/payment-details/offer-payment-details/offer-payment-details.html"
}), angular.module("credit.payment.details", ["credit.icon", "credit.title", "locale", "payment.info", "payment.steps", "templates"]).component("habboCreditPaymentDetails", {
bindings: {
item: "<",
selectedCategory: "@"
},
controllerAs: "CreditPaymentDetailsController",
templateUrl: "shop/payment-details/credit-payment-details/credit-payment-details.html"
}), angular.module("earn.credits.frame", ["locale", "security", "templates"]).component("habboEarnCreditsFrame", {
bindings: {offerWallUrl: "@"},
controllerAs: "EarnCreditsFrameController",
templateUrl: "shop/earn-credits/earn-credits-frame/earn-credits-frame.html"
}), angular.module("credit.card.icon", ["templates"]).component("habboCreditCardIcon", {
bindings: {
credits: "",
product: ""
},
controllerAs: "CreditCardIconController",
templateUrl: "shop/credit-card-form/credit-card-icon/credit-card-icon.html"
}), angular.module("activation.status", ["locale", "message.container", "notifier", "security", "settings.service", "templates"]).component("habboActivationStatus", {
controller: ["Session", "notifier", "settings", function (e, t, o) {
var r = this;
r.user = e.user, r.resendInProgress = !1, r.isSent = !1, r.resend = function () {
r.resendInProgress = !0, o.resendActivationEmail().then(function () {
r.isSent = !0, t.success("ACTIVATION_RESEND_SUCESS")
})["catch"](function () {
t.error("ERROR_SERVER")
})["finally"](function () {
r.resendInProgress = !1
})
}
}],
controllerAs: "ActivationStatusController",
templateUrl: "settings/email-change/activation-status/activation-status.html"
}), angular.module("avatar.selector", ["avatar.service", "imager", "locale", "notifier", "security", "templates"]).component("habboAvatarSelector", {
bindings: {avatar: "<"},
controller: ["$window", "Session", "avatar", "notifier", function (e, t, o, r) {
var a = this;
a.isSelected = a.avatar.uniqueId === t.user.uniqueId, a.selectionInProgress = !1, a.select = function () {
a.selectionInProgress = !0, o.select(a.avatar).then(function () {
e.location.href = "/settings/avatars"
})["catch"](function () {
r.error("ERROR_SERVER"), a.selectionInProgress = !1
})
}
}],
controllerAs: "AvatarSelectorController",
templateUrl: "settings/avatar-selection/avatar-search/avatar-selector.html"
}), angular.module("avatar.search", ["avatar.selector", "by.name.description.or.motto.filter", "empty.results", "form", "templates"]).component("habboAvatarSearch", {
bindings: {avatars: "<"},
controllerAs: "AvatarSearchController",
templateUrl: "settings/avatar-selection/avatar-search/avatar-search.html"
}), angular.module("avatar.name.check", ["avatar.service"]).directive("habboAvatarNameCheck", ["$q", "avatar", function (e, t) {
return {
restrict: "A", require: "ngModel", link: function (o, r, a, n) {
n.$asyncValidators.name = function (o, r) {
return r ? t.isNameAvailable(r) : e.when()
}
}
}
}]), angular.module("avatar.create.modal", ["avatar.create.form", "templates", "ui.bootstrap"]).factory("avatarCreateModal", ["$uibModal", function (e) {
var t, o = {};
return o.open = function () {
return t = e.open({
size: "sm",
templateUrl: "settings/avatar-selection/avatar-create/avatar-create-modal.html"
}), t.result
}, o
}]), angular.module("avatar.create.form", ["avatar.name.check", "avatar.service", "locale", "notifier", "templates"]).component("habboAvatarCreateForm", {
bindings: {
onCreate: "&",
onCancel: "&"
},
controller: ["$scope", "avatar", "notifier", function (e, t, o) {
var r = this;
r.createInProgress = !1, r.create = function () {
e.avatarCreateForm.$valid && !e.avatarCreateForm.$pending && (r.createInProgress = !0, t.create(r.name).then(r.onCreate)["catch"](function (e) {
403 !== e.status && o.error("ERROR_SERVER")
})["finally"](function () {
r.createInProgress = !1
}))
}
}],
controllerAs: "AvatarCreateFormController",
templateUrl: "settings/avatar-selection/avatar-create/avatar-create-form.html"
}), angular.module("avatar.create", ["avatar.create.modal", "locale", "security", "templates"]).directive("habboAvatarCreate", ["$window", "Session", "avatarCreateModal", "safetyLockModal", function (e, t, o, r) {
return {
restrict: "E",
scope: {avatars: "="},
templateUrl: "settings/avatar-selection/avatar-create/avatar-create.html",
link: function (a) {
function n() {
o.open().then(function () {
e.location.href = "/hotel"
})
}
a.emailVerified = t.user.emailVerified, a.identityVerified = t.user.identityVerified, a.MAX_AVATARS = window.chocolatey.maxAvatars, a.open = function () {
t.isTrusted() ? n() : r.open().then(n)
}
}
}
}]), angular.module("safety.questions.modal", ["safety.questions.form", "templates", "ui.bootstrap"]).factory("safetyQuestionsModal", ["$uibModal", function (e) {
var t, o = {};
return o.open = function () {
return t = e.open({templateUrl: "settings/account-security/safety-questions/safety-questions-modal.html"}), t.result
}, o
}]), angular.module("safety.questions.form", ["account.security.service", "form", "locale", "notifier", "safety.question.filters", "templates"]).constant("QUESTIONS", _.range(1, 10).map(function (e) {
return {questionId: e.toString(), questionKey: "IDENTITY_SAFETYQUESTION_" + e}
})).component("habboSafetyQuestionsForm", {
bindings: {onSave: "&", onCancel: "&"},
controller: ["$scope", "QUESTIONS", "accountSecurity", "notifier", function (e, t, o, r) {
var a = this;
a.saveInProgress = !1, a.questions = t, a.selectedQuestion1 = a.questions[0], a.selectedQuestion2 = a.questions[1], a.save = function () {
e.safetyQuestionsForm.$valid && (a.saveInProgress = !0, o.save(a.selectedQuestion1.questionId, a.answer1, a.selectedQuestion2.questionId, a.answer2, a.password).then(function () {
a.onSave(), r.success("ACCOUNT_SECURITY_SAVED_OK")
})["catch"](function (t) {
var o = t.data && t.data.error;
"invalid_password" === o ? e.$broadcast("remote-data-invalid", "password") : 403 !== t.status && r.error("ERROR_SERVER")
})["finally"](function () {
a.saveInProgress = !1
}))
}
}],
controllerAs: "SafetyQuestionsFormController",
templateUrl: "settings/account-security/safety-questions/safety-questions-form.html"
}), angular.module("safety.question.filters", []).filter("question", function () {
return function (e, t) {
return _.without(e, t)
}
}), angular.module("security.login.rpx", ["locale", "security.rpx"]).directive("habboRpxLogin", ["$timeout", "rpxSecurity", function (e, t) {
return {
restrict: "E",
scope: {},
template: '',
link: function (o, r) {
var a = e(t.init);
r.on("$destroy", function () {
e.cancel(a), t.destroy()
})
}
}
}]), angular.module("security.facebook.connect", ["locale", "notifier", "security.service", "templates"]).component("habboFacebookConnect", {
bindings: {
onLogin: "&",
translationKey: "@"
}, controller: ["notifier", "security", function (e, t) {
var o = this;
o.loginInProgress = !1, o.fbLogin = function () {
o.loginInProgress = !0, t.fbLogin().then(o.onLogin)["catch"](function (t) {
var o = t.data && t.data.message;
"fb.sdk_not_loaded" === o ? e.error("ERROR_FB_SDK") : "unknown" !== t.status && "force.pending" !== t.status && e.error("ERROR_SERVER")
})["finally"](function () {
o.loginInProgress = !1
})
}
}], controllerAs: "FacebookConnectController", templateUrl: "security/login/facebook-connect/facebook-connect.html"
}), angular.module("recover.password.modal", ["claim.password.form", "locale", "templates", "ui.bootstrap"]).controller("RecoverPasswordController", ["email", function (e) {
var t = this;
t.email = e
}]).factory("recoverPasswordModal", ["$uibModal", function (e) {
var t = {};
return t.open = function (t) {
return e.open({
controller: "RecoverPasswordController",
controllerAs: "RecoverPasswordController",
resolve: {email: _.constant(t)},
size: "sm",
templateUrl: "security/login/claim-password/recover-password-modal.html"
}).result
}, t
}]), angular.module("claim.password.form", ["form", "locale", "notifier", "password.reset.service", "templates"]).component("habboClaimPasswordForm", {
bindings: {
cancel: "&",
emailAddress: ""
},
controller: ["$scope", "notifier", "passwordReset", function (e, t, o) {
var r = this;
r.sent = !1, r.sendingInProgress = !1, r.send = function () {
e.claimPasswordForm.$valid && (r.sendingInProgress = !0, o.send(r.emailAddress).then(function (e) {
r.emailAddress = e.data.email, r.sent = !0
})["catch"](function () {
t.error("ERROR_SERVER")
})["finally"](function () {
r.sendingInProgress = !1
}))
}
}],
controllerAs: "ClaimPasswordFormController",
templateUrl: "security/login/claim-password/claim-password-form.html",
transclude: !0
}), angular.module("claim.password", ["claim.password.form", "form", "locale", "templates", "ui.bootstrap"]).factory("claimPasswordModal", ["$uibModal", function (e) {
var t = {};
return t.open = function () {
return e.open({size: "sm", templateUrl: "security/login/claim-password/claim-password-modal.html"}).result
}, t
}]).component("habboClaimPassword", {
controller: ["claimPasswordModal", function (e) {
var t = this;
t.openModal = e.open
}],
controllerAs: "ClaimPasswordController",
template: ''
}), angular.module("captcha.modal", ["form", "templates", "ui.bootstrap"]).controller("CaptchaController", ["$scope", "$uibModalInstance", function (e, t) {
e.$watch("captchaToken", function (e) {
e && t.close(e)
})
}]).factory("captchaModal", ["$uibModal", function (e) {
var t = {};
return t.open = function () {
return e.open({
controller: "CaptchaController",
size: "sm",
templateUrl: "security/login/captcha-modal/captcha-modal.html",
windowClass: "captcha-modal"
}).result
}, t
}]), angular.module("security.force.tos.modal", ["locale", "security.force.service", "security.force.tos.form", "templates", "ui.bootstrap"]).factory("forceTOSModal", ["$uibModal", "FORCE", function (e, t) {
var o = {};
return o.open = function (o) {
return e.open({
size: "sm",
templateUrl: "security/force/force-tos/force-tos-modal.html"
}).result.then(function () {
return o.force = _.without(o.force, t.TOS), o
})
}, o
}]), angular.module("security.force.tos.form", ["locale", "notifier", "security.force.service", "templates"]).component("habboForceTosForm", {
bindings: {
onDismiss: "&",
onSuccess: "&"
}, controller: ["$scope", "force", "notifier", function (e, t, o) {
var r = this;
r.acceptInProgress = !1, r.accept = function () {
r.acceptInProgress = !0, t.acceptTOS().then(function () {
r.onSuccess(), o.success("FORCED_TOS_CHANGE_SUCCESS")
})["catch"](function () {
o.error("ERROR_SERVER")
})["finally"](function () {
r.acceptInProgress = !1
})
}
}], controllerAs: "ForceTosFormController", templateUrl: "security/force/force-tos/force-tos-form.html"
}), angular.module("security.force.password.modal", ["locale", "security.force.password.form", "security.force.service", "templates", "ui.bootstrap"]).factory("forcePasswordModal", ["$uibModal", "FORCE", function (e, t) {
var o = {};
return o.open = function (o) {
return e.open({
size: "sm",
templateUrl: "security/force/force-password/force-password-modal.html"
}).result.then(function () {
return o.force = _.without(o.force, t.password), o
})
}, o
}]), angular.module("security.force.password.form", ["form", "locale", "notifier", "security.force.service", "templates"]).component("habboForcePasswordForm", {
bindings: {
onDismiss: "&",
onSuccess: "&"
},
controller: ["$scope", "force", "notifier", function (e, t, o) {
var r = this;
r.changeInProgress = !1, r.passwords = {}, r.change = function () {
e.forcePasswordChangeForm.$valid && (r.changeInProgress = !0, t.changePassword(r.passwords.password).then(function () {
r.onSuccess(), o.success("PASSWORD_CHANGE_SUCCESS")
})["catch"](function (t) {
var r = t.data && t.data.error;
"password.too_similar_to_username" === r ? e.$broadcast("remote-data-invalid", "passwordName") : "password.too_similar_to_email" === r ? e.$broadcast("remote-data-invalid", "passwordEmail") : "password.used_earlier" === r ? e.$broadcast("remote-data-invalid", "passwordUsed") : o.error("ERROR_SERVER")
})["finally"](function () {
r.changeInProgress = !1
}))
}
}],
controllerAs: "ForcePasswordFormController",
templateUrl: "security/force/force-password/force-password-form.html"
}), angular.module("security.force.email.modal", ["locale", "security.force.email.form", "security.force.service", "templates", "ui.bootstrap"]).controller("ForceEmailController", ["emailAddress", function (e) {
var t = this;
t.oldEmailAddress = e
}]).factory("forceEmailModal", ["$uibModal", "FORCE", function (e, t) {
var o = {};
return o.open = function (o) {
return e.open({
controller: "ForceEmailController",
controllerAs: "ForceEmailController",
size: "sm",
templateUrl: "security/force/force-email/force-email-modal.html",
resolve: {emailAddress: _.constant(o.email)}
}).result.then(function (e) {
return o.email = e, o.force = _.without(o.force, t.email), o
})
}, o
}]), angular.module("security.force.email.form", ["form", "locale", "notifier", "security.force.service", "templates"]).component("habboForceEmailForm", {
bindings: {
oldEmailAddress: "@",
onDismiss: "&",
onSuccess: "&"
}, controller: ["$scope", "force", "notifier", function (e, t, o) {
var r = this;
r.saveInProgress = !1, r.save = function () {
e.forceEmailChangeForm.$valid && (r.saveInProgress = !0, t.changeEmail(r.emailAddress).then(function (e) {
r.onSuccess({email: e.email}), o.success("EMAIL_FORCE_CHANGE_SUCCESS")
})["catch"](function (t) {
var r = t.data && t.data.error;
"changeEmail.invalid_email" === r ? e.$broadcast("remote-data-invalid", "emailInvalid") : "changeEmail.email_already_in_use" === r ? e.$broadcast("remote-data-invalid", "emailUsedInChange") : o.error("ERROR_SERVER")
})["finally"](function () {
r.saveInProgress = !1
}))
}
}], controllerAs: "ForceEmailFormController", templateUrl: "security/force/force-email/force-email-form.html"
}), angular.module("room.icon", ["remove.on.error", "show.on.load", "templates"]).component("habboRoomIcon", {
bindings: {url: "@"}, controllerAs: "RoomIconController", templateUrl: "profile/item-lists/room-icon/room-icon.html"
}), angular.module("report.service", ["config"]).factory("reporter", ["$http", "CONFIG", function (e, t) {
function o(e) {
return t.extraDataUrl + "/private/creation/" + e.id + "/report"
}
var r = {};
return r.sendReport = function (t) {
return e.post(o(t), {reason: t.reportReason})
}, r
}]), angular.module("report.modal", ["report.form", "templates", "ui.bootstrap"]).controller("ReportController", ["creation", function (e) {
var t = this;
t.creation = e
}]).factory("reportModal", ["$uibModal", function (e) {
var t, o = {};
return o.open = function (o) {
return t = e.open({
size: "lg",
controller: "ReportController",
controllerAs: "ReportController",
templateUrl: "profile/creation/report/report-modal.html",
resolve: {creation: _.constant(o)}
}), t.result
}, o
}]), angular.module("report.form", ["ngMessages", "locale", "notifier", "report.service", "reported.photos", "templates"]).component("habboReportForm", {
bindings: {
creation: "<",
onSuccess: "&",
onCancel: "&"
}, controller: ["$location", "$scope", "notifier", "reportedPhotos", "reporter", function (e, t, o, r, a) {
var n = this;
n.sendInProgress = !1, n.reasonCodes = [19, 20, 1, 32, 8], n.send = function () {
t.reportForm.$valid && (n.sendInProgress = !0, a.sendReport(n.creation).then(function () {
n.onSuccess(), r.save(n.creation.id), e.path("/community/photos").replace(), o.success("REPORT_SUCCESS")
})["catch"](function (e) {
429 === e.status ? o.error("ERROR_TOO_MANY_REPORTS") : 401 !== e.status && o.error("ERROR_SERVER")
})["finally"](function () {
n.sendInProgress = !1
}))
}
}], controllerAs: "ReportFormController", templateUrl: "profile/creation/report/report-form.html"
}), angular.module("report", ["locale", "report.modal", "templates"]).component("habboReport", {
bindings: {creation: "<"},
controller: ["reportModal", function (e) {
var t = this;
t.click = function () {
e.open(t.creation)
}
}],
controllerAs: "ReportController",
templateUrl: "profile/creation/report/report.html"
}), angular.module("photo.delete.service", ["ngResource", "config", "storage"]).factory("photoDelete", ["$http", "CONFIG", "httpCache", function (e, t, o) {
var r = {};
return r["delete"] = function (r) {
return e["delete"](t.extraDataUrl + "/private/photo/" + r).then(function () {
o.shortCache.removeAll()
})
}, r
}]), angular.module("photo.delete", ["locale", "photo.delete.service", "security", "templates"]).component("habboPhotoDelete", {
bindings: {creation: "<"},
controller: ["$location", "$translate", "$window", "Session", "notifier", "photoDelete", function (e, t, o, r, a, n) {
function i() {
n["delete"](s.creation.id).then(function () {
e.path("/profile/" + r.user.name).replace(), a.success("PHOTO_DELETION_SUCCESS")
})["catch"](function (e) {
401 !== e.status && a.error("ERROR_SERVER")
})
}
var s = this;
s["delete"] = function () {
t("PHOTO_DELETION_CONFIRMATION").then(function (e) {
o.confirm(e) && i()
})
}
}],
controllerAs: "PhotoDeleteController",
templateUrl: "profile/creation/photo-delete/photo-delete.html"
}), angular.module("interstitial.service", ["client.messenger", "google.analytics"]).factory("interstitial", ["$rootScope", "$timeout", "$window", "clientMessenger", "googleAnalytics", function (e, t, o, r, a) {
var n = {}, i = 15e3;
return n.started = !1, n.loaded = !1, n.start = function (s) {
function l(e) {
var o = e.originalEvent.data && e.originalEvent.data.category;
if ("interstitial" === o) {
var r = e.originalEvent.data && e.originalEvent.data.name;
b[r] && t(function () {
b[r](e.originalEvent.data)
})
}
}
function c() {
n.loaded = !0, f = e.$on("$locationChangeStart", function (e) {
e.preventDefault()
})
}
function u() {
a.trackEvent("Interstitial", "Start"), t.cancel(g)
}
function d(e) {
var t = _.upperFirst(e.name), o = e.remaining || 0, r = e.duration ? 1e3 * (e.duration - o) : null;
a.trackEvent("Interstitial", "End", t, r), h("complete")
}
function m() {
a.trackEvent("Interstitial", "Error", "Player"), h("incomplete")
}
function p() {
a.trackEvent("Interstitial", "Error", "Timeout"), h("incomplete")
}
function h(e) {
n.started = !1, n.loaded = !1, t.cancel(g), angular.element(o).off("message", l), f && f(), "midroll" === s && r.handle({interstitial: e})
}
var f, b = {load: c, start: u, complete: d, skip: d, error: m}, g = t(p, i);
angular.element(o).on("message", l), n.started = !0, a.trackEvent("Interstitial", "Init")
}, n.hasStarted = function () {
return n.started
}, n.hasLoaded = function () {
return n.loaded
}, n
}]), angular.module("interstitial", ["config", "interstitial.service", "locale", "templates"]).component("habboInterstitial", {
controller: ["$scope", "CONFIG", "interstitial", function (e, t, o) {
var r = this;
r.habboWebAdsUrl = t.habboWebAdsUrl, r.lang = t.lang, e.$watch(o.hasStarted, function (e) {
r.started = e
}), e.$watch(o.hasLoaded, function (e) {
r.loaded = e
})
}], controllerAs: "InterstitialController", templateUrl: "hotel/client/interstitial/interstitial.html"
}), angular.module("client.reload", ["locale", "templates"]).component("habboClientReload", {
bindings: {reload: "&"},
controllerAs: "ClientReloadController",
templateUrl: "hotel/client/client-reload/client-reload.html"
}), angular.module("client.error", ["config", "locale", "templates"]).component("habboClientError", {
controller: ["CONFIG", function (e) {
var t = this;
t.appStoreUrl = e.appStoreUrl, t.googlePlayUrl = e.googlePlayUrl
}], controllerAs: "ClientErrorController", templateUrl: "hotel/client/client-error/client-error.html"
}), angular.module("client.closed", ["hotel.closed", "templates"]).component("habboClientClosed", {templateUrl: "hotel/client/client-closed/client-closed.html"}), angular.module("client.close.expander", ["client.close.expand", "events"]).directive("habboClientCloseExpander", ["$timeout", "EVENTS", function (e, t) {
return {
restrict: "A", link: function (o, r) {
function a() {
c(), s = e(n, l)
}
function n() {
e(function () {
o.$broadcast("expander-shrink")
})
}
function i() {
e.cancel(s), e(function () {
o.$broadcast("expander-expand")
})
}
var s, l = 3e4, c = o.$on(t.clientOpen, a);
r.mouseenter(i), r.mouseleave(n)
}
}
}]), angular.module("client.close.expand", ["ngAnimate"]).directive("habboClientCloseExpand", ["$animate", function (e) {
return {
restrict: "A", link: function (t, o) {
function r() {
n(), i(c, 0)
}
function a() {
n(), i(l, c)
}
function n() {
c || (c = o.width())
}
function i(t, r) {
s && e.cancel(s), l = r, s = e.animate(o, {width: t}, {width: r})
}
var s, l, c;
t.$on("expander-expand", a), t.$on("expander-shrink", r)
}
}
}]), angular.module("local.register.banner", ["config", "language", "locale", "templates"]).component("habboLocalRegisterBanner", {
controller: ["CONFIG", "language", function (e, t) {
var o = this, r = t.toSite();
r && r.hotel !== e.hotel && (o.site = r)
}],
controllerAs: "LocalRegisterBannerController",
templateUrl: "home/register-banner/local-register-banner/local-register-banner.html"
}), angular.module("language", []).factory("language", ["$window", function (e) {
var t = {};
return t.toSite = function () {
var t = e.navigator.language ? e.navigator.language.substr(0, 2) : null;
switch (t) {
case"de":
return {hotel: "hhde", href: "https://www.habbo.de", localization: "DE", title: "Habbo.de"};
case"en":
return {hotel: "hhus", href: "https://www.habbo.com", localization: "EN", title: "Habbo.com"};
case"es":
return {hotel: "hhes", href: "https://www.habbo.es", localization: "ES", title: "Habbo.es"};
case"fr":
return {hotel: "hhfr", href: "https://www.habbo.fr", localization: "FR", title: "Habbo.fr"};
case"fi":
return {hotel: "hhfi", href: "https://www.habbo.fi", localization: "FI", title: "Habbo.fi"};
case"it":
return {hotel: "hhit", href: "https://www.habbo.it", localization: "IT", title: "Habbo.it"};
case"nl":
return {hotel: "hhnl", href: "https://www.habbo.nl", localization: "NL", title: "Habbo.nl"};
case"pt":
return {hotel: "hhbr", href: "https://www.habbo.com.br", localization: "PT", title: "Habbo.com.br"};
case"tr":
return {hotel: "hhtr", href: "https://www.habbo.com.tr", localization: "TR", title: "Habbo.com.tr"};
default:
return null
}
}, t
}]), angular.module("moderation.notification", ["google.analytics", "locale", "message.container", "moderation.service", "templates"]).component("habboModerationNotification", {
controller: ["PhotoModerations", "googleAnalytics", function (e, t) {
var o = this;
o.moderations = e.recentModerations(), o.moderations.$promise.then(function (e) {
e.length > 0 && t.trackEvent("Moderation", "Notification viewed")
})
}],
controllerAs: "ModerationNotificationController",
templateUrl: "home/news/moderation-notification/moderation-notification.html"
}), angular.module("moderation.service", ["ngResource", "config", "storage"]).factory("PhotoModerations", ["$resource", "CONFIG", "httpCache", function (e, t, o) {
return e(t.extraDataUrl + "/private/moderations/recentModerations", null, {
recentModerations: {
method: "GET",
isArray: !0,
cache: o.shortCache
}
})
}]), angular.module("discussions", ["avatar", "empty.results", "flash", "locale", "templates"]).component("habboDiscussions", {
bindings: {items: "<"},
controller: function () {
var e = this;
e.getParticipant = function (e) {
return _.values(e)[0]
}
},
controllerAs: "DiscussionsController",
templateUrl: "home/messaging/discussions/discussions.html"
}), angular.module("local.storage", []).factory("localStorage", ["$window", function (e) {
var t = {};
return t.get = function (t) {
try {
var o = e.localStorage.getItem(t);
return o ? angular.fromJson(o) : null
} catch (r) {
return Bugsnag.notifyException(r, "LocalStorage not supported", {groupingHash: "LocalStorage"}, "info"), null
}
}, t.set = function (t, o) {
try {
e.localStorage.setItem(t, angular.toJson(o))
} catch (r) {
Bugsnag.notifyException(r, "LocalStorage not supported", {groupingHash: "LocalStorage"}, "info")
}
}, t
}]), angular.module("cache", ["angular-cache", "config"]).config(["CacheFactoryProvider", function (e) {
angular.extend(e.defaults, {maxAge: 3e5, deleteOnExpire: "aggressive"})
}]).factory("httpCache", ["CacheFactory", function (e) {
return {shortCache: e.createCache("shortHttpCache"), longCache: e.createCache("longHttpCache", {maxAge: 36e5})}
}]), angular.module("user.menu", ["encode.uri.component", "false.on.outside.click", "imager", "locale", "router", "security", "templates", "zendesk.url"]).component("habboUserMenu", {
controller: ["$state", "Session", "notifier", "security", function (e, t, o, r) {
var a = this;
a.user = t.user, a.isMyProfileActive = function () {
return e.is("profile", {name: t.user.name})
}, a.isSettingsActive = function () {
return e.includes("settings")
}, a.logout = function () {
r.logout()["catch"](function () {
o.errorSticky("ERROR_LOGOUT_TITLE", "ERROR_LOGOUT_TEXT")
})
}
}], controllerAs: "UserMenuController", templateUrl: "common/header/user-menu/user-menu.html"
}), angular.module("navigation", ["encode.uri.component", "flash", "hotel.button", "locale", "security", "templates"]).component("habboNavigation", {
bindings: {active: "@"},
controllerAs: "NavigationController",
templateUrl: "common/header/navigation/navigation.html"
}), angular.module("hotel.button", ["locale", "templates"]).component("habboHotelButton", {templateUrl: "common/header/hotel-button/hotel-button.html"}), angular.module("header.ad", ["templates"]).component("habboHeaderAd", {
controller: ["$scope", "$location", function (e, t) {
function o() {
n.hasAd = r()
}
function r() {
return !_(a).some(function (e) {
return _(t.path()).includes(e)
})
}
var a = ["/playing-habbo/help", "/registration", "/reset-password", "/settings", "/shop"], n = this;
o(), e.$on("$stateChangeSuccess", o)
}], controllerAs: "HeaderAdController", templateUrl: "common/header/header-ad/header-ad.html"
}), angular.module("validators", ["email", "matches", "password.email", "password.name", "password.pattern", "password.strength", "remote.data"]), angular.module("search", ["locale", "templates"]).component("habboSearch", {
bindings: {query: "="},
controllerAs: "SearchController",
templateUrl: "common/form/search/search.html"
}), angular.module("password.toggle.mask", []).directive("habboPasswordToggleMask", function () {
return {
restrict: "A", link: function (e, t, o) {
function r(e) {
angular.element(e.currentTarget).toggleClass("active"), o.$set("type", "password" === o.type ? "text" : "password"), t.focus()
}
t.after(angular.element("", {
"class": "password-toggle-mask__icon", click: r, mousedown: function (e) {
e.preventDefault()
}
}))
}
}
}), angular.module("password.new", ["ngMessages", "locale", "password.strength", "password.toggle.mask", "templates", "validators"]).component("habboPasswordNew", {
require: {FormController: "^form"},
bindings: {isNew: "@", passwordNew: "=", passwordNewRepeated: "=", userName: "@", userEmail: "@"},
controllerAs: "PasswordNewController",
templateUrl: "common/form/password-new/password-new.html"
}), angular.module("password.current", ["ngMessages", "locale", "templates", "validators"]).component("habboPasswordCurrent", {
require: {FormController: "^form"},
bindings: {passwordCurrent: "="},
controllerAs: "PasswordCurrentController",
templateUrl: "common/form/password-current/password-current.html"
}), angular.module("email.address", ["ngMessages", "locale", "templates", "validators"]).component("habboEmailAddress", {
require: {FormController: "^form"},
bindings: {emailAddress: "="},
controllerAs: "EmailAddressController",
templateUrl: "common/form/email-address/email-address.html",
transclude: !0
}), angular.module("captcha", ["config", "locale", "noCAPTCHA", "templates"]).constant("CAPTCHA_EVENTS", {reset: "captcha-reset"}).component("habboCaptcha", {
require: {FormController: "^form"},
bindings: {captchaToken: "="},
controller: ["$scope", "CAPTCHA_EVENTS", function (e, t) {
var o = this;
o.noCaptchaController = {}, o.onExpire = function () {
o.captchaToken = null
}, e.$on(t.reset, function () {
o.noCaptchaController.reset(), o.FormController.captchaToken.$setViewValue(null)
})
}],
controllerAs: "CaptchaController",
templateUrl: "common/form/captcha/captcha.html"
}), angular.module("columns.profile", ["card", "infinite-scroll", "templates"]).component("habboColumnsProfile", {
bindings: {items: "<"},
controllerAs: "ColumnsProfileController",
templateUrl: "common/columns/columns-profile/columns-profile.html"
}), angular.module("columns.channel", ["avatar", "card", "infinite-scroll", "templates"]).component("habboColumnsChannel", {
bindings: {items: "<"},
controllerAs: "ColumnsChannelController",
templateUrl: "common/columns/columns-channel/columns-channel.html"
}), angular.module("card", ["creation.href", "like", "locale", "templates"]).component("habboCard", {
bindings: {item: "<"},
controllerAs: "CardController",
templateUrl: "common/columns/card/card.html",
transclude: !0
}), angular.module("ad.double.click", ["config", "locale", "ngDfp", "templates"]).constant("DOUBLE_CLICK_UNITS", {
inlineRectangle: {
id: "div-gpt-ad-1",
size: [300, 250]
}, leaderboard: {id: "div-gpt-ad-2", size: [728, 90]}, mobileLeaderboard: {size: [320, 50]}
}).config(["DOUBLE_CLICK_UNITS", "DoubleClickProvider", function (e, t) {
var o = "";
t.defineSlot(o, [e.inlineRectangle.size], e.inlineRectangle.id).defineSlot(o, [e.leaderboard.size, e.mobileLeaderboard.size], e.leaderboard.id), t.defineSizeMapping(e.leaderboard.id).addSize([768, 0], e.leaderboard.size).addSize([0, 0], e.mobileLeaderboard.size)
}]).component("habboAdDoubleClick", {
bindings: {unit: "@"},
controller: ["$scope", "$timeout", "$window", "DOUBLE_CLICK_UNITS", "DoubleClick", function (e, t, o, r, a) {
function n() {
var e = o.innerWidth;
e !== c && (a.refreshAds(l.id), c = e)
}
function i() {
s = t(function () {
a.refreshAds(l.id)
})
}
var s, l = this, c = o.innerWidth;
l.id = r[l.unit].id, angular.element(o).on("orientationchange resize", n), e.$on("$stateChangeSuccess", i), e.$on("$destroy", function () {
t.cancel(s), angular.element(o).off("orientationchange resize", n)
})
}],
controllerAs: "AdDoubleClickController",
templateUrl: "common/ad-unit/ad-double-click/ad-double-click.html"
}), angular.module("voucher.redeem.service", ["config", "google.analytics"]).factory("voucherRedeem", ["$http", "CONFIG", "googleAnalytics", function (e, t, o) {
return function (r) {
return e.post(t.shopUrl + "/voucher/redeem", {voucherCode: r}).then(function (e) {
return o.trackEvent("Voucher", "Redeemed"), e
})
}
}]), angular.module("voucher.redeem", ["events", "form", "locale", "notifier", "purse.service", "templates", "voucher.icon", "voucher.redeem.service"]).component("habboVoucherRedeem", {
controller: ["$compile", "$scope", "$timeout", "$translate", "EVENTS", "notifier", "purse", "voucherRedeem", function (e, t, o, r, a, n, i, s) {
function l() {
t.voucherRedeemForm.$setPristine(), d.voucherCode = ""
}
function c(e) {
return r("VOUCHER_REDEEM_NOTIFICATION_AWARDED").then(function (r) {
var a = t.$new();
a.credits = e.data.credits, a.product = e.data.product, a.credits && o(function () {
var e = u(a, '');
n.success(r + " " + e)
}), a.product && o(function () {
var e = u(a, '');
n.success(r + " " + e)
})
})
}
function u(t, o) {
var r = e(angular.element("
" + o + "
"))(t);
return t.$digest(), r.html()
}
var d = this;
d.redeemInProgress = !1, d.redeem = function () {
(d.redeemInProgress = !0, s(d.voucherCode).then(function (e) {
return i.update(), c(e)
})["catch"](function (e) {
var o = e.data && e.data.error;
"purse.redeem.code.dont_exist" === o ? t.$broadcast("remote-data-invalid", "nonexistent") : "purse.redeem.code.already_redeemed" === o ? t.$broadcast("remote-data-invalid", "redeemed") : t.$broadcast("remote-data-invalid", "failed")
})["finally"](function () {
d.redeemInProgress = !1
}))
}, t.$on(a.accordionClose, l), t.$watchGroup(["voucherRedeemForm.$invalid", "voucherRedeemForm.$pristine", "voucherRedeemForm.$submitted"], function () {
t.$emit(a.accordionUpdate)
})
}], controllerAs: "VoucherRedeemController", templateUrl: "shop/voucher-redeem/voucher-redeem.html"
}), angular.module("transactions", ["locale", "router", "shop.purse", "shop.service", "shop.transactions.list", "templates", "voucher.redeem", "web.pages"]).config(["$stateProvider", function (e) {
e.statePrivate("shop.transactions", {
url: "/history",
data: {title: "HEAD_TITLE_SHOP_HISTORY"},
controller: "TransactionsController",
controllerAs: "TransactionsController",
resolve: {
transactions: ["Shop", function (e) {
return e.history().$promise
}]
},
parent: "shop",
templateUrl: "shop/transactions/transactions.html"
})
}]).controller("TransactionsController", ["transactions", function (e) {
var t = this;
t.items = e
}]), angular.module("shop.transactions.list", ["empty.results", "locale", "shop.transactions.history", "templates"]).component("habboTransactionsList", {
bindings: {transactions: "<"},
controller: function () {
var e = this;
e.transactionLimit = 10, e.showAll = function () {
e.transactionLimit = 1 / 0, e.hideShowAll = !0
}
},
controllerAs: "TransactionsListController",
templateUrl: "shop/transactions/transactions-list.html"
}), angular.module("subscriptions", ["events", "locale", "router", "shop.countries", "shop.purse", "templates", "voucher.redeem", "web.pages"]).config(["$stateProvider", function (e) {
e.statePrivate("shop.subscriptions", {
url: "/subscriptions",
parent: "shop",
data: {title: "HEAD_TITLE_SHOP_SUBSCRIPTIONS"},
templateUrl: "shop/subscriptions/subscriptions.html"
})
}]),angular.module("store", ["category.filter", "events", "locale", "router", "shop.countries", "shop.inventory", "shop.purse", "shop.service", "shop.targeted.offer", "templates", "voucher.redeem", "web.pages"]).config(["$stateProvider", function (e) {
e.statePublic("shop.store", {
url: "?category",
controller: "StoreController",
controllerAs: "StoreController",
data: {title: "HEAD_TITLE_SHOP"},
resolve: {
countries: ["Shop", function (e) {
return e.countries().$promise
}], inventory: ["countryCode", "Shop", function (e, t) {
return t.inventory({countryCode: e}).$promise
}]
},
parent: "shop",
templateUrl: "shop/store/store.html"
})
}]).controller("StoreController", ["$interval", "$location", "$scope", "$state", "$stateParams", "EVENTS", "countries", "inventory", "scrolltop", function (e, t, o, r, a, n, i, s, l) {
var c, u = this;
u.countries = i, u.offer = s.offer, u.inventory = s, u.selectedCategory = a.category, u.offer && (c = e(function () {
moment(u.offer.expirationDate).isBefore() && (u.offer = null, e.cancel(c))
}, 1e3)), o.$on("$stateChangeStart", function (e, t) {
l.setEnabled("shop.store" !== t.name)
}), o.$on(n.securityLogin, function () {
"/shop" === t.path() && r.reload()
})
}]),angular.module("shop.footer", ["locale", "templates", "zendesk.url"]).component("habboShopFooter", {templateUrl: "shop/shop-footer/shop-footer.html"}),angular.module("shop.countries", ["locale", "templates"]).component("habboShopCountries", {
bindings: {
country: "<",
countries: "<"
}, controller: ["$scope", "$location", function (e, t) {
e.$watch("ShopCountriesController.country", function (e, o) {
var r = e && e.countryCode || null, a = o && o.countryCode || null;
r && r !== a && t.search({country: r})
})
}], controllerAs: "ShopCountriesController", templateUrl: "shop/shop-countries/shop-countries.html"
}),angular.module("purse.service", ["ngResource", "config"]).factory("purse", ["$resource", "CONFIG", function (e, t) {
var o = {}, r = {
creditBalance: "...",
diamondBalance: "...",
habboClubDays: "...",
buildersClubDays: "..."
}, a = e(t.shopUrl + "/purse");
return o.get = function () {
return r
}, o.update = function () {
a.get().$promise.then(function (e) {
r = e
})
}, o
}]),angular.module("shop.purse", ["config", "locale", "purse.service", "templates"]).component("habboPurse", {
controller: ["$scope", "purse", function (e, t) {
var o = this;
t.update(), e.$watch(t.get, function (e) {
o.purse = e
})
}], controllerAs: "PurseController", templateUrl: "shop/purse/purse.html"
}),angular.module("product.icon", []).component("habboProductIcon", {
bindings: {iconId: "@"},
controllerAs: "ProductIconController",
template: ''
}),angular.module("prepaid", ["compile", "locale", "router", "shop.purse", "shop.service", "templates", "voucher.redeem", "web.pages"]).config(["$stateProvider", function (e) {
e.statePublic("shop.prepaid", {
url: "/prepaid",
controller: "PrepaidController",
controllerAs: "PrepaidController",
data: {title: "HEAD_TITLE_SHOP_PREPAID"},
resolve: {
countries: ["Shop", function (e) {
return e.countries().$promise
}], country: ["countries", "countryCode", function (e, t) {
return _(e).find({countryCode: t}) || _(e).find({countryCode: "all"}) || e[0]
}], page: ["country", "webPages", function (e, t) {
return t.get("store/prepaid/prepaid_" + e.countryCode)
}]
},
parent: "shop",
templateUrl: "shop/prepaid/prepaid.html"
})
}]).controller("PrepaidController", ["countries", "country", "page", function (e, t, o) {
var r = this;
r.countries = e, r.country = t, r.page = o
}]),angular.module("earn.credits", ["earn.credits.frame", "earn.credits.service", "locale", "router", "shop.purse", "templates", "web.pages"]).config(["$stateProvider", function (e) {
e.statePrivate("shop.earnCredits", {
url: "/earn-credits",
controller: "EarnCreditsController",
controllerAs: "EarnCreditsController",
data: {title: "HEAD_TITLE_SHOP_EARN_CREDITS"},
parent: "shop",
resolve: {
offerWallUrl: ["OfferWallUrl", function (e) {
return e.get().$promise
}]
},
templateUrl: "shop/earn-credits/earn-credits.html"
})
}]).controller("EarnCreditsController", ["offerWallUrl", function (e) {
var t = this;
t.offerWallUrl = e
}]),angular.module("earn.credits.service", ["ngResource", "config"]).factory("OfferWallUrl", ["$resource", "CONFIG", function (e, t) {
return e(t.shopUrl + "/offerwall/url")
}]),angular.module("credit.title", ["locale", "templates"]).component("habboCreditTitle", {
bindings: {
amount: "@",
doubleCredits: "@"
}, controller: function () {
var e = this;
e.isDouble = "true" === e.doubleCredits
}, controllerAs: "CreditTitleController", templateUrl: "shop/credit-title/credit-title.html"
}),angular.module("credit.icon", ["templates"]).component("habboCreditIcon", {
bindings: {
amount: "@",
doubleCredits: "@"
}, controller: function () {
var e = [0, 30, 50, 80, 100, 250, 1e3], t = this;
t.isDouble = "true" === t.doubleCredits, t.getIndex = function (t) {
var o = _.curry(function (e, t) {
return t > e
});
return _.findIndex(e, o(parseInt(t, 10)))
}
}, controllerAs: "CreditIconController", templateUrl: "shop/credit-icon/credit-icon.html"
}),angular.module("credit.card", ["credit-cards", "credit.card.icon", "events", "form", "locale", "notifier", "purse.service", "templates"]).component("habboCreditCardForm", {
bindings: {
onSubmit: "&",
card: "="
},
controller: ["$compile", "$rootScope", "$scope", "$timeout", "$translate", "EVENTS", function (e, t, o, r, a, n) {
var i = this;
i.paymentInProgress = !1, i.markActiveAndSubmit = function (e) {
i.paymentInProgress = !0, i.onSubmit(e).then(function () {
i.paymentInProgress = !1
})
}, o.$watch(function () {
return _.size(o.creditCardForm.$error)
}, function () {
t.$broadcast(n.accordionResize)
})
}],
controllerAs: "CreditCardController",
templateUrl: "shop/credit-card-form/credit-card-form.html"
}),angular.module("privacy.settings", ["locale", "privacy.settings.form", "privacy.settings.service", "router", "templates"]).config(["$stateProvider", function (e) {
e.statePrivate("settings.privacy", {
url: "/privacy",
controller: "PrivacySettingsController",
controllerAs: "PrivacySettingsController",
parent: "settings",
data: {title: "HEAD_TITLE_PRIVACY_SETTINGS"},
resolve: {
privacySettings: ["PrivacySettings", function (e) {
return e.query().$promise
}]
},
templateUrl: "settings/privacy-settings/privacy-settings.html"
})
}]).controller("PrivacySettingsController", ["privacySettings", function (e) {
var t = this;
t.privacySettings = e
}]),angular.module("privacy.settings.form", ["google.analytics", "locale", "notifier", "privacy.settings.service", "templates"]).component("habboPrivacySettingsForm", {
bindings: {privacySettings: "<"},
controller: ["$scope", "googleAnalytics", "notifier", function (e, t, o) {
var r = this;
r.save = function () {
e.privacySettingsForm.$pristine ? o.success("SETTINGS_SAVED_OK") : (r.sendInProgress = !0, r.privacySettings.$save().then(function () {
t.trackEvent("Privacy settings", "Saved"), o.success("SETTINGS_SAVED_OK"), e.privacySettingsForm.$setPristine()
})["catch"](function () {
o.error("ERROR_SERVER")
})["finally"](function () {
r.sendInProgress = !1
}))
}
}],
controllerAs: "PrivacySettingsFormController",
templateUrl: "settings/privacy-settings/privacy-settings-form.html"
}),angular.module("privacy.settings.service", ["ngResource", "config"]).factory("PrivacySettings", ["$resource", "CONFIG", function (e, t) {
return e(t.apiUrl + "/user/preferences", {}, {
query: {method: "GET", isArray: !1},
save: {method: "POST", url: t.apiUrl + "/user/preferences/save"}
})
}]),angular.module("password.change", ["locale", "password.change.form", "router", "templates"]).config(["$stateProvider", function (e) {
e.stateHabboAccountTrusted("settings.password", {
url: "/password",
parent: "settings",
data: {title: "HEAD_TITLE_PASSWORD_CHANGE"},
templateUrl: "settings/password-change/password-change.html"
})
}]),angular.module("password.change.form", ["form", "locale", "notifier", "security", "settings.service", "templates"]).component("habboPasswordChangeForm", {
controller: ["$scope", "Session", "notifier", "settings", function (e, t, o, r) {
function a() {
e.changePasswordForm.$setPristine(), n.passwords = {}
}
var n = this;
n.user = t.user, n.updateInProgress = !1, n.update = function () {
e.changePasswordForm.$valid && (n.updateInProgress = !0, r.changePassword(n.passwords).then(function () {
a(), o.success("PASSWORD_CHANGE_SUCCESS")
})["catch"](function (t) {
if (409 === t.status) {
var r = t.data && t.data.error;
"password.used_earlier" === r ? e.$broadcast("remote-data-invalid", "passwordUsed") : "password.too_similar_to_username" === r ? e.$broadcast("remote-data-invalid", "passwordName") : "password.too_similar_to_email" === r ? e.$broadcast("remote-data-invalid", "passwordEmail") : e.$broadcast("remote-data-invalid", "password")
} else 403 !== t.status && o.error("ERROR_SERVER")
})["finally"](function () {
n.updateInProgress = !1
}))
}
}], controllerAs: "PasswordChangeFormController", templateUrl: "settings/password-change/password-change-form.html"
}),angular.module("email.change", ["activation.status", "email.change.form", "locale", "router", "templates"]).config(["$stateProvider", function (e) {
e.stateHabboAccountTrusted("settings.email", {
url: "/email",
parent: "settings",
data: {title: "HEAD_TITLE_EMAIL_CHANGE"},
templateUrl: "settings/email-change/email-change.html"
})
}]),angular.module("email.change.form", ["form", "locale", "notifier", "security", "settings.service", "templates"]).component("habboEmailChangeForm", {
controller: ["$scope", "Session", "notifier", "settings", function (e, t, o, r) {
function a() {
e.emailChangeForm.$setPristine(), n.emailChangeData = {}
}
var n = this;
n.user = t.user, n.updateInProgress = !1, n.update = function () {
e.emailChangeForm.$valid && (n.updateInProgress = !0, r.changeEmail(n.emailChangeData).then(function () {
a(), o.success("EMAIL_CHANGE_SUCCESS")
})["catch"](function (t) {
var r = t.data && t.data.error;
"registration_email" === r || "changeEmail.invalid_email" === r ? e.$broadcast("remote-data-invalid", "emailInvalid") : "changeEmail.email_already_in_use" === r ? e.$broadcast("remote-data-invalid", "emailUsedInChange") : "changeEmail.invalid_password" === r ? e.$broadcast("remote-data-invalid", "password") : 403 !== t.status && o.error("ERROR_SERVER")
})["finally"](function () {
n.updateInProgress = !1
}))
}
}], controllerAs: "EmailChangeFormController", templateUrl: "settings/email-change/email-change-form.html"
}),angular.module("avatar.service", ["config", "google.analytics", "security", "security.session"]).factory("avatar", ["$http", "$q", "CONFIG", "Session", "googleAnalytics", function (e, t, o, r, a) {
var n = {};
return n.query = function () {
return e.get(o.apiUrl + "/user/avatars").then(function (e) {
return e.data
})
}, n.create = function (t) {
return e.post(o.apiUrl + "/user/avatars", {name: t}).then(function (e) {
return a.trackEvent("Avatar", "Created"), r.update(e.data), e.data
})
}, n.isNameAvailable = function (r) {
return e.get(o.apiUrl + "/user/avatars/check-name?name=" + r).then(function (e) {
return e.data.isAvailable ? t.when() : t.reject()
})
}, n.select = function (t) {
return e.post(o.apiUrl + "/user/avatars/select", t).then(function (e) {
return a.trackEvent("Avatar", "Changed"), r.update(e.data), e.data
})
}, n
}]),angular.module("avatar.selection", ["avatar.create", "avatar.search", "avatar.service", "locale", "router", "security", "templates", "security.session"]).config(["$stateProvider", "$urlRouterProvider", function (e, t) {
e.statePrivate("settings.avatar", {
url: "/avatars",
parent: "settings",
controller: "AvatarSelectionController",
controllerAs: "AvatarSelectionController",
data: {title: "HEAD_TITLE_AVATAR_SELECTION"},
resolve: {
avatars: ["avatar", function (e) {
return e.query()
}]
},
templateUrl: "settings/avatar-selection/avatar-selection.html"
}), t.when("/avatars", "/settings/avatars")
}]).controller("AvatarSelectionController", ["avatars", function (e) {
var t = this;
t.avatars = e
}]),angular.module("trusted.locations.reset", ["account.security.service", "locale", "notifier", "templates"]).component("habboTrustedLocationsReset", {
controller: ["$translate", "$window", "accountSecurity", "notifier", function (e, t, o, r) {
function a() {
o.reset().then(function () {
r.success("ACCOUNT_SECURITY_TRUSTED_LOGINS_RESET_OK")
})["catch"](function (e) {
403 !== e.status && r.error("ERROR_SERVER")
})["finally"](function () {
n.inProgress = !1
})
}
var n = this;
n.reset = function () {
n.inProgress = !0, e("ACCOUNT_SECURITY_RESET_LOCATIONS_CONFIRMATION").then(function (e) {
t.confirm(e) ? a() : n.inProgress = !1
})
}
}],
controllerAs: "TrustedLocationsResetController",
templateUrl: "settings/account-security/trusted-locations-reset.html"
}),angular.module("account.security.service", ["config", "google.analytics"]).factory("accountSecurity", ["$http", "CONFIG", "googleAnalytics", function (e, t, o) {
var r = {};
return r.status = function () {
return e.get(t.apiUrl + "/safetylock/featureStatus").then(function (e) {
return e.data
})
}, r.save = function (r, a, n, i, s) {
return e.post(t.apiUrl + "/safetylock/save", {
questionId1: r,
answer1: a,
questionId2: n,
answer2: i,
password: s
}).then(function () {
o.trackEvent("Safety lock", "Questions saved")
})
}, r.disable = function () {
return e.get(t.apiUrl + "/safetylock/disable").then(function () {
o.trackEvent("Safety lock", "Disabled")
})
}, r.reset = function () {
return e.get(t.apiUrl + "/safetylock/resetTrustedLogins").then(function () {
o.trackEvent("Safety lock", "Trusted locations reset")
})
}, r
}]),angular.module("account.security", ["account.security.edit", "account.security.service", "locale", "router", "templates", "trusted.locations.reset"]).config(["$stateProvider", function (e) {
e.stateHabboAccountTrusted("settings.security", {
url: "/security",
controller: "AccountSecurityController",
controllerAs: "AccountSecurityController",
parent: "settings",
data: {title: "HEAD_TITLE_ACCOUNT_SECURITY"},
resolve: {
accountSecurityStatus: ["accountSecurity", function (e) {
return e.status()
}]
},
templateUrl: "settings/account-security/account-security.html"
})
}]).controller("AccountSecurityController", ["accountSecurityStatus", function (e) {
var t = this;
t.accountSecurityStatus = e
}]),angular.module("account.security.edit", ["account.security.service", "locale", "message.container", "notifier", "safety.questions.modal", "templates"]).component("habboAccountSecurityEdit", {
bindings: {accountSecurityStatus: "="},
controller: ["$translate", "$window", "accountSecurity", "notifier", "safetyQuestionsModal", function (e, t, o, r, a) {
function n() {
o.disable().then(function () {
i.accountSecurityStatus = "disabled", r.success("ACCOUNT_SECURITY_DISABLED_OK")
})["catch"](function (e) {
403 !== e.status && r.error("ERROR_SERVER")
})["finally"](function () {
i.disableInProgress = !1
})
}
var i = this;
i.modal = a, i.openModal = function () {
a.open().then(function () {
i.accountSecurityStatus = "enabled"
})
}, i.disable = function () {
i.disableInProgress = !0, e("ACCOUNT_SECURITY_DISABLE_CONFIRMATION").then(function (e) {
t.confirm(e) ? n() : i.disableInProgress = !1
})
}
}],
controllerAs: "AccountSecurityEditController",
templateUrl: "settings/account-security/account-security-edit.html"
}),angular.module("security.require.session", ["security.session"]).directive("habboRequireSession", ["Session", "ngIfDirective", function (e, t) {
var o = t[0];
return {
restrict: "A",
priority: o.priority,
terminal: o.terminal,
transclude: o.transclude,
link: function (t, r, a) {
a.ngIf = function () {
return e.hasSession()
}, o.link.apply(o, arguments)
}
}
}]).directive("habboRequireNoSession", ["Session", "ngIfDirective", function (e, t) {
var o = t[0];
return {
restrict: "A",
priority: o.priority,
terminal: o.terminal,
transclude: o.transclude,
link: function (t, r, a) {
a.ngIf = function () {
return !e.hasSession()
}, o.link.apply(o, arguments)
}
}
}]),angular.module("security.require.non.staff.account.session", ["security.session"]).directive("habboRequireNonStaffAccountSession", ["Session", "ngIfDirective", function (e, t) {
var o = t[0];
return {
restrict: "A",
priority: o.priority,
terminal: o.terminal,
transclude: o.transclude,
link: function (t, r, a) {
a.ngIf = function () {
return !e.isStaff()
}, o.link.apply(o, arguments)
}
}
}]),angular.module("security.require.staff.account.session", ["security.session"]).directive("habboRequireStaffAccountSession", ["Session", "ngIfDirective", function (e, t) {
var o = t[0];
return {
restrict: "A",
priority: o.priority,
terminal: o.terminal,
transclude: o.transclude,
link: function (t, r, a) {
a.ngIf = function () {
return e.isStaff()
}, o.link.apply(o, arguments)
}
}
}]),angular.module("security.require.habbo.account.session", ["security.session"]).directive("habboRequireHabboAccountSession", ["Session", "ngIfDirective", function (e, t) {
var o = t[0];
return {
restrict: "A",
priority: o.priority,
terminal: o.terminal,
transclude: o.transclude,
link: function (t, r, a) {
a.ngIf = function () {
return e.isHabboAccountSession()
}, o.link.apply(o, arguments)
}
}
}]),angular.module("security.session", ["security.require.habbo.account.session", "security.require.staff.account.session", "security.require.non.staff.account.session", "security.require.session", "security.session.service"]),angular.module("security.session.store", []).factory("SessionStore", ["$window", function (e) {
var t = {};
return t.create = function (t) {
try {
e.sessionStorage.setItem("session", angular.toJson(t))
} catch (o) {
Bugsnag.notifyException(o, "SessionStorage not supported", {groupingHash: "SessionStorage"}, "info")
}
}, t.get = function () {
try {
var t = e.sessionStorage.getItem("session");
return t ? angular.fromJson(t) : null
} catch (o) {
return Bugsnag.notifyException(o, "SessionStorage not supported", {groupingHash: "SessionStorage"}, "info"), null
}
}, t.destroy = function () {
try {
e.sessionStorage.removeItem("session")
} catch (t) {
Bugsnag.notifyException(t, "SessionStorage not supported", {groupingHash: "SessionStorage"}, "info")
}
}, t
}]),angular.module("security.session.service", ["config", "events", "security.bugsnag.session", "security.ga.session", "security.session.store"]).factory("Session", ["$rootScope", "BugsnagSession", "CONFIG", "EVENTS", "GaSession", "SessionStore", function (e, t, o, r, a, n) {
var i = {};
return i.user = null, i.init = function (e) {
return e = e || n.get(), e ? i.create(e) : void 0
}, i.create = function (o) {
return i.user = o, t.create(i.user), a.create(i.user), n.create(i.user), e.$broadcast(r.securityLogin), i.user
}, i.update = function (e) {
return angular.extend(i.user, e), t.create(i.user), a.create(i.user), n.create(i.user), i.user
}, i.hasSession = function () {
return Boolean(i.user)
}, i.isTrusted = function () {
return i.hasSession() && Boolean(i.user.trusted)
}, i.isHabboAccountSession = function () {
return i.hasSession() && "fblogin" !== i.user.email && "rpxlogin" !== i.user.email
}, i.hasAds = function () {
return !i.hasSession() || !(i.user.buildersClubMember || i.user.habboClubMember)
}, i.hasPreRollAd = function () {
return i.hasSession() && !(i.user.buildersClubMember || i.user.habboClubMember) && !_.includes(i.user.traits, "NEW_USER") && !_.includes(i.user.traits, "STAFF") && !i.isTestUser()
}, i.isTestUser = function () {
return "hhs1" === o.hotel && i.hasSession() && i.user.email && (_(i.user.email).includes("@dev.habbo.fi") || _(i.user.email).includes("@test.habbo.fi"))
}, i.isCurrentUser = function (e) {
return i.hasSession() && i.user.uniqueId === e
}, i.destroy = function () {
n.destroy()
}, i.isStaff = function () {
return i.hasSession() && _.includes(i.user.traits, "STAFF")
}, i
}]),angular.module("security.ga.session", ["angular-md5"]).factory("GaSession", ["$window", "md5", function (e, t) {
var o = {};
return o.create = function (o) {
try {
e.ga("set", "userId", t.createHash(o.identityId.toString()))
} catch (r) {
Bugsnag.notifyException(r, "GA session not created", {}, "info")
}
}, o
}]),angular.module("security.bugsnag.session", ["angular-md5"]).factory("BugsnagSession", ["$window", "md5", function (e, t) {
var o = {};
return o.create = function (o) {
e.Bugsnag && (e.Bugsnag.user = {id: t.createHash(o.identityId.toString())})
}, o
}]),angular.module("security.safety.lock.service", ["config", "google.analytics", "security"]).factory("safetyLock", ["$http", "$location", "CONFIG", "Session", "googleAnalytics", function (e, t, o, r, a) {
var n = {};
return n.getQuestions = function () {
return e.get(o.apiUrl + "/safetylock/questions")
}, n.unlock = function (n) {
return e.post(o.apiUrl + "/safetylock/unlock", n).then(function () {
var e = {trusted: !0};
return r.hasSession() && r.update(e), a.trackEvent("Safety lock", "Unlocked", t.path()), e
})
}, n
}]),angular.module("security.safety.lock", ["security.safety.lock.form", "security.safety.lock.service", "templates", "ui.bootstrap"]).controller("SafetyLockController", ["questions", function (e) {
var t = this;
t.questions = e.data
}]).factory("safetyLockModal", ["$uibModal", "safetyLock", function (e, t) {
var o, r = {};
return r.open = function () {
return o = e.open({
controller: "SafetyLockController",
controllerAs: "SafetyLockController",
resolve: {questions: t.getQuestions},
templateUrl: "security/safety-lock/safety-lock-modal.html"
}), o.result
}, r.isOpen = function () {
return Boolean(o) && o.open
}, r
}]),angular.module("security.safety.lock.form", ["form", "locale", "notifier", "security.safety.lock.service", "templates"]).directive("habboSafetyLockForm", ["notifier", "safetyLock", function (e, t) {
return {
restrict: "E",
scope: {questions: "=", onUnlock: "&", onCancel: "&"},
templateUrl: "security/safety-lock/safety-lock-form.html",
link: function (o) {
o.answers = {trust: !1}, o.unlockingInProgress = !1, o.isTrustedLocationEnabled = !0, o.unlock = function () {
o.safetyLockForm.$valid && (o.unlockingInProgress = !0, t.unlock(o.answers).then(o.onUnlock)["catch"](function (t) {
var r = t.status;
409 === r ? o.$broadcast("remote-data-invalid", "answer") : 429 === r ? e.error("ERROR_TOO_MANY_ATTEMPTS", {time: moment(t.data.nextValidRequestDate).fromNow(!0)}) : e.error("ERROR_SERVER")
})["finally"](function () {
o.unlockingInProgress = !1
}))
}
}
}
}]),angular.module("security.safety.answering.modal", ["locale", "security.safety.answering.form", "templates", "ui.bootstrap"]).controller("SafetyAnsweringController", ["data", "questions", "targetAction", function (e, t, o) {
var r = this;
r.questions = t, r.data = e, r.targetAction = o
}]).factory("safetyAnsweringModal", ["$uibModal", function (e) {
var t = {};
return t.open = function (t, o, r) {
return e.open({
controller: "SafetyAnsweringController",
controllerAs: "SafetyAnsweringController",
resolve: {questions: _.constant(t), data: _.constant(o), targetAction: _.constant(r)},
templateUrl: "security/safety-lock/safety-answering-modal.html"
}).result
}, t
}]),angular.module("security.safety.answering.form", ["form", "locale", "notifier", "templates"]).directive("habboSafetyAnsweringForm", ["notifier", function (e) {
return {
restrict: "E",
scope: {data: "=", questions: "=", targetAction: "&", onSuccess: "&", onCancel: "&"},
templateUrl: "security/safety-lock/safety-lock-form.html",
link: function (t) {
t.answers = {}, t.unlockingInProgress = !1, t.isTrustedLocationEnabled = !1, t.unlock = function () {
t.safetyLockForm.$valid && (t.unlockingInProgress = !0, _.assign(t.data, t.answers), t.targetAction({data: t.data}).then(t.onSuccess)["catch"](function (o) {
var r = o.status;
409 === r ? t.$broadcast("remote-data-invalid", "answer") : 429 === r ? e.error("ERROR_TOO_MANY_ATTEMPTS", {time: moment(o.data.nextValidRequestDate).fromNow(!0)}) : e.error("ERROR_SERVER")
})["finally"](function () {
t.unlockingInProgress = !1
}))
}
}
}
}]),angular.module("security.rpx.service", ["config"]).factory("rpxSecurity", ["$document", "$window", "CONFIG", function (e, t, o) {
var r, a = {};
return a.init = function () {
t.janrain = {}, t.janrain.settings = {}, t.janrain.settings.language = o.rpxLocale, t.janrain.settings.tokenUrl = o.rpxTokenUrl, t.janrain.ready = !0, r = e[0].createElement("script"), r.id = "janrainAuthWidget", r.src = "https://rpxnow.com/js/lib/login.habbo.com/engage.js", e[0].body.appendChild(r)
}, a.destroy = function () {
r && (delete t.janrain, angular.element(r).remove(), angular.element('script[src^="https://d29usylhdk1xyu.cloudfront.net"]').remove(), angular.element("#janrainModal, #janrainModalOverlay").remove())
}, a
}]),angular.module("security.rpx.message", ["notifier"]).factory("rpxMessage", ["notifier", function (e) {
var t = {}, o = "💩", r = "🐳", a = "🙊";
return t.show = function (t) {
switch (t) {
case o:
e.error("LOGIN_RPX_REGISTRATION_DISABLED");
break;
case r:
e.error("ERROR_SERVER_MAINTENANCE");
break;
case a:
e.error("ERROR_SERVER")
}
}, t
}]).run(["$location", "rpxMessage", function (e, t) {
t.show(e.search().error)
}]),angular.module("security.rpx", ["security.rpx.message", "security.rpx.service"]),angular.module("security.login.shake", []).constant("LOGIN_EVENTS", {invalidCredentials: "login-invalid-credentials"}).directive("habboShake", ["LOGIN_EVENTS", function (e) {
return {
restrict: "A", link: function (t, o) {
t.$on(e.invalidCredentials, function () {
var e = angular.element(".modal-dialog"), t = e.is(":visible") ? e : o;
t.addClass("animated shake").one("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend", function () {
t.removeClass("animated shake")
})
})
}
}
}]),angular.module("security.login", ["security.login.form", "templates", "ui.bootstrap"]).factory("loginModal", ["$uibModal", function (e) {
var t, o = {};
return o.open = function () {
return t = e.open({templateUrl: "security/login/login-modal.html"}), t.result
}, o.isOpen = function () {
return Boolean(t) && t.open
}, o
}]),angular.module("security.login.form", ["air.download.link", "captcha.modal", "claim.password", "form", "locale", "notifier", "recover.password.modal", "security.facebook.connect", "security.login.shake", "security.service", "templates"]).component("habboLoginForm", {
bindings: {onLogin: "&"},
controller: ["$element", "$location", "$scope", "$window", "LOGIN_EVENTS", "captchaModal", "notifier", "recoverPasswordModal", "security", function (e, t, o, r, a, n, i, s, l) {
function c() {
n.open().then(function (e) {
u({email: p.email, password: p.password, captchaToken: e})
})
}
function u(e) {
p.loginInProgress = !0, l.login(e).then(p.onLogin)["catch"](d)["finally"](function () {
p.loginInProgress = !1
})
}
function d(e) {
var t = e.status, o = e.data && e.data.message;
h = Boolean(e.data && e.data.captcha), 401 === t ? "login.staff_login_not_allowed" === o ? i.error("ERROR_LOGIN_STAFF_NOT_ALLOWED") : "invalid-captcha" === o ? c() : m() : 429 === t ? i.error("ERROR_TOO_MANY_ATTEMPTS", {time: moment(e.data.nextValidRequestDate).fromNow(!0)}) : "force.pending" !== t && i.error("ERROR_SERVER")
}
function m() {
f++, f === b ? (b *= 2, s.open(p.email)) : (o.$broadcast(a.invalidCredentials), o.$broadcast("remote-data-invalid", "credentials"))
}
var p = this, h = !1, f = 0, b = 3;
p.loginInProgress = !1, p.login = function () {
var o = t.search().captchaToken || r.captchaToken;
p.email = e.find("[type=email]").val(), p.password = e.find("[type=password]").val(), o ? u({
email: p.email,
password: p.password,
captchaToken: o
}) : h ? c() : u({email: p.email, password: p.password})
}
}],
controllerAs: "LoginController",
templateUrl: "security/login/login-form.html"
}),angular.module("security.use.force.service", ["security.force.email.modal", "security.force.password.modal", "security.force.service", "security.force.tos.modal", "security.safety.lock"]).factory("useForce", ["$q", "FORCE", "forceEmailModal", "forcePasswordModal", "forceTOSModal", "safetyLockModal", function (e, t, o, r, a, n) {
function i(e, t) {
return function (o) {
var r = o && o.force;
return _.includes(r, e) ? t(o) : o
}
}
function s(e) {
return l(e).then(r.open)
}
function l(t) {
return t.trusted ? e.when(t) : n.open().then(function (e) {
return _.assign(t, e)
})
}
var c = {};
return c.handleForces = function (r) {
return e.when(r).then(i(t.email, o.open)).then(i(t.password, s)).then(i(t.TOS, a.open))
}, c
}]),angular.module("security.force.service", ["config", "google.analytics"]).constant("FORCE", {
email: "EMAIL",
password: "PASSWORD",
TOS: "TOS"
}).factory("force", ["$http", "CONFIG", "googleAnalytics", function (e, t, o) {
var r = {};
return r.changeEmail = function (r) {
return e.post(t.apiUrl + "/force/email-change", {newEmail: r}).then(function (e) {
return o.trackEvent("Email", "Forced change"), e.data
})
}, r.changePassword = function (r) {
return e.post(t.apiUrl + "/force/password-change", {newPassword: r}).then(function (e) {
return o.trackEvent("Password", "Forced change"), e.data
})
}, r.acceptTOS = function () {
return e.post(t.apiUrl + "/force/tos-accept").then(function (e) {
return o.trackEvent("TOS", "Forced accept"), e.data
})
}, r
}]),angular.module("security.fingerprint", ["security.fingerprint.interceptor", "security.fingerprint.service.init"]),angular.module("security.fingerprint.service", []).factory("fingerprint", function () {
var e = {};
return e.getFingerprint = function () {
return e.fingerprint
}, e.calculateFingerprint = function () {
(new Fingerprint2).get(function (t) {
e.fingerprint = t
})
}, e
}),angular.module("security.fingerprint.service.init", ["security.fingerprint.service"]).run(["fingerprint", function (e) {
e.calculateFingerprint()
}]),angular.module("security.fingerprint.service.mock", []).factory("fingerprint", function () {
var e = {};
return e.getFingerprint = function () {
return e.fingerprint
}, e.calculateFingerprint = _.noop, e
}),angular.module("security.fingerprint.interceptor", ["config", "security.fingerprint.service"]).factory("fingerprintInterceptor", ["CONFIG", "fingerprint", function (e, t) {
var o = {};
return o.request = function (o) {
return t.getFingerprint() && _(o.url).includes(e.apiUrl) && (o.headers["x-habbo-fingerprint"] = t.getFingerprint()), o
}, o
}]).config(["$httpProvider", function (e) {
e.interceptors.push("fingerprintInterceptor")
}]),angular.module("spinner", ["security", "templates", "ui.bootstrap", "ui.router"]).factory("spinner", ["$rootScope", "$timeout", "$uibModal", "loginModal", "safetyLockModal", function (e, t, o, r, a) {
function n() {
t.cancel(c), l || (c = t(s, 200))
}
function i() {
t.cancel(c), l && (l.close(), l = null, u = !0)
}
function s() {
r.isOpen() || a.isOpen() || (l = o.open({
animation: !1,
backdrop: "static",
backdropClass: u ? "spinner-backdrop--transparent" : "spinner-backdrop--solid",
keyboard: !1,
templateUrl: "router/spinner/spinner.html",
windowClass: u ? "spinner spinner--transparent" : "spinner spinner--solid"
}))
}
var l, c, u = !1, d = {};
return d.init = function () {
s(), e.$on("$stateChangeStart", n), e.$on("$stateChangeSuccess", i), e.$on("$stateChangeError", i)
}, d
}]),angular.module("scrolltop", ["ui.router"]).factory("scrolltop", function () {
var e = {};
return e.enabled = !0, e.setEnabled = function (e) {
this.enabled = e
}, e.isEnabled = function () {
return this.enabled
}, e
}).run(["$rootScope", "$window", "scrolltop", function (e, t, o) {
e.$on("$viewContentLoaded", function () {
o.isEnabled() && t.scrollTo(0, 0)
})
}]),angular.module("prerender.status.code", []).directive("prerenderStatusCode", ["$location", function (e) {
return {
restrict: "A", link: function (t, o, r) {
var a = e.absUrl();
t.$on("$stateChangeStart", function (e, t) {
t.resolve && t.resolve.auth && r.$set("content", 401)
}), t.$on("$stateChangeSuccess", function (t, o) {
"notFound" === o.name ? r.$set("content", 404) : r.$set("content", a === e.absUrl() ? 200 : 301)
}), t.$on("$stateChangeError", function () {
r.$set("content", 404)
})
}
}
}]),angular.module("prerender.ready", []).run(["$browser", "$timeout", "$window", function (e, t, o) {
e.notifyWhenNoOutstandingRequests(function () {
t(function () {
o.prerenderReady = !0
})
})
}]),angular.module("prerender.header", []).directive("prerenderHeader", ["$location", function (e) {
return {
restrict: "A", link: function (t, o, r) {
var a = e.absUrl();
t.$on("$stateChangeSuccess", function (t, o) {
var n = e.absUrl();
"notFound" !== o.name && a !== n && r.$set("content", "Location: " + n)
})
}
}
}]),angular.module("prerender", ["prerender.header", "prerender.ready", "prerender.status.code"]),angular.module("head.title", ["head.service"]).directive("title", ["Head", function (e) {
return {
restrict: "E", link: function (t, o) {
function r(e) {
o.html(e)
}
t.$watch(e.getFullTitle, r)
}
}
}]),angular.module("head", ["head.content", "head.service", "head.title", "head.url"]),angular.module("head.url", []).directive("habboHeadUrl", ["$location", function (e) {
return {
restrict: "A", link: function (t, o, r) {
function a() {
return e.absUrl()
}
function n(e) {
r.$set(r.habboHeadUrl, e)
}
t.$watch(a, n)
}
}
}]),angular.module("head.content", ["head.service"]).constant("META_ATTRS", {
"og:title": "title",
"og:description": "description",
"og:image": "image",
"og:image:height": "imageHeight",
"og:image:width": "imageWidth",
"twitter:title": "title",
"twitter:description": "description",
"twitter:card": "twitter:card",
"twitter:image": "image",
name: "title",
description: "description",
image: "image"
}).directive("content", ["Head", "META_ATTRS", function (e, t) {
return {
restrict: "A", link: function (o, r, a) {
function n() {
return e[s]
}
function i(e) {
a.$set("content", e)
}
var s = t[a.name || a.property || a.itemprop];
s && o.$watch(n, i)
}
}
}]),angular.module("head.service", ["locale", "ui.router"]).constant("HEAD_DEFAULTS", {
title: window.chocolatey.name,
description: "Join millions in the planet's most popular virtual world for teens. Create your avatar, meet new friends, role play, and build amazing spaces.",
image: "https://habboo-a.akamaihd.net/habbo-web/america/en/assets/images/app_summary_image-1200x628.85a9f5dc.png",
imageHeight: 628,
imageWidth: 1200,
"twitter:card": "summary_large_image"
}).factory("Head", ["$translate", "HEAD_DEFAULTS", function (e, t) {
var o = {}, r = " - " + window.chocolatey.name;
return o.setDefaults = function () {
o.title = t.title, o.title = t.title, o.description = t.description, o.image = t.image, o.imageHeight = t.imageHeight, o.imageWidth = t.imageWidth, o["twitter:card"] = t["twitter:card"]
}, o.set = function (e, t) {
var r = e || {};
r.title && o.setTitle(r.title, t), r.description && (o.description = r.description), r.image && (o.image = r.image), r.imageHeight && (o.imageHeight = r.imageHeight), r.imageWidth && (o.imageWidth = r.imageWidth), r["twitter:card"] && (o["twitter:card"] = r["twitter:card"])
}, o.setTitle = function (t, r) {
e(t, r).then(function (e) {
o.title = e
})
}, o.getFullTitle = function () {
return window.chocolatey.name === o.title ? o.title : o.title + r
}, o
}]).run(["$rootScope", "Head", function (e, t) {
e.$on("$stateChangeStart", function () {
t.setDefaults()
}), e.$on("$stateChangeSuccess", function (e, o, r) {
t.set(o.data, r)
})
}]),angular.module("ban.error", ["ban.message", "ban.redirect"]),angular.module("ban.redirect", ["locale", "security"]).factory("banRedirect", ["$injector", "$q", function (e, t) {
function o(e) {
var t = e.status, o = e.data && e.data.message;
return (403 === t || 401 === t) && r(o)
}
function r(e) {
return _.includes(i, e)
}
function a(t) {
var o = t.data;
return n = n || e.get("security"), n.forceLogout("/?error=banned&" + $.param(o))
}
var n,
i = ["login.user_banned", "login.identity_banned", "login.avatar_banned", "user.identity_banned", "user.avatar_banned"],
s = {};
return s.responseError = function (e) {
return o(e) ? a(e) : t.reject(e)
}, s
}]).config(["$httpProvider", function (e) {
e.interceptors.push("banRedirect")
}]),angular.module("ban.message", ["locale", "notifier"]).factory("banMessage", ["$q", "$translate", "dateFilter", "notifier", function (e, t, o, r) {
function a(e, t, o) {
var r = _(e).includes("avatar_banned") ? "USER_AVATAR" : "USER_IDENTITY";
return r += t ? "_PERMANENT_BAN_TEXT" : "_BAN_TEXT", o && (r += "_WITH_GUIDE"), r
}
var n = {};
return n.show = function (n) {
if ("banned" === n.error) {
var i = n.sanctionReasonId ? "CFH_REASON_" + n.sanctionReasonId.toUpperCase() : "CFH_REASON_AUTO_TRIGGER",
s = "true" === n.permanentBan ? "CFH_REASON_RESOLVED_TARGET_BAN_PERMANENT" : "CFH_REASON_RESOLVED_TARGET_BAN",
l = "MODERATOR_MSG_POSTFIX";
return e.all([t(s), t(i), t(l)]).then(function (e) {
var t = e[0], i = e[1], s = e[2], l = -1 === t.indexOf("%") ? t : t.substring(0, t.indexOf("%")),
c = n.reason;
_.endsWith(n.reason, s) && -1 !== n.reason.indexOf(i) && _.startsWith(n.reason, l) || (c = i);
var u = n.expiryTime, d = {
message: n.message,
avatarName: n.avatarName,
reason: c,
expiryTime: u ? o(u, "short") : u,
permanentBan: "true" === n.permanentBan,
provideExtraSupport: "true" === n.provideExtraSupport
}, m = a(d.message, d.permanentBan, d.provideExtraSupport);
r.errorSticky("USER_BAN_TITLE", m, d)
})
}
}, n
}]).run(["$location", "banMessage", function (e, t) {
t.show(e.search())
}]),angular.module("room.restricted", ["locale", "templates"]).component("habboRoomRestricted", {
bindings: {room: "<"},
controllerAs: "RoomRestrictedController",
templateUrl: "room/room-restricted/room-restricted.html"
}),angular.module("room.picture", ["templates"]).component("habboRoomPicture", {
bindings: {url: "@"},
templateUrl: "room/room-picture/room-picture.html",
controllerAs: "RoomPictureController"
}),angular.module("room.open", ["avatar", "locale", "official.room.avatar", "room.info", "room.picture", "templates"]).component("habboRoomOpen", {
bindings: {room: "<"},
controllerAs: "RoomOpenController",
templateUrl: "room/room-open/room-open.html",
controller: ["$window", function (e) {
var t = this, o = e.btoa(t.room.name.replace(/[^\x00-\x7F]/g, "").trim());
t.room.hotelReportLink = "/hotel?link=navigator/report/" + t.room.uniqueId + "/" + o
}]
}),angular.module("room.info", ["templates"]).component("habboRoomInfo", {
bindings: {description: "@", tags: "<"},
templateUrl: "room/room-info/room-info.html",
controllerAs: "RoomInfoController"
}),angular.module("registration.policies", ["locale", "templates"]).component("habboPolicies", {
require: {FormController: "^form"},
bindings: {policies: "="},
controllerAs: "PoliciesController",
templateUrl: "registration/policies/policies.html"
}),angular.module("registration.partner", ["locale", "templates"]).component("habboPartnerRegistration", {
bindings: {value: "="},
controller: function () {
var e = this;
e.value = !0
},
controllerAs: "PartnerRegistrationController",
templateUrl: "registration/partner-registration/partner-registration.html"
}),angular.module("birthdate.filters", []).filter("daysInMonth", function () {
var e = [4, 6, 9, 11];
return function (t, o, r) {
return o = parseInt(o, 10), r = parseInt(r, 10), 2 === o ? moment([r]).isLeapYear() ? _(t).take(29).value() : _(t).take(28).value() : _(e).includes(o) ? _(t).take(30).value() : t
}
}),angular.module("birthdate", ["ngMessages", "birthdate.filters", "locale", "templates"]).component("habboBirthdate", {
require: {FormController: "^form"},
bindings: {birthdate: "="},
controller: ["$scope", "daysInMonthFilter", function (e, t) {
var o = 7, r = 1900, a = (new Date).getFullYear() - o, n = this;
n.days = _.range(1, 32), n.months = [{value: 1, translationKey: "MONTH_JANUARY"}, {
value: 2,
translationKey: "MONTH_FEBRUARY"
}, {value: 3, translationKey: "MONTH_MARCH"}, {value: 4, translationKey: "MONTH_APRIL"}, {
value: 5,
translationKey: "MONTH_MAY"
}, {value: 6, translationKey: "MONTH_JUNE"}, {value: 7, translationKey: "MONTH_JULY"}, {
value: 8,
translationKey: "MONTH_AUGUST"
}, {value: 9, translationKey: "MONTH_SEPTEMBER"}, {value: 10, translationKey: "MONTH_OCTOBER"}, {
value: 11,
translationKey: "MONTH_NOVEMBER"
}, {
value: 12,
translationKey: "MONTH_DECEMBER"
}], n.years = _.range(r, a).reverse(), e.$watchGroup(["BirthdateController.month", "BirthdateController.year"], function (e) {
var o = parseInt(n.day, 10), r = e[0], a = e[1];
_(t(n.days, r, a)).includes(o) || (n.day = "")
}), e.$watchGroup(["BirthdateController.day", "BirthdateController.month", "BirthdateController.year"], function (e) {
var t = parseInt(e[0], 10), o = parseInt(e[1], 10), r = parseInt(e[2], 10);
_.isNaN(t) || _.isNaN(o) || _.isNaN(r) ? n.FormController.birthdate.$pristine || n.FormController.birthdate.$setViewValue(null) : n.FormController.birthdate.$setViewValue({
day: t,
month: o,
year: r
})
})
}],
controllerAs: "BirthdateController",
templateUrl: "registration/birthdate/birthdate.html"
}),angular.module("profile.modal", ["by.name.description.or.motto.filter", "empty.results", "form", "locale", "profile.item.lists", "templates", "ui.bootstrap"]).controller("ProfileModalController", ["items", "type", function (e, t) {
var o = this;
o.items = e, o.type = t
}]).component("habboProfileModal", {
bindings: {items: "<", type: "@"},
controller: ["$uibModal", function (e) {
var t = this;
t.openModal = function () {
e.open({
transclude: !0,
templateUrl: "profile/profile-modal/profile-modal.html",
controller: "ProfileModalController",
controllerAs: "ProfileModalController",
resolve: {items: _.constant(t.items), type: _.constant(t.type)}
})
}
}],
controllerAs: "ProfileModalComponentController",
template: ''
}),angular.module("profile.header", ["encode.uri.component", "imager", "templates"]).component("habboProfileHeader", {
bindings: {
figure: "@",
user: "@",
motto: "@",
profile: "@"
},
controller: function () {
var e = this;
e.isCroco = function (e) {
return Boolean(e) && "crikey" === e.toLowerCase()
}
},
controllerAs: "ProfileHeaderController",
templateUrl: "profile/profile-header/profile-header.html",
transclude: !0
}),angular.module("profile.item.lists", ["badge", "by.name.description.or.motto.filter", "encode.uri.component", "flash", "group.badge", "imager", "infinite-scroll", "room.icon", "templates"]).component("habboBadgeList", {
bindings: {
badges: "<",
query: "<"
}, controllerAs: "BadgeListController", templateUrl: "profile/item-lists/badges.html"
}).component("habboFriendList", {
bindings: {friends: "<", query: "<"},
controllerAs: "FriendListController",
templateUrl: "profile/item-lists/friends.html"
}).component("habboRoomList", {
bindings: {rooms: "<", query: "<"},
controllerAs: "RoomListController",
templateUrl: "profile/item-lists/rooms.html"
}).component("habboGroupList", {
bindings: {groups: "<", query: "<"},
controllerAs: "GroupListController",
templateUrl: "profile/item-lists/groups.html"
}),angular.module("creation", ["creation.content", "creation.service", "header", "locale", "profile.header", "router", "social.share", "templates"]).config(["$stateProvider", "$urlRouterProvider", function (e, t) {
var o = ["$q", "$stateParams", "creations", function (e, t, o) {
var r = _.findIndex(o, {id: t.creationId});
return r >= 0 ? r : e.reject()
}];
e.statePublic("photo", {
url: "/profile/:name/photo/:creationId?pool",
controller: "CreationController",
controllerAs: "CreationController",
onEnter: ["creations", "index", "Head", function (e, t, o) {
o.setTitle("HEAD_TITLE_PHOTO", {name: e[t].creator_name}), o.image = e[t].url, o.imageHeight = e[t].contentHeight, o.imageWidth = e[t].contentWidth
}],
resolve: {
creations: ["$stateParams", "Creations", function (e, t) {
return t.photos({pool: e.pool, name: e.name})
}], index: o
},
templateUrl: "profile/creation/creation.html"
}), e.statePublic("story", {
url: "/profile/:name/story/:creationId?pool",
controller: "CreationController",
controllerAs: "CreationController",
onEnter: ["creations", "index", "Head", function (e, t, o) {
var r = e[t];
"SELFIE" === r.type ? o.setTitle("HEAD_TITLE_SELFIE", {name: r.creator_name}) : o.setTitle("HEAD_TITLE_CREATION", {
creation: r.title,
name: r.creator_name
}), o.image = r.url, o.imageHeight = r.contentHeight, o.imageWidth = r.contentWidth
}],
resolve: {
creations: ["$stateParams", "Creations", function (e, t) {
return t.stories({pool: e.pool, name: e.name})
}], index: o
},
templateUrl: "profile/creation/creation.html"
}), t.when("/profile/:name/creation/:id", "/profile/:name/story/:id")
}]).controller("CreationController", ["$scope", "creations", "index", "scrolltop", function (e, t, o, r) {
var a = this;
a.creation = t[o], a.next = t[o + 1], a.previous = t[o - 1], e.$on("$stateChangeStart", function (e, t) {
"photo" === t.name || "story" === t.name ? r.setEnabled(!1) : r.setEnabled(!0)
})
}]),angular.module("creation.content", ["creation.href", "like", "locale", "navigate.to.on.key", "photo.delete", "report", "security", "templates"]).component("habboCreationContent", {
bindings: {
creation: "<",
previous: "<",
next: "<"
}, controller: ["Session", function (e) {
var t = this;
t.isDeletable = function () {
return e.isCurrentUser(t.creation.creator_uniqueId)
}
}], controllerAs: "CreationContentController", templateUrl: "profile/creation/creation-content.html"
}),angular.module("creation.service", ["photos.service", "profile.creations"]).factory("Creations", ["CreationsProfile", "Photos", function (e, t) {
var o = {};
return o.photos = function (o) {
return "photos" === o.pool ? t.query().$promise : e.photosForUser(o.name)
}, o.stories = function (t) {
return e.storiesForUser(t.name)
}, o
}]),angular.module("client.messenger", []).factory("clientMessenger", function () {
function e(e) {
a.postMessage({call: "open-link", target: e.link}, "*")
}
function t(e) {
a.postMessage({call: "open-room", target: e.room}, "*")
}
function o(e) {
a.postMessage({call: "interstitial-status", target: e.interstitial}, "*")
}
var r = {}, a = null, n = {link: e, room: t, interstitial: o};
return r.init = function (e) {
a = e
}, r.handle = function (e) {
var t = _(e).pickBy(_.isString).keys().head(), o = n[t];
o && o(e)
}, r
}),angular.module("client.listener", ["client.heartbeat.ping.service", "interstitial", "notifier", "security"]).factory("clientListener", ["$location", "$rootScope", "EVENTS", "Session", "clientHeartbeatPing", "interstitial", "notifier", "security", function (e, t, o, r, a, n, i, s) {
function l() {
C = !0
}
function c() {
y = moment(), (null === E || moment().diff(E, "seconds") > _) && (E = moment(), a.ping())
}
function u() {
s.logout()["catch"](function () {
t.$emit(o.clientClose), i.errorSticky("ERROR_LOGOUT_TITLE", "ERROR_LOGOUT_TEXT")
})
}
function d(t) {
e.url(t)
}
function m(e) {
r.update({figureString: e})
}
function p(e) {
r.update({name: e})
}
function h() {
return moment().diff(y, "seconds") < 60
}
function f() {
n.start("midroll")
}
function b(e) {
r.update({buildersClubMember: e})
}
function g(e) {
r.update({habboClubMember: e})
}
var _ = 300, v = {}, C = !1, y = null, E = null, S = {
disconnect: l,
heartbeat: c,
logout: u,
"open-page": d,
"update-figure": m,
"update-name": p,
"show-interstitial": f,
"update-builders-club": b,
"update-habbo-club": g
};
return v.init = function () {
C = !1, y = null
}, v.handle = function (e) {
var t = S[e.call];
t && t(e.target)
}, v.isAlive = function () {
return Boolean(y) && h()
}, v.hasDied = function () {
return Boolean(y) && !h()
}, v.hasDisconnected = function () {
return C
}, v
}]),angular.module("client.heartbeat.ping.service", ["config"]).factory("clientHeartbeatPing", ["$http", "CONFIG", function (e, t) {
var o = {};
return o.ping = function () {
return e.get(t.apiUrl + "/user/ping")
}, o
}]),angular.module("client.communication", ["client.listener", "client.messenger", "events"]).directive("habboClientCommunication", ["$timeout", "$window", "EVENTS", "clientListener", "clientMessenger", function (e, t, o, r, a) {
return {
restrict: "A", link: function (n, i) {
function s(t) {
e(function () {
r.handle(t.originalEvent.data)
})
}
var l = i.get(0).contentWindow;
a.init(l), n.$on(o.clientOpen, function (e, t) {
var o = n.$watch(r.isAlive, function (e) {
e && (a.handle(t), o())
});
r.init()
}), angular.element(t).on("message", s), i.on("$destroy", function () {
angular.element(t).off("message", s)
})
}
}
}]),angular.module("client", ["client.component", "client.disable.scrollbars"]),angular.module("client.disable.scrollbars", ["events"]).directive("habboClientDisableScrollbars", ["EVENTS", function (e) {
return {
restrict: "A", link: function (t, o) {
t.$on(e.clientOpen, function () {
o.css("overflow", "hidden")
}), t.$on(e.clientClose, function () {
o.css("overflow", "")
})
}
}
}]),angular.module("client.component", ["angularScreenfull", "client.close.expander", "client.close.fullscreen.on.hide", "client.closed", "client.communication", "client.error", "client.reload", "client.service", "events", "flash", "interstitial", "locale", "notifier", "router", "security", "storage", "system.data", "templates"]).component("habboClient", {
controller: ["$location", "$rootScope", "$scope", "$state", "Client", "EVENTS", "Session", "SystemData", "clientListener", "flash", "interstitial", "localStorage", "notifier", function (e, t, o, r, a, n, i, s, l, c, u, d, m) {
function p() {
var e = d.get("hotelLastAccess");
return moment().subtract(60, "minutes").isBefore(e)
}
function h() {
return g.client = a.get(), g.running = !0, g.client.$promise["catch"](function () {
g.running = !1, m.error("ERROR_SERVER")
})
}
function f(e) {
e && (g.running = !1)
}
function b() {
!_ && i.hasPreRollAd() && (u.start("preroll"), _ = !0)
}
var g = this, _ = !1;
g.visible = !1, g.flashEnabled = c.isEnabled(), g.isOpen = s.isHotelOpen(), p() || "/logout" === e.path() || h(), g.close = function () {
t.$broadcast(n.clientClose)
}, g.reload = function () {
t.$broadcast(n.clientOpen)
}, o.$on(n.clientOpen, function () {
b(), g.running || h(), d.set("hotelLastAccess", Date.now()), g.visible = !0
}), o.$on(n.clientClose, function (e, t) {
g.visible = !1, t || r.back()
}), o.$on("$stateChangeSuccess", function (e, o, r, a) {
"hotel" === a.name && t.$broadcast(n.clientClose, !0)
}), o.$watch(l.hasDied, f), o.$watch(l.hasDisconnected, f)
}], controllerAs: "ClientController", templateUrl: "hotel/client/client.html"
}),angular.module("client.close.fullscreen.on.hide", ["angularScreenfull", "events"]).directive("habboClientCloseFullscreenOnHide", ["EVENTS", function (e) {
return {
restrict: "A", require: "ngsfFullscreen", link: function (t, o, r, a) {
t.$on(e.clientClose, function () {
a.isFullscreen() && a.toggleFullscreen()
})
}
}
}]),angular.module("client.service", ["ngResource", "config"]).factory("Client", ["$resource", "CONFIG", function (e, t) {
return e(t.apiUrl + "/client/clienturl")
}]),angular.module("register.banner", ["air.download.link", "locale", "templates"]).component("habboRegisterBanner", {templateUrl: "home/register-banner/register-banner.html"}),angular.module("promos.service", ["config"]).factory("promos", ["$http", "$q", "CONFIG", function (e, t, o) {
return {
get: function () {
var r = o.habboWebNewsUrl + "front.html";
return e.get(r).then(function (e) {
return {html: e.data}
})["catch"](function () {
return t.when({
html: ""
})
})
}
}
}]),angular.module("news", ["compile", "locale", "moderation.notification", "promos.service", "router", "templates", "web.pages"]).config(["$stateProvider", function (e) {
e.statePublic("home.news", {
url: "/",
controller: "NewsController",
controllerAs: "NewsController",
data: {title: "HEAD_TITLE_NEWS"},
resolve: {
promos: ["promos", function (e) {
return e.get()
}]
},
parent: "home",
templateUrl: "home/news/news.html"
})
}]).controller("NewsController", ["promos", function (e) {
var t = this;
t.promos = e.html
}]),angular.module("housekeeping", ["security", "compile", "locale", "moderation.notification", "router", "templates", "web.pages"]).config(["$stateProvider", function (e) {
e.statePublic("home.housekeeping", {
url: "/housekeeping",
data: {title: "Housekeeping"},
resolve: {},
parent: "home",
templateUrl: "home/housekeeping/housekeeping.html"
})
}]),angular.module("messaging", ["discussions", "locale", "router", "templates", "user.service"]).config(["$stateProvider", function (e) {
e.statePrivate("home.messaging", {
url: "/messaging",
controller: "MessagingController",
controllerAs: "MessagingController",
data: {title: "HEAD_TITLE_MESSAGING"},
resolve: {
discussions: ["User", function (e) {
return e.discussions().$promise
}]
},
parent: "home",
templateUrl: "home/messaging/messaging.html"
})
}]).controller("MessagingController", ["discussions", function (e) {
var t = this;
t.discussions = e
}]),angular.module("user.service", ["ngResource", "config", "storage"]).factory("User", ["$resource", "CONFIG", "httpCache", function (e, t, o) {
return e(t.apiUrl + "/user/:resource", null, {
discussions: {
method: "GET",
isArray: !0,
params: {resource: "discussions"},
cache: o.shortCache
}
})
}]),angular.module("email.report.unauthorized.service", ["config", "google.analytics"]).factory("reportUnauthorized", ["$http", "CONFIG", "googleAnalytics", function (e, t, o) {
return function (r, a) {
return e.get(t.apiUrl + "/public/email/unauthorized/" + r + "/" + a).then(function () {
o.trackEvent("Email", "Unauthorized email reported")
})
}
}]),angular.module("email.report.unauthorized", ["email.report.unauthorized.form", "header", "locale", "message.container", "router"]).config(["$stateProvider", function (e) {
e.statePublic("reportUnauthorized", {
url: "/identity/report_unauthorized_usage?email&hash",
controller: "EmailReportUnauthorizedController",
controllerAs: "EmailReportUnauthorizedController",
data: {title: "HEAD_TITLE_EMAIL_REPORT_UNAUTHORIZED"},
templateUrl: "email/email-report-unauthorized/email-report-unauthorized.html"
})
}]).controller("EmailReportUnauthorizedController", ["$stateParams", function (e) {
var t = this;
t.email = e.email, t.hash = e.hash
}]),angular.module("email.report.unauthorized.form", ["email.report.unauthorized.service", "locale", "notifier", "router", "templates"]).component("habboEmailReportUnauthorizedForm", {
bindings: {
emailaddress: "<",
hash: "<"
},
controller: ["$state", "notifier", "reportUnauthorized", function (e, t, o) {
var r = this;
r.reportInProgress = !1, r.report = function () {
r.reportInProgress = !0, o(r.emailaddress, r.hash).then(function () {
t.success("EMAIL_REPORT_UNAUTHORIZED_SUCCESS"), e.go("home.news")
})["catch"](function () {
t.error("ERROR_SERVER")
})["finally"](function () {
r.reportInProgress = !1
})
}
}],
controllerAs: "EmailReportUnauthorizedFormController",
templateUrl: "email/email-report-unauthorized/email-report-unauthorized-form.html"
}),angular.module("optout.service", ["config", "google.analytics"]).factory("optout", ["$http", "CONFIG", "googleAnalytics", function (e, t, o) {
return function (r, a) {
return e.get(t.apiUrl + "/public/email/optout/" + r + "/" + a).then(function () {
o.trackEvent("Email", "Optout")
})
}
}]),angular.module("email.optout", ["locale", "notifier", "optout.service", "router"]).config(["$stateProvider", function (e) {
e.statePublic("optout", {
url: "/email/marketing_off?email&hash",
controller: "OptOutController",
resolve: {
optingout: ["$stateParams", "optout", function (e, t) {
return t(e.email, e.hash)
}]
}
})
}]).controller("OptOutController", ["$state", "notifier", function (e, t) {
t.success("OPTOUT_SUCCESS"), e.go("home.news")
}]),angular.module("rooms", ["avatar", "config", "leaderboard.service", "locale", "official.room.avatar", "router"]).config(["$stateProvider", function (e) {
e.statePublic("community.rooms", {
url: "/rooms",
parent: "community",
controller: "RoomsController",
controllerAs: "RoomsController",
templateUrl: "community/rooms/rooms.html",
data: {title: "HEAD_TITLE_ROOMS"},
resolve: {
rooms: ["Leaderboard", "CONFIG", function (e, t) {
return e.get({site: t.hotel, leaderboard: "visited-rooms", timeframe: "daily", date: "latest"}).$promise
}]
}
})
}]).controller("RoomsController", ["rooms", function (e) {
var t = this;
t.rooms = e
}]),angular.module("photos", ["columns", "locale", "photos.service", "router"]).config(["$stateProvider", function (e) {
e.statePublic("community.photos", {
url: "/photos",
parent: "community",
controller: "PhotosController",
controllerAs: "PhotosController",
templateUrl: "community/photos/photos.html",
data: {title: "HEAD_TITLE_PHOTOS"},
resolve: {
photos: ["Photos", function (e) {
return e.query().$promise
}]
}
})
}]).controller("PhotosController", ["photos", function (e) {
var t = this;
t.photos = e
}]),angular.module("staff", ["locale", "router"]).config(["$stateProvider", function (e) {
e.statePublic("community.staff", {
url: "/staff",
parent: "community",
controller: "StaffController",
controllerAs: "StaffController",
templateUrl: "community/staff/staff.html",
data: {title: "HEAD_TITLE_STAFF"},
})
}]).controller("StaffController", [function () {
var t = this;
}]),angular.module("photos.service", ["ngResource", "config", "reported.photos", "safe.transform.response", "storage"]).factory("Photos", ["$resource", "CONFIG", "httpCache", "reportedPhotosFilter", "safeTransformResponse", function (e, t, o, r, a) {
return e(t.extraDataUrl + "/public/photos", null, {
query: {
isArray: !0,
cache: o.shortCache,
transformResponse: a.fromJson(function (e) {
var t = r(e);
return _.map(t, function (e) {
return _.assign(e, {
url: "https:" + e.url,
contentWidth: 320,
contentHeight: 320,
parentTitle: "PHOTOS_TITLE",
pool: "photos"
})
})
})
}
})
}]),angular.module("fansites", ["locale", "router", "templates", "web.pages"]).config(["$stateProvider", function (e) {
e.statePublic("community.fansites", {
url: "/fansites",
controller: "FansitesController",
controllerAs: "FansitesController",
data: {title: "HEAD_TITLE_FANSITES"},
resolve: {
fansites: ["webPages", function (e) {
return e.get("community/fansites")
}]
},
parent: "community",
templateUrl: "community/fansites/fansites.html"
})
}]).controller("FansitesController", ["fansites", function (e) {
var t = this;
t.fansites = e
}]),angular.module("category.service", ["config"]).factory("category", ["$http", "CONFIG", function (e, t) {
return {
get: function (o, r) {
var a = o.replace(/-/g, "_"), n = t.habboWebNewsUrl + a + "_" + r + ".html";
return e.get(n).then(function (e) {
return {
titleKey: angular.element(e.data).find(".news-category__link--active").attr("translate"),
html: e.data
}
})
}
}
}]),angular.module("category", ["category.service", "compile", "locale", "router", "templates", "web.pages"]).config(["$stateProvider", "$urlRouterProvider", function (e, t) {
e.statePublic("community.category", {
url: "/category/{category:(?:[^/]+)}{archive:(?:/[^0-9lst/]+)?}/{page}",
controller: "CategoryController",
controllerAs: "CategoryController",
onEnter: ["category", "Head", function (e, t) {
t.setTitle(e.titleKey)
}],
resolve: {
category: ["$location", "$q", "$stateParams", "category", function (e, t, o, r) {
var a = o.archive.replace("/", "_");
return r.get(o.category + a, o.page)["catch"](function (r) {
return 0 !== a.length || "1" !== o.page && "last" !== o.page ? a.length > 0 && "1" === o.page ? (e.path("/community/category").replace(), t.when({})) : t.reject(r) : (e.path("/community/category/" + o.category + "/archive/1").replace(), t.when({}))
})
}]
},
parent: "community",
templateUrl: "community/category/category.html"
}), t.when("/community/category", "/community/category/all"), t.when("/community/category/:category", "/community/category/:category/1")
}]).controller("CategoryController", ["category", function (e) {
var t = this;
t.category = e.html
}]),angular.module("article.service", ["config"]).factory("article", ["$http", "CONFIG", function (e, t) {
return {
get: function (o, r) {
var a = r.replace(/-/g, "_"), n = t.habboWebNewsUrl + "articles/" + o + "_" + a + ".html";
return e.get(n).then(function (e) {
var t = angular.element(e.data);
return {
title: t.find("h1, h2, h3, h4, h5, h6").eq(0).text(),
summary: t.find(".news-header__summary").text(),
image: t.find("img").eq(0).attr("src"),
html: e.data
}
})
}
}
}]),angular.module("article", ["article.service", "compile", "lightbox", "locale", "router", "social.share", "templates", "web.pages"]).config(["$stateProvider", "$urlRouterProvider", function (e, t) {
e.statePublic("community.article", {
url: "/article/:id/:title",
controller: "ArticleController",
controllerAs: "ArticleController",
onEnter: ["article", "Head", function (e, t) {
t.title = e.title, t.description = e.summary, t.image = e.image, t.imageHeight = 300, t.imageWidth = 759
}],
resolve: {
article: ["$stateParams", "article", function (e, t) {
return t.get(e.id, e.title)
}]
},
parent: "community",
templateUrl: "community/article/article.html"
}), t.when("/article/:id/:slug", "/community/article/:id/:slug"), t.when("/articles/{id:[0-9]*}-{slug:[a-z-]*}", "/article/:id/:slug")
}]).controller("ArticleController", ["article", function (e) {
var t = this;
t.article = e.html
}]),angular.module("zendesk.url", ["config", "security"]).filter("zendeskRedirectUrl", ["CONFIG", "Session", function (e, t) {
var o = function (o, r) {
return r === !0 || t.hasSession() && _(o).includes("help.habbo") ? e.apiUrl + "/public/help?returnTo=" + o : o
};
return o.$stateful = !0, o
}]),angular.module("web.pages.service", ["config"]).factory("webPages", ["$http", "CONFIG", function (e, t) {
return {
get: function (o) {
var r = t.habboWebPagesUrl + o + "." + t.lang + ".html";
return e.get(r).then(function (e) {
return e.data
})
}
}
}]),angular.module("web.pages", ["web.pages.service"]).component("habboWebPages", {
bindings: {key: "@"},
controller: ["$animate", "$compile", "$element", "$scope", "webPages", function (e, t, o, r, a) {
e.addClass(o, "ng-hide"), r.$watch("WebPagesController.key", function (n) {
a.get(n).then(function (a) {
var n = o.children().first();
n.html(a), t(n.contents())(r), e.removeClass(o, "ng-hide")
})
})
}],
controllerAs: "WebPagesController",
template: ''
}),angular.module("tabs", ["locale", "tab", "templates"]).component("habboTabs", {
bindings: {titleKey: "@"},
controller: function () {
var e = this;
e.open = !1, e.tabs = [], e.activeTab = null, e.setTab = function (t) {
e.tabs.push(t)
}, e.setActive = function (t) {
e.open = !1, e.activeTab = _.find(e.tabs, {path: t})
}
},
controllerAs: "TabsController",
templateUrl: "common/tabs/tabs.html",
transclude: !0
}),angular.module("tab", ["locale", "templates"]).component("habboTab", {
require: {HabboTabsController: "^habboTabs"},
bindings: {path: "@", alternativePath: "@", strictPath: "@", translationKey: "@"},
controller: ["$scope", "$location", function (e, t) {
function o() {
a.active = "true" === a.strictPath ? t.path() === a.path : r(), a.active && a.HabboTabsController.setActive(a.path)
}
function r() {
return 0 === t.path().indexOf(a.path) || 0 === t.path().indexOf(a.alternativePath)
}
var a = this;
a.open = !1, a.$onInit = function () {
a.HabboTabsController.setTab({path: a.path, translationKey: a.translationKey}), o()
}, e.$on("$stateChangeSuccess", o)
}],
controllerAs: "TabController",
templateUrl: "common/tabs/tab.html"
}),angular.module("system.data", []).factory("SystemData", ["$window", function (e) {
var t = {};
return t.geoLocation = {
continent: e.geoLocation ? e.geoLocation.continent : null,
country: e.geoLocation ? e.geoLocation.country : null
}, t.getShopCountry = function () {
return "gb" === t.geoLocation.country ? "uk" : t.geoLocation.country
}, t.isHotelOpen = function () {
var t = e.systemData && e.systemData.open;
return t !== !1
}, t.isIDCGamesCountry = function () {
var t = e.partnerCodeInfo && e.partnerCodeInfo.partner;
return "idcse" === t
}, t
}]),angular.module("storage", ["cache", "local.storage"]),angular.module("sticky.header", []).directive("habboStickyHeader", ["$window", function (e) {
return {
restrict: "A", link: function (t, o) {
function r() {
var t = e.pageYOffset > 0 ? e.pageYOffset : 0, r = i - t;
t <= o.height() ? o.addClass("sticky-header--top") : o.removeClass("sticky-header--top"), 0 === t && o.removeClass("sticky-header--fixed"), r > 0 && a(r) && t > o.height() ? o.addClass("sticky-header--fixed") : 0 > r && a(r) && (o.hasClass("sticky-header--fixed") && o.addClass("sticky-header--hidden"), o.removeClass("sticky-header--fixed")), (o.hasClass("sticky-header--fixed") || o.hasClass("sticky-header--top")) && o.removeClass("sticky-header--hidden"), i = t
}
function a(e) {
return Math.abs(e) > n
}
var n = 5, i = e.pageYOffset;
i <= o.height() ? o.addClass("sticky-header sticky-header--top") : o.addClass("sticky-header sticky-header--fixed"), angular.element(e).on("orientationchange resize scroll", r), o.on("$destroy", function () {
angular.element(e).off("orientationchange resize scroll", r)
})
}
}
}]),angular.module("social.share", ["config", "google.analytics", "locale", "popup", "router", "templates"]).component("habboSocialShare", {
controller: ["$location", "CONFIG", "Head", "googleAnalytics", "popup", function (e, t, o, r, a) {
var n = this;
n.shareOnFacebook = function () {
var t = $.param({u: e.absUrl()}), o = "http://www.facebook.com/sharer.php?" + t;
r.trackSocial("Facebook", "Share", e.url()), a.open(o, 626, 436)
}, n.shareOnTwitter = function () {
var n = $.param({
url: e.absUrl(),
text: o.title,
hashtags: "Habbo",
related: t.twitterAccount.substring(1)
}), i = "https://twitter.com/intent/tweet?" + n;
r.trackSocial("Twitter", "Tweet", e.url()), a.open(i, 550, 420)
}
}], controllerAs: "SocialShareController", templateUrl: "common/social-share/social-share.html"
}),angular.module("show.on.load", []).directive("habboShowOnLoad", function () {
return {
restrict: "A", link: function (e, t) {
t.hide(), t.on("load", function () {
t.show()
})
}
}
}),angular.module("safe.transform.response", []).factory("safeTransformResponse", function () {
var e = {};
return e.fromJson = function (e) {
return function (t) {
var o;
try {
return o = angular.fromJson(t), e(o)
} catch (r) {
return t
}
}
}, e
}),angular.module("reported.photos.service", ["storage"]).factory("reportedPhotos", ["localStorage", function (e) {
var t = "reportedPhotos", o = {}, r = e.get(t) || [];
return o.save = function (o) {
r.push(o), e.set(t, r)
}, o.get = function () {
return r
}, o
}]),angular.module("reported.photos", ["reported.photos.service"]).filter("reportedPhotos", ["reportedPhotos", function (e) {
return function (t) {
var o = e.get();
return _.filter(t, function (e) {
return !_.includes(o, e.id)
})
}
}]),angular.module("remove.on.error", []).directive("habboRemoveOnError", function () {
return {
restrict: "A", link: function (e, t) {
t[0].onerror = function () {
t.remove()
}
}
}
}),angular.module("popup", []).factory("popup", ["$interval", "$q", "$window", function (e, t, o) {
function r(e, t) {
var r = o.innerWidth, i = o.innerHeight;
return e = e || n, t = t || a, ["width=" + (r >= e ? e : r), "height=" + (i >= t ? t : i)].join(",")
}
var a = 768, n = 1024, i = {};
return i.open = function (a, n, i) {
var s = t.defer(), l = o.open(a, "_blank", r(n, i)), c = e(function () {
l && !l.closed || (s.resolve(), e.cancel(c))
}, 100);
return s.promise
}, i
}]),angular.module("official.room.avatar", ["locale", "templates"]).component("officialRoomAvatar", {templateUrl: "common/official-room-avatar/official-room-avatar.html"}),angular.module("notifier", ["locale"]).factory("notifier", ["$q", "$translate", function (e, t) {
var o = {
extendedTimeOut: 1e3,
hideDuration: 300,
positionClass: "toast-top-center",
preventDuplicates: !0,
progressBar: !0,
showDuration: 300,
timeOut: 2e4
}, r = _.extend({}, o, {
extendedTimeOut: 0,
hideDuration: 0,
positionClass: "toast-top-center toast-sticky",
timeOut: 0,
tapToDismiss: !1
}), a = _.partialRight(toastr.success, "", o), n = _.partialRight(toastr.error, "", o),
i = _.partialRight(toastr.error, r), s = function (e) {
return function (o, r) {
t(o, r).then(e)["catch"](e)
}
}, l = function (o) {
return function (r, a, n) {
e.all([t(a, n), t(r), t("OK_BUTTON")]).then(function (e) {
var t = o(e[0] + '", e[1]);
t.delegate("button", "click", function () {
toastr.options.hideDuration = 0, toastr.clear(t, {force: !0})
})
})
}
};
return {success: s(a), error: s(n), errorSticky: l(i)}
}]),angular.module("navigate.to.on.key", []).directive("habboNavigateToOnKey", ["$document", function (e) {
function t(e) {
var t = {left: 37, right: 39};
return t[e]
}
return {
restrict: "A", link: function (o, r, a) {
function n(e) {
e.which === i && (e.preventDefault(), r.trigger("click"))
}
var i = t(a.habboNavigateToOnKey);
angular.element(e).keydown(n), r.on("$destroy", function () {
angular.element(e).unbind("keydown", n)
})
}
}
}]),angular.module("message.container", ["angular-multiple-transclusion", "templates"]).component("habboMessageContainer", {
templateUrl: "common/message-container/message-container.html",
transclude: !0
}),angular.module("my.like.cache", []).factory("myLikeCache", function () {
var e = {}, t = {};
return e.like = function (e) {
t[e] = "like"
}, e.unlike = function (e) {
t[e] = "unlike"
}, e.hasLike = function (e) {
return "like" === t[e]
}, e.hasUnlike = function (e) {
return "unlike" === t[e]
}, e
}),angular.module("like.service", ["config", "like.filters", "my.like.cache", "security"]).factory("like", ["$http", "CONFIG", "Session", "myLikeCache", function (e, t, o, r) {
function a(e, t) {
401 !== t && (r.like(e.id), e.likes = _.uniq(e.likes.concat(o.user.name)))
}
function n(e, t) {
401 !== t && (r.unlike(e.id), _.remove(e.likes, _.matches(o.user.name)))
}
var i = {};
return i.like = function (o) {
e.post(t.extraDataUrl + "/private/like/" + o.id).then(function (e) {
a(o, e.status)
})["catch"](function (e) {
a(o, e.status)
})
}, i.unlike = function (o) {
e.post(t.extraDataUrl + "/private/unlike/" + o.id).then(function (e) {
n(o, e.status)
})["catch"](function (e) {
n(o, e.status)
})
}, i
}]),angular.module("like.filters", ["security"]).filter("myLike", ["Session", function (e) {
return function (t) {
return _.find(t.likes, function (t) {
return e.hasSession() ? t === e.user.name : !1
})
}
}]).filter("othersLikes", ["Session", function (e) {
return function (t) {
return _.filter(t.likes, function (t) {
return e.hasSession() ? t !== e.user.name : !0
})
}
}]),angular.module("like", ["avatar", "false.on.outside.click", "like.filters", "like.service", "locale", "my.like.cache", "security", "templates"]).component("habboLike", {
bindings: {data: "="},
controller: ["$timeout", "Session", "like", "myLikeCache", "myLikeFilter", function (e, t, o, r, a) {
var n = this, i = a(n.data);
r.hasLike(n.data.id) && !i && n.data.likes.push(t.user.name), r.hasUnlike(n.data.id) && i && _.remove(n.data.likes, _.matches(i)), n.show = !1, n.mouseenter = function () {
e(function () {
n.show = !0
})
}, n.like = function () {
o.like(n.data)
}, n.unlike = function () {
o.unlike(n.data)
}
}],
controllerAs: "LikeController",
templateUrl: "common/like/like.html"
}),angular.module("lightbox.modal", ["templates", "ui.bootstrap"]).controller("LightboxController", ["src", function (e) {
var t = this;
t.src = e
}]).factory("lightbox", ["$uibModal", function (e) {
var t = {};
return t.open = function (t) {
return e.open({
animation: !1,
backdropClass: "lightbox-backdrop",
controller: "LightboxController",
controllerAs: "LightboxController",
resolve: {src: _.constant(t)},
templateUrl: "common/lightbox/lightbox-modal.html",
windowClass: "lightbox-modal"
}).result
}, t
}]),angular.module("lightbox", ["lightbox.modal"]).directive("habboLightbox", ["lightbox", function (e) {
return {
restrict: "A", link: function (t, o, r) {
o.click(function (t) {
t.preventDefault(), e.open(r.href)
})
}
}
}]),angular.module("leaderboard.service", ["ngResource", "config", "storage"]).factory("Leaderboard", ["$resource", "CONFIG", "httpCache", function (e, t, o) {
return e(t.habboWebLeaderboardsUrl + "/:site/:leaderboard/:timeframe/:date.json", null, {
get: {
method: "GET",
isArray: !0,
cache: o.shortCache
}
})
}]),angular.module("imager.service", ["angular-md5", "config"]).factory("imager", ["CONFIG", "md5", function (e, t) {
function o(e) {
return _(e).transform(function (e, t, o) {
return e.push(o + "-" + t), e
}, []).join(".")
}
var r = {}, a = "ef2356a4926bf225eb86c75c52309c32";
return r.generatePose = function (e) {
var t = e.size || "big", o = e.direction || "sw", r = e.headDirection || o, a = e.action || "stand",
n = e.gesture || "smile", i = {};
return i.s = {big: 0, bighead: 2, smallhead: 3, large: 4, largehead: 5}[t.toLowerCase()], i.g = {
none: 0,
smile: 1,
angry: 2,
surprise: 3,
sad: 4,
speak: 5,
eyebrows: 6
}[n.toLowerCase()], i.d = {nw: 0, w: 1, sw: 2, s: 3, se: 4, e: 5, ne: 6, n: 7}[o.toLowerCase()], i.h = {
nw: 0,
w: 1,
sw: 2,
s: 3,
se: 4,
e: 5,
ne: 6,
n: 7
}[r.toLowerCase()], i.a = {stand: 0, sit: 1, walk: 2, wave: 3, lay: 4, carry: 5, drink: 6}[a.toLowerCase()], i
}, r.get2xSize = function (e) {
return {big: "large", bighead: "largehead", smallhead: "bighead"}[e || "big"]
}, r.getDimensions = function (e) {
return {
big: {width: 64, height: 110},
bighead: {width: 54, height: 62},
smallhead: {width: 27, height: 30},
large: {width: 128, height: 220},
largehead: {width: 108, height: 124}
}[e || "big"]
}, r.getBodyImageUrl = function (r, n) {
var i = o(n), s = t.createHash(r + i + a);
return window.chocolatey.url + "habbo-imaging/avatar/" + encodeURIComponent(r + "," + i + "," + s) + ".png"
}, r.getImagerUrl = function (r, n) {
var i = o(n), s = t.createHash(r + i + a);
return window.chocolatey.url + "habbo-imaging/avatarimage?figure=" + encodeURIComponent(r + "," + i + "," + s) + "&size=l&headonly=1"
}, r.getLegacyImagerUrl = function (t, o) {
return window.chocolatey.url + "habbo-imaging/avatarimage?" + $.param({
user: t,
headonly: 2 === o.s || 3 === o.s || 5 === o.s ? 1 : 0,
size: {0: "b", 1: "s", 2: "b", 3: "s", 4: "l", 5: "l"}[o.s],
gesture: {0: "", 1: "sml", 2: "agr", 3: "srp", 4: "sad", 5: "spk", 6: "eyb"}[o.g],
direction: o.d,
head_direction: o.h,
action: {0: "std", 1: "sit", 2: "wlk", 3: "wav", 4: "lay", 5: "crr", 6: "drk"}[o.a]
})
}, r
}]),angular.module("imager", ["imager.service", "templates"]).component("habboImager", {
bindings: {
figure: "@",
user: "@",
name: "@",
size: "@",
direction: "@",
headDirection: "@",
action: "@",
gesture: "@"
}, controller: ["$scope", "imager", function (e, t) {
function o(e) {
var o = {
size: e || r.size,
direction: r.direction,
headDirection: r.headDirection,
action: r.action,
gesture: r.gesture
}, a = t.generatePose(o);
return r.action ? t.getBodyImageUrl(r.figure, a) : r.figure ? t.getImagerUrl(r.figure, a) :
r.user ? t.getLegacyImagerUrl(r.user, a) : void 0
}
var r = this;
r.dimensions = t.getDimensions(r.size), r.src = o();
var a = "bighead" === r.size && r.figure ? null : t.get2xSize(r.size);
a && (r.src2x = o(a))
}], controllerAs: "ImagerController", templateUrl: "common/imager/imager.html"
}),angular.module("hotel.closed", ["locale", "templates"]).component("habboHotelClosed", {templateUrl: "common/hotel-closed/hotel-closed.html"}),angular.module("header", ["header.ad", "locale", "navigation", "security", "sticky.header", "templates", "user.menu"]).component("habboHeaderLarge", {
bindings: {active: "@"},
controllerAs: "HeaderLargeController",
templateUrl: "common/header/header-large.html",
transclude: !0
}).component("habboHeaderSmall", {
bindings: {active: "@"}, controller: ["loginModal", function (e) {
var t = this;
t.openLoginModal = e.open
}], controllerAs: "HeaderSmallController", templateUrl: "common/header/header-small.html", transclude: !0
}),angular.module("group.badge", ["config", "templates"]).component("habboGroupBadge", {
bindings: {
code: "@",
name: "@"
}, controller: ["CONFIG", function (e) {
var t = this;
t.imagingUrl = e.groupBadgeUrl
}], controllerAs: "GroupBadgeController", templateUrl: "common/group-badge/group-badge.html"
}),angular.module("google.analytics", []).factory("googleAnalytics", ["$window", function (e) {
function t(t) {
e.Bugsnag && e.Bugsnag.notifyException(t, "GA not supported", {groupingHash: "GA"}, "info")
}
var o = {};
return o.trackEvent = function (o, r, a, n) {
try {
e.ga("send", "event", o, r, a, n)
} catch (i) {
t(i)
}
}, o.trackPageView = function (o) {
try {
e.ga("send", "pageview", o)
} catch (r) {
t(r)
}
}, o.trackSocial = function (o, r, a) {
try {
e.ga("send", "social", o, r, a)
} catch (n) {
t(n)
}
}, o.trackTransaction = function (o, r, a, n, i, s) {
try {
e.ga("ecommerce:addTransaction", {id: o, currency: s, revenue: i}), e.ga("ecommerce:addItem", {
id: o,
name: r,
sku: a,
category: n,
price: i,
quantity: "1"
}), e.ga("ecommerce:send")
} catch (l) {
t(l)
}
}, o
}]).run(["$location", "$rootScope", "$timeout", "googleAnalytics", function (e, t, o, r) {
t.$on("$stateChangeSuccess", function () {
o(function () {
r.trackPageView(e.url())
})
})
}]),angular.module("form", ["captcha", "email.address", "password.current", "password.new", "password.toggle.mask", "search", "validators"]),angular.module("footer", ["locale", "templates", "zendesk.url"]).constant("FOOTER_LINKS", ["FOOTER_SAFETY", "FOOTER_PARENTS", "FOOTER_TOS_AND_PRIVACY", "FOOTER_ADVERTISERS"]).component("habboFooter", {
controller: ["FOOTER_LINKS", function (e) {
var t = this;
t.links = e, t.currentYear = (new Date).getFullYear()
}], controllerAs: "FooterController", templateUrl: "common/footer/footer.html"
}),angular.module("flash.require", ["flash.service"]).directive("habboRequireFlash", ["flash", "ngIfDirective", function (e, t) {
var o = t[0];
return {
restrict: "A",
priority: o.priority,
terminal: o.terminal,
transclude: o.transclude,
link: function (t, r, a) {
a.ngIf = e.isSupported, o.link.apply(o, arguments)
}
}
}]),angular.module("flash", ["flash.href", "flash.require", "flash.service"]),angular.module("flash.service", []).factory("flash", function () {
var e = {};
return e.isEnabled = function () {
return swfobject.hasFlashPlayerVersion("11")
}, e.isSupported = function () {
return e.isEnabled() || !bowser.mobile
}, e
}),angular.module("flash.href", ["flash.service"]).directive("habboFlashHref", ["flash", function (e) {
return {
restrict: "A", link: function (t, o, r) {
e.isSupported() && r.$observe("habboFlashHref", function (e) {
e && r.$set("href", e)
})
}
}
}]),angular.module("false.on.outside.click", []).directive("habboFalseOnOutsideClick", function () {
return {
restrict: "A", link: function (e, t, o) {
function r(r) {
0 === angular.element(r.target).closest(t).length && e.$apply(function () {
e.$eval(o.habboFalseOnOutsideClick + " = false;")
})
}
e.$watch(o.habboFalseOnOutsideClick, function (e) {
e ? angular.element("body").on("click touchstart", r) : angular.element("body").off("click touchstart", r)
}), t.on("$destroy", function () {
angular.element("body").off("click touchstart", r)
})
}
}
}),angular.module("eu.cookie.banner", ["locale", "storage", "system.data", "templates"]).component("habboEuCookieBanner", {
controller: ["SystemData", "localStorage", function (e, t) {
var o = this;
o.show = !1, t.get("acceptCookies") || (window.chocolatey.cookieBanner == true ? o.show = !0 : t.set("acceptCookies", !0)), o.close = function () {
o.show = !1, t.set("acceptCookies", !0)
}
}], controllerAs: "EuCookieBannerController", templateUrl: "common/eu-cookie-banner/eu-cookie-banner.html"
}),angular.module("encode.uri.component", []).filter("encodeURIComponent", ["$window", function (e) {
return e.encodeURIComponent
}]),angular.module("empty.results", ["locale", "templates"]).component("habboEmptyResults", {
bindings: {translationKey: "@"},
controllerAs: "EmptyResultsController",
templateUrl: "common/empty-results/empty-results.html"
}),angular.module("creation.href", ["encode.uri.component"]).directive("habboCreationHref", ["encodeURIComponentFilter", function (e) {
return {
restrict: "A", link: function (t, o, r) {
t.$watch(r.habboCreationHref, function (t) {
if (t) {
var o = "PHOTO" === t.type ? "photo" : "story",
a = ["profile", e(t.creator_name), o, t.id].join("/");
t.pool && (a += "?pool=" + t.pool), r.$set("href", "/" + a)
}
})
}
}
}]),angular.module("console.warning", ["locale"]).factory("warning", function () {
var e = {};
return e.HEADER = [" ,,, ", " ,,,,,,,,,,,,,,, ,,,,,,,,,,,,,,,,,,,,,,, ,,,,,,,,,,,, ,,,,,,,,,, ,::,, ", ",,@@@@@@@@@@@@@@:,:@@@@@@@@::@@@@@@@@@@@::@@@@@@@@@@@@:,,,:@@@@@@@@:,,,::: :, ", ",,@@@@@@@@@@@@@@@:@@@@@@@@@@:@@@@@@@@@@@@@@@@@@@@@@@@@@:,:@@@@@@@@@@:,: : ,,", ",,@@,,,,,@,,,,,,@@,,,,,,,,,,@@,,,,,,,,,,,@@@,,,,,,,,,,@@@@,,,,,,,,,,@@: :: ,,", ",,@@,,,,,@,,,,,,@@,,,,,,,,,,@@,,,,,,,,,,,,@@,,,,,,,,,,,@@@,,,,,,,,,,@@:::: :,,", ",,@@,,,,,@,,,,,,@,,,,,,,,,,,,@,,,,,,,,,,,,@@,,,,,,,,,,,,@,,,,,,,,,,,,@@@::,,, ", ",,@@,,,,,@,,,,,,@,,,,,,,,,,,,@,,,,,,,,,,,,@@,,,,,,,,,,,,@,,,,,,,,,,,,@@@:,,, ", ",,@@,,,,,@,,,,,,@,,,,,@@,,,,,@,,,,,,@,,,,,@@,,,,,@,,,,,,@,,,,,@@,,,,,@;;@@,, ", ",,@@,,,,,@,,,,,,@,,,,,@@,,,,,@,,,,,,@,,,,,@@,,,,,@,,,,,,@,,,,,@@,,,,,@;;@@:, ", ",,@@,,,,,,,,,,,,@,,,,,@@,,,,,@,,,,,,@,,,,,@@,,,,,@,,,,,,@,,,,,@@,,,,,@;;;;@:, ", ",,@@,,,,,,,,,,,,@,,,,,@@,,,,,@,,,,,,,,,,,,@@,,,,,,,,,,,,@,,,,,@@,,,,,@;;;;@@,,", ",,@@,,,,,,,,,,,,@,,,,,@@,,,,,@,,,,,,,,,,@@@@,,,,,,,,,,@@@,,,,,@@,,,,,@;;;;@@,,", ",,@@::::::::::::@:::::@@:::::@::::::::::@@@@::::::::::@@@:::::@@:::::@;;;;@@,,", ",,@@::::::::::::@::::::::::::@::::::::::::@@::::::::::::@:::::@@:::::@;;;;@@,,", ",,@@::::::::::::@::::::::::::@::::::@:::::@@:::::@::::::@:::::@@:::::@;;;;@@,,", ",,@@:::::@::::::@::::::::::::@::::::@:::::@@:::::@::::::@:::::@@:::::@;;;;@@,,", ",,@@:::::@::::::@:::::@@:::::@::::::@:::::@@:::::@::::::@:::::@@:::::@;;;;@@,,", ",,@@:::::@::::::@:::::@@:::::@::::::::::::@@::::::::::::@::::::::::::@;;;;@@,,", ",,@@:::::@::::::@:::::@@:::::@::::::::::::@@::::::::::::@::::::::::::@;;;;@@,,", ",,@@:::::@::::::@:::::@@:::::@::::::::::::@@:::::::::::@@@::::::::::@@;;;;@@,,", ",,@@:::::@::::::@:::::@@:::::@:::::::::::@@@::::::::::@@@@::::::::::@@;;;;@@,,", ",,@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@;;;@@@@@@@@@@;;;;;;@@,,", ",,@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@;;@@@@@@@@@@@;;;;;@@@@@@@@@;;;;;;;@@,,", ",,,:@@;;;;@@;;;;;@@;;;;;@@;;;;@@;;;;;;;;;;;;@@;;;;;;;;;;;;;;@@;;;;;;;;;;;;@@,,", " ,,,@@;;;;;@@;;;;;@@;;;;@@;;;;;@@;;;;;;;;;;;@@;;;;;;;;;;;;;;@@;;;;;;;;;;;;@:,,", " ,,,:@@;;;;@@;;;;;@@;;;;;@@;;;;@@;;;;;;;;;;@@@@;;;;;;;;;;@@@:@@;;;;;;;;@@:,, ", " ,,,@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@:,@@@@@@@@@@@@,,, ", " ,,,:::::::::::::::::::::::::::::::::::::::,::::::::::::,,,,,::::::::,,,, ", " ,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, ", " ,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, ,,,,,,,,,, ", " ", " "], e.FOOTER = [" ", " - Chocolatey"], e.format = function (t) {
var o = [], r = "";
return t.split(" ").forEach(function (t) {
r.length + t.length + 5 > e.HEADER[0].length && (o.push(r), r = ""), r += t + " "
}), r && o.push(r), _.map(o, function (e) {
return " " + e.trim()
})
}, e
}).run(["$log", "$translate", "warning", function (e, t, o) {
t("CONSOLE_WARNING").then(function (t) {
var r = o.format(t);
e.info(o.HEADER.join("\n") + "\n" + r.join("\n") + "\n" + o.FOOTER.join("\n"))
})
}]),angular.module("compile", []).component("habboCompile", {
bindings: {data: "<"},
controller: ["$compile", "$element", "$scope", function (e, t, o) {
var r = this;
t.html(r.data), e(t.contents())(o)
}]
}),angular.module("columns", ["columns.channel", "columns.profile"]),angular.module("by.name.description.or.motto.filter", []).filter("byNameDescriptionOrMotto", function () {
return function (e, t) {
return _.filter(e, function (e) {
return !t || e.name && _(e.name.toLowerCase()).includes(t.toLowerCase()) || e.description && _(e.description.toLowerCase()).includes(t.toLowerCase()) || e.motto && _(e.motto.toLowerCase()).includes(t.toLowerCase())
})
}
}),angular.module("badge", ["config", "templates"]).component("habboBadge", {
bindings: {code: "@", name: "@"},
controller: ["CONFIG", function (e) {
var t = this;
t.badgeUrl = e.badgeUrl
}],
controllerAs: "BadgeController",
templateUrl: "common/badge/badge.html"
}),angular.module("avatar", ["encode.uri.component", "imager", "templates"]).component("habboAvatar", {
bindings: {
big: "@",
user: "@"
}, controllerAs: "AvatarController", templateUrl: "common/avatar/avatar.html"
}),angular.module("ios.download.link", ["config", "google.analytics"]).directive("habboIosDownloadLink", ["CONFIG", "googleAnalytics", function (e, t) {
return {
restrict: "A", link: function (o, r, a) {
bowser.ios && (a.$set("href", e.appStoreUrl), a.$set("target", "_blank"), a.$set("rel", "noopener noreferrer"), r.click(function () {
t.trackEvent("Download", "App Store")
}))
}
}
}]),angular.module("air.download.link", ["android.download.link", "ios.download.link"]),angular.module("android.download.link", ["config", "google.analytics"]).directive("habboAndroidDownloadLink", ["CONFIG", "googleAnalytics", function (e, t) {
return {
restrict: "A", link: function (o, r, a) {
bowser.android && (a.$set("href", e.googlePlayUrl), a.$set("target", "_blank"), a.$set("rel", "noopener noreferrer"), r.click(function () {
t.trackEvent("Download", "Google Play")
}))
}
}
}]),angular.module("ad.unit", ["ad.double.click", "security", "templates"]).component("habboAdUnit", {
bindings: {unit: "@"},
controller: ["$location", "Session", function (e, t) {
var o = /^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))$/i,
r = this;
r.hasAds = t.hasAds, r.isAdsPrevented = function () {
var t = e.search(), r = _(t).values().find(function (e) {
return o.test(e)
});
return Boolean(r)
}
}],
controllerAs: "AdUnitController",
templateUrl: "common/ad-unit/ad-unit.html"
}),angular.module("accordion", ["accordion.grid", "accordion.item", "accordion.item.content", "accordion.item.preview"]),angular.module("accordion.item.preview", []).component("habboAccordionItemPreview", {
require: {AccordionItemController: "^habboAccordionItem"},
controllerAs: "AccordionItemPreviewController",
template: '',
transclude: !0
}),angular.module("accordion.item.content", ["ngAnimate", "events", "templates"]).component("habboAccordionItemContent", {
require: {
AccordionItemController: "^habboAccordionItem"
},
controller: ["$animate", "$element", "$scope", "$timeout", "EVENTS", function (e, t, o, r, a) {
function n() {
m = u()
}
function i() {
angular.isUndefined(m) && n(), c({height: 0, opacity: 0}, {height: m, opacity: 1}), p.height = m
}
function s() {
c({height: m, opacity: 1}, {
height: 0,
opacity: 0
}), m = void 0, p.height = 0, p.AccordionItemController.expanded = !1
}
function l() {
0 !== p.height && r(function () {
var e = u();
c({height: p.height}, {height: e}), p.height = e
})
}
function c(t, o) {
d && e.cancel(d), d = e.animate(h, t, o)
}
function u() {
var e = h.css("height", "").actual("outerHeight");
return h.css("height", p.height), e
}
var d, m, p = this, h = t.children().first();
p.height = 0, o.$on(a.accordionOpen, i), o.$on(a.accordionClose, s), o.$on(a.accordionResize, function () {
n(), l()
}), o.$on(a.accordionUpdate, l), o.$watch("AccordionItemContentController.height", function (e) {
p.AccordionItemController.setContentHeight(e)
})
}],
controllerAs: "AccordionItemContentController",
templateUrl: "common/accordion/accordion-item-content.html",
transclude: !0
}),angular.module("accordion.item", ["events", "templates"]).component("habboAccordionItem", {
require: {AccordionGridController: "^habboAccordionGrid"},
controller: ["$element", "$scope", "EVENTS", function (e, t, o) {
var r = this;
r.expanded = !1, r.contentHeight = 0, r.offset = 0, r.$onInit = function () {
r.AccordionGridController.registerItem(r)
}, r.toggle = function () {
r.expanded ? r.AccordionGridController.collapseItem(r) : (r.offset = e.offset().top, r.AccordionGridController.expandItem(r))
}, r.setContentHeight = function (e) {
r.contentHeight = e
}, t.$watch("AccordionItemController.expanded", function (e, r) {
e ? t.$broadcast(o.accordionOpen) : r && t.$broadcast(o.accordionClose)
})
}],
controllerAs: "AccordionItemController",
templateUrl: "common/accordion/accordion-item.html",
transclude: !0
}),angular.module("accordion.grid", ["events"]).component("habboAccordionGrid", {
controller: ["$scope", "$window", "EVENTS", function (e, t, o) {
function r() {
angular.forEach(l, s.collapseItem)
}
function a(e, t) {
return t && parseInt(t.offset, 10) < parseInt(e.offset, 10) ? e.offset - t.contentHeight : e.offset
}
function n() {
e.$broadcast(o.accordionResize)
}
var i = 150, s = this, l = [];
s.expandedItem = null, s.registerItem = function (e) {
l.push(e)
}, s.expandItem = function (e) {
r(), e.expanded = !0, s.expandedItem = e
}, s.collapseItem = function (e) {
e.expanded && (e.expanded = !1, s.expandedItem = null)
}, angular.element(t).on("orientationchange resize", n), e.$on("$destroy", function () {
angular.element(t).off("orientationchange resize", n)
}), e.$watch("HabboAccordionGridController.expandedItem", function (e, t) {
if (e) {
var o = a(e, t);
angular.element("html, body").animate({scrollTop: o}, i)
}
})
}], controllerAs: "HabboAccordionGridController", template: "", transclude: !0
}),angular.module("shop", ["config", "earn.credits", "header", "locale", "prepaid", "router", "shop.footer", "store", "subscriptions", "system.data", "tabs", "templates", "transactions"]).config(["$stateProvider", "$urlRouterProvider", function (e, t) {
e.statePublic("shop", {
url: "/shop?country",
"abstract": !0,
controller: "ShopController",
controllerAs: "ShopController",
resolve: {
countryCode: ["$stateParams", "SystemData", function (e, t) {
return e.country || t.getShopCountry() || "all"
}]
},
templateUrl: "shop/shop.html"
}), t.when("/credits", "/shop")
}]).controller("ShopController", ["CONFIG", function (e) {
var t = this;
t.earnCreditsEnabled = "true" === e.offerToroEnabled
}]),angular.module("shop.filters", []).filter("credit", function () {
return function (e) {
return _.filter(e, function (e) {
return e.creditAmount > 0
})
}
}).filter("product", function () {
return function (e) {
return _.filter(e, function (e) {
return 0 === e.creditAmount
})
}
}).filter("paymentCategory", function () {
return function (e, t) {
return t ? _.filter(e, function (e) {
return e.category === t
}) : e
}
}).filter("payment", ["paymentCategoryFilter", function (e) {
return function (t, o) {
return _.filter(t, function (t) {
return e(t.paymentMethods, o).length > 0
})
}
}]),angular.module("shop.service", ["ngResource", "config", "safe.transform.response", "security", "storage"]).factory("Shop", ["$resource", "CONFIG", "Session", "httpCache", "safeTransformResponse", function (e, t, o, r, a) {
function n(e) {
return e = e || [], 1 === e.length ? [] : (e.unshift("all"), _.map(e, function (e) {
return {key: e, translateKey: "SHOP_PAYMENT_METHOD_" + e.toUpperCase()}
}))
}
var i = e(t.shopUrl + "/:resource/:subresource", {}, {
countries: {
url: t.shopUrl + "/:public/:subresource",
method: "GET",
isArray: !0,
params: {subresource: "countries"},
cache: r.longCache
},
inventory: {
url: t.shopUrl + "/:public/inventory/:countryCode",
method: "GET",
cache: r.longCache,
transformResponse: a.fromJson(function (e) {
return e.paymentCategories = n(e.paymentCategories), e
})
},
history: {url: t.shopUrl + "/history", method: "GET", isArray: !0}
}), s = i.inventory, l = i.countries;
return i.inventory = function () {
return arguments[0] = arguments[0] || {}, _.extend(arguments[0], {"public": o.hasSession() ? null : "public"}), s.apply(this, arguments)
}, i.countries = function () {
return l.apply(this, [{"public": o.hasSession() ? null : "public"}])
}, i
}]),angular.module("settings.service", ["config", "google.analytics"]).factory("settings", ["$http", "CONFIG", "googleAnalytics", function (e, t, o) {
var r = {};
return r.changePassword = function (r) {
return e.post(t.apiUrl + "/settings/password/change", r).then(function (e) {
return o.trackEvent("Password", "Changed"), e
})
}, r.changeEmail = function (r) {
return e.post(t.apiUrl + "/settings/email/change", r).then(function (e) {
return o.trackEvent("Email", "Changed"), e
})
}, r.resendActivationEmail = function () {
return e.post(t.apiUrl + "/settings/email/verification-resend").then(function (e) {
return o.trackEvent("Email", "Activation resent"), e
})
}, r
}]),angular.module("settings", ["account.security", "avatar.selection", "email.change", "header", "locale", "password.change", "privacy.settings", "router", "security", "tabs", "templates", "web.pages"]).config(["$stateProvider", "$urlRouterProvider", function (e, t) {
e.statePrivate("settings", {
url: "/settings",
"abstract": !0,
templateUrl: "settings/settings.html"
}), t.when("/settings", "/settings/privacy")
}]),angular.module("security.service", ["config", "google.analytics", "security.fb", "security.session", "security.use.force.service"]).factory("security", ["$http", "$location", "$q", "$window", "CONFIG", "Session", "fbSecurity", "googleAnalytics", "useForce", function (e, t, o, r, a, n, i, s, l) {
function c(e) {
return l.handleForces(e)["catch"](function () {
return u()["finally"](function () {
return o.reject({status: "force.pending"})
})
})
}
function u() {
return e.post(a.apiUrl + "/public/authentication/logout")
}
function d(e) {
return n.destroy(), r.location.href = e || "/", o.defer().promise
}
var m = {};
return m.init = function (e) {
var t = e || r.session;
return c(t).then(n.init)
}, m.login = function (o) {
return e.post(a.apiUrl + "/public/authentication/login", o).then(function (e) {
return s.trackEvent("Login", "Credentials", t.path()), e.data
}).then(c).then(n.create)
}, m.fbLogin = function () {
return i.login().then(function (o) {
return e.post(a.apiUrl + "/public/authentication/facebook", o).then(function (e) {
return s.trackEvent("Login", "Facebook", t.path()), e.data
}).then(c).then(n.create)
})
}, m.logout = function (e) {
return u().then(function () {
return s.trackEvent("Logout", "Succeeded", t.path()), d(e)
})["catch"](function () {
return s.trackEvent("Logout", "Failed", t.path()), o.reject()
})
}, m.forceLogout = function (e) {
return u()["finally"](function () {
return s.trackEvent("Logout", "Forced", t.path()), d(e)
})
}, m
}]),angular.module("security", ["security.authorization", "security.credentials", "security.fingerprint", "security.login", "security.safety.answering.modal", "security.safety.lock", "security.service", "security.session"]),angular.module("security.fb", ["ezfb"]).factory("fbSecurity", ["$q", "ezfb", function (e, t) {
function o() {
var o = e.defer();
return t.getLoginStatus(function (e) {
"connected" === e.status ? o.resolve(e.authResponse) : o.reject(e)
}), o.promise
}
function r() {
var o = e.defer();
return t.login(function (e) {
"connected" === e.status ? o.resolve(e.authResponse) : o.reject(e)
}, {scope: "public_profile,email"}), o.promise
}
var a = {};
return a.login = function () {
return t.isSdkLoaded() ? o()["catch"](r) : e.reject({data: {message: "fb.sdk_not_loaded"}})
}, a
}]),angular.module("security.credentials", ["config"]).factory("credentials", ["CONFIG", function (e) {
var t = {};
return t.request = function (t) {
return (_(t.url).includes(e.apiUrl) || _(t.url).includes(e.extraDataUrl) || _(t.url).includes(e.shopUrl)) && (t.withCredentials = !0), t
}, t
}]).config(["$httpProvider", function (e) {
e.interceptors.push("credentials")
}]),angular.module("security.authorization", ["security.login", "security.safety.lock", "security.session"]).factory("authorization", ["$q", "Session", "loginModal", "safetyLockModal", function (e, t, o, r) {
var a = {};
return a.hasAccessToPrivate = function () {
return t.hasSession() ? e.when() : o.open()["catch"](function () {
return e.reject({access: !1})
})
}, a.hasAccessToTrusted = function () {
return a.hasAccessToPrivate().then(function () {
return t.isTrusted() ? e.when() : r.open()["catch"](function () {
return e.reject({access: !1})
})
})
}, a.hasAccessToHabboAccountTrusted = function () {
return a.hasAccessToTrusted().then(function () {
return t.isHabboAccountSession() ? e.when() : e.reject({access: !1})
})
}, a
}]),angular.module("router.service", ["security", "ui.router"]).config(["$locationProvider", "$urlMatcherFactoryProvider", function (e, t) {
e.hashPrefix("!"), e.html5Mode({enabled: !0, requireBase: !1}), t.strictMode(!1)
}]).config(["$stateProvider", function (e) {
function t(e, t, l) {
return t["abstract"] !== !0 && (o("auth", t), t.resolve.auth = ["$injector", function (e) {
return a = a || e.get("$q"), n = n || e.get("$state"), i = i || e.get("authorization"), i[l]()["catch"](r)
}]), s(e, t)
}
function o(e, t) {
t.resolve = t.resolve || {}, _(t.resolve).keys().forEach(function (o) {
_(t.resolve[o]).includes(e) || t.resolve[o].splice(t.resolve[o].length - 1, 0, e)
})
}
function r(e) {
return n.hasPrevious() || n.go("home.news"), a.reject(e)
}
var a, n, i, s = e.state;
e.statePublic = function (e, t) {
return s(e, t)
}, e.statePrivate = function (e, o) {
return t(e, o, "hasAccessToPrivate")
}, e.state = function (e, o) {
return t(e, o, "hasAccessToTrusted")
}, e.stateHabboAccountTrusted = function (e, o) {
return t(e, o, "hasAccessToHabboAccountTrusted")
}
}]).run(["$rootScope", "$state", "security", function (e, t, o) {
var r = e.$on("$stateChangeStart", function (e, a, n) {
e.preventDefault(), o.init()["finally"](function () {
r(), t.go(a, n)
})
})
}]),angular.module("refresh.dosarrest.cookie", []).factory("refreshDosarrestCookie", ["$q", "$window", function (e, t) {
function o(e) {
return e.match(/\.html$/)
}
function r(e) {
return _.isString(e) && a.test(e)
}
var a = /Client Validation<\/title>/gi, n = {};
return n.response = function (a) {
var n = e.defer();
return !o(a.config.url) && r(a.data) ? t.location.reload() : n.resolve(a), n.promise
}, n
}]).config(["$httpProvider", function (e) {
e.interceptors.push("refreshDosarrestCookie")
}]),angular.module("prompt.safety.lock", ["http.buffer", "security"]).factory("promptSafetyLock", ["$injector", "$q", "httpBuffer", function (e, t, o) {
function r(e) {
return e.data && "account.safety_locked" === e.data.error
}
function a(e) {
return _(e).includes("/public/forgotPassword")
}
function n(e) {
var r = t.defer();
return o.pushError(e.config, r), i().open().then(o.flush)["catch"](function () {
o.reject(403)
}), r.promise
}
function i() {
return s || e.get("safetyLockModal")
}
var s, l = {};
return l.responseError = function (e) {
return e && r(e) && !a(e.config.url) ? n(e) : t.reject(e)
}, l
}]).config(["$httpProvider", function (e) {
e.interceptors.push("promptSafetyLock")
}]),angular.module("prompt.login", ["http.buffer", "security"]).factory("promptLogin", ["$injector", "$location", "$q", "Session", "httpBuffer", function (e, t, o, r, a) {
function n(e) {
return _(e).includes("/login") || _(e).includes("/facebook") || _(e).includes("/logout")
}
function i() {
return u || e.get("security")
}
function s(e) {
var t = o.defer(), r = l();
return a.pushError(e.config, t), r.isOpen() || r.open().then(a.flush)["catch"](function () {
a.reject(401)
}), t.promise
}
function l() {
return c || e.get("loginModal")
}
var c, u, d = {};
return d.responseError = function (e) {
return e && 401 === e.status && !n(e.config.url) ? r.hasSession() ? i().forceLogout(t.url()) : s(e) : o.reject(e)
}, d
}]).config(["$httpProvider", function (e) {
e.interceptors.push("promptLogin")
}]),angular.module("error.maintenance", ["notifier"]).factory("maintenanceError", ["$q", "notifier", function (e, t) {
var o = {};
return o.responseError = function (o) {
return 503 === o.status && t.error("ERROR_SERVER_MAINTENANCE"), e.reject(o)
}, o
}]).config(["$httpProvider", function (e) {
e.interceptors.push("maintenanceError")
}]),angular.module("router", ["ban.error", "error.maintenance", "head", "prerender", "prompt.login", "prompt.safety.lock", "refresh.dosarrest.cookie", "router.service", "scrolltop", "spinner"]),angular.module("http.buffer", []).factory("httpBuffer", ["$injector", function (e) {
function t(t, r) {
o = o || e.get("$http"), o(t).then(function (e) {
r.resolve(e)
})["catch"](function (e) {
r.reject(e)
})
}
var o, r = {}, a = [];
return r.pushError = function (e, t) {
a.push({config: e, deferred: t})
}, r.flush = function () {
angular.forEach(a, function (e) {
t(e.config, e.deferred)
}), a = []
}, r.reject = function (e) {
angular.forEach(a, function (t) {
t.deferred.reject({status: e, data: {}})
}), a = []
}, r
}]),angular.module("room", ["flash", "locale", "remove.on.error", "room.open", "room.restricted", "room.service", "router", "templates"]).config(["$stateProvider", function (e) {
e.statePublic("room", {
url: "/room/:id",
controller: "RoomController",
controllerAs: "RoomController",
onEnter: ["room", "Head", function (e, t) {
function o(e) {
return e.replace(/[|ƒ†‡‘•—¥ª¬±µ¶º»]/g, " ").replace(/[ ]+/g, " ").trim()
}
t.title = o(e.name)
}],
resolve: {
room: ["$stateParams", "Room", function (e, t) {
return t.get({id: e.id}).$promise
}]
},
templateUrl: "room/room.html"
})
}]).controller("RoomController", ["room", function (e) {
var t = this;
t.room = e
}]),angular.module("room.service", ["ngResource", "config", "storage"]).factory("Room", ["$resource", "CONFIG", "httpCache", function (e, t, o) {
return e(t.apiUrl + "/public/rooms/:id", null, {get: {method: "GET", cache: o.shortCache}})
}]),angular.module("registration.service", ["config", "google.analytics", "registration.age.gate", "security"]).factory("registration", ["$http", "$q", "$window", "CONFIG", "ageGate", "googleAnalytics", "security", function (e, t, o, r, a, n, i) {
var s = {};
return s.register = function (s) {
return a.register(s.birthdate), a.isLocked() ? t.reject({data: {error: "age"}}) : e.post(r.apiUrl + "/public/registration/new", s).then(function (e) {
var r = t.defer();
return 204 === e.status ? (n.trackEvent("Registration", "Registered", "Staff"), r.resolve(e)) : (n.trackEvent("Registration", "Registered", "User"), o.piwikTrack && (o._spef.push(["trackGoal", 1]), o.piwikTrack()), i.init(e.data).then(function () {
r.resolve(e)
})), r.promise
})
}, s
}]),angular.module("registration", ["events", "header", "hotel.closed", "locale", "registration.form", "router", "security", "system.data", "templates"]).config(["$stateProvider", function (e) {
e.statePublic("registration", {
url: "/registration?captchaToken",
controller: "RegistrationController",
controllerAs: "RegistrationController",
data: {title: "HEAD_TITLE_REGISTRATION"},
templateUrl: "registration/registration.html"
})
}]).controller("RegistrationController", ["$scope", "$state", "EVENTS", "SystemData", function (e, t, o, r) {
var a = this;
a.isOpen = r.isHotelOpen(), e.$on(o.securityLogin, function () {
t.go("home.news", null, {location: "replace"})
})
}]).run(["$rootScope", "$state", "Session", function (e, t, o) {
e.$on("$stateChangeStart", function (e, r) {
"registration" === r.name && (o.hasSession()) && (e.preventDefault(), t.go("home.news"))
})
}]),angular.module("registration.form", ["ngMessages", "birthdate", "config", "form", "google.analytics", "locale", "notifier", "registration.partner", "registration.policies", "registration.service", "router", "security", "system.data", "templates"]).component("habboRegistrationForm", {
controller: ["$scope", "$state", "$stateParams", "CAPTCHA_EVENTS", "CONFIG", "SystemData", "googleAnalytics", "notifier", "registration", function (e, t, o, r, a, n, i, s, l) {
function c() {
return "hhtr" === a.hotel
}
var u = this;
u.hasCaptchaToken = Boolean(o.captchaToken), u.registration = {captchaToken: o.captchaToken}, u.registerInProgress = !1, u.showPartnerRegistration = n.isIDCGamesCountry() || c(), u.register = function () {
var o = _(e.registrationForm.$error).values().flatten().map("$name").uniq().sort().join(", ");
i.trackEvent("Registration", "Clicked", o), e.registrationForm.$valid && (u.registerInProgress = !0, l.register(u.registration).then(function (e) {
204 === e.status ? t.go("home.news") : t.go("hotel")
})["catch"](function (t) {
var o = t.data && t.data.error;
"age" === o ? s.error("ERROR_BIRTHDATE_AGE") : ("registration_email" === o || "registration.error.invalid_email" === o ? e.$broadcast("remote-data-invalid", "emailInvalid") : "registration_email_in_use" === o ? e.$broadcast("remote-data-invalid", "emailUsedInRegistration") : 429 === t.status ? s.error("ERROR_TOO_MANY_ATTEMPTS", {time: moment(t.data.nextValidRequestDate).fromNow(!0)}) : s.error("ERROR_SERVER"), e.$broadcast(r.reset))
})["finally"](function () {
u.registerInProgress = !1
}))
}, u.fbRegister = function () {
t.go("hotel")
}
}], controllerAs: "RegistrationFormController", templateUrl: "registration/registration-form.html"
}),angular.module("registration.age.gate", ["config", "google.analytics", "local.storage"]).factory("ageGate", ["CONFIG", "googleAnalytics", "localStorage", function (e, t, o) {
function r(t) {
return moment({day: t.day, month: t.month - 1, year: t.year}).add(e.minAge, "years").isAfter(moment())
}
var a = {}, n = !1;
return a.register = function (e) {
r(e) && (n = !0, o.set("ageGate", !0), t.trackEvent("Registration", "Age gate", moment(e).format("YYYY-MM-DD")))
}, a.isLocked = function () {
return n || o.get("ageGate")
}, a
}]),angular.module("profile", ["header", "locale", "profile.creations", "profile.header", "profile.item.lists", "profile.modal", "profile.service", "router", "security", "social.share", "templates"]).config(["$stateProvider", "$urlRouterProvider", function (e, t) {
e.statePublic("profile", {
url: "/profile/:name",
controller: "ProfileController",
controllerAs: "ProfileController",
data: {title: "HEAD_TITLE_PROFILE"},
resolve: {
profile: ["$stateParams", "Profile", function (e, t) {
return t.get({name: e.name}).$promise
}]
},
templateUrl: "profile/profile.html"
}), t.when("/home/:name", "/profile/:name"), t.when("/profile", "/")
}]).controller("ProfileController", ["CreationsProfile", "Profile", "Session", "profile", function (e, t, o, r) {
var a = this;
a.profile = r, o.hasSession() && r.uniqueId === o.user.uniqueId ? a.items = t["private"]() : r.profileVisible && (a.items = t.items({uniqueId: r.uniqueId})), a.stories = e.stories({uniqueId: r.uniqueId}), a.photos = e.photos({uniqueId: r.uniqueId}), a.random = function () {
return .5 - Math.random()
}
}]),angular.module("profile.service", ["ngResource", "config", "storage"]).factory("Profile", ["$resource", "CONFIG", "httpCache", function (e, t, o) {
return e(t.apiUrl + "/public/users/:uniqueId/:resource", null, {
get: {method: "GET", cache: o.shortCache},
items: {method: "GET", params: {resource: "profile"}, cache: o.shortCache},
"private": {method: "GET", url: t.apiUrl + "/user/profile", cache: o.shortCache}
})
}]),angular.module("profile.creations", ["ngResource", "config", "profile.service", "reported.photos", "safe.transform.response", "storage"]).factory("CreationsProfile", ["$resource", "CONFIG", "Profile", "httpCache", "reportedPhotosFilter", "safeTransformResponse", function (e, t, o, r, a, n) {
function i(e) {
return function (t) {
return o.get({name: t}).$promise.then(function (t) {
return s[e]({uniqueId: t.uniqueId}).$promise
})
}
}
var s = e(t.extraDataUrl + "/public/users/:uniqueId/:resource", null, {
photos: {
method: "GET",
isArray: !0,
params: {resource: "photos"},
cache: r.shortCache,
transformResponse: n.fromJson(function (e) {
var t = a(e);
return _.map(t, function (e) {
return _.assign(e, {
url: "https:" + e.url,
contentHeight: 320,
contentWidth: 320,
parentTitle: "PHOTOS_TITLE"
})
})
})
},
stories: {
method: "GET",
isArray: !0,
params: {resource: "stories"},
cache: r.shortCache,
transformResponse: n.fromJson(function (e) {
return _.map(e, function (e) {
return e.url && -1 === e.url.indexOf("https:") && (e.url = "https:" + e.url), e
})
})
}
});
return s.photosForUser = i("photos"), s.storiesForUser = i("stories"), s
}]),angular.module("playing.habbo", ["header", "locale", "router", "tabs", "templates", "web.pages"]).config(["$stateProvider", "$urlRouterProvider", function (e, t) {
var o = ["what-is-habbo", "how-to-play", "habbo-way", "safety", "help"];
e.statePublic("playingHabbo", {
url: "/playing-habbo",
templateUrl: "playing-habbo/playing-habbo.html",
"abstract": !0
}), _.forEach(o, function (t) {
var o = "HEAD_TITLE_PLAYING_HABBO_" + t.toUpperCase().replace(/-/g, "_");
e.statePublic("playingHabbo." + t, {
url: "/" + t,
controller: "PlayingHabboController",
controllerAs: "PlayingHabboController",
data: {title: o},
resolve: {
page: ["webPages", function (e) {
return e.get("playing_habbo/" + _.snakeCase(t))
}]
},
templateUrl: "playing-habbo/" + t + ".html"
})
}), t.when("/playing-habbo", "/playing-habbo/what-is-habbo")
}]).controller("PlayingHabboController", ["page", function (e) {
var t = this;
t.page = e
}]),angular.module("password.reset.service", ["config", "google.analytics"]).factory("passwordReset", ["$http", "CONFIG", "googleAnalytics", function (e, t, o) {
var r = {};
return r.send = function (r) {
return e.post(t.apiUrl + "/public/forgotPassword/send", {email: r}).then(function (e) {
return o.trackEvent("Password", "Reset requested"), e
})
}, r.changePassword = function (r) {
return e.post(t.apiUrl + "/public/forgotPassword/changePassword", r).then(function (e) {
return o.trackEvent("Password", "Password reset"), e
})
}, r
}]),angular.module("password.reset", ["header", "locale", "password.reset.form", "router", "security", "templates"]).config(["$stateProvider", function (e) {
e.statePublic("resetPassword", {
url: "/reset-password/:token",
controller: "PasswordResetController",
controllerAs: "PasswordResetController",
data: {title: "HEAD_TITLE_PASSWORD_RESET"},
onEnter: ["$location", "security", "Session", function (e, t, o) {
return o.hasSession() ? t.forceLogout(e.url()) : void 0
}],
templateUrl: "password-reset/password-reset.html"
})
}]).controller("PasswordResetController", ["$stateParams", function (e) {
var t = this;
t.token = e.token
}]),angular.module("password.reset.form", ["form", "locale", "notifier", "password.reset.service", "router", "security", "templates"]).component("habboPasswordResetForm", {
bindings: {token: "<"},
controller: ["$scope", "$state", "notifier", "passwordReset", "safetyAnsweringModal", function (e, t, o, r, a) {
function n() {
o.success("PASSWORD_RESET_SUCCESS"), t.go("home.news")
}
var i = this;
i.passwords = {}, i.updateInProgress = !1, i.update = function () {
if (e.resetPasswordForm.$valid) {
i.updateInProgress = !0;
var t = {token: i.token, password: i.passwords.password};
r.changePassword(t).then(n)["catch"](function (i) {
var s = i.data && i.data.error;
return 403 === i.status && "account.safety_locked" === s ? a.open(i.data.questions, t, r.changePassword).then(n) : void(404 === i.status ? o.error("ERROR_PASSWORD_RESET_EXPIRED") : "password.too_similar_to_username" === s ? e.$broadcast("remote-data-invalid", "passwordName") : "password.too_similar_to_email" === s ? e.$broadcast("remote-data-invalid", "passwordEmail") : "password.used_earlier" === s ? e.$broadcast("remote-data-invalid", "passwordUsed") : o.error("ERROR_SERVER"))
})["finally"](function () {
i.updateInProgress = !1
})
}
}
}],
controllerAs: "PasswordResetFormController",
templateUrl: "password-reset/password-reset-form.html"
}),angular.module("not.found", ["google.analytics", "header", "locale", "router", "templates"]).config(["$stateProvider", function (e) {
e.statePublic("notFound", {templateUrl: "not-found/not-found.html", data: {title: "HEAD_TITLE_NOT_FOUND"}})
}]).config(["$urlRouterProvider", function (e) {
e.otherwise(function (e, t) {
var o = e.get("googleAnalytics"), r = e.get("$state");
o.trackEvent("Error", "Not found", t.url()), r.go("notFound")
})
}]).run(["$location", "$log", "$rootScope", "$state", "googleAnalytics", function (e, t, o, r, a) {
o.$on("$stateChangeError", function (o, n, i, s, l, c) {
c && c.access === !1 || (o.preventDefault(), t.error(c), a.trackEvent("Error", "Not found", e.url()), r.go("notFound"))
})
}]),angular.module("logout", ["locale", "notifier", "router", "security"]).config(["$stateProvider", function (e) {
e.statePublic("logout", {
url: "/logout", resolve: {
logout: ["$state", "notifier", "security", function (e, t, o) {
return o.logout()["catch"](function () {
e.go("home.news"), t.errorSticky("ERROR_LOGOUT_TITLE", "ERROR_LOGOUT_TEXT")
})
}]
}
})
}]),angular.module("hotel", ["client", "events", "locale", "router", "security", "templates"]).config(["$stateProvider", "$urlRouterProvider", function (e, t) {
e.statePrivate("hotel", {
url: "/hotel?link&room",
controller: "HotelController",
data: {title: "HEAD_TITLE_HOTEL"},
template: ''
}), t.when("/client", "/hotel")
}]).controller("HotelController", ["$rootScope", "$stateParams", "$timeout", "EVENTS", "Session", "safetyLockModal", function (e, t, o, r, a, n) {
a.isTrusted() || n.open(), o(function () {
e.$broadcast(r.clientOpen, t)
})
}]),angular.module("home", ["header", "locale", "housekeeping", "messaging", "news", "register.banner", "router", "tabs", "templates"]).config(["$stateProvider", "$urlRouterProvider", function (e, t) {
e.statePublic("home", {
url: "?captchaToken",
"abstract": !0,
controller: "HomeController",
controllerAs: "HomeController",
templateUrl: "home/home.html"
}), t.when("/login_popup", "/")
}]).controller("HomeController", ["$state", "Session", function (e, t) {
var o = this;
o.hasHeaderLarge = function () {
return !t.hasSession() && e.is("home.news")
}
}]),angular.module("help.login", ["router", "security", "zendesk.url"]).config(["$stateProvider", function (e) {
e.statePrivate("helpLogin", {
url: "/help-login?return_to",
controller: "HelpLoginController",
data: {title: "HEAD_TITLE_HELP_LOGIN"},
template: ''
})
}]).controller("HelpLoginController", ["$stateParams", "$window", "zendeskRedirectUrlFilter", function (e, t, o) {
t.location.href = o(e.return_to, !0)
}]),angular.module("dev", ["header", "router", "templates", "web.pages"]).config(["$stateProvider", function (e) {
e.statePublic("dev", {
url: "/dev/:page",
templateUrl: "dev/dev.html",
controller: "DevController",
controllerAs: "DevController"
})
}]).controller("DevController", ["$stateParams", function (e) {
var t = this;
t.page = e.page.replace(/-/g, "_")
}]),angular.module("ui.router").config(["$provide", function (e) {
e.decorator("$state", ["$delegate", "$rootScope", function (e, t) {
var o, r;
return e.hasPrevious = function () {
return Boolean(o) && Boolean(o.name)
}, e.back = function () {
e.hasPrevious() ? e.go(o.name, r) : e.go("home.news")
}, t.$on("$stateChangeSuccess", function (e, t, a, n, i) {
o = n, r = i
}), e
}])
}]),angular.module("ui.bootstrap").config(["$provide", function (e) {
e.decorator("$uibModal", ["$delegate", "$rootScope", function (e, t) {
var o = e.open;
return e.open = function (e) {
var r, a, n = o(e);
return n.open = !0, r = t.$on("$stateChangeSuccess", function () {
n.dismiss("cancel")
}), a = t.$on("$locationChangeSuccess", function (e, t, o) {
t !== o && n.dismiss("cancel")
}), n.result["finally"](function () {
n.open = !1, r(), a()
}), n
}, e
}])
}]),angular.module("ezfb").config(["$provide", "ezfbProvider", function (e, t) {
var o = !1;
t.setLoadSDKFunction(["$window", "$document", "ezfbAsyncInit", "ezfbLocale", function (e, t, r, a) {
var n = t[0].createElement("script");
n.id = "facebook-jssdk", n.async = !0, n.src = "//connect.facebook.net/" + a + "/sdk.js", t[0].body.appendChild(n), e.fbAsyncInit = function () {
r(), o = !0
}
}]), e.decorator("ezfb", ["$delegate", function (e) {
return e.isSdkLoaded = function () {
return o
}, e
}])
}]),angular.module("community", ["article", "category", "fansites", "header", "staff", "photos", "rooms", "router", "tabs", "templates"]).config(["$stateProvider", "$urlRouterProvider", function (e, t) {
e.statePublic("community", {
url: "/community",
"abstract": !0,
templateUrl: "community/community.html"
}), t.when("/community", "/community/photos")
}]),angular.module("activate.service", ["config", "google.analytics", "security"]).factory("activate", ["$http", "CONFIG", "Session", "googleAnalytics", function (e, t, o, r) {
return function (a) {
return e.post(t.apiUrl + "/public/registration/activate", {token: a}).then(function (e) {
r.trackEvent("Email", "Activated"), 200 === e.status && o.hasSession() && o.update(e.data)
})
}
}]),angular.module("activate", ["activate.service", "locale", "notifier", "router"]).config(["$stateProvider", function (e) {
e.statePublic("activate", {
url: "/activate/:token",
controller: "ActivateController",
resolve: {
activation: ["$stateParams", "activate", function (e, t) {
return t(e.token)
}]
}
})
}]).controller("ActivateController", ["$state", "notifier", function (e, t) {
t.success("ACTIVATE_SUCCESS"), e.go("home.news")
}]),angular.module("templates", []).run(["$templateCache", function (e) {
e.put("community/community.html",
''
), e.put("dev/dev.html",
''
), e.put("home/home.html",
''
), e.put("not-found/not-found.html",
''
), e.put("password-reset/password-reset-form.html",
''
), e.put("password-reset/password-reset.html",
''
), e.put("playing-habbo/habbo-way.html",
''
), e.put("playing-habbo/help.html",
''
), e.put("playing-habbo/how-to-play.html",
''
), e.put("playing-habbo/playing-habbo.html",
''
),
e.put("playing-habbo/safety.html",
''
), e.put("playing-habbo/what-is-habbo.html",
''
), e.put("profile/profile.html",
''
), e.put("registration/registration-form.html",
''
), e.put("registration/registration.html",
''
), e.put("room/room.html",
''
), e.put("settings/settings.html",
''
), e.put("shop/shop.html",
''
), e.put("common/accordion/accordion-item-content.html",
''
), e.put("common/accordion/accordion-item.html",
''
), e.put("common/ad-unit/ad-unit.html",
''
), e.put("common/avatar/avatar.html",
'{{:: AvatarController.user}}
'
), e.put("common/badge/badge.html",
""
), e.put("common/empty-results/empty-results.html",
""
), e.put("common/eu-cookie-banner/eu-cookie-banner.html",
''
), e.put("common/footer/footer.html",
''
), e.put("common/group-badge/group-badge.html",
""
), e.put("common/header/header-large.html",
''
), e.put("common/header/header-small.html",
''
), e.put("common/hotel-closed/hotel-closed.html",
''
), e.put("common/imager/imager.html",
''
), e.put("common/lightbox/lightbox-modal.html",
' '
), e.put("common/like/like.html",
'...{{ \'MORE_LIKES\' | translate: { count: LikeController.data.likes.length - 5 } }} '
), e.put("common/message-container/message-container.html",
''), e.put(
"common/official-room-avatar/official-room-avatar.html",
''
), e.put("common/social-share/social-share.html",
''
), e.put("common/tabs/tab.html",
''
), e.put("common/tabs/tabs.html",
''
), e.put("community/article/article.html",
''
), e.put("community/category/category.html",
''
), e.put("community/fansites/fansites.html",
''
), e.put("community/photos/photos.html",
''
), e.put("community/staff/staff.html",
''
), e.put("community/rooms/rooms.html",
''
), e.put("email/email-report-unauthorized/email-report-unauthorized-form.html",
''
), e.put("email/email-report-unauthorized/email-report-unauthorized.html",
''
), e.put("home/messaging/messaging.html",
''
), e.put("home/housekeeping/housekeeping.html",
''
), e.put("home/news/news.html",
''
), e.put("home/register-banner/register-banner.html",
''
), e.put("hotel/client/client.html",
''
), e.put("profile/creation/creation-content.html",
'{{:: CreationContentController.creation.title}}
'
), e.put("profile/creation/creation.html",
''
), e.put("profile/item-lists/badges.html",
'{{:: badge.name}}
{{:: badge.description}}
'
), e.put("profile/item-lists/friends.html",
''
), e.put("profile/item-lists/groups.html",
''
), e.put("profile/item-lists/rooms.html",
''
), e.put("profile/profile-header/profile-header.html",
''
),
e.put("profile/profile-modal/profile-modal.html",
'
'
), e.put("registration/birthdate/birthdate.html",
''
), e.put("registration/partner-registration/partner-registration.html",
''
), e.put("registration/policies/policies.html",
''
), e.put("room/room-info/room-info.html",
'- {{:: RoomInfoController.description}}
- {{:: RoomInfoController.tags.join(\', \')}}
'
), e.put("room/room-open/room-open.html",
'{{:: RoomOpenController.room.name}}
- {{:: RoomOpenController.room.rating}}
- {{:: RoomOpenController.room.maximumVisitors}}
'
), e.put("room/room-picture/room-picture.html",
''
), e.put("room/room-restricted/room-restricted.html",
'{{:: RoomRestrictedController.room.name}}
'
), e.put("router/spinner/spinner.html",
''
), e.put("security/login/login-form.html",
''
), e.put("security/login/login-modal.html",
''
), e.put("security/safety-lock/safety-answering-modal.html",
'
'
), e.put("security/safety-lock/safety-lock-form.html",
''
), e.put("security/safety-lock/safety-lock-modal.html",
'
'
), e.put("settings/account-security/account-security-edit.html",
'
'
), e.put("settings/account-security/account-security.html",
''
), e.put("settings/account-security/trusted-locations-reset.html",
''
), e.put("settings/avatar-selection/avatar-selection.html",
''
), e.put("settings/email-change/email-change-form.html",
''
), e.put("settings/email-change/email-change.html",
''
), e.put("settings/password-change/password-change-form.html",
''
), e.put("settings/password-change/password-change.html",
''
), e.put("settings/privacy-settings/privacy-settings-form.html",
''
), e.put("settings/privacy-settings/privacy-settings.html",
''
), e.put("shop/credit-card-form/credit-card-form.html",
''
), e.put("shop/credit-icon/credit-icon.html",
""
), e.put("shop/credit-title/credit-title.html",
' '
), e.put("shop/earn-credits/earn-credits.html",
''
), e.put("shop/prepaid/prepaid.html",
''
), e.put("shop/purse/purse.html",
''
), e.put("shop/shop-countries/shop-countries.html",
''
), e.put("shop/shop-footer/shop-footer.html",
''
), e.put("shop/store/store.html",
''
), e.put("shop/subscriptions/subscriptions.html",
''
),
e.put("shop/transactions/transactions-list.html",
'
'
), e.put("shop/transactions/transactions.html",
''
), e.put("shop/voucher-redeem/voucher-redeem.html",
''
), e.put("common/ad-unit/ad-double-click/ad-double-click.html",
''
), e.put("common/columns/card/card.html",
'{{:: CardController.item.title}}
'
), e.put("common/columns/columns-channel/columns-channel.html",
''
), e.put("common/columns/columns-profile/columns-profile.html",
''
), e.put("common/form/captcha/captcha.html",
''
), e.put("common/form/email-address/email-address.html",
''
), e.put("common/form/password-current/password-current.html",
''
), e.put("common/form/password-new/password-new.html",
''
), e.put("common/form/search/search.html",
' '
), e.put("common/header/header-ad/header-ad.html",
''
), e.put("common/header/hotel-button/hotel-button.html",
''
), e.put("common/header/navigation/navigation.html",
''
), e.put("common/header/user-menu/user-menu.html",
''
), e.put("home/messaging/discussions/discussions.html",
'
{{:: message.message}}
'
), e.put("home/news/moderation-notification/moderation-notification.html",
'- {{:: moderation.createdAt | date: "fullDate" }}
'
), e.put("home/register-banner/local-register-banner/local-register-banner.html",
'{{ \'LOCAL_REGISTER_BANNER_\' + LocalRegisterBannerController.site.localization | translate }} {{LocalRegisterBannerController.site.title}}'
), e.put("hotel/client/client-closed/client-closed.html",
""), e.put(
"hotel/client/client-error/client-error.html",
''
), e.put("hotel/client/client-reload/client-reload.html",
''
), e.put("hotel/client/interstitial/interstitial.html",
''
), e.put("profile/creation/photo-delete/photo-delete.html",
''
), e.put("profile/creation/report/report-form.html",
''
), e.put("profile/creation/report/report-modal.html",
'
'
), e.put("profile/creation/report/report.html",
''
), e.put("profile/item-lists/room-icon/room-icon.html",
''
), e.put("security/force/force-email/force-email-form.html",
''
), e.put("security/force/force-email/force-email-modal.html",
'
'
), e.put("security/force/force-password/force-password-form.html",
''
), e.put("security/force/force-password/force-password-modal.html",
'
'
), e.put("security/force/force-tos/force-tos-form.html",
''
), e.put("security/force/force-tos/force-tos-modal.html",
'
'
), e.put("security/login/captcha-modal/captcha-modal.html",
''
), e.put("security/login/claim-password/claim-password-form.html",
''
), e.put("security/login/claim-password/claim-password-modal.html",
'
'
), e.put("security/login/claim-password/recover-password-modal.html",
''
), e.put("security/login/facebook-connect/facebook-connect.html",
''
), e.put("settings/account-security/safety-questions/safety-questions-form.html",
''
), e.put("settings/account-security/safety-questions/safety-questions-modal.html",
'
'
), e.put("settings/avatar-selection/avatar-create/avatar-create-form.html",
''
), e.put("settings/avatar-selection/avatar-create/avatar-create-modal.html",
'
'
), e.put("settings/avatar-selection/avatar-create/avatar-create.html",
''
),
e.put("settings/avatar-selection/avatar-search/avatar-search.html",
''
), e.put("settings/avatar-selection/avatar-search/avatar-selector.html",
'{{:: AvatarSelectorController.avatar.name}}
{{:: AvatarSelectorController.avatar.motto}}
{{\'AVATAR_SELECTION_LAST_LOGIN\' | translate}}
'
), e.put("settings/email-change/activation-status/activation-status.html",
''
), e.put("shop/credit-card-form/credit-card-icon/credit-card-icon.html",
' {{:: CreditCardIconController.product.name}} {{:: CreditCardIconController.credits}}'
), e.put("shop/earn-credits/earn-credits-frame/earn-credits-frame.html",
''
), e.put("shop/payment-details/credit-payment-details/credit-payment-details.html",
''
), e.put("shop/payment-details/offer-payment-details/offer-payment-details.html",
'{{:: OfferPaymentDetailsController.offerPaymentDetails.description }}
'
), e.put("shop/payment-details/payment-info/payment-info-store.html",
''
), e.put("shop/payment-details/payment-info/payment-info-subscription.html",
''
), e.put("shop/payment-details/payment-steps/payment-steps.html",
' | {{:: PaymentStepsController.user.name}} |
| {{:: PaymentStepsController.user.email}} |
'
), e.put("shop/payment-details/product-payment-details/product-payment-details.html",
'{{:: ProductPaymentDetailsController.item.description}}
'
), e.put(
"shop/payment-details/subscription-payment-details/subscription-payment-details.html",
'{{:: SubscriptionPaymentDetailsController.item.description}}
'
), e.put("shop/store/category-filter/category-filter.html",
''
), e.put("shop/store/inventory/credits.html",
''
), e.put("shop/store/inventory/inventory.html",
'
'
), e.put("shop/store/inventory/products.html",
''
), e.put("shop/store/targeted-offer/targeted-offer.html",
''
), e.put("shop/thumbnails/credit-thumbnail/credit-thumbnail.html",
'
{{:: CreditThumbnailController.item.price}}
'
), e.put("shop/thumbnails/offer-thumbnail/offer-thumbnail.html",
'{{:: OfferThumbnailController.item.highlight}} |
{{:: OfferThumbnailController.item.header}}
{{:: OfferThumbnailController.item.description}}
{{:: OfferThumbnailController.item.pricePoint.price}}
'
), e.put("shop/thumbnails/product-thumbnail/product-thumbnail.html",
'{{:: ProductThumbnailController.item.name}}
{{:: ProductThumbnailController.item.price}}
'
), e.put("shop/thumbnails/subscription-thumbnail/subscription-thumbnail.html",
'{{:: SubscriptionThumbnailController.item.name}}
{{:: SubscriptionThumbnailController.item.price}}
'
), e.put("shop/transactions/transactions-history/transactions-history.html",
' | | |
---|
{{:: item.creationTime | amDateFormat: \'D MMM YYYY\'}} | {{:: item.product.name}} | {{:: item.price}} |
'
), e.put("shop/voucher-redeem/voucher-icon/voucher-icon.html",
' {{:: VoucherIconController.product.name}} {{:: VoucherIconController.credits}}'
), e.put("common/form/password-new/password-strength/password-strength.html",
'{{ \'PASSWORD_STRENGTH_LABEL\' | translate }} {{ PasswordStrengthController.score | strengthRating | ratingTranslation | translate }}
'
), e.put("shop/payment-details/payment-steps/adyen/adyen.html",
'{{:: AdyenController.errorMsg}}
'
), e.put("shop/payment-details/payment-steps/payment-button/payment-button.html",
''
), e.put("shop/payment-details/payment-steps/payment-disclaimer/payment-disclaimer.html",
''
), e.put("shop/payment-details/payment-steps/payment-methods/payment-methods.html",
'- {{:: paymentMethod.name}}
'
), e.put("shop/payment-details/payment-steps/premium-sms/premium-sms.html",
'
'
), e.put(
"shop/payment-details/product-payment-details/sub-product-icons/sub-product-icons.html",
''
)
}]),angular.module("events", []).constant("EVENTS", {
accordionOpen: "accordion-item-open",
accordionClose: "accordion-item-close",
accordionResize: "accordion-item-resize",
accordionUpdate: "accordion-item-update",
clientOpen: "client-open",
clientClose: "client-close",
securityLogin: "security-login",
shopPaymentClose: "payment-close"
}),angular.module("app", ["ngAnimate", "activate", "community", "console.warning", "creation", "email.optout", "email.report.unauthorized", "eu.cookie.banner", "footer", "help.login", "home", "hotel", "logout", "not.found", "password.reset", "playing.habbo", "profile", "registration", "room", "security", "settings", "shop"]).config(["$provide", function (e) {
e.decorator("$exceptionHandler", ["$delegate", function (e) {
return function (t, o) {
Bugsnag.notifyException(t, {diagnostics: {cause: o}}), e(t, o)
}
}])
}]).run(["spinner", function (e) {
e.init()
}]),function () {
var e = !0;
window.Bugsnag || (window.Bugsnag = {
notify: _.noop,
notifyException: _.noop
}), angular.module("app").config(["$sceDelegateProvider", function (e) {
var t = e.resourceUrlWhitelist(),
o = "https://*.habbo.com/**,https://habboo-a.akamaihd.net/**,https://www.offertoro.com/**".split(",");
t = t.concat(o), e.resourceUrlWhitelist(t)
}]).config(["$compileProvider", function (t) {
t.debugInfoEnabled(!e)
}]), angular.module("config", []).constant("CONFIG", {
apiUrl: window.chocolatey.url + "api",
extraDataUrl: window.chocolatey.url + "extradata",
shopUrl: window.chocolatey.url + "shopapi",
appStoreUrl: "https://itunes.apple.com/app/id794866182",
badgeUrl: window.chocolatey.album,
googlePlayUrl: "https://play.google.com/store/apps/details?id=air.com.sulake.habboair",
habboWebAdsUrl: window.chocolatey.url + "habbo-web-ads/",
habboWebLeaderboardsUrl: window.chocolatey.url + "habbo-web-leaderboards",
habboWebNewsUrl: window.chocolatey.url + "habbo-web-news/en/production/",
habboWebPagesUrl: window.chocolatey.url + "habbo-web-pages/production/",
imagingUrl: "https://www.habbo.de/habbo-imaging",
groupBadgeUrl: window.chocolatey.url + "habbo-imaging",
lang: window.chocolatey.plang,
hotel: "hhus",
localizationSite: window.chocolatey.lang,
minAge: parseInt("0", 10),
rpxLocale: "en",
rpxTokenUrl: window.chocolatey.url + "api/public/authentication/rpx",
offerToroEnabled: false,
twitterAccount: "@Habbo",
adyenPublicKey: "10001|DB119F7832E23CBEDA2A330D3C13310D78ABA07136CDFFFA3D798BDFE4A903D5A079EE09710BBEC72573F0CA80D48DD0380D8AC1B0FDBCB978E69E9BE92ABDC27020858A52DC8D7A9C2D77B071FE1E6A3177E4E73E8E7CFC4A13C881BBBEF3C2EFBB24475818AB9E56BC597BABFD306593C3DF2B16F49D38F560212C183492EE7D0750CE84AB3509563CB3C99EC0B815CF5211E793500110B2A53DCAD793E267677BBE89035E5E9662FD2DB94A5EECBD6FB81F5DAF7205F9EBF15963639FC72DF0875CC2249FB31B300CC8183B2C948B3B3843C414677C9EC82C6A2D4CBF937B57FD03A53B0A8A56369AD490CEAB9EED18FE77E7B9032445A57A06CE23DE6115"
}), angular.module("locale", ["angularMoment", "pascalprecht.translate"]), angular.module("angularMoment").run(["amMoment", function (e) {
e.changeLocale("en")
}]), angular.module("ezfb").config(["ezfbProvider", function (e) {
e.setInitParams({appId: window.chocolatey.facebook}), e.setLocale("en_US")
}]), angular.module("noCAPTCHA").config(["noCAPTCHAProvider", function (e) {
e.setLanguage("en"), e.setSiteKey(window.chocolatey.captcha)
}]), angular.module("pascalprecht.translate").config(["$translateProvider", function (e) {
e.preferredLanguage(window.chocolatey.lang), e.useStaticFilesLoader({
prefix: window.chocolatey.url + "habbo-web-l10n/",
suffix: ".json"
}), e.useSanitizeValueStrategy("escapeParameters")
}])
}();