Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@blackbaud/auth-client

Package Overview
Dependencies
Maintainers
1
Versions
120
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@blackbaud/auth-client - npm Package Compare versions

Comparing version 1.17.1 to 1.18.0

54

bundles/auth-client.umd.js

@@ -403,2 +403,3 @@ (function webpackUniversalModuleDefinition(root, factory) {

var CLS_LOADING = 'sky-omnibar-loading';
var envEl;
var placeholderEl;

@@ -409,6 +410,3 @@ var styleEl;

var promiseResolve;
function addIframeEl() {
iframeEl = document.createElement('iframe');
iframeEl.className = "sky-omnibar-iframe " + CLS_LOADING;
iframeEl.src = buildOmnibarUrl();
function addElToBodyTop(el) {
var body = document.body;

@@ -418,8 +416,19 @@ /* istanbul ignore else */

if (body.firstChild) {
body.insertBefore(iframeEl, body.firstChild);
body.insertBefore(el, body.firstChild);
}
else {
body.appendChild(iframeEl);
body.appendChild(el);
}
}
function addIframeEl() {
iframeEl = document.createElement('iframe');
iframeEl.className = "sky-omnibar-iframe " + CLS_LOADING;
iframeEl.src = buildOmnibarUrl();
addElToBodyTop(iframeEl);
}
function addEnvironmentEl() {
envEl = document.createElement('div');
envEl.className = 'sky-omnibar-environment';
addElToBodyTop(envEl);
}
function collapseIframe() {

@@ -429,3 +438,3 @@ iframeEl.classList.remove(CLS_EXPANDED);

function addStyleEl() {
var css = "\nbody {\n margin-top: 50px;\n}\n\n#bb-help-container {\n padding-top: 1px;\n}\n\n.sky-omnibar-iframe,\n.sky-omnibar-placeholder {\n border: none;\n height: 50px;\n width: 100%;\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n z-index: 1000;\n}\n\n.sky-omnibar-placeholder {\n background-color: #4d5259;\n border-top: 5px solid #00b4f1;\n display: none;\n}\n\n.sky-omnibar-placeholder.sky-omnibar-loading {\n display: block;\n}\n\n.sky-omnibar-iframe.sky-omnibar-loading {\n visibility: hidden;\n}\n\n.sky-omnibar-iframe-expanded {\n height: 100%;\n}\n ";
var css = "\nbody {\n margin-top: 50px;\n}\n\n#bb-help-container {\n padding-top: 1px;\n}\n\n.sky-omnibar-iframe,\n.sky-omnibar-placeholder {\n border: none;\n height: 50px;\n width: 100%;\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n z-index: 1000;\n}\n\n.sky-omnibar-placeholder {\n background-color: #4d5259;\n border-top: 5px solid #00b4f1;\n display: none;\n}\n\n.sky-omnibar-placeholder.sky-omnibar-loading {\n display: block;\n}\n\n.sky-omnibar-iframe.sky-omnibar-loading {\n visibility: hidden;\n}\n\n.sky-omnibar-iframe-expanded {\n height: 100%;\n}\n\n.sky-omnibar-environment {\n background-color: #e1e1e3;\n color: #282b31;\n font-family: \"Blackbaud Sans\", \"Open Sans\", \"Helvetica Neue\", Arial, sans-serif;\n font-size: 12px;\n font-weight: 400;\n height: 0;\n line-height: 24px;\n overflow: hidden;\n padding: 0 15px;\n text-align: right;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.sky-omnibar-environment-visible .sky-omnibar-environment {\n height: 24px;\n}\n ";
styleEl = document.createElement('style');

@@ -519,2 +528,14 @@ styleEl.appendChild(document.createTextNode(css));

}
function handleEnvironmentUpdate(name) {
var bodyCls = 'sky-omnibar-environment-visible';
var bodyClassList = document.body.classList;
name = name || '';
envEl.innerText = name;
if (name) {
bodyClassList.add(bodyCls);
}
else {
bodyClassList.remove(bodyCls);
}
}
function monkeyPatchState() {

@@ -614,2 +635,5 @@ var oldPushState = history.pushState;

break;
case 'environment-update':
handleEnvironmentUpdate(message.name);
break;
}

@@ -632,2 +656,5 @@ }

addPlaceholderEl();
// Add these in reverse order since each will be inserted at the top of the
// document; this will ensure the proper order in the DOM.
addEnvironmentEl();
addIframeEl();

@@ -641,8 +668,11 @@ window.addEventListener('message', messageHandler);

document.body.removeChild(iframeEl);
document.body.removeChild(envEl);
window.removeEventListener('message', messageHandler);
omnibarConfig = undefined;
styleEl = undefined;
placeholderEl = undefined;
iframeEl = undefined;
promiseResolve = undefined;
omnibarConfig =
styleEl =
placeholderEl =
iframeEl =
envEl =
promiseResolve =
undefined;
};

@@ -649,0 +679,0 @@ return BBOmnibarExperimental;

@@ -1,1 +0,1 @@

(function e(n,t){if(typeof exports==="object"&&typeof module==="object")module.exports=t();else if(typeof define==="function"&&define.amd)define([],t);else if(typeof exports==="object")exports["BBAuthClient"]=t();else n["BBAuthClient"]=t()})(this,function(){return function(e){var n={};function t(r){if(n[r]){return n[r].exports}var i=n[r]={i:r,l:false,exports:{}};e[r].call(i.exports,i,i.exports,t);i.l=true;return i.exports}t.m=e;t.c=n;t.i=function(e){return e};t.d=function(e,n,r){if(!t.o(e,n)){Object.defineProperty(e,n,{configurable:false,enumerable:true,get:r})}};t.n=function(e){var n=e&&e.__esModule?function n(){return e["default"]}:function n(){return e};t.d(n,"a",n);return n};t.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)};t.p="";return t(t.s=5)}([function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:true});var r="https://signin.blackbaud.com/signin/";var i=encodeURIComponent;function o(e){var n=[];for(var t in e){if(e.hasOwnProperty(t)){n.push(i(t)+"="+i(e[t]))}}return n.join("&")}function a(e){var n=r+"?redirectUrl="+i(location.href);if(e){n+="&inactivity=1"}return n}var s=function(){function e(){}e.navigate=function(e){location.href=e};e.redirectToSignin=function(e){var n=a();if(e){n+="&"+o(e)}this.navigate(n)};e.redirectToSignoutForInactivity=function(){var e=a(true);var n=r+"sign-out?redirectUrl="+i(e);this.navigate(n)};return e}();n.BBAuthNavigator=s},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:true});var r="https://s21aidntoken00blkbapp01.nxt.blackbaud.com/session/csrf";var i=t(0);function o(e,n,t,r,i){var o=new XMLHttpRequest;o.onreadystatechange=function(){if(o.readyState===4&&o.status===401){i({message:"The user is not logged in."})}else if(o.readyState===4&&o.status===200){r(o.responseText)}};o.open("POST",e,true);o.setRequestHeader(n.name,n.value);o.setRequestHeader("Accept","application/json");o.setRequestHeader("Content-Type","application/json");o.withCredentials=true;if(t){o.send(JSON.stringify(t))}else{o.send()}}function a(e,n,t,r){var i;if(t&&r){i={environment_id:t,permission_scope:r}}return new Promise(function(t,r){o(e,{name:"X-CSRF",value:n},i,function(e){var n=e?JSON.parse(e):undefined;t(n)},r)})}var s=function(){function e(){}e.request=function(e,n,t,o,s){return new Promise(function(u,c){a(r,"token_needed").then(function(n){return a(e,n["csrf_token"],o,s)}).then(u).catch(function(e){if(t){c(e)}else{i.BBAuthNavigator.redirectToSignin(n)}})})};return e}();n.BBCsrfXhr=s},function(e,n,t){"use strict";function r(e){for(var t in e)if(!n.hasOwnProperty(t))n[t]=e[t]}Object.defineProperty(n,"__esModule",{value:true});r(t(7))},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:true});var r="https://host.nxt.blackbaud.com";var i=function(){function e(){}e.postOmnibarMessage=function(e,n,t){n.source="auth-client";e.contentWindow.postMessage(n,t||r)};e.messageIsFromOmnibar=function(e){if(e.origin===r){var n=e.data;return!!n&&n.source==="skyux-spa-omnibar"}return false};return e}();n.BBAuthInterop=i},function(e,n,t){"use strict";function r(e){for(var t in e)if(!n.hasOwnProperty(t))n[t]=e[t]}Object.defineProperty(n,"__esModule",{value:true});r(t(21));r(t(8));r(t(11));r(t(10));r(t(13));r(t(14));r(t(15));r(t(16))},function(e,n,t){"use strict";function r(e){for(var t in e)if(!n.hasOwnProperty(t))n[t]=e[t]}Object.defineProperty(n,"__esModule",{value:true});r(t(2));r(t(4))},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:true});var r=t(1);var i=function(){function e(){}e.getToken=function(e,n,t){return r.BBCsrfXhr.request("https://s21aidntoken00blkbapp01.nxt.blackbaud.com/oauth2/token",undefined,e,n,t)};return e}();n.BBAuthTokenIntegration=i},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:true});var r=t(6);function i(e){var n=e.envId,t=e.permissionScope;return"token|"+(n||"-")+"|"+(t||"-")}var o=function(){function e(){}e.getToken=function(n,t){var r;switch(typeof n){case"undefined":r={};break;case"boolean":r={disableRedirect:t,forceNewToken:n};break;default:r=n}return e.getTokenInternal(r)};e.clearTokenCache=function(){e.tokenCache={}};e.getTokenInternal=function(n){var t=n.forceNewToken,o=n.disableRedirect;if(e.mock){return Promise.resolve("mock_access_token_auth-client@blackbaud.com")}var a=i(n);var s=e.tokenCache[a]=e.tokenCache[a]||{};var u=(new Date).valueOf();if(!t&&s.lastToken&&s.expirationTime&&s.expirationTime-u>60*1e3){return Promise.resolve(s.lastToken)}if(!s.pendingLookupPromise){s.pendingLookupPromise=r.BBAuthTokenIntegration.getToken(o,n.envId,n.permissionScope).then(function(e){s.expirationTime=(new Date).valueOf()+e["expires_in"]*1e3;s.lastToken=e["access_token"];s.pendingLookupPromise=null;return s.lastToken}).catch(function(e){s.pendingLookupPromise=null;throw e})}return s.pendingLookupPromise};return e}();o.mock=false;o.tokenCache={};n.BBAuth=o},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:true});var r=function(){function e(){}return e}();n.BBOmnibarConfig=r},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:true});var r=t(2);var i=t(3);var o=t(18);var a=t(0);var s="sky-omnibar-iframe-expanded";var u="sky-omnibar-loading";var c;var f;var d;var l;var v;function p(){d=document.createElement("iframe");d.className="sky-omnibar-iframe "+u;d.src=P();var e=document.body;if(e.firstChild){e.insertBefore(d,e.firstChild)}else{e.appendChild(d)}}function m(){d.classList.remove(s)}function h(){var e="\nbody {\n margin-top: 50px;\n}\n\n#bb-help-container {\n padding-top: 1px;\n}\n\n.sky-omnibar-iframe,\n.sky-omnibar-placeholder {\n border: none;\n height: 50px;\n width: 100%;\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n z-index: 1000;\n}\n\n.sky-omnibar-placeholder {\n background-color: #4d5259;\n border-top: 5px solid #00b4f1;\n display: none;\n}\n\n.sky-omnibar-placeholder.sky-omnibar-loading {\n display: block;\n}\n\n.sky-omnibar-iframe.sky-omnibar-loading {\n visibility: hidden;\n}\n\n.sky-omnibar-iframe-expanded {\n height: 100%;\n}\n ";f=document.createElement("style");f.appendChild(document.createTextNode(e));document.head.appendChild(f)}function b(){c=document.createElement("div");c.className="sky-omnibar-placeholder "+u;document.body.appendChild(c)}function y(){d.classList.add(s)}function g(){i.BBAuthInterop.postOmnibarMessage(d,{href:document.location.href,messageType:"location-change"})}function B(e){if(l.onSearch){l.onSearch(e).then(function(e){i.BBAuthInterop.postOmnibarMessage(d,{messageType:"search-results",results:e})})}}function k(){function e(e){i.BBAuthInterop.postOmnibarMessage(d,{messageType:"refresh-user",token:e})}r.BBAuth.clearTokenCache();r.BBAuth.getToken({disableRedirect:true,forceNewToken:true}).then(e).catch(function(){return e(undefined)})}function I(){i.BBAuthInterop.postOmnibarMessage(d,{messageType:"inactivity-show"})}function _(){i.BBAuthInterop.postOmnibarMessage(d,{messageType:"inactivity-hide"})}function O(e,n,t){function a(){o.BBOmnibarUserActivity.startTracking(k,I,_,l.allowAnonymous,t)}r.BBAuth.getToken(false,n).then(function(n){a();i.BBAuthInterop.postOmnibarMessage(d,{messageType:"token",token:n,tokenRequestId:e})},function(n){a();i.BBAuthInterop.postOmnibarMessage(d,{messageType:"token-fail",reason:n,tokenRequestId:e})})}function T(){var e=window.BBHELP;if(e){e.HelpWidget.open()}}function A(e){var n=l.notifications;if(n&&n.onNotificationRead){n.onNotificationRead(e)}}function S(){var e=history.pushState;var n=history.replaceState;function t(){var n=e.apply(history,arguments);g();return n}function r(){var e=n.apply(history,arguments);g();return e}history.pushState=t;history.replaceState=r}function E(){var e=l.notifications;if(e){e.onReady({updateNotifications:function(e){i.BBAuthInterop.postOmnibarMessage(d,{messageType:"notifications-update",notifications:e})}})}}function w(e){if(!i.BBAuthInterop.messageIsFromOmnibar(e)){return}var n=e.data;var t=l.nav;switch(n.messageType){case"ready":i.BBAuthInterop.postOmnibarMessage(d,{messageType:"host-ready"});S();i.BBAuthInterop.postOmnibarMessage(d,{enableHelp:l.enableHelp,envId:l.envId,localNavItems:t&&t.localNavItems,localNotifications:!!l.notifications,localSearch:!!l.onSearch,messageType:"nav-ready",services:t&&t.services,svcId:l.svcId});E();g();v();break;case"display-ready":c.classList.remove(u);d.classList.remove(u);break;case"expand":y();break;case"collapse":m();break;case"navigate-url":a.BBAuthNavigator.navigate(n.url);break;case"navigate":var r=n.navItem;if(!t||!t.beforeNavCallback||t.beforeNavCallback(r)!==false){a.BBAuthNavigator.navigate(r.url)}break;case"search":B(n.searchArgs);break;case"get-token":O(n.tokenRequestId,n.disableRedirect,l.legacyKeepAliveUrl);break;case"help-open":T();break;case"notification-read":A(n.notification);break;case"session-renew":o.BBOmnibarUserActivity.userRenewedSession();break}}function P(){var e=l.url||"https://host.nxt.blackbaud.com/omnibar/";return e}var N=function(){function e(){}e.load=function(e){l=l=e;return new Promise(function(e){v=e;h();b();p();window.addEventListener("message",w)})};e.destroy=function(){document.head.removeChild(f);document.body.removeChild(c);document.body.removeChild(d);window.removeEventListener("message",w);l=undefined;f=undefined;c=undefined;d=undefined;v=undefined};return e}();n.BBOmnibarExperimental=N},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:true});var r=function(){function e(){}return e}();n.BBOmnibarNavigationItem=r},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:true});var r=function(){function e(){}return e}();n.BBOmnibarNavigation=r},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:true});function r(e){var n=e.split(".");var t=[];for(var r=0,i=n;r<i.length;r++){var o=i[r];var a=parseInt(o,10)||0;t.push(a)}return t}function i(e,n){var t=r(e);var i=r(n);for(var o=0;o<t.length;o++){if(o<i.length){if(i[o]>t[o]){return true}else if(i[o]<t[o]){return false}}}return true}var o=function(){function e(){}e.registerScript=function(e){return new Promise(function(n,t){var r=document.createElement("script");r.onload=n;r.onerror=t;r.src=e;document.body.appendChild(r)})};e.smartRegisterScript=function(n,t,r){if(r&&i(t,r)){return Promise.resolve()}return e.registerScript(n)};return e}();n.BBOmnibarScriptLoader=o},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:true});var r=function(){function e(){}return e}();n.BBOmnibarSearchArgs=r},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:true});var r=function(){function e(){}return e}();n.BBOmnibarSearchMoreResults=r},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:true});var r=function(){function e(){}return e}();n.BBOmnibarSearchResultItem=r},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:true});var r=function(){function e(){}return e}();n.BBOmnibarSearchResults=r},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:true});var r=function(){function e(){}e.process=function(e){var n=e.allowAnonymous,t=e.closeInactivityPrompt,r=e.expirationDate,i=e.inactivityPromptDuration,o=e.isShowingInactivityPrompt,a=e.lastActivity,s=e.maxSessionAge,u=e.minRenewalAge,c=e.redirectForInactivity,f=e.renewSession,d=e.showInactivityPrompt;var l=Date.now();if(r===null){return}if(!n&&l>r){c()}var v=r-i;var p=r-s+u;if(o){if(l<v){t()}}else{if(a>p){f()}else if(!n&&l>v){d()}}};return e}();n.BBOmnibarUserActivityProcessor=r},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:true});var r=t(17);var i=t(19);var o=t(20);var a=t(1);var s=t(0);var u;var c;var f;var d;var l;var v;var p;var m;var h;var b;var y="";var g;var B;var k;function I(){m=Date.now()}function _(e){if(e.clientX!==c||e.clientY!==f){c=e.clientX;f=e.clientY;I()}}function O(){var e=Date.now();if(!h||e-h>P.MIN_RENEWAL_RETRY){h=e;a.BBCsrfXhr.request("https://s21aidntoken00blkbapp01.nxt.blackbaud.com/session/renew",{inactivity:1}).catch(function(){return undefined})}}function T(){document.addEventListener("keypress",I);document.addEventListener("mousemove",_)}function A(){p=true;v()}function S(){p=false;I();d()}function E(){if(k){s.BBAuthNavigator.navigate(k)}else{s.BBAuthNavigator.redirectToSignoutForInactivity()}}function w(){if(!g){O()}b=setInterval(function(){i.BBOmnibarUserSessionExpiration.getSessionExpiration(y,B,g).then(function(e){r.BBOmnibarUserActivityProcessor.process({allowAnonymous:g,closeInactivityPrompt:S,expirationDate:e,inactivityPromptDuration:P.INACTIVITY_PROMPT_DURATION,isShowingInactivityPrompt:p,lastActivity:m,maxSessionAge:P.MAX_SESSION_AGE,minRenewalAge:P.MIN_RENEWAL_AGE,redirectForInactivity:E,renewSession:O,showInactivityPrompt:A})})},P.ACTIVITY_TIMER_INTERVAL)}var P=function(){function e(){}e.startTracking=function(n,t,r,i,a){if(!u||i!==g){e.stopTracking();l=n;v=t;d=r;g=i;T();w();o.BBOmnibarUserSessionWatcher.start(i,a,l,function(e){B=e.legacyTtl;y=e.refreshId;k=e.legacySigninUrl});u=true}};e.userRenewedSession=function(){S();O()};e.stopTracking=function(){o.BBOmnibarUserSessionWatcher.stop();i.BBOmnibarUserSessionExpiration.reset();document.removeEventListener("keypress",I);document.removeEventListener("mousemove",_);if(b){clearInterval(b);b=undefined}u=c=f=m=h=p=l=v=d=g=undefined};return e}();P.ACTIVITY_TIMER_INTERVAL=1e3;P.MIN_RENEWAL_RETRY=1*60*1e3;P.INACTIVITY_PROMPT_DURATION=2*60*1e3;P.MIN_RENEWAL_AGE=5*60*1e3;P.MAX_SESSION_AGE=15*60*1e3;P.IDENTITY_SECURITY_TOKEN_SERVICE_ORIGIN="https://s21aidntoken00blkbapp01.nxt.blackbaud.com";n.BBOmnibarUserActivity=P},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:true});var r=t(1);var i;function o(e,n){if(i&&i.refreshId===e&&i.allowAnonymous===n){return i.promise}var t=new Promise(function(e,t){r.BBCsrfXhr.request("https://s21aidntoken00blkbapp01.nxt.blackbaud.com/session/ttl",undefined,n).then(function(n){var t=n===null?null:Date.now()+n*1e3;e(t)},function(){e(null)})});i={allowAnonymous:n,promise:t,refreshId:e};return t}var a=function(){function e(){}e.getSessionExpiration=function(e,n,t){var r=o(e,t);return new Promise(function(e,t){r.then(function(t){var r;if(t===null){r=null}else if(typeof n==="number"){var i=Date.now()+n;r=Math.min(t,i)}else{r=t}e(r)})})};e.reset=function(){i=undefined};return e}();n.BBOmnibarUserSessionExpiration=a},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:true});var r=t(3);var i=t(0);var o;var a;var s;var u;var c;var f;var d;var l={};var v;function p(e){if(e){var n=e.split("://");var t=n[0];var r=n[1].split("/")[0];return t+"://"+r}return undefined}function m(e){if(d){r.BBAuthInterop.postOmnibarMessage(d,e,p(a))}}function h(e,n){var t=document.createElement("iframe");t.className=e;t.width="0";t.height="0";t.frameBorder="0";t.src=n;t.tabIndex=-1;document.body.appendChild(t);return t}function b(){var e=I.IDENTITY_SECURITY_TOKEN_SERVICE_ORIGIN+"/SessionWatcher.html?origin="+encodeURIComponent(location.origin);f=h("sky-omnibar-iframe-session-watcher",e)}function y(){if(a){d=h("sky-omnibar-iframe-legacy-keep-alive",a)}}function g(e){if(typeof e.data==="string"){var n=void 0;try{n=JSON.parse(e.data)}catch(e){return}if(n.messageType==="session_change"){var t=n.message;var r=t&&t.sessionId;var o=t&&t.refreshId;if(!r&&!c){if(v){i.BBAuthNavigator.navigate(v)}else{i.BBAuthNavigator.redirectToSignin()}}if(l.refreshId!==undefined&&o!==l.refreshId){m({messageType:"session-refresh"})}if(l.sessionId!==undefined&&r!==l.sessionId){s()}l.refreshId=o;l.sessionId=r;u(l)}}}function B(e){var n=e.data;switch(n.messageType){case"ready":l.legacyTtl=n.ttl;v=n.signinUrl;u(l);break}}function k(e){switch(e.origin){case I.IDENTITY_SECURITY_TOKEN_SERVICE_ORIGIN:g(e);break;case p(a):B(e);break}}var I=function(){function e(){}e.start=function(n,t,r,i){if(!o||n!==c){e.stop();c=n;s=r;a=t;u=i;b();y();window.addEventListener("message",k,false);o=true}};e.stop=function(){window.removeEventListener("message",k,false);if(f){document.body.removeChild(f);f=undefined}if(d){document.body.removeChild(d);d=undefined}l={};o=c=s=a=v=u=undefined};return e}();I.IDENTITY_SECURITY_TOKEN_SERVICE_ORIGIN="https://s21aidntoken00blkbapp01.nxt.blackbaud.com";n.BBOmnibarUserSessionWatcher=I},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:true});var r=t(9);var i=t(12);function o(){return window.jQuery}var a=function(){function e(){}e.load=function(e){if(e&&e.experimental){return r.BBOmnibarExperimental.load(e)}return new Promise(function(n){var t=o();var r=t&&t.fn&&t.fn.jquery;i.BBOmnibarScriptLoader.smartRegisterScript("https://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.0/jquery.js","2.1.0",r).then(function(){return i.BBOmnibarScriptLoader.registerScript("https://cdnjs.cloudflare.com/ajax/libs/easyXDM/2.4.17.1/easyXDM.min.js")}).then(function(){return i.BBOmnibarScriptLoader.registerScript("https://signin.blackbaud.com/Omnibar.min.js")}).then(function(){document.body.classList.add("bb-omnibar-height-padding");var t=document.createElement("div");t.setAttribute("data-omnibar-el","");document.body.appendChild(t);e=e||{};e["z-index"]=1e3;e.afterLoad=n;if(e.menuEl){e.menuEl=o()(e.menuEl)}BBAUTH.Omnibar.load(t,e)})})};return e}();n.BBOmnibar=a}])});
(function e(n,t){if(typeof exports==="object"&&typeof module==="object")module.exports=t();else if(typeof define==="function"&&define.amd)define([],t);else if(typeof exports==="object")exports["BBAuthClient"]=t();else n["BBAuthClient"]=t()})(this,function(){return function(e){var n={};function t(r){if(n[r]){return n[r].exports}var i=n[r]={i:r,l:false,exports:{}};e[r].call(i.exports,i,i.exports,t);i.l=true;return i.exports}t.m=e;t.c=n;t.i=function(e){return e};t.d=function(e,n,r){if(!t.o(e,n)){Object.defineProperty(e,n,{configurable:false,enumerable:true,get:r})}};t.n=function(e){var n=e&&e.__esModule?function n(){return e["default"]}:function n(){return e};t.d(n,"a",n);return n};t.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)};t.p="";return t(t.s=5)}([function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:true});var r="https://signin.blackbaud.com/signin/";var i=encodeURIComponent;function o(e){var n=[];for(var t in e){if(e.hasOwnProperty(t)){n.push(i(t)+"="+i(e[t]))}}return n.join("&")}function a(e){var n=r+"?redirectUrl="+i(location.href);if(e){n+="&inactivity=1"}return n}var s=function(){function e(){}e.navigate=function(e){location.href=e};e.redirectToSignin=function(e){var n=a();if(e){n+="&"+o(e)}this.navigate(n)};e.redirectToSignoutForInactivity=function(){var e=a(true);var n=r+"sign-out?redirectUrl="+i(e);this.navigate(n)};return e}();n.BBAuthNavigator=s},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:true});var r="https://s21aidntoken00blkbapp01.nxt.blackbaud.com/session/csrf";var i=t(0);function o(e,n,t,r,i){var o=new XMLHttpRequest;o.onreadystatechange=function(){if(o.readyState===4&&o.status===401){i({message:"The user is not logged in."})}else if(o.readyState===4&&o.status===200){r(o.responseText)}};o.open("POST",e,true);o.setRequestHeader(n.name,n.value);o.setRequestHeader("Accept","application/json");o.setRequestHeader("Content-Type","application/json");o.withCredentials=true;if(t){o.send(JSON.stringify(t))}else{o.send()}}function a(e,n,t,r){var i;if(t&&r){i={environment_id:t,permission_scope:r}}return new Promise(function(t,r){o(e,{name:"X-CSRF",value:n},i,function(e){var n=e?JSON.parse(e):undefined;t(n)},r)})}var s=function(){function e(){}e.request=function(e,n,t,o,s){return new Promise(function(u,c){a(r,"token_needed").then(function(n){return a(e,n["csrf_token"],o,s)}).then(u).catch(function(e){if(t){c(e)}else{i.BBAuthNavigator.redirectToSignin(n)}})})};return e}();n.BBCsrfXhr=s},function(e,n,t){"use strict";function r(e){for(var t in e)if(!n.hasOwnProperty(t))n[t]=e[t]}Object.defineProperty(n,"__esModule",{value:true});r(t(7))},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:true});var r="https://host.nxt.blackbaud.com";var i=function(){function e(){}e.postOmnibarMessage=function(e,n,t){n.source="auth-client";e.contentWindow.postMessage(n,t||r)};e.messageIsFromOmnibar=function(e){if(e.origin===r){var n=e.data;return!!n&&n.source==="skyux-spa-omnibar"}return false};return e}();n.BBAuthInterop=i},function(e,n,t){"use strict";function r(e){for(var t in e)if(!n.hasOwnProperty(t))n[t]=e[t]}Object.defineProperty(n,"__esModule",{value:true});r(t(21));r(t(8));r(t(11));r(t(10));r(t(13));r(t(14));r(t(15));r(t(16))},function(e,n,t){"use strict";function r(e){for(var t in e)if(!n.hasOwnProperty(t))n[t]=e[t]}Object.defineProperty(n,"__esModule",{value:true});r(t(2));r(t(4))},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:true});var r=t(1);var i=function(){function e(){}e.getToken=function(e,n,t){return r.BBCsrfXhr.request("https://s21aidntoken00blkbapp01.nxt.blackbaud.com/oauth2/token",undefined,e,n,t)};return e}();n.BBAuthTokenIntegration=i},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:true});var r=t(6);function i(e){var n=e.envId,t=e.permissionScope;return"token|"+(n||"-")+"|"+(t||"-")}var o=function(){function e(){}e.getToken=function(n,t){var r;switch(typeof n){case"undefined":r={};break;case"boolean":r={disableRedirect:t,forceNewToken:n};break;default:r=n}return e.getTokenInternal(r)};e.clearTokenCache=function(){e.tokenCache={}};e.getTokenInternal=function(n){var t=n.forceNewToken,o=n.disableRedirect;if(e.mock){return Promise.resolve("mock_access_token_auth-client@blackbaud.com")}var a=i(n);var s=e.tokenCache[a]=e.tokenCache[a]||{};var u=(new Date).valueOf();if(!t&&s.lastToken&&s.expirationTime&&s.expirationTime-u>60*1e3){return Promise.resolve(s.lastToken)}if(!s.pendingLookupPromise){s.pendingLookupPromise=r.BBAuthTokenIntegration.getToken(o,n.envId,n.permissionScope).then(function(e){s.expirationTime=(new Date).valueOf()+e["expires_in"]*1e3;s.lastToken=e["access_token"];s.pendingLookupPromise=null;return s.lastToken}).catch(function(e){s.pendingLookupPromise=null;throw e})}return s.pendingLookupPromise};return e}();o.mock=false;o.tokenCache={};n.BBAuth=o},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:true});var r=function(){function e(){}return e}();n.BBOmnibarConfig=r},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:true});var r=t(2);var i=t(3);var o=t(18);var a=t(0);var s="sky-omnibar-iframe-expanded";var u="sky-omnibar-loading";var c;var f;var d;var l;var v;var p;function m(e){var n=document.body;if(n.firstChild){n.insertBefore(e,n.firstChild)}else{n.appendChild(e)}}function b(){l=document.createElement("iframe");l.className="sky-omnibar-iframe "+u;l.src=M();m(l)}function h(){c=document.createElement("div");c.className="sky-omnibar-environment";m(c)}function y(){l.classList.remove(s)}function g(){var e='\nbody {\n margin-top: 50px;\n}\n\n#bb-help-container {\n padding-top: 1px;\n}\n\n.sky-omnibar-iframe,\n.sky-omnibar-placeholder {\n border: none;\n height: 50px;\n width: 100%;\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n z-index: 1000;\n}\n\n.sky-omnibar-placeholder {\n background-color: #4d5259;\n border-top: 5px solid #00b4f1;\n display: none;\n}\n\n.sky-omnibar-placeholder.sky-omnibar-loading {\n display: block;\n}\n\n.sky-omnibar-iframe.sky-omnibar-loading {\n visibility: hidden;\n}\n\n.sky-omnibar-iframe-expanded {\n height: 100%;\n}\n\n.sky-omnibar-environment {\n background-color: #e1e1e3;\n color: #282b31;\n font-family: "Blackbaud Sans", "Open Sans", "Helvetica Neue", Arial, sans-serif;\n font-size: 12px;\n font-weight: 400;\n height: 0;\n line-height: 24px;\n overflow: hidden;\n padding: 0 15px;\n text-align: right;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.sky-omnibar-environment-visible .sky-omnibar-environment {\n height: 24px;\n}\n ';d=document.createElement("style");d.appendChild(document.createTextNode(e));document.head.appendChild(d)}function B(){f=document.createElement("div");f.className="sky-omnibar-placeholder "+u;document.body.appendChild(f)}function k(){l.classList.add(s)}function I(){i.BBAuthInterop.postOmnibarMessage(l,{href:document.location.href,messageType:"location-change"})}function _(e){if(v.onSearch){v.onSearch(e).then(function(e){i.BBAuthInterop.postOmnibarMessage(l,{messageType:"search-results",results:e})})}}function O(){function e(e){i.BBAuthInterop.postOmnibarMessage(l,{messageType:"refresh-user",token:e})}r.BBAuth.clearTokenCache();r.BBAuth.getToken({disableRedirect:true,forceNewToken:true}).then(e).catch(function(){return e(undefined)})}function T(){i.BBAuthInterop.postOmnibarMessage(l,{messageType:"inactivity-show"})}function A(){i.BBAuthInterop.postOmnibarMessage(l,{messageType:"inactivity-hide"})}function S(e,n,t){function a(){o.BBOmnibarUserActivity.startTracking(O,T,A,v.allowAnonymous,t)}r.BBAuth.getToken(false,n).then(function(n){a();i.BBAuthInterop.postOmnibarMessage(l,{messageType:"token",token:n,tokenRequestId:e})},function(n){a();i.BBAuthInterop.postOmnibarMessage(l,{messageType:"token-fail",reason:n,tokenRequestId:e})})}function w(){var e=window.BBHELP;if(e){e.HelpWidget.open()}}function E(e){var n=v.notifications;if(n&&n.onNotificationRead){n.onNotificationRead(e)}}function P(e){var n="sky-omnibar-environment-visible";var t=document.body.classList;e=e||"";c.innerText=e;if(e){t.add(n)}else{t.remove(n)}}function N(){var e=history.pushState;var n=history.replaceState;function t(){var n=e.apply(history,arguments);I();return n}function r(){var e=n.apply(history,arguments);I();return e}history.pushState=t;history.replaceState=r}function x(){var e=v.notifications;if(e){e.onReady({updateNotifications:function(e){i.BBAuthInterop.postOmnibarMessage(l,{messageType:"notifications-update",notifications:e})}})}}function R(e){if(!i.BBAuthInterop.messageIsFromOmnibar(e)){return}var n=e.data;var t=v.nav;switch(n.messageType){case"ready":i.BBAuthInterop.postOmnibarMessage(l,{messageType:"host-ready"});N();i.BBAuthInterop.postOmnibarMessage(l,{enableHelp:v.enableHelp,envId:v.envId,localNavItems:t&&t.localNavItems,localNotifications:!!v.notifications,localSearch:!!v.onSearch,messageType:"nav-ready",services:t&&t.services,svcId:v.svcId});x();I();p();break;case"display-ready":f.classList.remove(u);l.classList.remove(u);break;case"expand":k();break;case"collapse":y();break;case"navigate-url":a.BBAuthNavigator.navigate(n.url);break;case"navigate":var r=n.navItem;if(!t||!t.beforeNavCallback||t.beforeNavCallback(r)!==false){a.BBAuthNavigator.navigate(r.url)}break;case"search":_(n.searchArgs);break;case"get-token":S(n.tokenRequestId,n.disableRedirect,v.legacyKeepAliveUrl);break;case"help-open":w();break;case"notification-read":E(n.notification);break;case"session-renew":o.BBOmnibarUserActivity.userRenewedSession();break;case"environment-update":P(n.name);break}}function M(){var e=v.url||"https://host.nxt.blackbaud.com/omnibar/";return e}var C=function(){function e(){}e.load=function(e){v=v=e;return new Promise(function(e){p=e;g();B();h();b();window.addEventListener("message",R)})};e.destroy=function(){document.head.removeChild(d);document.body.removeChild(f);document.body.removeChild(l);document.body.removeChild(c);window.removeEventListener("message",R);v=d=f=l=c=p=undefined};return e}();n.BBOmnibarExperimental=C},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:true});var r=function(){function e(){}return e}();n.BBOmnibarNavigationItem=r},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:true});var r=function(){function e(){}return e}();n.BBOmnibarNavigation=r},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:true});function r(e){var n=e.split(".");var t=[];for(var r=0,i=n;r<i.length;r++){var o=i[r];var a=parseInt(o,10)||0;t.push(a)}return t}function i(e,n){var t=r(e);var i=r(n);for(var o=0;o<t.length;o++){if(o<i.length){if(i[o]>t[o]){return true}else if(i[o]<t[o]){return false}}}return true}var o=function(){function e(){}e.registerScript=function(e){return new Promise(function(n,t){var r=document.createElement("script");r.onload=n;r.onerror=t;r.src=e;document.body.appendChild(r)})};e.smartRegisterScript=function(n,t,r){if(r&&i(t,r)){return Promise.resolve()}return e.registerScript(n)};return e}();n.BBOmnibarScriptLoader=o},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:true});var r=function(){function e(){}return e}();n.BBOmnibarSearchArgs=r},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:true});var r=function(){function e(){}return e}();n.BBOmnibarSearchMoreResults=r},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:true});var r=function(){function e(){}return e}();n.BBOmnibarSearchResultItem=r},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:true});var r=function(){function e(){}return e}();n.BBOmnibarSearchResults=r},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:true});var r=function(){function e(){}e.process=function(e){var n=e.allowAnonymous,t=e.closeInactivityPrompt,r=e.expirationDate,i=e.inactivityPromptDuration,o=e.isShowingInactivityPrompt,a=e.lastActivity,s=e.maxSessionAge,u=e.minRenewalAge,c=e.redirectForInactivity,f=e.renewSession,d=e.showInactivityPrompt;var l=Date.now();if(r===null){return}if(!n&&l>r){c()}var v=r-i;var p=r-s+u;if(o){if(l<v){t()}}else{if(a>p){f()}else if(!n&&l>v){d()}}};return e}();n.BBOmnibarUserActivityProcessor=r},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:true});var r=t(17);var i=t(19);var o=t(20);var a=t(1);var s=t(0);var u;var c;var f;var d;var l;var v;var p;var m;var b;var h;var y="";var g;var B;var k;function I(){m=Date.now()}function _(e){if(e.clientX!==c||e.clientY!==f){c=e.clientX;f=e.clientY;I()}}function O(){var e=Date.now();if(!b||e-b>P.MIN_RENEWAL_RETRY){b=e;a.BBCsrfXhr.request("https://s21aidntoken00blkbapp01.nxt.blackbaud.com/session/renew",{inactivity:1}).catch(function(){return undefined})}}function T(){document.addEventListener("keypress",I);document.addEventListener("mousemove",_)}function A(){p=true;v()}function S(){p=false;I();d()}function w(){if(k){s.BBAuthNavigator.navigate(k)}else{s.BBAuthNavigator.redirectToSignoutForInactivity()}}function E(){if(!g){O()}h=setInterval(function(){i.BBOmnibarUserSessionExpiration.getSessionExpiration(y,B,g).then(function(e){r.BBOmnibarUserActivityProcessor.process({allowAnonymous:g,closeInactivityPrompt:S,expirationDate:e,inactivityPromptDuration:P.INACTIVITY_PROMPT_DURATION,isShowingInactivityPrompt:p,lastActivity:m,maxSessionAge:P.MAX_SESSION_AGE,minRenewalAge:P.MIN_RENEWAL_AGE,redirectForInactivity:w,renewSession:O,showInactivityPrompt:A})})},P.ACTIVITY_TIMER_INTERVAL)}var P=function(){function e(){}e.startTracking=function(n,t,r,i,a){if(!u||i!==g){e.stopTracking();l=n;v=t;d=r;g=i;T();E();o.BBOmnibarUserSessionWatcher.start(i,a,l,function(e){B=e.legacyTtl;y=e.refreshId;k=e.legacySigninUrl});u=true}};e.userRenewedSession=function(){S();O()};e.stopTracking=function(){o.BBOmnibarUserSessionWatcher.stop();i.BBOmnibarUserSessionExpiration.reset();document.removeEventListener("keypress",I);document.removeEventListener("mousemove",_);if(h){clearInterval(h);h=undefined}u=c=f=m=b=p=l=v=d=g=undefined};return e}();P.ACTIVITY_TIMER_INTERVAL=1e3;P.MIN_RENEWAL_RETRY=1*60*1e3;P.INACTIVITY_PROMPT_DURATION=2*60*1e3;P.MIN_RENEWAL_AGE=5*60*1e3;P.MAX_SESSION_AGE=15*60*1e3;P.IDENTITY_SECURITY_TOKEN_SERVICE_ORIGIN="https://s21aidntoken00blkbapp01.nxt.blackbaud.com";n.BBOmnibarUserActivity=P},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:true});var r=t(1);var i;function o(e,n){if(i&&i.refreshId===e&&i.allowAnonymous===n){return i.promise}var t=new Promise(function(e,t){r.BBCsrfXhr.request("https://s21aidntoken00blkbapp01.nxt.blackbaud.com/session/ttl",undefined,n).then(function(n){var t=n===null?null:Date.now()+n*1e3;e(t)},function(){e(null)})});i={allowAnonymous:n,promise:t,refreshId:e};return t}var a=function(){function e(){}e.getSessionExpiration=function(e,n,t){var r=o(e,t);return new Promise(function(e,t){r.then(function(t){var r;if(t===null){r=null}else if(typeof n==="number"){var i=Date.now()+n;r=Math.min(t,i)}else{r=t}e(r)})})};e.reset=function(){i=undefined};return e}();n.BBOmnibarUserSessionExpiration=a},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:true});var r=t(3);var i=t(0);var o;var a;var s;var u;var c;var f;var d;var l={};var v;function p(e){if(e){var n=e.split("://");var t=n[0];var r=n[1].split("/")[0];return t+"://"+r}return undefined}function m(e){if(d){r.BBAuthInterop.postOmnibarMessage(d,e,p(a))}}function b(e,n){var t=document.createElement("iframe");t.className=e;t.width="0";t.height="0";t.frameBorder="0";t.src=n;t.tabIndex=-1;document.body.appendChild(t);return t}function h(){var e=I.IDENTITY_SECURITY_TOKEN_SERVICE_ORIGIN+"/SessionWatcher.html?origin="+encodeURIComponent(location.origin);f=b("sky-omnibar-iframe-session-watcher",e)}function y(){if(a){d=b("sky-omnibar-iframe-legacy-keep-alive",a)}}function g(e){if(typeof e.data==="string"){var n=void 0;try{n=JSON.parse(e.data)}catch(e){return}if(n.messageType==="session_change"){var t=n.message;var r=t&&t.sessionId;var o=t&&t.refreshId;if(!r&&!c){if(v){i.BBAuthNavigator.navigate(v)}else{i.BBAuthNavigator.redirectToSignin()}}if(l.refreshId!==undefined&&o!==l.refreshId){m({messageType:"session-refresh"})}if(l.sessionId!==undefined&&r!==l.sessionId){s()}l.refreshId=o;l.sessionId=r;u(l)}}}function B(e){var n=e.data;switch(n.messageType){case"ready":l.legacyTtl=n.ttl;v=n.signinUrl;u(l);break}}function k(e){switch(e.origin){case I.IDENTITY_SECURITY_TOKEN_SERVICE_ORIGIN:g(e);break;case p(a):B(e);break}}var I=function(){function e(){}e.start=function(n,t,r,i){if(!o||n!==c){e.stop();c=n;s=r;a=t;u=i;h();y();window.addEventListener("message",k,false);o=true}};e.stop=function(){window.removeEventListener("message",k,false);if(f){document.body.removeChild(f);f=undefined}if(d){document.body.removeChild(d);d=undefined}l={};o=c=s=a=v=u=undefined};return e}();I.IDENTITY_SECURITY_TOKEN_SERVICE_ORIGIN="https://s21aidntoken00blkbapp01.nxt.blackbaud.com";n.BBOmnibarUserSessionWatcher=I},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:true});var r=t(9);var i=t(12);function o(){return window.jQuery}var a=function(){function e(){}e.load=function(e){if(e&&e.experimental){return r.BBOmnibarExperimental.load(e)}return new Promise(function(n){var t=o();var r=t&&t.fn&&t.fn.jquery;i.BBOmnibarScriptLoader.smartRegisterScript("https://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.0/jquery.js","2.1.0",r).then(function(){return i.BBOmnibarScriptLoader.registerScript("https://cdnjs.cloudflare.com/ajax/libs/easyXDM/2.4.17.1/easyXDM.min.js")}).then(function(){return i.BBOmnibarScriptLoader.registerScript("https://signin.blackbaud.com/Omnibar.min.js")}).then(function(){document.body.classList.add("bb-omnibar-height-padding");var t=document.createElement("div");t.setAttribute("data-omnibar-el","");document.body.appendChild(t);e=e||{};e["z-index"]=1e3;e.afterLoad=n;if(e.menuEl){e.menuEl=o()(e.menuEl)}BBAUTH.Omnibar.load(t,e)})})};return e}();n.BBOmnibar=a}])});

