UNPKG

@pnp/pnpjs

Version:

pnp - rollup library of all functionality

2 lines 261 kB
/*! For license information please see pnp.js.LICENSE.txt */ !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()}(self,(function(){return(()=>{"use strict";var e={d:(t,n)=>{for(var r in n)e.o(n,r)&&!e.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:n[r]})}};e.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),e.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),e.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var t={};e.r(t),e.d(t,{Batch:()=>ee,BearerTokenFetchClient:()=>Q,BlobParser:()=>Ie,BufferParser:()=>Te,CachingConfigurationProvider:()=>Z,CachingOptions:()=>ne,CachingParserWrapper:()=>re,ConsoleListener:()=>u,DefaultRuntime:()=>M,FetchClient:()=>G,FunctionListener:()=>a,GraphNS:()=>r,HttpRequestError:()=>Ue,JSONParser:()=>we,LambdaFetchClient:()=>z,LambdaParser:()=>Ce,LogLevel:()=>i,Logger:()=>o,ODataParser:()=>Pe,PipelineMethods:()=>Be,PnPClientStorage:()=>$,PnPClientStorageWrapper:()=>X,Queryable:()=>Fe,Runtime:()=>N,SPFxAdalClient:()=>K,SPListConfigurationProvider:()=>Qt,SPNS:()=>n,Settings:()=>Y,TextParser:()=>Se,addProp:()=>ie,assign:()=>v,body:()=>_e,clearGlobalExtensions:()=>he,cloneQueryableData:()=>Re,combine:()=>p,config:()=>Ic,dateAdd:()=>l,default:()=>Cc,defaultPipelineBinder:()=>Ae,disableExtensions:()=>fe,enableExtensions:()=>ye,extendFactory:()=>pe,extendGlobal:()=>ce,extendObj:()=>le,getADALResource:()=>V,getCtxCallback:()=>c,getDefaultPipeline:()=>je,getGUID:()=>h,getHashCode:()=>w,getRandomString:()=>d,graph:()=>Pc,hOP:()=>I,headers:()=>Ee,invokableFactory:()=>be,isArray:()=>g,isFunc:()=>f,isUrlAbsolute:()=>m,jsS:()=>S,log:()=>wc,mergeHeaders:()=>W,mergeMaps:()=>U,mergeOptions:()=>H,objectDefinedNotNull:()=>y,objectToMap:()=>C,onRuntimeCreate:()=>E,pipe:()=>xe,pipelineBinder:()=>ke,requestPipelineMethod:()=>Le,safeGlobal:()=>q,sanitizeGuid:()=>P,setResult:()=>Oe,setup:()=>Tc,sp:()=>bc,storage:()=>Sc,stringIsNullOrEmpty:()=>b,util:()=>mc});var n={};e.r(n),e.d(n,{AddFieldOptions:()=>Lr,App:()=>Hn,AppCatalog:()=>qn,Attachment:()=>zn,Attachments:()=>Gn,CalendarType:()=>Br,CanvasColumn:()=>cr,CanvasSection:()=>ar,CheckinType:()=>dn,Children:()=>es,ChoiceFieldFormatType:()=>Ar,ClientsidePageFromFile:()=>sr,ClientsideText:()=>pr,ClientsideWebpart:()=>dr,ColumnControl:()=>lr,Comment:()=>er,Comments:()=>Yn,ContentType:()=>Pr,ContentTypes:()=>mr,ControlMode:()=>Dt,CreateClientsidePage:()=>ur,DateTimeFieldFormatType:()=>Dr,DateTimeFieldFriendlyFormatType:()=>xr,Feature:()=>Fr,Features:()=>Ur,Field:()=>Mr,FieldLink:()=>Tr,FieldLinks:()=>Ir,FieldTypes:()=>Or,FieldUserSelectionMode:()=>kr,Fields:()=>Er,File:()=>kn,Files:()=>Bn,Folder:()=>gr,Folders:()=>fr,Form:()=>Vr,Forms:()=>Wr,HubSite:()=>Kr,HubSites:()=>Qr,Item:()=>Et,ItemVersion:()=>Wt,ItemVersions:()=>Mt,Items:()=>At,LimitedWebPartManager:()=>ms,List:()=>jt,Lists:()=>Lt,MoveOperations:()=>hn,MySocial:()=>jo,Navigation:()=>ei,NavigationNode:()=>Yr,NavigationNodes:()=>Jr,NavigationService:()=>ni,PageType:()=>Xt,PagedItemCollection:()=>Ht,PermissionKind:()=>Ni,PrincipalSource:()=>Kt,PrincipalType:()=>zt,Profiles:()=>oi,PromotedState:()=>Jn,QueryPropertyValueType:()=>xi,RegionalSettings:()=>pi,RelatedItemManager:()=>Ti,Relation:()=>as,Relations:()=>ss,RenderListDataOptions:()=>Ot,ReorderingRuleMatchType:()=>Di,Replies:()=>nr,RoleAssignment:()=>ro,RoleAssignments:()=>to,RoleDefinition:()=>uo,RoleDefinitions:()=>oo,RoleType:()=>Gi,SPBatch:()=>vt,SPHttpClient:()=>We,SPRest:()=>Pt,SPSharedObjectType:()=>qi,Search:()=>ji,SearchBuiltInSourceId:()=>Ei,SearchQueryBuilder:()=>Fi,SearchResults:()=>ki,SharePointQueryable:()=>it,SharePointQueryableCollection:()=>st,SharePointQueryableInstance:()=>at,SharingDomainRestrictionMode:()=>Wi,SharingLinkKind:()=>Vi,SharingOperationStatusCode:()=>Hi,SharingRole:()=>Mi,Site:()=>wt,SiteDesigns:()=>Po,SiteGroup:()=>Zi,SiteGroups:()=>$i,SiteScripts:()=>To,SiteUser:()=>Xi,SiteUsers:()=>zi,Social:()=>xo,SocialActorType:()=>Uo,SocialActorTypes:()=>Ro,SocialFollowResult:()=>Fo,SocialStatusCode:()=>Oo,SortDirection:()=>Oi,Subscription:()=>Wo,Subscriptions:()=>Mo,Suggest:()=>_i,TemplateFileType:()=>fn,Term:()=>is,TermGroup:()=>Ko,TermGroups:()=>Qo,TermSet:()=>Yo,TermSets:()=>Jo,TermStore:()=>Vo,Terms:()=>ns,TimeZone:()=>hi,TimeZones:()=>yi,UrlFieldFormatType:()=>jr,UrlZone:()=>ri,UserCustomAction:()=>Ii,UserCustomActionRegistrationType:()=>vi,UserCustomActionScope:()=>mi,UserCustomActions:()=>Pi,Utilities:()=>_o,Version:()=>Nn,Versions:()=>_n,View:()=>hs,ViewFields:()=>ys,ViewScope:()=>cs,Views:()=>ps,Web:()=>Rt,WebPartDefinition:()=>ws,WebPartDefinitions:()=>Ss,WebPartsPersonalizationScope:()=>gs,Webs:()=>Ct,containsInvalidFileFolderChars:()=>Zt,defaultPath:()=>pt,escapeQueryStrValue:()=>St,extractWebUrl:()=>Me,objectToSPKeyValueCollection:()=>Jt,odataUrlFrom:()=>dt,registerCustomRequestClientFactory:()=>Qe,sp:()=>Ts,spDelete:()=>Ye,spGet:()=>Je,spInvokableFactory:()=>nt,spODataEntity:()=>yt,spODataEntityArray:()=>gt,spPatch:()=>Ze,spPost:()=>$e,spPostDelete:()=>et,spPostDeleteETag:()=>tt,stripInvalidFileFolderChars:()=>en,toAbsoluteUrl:()=>Ge});var r={};e.r(r),e.d(r,{Attachment:()=>zs,Attachments:()=>Xs,Bucket:()=>$a,Buckets:()=>Za,Calendar:()=>cu,Calendars:()=>pu,Channel:()=>pc,Channels:()=>hc,Contact:()=>wu,ContactFolder:()=>Ru,ContactFolders:()=>Ou,Contacts:()=>Cu,Conversation:()=>Bs,Conversations:()=>ks,DirectoryObject:()=>Zs,DirectoryObjectTypes:()=>Js,DirectoryObjects:()=>tu,Drive:()=>ca,DriveItem:()=>ya,DriveItems:()=>va,Drives:()=>pa,Event:()=>hu,Events:()=>yu,GraphBatch:()=>un,GraphEndpoints:()=>ln,GraphHttpClient:()=>on,GraphQueryable:()=>Cn,GraphQueryableCollection:()=>Rn,GraphQueryableInstance:()=>xn,GraphQueryableSearchableCollection:()=>On,GraphRest:()=>an,Group:()=>ru,GroupType:()=>$s,Groups:()=>ou,Insights:()=>xu,Invitations:()=>zu,MailFolder:()=>ra,MailFolders:()=>oa,MailboxSettings:()=>ua,Member:()=>Xu,Members:()=>$u,Message:()=>Zu,Messages:()=>ta,Notebook:()=>Sa,Notebooks:()=>wa,OneNote:()=>ba,People:()=>Su,Photo:()=>ka,Plan:()=>qa,PlanDetails:()=>Na,Planner:()=>_a,Plans:()=>Ha,Post:()=>qs,Posts:()=>Hs,Resource:()=>Gu,Root:()=>ha,Search:()=>tc,Section:()=>Ca,Sections:()=>Ra,Senders:()=>Gs,SharedInsight:()=>qu,SharedInsights:()=>Hu,Subscription:()=>rc,Subscriptions:()=>oc,Tab:()=>yc,Tabs:()=>vc,Task:()=>za,TaskDetails:()=>Ga,Tasks:()=>Xa,Team:()=>uc,Teams:()=>cc,Thread:()=>_s,Threads:()=>Ns,TrendingInsight:()=>Bu,TrendingInsights:()=>ku,UsedInsight:()=>_u,UsedInsights:()=>Nu,User:()=>vu,Users:()=>bu,graph:()=>cn,graphDelete:()=>Pn,graphGet:()=>mn,graphPatch:()=>Sn,graphPost:()=>bn,graphPut:()=>In,registerCustomRequestClientFactory:()=>pn,toAbsoluteUrl:()=>sn});var i,o=function(){function e(){}return Object.defineProperty(e,"activeLogLevel",{get:function(){return e.instance.activeLogLevel},set:function(t){e.instance.activeLogLevel=t},enumerable:!1,configurable:!0}),Object.defineProperty(e,"instance",{get:function(){return void 0!==e._instance&&null!==e._instance||(e._instance=new s),e._instance},enumerable:!1,configurable:!0}),e.subscribe=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];t.forEach((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:!1,configurable:!0}),e.write=function(t,n){void 0===n&&(n=1),e.instance.log({level:n,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}(),s=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:!1,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"}(i||(i={}));var u=function(){function e(){}return 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=[];if(t.push("Message: "+e.message),void 0!==e.data)try{t.push(" Data: "+JSON.stringify(e.data))}catch(e){t.push(" Data: Error in stringify of supplied data "+e)}return t.join("")},e}(),a=function(){function e(e){this.method=e}return e.prototype.log=function(e){this.method(e)},e}();function c(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return function(){t.apply(e,n)}}function l(e,t,n){var r=new Date(e.toString());switch(t.toLowerCase()){case"year":r.setFullYear(r.getFullYear()+n);break;case"quarter":r.setMonth(r.getMonth()+3*n);break;case"month":r.setMonth(r.getMonth()+n);break;case"week":r.setDate(r.getDate()+7*n);break;case"day":r.setDate(r.getDate()+n);break;case"hour":r.setTime(r.getTime()+36e5*n);break;case"minute":r.setTime(r.getTime()+6e4*n);break;case"second":r.setTime(r.getTime()+1e3*n);break;default:r=void 0}return r}function p(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e.filter((function(e){return!b(e)})).map((function(e){return e.replace(/^[\\|/]/,"").replace(/[\\|/]$/,"")})).join("/").replace(/\\/g,"/")}function d(e){for(var t=new Array(e),n=0;n<e;n++)t[n]="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789".charAt(Math.floor(62*Math.random()));return t.join("")}function h(){var e=Date.now();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(t){var n=(e+16*Math.random())%16|0;return e=Math.floor(e/16),("x"===t?n:3&n|8).toString(16)}))}function f(e){return"function"==typeof e}function y(e){return null!=e}function g(e){return Array.isArray?Array.isArray(e):e&&"number"==typeof e.length&&e.constructor===Array}function v(e,t,n,r){if(void 0===n&&(n=!1),void 0===r&&(r=function(){return!0}),!y(t))return e;var i=n?function(e,t){return!(t in e)}:function(){return!0};return Object.getOwnPropertyNames(t).filter((function(t){return i(e,t)&&r(t)})).reduce((function(e,n){return e[n]=t[n],e}),e)}function m(e){return/^https?:\/\/|^\/\//i.test(e)}function b(e){return null==e||e.length<1}function P(e){if(b(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 S(e){return JSON.stringify(e)}function I(e,t){return Object.hasOwnProperty.call(e,t)}function w(e){var t=0;if(0===e.length)return t;for(var n=0;n<e.length;n++)t=(t<<5)-t+e.charCodeAt(n),t|=0;return t}var T=f(Object.entries)?Object.entries:function(e){return Object.keys(e).map((function(t){return[t,e[t]]}))};function C(e){return y(e)?new Map(T(e)):new Map}function U(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];for(var r=0;r<t.length;r++)t[r].forEach((function(t,n){"string"==typeof n&&"spfxContext"!==n&&"[object Object]"===Object.prototype.toString.call(t)?e.set(n,Object.assign({},e.get(n)||{},t)):e.set(n,t)}));return e}var R=function(e,t){return R=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},R(e,t)};function F(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}R(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var O=function(){return O=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},O.apply(this,arguments)};function D(e,t,n,r){var i,o=arguments.length,s=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var u=e.length-1;u>=0;u--)(i=e[u])&&(s=(o<3?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s}function x(e,t,n,r){return new(n||(n=Promise))((function(i,o){function s(e){try{a(r.next(e))}catch(e){o(e)}}function u(e){try{a(r.throw(e))}catch(e){o(e)}}function a(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,u)}a((r=r.apply(e,t||[])).next())}))}function L(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function u(o){return function(u){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}}function B(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function j(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)s.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return s}function k(e,t,n){if(n||2===arguments.length)for(var r,i=0,o=t.length;i<o;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))}Object.create,Object.create;var A=["defaultCachingStore","defaultCachingTimeoutSeconds","globalCacheDisable","enableCacheExpiration","cacheExpirationIntervalMilliseconds","spfxContext","ie11"],_=[];function E(e){_.indexOf(e)<0&&(e(M),_.push(e))}var N=function(){function e(e){var t=this;void 0===e&&(e=new Map),this._v=e;var n=function(e,n){t._v.has(e)||t._v.set(e,n)};n(A[0],"session"),n(A[1],60),n(A[2],!1),n(A[3],!1),n(A[4],750),n(A[5],null),n(A[6],!1),_.forEach((function(e){return e(t)}))}return e.prototype.assign=function(e){this._v=U(this._v,C(e))},e.prototype.get=function(e){return this._v.get(e)},e.prototype.export=function(){var e,t,n=new Map;try{for(var r=B(this._v),i=r.next();!i.done;i=r.next()){var o=j(i.value,2),s=o[0],u=o[1];"__isDefault__"!==s&&n.set(s,u)}}catch(t){e={error:t}}finally{try{i&&!i.done&&(t=r.return)&&t.call(r)}finally{if(e)throw e.error}}return n},e}(),M=new N(new Map([["__isDefault__",!0]])),q=void 0===e.g?window:e.g;function W(e,t){y(t)&&new Request("",{headers:t}).headers.forEach((function(t,n){e.append(n,t)}))}function H(e,t){if(y(t)){var n=v(e.headers||{},t.headers);(e=v(e,t)).headers=n}}function V(e){var t=new URL(e);return t.protocol+"//"+t.hostname}var G=function(){function e(){}return e.prototype.fetch=function(e,t){return q.fetch(e,t)},e}(),Q=function(e){function t(t){var n=e.call(this)||this;return n.token=t,n}return F(t,e),t.prototype.fetch=function(t,n){void 0===n&&(n={});var r=new Headers;return W(r,n.headers),r.set("Authorization","Bearer "+this.token),n.headers=r,e.prototype.fetch.call(this,t,n)},t}(G),z=function(e){function t(t){var n=e.call(this,null)||this;return n.tokenFactory=t,n}return F(t,e),t.prototype.fetch=function(t,n){return x(this,void 0,void 0,(function(){var r;return L(this,(function(i){switch(i.label){case 0:return r=this,[4,this.tokenFactory({url:t,options:n})];case 1:return r.token=i.sent(),[2,e.prototype.fetch.call(this,t,n)]}}))}))},t}(Q),K=function(e){function t(t){var n=e.call(this,(function(e){return x(n,void 0,void 0,(function(){return L(this,(function(n){switch(n.label){case 0:return[4,t.aadTokenProviderFactory.getTokenProvider()];case 1:return[2,n.sent().getToken(V(e.url))]}}))}))}))||this;return n.context=t,n}return F(t,e),t.prototype.getToken=function(e){return x(this,void 0,void 0,(function(){return L(this,(function(t){switch(t.label){case 0:return[4,this.context.aadTokenProviderFactory.getTokenProvider()];case 1:return[2,t.sent().getToken(e)]}}))}))},t}(z),X=function(){function e(e,t){void 0===t&&(t=-1),this.store=e,this.defaultTimeoutMinutes=t,this.enabled=this.test(),M.get("enableCacheExpiration")&&this.cacheExpirationHandler()}return e.bind=function(t){return new e(void 0===t?new J:t)},e.prototype.get=function(e){if(!this.enabled)return null;var t=this.store.getItem(e);if(!y(t))return null;var n=JSON.parse(t);return new Date(n.expiration)<=new Date?(this.delete(e),null):n.value},e.prototype.put=function(e,t,n){this.enabled&&this.store.setItem(e,this.createPersistable(t,n))},e.prototype.delete=function(e){this.enabled&&this.store.removeItem(e)},e.prototype.getOrPut=function(e,t,n){return x(this,void 0,void 0,(function(){var r;return L(this,(function(i){switch(i.label){case 0:return this.enabled?null!==(r=this.get(e))?[3,2]:[4,t()]:[2,t()];case 1:r=i.sent(),this.put(e,r,n),i.label=2;case 2:return[2,r]}}))}))},e.prototype.deleteExpired=function(){return x(this,void 0,void 0,(function(){var e,t;return L(this,(function(n){switch(n.label){case 0:if(!this.enabled)return[2];e=0,n.label=1;case 1:return e<this.store.length?null===(t=this.store.key(e))?[3,3]:/["|']?pnp["|']? ?: ?1/i.test(this.store.getItem(t))?[4,this.get(t)]:[3,3]:[3,4];case 2:n.sent(),n.label=3;case 3:return e++,[3,1];case 4:return[2]}}))}))},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 n=M.get("defaultCachingTimeoutSeconds");this.defaultTimeoutMinutes>0&&(n=60*this.defaultTimeoutMinutes),t=l(new Date,"second",n)}return S({pnp:1,expiration:t,value:e})},e.prototype.cacheExpirationHandler=function(){var e=this;this.enabled&&this.deleteExpired().then((function(){setTimeout(c(e,e.cacheExpirationHandler),M.get("cacheExpirationIntervalMilliseconds"))})).catch(console.error)},e}(),J=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:!1,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}(),$=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 X("undefined"==typeof localStorage?new J:localStorage)),this._local},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"session",{get:function(){return null===this._session&&(this._session=new X("undefined"==typeof sessionStorage?new J:sessionStorage)),this._session},enumerable:!1,configurable:!0}),e}(),Y=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,S(t))},e.prototype.apply=function(e){var t=this;return new Promise((function(n,r){try{t._settings=U(t._settings,C(e)),n()}catch(e){r(e)}}))},e.prototype.load=function(e){var t=this;return new Promise((function(n,r){e.getConfiguration().then((function(e){t._settings=U(t._settings,C(e)),n()})).catch(r)}))},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}();const Z=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 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 $;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}();var ee=function(){function e(e){void 0===e&&(e=h()),this._batchId=e,this._reqs=[],this._deps=[],this._rDeps=[],this._index=-1}return Object.defineProperty(e.prototype,"batchId",{get:function(){return this._batchId},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"requests",{get:function(){return this._reqs.sort((function(e,t){return e.index-t.index}))},enumerable:!1,configurable:!0}),e.prototype.track=function(e){e.data.batch=this,(void 0===e.data.batchIndex||e.data.batchIndex<0)&&(e.data.batchIndex=++this._index)},e.prototype.add=function(e){var t={id:e.requestId,index:e.batchIndex,method:e.method.toUpperCase(),options:e.options,parser:e.parser,reject:null,resolve:null,url:e.url},n=new Promise((function(e,n){t.resolve=e,t.reject=n}));return this._reqs.push(t),n},e.prototype.addDependency=function(){var e=function(){};return this._deps.push(new Promise((function(t){e=t}))),e},e.prototype.addResolveBatchDependency=function(e){this._rDeps.push(e)},e.prototype.execute=function(){var e=this;return Promise.all(this._deps).then((function(){return Promise.all(e._deps)})).then((function(){return e.executeImpl()})).then((function(){return Promise.all(e._rDeps)})).then((function(){}))},e}(),te=new $,ne=function(){function e(e,t,n){this.key=e,this.storeName=t,this.expiration=n}return Object.defineProperty(e.prototype,"store",{get:function(){return"local"===this.storeName?te.local:te.session},enumerable:!1,configurable:!0}),e}(),re=function(){function e(e,t){this.parser=e,this.cacheOptions=t}return e.prototype.parse=function(e){var t=this;return this.parser.parse(e).then((function(e){return t.cacheData(e)}))},e.prototype.cacheData=function(e){return null!==this.cacheOptions.store&&this.cacheOptions.store.put(this.cacheOptions.key,e,this.cacheOptions.expiration),e},e}();function ie(e,t,n,r){Reflect.defineProperty(e.prototype,t,{configurable:!0,enumerable:!0,get:function(){return n(this,r)}})}var oe=!1,se=[],ue=new Map,ae=Symbol.for("43f7a601"),ce=function(e){oe=!0,de(se,e)},le=function(e,t){return oe=!0,Reflect.has(e,ae)||Reflect.set(e,ae,[]),de(Reflect.get(e,ae),t),e},pe=function(e,t){oe=!0;var n=Reflect.getPrototypeOf(e);Reflect.has(n,ae)||Reflect.defineProperty(n,ae,{value:h()});var r=n[ae];ue.has(r)||ue.set(r,[]),de(ue.get(r),t)};function de(e,t){Array.isArray(t)?e.push.apply(e,k([],j(t),!1)):e.push(t)}var he=function(){se.length=0},fe=function(){oe=!1},ye=function(){oe=!0},ge=function(e,t){var n=e(t),r=Reflect.getPrototypeOf(e);if(Reflect.has(r,ae)){var i=ue.get(Reflect.get(r,ae));n=le(n,i)}return n};function ve(e,t,n){for(var r=[],i=3;i<arguments.length;i++)r[i-3]=arguments[i];if(oe){var o=[];Reflect.has(n,ae)&&o.push.apply(o,k([],j(Reflect.get(n,ae)),!1)),o.push.apply(o,k([],j(se),!1));for(var s=0;s<o.length;s++){var u=o[s],a=void 0;if(f(u)?a=u.apply(void 0,k([e,n],j(r),!1)):"get"===e&&Reflect.has(u,r[0])?a=Reflect.get(u,r[0],n):Reflect.has(u,e)&&(a=Reflect.get(u,e).apply(void 0,k([n],j(r),!1))),void 0!==a)return a}}return t.apply(void 0,k([n],j(r),!1))}var me,be=(me=function(e){return this.defaultAction(e)},function(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var r=function(t){var n=Object.assign((function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return me.call.apply(me,k([n],j(e),!1))}),new(e.bind.apply(e,k([void 0],j(t),!1))));return Reflect.setPrototypeOf(n,e.prototype),n};return M.get("ie11")?r(t):new Proxy(ge(r,t),{apply:function(e,t,n){return ve("apply",(function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return Reflect.apply(e[0],e[1],e[2])}),e,t,n)},get:function(e,t,n){return ve("get",(function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return Reflect.get(e[0],e[1],e[2])}),e,t,n)},has:function(e,t){return ve("has",(function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return Reflect.has(e[0],e[1])}),e,t)},set:function(e,t,n,r){return ve("set",(function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return Reflect.set(e[0],e[1],e[2],e[3])}),e,t,n,r)}})}}),Pe=function(){function e(){}return e.prototype.parse=function(e){var t=this;return new Promise((function(n,r){t.handleError(e,r)&&t.parseImpl(e,n,r)}))},e.prototype.parseImpl=function(e,t,n){var r=this;e.headers.has("Content-Length")&&0===parseFloat(e.headers.get("Content-Length"))||204===e.status?t({}):e.text().then((function(e){return e.replace(/\s/gi,"").length>0?JSON.parse(e):{}})).then((function(e){return t(r.parseODataJSON(e))})).catch((function(e){return n(e)}))},e.prototype.handleError=function(e,t){return e.ok||Ue.init(e).then(t),e.ok},e.prototype.parseODataJSON=function(e){var t=e;return I(e,"d")?t=I(e.d,"results")?e.d.results:e.d:I(e,"value")&&(t=e.value),t},e}(),Se=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return F(t,e),t.prototype.parseImpl=function(e,t){e.text().then(t)},t}(Pe),Ie=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return F(t,e),t.prototype.parseImpl=function(e,t){e.blob().then(t)},t}(Pe),we=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return F(t,e),t.prototype.parseImpl=function(e,t){e.json().then(t)},t}(Pe),Te=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return F(t,e),t.prototype.parseImpl=function(e,t){f(e.arrayBuffer)?e.arrayBuffer().then(t):e.buffer().then(t)},t}(Pe),Ce=function(e){function t(t){var n=e.call(this)||this;return n.parser=t,n}return F(t,e),t.prototype.parseImpl=function(e,t){this.parser(e).then(t)},t}(Pe),Ue=function(e){function t(t,n,r,i){void 0===r&&(r=n.status),void 0===i&&(i=n.statusText);var o=e.call(this,t)||this;return o.response=n,o.status=r,o.statusText=i,o.isHttpRequestError=!0,o}return F(t,e),t.init=function(e){return x(this,void 0,void 0,(function(){var n;return L(this,(function(r){switch(r.label){case 0:return[4,e.clone().text()];case 1:return n=r.sent(),[2,new t("Error making HttpClient request in queryable ["+e.status+"] "+e.statusText+" ::> "+n,e.clone())]}}))}))},t}(Error);function Re(e){var t;e.options&&e.options.body&&(t=e.options.body,e.options.body="-");var n=JSON.stringify(e,(function(e,t){switch(e){case"query":return JSON.stringify(k([],j(t),!1));case"batch":case"batchDependency":case"cachingOptions":case"clientFactory":case"parser":return"-";default:return t}}),0),r=JSON.parse(n,(function(t,n){switch(t){case"query":return new Map(JSON.parse(n));case"batch":case"batchDependency":case"cachingOptions":case"clientFactory":case"parser":return e[t];default:return n}}));return t&&(r.options.body=t,e.options.body=t),r}var Fe=function(){function e(e){void 0===e&&(e={}),this._data=Object.assign({},{cloneParentWasCaching:!1,options:{},parentUrl:"",parser:new Pe,query:new Map,url:"",useCaching:!1},Re(e)),this._runtime=null}return Object.defineProperty(e.prototype,"data",{get:function(){return this._data},set:function(e){this._data=Object.assign({},this.data,Re(e))},enumerable:!1,configurable:!0}),e.prototype.getRuntime=function(){return null===this._runtime?M:this._runtime},e.prototype.setRuntime=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e[0]instanceof N?this._runtime=e[0]:(this._runtime=e[0]?new N(M.export()):new N,e.length>1&&y(e[1])&&this._runtime.assign(e[1])),this},e.prototype.toUrl=function(){return this.data.url},e.prototype.concat=function(e){return this.data.url+=e,this},Object.defineProperty(e.prototype,"query",{get:function(){return this.data.query},enumerable:!1,configurable:!0}),e.prototype.configure=function(e){return H(this.data.options,e),this},e.prototype.configureFrom=function(e){H(this.data.options,e.data.options);var t=e.getRuntime();return t.get("__isDefault__")||this.setRuntime(t),this},e.prototype.usingCaching=function(e){var t=this.getRuntime();if(!t.get("globalCacheDisable")){if(this.data.useCaching=!0,"string"==typeof e){if(b(e))throw Error("Cache key cannot be empty.");e={key:e}}var n={expiration:l(new Date,"second",t.get("defaultCachingTimeoutSeconds")),storeName:t.get("defaultCachingStore")};this.data.cachingOptions=v(n,e)}return this},e.prototype.usingParser=function(e){return this.data.parser=e,this},e.prototype.withPipeline=function(e){return this.data.pipes=e.slice(0),this},e.prototype.append=function(e){this.data.url=p(this.data.url,e)},e.prototype.inBatch=function(e){if(this.hasBatch)throw Error("This query is already part of a batch.");return y(e)&&e.track(this),this},e.prototype.addBatchDependency=function(){return y(this.data.batch)?this.data.batch.addDependency():function(){return null}},Object.defineProperty(e.prototype,"hasBatch",{get:function(){return y(this.data.batch)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"batch",{get:function(){return this.hasBatch?this.data.batch:null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"parentUrl",{get:function(){return this.data.parentUrl},enumerable:!1,configurable:!0}),e.prototype.cloneTo=function(e,t){return void 0===t&&(t={}),t=v({includeBatch:!0,includeQuery:!1},t),e.data=Object.assign({},Re(this.data),{batch:null,cloneParentCacheOptions:null,cloneParentWasCaching:!1},Re(e.data)),e.configureFrom(this),t.includeBatch&&e.inBatch(this.batch),t.includeQuery&&this.query.size>0&&this.query.forEach((function(t,n){return e.query.set(n,t)})),this.data.useCaching&&(e.data.cloneParentWasCaching=!0,e.data.cloneParentCacheOptions=this.data.cachingOptions),e},e}();function Oe(e,t){return new Promise((function(n){e.result=t,e.hasResult=!0,n(e)}))}function De(e){return e.pipes.length>0?e.pipes.shift()(e):Promise.resolve(e)}function xe(e){if(e.pipes.length<1)throw o.write("["+e.requestId+"] ("+(new Date).getTime()+") Request pipeline contains no methods!",3),Error("Request pipeline contains no methods!");var t=De(e).then((function(e){return function(e){return o.log({data:0===o.activeLogLevel?e.result:{},level:1,message:"["+e.requestId+"] ("+(new Date).getTime()+") Returning result from pipeline. Set logging to verbose to see data."}),Promise.resolve(e.result)}(e)})).catch((function(e){throw o.error(e),e}));return e.isBatched&&e.batch.addResolveBatchDependency(t),t}function Le(e){return void 0===e&&(e=!1),function(t,n,r){var i=r.value;r.value=function(){for(var r=[],s=0;s<arguments.length;s++)r[s]=arguments[s];return!e&&r.length>0&&I(r[0],"hasResult")&&r[0].hasResult?(o.write("["+r[0].requestId+"] ("+(new Date).getTime()+") Skipping request pipeline method "+n+", existing result in pipeline.",0),Promise.resolve(r[0])):(o.write("["+r[0].requestId+"] ("+(new Date).getTime()+") Calling request pipeline method "+n+".",0),i.apply(t,r).then((function(e){return De(e)})))}}}var Be=function(){function e(){}return e.logStart=function(e){return new Promise((function(t){o.log({data:1===o.activeLogLevel?{}:e,level:1,message:"["+e.requestId+"] ("+(new Date).getTime()+") Beginning "+e.method+" request ("+e.url+")"}),t(e)}))},e.caching=function(e){return new Promise((function(t){if(e.useCaching){o.write("["+e.requestId+"] ("+(new Date).getTime()+") Caching is enabled for request, checking cache...",1);var n=new ne(e.url.toLowerCase());if(void 0!==e.cachingOptions&&(n=v(n,e.cachingOptions)),null!==n.store){var r=n.store.get(n.key);if(null!==r)return o.log({data:1===o.activeLogLevel?{}:r,level:1,message:"["+e.requestId+"] ("+(new Date).getTime()+") Value returned from cache."}),f(e.batchDependency)&&e.batchDependency(),I(e.parser,"hydrate")&&(r=e.parser.hydrate(r)),Oe(e,r).then((function(e){return t(e)}))}o.write("["+e.requestId+"] ("+(new Date).getTime()+") Value not found in cache.",1),e.parser=new re(e.parser,n)}return t(e)}))},e.send=function(e){return new Promise((function(t,n){if(e.isBatched){var r=e.batch.add(e);f(e.batchDependency)&&e.batchDependency(),o.write("["+e.requestId+"] ("+(new Date).getTime()+") Batching request in batch "+e.batch.batchId+".",1),t(Oe(e,r))}else{o.write("["+e.requestId+"] ("+(new Date).getTime()+") Sending request.",1);var i=e.clientFactory(),s=v(e.options||{},{method:e.method});i.fetch(e.url,s).then((function(t){return e.parser.parse(t)})).then((function(t){return Oe(e,t)})).then((function(e){return t(e)})).catch((function(e){return n(e)}))}}))},e.logEnd=function(e){return new Promise((function(t){e.isBatched?o.log({data:1===o.activeLogLevel?{}:e,level:1,message:"["+e.requestId+"] ("+(new Date).getTime()+") "+e.method+" request will complete in batch "+e.batch.batchId+"."}):o.log({data:1===o.activeLogLevel?{}:e,level:1,message:"["+e.requestId+"] ("+(new Date).getTime()+") Completing "+e.method+" request."}),t(e)}))},D([Le(!0)],e,"logStart",null),D([Le()],e,"caching",null),D([Le()],e,"send",null),D([Le(!0)],e,"logEnd",null),e}();function je(){return[Be.logStart,Be.caching,Be.send,Be.logEnd].slice(0)}function ke(e){return function(t){return function(n){return function(r){return xe(Object.assign({},{batch:null,batchDependency:null,batchIndex:-1,cachingOptions:null,clientFactory:t,cloneParentCacheOptions:null,cloneParentWasCaching:!1,hasResult:!1,isBatched:y(r.batch),method:n,options:null,parentUrl:"",parser:new Pe,pipes:e.slice(0),query:new Map,requestId:h(),url:"",useCaching:/^get$/i.test(r.method)&&r.useCaching},Re(r)))}}}}var Ae=ke(je());function _e(e,t){return Object.assign({body:S(e)},t)}function Ee(e,t){return Object.assign({headers:e},t)}function Ne(e){return{__metadata:{type:e}}}function Me(e){if(b(e))return"";var t=e.indexOf("_api/");return t<0&&(t=e.indexOf("_vti_bin/")),t>-1?e.substr(0,t):e}function qe(e){return function(t,n,r){void 0===r&&(r=Object.getOwnPropertyDescriptor(t,n));var i=r.value;return r.value=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return x(this,void 0,void 0,(function(){return L(this,(function(n){return this.configure(Ee({"X-PnPjs-Tracking":e})),[2,i.apply(this,t)]}))}))},r}}qe.getClientTag=function(e,t){if(void 0===t&&(t=!0),e.has("X-PnPjs-Tracking")){var n=e.get("X-PnPjs-Tracking");if(t&&e.delete("X-PnPjs-Tracking"),!b(n))return n}return""},qe.configure=function(e,t){return e.configure(Ee({"X-PnPjs-Tracking":t}))},qe.isTagged=function(e){return e.data.options.headers&&e.data.options.headers["X-PnPjs-Tracking"]};var We=function(){function e(){for(var e,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];if(this._runtime=t.length>0&&t[0]instanceof N?t[0]:M,this._impl=t.length>1&&y(t[1])?t[1]:(null===(e=this._runtime.get("sp"))||void 0===e?void 0:e.fetchClientFactory())||null,null===this._impl)throw Error("Could not generate fetchClientFactory in SPHttpClient.");this._digestCache=Ve(this)}return e.prototype.fetch=function(e,t){var n;return void 0===t&&(t={}),x(this,void 0,void 0,(function(){var r,i,o,s,u;return L(this,(function(a){switch(a.label){case 0:return r=v(t,{cache:"no-cache",credentials:"same-origin"},!0),W(i=new Headers,null===(n=this._runtime.get("sp"))||void 0===n?void 0:n.headers),W(i,t.headers),i.has("Accept")||i.append("Accept","application/json"),i.has("Content-Type")||i.append("Content-Type","application/json;odata=verbose;charset=utf-8"),i.has("X-ClientService-ClientTag")||(o=qe.getClientTag(i),(s="PnPCoreJS:2.15.0:"+o).length>32&&(s=s.substr(0,32)),i.append("X-ClientService-ClientTag",s)),!(r=v(r,{headers:i})).method||"GET"===r.method.toUpperCase()||i.has("X-RequestDigest")||i.has("Authorization")?[3,2]:[4,this._digestCache(Me(e))];case 1:u=a.sent(),i.append("X-RequestDigest",u),a.label=2;case 2:return[2,this.fetchRaw(e,r)]}}))}))},e.prototype.fetchRaw=function(e,t){var n=this;void 0===t&&(t={});var r=new Headers;W(r,t.headers),t=v(t,{headers:r});var i=function(r){var o=function(e){var t;e.headers.has("Retry-After")?t=1e3*parseInt(e.headers.get("Retry-After"),10):(t=r.delay,r.delay*=2),r.attempts++,r.retryCount<=r.attempts?r.reject(new Ue("Retry count exceeded ("+r.retryCount+") for request. Response status: ["+e.status+"] "+e.statusText,e)):setTimeout(c(n,i,r),t)};n._impl.fetch(e,t).then((function(e){429===e.status?o(e):r.resolve(e)})).catch((function(e){503===e.status||504===e.status?o(e):r.reject(e)}))};return new Promise((function(e,t){i.call(n,{attempts:0,delay:100,reject:t,resolve:e,retryCount:7})}))},e.prototype.get=function(e,t){void 0===t&&(t={});var n=v(t,{method:"GET"});return this.fetch(e,n)},e.prototype.post=function(e,t){void 0===t&&(t={});var n=v(t,{method:"POST"});return this.fetch(e,n)},e.prototype.patch=function(e,t){void 0===t&&(t={});var n=v(t,{method:"PATCH"});return this.fetch(e,n)},e.prototype.delete=function(e,t){void 0===t&&(t={});var n=v(t,{method:"DELETE"});return this.fetch(e,n)},e}(),He=new Map;function Ve(e){var t=this;return function(n){return x(t,void 0,void 0,(function(){var t,r,i,o,s,u,a,c;return L(this,(function(d){switch(d.label){case 0:return void 0!==(t=He.get(n))&&new Date<t.expiration?[2,t.value]:(r=p(n,"/_api/contextinfo"),i={Accept:"application/json;odata=verbose","Content-Type":"application/json;odata=verbose;charset=utf-8"},[4,e.fetchRaw(r,{cache:"no-cache",credentials:"same-origin",headers:v(i,null===(c=null===(a=e._runtime.get("sp"))||void 0===a?void 0:a.sp)||void 0===c?void 0:c.headers,!0),method:"POST"})]);case 1:return o=d.sent(),[4,(new Pe).parse(o).then((function(e){return e.GetContextWebInformation}))];case 2:return s=d.sent(),u={expiration:l(new Date,"second",s.FormDigestTimeoutSeconds),value:s.FormDigestValue},He.set(n,u),[2,u.value]}}))}))}}function Ge(e,t){var n,r;return void 0===t&&(t=M),x(this,void 0,void 0,(function(){var i,o,s,u,a;return L(this,(function(c){if(m(e))return[2,e];if(i=null===(n=t.get("sp"))||void 0===n?void 0:n.baseUrl,o=null===(r=t.get("sp"))||void 0===r?void 0:r.fetchClientFactory,!b(i))return[2,p(i,e)];if(s=t.get("spfxContext"))return[2,p(s.pageContext.web.absoluteUrl,e)];if(o&&I(u=o(),"siteUrl"))return[2,p(u.siteUrl,e)];if(void 0!==q._spPageContextInfo){if(I(q._spPageContextInfo,"webAbsoluteUrl"))return[2,p(q._spPageContextInfo.webAbsoluteUrl,e)];if(I(q._spPageContextInfo,"webServerRelativeUrl"))return[2,p(q._spPageContextInfo.webServerRelativeUrl,e)]}return void 0!==q.location&&(a=q.location.toString().toLowerCase(),["/_layouts/","/siteassets/","/sitepages/"].forEach((function(t){var n=a.indexOf(t);if(n>0)return p(a.substr(0,n),e)}))),[2,e]}))}))}function Qe(e){Ke=f(e)?function(){return e}:ze}var ze=function(e){return function(){return new We(e)}},Ke=ze,Xe=function(e){return function(t,n){return x(this,void 0,void 0,(function(){var r,i,o,s,u;return L(this,(function(a){switch(a.label){case 0:return r=t.getRuntime(),i=Ae(Ke(r))(e),o=Re(t.data),s=y(o.batch)?o.batch.addDependency():function(){},[4,Ge(t.toUrlAndQuery(),r)];case 1:return u=a.sent(),H(o.options,n),[2,i(Object.assign({},o,{batchDependency:s,url:u}))]}}))}))}},Je=function(e,t){return e.data.cloneParentWasCaching&&e.usingCaching(e.data.cloneParentCacheOptions),e._forceCaching&&(e.data.useCaching=!0),Xe("GET")(e,t)},$e=function(e,t){return Xe("POST")(e,t)},Ye=function(e,t){return Xe("DELETE")(e,t)},Ze=function(e,t){return Xe("PATCH")(e,t)},et=function(e,t){var n=Object.assign(Ee({"X-HTTP-Method":"DELETE"}),t);return $e(e,n)},tt=function(e,t,n){void 0===n&&(n="*");var r=Object.assign(Ee({"X-HTTP-Method":"DELETE","IF-Match":n}),t);return $e(e,r)},nt=function(e){return be(e)},rt=function(e){function t(t,n){var r=this,i="",o="",s=new Map;if("string"==typeof t)if(m(t)||t.lastIndexOf("/")<0)o=t,i=p(t,n);else if(t.lastIndexOf("/")>t.lastIndexOf("(")){var u=t.lastIndexOf("/");o=t.slice(0,u),n=p(t.slice(u),n),i=p(o,n)}else u=t.lastIndexOf("("),o=t.slice(0,u),i=p(t,n);else{i=p(o=t.toUrl(),n||"");var a=t.query.get("@target");void 0!==a&&s.set("@target",a)}return r=e.call(this,{parentUrl:o,query:s,url:i})||this,"string"!=typeof t&&r.configureFrom(t),r._forceCaching=!1,r}return F(t,e),t.prototype.toUrlAndQuery=function(){var e=new Map(this.query),t=this.toUrl().replace(/'!(@.*?)::(.*?)'/gi,(function(t,n,r){return o.write("Rewriting aliased parameter from match "+t+" to label: "+n+" value: "+r,0),e.set(n,"'"+r+"'"),n}));if(e.size>0){var n=t.indexOf("?")>-1?"&":"?";t+=""+n+Array.from(e).map((function(e){return e[0]+"="+e[1]})).join("&")}return t},t.prototype.select=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e.length>0&&this.query.set("$select",e.map(encodeURIComponent).join(",")),this},t.prototype.get=function(e){return Je(this,e)},t.prototype.expand=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e.length>0&&this.query.set("$expand",e.map(encodeURIComponent).join(",")),this},t.prototype.clone=function(t,n,r,i){void 0===r&&(r=!0),void 0===i&&(i=!1);var o=e.prototype.cloneTo.call(this,t(this,n),{includeBatch:r,includeQuery:i});if(!i){var s="@target";this.query.has(s)&&o.query.set(s,this.query.get(s))}return o},t.prototype.defaultAction=function(e){return Je(this,e)},t.prototype.getParent=function(e,t,n,r){void 0===t&&(t=this.parentUrl);var i=e(t,n).configureFrom(this),o="@target";return this.query.has(o)&&i.query.set(o,this.query.get(o)),void 0!==r&&(i=i.inBatch(r)),i},t}(Fe),it=nt(rt),ot=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return F(t,e),t.prototype.filter=function(e){return this.query.set("$filter",encodeURIComponent(e)),this},t.prototype.orderBy=function(e,t){void 0===t&&(t=!0);var n="$orderby",r=this.query.has(n)?this.query.get(n).split(","):[];return r.push(encodeURIComponent(e)+" "+(t?"asc":"desc")),this.query.set(n,r.join(",")),this},t.prototype.skip=function(e){return this.query.set("$skip",e.toString()),this},t.prototype.top=function(e){return this.query.set("$top",e.toString()),this},t}(rt),st=nt(ot),ut=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return F(t,e),t.prototype._update=function(e,t){var n=this;return function(r){return $e(qe.configure(n,e+".Update"),{body:S(v(Ne(e),r)),headers:{"X-HTTP-Method":"MERGE"}}).then((function(e){return t(e,r)}))}},t}(rt),at=nt(ut);function ct(e){return function(){return et(qe.configure(this,e+".delete"))}}function lt(e){return function(t){return void 0===t&&(t="*"),tt(qe.configure(this,e+".delete"),{},t)}}function pt(e){return function(t){return function(t){function n(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return t.call(this,n[0],n.length>1&&void 0!==n[1]?n[1]:e)||this}return F(n,t),n}(t)}}function dt(e){var t=[],n=["odata.type","odata.editLink","__metadata","odata.metadata","odata.id"];if(I(e,n[0])&&"SP.Web"===e[n[0]])I(e,n[4])?t.push(e[n[4]]):I(e,n[2])&&t.push(e.__metadata.uri);else if(I(e,n[3])&&I(e,n[1])){var r=m(e[n[1]])?e[n[1]].split("_api")[1]:e[n[1]];t.push(Me(e[n[3]]),"_api",r)}else I(e,n[1])?t.push("_api",e[n[1]]):I(e,n[2])&&t.push(e.__metadata.uri);return t.length<1?(o.write("No uri information found in ODataEntity parsing, chaining will fail for this object.",2),""):p.apply(void 0,k([],j(t),!1))}var ht=function(e){function t(t){var n=e.call(this)||this;return n.factory=t,n.hydrate=function(e){return v(n.factory(dt(e),null),e)},n}return F(t,e),t.prototype.parse=function(t){var n=this;return e.prototype.parse.call(this,t).then((function(e){return v(n.factory(dt(e),null),e)}))},t}(Pe),ft=function(e){function t(t){var n=e.call(this)||this;return n.factory=t,n.hydrate=function(e){return e.map((function(e){return v(n.factory(dt(e),null),e)}))},n}return F(t,e),t.prototype.parse=function(t){var n=this;return e.prototype.parse.call(this,t).then((function(e){return e.map((function(e){return v(n.factory(dt(e),null),e)}))}))},t}(Pe);function yt(e){return new ht(e)}function gt(e){return new ft(e)}var vt=function(e){function t(t,n){void 0===n&&(n=M);var r=e.call(this)||this;return r.url=t,r.runtime=n,r}return F(t,e),t.ParseResponse=function(e){for(var t,n,r=[],i="--batchresponse_",o=new RegExp("^HTTP/[0-9.]+ +([0-9]+) +(.*)","i"),s=e.split("\n"),u="batch",a=0;a<s.length;++a){var c=s[a];switch(u){case"batch":if(c.substr(0,i.length)===i)u="batchHeaders";else if(""!==c.trim())throw Error("Invalid response, line "+a);break;case"batchHeaders":""===c.trim()&&(u="status");break;case"status":var l=o.exec(c);if(3!==l.length)throw Error("Invalid status, line "+a);t=parseInt(l[1],10),n=l[2],u="statusHeaders";break;case"statusHeaders":""===c.trim()&&(u="body");break;case"body":r.push(204===t?new Response:new Response(c,{status:t,statusText:n})),u="batch"}}if("status"!==u)throw Error("Unexpected end of input");return r},t.prototype.executeImpl=function(){var e;return x(this,void 0,void 0,(function(){var n,r,i,s,u,a,c,l,d,f,y,g,v,b,P=this;return L(this,(function(S){switch(S.label){case 0:return o.write("["+this.batchId+"] ("+(new Date).getTime()+") Executing batch with "+this.requests.length+" requests.",1),this.requests.length<1?(o.write("Resolving empty batch.",1),[2]):(n=new We(this.runtime),[4,Ge(this.url,this.runtime)]);case 1:for(r=S.sent(),i=[],s="",u=0;u<this.requests.length;u++)"GET"===(a=this.requests[u]).method?(s.length>0&&(i.push("--changeset_"+s+"--\n\n"),s=""),i.push("--batch_"+this.batchId+"\n")):(s.length<1&&(s=h(),i.push("--batch_"+this.batchId+"\n"),i.push('Content-Type: multipart/mixed; boundary="changeset_'+s+'"\n\n')),i.push("--changeset_"+s+"\n")),i.push("Content-Type: application/http\n"),i.push("Content-Transfer-Encoding: binary\n\n"),c=new Headers,l=m(a.url)?a.url:p(r,a.url),o.write("["+this.batchId+"] ("+(new Date).getTime()+") Adding request "+a.method+" "+l+" to batch.",0),"GET"!==a.method?(d=a.method,f=a.options.headers,I(a,"options")&&I(a.options,"headers")&&void 0!==f["X-HTTP-Method"]&&(d=f["X-HTTP-Method"],delete f["X-HTTP-Method"]),i.push(d+" "+l+" HTTP/1.1\n"),c.set("Content-Type","application/json;odata=verbose;charset=utf-8")):i.push(a.method+" "+l+" HTTP/1.1\n"),W(c,null===(e=this.runtime.get("sp"))||void 0===e?void 0:e.headers),a.options&&W(c,a.options.headers),c.has("Accept")||c.append("Accept","application/json"),c.has("Content-Type")||c.append("Content-Type","application/json;odata=verbose;charset=utf-8"),c.has("X-ClientService-ClientTag")||c.append("X-ClientService-ClientTag","PnPCoreJS:@pnp-2.15.0:batch"),c.forEach((function(e,t){i.push(t+": "+e+"\n")})),i.push("\n"),a.options.body&&i.push(a.options.body+"\n\n");return s.length>0&&(i.push("--changeset_"+s+"--\n\n"),s=""),i.push("--batch_"+this.batchId+"--\n"),y={body:i.join(""),headers:{"Content-Type":"multipart/mixed; boundary=batch_"+this.batchId},method:"POST"},o.write("["+this.batchId+"] ("+(new Date).getTime()+") Sending batch request.",1),[4,n.fetch(p(r,"/_api/$batch"),y)];case 2:return(g=S.sent()).ok?[3,4]:[4,Ue.init(g)];case 3:throw S.sent();case 4:return[4,g.text()];case 5:if(v=S.sent(),(b=t.ParseResponse(v)).length!==this.requests.length)throw Error("Could not properly parse responses to match requests in batch.");return o.write("["+this.batchId+"] ("+(new Date).getTime()+") Resolving batched requests.",1),[2,b.reduce((function(e,t,n){return e.then((function(){return x(P,void 0,void 0,(function(){var e,r,i,s;return L(this,(function(u){switch(u.label){case 0:e=this.requests[n],o.write("["+e.id+"] ("+(new Date).getTime()+") Resolving request in batch "+this.batchId+".",1),u.label=1;case 1:return u.trys.push([1,3,,4]),i=(r=e).resolve,[4,e.parser.parse(t)];case 2:return i.apply(r,[u.sent()]),[3,4];case 3:return s=u.sent(),e.reject(s),[3,4];case 4:return[2]}}))}))}))}),Promise.resolve(void 0))]}}))}))},t}(ee),mt="00000000-0000-0000-0000-000000000000";function bt(e,t){void 0===t&&(t=M),t.assign(e)}E((function(e){var t=e.get("sp"),n=Object.assign({},{fetchClientFactory:function(){return new G}},t);e.assign({sp:n})}));var Pt=function(){function e(e,t,n){void 0===e&&(e={}),void 0===t&&(t=""),void 0===n&&(n=M),this._options=e,this._baseUrl=t,this._runtime=n}return e.prototype.configure=function(t,n){return void 0===n&&(n=""),new e(t,n)},e.prototype.setup=function(e){e.pageContext?bt({spfxContext:e},this._runtime):bt(e,this._runtime)},e.prototype.createIsolated=function(t){return x(this,void 0,void 0,(function(){var n,r,i,o,s;return L(this,(function(u){return t=Object.assign({baseUrl:"",cloneGlobal:!0,config:{},options:{}},t||{}),n=t.baseUrl,r=t.cloneGlobal,i=t.options,o=t.config,(s=r?new N(M.export()):new N).assign(o),[2,new e(i,n,s)]}))}))},e.prototype.childConfigHook=function(e){return e({options:this._options,baseUrl:this._baseUrl,runtime:this._runtime})},e}();function St(e){return b(e)?"":/!(@.*?)::(.*?)/gi.test(e)?e.replace(/!(@.*?)::(.*)$/gi,(function(e,t,n){return o.write("Rewriting aliased parameter from match "+e+" to label: "+t+" value: "+n,0),"!"+t+"::"+encodeURIComponent(n.replace(/'/gi,"''"))})):encodeURIComponent(e.replace(/'/gi,"''"))}new Pt;var It=function(e){function t(){return null!=