(function(n){function u(){e(document.getElementsByTagName("input"),t);n.setTimeout(function(){a.find("input").checkAndTriggerAutoFillEvent()},200)}function o(){for(var n,i=0;i<this.length;i++)n=this[i],s(n)||(t(n),l(n))}function s(n){"$$currentValue"in n||(n.$$currentValue=n.getAttribute("value"));var t=n.value,i=n.$$currentValue;return!t&&!i?!0:t===i}function t(n){n.$$currentValue=n.value}function h(t){var r=n.jQuery||n.angular.element,i=r.prototype,u=i.val;i.val=function(n){var i=u.apply(this,arguments);return arguments.length>0&&e(this,function(i){t(i,n)}),i}}function f(n,t){function i(n){var i=n.target;t(i)}r.addEventListener?r.addEventListener(n,i,!0):r.attachEvent(n,i)}function c(n){while(n){if(n.nodeName==="FORM")return i(n);n=n.parentNode}return i()}function e(n,t){if(n.forEach)return n.forEach(t);for(var i=0;i<n.length;i++)t(n[i])}function l(t){var r=n.document,i=r.createEvent("HTMLEvents");i.initEvent("change",!0,!0);t.dispatchEvent(i)}var i=n.jQuery||n.angular.element,r=n.document.documentElement,a=i(r);f("change",t);h(t);i.prototype.checkAndTriggerAutoFillEvent=o;f("blur",function(t){n.setTimeout(function(){c(t).find("input").checkAndTriggerAutoFillEvent()},20)});n.document.addEventListener?n.document.addEventListener("DOMContentLoaded",u,!1):n.document.attachEvent("DOMContentLoaded",u);return})(window),function(){"use strict";function n(n){return angular.isUndefined(n)||n===null}function i(){try{return require("moment")}catch(n){throw new Error("Please install moment via npm. Please reference to: https://github.com/urish/angular-moment");}}function t(t,r){if(typeof r=="undefined")if(typeof require=="function")r=i();else throw new Error("Moment cannot be found by angular-moment! Please reference to: https://github.com/urish/angular-moment");return t.module("angularMoment",[]).constant("angularMomentConfig",{preprocess:null,timezone:null,format:null,statefulFilters:!0}).constant("moment",r).constant("amTimeAgoConfig",{withoutSuffix:!1,serverTime:null,titleFormat:null,fullDateThreshold:null,fullDateFormat:null}).directive("amTimeAgo",["$window","moment","amMoment","amTimeAgoConfig",function(i,r,u,f){return function(e,o,s){function a(){var n,t,i;return w?n=w:f.serverTime?(t=(new Date).getTime(),i=t-nt+f.serverTime,n=r(i)):n=r(),n}function v(){l&&(i.clearTimeout(l),l=null)}function b(n){var f=a().diff(n,"day"),u=p&&f>=p,r,t;u?o.text(n.format(g)):o.text(n.from(a(),y));d&&rt&&o.attr("title",n.local().format(d));u||(r=Math.abs(a().diff(n,"minute")),t=3600,r<1?t=1:r<60?t=30:r<180&&(t=300),l=i.setTimeout(function(){b(n)},t*1e3))}function k(n){it&&o.attr("datetime",n)}function h(){if(v(),c){var n=u.preprocessDate(c);b(n);k(n.toISOString())}}var l=null,c,y=f.withoutSuffix,d=f.titleFormat,p=f.fullDateThreshold,g=f.fullDateFormat,nt=(new Date).getTime(),tt=s.amTimeAgo,w,it="TIME"===o[0].nodeName.toUpperCase(),rt=!o.attr("title");e.$watch(tt,function(t){if(n(t)||t===""){v();c&&(o.text(""),k(""),c=null);return}c=t;h()});t.isDefined(s.amFrom)&&e.$watch(s.amFrom,function(t){w=n(t)||t===""?null:r(t);h()});t.isDefined(s.amWithoutSuffix)&&e.$watch(s.amWithoutSuffix,function(n){typeof n=="boolean"?(y=n,h()):y=f.withoutSuffix});s.$observe("amFullDateThreshold",function(n){p=n;h()});s.$observe("amFullDateFormat",function(n){g=n;h()});e.$on("$destroy",function(){v()});e.$on("amMoment:localeChanged",function(){h()})}}]).service("amMoment",["moment","$rootScope","$log","angularMomentConfig",function(n,i,r,u){var f=null;this.changeLocale=function(r,u){var f=n.locale(r,u);return t.isDefined(r)&&i.$broadcast("amMoment:localeChanged"),f};this.changeTimezone=function(t){n.tz&&n.tz.setDefault?(n.tz.setDefault(t),i.$broadcast("amMoment:timezoneChanged")):r.warn("angular-moment: changeTimezone() works only with moment-timezone.js v0.3.0 or greater.");u.timezone=t;f=t};this.preprocessDate=function(t){return(f!==u.timezone&&this.changeTimezone(u.timezone),u.preprocess)?u.preprocess(t):!isNaN(parseFloat(t))&&isFinite(t)?n(parseInt(t,10)):n(t)}}]).filter("amParse",["moment",function(n){return function(t,i){return n(t,i)}}]).filter("amFromUnix",["moment",function(n){return function(t){return n.unix(t)}}]).filter("amUtc",["moment",function(n){return function(t){return n.utc(t)}}]).filter("amUtcOffset",["amMoment",function(n){function t(t,i){return n.preprocessDate(t).utcOffset(i)}return t}]).filter("amLocal",["moment",function(n){return function(t){return n.isMoment(t)?t.local():null}}]).filter("amTimezone",["amMoment","angularMomentConfig","$log",function(n,t,i){function r(t,r){var u=n.preprocessDate(t);return r?u.tz?u.tz(r):(i.warn("angular-moment: named timezone specified but moment.tz() is undefined. Did you forget to include moment-timezone.js ?"),u):u}return r}]).filter("amCalendar",["moment","amMoment","angularMomentConfig",function(t,i,r){function u(t){if(n(t))return"";var r=i.preprocessDate(t);return r.isValid()?r.calendar():""}return u.$stateful=r.statefulFilters,u}]).filter("amDifference",["moment","amMoment","angularMomentConfig",function(t,i,r){function u(r,u,f,e){if(n(r))return"";var o=i.preprocessDate(r),s=n(u)?t():i.preprocessDate(u);return!o.isValid()||!s.isValid()?"":o.diff(s,f,e)}return u.$stateful=r.statefulFilters,u}]).filter("amDateFormat",["moment","amMoment","angularMomentConfig",function(t,i,r){function u(t,r){if(n(t))return"";var u=i.preprocessDate(t);return u.isValid()?u.format(r):""}return u.$stateful=r.statefulFilters,u}]).filter("amDurationFormat",["moment","angularMomentConfig",function(t,i){function r(i,r,u){return n(i)?"":t.duration(i,r).humanize(u)}return r.$stateful=i.statefulFilters,r}]).filter("amTimeAgo",["moment","amMoment","angularMomentConfig",function(t,i,r){function u(r,u,f){var e,o;return n(r)?"":(r=i.preprocessDate(r),e=t(r),!e.isValid())?"":(o=t(f),!n(f)&&o.isValid())?e.from(o,u):e.fromNow(u)}return u.$stateful=r.statefulFilters,u}]).filter("amSubtract",["moment","angularMomentConfig",function(t,i){function r(i,r,u){return n(i)?"":t(i).subtract(parseInt(r,10),u)}return r.$stateful=i.statefulFilters,r}]).filter("amAdd",["moment","angularMomentConfig",function(t,i){function r(i,r,u){return n(i)?"":t(i).add(parseInt(r,10),u)}return r.$stateful=i.statefulFilters,r}]).filter("amStartOf",["moment","angularMomentConfig",function(t,i){function r(i,r){return n(i)?"":t(i).startOf(r)}return r.$stateful=i.statefulFilters,r}]).filter("amEndOf",["moment","angularMomentConfig",function(t,i){function r(i,r){return n(i)?"":t(i).endOf(r)}return r.$stateful=i.statefulFilters,r}])}typeof define=="function"&&define.amd?define(["angular","moment"],t):typeof module!="undefined"&&module&&module.exports?(t(require("angular"),require("moment")),module.exports="angularMoment"):t(angular,(typeof global!="undefined"?global:window).moment)}(),function(){"use strict";angular.module("base64",[]).constant("$base64",function(){function t(t,i){var r=n.indexOf(t.charAt(i));if(r==-1)throw"Cannot decode base64";return r}function u(n){var o,i,u,f,e;if(n=""+n,f=n.length,f==0)return n;if(f%4!=0)throw"Cannot decode base64";for(o=0,n.charAt(f-1)==r&&(o=1,n.charAt(f-2)==r&&(o=2),f-=4),e=[],i=0;i<f;i+=4)u=t(n,i)<<18|t(n,i+1)<<12|t(n,i+2)<<6|t(n,i+3),e.push(String.fromCharCode(u>>16,u>>8&255,u&255));switch(o){case 1:u=t(n,i)<<18|t(n,i+1)<<12|t(n,i+2)<<6;e.push(String.fromCharCode(u>>16,u>>8&255));break;case 2:u=t(n,i)<<18|t(n,i+1)<<12;e.push(String.fromCharCode(u>>16))}return e.join("")}function i(n,t){var i=n.charCodeAt(t);if(i>255)throw"INVALID_CHARACTER_ERR: DOM Exception 5";return i}function f(t){var f,u,e,o;if(arguments.length!=1)throw"SyntaxError: Not enough arguments";if(e=[],t=""+t,o=t.length-t.length%3,t.length==0)return t;for(f=0;f<o;f+=3)u=i(t,f)<<16|i(t,f+1)<<8|i(t,f+2),e.push(n.charAt(u>>18)),e.push(n.charAt(u>>12&63)),e.push(n.charAt(u>>6&63)),e.push(n.charAt(u&63));switch(t.length-o){case 1:u=i(t,f)<<16;e.push(n.charAt(u>>18)+n.charAt(u>>12&63)+r+r);break;case 2:u=i(t,f)<<16|i(t,f+1)<<8;e.push(n.charAt(u>>18)+n.charAt(u>>12&63)+n.charAt(u>>6&63)+r)}return e.join("")}var r="=",n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";return{encode:f,decode:u}}())}(),function(){"use strict";function t(n){function t(t){return n.decode(t)}return{base64Decode:t}}var n=angular.module("common",[]);n.provider("commonConfig",function(){return this.config={},this.$get=function(){return{config:this.config}},this});n.factory("common",["$base64",t])}(),function(){"use strict";function n(n){function t(t,i){n.error("Error: "+t,i||"")}function i(t,i){n.info("Info: "+t,i||"")}function r(t,i){n.info("Success: "+t,i||"")}function u(t,i){n.warn("Warning: "+t,i||"")}return{error:t,info:i,success:r,warning:u,log:n.log}}angular.module("app.logger").factory("logger",n);n.$inject=["$log"]}(),function(){"use strict";function n(){return{notify:function(){}}}angular.module("app.exception").service("modalService",n)}(),function(){"use strict";angular.module("app.login",["app.logger","app.exception","ngCapsLock","ngCookies","ngMessages","ngSanitize"])}(),function(){"use strict";angular.module("ngCapsLock",[]).run(["$rootScope","$document","$window",function(n,t,i){function r(t){n.isCapsLockOn=t;n.$apply()}function u(){t.bind("keydown",function(n){n.keyCode===20&&r(!0)});t.bind("keyup",function(n){n.keyCode===20&&r(!1)});t.bind("keypress",function(n){var t=n.charCode||n.keyCode,i=n.shiftKey;t>96&&t<123&&r(!1);t>64&&t<91&&!i&&r(!0)})}function f(){var i=!0;t.bind("keydown",function(t){if(t.originalEvent&&t.originalEvent.getModifierState)return r(t.originalEvent.getModifierState("CapsLock"));i||t.keyCode!==20||(i=!0,n.isCapsLockOn!=null&&r(!n.isCapsLockOn))});t.bind("keyup",function(n){n.keyCode===20&&(i=!1)});t.bind("keypress",function(n){var t=n.charCode||n.keyCode,i=n.shiftKey;t>96&&t<123&&r(i);t>64&&t<91&&r(!i)})}i.addEventListener("blur",function(){r(!1)});/Mac|iPad|iPhone|iPod/.test(navigator.platform)?u():f()}])}(),function(){"use strict";function n(n){return{put:function(t,i){return n.put(t,i)}}}angular.module("app.login").factory("dataService",n);n.$inject=["$http"]}(),function(){"use strict";function n(n,t,i,r,u){function y(n,i,r){function y(n){o(n);var t=n.data;n.state=p(t);switch(n.state){case f.AUTH_OK:n.href=w(t);break;case f.SSO_ONLY:n.href=a(t.user.samlIdentity.clientId)}return n}function s(n){return sessionStorage.clear(),o(n),u.catcher("An error occurred during authentication")(n),r&&(n.href=e+"Saml/Error"),n}function p(n){switch(n.statusCode){case 200:var t=n.user;return!r&&t.samlIdentity.ssoRequired?f.SSO_ONLY:t.taintPassword?f.PW_ERR:t.isLocked||t.isSuspended?t.changePassword&&new Date(t.userSecurity.resetExpiry)>new Date?f.PW_ERR:f.AUTH_FAIL:t.businessId?f.AUTH_OK:f.PROXY_ERR;case 401:return f.AUTH_FAIL;case 403:return f.PRIV_ERR;case 404:return f.COMMS_ERR;case 429:return f.RATE_ERR;case 500:default:return f.SERVER_ERR}}function w(n){var t=n.user;return(sessionStorage.GlooSession=sjcl.encrypt(n.salt,JSON.stringify(n)),sessionStorage.GlooToken=n.jwt,sessionStorage.businessId=t.businessId,sessionStorage.userId=t.id,sessionStorage.fullName=t.fullName,sessionStorage.avatarEtag=t.avatarEtag,t.changePassword)?e+"#!"+c:n.loggedInUsers!=null?e+"#!"+l:sessionStorage.targetPage||e+"#!/"}var v="Identity/"+(r?"SsoVerify":"Authenticate");return t.post(e+v,n,h(i)).then(y,s).catch(s)}function s(n){var r=parseInt(n.substring(n.length-1),10),t=n.replace(/\-/g,"+").replace(/\_/g,"/");return(t=t.substring(0,t.length-1),isNaN(r)||!t)?"":i.base64Decode(t+"===".substring(0,r))}function p(n,i){return n.password="",t.post(e+"Identity/ForgotPassword",n,h(i)).then(function(){return f.FORGOT_OK})}function w(t,i){switch(t){case f.READY:return"";case f.FORGOT:return"MESSAGE.FORGOT";case f.AUTH:case f.BUSY:return"";case f.AUTH_OK:return"";case f.FORGOT_OK:return"MESSAGE.FORGOT_OK";case f.RESET_OK:return"<h2>"+i+"<\/h2>";case f.AUTH_FAIL:return"ERROR.AUTH_FAIL";case f.RESET_FAIL:return n("translate")("ERROR.RESET_FAIL",{message:i});case f.COMMS_ERR:return"ERROR.COMMS_ERR";case f.KEY_ERR:return"ERROR.KEY_ERR";case f.KEY_VER:return"ERROR.KEY_VER";case f.PRIV_ERR:return'<h1 class="error">Forbidden!<\/h1><h2>Proxy login to the selected business is blocked for privacy reasons.<\/h2>';case f.PROXY_ERR:return'<h2 class="error">You must login to GIMP before continuing!<\/h2>';case f.PW_ERR:return"ERROR.PW_ERR";case f.RATE_ERR:return"ERROR.RATE_ERR";case f.SERVER_ERR:return"ERROR.SERVER_ERR";case f.SSO_ONLY:return"ERROR.SSO_ONLY";case f.TIMEOUT:return"ERROR.TIMEOUT";default:var r=t?n("translate")("ERROR.ERROR_CODE",{errorNumber:t}):"";return n("translate")("ERROR.DEFAULT",{errorCode:r})}}function o(n){n.config={}}function b(n){if(!n.b)return{errorCode:f.KEY_VER,expired:!0};var t=n.key,u=n.token,i=t?!1:!0,r=moment(s(n.x));return{activation:i,businessId:n.b,confirmPassword:"",errorCode:f.KEY_ERR,expired:r.isValid()&&r.isBefore(moment(),"minute"),fullName:s(n.f),isGimpUser:s(n.s)==="true",newPassword:"",resetToken:i?u:t,username:""}}function k(n,i){var r={businessId:n,isGimpUser:i};return t.put(e+"Identity/PasswordPolicy",r).then(function(n){return n.data})}function h(n){return{headers:{RequestVerificationToken:n,"X-Requested-With":"XMLHttpRequest"}}}function d(n,i){function s(n){return o(n),n.state=c(n.data),n.state===f.RESET_OK&&(n.href=e+"login/"),n}function r(n){return o(n),u.catcher("An error occurred during password reset")(n),n}function c(n){switch(n.statusCode){case 200:return n.message?f.RESET_FAIL:f.RESET_OK;case 400:return f.RESET_FAIL;case 404:return f.COMMS_ERR;case 429:return f.RATE_ERR;case 500:default:return f.SERVER_ERR}}return t.post(e+"Identity/SetPassword",n,h(i)).then(s,r).catch(r)}function g(n){n&&(n=n.toLowerCase(),(n.endsWith(l)||n.endsWith(c)||!n.startsWith(e))&&(n=""));sessionStorage.targetPage=n||""}function a(n){var t=e+"sso/";return n&&(t=t+n),t}var c="/expired-password",l="/licensing",f=Object.freeze({READY:0,FORGOT:1,AUTH:2,BUSY:3,AUTH_OK:4,FORGOT_OK:5,RESET_OK:6,AUTH_FAIL:7,RESET_FAIL:8,COMMS_ERR:9,KEY_ERR:10,KEY_VER:11,PROXY_ERR:12,RATE_ERR:13,PRIV_ERR:14,SERVER_ERR:15,PW_ERR:16,SSO_ONLY:17,TIMEOUT:18}),v={authenticate:y,enumState:function(){return f},forgotPassword:p,messageFor:w,passwordPolicy:k,passwordResetModel:b,setPassword:d,setTargetPage:g,ssoUrl:a},e=r.config.adminEndpoint.toLowerCase();return v}angular.module("app.login").factory("authService",n);n.$inject=["$filter","$http","common","commonConfig","exception"]}(),function(){"use strict";function n(n,t,i,r,u,f){function c(){sessionStorage.clear();u.setTargetPage(n.search().page);n.search().state==="timeout"?s(o.TIMEOUT):s(o.READY);f.config.inDebug?(n.url("gloo.admin/login/"),console.log(sessionStorage.targetPage)):n.url("login/")}function l(){function n(n){if(s(n.state),n.href){var t=e.currentState===o.SSO_ONLY?3e3:0;i(function(){r.location.href=n.href},t)}}e.htmlForm.$invalid||(s(o.AUTH),u.authenticate(e.credentials,e.antiForgeryToken).then(n))}function h(){switch(e.currentState){case o.AUTH:case o.AUTH_OK:case o.BUSY:return!0;default:return!1}}function a(){switch(e.currentState){case o.FORGOT_OK:case o.PW_ERR:case o.SERVER_ERR:return!0;default:return h()}}function v(){e.htmlForm.fpusername.$invalid||(s(o.BUSY),u.forgotPassword(e.credentials,e.antiForgeryToken).then(s))}function y(){e.submitted=!0;e.message=null;e.currentState===o.FORGOT?v():l()}function s(n){e.message=t.trustAsHtml(u.messageFor(n));e.currentState=n}function p(){r.location.href=u.ssoUrl()}var e=this,o=u.enumState();e.EnumState=o;e.credentials={};e.submitted=!1;e.busy=h;e.final=a;e.onSubmit=y;e.setState=s;e.sso=p;c()}angular.module("app.login").controller("loginController",n);n.$inject=["$location","$sce","$timeout","$window","authService","commonConfig"]}(),function(){"use strict";function n(n,t,i,r){function f(n){n.href||(n.href="Error");i.location.href=n.href}var u=this;t(function(){r.authenticate({key:n.search().key},u.antiForgeryToken,!0).then(f)})}angular.module("app.login").controller("samlController",n);n.$inject=["$location","$timeout","$window","authService"]}(),function(){"use strict";function n(n,t,i,r,u,f){function v(){var n=new Date;l=new Date(n.getFullYear()+1,n.getMonth(),n.getDate());r.$on("$destroy",function(){e.autoLoginEnd()});p(i.path())?e.autoLogin&&(o=t(w,1e3,e.countdown)):h()}function y(){angular.isDefined(o)&&(t.cancel(o),o=null)}function p(n){for(var r=n.toLowerCase().split("/"),u=!1,i,t=0;t<r.length;t++){if(i=r[t],u)return i;i==="sso"&&(u=!0)}return""}function w(){e.countdown--;e.countdown<1&&(e.autoLogin?h():(e.countdownMessage=!1,a()))}function h(){e.autoLoginEnd();e.active=!0;a();u.location.href=f.config.adminEndpoint+"SAML/InitiateSingleSignOn"+s}function a(){n.put(c,e.autoLogin,{expires:l,samesite:"strict",secure:!0})}var e=this,c="__host-sso-autologin",l,o,s="?x="+Math.random();i.path().endsWith("/test")&&(s=s+"&relayState=test");e.autoLogin=n.get(c)==="true"?!0:!1;e.autoLoginEnd=y;e.countdown=3;e.countdownMessage=e.autoLogin;e.sso=h;v()}angular.module("app.login").controller("ssoController",n);n.$inject=["$cookies","$interval","$location","$scope","$window","commonConfig"]}(),function(){"use strict";function n(n,t,i,r,u,f,e){function v(){function n(n){o.policy=n;o.currentState=s.READY;o.title=h.activation?"MESSAGE.ACTIVATE_ACCOUNT":"MESSAGE.RESET_PASSWORD"}if(sessionStorage.clear(),h.expired){l(h.errorCode);return}f.passwordPolicy(a,c).then(n)}function y(t){function i(t){if(t.state===s.RESET_OK){var i=e.config.adminEndpoint+"login/",f=n("translate")("MESSAGE.PASSWORD_CHANGED"),o=n("translate")("MESSAGE.REDIRECTING",{loginUrl:i}),h=f+"<br/>"+(c?"Now go to GIMP to sign-in.":o);l(s.RESET_OK,h);t.href&&!c&&r(function(){u.location.href=i},4e3)}else l(s.RESET_FAIL,"")}(o.submitted=!0,!t.$invalid&&o.isPasswordValid&&o.isPasswordConfirmValid)&&(o.currentState=s.BUSY,o.message=null,f.setPassword(h,o.antiForgeryToken).then(i))}function l(n,t){o.pvr={};o.message=i.trustAsHtml(f.messageFor(n,t));n===s.RESET_FAIL&&(n=s.READY);o.currentState=n}function p(n){if(n)o.form.newPassword.$validate();else{var t=o.form.newPassword.$valid||!1,i=t&&h.newPassword===h.confirmPassword;o.isPasswordValid=t;o.isPasswordConfirmValid=i;o.form.confirmPassword.$validate();o.valid=o.form.$valid&&i}}var o=this,s=f.enumState(),h=f.passwordResetModel(t.search()),a=h.businessId,c=h.isGimpUser;o.EnumState=s;o.currentState=s.BUSY;o.endpoint=e.config.adminEndpoint+"Identity/ValidatePassword";o.model=h;o.submitted=!1;o.setPassword=y;o.validate=p;v()}angular.module("app.login").controller("resetPasswordController",n);n.$inject=["$filter","$location","$sce","$timeout","$window","authService","commonConfig"]}(),function(){"use strict";function n(){return{scope:{policy:"=glooPasswordPolicy",pvr:"=pvr"},templateUrl:"../App/Admin/User/Templates/glooPasswordPolicy.html"}}angular.module("app.login").directive("glooPasswordPolicy",n)}(),function(){"use strict";function n(n,t,i){return{restrict:"A",require:"ngModel",scope:{creds:"=credentials",errorMsg:"=glooPasswordValidate"},link:function(r,u,f,e){var s=f.endpoint,o=n("translate")("USER.PASSWORD.VALIDATION.FAILED");e.$asyncValidators.invalidPassword=function(u,f){function c(n){var t=n.data;r.errorMsg=t;t.valid?e.resolve():e.reject()}function l(){r.errorMsg={errorMessage:o,fatal:!0};e.reject()}if(!f||f.length<8)return r.errorMsg={},t.reject();if(!r.creds.username)return r.errorMsg={errorMessage:n("translate")("USER.PASSWORD.VALIDATION.USERNAME")},t.reject();var e=t.defer(),h={businessId:r.creds.businessId,fullName:r.creds.fullName,isGimpUser:r.creds.isGimpUser,password:f,username:r.creds.username};return i.put(s,h,o).then(c,l),e.promise}}}}angular.module("common").directive("glooPasswordValidate",n);n.$inject=["$filter","$q","dataService"]}();var gloo={};gloo.admin=function(){"use strict";function t(t){var i=t.moment;n.constant("moment",i)}function i(t){var i={appErrorPrefix:"[PRgloo Error] ",appRoot:t.appRoot,adminEndpoint:t.adminEndpoint,inDebug:t.inDebug,urlCacheBusterSuffix:"?v="+(t.inDebug?Date.now().toString():t.version),version:t.version};n.value("config",i);n.config(["$logProvider",function(n){i.inDebug&&console.log("PRgloo Auth app started in DEBUG mode. Config: ",i);n.debugEnabled&&n.debugEnabled(i.inDebug)}]);n.config(["$locationProvider",function(n){n.html5Mode({enabled:!0,requireBase:!1})}]);n.config(["commonConfigProvider",function(n){n.config=i}]);n.config(["exceptionHandlerProvider",function(n){n.configure(i.appErrorPrefix)}]);n.config(["$translateProvider",function(n){n.uniformLanguageTag("bcp47").useStaticFilesLoader({prefix:i.appRoot+"content/i18n/login/",suffix:".json"+i.urlCacheBusterSuffix}).useMessageFormatInterpolation().usePostCompiling(!0).useSanitizeValueStrategy("sanitizeParameters").registerAvailableLanguageKeys(["en-GB","en-US","de","es","fr","it","pl"],{"en-CA":"en-US","de-*":"de","es-*":"es","fr-*":"fr","it-*":"it","pl-*":"pl"}).determinePreferredLanguage().fallbackLanguage("en-GB")}])}function r(){n.config(["$httpProvider",function(n){n.interceptors.push("httpInterceptor")}])}function u(n){t(n.libs);i(n.config);r()}var n=angular.module("app",["common","app.login","angularMoment","base64","pascalprecht.translate",]);return{start:u}}(),function(){"use strict";function n(n){function t(n){return n.method==="PUT"&&(n.method="POST",n.headers={"X-HTTP-Method-Override":"PUT","Content-Type":"application/json"}),n}function i(t){return n.when(t)}return{request:t,response:i}}angular.module("app").factory("httpInterceptor",n);n.$inject=["$q"]}()