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

@pnp/config-store

Package Overview
Dependencies
Maintainers
6
Versions
155
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@pnp/config-store - npm Package Compare versions

Comparing version 1.1.4 to 1.1.5-0

19

dist/config-store.es5.js
/**
@license
* @pnp/config-store v1.1.4 - pnp - provides a way to manage configuration within your application
* @pnp/config-store v1.1.5-0 - pnp - provides a way to manage configuration within your application
* MIT (https://github.com/pnp/pnpjs/blob/master/LICENSE)

@@ -10,3 +10,3 @@ * Copyright (c) 2018 Microsoft

*/
import { Dictionary, PnPClientStorage } from '@pnp/common';
import { mergeMaps, objectToMap, jsS, PnPClientStorage } from '@pnp/common';
import { __extends } from 'tslib';

@@ -25,4 +25,5 @@ import { Logger } from '@pnp/logging';

*/
function Settings() {
this._settings = new Dictionary();
function Settings(_settings) {
if (_settings === void 0) { _settings = new Map(); }
this._settings = _settings;
}

@@ -36,3 +37,3 @@ /**

Settings.prototype.add = function (key, value) {
this._settings.add(key, value);
this._settings.set(key, value);
};

@@ -46,3 +47,3 @@ /**

Settings.prototype.addJSON = function (key, value) {
this._settings.add(key, JSON.stringify(value));
this._settings.set(key, jsS(value));
};

@@ -58,3 +59,3 @@ /**

try {
_this._settings.merge(hash);
_this._settings = mergeMaps(_this._settings, objectToMap(hash));
resolve();

@@ -76,3 +77,3 @@ }

provider.getConfiguration().then(function (value) {
_this._settings.merge(value);
_this._settings = mergeMaps(_this._settings, objectToMap(value));
resolve();

@@ -99,3 +100,3 @@ }).catch(reject);

var o = this.get(key);
if (typeof o === "undefined" || o === null) {
if (o === undefined || o === null) {
return o;

@@ -102,0 +103,0 @@ }

/**
@license
* @pnp/config-store v1.1.4 - pnp - provides a way to manage configuration within your application
* @pnp/config-store v1.1.5-0 - pnp - provides a way to manage configuration within your application
* MIT (https://github.com/pnp/pnpjs/blob/master/LICENSE)

@@ -10,5 +10,5 @@ * Copyright (c) 2018 Microsoft

*/
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.pnp=t():e.pnp=t()}("undefined"!=typeof self?self:this,function(){return function(e){function t(n){if(i[n])return i[n].exports;var r=i[n]={i:n,l:!1,exports:{}};return e[n].call(r.exports,r,r.exports,t),r.l=!0,r.exports}var i={};return t.m=e,t.c=i,t.d=function(e,i,n){t.o(e,i)||Object.defineProperty(e,i,{configurable:!1,enumerable:!0,get:n})},t.n=function(e){var i=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(i,"a",i),i},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=5)}([function(e,t,i){"use strict";(function(e){function n(e,t){for(var i=[],n=2;n<arguments.length;n++)i[n-2]=arguments[n];return function(){t.apply(e,i)}}function r(e,t,i){var n=new Date(e);switch(t.toLowerCase()){case"year":n.setFullYear(n.getFullYear()+i);break;case"quarter":n.setMonth(n.getMonth()+3*i);break;case"month":n.setMonth(n.getMonth()+i);break;case"week":n.setDate(n.getDate()+7*i);break;case"day":n.setDate(n.getDate()+i);break;case"hour":n.setTime(n.getTime()+36e5*i);break;case"minute":n.setTime(n.getTime()+6e4*i);break;case"second":n.setTime(n.getTime()+1e3*i);break;default:n=void 0}return n}function o(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e.filter(function(e){return!d(e)}).map(function(e){return e.replace(/^[\\|\/]/,"").replace(/[\\|\/]$/,"")}).join("/").replace(/\\/g,"/")}function s(e){for(var t=new Array(e),i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",n=0;n<e;n++)t[n]=i.charAt(Math.floor(Math.random()*i.length));return t.join("")}function a(){var e=(new Date).getTime();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){var i=(e+16*Math.random())%16|0;return e=Math.floor(e/16),("x"===t?i:3&i|8).toString(16)})}function c(e){return"function"==typeof e}function u(e){return void 0!==e&&null!==e}function h(e){return Array.isArray?Array.isArray(e):e&&"number"==typeof e.length&&e.constructor===Array}function l(e,t,i,n){if(void 0===i&&(i=!1),!u(t))return e;var r=i?function(e,t){return!(t in e)}:function(){return!0},o=c(n)?n:function(){return!0},s=function(t){return r(e,t)&&o(t)};return Object.getOwnPropertyNames(t).filter(s).reduce(function(e,i){return e[i]=t[i],e},e)}function p(e){return/^https?:\/\/|^\/\//i.test(e)}function d(e){return void 0===e||null===e||e.length<1}function f(e,t){e=e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");var i=new RegExp(t+"\\s*?=\\s*?(\"|')([^\\1]*?)\\1","i"),n=i.exec(e);return null!==n&&n.length>0?n[2]:null}function T(e){if(d(e))return e;var t=/([0-9A-F]{8}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{12})/i.exec(e);return null===t?e:t[1]}function _(e,t){if(void 0!==t&&null!==t){new Request("",{headers:t}).headers.forEach(function(t,i){e.append(i,t)})}}i.d(t,"a",function(){return m}),i.d(t,"b",function(){return C});var S=i(1),g=i(2),E=i(9),N=(i.n(E),function(){function e(){}e.getCtxCallback=n,e.dateAdd=r,e.combinePaths=o,e.getRandomString=s,e.getGUID=a,e.isFunc=c,e.objectDefinedNotNull=u,e.isArray=h,e.extend=l,e.isUrlAbsolute=p,e.stringIsNullOrEmpty=d,e.getAttrValueFromString=f,e.sanitizeGuid=T}(),function(){function t(){}return t.prototype.fetch=function(t,i){return e.fetch(t,i)},t}()),O=function(e){function t(t){var i=e.call(this)||this;return i._token=t,i}return Object(g.a)(t,e),Object.defineProperty(t.prototype,"token",{get:function(){return this._token},set:function(e){this._token=e},enumerable:!0,configurable:!0}),t.prototype.fetch=function(t,i){void 0===i&&(i={});var n=new Headers;return _(n,i.headers),n.set("Authorization","Bearer "+this._token),i.headers=n,e.prototype.fetch.call(this,t,i)},t}(N),m=(function(e){function t(t,i,n){var r=e.call(this,null)||this;return r.clientId=t,r.tenant=i,r.redirectUri=n,r}Object(g.a)(t,e),t.fromSPFxContext=function(e,i){return void 0===i&&(i="c58637bb-e2e1-4312-8a00-04b5ffcd3403"),new t(i,e.pageContext.aadInfo.tenantId.toString(),o(window.location.origin,"/_forms/spfxsinglesignon.aspx"))},t.prototype.fetch=function(t,i){var n=this;if(!p(t))throw new Error("You must supply absolute urls to AdalClient.fetch.");return this.getToken(this.getResource(t)).then(function(r){return n.token=r,e.prototype.fetch.call(n,t,i)})},t.prototype.getToken=function(e){var i=this;return new Promise(function(n,r){i.ensureAuthContext().then(function(e){return i.login()}).then(function(i){t._authContext.acquireToken(e,function(e,t){if(e)return r(new Error(e));n(t)})}).catch(r)})},t.prototype.ensureAuthContext=function(){var e=this;return new Promise(function(i){null===t._authContext&&(t._authContext=Object(E.inject)({clientId:e.clientId,displayCall:function(t){e._displayCallback&&e._displayCallback(t)},navigateToLoginRequestUrl:!1,redirectUri:e.redirectUri,tenant:e.tenant})),i()})},t.prototype.login=function(){var e=this;return this._loginPromise?this._loginPromise:(this._loginPromise=new Promise(function(i,n){if(t._authContext.getCachedUser())return i();e._displayCallback=function(r){var o=window.open(r,"login","width=483, height=600");if(!o)return n(new Error("Could not open pop-up window for auth. Likely pop-ups are blocked by the browser."));o&&o.focus&&o.focus();var s=window.setInterval(function(){o&&!o.closed&&void 0!==o.closed||window.clearInterval(s);try{-1!==o.document.URL.indexOf(e.redirectUri)&&(window.clearInterval(s),t._authContext.handleWindowCallback(o.location.hash),o.close(),i())}catch(e){n(e)}},30)},e.ensureAuthContext().then(function(i){t._authContext._loginInProgress=!1,t._authContext.login(),e._displayCallback=null})}),this._loginPromise)},t.prototype.getResource=function(e){var t=document.createElement("a");return t.href=e,t.protocol+"//"+t.hostname},t._authContext=null}(O),function(){function e(e,t){void 0===e&&(e=[]),void 0===t&&(t=[]),this.keys=e,this.values=t}return e.prototype.get=function(e){var t=this.keys.indexOf(e);return t<0?null:this.values[t]},e.prototype.add=function(e,t){var i=this.keys.indexOf(e);i>-1?null===t?this.remove(e):this.values[i]=t:null!==t&&(this.keys.push(e),this.values.push(t))},e.prototype.merge=function(e){var t=this;if("getKeys"in e){var i=e;i.getKeys().map(function(e){t.add(e,i.get(e))})}else{var n=e;for(var r in n)n.hasOwnProperty(r)&&this.add(r,n[r])}},e.prototype.remove=function(e){var t=this.keys.indexOf(e);if(t<0)return null;var i=this.values[t];return this.keys.splice(t,1),this.values.splice(t,1),i},e.prototype.getKeys=function(){return this.keys},e.prototype.getValues=function(){return this.values},e.prototype.clear=function(){this.keys=[],this.values=[]},Object.defineProperty(e.prototype,"count",{get:function(){return this.keys.length},enumerable:!0,configurable:!0}),e}()),v=(function(e){function t(t){var i=e.call(this,t)||this;return i.name="UrlException",S.a.log({data:{},level:3,message:"["+i.name+"]::"+i.message}),i}Object(g.a)(t,e)}(Error),function(){function e(){this._v=new m,this._v.add("defaultCachingStore","session"),this._v.add("defaultCachingTimeoutSeconds",60),this._v.add("globalCacheDisable",!1),this._v.add("enableCacheExpiration",!1),this._v.add("cacheExpirationIntervalMilliseconds",750),this._v.add("spfxContext",null)}return e.prototype.extend=function(e){var t=this;Object.keys(e).forEach(function(i){t._v.add(i,e[i])})},e.prototype.get=function(e){return this._v.get(e)},Object.defineProperty(e.prototype,"defaultCachingStore",{get:function(){return this.get("defaultCachingStore")},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"defaultCachingTimeoutSeconds",{get:function(){return this.get("defaultCachingTimeoutSeconds")},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"globalCacheDisable",{get:function(){return this.get("globalCacheDisable")},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"enableCacheExpiration",{get:function(){return this.get("enableCacheExpiration")},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"cacheExpirationIntervalMilliseconds",{get:function(){return this.get("cacheExpirationIntervalMilliseconds")},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"spfxContext",{get:function(){return this.get("spfxContext")},enumerable:!0,configurable:!0}),e}()),R=new v,I=R,y=function(){function e(e,t){void 0===t&&(t=-1),this.store=e,this.defaultTimeoutMinutes=t,this.enabled=this.test(),I.enableCacheExpiration&&(S.a.write("Enabling cache expiration.",1),this.cacheExpirationHandler())}return e.prototype.get=function(e){if(!this.enabled)return null;var t=this.store.getItem(e);if(null==t)return null;var i=JSON.parse(t);return new Date(i.expiration)<=new Date?(S.a.write("Removing item with key '"+e+"' from cache due to expiration.",1),this.delete(e),null):i.value},e.prototype.put=function(e,t,i){this.enabled&&this.store.setItem(e,this.createPersistable(t,i))},e.prototype.delete=function(e){this.enabled&&this.store.removeItem(e)},e.prototype.getOrPut=function(e,t,i){var n=this;return this.enabled?new Promise(function(r){var o=n.get(e);null==o?t().then(function(t){n.put(e,t,i),r(t)}):r(o)}):t()},e.prototype.deleteExpired=function(){var e=this;return new Promise(function(t,i){e.enabled||t();try{for(var n=0;n<e.store.length;n++){var r=e.store.key(n);null!==r&&/["|']?pnp["|']? ?: ?1/i.test(e.store.getItem(r))&&e.get(r)}t()}catch(e){i(e)}})},e.prototype.test=function(){try{return this.store.setItem("test","test"),this.store.removeItem("test"),!0}catch(e){return!1}},e.prototype.createPersistable=function(e,t){if(void 0===t){var i=I.defaultCachingTimeoutSeconds;this.defaultTimeoutMinutes>0&&(i=60*this.defaultTimeoutMinutes),t=r(new Date,"second",i)}return JSON.stringify({pnp:1,expiration:t,value:e})},e.prototype.cacheExpirationHandler=function(){var e=this;S.a.write("Called cache expiration handler.",0),this.deleteExpired().then(function(t){setTimeout(n(e,e.cacheExpirationHandler),I.cacheExpirationIntervalMilliseconds)}).catch(function(e){S.a.log({data:e,level:3,message:"Error deleting expired cache entries, see data for details. Timeout not reset."})})},e}(),A=function(){function e(e){void 0===e&&(e=new m),this._store=e}return Object.defineProperty(e.prototype,"length",{get:function(){return this._store.count},enumerable:!0,configurable:!0}),e.prototype.clear=function(){this._store.clear()},e.prototype.getItem=function(e){return this._store.get(e)},e.prototype.key=function(e){return this._store.getKeys()[e]},e.prototype.removeItem=function(e){this._store.remove(e)},e.prototype.setItem=function(e,t){this._store.add(e,t)},e}(),C=function(){function e(e,t){void 0===e&&(e=null),void 0===t&&(t=null),this._local=e,this._session=t}return Object.defineProperty(e.prototype,"local",{get:function(){return null===this._local&&(this._local=new y("undefined"!=typeof localStorage?localStorage:new A)),this._local},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"session",{get:function(){return null===this._session&&(this._session=new y("undefined"!=typeof sessionStorage?sessionStorage:new A)),this._session},enumerable:!0,configurable:!0}),e}()}).call(t,i(8))},function(e,t,i){"use strict";i.d(t,"a",function(){return r});/**
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.pnp=t():e.pnp=t()}("undefined"!=typeof self?self:this,function(){return function(e){function t(n){if(i[n])return i[n].exports;var r=i[n]={i:n,l:!1,exports:{}};return e[n].call(r.exports,r,r.exports,t),r.l=!0,r.exports}var i={};return t.m=e,t.c=i,t.d=function(e,i,n){t.o(e,i)||Object.defineProperty(e,i,{configurable:!1,enumerable:!0,get:n})},t.n=function(e){var i=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(i,"a",i),i},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=4)}([function(e,t,i){"use strict";(function(e){/**
@license
* @pnp/logging v1.1.4 - pnp - light-weight, subscribable logging framework
* @pnp/common v1.1.5-0 - pnp - provides shared functionality across all pnp libraries
* MIT (https://github.com/pnp/pnpjs/blob/master/LICENSE)

@@ -20,3 +20,3 @@ * Copyright (c) 2018 Microsoft

*/
var n,r=function(){function e(){}return Object.defineProperty(e,"activeLogLevel",{get:function(){return e.instance.activeLogLevel},set:function(t){e.instance.activeLogLevel=t},enumerable:!0,configurable:!0}),Object.defineProperty(e,"instance",{get:function(){return void 0!==e._instance&&null!==e._instance||(e._instance=new o),e._instance},enumerable:!0,configurable:!0}),e.subscribe=function(){for(var t=[],i=0;i<arguments.length;i++)t[i]=arguments[i];t.map(function(t){return e.instance.subscribe(t)})},e.clearSubscribers=function(){return e.instance.clearSubscribers()},Object.defineProperty(e,"count",{get:function(){return e.instance.count},enumerable:!0,configurable:!0}),e.write=function(t,i){void 0===i&&(i=1),e.instance.log({level:i,message:t})},e.writeJSON=function(t,i){void 0===i&&(i=1),e.instance.log({level:i,message:JSON.stringify(t)})},e.log=function(t){e.instance.log(t)},e.error=function(t){e.instance.log({data:t,level:3,message:t.message})},e}(),o=function(){function e(e,t){void 0===e&&(e=2),void 0===t&&(t=[]),this.activeLogLevel=e,this.subscribers=t}return e.prototype.subscribe=function(e){this.subscribers.push(e)},e.prototype.clearSubscribers=function(){var e=this.subscribers.slice(0);return this.subscribers.length=0,e},Object.defineProperty(e.prototype,"count",{get:function(){return this.subscribers.length},enumerable:!0,configurable:!0}),e.prototype.write=function(e,t){void 0===t&&(t=1),this.log({level:t,message:e})},e.prototype.log=function(e){void 0!==e&&this.activeLogLevel<=e.level&&this.subscribers.map(function(t){return t.log(e)})},e}();!function(e){e[e.Verbose=0]="Verbose",e[e.Info=1]="Info",e[e.Warning=2]="Warning",e[e.Error=3]="Error",e[e.Off=99]="Off"}(n||(n={}));(function(){function e(){}e.prototype.log=function(e){var t=this.format(e);switch(e.level){case 0:case 1:console.log(t);break;case 2:console.warn(t);break;case 3:console.error(t)}},e.prototype.format=function(e){var t=[];return t.push("Message: "+e.message),void 0!==e.data&&t.push(" Data: "+JSON.stringify(e.data)),t.join("")}})(),function(){function e(e){this.method=e}e.prototype.log=function(e){this.method(e)}}()},function(e,t,i){"use strict";function n(e,t){function i(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)}t.a=n;/*! *****************************************************************************
function n(e,t){for(var i=[],n=2;n<arguments.length;n++)i[n-2]=arguments[n];return function(){t.apply(e,i)}}function r(e,t,i){var n=new Date(e);switch(t.toLowerCase()){case"year":n.setFullYear(n.getFullYear()+i);break;case"quarter":n.setMonth(n.getMonth()+3*i);break;case"month":n.setMonth(n.getMonth()+i);break;case"week":n.setDate(n.getDate()+7*i);break;case"day":n.setDate(n.getDate()+i);break;case"hour":n.setTime(n.getTime()+36e5*i);break;case"minute":n.setTime(n.getTime()+6e4*i);break;case"second":n.setTime(n.getTime()+1e3*i);break;default:n=void 0}return n}function o(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e.filter(function(e){return!a(e)}).map(function(e){return e.replace(/^[\\|\/]/,"").replace(/[\\|\/]$/,"")}).join("/").replace(/\\/g,"/")}function s(e){return/^https?:\/\/|^\/\//i.test(e)}function a(e){return void 0===e||null===e||e.length<1}function c(e){return JSON.stringify(e)}function u(e,t){if(void 0!==t&&null!==t){new Request("",{headers:t}).headers.forEach(function(t,i){e.append(i,t)})}}function h(e){return void 0!==e&&null!==e?new Map(_(e)):new Map}function l(e){for(var t=[],i=1;i<arguments.length;i++)t[i-1]=arguments[i];for(var n=0;n<t.length;n++)t[n].forEach(function(t,i){e.set(i,t)});return e}i.d(t,"d",function(){return h}),i.d(t,"c",function(){return l}),i.d(t,"a",function(){return m}),i.d(t,"b",function(){return c});var p=i(1),d=i(8),T=(i.n(d),function(){function t(){}return t.prototype.fetch=function(t,i){return e.fetch(t,i)},t}()),f=function(e){function t(t){var i=e.call(this)||this;return i._token=t,i}return Object(p.a)(t,e),Object.defineProperty(t.prototype,"token",{get:function(){return this._token},set:function(e){this._token=e},enumerable:!0,configurable:!0}),t.prototype.fetch=function(t,i){void 0===i&&(i={});var n=new Headers;return u(n,i.headers),n.set("Authorization","Bearer "+this._token),i.headers=n,e.prototype.fetch.call(this,t,i)},t}(T),_=(function(e){function t(t,i,n){var r=e.call(this,null)||this;return r.clientId=t,r.tenant=i,r.redirectUri=n,r}Object(p.a)(t,e),t.fromSPFxContext=function(e,i){return void 0===i&&(i="c58637bb-e2e1-4312-8a00-04b5ffcd3403"),new t(i,e.pageContext.aadInfo.tenantId.toString(),o(window.location.origin,"/_forms/spfxsinglesignon.aspx"))},t.prototype.fetch=function(t,i){var n=this;if(!s(t))throw new Error("You must supply absolute urls to AdalClient.fetch.");return this.getToken(this.getResource(t)).then(function(r){return n.token=r,e.prototype.fetch.call(n,t,i)})},t.prototype.getToken=function(e){var i=this;return new Promise(function(n,r){i.ensureAuthContext().then(function(e){return i.login()}).then(function(i){t._authContext.acquireToken(e,function(e,t){if(e)return r(new Error(e));n(t)})}).catch(r)})},t.prototype.ensureAuthContext=function(){var e=this;return new Promise(function(i){null===t._authContext&&(t._authContext=Object(d.inject)({clientId:e.clientId,displayCall:function(t){e._displayCallback&&e._displayCallback(t)},navigateToLoginRequestUrl:!1,redirectUri:e.redirectUri,tenant:e.tenant})),i()})},t.prototype.login=function(){var e=this;return this._loginPromise?this._loginPromise:(this._loginPromise=new Promise(function(i,n){if(t._authContext.getCachedUser())return i();e._displayCallback=function(r){var o=window.open(r,"login","width=483, height=600");if(!o)return n(new Error("Could not open pop-up window for auth. Likely pop-ups are blocked by the browser."));o&&o.focus&&o.focus();var s=window.setInterval(function(){o&&!o.closed&&void 0!==o.closed||window.clearInterval(s);try{-1!==o.document.URL.indexOf(e.redirectUri)&&(window.clearInterval(s),t._authContext.handleWindowCallback(o.location.hash),o.close(),i())}catch(e){n(e)}},30)},e.ensureAuthContext().then(function(i){t._authContext._loginInProgress=!1,t._authContext.login(),e._displayCallback=null})}),this._loginPromise)},t.prototype.getResource=function(e){var t=document.createElement("a");return t.href=e,t.protocol+"//"+t.hostname},t._authContext=null}(f),function(e){return"function"==typeof e}(Object.entries)?Object.entries:function(e){return Object.keys(e).map(function(t){return[t,e[t]]})}),S=["defaultCachingStore","defaultCachingTimeoutSeconds","globalCacheDisable","enableCacheExpiration","cacheExpirationIntervalMilliseconds","spfxContext"],E=function(){function e(e){void 0===e&&(e=new Map),this._v=e,this._v.set(S[0],"session"),this._v.set(S[1],60),this._v.set(S[2],!1),this._v.set(S[3],!1),this._v.set(S[4],750),this._v.set(S[5],null)}return e.prototype.extend=function(e){this._v=l(this._v,h(e))},e.prototype.get=function(e){return this._v.get(e)},Object.defineProperty(e.prototype,"defaultCachingStore",{get:function(){return this.get(S[0])},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"defaultCachingTimeoutSeconds",{get:function(){return this.get(S[1])},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"globalCacheDisable",{get:function(){return this.get(S[2])},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"enableCacheExpiration",{get:function(){return this.get(S[3])},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"cacheExpirationIntervalMilliseconds",{get:function(){return this.get(S[4])},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"spfxContext",{get:function(){return this.get(S[5])},enumerable:!0,configurable:!0}),e}(),g=new E,O=g,N=function(){function e(e,t){void 0===t&&(t=-1),this.store=e,this.defaultTimeoutMinutes=t,this.enabled=this.test(),O.enableCacheExpiration&&this.cacheExpirationHandler()}return e.prototype.get=function(e){if(!this.enabled)return null;var t=this.store.getItem(e);if(void 0===t)return null;var i=JSON.parse(t);return new Date(i.expiration)<=new Date?(this.delete(e),null):i.value},e.prototype.put=function(e,t,i){this.enabled&&this.store.setItem(e,this.createPersistable(t,i))},e.prototype.delete=function(e){this.enabled&&this.store.removeItem(e)},e.prototype.getOrPut=function(e,t,i){var n=this;return this.enabled?new Promise(function(r){var o=n.get(e);null==o?t().then(function(t){n.put(e,t,i),r(t)}):r(o)}):t()},e.prototype.deleteExpired=function(){var e=this;return new Promise(function(t,i){e.enabled||t();try{for(var n=0;n<e.store.length;n++){var r=e.store.key(n);null!==r&&/["|']?pnp["|']? ?: ?1/i.test(e.store.getItem(r))&&e.get(r)}t()}catch(e){i(e)}})},e.prototype.test=function(){try{return this.store.setItem("t","t"),this.store.removeItem("t"),!0}catch(e){return!1}},e.prototype.createPersistable=function(e,t){if(void 0===t){var i=O.defaultCachingTimeoutSeconds;this.defaultTimeoutMinutes>0&&(i=60*this.defaultTimeoutMinutes),t=r(new Date,"second",i)}return c({pnp:1,expiration:t,value:e})},e.prototype.cacheExpirationHandler=function(){var e=this;this.deleteExpired().then(function(t){setTimeout(n(e,e.cacheExpirationHandler),O.cacheExpirationIntervalMilliseconds)}).catch(function(e){console.error(e)})},e}(),R=function(){function e(e){void 0===e&&(e=new Map),this._store=e}return Object.defineProperty(e.prototype,"length",{get:function(){return this._store.size},enumerable:!0,configurable:!0}),e.prototype.clear=function(){this._store.clear()},e.prototype.getItem=function(e){return this._store.get(e)},e.prototype.key=function(e){return Array.from(this._store)[e][0]},e.prototype.removeItem=function(e){this._store.delete(e)},e.prototype.setItem=function(e,t){this._store.set(e,t)},e}(),m=function(){function e(e,t){void 0===e&&(e=null),void 0===t&&(t=null),this._local=e,this._session=t}return Object.defineProperty(e.prototype,"local",{get:function(){return null===this._local&&(this._local=this.getStore(localStorage)),this._local},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"session",{get:function(){return null===this._session&&(this._session=this.getStore(sessionStorage)),this._session},enumerable:!0,configurable:!0}),e.prototype.getStore=function(e){return new N(void 0!==e?e:new R)},e}()}).call(t,i(7))},function(e,t,i){"use strict";function n(e,t){function i(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)}t.a=n;/*! *****************************************************************************
Copyright (c) Microsoft Corporation. All rights reserved.

@@ -35,5 +35,13 @@ Licensed under the Apache License, Version 2.0 (the "License"); you may not use

***************************************************************************** */
var r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(e,t)}},function(e,t,i){"use strict";var n=i(0),r=i(4),o=function(){function e(e,t,i){this.wrappedProvider=e,this.cacheKey=t,this.wrappedProvider=e,this.store=i||this.selectPnPCache()}return e.prototype.getWrappedProvider=function(){return this.wrappedProvider},e.prototype.getConfiguration=function(){var e=this;return this.store&&this.store.enabled?this.store.getOrPut(this.cacheKey,function(){return e.wrappedProvider.getConfiguration().then(function(t){return e.store.put(e.cacheKey,t),t})}):this.wrappedProvider.getConfiguration()},e.prototype.selectPnPCache=function(){var e=new n.b;if(e.local&&e.local.enabled)return e.local;if(e.session&&e.session.enabled)return e.session;throw new r.a},e}();t.a=o},function(e,t,i){"use strict";i.d(t,"a",function(){return o});var n=i(2),r=i(1),o=function(e){function t(t){void 0===t&&(t="Cannot create a caching configuration provider since cache is not available.");var i=e.call(this,t)||this;return i.name="NoCacheAvailableException",r.a.log({data:{},level:3,message:"["+i.name+"]::"+i.message}),i}return n.a(t,e),t}(Error)},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(6);i.d(t,"Settings",function(){return n.d}),i.d(t,"CachingConfigurationProvider",function(){return n.a}),i.d(t,"SPListConfigurationProvider",function(){return n.c}),i.d(t,"NoCacheAvailableException",function(){return n.b})},function(e,t,i){"use strict";var n=i(7);i.d(t,"d",function(){return n.a});var r=i(10);i.d(t,"a",function(){return r.a}),i.d(t,"c",function(){return r.b});var o=i(4);i.d(t,"b",function(){return o.a})},function(e,t,i){"use strict";i.d(t,"a",function(){return r});var n=i(0),r=function(){function e(){this._settings=new n.a}return e.prototype.add=function(e,t){this._settings.add(e,t)},e.prototype.addJSON=function(e,t){this._settings.add(e,JSON.stringify(t))},e.prototype.apply=function(e){var t=this;return new Promise(function(i,n){try{t._settings.merge(e),i()}catch(e){n(e)}})},e.prototype.load=function(e){var t=this;return new Promise(function(i,n){e.getConfiguration().then(function(e){t._settings.merge(e),i()}).catch(n)})},e.prototype.get=function(e){return this._settings.get(e)},e.prototype.getJSON=function(e){var t=this.get(e);return void 0===t||null===t?t:JSON.parse(t)},e}()},function(e,t){var i;i=function(){return this}();try{i=i||Function("return this")()||(0,eval)("this")}catch(e){"object"==typeof window&&(i=window)}e.exports=i},function(e,t){
// @preserve Copyright (c) Microsoft Open Technologies, Inc.
var i=function(){"use strict";return i=function(e){if(this.REQUEST_TYPE={LOGIN:"LOGIN",RENEW_TOKEN:"RENEW_TOKEN",UNKNOWN:"UNKNOWN"},this.RESPONSE_TYPE={ID_TOKEN_TOKEN:"id_token token",TOKEN:"token"},this.CONSTANTS={ACCESS_TOKEN:"access_token",EXPIRES_IN:"expires_in",ID_TOKEN:"id_token",ERROR_DESCRIPTION:"error_description",SESSION_STATE:"session_state",ERROR:"error",STORAGE:{TOKEN_KEYS:"adal.token.keys",ACCESS_TOKEN_KEY:"adal.access.token.key",EXPIRATION_KEY:"adal.expiration.key",STATE_LOGIN:"adal.state.login",STATE_RENEW:"adal.state.renew",NONCE_IDTOKEN:"adal.nonce.idtoken",SESSION_STATE:"adal.session.state",USERNAME:"adal.username",IDTOKEN:"adal.idtoken",ERROR:"adal.error",ERROR_DESCRIPTION:"adal.error.description",LOGIN_REQUEST:"adal.login.request",LOGIN_ERROR:"adal.login.error",RENEW_STATUS:"adal.token.renew.status",ANGULAR_LOGIN_REQUEST:"adal.angular.login.request"},RESOURCE_DELIMETER:"|",CACHE_DELIMETER:"||",LOADFRAME_TIMEOUT:6e3,TOKEN_RENEW_STATUS_CANCELED:"Canceled",TOKEN_RENEW_STATUS_COMPLETED:"Completed",TOKEN_RENEW_STATUS_IN_PROGRESS:"In Progress",LOGGING_LEVEL:{ERROR:0,WARN:1,INFO:2,VERBOSE:3},LEVEL_STRING_MAP:{0:"ERROR:",1:"WARNING:",2:"INFO:",3:"VERBOSE:"},POPUP_WIDTH:483,POPUP_HEIGHT:600},i.prototype._singletonInstance)return i.prototype._singletonInstance;if(i.prototype._singletonInstance=this,this.instance="https://login.microsoftonline.com/",this.config={},this.callback=null,this.popUp=!1,this.isAngular=!1,this._user=null,this._activeRenewals={},this._loginInProgress=!1,this._acquireTokenInProgress=!1,this._renewStates=[],this._callBackMappedToRenewStates={},this._callBacksMappedToRenewStates={},this._openedWindows=[],this._requestType=this.REQUEST_TYPE.LOGIN,window._adalInstance=this,e.displayCall&&"function"!=typeof e.displayCall)throw new Error("displayCall is not a function");if(!e.clientId)throw new Error("clientId is required");this.config=this._cloneConfig(e),void 0===this.config.navigateToLoginRequestUrl&&(this.config.navigateToLoginRequestUrl=!0),this.config.popUp&&(this.popUp=!0),this.config.callback&&"function"==typeof this.config.callback&&(this.callback=this.config.callback),this.config.instance&&(this.instance=this.config.instance),this.config.loginResource||(this.config.loginResource=this.config.clientId),this.config.redirectUri||(this.config.redirectUri=window.location.href.split("?")[0].split("#")[0]),this.config.postLogoutRedirectUri||(this.config.postLogoutRedirectUri=window.location.href.split("?")[0].split("#")[0]),this.config.anonymousEndpoints||(this.config.anonymousEndpoints=[]),this.config.isAngular&&(this.isAngular=this.config.isAngular),this.config.loadFrameTimeout&&(this.CONSTANTS.LOADFRAME_TIMEOUT=this.config.loadFrameTimeout)},"undefined"!=typeof window&&(window.Logging={piiLoggingEnabled:!1,level:0,log:function(e){}}),i.prototype.login=function(){if(this._loginInProgress)return void this.info("Login in progress");this._loginInProgress=!0;var e=this._guid();this.config.state=e,this._idTokenNonce=this._guid();var t=this._getItem(this.CONSTANTS.STORAGE.ANGULAR_LOGIN_REQUEST);t&&""!==t?this._saveItem(this.CONSTANTS.STORAGE.ANGULAR_LOGIN_REQUEST,""):t=window.location.href,this.verbose("Expected state: "+e+" startPage:"+t),this._saveItem(this.CONSTANTS.STORAGE.LOGIN_REQUEST,t),this._saveItem(this.CONSTANTS.STORAGE.LOGIN_ERROR,""),this._saveItem(this.CONSTANTS.STORAGE.STATE_LOGIN,e,!0),this._saveItem(this.CONSTANTS.STORAGE.NONCE_IDTOKEN,this._idTokenNonce,!0),this._saveItem(this.CONSTANTS.STORAGE.ERROR,""),this._saveItem(this.CONSTANTS.STORAGE.ERROR_DESCRIPTION,"");var i=this._getNavigateUrl("id_token",null)+"&nonce="+encodeURIComponent(this._idTokenNonce);this.config.displayCall?this.config.displayCall(i):this.popUp?(this._saveItem(this.CONSTANTS.STORAGE.STATE_LOGIN,""),this._renewStates.push(e),this.registerCallback(e,this.config.clientId,this.callback),this._loginPopup(i)):this.promptUser(i)},i.prototype._openPopup=function(e,t,i,n){try{var r=window.screenLeft?window.screenLeft:window.screenX,o=window.screenTop?window.screenTop:window.screenY,s=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,a=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight,c=s/2-i/2+r,u=a/2-n/2+o,h=window.open(e,t,"width="+i+", height="+n+", top="+u+", left="+c);return h.focus&&h.focus(),h}catch(e){return this.warn("Error opening popup, "+e.message),this._loginInProgress=!1,this._acquireTokenInProgress=!1,null}},i.prototype._handlePopupError=function(e,t,i,n,r){this.warn(n),this._saveItem(this.CONSTANTS.STORAGE.ERROR,i),this._saveItem(this.CONSTANTS.STORAGE.ERROR_DESCRIPTION,n),this._saveItem(this.CONSTANTS.STORAGE.LOGIN_ERROR,r),t&&this._activeRenewals[t]&&(this._activeRenewals[t]=null),this._loginInProgress=!1,this._acquireTokenInProgress=!1,e&&e(n,null,i)},i.prototype._loginPopup=function(e,t,i){var n=this._openPopup(e,"login",this.CONSTANTS.POPUP_WIDTH,this.CONSTANTS.POPUP_HEIGHT),r=i||this.callback;if(null==n){var o="Popup Window is null. This can happen if you are using IE";return void this._handlePopupError(r,t,"Error opening popup",o,o)}if(this._openedWindows.push(n),-1!=this.config.redirectUri.indexOf("#"))var s=this.config.redirectUri.split("#")[0];else var s=this.config.redirectUri;var a=this,c=window.setInterval(function(){if(!n||n.closed||void 0===n.closed){var e="Popup Window closed",i="Popup Window closed by UI action/ Popup Window handle destroyed due to cross zone navigation in IE/Edge";return a.isAngular&&a._broadcast("adal:popUpClosed",i+a.CONSTANTS.RESOURCE_DELIMETER+e),a._handlePopupError(r,t,e,i,i),void window.clearInterval(c)}try{var o=n.location;if(-1!=encodeURI(o.href).indexOf(encodeURI(s)))return a.isAngular?a._broadcast("adal:popUpHashChanged",o.hash):a.handleWindowCallback(o.hash),window.clearInterval(c),a._loginInProgress=!1,a._acquireTokenInProgress=!1,a.info("Closing popup window"),a._openedWindows=[],void n.close()}catch(e){}},1)},i.prototype._broadcast=function(e,t){!function(){function e(e,t){t=t||{bubbles:!1,cancelable:!1,detail:void 0};var i=document.createEvent("CustomEvent");return i.initCustomEvent(e,t.bubbles,t.cancelable,t.detail),i}if("function"==typeof window.CustomEvent)return!1;e.prototype=window.Event.prototype,window.CustomEvent=e}();var i=new CustomEvent(e,{detail:t});window.dispatchEvent(i)},i.prototype.loginInProgress=function(){return this._loginInProgress},i.prototype._hasResource=function(e){var t=this._getItem(this.CONSTANTS.STORAGE.TOKEN_KEYS);return t&&!this._isEmpty(t)&&t.indexOf(e+this.CONSTANTS.RESOURCE_DELIMETER)>-1},i.prototype.getCachedToken=function(e){if(!this._hasResource(e))return null;var t=this._getItem(this.CONSTANTS.STORAGE.ACCESS_TOKEN_KEY+e),i=this._getItem(this.CONSTANTS.STORAGE.EXPIRATION_KEY+e),n=this.config.expireOffsetSeconds||300;return i&&i>this._now()+n?t:(this._saveItem(this.CONSTANTS.STORAGE.ACCESS_TOKEN_KEY+e,""),this._saveItem(this.CONSTANTS.STORAGE.EXPIRATION_KEY+e,0),null)},i.prototype.getCachedUser=function(){if(this._user)return this._user;var e=this._getItem(this.CONSTANTS.STORAGE.IDTOKEN);return this._user=this._createUser(e),this._user},i.prototype.registerCallback=function(e,t,i){this._activeRenewals[t]=e,this._callBacksMappedToRenewStates[e]||(this._callBacksMappedToRenewStates[e]=[]);var n=this;this._callBacksMappedToRenewStates[e].push(i),this._callBackMappedToRenewStates[e]||(this._callBackMappedToRenewStates[e]=function(i,r,o,s){n._activeRenewals[t]=null;for(var a=0;a<n._callBacksMappedToRenewStates[e].length;++a)try{n._callBacksMappedToRenewStates[e][a](i,r,o,s)}catch(o){n.warn(o)}n._callBacksMappedToRenewStates[e]=null,n._callBackMappedToRenewStates[e]=null})},i.prototype._renewToken=function(e,t,i){this.info("renewToken is called for resource:"+e);var n=this._addAdalFrame("adalRenewFrame"+e),r=this._guid()+"|"+e;this.config.state=r,this._renewStates.push(r),this.verbose("Renew token Expected state: "+r),i=i||"token";var o=this._urlRemoveQueryStringParameter(this._getNavigateUrl(i,e),"prompt");i===this.RESPONSE_TYPE.ID_TOKEN_TOKEN&&(this._idTokenNonce=this._guid(),this._saveItem(this.CONSTANTS.STORAGE.NONCE_IDTOKEN,this._idTokenNonce,!0),o+="&nonce="+encodeURIComponent(this._idTokenNonce)),o+="&prompt=none",o=this._addHintParameters(o),this.registerCallback(r,e,t),this.verbosePii("Navigate to:"+o),n.src="about:blank",this._loadFrameTimeout(o,"adalRenewFrame"+e,e)},i.prototype._renewIdToken=function(e,t){this.info("renewIdToken is called");var i=this._addAdalFrame("adalIdTokenFrame"),n=this._guid()+"|"+this.config.clientId;this._idTokenNonce=this._guid(),this._saveItem(this.CONSTANTS.STORAGE.NONCE_IDTOKEN,this._idTokenNonce,!0),this.config.state=n,this._renewStates.push(n),this.verbose("Renew Idtoken Expected state: "+n);var r=null===t||void 0===t?null:this.config.clientId,t=t||"id_token",o=this._urlRemoveQueryStringParameter(this._getNavigateUrl(t,r),"prompt");o+="&prompt=none",o=this._addHintParameters(o),o+="&nonce="+encodeURIComponent(this._idTokenNonce),this.registerCallback(n,this.config.clientId,e),this.verbosePii("Navigate to:"+o),i.src="about:blank",this._loadFrameTimeout(o,"adalIdTokenFrame",this.config.clientId)},i.prototype._urlContainsQueryStringParameter=function(e,t){return new RegExp("[\\?&]"+e+"=").test(t)},i.prototype._urlRemoveQueryStringParameter=function(e,t){var i=new RegExp("(\\&"+t+"=)[^&]+");return e=e.replace(i,""),i=new RegExp("("+t+"=)[^&]+&"),e=e.replace(i,""),i=new RegExp("("+t+"=)[^&]+"),e=e.replace(i,"")},i.prototype._loadFrameTimeout=function(e,t,i){this.verbose("Set loading state to pending for: "+i),this._saveItem(this.CONSTANTS.STORAGE.RENEW_STATUS+i,this.CONSTANTS.TOKEN_RENEW_STATUS_IN_PROGRESS),this._loadFrame(e,t);var n=this;setTimeout(function(){if(n._getItem(n.CONSTANTS.STORAGE.RENEW_STATUS+i)===n.CONSTANTS.TOKEN_RENEW_STATUS_IN_PROGRESS){n.verbose("Loading frame has timed out after: "+n.CONSTANTS.LOADFRAME_TIMEOUT/1e3+" seconds for resource "+i);var e=n._activeRenewals[i];e&&n._callBackMappedToRenewStates[e]&&n._callBackMappedToRenewStates[e]("Token renewal operation failed due to timeout",null,"Token Renewal Failed"),n._saveItem(n.CONSTANTS.STORAGE.RENEW_STATUS+i,n.CONSTANTS.TOKEN_RENEW_STATUS_CANCELED)}},n.CONSTANTS.LOADFRAME_TIMEOUT)},i.prototype._loadFrame=function(e,t){var i=this;i.info("LoadFrame: "+t);var n=t;setTimeout(function(){var t=i._addAdalFrame(n);""!==t.src&&"about:blank"!==t.src||(t.src=e,i._loadFrame(e,n))},500)},i.prototype.acquireToken=function(e,t){if(this._isEmpty(e))return this.warn("resource is required"),void t("resource is required",null,"resource is required");var i=this.getCachedToken(e);return i?(this.info("Token is already in cache for resource:"+e),void t(null,i,null)):this._user||this.config.extraQueryParameter&&-1!==this.config.extraQueryParameter.indexOf("login_hint")?void(this._activeRenewals[e]?this.registerCallback(this._activeRenewals[e],e,t):(this._requestType=this.REQUEST_TYPE.RENEW_TOKEN,e===this.config.clientId?this._user?(this.verbose("renewing idtoken"),this._renewIdToken(t)):(this.verbose("renewing idtoken and access_token"),this._renewIdToken(t,this.RESPONSE_TYPE.ID_TOKEN_TOKEN)):this._user?(this.verbose("renewing access_token"),this._renewToken(e,t)):(this.verbose("renewing idtoken and access_token"),this._renewToken(e,t,this.RESPONSE_TYPE.ID_TOKEN_TOKEN)))):(this.warn("User login is required"),void t("User login is required",null,"login required"))},i.prototype.acquireTokenPopup=function(e,t,i,n){if(this._isEmpty(e))return this.warn("resource is required"),void n("resource is required",null,"resource is required");if(!this._user)return this.warn("User login is required"),void n("User login is required",null,"login required");if(this._acquireTokenInProgress)return this.warn("Acquire token interactive is already in progress"),void n("Acquire token interactive is already in progress",null,"Acquire token interactive is already in progress");var r=this._guid()+"|"+e;this.config.state=r,this._renewStates.push(r),this._requestType=this.REQUEST_TYPE.RENEW_TOKEN,this.verbose("Renew token Expected state: "+r);var o=this._urlRemoveQueryStringParameter(this._getNavigateUrl("token",e),"prompt");if(o+="&prompt=select_account",t&&(o+=t),i&&-1===o.indexOf("&claims"))o+="&claims="+encodeURIComponent(i);else if(i&&-1!==o.indexOf("&claims"))throw new Error("Claims cannot be passed as an extraQueryParameter");o=this._addHintParameters(o),this._acquireTokenInProgress=!0,this.info("acquireToken interactive is called for the resource "+e),this.registerCallback(r,e,n),this._loginPopup(o,e,n)},i.prototype.acquireTokenRedirect=function(e,t,i){if(this._isEmpty(e))return this.warn("resource is required"),void n("resource is required",null,"resource is required");var n=this.callback;if(!this._user)return this.warn("User login is required"),void n("User login is required",null,"login required");if(this._acquireTokenInProgress)return this.warn("Acquire token interactive is already in progress"),void n("Acquire token interactive is already in progress",null,"Acquire token interactive is already in progress");var r=this._guid()+"|"+e;this.config.state=r,this.verbose("Renew token Expected state: "+r);var o=this._urlRemoveQueryStringParameter(this._getNavigateUrl("token",e),"prompt");if(o+="&prompt=select_account",t&&(o+=t),i&&-1===o.indexOf("&claims"))o+="&claims="+encodeURIComponent(i);else if(i&&-1!==o.indexOf("&claims"))throw new Error("Claims cannot be passed as an extraQueryParameter");o=this._addHintParameters(o),this._acquireTokenInProgress=!0,this.info("acquireToken interactive is called for the resource "+e),this._saveItem(this.CONSTANTS.STORAGE.LOGIN_REQUEST,window.location.href),this._saveItem(this.CONSTANTS.STORAGE.STATE_RENEW,r,!0),this.promptUser(o)},i.prototype.promptUser=function(e){e?(this.infoPii("Navigate to:"+e),window.location.replace(e)):this.info("Navigate url is empty")},i.prototype.clearCache=function(){this._saveItem(this.CONSTANTS.STORAGE.LOGIN_REQUEST,""),this._saveItem(this.CONSTANTS.STORAGE.ANGULAR_LOGIN_REQUEST,""),this._saveItem(this.CONSTANTS.STORAGE.SESSION_STATE,""),this._saveItem(this.CONSTANTS.STORAGE.STATE_LOGIN,""),this._saveItem(this.CONSTANTS.STORAGE.STATE_RENEW,""),this._renewStates=[],this._saveItem(this.CONSTANTS.STORAGE.NONCE_IDTOKEN,""),this._saveItem(this.CONSTANTS.STORAGE.IDTOKEN,""),this._saveItem(this.CONSTANTS.STORAGE.ERROR,""),this._saveItem(this.CONSTANTS.STORAGE.ERROR_DESCRIPTION,""),this._saveItem(this.CONSTANTS.STORAGE.LOGIN_ERROR,""),this._saveItem(this.CONSTANTS.STORAGE.LOGIN_ERROR,"");var e=this._getItem(this.CONSTANTS.STORAGE.TOKEN_KEYS);if(!this._isEmpty(e)){e=e.split(this.CONSTANTS.RESOURCE_DELIMETER);for(var t=0;t<e.length&&""!==e[t];t++)this._saveItem(this.CONSTANTS.STORAGE.ACCESS_TOKEN_KEY+e[t],""),this._saveItem(this.CONSTANTS.STORAGE.EXPIRATION_KEY+e[t],0)}this._saveItem(this.CONSTANTS.STORAGE.TOKEN_KEYS,"")},i.prototype.clearCacheForResource=function(e){this._saveItem(this.CONSTANTS.STORAGE.STATE_RENEW,""),this._saveItem(this.CONSTANTS.STORAGE.ERROR,""),this._saveItem(this.CONSTANTS.STORAGE.ERROR_DESCRIPTION,""),this._hasResource(e)&&(this._saveItem(this.CONSTANTS.STORAGE.ACCESS_TOKEN_KEY+e,""),this._saveItem(this.CONSTANTS.STORAGE.EXPIRATION_KEY+e,0))},i.prototype.logOut=function(){this.clearCache(),this._user=null;var e;if(this.config.logOutUri)e=this.config.logOutUri;else{var t="common",i="";this.config.tenant&&(t=this.config.tenant),this.config.postLogoutRedirectUri&&(i="post_logout_redirect_uri="+encodeURIComponent(this.config.postLogoutRedirectUri)),e=this.instance+t+"/oauth2/logout?"+i}this.infoPii("Logout navigate to: "+e),this.promptUser(e)},i.prototype._isEmpty=function(e){return void 0===e||!e||0===e.length},i.prototype.getUser=function(e){if("function"!=typeof e)throw new Error("callback is not a function");if(this._user)return void e(null,this._user);var t=this._getItem(this.CONSTANTS.STORAGE.IDTOKEN);this._isEmpty(t)?(this.warn("User information is not available"),e("User information is not available",null)):(this.info("User exists in cache: "),this._user=this._createUser(t),e(null,this._user))},i.prototype._addHintParameters=function(e){if(this._user&&this._user.profile)if(this._user.profile.sid&&-1!==e.indexOf("&prompt=none"))this._urlContainsQueryStringParameter("sid",e)||(e+="&sid="+encodeURIComponent(this._user.profile.sid));else if(this._user.profile.upn&&(this._urlContainsQueryStringParameter("login_hint",e)||(e+="&login_hint="+encodeURIComponent(this._user.profile.upn)),!this._urlContainsQueryStringParameter("domain_hint",e)&&this._user.profile.upn.indexOf("@")>-1)){var t=this._user.profile.upn.split("@");e+="&domain_hint="+encodeURIComponent(t[t.length-1])}return e},i.prototype._createUser=function(e){var t=null,i=this._extractIdToken(e);return i&&i.hasOwnProperty("aud")&&(i.aud.toLowerCase()===this.config.clientId.toLowerCase()?(t={userName:"",profile:i},i.hasOwnProperty("upn")?t.userName=i.upn:i.hasOwnProperty("email")&&(t.userName=i.email)):this.warn("IdToken has invalid aud field")),t},i.prototype._getHash=function(e){return e.indexOf("#/")>-1?e=e.substring(e.indexOf("#/")+2):e.indexOf("#")>-1&&(e=e.substring(1)),e},i.prototype.isCallback=function(e){e=this._getHash(e);var t=this._deserialize(e);return t.hasOwnProperty(this.CONSTANTS.ERROR_DESCRIPTION)||t.hasOwnProperty(this.CONSTANTS.ACCESS_TOKEN)||t.hasOwnProperty(this.CONSTANTS.ID_TOKEN)},i.prototype.getLoginError=function(){return this._getItem(this.CONSTANTS.STORAGE.LOGIN_ERROR)},i.prototype.getRequestInfo=function(e){e=this._getHash(e);var t=this._deserialize(e),i={valid:!1,parameters:{},stateMatch:!1,stateResponse:"",requestType:this.REQUEST_TYPE.UNKNOWN};if(t&&(i.parameters=t,t.hasOwnProperty(this.CONSTANTS.ERROR_DESCRIPTION)||t.hasOwnProperty(this.CONSTANTS.ACCESS_TOKEN)||t.hasOwnProperty(this.CONSTANTS.ID_TOKEN))){i.valid=!0;var n="";if(!t.hasOwnProperty("state"))return this.warn("No state returned"),i;if(this.verbose("State: "+t.state),n=t.state,i.stateResponse=n,this._matchState(i))return i;if(!i.stateMatch&&window.parent){i.requestType=this._requestType;for(var r=this._renewStates,o=0;o<r.length;o++)if(r[o]===i.stateResponse){i.stateMatch=!0;break}}}return i},i.prototype._matchNonce=function(e){var t=this._getItem(this.CONSTANTS.STORAGE.NONCE_IDTOKEN);if(t){t=t.split(this.CONSTANTS.CACHE_DELIMETER);for(var i=0;i<t.length;i++)if(t[i]===e.profile.nonce)return!0}return!1},i.prototype._matchState=function(e){var t=this._getItem(this.CONSTANTS.STORAGE.STATE_LOGIN);if(t){t=t.split(this.CONSTANTS.CACHE_DELIMETER);for(var i=0;i<t.length;i++)if(t[i]===e.stateResponse)return e.requestType=this.REQUEST_TYPE.LOGIN,e.stateMatch=!0,!0}var n=this._getItem(this.CONSTANTS.STORAGE.STATE_RENEW);if(n){n=n.split(this.CONSTANTS.CACHE_DELIMETER);for(var i=0;i<n.length;i++)if(n[i]===e.stateResponse)return e.requestType=this.REQUEST_TYPE.RENEW_TOKEN,e.stateMatch=!0,!0}return!1},i.prototype._getResourceFromState=function(e){if(e){var t=e.indexOf("|");if(t>-1&&t+1<e.length)return e.substring(t+1)}return""},i.prototype.saveTokenFromHash=function(e){this.info("State status:"+e.stateMatch+"; Request type:"+e.requestType),this._saveItem(this.CONSTANTS.STORAGE.ERROR,""),this._saveItem(this.CONSTANTS.STORAGE.ERROR_DESCRIPTION,"");var t=this._getResourceFromState(e.stateResponse);if(e.parameters.hasOwnProperty(this.CONSTANTS.ERROR_DESCRIPTION))this.infoPii("Error :"+e.parameters.error+"; Error description:"+e.parameters[this.CONSTANTS.ERROR_DESCRIPTION]),this._saveItem(this.CONSTANTS.STORAGE.ERROR,e.parameters.error),this._saveItem(this.CONSTANTS.STORAGE.ERROR_DESCRIPTION,e.parameters[this.CONSTANTS.ERROR_DESCRIPTION]),e.requestType===this.REQUEST_TYPE.LOGIN&&(this._loginInProgress=!1,this._saveItem(this.CONSTANTS.STORAGE.LOGIN_ERROR,e.parameters.error_description));else if(e.stateMatch){this.info("State is right"),e.parameters.hasOwnProperty(this.CONSTANTS.SESSION_STATE)&&this._saveItem(this.CONSTANTS.STORAGE.SESSION_STATE,e.parameters[this.CONSTANTS.SESSION_STATE]);var i;e.parameters.hasOwnProperty(this.CONSTANTS.ACCESS_TOKEN)&&(this.info("Fragment has access token"),this._hasResource(t)||(i=this._getItem(this.CONSTANTS.STORAGE.TOKEN_KEYS)||"",this._saveItem(this.CONSTANTS.STORAGE.TOKEN_KEYS,i+t+this.CONSTANTS.RESOURCE_DELIMETER)),this._saveItem(this.CONSTANTS.STORAGE.ACCESS_TOKEN_KEY+t,e.parameters[this.CONSTANTS.ACCESS_TOKEN]),this._saveItem(this.CONSTANTS.STORAGE.EXPIRATION_KEY+t,this._expiresIn(e.parameters[this.CONSTANTS.EXPIRES_IN]))),e.parameters.hasOwnProperty(this.CONSTANTS.ID_TOKEN)&&(this.info("Fragment has id token"),this._loginInProgress=!1,this._user=this._createUser(e.parameters[this.CONSTANTS.ID_TOKEN]),this._user&&this._user.profile?this._matchNonce(this._user)?(this._saveItem(this.CONSTANTS.STORAGE.IDTOKEN,e.parameters[this.CONSTANTS.ID_TOKEN]),t=this.config.loginResource?this.config.loginResource:this.config.clientId,this._hasResource(t)||(i=this._getItem(this.CONSTANTS.STORAGE.TOKEN_KEYS)||"",this._saveItem(this.CONSTANTS.STORAGE.TOKEN_KEYS,i+t+this.CONSTANTS.RESOURCE_DELIMETER)),this._saveItem(this.CONSTANTS.STORAGE.ACCESS_TOKEN_KEY+t,e.parameters[this.CONSTANTS.ID_TOKEN]),this._saveItem(this.CONSTANTS.STORAGE.EXPIRATION_KEY+t,this._user.profile.exp)):(this._saveItem(this.CONSTANTS.STORAGE.LOGIN_ERROR,"Nonce received: "+this._user.profile.nonce+" is not same as requested: "+this._getItem(this.CONSTANTS.STORAGE.NONCE_IDTOKEN)),this._user=null):(e.parameters.error="invalid id_token",e.parameters.error_description="Invalid id_token. id_token: "+e.parameters[this.CONSTANTS.ID_TOKEN],this._saveItem(this.CONSTANTS.STORAGE.ERROR,"invalid id_token"),this._saveItem(this.CONSTANTS.STORAGE.ERROR_DESCRIPTION,"Invalid id_token. id_token: "+e.parameters[this.CONSTANTS.ID_TOKEN])))}else e.parameters.error="Invalid_state",e.parameters.error_description="Invalid_state. state: "+e.stateResponse,this._saveItem(this.CONSTANTS.STORAGE.ERROR,"Invalid_state"),this._saveItem(this.CONSTANTS.STORAGE.ERROR_DESCRIPTION,"Invalid_state. state: "+e.stateResponse);this._saveItem(this.CONSTANTS.STORAGE.RENEW_STATUS+t,this.CONSTANTS.TOKEN_RENEW_STATUS_COMPLETED)},i.prototype.getResourceForEndpoint=function(e){if(this.config&&this.config.anonymousEndpoints)for(var t=0;t<this.config.anonymousEndpoints.length;t++)if(e.indexOf(this.config.anonymousEndpoints[t])>-1)return null;if(this.config&&this.config.endpoints)for(var i in this.config.endpoints)if(e.indexOf(i)>-1)return this.config.endpoints[i];return e.indexOf("http://")>-1||e.indexOf("https://")>-1?this._getHostFromUri(e)===this._getHostFromUri(this.config.redirectUri)?this.config.loginResource:null:this.config.loginResource},i.prototype._getHostFromUri=function(e){var t=String(e).replace(/^(https?:)\/\//,"");return t=t.split("/")[0]},i.prototype.handleWindowCallback=function(e){if(null==e&&(e=window.location.hash),this.isCallback(e)){var t=null,i=!1;this._openedWindows.length>0&&this._openedWindows[this._openedWindows.length-1].opener&&this._openedWindows[this._openedWindows.length-1].opener._adalInstance?(t=this._openedWindows[this._openedWindows.length-1].opener._adalInstance,i=!0):window.parent&&window.parent._adalInstance&&(t=window.parent._adalInstance);var n,r,o=t.getRequestInfo(e),s=null;r=i||window.parent!==window?t._callBackMappedToRenewStates[o.stateResponse]:t.callback,t.info("Returned from redirect url"),t.saveTokenFromHash(o),o.requestType===this.REQUEST_TYPE.RENEW_TOKEN&&window.parent?(window.parent!==window?t.verbose("Window is in iframe, acquiring token silently"):t.verbose("acquiring token interactive in progress"),n=o.parameters[t.CONSTANTS.ACCESS_TOKEN]||o.parameters[t.CONSTANTS.ID_TOKEN],s=t.CONSTANTS.ACCESS_TOKEN):o.requestType===this.REQUEST_TYPE.LOGIN&&(n=o.parameters[t.CONSTANTS.ID_TOKEN],s=t.CONSTANTS.ID_TOKEN);var a=o.parameters[t.CONSTANTS.ERROR_DESCRIPTION],c=o.parameters[t.CONSTANTS.ERROR];try{r&&r(a,n,c,s)}catch(e){t.error("Error occurred in user defined callback function: "+e)}window.parent!==window||i||(t.config.navigateToLoginRequestUrl?window.location.href=t._getItem(t.CONSTANTS.STORAGE.LOGIN_REQUEST):window.location.hash="")}},i.prototype._getNavigateUrl=function(e,t){var i="common";this.config.tenant&&(i=this.config.tenant);var n=this.instance+i+"/oauth2/authorize"+this._serialize(e,this.config,t)+this._addLibMetadata();return this.info("Navigate url:"+n),n},i.prototype._extractIdToken=function(e){var t=this._decodeJwt(e);if(!t)return null;try{var i=t.JWSPayload,n=this._base64DecodeStringUrlSafe(i);return n?JSON.parse(n):(this.info("The returned id_token could not be base64 url safe decoded."),null)}catch(e){this.error("The returned id_token could not be decoded",e)}return null},i.prototype._base64DecodeStringUrlSafe=function(e){return e=e.replace(/-/g,"+").replace(/_/g,"/"),window.atob?decodeURIComponent(escape(window.atob(e))):decodeURIComponent(escape(this._decode(e)))},i.prototype._decode=function(e){var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";e=String(e).replace(/=+$/,"");var i=e.length;if(i%4==1)throw new Error("The token to be decoded is not correctly encoded.");for(var n,r,o,s,a,c,u,h,l="",p=0;p<i;p+=4){if(n=t.indexOf(e.charAt(p)),r=t.indexOf(e.charAt(p+1)),o=t.indexOf(e.charAt(p+2)),s=t.indexOf(e.charAt(p+3)),p+2===i-1){a=n<<18|r<<12|o<<6,c=a>>16&255,u=a>>8&255,l+=String.fromCharCode(c,u);break}if(p+1===i-1){a=n<<18|r<<12,c=a>>16&255,l+=String.fromCharCode(c);break}a=n<<18|r<<12|o<<6|s,c=a>>16&255,u=a>>8&255,h=255&a,l+=String.fromCharCode(c,u,h)}return l},i.prototype._decodeJwt=function(e){if(this._isEmpty(e))return null;var t=/^([^\.\s]*)\.([^\.\s]+)\.([^\.\s]*)$/,i=t.exec(e);return!i||i.length<4?(this.warn("The returned id_token is not parseable."),null):{header:i[1],JWSPayload:i[2],JWSSig:i[3]}},i.prototype._convertUrlSafeToRegularBase64EncodedString=function(e){return e.replace("-","+").replace("_","/")},i.prototype._serialize=function(e,t,i){var n=[];if(null!==t){n.push("?response_type="+e),n.push("client_id="+encodeURIComponent(t.clientId)),i&&n.push("resource="+encodeURIComponent(i)),n.push("redirect_uri="+encodeURIComponent(t.redirectUri)),n.push("state="+encodeURIComponent(t.state)),t.hasOwnProperty("slice")&&n.push("slice="+encodeURIComponent(t.slice)),t.hasOwnProperty("extraQueryParameter")&&n.push(t.extraQueryParameter);var r=t.correlationId?t.correlationId:this._guid();n.push("client-request-id="+encodeURIComponent(r))}return n.join("&")},i.prototype._deserialize=function(e){var t,i=/\+/g,n=/([^&=]+)=([^&]*)/g,r=function(e){return decodeURIComponent(e.replace(i," "))},o={};for(t=n.exec(e);t;)o[r(t[1])]=r(t[2]),t=n.exec(e);return o},i.prototype._decimalToHex=function(e){for(var t=e.toString(16);t.length<2;)t="0"+t;return t},i.prototype._guid=function(){var e=window.crypto||window.msCrypto;if(e&&e.getRandomValues){var t=new Uint8Array(16);return e.getRandomValues(t),t[6]|=64,t[6]&=79,t[8]|=128,t[8]&=191,this._decimalToHex(t[0])+this._decimalToHex(t[1])+this._decimalToHex(t[2])+this._decimalToHex(t[3])+"-"+this._decimalToHex(t[4])+this._decimalToHex(t[5])+"-"+this._decimalToHex(t[6])+this._decimalToHex(t[7])+"-"+this._decimalToHex(t[8])+this._decimalToHex(t[9])+"-"+this._decimalToHex(t[10])+this._decimalToHex(t[11])+this._decimalToHex(t[12])+this._decimalToHex(t[13])+this._decimalToHex(t[14])+this._decimalToHex(t[15])}for(var i="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx",n="0123456789abcdef",r=0,o="",s=0;s<36;s++)"-"!==i[s]&&"4"!==i[s]&&(r=16*Math.random()|0),"x"===i[s]?o+=n[r]:"y"===i[s]?(r&=3,r|=8,o+=n[r]):o+=i[s];return o},i.prototype._expiresIn=function(e){return e||(e=3599),this._now()+parseInt(e,10)},i.prototype._now=function(){return Math.round((new Date).getTime()/1e3)},i.prototype._addAdalFrame=function(e){if(void 0!==e){this.info("Add adal frame to document:"+e);var t=document.getElementById(e);if(!t){if(document.createElement&&document.documentElement&&(window.opera||-1===window.navigator.userAgent.indexOf("MSIE 5.0"))){var i=document.createElement("iframe");i.setAttribute("id",e),i.setAttribute("aria-hidden","true"),i.style.visibility="hidden",i.style.position="absolute",i.style.width=i.style.height=i.borderWidth="0px",t=document.getElementsByTagName("body")[0].appendChild(i)}else document.body&&document.body.insertAdjacentHTML&&document.body.insertAdjacentHTML("beforeEnd",'<iframe name="'+e+'" id="'+e+'" style="display:none"></iframe>');window.frames&&window.frames[e]&&(t=window.frames[e])}return t}},i.prototype._saveItem=function(e,t,i){if(this.config&&this.config.cacheLocation&&"localStorage"===this.config.cacheLocation){if(!this._supportsLocalStorage())return this.info("Local storage is not supported"),!1;if(i){var n=this._getItem(e)||"";localStorage.setItem(e,n+t+this.CONSTANTS.CACHE_DELIMETER)}else localStorage.setItem(e,t);return!0}return this._supportsSessionStorage()?(sessionStorage.setItem(e,t),!0):(this.info("Session storage is not supported"),!1)},i.prototype._getItem=function(e){return this.config&&this.config.cacheLocation&&"localStorage"===this.config.cacheLocation?this._supportsLocalStorage()?localStorage.getItem(e):(this.info("Local storage is not supported"),null):this._supportsSessionStorage()?sessionStorage.getItem(e):(this.info("Session storage is not supported"),null)},i.prototype._supportsLocalStorage=function(){try{return!!window.localStorage&&(window.localStorage.setItem("storageTest","A"),"A"==window.localStorage.getItem("storageTest")&&(window.localStorage.removeItem("storageTest"),!window.localStorage.getItem("storageTest")))}catch(e){return!1}},i.prototype._supportsSessionStorage=function(){try{return!!window.sessionStorage&&(window.sessionStorage.setItem("storageTest","A"),"A"==window.sessionStorage.getItem("storageTest")&&(window.sessionStorage.removeItem("storageTest"),!window.sessionStorage.getItem("storageTest")))}catch(e){return!1}},i.prototype._cloneConfig=function(e){if(null===e||"object"!=typeof e)return e;var t={};for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i]);return t},i.prototype._addLibMetadata=function(){return"&x-client-SKU=Js&x-client-Ver="+this._libVersion()},i.prototype.log=function(e,t,i,n){if(e<=Logging.level){if(!Logging.piiLoggingEnabled&&n)return;var r=(new Date).toUTCString(),o="";o=this.config.correlationId?r+":"+this.config.correlationId+"-"+this._libVersion()+"-"+this.CONSTANTS.LEVEL_STRING_MAP[e]+" "+t:r+":"+this._libVersion()+"-"+this.CONSTANTS.LEVEL_STRING_MAP[e]+" "+t,i&&(o+="\nstack:\n"+i.stack),Logging.log(o)}},i.prototype.error=function(e,t){this.log(this.CONSTANTS.LOGGING_LEVEL.ERROR,e,t)},i.prototype.warn=function(e){this.log(this.CONSTANTS.LOGGING_LEVEL.WARN,e,null)},i.prototype.info=function(e){this.log(this.CONSTANTS.LOGGING_LEVEL.INFO,e,null)},i.prototype.verbose=function(e){this.log(this.CONSTANTS.LOGGING_LEVEL.VERBOSE,e,null)},i.prototype.errorPii=function(e,t){this.log(this.CONSTANTS.LOGGING_LEVEL.ERROR,e,t,!0)},i.prototype.warnPii=function(e){this.log(this.CONSTANTS.LOGGING_LEVEL.WARN,e,null,!0)},i.prototype.infoPii=function(e){this.log(this.CONSTANTS.LOGGING_LEVEL.INFO,e,null,!0)},i.prototype.verbosePii=function(e){this.log(this.CONSTANTS.LOGGING_LEVEL.VERBOSE,e,null,!0)},i.prototype._libVersion=function(){return"1.0.17"},void 0!==e&&e.exports&&(e.exports=i,e.exports.inject=function(e){return new i(e)}),i}()},function(e,t,i){"use strict";var n=i(3);i.d(t,"a",function(){return n.a});var r=i(11);i.d(t,"b",function(){return r.a})},function(e,t,i){"use strict";var n=i(3),r=function(){function e(e,t,i,n){void 0===t&&(t="config"),void 0===i&&(i="Title"),void 0===n&&(n="Value"),this.web=e,this.listTitle=t,this.keyFieldName=i,this.valueFieldName=n}return e.prototype.getConfiguration=function(){var e=this;return this.web.lists.getByTitle(this.listTitle).items.select(this.keyFieldName,this.valueFieldName).get().then(function(t){return t.reduce(function(t,i){return t[i[e.keyFieldName]]=i[e.valueFieldName],t},{})})},e.prototype.asCaching=function(e){return void 0===e&&(e="pnp_configcache_splist_"+this.web.toUrl()+"+"+this.listTitle),new n.a(this,e)},e}();t.a=r}])});
var r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(e,t)}},function(e,t,i){"use strict";var n=i(0),r=i(3),o=function(){function e(e,t,i){this.wrappedProvider=e,this.cacheKey=t,this.wrappedProvider=e,this.store=i||this.selectPnPCache()}return e.prototype.getWrappedProvider=function(){return this.wrappedProvider},e.prototype.getConfiguration=function(){var e=this;return this.store&&this.store.enabled?this.store.getOrPut(this.cacheKey,function(){return e.wrappedProvider.getConfiguration().then(function(t){return e.store.put(e.cacheKey,t),t})}):this.wrappedProvider.getConfiguration()},e.prototype.selectPnPCache=function(){var e=new n.a;if(e.local&&e.local.enabled)return e.local;if(e.session&&e.session.enabled)return e.session;throw new r.a},e}();t.a=o},function(e,t,i){"use strict";i.d(t,"a",function(){return o});var n=i(1),r=i(10),o=function(e){function t(t){void 0===t&&(t="Cannot create a caching configuration provider since cache is not available.");var i=e.call(this,t)||this;return i.name="NoCacheAvailableException",r.a.log({data:{},level:3,message:"["+i.name+"]::"+i.message}),i}return n.a(t,e),t}(Error)},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(5);i.d(t,"Settings",function(){return n.d}),i.d(t,"CachingConfigurationProvider",function(){return n.a}),i.d(t,"SPListConfigurationProvider",function(){return n.c}),i.d(t,"NoCacheAvailableException",function(){return n.b})},function(e,t,i){"use strict";var n=i(6);i.d(t,"d",function(){return n.a});var r=i(9);i.d(t,"a",function(){return r.a}),i.d(t,"c",function(){return r.b});var o=i(3);i.d(t,"b",function(){return o.a})},function(e,t,i){"use strict";i.d(t,"a",function(){return r});var n=i(0),r=function(){function e(e){void 0===e&&(e=new Map),this._settings=e}return e.prototype.add=function(e,t){this._settings.set(e,t)},e.prototype.addJSON=function(e,t){this._settings.set(e,Object(n.b)(t))},e.prototype.apply=function(e){var t=this;return new Promise(function(i,r){try{t._settings=Object(n.c)(t._settings,Object(n.d)(e)),i()}catch(e){r(e)}})},e.prototype.load=function(e){var t=this;return new Promise(function(i,r){e.getConfiguration().then(function(e){t._settings=Object(n.c)(t._settings,Object(n.d)(e)),i()}).catch(r)})},e.prototype.get=function(e){return this._settings.get(e)},e.prototype.getJSON=function(e){var t=this.get(e);return void 0===t||null===t?t:JSON.parse(t)},e}()},function(e,t){var i;i=function(){return this}();try{i=i||Function("return this")()||(0,eval)("this")}catch(e){"object"==typeof window&&(i=window)}e.exports=i},function(e,t){/*! adal-angular v1.0.17 2018-02-27 */
var i=function(){"use strict";return i=function(e){if(this.REQUEST_TYPE={LOGIN:"LOGIN",RENEW_TOKEN:"RENEW_TOKEN",UNKNOWN:"UNKNOWN"},this.RESPONSE_TYPE={ID_TOKEN_TOKEN:"id_token token",TOKEN:"token"},this.CONSTANTS={ACCESS_TOKEN:"access_token",EXPIRES_IN:"expires_in",ID_TOKEN:"id_token",ERROR_DESCRIPTION:"error_description",SESSION_STATE:"session_state",ERROR:"error",STORAGE:{TOKEN_KEYS:"adal.token.keys",ACCESS_TOKEN_KEY:"adal.access.token.key",EXPIRATION_KEY:"adal.expiration.key",STATE_LOGIN:"adal.state.login",STATE_RENEW:"adal.state.renew",NONCE_IDTOKEN:"adal.nonce.idtoken",SESSION_STATE:"adal.session.state",USERNAME:"adal.username",IDTOKEN:"adal.idtoken",ERROR:"adal.error",ERROR_DESCRIPTION:"adal.error.description",LOGIN_REQUEST:"adal.login.request",LOGIN_ERROR:"adal.login.error",RENEW_STATUS:"adal.token.renew.status",ANGULAR_LOGIN_REQUEST:"adal.angular.login.request"},RESOURCE_DELIMETER:"|",CACHE_DELIMETER:"||",LOADFRAME_TIMEOUT:6e3,TOKEN_RENEW_STATUS_CANCELED:"Canceled",TOKEN_RENEW_STATUS_COMPLETED:"Completed",TOKEN_RENEW_STATUS_IN_PROGRESS:"In Progress",LOGGING_LEVEL:{ERROR:0,WARN:1,INFO:2,VERBOSE:3},LEVEL_STRING_MAP:{0:"ERROR:",1:"WARNING:",2:"INFO:",3:"VERBOSE:"},POPUP_WIDTH:483,POPUP_HEIGHT:600},i.prototype._singletonInstance)return i.prototype._singletonInstance;if(i.prototype._singletonInstance=this,this.instance="https://login.microsoftonline.com/",this.config={},this.callback=null,this.popUp=!1,this.isAngular=!1,this._user=null,this._activeRenewals={},this._loginInProgress=!1,this._acquireTokenInProgress=!1,this._renewStates=[],this._callBackMappedToRenewStates={},this._callBacksMappedToRenewStates={},this._openedWindows=[],this._requestType=this.REQUEST_TYPE.LOGIN,window._adalInstance=this,e.displayCall&&"function"!=typeof e.displayCall)throw new Error("displayCall is not a function");if(!e.clientId)throw new Error("clientId is required");this.config=this._cloneConfig(e),void 0===this.config.navigateToLoginRequestUrl&&(this.config.navigateToLoginRequestUrl=!0),this.config.popUp&&(this.popUp=!0),this.config.callback&&"function"==typeof this.config.callback&&(this.callback=this.config.callback),this.config.instance&&(this.instance=this.config.instance),this.config.loginResource||(this.config.loginResource=this.config.clientId),this.config.redirectUri||(this.config.redirectUri=window.location.href.split("?")[0].split("#")[0]),this.config.postLogoutRedirectUri||(this.config.postLogoutRedirectUri=window.location.href.split("?")[0].split("#")[0]),this.config.anonymousEndpoints||(this.config.anonymousEndpoints=[]),this.config.isAngular&&(this.isAngular=this.config.isAngular),this.config.loadFrameTimeout&&(this.CONSTANTS.LOADFRAME_TIMEOUT=this.config.loadFrameTimeout)},"undefined"!=typeof window&&(window.Logging={piiLoggingEnabled:!1,level:0,log:function(e){}}),i.prototype.login=function(){if(this._loginInProgress)return void this.info("Login in progress");this._loginInProgress=!0;var e=this._guid();this.config.state=e,this._idTokenNonce=this._guid();var t=this._getItem(this.CONSTANTS.STORAGE.ANGULAR_LOGIN_REQUEST);t&&""!==t?this._saveItem(this.CONSTANTS.STORAGE.ANGULAR_LOGIN_REQUEST,""):t=window.location.href,this.verbose("Expected state: "+e+" startPage:"+t),this._saveItem(this.CONSTANTS.STORAGE.LOGIN_REQUEST,t),this._saveItem(this.CONSTANTS.STORAGE.LOGIN_ERROR,""),this._saveItem(this.CONSTANTS.STORAGE.STATE_LOGIN,e,!0),this._saveItem(this.CONSTANTS.STORAGE.NONCE_IDTOKEN,this._idTokenNonce,!0),this._saveItem(this.CONSTANTS.STORAGE.ERROR,""),this._saveItem(this.CONSTANTS.STORAGE.ERROR_DESCRIPTION,"");var i=this._getNavigateUrl("id_token",null)+"&nonce="+encodeURIComponent(this._idTokenNonce);this.config.displayCall?this.config.displayCall(i):this.popUp?(this._saveItem(this.CONSTANTS.STORAGE.STATE_LOGIN,""),this._renewStates.push(e),this.registerCallback(e,this.config.clientId,this.callback),this._loginPopup(i)):this.promptUser(i)},i.prototype._openPopup=function(e,t,i,n){try{var r=window.screenLeft?window.screenLeft:window.screenX,o=window.screenTop?window.screenTop:window.screenY,s=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,a=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight,c=s/2-i/2+r,u=a/2-n/2+o,h=window.open(e,t,"width="+i+", height="+n+", top="+u+", left="+c);return h.focus&&h.focus(),h}catch(e){return this.warn("Error opening popup, "+e.message),this._loginInProgress=!1,this._acquireTokenInProgress=!1,null}},i.prototype._handlePopupError=function(e,t,i,n,r){this.warn(n),this._saveItem(this.CONSTANTS.STORAGE.ERROR,i),this._saveItem(this.CONSTANTS.STORAGE.ERROR_DESCRIPTION,n),this._saveItem(this.CONSTANTS.STORAGE.LOGIN_ERROR,r),t&&this._activeRenewals[t]&&(this._activeRenewals[t]=null),this._loginInProgress=!1,this._acquireTokenInProgress=!1,e&&e(n,null,i)},i.prototype._loginPopup=function(e,t,i){var n=this._openPopup(e,"login",this.CONSTANTS.POPUP_WIDTH,this.CONSTANTS.POPUP_HEIGHT),r=i||this.callback;if(null==n){var o="Popup Window is null. This can happen if you are using IE";return void this._handlePopupError(r,t,"Error opening popup",o,o)}if(this._openedWindows.push(n),-1!=this.config.redirectUri.indexOf("#"))var s=this.config.redirectUri.split("#")[0];else var s=this.config.redirectUri;var a=this,c=window.setInterval(function(){if(!n||n.closed||void 0===n.closed){var e="Popup Window closed",i="Popup Window closed by UI action/ Popup Window handle destroyed due to cross zone navigation in IE/Edge";return a.isAngular&&a._broadcast("adal:popUpClosed",i+a.CONSTANTS.RESOURCE_DELIMETER+e),a._handlePopupError(r,t,e,i,i),void window.clearInterval(c)}try{var o=n.location;if(-1!=encodeURI(o.href).indexOf(encodeURI(s)))return a.isAngular?a._broadcast("adal:popUpHashChanged",o.hash):a.handleWindowCallback(o.hash),window.clearInterval(c),a._loginInProgress=!1,a._acquireTokenInProgress=!1,a.info("Closing popup window"),a._openedWindows=[],void n.close()}catch(e){}},1)},i.prototype._broadcast=function(e,t){!function(){function e(e,t){t=t||{bubbles:!1,cancelable:!1,detail:void 0};var i=document.createEvent("CustomEvent");return i.initCustomEvent(e,t.bubbles,t.cancelable,t.detail),i}if("function"==typeof window.CustomEvent)return!1;e.prototype=window.Event.prototype,window.CustomEvent=e}();var i=new CustomEvent(e,{detail:t});window.dispatchEvent(i)},i.prototype.loginInProgress=function(){return this._loginInProgress},i.prototype._hasResource=function(e){var t=this._getItem(this.CONSTANTS.STORAGE.TOKEN_KEYS);return t&&!this._isEmpty(t)&&t.indexOf(e+this.CONSTANTS.RESOURCE_DELIMETER)>-1},i.prototype.getCachedToken=function(e){if(!this._hasResource(e))return null;var t=this._getItem(this.CONSTANTS.STORAGE.ACCESS_TOKEN_KEY+e),i=this._getItem(this.CONSTANTS.STORAGE.EXPIRATION_KEY+e),n=this.config.expireOffsetSeconds||300;return i&&i>this._now()+n?t:(this._saveItem(this.CONSTANTS.STORAGE.ACCESS_TOKEN_KEY+e,""),this._saveItem(this.CONSTANTS.STORAGE.EXPIRATION_KEY+e,0),null)},i.prototype.getCachedUser=function(){if(this._user)return this._user;var e=this._getItem(this.CONSTANTS.STORAGE.IDTOKEN);return this._user=this._createUser(e),this._user},i.prototype.registerCallback=function(e,t,i){this._activeRenewals[t]=e,this._callBacksMappedToRenewStates[e]||(this._callBacksMappedToRenewStates[e]=[]);var n=this;this._callBacksMappedToRenewStates[e].push(i),this._callBackMappedToRenewStates[e]||(this._callBackMappedToRenewStates[e]=function(i,r,o,s){n._activeRenewals[t]=null;for(var a=0;a<n._callBacksMappedToRenewStates[e].length;++a)try{n._callBacksMappedToRenewStates[e][a](i,r,o,s)}catch(o){n.warn(o)}n._callBacksMappedToRenewStates[e]=null,n._callBackMappedToRenewStates[e]=null})},i.prototype._renewToken=function(e,t,i){this.info("renewToken is called for resource:"+e);var n=this._addAdalFrame("adalRenewFrame"+e),r=this._guid()+"|"+e;this.config.state=r,this._renewStates.push(r),this.verbose("Renew token Expected state: "+r),i=i||"token";var o=this._urlRemoveQueryStringParameter(this._getNavigateUrl(i,e),"prompt");i===this.RESPONSE_TYPE.ID_TOKEN_TOKEN&&(this._idTokenNonce=this._guid(),this._saveItem(this.CONSTANTS.STORAGE.NONCE_IDTOKEN,this._idTokenNonce,!0),o+="&nonce="+encodeURIComponent(this._idTokenNonce)),o+="&prompt=none",o=this._addHintParameters(o),this.registerCallback(r,e,t),this.verbosePii("Navigate to:"+o),n.src="about:blank",this._loadFrameTimeout(o,"adalRenewFrame"+e,e)},i.prototype._renewIdToken=function(e,t){this.info("renewIdToken is called");var i=this._addAdalFrame("adalIdTokenFrame"),n=this._guid()+"|"+this.config.clientId;this._idTokenNonce=this._guid(),this._saveItem(this.CONSTANTS.STORAGE.NONCE_IDTOKEN,this._idTokenNonce,!0),this.config.state=n,this._renewStates.push(n),this.verbose("Renew Idtoken Expected state: "+n);var r=null===t||void 0===t?null:this.config.clientId,t=t||"id_token",o=this._urlRemoveQueryStringParameter(this._getNavigateUrl(t,r),"prompt");o+="&prompt=none",o=this._addHintParameters(o),o+="&nonce="+encodeURIComponent(this._idTokenNonce),this.registerCallback(n,this.config.clientId,e),this.verbosePii("Navigate to:"+o),i.src="about:blank",this._loadFrameTimeout(o,"adalIdTokenFrame",this.config.clientId)},i.prototype._urlContainsQueryStringParameter=function(e,t){return new RegExp("[\\?&]"+e+"=").test(t)},i.prototype._urlRemoveQueryStringParameter=function(e,t){var i=new RegExp("(\\&"+t+"=)[^&]+");return e=e.replace(i,""),i=new RegExp("("+t+"=)[^&]+&"),e=e.replace(i,""),i=new RegExp("("+t+"=)[^&]+"),e=e.replace(i,"")},i.prototype._loadFrameTimeout=function(e,t,i){this.verbose("Set loading state to pending for: "+i),this._saveItem(this.CONSTANTS.STORAGE.RENEW_STATUS+i,this.CONSTANTS.TOKEN_RENEW_STATUS_IN_PROGRESS),this._loadFrame(e,t);var n=this;setTimeout(function(){if(n._getItem(n.CONSTANTS.STORAGE.RENEW_STATUS+i)===n.CONSTANTS.TOKEN_RENEW_STATUS_IN_PROGRESS){n.verbose("Loading frame has timed out after: "+n.CONSTANTS.LOADFRAME_TIMEOUT/1e3+" seconds for resource "+i);var e=n._activeRenewals[i];e&&n._callBackMappedToRenewStates[e]&&n._callBackMappedToRenewStates[e]("Token renewal operation failed due to timeout",null,"Token Renewal Failed"),n._saveItem(n.CONSTANTS.STORAGE.RENEW_STATUS+i,n.CONSTANTS.TOKEN_RENEW_STATUS_CANCELED)}},n.CONSTANTS.LOADFRAME_TIMEOUT)},i.prototype._loadFrame=function(e,t){var i=this;i.info("LoadFrame: "+t);var n=t;setTimeout(function(){var t=i._addAdalFrame(n);""!==t.src&&"about:blank"!==t.src||(t.src=e,i._loadFrame(e,n))},500)},i.prototype.acquireToken=function(e,t){if(this._isEmpty(e))return this.warn("resource is required"),void t("resource is required",null,"resource is required");var i=this.getCachedToken(e);return i?(this.info("Token is already in cache for resource:"+e),void t(null,i,null)):this._user||this.config.extraQueryParameter&&-1!==this.config.extraQueryParameter.indexOf("login_hint")?void(this._activeRenewals[e]?this.registerCallback(this._activeRenewals[e],e,t):(this._requestType=this.REQUEST_TYPE.RENEW_TOKEN,e===this.config.clientId?this._user?(this.verbose("renewing idtoken"),this._renewIdToken(t)):(this.verbose("renewing idtoken and access_token"),this._renewIdToken(t,this.RESPONSE_TYPE.ID_TOKEN_TOKEN)):this._user?(this.verbose("renewing access_token"),this._renewToken(e,t)):(this.verbose("renewing idtoken and access_token"),this._renewToken(e,t,this.RESPONSE_TYPE.ID_TOKEN_TOKEN)))):(this.warn("User login is required"),void t("User login is required",null,"login required"))},i.prototype.acquireTokenPopup=function(e,t,i,n){if(this._isEmpty(e))return this.warn("resource is required"),void n("resource is required",null,"resource is required");if(!this._user)return this.warn("User login is required"),void n("User login is required",null,"login required");if(this._acquireTokenInProgress)return this.warn("Acquire token interactive is already in progress"),void n("Acquire token interactive is already in progress",null,"Acquire token interactive is already in progress");var r=this._guid()+"|"+e;this.config.state=r,this._renewStates.push(r),this._requestType=this.REQUEST_TYPE.RENEW_TOKEN,this.verbose("Renew token Expected state: "+r);var o=this._urlRemoveQueryStringParameter(this._getNavigateUrl("token",e),"prompt");if(o+="&prompt=select_account",t&&(o+=t),i&&-1===o.indexOf("&claims"))o+="&claims="+encodeURIComponent(i);else if(i&&-1!==o.indexOf("&claims"))throw new Error("Claims cannot be passed as an extraQueryParameter");o=this._addHintParameters(o),this._acquireTokenInProgress=!0,this.info("acquireToken interactive is called for the resource "+e),this.registerCallback(r,e,n),this._loginPopup(o,e,n)},i.prototype.acquireTokenRedirect=function(e,t,i){if(this._isEmpty(e))return this.warn("resource is required"),void n("resource is required",null,"resource is required");var n=this.callback;if(!this._user)return this.warn("User login is required"),void n("User login is required",null,"login required");if(this._acquireTokenInProgress)return this.warn("Acquire token interactive is already in progress"),void n("Acquire token interactive is already in progress",null,"Acquire token interactive is already in progress");var r=this._guid()+"|"+e;this.config.state=r,this.verbose("Renew token Expected state: "+r);var o=this._urlRemoveQueryStringParameter(this._getNavigateUrl("token",e),"prompt");if(o+="&prompt=select_account",t&&(o+=t),i&&-1===o.indexOf("&claims"))o+="&claims="+encodeURIComponent(i);else if(i&&-1!==o.indexOf("&claims"))throw new Error("Claims cannot be passed as an extraQueryParameter");o=this._addHintParameters(o),this._acquireTokenInProgress=!0,this.info("acquireToken interactive is called for the resource "+e),this._saveItem(this.CONSTANTS.STORAGE.LOGIN_REQUEST,window.location.href),this._saveItem(this.CONSTANTS.STORAGE.STATE_RENEW,r,!0),this.promptUser(o)},i.prototype.promptUser=function(e){e?(this.infoPii("Navigate to:"+e),window.location.replace(e)):this.info("Navigate url is empty")},i.prototype.clearCache=function(){this._saveItem(this.CONSTANTS.STORAGE.LOGIN_REQUEST,""),this._saveItem(this.CONSTANTS.STORAGE.ANGULAR_LOGIN_REQUEST,""),this._saveItem(this.CONSTANTS.STORAGE.SESSION_STATE,""),this._saveItem(this.CONSTANTS.STORAGE.STATE_LOGIN,""),this._saveItem(this.CONSTANTS.STORAGE.STATE_RENEW,""),this._renewStates=[],this._saveItem(this.CONSTANTS.STORAGE.NONCE_IDTOKEN,""),this._saveItem(this.CONSTANTS.STORAGE.IDTOKEN,""),this._saveItem(this.CONSTANTS.STORAGE.ERROR,""),this._saveItem(this.CONSTANTS.STORAGE.ERROR_DESCRIPTION,""),this._saveItem(this.CONSTANTS.STORAGE.LOGIN_ERROR,""),this._saveItem(this.CONSTANTS.STORAGE.LOGIN_ERROR,"");var e=this._getItem(this.CONSTANTS.STORAGE.TOKEN_KEYS);if(!this._isEmpty(e)){e=e.split(this.CONSTANTS.RESOURCE_DELIMETER);for(var t=0;t<e.length&&""!==e[t];t++)this._saveItem(this.CONSTANTS.STORAGE.ACCESS_TOKEN_KEY+e[t],""),this._saveItem(this.CONSTANTS.STORAGE.EXPIRATION_KEY+e[t],0)}this._saveItem(this.CONSTANTS.STORAGE.TOKEN_KEYS,"")},i.prototype.clearCacheForResource=function(e){this._saveItem(this.CONSTANTS.STORAGE.STATE_RENEW,""),this._saveItem(this.CONSTANTS.STORAGE.ERROR,""),this._saveItem(this.CONSTANTS.STORAGE.ERROR_DESCRIPTION,""),this._hasResource(e)&&(this._saveItem(this.CONSTANTS.STORAGE.ACCESS_TOKEN_KEY+e,""),this._saveItem(this.CONSTANTS.STORAGE.EXPIRATION_KEY+e,0))},i.prototype.logOut=function(){this.clearCache(),this._user=null;var e;if(this.config.logOutUri)e=this.config.logOutUri;else{var t="common",i="";this.config.tenant&&(t=this.config.tenant),this.config.postLogoutRedirectUri&&(i="post_logout_redirect_uri="+encodeURIComponent(this.config.postLogoutRedirectUri)),e=this.instance+t+"/oauth2/logout?"+i}this.infoPii("Logout navigate to: "+e),this.promptUser(e)},i.prototype._isEmpty=function(e){return void 0===e||!e||0===e.length},i.prototype.getUser=function(e){if("function"!=typeof e)throw new Error("callback is not a function");if(this._user)return void e(null,this._user);var t=this._getItem(this.CONSTANTS.STORAGE.IDTOKEN);this._isEmpty(t)?(this.warn("User information is not available"),e("User information is not available",null)):(this.info("User exists in cache: "),this._user=this._createUser(t),e(null,this._user))},i.prototype._addHintParameters=function(e){if(this._user&&this._user.profile)if(this._user.profile.sid&&-1!==e.indexOf("&prompt=none"))this._urlContainsQueryStringParameter("sid",e)||(e+="&sid="+encodeURIComponent(this._user.profile.sid));else if(this._user.profile.upn&&(this._urlContainsQueryStringParameter("login_hint",e)||(e+="&login_hint="+encodeURIComponent(this._user.profile.upn)),!this._urlContainsQueryStringParameter("domain_hint",e)&&this._user.profile.upn.indexOf("@")>-1)){var t=this._user.profile.upn.split("@");e+="&domain_hint="+encodeURIComponent(t[t.length-1])}return e},i.prototype._createUser=function(e){var t=null,i=this._extractIdToken(e);return i&&i.hasOwnProperty("aud")&&(i.aud.toLowerCase()===this.config.clientId.toLowerCase()?(t={userName:"",profile:i},i.hasOwnProperty("upn")?t.userName=i.upn:i.hasOwnProperty("email")&&(t.userName=i.email)):this.warn("IdToken has invalid aud field")),t},i.prototype._getHash=function(e){return e.indexOf("#/")>-1?e=e.substring(e.indexOf("#/")+2):e.indexOf("#")>-1&&(e=e.substring(1)),e},i.prototype.isCallback=function(e){e=this._getHash(e);var t=this._deserialize(e);return t.hasOwnProperty(this.CONSTANTS.ERROR_DESCRIPTION)||t.hasOwnProperty(this.CONSTANTS.ACCESS_TOKEN)||t.hasOwnProperty(this.CONSTANTS.ID_TOKEN)},i.prototype.getLoginError=function(){return this._getItem(this.CONSTANTS.STORAGE.LOGIN_ERROR)},i.prototype.getRequestInfo=function(e){e=this._getHash(e);var t=this._deserialize(e),i={valid:!1,parameters:{},stateMatch:!1,stateResponse:"",requestType:this.REQUEST_TYPE.UNKNOWN};if(t&&(i.parameters=t,t.hasOwnProperty(this.CONSTANTS.ERROR_DESCRIPTION)||t.hasOwnProperty(this.CONSTANTS.ACCESS_TOKEN)||t.hasOwnProperty(this.CONSTANTS.ID_TOKEN))){i.valid=!0;var n="";if(!t.hasOwnProperty("state"))return this.warn("No state returned"),i;if(this.verbose("State: "+t.state),n=t.state,i.stateResponse=n,this._matchState(i))return i;if(!i.stateMatch&&window.parent){i.requestType=this._requestType;for(var r=this._renewStates,o=0;o<r.length;o++)if(r[o]===i.stateResponse){i.stateMatch=!0;break}}}return i},i.prototype._matchNonce=function(e){var t=this._getItem(this.CONSTANTS.STORAGE.NONCE_IDTOKEN);if(t){t=t.split(this.CONSTANTS.CACHE_DELIMETER);for(var i=0;i<t.length;i++)if(t[i]===e.profile.nonce)return!0}return!1},i.prototype._matchState=function(e){var t=this._getItem(this.CONSTANTS.STORAGE.STATE_LOGIN);if(t){t=t.split(this.CONSTANTS.CACHE_DELIMETER);for(var i=0;i<t.length;i++)if(t[i]===e.stateResponse)return e.requestType=this.REQUEST_TYPE.LOGIN,e.stateMatch=!0,!0}var n=this._getItem(this.CONSTANTS.STORAGE.STATE_RENEW);if(n){n=n.split(this.CONSTANTS.CACHE_DELIMETER);for(var i=0;i<n.length;i++)if(n[i]===e.stateResponse)return e.requestType=this.REQUEST_TYPE.RENEW_TOKEN,e.stateMatch=!0,!0}return!1},i.prototype._getResourceFromState=function(e){if(e){var t=e.indexOf("|");if(t>-1&&t+1<e.length)return e.substring(t+1)}return""},i.prototype.saveTokenFromHash=function(e){this.info("State status:"+e.stateMatch+"; Request type:"+e.requestType),this._saveItem(this.CONSTANTS.STORAGE.ERROR,""),this._saveItem(this.CONSTANTS.STORAGE.ERROR_DESCRIPTION,"");var t=this._getResourceFromState(e.stateResponse);if(e.parameters.hasOwnProperty(this.CONSTANTS.ERROR_DESCRIPTION))this.infoPii("Error :"+e.parameters.error+"; Error description:"+e.parameters[this.CONSTANTS.ERROR_DESCRIPTION]),this._saveItem(this.CONSTANTS.STORAGE.ERROR,e.parameters.error),this._saveItem(this.CONSTANTS.STORAGE.ERROR_DESCRIPTION,e.parameters[this.CONSTANTS.ERROR_DESCRIPTION]),e.requestType===this.REQUEST_TYPE.LOGIN&&(this._loginInProgress=!1,this._saveItem(this.CONSTANTS.STORAGE.LOGIN_ERROR,e.parameters.error_description));else if(e.stateMatch){this.info("State is right"),e.parameters.hasOwnProperty(this.CONSTANTS.SESSION_STATE)&&this._saveItem(this.CONSTANTS.STORAGE.SESSION_STATE,e.parameters[this.CONSTANTS.SESSION_STATE]);var i;e.parameters.hasOwnProperty(this.CONSTANTS.ACCESS_TOKEN)&&(this.info("Fragment has access token"),this._hasResource(t)||(i=this._getItem(this.CONSTANTS.STORAGE.TOKEN_KEYS)||"",this._saveItem(this.CONSTANTS.STORAGE.TOKEN_KEYS,i+t+this.CONSTANTS.RESOURCE_DELIMETER)),this._saveItem(this.CONSTANTS.STORAGE.ACCESS_TOKEN_KEY+t,e.parameters[this.CONSTANTS.ACCESS_TOKEN]),this._saveItem(this.CONSTANTS.STORAGE.EXPIRATION_KEY+t,this._expiresIn(e.parameters[this.CONSTANTS.EXPIRES_IN]))),e.parameters.hasOwnProperty(this.CONSTANTS.ID_TOKEN)&&(this.info("Fragment has id token"),this._loginInProgress=!1,this._user=this._createUser(e.parameters[this.CONSTANTS.ID_TOKEN]),this._user&&this._user.profile?this._matchNonce(this._user)?(this._saveItem(this.CONSTANTS.STORAGE.IDTOKEN,e.parameters[this.CONSTANTS.ID_TOKEN]),t=this.config.loginResource?this.config.loginResource:this.config.clientId,this._hasResource(t)||(i=this._getItem(this.CONSTANTS.STORAGE.TOKEN_KEYS)||"",this._saveItem(this.CONSTANTS.STORAGE.TOKEN_KEYS,i+t+this.CONSTANTS.RESOURCE_DELIMETER)),this._saveItem(this.CONSTANTS.STORAGE.ACCESS_TOKEN_KEY+t,e.parameters[this.CONSTANTS.ID_TOKEN]),this._saveItem(this.CONSTANTS.STORAGE.EXPIRATION_KEY+t,this._user.profile.exp)):(this._saveItem(this.CONSTANTS.STORAGE.LOGIN_ERROR,"Nonce received: "+this._user.profile.nonce+" is not same as requested: "+this._getItem(this.CONSTANTS.STORAGE.NONCE_IDTOKEN)),this._user=null):(e.parameters.error="invalid id_token",e.parameters.error_description="Invalid id_token. id_token: "+e.parameters[this.CONSTANTS.ID_TOKEN],this._saveItem(this.CONSTANTS.STORAGE.ERROR,"invalid id_token"),this._saveItem(this.CONSTANTS.STORAGE.ERROR_DESCRIPTION,"Invalid id_token. id_token: "+e.parameters[this.CONSTANTS.ID_TOKEN])))}else e.parameters.error="Invalid_state",e.parameters.error_description="Invalid_state. state: "+e.stateResponse,this._saveItem(this.CONSTANTS.STORAGE.ERROR,"Invalid_state"),this._saveItem(this.CONSTANTS.STORAGE.ERROR_DESCRIPTION,"Invalid_state. state: "+e.stateResponse);this._saveItem(this.CONSTANTS.STORAGE.RENEW_STATUS+t,this.CONSTANTS.TOKEN_RENEW_STATUS_COMPLETED)},i.prototype.getResourceForEndpoint=function(e){if(this.config&&this.config.anonymousEndpoints)for(var t=0;t<this.config.anonymousEndpoints.length;t++)if(e.indexOf(this.config.anonymousEndpoints[t])>-1)return null;if(this.config&&this.config.endpoints)for(var i in this.config.endpoints)if(e.indexOf(i)>-1)return this.config.endpoints[i];return e.indexOf("http://")>-1||e.indexOf("https://")>-1?this._getHostFromUri(e)===this._getHostFromUri(this.config.redirectUri)?this.config.loginResource:null:this.config.loginResource},i.prototype._getHostFromUri=function(e){var t=String(e).replace(/^(https?:)\/\//,"");return t=t.split("/")[0]},i.prototype.handleWindowCallback=function(e){if(null==e&&(e=window.location.hash),this.isCallback(e)){var t=null,i=!1;this._openedWindows.length>0&&this._openedWindows[this._openedWindows.length-1].opener&&this._openedWindows[this._openedWindows.length-1].opener._adalInstance?(t=this._openedWindows[this._openedWindows.length-1].opener._adalInstance,i=!0):window.parent&&window.parent._adalInstance&&(t=window.parent._adalInstance);var n,r,o=t.getRequestInfo(e),s=null;r=i||window.parent!==window?t._callBackMappedToRenewStates[o.stateResponse]:t.callback,t.info("Returned from redirect url"),t.saveTokenFromHash(o),o.requestType===this.REQUEST_TYPE.RENEW_TOKEN&&window.parent?(window.parent!==window?t.verbose("Window is in iframe, acquiring token silently"):t.verbose("acquiring token interactive in progress"),n=o.parameters[t.CONSTANTS.ACCESS_TOKEN]||o.parameters[t.CONSTANTS.ID_TOKEN],s=t.CONSTANTS.ACCESS_TOKEN):o.requestType===this.REQUEST_TYPE.LOGIN&&(n=o.parameters[t.CONSTANTS.ID_TOKEN],s=t.CONSTANTS.ID_TOKEN);var a=o.parameters[t.CONSTANTS.ERROR_DESCRIPTION],c=o.parameters[t.CONSTANTS.ERROR];try{r&&r(a,n,c,s)}catch(e){t.error("Error occurred in user defined callback function: "+e)}window.parent!==window||i||(t.config.navigateToLoginRequestUrl?window.location.href=t._getItem(t.CONSTANTS.STORAGE.LOGIN_REQUEST):window.location.hash="")}},i.prototype._getNavigateUrl=function(e,t){var i="common";this.config.tenant&&(i=this.config.tenant);var n=this.instance+i+"/oauth2/authorize"+this._serialize(e,this.config,t)+this._addLibMetadata();return this.info("Navigate url:"+n),n},i.prototype._extractIdToken=function(e){var t=this._decodeJwt(e);if(!t)return null;try{var i=t.JWSPayload,n=this._base64DecodeStringUrlSafe(i);return n?JSON.parse(n):(this.info("The returned id_token could not be base64 url safe decoded."),null)}catch(e){this.error("The returned id_token could not be decoded",e)}return null},i.prototype._base64DecodeStringUrlSafe=function(e){return e=e.replace(/-/g,"+").replace(/_/g,"/"),window.atob?decodeURIComponent(escape(window.atob(e))):decodeURIComponent(escape(this._decode(e)))},i.prototype._decode=function(e){var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";e=String(e).replace(/=+$/,"");var i=e.length;if(i%4==1)throw new Error("The token to be decoded is not correctly encoded.");for(var n,r,o,s,a,c,u,h,l="",p=0;p<i;p+=4){if(n=t.indexOf(e.charAt(p)),r=t.indexOf(e.charAt(p+1)),o=t.indexOf(e.charAt(p+2)),s=t.indexOf(e.charAt(p+3)),p+2===i-1){a=n<<18|r<<12|o<<6,c=a>>16&255,u=a>>8&255,l+=String.fromCharCode(c,u);break}if(p+1===i-1){a=n<<18|r<<12,c=a>>16&255,l+=String.fromCharCode(c);break}a=n<<18|r<<12|o<<6|s,c=a>>16&255,u=a>>8&255,h=255&a,l+=String.fromCharCode(c,u,h)}return l},i.prototype._decodeJwt=function(e){if(this._isEmpty(e))return null;var t=/^([^\.\s]*)\.([^\.\s]+)\.([^\.\s]*)$/,i=t.exec(e);return!i||i.length<4?(this.warn("The returned id_token is not parseable."),null):{header:i[1],JWSPayload:i[2],JWSSig:i[3]}},i.prototype._convertUrlSafeToRegularBase64EncodedString=function(e){return e.replace("-","+").replace("_","/")},i.prototype._serialize=function(e,t,i){var n=[];if(null!==t){n.push("?response_type="+e),n.push("client_id="+encodeURIComponent(t.clientId)),i&&n.push("resource="+encodeURIComponent(i)),n.push("redirect_uri="+encodeURIComponent(t.redirectUri)),n.push("state="+encodeURIComponent(t.state)),t.hasOwnProperty("slice")&&n.push("slice="+encodeURIComponent(t.slice)),t.hasOwnProperty("extraQueryParameter")&&n.push(t.extraQueryParameter);var r=t.correlationId?t.correlationId:this._guid();n.push("client-request-id="+encodeURIComponent(r))}return n.join("&")},i.prototype._deserialize=function(e){var t,i=/\+/g,n=/([^&=]+)=([^&]*)/g,r=function(e){return decodeURIComponent(e.replace(i," "))},o={};for(t=n.exec(e);t;)o[r(t[1])]=r(t[2]),t=n.exec(e);return o},i.prototype._decimalToHex=function(e){for(var t=e.toString(16);t.length<2;)t="0"+t;return t},i.prototype._guid=function(){var e=window.crypto||window.msCrypto;if(e&&e.getRandomValues){var t=new Uint8Array(16);return e.getRandomValues(t),t[6]|=64,t[6]&=79,t[8]|=128,t[8]&=191,this._decimalToHex(t[0])+this._decimalToHex(t[1])+this._decimalToHex(t[2])+this._decimalToHex(t[3])+"-"+this._decimalToHex(t[4])+this._decimalToHex(t[5])+"-"+this._decimalToHex(t[6])+this._decimalToHex(t[7])+"-"+this._decimalToHex(t[8])+this._decimalToHex(t[9])+"-"+this._decimalToHex(t[10])+this._decimalToHex(t[11])+this._decimalToHex(t[12])+this._decimalToHex(t[13])+this._decimalToHex(t[14])+this._decimalToHex(t[15])}for(var i="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx",n="0123456789abcdef",r=0,o="",s=0;s<36;s++)"-"!==i[s]&&"4"!==i[s]&&(r=16*Math.random()|0),"x"===i[s]?o+=n[r]:"y"===i[s]?(r&=3,r|=8,o+=n[r]):o+=i[s];return o},i.prototype._expiresIn=function(e){return e||(e=3599),this._now()+parseInt(e,10)},i.prototype._now=function(){return Math.round((new Date).getTime()/1e3)},i.prototype._addAdalFrame=function(e){if(void 0!==e){this.info("Add adal frame to document:"+e);var t=document.getElementById(e);if(!t){if(document.createElement&&document.documentElement&&(window.opera||-1===window.navigator.userAgent.indexOf("MSIE 5.0"))){var i=document.createElement("iframe");i.setAttribute("id",e),i.setAttribute("aria-hidden","true"),i.style.visibility="hidden",i.style.position="absolute",i.style.width=i.style.height=i.borderWidth="0px",t=document.getElementsByTagName("body")[0].appendChild(i)}else document.body&&document.body.insertAdjacentHTML&&document.body.insertAdjacentHTML("beforeEnd",'<iframe name="'+e+'" id="'+e+'" style="display:none"></iframe>');window.frames&&window.frames[e]&&(t=window.frames[e])}return t}},i.prototype._saveItem=function(e,t,i){if(this.config&&this.config.cacheLocation&&"localStorage"===this.config.cacheLocation){if(!this._supportsLocalStorage())return this.info("Local storage is not supported"),!1;if(i){var n=this._getItem(e)||"";localStorage.setItem(e,n+t+this.CONSTANTS.CACHE_DELIMETER)}else localStorage.setItem(e,t);return!0}return this._supportsSessionStorage()?(sessionStorage.setItem(e,t),!0):(this.info("Session storage is not supported"),!1)},i.prototype._getItem=function(e){return this.config&&this.config.cacheLocation&&"localStorage"===this.config.cacheLocation?this._supportsLocalStorage()?localStorage.getItem(e):(this.info("Local storage is not supported"),null):this._supportsSessionStorage()?sessionStorage.getItem(e):(this.info("Session storage is not supported"),null)},i.prototype._supportsLocalStorage=function(){try{return!!window.localStorage&&(window.localStorage.setItem("storageTest","A"),"A"==window.localStorage.getItem("storageTest")&&(window.localStorage.removeItem("storageTest"),!window.localStorage.getItem("storageTest")))}catch(e){return!1}},i.prototype._supportsSessionStorage=function(){try{return!!window.sessionStorage&&(window.sessionStorage.setItem("storageTest","A"),"A"==window.sessionStorage.getItem("storageTest")&&(window.sessionStorage.removeItem("storageTest"),!window.sessionStorage.getItem("storageTest")))}catch(e){return!1}},i.prototype._cloneConfig=function(e){if(null===e||"object"!=typeof e)return e;var t={};for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i]);return t},i.prototype._addLibMetadata=function(){return"&x-client-SKU=Js&x-client-Ver="+this._libVersion()},i.prototype.log=function(e,t,i,n){if(e<=Logging.level){if(!Logging.piiLoggingEnabled&&n)return;var r=(new Date).toUTCString(),o="";o=this.config.correlationId?r+":"+this.config.correlationId+"-"+this._libVersion()+"-"+this.CONSTANTS.LEVEL_STRING_MAP[e]+" "+t:r+":"+this._libVersion()+"-"+this.CONSTANTS.LEVEL_STRING_MAP[e]+" "+t,i&&(o+="\nstack:\n"+i.stack),Logging.log(o)}},i.prototype.error=function(e,t){this.log(this.CONSTANTS.LOGGING_LEVEL.ERROR,e,t)},i.prototype.warn=function(e){this.log(this.CONSTANTS.LOGGING_LEVEL.WARN,e,null)},i.prototype.info=function(e){this.log(this.CONSTANTS.LOGGING_LEVEL.INFO,e,null)},i.prototype.verbose=function(e){this.log(this.CONSTANTS.LOGGING_LEVEL.VERBOSE,e,null)},i.prototype.errorPii=function(e,t){this.log(this.CONSTANTS.LOGGING_LEVEL.ERROR,e,t,!0)},i.prototype.warnPii=function(e){this.log(this.CONSTANTS.LOGGING_LEVEL.WARN,e,null,!0)},i.prototype.infoPii=function(e){this.log(this.CONSTANTS.LOGGING_LEVEL.INFO,e,null,!0)},i.prototype.verbosePii=function(e){this.log(this.CONSTANTS.LOGGING_LEVEL.VERBOSE,e,null,!0)},i.prototype._libVersion=function(){return"1.0.17"},void 0!==e&&e.exports&&(e.exports=i,e.exports.inject=function(e){return new i(e)}),i}()},function(e,t,i){"use strict";var n=i(2);i.d(t,"a",function(){return n.a});var r=i(11);i.d(t,"b",function(){return r.a})},function(e,t,i){"use strict";i.d(t,"a",function(){return r});/**
@license
* @pnp/logging v1.1.5-0 - pnp - light-weight, subscribable logging framework
* MIT (https://github.com/pnp/pnpjs/blob/master/LICENSE)
* Copyright (c) 2018 Microsoft
* docs: https://pnp.github.io/pnpjs/
* source: https:github.com/pnp/pnpjs
* bugs: https://github.com/pnp/pnpjs/issues
*/
var n,r=function(){function e(){}return Object.defineProperty(e,"activeLogLevel",{get:function(){return e.instance.activeLogLevel},set:function(t){e.instance.activeLogLevel=t},enumerable:!0,configurable:!0}),Object.defineProperty(e,"instance",{get:function(){return void 0!==e._instance&&null!==e._instance||(e._instance=new o),e._instance},enumerable:!0,configurable:!0}),e.subscribe=function(){for(var t=[],i=0;i<arguments.length;i++)t[i]=arguments[i];t.map(function(t){return e.instance.subscribe(t)})},e.clearSubscribers=function(){return e.instance.clearSubscribers()},Object.defineProperty(e,"count",{get:function(){return e.instance.count},enumerable:!0,configurable:!0}),e.write=function(t,i){void 0===i&&(i=1),e.instance.log({level:i,message:t})},e.writeJSON=function(e,t){void 0===t&&(t=1),this.write(JSON.stringify(e),t)},e.log=function(t){e.instance.log(t)},e.error=function(t){e.instance.log({data:t,level:3,message:t.message})},e}(),o=function(){function e(e,t){void 0===e&&(e=2),void 0===t&&(t=[]),this.activeLogLevel=e,this.subscribers=t}return e.prototype.subscribe=function(e){this.subscribers.push(e)},e.prototype.clearSubscribers=function(){var e=this.subscribers.slice(0);return this.subscribers.length=0,e},Object.defineProperty(e.prototype,"count",{get:function(){return this.subscribers.length},enumerable:!0,configurable:!0}),e.prototype.write=function(e,t){void 0===t&&(t=1),this.log({level:t,message:e})},e.prototype.log=function(e){void 0!==e&&this.activeLogLevel<=e.level&&this.subscribers.map(function(t){return t.log(e)})},e}();!function(e){e[e.Verbose=0]="Verbose",e[e.Info=1]="Info",e[e.Warning=2]="Warning",e[e.Error=3]="Error",e[e.Off=99]="Off"}(n||(n={}));(function(){function e(){}e.prototype.log=function(e){var t=this.format(e);switch(e.level){case 0:case 1:console.log(t);break;case 2:console.warn(t);break;case 3:console.error(t)}},e.prototype.format=function(e){var t=[];return t.push("Message: "+e.message),void 0!==e.data&&t.push(" Data: "+JSON.stringify(e.data)),t.join("")}})(),function(){function e(e){this.method=e}e.prototype.log=function(e){this.method(e)}}()},function(e,t,i){"use strict";var n=i(2),r=function(){function e(e,t,i,n){void 0===t&&(t="config"),void 0===i&&(i="Title"),void 0===n&&(n="Value"),this.web=e,this.listTitle=t,this.keyFieldName=i,this.valueFieldName=n}return e.prototype.getConfiguration=function(){var e=this;return this.web.lists.getByTitle(this.listTitle).items.select(this.keyFieldName,this.valueFieldName).get().then(function(t){return t.reduce(function(t,i){return t[i[e.keyFieldName]]=i[e.valueFieldName],t},{})})},e.prototype.asCaching=function(e){return void 0===e&&(e="pnp_configcache_splist_"+this.web.toUrl()+"+"+this.listTitle),new n.a(this,e)},e}();t.a=r}])});
//# sourceMappingURL=config-store.es5.umd.bundle.min.js.map
/**
@license
* @pnp/config-store v1.1.4 - pnp - provides a way to manage configuration within your application
* @pnp/config-store v1.1.5-0 - pnp - provides a way to manage configuration within your application
* MIT (https://github.com/pnp/pnpjs/blob/master/LICENSE)

@@ -26,4 +26,5 @@ * Copyright (c) 2018 Microsoft

*/
function Settings() {
this._settings = new common.Dictionary();
function Settings(_settings) {
if (_settings === void 0) { _settings = new Map(); }
this._settings = _settings;
}

@@ -37,3 +38,3 @@ /**

Settings.prototype.add = function (key, value) {
this._settings.add(key, value);
this._settings.set(key, value);
};

@@ -47,3 +48,3 @@ /**

Settings.prototype.addJSON = function (key, value) {
this._settings.add(key, JSON.stringify(value));
this._settings.set(key, common.jsS(value));
};

@@ -59,3 +60,3 @@ /**

try {
_this._settings.merge(hash);
_this._settings = common.mergeMaps(_this._settings, common.objectToMap(hash));
resolve();

@@ -77,3 +78,3 @@ }

provider.getConfiguration().then(function (value) {
_this._settings.merge(value);
_this._settings = common.mergeMaps(_this._settings, common.objectToMap(value));
resolve();

@@ -100,3 +101,3 @@ }).catch(reject);

var o = this.get(key);
if (typeof o === "undefined" || o === null) {
if (o === undefined || o === null) {
return o;

@@ -103,0 +104,0 @@ }

/**
@license
* @pnp/config-store v1.1.4 - pnp - provides a way to manage configuration within your application
* @pnp/config-store v1.1.5-0 - pnp - provides a way to manage configuration within your application
* MIT (https://github.com/pnp/pnpjs/blob/master/LICENSE)

@@ -10,2 +10,2 @@ * Copyright (c) 2018 Microsoft

*/
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@pnp/common"),require("tslib"),require("@pnp/logging")):"function"==typeof define&&define.amd?define(["exports","@pnp/common","tslib","@pnp/logging"],t):t((e.pnp=e.pnp||{},e.pnp["config-store"]={}),e.pnp.common,e.tslib_1,e.pnp.logging)}(this,function(e,t,i,o){"use strict";var n=function(){function e(){this._settings=new t.Dictionary}return e.prototype.add=function(e,t){this._settings.add(e,t)},e.prototype.addJSON=function(e,t){this._settings.add(e,JSON.stringify(t))},e.prototype.apply=function(n){var i=this;return new Promise(function(e,t){try{i._settings.merge(n),e()}catch(e){t(e)}})},e.prototype.load=function(n){var i=this;return new Promise(function(t,e){n.getConfiguration().then(function(e){i._settings.merge(e),t()}).catch(e)})},e.prototype.get=function(e){return this._settings.get(e)},e.prototype.getJSON=function(e){var t=this.get(e);return null==t?t:JSON.parse(t)},e}(),r=function(n){function e(e){void 0===e&&(e="Cannot create a caching configuration provider since cache is not available.");var t=n.call(this,e)||this;return t.name="NoCacheAvailableException",o.Logger.log({data:{},level:3,message:"["+t.name+"]::"+t.message}),t}return i.__extends(e,n),e}(Error),s=function(){function e(e,t,n){this.wrappedProvider=e,this.cacheKey=t,this.wrappedProvider=e,this.store=n||this.selectPnPCache()}return e.prototype.getWrappedProvider=function(){return this.wrappedProvider},e.prototype.getConfiguration=function(){var t=this;return this.store&&this.store.enabled?this.store.getOrPut(this.cacheKey,function(){return t.wrappedProvider.getConfiguration().then(function(e){return t.store.put(t.cacheKey,e),e})}):this.wrappedProvider.getConfiguration()},e.prototype.selectPnPCache=function(){var e=new t.PnPClientStorage;if(e.local&&e.local.enabled)return e.local;if(e.session&&e.session.enabled)return e.session;throw new r},e}(),a=function(){function e(e,t,n,i){void 0===t&&(t="config"),void 0===n&&(n="Title"),void 0===i&&(i="Value"),this.web=e,this.listTitle=t,this.keyFieldName=n,this.valueFieldName=i}return e.prototype.getConfiguration=function(){var n=this;return this.web.lists.getByTitle(this.listTitle).items.select(this.keyFieldName,this.valueFieldName).get().then(function(e){return e.reduce(function(e,t){return e[t[n.keyFieldName]]=t[n.valueFieldName],e},{})})},e.prototype.asCaching=function(e){return void 0===e&&(e="pnp_configcache_splist_"+this.web.toUrl()+"+"+this.listTitle),new s(this,e)},e}();e.Settings=n,e.CachingConfigurationProvider=s,e.SPListConfigurationProvider=a,e.NoCacheAvailableException=r,Object.defineProperty(e,"__esModule",{value:!0})});
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@pnp/common"),require("tslib"),require("@pnp/logging")):"function"==typeof define&&define.amd?define(["exports","@pnp/common","tslib","@pnp/logging"],t):t((e.pnp=e.pnp||{},e.pnp["config-store"]={}),e.pnp.common,e.tslib_1,e.pnp.logging)}(this,function(e,o,t,i){"use strict";var n=function(){function e(e){void 0===e&&(e=new Map),this._settings=e}return e.prototype.add=function(e,t){this._settings.set(e,t)},e.prototype.addJSON=function(e,t){this._settings.set(e,o.jsS(t))},e.prototype.apply=function(n){var i=this;return new Promise(function(e,t){try{i._settings=o.mergeMaps(i._settings,o.objectToMap(n)),e()}catch(e){t(e)}})},e.prototype.load=function(n){var i=this;return new Promise(function(t,e){n.getConfiguration().then(function(e){i._settings=o.mergeMaps(i._settings,o.objectToMap(e)),t()}).catch(e)})},e.prototype.get=function(e){return this._settings.get(e)},e.prototype.getJSON=function(e){var t=this.get(e);return null==t?t:JSON.parse(t)},e}(),r=function(n){function e(e){void 0===e&&(e="Cannot create a caching configuration provider since cache is not available.");var t=n.call(this,e)||this;return t.name="NoCacheAvailableException",i.Logger.log({data:{},level:3,message:"["+t.name+"]::"+t.message}),t}return t.__extends(e,n),e}(Error),s=function(){function e(e,t,n){this.wrappedProvider=e,this.cacheKey=t,this.wrappedProvider=e,this.store=n||this.selectPnPCache()}return e.prototype.getWrappedProvider=function(){return this.wrappedProvider},e.prototype.getConfiguration=function(){var t=this;return this.store&&this.store.enabled?this.store.getOrPut(this.cacheKey,function(){return t.wrappedProvider.getConfiguration().then(function(e){return t.store.put(t.cacheKey,e),e})}):this.wrappedProvider.getConfiguration()},e.prototype.selectPnPCache=function(){var e=new o.PnPClientStorage;if(e.local&&e.local.enabled)return e.local;if(e.session&&e.session.enabled)return e.session;throw new r},e}(),a=function(){function e(e,t,n,i){void 0===t&&(t="config"),void 0===n&&(n="Title"),void 0===i&&(i="Value"),this.web=e,this.listTitle=t,this.keyFieldName=n,this.valueFieldName=i}return e.prototype.getConfiguration=function(){var n=this;return this.web.lists.getByTitle(this.listTitle).items.select(this.keyFieldName,this.valueFieldName).get().then(function(e){return e.reduce(function(e,t){return e[t[n.keyFieldName]]=t[n.valueFieldName],e},{})})},e.prototype.asCaching=function(e){return void 0===e&&(e="pnp_configcache_splist_"+this.web.toUrl()+"+"+this.listTitle),new s(this,e)},e}();e.Settings=n,e.CachingConfigurationProvider=s,e.SPListConfigurationProvider=a,e.NoCacheAvailableException=r,Object.defineProperty(e,"__esModule",{value:!0})});
/**
@license
* @pnp/config-store v1.1.4 - pnp - provides a way to manage configuration within your application
* @pnp/config-store v1.1.5-0 - pnp - provides a way to manage configuration within your application
* MIT (https://github.com/pnp/pnpjs/blob/master/LICENSE)

@@ -10,3 +10,3 @@ * Copyright (c) 2018 Microsoft

*/
import { Dictionary, PnPClientStorage } from '@pnp/common';
import { mergeMaps, objectToMap, jsS, PnPClientStorage } from '@pnp/common';
import { Logger } from '@pnp/logging';

@@ -24,4 +24,4 @@

*/
constructor() {
this._settings = new Dictionary();
constructor(_settings = new Map()) {
this._settings = _settings;
}

@@ -35,3 +35,3 @@ /**

add(key, value) {
this._settings.add(key, value);
this._settings.set(key, value);
}

@@ -45,3 +45,3 @@ /**

addJSON(key, value) {
this._settings.add(key, JSON.stringify(value));
this._settings.set(key, jsS(value));
}

@@ -56,3 +56,3 @@ /**

try {
this._settings.merge(hash);
this._settings = mergeMaps(this._settings, objectToMap(hash));
resolve();

@@ -73,3 +73,3 @@ }

provider.getConfiguration().then((value) => {
this._settings.merge(value);
this._settings = mergeMaps(this._settings, objectToMap(value));
resolve();

@@ -96,3 +96,3 @@ }).catch(reject);

const o = this.get(key);
if (typeof o === "undefined" || o === null) {
if (o === undefined || o === null) {
return o;

@@ -99,0 +99,0 @@ }

@@ -19,4 +19,4 @@ # @pnp/config-store

## UML
![Graphical UML diagram](/pnpjs/img/pnpjs-config-store-uml.svg =100%x)
![Graphical UML diagram](../../documentation/img/pnpjs-config-store-uml.svg)
Graphical UML diagram of @pnp/config-store. Right-click the diagram and open in new tab if it is too small.
{
"name": "@pnp/config-store",
"version": "1.1.4",
"version": "1.1.5-0",
"description": "pnp - provides a way to manage configuration within your application",

@@ -11,5 +11,5 @@ "main": "./dist/config-store.es5.umd.js",

"peerDependencies": {
"@pnp/common": "1.1.4",
"@pnp/sp": "1.1.4",
"@pnp/logging": "1.1.4"
"@pnp/common": "1.1.5-0",
"@pnp/sp": "1.1.5-0",
"@pnp/logging": "1.1.5-0"
},

@@ -16,0 +16,0 @@ "author": {

@@ -17,5 +17,2 @@ import { TypedHash } from "@pnp/common";

export declare class Settings {
/**
* The settings currently stored in this instance
*/
private _settings;

@@ -27,3 +24,3 @@ /**

*/
constructor();
constructor(_settings?: Map<string, string>);
/**

@@ -30,0 +27,0 @@ * Adds a new single setting, or overwrites a previous setting with the same key

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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