@@ -0,1 +1,5 @@

# 1.18.0 (2017-10-13)
- The new omnibar will now display the current environment name in a bar under the main omnibar when the user exists in more than one envrionment. (#52)
# 1.17.1 (2017-10-12)

@@ -2,0 +6,0 @@

@@ -1,1 +0,1 @@

{"name":"@blackbaud/auth-client","version":"1.17.1","description":"Provides methods for obtaining an authentication token from the Blackbaud authentication service.","main":"dist/bundles/auth-client.umd.js","module":"index.js","scripts":{"ci":"npm run test:ci && npm run build","test":"npm run lint && npm run test:unit","test:ci":"npm run test:unit:ci","test:unit":"npm run test:unit:base -- config/karma/local.karma.conf.js","test:unit:ci":"npm run test:unit:base -- config/karma/ci.karma.conf.js","test:unit:base":"node --max-old-space-size=4096 node_modules/karma/bin/karma start","pretest":"npm run lint","compress":"uglifyjs dist/bundles/auth-client.umd.js -m -o dist/bundles/auth-client.umd.min.js","build":"rimraf dist && tsc && webpack --config config/webpack/webpack.prod.config.js && npm run compress","watch":"npm run test:unit -- --auto-watch --no-single-run","lint":"tslint 'src/**/*.ts'"},"repository":{"type":"git","url":"git+https://github.com/blackbaud/auth-client.git"},"author":"Blackbaud, Inc.","license":"MIT","bugs":{"url":"https://github.com/blackbaud/auth-client/issues"},"homepage":"https://github.com/blackbaud/auth-client#readme","devDependencies":{"@types/core-js":"0.9.41","@types/jasmine":"2.5.47","@types/jasmine-ajax":"3.1.36","@types/webpack":"2.2.15","core-js":"2.4.1","fs-extra":"3.0.1","istanbul":"0.4.5","istanbul-instrumenter-loader":"0.1.0","jasmine":"2.6.0","jasmine-ajax":"3.3.1","karma":"1.7.0","karma-browserstack-launcher":"1.2.0","karma-chrome-launcher":"2.1.1","karma-coverage":"1.1.1","karma-firefox-launcher":"1.0.1","karma-jasmine":"1.1.0","karma-mocha-reporter":"2.2.3","karma-sourcemap-loader":"0.3.7","karma-webpack":"2.0.3","raw-loader":"0.5.1","remap-istanbul":"0.9.5","rimraf":"2.6.1","source-map-inline-loader":"github:blackbaud-bobbyearl/source-map-inline-loader","ts-loader":"2.0.3","tslint":"5.2.0","tslint-loader":"3.5.3","typescript":"2.3.2","uglify-js":"3.0.15","webpack":"2.5.1"}}
{"name":"@blackbaud/auth-client","version":"1.18.0","description":"Provides methods for obtaining an authentication token from the Blackbaud authentication service.","main":"dist/bundles/auth-client.umd.js","module":"index.js","scripts":{"ci":"npm run test:ci && npm run build","test":"npm run lint && npm run test:unit","test:ci":"npm run test:unit:ci","test:unit":"npm run test:unit:base -- config/karma/local.karma.conf.js","test:unit:ci":"npm run test:unit:base -- config/karma/ci.karma.conf.js","test:unit:base":"node --max-old-space-size=4096 node_modules/karma/bin/karma start","pretest":"npm run lint","compress":"uglifyjs dist/bundles/auth-client.umd.js -m -o dist/bundles/auth-client.umd.min.js","build":"rimraf dist && tsc && webpack --config config/webpack/webpack.prod.config.js && npm run compress","watch":"npm run test:unit -- --auto-watch --no-single-run","lint":"tslint 'src/**/*.ts'"},"repository":{"type":"git","url":"git+https://github.com/blackbaud/auth-client.git"},"author":"Blackbaud, Inc.","license":"MIT","bugs":{"url":"https://github.com/blackbaud/auth-client/issues"},"homepage":"https://github.com/blackbaud/auth-client#readme","devDependencies":{"@types/core-js":"0.9.41","@types/jasmine":"2.5.47","@types/jasmine-ajax":"3.1.36","@types/webpack":"2.2.15","core-js":"2.4.1","fs-extra":"3.0.1","istanbul":"0.4.5","istanbul-instrumenter-loader":"0.1.0","jasmine":"2.6.0","jasmine-ajax":"3.3.1","karma":"1.7.0","karma-browserstack-launcher":"1.2.0","karma-chrome-launcher":"2.1.1","karma-coverage":"1.1.1","karma-firefox-launcher":"1.0.1","karma-jasmine":"1.1.0","karma-mocha-reporter":"2.2.3","karma-sourcemap-loader":"0.3.7","karma-webpack":"2.0.3","raw-loader":"0.5.1","remap-istanbul":"0.9.5","rimraf":"2.6.1","source-map-inline-loader":"github:blackbaud-bobbyearl/source-map-inline-loader","ts-loader":"2.0.3","tslint":"5.2.0","tslint-loader":"3.5.3","typescript":"2.3.2","uglify-js":"3.0.15","webpack":"2.5.1"}}

@@ -9,2 +9,3 @@ "use strict";

var CLS_LOADING = 'sky-omnibar-loading';
var envEl;
var placeholderEl;

@@ -15,6 +16,3 @@ var styleEl;

var promiseResolve;
function addIframeEl() {
iframeEl = document.createElement('iframe');
iframeEl.className = "sky-omnibar-iframe " + CLS_LOADING;
iframeEl.src = buildOmnibarUrl();
function addElToBodyTop(el) {
var body = document.body;

@@ -24,8 +22,19 @@ /* istanbul ignore else */

if (body.firstChild) {
body.insertBefore(iframeEl, body.firstChild);
body.insertBefore(el, body.firstChild);
}
else {
body.appendChild(iframeEl);
body.appendChild(el);
}
}
function addIframeEl() {
iframeEl = document.createElement('iframe');
iframeEl.className = "sky-omnibar-iframe " + CLS_LOADING;
iframeEl.src = buildOmnibarUrl();
addElToBodyTop(iframeEl);
}
function addEnvironmentEl() {
envEl = document.createElement('div');
envEl.className = 'sky-omnibar-environment';
addElToBodyTop(envEl);
}
function collapseIframe() {

@@ -35,3 +44,3 @@ iframeEl.classList.remove(CLS_EXPANDED);

function addStyleEl() {
var css = "\nbody {\n margin-top: 50px;\n}\n\n#bb-help-container {\n padding-top: 1px;\n}\n\n.sky-omnibar-iframe,\n.sky-omnibar-placeholder {\n border: none;\n height: 50px;\n width: 100%;\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n z-index: 1000;\n}\n\n.sky-omnibar-placeholder {\n background-color: #4d5259;\n border-top: 5px solid #00b4f1;\n display: none;\n}\n\n.sky-omnibar-placeholder.sky-omnibar-loading {\n display: block;\n}\n\n.sky-omnibar-iframe.sky-omnibar-loading {\n visibility: hidden;\n}\n\n.sky-omnibar-iframe-expanded {\n height: 100%;\n}\n ";
var css = "\nbody {\n margin-top: 50px;\n}\n\n#bb-help-container {\n padding-top: 1px;\n}\n\n.sky-omnibar-iframe,\n.sky-omnibar-placeholder {\n border: none;\n height: 50px;\n width: 100%;\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n z-index: 1000;\n}\n\n.sky-omnibar-placeholder {\n background-color: #4d5259;\n border-top: 5px solid #00b4f1;\n display: none;\n}\n\n.sky-omnibar-placeholder.sky-omnibar-loading {\n display: block;\n}\n\n.sky-omnibar-iframe.sky-omnibar-loading {\n visibility: hidden;\n}\n\n.sky-omnibar-iframe-expanded {\n height: 100%;\n}\n\n.sky-omnibar-environment {\n background-color: #e1e1e3;\n color: #282b31;\n font-family: \"Blackbaud Sans\", \"Open Sans\", \"Helvetica Neue\", Arial, sans-serif;\n font-size: 12px;\n font-weight: 400;\n height: 0;\n line-height: 24px;\n overflow: hidden;\n padding: 0 15px;\n text-align: right;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.sky-omnibar-environment-visible .sky-omnibar-environment {\n height: 24px;\n}\n ";
styleEl = document.createElement('style');

@@ -125,2 +134,14 @@ styleEl.appendChild(document.createTextNode(css));

}
function handleEnvironmentUpdate(name) {
var bodyCls = 'sky-omnibar-environment-visible';
var bodyClassList = document.body.classList;
name = name || '';
envEl.innerText = name;
if (name) {
bodyClassList.add(bodyCls);
}
else {
bodyClassList.remove(bodyCls);
}
}
function monkeyPatchState() {

@@ -220,2 +241,5 @@ var oldPushState = history.pushState;

break;
case 'environment-update':
handleEnvironmentUpdate(message.name);
break;
}

@@ -238,2 +262,5 @@ }

addPlaceholderEl();
// Add these in reverse order since each will be inserted at the top of the
// document; this will ensure the proper order in the DOM.
addEnvironmentEl();
addIframeEl();

@@ -247,8 +274,11 @@ window.addEventListener('message', messageHandler);

document.body.removeChild(iframeEl);
document.body.removeChild(envEl);
window.removeEventListener('message', messageHandler);
omnibarConfig = undefined;
styleEl = undefined;
placeholderEl = undefined;
iframeEl = undefined;
promiseResolve = undefined;
omnibarConfig =
styleEl =
placeholderEl =
iframeEl =
envEl =
promiseResolve =
undefined;
};

@@ -255,0 +285,0 @@ return BBOmnibarExperimental;

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc