@pnp/config-store
Advanced tools
Comparing version 1.3.10 to 1.3.11
/** | ||
* @license | ||
* v1.3.10 | ||
* v1.3.11 | ||
* MIT (https://github.com/pnp/pnpjs/blob/master/LICENSE) | ||
@@ -5,0 +5,0 @@ * Copyright (c) 2020 Microsoft |
/** | ||
* @license | ||
* v1.3.10 | ||
* v1.3.11 | ||
* MIT (https://github.com/pnp/pnpjs/blob/master/LICENSE) | ||
@@ -27,3 +27,3 @@ * Copyright (c) 2020 Microsoft | ||
/*! adal-angular v1.0.17 2018-02-27 */ | ||
var n=function(){"use strict";return n=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},n.prototype._singletonInstance)return n.prototype._singletonInstance;if(n.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){}}),n.prototype.login=function(){if(this._loginInProgress)this.info("Login in progress");else{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)}},n.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}},n.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)},n.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){if(this._openedWindows.push(n),-1!=this.config.redirectUri.indexOf("#"))var o=this.config.redirectUri.split("#")[0];else o=this.config.redirectUri;var s=this,a=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 s.isAngular&&s._broadcast("adal:popUpClosed",i+s.CONSTANTS.RESOURCE_DELIMETER+e),s._handlePopupError(r,t,e,i,i),void window.clearInterval(a)}try{var c=n.location;if(-1!=encodeURI(c.href).indexOf(encodeURI(o)))return s.isAngular?s._broadcast("adal:popUpHashChanged",c.hash):s.handleWindowCallback(c.hash),window.clearInterval(a),s._loginInProgress=!1,s._acquireTokenInProgress=!1,s.info("Closing popup window"),s._openedWindows=[],void n.close()}catch(e){}}),1)}else{var c="Popup Window is null. This can happen if you are using IE";this._handlePopupError(r,t,"Error opening popup",c,c)}},n.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)},n.prototype.loginInProgress=function(){return this._loginInProgress},n.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},n.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)},n.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},n.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})},n.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)},n.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?null:this.config.clientId,o=(t=t||"id_token",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)},n.prototype._urlContainsQueryStringParameter=function(e,t){return new RegExp("[\\?&]"+e+"=").test(t)},n.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.replace(i,"")},n.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)},n.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)},n.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"))},n.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)},n.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)},n.prototype.promptUser=function(e){e?(this.infoPii("Navigate to:"+e),window.location.replace(e)):this.info("Navigate url is empty")},n.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,"")},n.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))},n.prototype.logOut=function(){var e;if(this.clearCache(),this._user=null,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)},n.prototype._isEmpty=function(e){return void 0===e||!e||0===e.length},n.prototype.getUser=function(e){if("function"!=typeof e)throw new Error("callback is not a function");if(this._user)e(null,this._user);else{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))}},n.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},n.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},n.prototype._getHash=function(e){return e.indexOf("#/")>-1?e=e.substring(e.indexOf("#/")+2):e.indexOf("#")>-1&&(e=e.substring(1)),e},n.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)},n.prototype.getLoginError=function(){return this._getItem(this.CONSTANTS.STORAGE.LOGIN_ERROR)},n.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},n.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},n.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(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},n.prototype._getResourceFromState=function(e){if(e){var t=e.indexOf("|");if(t>-1&&t+1<e.length)return e.substring(t+1)}return""},n.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){var i;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]),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)},n.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},n.prototype._getHostFromUri=function(e){var t=String(e).replace(/^(https?:)\/\//,"");return t.split("/")[0]},n.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="")}},n.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},n.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},n.prototype._base64DecodeStringUrlSafe=function(e){return e=e.replace(/-/g,"+").replace(/_/g,"/"),window.atob?decodeURIComponent(escape(window.atob(e))):decodeURIComponent(escape(this._decode(e)))},n.prototype._decode=function(e){var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",i=(e=String(e).replace(/=+$/,"")).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){c=(a=n<<18|r<<12|o<<6)>>16&255,u=a>>8&255,l+=String.fromCharCode(c,u);break}if(p+1===i-1){c=(a=n<<18|r<<12)>>16&255,l+=String.fromCharCode(c);break}c=(a=n<<18|r<<12|o<<6|s)>>16&255,u=a>>8&255,h=255&a,l+=String.fromCharCode(c,u,h)}return l},n.prototype._decodeJwt=function(e){if(this._isEmpty(e))return null;var t=/^([^\.\s]*)\.([^\.\s]+)\.([^\.\s]*)$/.exec(e);return!t||t.length<4?(this.warn("The returned id_token is not parseable."),null):{header:t[1],JWSPayload:t[2],JWSSig:t[3]}},n.prototype._convertUrlSafeToRegularBase64EncodedString=function(e){return e.replace("-","+").replace("_","/")},n.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("&")},n.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},n.prototype._decimalToHex=function(e){for(var t=e.toString(16);t.length<2;)t="0"+t;return t},n.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,o+=n[r|=8]):o+=i[s];return o},n.prototype._expiresIn=function(e){return e||(e=3599),this._now()+parseInt(e,10)},n.prototype._now=function(){return Math.round((new Date).getTime()/1e3)},n.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}},n.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)},n.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)},n.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}},n.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}},n.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},n.prototype._addLibMetadata=function(){return"&x-client-SKU=Js&x-client-Ver="+this._libVersion()},n.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)}},n.prototype.error=function(e,t){this.log(this.CONSTANTS.LOGGING_LEVEL.ERROR,e,t)},n.prototype.warn=function(e){this.log(this.CONSTANTS.LOGGING_LEVEL.WARN,e,null)},n.prototype.info=function(e){this.log(this.CONSTANTS.LOGGING_LEVEL.INFO,e,null)},n.prototype.verbose=function(e){this.log(this.CONSTANTS.LOGGING_LEVEL.VERBOSE,e,null)},n.prototype.errorPii=function(e,t){this.log(this.CONSTANTS.LOGGING_LEVEL.ERROR,e,t,!0)},n.prototype.warnPii=function(e){this.log(this.CONSTANTS.LOGGING_LEVEL.WARN,e,null,!0)},n.prototype.infoPii=function(e){this.log(this.CONSTANTS.LOGGING_LEVEL.INFO,e,null,!0)},n.prototype.verbosePii=function(e){this.log(this.CONSTANTS.LOGGING_LEVEL.VERBOSE,e,null,!0)},n.prototype._libVersion=function(){return"1.0.17"},e.exports&&(e.exports=n,e.exports.inject=function(e){return new n(e)}),n}()},function(e,t){var i;i=function(){return this}();try{i=i||new Function("return this")()}catch(e){"object"==typeof window&&(i=window)}e.exports=i},function(e,t,i){"use strict";i.r(t);var n=i(2),r=i(1),o=i(0),s=i(3);function a(e){var t=document.createElement("a");return t.href=e,t.protocol+"//"+t.hostname}!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._displayCallback=null,r._loginPromise=null,r}n.a(t,e),t.fromSPFxContext=function(e){return new c(e)},t.prototype.fetch=function(t,i){var n=this;if(!Object(o.e)(t))throw Error("You must supply absolute urls to AdalClient.fetch.");return this.getToken(a(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(Error(e));n(t)}))})).catch(r)}))},t.prototype.ensureAuthContext=function(){var e=this;return new Promise((function(i){null===t._authContext&&(t._authContext=s.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(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._authContext=null}(r.a);var c=function(e){function t(t){var i=e.call(this,null)||this;return i.context=t,i}return n.a(t,e),t.prototype.fetch=function(t,i){var n=this;return this.getToken(a(t)).then((function(r){return n.token=r,e.prototype.fetch.call(n,t,i)}))},t.prototype.getToken=function(e){return this.context.aadTokenProviderFactory.getTokenProvider().then((function(t){return t.getToken(e)}))},t}(r.a),u=Object(o.d)(Object.entries)?Object.entries:function(e){return Object.keys(e).map((function(t){return[t,e[t]]}))};function h(e){return null!=e?new Map(u(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}var p=["defaultCachingStore","defaultCachingTimeoutSeconds","globalCacheDisable","enableCacheExpiration","cacheExpirationIntervalMilliseconds","spfxContext"],d=new(function(){function e(e){void 0===e&&(e=new Map),this._v=e,this._v.set(p[0],"session"),this._v.set(p[1],60),this._v.set(p[2],!1),this._v.set(p[3],!1),this._v.set(p[4],750),this._v.set(p[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(p[0])},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"defaultCachingTimeoutSeconds",{get:function(){return this.get(p[1])},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"globalCacheDisable",{get:function(){return this.get(p[2])},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"enableCacheExpiration",{get:function(){return this.get(p[3])},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"cacheExpirationIntervalMilliseconds",{get:function(){return this.get(p[4])},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"spfxContext",{get:function(){return this.get(p[5])},enumerable:!0,configurable:!0}),e}()),T=function(){function e(e,t){void 0===t&&(t=-1),this.store=e,this.defaultTimeoutMinutes=t,this.enabled=this.test(),d.enableCacheExpiration&&this.cacheExpirationHandler()}return e.prototype.get=function(e){if(!this.enabled)return null;var t=this.store.getItem(e);if(!Object(o.g)(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;if(!this.enabled)return t();var r=this.get(e);return null===r?t().then((function(t){return n.put(e,t,i),t})):Promise.resolve(r)},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=d.defaultCachingTimeoutSeconds;this.defaultTimeoutMinutes>0&&(i=60*this.defaultTimeoutMinutes),t=Object(o.a)(new Date,"second",i)}return Object(o.f)({pnp:1,expiration:t,value:e})},e.prototype.cacheExpirationHandler=function(){var e=this;this.deleteExpired().then((function(t){setTimeout(Object(o.c)(e,e.cacheExpirationHandler),d.cacheExpirationIntervalMilliseconds)})).catch((function(e){console.error(e)}))},e}(),_=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}(),f=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("local")),this._local},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"session",{get:function(){return null===this._session&&(this._session=this.getStore("session")),this._session},enumerable:!0,configurable:!0}),e.prototype.getStore=function(e){return new T("local"===e?"undefined"==typeof localStorage?new _:localStorage:"undefined"==typeof sessionStorage?new _:sessionStorage)},e}(),S=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(o.f)(t))},e.prototype.apply=function(e){var t=this;return new Promise((function(i,n){try{t._settings=l(t._settings,h(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=l(t._settings,h(e)),i()})).catch(n)}))},e.prototype.get=function(e){return this._settings.get(e)||null},e.prototype.getJSON=function(e){var t=this.get(e);return null==t?t:JSON.parse(t)},e}(),E=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 f;if(e.local&&e.local.enabled)return e.local;if(e.session&&e.session.enabled)return e.session;throw Error("Cannot create a caching configuration provider since cache is not available.")},e}(),g=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 E(this,e)},e}();i.d(t,"Settings",(function(){return S})),i.d(t,"CachingConfigurationProvider",(function(){return E})),i.d(t,"SPListConfigurationProvider",(function(){return g}))}])})); | ||
var n=function(){"use strict";return n=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},n.prototype._singletonInstance)return n.prototype._singletonInstance;if(n.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){}}),n.prototype.login=function(){if(this._loginInProgress)this.info("Login in progress");else{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)}},n.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}},n.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)},n.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){if(this._openedWindows.push(n),-1!=this.config.redirectUri.indexOf("#"))var o=this.config.redirectUri.split("#")[0];else o=this.config.redirectUri;var s=this,a=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 s.isAngular&&s._broadcast("adal:popUpClosed",i+s.CONSTANTS.RESOURCE_DELIMETER+e),s._handlePopupError(r,t,e,i,i),void window.clearInterval(a)}try{var c=n.location;if(-1!=encodeURI(c.href).indexOf(encodeURI(o)))return s.isAngular?s._broadcast("adal:popUpHashChanged",c.hash):s.handleWindowCallback(c.hash),window.clearInterval(a),s._loginInProgress=!1,s._acquireTokenInProgress=!1,s.info("Closing popup window"),s._openedWindows=[],void n.close()}catch(e){}}),1)}else{var c="Popup Window is null. This can happen if you are using IE";this._handlePopupError(r,t,"Error opening popup",c,c)}},n.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)},n.prototype.loginInProgress=function(){return this._loginInProgress},n.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},n.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)},n.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},n.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})},n.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)},n.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?null:this.config.clientId,o=(t=t||"id_token",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)},n.prototype._urlContainsQueryStringParameter=function(e,t){return new RegExp("[\\?&]"+e+"=").test(t)},n.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.replace(i,"")},n.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)},n.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)},n.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"))},n.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)},n.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)},n.prototype.promptUser=function(e){e?(this.infoPii("Navigate to:"+e),window.location.replace(e)):this.info("Navigate url is empty")},n.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,"")},n.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))},n.prototype.logOut=function(){var e;if(this.clearCache(),this._user=null,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)},n.prototype._isEmpty=function(e){return void 0===e||!e||0===e.length},n.prototype.getUser=function(e){if("function"!=typeof e)throw new Error("callback is not a function");if(this._user)e(null,this._user);else{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))}},n.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},n.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},n.prototype._getHash=function(e){return e.indexOf("#/")>-1?e=e.substring(e.indexOf("#/")+2):e.indexOf("#")>-1&&(e=e.substring(1)),e},n.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)},n.prototype.getLoginError=function(){return this._getItem(this.CONSTANTS.STORAGE.LOGIN_ERROR)},n.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},n.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},n.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(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},n.prototype._getResourceFromState=function(e){if(e){var t=e.indexOf("|");if(t>-1&&t+1<e.length)return e.substring(t+1)}return""},n.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){var i;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]),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)},n.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},n.prototype._getHostFromUri=function(e){var t=String(e).replace(/^(https?:)\/\//,"");return t.split("/")[0]},n.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="")}},n.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},n.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},n.prototype._base64DecodeStringUrlSafe=function(e){return e=e.replace(/-/g,"+").replace(/_/g,"/"),window.atob?decodeURIComponent(escape(window.atob(e))):decodeURIComponent(escape(this._decode(e)))},n.prototype._decode=function(e){var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",i=(e=String(e).replace(/=+$/,"")).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){c=(a=n<<18|r<<12|o<<6)>>16&255,u=a>>8&255,l+=String.fromCharCode(c,u);break}if(p+1===i-1){c=(a=n<<18|r<<12)>>16&255,l+=String.fromCharCode(c);break}c=(a=n<<18|r<<12|o<<6|s)>>16&255,u=a>>8&255,h=255&a,l+=String.fromCharCode(c,u,h)}return l},n.prototype._decodeJwt=function(e){if(this._isEmpty(e))return null;var t=/^([^\.\s]*)\.([^\.\s]+)\.([^\.\s]*)$/.exec(e);return!t||t.length<4?(this.warn("The returned id_token is not parseable."),null):{header:t[1],JWSPayload:t[2],JWSSig:t[3]}},n.prototype._convertUrlSafeToRegularBase64EncodedString=function(e){return e.replace("-","+").replace("_","/")},n.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("&")},n.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},n.prototype._decimalToHex=function(e){for(var t=e.toString(16);t.length<2;)t="0"+t;return t},n.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,o+=n[r|=8]):o+=i[s];return o},n.prototype._expiresIn=function(e){return e||(e=3599),this._now()+parseInt(e,10)},n.prototype._now=function(){return Math.round((new Date).getTime()/1e3)},n.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}},n.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)},n.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)},n.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}},n.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}},n.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},n.prototype._addLibMetadata=function(){return"&x-client-SKU=Js&x-client-Ver="+this._libVersion()},n.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)}},n.prototype.error=function(e,t){this.log(this.CONSTANTS.LOGGING_LEVEL.ERROR,e,t)},n.prototype.warn=function(e){this.log(this.CONSTANTS.LOGGING_LEVEL.WARN,e,null)},n.prototype.info=function(e){this.log(this.CONSTANTS.LOGGING_LEVEL.INFO,e,null)},n.prototype.verbose=function(e){this.log(this.CONSTANTS.LOGGING_LEVEL.VERBOSE,e,null)},n.prototype.errorPii=function(e,t){this.log(this.CONSTANTS.LOGGING_LEVEL.ERROR,e,t,!0)},n.prototype.warnPii=function(e){this.log(this.CONSTANTS.LOGGING_LEVEL.WARN,e,null,!0)},n.prototype.infoPii=function(e){this.log(this.CONSTANTS.LOGGING_LEVEL.INFO,e,null,!0)},n.prototype.verbosePii=function(e){this.log(this.CONSTANTS.LOGGING_LEVEL.VERBOSE,e,null,!0)},n.prototype._libVersion=function(){return"1.0.17"},e.exports&&(e.exports=n,e.exports.inject=function(e){return new n(e)}),n}()},function(e,t){var i;i=function(){return this}();try{i=i||new Function("return this")()}catch(e){"object"==typeof window&&(i=window)}e.exports=i},function(e,t,i){"use strict";i.r(t);var n=i(2),r=i(1),o=i(0),s=i(3);function a(e){var t=document.createElement("a");return t.href=e,t.protocol+"//"+t.hostname}!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._displayCallback=null,r._loginPromise=null,r}n.a(t,e),t.fromSPFxContext=function(e){return new c(e)},t.prototype.fetch=function(t,i){var n=this;if(!Object(o.e)(t))throw Error("You must supply absolute urls to AdalClient.fetch.");return this.getToken(a(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(Error(e));n(t)}))})).catch(r)}))},t.prototype.ensureAuthContext=function(){var e=this;return new Promise((function(i){null===t._authContext&&(t._authContext=s.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=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(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._authContext=null}(r.a);var c=function(e){function t(t){var i=e.call(this,null)||this;return i.context=t,i}return n.a(t,e),t.prototype.fetch=function(t,i){var n=this;return this.getToken(a(t)).then((function(r){return n.token=r,e.prototype.fetch.call(n,t,i)}))},t.prototype.getToken=function(e){return this.context.aadTokenProviderFactory.getTokenProvider().then((function(t){return t.getToken(e)}))},t}(r.a),u=Object(o.d)(Object.entries)?Object.entries:function(e){return Object.keys(e).map((function(t){return[t,e[t]]}))};function h(e){return null!=e?new Map(u(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}var p=["defaultCachingStore","defaultCachingTimeoutSeconds","globalCacheDisable","enableCacheExpiration","cacheExpirationIntervalMilliseconds","spfxContext"],d=new(function(){function e(e){void 0===e&&(e=new Map),this._v=e,this._v.set(p[0],"session"),this._v.set(p[1],60),this._v.set(p[2],!1),this._v.set(p[3],!1),this._v.set(p[4],750),this._v.set(p[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(p[0])},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"defaultCachingTimeoutSeconds",{get:function(){return this.get(p[1])},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"globalCacheDisable",{get:function(){return this.get(p[2])},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"enableCacheExpiration",{get:function(){return this.get(p[3])},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"cacheExpirationIntervalMilliseconds",{get:function(){return this.get(p[4])},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"spfxContext",{get:function(){return this.get(p[5])},enumerable:!0,configurable:!0}),e}()),T=function(){function e(e,t){void 0===t&&(t=-1),this.store=e,this.defaultTimeoutMinutes=t,this.enabled=this.test(),d.enableCacheExpiration&&this.cacheExpirationHandler()}return e.prototype.get=function(e){if(!this.enabled)return null;var t=this.store.getItem(e);if(!Object(o.g)(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;if(!this.enabled)return t();var r=this.get(e);return null===r?t().then((function(t){return n.put(e,t,i),t})):Promise.resolve(r)},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=d.defaultCachingTimeoutSeconds;this.defaultTimeoutMinutes>0&&(i=60*this.defaultTimeoutMinutes),t=Object(o.a)(new Date,"second",i)}return Object(o.f)({pnp:1,expiration:t,value:e})},e.prototype.cacheExpirationHandler=function(){var e=this;this.deleteExpired().then((function(t){setTimeout(Object(o.c)(e,e.cacheExpirationHandler),d.cacheExpirationIntervalMilliseconds)})).catch((function(e){console.error(e)}))},e}(),_=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}(),f=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("local")),this._local},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"session",{get:function(){return null===this._session&&(this._session=this.getStore("session")),this._session},enumerable:!0,configurable:!0}),e.prototype.getStore=function(e){return new T("local"===e?"undefined"==typeof localStorage?new _:localStorage:"undefined"==typeof sessionStorage?new _:sessionStorage)},e}(),S=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(o.f)(t))},e.prototype.apply=function(e){var t=this;return new Promise((function(i,n){try{t._settings=l(t._settings,h(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=l(t._settings,h(e)),i()})).catch(n)}))},e.prototype.get=function(e){return this._settings.get(e)||null},e.prototype.getJSON=function(e){var t=this.get(e);return null==t?t:JSON.parse(t)},e}(),E=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 f;if(e.local&&e.local.enabled)return e.local;if(e.session&&e.session.enabled)return e.session;throw Error("Cannot create a caching configuration provider since cache is not available.")},e}(),g=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 E(this,e)},e}();i.d(t,"Settings",(function(){return S})),i.d(t,"CachingConfigurationProvider",(function(){return E})),i.d(t,"SPListConfigurationProvider",(function(){return g}))}])})); | ||
//# sourceMappingURL=config-store.es5.umd.bundle.min.js.map |
/** | ||
* @license | ||
* v1.3.10 | ||
* v1.3.11 | ||
* MIT (https://github.com/pnp/pnpjs/blob/master/LICENSE) | ||
@@ -5,0 +5,0 @@ * Copyright (c) 2020 Microsoft |
/** | ||
* @license | ||
* v1.3.10 | ||
* v1.3.11 | ||
* MIT (https://github.com/pnp/pnpjs/blob/master/LICENSE) | ||
@@ -5,0 +5,0 @@ * Copyright (c) 2020 Microsoft |
/** | ||
* @license | ||
* v1.3.10 | ||
* v1.3.11 | ||
* MIT (https://github.com/pnp/pnpjs/blob/master/LICENSE) | ||
@@ -5,0 +5,0 @@ * Copyright (c) 2020 Microsoft |
{ | ||
"name": "@pnp/config-store", | ||
"version": "1.3.10", | ||
"version": "1.3.11", | ||
"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.3.10", | ||
"@pnp/sp": "1.3.10", | ||
"@pnp/logging": "1.3.10" | ||
"@pnp/common": "1.3.11", | ||
"@pnp/sp": "1.3.11", | ||
"@pnp/logging": "1.3.11" | ||
}, | ||
@@ -16,0 +16,0 @@ "author": { |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
485466