From 06f8ffa9e16005854276e64bcbc39c38f3c1f159 Mon Sep 17 00:00:00 2001 From: Patrick Rodgers Date: Fri, 15 Sep 2017 12:55:00 -0400 Subject: [PATCH] update to dist during master merge --- dist/pnp-global-shim.d.ts | 3 + dist/pnp.d.ts | 6670 +++++++++++++++++++++ dist/pnp.js | 11254 ++++++++++++++++++++++++++++++++++++ dist/pnp.js.map | 1 + dist/pnp.min.js | 2 + dist/pnp.min.js.map | 1 + 6 files changed, 17931 insertions(+) create mode 100644 dist/pnp-global-shim.d.ts create mode 100644 dist/pnp.d.ts create mode 100644 dist/pnp.js create mode 100644 dist/pnp.js.map create mode 100644 dist/pnp.min.js create mode 100644 dist/pnp.min.js.map diff --git a/dist/pnp-global-shim.d.ts b/dist/pnp-global-shim.d.ts new file mode 100644 index 00000000..f6bae7e8 --- /dev/null +++ b/dist/pnp-global-shim.d.ts @@ -0,0 +1,3 @@ +/// +export * from "pnp"; +export as namespace $pnp; \ No newline at end of file diff --git a/dist/pnp.d.ts b/dist/pnp.d.ts new file mode 100644 index 00000000..b7d50cb5 --- /dev/null +++ b/dist/pnp.d.ts @@ -0,0 +1,6670 @@ +declare module "collections/collections" { + /** + * Interface defining an object with a known property type + */ + export interface TypedHash { + [key: string]: T; + } + /** + * Generic dictionary + */ + export class Dictionary { + private keys; + private values; + /** + * Creates a new instance of the Dictionary class + * + * @constructor + */ + constructor(keys?: string[], values?: T[]); + /** + * Gets a value from the collection using the specified key + * + * @param key The key whose value we want to return, returns null if the key does not exist + */ + get(key: string): T; + /** + * Adds the supplied key and value to the dictionary + * + * @param key The key to add + * @param o The value to add + */ + add(key: string, o: T): void; + /** + * Merges the supplied typed hash into this dictionary instance. Existing values are updated and new ones are created as appropriate. + */ + merge(source: TypedHash | Dictionary): void; + /** + * Removes a value from the dictionary + * + * @param key The key of the key/value pair to remove. Returns null if the key was not found. + */ + remove(key: string): T; + /** + * Returns all the keys currently in the dictionary as an array + */ + getKeys(): string[]; + /** + * Returns all the values currently in the dictionary as an array + */ + getValues(): T[]; + /** + * Clears the current dictionary + */ + clear(): void; + /** + * Gets a count of the items currently in the dictionary + */ + count(): number; + } +} +declare module "utils/logging" { + /** + * A set of logging levels + * + */ + export enum LogLevel { + Verbose = 0, + Info = 1, + Warning = 2, + Error = 3, + Off = 99, + } + /** + * Interface that defines a log entry + * + */ + export interface LogEntry { + /** + * The main message to be logged + */ + message: string; + /** + * The level of information this message represents + */ + level: LogLevel; + /** + * Any associated data that a given logging listener may choose to log or ignore + */ + data?: any; + } + /** + * Interface that defines a log listner + * + */ + export interface LogListener { + /** + * Any associated data that a given logging listener may choose to log or ignore + * + * @param entry The information to be logged + */ + log(entry: LogEntry): void; + } + /** + * Class used to subscribe ILogListener and log messages throughout an application + * + */ + export class Logger { + private static _instance; + static activeLogLevel: LogLevel; + private static readonly instance; + /** + * Adds ILogListener instances to the set of subscribed listeners + * + * @param listeners One or more listeners to subscribe to this log + */ + static subscribe(...listeners: LogListener[]): void; + /** + * Clears the subscribers collection, returning the collection before modifiction + */ + static clearSubscribers(): LogListener[]; + /** + * Gets the current subscriber count + */ + static readonly count: number; + /** + * Writes the supplied string to the subscribed listeners + * + * @param message The message to write + * @param level [Optional] if supplied will be used as the level of the entry (Default: LogLevel.Verbose) + */ + static write(message: string, level?: LogLevel): void; + /** + * Writes the supplied string to the subscribed listeners + * + * @param json The json object to stringify and write + * @param level [Optional] if supplied will be used as the level of the entry (Default: LogLevel.Verbose) + */ + static writeJSON(json: any, level?: LogLevel): void; + /** + * Logs the supplied entry to the subscribed listeners + * + * @param entry The message to log + */ + static log(entry: LogEntry): void; + /** + * Logs performance tracking data for the the execution duration of the supplied function using console.profile + * + * @param name The name of this profile boundary + * @param f The function to execute and track within this performance boundary + */ + static measure(name: string, f: () => T): T; + } + /** + * Implementation of ILogListener which logs to the browser console + * + */ + export class ConsoleListener implements LogListener { + /** + * Any associated data that a given logging listener may choose to log or ignore + * + * @param entry The information to be logged + */ + log(entry: LogEntry): void; + /** + * Formats the message + * + * @param entry The information to format into a string + */ + private format(entry); + } + /** + * Implementation of ILogListener which logs to the supplied function + * + */ + export class FunctionListener implements LogListener { + private method; + /** + * Creates a new instance of the FunctionListener class + * + * @constructor + * @param method The method to which any logging data will be passed + */ + constructor(method: (entry: LogEntry) => void); + /** + * Any associated data that a given logging listener may choose to log or ignore + * + * @param entry The information to be logged + */ + log(entry: LogEntry): void; + } +} +declare module "utils/exceptions" { + /** + * Represents an exception with an HttpClient request + * + */ + export class ProcessHttpClientResponseException extends Error { + readonly status: number; + readonly statusText: string; + readonly data: any; + constructor(status: number, statusText: string, data: any); + } + export class NoCacheAvailableException extends Error { + constructor(msg?: string); + } + export class APIUrlException extends Error { + constructor(msg?: string); + } + export class AuthUrlException extends Error { + constructor(data: any, msg?: string); + } + export class NodeFetchClientUnsupportedException extends Error { + constructor(msg?: string); + } + export class SPRequestExecutorUndefinedException extends Error { + constructor(); + } + export class MaxCommentLengthException extends Error { + constructor(msg?: string); + } + export class NotSupportedInBatchException extends Error { + constructor(operation?: string); + } + export class ODataIdException extends Error { + constructor(data: any, msg?: string); + } + export class BatchParseException extends Error { + constructor(msg: string); + } + export class AlreadyInBatchException extends Error { + constructor(msg?: string); + } + export class FunctionExpectedException extends Error { + constructor(msg?: string); + } + export class UrlException extends Error { + constructor(msg: string); + } +} +declare module "odata/core" { + export interface ODataParser { + parse(r: Response): Promise; + } + export abstract class ODataParserBase implements ODataParser { + parse(r: Response): Promise; + protected handleError(r: Response, reject: (reason?: any) => void): boolean; + protected parseODataJSON(json: any): U; + } +} +declare module "odata/parsers" { + import { ODataParser, ODataParserBase } from "odata/core"; + export class ODataDefaultParser extends ODataParserBase { + } + export function ODataValue(): ODataParser; + export class ODataRawParserImpl implements ODataParser { + parse(r: Response): Promise; + } + export let ODataRaw: ODataRawParserImpl; + export class TextFileParser implements ODataParser { + parse(r: Response): Promise; + } + export class BlobFileParser implements ODataParser { + parse(r: Response): Promise; + } + export class JSONFileParser implements ODataParser { + parse(r: Response): Promise; + } + export class BufferFileParser implements ODataParser { + parse(r: any): Promise; + } +} +declare module "net/digestcache" { + import { Dictionary } from "collections/collections"; + import { HttpClient } from "net/httpclient"; + export class CachedDigest { + expiration: Date; + value: string; + } + export class DigestCache { + private _httpClient; + private _digests; + constructor(_httpClient: HttpClient, _digests?: Dictionary); + getDigest(webUrl: string): Promise; + clear(): void; + } +} +declare module "net/utils" { + export interface ConfigOptions { + headers?: string[][] | { + [key: string]: string; + }; + mode?: "navigate" | "same-origin" | "no-cors" | "cors"; + credentials?: "omit" | "same-origin" | "include"; + cache?: "default" | "no-store" | "reload" | "no-cache" | "force-cache" | "only-if-cached"; + } + export interface FetchOptions extends ConfigOptions { + method?: string; + body?: any; + } + export function mergeOptions(target: ConfigOptions, source: ConfigOptions): void; + export function mergeHeaders(target: Headers, source: any): void; +} +declare module "request/requestclient" { + import { FetchOptions } from "net/utils"; + export interface RequestClient { + fetch(url: string, options?: FetchOptions): Promise; + fetchRaw(url: string, options?: FetchOptions): Promise; + get(url: string, options?: FetchOptions): Promise; + post(url: string, options?: FetchOptions): Promise; + patch(url: string, options?: FetchOptions): Promise; + delete(url: string, options?: FetchOptions): Promise; + } +} +declare module "net/httpclient" { + import { FetchOptions } from "net/utils"; + import { RequestClient } from "request/requestclient"; + export interface HttpClientImpl { + fetch(url: string, options: FetchOptions): Promise; + } + export class HttpClient implements RequestClient { + private _digestCache; + private _impl; + constructor(); + fetch(url: string, options?: FetchOptions): Promise; + fetchRaw(url: string, options?: FetchOptions): Promise; + get(url: string, options?: FetchOptions): Promise; + post(url: string, options?: FetchOptions): Promise; + patch(url: string, options?: FetchOptions): Promise; + delete(url: string, options?: FetchOptions): Promise; + } +} +declare module "net/fetchclient" { + import { HttpClientImpl } from "net/httpclient"; + /** + * Makes requests using the fetch API + */ + export class FetchClient implements HttpClientImpl { + fetch(url: string, options: any): Promise; + } +} +declare module "configuration/spfxContextInterface" { + export interface SPFXContext { + graphHttpClient: { + fetch(url: string, configuration: any, options: any): Promise; + }; + pageContext: { + web: { + absoluteUrl: string; + }; + }; + } +} +declare module "net/graphclient" { + import { FetchOptions } from "net/utils"; + import { RequestClient } from "request/requestclient"; + export class GraphHttpClient implements RequestClient { + private _impl; + constructor(); + fetch(url: string, options?: FetchOptions): Promise; + fetchRaw(url: string, options?: FetchOptions): Promise; + get(url: string, options?: FetchOptions): Promise; + post(url: string, options?: FetchOptions): Promise; + patch(url: string, options?: FetchOptions): Promise; + delete(url: string, options?: FetchOptions): Promise; + } + export interface GraphHttpClientImpl { + fetch(url: string, configuration: any, options: FetchOptions): Promise; + } +} +declare module "configuration/pnplibconfig" { + import { TypedHash } from "collections/collections"; + import { HttpClientImpl } from "net/httpclient"; + import { SPFXContext } from "configuration/spfxContextInterface"; + import { GraphHttpClientImpl } from "net/graphclient"; + export interface LibraryConfiguration { + /** + * Allows caching to be global disabled, default: false + */ + globalCacheDisable?: boolean; + /** + * Defines the default store used by the usingCaching method, default: session + */ + defaultCachingStore?: "session" | "local"; + /** + * Defines the default timeout in seconds used by the usingCaching method, default 30 + */ + defaultCachingTimeoutSeconds?: number; + /** + * If true a timeout expired items will be removed from the cache in intervals determined by cacheTimeoutInterval + */ + enableCacheExpiration?: boolean; + /** + * Determines the interval in milliseconds at which the cache is checked to see if items have expired (min: 100) + */ + cacheExpirationIntervalMilliseconds?: number; + /** + * SharePoint specific library settings + */ + sp?: { + /** + * Any headers to apply to all requests + */ + headers?: TypedHash; + /** + * Defines a factory method used to create fetch clients + */ + fetchClientFactory?: () => HttpClientImpl; + /** + * The base url used for all requests + */ + baseUrl?: string; + }; + /** + * MS Graph specific library settings + */ + graph?: { + /** + * Any headers to apply to all requests + */ + headers?: TypedHash; + /** + * Defines a factory method used to create fetch clients + */ + fetchClientFactory?: () => GraphHttpClientImpl; + }; + /** + * Used to supply the current context from an SPFx webpart to the library + */ + spfxContext?: any; + } + export class RuntimeConfigImpl { + private _defaultCachingStore; + private _defaultCachingTimeoutSeconds; + private _globalCacheDisable; + private _enableCacheExpiration; + private _cacheExpirationIntervalMilliseconds; + private _spfxContext; + private _spFetchClientFactory; + private _spBaseUrl; + private _spHeaders; + private _graphHeaders; + private _graphFetchClientFactory; + constructor(); + set(config: LibraryConfiguration): void; + readonly defaultCachingStore: "session" | "local"; + readonly defaultCachingTimeoutSeconds: number; + readonly globalCacheDisable: boolean; + readonly spFetchClientFactory: () => HttpClientImpl; + readonly spBaseUrl: string; + readonly spHeaders: TypedHash; + readonly enableCacheExpiration: boolean; + readonly cacheExpirationIntervalMilliseconds: number; + readonly spfxContext: SPFXContext; + readonly graphFetchClientFactory: () => GraphHttpClientImpl; + readonly graphHeaders: TypedHash; + } + export let RuntimeConfig: RuntimeConfigImpl; + export function setRuntimeConfig(config: LibraryConfiguration): void; +} +declare module "utils/util" { + import { TypedHash } from "collections/collections"; + export function extractWebUrl(candidateUrl: string): string; + export class Util { + /** + * Gets a callback function which will maintain context across async calls. + * Allows for the calling pattern getCtxCallback(thisobj, method, methodarg1, methodarg2, ...) + * + * @param context The object that will be the 'this' value in the callback + * @param method The method to which we will apply the context and parameters + * @param params Optional, additional arguments to supply to the wrapped method when it is invoked + */ + static getCtxCallback(context: any, method: Function, ...params: any[]): Function; + /** + * Tests if a url param exists + * + * @param name The name of the url paramter to check + */ + static urlParamExists(name: string): boolean; + /** + * Gets a url param value by name + * + * @param name The name of the paramter for which we want the value + */ + static getUrlParamByName(name: string): string; + /** + * Gets a url param by name and attempts to parse a bool value + * + * @param name The name of the paramter for which we want the boolean value + */ + static getUrlParamBoolByName(name: string): boolean; + /** + * Inserts the string s into the string target as the index specified by index + * + * @param target The string into which we will insert s + * @param index The location in target to insert s (zero based) + * @param s The string to insert into target at position index + */ + static stringInsert(target: string, index: number, s: string): string; + /** + * Adds a value to a date + * + * @param date The date to which we will add units, done in local time + * @param interval The name of the interval to add, one of: ['year', 'quarter', 'month', 'week', 'day', 'hour', 'minute', 'second'] + * @param units The amount to add to date of the given interval + * + * http://stackoverflow.com/questions/1197928/how-to-add-30-minutes-to-a-javascript-date-object + */ + static dateAdd(date: Date, interval: string, units: number): Date; + /** + * Loads a stylesheet into the current page + * + * @param path The url to the stylesheet + * @param avoidCache If true a value will be appended as a query string to avoid browser caching issues + */ + static loadStylesheet(path: string, avoidCache: boolean): void; + /** + * Combines an arbitrary set of paths ensuring that the slashes are normalized + * + * @param paths 0 to n path parts to combine + */ + static combinePaths(...paths: string[]): string; + /** + * Gets a random string of chars length + * + * @param chars The length of the random string to generate + */ + static getRandomString(chars: number): string; + /** + * Gets a random GUID value + * + * http://stackoverflow.com/questions/105034/create-guid-uuid-in-javascript + */ + static getGUID(): string; + /** + * Determines if a given value is a function + * + * @param candidateFunction The thing to test for being a function + */ + static isFunction(candidateFunction: any): boolean; + /** + * @returns whether the provided parameter is a JavaScript Array or not. + */ + static isArray(array: any): boolean; + /** + * Determines if a string is null or empty or undefined + * + * @param s The string to test + */ + static stringIsNullOrEmpty(s: string): boolean; + /** + * Provides functionality to extend the given object by doing a shallow copy + * + * @param target The object to which properties will be copied + * @param source The source object from which properties will be copied + * @param noOverwrite If true existing properties on the target are not overwritten from the source + * + */ + static extend(target: any, source: TypedHash, noOverwrite?: boolean): any; + /** + * Determines if a given url is absolute + * + * @param url The url to check to see if it is absolute + */ + static isUrlAbsolute(url: string): boolean; + /** + * Ensures that a given url is absolute for the current web based on context + * + * @param candidateUrl The url to make absolute + * + */ + static toAbsoluteUrl(candidateUrl: string): Promise; + } +} +declare module "utils/storage" { + /** + * A wrapper class to provide a consistent interface to browser based storage + * + */ + export class PnPClientStorageWrapper implements PnPClientStore { + private store; + defaultTimeoutMinutes: number; + /** + * True if the wrapped storage is available; otherwise, false + */ + enabled: boolean; + /** + * Creates a new instance of the PnPClientStorageWrapper class + * + * @constructor + */ + constructor(store: Storage, defaultTimeoutMinutes?: number); + /** + * Get a value from storage, or null if that value does not exist + * + * @param key The key whose value we want to retrieve + */ + get(key: string): T; + /** + * Adds a value to the underlying storage + * + * @param key The key to use when storing the provided value + * @param o The value to store + * @param expire Optional, if provided the expiration of the item, otherwise the default is used + */ + put(key: string, o: any, expire?: Date): void; + /** + * Deletes a value from the underlying storage + * + * @param key The key of the pair we want to remove from storage + */ + delete(key: string): void; + /** + * Gets an item from the underlying storage, or adds it if it does not exist using the supplied getter function + * + * @param key The key to use when storing the provided value + * @param getter A function which will upon execution provide the desired value + * @param expire Optional, if provided the expiration of the item, otherwise the default is used + */ + getOrPut(key: string, getter: () => Promise, expire?: Date): Promise; + /** + * Deletes any expired items placed in the store by the pnp library, leaves other items untouched + */ + deleteExpired(): Promise; + /** + * Used to determine if the wrapped storage is available currently + */ + private test(); + /** + * Creates the persistable to store + */ + private createPersistable(o, expire?); + /** + * Deletes expired items added by this library in this.store and sets a timeout to call itself + */ + private cacheExpirationHandler(); + } + /** + * Interface which defines the operations provided by a client storage object + */ + export interface PnPClientStore { + /** + * True if the wrapped storage is available; otherwise, false + */ + enabled: boolean; + /** + * Get a value from storage, or null if that value does not exist + * + * @param key The key whose value we want to retrieve + */ + get(key: string): any; + /** + * Adds a value to the underlying storage + * + * @param key The key to use when storing the provided value + * @param o The value to store + * @param expire Optional, if provided the expiration of the item, otherwise the default is used + */ + put(key: string, o: any, expire?: Date): void; + /** + * Deletes a value from the underlying storage + * + * @param key The key of the pair we want to remove from storage + */ + delete(key: string): void; + /** + * Gets an item from the underlying storage, or adds it if it does not exist using the supplied getter function + * + * @param key The key to use when storing the provided value + * @param getter A function which will upon execution provide the desired value + * @param expire Optional, if provided the expiration of the item, otherwise the default is used + */ + getOrPut(key: string, getter: Function, expire?: Date): any; + /** + * Removes any expired items placed in the store by the pnp library, leaves other items untouched + */ + deleteExpired(): Promise; + } + /** + * A class that will establish wrappers for both local and session storage + */ + export class PnPClientStorage { + private _local; + private _session; + /** + * Creates a new instance of the PnPClientStorage class + * + * @constructor + */ + constructor(_local?: PnPClientStore, _session?: PnPClientStore); + /** + * Provides access to the local storage of the browser + */ + readonly local: PnPClientStore; + /** + * Provides access to the session storage of the browser + */ + readonly session: PnPClientStore; + } +} +declare module "configuration/configuration" { + import { TypedHash } from "collections/collections"; + /** + * Interface for configuration providers + * + */ + export interface IConfigurationProvider { + /** + * Gets the configuration from the provider + */ + getConfiguration(): Promise>; + } + /** + * Class used to manage the current application settings + * + */ + export class Settings { + /** + * The settings currently stored in this instance + */ + private _settings; + /** + * Creates a new instance of the settings class + * + * @constructor + */ + constructor(); + /** + * Adds a new single setting, or overwrites a previous setting with the same key + * + * @param {string} key The key used to store this setting + * @param {string} value The setting value to store + */ + add(key: string, value: string): void; + /** + * Adds a JSON value to the collection as a string, you must use getJSON to rehydrate the object when read + * + * @param {string} key The key used to store this setting + * @param {any} value The setting value to store + */ + addJSON(key: string, value: any): void; + /** + * Applies the supplied hash to the setting collection overwriting any existing value, or created new values + * + * @param {TypedHash} hash The set of values to add + */ + apply(hash: TypedHash): Promise; + /** + * Loads configuration settings into the collection from the supplied provider and returns a Promise + * + * @param {IConfigurationProvider} provider The provider from which we will load the settings + */ + load(provider: IConfigurationProvider): Promise; + /** + * Gets a value from the configuration + * + * @param {string} key The key whose value we want to return. Returns null if the key does not exist + * @return {string} string value from the configuration + */ + get(key: string): string; + /** + * Gets a JSON value, rehydrating the stored string to the original object + * + * @param {string} key The key whose value we want to return. Returns null if the key does not exist + * @return {any} object from the configuration + */ + getJSON(key: string): any; + } +} +declare module "sharepoint/batch" { + import { ODataParser } from "odata/core"; + /** + * Manages a batch of OData operations + */ + export class ODataBatch { + private baseUrl; + private _batchId; + private _dependencies; + private _requests; + constructor(baseUrl: string, _batchId?: string); + readonly batchId: string; + /** + * Adds a request to a batch (not designed for public use) + * + * @param url The full url of the request + * @param method The http method GET, POST, etc + * @param options Any options to include in the request + * @param parser The parser that will hadle the results of the request + */ + add(url: string, method: string, options: any, parser: ODataParser): Promise; + /** + * Adds a dependency insuring that some set of actions will occur before a batch is processed. + * MUST be cleared using the returned resolve delegate to allow batches to run + */ + addDependency(): () => void; + /** + * Execute the current batch and resolve the associated promises + * + * @returns A promise which will be resolved once all of the batch's child promises have resolved + */ + execute(): Promise; + private executeImpl(); + /** + * Parses the response from a batch request into an array of Response instances + * + * @param body Text body of the response from the batch request + */ + private _parseResponse(body); + } +} +declare module "odata/caching" { + import { ODataParser } from "odata/core"; + import { PnPClientStore, PnPClientStorage } from "utils/storage"; + export interface ICachingOptions { + expiration?: Date; + storeName?: "session" | "local"; + key: string; + } + export class CachingOptions implements ICachingOptions { + key: string; + protected static storage: PnPClientStorage; + expiration: Date; + storeName: "session" | "local"; + constructor(key: string); + readonly store: PnPClientStore; + } + export class CachingParserWrapper implements ODataParser { + private _parser; + private _cacheOptions; + constructor(_parser: ODataParser, _cacheOptions: CachingOptions); + parse(response: Response): Promise; + } +} +declare module "request/pipeline" { + import { ODataParser } from "odata/core"; + import { ODataBatch } from "sharepoint/batch"; + import { ICachingOptions } from "odata/caching"; + import { FetchOptions } from "net/utils"; + import { RequestClient } from "request/requestclient"; + /** + * Defines the context for a given request to be processed in the pipeline + */ + export interface RequestContext { + batch: ODataBatch; + batchDependency: () => void; + cachingOptions: ICachingOptions; + hasResult?: boolean; + isBatched: boolean; + isCached: boolean; + options: FetchOptions; + parser: ODataParser; + pipeline?: Array<(c: RequestContext) => Promise>>; + requestAbsoluteUrl: string; + requestId: string; + result?: T; + verb: string; + clientFactory: () => RequestClient; + } + /** + * Sets the result on the context + */ + export function setResult(context: RequestContext, value: any): Promise>; + /** + * Executes the current request context's pipeline + * + * @param context Current context + */ + export function pipe(context: RequestContext): Promise; + /** + * decorator factory applied to methods in the pipeline to control behavior + */ + export function requestPipelineMethod(alwaysRun?: boolean): (target: any, propertyKey: string, descriptor: PropertyDescriptor) => void; + /** + * Contains the methods used within the request pipeline + */ + export class PipelineMethods { + /** + * Logs the start of the request + */ + static logStart(context: RequestContext): Promise>; + /** + * Handles caching of the request + */ + static caching(context: RequestContext): Promise>; + /** + * Sends the request + */ + static send(context: RequestContext): Promise>; + /** + * Logs the end of the request + */ + static logEnd(context: RequestContext): Promise>; + static readonly default: ((context: RequestContext) => Promise>)[]; + } +} +declare module "odata/queryable" { + import { Dictionary } from "collections/collections"; + import { FetchOptions, ConfigOptions } from "net/utils"; + import { ODataParser } from "odata/core"; + import { ICachingOptions } from "odata/caching"; + import { RequestContext } from "request/pipeline"; + export abstract class ODataQueryable { + /** + * Additional options to be set before sending actual http request + */ + protected _options: ConfigOptions; + /** + * Tracks the query parts of the url + */ + protected _query: Dictionary; + /** + * Tracks the url as it is built + */ + protected _url: string; + /** + * Stores the parent url used to create this instance, for recursing back up the tree if needed + */ + protected _parentUrl: string; + /** + * Explicitly tracks if we are using caching for this request + */ + protected _useCaching: boolean; + /** + * Any options that were supplied when caching was enabled + */ + protected _cachingOptions: ICachingOptions; + /** + * Directly concatonates the supplied string to the current url, not normalizing "/" chars + * + * @param pathPart The string to concatonate to the url + */ + concat(pathPart: string): this; + /** + * Appends the given string and normalizes "/" chars + * + * @param pathPart The string to append + */ + protected append(pathPart: string): void; + /** + * Gets the parent url used when creating this instance + * + */ + protected readonly parentUrl: string; + /** + * Provides access to the query builder for this url + * + */ + readonly query: Dictionary; + /** + * Sets custom options for current object and all derived objects accessible via chaining + * + * @param options custom options + */ + configure(options: ConfigOptions): this; + /** + * Enables caching for this request + * + * @param options Defines the options used when caching this request + */ + usingCaching(options?: ICachingOptions): this; + /** + * Gets the currentl url, made absolute based on the availability of the _spPageContextInfo object + * + */ + toUrl(): string; + /** + * Gets the full url with query information + * + */ + abstract toUrlAndQuery(): string; + /** + * Executes the currently built request + * + * @param parser Allows you to specify a parser to handle the result + * @param getOptions The options used for this request + */ + get(parser?: ODataParser, options?: FetchOptions): Promise; + getAs(parser?: ODataParser, options?: FetchOptions): Promise; + protected postCore(options?: FetchOptions, parser?: ODataParser): Promise; + protected postAsCore(options?: FetchOptions, parser?: ODataParser): Promise; + protected patchCore(options?: FetchOptions, parser?: ODataParser): Promise; + protected deleteCore(options?: FetchOptions, parser?: ODataParser): Promise; + /** + * Converts the current instance to a request context + * + * @param verb The request verb + * @param options The set of supplied request options + * @param parser The supplied ODataParser instance + * @param pipeline Optional request processing pipeline + */ + protected abstract toRequestContext(verb: string, options: FetchOptions, parser: ODataParser, pipeline: Array<(c: RequestContext) => Promise>>): Promise>; + } +} +declare module "sharepoint/sharepointqueryable" { + import { FetchOptions } from "net/utils"; + import { ODataParser } from "odata/core"; + import { ODataBatch } from "sharepoint/batch"; + import { ODataQueryable } from "odata/queryable"; + import { RequestContext } from "request/pipeline"; + export interface SharePointQueryableConstructor { + new (baseUrl: string | SharePointQueryable, path?: string): T; + } + /** + * SharePointQueryable Base Class + * + */ + export class SharePointQueryable extends ODataQueryable { + /** + * Tracks the batch of which this query may be part + */ + private _batch; + /** + * Blocks a batch call from occuring, MUST be cleared by calling the returned function + */ + protected addBatchDependency(): () => void; + /** + * Indicates if the current query has a batch associated + * + */ + protected readonly hasBatch: boolean; + /** + * The batch currently associated with this query or null + * + */ + protected readonly batch: ODataBatch; + /** + * Creates a new instance of the SharePointQueryable class + * + * @constructor + * @param baseUrl A string or SharePointQueryable that should form the base part of the url + * + */ + constructor(baseUrl: string | SharePointQueryable, path?: string); + /** + * Creates a new instance of the supplied factory and extends this into that new instance + * + * @param factory constructor for the new SharePointQueryable + */ + as(factory: SharePointQueryableConstructor): T; + /** + * Adds this query to the supplied batch + * + * @example + * ``` + * + * let b = pnp.sp.createBatch(); + * pnp.sp.web.inBatch(b).get().then(...); + * b.execute().then(...) + * ``` + */ + inBatch(batch: ODataBatch): this; + /** + * Gets the full url with query information + * + */ + toUrlAndQuery(): string; + /** + * Gets a parent for this instance as specified + * + * @param factory The contructor for the class to create + */ + protected getParent(factory: SharePointQueryableConstructor, baseUrl?: string | SharePointQueryable, path?: string, batch?: ODataBatch): T; + /** + * Clones this SharePointQueryable into a new SharePointQueryable instance of T + * @param factory Constructor used to create the new instance + * @param additionalPath Any additional path to include in the clone + * @param includeBatch If true this instance's batch will be added to the cloned instance + */ + protected clone(factory: SharePointQueryableConstructor, additionalPath?: string, includeBatch?: boolean): T; + /** + * Converts the current instance to a request context + * + * @param verb The request verb + * @param options The set of supplied request options + * @param parser The supplied ODataParser instance + * @param pipeline Optional request processing pipeline + */ + protected toRequestContext(verb: string, options: FetchOptions, parser: ODataParser, pipeline?: Array<(c: RequestContext) => Promise>>): Promise>; + } + /** + * Represents a REST collection which can be filtered, paged, and selected + * + */ + export class SharePointQueryableCollection extends SharePointQueryable { + /** + * Filters the returned collection (https://msdn.microsoft.com/en-us/library/office/fp142385.aspx#bk_supported) + * + * @param filter The string representing the filter query + */ + filter(filter: string): this; + /** + * Choose which fields to return + * + * @param selects One or more fields to return + */ + select(...selects: string[]): this; + /** + * Expands fields such as lookups to get additional data + * + * @param expands The Fields for which to expand the values + */ + expand(...expands: string[]): this; + /** + * Orders based on the supplied fields ascending + * + * @param orderby The name of the field to sort on + * @param ascending If false DESC is appended, otherwise ASC (default) + */ + orderBy(orderBy: string, ascending?: boolean): this; + /** + * Skips the specified number of items + * + * @param skip The number of items to skip + */ + skip(skip: number): this; + /** + * Limits the query to only return the specified number of items + * + * @param top The query row limit + */ + top(top: number): this; + } + /** + * Represents an instance that can be selected + * + */ + export class SharePointQueryableInstance extends SharePointQueryable { + /** + * Choose which fields to return + * + * @param selects One or more fields to return + */ + select(...selects: string[]): this; + /** + * Expands fields such as lookups to get additional data + * + * @param expands The Fields for which to expand the values + */ + expand(...expands: string[]): this; + } +} +declare module "sharepoint/search" { + import { SharePointQueryable, SharePointQueryableInstance } from "sharepoint/sharepointqueryable"; + import { Dictionary } from "collections/collections"; + /** + * Allows for the fluent construction of search queries + */ + export class SearchQueryBuilder { + private _query; + static create(queryText?: string, queryTemplate?: SearchQuery): SearchQueryBuilder; + constructor(queryText?: string, _query?: {}); + text(queryText: string): this; + template(template: string): this; + sourceId(id: string): this; + readonly enableInterleaving: this; + readonly enableStemming: this; + readonly trimDuplicates: this; + trimDuplicatesIncludeId(n: number): this; + readonly enableNicknames: this; + readonly enableFql: this; + readonly enablePhonetic: this; + readonly bypassResultTypes: this; + readonly processBestBets: this; + readonly enableQueryRules: this; + readonly enableSorting: this; + readonly generateBlockRankLog: this; + rankingModelId(id: string): this; + startRow(n: number): this; + rowLimit(n: number): this; + rowsPerPage(n: number): this; + selectProperties(...properties: string[]): this; + culture(culture: number): this; + timeZoneId(id: number): this; + refinementFilters(...filters: string[]): this; + refiners(refiners: string): this; + hiddenConstraints(constraints: string): this; + sortList(...sorts: Sort[]): this; + timeout(milliseconds: number): this; + hithighlightedProperties(...properties: string[]): this; + clientType(clientType: string): this; + personalizationData(data: string): this; + resultsURL(url: string): this; + queryTag(...tags: string[]): this; + properties(...properties: SearchProperty[]): this; + readonly processPersonalFavorites: this; + queryTemplatePropertiesUrl(url: string): this; + reorderingRules(...rules: ReorderingRule[]): this; + hitHighlightedMultivaluePropertyLimit(limit: number): this; + readonly enableOrderingHitHighlightedProperty: this; + collapseSpecification(spec: string): this; + uiLanguage(lang: number): this; + desiredSnippetLength(len: number): this; + maxSnippetLength(len: number): this; + summaryLength(len: number): this; + toSearchQuery(): SearchQuery; + private extendQuery(part); + } + /** + * Describes the search API + * + */ + export class Search extends SharePointQueryableInstance { + /** + * Creates a new instance of the Search class + * + * @param baseUrl The url for the search context + * @param query The SearchQuery object to execute + */ + constructor(baseUrl: string | SharePointQueryable, path?: string); + /** + * ....... + * @returns Promise + */ + execute(query: SearchQuery): Promise; + /** + * Fixes up properties that expect to consist of a "results" collection when needed + * + * @param prop property to fixup for container struct + */ + private fixupProp(prop); + } + /** + * Describes the SearchResults class, which returns the formatted and raw version of the query response + */ + export class SearchResults { + private _url; + private _query; + private _raw; + private _primary; + /** + * Creates a new instance of the SearchResult class + * + */ + constructor(rawResponse: any, _url: string, _query: SearchQuery, _raw?: SearchResponse, _primary?: SearchResult[]); + readonly ElapsedTime: number; + readonly RowCount: number; + readonly TotalRows: number; + readonly TotalRowsIncludingDuplicates: number; + readonly RawSearchResults: SearchResponse; + readonly PrimarySearchResults: SearchResult[]; + /** + * Gets a page of results + * + * @param pageNumber Index of the page to return. Used to determine StartRow + * @param pageSize Optional, items per page (default = 10) + */ + getPage(pageNumber: number, pageSize?: number): Promise; + /** + * Formats a search results array + * + * @param rawResults The array to process + */ + protected formatSearchResults(rawResults: any): SearchResult[]; + } + /** + * Describes the SearchQuery interface + */ + export interface SearchQuery { + /** + * A string that contains the text for the search query. + */ + Querytext?: string; + /** + * A string that contains the text that replaces the query text, as part of a query transform. + */ + QueryTemplate?: string; + /** + * A Boolean value that specifies whether the result tables that are returned for + * the result block are mixed with the result tables that are returned for the original query. + */ + EnableInterleaving?: boolean; + /** + * A Boolean value that specifies whether stemming is enabled. + */ + EnableStemming?: boolean; + /** + * A Boolean value that specifies whether duplicate items are removed from the results. + */ + TrimDuplicates?: boolean; + /** + * A Boolean value that specifies whether the exact terms in the search query are used to find matches, or if nicknames are used also. + */ + EnableNicknames?: boolean; + /** + * A Boolean value that specifies whether the query uses the FAST Query Language (FQL). + */ + EnableFQL?: boolean; + /** + * A Boolean value that specifies whether the phonetic forms of the query terms are used to find matches. + */ + EnablePhonetic?: boolean; + /** + * A Boolean value that specifies whether to perform result type processing for the query. + */ + BypassResultTypes?: boolean; + /** + * A Boolean value that specifies whether to return best bet results for the query. + * This parameter is used only when EnableQueryRules is set to true, otherwise it is ignored. + */ + ProcessBestBets?: boolean; + /** + * A Boolean value that specifies whether to enable query rules for the query. + */ + EnableQueryRules?: boolean; + /** + * A Boolean value that specifies whether to sort search results. + */ + EnableSorting?: boolean; + /** + * Specifies whether to return block rank log information in the BlockRankLog property of the interleaved result table. + * A block rank log contains the textual information on the block score and the documents that were de-duplicated. + */ + GenerateBlockRankLog?: boolean; + /** + * The result source ID to use for executing the search query. + */ + SourceId?: string; + /** + * The ID of the ranking model to use for the query. + */ + RankingModelId?: string; + /** + * The first row that is included in the search results that are returned. + * You use this parameter when you want to implement paging for search results. + */ + StartRow?: number; + /** + * The maximum number of rows overall that are returned in the search results. + * Compared to RowsPerPage, RowLimit is the maximum number of rows returned overall. + */ + RowLimit?: number; + /** + * The maximum number of rows to return per page. + * Compared to RowLimit, RowsPerPage refers to the maximum number of rows to return per page, + * and is used primarily when you want to implement paging for search results. + */ + RowsPerPage?: number; + /** + * The managed properties to return in the search results. + */ + SelectProperties?: string[]; + /** + * The locale ID (LCID) for the query. + */ + Culture?: number; + /** + * The set of refinement filters used when issuing a refinement query (FQL) + */ + RefinementFilters?: string[]; + /** + * The set of refiners to return in a search result. + */ + Refiners?: string; + /** + * The additional query terms to append to the query. + */ + HiddenConstraints?: string; + /** + * The list of properties by which the search results are ordered. + */ + SortList?: Sort[]; + /** + * The amount of time in milliseconds before the query request times out. + */ + Timeout?: number; + /** + * The properties to highlight in the search result summary when the property value matches the search terms entered by the user. + */ + HitHighlightedProperties?: string[]; + /** + * The type of the client that issued the query. + */ + ClientType?: string; + /** + * The GUID for the user who submitted the search query. + */ + PersonalizationData?: string; + /** + * The URL for the search results page. + */ + ResultsUrl?: string; + /** + * Custom tags that identify the query. You can specify multiple query tags + */ + QueryTag?: string[]; + /** + * Properties to be used to configure the search query + */ + Properties?: SearchProperty[]; + /** + * A Boolean value that specifies whether to return personal favorites with the search results. + */ + ProcessPersonalFavorites?: boolean; + /** + * The location of the queryparametertemplate.xml file. This file is used to enable anonymous users to make Search REST queries. + */ + QueryTemplatePropertiesUrl?: string; + /** + * Special rules for reordering search results. + * These rules can specify that documents matching certain conditions are ranked higher or lower in the results. + * This property applies only when search results are sorted based on rank. + */ + ReorderingRules?: ReorderingRule[]; + /** + * The number of properties to show hit highlighting for in the search results. + */ + HitHighlightedMultivaluePropertyLimit?: number; + /** + * A Boolean value that specifies whether the hit highlighted properties can be ordered. + */ + EnableOrderingHitHighlightedProperty?: boolean; + /** + * The managed properties that are used to determine how to collapse individual search results. + * Results are collapsed into one or a specified number of results if they match any of the individual collapse specifications. + * In a collapse specification, results are collapsed if their properties match all individual properties in the collapse specification. + */ + CollapseSpecification?: string; + /** + * The locale identifier (LCID) of the user interface + */ + UIlanguage?: number; + /** + * The preferred number of characters to display in the hit-highlighted summary generated for a search result. + */ + DesiredSnippetLength?: number; + /** + * The maximum number of characters to display in the hit-highlighted summary generated for a search result. + */ + MaxSnippetLength?: number; + /** + * The number of characters to display in the result summary for a search result. + */ + SummaryLength?: number; + } + /** + * Provides hints at the properties which may be available on the result object + */ + export interface SearchResult { + Rank?: number; + DocId?: number; + WorkId?: number; + Title?: string; + Author?: string; + Size?: number; + Path?: string; + Description?: string; + Write?: Date; + LastModifiedTime?: Date; + CollapsingStatus?: number; + HitHighlightedSummary?: string; + HitHighlightedProperties?: string; + contentclass?: string; + PictureThumbnailURL?: string; + ServerRedirectedURL?: string; + ServerRedirectedEmbedURL?: string; + ServerRedirectedPreviewURL?: string; + FileExtension?: string; + ContentTypeId?: string; + ParentLink?: string; + ViewsLifeTime?: number; + ViewsRecent?: number; + SectionNames?: string; + SectionIndexes?: string; + SiteLogo?: string; + SiteDescription?: string; + importance?: number; + SiteName?: string; + IsDocument?: boolean; + FileType?: string; + IsContainer?: boolean; + WebTemplate?: string; + SPWebUrl?: string; + UniqueId?: string; + ProgId?: string; + OriginalPath?: string; + RenderTemplateId?: string; + PartitionId?: string; + UrlZone?: number; + Culture?: string; + } + export interface SearchResponse { + ElapsedTime: number; + Properties?: { + Key: string; + Value: any; + ValueType: string; + }[]; + PrimaryQueryResult?: ResultTableCollection; + SecondaryQueryResults?: ResultTableCollection; + SpellingSuggestion?: string; + TriggeredRules?: any[]; + } + export interface ResultTableCollection { + QueryErrors?: Dictionary; + QueryId?: string; + QueryRuleId?: string; + CustomResults?: ResultTable; + RefinementResults?: ResultTable; + RelevantResults?: ResultTable; + SpecialTermResults?: ResultTable; + } + export interface ResultTable { + GroupTemplateId?: string; + ItemTemplateId?: string; + Properties?: { + Key: string; + Value: any; + ValueType: string; + }[]; + Table: { + Rows: { + Cells: { + Key: string; + Value: any; + ValueType: string; + }[]; + }[]; + }; + ResultTitle?: string; + ResultTitleUrl?: string; + RowCount?: number; + TableType?: string; + TotalRows?: number; + TotalRowsIncludingDuplicates?: number; + } + /** + * Defines how search results are sorted. + */ + export interface Sort { + /** + * The name for a property by which the search results are ordered. + */ + Property: string; + /** + * The direction in which search results are ordered. + */ + Direction: SortDirection; + } + /** + * Defines one search property + */ + export interface SearchProperty { + Name: string; + Value: SearchPropertyValue; + } + /** + * Defines one search property value. Set only one of StrlVal/BoolVal/IntVal/StrArray. + */ + export interface SearchPropertyValue { + StrVal?: string; + BoolVal?: boolean; + Intval?: number; + StrArray?: string[]; + QueryPropertyValueTypeIndex: QueryPropertyValueType; + } + /** + * defines the SortDirection enum + */ + export enum SortDirection { + Ascending = 0, + Descending = 1, + FQLFormula = 2, + } + /** + * Defines how ReorderingRule interface, used for reordering results + */ + export interface ReorderingRule { + /** + * The value to match on + */ + MatchValue: string; + /** + * The rank boosting + */ + Boost: number; + /** + * The rank boosting + */ + MatchType: ReorderingRuleMatchType; + } + /** + * defines the ReorderingRuleMatchType enum + */ + export enum ReorderingRuleMatchType { + ResultContainsKeyword = 0, + TitleContainsKeyword = 1, + TitleMatchesKeyword = 2, + UrlStartsWith = 3, + UrlExactlyMatches = 4, + ContentTypeIs = 5, + FileExtensionMatches = 6, + ResultHasTag = 7, + ManualCondition = 8, + } + /** + * Specifies the type value for the property + */ + export enum QueryPropertyValueType { + None = 0, + StringType = 1, + Int32TYpe = 2, + BooleanType = 3, + StringArrayType = 4, + UnSupportedType = 5, + } + export class SearchBuiltInSourceId { + static readonly Documents: string; + static readonly ItemsMatchingContentType: string; + static readonly ItemsMatchingTag: string; + static readonly ItemsRelatedToCurrentUser: string; + static readonly ItemsWithSameKeywordAsThisItem: string; + static readonly LocalPeopleResults: string; + static readonly LocalReportsAndDataResults: string; + static readonly LocalSharePointResults: string; + static readonly LocalVideoResults: string; + static readonly Pages: string; + static readonly Pictures: string; + static readonly Popular: string; + static readonly RecentlyChangedItems: string; + static readonly RecommendedItems: string; + static readonly Wiki: string; + } +} +declare module "sharepoint/searchsuggest" { + import { SharePointQueryable, SharePointQueryableInstance } from "sharepoint/sharepointqueryable"; + /** + * Defines a query execute against the search/suggest endpoint (see https://msdn.microsoft.com/en-us/library/office/dn194079.aspx) + */ + export interface SearchSuggestQuery { + /** + * A string that contains the text for the search query. + */ + querytext: string; + /** + * The number of query suggestions to retrieve. Must be greater than zero (0). The default value is 5. + */ + count?: number; + /** + * The number of personal results to retrieve. Must be greater than zero (0). The default value is 5. + */ + personalCount?: number; + /** + * A Boolean value that specifies whether to retrieve pre-query or post-query suggestions. true to return pre-query suggestions; otherwise, false. The default value is false. + */ + preQuery?: boolean; + /** + * A Boolean value that specifies whether to hit-highlight or format in bold the query suggestions. true to format in bold the terms in the returned query suggestions + * that match terms in the specified query; otherwise, false. The default value is true. + */ + hitHighlighting?: boolean; + /** + * A Boolean value that specifies whether to capitalize the first letter in each term in the returned query suggestions. true to capitalize the first letter in each term; + * otherwise, false. The default value is false. + */ + capitalize?: boolean; + /** + * The locale ID (LCID) for the query (see https://msdn.microsoft.com/en-us/library/cc233982.aspx). + */ + culture?: string; + /** + * A Boolean value that specifies whether stemming is enabled. true to enable stemming; otherwise, false. The default value is true. + */ + stemming?: boolean; + /** + * A Boolean value that specifies whether to include people names in the returned query suggestions. true to include people names in the returned query suggestions; + * otherwise, false. The default value is true. + */ + includePeople?: boolean; + /** + * A Boolean value that specifies whether to turn on query rules for this query. true to turn on query rules; otherwise, false. The default value is true. + */ + queryRules?: boolean; + /** + * A Boolean value that specifies whether to return query suggestions for prefix matches. true to return query suggestions based on prefix matches, otherwise, false when + * query suggestions should match the full query word. + */ + prefixMatch?: boolean; + } + export class SearchSuggest extends SharePointQueryableInstance { + constructor(baseUrl: string | SharePointQueryable, path?: string); + execute(query: SearchSuggestQuery): Promise; + private mapQueryToQueryString(query); + } + export class SearchSuggestResult { + PeopleNames: string[]; + PersonalResults: PersonalResultSuggestion[]; + Queries: any[]; + constructor(json: any); + } + export interface PersonalResultSuggestion { + HighlightedTitle?: string; + IsBestBet?: boolean; + Title?: string; + TypeId?: string; + Url?: string; + } +} +declare module "sharepoint/odata" { + import { SharePointQueryableConstructor } from "sharepoint/sharepointqueryable"; + import { ODataParser } from "odata/core"; + export function spExtractODataId(candidate: any): string; + export function spGetEntityUrl(entity: any): string; + export function spODataEntity(factory: SharePointQueryableConstructor): ODataParser; + export function spODataEntityArray(factory: SharePointQueryableConstructor): ODataParser; +} +declare module "sharepoint/siteusers" { + import { SharePointQueryable, SharePointQueryableInstance, SharePointQueryableCollection } from "sharepoint/sharepointqueryable"; + import { SiteGroups } from "sharepoint/sitegroups"; + import { TypedHash } from "collections/collections"; + /** + * Properties that provide both a getter, and a setter. + * + */ + export interface UserUpdateResult { + user: SiteUser; + data: any; + } + /** + * Describes a collection of all site collection users + * + */ + export class SiteUsers extends SharePointQueryableCollection { + /** + * Creates a new instance of the SiteUsers class + * + * @param baseUrl The url or SharePointQueryable which forms the parent of this user collection + */ + constructor(baseUrl: string | SharePointQueryable, path?: string); + /** + * Gets a user from the collection by email + * + * @param email The email address of the user to retrieve + */ + getByEmail(email: string): SiteUser; + /** + * Gets a user from the collection by id + * + * @param id The id of the user to retrieve + */ + getById(id: number): SiteUser; + /** + * Gets a user from the collection by login name + * + * @param loginName The login name of the user to retrieve + */ + getByLoginName(loginName: string): SiteUser; + /** + * Removes a user from the collection by id + * + * @param id The id of the user to remove + */ + removeById(id: number | SharePointQueryable): Promise; + /** + * Removes a user from the collection by login name + * + * @param loginName The login name of the user to remove + */ + removeByLoginName(loginName: string): Promise; + /** + * Adds a user to a group + * + * @param loginName The login name of the user to add to the group + * + */ + add(loginName: string): Promise; + } + /** + * Describes a single user + * + */ + export class SiteUser extends SharePointQueryableInstance { + /** + * Gets the groups for this user + * + */ + readonly groups: SiteGroups; + /** + * Updates this user instance with the supplied properties + * + * @param properties A plain object of property names and values to update for the user + */ + update(properties: TypedHash): Promise; + /** + * Delete this user + * + */ + delete(): Promise; + } + /** + * Represents the current user + */ + export class CurrentUser extends SharePointQueryableInstance { + constructor(baseUrl: string | SharePointQueryable, path?: string); + } + export interface SiteUserProps { + Email: string; + Id: number; + IsHiddenInUI: boolean; + IsShareByEmailGuestUser: boolean; + IsSiteAdmin: boolean; + LoginName: string; + PrincipalType: number; + Title: string; + } +} +declare module "sharepoint/sitegroups" { + import { SharePointQueryable, SharePointQueryableInstance, SharePointQueryableCollection } from "sharepoint/sharepointqueryable"; + import { SiteUsers } from "sharepoint/siteusers"; + import { TypedHash } from "collections/collections"; + /** + * Principal Type enum + * + */ + export enum PrincipalType { + None = 0, + User = 1, + DistributionList = 2, + SecurityGroup = 4, + SharePointGroup = 8, + All = 15, + } + /** + * Results from updating a group + * + */ + export interface GroupUpdateResult { + group: SiteGroup; + data: any; + } + /** + * Results from adding a group + * + */ + export interface GroupAddResult { + group: SiteGroup; + data: any; + } + /** + * Describes a collection of site groups + * + */ + export class SiteGroups extends SharePointQueryableCollection { + /** + * Creates a new instance of the SiteGroups class + * + * @param baseUrl The url or SharePointQueryable which forms the parent of this group collection + */ + constructor(baseUrl: string | SharePointQueryable, path?: string); + /** + * Adds a new group to the site collection + * + * @param props The group properties object of property names and values to be set for the group + */ + add(properties: TypedHash): Promise; + /** + * Gets a group from the collection by name + * + * @param groupName The name of the group to retrieve + */ + getByName(groupName: string): SiteGroup; + /** + * Gets a group from the collection by id + * + * @param id The id of the group to retrieve + */ + getById(id: number): SiteGroup; + /** + * Removes the group with the specified member id from the collection + * + * @param id The id of the group to remove + */ + removeById(id: number): Promise; + /** + * Removes the cross-site group with the specified name from the collection + * + * @param loginName The name of the group to remove + */ + removeByLoginName(loginName: string): Promise; + } + /** + * Describes a single group + * + */ + export class SiteGroup extends SharePointQueryableInstance { + /** + * Gets the users for this group + * + */ + readonly users: SiteUsers; + /** + * Updates this group instance with the supplied properties + * + * @param properties A GroupWriteableProperties object of property names and values to update for the group + */ + update(properties: TypedHash): Promise; + } + export interface SiteGroupAddResult { + group: SiteGroup; + data: any; + } +} +declare module "sharepoint/types" { + import { TypedHash } from "collections/collections"; + /** + * Represents the unique sequential location of a change within the change log. + */ + export interface ChangeToken { + /** + * Gets or sets a string value that contains the serialized representation of the change token generated by the protocol server. + */ + StringValue: string; + } + /** + * Defines a query that is performed against the change log. + */ + export interface ChangeQuery { + /** + * Gets or sets a value that specifies whether add changes are included in the query. + */ + Add?: boolean; + /** + * Gets or sets a value that specifies whether changes to alerts are included in the query. + */ + Alert?: boolean; + /** + * Gets or sets a value that specifies the end date and end time for changes that are returned through the query. + */ + ChangeTokenEnd?: ChangeToken; + /** + * Gets or sets a value that specifies the start date and start time for changes that are returned through the query. + */ + ChangeTokenStart?: ChangeToken; + /** + * Gets or sets a value that specifies whether changes to content types are included in the query. + */ + ContentType?: boolean; + /** + * Gets or sets a value that specifies whether deleted objects are included in the query. + */ + DeleteObject?: boolean; + /** + * Gets or sets a value that specifies whether changes to fields are included in the query. + */ + Field?: boolean; + /** + * Gets or sets a value that specifies whether changes to files are included in the query. + */ + File?: boolean; + /** + * Gets or sets value that specifies whether changes to folders are included in the query. + */ + Folder?: boolean; + /** + * Gets or sets a value that specifies whether changes to groups are included in the query. + */ + Group?: boolean; + /** + * Gets or sets a value that specifies whether adding users to groups is included in the query. + */ + GroupMembershipAdd?: boolean; + /** + * Gets or sets a value that specifies whether deleting users from the groups is included in the query. + */ + GroupMembershipDelete?: boolean; + /** + * Gets or sets a value that specifies whether general changes to list items are included in the query. + */ + Item?: boolean; + /** + * Gets or sets a value that specifies whether changes to lists are included in the query. + */ + List?: boolean; + /** + * Gets or sets a value that specifies whether move changes are included in the query. + */ + Move?: boolean; + /** + * Gets or sets a value that specifies whether changes to the navigation structure of a site collection are included in the query. + */ + Navigation?: boolean; + /** + * Gets or sets a value that specifies whether renaming changes are included in the query. + */ + Rename?: boolean; + /** + * Gets or sets a value that specifies whether restoring items from the recycle bin or from backups is included in the query. + */ + Restore?: boolean; + /** + * Gets or sets a value that specifies whether adding role assignments is included in the query. + */ + RoleAssignmentAdd?: boolean; + /** + * Gets or sets a value that specifies whether adding role assignments is included in the query. + */ + RoleAssignmentDelete?: boolean; + /** + * Gets or sets a value that specifies whether adding role assignments is included in the query. + */ + RoleDefinitionAdd?: boolean; + /** + * Gets or sets a value that specifies whether adding role assignments is included in the query. + */ + RoleDefinitionDelete?: boolean; + /** + * Gets or sets a value that specifies whether adding role assignments is included in the query. + */ + RoleDefinitionUpdate?: boolean; + /** + * Gets or sets a value that specifies whether modifications to security policies are included in the query. + */ + SecurityPolicy?: boolean; + /** + * Gets or sets a value that specifies whether changes to site collections are included in the query. + */ + Site?: boolean; + /** + * Gets or sets a value that specifies whether updates made using the item SystemUpdate method are included in the query. + */ + SystemUpdate?: boolean; + /** + * Gets or sets a value that specifies whether update changes are included in the query. + */ + Update?: boolean; + /** + * Gets or sets a value that specifies whether changes to users are included in the query. + */ + User?: boolean; + /** + * Gets or sets a value that specifies whether changes to views are included in the query. + */ + View?: boolean; + /** + * Gets or sets a value that specifies whether changes to Web sites are included in the query. + */ + Web?: boolean; + } + /** + * Specifies a Collaborative Application Markup Language (CAML) query on a list or joined lists. + */ + export interface CamlQuery { + /** + * Gets or sets a value that indicates whether the query returns dates in Coordinated Universal Time (UTC) format. + */ + DatesInUtc?: boolean; + /** + * Gets or sets a value that specifies the server relative URL of a list folder from which results will be returned. + */ + FolderServerRelativeUrl?: string; + /** + * Gets or sets a value that specifies the information required to get the next page of data for the list view. + */ + ListItemCollectionPosition?: ListItemCollectionPosition; + /** + * Gets or sets value that specifies the XML schema that defines the list view. + */ + ViewXml?: string; + } + /** + * Specifies the information required to get the next page of data for a list view. + */ + export interface ListItemCollectionPosition { + /** + * Gets or sets a value that specifies information, as name-value pairs, required to get the next page of data for a list view. + */ + PagingInfo: string; + } + /** + * Represents the input parameter of the GetListItemChangesSinceToken method. + */ + export interface ChangeLogitemQuery { + /** + * The change token for the request. + */ + ChangeToken?: string; + /** + * The XML element that defines custom filtering for the query. + */ + Contains?: string; + /** + * The records from the list to return and their return order. + */ + Query?: string; + /** + * The options for modifying the query. + */ + QueryOptions?: string; + /** + * RowLimit + */ + RowLimit?: string; + /** + * The names of the fields to include in the query result. + */ + ViewFields?: string; + /** + * The GUID of the view. + */ + ViewName?: string; + } + /** + * Determines the display mode of the given control or view + */ + export enum ControlMode { + Display = 1, + Edit = 2, + New = 3, + } + /** + * Represents properties of a list item field and its value. + */ + export interface ListItemFormUpdateValue { + /** + * The error message result after validating the value for the field. + */ + ErrorMessage?: string; + /** + * The internal name of the field. + */ + FieldName?: string; + /** + * The value of the field, in string format. + */ + FieldValue?: string; + /** + * Indicates whether there was an error result after validating the value for the field. + */ + HasException?: boolean; + } + /** + * Specifies the type of the field. + */ + export enum FieldTypes { + Invalid = 0, + Integer = 1, + Text = 2, + Note = 3, + DateTime = 4, + Counter = 5, + Choice = 6, + Lookup = 7, + Boolean = 8, + Number = 9, + Currency = 10, + URL = 11, + Computed = 12, + Threading = 13, + Guid = 14, + MultiChoice = 15, + GridChoice = 16, + Calculated = 17, + File = 18, + Attachments = 19, + User = 20, + Recurrence = 21, + CrossProjectLink = 22, + ModStat = 23, + Error = 24, + ContentTypeId = 25, + PageSeparator = 26, + ThreadIndex = 27, + WorkflowStatus = 28, + AllDayEvent = 29, + WorkflowEventType = 30, + } + export enum DateTimeFieldFormatType { + DateOnly = 0, + DateTime = 1, + } + /** + * Specifies the control settings while adding a field. + */ + export enum AddFieldOptions { + /** + * Specify that a new field added to the list must also be added to the default content type in the site collection + */ + DefaultValue = 0, + /** + * Specify that a new field added to the list must also be added to the default content type in the site collection. + */ + AddToDefaultContentType = 1, + /** + * Specify that a new field must not be added to any other content type + */ + AddToNoContentType = 2, + /** + * Specify that a new field that is added to the specified list must also be added to all content types in the site collection + */ + AddToAllContentTypes = 4, + /** + * Specify adding an internal field name hint for the purpose of avoiding possible database locking or field renaming operations + */ + AddFieldInternalNameHint = 8, + /** + * Specify that a new field that is added to the specified list must also be added to the default list view + */ + AddFieldToDefaultView = 16, + /** + * Specify to confirm that no other field has the same display name + */ + AddFieldCheckDisplayName = 32, + } + export interface XmlSchemaFieldCreationInformation { + Options?: AddFieldOptions; + SchemaXml: string; + } + export enum CalendarType { + Gregorian = 1, + Japan = 3, + Taiwan = 4, + Korea = 5, + Hijri = 6, + Thai = 7, + Hebrew = 8, + GregorianMEFrench = 9, + GregorianArabic = 10, + GregorianXLITEnglish = 11, + GregorianXLITFrench = 12, + KoreaJapanLunar = 14, + ChineseLunar = 15, + SakaEra = 16, + UmAlQura = 23, + } + export enum UrlFieldFormatType { + Hyperlink = 0, + Image = 1, + } + export interface BasePermissions { + Low: number; + High: number; + } + export enum PermissionKind { + /** + * Has no permissions on the Site. Not available through the user interface. + */ + EmptyMask = 0, + /** + * View items in lists, documents in document libraries, and Web discussion comments. + */ + ViewListItems = 1, + /** + * Add items to lists, documents to document libraries, and Web discussion comments. + */ + AddListItems = 2, + /** + * Edit items in lists, edit documents in document libraries, edit Web discussion comments + * in documents, and customize Web Part Pages in document libraries. + */ + EditListItems = 3, + /** + * Delete items from a list, documents from a document library, and Web discussion + * comments in documents. + */ + DeleteListItems = 4, + /** + * Approve a minor version of a list item or document. + */ + ApproveItems = 5, + /** + * View the source of documents with server-side file handlers. + */ + OpenItems = 6, + /** + * View past versions of a list item or document. + */ + ViewVersions = 7, + /** + * Delete past versions of a list item or document. + */ + DeleteVersions = 8, + /** + * Discard or check in a document which is checked out to another user. + */ + CancelCheckout = 9, + /** + * Create, change, and delete personal views of lists. + */ + ManagePersonalViews = 10, + /** + * Create and delete lists, add or remove columns in a list, and add or remove public views of a list. + */ + ManageLists = 12, + /** + * View forms, views, and application pages, and enumerate lists. + */ + ViewFormPages = 13, + /** + * Make content of a list or document library retrieveable for anonymous users through SharePoint search. + * The list permissions in the site do not change. + */ + AnonymousSearchAccessList = 14, + /** + * Allow users to open a Site, list, or folder to access items inside that container. + */ + Open = 17, + /** + * View pages in a Site. + */ + ViewPages = 18, + /** + * Add, change, or delete HTML pages or Web Part Pages, and edit the Site using + * a Windows SharePoint Services compatible editor. + */ + AddAndCustomizePages = 19, + /** + * Apply a theme or borders to the entire Site. + */ + ApplyThemeAndBorder = 20, + /** + * Apply a style sheet (.css file) to the Site. + */ + ApplyStyleSheets = 21, + /** + * View reports on Site usage. + */ + ViewUsageData = 22, + /** + * Create a Site using Self-Service Site Creation. + */ + CreateSSCSite = 23, + /** + * Create subsites such as team sites, Meeting Workspace sites, and Document Workspace sites. + */ + ManageSubwebs = 24, + /** + * Create a group of users that can be used anywhere within the site collection. + */ + CreateGroups = 25, + /** + * Create and change permission levels on the Site and assign permissions to users + * and groups. + */ + ManagePermissions = 26, + /** + * Enumerate files and folders in a Site using Microsoft Office SharePoint Designer + * and WebDAV interfaces. + */ + BrowseDirectories = 27, + /** + * View information about users of the Site. + */ + BrowseUserInfo = 28, + /** + * Add or remove personal Web Parts on a Web Part Page. + */ + AddDelPrivateWebParts = 29, + /** + * Update Web Parts to display personalized information. + */ + UpdatePersonalWebParts = 30, + /** + * Grant the ability to perform all administration tasks for the Site as well as + * manage content, activate, deactivate, or edit properties of Site scoped Features + * through the object model or through the user interface (UI). When granted on the + * root Site of a Site Collection, activate, deactivate, or edit properties of + * site collection scoped Features through the object model. To browse to the Site + * Collection Features page and activate or deactivate Site Collection scoped Features + * through the UI, you must be a Site Collection administrator. + */ + ManageWeb = 31, + /** + * Content of lists and document libraries in the Web site will be retrieveable for anonymous users through + * SharePoint search if the list or document library has AnonymousSearchAccessList set. + */ + AnonymousSearchAccessWebLists = 32, + /** + * Use features that launch client applications. Otherwise, users must work on documents + * locally and upload changes. + */ + UseClientIntegration = 37, + /** + * Use SOAP, WebDAV, or Microsoft Office SharePoint Designer interfaces to access the Site. + */ + UseRemoteAPIs = 38, + /** + * Manage alerts for all users of the Site. + */ + ManageAlerts = 39, + /** + * Create e-mail alerts. + */ + CreateAlerts = 40, + /** + * Allows a user to change his or her user information, such as adding a picture. + */ + EditMyUserInfo = 41, + /** + * Enumerate permissions on Site, list, folder, document, or list item. + */ + EnumeratePermissions = 63, + /** + * Has all permissions on the Site. Not available through the user interface. + */ + FullMask = 65, + } + export interface FollowedContent { + FollowedDocumentsUrl: string; + FollowedSitesUrl: string; + } + export interface UserProfile { + /** + * An object containing the user's FollowedDocumentsUrl and FollowedSitesUrl. + */ + FollowedContent?: FollowedContent; + /** + * The account name of the user. (SharePoint Online only) + */ + AccountName?: string; + /** + * The display name of the user. (SharePoint Online only) + */ + DisplayName?: string; + /** + * The FirstRun flag of the user. (SharePoint Online only) + */ + O15FirstRunExperience?: number; + /** + * The personal site of the user. + */ + PersonalSite?: string; + /** + * The capabilities of the user's personal site. Represents a bitwise PersonalSiteCapabilities value: + * None = 0; Profile Value = 1; Social Value = 2; Storage Value = 4; MyTasksDashboard Value = 8; Education Value = 16; Guest Value = 32. + */ + PersonalSiteCapabilities?: number; + /** + * The error thrown when the user's personal site was first created, if any. (SharePoint Online only) + */ + PersonalSiteFirstCreationError?: string; + /** + * The date and time when the user's personal site was first created. (SharePoint Online only) + */ + PersonalSiteFirstCreationTime?: Date; + /** + * The status for the state of the personal site instantiation + */ + PersonalSiteInstantiationState?: number; + /** + * The date and time when the user's personal site was last created. (SharePoint Online only) + */ + PersonalSiteLastCreationTime?: Date; + /** + * The number of attempts made to create the user's personal site. (SharePoint Online only) + */ + PersonalSiteNumberOfRetries?: number; + /** + * Indicates whether the user's picture is imported from Exchange. + */ + PictureImportEnabled?: boolean; + /** + * The public URL of the personal site of the current user. (SharePoint Online only) + */ + PublicUrl?: string; + /** + * The URL used to create the user's personal site. + */ + UrlToCreatePersonalSite?: string; + } + export interface HashTag { + /** + * The hash tag's internal name. + */ + Name?: string; + /** + * The number of times that the hash tag is used. + */ + UseCount?: number; + } + export interface HashTagCollection { + Items: HashTag[]; + } + export interface UserIdInfo { + NameId?: string; + NameIdIssuer?: string; + } + export enum PrincipalType { + None = 0, + User = 1, + DistributionList = 2, + SecurityGroup = 4, + SharePointGroup = 8, + All = 15, + } + export enum PrincipalSource { + None = 0, + UserInfoList = 1, + Windows = 2, + MembershipProvider = 4, + RoleProvider = 8, + All = 15, + } + export enum RoleType { + None = 0, + Guest = 1, + Reader = 2, + Contributor = 3, + WebDesigner = 4, + Administrator = 5, + } + export interface PrincipalInfo { + Department: string; + DisplayName: string; + Email: string; + JobTitle: string; + LoginName: string; + Mobile: string; + PrincipalId: number; + PrincipalType: PrincipalType; + SIPAddress: string; + } + export interface DocumentLibraryInformation { + AbsoluteUrl?: string; + Modified?: Date; + ModifiedFriendlyDisplay?: string; + ServerRelativeUrl?: string; + Title?: string; + } + export interface ContextInfo { + FormDigestTimeoutSeconds?: number; + FormDigestValue?: number; + LibraryVersion?: string; + SiteFullUrl?: string; + SupportedSchemaVersions?: string[]; + WebFullUrl?: string; + } + export interface RenderListData { + Row: any[]; + FirstRow: number; + FolderPermissions: string; + LastRow: number; + FilterLink: string; + ForceNoHierarchy: string; + HierarchyHasIndention: string; + } + export enum PageType { + Invalid = -1, + DefaultView = 0, + NormalView = 1, + DialogView = 2, + View = 3, + DisplayForm = 4, + DisplayFormDialog = 5, + EditForm = 6, + EditFormDialog = 7, + NewForm = 8, + NewFormDialog = 9, + SolutionForm = 10, + PAGE_MAXITEMS = 11, + } + export interface ListFormData { + ContentType?: string; + Title?: string; + Author?: string; + Editor?: string; + Created?: Date; + Modified: Date; + Attachments?: any; + ListSchema?: any; + FormControlMode?: number; + FieldControlModes?: { + Title?: number; + Author?: number; + Editor?: number; + Created?: number; + Modified?: number; + Attachments?: number; + }; + WebAttributes?: { + WebUrl?: string; + EffectivePresenceEnabled?: boolean; + AllowScriptableWebParts?: boolean; + PermissionCustomizePages?: boolean; + LCID?: number; + CurrentUserId?: number; + }; + ItemAttributes?: { + Id?: number; + FsObjType?: number; + ExternalListItem?: boolean; + Url?: string; + EffectiveBasePermissionsLow?: number; + EffectiveBasePermissionsHigh?: number; + }; + ListAttributes?: { + Id?: string; + BaseType?: number; + Direction?: string; + ListTemplateType?: number; + DefaultItemOpen?: number; + EnableVersioning?: boolean; + }; + CSRCustomLayout?: boolean; + PostBackRequired?: boolean; + PreviousPostBackHandled?: boolean; + UploadMode?: boolean; + SubmitButtonID?: string; + ItemContentTypeName?: string; + ItemContentTypeId?: string; + JSLinks?: string; + } + export enum SharingLinkKind { + /** + * Uninitialized link + */ + Uninitialized = 0, + /** + * Direct link to the object being shared + */ + Direct = 1, + /** + * Organization-shareable link to the object being shared with view permissions + */ + OrganizationView = 2, + /** + * Organization-shareable link to the object being shared with edit permissions + */ + OrganizationEdit = 3, + /** + * View only anonymous link + */ + AnonymousView = 4, + /** + * Read/Write anonymous link + */ + AnonymousEdit = 5, + /** + * Flexible sharing Link where properties can change without affecting link URL + */ + Flexible = 6, + } + export interface ShareObjectOptions { + url?: string; + loginNames?: string | string[]; + role: SharingRole; + emailData?: SharingEmailData; + group?: RoleType; + propagateAcl?: boolean; + includeAnonymousLinkInEmail?: boolean; + useSimplifiedRoles?: boolean; + } + /** + * Indicates the role of the sharing link + */ + export enum SharingRole { + None = 0, + View = 1, + Edit = 2, + Owner = 3, + } + /** + * Represents email data. + */ + export interface SharingEmailData { + /** + * The e-mail subject. + */ + subject?: string; + /** + * The e-mail body. + */ + body: string; + } + export interface ShareLinkSettings { + /** + * The optional unique identifier of an existing sharing link to be retrieved and updated if necessary. + */ + shareId?: string; + /** + * The kind of the sharing link to be created. + */ + linkKind: SharingLinkKind; + /** + * A date/time string for which the format conforms to the ISO 8601:2004(E) complete representation for calendar date and time of day and + * which represents the time and date of expiry for the anonymous link. Both the minutes and hour value must be specified for the + * difference between the local and UTC time. Midnight is represented as 00:00:00. + */ + expiration?: string; + /** + * The role to be used for the sharing link. This is required for Flexible links, and ignored for legacy link kinds. + */ + role?: SharingRole; + /** + * Indicates if the sharing link, should support anonymous access. This is required for Flexible links, and ignored for legacy link kinds. + */ + allowAnonymousAccess?: boolean; + } + export interface ShareLinkRequest { + /** + * A string of JSON representing users in people picker format. Only needed if an e-mail notification should be sent. + */ + peoplePickerInput?: string; + /** + * Whether to create the link or not if it doesn't exist yet. + */ + createLink: boolean; + /** + * The e-mail data. Only needed if an e-mail notification should be sent. + */ + emailData?: SharingEmailData; + /** + * The settings for the sharing link to be created/updated + */ + settings: ShareLinkSettings; + } + /** + * Represents a response for sharing a link + */ + export interface ShareLinkResponse { + /** + * A SharingLinkInfo that represents the sharing link. Will be populated if sharing operation is returning a sharing link. + */ + sharingLinkInfo: SharingLinkInfo; + } + export interface SharingLinkInfo { + AllowsAnonymousAccess: boolean; + Created: string; + CreatedBy: PrincipalInfo; + Expiration: string; + IsActive: boolean; + IsEditLink: boolean; + IsFormsLink: boolean; + IsUnhealthy: boolean; + LastModified: string; + LastModifiedBy: PrincipalInfo; + LinkKind: SharingLinkKind; + ShareId: string; + Url: string; + } + export enum SharingOperationStatusCode { + /** + * The share operation completed without errors. + */ + CompletedSuccessfully = 0, + /** + * The share operation completed and generated requests for access. + */ + AccessRequestsQueued = 1, + /** + * The share operation failed as there were no resolved users. + */ + NoResolvedUsers = -1, + /** + * The share operation failed due to insufficient permissions. + */ + AccessDenied = -2, + /** + * The share operation failed when attempting a cross site share, which is not supported. + */ + CrossSiteRequestNotSupported = -3, + /** + * The sharing operation failed due to an unknown error. + */ + UnknowError = -4, + /** + * The text you typed is too long. Please shorten it. + */ + EmailBodyTooLong = -5, + /** + * The maximum number of unique scopes in the list has been exceeded. + */ + ListUniqueScopesExceeded = -6, + /** + * The share operation failed because a sharing capability is disabled in the site. + */ + CapabilityDisabled = -7, + /** + * The specified object for the share operation is not supported. + */ + ObjectNotSupported = -8, + /** + * A SharePoint group cannot contain another SharePoint group. + */ + NestedGroupsNotSupported = -9, + } + export interface SharingResult { + /** + * The relative URL of a page which can be navigated to, to show permissions. + */ + PermissionsPageRelativeUrl?: string; + /** + * A collection of users which have new pending access requests as a result of sharing. + */ + UsersWithAccessRequests?: any[]; + /** + * An enumeration which summarizes the result of the sharing operation. + */ + StatusCode?: SharingOperationStatusCode; + /** + * An error message about the failure if sharing was unsuccessful. + */ + ErrorMessage?: string; + /** + * A list of UserSharingResults from attempting to share a securable with unique permissions. + */ + UniquelyPermissionedUsers?: UserSharingResult[]; + /** + * Groups which were granted permissions. + */ + GroupsSharedWith?: any[]; + /** + * The SharePoint group users were added to, if any were added to a group. + */ + GroupUsersAddedTo?: any; + /** + * A list of users being added to a SharePoint permissions goup + */ + UsersAddedToGroup?: UserSharingResult[]; + /** + * A list of SPInvitationCreationResult for external users being invited to have access. + */ + InvitedUsers?: SPInvitationCreationResult[]; + /** + * The name of the securable being shared. + */ + Name?: string; + /** + * The url of the securable being shared. + */ + Url?: string; + /** + * IconUrl + */ + IconUrl?: string; + } + export interface UserSharingResult { + IsUserKnown?: boolean; + Status?: boolean; + Message?: string; + User?: string; + DisplayName?: string; + Email?: string; + CurrentRole?: SharingRole; + AllowedRoles?: SharingRole[]; + InvitationLink?: string; + } + export interface SPInvitationCreationResult { + Succeeded?: boolean; + Email?: string; + InvitationLink?: string; + } + export interface SharingRecipient { + email?: string; + alias?: string; + } + export interface SharingEntityPermission { + /** + * The Input Entity provided to the Call. + */ + inputEntity: string; + /** + * The Resolved Entity after resolving using PeoplePicker API. + */ + resolvedEntity: string; + /** + * Does the Entity have Access to the Securable Object + */ + hasAccess: boolean; + /** + * Role of the Entity on ListItem + */ + role: SharingRole; + } + export interface SharingInformationRequest { + /** + * Max Principal's to return. + */ + maxPrincipalsToReturn: number; + /** + * Supported Features (For future use by Office Client). + */ + clientSupportedFeatures: string; + } + export interface ObjectSharingSettings { + /** + * The URL pointing to the containing SPWeb object + */ + WebUrl: string; + /** + * The unique ID of the parent list (if applicable) + */ + ListId?: string; + /** + * The list item ID (if applicable) + */ + ItemId?: string; + /** + * The object title + */ + ItemName: string; + /** + * The server relative object URL + */ + ItemUrl: string; + /** + * Contains information about the sharing state of a shareable object + */ + ObjectSharingInformation: any; + /** + * Boolean indicating whether the sharing context operates under the access request mode + */ + AccessRequestMode: boolean; + /** + * Boolean indicating whether the sharing context operates under the permissions only mode + * (i.e. adding to a group or hiding the groups dropdown in the SharePoint UI) + */ + PermissionsOnlyMode: boolean; + /** + * URL of the site from which the shared object inherits permissions + */ + InheritingWebLink: string; + /** + * Boolean flag denoting if guest users are enabled for the site collection + */ + ShareByEmailEnabled: boolean; + /** + * Boolean indicating whether the current user is a guest user + */ + IsGuestUser: boolean; + /** + * Boolean indicating whether the site has the standard "Editor" role + */ + HasEditRole: boolean; + /** + * Boolean indicating whether the site has the standard "Reader" role + */ + HasReadRole: boolean; + /** + * Boolean indicating whether the object to share is a picture library + */ + IsPictureLibrary: boolean; + /** + * Boolean indicating whether the folder object can be shared + */ + CanShareFolder: boolean; + /** + * Boolean indicating whether email invitations can be sent + */ + CanSendEmail: boolean; + /** + * Default share link type + */ + DefaultShareLinkType: SharingLinkKind; + /** + * Boolean indicating whether the object to share supports ACL propagation + */ + SupportsAclPropagation: boolean; + /** + * Boolean indicating whether the current user can only share within the tenancy + */ + CanCurrentUserShareInternally: boolean; + /** + * Boolean indicating whether the current user can share outside the tenancy, by inviting external users + */ + CanCurrentUserShareExternally: boolean; + /** + * Boolean indicating whether the current user can retrieve an anonymous View link, if one has already been created + * If one has not been created, the user cannot create one + */ + CanCurrentUserRetrieveReadonlyLink: boolean; + /** + * Boolean indicating whether the current user can create or disable an anonymous Edit link + */ + CanCurrentUserManageReadonlyLink: boolean; + /** + * Boolean indicating whether the current user can retrieve an anonymous Edit link, if one has already been created + * If one has not been created, the user cannot create one + */ + CanCurrentUserRetrieveReadWriteLink: boolean; + /** + * Boolean indicating whether the current user can create or disable an anonymous Edit link + */ + CanCurrentUserManageReadWriteLink: boolean; + /** + * Boolean indicating whether the current user can retrieve an organization View link, if one has already been created + * If one has not been created, the user cannot create one + */ + CanCurrentUserRetrieveOrganizationReadonlyLink: boolean; + /** + * Boolean indicating whether the current user can create or disable an organization Edit link + */ + CanCurrentUserManageOrganizationReadonlyLink: boolean; + /** + * Boolean indicating whether the current user can retrieve an organization Edit link, if one has already been created + * If one has not been created, the user cannot create one + */ + CanCurrentUserRetrieveOrganizationReadWriteLink: boolean; + /** + * Boolean indicating whether the current user can create or disable an organization Edit link + */ + CanCurrentUserManageOrganizationReadWriteLink: boolean; + /** + * Boolean indicating whether the current user can make use of Share-By-Link + */ + CanSendLink: boolean; + /** + * Boolean indicating whether the client logic should warn the user + * that they are about to share with external email addresses. + */ + ShowExternalSharingWarning: boolean; + /** + * A list of SharingPermissionInformation objects that can be used to share + */ + SharingPermissions: any[]; + /** + * A dictionary object that lists the display name and the id of + * the SharePoint simplified roles (edit, view) + */ + SimplifiedRoles: { + [key: string]: string; + }; + /** + * A dictionary object that lists the display name and the id of the SharePoint groups + */ + GroupsList: { + [key: string]: string; + }; + /** + * A dictionary object that lists the display name and the id of the SharePoint regular roles + */ + Roles: { + [key: string]: string; + }; + /** + * An object containing the SharePoint UI specific sharing settings. + */ + SharePointSettings: any; + /** + * Boolean indicating whether the current user is a site collection administrator + */ + IsUserSiteAdmin: boolean; + /** + * A value that indicates number of days an anonymous link can be valid before it expires + */ + RequiredAnonymousLinkExpirationInDays: number; + } + export interface SharingInformation { + /** + * External Sharing. + */ + canAddExternalPrincipal?: boolean; + /** + * Internal Sharing. + */ + canAddInternalPrincipal?: boolean; + /** + * Can Send Email. + */ + canSendEmail?: boolean; + /** + * Can Use Simplified Roles present in Roles Enum. + */ + canUseSimplifiedRoles?: boolean; + /** + * Has Unique Permissions. + */ + hasUniquePermissions?: boolean; + /** + * Current Users Role on the Item. + */ + currentRole?: SharingRole; + /** + * Does the User+Item require Approval from Admin for Sharing. + */ + requiresAccessApproval?: boolean; + /** + * (Owners only)Whether there are pending access requests for the securable object. + */ + hasPendingAccessRequests?: boolean; + /** + * (Owners only)The link to the access requests page for the securable object, or an empty string if the link is not available. + */ + pendingAccessRequestsLink?: string; + /** + * sharedObjectType + */ + sharedObjectType?: SPSharedObjectType; + /** + * Url for the Securable Object (Encoded). + */ + directUrl?: string; + /** + * Parent Web Url for the Securable Object (Encoded). + */ + webUrl?: string; + /** + * Default SharingLinkKind. + */ + defaultLinkKind?: SharingLinkKind; + /** + * Tenant's SharingDomainRestrictionMode. + */ + domainRestrictionMode?: SharingDomainRestrictionMode; + /** + * Tenant's RestrictedDomains. + */ + RestrictedDomains?: string; + /** + * Tenant's Anonymous Link Expiration Restriction in Days. + */ + anonymousLinkExpirationRestrictionDays?: number; + /** + * The PermissionCollection that are on the Securable Object (Princpals & Links) + */ + permissionsInformation?: any; + /** + * PickerSettings used by the PeoplePicker Control. + */ + pickerSettings?: any; + } + export enum SPSharedObjectType { + Unknown = 0, + File = 1, + Folder = 2, + Item = 3, + List = 4, + Web = 5, + Max = 6, + } + export enum SharingDomainRestrictionMode { + None = 0, + AllowList = 1, + BlockList = 2, + } + export interface EmailProperties { + To: string[]; + CC?: string[]; + BCC?: string[]; + Subject: string; + Body: string; + AdditionalHeaders?: TypedHash; + From?: string; + } + export interface WikiPageCreationInformation { + /** + * The server-relative-url of the wiki page to be created. + */ + ServerRelativeUrl: string; + /** + * The wiki content to be set in the wiki page. + */ + WikiHtmlContent: string; + } + export enum RenderListDataOptions { + None = 0, + ContextInfo = 1, + ListData = 2, + ListSchema = 4, + MenuView = 8, + } + export interface RenderListDataParameters { + ViewXml?: string; + Paging?: string; + FolderServerRelativeUrl?: string; + RenderOptions?: RenderListDataOptions; + } +} +declare module "sharepoint/roles" { + import { SharePointQueryable, SharePointQueryableInstance, SharePointQueryableCollection } from "sharepoint/sharepointqueryable"; + import { SiteGroups } from "sharepoint/sitegroups"; + import { BasePermissions } from "sharepoint/types"; + import { TypedHash } from "collections/collections"; + /** + * Describes a set of role assignments for the current scope + * + */ + export class RoleAssignments extends SharePointQueryableCollection { + /** + * Creates a new instance of the RoleAssignments class + * + * @param baseUrl The url or SharePointQueryable which forms the parent of this role assignments collection + */ + constructor(baseUrl: string | SharePointQueryable, path?: string); + /** + * Adds a new role assignment with the specified principal and role definitions to the collection + * + * @param principalId The id of the user or group to assign permissions to + * @param roleDefId The id of the role definition that defines the permissions to assign + * + */ + add(principalId: number, roleDefId: number): Promise; + /** + * Removes the role assignment with the specified principal and role definition from the collection + * + * @param principalId The id of the user or group in the role assignment + * @param roleDefId The id of the role definition in the role assignment + * + */ + remove(principalId: number, roleDefId: number): Promise; + /** + * Gets the role assignment associated with the specified principal id from the collection. + * + * @param id The id of the role assignment + */ + getById(id: number): RoleAssignment; + } + /** + * Describes a role assignment + * + */ + export class RoleAssignment extends SharePointQueryableInstance { + /** + * Gets the groups that directly belong to the access control list (ACL) for this securable object + * + */ + readonly groups: SiteGroups; + /** + * Gets the role definition bindings for this role assignment + * + */ + readonly bindings: RoleDefinitionBindings; + /** + * Deletes this role assignment + * + */ + delete(): Promise; + } + /** + * Describes a collection of role definitions + * + */ + export class RoleDefinitions extends SharePointQueryableCollection { + /** + * Creates a new instance of the RoleDefinitions class + * + * @param baseUrl The url or SharePointQueryable which forms the parent of this role definitions collection + * + */ + constructor(baseUrl: string | SharePointQueryable, path?: string); + /** + * Gets the role definition with the specified id from the collection + * + * @param id The id of the role definition + * + */ + getById(id: number): RoleDefinition; + /** + * Gets the role definition with the specified name + * + * @param name The name of the role definition + * + */ + getByName(name: string): RoleDefinition; + /** + * Gets the role definition with the specified role type + * + * @param roleTypeKind The roletypekind of the role definition (None=0, Guest=1, Reader=2, Contributor=3, WebDesigner=4, Administrator=5, Editor=6, System=7) + * + */ + getByType(roleTypeKind: number): RoleDefinition; + /** + * Creates a role definition + * + * @param name The new role definition's name + * @param description The new role definition's description + * @param order The order in which the role definition appears + * @param basePermissions The permissions mask for this role definition + * + */ + add(name: string, description: string, order: number, basePermissions: BasePermissions): Promise; + } + /** + * Describes a role definition + * + */ + export class RoleDefinition extends SharePointQueryableInstance { + /** + * Updates this role definition with the supplied properties + * + * @param properties A plain object hash of values to update for the role definition + */ + update(properties: TypedHash): Promise; + /** + * Deletes this role definition + * + */ + delete(): Promise; + } + /** + * Result from updating a role definition + * + */ + export interface RoleDefinitionUpdateResult { + definition: RoleDefinition; + data: any; + } + /** + * Result from adding a role definition + * + */ + export interface RoleDefinitionAddResult { + definition: RoleDefinition; + data: any; + } + /** + * Describes the role definitons bound to a role assignment object + * + */ + export class RoleDefinitionBindings extends SharePointQueryableCollection { + /** + * Creates a new instance of the RoleDefinitionBindings class + * + * @param baseUrl The url or SharePointQueryable which forms the parent of this role definition bindings collection + */ + constructor(baseUrl: string | SharePointQueryable, path?: string); + } +} +declare module "sharepoint/sharepointqueryablesecurable" { + import { RoleAssignments } from "sharepoint/roles"; + import { BasePermissions, PermissionKind } from "sharepoint/types"; + import { SharePointQueryableInstance } from "sharepoint/sharepointqueryable"; + export class SharePointQueryableSecurable extends SharePointQueryableInstance { + /** + * Gets the set of role assignments for this item + * + */ + readonly roleAssignments: RoleAssignments; + /** + * Gets the closest securable up the security hierarchy whose permissions are applied to this list item + * + */ + readonly firstUniqueAncestorSecurableObject: SharePointQueryableInstance; + /** + * Gets the effective permissions for the user supplied + * + * @param loginName The claims username for the user (ex: i:0#.f|membership|user@domain.com) + */ + getUserEffectivePermissions(loginName: string): Promise; + /** + * Gets the effective permissions for the current user + */ + getCurrentUserEffectivePermissions(): Promise; + /** + * Breaks the security inheritance at this level optinally copying permissions and clearing subscopes + * + * @param copyRoleAssignments If true the permissions are copied from the current parent scope + * @param clearSubscopes Optional. true to make all child securable objects inherit role assignments from the current object + */ + breakRoleInheritance(copyRoleAssignments?: boolean, clearSubscopes?: boolean): Promise; + /** + * Removes the local role assignments so that it re-inherit role assignments from the parent object. + * + */ + resetRoleInheritance(): Promise; + /** + * Determines if a given user has the appropriate permissions + * + * @param loginName The user to check + * @param permission The permission being checked + */ + userHasPermissions(loginName: string, permission: PermissionKind): Promise; + /** + * Determines if the current user has the requested permissions + * + * @param permission The permission we wish to check + */ + currentUserHasPermissions(permission: PermissionKind): Promise; + /** + * Taken from sp.js, checks the supplied permissions against the mask + * + * @param value The security principal's permissions on the given object + * @param perm The permission checked against the value + */ + hasPermissions(value: BasePermissions, perm: PermissionKind): boolean; + } +} +declare module "sharepoint/sharepointqueryableshareable" { + import { SharePointQueryable, SharePointQueryableInstance } from "sharepoint/sharepointqueryable"; + import { SharePointQueryableSecurable } from "sharepoint/sharepointqueryablesecurable"; + import { RoleType, SharingLinkKind, ShareLinkResponse, SharingRole, SharingEmailData, SharingResult, SharingRecipient, SharingEntityPermission, SharingInformationRequest, ObjectSharingSettings, SharingInformation, ShareObjectOptions } from "sharepoint/types"; + /** + * Internal helper class used to augment classes to include sharing functionality + */ + export class SharePointQueryableShareable extends SharePointQueryable { + /** + * Gets a sharing link for the supplied + * + * @param kind The kind of link to share + * @param expiration The optional expiration for this link + */ + getShareLink(kind: SharingLinkKind, expiration?: Date): Promise; + /** + * Shares this instance with the supplied users + * + * @param loginNames Resolved login names to share + * @param role The role + * @param requireSignin True to require the user is authenticated, otherwise false + * @param propagateAcl True to apply this share to all children + * @param emailData If supplied an email will be sent with the indicated properties + */ + shareWith(loginNames: string | string[], role: SharingRole, requireSignin?: boolean, propagateAcl?: boolean, emailData?: SharingEmailData): Promise; + /** + * Shares an object based on the supplied options + * + * @param options The set of options to send to the ShareObject method + * @param bypass If true any processing is skipped and the options are sent directly to the ShareObject method + */ + shareObject(options: ShareObjectOptions, bypass?: boolean): Promise; + /** + * Calls the web's UnshareObject method + * + * @param url The url of the object to unshare + */ + unshareObjectWeb(url: string): Promise; + /** + * Checks Permissions on the list of Users and returns back role the users have on the Item. + * + * @param recipients The array of Entities for which Permissions need to be checked. + */ + checkPermissions(recipients: SharingRecipient[]): Promise; + /** + * Get Sharing Information. + * + * @param request The SharingInformationRequest Object. + */ + getSharingInformation(request?: SharingInformationRequest): Promise; + /** + * Gets the sharing settings of an item. + * + * @param useSimplifiedRoles Determines whether to use simplified roles. + */ + getObjectSharingSettings(useSimplifiedRoles?: boolean): Promise; + /** + * Unshares this object + */ + unshareObject(): Promise; + /** + * Deletes a link by type + * + * @param kind Deletes a sharing link by the kind of link + */ + deleteLinkByKind(kind: SharingLinkKind): Promise; + /** + * Removes the specified link to the item. + * + * @param kind The kind of link to be deleted. + * @param shareId + */ + unshareLink(kind: SharingLinkKind, shareId?: string): Promise; + /** + * Calculates the roleValue string used in the sharing query + * + * @param role The Sharing Role + * @param group The Group type + */ + protected getRoleValue(role: SharingRole, group: RoleType): Promise; + private getShareObjectWeb(candidate); + private sendShareObjectRequest(options); + } + export class SharePointQueryableShareableWeb extends SharePointQueryableSecurable { + /** + * Shares this web with the supplied users + * @param loginNames The resolved login names to share + * @param role The role to share this web + * @param emailData Optional email data + */ + shareWith(loginNames: string | string[], role?: SharingRole, emailData?: SharingEmailData): Promise; + /** + * Provides direct access to the static web.ShareObject method + * + * @param url The url to share + * @param loginNames Resolved loginnames string[] of a single login name string + * @param roleValue Role value + * @param emailData Optional email data + * @param groupId Optional group id + * @param propagateAcl + * @param includeAnonymousLinkInEmail + * @param useSimplifiedRoles + */ + shareObject(url: string, loginNames: string | string[], role: SharingRole, emailData?: SharingEmailData, group?: RoleType, propagateAcl?: boolean, includeAnonymousLinkInEmail?: boolean, useSimplifiedRoles?: boolean): Promise; + /** + * Supplies a method to pass any set of arguments to ShareObject + * + * @param options The set of options to send to ShareObject + */ + shareObjectRaw(options: any): Promise; + /** + * Unshares the object + * + * @param url The url of the object to stop sharing + */ + unshareObject(url: string): Promise; + } + export class SharePointQueryableShareableItem extends SharePointQueryableSecurable { + /** + * Gets a link suitable for sharing for this item + * + * @param kind The type of link to share + * @param expiration The optional expiration date + */ + getShareLink(kind?: SharingLinkKind, expiration?: Date): Promise; + /** + * Shares this item with one or more users + * + * @param loginNames string or string[] of resolved login names to which this item will be shared + * @param role The role (View | Edit) applied to the share + * @param emailData Optional, if inlucded an email will be sent. Note subject currently has no effect. + */ + shareWith(loginNames: string | string[], role?: SharingRole, requireSignin?: boolean, emailData?: SharingEmailData): Promise; + /** + * Checks Permissions on the list of Users and returns back role the users have on the Item. + * + * @param recipients The array of Entities for which Permissions need to be checked. + */ + checkSharingPermissions(recipients: SharingRecipient[]): Promise; + /** + * Get Sharing Information. + * + * @param request The SharingInformationRequest Object. + */ + getSharingInformation(request?: SharingInformationRequest): Promise; + /** + * Gets the sharing settings of an item. + * + * @param useSimplifiedRoles Determines whether to use simplified roles. + */ + getObjectSharingSettings(useSimplifiedRoles?: boolean): Promise; + /** + * Unshare this item + */ + unshare(): Promise; + /** + * Deletes a sharing link by kind + * + * @param kind Deletes a sharing link by the kind of link + */ + deleteSharingLinkByKind(kind: SharingLinkKind): Promise; + /** + * Removes the specified link to the item. + * + * @param kind The kind of link to be deleted. + * @param shareId + */ + unshareLink(kind: SharingLinkKind, shareId?: string): Promise; + } + export class FileFolderShared extends SharePointQueryableInstance { + /** + * Gets a link suitable for sharing + * + * @param kind The kind of link to get + * @param expiration Optional, an expiration for this link + */ + getShareLink(kind?: SharingLinkKind, expiration?: Date): Promise; + /** + * Checks Permissions on the list of Users and returns back role the users have on the Item. + * + * @param recipients The array of Entities for which Permissions need to be checked. + */ + checkSharingPermissions(recipients: SharingRecipient[]): Promise; + /** + * Get Sharing Information. + * + * @param request The SharingInformationRequest Object. + */ + getSharingInformation(request?: SharingInformationRequest): Promise; + /** + * Gets the sharing settings of an item. + * + * @param useSimplifiedRoles Determines whether to use simplified roles. + */ + getObjectSharingSettings(useSimplifiedRoles?: boolean): Promise; + /** + * Unshare this item + */ + unshare(): Promise; + /** + * Deletes a sharing link by the kind of link + * + * @param kind The kind of link to be deleted. + */ + deleteSharingLinkByKind(kind: SharingLinkKind): Promise; + /** + * Removes the specified link to the item. + * + * @param kind The kind of link to be deleted. + * @param shareId The share id to delete + */ + unshareLink(kind: SharingLinkKind, shareId?: string): Promise; + /** + * For files and folders we need to use the associated item end point + */ + protected getShareable(): Promise; + } + export class SharePointQueryableShareableFile extends FileFolderShared { + /** + * Shares this item with one or more users + * + * @param loginNames string or string[] of resolved login names to which this item will be shared + * @param role The role (View | Edit) applied to the share + * @param shareEverything Share everything in this folder, even items with unique permissions. + * @param requireSignin If true the user must signin to view link, otherwise anyone with the link can access the resource + * @param emailData Optional, if inlucded an email will be sent. Note subject currently has no effect. + */ + shareWith(loginNames: string | string[], role?: SharingRole, requireSignin?: boolean, emailData?: SharingEmailData): Promise; + } + export class SharePointQueryableShareableFolder extends FileFolderShared { + /** + * Shares this item with one or more users + * + * @param loginNames string or string[] of resolved login names to which this item will be shared + * @param role The role (View | Edit) applied to the share + * @param shareEverything Share everything in this folder, even items with unique permissions. + * @param requireSignin If true the user must signin to view link, otherwise anyone with the link can access the resource + * @param emailData Optional, if inlucded an email will be sent. Note subject currently has no effect. + */ + shareWith(loginNames: string | string[], role?: SharingRole, requireSignin?: boolean, shareEverything?: boolean, emailData?: SharingEmailData): Promise; + } +} +declare module "sharepoint/webparts" { + import { SharePointQueryable, SharePointQueryableInstance, SharePointQueryableCollection } from "sharepoint/sharepointqueryable"; + export class LimitedWebPartManager extends SharePointQueryable { + /** + * Gets the set of web part definitions contained by this web part manager + * + */ + readonly webparts: WebPartDefinitions; + /** + * Exports a webpart definition + * + * @param id the GUID id of the definition to export + */ + export(id: string): Promise; + /** + * Imports a webpart + * + * @param xml webpart definition which must be valid XML in the .dwp or .webpart format + */ + import(xml: string): Promise; + } + export class WebPartDefinitions extends SharePointQueryableCollection { + /** + * Gets a web part definition from the collection by id + * + * @param id The storage ID of the SPWebPartDefinition to retrieve + */ + getById(id: string): WebPartDefinition; + /** + * Gets a web part definition from the collection by storage id + * + * @param id The WebPart.ID of the SPWebPartDefinition to retrieve + */ + getByControlId(id: string): WebPartDefinition; + } + export class WebPartDefinition extends SharePointQueryableInstance { + /** + * Gets the webpart information associated with this definition + */ + readonly webpart: WebPart; + /** + * Saves changes to the Web Part made using other properties and methods on the SPWebPartDefinition object + */ + saveChanges(): Promise; + /** + * Moves the Web Part to a different location on a Web Part Page + * + * @param zoneId The ID of the Web Part Zone to which to move the Web Part + * @param zoneIndex A Web Part zone index that specifies the position at which the Web Part is to be moved within the destination Web Part zone + */ + moveTo(zoneId: string, zoneIndex: number): Promise; + /** + * Closes the Web Part. If the Web Part is already closed, this method does nothing + */ + close(): Promise; + /** + * Opens the Web Part. If the Web Part is already closed, this method does nothing + */ + open(): Promise; + /** + * Removes a webpart from a page, all settings will be lost + */ + delete(): Promise; + } + export class WebPart extends SharePointQueryableInstance { + /** + * Creates a new instance of the WebPart class + * + * @param baseUrl The url or SharePointQueryable which forms the parent of this fields collection + * @param path Optional, if supplied will be appended to the supplied baseUrl + */ + constructor(baseUrl: string | SharePointQueryable, path?: string); + } +} +declare module "sharepoint/files" { + import { SharePointQueryable, SharePointQueryableCollection, SharePointQueryableInstance } from "sharepoint/sharepointqueryable"; + import { LimitedWebPartManager } from "sharepoint/webparts"; + import { Item } from "sharepoint/items"; + import { SharePointQueryableShareableFile } from "sharepoint/sharepointqueryableshareable"; + export interface ChunkedFileUploadProgressData { + stage: "starting" | "continue" | "finishing"; + blockNumber: number; + totalBlocks: number; + chunkSize: number; + currentPointer: number; + fileSize: number; + } + /** + * Describes a collection of File objects + * + */ + export class Files extends SharePointQueryableCollection { + /** + * Creates a new instance of the Files class + * + * @param baseUrl The url or SharePointQueryable which forms the parent of this fields collection + */ + constructor(baseUrl: string | SharePointQueryable, path?: string); + /** + * Gets a File by filename + * + * @param name The name of the file, including extension. + */ + getByName(name: string): File; + /** + * Uploads a file. Not supported for batching + * + * @param url The folder-relative url of the file. + * @param content The file contents blob. + * @param shouldOverWrite Should a file with the same name in the same location be overwritten? (default: true) + * @returns The new File and the raw response. + */ + add(url: string, content: string | ArrayBuffer | Blob, shouldOverWrite?: boolean): Promise; + /** + * Uploads a file. Not supported for batching + * + * @param url The folder-relative url of the file. + * @param content The Blob file content to add + * @param progress A callback function which can be used to track the progress of the upload + * @param shouldOverWrite Should a file with the same name in the same location be overwritten? (default: true) + * @param chunkSize The size of each file slice, in bytes (default: 10485760) + * @returns The new File and the raw response. + */ + addChunked(url: string, content: Blob, progress?: (data: ChunkedFileUploadProgressData) => void, shouldOverWrite?: boolean, chunkSize?: number): Promise; + /** + * Adds a ghosted file to an existing list or document library. Not supported for batching. + * + * @param fileUrl The server-relative url where you want to save the file. + * @param templateFileType The type of use to create the file. + * @returns The template file that was added and the raw response. + */ + addTemplateFile(fileUrl: string, templateFileType: TemplateFileType): Promise; + } + /** + * Describes a single File instance + * + */ + export class File extends SharePointQueryableShareableFile { + /** + * Gets a value that specifies the list item field values for the list item corresponding to the file. + * + */ + readonly listItemAllFields: SharePointQueryableCollection; + /** + * Gets a collection of versions + * + */ + readonly versions: Versions; + /** + * Approves the file submitted for content approval with the specified comment. + * Only documents in lists that are enabled for content approval can be approved. + * + * @param comment The comment for the approval. + */ + approve(comment?: string): Promise; + /** + * Stops the chunk upload session without saving the uploaded data. Does not support batching. + * If the file doesn’t already exist in the library, the partially uploaded file will be deleted. + * Use this in response to user action (as in a request to cancel an upload) or an error or exception. + * Use the uploadId value that was passed to the StartUpload method that started the upload session. + * This method is currently available only on Office 365. + * + * @param uploadId The unique identifier of the upload session. + */ + cancelUpload(uploadId: string): Promise; + /** + * Checks the file in to a document library based on the check-in type. + * + * @param comment A comment for the check-in. Its length must be <= 1023. + * @param checkinType The check-in type for the file. + */ + checkin(comment?: string, checkinType?: CheckinType): Promise; + /** + * Checks out the file from a document library. + */ + checkout(): Promise; + /** + * Copies the file to the destination url. + * + * @param url The absolute url or server relative url of the destination file path to copy to. + * @param shouldOverWrite Should a file with the same name in the same location be overwritten? + */ + copyTo(url: string, shouldOverWrite?: boolean): Promise; + /** + * Delete this file. + * + * @param eTag Value used in the IF-Match header, by default "*" + */ + delete(eTag?: string): Promise; + /** + * Denies approval for a file that was submitted for content approval. + * Only documents in lists that are enabled for content approval can be denied. + * + * @param comment The comment for the denial. + */ + deny(comment?: string): Promise; + /** + * Specifies the control set used to access, modify, or add Web Parts associated with this Web Part Page and view. + * An exception is thrown if the file is not an ASPX page. + * + * @param scope The WebPartsPersonalizationScope view on the Web Parts page. + */ + getLimitedWebPartManager(scope?: WebPartsPersonalizationScope): LimitedWebPartManager; + /** + * Moves the file to the specified destination url. + * + * @param url The absolute url or server relative url of the destination file path to move to. + * @param moveOperations The bitwise MoveOperations value for how to move the file. + */ + moveTo(url: string, moveOperations?: MoveOperations): Promise; + /** + * Submits the file for content approval with the specified comment. + * + * @param comment The comment for the published file. Its length must be <= 1023. + */ + publish(comment?: string): Promise; + /** + * Moves the file to the Recycle Bin and returns the identifier of the new Recycle Bin item. + * + * @returns The GUID of the recycled file. + */ + recycle(): Promise; + /** + * Reverts an existing checkout for the file. + * + */ + undoCheckout(): Promise; + /** + * Removes the file from content approval or unpublish a major version. + * + * @param comment The comment for the unpublish operation. Its length must be <= 1023. + */ + unpublish(comment?: string): Promise; + /** + * Gets the contents of the file as text. Not supported in batching. + * + */ + getText(): Promise; + /** + * Gets the contents of the file as a blob, does not work in Node.js. Not supported in batching. + * + */ + getBlob(): Promise; + /** + * Gets the contents of a file as an ArrayBuffer, works in Node.js. Not supported in batching. + */ + getBuffer(): Promise; + /** + * Gets the contents of a file as an ArrayBuffer, works in Node.js. Not supported in batching. + */ + getJSON(): Promise; + /** + * Sets the content of a file, for large files use setContentChunked. Not supported in batching. + * + * @param content The file content + * + */ + setContent(content: string | ArrayBuffer | Blob): Promise; + /** + * Gets the associated list item for this folder, loading the default properties + */ + getItem(...selects: string[]): Promise; + /** + * Sets the contents of a file using a chunked upload approach. Not supported in batching. + * + * @param file The file to upload + * @param progress A callback function which can be used to track the progress of the upload + * @param chunkSize The size of each file slice, in bytes (default: 10485760) + */ + setContentChunked(file: Blob, progress?: (data: ChunkedFileUploadProgressData) => void, chunkSize?: number): Promise; + /** + * Starts a new chunk upload session and uploads the first fragment. + * The current file content is not changed when this method completes. + * The method is idempotent (and therefore does not change the result) as long as you use the same values for uploadId and stream. + * The upload session ends either when you use the CancelUpload method or when you successfully + * complete the upload session by passing the rest of the file contents through the ContinueUpload and FinishUpload methods. + * The StartUpload and ContinueUpload methods return the size of the running total of uploaded data in bytes, + * so you can pass those return values to subsequent uses of ContinueUpload and FinishUpload. + * This method is currently available only on Office 365. + * + * @param uploadId The unique identifier of the upload session. + * @param fragment The file contents. + * @returns The size of the total uploaded data in bytes. + */ + private startUpload(uploadId, fragment); + /** + * Continues the chunk upload session with an additional fragment. + * The current file content is not changed. + * Use the uploadId value that was passed to the StartUpload method that started the upload session. + * This method is currently available only on Office 365. + * + * @param uploadId The unique identifier of the upload session. + * @param fileOffset The size of the offset into the file where the fragment starts. + * @param fragment The file contents. + * @returns The size of the total uploaded data in bytes. + */ + private continueUpload(uploadId, fileOffset, fragment); + /** + * Uploads the last file fragment and commits the file. The current file content is changed when this method completes. + * Use the uploadId value that was passed to the StartUpload method that started the upload session. + * This method is currently available only on Office 365. + * + * @param uploadId The unique identifier of the upload session. + * @param fileOffset The size of the offset into the file where the fragment starts. + * @param fragment The file contents. + * @returns The newly uploaded file. + */ + private finishUpload(uploadId, fileOffset, fragment); + } + /** + * Describes a collection of Version objects + * + */ + export class Versions extends SharePointQueryableCollection { + /** + * Creates a new instance of the File class + * + * @param baseUrl The url or SharePointQueryable which forms the parent of this fields collection + */ + constructor(baseUrl: string | SharePointQueryable, path?: string); + /** + * Gets a version by id + * + * @param versionId The id of the version to retrieve + */ + getById(versionId: number): Version; + /** + * Deletes all the file version objects in the collection. + * + */ + deleteAll(): Promise; + /** + * Deletes the specified version of the file. + * + * @param versionId The ID of the file version to delete. + */ + deleteById(versionId: number): Promise; + /** + * Deletes the file version object with the specified version label. + * + * @param label The version label of the file version to delete, for example: 1.2 + */ + deleteByLabel(label: string): Promise; + /** + * Creates a new file version from the file specified by the version label. + * + * @param label The version label of the file version to restore, for example: 1.2 + */ + restoreByLabel(label: string): Promise; + } + /** + * Describes a single Version instance + * + */ + export class Version extends SharePointQueryableInstance { + /** + * Delete a specific version of a file. + * + * @param eTag Value used in the IF-Match header, by default "*" + */ + delete(eTag?: string): Promise; + } + export enum CheckinType { + Minor = 0, + Major = 1, + Overwrite = 2, + } + export interface FileAddResult { + file: File; + data: any; + } + export enum WebPartsPersonalizationScope { + User = 0, + Shared = 1, + } + export enum MoveOperations { + Overwrite = 1, + AllowBrokenThickets = 8, + } + export enum TemplateFileType { + StandardPage = 0, + WikiPage = 1, + FormPage = 2, + } +} +declare module "sharepoint/folders" { + import { SharePointQueryable, SharePointQueryableCollection, SharePointQueryableInstance } from "sharepoint/sharepointqueryable"; + import { SharePointQueryableShareableFolder } from "sharepoint/sharepointqueryableshareable"; + import { Files } from "sharepoint/files"; + import { TypedHash } from "collections/collections"; + import { Item } from "sharepoint/items"; + /** + * Describes a collection of Folder objects + * + */ + export class Folders extends SharePointQueryableCollection { + /** + * Creates a new instance of the Folders class + * + * @param baseUrl The url or SharePointQueryable which forms the parent of this fields collection + */ + constructor(baseUrl: string | SharePointQueryable, path?: string); + /** + * Gets a folder by folder name + * + */ + getByName(name: string): Folder; + /** + * Adds a new folder to the current folder (relative) or any folder (absolute) + * + * @param url The relative or absolute url where the new folder will be created. Urls starting with a forward slash are absolute. + * @returns The new Folder and the raw response. + */ + add(url: string): Promise; + } + /** + * Describes a single Folder instance + * + */ + export class Folder extends SharePointQueryableShareableFolder { + /** + * Specifies the sequence in which content types are displayed. + * + */ + readonly contentTypeOrder: SharePointQueryableCollection; + /** + * Gets this folder's files + * + */ + readonly files: Files; + /** + * Gets this folder's sub folders + * + */ + readonly folders: Folders; + /** + * Gets this folder's list item field values + * + */ + readonly listItemAllFields: SharePointQueryableCollection; + /** + * Gets the parent folder, if available + * + */ + readonly parentFolder: Folder; + /** + * Gets this folder's properties + * + */ + readonly properties: SharePointQueryableInstance; + /** + * Gets this folder's server relative url + * + */ + readonly serverRelativeUrl: SharePointQueryable; + /** + * Gets a value that specifies the content type order. + * + */ + readonly uniqueContentTypeOrder: SharePointQueryableCollection; + update(properties: TypedHash): Promise; + /** + * Delete this folder + * + * @param eTag Value used in the IF-Match header, by default "*" + */ + delete(eTag?: string): Promise; + /** + * Moves the folder to the Recycle Bin and returns the identifier of the new Recycle Bin item. + */ + recycle(): Promise; + /** + * Gets the associated list item for this folder, loading the default properties + */ + getItem(...selects: string[]): Promise; + } + export interface FolderAddResult { + folder: Folder; + data: any; + } + export interface FolderUpdateResult { + folder: Folder; + data: any; + } +} +declare module "sharepoint/contenttypes" { + import { TypedHash } from "collections/collections"; + import { SharePointQueryable, SharePointQueryableCollection, SharePointQueryableInstance } from "sharepoint/sharepointqueryable"; + /** + * Describes a collection of content types + * + */ + export class ContentTypes extends SharePointQueryableCollection { + /** + * Creates a new instance of the ContentTypes class + * + * @param baseUrl The url or SharePointQueryable which forms the parent of this content types collection + */ + constructor(baseUrl: string | SharePointQueryable, path?: string); + /** + * Gets a ContentType by content type id + */ + getById(id: string): ContentType; + /** + * Adds an existing contenttype to a content type collection + * + * @param contentTypeId in the following format, for example: 0x010102 + */ + addAvailableContentType(contentTypeId: string): Promise; + /** + * Adds a new content type to the collection + * + * @param id The desired content type id for the new content type (also determines the parent content type) + * @param name The name of the content type + * @param description The description of the content type + * @param group The group in which to add the content type + * @param additionalSettings Any additional settings to provide when creating the content type + * + */ + add(id: string, name: string, description?: string, group?: string, additionalSettings?: TypedHash): Promise; + } + /** + * Describes a single ContentType instance + * + */ + export class ContentType extends SharePointQueryableInstance { + /** + * Gets the column (also known as field) references in the content type. + */ + readonly fieldLinks: FieldLinks; + /** + * Gets a value that specifies the collection of fields for the content type. + */ + readonly fields: SharePointQueryableCollection; + /** + * Gets the parent content type of the content type. + */ + readonly parent: ContentType; + /** + * Gets a value that specifies the collection of workflow associations for the content type. + */ + readonly workflowAssociations: SharePointQueryableCollection; + /** + * Delete this content type + */ + delete(): Promise; + } + export interface ContentTypeAddResult { + contentType: ContentType; + data: any; + } + /** + * Represents a collection of field link instances + */ + export class FieldLinks extends SharePointQueryableCollection { + /** + * Creates a new instance of the ContentType class + * + * @param baseUrl The url or SharePointQueryable which forms the parent of this content type instance + */ + constructor(baseUrl: string | SharePointQueryable, path?: string); + /** + * Gets a FieldLink by GUID id + * + * @param id The GUID id of the field link + */ + getById(id: string): FieldLink; + } + /** + * Represents a field link instance + */ + export class FieldLink extends SharePointQueryableInstance { + } +} +declare module "sharepoint/attachmentfiles" { + import { SharePointQueryable, SharePointQueryableInstance, SharePointQueryableCollection } from "sharepoint/sharepointqueryable"; + export interface AttachmentFileInfo { + name: string; + content: string | Blob | ArrayBuffer; + } + /** + * Describes a collection of Item objects + * + */ + export class AttachmentFiles extends SharePointQueryableCollection { + /** + * Creates a new instance of the AttachmentFiles class + * + * @param baseUrl The url or SharePointQueryable which forms the parent of this attachments collection + */ + constructor(baseUrl: string | SharePointQueryable, path?: string); + /** + * Gets a Attachment File by filename + * + * @param name The name of the file, including extension. + */ + getByName(name: string): AttachmentFile; + /** + * Adds a new attachment to the collection. Not supported for batching. + * + * @param name The name of the file, including extension. + * @param content The Base64 file content. + */ + add(name: string, content: string | Blob | ArrayBuffer): Promise; + /** + * Adds mjultiple new attachment to the collection. Not supported for batching. + * + * @files name The collection of files to add + */ + addMultiple(files: AttachmentFileInfo[]): Promise; + } + /** + * Describes a single attachment file instance + * + */ + export class AttachmentFile extends SharePointQueryableInstance { + /** + * Gets the contents of the file as text + * + */ + getText(): Promise; + /** + * Gets the contents of the file as a blob, does not work in Node.js + * + */ + getBlob(): Promise; + /** + * Gets the contents of a file as an ArrayBuffer, works in Node.js + */ + getBuffer(): Promise; + /** + * Gets the contents of a file as an ArrayBuffer, works in Node.js + */ + getJSON(): Promise; + /** + * Sets the content of a file. Not supported for batching + * + * @param content The value to set for the file contents + */ + setContent(content: string | ArrayBuffer | Blob): Promise; + /** + * Delete this attachment file + * + * @param eTag Value used in the IF-Match header, by default "*" + */ + delete(eTag?: string): Promise; + } + export interface AttachmentFileAddResult { + file: AttachmentFile; + data: any; + } +} +declare module "sharepoint/items" { + import { SharePointQueryable, SharePointQueryableCollection, SharePointQueryableInstance } from "sharepoint/sharepointqueryable"; + import { SharePointQueryableShareableItem } from "sharepoint/sharepointqueryableshareable"; + import { Folder } from "sharepoint/folders"; + import { File } from "sharepoint/files"; + import { ContentType } from "sharepoint/contenttypes"; + import { TypedHash } from "collections/collections"; + import { ListItemFormUpdateValue } from "sharepoint/types"; + import { AttachmentFiles } from "sharepoint/attachmentfiles"; + /** + * Describes a collection of Item objects + * + */ + export class Items extends SharePointQueryableCollection { + /** + * Creates a new instance of the Items class + * + * @param baseUrl The url or SharePointQueryable which forms the parent of this fields collection + */ + constructor(baseUrl: string | SharePointQueryable, path?: string); + /** + * Gets an Item by id + * + * @param id The integer id of the item to retrieve + */ + getById(id: number): Item; + /** + * Skips the specified number of items (https://msdn.microsoft.com/en-us/library/office/fp142385.aspx#sectionSection6) + * + * @param skip The starting id where the page should start, use with top to specify pages + */ + skip(skip: number): this; + /** + * Gets a collection designed to aid in paging through data + * + */ + getPaged(): Promise>; + /** + * Adds a new item to the collection + * + * @param properties The new items's properties + */ + add(properties?: TypedHash, listItemEntityTypeFullName?: string): Promise; + /** + * Ensures we have the proper list item entity type name, either from the value provided or from the list + * + * @param candidatelistItemEntityTypeFullName The potential type name + */ + private ensureListItemEntityTypeName(candidatelistItemEntityTypeFullName); + } + /** + * Descrines a single Item instance + * + */ + export class Item extends SharePointQueryableShareableItem { + /** + * Gets the set of attachments for this item + * + */ + readonly attachmentFiles: AttachmentFiles; + /** + * Gets the content type for this item + * + */ + readonly contentType: ContentType; + /** + * Gets the effective base permissions for the item + * + */ + readonly effectiveBasePermissions: SharePointQueryable; + /** + * Gets the effective base permissions for the item in a UI context + * + */ + readonly effectiveBasePermissionsForUI: SharePointQueryable; + /** + * Gets the field values for this list item in their HTML representation + * + */ + readonly fieldValuesAsHTML: SharePointQueryableInstance; + /** + * Gets the field values for this list item in their text representation + * + */ + readonly fieldValuesAsText: SharePointQueryableInstance; + /** + * Gets the field values for this list item for use in editing controls + * + */ + readonly fieldValuesForEdit: SharePointQueryableInstance; + /** + * Gets the folder associated with this list item (if this item represents a folder) + * + */ + readonly folder: Folder; + /** + * Gets the folder associated with this list item (if this item represents a folder) + * + */ + readonly file: File; + /** + * Updates this list intance with the supplied properties + * + * @param properties A plain object hash of values to update for the list + * @param eTag Value used in the IF-Match header, by default "*" + */ + update(properties: TypedHash, eTag?: string, listItemEntityTypeFullName?: string): Promise; + /** + * Delete this item + * + * @param eTag Value used in the IF-Match header, by default "*" + */ + delete(eTag?: string): Promise; + /** + * Moves the list item to the Recycle Bin and returns the identifier of the new Recycle Bin item. + */ + recycle(): Promise; + /** + * Gets a string representation of the full URL to the WOPI frame. + * If there is no associated WOPI application, or no associated action, an empty string is returned. + * + * @param action Display mode: 0: view, 1: edit, 2: mobileView, 3: interactivePreview + */ + getWopiFrameUrl(action?: number): Promise; + /** + * Validates and sets the values of the specified collection of fields for the list item. + * + * @param formValues The fields to change and their new values. + * @param newDocumentUpdate true if the list item is a document being updated after upload; otherwise false. + */ + validateUpdateListItem(formValues: ListItemFormUpdateValue[], newDocumentUpdate?: boolean): Promise; + /** + * Ensures we have the proper list item entity type name, either from the value provided or from the list + * + * @param candidatelistItemEntityTypeFullName The potential type name + */ + private ensureListItemEntityTypeName(candidatelistItemEntityTypeFullName); + } + export interface ItemAddResult { + item: Item; + data: any; + } + export interface ItemUpdateResult { + item: Item; + data: ItemUpdateResultData; + } + export interface ItemUpdateResultData { + "odata.etag": string; + } + /** + * Provides paging functionality for list items + */ + export class PagedItemCollection { + private nextUrl; + results: T; + constructor(nextUrl: string, results: T); + /** + * If true there are more results available in the set, otherwise there are not + */ + readonly hasNext: boolean; + /** + * Gets the next set of results, or resolves to null if no results are available + */ + getNext(): Promise>; + } +} +declare module "sharepoint/views" { + import { SharePointQueryable, SharePointQueryableCollection, SharePointQueryableInstance } from "sharepoint/sharepointqueryable"; + import { TypedHash } from "collections/collections"; + /** + * Describes the views available in the current context + * + */ + export class Views extends SharePointQueryableCollection { + /** + * Creates a new instance of the Views class + * + * @param baseUrl The url or SharePointQueryable which forms the parent of this fields collection + */ + constructor(baseUrl: string | SharePointQueryable, path?: string); + /** + * Gets a view by guid id + * + * @param id The GUID id of the view + */ + getById(id: string): View; + /** + * Gets a view by title (case-sensitive) + * + * @param title The case-sensitive title of the view + */ + getByTitle(title: string): View; + /** + * Adds a new view to the collection + * + * @param title The new views's title + * @param personalView True if this is a personal view, otherwise false, default = false + * @param additionalSettings Will be passed as part of the view creation body + */ + add(title: string, personalView?: boolean, additionalSettings?: TypedHash): Promise; + } + /** + * Describes a single View instance + * + */ + export class View extends SharePointQueryableInstance { + readonly fields: ViewFields; + /** + * Updates this view intance with the supplied properties + * + * @param properties A plain object hash of values to update for the view + */ + update(properties: TypedHash): Promise; + /** + * Delete this view + * + */ + delete(): Promise; + /** + * Returns the list view as HTML. + * + */ + renderAsHtml(): Promise; + } + export class ViewFields extends SharePointQueryableCollection { + constructor(baseUrl: string | SharePointQueryable, path?: string); + /** + * Gets a value that specifies the XML schema that represents the collection. + */ + getSchemaXml(): Promise; + /** + * Adds the field with the specified field internal name or display name to the collection. + * + * @param fieldTitleOrInternalName The case-sensitive internal name or display name of the field to add. + */ + add(fieldTitleOrInternalName: string): Promise; + /** + * Moves the field with the specified field internal name to the specified position in the collection. + * + * @param fieldInternalName The case-sensitive internal name of the field to move. + * @param index The zero-based index of the new position for the field. + */ + move(fieldInternalName: string, index: number): Promise; + /** + * Removes all the fields from the collection. + */ + removeAll(): Promise; + /** + * Removes the field with the specified field internal name from the collection. + * + * @param fieldInternalName The case-sensitive internal name of the field to remove from the view. + */ + remove(fieldInternalName: string): Promise; + } + export interface ViewAddResult { + view: View; + data: any; + } + export interface ViewUpdateResult { + view: View; + data: any; + } +} +declare module "sharepoint/fields" { + import { SharePointQueryable, SharePointQueryableCollection, SharePointQueryableInstance } from "sharepoint/sharepointqueryable"; + import { TypedHash } from "collections/collections"; + import { XmlSchemaFieldCreationInformation, DateTimeFieldFormatType, FieldTypes, CalendarType, UrlFieldFormatType } from "sharepoint/types"; + /** + * Describes a collection of Field objects + * + */ + export class Fields extends SharePointQueryableCollection { + /** + * Creates a new instance of the Fields class + * + * @param baseUrl The url or SharePointQueryable which forms the parent of this fields collection + */ + constructor(baseUrl: string | SharePointQueryable, path?: string); + /** + * Gets a field from the collection by title + * + * @param title The case-sensitive title of the field + */ + getByTitle(title: string): Field; + /** + * Gets a field from the collection by using internal name or title + * + * @param name The case-sensitive internal name or title of the field + */ + getByInternalNameOrTitle(name: string): Field; + /** + * Gets a list from the collection by guid id + * + * @param title The Id of the list + */ + getById(id: string): Field; + /** + * Creates a field based on the specified schema + */ + createFieldAsXml(xml: string | XmlSchemaFieldCreationInformation): Promise; + /** + * Adds a new list to the collection + * + * @param title The new field's title + * @param fieldType The new field's type (ex: SP.FieldText) + * @param properties Differ by type of field being created (see: https://msdn.microsoft.com/en-us/library/office/dn600182.aspx) + */ + add(title: string, fieldType: string, properties?: TypedHash): Promise; + /** + * Adds a new SP.FieldText to the collection + * + * @param title The field title + * @param maxLength The maximum number of characters allowed in the value of the field. + * @param properties Differ by type of field being created (see: https://msdn.microsoft.com/en-us/library/office/dn600182.aspx) + */ + addText(title: string, maxLength?: number, properties?: TypedHash): Promise; + /** + * Adds a new SP.FieldCalculated to the collection + * + * @param title The field title. + * @param formula The formula for the field. + * @param dateFormat The date and time format that is displayed in the field. + * @param outputType Specifies the output format for the field. Represents a FieldType value. + * @param properties Differ by type of field being created (see: https://msdn.microsoft.com/en-us/library/office/dn600182.aspx) + */ + addCalculated(title: string, formula: string, dateFormat: DateTimeFieldFormatType, outputType?: FieldTypes, properties?: TypedHash): Promise; + /** + * Adds a new SP.FieldDateTime to the collection + * + * @param title The field title + * @param displayFormat The format of the date and time that is displayed in the field. + * @param calendarType Specifies the calendar type of the field. + * @param properties Differ by type of field being created (see: https://msdn.microsoft.com/en-us/library/office/dn600182.aspx) + */ + addDateTime(title: string, displayFormat?: DateTimeFieldFormatType, calendarType?: CalendarType, friendlyDisplayFormat?: number, properties?: TypedHash): Promise; + /** + * Adds a new SP.FieldNumber to the collection + * + * @param title The field title + * @param minValue The field's minimum value + * @param maxValue The field's maximum value + * @param properties Differ by type of field being created (see: https://msdn.microsoft.com/en-us/library/office/dn600182.aspx) + */ + addNumber(title: string, minValue?: number, maxValue?: number, properties?: TypedHash): Promise; + /** + * Adds a new SP.FieldCurrency to the collection + * + * @param title The field title + * @param minValue The field's minimum value + * @param maxValue The field's maximum value + * @param currencyLocalId Specifies the language code identifier (LCID) used to format the value of the field + * @param properties Differ by type of field being created (see: https://msdn.microsoft.com/en-us/library/office/dn600182.aspx) + */ + addCurrency(title: string, minValue?: number, maxValue?: number, currencyLocalId?: number, properties?: TypedHash): Promise; + /** + * Adds a new SP.FieldMultiLineText to the collection + * + * @param title The field title + * @param numberOfLines Specifies the number of lines of text to display for the field. + * @param richText Specifies whether the field supports rich formatting. + * @param restrictedMode Specifies whether the field supports a subset of rich formatting. + * @param appendOnly Specifies whether all changes to the value of the field are displayed in list forms. + * @param allowHyperlink Specifies whether a hyperlink is allowed as a value of the field. + * @param properties Differ by type of field being created (see: https://msdn.microsoft.com/en-us/library/office/dn600182.aspx) + * + */ + addMultilineText(title: string, numberOfLines?: number, richText?: boolean, restrictedMode?: boolean, appendOnly?: boolean, allowHyperlink?: boolean, properties?: TypedHash): Promise; + /** + * Adds a new SP.FieldUrl to the collection + * + * @param title The field title + */ + addUrl(title: string, displayFormat?: UrlFieldFormatType, properties?: TypedHash): Promise; + } + /** + * Describes a single of Field instance + * + */ + export class Field extends SharePointQueryableInstance { + /** + * Updates this field intance with the supplied properties + * + * @param properties A plain object hash of values to update for the list + * @param fieldType The type value, required to update child field type properties + */ + update(properties: TypedHash, fieldType?: string): Promise; + /** + * Delete this fields + * + */ + delete(): Promise; + /** + * Sets the value of the ShowInDisplayForm property for this field. + */ + setShowInDisplayForm(show: boolean): Promise; + /** + * Sets the value of the ShowInEditForm property for this field. + */ + setShowInEditForm(show: boolean): Promise; + /** + * Sets the value of the ShowInNewForm property for this field. + */ + setShowInNewForm(show: boolean): Promise; + } + /** + * This interface defines the result of adding a field + */ + export interface FieldAddResult { + data: any; + field: Field; + } + export interface FieldUpdateResult { + data: any; + field: Field; + } +} +declare module "sharepoint/forms" { + import { SharePointQueryable, SharePointQueryableCollection, SharePointQueryableInstance } from "sharepoint/sharepointqueryable"; + /** + * Describes a collection of Field objects + * + */ + export class Forms extends SharePointQueryableCollection { + /** + * Creates a new instance of the Fields class + * + * @param baseUrl The url or SharePointQueryable which forms the parent of this fields collection + */ + constructor(baseUrl: string | SharePointQueryable, path?: string); + /** + * Gets a form by id + * + * @param id The guid id of the item to retrieve + */ + getById(id: string): Form; + } + /** + * Describes a single of Form instance + * + */ + export class Form extends SharePointQueryableInstance { + } +} +declare module "sharepoint/subscriptions" { + import { SharePointQueryable, SharePointQueryableCollection, SharePointQueryableInstance } from "sharepoint/sharepointqueryable"; + /** + * Describes a collection of webhook subscriptions + * + */ + export class Subscriptions extends SharePointQueryableCollection { + /** + * Creates a new instance of the Subscriptions class + * + * @param baseUrl - The url or SharePointQueryable which forms the parent of this webhook subscriptions collection + */ + constructor(baseUrl: string | SharePointQueryable, path?: string); + /** + * Returns all the webhook subscriptions or the specified webhook subscription + * + * @param subscriptionId The id of a specific webhook subscription to retrieve, omit to retrieve all the webhook subscriptions + */ + getById(subscriptionId: string): Subscription; + /** + * Creates a new webhook subscription + * + * @param notificationUrl The url to receive the notifications + * @param expirationDate The date and time to expire the subscription in the form YYYY-MM-ddTHH:mm:ss+00:00 (maximum of 6 months) + * @param clientState A client specific string (defaults to pnp-js-core-subscription when omitted) + */ + add(notificationUrl: string, expirationDate: string, clientState?: string): Promise; + } + /** + * Describes a single webhook subscription instance + * + */ + export class Subscription extends SharePointQueryableInstance { + /** + * Renews this webhook subscription + * + * @param expirationDate The date and time to expire the subscription in the form YYYY-MM-ddTHH:mm:ss+00:00 (maximum of 6 months) + */ + update(expirationDate: string): Promise; + /** + * Removes this webhook subscription + * + */ + delete(): Promise; + } + export interface SubscriptionAddResult { + subscription: Subscription; + data: any; + } + export interface SubscriptionUpdateResult { + subscription: Subscription; + data: any; + } +} +declare module "sharepoint/usercustomactions" { + import { SharePointQueryable, SharePointQueryableInstance, SharePointQueryableCollection } from "sharepoint/sharepointqueryable"; + import { TypedHash } from "collections/collections"; + /** + * Describes a collection of user custom actions + * + */ + export class UserCustomActions extends SharePointQueryableCollection { + /** + * Creates a new instance of the UserCustomActions class + * + * @param baseUrl The url or SharePointQueryable which forms the parent of this user custom actions collection + */ + constructor(baseUrl: string | SharePointQueryable, path?: string); + /** + * Returns the user custom action with the specified id + * + * @param id The GUID id of the user custom action to retrieve + */ + getById(id: string): UserCustomAction; + /** + * Creates a user custom action + * + * @param properties The information object of property names and values which define the new user custom action + * + */ + add(properties: TypedHash): Promise; + /** + * Deletes all user custom actions in the collection + * + */ + clear(): Promise; + } + /** + * Describes a single user custom action + * + */ + export class UserCustomAction extends SharePointQueryableInstance { + /** + * Updates this user custom action with the supplied properties + * + * @param properties An information object of property names and values to update for this user custom action + */ + update(properties: TypedHash): Promise; + /** + * Removes this user custom action + * + */ + delete(): Promise; + } + /** + * Result from adding a user custom action + * + */ + export interface UserCustomActionAddResult { + data: any; + action: UserCustomAction; + } + /** + * Result from udating a user custom action + * + */ + export interface UserCustomActionUpdateResult { + data: any; + action: UserCustomAction; + } +} +declare module "sharepoint/lists" { + import { Items } from "sharepoint/items"; + import { Views, View } from "sharepoint/views"; + import { ContentTypes } from "sharepoint/contenttypes"; + import { Fields } from "sharepoint/fields"; + import { Forms } from "sharepoint/forms"; + import { Subscriptions } from "sharepoint/subscriptions"; + import { SharePointQueryable, SharePointQueryableInstance, SharePointQueryableCollection } from "sharepoint/sharepointqueryable"; + import { SharePointQueryableSecurable } from "sharepoint/sharepointqueryablesecurable"; + import { TypedHash } from "collections/collections"; + import { ControlMode, RenderListData, ChangeQuery, CamlQuery, ChangeLogitemQuery, ListFormData, RenderListDataParameters } from "sharepoint/types"; + import { UserCustomActions } from "sharepoint/usercustomactions"; + import { Folder } from "sharepoint/folders"; + /** + * Describes a collection of List objects + * + */ + export class Lists extends SharePointQueryableCollection { + /** + * Creates a new instance of the Lists class + * + * @param baseUrl The url or SharePointQueryable which forms the parent of this fields collection + */ + constructor(baseUrl: string | SharePointQueryable, path?: string); + /** + * Gets a list from the collection by title + * + * @param title The title of the list + */ + getByTitle(title: string): List; + /** + * Gets a list from the collection by guid id + * + * @param id The Id of the list (GUID) + */ + getById(id: string): List; + /** + * Adds a new list to the collection + * + * @param title The new list's title + * @param description The new list's description + * @param template The list template value + * @param enableContentTypes If true content types will be allowed and enabled, otherwise they will be disallowed and not enabled + * @param additionalSettings Will be passed as part of the list creation body + */ + add(title: string, description?: string, template?: number, enableContentTypes?: boolean, additionalSettings?: TypedHash): Promise; + /** + * Ensures that the specified list exists in the collection (note: this method not supported for batching) + * + * @param title The new list's title + * @param description The new list's description + * @param template The list template value + * @param enableContentTypes If true content types will be allowed and enabled, otherwise they will be disallowed and not enabled + * @param additionalSettings Will be passed as part of the list creation body or used to update an existing list + */ + ensure(title: string, description?: string, template?: number, enableContentTypes?: boolean, additionalSettings?: TypedHash): Promise; + /** + * Gets a list that is the default asset location for images or other files, which the users upload to their wiki pages. + */ + ensureSiteAssetsLibrary(): Promise; + /** + * Gets a list that is the default location for wiki pages. + */ + ensureSitePagesLibrary(): Promise; + } + /** + * Describes a single List instance + * + */ + export class List extends SharePointQueryableSecurable { + /** + * Gets the content types in this list + * + */ + readonly contentTypes: ContentTypes; + /** + * Gets the items in this list + * + */ + readonly items: Items; + /** + * Gets the views in this list + * + */ + readonly views: Views; + /** + * Gets the fields in this list + * + */ + readonly fields: Fields; + /** + * Gets the forms in this list + * + */ + readonly forms: Forms; + /** + * Gets the default view of this list + * + */ + readonly defaultView: SharePointQueryableInstance; + /** + * Get all custom actions on a site collection + * + */ + readonly userCustomActions: UserCustomActions; + /** + * Gets the effective base permissions of this list + * + */ + readonly effectiveBasePermissions: SharePointQueryable; + /** + * Gets the event receivers attached to this list + * + */ + readonly eventReceivers: SharePointQueryableCollection; + /** + * Gets the related fields of this list + * + */ + readonly relatedFields: SharePointQueryable; + /** + * Gets the IRM settings for this list + * + */ + readonly informationRightsManagementSettings: SharePointQueryable; + /** + * Gets the webhook subscriptions of this list + * + */ + readonly subscriptions: Subscriptions; + /** + * The root folder of the list + */ + readonly rootFolder: Folder; + /** + * Gets a view by view guid id + * + */ + getView(viewId: string): View; + /** + * Updates this list intance with the supplied properties + * + * @param properties A plain object hash of values to update for the list + * @param eTag Value used in the IF-Match header, by default "*" + */ + update(properties: TypedHash, eTag?: string): Promise; + /** + * Delete this list + * + * @param eTag Value used in the IF-Match header, by default "*" + */ + delete(eTag?: string): Promise; + /** + * Returns the collection of changes from the change log that have occurred within the list, based on the specified query. + */ + getChanges(query: ChangeQuery): Promise; + /** + * Returns a collection of items from the list based on the specified query. + * + * @param CamlQuery The Query schema of Collaborative Application Markup + * Language (CAML) is used in various ways within the context of Microsoft SharePoint Foundation + * to define queries against list data. + * see: + * + * https://msdn.microsoft.com/en-us/library/office/ms467521.aspx + * + * @param expands A URI with a $expand System Query Option indicates that Entries associated with + * the Entry or Collection of Entries identified by the Resource Path + * section of the URI must be represented inline (i.e. eagerly loaded). + * see: + * + * https://msdn.microsoft.com/en-us/library/office/fp142385.aspx + * + * http://www.odata.org/documentation/odata-version-2-0/uri-conventions/#ExpandSystemQueryOption + */ + getItemsByCAMLQuery(query: CamlQuery, ...expands: string[]): Promise; + /** + * See: https://msdn.microsoft.com/en-us/library/office/dn292554.aspx + */ + getListItemChangesSinceToken(query: ChangeLogitemQuery): Promise; + /** + * Moves the list to the Recycle Bin and returns the identifier of the new Recycle Bin item. + */ + recycle(): Promise; + /** + * Renders list data based on the view xml provided + */ + renderListData(viewXml: string): Promise; + /** + * Returns the data for the specified query view + * + * @param parameters The parameters to be used to render list data as JSON string. + * @param overrideParameters The parameters that are used to override and extend the regular SPRenderListDataParameters. + */ + renderListDataAsStream(parameters: RenderListDataParameters, overrideParameters?: any): Promise; + /** + * Gets the field values and field schema attributes for a list item. + */ + renderListFormData(itemId: number, formId: string, mode: ControlMode): Promise; + /** + * Reserves a list item ID for idempotent list item creation. + */ + reserveListItemId(): Promise; + /** + * Returns the ListItemEntityTypeFullName for this list, used when adding/updating list items. Does not support batching. + * + */ + getListItemEntityTypeFullName(): Promise; + } + export interface ListAddResult { + list: List; + data: any; + } + export interface ListUpdateResult { + list: List; + data: any; + } + export interface ListEnsureResult { + list: List; + created: boolean; + data: any; + } +} +declare module "sharepoint/navigation" { + import { TypedHash } from "collections/collections"; + import { SharePointQueryable, SharePointQueryableInstance, SharePointQueryableCollection } from "sharepoint/sharepointqueryable"; + /** + * Result from adding a navigation node + * + */ + export interface NavigationNodeAddResult { + data: any; + node: NavigationNode; + } + /** + * Result from udpdating a navigation node + * + */ + export interface NavigationNodeUpdateResult { + data: any; + node: NavigationNode; + } + /** + * Represents a collection of navigation nodes + * + */ + export class NavigationNodes extends SharePointQueryableCollection { + /** + * Gets a navigation node by id + * + * @param id The id of the node + */ + getById(id: number): NavigationNode; + /** + * Adds a new node to the collection + * + * @param title Display name of the node + * @param url The url of the node + * @param visible If true the node is visible, otherwise it is hidden (default: true) + */ + add(title: string, url: string, visible?: boolean): Promise; + /** + * Moves a node to be after another node in the navigation + * + * @param nodeId Id of the node to move + * @param previousNodeId Id of the node after which we move the node specified by nodeId + */ + moveAfter(nodeId: number, previousNodeId: number): Promise; + } + /** + * Represents an instance of a navigation node + * + */ + export class NavigationNode extends SharePointQueryableInstance { + /** + * Represents the child nodes of this node + */ + readonly children: NavigationNodes; + /** + * Updates this node based on the supplied properties + * + * @param properties The hash of key/value pairs to update + */ + update(properties: TypedHash): Promise; + /** + * Deletes this node and any child nodes + */ + delete(): Promise; + } + /** + * Exposes the navigation components + * + */ + export class Navigation extends SharePointQueryable { + /** + * Creates a new instance of the Navigation class + * + * @param baseUrl The url or SharePointQueryable which forms the parent of these navigation components + */ + constructor(baseUrl: string | SharePointQueryable, path?: string); + /** + * Gets the quicklaunch navigation nodes for the current context + * + */ + readonly quicklaunch: NavigationNodes; + /** + * Gets the top bar navigation nodes for the current context + * + */ + readonly topNavigationBar: NavigationNodes; + } +} +declare module "sharepoint/features" { + import { SharePointQueryable, SharePointQueryableInstance, SharePointQueryableCollection } from "sharepoint/sharepointqueryable"; + /** + * Describes a collection of List objects + * + */ + export class Features extends SharePointQueryableCollection { + /** + * Creates a new instance of the Lists class + * + * @param baseUrl The url or SharePointQueryable which forms the parent of this fields collection + */ + constructor(baseUrl: string | SharePointQueryable, path?: string); + /** + * Gets a list from the collection by guid id + * + * @param id The Id of the feature (GUID) + */ + getById(id: string): Feature; + /** + * Adds a new list to the collection + * + * @param id The Id of the feature (GUID) + * @param force If true the feature activation will be forced + */ + add(id: string, force?: boolean): Promise; + /** + * Removes (deactivates) a feature from the collection + * + * @param id The Id of the feature (GUID) + * @param force If true the feature deactivation will be forced + */ + remove(id: string, force?: boolean): Promise; + } + export class Feature extends SharePointQueryableInstance { + /** + * Removes (deactivates) a feature from the collection + * + * @param force If true the feature deactivation will be forced + */ + deactivate(force?: boolean): Promise; + } + export interface FeatureAddResult { + data: any; + feature: Feature; + } +} +declare module "sharepoint/relateditems" { + import { SharePointQueryable } from "sharepoint/sharepointqueryable"; + export interface RelatedItem { + ListId: string; + ItemId: number; + Url: string; + Title: string; + WebId: string; + IconUrl: string; + } + export interface RelatedItemManger { + getRelatedItems(sourceListName: string, sourceItemId: number): Promise; + getPageOneRelatedItems(sourceListName: string, sourceItemId: number): Promise; + addSingleLink(sourceListName: string, sourceItemId: number, sourceWebUrl: string, targetListName: string, targetItemID: number, targetWebUrl: string, tryAddReverseLink?: boolean): Promise; + /** + * Adds a related item link from an item specified by list name and item id, to an item specified by url + * + * @param sourceListName The source list name or list id + * @param sourceItemId The source item id + * @param targetItemUrl The target item url + * @param tryAddReverseLink If set to true try to add the reverse link (will not return error if it fails) + */ + addSingleLinkToUrl(sourceListName: string, sourceItemId: number, targetItemUrl: string, tryAddReverseLink?: boolean): Promise; + /** + * Adds a related item link from an item specified by url, to an item specified by list name and item id + * + * @param sourceItemUrl The source item url + * @param targetListName The target list name or list id + * @param targetItemId The target item id + * @param tryAddReverseLink If set to true try to add the reverse link (will not return error if it fails) + */ + addSingleLinkFromUrl(sourceItemUrl: string, targetListName: string, targetItemId: number, tryAddReverseLink?: boolean): Promise; + deleteSingleLink(sourceListName: string, sourceItemId: number, sourceWebUrl: string, targetListName: string, targetItemId: number, targetWebUrl: string, tryDeleteReverseLink?: boolean): Promise; + } + export class RelatedItemManagerImpl extends SharePointQueryable implements RelatedItemManger { + static FromUrl(url: string): RelatedItemManagerImpl; + constructor(baseUrl: string | SharePointQueryable, path?: string); + getRelatedItems(sourceListName: string, sourceItemId: number): Promise; + getPageOneRelatedItems(sourceListName: string, sourceItemId: number): Promise; + addSingleLink(sourceListName: string, sourceItemId: number, sourceWebUrl: string, targetListName: string, targetItemID: number, targetWebUrl: string, tryAddReverseLink?: boolean): Promise; + /** + * Adds a related item link from an item specified by list name and item id, to an item specified by url + * + * @param sourceListName The source list name or list id + * @param sourceItemId The source item id + * @param targetItemUrl The target item url + * @param tryAddReverseLink If set to true try to add the reverse link (will not return error if it fails) + */ + addSingleLinkToUrl(sourceListName: string, sourceItemId: number, targetItemUrl: string, tryAddReverseLink?: boolean): Promise; + /** + * Adds a related item link from an item specified by url, to an item specified by list name and item id + * + * @param sourceItemUrl The source item url + * @param targetListName The target list name or list id + * @param targetItemId The target item id + * @param tryAddReverseLink If set to true try to add the reverse link (will not return error if it fails) + */ + addSingleLinkFromUrl(sourceItemUrl: string, targetListName: string, targetItemId: number, tryAddReverseLink?: boolean): Promise; + deleteSingleLink(sourceListName: string, sourceItemId: number, sourceWebUrl: string, targetListName: string, targetItemId: number, targetWebUrl: string, tryDeleteReverseLink?: boolean): Promise; + } +} +declare module "sharepoint/webs" { + import { SharePointQueryable, SharePointQueryableCollection } from "sharepoint/sharepointqueryable"; + import { Lists } from "sharepoint/lists"; + import { Fields } from "sharepoint/fields"; + import { Navigation } from "sharepoint/navigation"; + import { SiteGroups, SiteGroup } from "sharepoint/sitegroups"; + import { ContentTypes } from "sharepoint/contenttypes"; + import { Folders, Folder } from "sharepoint/folders"; + import { RoleDefinitions } from "sharepoint/roles"; + import { File } from "sharepoint/files"; + import { TypedHash } from "collections/collections"; + import { ChangeQuery } from "sharepoint/types"; + import { List } from "sharepoint/lists"; + import { SiteUsers, SiteUser, CurrentUser, SiteUserProps } from "sharepoint/siteusers"; + import { UserCustomActions } from "sharepoint/usercustomactions"; + import { ODataBatch } from "sharepoint/batch"; + import { Features } from "sharepoint/features"; + import { SharePointQueryableShareableWeb } from "sharepoint/sharepointqueryableshareable"; + import { RelatedItemManger } from "sharepoint/relateditems"; + /** + * Describes a collection of webs + * + */ + export class Webs extends SharePointQueryableCollection { + /** + * Creates a new instance of the Webs class + * + * @param baseUrl The url or SharePointQueryable which forms the parent of this web collection + */ + constructor(baseUrl: string | SharePointQueryable, webPath?: string); + /** + * Adds a new web to the collection + * + * @param title The new web's title + * @param url The new web's relative url + * @param description The new web's description + * @param template The new web's template internal name (default = STS) + * @param language The locale id that specifies the new web's language (default = 1033 [English, US]) + * @param inheritPermissions When true, permissions will be inherited from the new web's parent (default = true) + */ + add(title: string, url: string, description?: string, template?: string, language?: number, inheritPermissions?: boolean): Promise; + } + /** + * Describes a collection of web infos + * + */ + export class WebInfos extends SharePointQueryableCollection { + /** + * Creates a new instance of the WebInfos class + * + * @param baseUrl The url or SharePointQueryable which forms the parent of this web infos collection + */ + constructor(baseUrl: string | SharePointQueryable, webPath?: string); + } + /** + * Describes a web + * + */ + export class Web extends SharePointQueryableShareableWeb { + /** + * Creates a new web instance from the given url by indexing the location of the /_api/ + * segment. If this is not found the method creates a new web with the entire string as + * supplied. + * + * @param url + */ + static fromUrl(url: string, path?: string): Web; + /** + * Creates a new instance of the Web class + * + * @param baseUrl The url or SharePointQueryable which forms the parent of this web + */ + constructor(baseUrl: string | SharePointQueryable, path?: string); + /** + * Gets this web's subwebs + * + */ + readonly webs: Webs; + /** + * Gets a collection of WebInfos for this web's subwebs + * + */ + readonly webinfos: WebInfos; + /** + * Gets the content types available in this web + * + */ + readonly contentTypes: ContentTypes; + /** + * Gets the lists in this web + * + */ + readonly lists: Lists; + /** + * Gets the fields in this web + * + */ + readonly fields: Fields; + /** + * Gets the active features for this web + * + */ + readonly features: Features; + /** + * Gets the available fields in this web + * + */ + readonly availablefields: Fields; + /** + * Gets the navigation options in this web + * + */ + readonly navigation: Navigation; + /** + * Gets the site users + * + */ + readonly siteUsers: SiteUsers; + /** + * Gets the site groups + * + */ + readonly siteGroups: SiteGroups; + /** + * Gets the current user + */ + readonly currentUser: CurrentUser; + /** + * Gets the top-level folders in this web + * + */ + readonly folders: Folders; + /** + * Gets all user custom actions for this web + * + */ + readonly userCustomActions: UserCustomActions; + /** + * Gets the collection of RoleDefinition resources + * + */ + readonly roleDefinitions: RoleDefinitions; + /** + * Provides an interface to manage related items + * + */ + readonly relatedItems: RelatedItemManger; + /** + * Creates a new batch for requests within the context of this web + * + */ + createBatch(): ODataBatch; + /** + * Gets the root folder of this web + * + */ + readonly rootFolder: Folder; + /** + * Gets the associated owner group for this web + * + */ + readonly associatedOwnerGroup: SiteGroup; + /** + * Gets the associated member group for this web + * + */ + readonly associatedMemberGroup: SiteGroup; + /** + * Gets the associated visitor group for this web + * + */ + readonly associatedVisitorGroup: SiteGroup; + /** + * Gets a folder by server relative url + * + * @param folderRelativeUrl The server relative path to the folder (including /sites/ if applicable) + */ + getFolderByServerRelativeUrl(folderRelativeUrl: string): Folder; + /** + * Gets a file by server relative url + * + * @param fileRelativeUrl The server relative path to the file (including /sites/ if applicable) + */ + getFileByServerRelativeUrl(fileRelativeUrl: string): File; + /** + * Gets a list by server relative url (list's root folder) + * + * @param listRelativeUrl The server relative path to the list's root folder (including /sites/ if applicable) + */ + getList(listRelativeUrl: string): List; + /** + * Updates this web instance with the supplied properties + * + * @param properties A plain object hash of values to update for the web + */ + update(properties: TypedHash): Promise; + /** + * Deletes this web + * + */ + delete(): Promise; + /** + * Applies the theme specified by the contents of each of the files specified in the arguments to the site + * + * @param colorPaletteUrl The server-relative URL of the color palette file + * @param fontSchemeUrl The server-relative URL of the font scheme + * @param backgroundImageUrl The server-relative URL of the background image + * @param shareGenerated When true, the generated theme files are stored in the root site. When false, they are stored in this web + */ + applyTheme(colorPaletteUrl: string, fontSchemeUrl: string, backgroundImageUrl: string, shareGenerated: boolean): Promise; + /** + * Applies the specified site definition or site template to the Web site that has no template applied to it + * + * @param template Name of the site definition or the name of the site template + */ + applyWebTemplate(template: string): Promise; + /** + * Checks whether the specified login name belongs to a valid user in the web. If the user doesn't exist, adds the user to the web. + * + * @param loginName The login name of the user (ex: i:0#.f|membership|user@domain.onmicrosoft.com) + */ + ensureUser(loginName: string): Promise; + /** + * Returns a collection of site templates available for the site + * + * @param language The locale id of the site templates to retrieve (default = 1033 [English, US]) + * @param includeCrossLanguage When true, includes language-neutral site templates; otherwise false (default = true) + */ + availableWebTemplates(language?: number, includeCrossLanugage?: boolean): SharePointQueryableCollection; + /** + * Returns the list gallery on the site + * + * @param type The gallery type - WebTemplateCatalog = 111, WebPartCatalog = 113 ListTemplateCatalog = 114, + * MasterPageCatalog = 116, SolutionCatalog = 121, ThemeCatalog = 123, DesignCatalog = 124, AppDataCatalog = 125 + */ + getCatalog(type: number): Promise; + /** + * Returns the collection of changes from the change log that have occurred within the list, based on the specified query + * + * @param query The change query + */ + getChanges(query: ChangeQuery): Promise; + /** + * Gets the custom list templates for the site + * + */ + readonly customListTemplate: SharePointQueryableCollection; + /** + * Returns the user corresponding to the specified member identifier for the current site + * + * @param id The id of the user + */ + getUserById(id: number): SiteUser; + /** + * Returns the name of the image file for the icon that is used to represent the specified file + * + * @param filename The file name. If this parameter is empty, the server returns an empty string + * @param size The size of the icon: 16x16 pixels = 0, 32x32 pixels = 1 (default = 0) + * @param progId The ProgID of the application that was used to create the file, in the form OLEServerName.ObjectName + */ + mapToIcon(filename: string, size?: number, progId?: string): Promise; + } + /** + * Result from adding a web + * + */ + export interface WebAddResult { + data: any; + web: Web; + } + /** + * Result from updating a web + * + */ + export interface WebUpdateResult { + data: any; + web: Web; + } + /** + * Result from retrieving a catalog + * + */ + export interface GetCatalogResult { + data: any; + list: List; + } + /** + * Result from ensuring a user + * + */ + export interface WebEnsureUserResult { + data: SiteUserProps; + user: SiteUser; + } +} +declare module "sharepoint/site" { + import { SharePointQueryable, SharePointQueryableInstance } from "sharepoint/sharepointqueryable"; + import { Web } from "sharepoint/webs"; + import { UserCustomActions } from "sharepoint/usercustomactions"; + import { ContextInfo, DocumentLibraryInformation } from "sharepoint/types"; + import { ODataBatch } from "sharepoint/batch"; + import { Features } from "sharepoint/features"; + /** + * Describes a site collection + * + */ + export class Site extends SharePointQueryableInstance { + /** + * Creates a new instance of the Site class + * + * @param baseUrl The url or SharePointQueryable which forms the parent of this site collection + */ + constructor(baseUrl: string | SharePointQueryable, path?: string); + /** + * Gets the root web of the site collection + * + */ + readonly rootWeb: Web; + /** + * Gets the active features for this site collection + * + */ + readonly features: Features; + /** + * Gets all custom actions for this site collection + * + */ + readonly userCustomActions: UserCustomActions; + /** + * Gets the context information for this site collection + */ + getContextInfo(): Promise; + /** + * Gets the document libraries on a site. Static method. (SharePoint Online only) + * + * @param absoluteWebUrl The absolute url of the web whose document libraries should be returned + */ + getDocumentLibraries(absoluteWebUrl: string): Promise; + /** + * Gets the site url from a page url + * + * @param absolutePageUrl The absolute url of the page + */ + getWebUrlFromPageUrl(absolutePageUrl: string): Promise; + /** + * Creates a new batch for requests within the context of this site collection + * + */ + createBatch(): ODataBatch; + /** + * Opens a web by id (using POST) + * + * @param webId The GUID id of the web to open + */ + openWebById(webId: string): Promise; + } + /** + * The result of opening a web by id: contains the data returned as well as a chainable web instance + */ + export interface OpenWebByIdResult { + data: any; + web: Web; + } +} +declare module "utils/files" { + /** + * Reads a blob as text + * + * @param blob The data to read + */ + export function readBlobAsText(blob: Blob): Promise; + /** + * Reads a blob into an array buffer + * + * @param blob The data to read + */ + export function readBlobAsArrayBuffer(blob: Blob): Promise; +} +declare module "sharepoint/userprofiles" { + import { SharePointQueryable, SharePointQueryableInstance, SharePointQueryableCollection } from "sharepoint/sharepointqueryable"; + import { HashTagCollection, UserProfile } from "sharepoint/types"; + export class UserProfileQuery extends SharePointQueryableInstance { + private profileLoader; + /** + * Creates a new instance of the UserProfileQuery class + * + * @param baseUrl The url or SharePointQueryable which forms the parent of this user profile query + */ + constructor(baseUrl: string | SharePointQueryable, path?: string); + /** + * The url of the edit profile page for the current user + */ + readonly editProfileLink: Promise; + /** + * A boolean value that indicates whether the current user's "People I'm Following" list is public + */ + readonly isMyPeopleListPublic: Promise; + /** + * A boolean value that indicates whether the current user is being followed by the specified user + * + * @param loginName The account name of the user + */ + amIFollowedBy(loginName: string): Promise; + /** + * A boolean value that indicates whether the current user is following the specified user + * + * @param loginName The account name of the user + */ + amIFollowing(loginName: string): Promise; + /** + * Gets tags that the current user is following + * + * @param maxCount The maximum number of tags to retrieve (default is 20) + */ + getFollowedTags(maxCount?: number): Promise; + /** + * Gets the people who are following the specified user + * + * @param loginName The account name of the user + */ + getFollowersFor(loginName: string): Promise; + /** + * Gets the people who are following the current user + * + */ + readonly myFollowers: SharePointQueryableCollection; + /** + * Gets user properties for the current user + * + */ + readonly myProperties: SharePointQueryableInstance; + /** + * Gets the people who the specified user is following + * + * @param loginName The account name of the user. + */ + getPeopleFollowedBy(loginName: string): Promise; + /** + * Gets user properties for the specified user. + * + * @param loginName The account name of the user. + */ + getPropertiesFor(loginName: string): Promise; + /** + * Gets the 20 most popular hash tags over the past week, sorted so that the most popular tag appears first + * + */ + readonly trendingTags: Promise; + /** + * Gets the specified user profile property for the specified user + * + * @param loginName The account name of the user + * @param propertyName The case-sensitive name of the property to get + */ + getUserProfilePropertyFor(loginName: string, propertyName: string): Promise; + /** + * Removes the specified user from the user's list of suggested people to follow + * + * @param loginName The account name of the user + */ + hideSuggestion(loginName: string): Promise; + /** + * A boolean values that indicates whether the first user is following the second user + * + * @param follower The account name of the user who might be following the followee + * @param followee The account name of the user who might be followed by the follower + */ + isFollowing(follower: string, followee: string): Promise; + /** + * Uploads and sets the user profile picture (Users can upload a picture to their own profile only). Not supported for batching. + * + * @param profilePicSource Blob data representing the user's picture in BMP, JPEG, or PNG format of up to 4.76MB + */ + setMyProfilePic(profilePicSource: Blob): Promise; + /** + * Provisions one or more users' personal sites. (My Site administrator on SharePoint Online only) + * + * @param emails The email addresses of the users to provision sites for + */ + createPersonalSiteEnqueueBulk(...emails: string[]): Promise; + /** + * Gets the user profile of the site owner + * + */ + readonly ownerUserProfile: Promise; + /** + * Gets the user profile for the current user + */ + readonly userProfile: Promise; + /** + * Enqueues creating a personal site for this user, which can be used to share documents, web pages, and other files + * + * @param interactiveRequest true if interactively (web) initiated request, or false (default) if non-interactively (client) initiated request + */ + createPersonalSite(interactiveRequest?: boolean): Promise; + /** + * Sets the privacy settings for this profile + * + * @param share true to make all social data public; false to make all social data private + */ + shareAllSocialData(share: boolean): Promise; + } +} +declare module "sharepoint/utilities" { + import { SharePointQueryable } from "sharepoint/sharepointqueryable"; + import { EmailProperties } from "sharepoint/types"; + import { ODataBatch } from "sharepoint/batch"; + import { ICachingOptions } from "odata/caching"; + import { File } from "sharepoint/files"; + import { PrincipalInfo, PrincipalType, PrincipalSource, WikiPageCreationInformation } from "sharepoint/types"; + /** + * Public interface for the utility methods to limit SharePointQueryable method exposure + */ + export interface UtilityMethods { + usingCaching(options?: ICachingOptions): this; + inBatch(batch: ODataBatch): this; + sendEmail(props: EmailProperties): Promise; + getCurrentUserEmailAddresses(): Promise; + resolvePrincipal(email: string, scopes: PrincipalType, sources: PrincipalSource, inputIsEmailOnly: boolean, addToUserInfoList: boolean, matchUserInfoList?: boolean): Promise; + searchPrincipals(input: string, scopes: PrincipalType, sources: PrincipalSource, groupName: string, maxCount: number): Promise; + createEmailBodyForInvitation(pageAddress: string): Promise; + expandGroupsToPrincipals(inputs: string[], maxCount?: number): Promise; + createWikiPage(info: WikiPageCreationInformation): Promise; + } + /** + * Allows for calling of the static SP.Utilities.Utility methods by supplying the method name + */ + export class UtilityMethod extends SharePointQueryable implements UtilityMethods { + private static getBaseUrl(candidate); + /** + * Creates a new instance of the Utility method class + * + * @param baseUrl The parent url provider + * @param methodName The static method name to call on the utility class + */ + constructor(baseUrl: string | SharePointQueryable, methodName: string); + excute(props: any): Promise; + /** + * Clones this SharePointQueryable into a new SharePointQueryable instance of T + * @param factory Constructor used to create the new instance + * @param additionalPath Any additional path to include in the clone + * @param includeBatch If true this instance's batch will be added to the cloned instance + */ + protected create(methodName: string, includeBatch: boolean): UtilityMethod; + /** + * Sends an email based on the supplied properties + * + * @param props The properties of the email to send + */ + sendEmail(props: EmailProperties): Promise; + getCurrentUserEmailAddresses(): Promise; + resolvePrincipal(input: string, scopes: PrincipalType, sources: PrincipalSource, inputIsEmailOnly: boolean, addToUserInfoList: boolean, matchUserInfoList?: boolean): Promise; + searchPrincipals(input: string, scopes: PrincipalType, sources: PrincipalSource, groupName: string, maxCount: number): Promise; + createEmailBodyForInvitation(pageAddress: string): Promise; + expandGroupsToPrincipals(inputs: string[], maxCount?: number): Promise; + createWikiPage(info: WikiPageCreationInformation): Promise; + } + export interface CreateWikiPageResult { + data: any; + file: File; + } +} +declare module "sharepoint/rest" { + import { SearchQuery, SearchResults, SearchQueryBuilder } from "sharepoint/search"; + import { SearchSuggestQuery, SearchSuggestResult } from "sharepoint/searchsuggest"; + import { Site } from "sharepoint/site"; + import { Web } from "sharepoint/webs"; + import { UserProfileQuery } from "sharepoint/userprofiles"; + import { ODataBatch } from "sharepoint/batch"; + import { UtilityMethods } from "sharepoint/utilities"; + import { ConfigOptions } from "net/utils"; + /** + * Root of the SharePoint REST module + */ + export class SPRest { + /** + * Additional options to be set before sending actual http requests + */ + private _options; + /** + * A string that should form the base part of the url + */ + private _baseUrl; + /** + * Creates a new instance of the SPRest class + * + * @param options Additional options + * @param baseUrl A string that should form the base part of the url + */ + constructor(options?: ConfigOptions, baseUrl?: string); + /** + * Configures instance with additional options and baseUrl. + * Provided configuration used by other objects in a chain + * + * @param options Additional options + * @param baseUrl A string that should form the base part of the url + */ + configure(options: ConfigOptions, baseUrl?: string): SPRest; + /** + * Executes a search against this web context + * + * @param query The SearchQuery definition + */ + searchSuggest(query: string | SearchSuggestQuery): Promise; + /** + * Executes a search against this web context + * + * @param query The SearchQuery definition + */ + search(query: string | SearchQuery | SearchQueryBuilder): Promise; + /** + * Begins a site collection scoped REST request + * + */ + readonly site: Site; + /** + * Begins a web scoped REST request + * + */ + readonly web: Web; + /** + * Access to user profile methods + * + */ + readonly profiles: UserProfileQuery; + /** + * Creates a new batch object for use with the SharePointQueryable.addToBatch method + * + */ + createBatch(): ODataBatch; + /** + * Static utilities methods from SP.Utilities.Utility + */ + readonly utility: UtilityMethods; + /** + * Begins a cross-domain, host site scoped REST request, for use in add-in webs + * + * @param addInWebUrl The absolute url of the add-in web + * @param hostWebUrl The absolute url of the host web + */ + crossDomainSite(addInWebUrl: string, hostWebUrl: string): Site; + /** + * Begins a cross-domain, host web scoped REST request, for use in add-in webs + * + * @param addInWebUrl The absolute url of the add-in web + * @param hostWebUrl The absolute url of the host web + */ + crossDomainWeb(addInWebUrl: string, hostWebUrl: string): Web; + /** + * Implements the creation of cross domain REST urls + * + * @param factory The constructor of the object to create Site | Web + * @param addInWebUrl The absolute url of the add-in web + * @param hostWebUrl The absolute url of the host web + * @param urlPart String part to append to the url "site" | "web" + */ + private _cdImpl(factory, addInWebUrl, hostWebUrl, urlPart); + } +} +declare module "graph/graphqueryable" { + import { FetchOptions } from "net/utils"; + import { ODataParser } from "odata/core"; + import { ODataQueryable } from "odata/queryable"; + import { RequestContext } from "request/pipeline"; + export interface GraphQueryableConstructor { + new (baseUrl: string | GraphQueryable, path?: string): T; + } + /** + * Queryable Base Class + * + */ + export class GraphQueryable extends ODataQueryable { + /** + * Creates a new instance of the Queryable class + * + * @constructor + * @param baseUrl A string or Queryable that should form the base part of the url + * + */ + constructor(baseUrl: string | GraphQueryable, path?: string); + /** + * Creates a new instance of the supplied factory and extends this into that new instance + * + * @param factory constructor for the new queryable + */ + as(factory: GraphQueryableConstructor): T; + /** + * Gets the full url with query information + * + */ + toUrlAndQuery(): string; + /** + * Gets a parent for this instance as specified + * + * @param factory The contructor for the class to create + */ + protected getParent(factory: GraphQueryableConstructor, baseUrl?: string | GraphQueryable, path?: string): T; + /** + * Clones this queryable into a new queryable instance of T + * @param factory Constructor used to create the new instance + * @param additionalPath Any additional path to include in the clone + * @param includeBatch If true this instance's batch will be added to the cloned instance + */ + protected clone(factory: GraphQueryableConstructor, additionalPath?: string, includeBatch?: boolean): T; + /** + * Converts the current instance to a request context + * + * @param verb The request verb + * @param options The set of supplied request options + * @param parser The supplied ODataParser instance + * @param pipeline Optional request processing pipeline + */ + protected toRequestContext(verb: string, options: FetchOptions, parser: ODataParser, pipeline?: Array<(c: RequestContext) => Promise>>): Promise>; + } + /** + * Represents a REST collection which can be filtered, paged, and selected + * + */ + export class GraphQueryableCollection extends GraphQueryable { + /** + * + * @param filter The string representing the filter query + */ + filter(filter: string): this; + /** + * Choose which fields to return + * + * @param selects One or more fields to return + */ + select(...selects: string[]): this; + /** + * Expands fields such as lookups to get additional data + * + * @param expands The Fields for which to expand the values + */ + expand(...expands: string[]): this; + /** + * Orders based on the supplied fields ascending + * + * @param orderby The name of the field to sort on + * @param ascending If false DESC is appended, otherwise ASC (default) + */ + orderBy(orderBy: string, ascending?: boolean): this; + /** + * Limits the query to only return the specified number of items + * + * @param top The query row limit + */ + top(top: number): this; + /** + * Skips a set number of items in the return set + * + * @param num Number of items to skip + */ + skip(num: number): this; + /** + * To request second and subsequent pages of Graph data + */ + skipToken(token: string): this; + /** + * Retrieves the total count of matching resources + */ + readonly count: this; + } + export class GraphQueryableSearchableCollection extends GraphQueryableCollection { + /** + * To request second and subsequent pages of Graph data + */ + search(query: string): this; + } + /** + * Represents an instance that can be selected + * + */ + export class GraphQueryableInstance extends GraphQueryable { + /** + * Choose which fields to return + * + * @param selects One or more fields to return + */ + select(...selects: string[]): this; + /** + * Expands fields such as lookups to get additional data + * + * @param expands The Fields for which to expand the values + */ + expand(...expands: string[]): this; + } +} +declare module "graph/members" { + import { GraphQueryable, GraphQueryableInstance, GraphQueryableCollection } from "graph/graphqueryable"; + export class Members extends GraphQueryableCollection { + constructor(baseUrl: string | GraphQueryable, path?: string); + /** + * Use this API to add a member to an Office 365 group, a security group or a mail-enabled security group through + * the members navigation property. You can add users or other groups. + * Important: You can add only users to Office 365 groups. + * + * @param id Full @odata.id of the directoryObject, user, or group object you want to add (ex: https://graph.microsoft.com/v1.0/directoryObjects/${id}) + */ + add(id: string): Promise; + /** + * Gets a member of the group by id + * + * @param id Group member's id + */ + getById(id: string): Member; + } + export class Member extends GraphQueryableInstance { + } + export class Owners extends Members { + constructor(baseUrl: string | GraphQueryable, path?: string); + } +} +declare module "graph/calendars" { + import { GraphQueryable, GraphQueryableInstance, GraphQueryableCollection } from "graph/graphqueryable"; + import { TypedHash } from "collections/collections"; + import { Event as IEvent } from "@microsoft/microsoft-graph-types"; + export class Calendars extends GraphQueryableCollection { + constructor(baseUrl: string | GraphQueryable, path?: string); + } + export class Calendar extends GraphQueryableInstance { + readonly events: Events; + } + export class Events extends GraphQueryableCollection { + constructor(baseUrl: string | GraphQueryable, path?: string); + getById(id: string): Event; + /** + * Adds a new event to the collection + * + * @param properties The set of properties used to create the event + */ + add(properties: Event): Promise; + } + export interface EventAddResult { + data: IEvent; + event: Event; + } + export class Event extends GraphQueryableInstance { + /** + * Update the properties of an event object + * + * @param properties Set of properties of this event to update + */ + update(properties: TypedHash): Promise; + /** + * Deletes this event + */ + delete(): Promise; + } +} +declare module "graph/attachments" { + import { GraphQueryable, GraphQueryableInstance, GraphQueryableCollection } from "graph/graphqueryable"; + import { Attachment as IAttachment } from "@microsoft/microsoft-graph-types"; + export class Attachments extends GraphQueryableCollection { + constructor(baseUrl: string | GraphQueryable, path?: string); + /** + * Gets a member of the group by id + * + * @param id Attachment id + */ + getById(id: string): Attachment; + /** + * Add attachment to this collection + * + * @param name Name given to the attachment file + * @param bytes File content + */ + addFile(name: string, bytes: string | Blob): Promise; + } + export class Attachment extends GraphQueryableInstance { + } +} +declare module "graph/conversations" { + import { GraphQueryable, GraphQueryableInstance, GraphQueryableCollection } from "graph/graphqueryable"; + import { TypedHash } from "collections/collections"; + import { Attachments } from "graph/attachments"; + import { ConversationThread as IConversationThread, Post as IPost, Recipient as IRecipient } from "@microsoft/microsoft-graph-types"; + /** + * Information used to forward a post + */ + export interface PostForwardInfo { + comment?: string; + toRecipients: IRecipient[]; + } + export class Conversations extends GraphQueryableCollection { + constructor(baseUrl: string | GraphQueryable, path?: string); + /** + * Create a new conversation by including a thread and a post. + * + * @param properties Properties used to create the new conversation + */ + add(properties: TypedHash): Promise; + /** + * Gets a conversation from this collection by id + * + * @param id Group member's id + */ + getById(id: string): Conversation; + } + export class Threads extends GraphQueryableCollection { + constructor(baseUrl: string | GraphQueryable, path?: string); + /** + * Gets a thread from this collection by id + * + * @param id Group member's id + */ + getById(id: string): Thread; + /** + * Adds a new thread to this collection + * + * @param properties properties used to create the new thread + * @returns Id of the new thread + */ + add(properties: IConversationThread): Promise<{ + id: string; + }>; + } + export class Posts extends GraphQueryableCollection { + constructor(baseUrl: string | GraphQueryable, path?: string); + /** + * Gets a thread from this collection by id + * + * @param id Group member's id + */ + getById(id: string): Post; + /** + * Adds a new thread to this collection + * + * @param properties properties used to create the new thread + * @returns Id of the new thread + */ + add(properties: IPost): Promise<{ + id: string; + }>; + } + export class Conversation extends GraphQueryableInstance { + /** + * Get all the threads in a group conversation. + */ + readonly threads: Threads; + /** + * Updates this conversation + */ + update(properties: TypedHash): Promise; + /** + * Deletes this member from the group + */ + delete(): Promise; + } + export class Thread extends GraphQueryableInstance { + /** + * Get all the threads in a group conversation. + */ + readonly posts: Posts; + /** + * Reply to a thread in a group conversation and add a new post to it + * + * @param post Contents of the post + */ + reply(post: IPost): Promise; + /** + * Deletes this member from the group + */ + delete(): Promise; + } + export class Post extends GraphQueryableInstance { + readonly attachments: Attachments; + /** + * Deletes this post + */ + delete(): Promise; + /** + * Forward a post to a recipient + */ + forward(info: PostForwardInfo): Promise; + /** + * Reply to a thread in a group conversation and add a new post to it + * + * @param post Contents of the post + */ + reply(post: IPost): Promise; + } + export class Senders extends GraphQueryableCollection { + constructor(baseUrl: string | GraphQueryable, path?: string); + /** + * Add a new user or group to this senders collection + * @param id The full @odata.id value to add (ex: https://graph.microsoft.com/v1.0/users/user@contoso.com) + */ + add(id: string): Promise; + /** + * Removes the entity from the collection + * + * @param id The full @odata.id value to remove (ex: https://graph.microsoft.com/v1.0/users/user@contoso.com) + */ + remove(id: string): Promise; + } +} +declare module "graph/plans" { + import { GraphQueryable, GraphQueryableInstance, GraphQueryableCollection } from "graph/graphqueryable"; + export class Plans extends GraphQueryableCollection { + constructor(baseUrl: string | GraphQueryable, path?: string); + /** + * Gets a plan from this collection by id + * + * @param id Plan's id + */ + getById(id: string): Plan; + } + export class Plan extends GraphQueryableInstance { + } +} +declare module "graph/photos" { + import { GraphQueryable, GraphQueryableInstance } from "graph/graphqueryable"; + export class Photo extends GraphQueryableInstance { + constructor(baseUrl: string | GraphQueryable, path?: string); + /** + * Gets the image bytes as a blob (browser) + */ + getBlob(): Promise; + /** + * Gets the image file byets as a Buffer (node.js) + */ + getBuffer(): Promise; + /** + * Sets the file bytes + * + * @param content Image file contents, max 4 MB + */ + setContent(content: ArrayBuffer | Blob): Promise; + } +} +declare module "graph/groups" { + import { GraphQueryable, GraphQueryableInstance, GraphQueryableCollection } from "graph/graphqueryable"; + import { Members, Owners } from "graph/members"; + import { TypedHash } from "collections/collections"; + import { Calendar, Events } from "graph/calendars"; + import { Conversations, Senders } from "graph/conversations"; + import { Event as IEvent } from "@microsoft/microsoft-graph-types"; + import { Plans } from "graph/plans"; + import { Photo } from "graph/photos"; + export enum GroupType { + /** + * Office 365 (aka unified group) + */ + Office365 = 0, + /** + * Dynamic membership + */ + Dynamic = 1, + /** + * Security + */ + Security = 2, + } + /** + * Describes a collection of Field objects + * + */ + export class Groups extends GraphQueryableCollection { + constructor(baseUrl: string | GraphQueryable, path?: string); + /** + * Gets a group from the collection using the specified id + * + * @param id Id of the group to get from this collection + */ + getById(id: string): Group; + /** + * Create a new group as specified in the request body. + * + * @param name Name to display in the address book for the group + * @param mailNickname Mail alias for the group + * @param groupType Type of group being created + * @param additionalProperties A plain object collection of additional properties you want to set on the new group + */ + add(name: string, mailNickname: string, groupType: GroupType, additionalProperties?: TypedHash): Promise; + } + /** + * Represents a group entity + */ + export class Group extends GraphQueryableInstance { + /** + * The calendar associated with this group + */ + readonly caldendar: Calendar; + /** + * Retrieve a list of event objects + */ + readonly events: Events; + /** + * Gets the collection of owners for this group + */ + readonly owners: Owners; + /** + * The collection of plans for this group + */ + readonly plans: Plans; + /** + * Gets the collection of members for this group + */ + readonly members: Members; + /** + * Gets the conversations collection for this group + */ + readonly conversations: Conversations; + /** + * Gets the collection of accepted senders for this group + */ + readonly acceptedSenders: Senders; + /** + * Gets the collection of rejected senders for this group + */ + readonly rejectedSenders: Senders; + /** + * The photo associated with the group + */ + readonly photo: Photo; + /** + * Add the group to the list of the current user's favorite groups. Supported for only Office 365 groups + */ + addFavorite(): Promise; + /** + * Return all the groups that the specified group is a member of. The check is transitive + * + * @param securityEnabledOnly + */ + getMemberGroups(securityEnabledOnly?: boolean): Promise<{ + value: string[]; + }>; + /** + * Deletes this group + */ + delete(): Promise; + /** + * Update the properties of a group object + * + * @param properties Set of properties of this group to update + */ + update(properties: TypedHash): Promise; + /** + * Remove the group from the list of the current user's favorite groups. Supported for only Office 365 groups + */ + removeFavorite(): Promise; + /** + * Reset the unseenCount of all the posts that the current user has not seen since their last visit + */ + resetUnseenCount(): Promise; + /** + * Calling this method will enable the current user to receive email notifications for this group, + * about new posts, events, and files in that group. Supported for only Office 365 groups + */ + subscribeByMail(): Promise; + /** + * Calling this method will prevent the current user from receiving email notifications for this group + * about new posts, events, and files in that group. Supported for only Office 365 groups + */ + unsubscribeByMail(): Promise; + /** + * Get the occurrences, exceptions, and single instances of events in a calendar view defined by a time range, from the default calendar of a group + * + * @param start Start date and time of the time range + * @param end End date and time of the time range + */ + getCalendarView(start: Date, end: Date): Promise; + } + export interface GroupAddResult { + group: Group; + data: any; + } +} +declare module "graph/v1" { + import { GraphQueryable } from "graph/graphqueryable"; + import { Groups } from "graph/groups"; + /** + * Root object wrapping v1 functionality for MS Graph + * + */ + export class V1 extends GraphQueryable { + /** + * Creates a new instance of the V1 class + * + * @param baseUrl The url or Queryable which forms the parent of this fields collection + * @param path Optional additional path + */ + constructor(baseUrl: string | GraphQueryable, path?: string); + readonly groups: Groups; + } +} +declare module "graph/rest" { + import { V1 } from "graph/v1"; + export class GraphRest { + readonly v1: V1; + } +} +declare module "pnp" { + import { Util } from "utils/util"; + import { PnPClientStorage } from "utils/storage"; + import { Settings } from "configuration/configuration"; + import { Logger } from "utils/logging"; + import { SPRest } from "sharepoint/rest"; + import { LibraryConfiguration } from "configuration/pnplibconfig"; + import { GraphRest } from "graph/rest"; + /** + * Root class of the Patterns and Practices namespace, provides an entry point to the library + */ + /** + * Utility methods + */ + export const util: typeof Util; + /** + * Provides access to the SharePoint REST interface + */ + export const sp: SPRest; + /** + * Provides access to the Microsoft Graph REST interface + */ + export const graph: GraphRest; + /** + * Provides access to local and session storage + */ + export const storage: PnPClientStorage; + /** + * Global configuration instance to which providers can be added + */ + export const config: Settings; + /** + * Global logging instance to which subscribers can be registered and messages written + */ + export const log: typeof Logger; + /** + * Allows for the configuration of the library + */ + export const setup: (config: LibraryConfiguration) => void; + const Def: { + config: Settings; + graph: GraphRest; + log: typeof Logger; + setup: (config: LibraryConfiguration) => void; + sp: SPRest; + storage: PnPClientStorage; + util: typeof Util; + }; + export default Def; +} +declare module "graph/index" { + export { GroupAddResult } from "graph/groups"; + export { GraphQueryable, GraphQueryableCollection, GraphQueryableInstance, GraphQueryableConstructor, GraphQueryableSearchableCollection } from "graph/graphqueryable"; +} +declare module "graph/me" { + import { GraphQueryable, GraphQueryableInstance } from "graph/graphqueryable"; + export class Me extends GraphQueryableInstance { + constructor(baseUrl: string | GraphQueryable, path?: string); + } +} +declare module "net/nodefetchclient" { + import { HttpClientImpl } from "net/httpclient"; + export interface AuthToken { + token_type: string; + expires_in: string; + not_before: string; + expires_on: string; + resource: string; + access_token: string; + } + /** + * Fetch client for use within nodejs, requires you register a client id and secret with app only permissions + */ + export class NodeFetchClient implements HttpClientImpl { + siteUrl: string; + private _clientId; + private _clientSecret; + private _realm; + private static SharePointServicePrincipal; + private token; + constructor(siteUrl: string, _clientId: string, _clientSecret: string, _realm?: string); + fetch(url: string, options: any): Promise; + /** + * Gets an add-in only authentication token based on the supplied site url, client id and secret + */ + getAddInOnlyAccessToken(): Promise; + private getRealm(); + private getAuthUrl(realm); + private getFormattedPrincipal(principalName, hostName, realm); + private toDate(epoch); + } +} +declare module "net/nodefetchclientbrowser" { + import { HttpClientImpl } from "net/httpclient"; + /** + * This module is substituted for the NodeFetchClient.ts during the packaging process. This helps to reduce the pnp.js file size by + * not including all of the node dependencies + */ + export class NodeFetchClient implements HttpClientImpl { + /** + * Always throws an error that NodeFetchClient is not supported for use in the browser + */ + fetch(): Promise; + } +} +declare module "net/sprequestexecutorclient" { + import { HttpClientImpl } from "net/httpclient"; + /** + * Makes requests using the SP.RequestExecutor library. + */ + export class SPRequestExecutorClient implements HttpClientImpl { + /** + * Fetches a URL using the SP.RequestExecutor library. + */ + fetch(url: string, options: any): Promise; + /** + * Converts a SharePoint REST API response to a fetch API response. + */ + private convertToResponse; + } +} +declare module "sharepoint/index" { + export { AttachmentFileAddResult, AttachmentFileInfo } from "sharepoint/attachmentfiles"; + export { FieldAddResult, FieldUpdateResult } from "sharepoint/fields"; + export { CheckinType, FileAddResult, WebPartsPersonalizationScope, MoveOperations, TemplateFileType, ChunkedFileUploadProgressData, File, Files } from "sharepoint/files"; + export { FeatureAddResult } from "sharepoint/features"; + export { FolderAddResult, Folder, Folders } from "sharepoint/folders"; + export { Item, Items, ItemAddResult, ItemUpdateResult, ItemUpdateResultData, PagedItemCollection } from "sharepoint/items"; + export { NavigationNodeAddResult, NavigationNodeUpdateResult, NavigationNodes, NavigationNode } from "sharepoint/navigation"; + export { List, Lists, ListAddResult, ListUpdateResult, ListEnsureResult } from "sharepoint/lists"; + export { spExtractODataId, spODataEntity, spODataEntityArray } from "sharepoint/odata"; + export { SharePointQueryable, SharePointQueryableInstance, SharePointQueryableCollection, SharePointQueryableConstructor } from "sharepoint/sharepointqueryable"; + export { RelatedItem, RelatedItemManger } from "sharepoint/relateditems"; + export { RoleDefinitionUpdateResult, RoleDefinitionAddResult, RoleDefinitionBindings } from "sharepoint/roles"; + export { Search, SearchProperty, SearchPropertyValue, SearchQuery, SearchQueryBuilder, SearchResult, SearchResults, Sort, SortDirection, ReorderingRule, ReorderingRuleMatchType, QueryPropertyValueType, SearchBuiltInSourceId, SearchResponse, ResultTableCollection, ResultTable } from "sharepoint/search"; + export { SearchSuggest, SearchSuggestQuery, SearchSuggestResult, PersonalResultSuggestion } from "sharepoint/searchsuggest"; + export { Site, OpenWebByIdResult } from "sharepoint/site"; + export { SiteGroupAddResult } from "sharepoint/sitegroups"; + export { UserUpdateResult, SiteUserProps } from "sharepoint/siteusers"; + export { SubscriptionAddResult, SubscriptionUpdateResult } from "sharepoint/subscriptions"; + export * from "sharepoint/types"; + export { UserCustomActionAddResult, UserCustomActionUpdateResult } from "sharepoint/usercustomactions"; + export { UtilityMethod, CreateWikiPageResult } from "sharepoint/utilities"; + export { ViewAddResult, ViewUpdateResult } from "sharepoint/views"; + export { WebPartDefinitions, WebPartDefinition, WebPart } from "sharepoint/webparts"; + export { Web, WebAddResult, WebUpdateResult, GetCatalogResult, WebEnsureUserResult } from "sharepoint/webs"; +} +declare module "utils/decorators" { + export function deprecated(deprecationVersion: string, message: string): (target: any, propertyKey: string, descriptor: PropertyDescriptor) => void; +} +declare module "configuration/providers/cachingConfigurationProvider" { + import { IConfigurationProvider } from "configuration/configuration"; + import { TypedHash } from "collections/collections"; + import * as storage from "utils/storage"; + /** + * A caching provider which can wrap other non-caching providers + * + */ + export default class CachingConfigurationProvider implements IConfigurationProvider { + private wrappedProvider; + private store; + private cacheKey; + /** + * Creates a new caching configuration provider + * @constructor + * @param {IConfigurationProvider} wrappedProvider Provider which will be used to fetch the configuration + * @param {string} cacheKey Key that will be used to store cached items to the cache + * @param {IPnPClientStore} cacheStore OPTIONAL storage, which will be used to store cached settings. + */ + constructor(wrappedProvider: IConfigurationProvider, cacheKey: string, cacheStore?: storage.PnPClientStore); + /** + * Gets the wrapped configuration providers + * + * @return {IConfigurationProvider} Wrapped configuration provider + */ + getWrappedProvider(): IConfigurationProvider; + /** + * Loads the configuration values either from the cache or from the wrapped provider + * + * @return {Promise>} Promise of loaded configuration values + */ + getConfiguration(): Promise>; + private selectPnPCache(); + } +} +declare module "configuration/providers/spListConfigurationProvider" { + import { IConfigurationProvider } from "configuration/configuration"; + import { TypedHash } from "collections/collections"; + import { default as CachingConfigurationProvider } from "configuration/providers/cachingConfigurationProvider"; + import { Web } from "sharepoint/webs"; + /** + * A configuration provider which loads configuration values from a SharePoint list + * + */ + export default class SPListConfigurationProvider implements IConfigurationProvider { + private sourceWeb; + private sourceListTitle; + /** + * Creates a new SharePoint list based configuration provider + * @constructor + * @param {string} webUrl Url of the SharePoint site, where the configuration list is located + * @param {string} listTitle Title of the SharePoint list, which contains the configuration settings (optional, default = "config") + */ + constructor(sourceWeb: Web, sourceListTitle?: string); + /** + * Gets the url of the SharePoint site, where the configuration list is located + * + * @return {string} Url address of the site + */ + readonly web: Web; + /** + * Gets the title of the SharePoint list, which contains the configuration settings + * + * @return {string} List title + */ + readonly listTitle: string; + /** + * Loads the configuration values from the SharePoint list + * + * @return {Promise>} Promise of loaded configuration values + */ + getConfiguration(): Promise>; + /** + * Wraps the current provider in a cache enabled provider + * + * @return {CachingConfigurationProvider} Caching providers which wraps the current provider + */ + asCaching(): CachingConfigurationProvider; + } +} +declare module "configuration/providers/index" { + export { default as CachingConfigurationProvider } from "configuration/providers/cachingConfigurationProvider"; + export { default as SPListConfigurationProvider } from "configuration/providers/spListConfigurationProvider"; +} diff --git a/dist/pnp.js b/dist/pnp.js new file mode 100644 index 00000000..d3308d47 --- /dev/null +++ b/dist/pnp.js @@ -0,0 +1,11254 @@ +/** + * sp-pnp-js v3.0.0 - A JavaScript library for SharePoint development. + * MIT (https://github.com/SharePoint/PnP-JS-Core/blob/master/LICENSE) + * Copyright (c) 2017 Microsoft + * docs: http://officedev.github.io/PnP-JS-Core + * source: https://github.com/SharePoint/PnP-JS-Core + * bugs: https://github.com/SharePoint/PnP-JS-Core/issues + */ +(function webpackUniversalModuleDefinition(root, factory) { + if(typeof exports === 'object' && typeof module === 'object') + module.exports = factory(); + else if(typeof define === 'function' && define.amd) + define([], factory); + else if(typeof exports === 'object') + exports["$pnp"] = factory(); + else + root["$pnp"] = factory(); +})(this, function() { +return /******/ (function(modules) { // webpackBootstrap +/******/ // The module cache +/******/ var installedModules = {}; +/******/ +/******/ // The require function +/******/ function __webpack_require__(moduleId) { +/******/ +/******/ // Check if module is in cache +/******/ if(installedModules[moduleId]) { +/******/ return installedModules[moduleId].exports; +/******/ } +/******/ // Create a new module (and put it into the cache) +/******/ var module = installedModules[moduleId] = { +/******/ i: moduleId, +/******/ l: false, +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); +/******/ +/******/ // Flag the module as loaded +/******/ module.l = true; +/******/ +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } +/******/ +/******/ +/******/ // expose the modules object (__webpack_modules__) +/******/ __webpack_require__.m = modules; +/******/ +/******/ // expose the module cache +/******/ __webpack_require__.c = installedModules; +/******/ +/******/ // define getter function for harmony exports +/******/ __webpack_require__.d = function(exports, name, getter) { +/******/ if(!__webpack_require__.o(exports, name)) { +/******/ Object.defineProperty(exports, name, { +/******/ configurable: false, +/******/ enumerable: true, +/******/ get: getter +/******/ }); +/******/ } +/******/ }; +/******/ +/******/ // getDefaultExport function for compatibility with non-harmony modules +/******/ __webpack_require__.n = function(module) { +/******/ var getter = module && module.__esModule ? +/******/ function getDefault() { return module['default']; } : +/******/ function getModuleExports() { return module; }; +/******/ __webpack_require__.d(getter, 'a', getter); +/******/ return getter; +/******/ }; +/******/ +/******/ // Object.prototype.hasOwnProperty.call +/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; +/******/ +/******/ // __webpack_public_path__ +/******/ __webpack_require__.p = "/assets/"; +/******/ +/******/ // Load entry module and return exports +/******/ return __webpack_require__(__webpack_require__.s = 32); +/******/ }) +/************************************************************************/ +/******/ ([ +/* 0 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(global) { +Object.defineProperty(exports, "__esModule", { value: true }); +var pnplibconfig_1 = __webpack_require__(2); +function extractWebUrl(candidateUrl) { + if (candidateUrl === null) { + return ""; + } + var index = candidateUrl.indexOf("_api/"); + if (index > -1) { + return candidateUrl.substr(0, index); + } + // if all else fails just give them what they gave us back + return candidateUrl; +} +exports.extractWebUrl = extractWebUrl; +var Util = /** @class */ (function () { + function Util() { + } + /** + * Gets a callback function which will maintain context across async calls. + * Allows for the calling pattern getCtxCallback(thisobj, method, methodarg1, methodarg2, ...) + * + * @param context The object that will be the 'this' value in the callback + * @param method The method to which we will apply the context and parameters + * @param params Optional, additional arguments to supply to the wrapped method when it is invoked + */ + Util.getCtxCallback = function (context, method) { + var params = []; + for (var _i = 2; _i < arguments.length; _i++) { + params[_i - 2] = arguments[_i]; + } + return function () { + method.apply(context, params); + }; + }; + /** + * Tests if a url param exists + * + * @param name The name of the url paramter to check + */ + Util.urlParamExists = function (name) { + name = name.replace(/[\[]/, "\\[").replace(/[\]]/, "\\]"); + var regex = new RegExp("[\\?&]" + name + "=([^&#]*)"); + return regex.test(location.search); + }; + /** + * Gets a url param value by name + * + * @param name The name of the paramter for which we want the value + */ + Util.getUrlParamByName = function (name) { + name = name.replace(/[\[]/, "\\[").replace(/[\]]/, "\\]"); + var regex = new RegExp("[\\?&]" + name + "=([^&#]*)"); + var results = regex.exec(location.search); + return results == null ? "" : decodeURIComponent(results[1].replace(/\+/g, " ")); + }; + /** + * Gets a url param by name and attempts to parse a bool value + * + * @param name The name of the paramter for which we want the boolean value + */ + Util.getUrlParamBoolByName = function (name) { + var p = this.getUrlParamByName(name); + var isFalse = (p === "" || /false|0/i.test(p)); + return !isFalse; + }; + /** + * Inserts the string s into the string target as the index specified by index + * + * @param target The string into which we will insert s + * @param index The location in target to insert s (zero based) + * @param s The string to insert into target at position index + */ + Util.stringInsert = function (target, index, s) { + if (index > 0) { + return target.substring(0, index) + s + target.substring(index, target.length); + } + return s + target; + }; + /** + * Adds a value to a date + * + * @param date The date to which we will add units, done in local time + * @param interval The name of the interval to add, one of: ['year', 'quarter', 'month', 'week', 'day', 'hour', 'minute', 'second'] + * @param units The amount to add to date of the given interval + * + * http://stackoverflow.com/questions/1197928/how-to-add-30-minutes-to-a-javascript-date-object + */ + Util.dateAdd = function (date, interval, units) { + var ret = new Date(date); // don't change original date + switch (interval.toLowerCase()) { + case "year": + ret.setFullYear(ret.getFullYear() + units); + break; + case "quarter": + ret.setMonth(ret.getMonth() + 3 * units); + break; + case "month": + ret.setMonth(ret.getMonth() + units); + break; + case "week": + ret.setDate(ret.getDate() + 7 * units); + break; + case "day": + ret.setDate(ret.getDate() + units); + break; + case "hour": + ret.setTime(ret.getTime() + units * 3600000); + break; + case "minute": + ret.setTime(ret.getTime() + units * 60000); + break; + case "second": + ret.setTime(ret.getTime() + units * 1000); + break; + default: + ret = undefined; + break; + } + return ret; + }; + /** + * Loads a stylesheet into the current page + * + * @param path The url to the stylesheet + * @param avoidCache If true a value will be appended as a query string to avoid browser caching issues + */ + Util.loadStylesheet = function (path, avoidCache) { + if (avoidCache) { + path += "?" + encodeURIComponent((new Date()).getTime().toString()); + } + var head = document.getElementsByTagName("head"); + if (head.length > 0) { + var e = document.createElement("link"); + head[0].appendChild(e); + e.setAttribute("type", "text/css"); + e.setAttribute("rel", "stylesheet"); + e.setAttribute("href", path); + } + }; + /** + * Combines an arbitrary set of paths ensuring that the slashes are normalized + * + * @param paths 0 to n path parts to combine + */ + Util.combinePaths = function () { + var paths = []; + for (var _i = 0; _i < arguments.length; _i++) { + paths[_i] = arguments[_i]; + } + return paths + .filter(function (path) { return !Util.stringIsNullOrEmpty(path); }) + .map(function (path) { return path.replace(/^[\\|\/]/, "").replace(/[\\|\/]$/, ""); }) + .join("/") + .replace(/\\/g, "/"); + }; + /** + * Gets a random string of chars length + * + * @param chars The length of the random string to generate + */ + Util.getRandomString = function (chars) { + var text = new Array(chars); + var possible = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"; + for (var i = 0; i < chars; i++) { + text[i] = possible.charAt(Math.floor(Math.random() * possible.length)); + } + return text.join(""); + }; + /** + * Gets a random GUID value + * + * http://stackoverflow.com/questions/105034/create-guid-uuid-in-javascript + */ + /* tslint:disable no-bitwise */ + Util.getGUID = function () { + var d = new Date().getTime(); + var guid = "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function (c) { + var r = (d + Math.random() * 16) % 16 | 0; + d = Math.floor(d / 16); + return (c === "x" ? r : (r & 0x3 | 0x8)).toString(16); + }); + return guid; + }; + /* tslint:enable */ + /** + * Determines if a given value is a function + * + * @param candidateFunction The thing to test for being a function + */ + Util.isFunction = function (candidateFunction) { + return typeof candidateFunction === "function"; + }; + /** + * @returns whether the provided parameter is a JavaScript Array or not. + */ + Util.isArray = function (array) { + if (Array.isArray) { + return Array.isArray(array); + } + return array && typeof array.length === "number" && array.constructor === Array; + }; + /** + * Determines if a string is null or empty or undefined + * + * @param s The string to test + */ + Util.stringIsNullOrEmpty = function (s) { + return typeof s === "undefined" || s === null || s.length < 1; + }; + /** + * Provides functionality to extend the given object by doing a shallow copy + * + * @param target The object to which properties will be copied + * @param source The source object from which properties will be copied + * @param noOverwrite If true existing properties on the target are not overwritten from the source + * + */ + Util.extend = function (target, source, noOverwrite) { + if (noOverwrite === void 0) { noOverwrite = false; } + if (source === null || typeof source === "undefined") { + return target; + } + // ensure we don't overwrite things we don't want overwritten + var check = noOverwrite ? function (o, i) { return !(i in o); } : function () { return true; }; + return Object.getOwnPropertyNames(source) + .filter(function (v) { return check(target, v); }) + .reduce(function (t, v) { + t[v] = source[v]; + return t; + }, target); + }; + /** + * Determines if a given url is absolute + * + * @param url The url to check to see if it is absolute + */ + Util.isUrlAbsolute = function (url) { + return /^https?:\/\/|^\/\//i.test(url); + }; + /** + * Ensures that a given url is absolute for the current web based on context + * + * @param candidateUrl The url to make absolute + * + */ + Util.toAbsoluteUrl = function (candidateUrl) { + return new Promise(function (resolve) { + if (Util.isUrlAbsolute(candidateUrl)) { + // if we are already absolute, then just return the url + return resolve(candidateUrl); + } + if (pnplibconfig_1.RuntimeConfig.spBaseUrl !== null) { + // base url specified either with baseUrl of spfxContext config property + return resolve(Util.combinePaths(pnplibconfig_1.RuntimeConfig.spBaseUrl, candidateUrl)); + } + if (typeof global._spPageContextInfo !== "undefined") { + // operating in classic pages + if (global._spPageContextInfo.hasOwnProperty("webAbsoluteUrl")) { + return resolve(Util.combinePaths(global._spPageContextInfo.webAbsoluteUrl, candidateUrl)); + } + else if (global._spPageContextInfo.hasOwnProperty("webServerRelativeUrl")) { + return resolve(Util.combinePaths(global._spPageContextInfo.webServerRelativeUrl, candidateUrl)); + } + } + // does window.location exist and have a certain path part in it? + if (typeof global.location !== "undefined") { + var baseUrl_1 = global.location.toString().toLowerCase(); + ["/_layouts/", "/siteassets/"].forEach(function (s) { + var index = baseUrl_1.indexOf(s); + if (index > 0) { + return resolve(Util.combinePaths(baseUrl_1.substr(0, index), candidateUrl)); + } + }); + } + return resolve(candidateUrl); + }); + }; + return Util; +}()); +exports.Util = Util; + +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(22))) + +/***/ }), +/* 1 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var __extends = (this && this.__extends) || (function () { + var extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +var util_1 = __webpack_require__(0); +var collections_1 = __webpack_require__(8); +var utils_1 = __webpack_require__(9); +var exceptions_1 = __webpack_require__(4); +var logging_1 = __webpack_require__(3); +var queryable_1 = __webpack_require__(24); +var pipeline_1 = __webpack_require__(14); +var httpclient_1 = __webpack_require__(25); +/** + * SharePointQueryable Base Class + * + */ +var SharePointQueryable = /** @class */ (function (_super) { + __extends(SharePointQueryable, _super); + /** + * Creates a new instance of the SharePointQueryable class + * + * @constructor + * @param baseUrl A string or SharePointQueryable that should form the base part of the url + * + */ + function SharePointQueryable(baseUrl, path) { + var _this = _super.call(this) || this; + _this._options = {}; + _this._query = new collections_1.Dictionary(); + _this._batch = null; + if (typeof baseUrl === "string") { + // we need to do some extra parsing to get the parent url correct if we are + // being created from just a string. + var urlStr = baseUrl; + if (util_1.Util.isUrlAbsolute(urlStr) || urlStr.lastIndexOf("/") < 0) { + _this._parentUrl = urlStr; + _this._url = util_1.Util.combinePaths(urlStr, path); + } + else if (urlStr.lastIndexOf("/") > urlStr.lastIndexOf("(")) { + // .../items(19)/fields + var index = urlStr.lastIndexOf("/"); + _this._parentUrl = urlStr.slice(0, index); + path = util_1.Util.combinePaths(urlStr.slice(index), path); + _this._url = util_1.Util.combinePaths(_this._parentUrl, path); + } + else { + // .../items(19) + var index = urlStr.lastIndexOf("("); + _this._parentUrl = urlStr.slice(0, index); + _this._url = util_1.Util.combinePaths(urlStr, path); + } + } + else { + var q = baseUrl; + _this._parentUrl = q._url; + _this._options = q._options; + var target = q._query.get("@target"); + if (target !== null) { + _this._query.add("@target", target); + } + _this._url = util_1.Util.combinePaths(_this._parentUrl, path); + } + return _this; + } + /** + * Blocks a batch call from occuring, MUST be cleared by calling the returned function + */ + SharePointQueryable.prototype.addBatchDependency = function () { + if (this.hasBatch) { + return this._batch.addDependency(); + } + return function () { return null; }; + }; + Object.defineProperty(SharePointQueryable.prototype, "hasBatch", { + /** + * Indicates if the current query has a batch associated + * + */ + get: function () { + return this._batch !== null; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(SharePointQueryable.prototype, "batch", { + /** + * The batch currently associated with this query or null + * + */ + get: function () { + return this.hasBatch ? this._batch : null; + }, + enumerable: true, + configurable: true + }); + /** + * Creates a new instance of the supplied factory and extends this into that new instance + * + * @param factory constructor for the new SharePointQueryable + */ + SharePointQueryable.prototype.as = function (factory) { + var o = new factory(this._url, null); + return util_1.Util.extend(o, this, true); + }; + /** + * Adds this query to the supplied batch + * + * @example + * ``` + * + * let b = pnp.sp.createBatch(); + * pnp.sp.web.inBatch(b).get().then(...); + * b.execute().then(...) + * ``` + */ + SharePointQueryable.prototype.inBatch = function (batch) { + if (this._batch !== null) { + throw new exceptions_1.AlreadyInBatchException(); + } + this._batch = batch; + return this; + }; + /** + * Gets the full url with query information + * + */ + SharePointQueryable.prototype.toUrlAndQuery = function () { + var aliasedParams = new collections_1.Dictionary(); + var url = this.toUrl().replace(/'!(@.*?)::(.*?)'/ig, function (match, labelName, value) { + logging_1.Logger.write("Rewriting aliased parameter from match " + match + " to label: " + labelName + " value: " + value, logging_1.LogLevel.Verbose); + aliasedParams.add(labelName, "'" + value + "'"); + return labelName; + }); + // inlude our explicitly set query string params + aliasedParams.merge(this._query); + if (aliasedParams.count() > 0) { + url += "?" + aliasedParams.getKeys().map(function (key) { return key + "=" + aliasedParams.get(key); }).join("&"); + } + return url; + }; + /** + * Gets a parent for this instance as specified + * + * @param factory The contructor for the class to create + */ + SharePointQueryable.prototype.getParent = function (factory, baseUrl, path, batch) { + if (baseUrl === void 0) { baseUrl = this.parentUrl; } + var parent = new factory(baseUrl, path); + parent.configure(this._options); + var target = this.query.get("@target"); + if (target !== null) { + parent.query.add("@target", target); + } + if (typeof batch !== "undefined") { + parent = parent.inBatch(batch); + } + return parent; + }; + /** + * Clones this SharePointQueryable into a new SharePointQueryable instance of T + * @param factory Constructor used to create the new instance + * @param additionalPath Any additional path to include in the clone + * @param includeBatch If true this instance's batch will be added to the cloned instance + */ + SharePointQueryable.prototype.clone = function (factory, additionalPath, includeBatch) { + if (includeBatch === void 0) { includeBatch = true; } + var clone = new factory(this, additionalPath); + var target = this.query.get("@target"); + if (target !== null) { + clone.query.add("@target", target); + } + if (includeBatch && this.hasBatch) { + clone = clone.inBatch(this.batch); + } + return clone; + }; + /** + * Converts the current instance to a request context + * + * @param verb The request verb + * @param options The set of supplied request options + * @param parser The supplied ODataParser instance + * @param pipeline Optional request processing pipeline + */ + SharePointQueryable.prototype.toRequestContext = function (verb, options, parser, pipeline) { + var _this = this; + if (options === void 0) { options = {}; } + if (pipeline === void 0) { pipeline = pipeline_1.PipelineMethods.default; } + var dependencyDispose = this.hasBatch ? this.addBatchDependency() : function () { return; }; + return util_1.Util.toAbsoluteUrl(this.toUrlAndQuery()).then(function (url) { + utils_1.mergeOptions(options, _this._options); + // build our request context + var context = { + batch: _this._batch, + batchDependency: dependencyDispose, + cachingOptions: _this._cachingOptions, + clientFactory: function () { return new httpclient_1.HttpClient(); }, + isBatched: _this.hasBatch, + isCached: _this._useCaching, + options: options, + parser: parser, + pipeline: pipeline, + requestAbsoluteUrl: url, + requestId: util_1.Util.getGUID(), + verb: verb, + }; + return context; + }); + }; + return SharePointQueryable; +}(queryable_1.ODataQueryable)); +exports.SharePointQueryable = SharePointQueryable; +/** + * Represents a REST collection which can be filtered, paged, and selected + * + */ +var SharePointQueryableCollection = /** @class */ (function (_super) { + __extends(SharePointQueryableCollection, _super); + function SharePointQueryableCollection() { + return _super !== null && _super.apply(this, arguments) || this; + } + /** + * Filters the returned collection (https://msdn.microsoft.com/en-us/library/office/fp142385.aspx#bk_supported) + * + * @param filter The string representing the filter query + */ + SharePointQueryableCollection.prototype.filter = function (filter) { + this._query.add("$filter", filter); + return this; + }; + /** + * Choose which fields to return + * + * @param selects One or more fields to return + */ + SharePointQueryableCollection.prototype.select = function () { + var selects = []; + for (var _i = 0; _i < arguments.length; _i++) { + selects[_i] = arguments[_i]; + } + if (selects.length > 0) { + this._query.add("$select", selects.join(",")); + } + return this; + }; + /** + * Expands fields such as lookups to get additional data + * + * @param expands The Fields for which to expand the values + */ + SharePointQueryableCollection.prototype.expand = function () { + var expands = []; + for (var _i = 0; _i < arguments.length; _i++) { + expands[_i] = arguments[_i]; + } + if (expands.length > 0) { + this._query.add("$expand", expands.join(",")); + } + return this; + }; + /** + * Orders based on the supplied fields ascending + * + * @param orderby The name of the field to sort on + * @param ascending If false DESC is appended, otherwise ASC (default) + */ + SharePointQueryableCollection.prototype.orderBy = function (orderBy, ascending) { + if (ascending === void 0) { ascending = true; } + var keys = this._query.getKeys(); + var query = []; + var asc = ascending ? " asc" : " desc"; + for (var i = 0; i < keys.length; i++) { + if (keys[i] === "$orderby") { + query.push(this._query.get("$orderby")); + break; + } + } + query.push("" + orderBy + asc); + this._query.add("$orderby", query.join(",")); + return this; + }; + /** + * Skips the specified number of items + * + * @param skip The number of items to skip + */ + SharePointQueryableCollection.prototype.skip = function (skip) { + this._query.add("$skip", skip.toString()); + return this; + }; + /** + * Limits the query to only return the specified number of items + * + * @param top The query row limit + */ + SharePointQueryableCollection.prototype.top = function (top) { + this._query.add("$top", top.toString()); + return this; + }; + return SharePointQueryableCollection; +}(SharePointQueryable)); +exports.SharePointQueryableCollection = SharePointQueryableCollection; +/** + * Represents an instance that can be selected + * + */ +var SharePointQueryableInstance = /** @class */ (function (_super) { + __extends(SharePointQueryableInstance, _super); + function SharePointQueryableInstance() { + return _super !== null && _super.apply(this, arguments) || this; + } + /** + * Choose which fields to return + * + * @param selects One or more fields to return + */ + SharePointQueryableInstance.prototype.select = function () { + var selects = []; + for (var _i = 0; _i < arguments.length; _i++) { + selects[_i] = arguments[_i]; + } + if (selects.length > 0) { + this._query.add("$select", selects.join(",")); + } + return this; + }; + /** + * Expands fields such as lookups to get additional data + * + * @param expands The Fields for which to expand the values + */ + SharePointQueryableInstance.prototype.expand = function () { + var expands = []; + for (var _i = 0; _i < arguments.length; _i++) { + expands[_i] = arguments[_i]; + } + if (expands.length > 0) { + this._query.add("$expand", expands.join(",")); + } + return this; + }; + return SharePointQueryableInstance; +}(SharePointQueryable)); +exports.SharePointQueryableInstance = SharePointQueryableInstance; + + +/***/ }), +/* 2 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +Object.defineProperty(exports, "__esModule", { value: true }); +var fetchclient_1 = __webpack_require__(33); +var RuntimeConfigImpl = /** @class */ (function () { + function RuntimeConfigImpl() { + // these are our default values for the library + this._defaultCachingStore = "session"; + this._defaultCachingTimeoutSeconds = 60; + this._globalCacheDisable = false; + this._enableCacheExpiration = false; + this._cacheExpirationIntervalMilliseconds = 750; + this._spfxContext = null; + // sharepoint settings + this._spFetchClientFactory = function () { return new fetchclient_1.FetchClient(); }; + this._spBaseUrl = null; + this._spHeaders = null; + // ms graph settings + this._graphHeaders = null; + this._graphFetchClientFactory = function () { return null; }; + } + RuntimeConfigImpl.prototype.set = function (config) { + var _this = this; + if (config.hasOwnProperty("globalCacheDisable")) { + this._globalCacheDisable = config.globalCacheDisable; + } + if (config.hasOwnProperty("defaultCachingStore")) { + this._defaultCachingStore = config.defaultCachingStore; + } + if (config.hasOwnProperty("defaultCachingTimeoutSeconds")) { + this._defaultCachingTimeoutSeconds = config.defaultCachingTimeoutSeconds; + } + if (config.hasOwnProperty("sp")) { + if (config.sp.hasOwnProperty("fetchClientFactory")) { + this._spFetchClientFactory = config.sp.fetchClientFactory; + } + if (config.sp.hasOwnProperty("baseUrl")) { + this._spBaseUrl = config.sp.baseUrl; + } + if (config.sp.hasOwnProperty("headers")) { + this._spHeaders = config.sp.headers; + } + } + if (config.hasOwnProperty("spfxContext")) { + this._spfxContext = config.spfxContext; + if (typeof this._spfxContext.graphHttpClient !== "undefined") { + this._graphFetchClientFactory = function () { return _this._spfxContext.graphHttpClient; }; + } + } + if (config.hasOwnProperty("graph")) { + if (config.graph.hasOwnProperty("headers")) { + this._graphHeaders = config.graph.headers; + } + // this comes after the default setting of the _graphFetchClientFactory client so it can be overwritten + if (config.graph.hasOwnProperty("fetchClientFactory")) { + this._graphFetchClientFactory = config.graph.fetchClientFactory; + } + } + if (config.hasOwnProperty("enableCacheExpiration")) { + this._enableCacheExpiration = config.enableCacheExpiration; + } + if (config.hasOwnProperty("cacheExpirationIntervalMilliseconds")) { + // we don't let the interval be less than 300 milliseconds + var interval = config.cacheExpirationIntervalMilliseconds < 300 ? 300 : config.cacheExpirationIntervalMilliseconds; + this._cacheExpirationIntervalMilliseconds = interval; + } + }; + Object.defineProperty(RuntimeConfigImpl.prototype, "defaultCachingStore", { + get: function () { + return this._defaultCachingStore; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RuntimeConfigImpl.prototype, "defaultCachingTimeoutSeconds", { + get: function () { + return this._defaultCachingTimeoutSeconds; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RuntimeConfigImpl.prototype, "globalCacheDisable", { + get: function () { + return this._globalCacheDisable; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RuntimeConfigImpl.prototype, "spFetchClientFactory", { + get: function () { + return this._spFetchClientFactory; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RuntimeConfigImpl.prototype, "spBaseUrl", { + get: function () { + if (this._spBaseUrl !== null) { + return this._spBaseUrl; + } + else if (this._spfxContext !== null) { + return this._spfxContext.pageContext.web.absoluteUrl; + } + return null; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RuntimeConfigImpl.prototype, "spHeaders", { + get: function () { + return this._spHeaders; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RuntimeConfigImpl.prototype, "enableCacheExpiration", { + get: function () { + return this._enableCacheExpiration; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RuntimeConfigImpl.prototype, "cacheExpirationIntervalMilliseconds", { + get: function () { + return this._cacheExpirationIntervalMilliseconds; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RuntimeConfigImpl.prototype, "spfxContext", { + get: function () { + return this._spfxContext; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RuntimeConfigImpl.prototype, "graphFetchClientFactory", { + get: function () { + return this._graphFetchClientFactory; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RuntimeConfigImpl.prototype, "graphHeaders", { + get: function () { + return this._graphHeaders; + }, + enumerable: true, + configurable: true + }); + return RuntimeConfigImpl; +}()); +exports.RuntimeConfigImpl = RuntimeConfigImpl; +var _runtimeConfig = new RuntimeConfigImpl(); +exports.RuntimeConfig = _runtimeConfig; +function setRuntimeConfig(config) { + _runtimeConfig.set(config); +} +exports.setRuntimeConfig = setRuntimeConfig; + + +/***/ }), +/* 3 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +Object.defineProperty(exports, "__esModule", { value: true }); +/** + * A set of logging levels + * + */ +var LogLevel; +(function (LogLevel) { + LogLevel[LogLevel["Verbose"] = 0] = "Verbose"; + LogLevel[LogLevel["Info"] = 1] = "Info"; + LogLevel[LogLevel["Warning"] = 2] = "Warning"; + LogLevel[LogLevel["Error"] = 3] = "Error"; + LogLevel[LogLevel["Off"] = 99] = "Off"; +})(LogLevel = exports.LogLevel || (exports.LogLevel = {})); +/** + * Class used to subscribe ILogListener and log messages throughout an application + * + */ +var Logger = /** @class */ (function () { + function Logger() { + } + Object.defineProperty(Logger, "activeLogLevel", { + get: function () { + return Logger.instance.activeLogLevel; + }, + set: function (value) { + Logger.instance.activeLogLevel = value; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Logger, "instance", { + get: function () { + if (typeof Logger._instance === "undefined" || Logger._instance === null) { + Logger._instance = new LoggerImpl(); + } + return Logger._instance; + }, + enumerable: true, + configurable: true + }); + /** + * Adds ILogListener instances to the set of subscribed listeners + * + * @param listeners One or more listeners to subscribe to this log + */ + Logger.subscribe = function () { + var listeners = []; + for (var _i = 0; _i < arguments.length; _i++) { + listeners[_i] = arguments[_i]; + } + listeners.map(function (listener) { return Logger.instance.subscribe(listener); }); + }; + /** + * Clears the subscribers collection, returning the collection before modifiction + */ + Logger.clearSubscribers = function () { + return Logger.instance.clearSubscribers(); + }; + Object.defineProperty(Logger, "count", { + /** + * Gets the current subscriber count + */ + get: function () { + return Logger.instance.count; + }, + enumerable: true, + configurable: true + }); + /** + * Writes the supplied string to the subscribed listeners + * + * @param message The message to write + * @param level [Optional] if supplied will be used as the level of the entry (Default: LogLevel.Verbose) + */ + Logger.write = function (message, level) { + if (level === void 0) { level = LogLevel.Verbose; } + Logger.instance.log({ level: level, message: message }); + }; + /** + * Writes the supplied string to the subscribed listeners + * + * @param json The json object to stringify and write + * @param level [Optional] if supplied will be used as the level of the entry (Default: LogLevel.Verbose) + */ + Logger.writeJSON = function (json, level) { + if (level === void 0) { level = LogLevel.Verbose; } + Logger.instance.log({ level: level, message: JSON.stringify(json) }); + }; + /** + * Logs the supplied entry to the subscribed listeners + * + * @param entry The message to log + */ + Logger.log = function (entry) { + Logger.instance.log(entry); + }; + /** + * Logs performance tracking data for the the execution duration of the supplied function using console.profile + * + * @param name The name of this profile boundary + * @param f The function to execute and track within this performance boundary + */ + Logger.measure = function (name, f) { + return Logger.instance.measure(name, f); + }; + return Logger; +}()); +exports.Logger = Logger; +var LoggerImpl = /** @class */ (function () { + function LoggerImpl(activeLogLevel, subscribers) { + if (activeLogLevel === void 0) { activeLogLevel = LogLevel.Warning; } + if (subscribers === void 0) { subscribers = []; } + this.activeLogLevel = activeLogLevel; + this.subscribers = subscribers; + } + LoggerImpl.prototype.subscribe = function (listener) { + this.subscribers.push(listener); + }; + LoggerImpl.prototype.clearSubscribers = function () { + var s = this.subscribers.slice(0); + this.subscribers.length = 0; + return s; + }; + Object.defineProperty(LoggerImpl.prototype, "count", { + get: function () { + return this.subscribers.length; + }, + enumerable: true, + configurable: true + }); + LoggerImpl.prototype.write = function (message, level) { + if (level === void 0) { level = LogLevel.Verbose; } + this.log({ level: level, message: message }); + }; + LoggerImpl.prototype.log = function (entry) { + if (typeof entry === "undefined" || entry.level < this.activeLogLevel) { + return; + } + this.subscribers.map(function (subscriber) { return subscriber.log(entry); }); + }; + LoggerImpl.prototype.measure = function (name, f) { + console.profile(name); + try { + return f(); + } + finally { + console.profileEnd(); + } + }; + return LoggerImpl; +}()); +/** + * Implementation of ILogListener which logs to the browser console + * + */ +var ConsoleListener = /** @class */ (function () { + function ConsoleListener() { + } + /** + * Any associated data that a given logging listener may choose to log or ignore + * + * @param entry The information to be logged + */ + ConsoleListener.prototype.log = function (entry) { + var msg = this.format(entry); + switch (entry.level) { + case LogLevel.Verbose: + case LogLevel.Info: + console.log(msg); + break; + case LogLevel.Warning: + console.warn(msg); + break; + case LogLevel.Error: + console.error(msg); + break; + } + }; + /** + * Formats the message + * + * @param entry The information to format into a string + */ + ConsoleListener.prototype.format = function (entry) { + var msg = []; + msg.push("Message: " + entry.message); + if (typeof entry.data !== "undefined") { + msg.push(" Data: " + JSON.stringify(entry.data)); + } + return msg.join(""); + }; + return ConsoleListener; +}()); +exports.ConsoleListener = ConsoleListener; +/** + * Implementation of ILogListener which logs to the supplied function + * + */ +var FunctionListener = /** @class */ (function () { + /** + * Creates a new instance of the FunctionListener class + * + * @constructor + * @param method The method to which any logging data will be passed + */ + function FunctionListener(method) { + this.method = method; + } + /** + * Any associated data that a given logging listener may choose to log or ignore + * + * @param entry The information to be logged + */ + FunctionListener.prototype.log = function (entry) { + this.method(entry); + }; + return FunctionListener; +}()); +exports.FunctionListener = FunctionListener; + + +/***/ }), +/* 4 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var __extends = (this && this.__extends) || (function () { + var extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +var logging_1 = __webpack_require__(3); +function defaultLog(error) { + logging_1.Logger.log({ data: {}, level: logging_1.LogLevel.Error, message: "[" + error.name + "]::" + error.message }); +} +/** + * Represents an exception with an HttpClient request + * + */ +var ProcessHttpClientResponseException = /** @class */ (function (_super) { + __extends(ProcessHttpClientResponseException, _super); + function ProcessHttpClientResponseException(status, statusText, data) { + var _this = _super.call(this, "Error making HttpClient request in queryable: [" + status + "] " + statusText) || this; + _this.status = status; + _this.statusText = statusText; + _this.data = data; + _this.name = "ProcessHttpClientResponseException"; + logging_1.Logger.log({ data: _this.data, level: logging_1.LogLevel.Error, message: _this.message }); + return _this; + } + return ProcessHttpClientResponseException; +}(Error)); +exports.ProcessHttpClientResponseException = ProcessHttpClientResponseException; +var NoCacheAvailableException = /** @class */ (function (_super) { + __extends(NoCacheAvailableException, _super); + function NoCacheAvailableException(msg) { + if (msg === void 0) { msg = "Cannot create a caching configuration provider since cache is not available."; } + var _this = _super.call(this, msg) || this; + _this.name = "NoCacheAvailableException"; + defaultLog(_this); + return _this; + } + return NoCacheAvailableException; +}(Error)); +exports.NoCacheAvailableException = NoCacheAvailableException; +var APIUrlException = /** @class */ (function (_super) { + __extends(APIUrlException, _super); + function APIUrlException(msg) { + if (msg === void 0) { msg = "Unable to determine API url."; } + var _this = _super.call(this, msg) || this; + _this.name = "APIUrlException"; + defaultLog(_this); + return _this; + } + return APIUrlException; +}(Error)); +exports.APIUrlException = APIUrlException; +var AuthUrlException = /** @class */ (function (_super) { + __extends(AuthUrlException, _super); + function AuthUrlException(data, msg) { + if (msg === void 0) { msg = "Auth URL Endpoint could not be determined from data. Data logged."; } + var _this = _super.call(this, msg) || this; + _this.name = "APIUrlException"; + logging_1.Logger.log({ data: data, level: logging_1.LogLevel.Error, message: _this.message }); + return _this; + } + return AuthUrlException; +}(Error)); +exports.AuthUrlException = AuthUrlException; +var NodeFetchClientUnsupportedException = /** @class */ (function (_super) { + __extends(NodeFetchClientUnsupportedException, _super); + function NodeFetchClientUnsupportedException(msg) { + if (msg === void 0) { msg = "Using NodeFetchClient in the browser is not supported."; } + var _this = _super.call(this, msg) || this; + _this.name = "NodeFetchClientUnsupportedException"; + defaultLog(_this); + return _this; + } + return NodeFetchClientUnsupportedException; +}(Error)); +exports.NodeFetchClientUnsupportedException = NodeFetchClientUnsupportedException; +var SPRequestExecutorUndefinedException = /** @class */ (function (_super) { + __extends(SPRequestExecutorUndefinedException, _super); + function SPRequestExecutorUndefinedException() { + var _this = this; + var msg = [ + "SP.RequestExecutor is undefined. ", + "Load the SP.RequestExecutor.js library (/_layouts/15/SP.RequestExecutor.js) before loading the PnP JS Core library.", + ].join(" "); + _this = _super.call(this, msg) || this; + _this.name = "SPRequestExecutorUndefinedException"; + defaultLog(_this); + return _this; + } + return SPRequestExecutorUndefinedException; +}(Error)); +exports.SPRequestExecutorUndefinedException = SPRequestExecutorUndefinedException; +var MaxCommentLengthException = /** @class */ (function (_super) { + __extends(MaxCommentLengthException, _super); + function MaxCommentLengthException(msg) { + if (msg === void 0) { msg = "The maximum comment length is 1023 characters."; } + var _this = _super.call(this, msg) || this; + _this.name = "MaxCommentLengthException"; + defaultLog(_this); + return _this; + } + return MaxCommentLengthException; +}(Error)); +exports.MaxCommentLengthException = MaxCommentLengthException; +var NotSupportedInBatchException = /** @class */ (function (_super) { + __extends(NotSupportedInBatchException, _super); + function NotSupportedInBatchException(operation) { + if (operation === void 0) { operation = "This operation"; } + var _this = _super.call(this, operation + " is not supported as part of a batch.") || this; + _this.name = "NotSupportedInBatchException"; + defaultLog(_this); + return _this; + } + return NotSupportedInBatchException; +}(Error)); +exports.NotSupportedInBatchException = NotSupportedInBatchException; +var ODataIdException = /** @class */ (function (_super) { + __extends(ODataIdException, _super); + function ODataIdException(data, msg) { + if (msg === void 0) { msg = "Could not extract odata id in object, you may be using nometadata. Object data logged to logger."; } + var _this = _super.call(this, msg) || this; + _this.name = "ODataIdException"; + logging_1.Logger.log({ data: data, level: logging_1.LogLevel.Error, message: _this.message }); + return _this; + } + return ODataIdException; +}(Error)); +exports.ODataIdException = ODataIdException; +var BatchParseException = /** @class */ (function (_super) { + __extends(BatchParseException, _super); + function BatchParseException(msg) { + var _this = _super.call(this, msg) || this; + _this.name = "BatchParseException"; + defaultLog(_this); + return _this; + } + return BatchParseException; +}(Error)); +exports.BatchParseException = BatchParseException; +var AlreadyInBatchException = /** @class */ (function (_super) { + __extends(AlreadyInBatchException, _super); + function AlreadyInBatchException(msg) { + if (msg === void 0) { msg = "This query is already part of a batch."; } + var _this = _super.call(this, msg) || this; + _this.name = "AlreadyInBatchException"; + defaultLog(_this); + return _this; + } + return AlreadyInBatchException; +}(Error)); +exports.AlreadyInBatchException = AlreadyInBatchException; +var FunctionExpectedException = /** @class */ (function (_super) { + __extends(FunctionExpectedException, _super); + function FunctionExpectedException(msg) { + if (msg === void 0) { msg = "This query is already part of a batch."; } + var _this = _super.call(this, msg) || this; + _this.name = "FunctionExpectedException"; + defaultLog(_this); + return _this; + } + return FunctionExpectedException; +}(Error)); +exports.FunctionExpectedException = FunctionExpectedException; +var UrlException = /** @class */ (function (_super) { + __extends(UrlException, _super); + function UrlException(msg) { + var _this = _super.call(this, msg) || this; + _this.name = "UrlException"; + defaultLog(_this); + return _this; + } + return UrlException; +}(Error)); +exports.UrlException = UrlException; + + +/***/ }), +/* 5 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var __extends = (this && this.__extends) || (function () { + var extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +var util_1 = __webpack_require__(0); +var collections_1 = __webpack_require__(8); +var graphclient_1 = __webpack_require__(53); +var queryable_1 = __webpack_require__(24); +var pipeline_1 = __webpack_require__(14); +/** + * Queryable Base Class + * + */ +var GraphQueryable = /** @class */ (function (_super) { + __extends(GraphQueryable, _super); + /** + * Creates a new instance of the Queryable class + * + * @constructor + * @param baseUrl A string or Queryable that should form the base part of the url + * + */ + function GraphQueryable(baseUrl, path) { + var _this = _super.call(this) || this; + _this._query = new collections_1.Dictionary(); + if (typeof baseUrl === "string") { + var urlStr = baseUrl; + _this._parentUrl = urlStr; + _this._url = util_1.Util.combinePaths(urlStr, path); + } + else { + var q = baseUrl; + _this._parentUrl = q._url; + _this._url = util_1.Util.combinePaths(_this._parentUrl, path); + } + return _this; + } + /** + * Creates a new instance of the supplied factory and extends this into that new instance + * + * @param factory constructor for the new queryable + */ + GraphQueryable.prototype.as = function (factory) { + var o = new factory(this._url, null); + return util_1.Util.extend(o, this, true); + }; + /** + * Gets the full url with query information + * + */ + GraphQueryable.prototype.toUrlAndQuery = function () { + var _this = this; + return this.toUrl() + ("?" + this._query.getKeys().map(function (key) { return key + "=" + _this._query.get(key); }).join("&")); + }; + /** + * Gets a parent for this instance as specified + * + * @param factory The contructor for the class to create + */ + GraphQueryable.prototype.getParent = function (factory, baseUrl, path) { + if (baseUrl === void 0) { baseUrl = this.parentUrl; } + return new factory(baseUrl, path); + }; + /** + * Clones this queryable into a new queryable instance of T + * @param factory Constructor used to create the new instance + * @param additionalPath Any additional path to include in the clone + * @param includeBatch If true this instance's batch will be added to the cloned instance + */ + GraphQueryable.prototype.clone = function (factory, additionalPath, includeBatch) { + if (includeBatch === void 0) { includeBatch = true; } + // TODO:: include batching info in clone + if (includeBatch) { + return new factory(this, additionalPath); + } + return new factory(this, additionalPath); + }; + /** + * Converts the current instance to a request context + * + * @param verb The request verb + * @param options The set of supplied request options + * @param parser The supplied ODataParser instance + * @param pipeline Optional request processing pipeline + */ + GraphQueryable.prototype.toRequestContext = function (verb, options, parser, pipeline) { + if (options === void 0) { options = {}; } + if (pipeline === void 0) { pipeline = pipeline_1.PipelineMethods.default; } + // TODO:: add batch support + return Promise.resolve({ + batch: null, + batchDependency: function () { return void (0); }, + cachingOptions: this._cachingOptions, + clientFactory: function () { return new graphclient_1.GraphHttpClient(); }, + isBatched: false, + isCached: this._useCaching, + options: options, + parser: parser, + pipeline: pipeline, + requestAbsoluteUrl: this.toUrlAndQuery(), + requestId: util_1.Util.getGUID(), + verb: verb, + }); + }; + return GraphQueryable; +}(queryable_1.ODataQueryable)); +exports.GraphQueryable = GraphQueryable; +/** + * Represents a REST collection which can be filtered, paged, and selected + * + */ +var GraphQueryableCollection = /** @class */ (function (_super) { + __extends(GraphQueryableCollection, _super); + function GraphQueryableCollection() { + return _super !== null && _super.apply(this, arguments) || this; + } + /** + * + * @param filter The string representing the filter query + */ + GraphQueryableCollection.prototype.filter = function (filter) { + this._query.add("$filter", filter); + return this; + }; + /** + * Choose which fields to return + * + * @param selects One or more fields to return + */ + GraphQueryableCollection.prototype.select = function () { + var selects = []; + for (var _i = 0; _i < arguments.length; _i++) { + selects[_i] = arguments[_i]; + } + if (selects.length > 0) { + this._query.add("$select", selects.join(",")); + } + return this; + }; + /** + * Expands fields such as lookups to get additional data + * + * @param expands The Fields for which to expand the values + */ + GraphQueryableCollection.prototype.expand = function () { + var expands = []; + for (var _i = 0; _i < arguments.length; _i++) { + expands[_i] = arguments[_i]; + } + if (expands.length > 0) { + this._query.add("$expand", expands.join(",")); + } + return this; + }; + /** + * Orders based on the supplied fields ascending + * + * @param orderby The name of the field to sort on + * @param ascending If false DESC is appended, otherwise ASC (default) + */ + GraphQueryableCollection.prototype.orderBy = function (orderBy, ascending) { + if (ascending === void 0) { ascending = true; } + var keys = this._query.getKeys(); + var query = []; + var asc = ascending ? " asc" : " desc"; + for (var i = 0; i < keys.length; i++) { + if (keys[i] === "$orderby") { + query.push(this._query.get("$orderby")); + break; + } + } + query.push("" + orderBy + asc); + this._query.add("$orderby", query.join(",")); + return this; + }; + /** + * Limits the query to only return the specified number of items + * + * @param top The query row limit + */ + GraphQueryableCollection.prototype.top = function (top) { + this._query.add("$top", top.toString()); + return this; + }; + /** + * Skips a set number of items in the return set + * + * @param num Number of items to skip + */ + GraphQueryableCollection.prototype.skip = function (num) { + this._query.add("$top", num.toString()); + return this; + }; + /** + * To request second and subsequent pages of Graph data + */ + GraphQueryableCollection.prototype.skipToken = function (token) { + this._query.add("$skiptoken", token); + return this; + }; + Object.defineProperty(GraphQueryableCollection.prototype, "count", { + /** + * Retrieves the total count of matching resources + */ + get: function () { + this._query.add("$count", "true"); + return this; + }, + enumerable: true, + configurable: true + }); + return GraphQueryableCollection; +}(GraphQueryable)); +exports.GraphQueryableCollection = GraphQueryableCollection; +var GraphQueryableSearchableCollection = /** @class */ (function (_super) { + __extends(GraphQueryableSearchableCollection, _super); + function GraphQueryableSearchableCollection() { + return _super !== null && _super.apply(this, arguments) || this; + } + /** + * To request second and subsequent pages of Graph data + */ + GraphQueryableSearchableCollection.prototype.search = function (query) { + this._query.add("$search", query); + return this; + }; + return GraphQueryableSearchableCollection; +}(GraphQueryableCollection)); +exports.GraphQueryableSearchableCollection = GraphQueryableSearchableCollection; +/** + * Represents an instance that can be selected + * + */ +var GraphQueryableInstance = /** @class */ (function (_super) { + __extends(GraphQueryableInstance, _super); + function GraphQueryableInstance() { + return _super !== null && _super.apply(this, arguments) || this; + } + /** + * Choose which fields to return + * + * @param selects One or more fields to return + */ + GraphQueryableInstance.prototype.select = function () { + var selects = []; + for (var _i = 0; _i < arguments.length; _i++) { + selects[_i] = arguments[_i]; + } + if (selects.length > 0) { + this._query.add("$select", selects.join(",")); + } + return this; + }; + /** + * Expands fields such as lookups to get additional data + * + * @param expands The Fields for which to expand the values + */ + GraphQueryableInstance.prototype.expand = function () { + var expands = []; + for (var _i = 0; _i < arguments.length; _i++) { + expands[_i] = arguments[_i]; + } + if (expands.length > 0) { + this._query.add("$expand", expands.join(",")); + } + return this; + }; + return GraphQueryableInstance; +}(GraphQueryable)); +exports.GraphQueryableInstance = GraphQueryableInstance; + + +/***/ }), +/* 6 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var __extends = (this && this.__extends) || (function () { + var extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +var util_1 = __webpack_require__(0); +var logging_1 = __webpack_require__(3); +var exceptions_1 = __webpack_require__(4); +var core_1 = __webpack_require__(13); +function spExtractODataId(candidate) { + if (candidate.hasOwnProperty("odata.id")) { + return candidate["odata.id"]; + } + else if (candidate.hasOwnProperty("__metadata") && candidate.__metadata.hasOwnProperty("id")) { + return candidate.__metadata.id; + } + else { + throw new exceptions_1.ODataIdException(candidate); + } +} +exports.spExtractODataId = spExtractODataId; +var SPODataEntityParserImpl = /** @class */ (function (_super) { + __extends(SPODataEntityParserImpl, _super); + function SPODataEntityParserImpl(factory) { + var _this = _super.call(this) || this; + _this.factory = factory; + return _this; + } + SPODataEntityParserImpl.prototype.parse = function (r) { + var _this = this; + return _super.prototype.parse.call(this, r).then(function (d) { + var o = new _this.factory(spGetEntityUrl(d), null); + return util_1.Util.extend(o, d); + }); + }; + return SPODataEntityParserImpl; +}(core_1.ODataParserBase)); +var SPODataEntityArrayParserImpl = /** @class */ (function (_super) { + __extends(SPODataEntityArrayParserImpl, _super); + function SPODataEntityArrayParserImpl(factory) { + var _this = _super.call(this) || this; + _this.factory = factory; + return _this; + } + SPODataEntityArrayParserImpl.prototype.parse = function (r) { + var _this = this; + return _super.prototype.parse.call(this, r).then(function (d) { + return d.map(function (v) { + var o = new _this.factory(spGetEntityUrl(v), null); + return util_1.Util.extend(o, v); + }); + }); + }; + return SPODataEntityArrayParserImpl; +}(core_1.ODataParserBase)); +function spGetEntityUrl(entity) { + if (entity.hasOwnProperty("odata.metadata") && entity.hasOwnProperty("odata.editLink")) { + // we are dealign with minimal metadata (default) + return util_1.Util.combinePaths(util_1.extractWebUrl(entity["odata.metadata"]), "_api", entity["odata.editLink"]); + } + else if (entity.hasOwnProperty("__metadata")) { + // we are dealing with verbose, which has an absolute uri + return entity.__metadata.uri; + } + else { + // we are likely dealing with nometadata, so don't error but we won't be able to + // chain off these objects + logging_1.Logger.write("No uri information found in ODataEntity parsing, chaining will fail for this object.", logging_1.LogLevel.Warning); + return ""; + } +} +exports.spGetEntityUrl = spGetEntityUrl; +function spODataEntity(factory) { + return new SPODataEntityParserImpl(factory); +} +exports.spODataEntity = spODataEntity; +function spODataEntityArray(factory) { + return new SPODataEntityArrayParserImpl(factory); +} +exports.spODataEntityArray = spODataEntityArray; + + +/***/ }), +/* 7 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var __extends = (this && this.__extends) || (function () { + var extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +var core_1 = __webpack_require__(13); +var util_1 = __webpack_require__(0); +var ODataDefaultParser = /** @class */ (function (_super) { + __extends(ODataDefaultParser, _super); + function ODataDefaultParser() { + return _super !== null && _super.apply(this, arguments) || this; + } + return ODataDefaultParser; +}(core_1.ODataParserBase)); +exports.ODataDefaultParser = ODataDefaultParser; +var ODataValueParserImpl = /** @class */ (function (_super) { + __extends(ODataValueParserImpl, _super); + function ODataValueParserImpl() { + return _super !== null && _super.apply(this, arguments) || this; + } + ODataValueParserImpl.prototype.parse = function (r) { + return _super.prototype.parse.call(this, r).then(function (d) { return d; }); + }; + return ODataValueParserImpl; +}(core_1.ODataParserBase)); +function ODataValue() { + return new ODataValueParserImpl(); +} +exports.ODataValue = ODataValue; +var ODataRawParserImpl = /** @class */ (function () { + function ODataRawParserImpl() { + } + ODataRawParserImpl.prototype.parse = function (r) { + return r.json(); + }; + return ODataRawParserImpl; +}()); +exports.ODataRawParserImpl = ODataRawParserImpl; +exports.ODataRaw = new ODataRawParserImpl(); +var TextFileParser = /** @class */ (function () { + function TextFileParser() { + } + TextFileParser.prototype.parse = function (r) { + return r.text(); + }; + return TextFileParser; +}()); +exports.TextFileParser = TextFileParser; +var BlobFileParser = /** @class */ (function () { + function BlobFileParser() { + } + BlobFileParser.prototype.parse = function (r) { + return r.blob(); + }; + return BlobFileParser; +}()); +exports.BlobFileParser = BlobFileParser; +var JSONFileParser = /** @class */ (function () { + function JSONFileParser() { + } + JSONFileParser.prototype.parse = function (r) { + return r.json(); + }; + return JSONFileParser; +}()); +exports.JSONFileParser = JSONFileParser; +var BufferFileParser = /** @class */ (function () { + function BufferFileParser() { + } + BufferFileParser.prototype.parse = function (r) { + if (util_1.Util.isFunction(r.arrayBuffer)) { + return r.arrayBuffer(); + } + return r.buffer(); + }; + return BufferFileParser; +}()); +exports.BufferFileParser = BufferFileParser; + + +/***/ }), +/* 8 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +Object.defineProperty(exports, "__esModule", { value: true }); +/** + * Generic dictionary + */ +var Dictionary = /** @class */ (function () { + /** + * Creates a new instance of the Dictionary class + * + * @constructor + */ + function Dictionary(keys, values) { + if (keys === void 0) { keys = []; } + if (values === void 0) { values = []; } + this.keys = keys; + this.values = values; + } + /** + * Gets a value from the collection using the specified key + * + * @param key The key whose value we want to return, returns null if the key does not exist + */ + Dictionary.prototype.get = function (key) { + var index = this.keys.indexOf(key); + if (index < 0) { + return null; + } + return this.values[index]; + }; + /** + * Adds the supplied key and value to the dictionary + * + * @param key The key to add + * @param o The value to add + */ + Dictionary.prototype.add = function (key, o) { + var index = this.keys.indexOf(key); + if (index > -1) { + this.values[index] = o; + } + else { + this.keys.push(key); + this.values.push(o); + } + }; + /** + * Merges the supplied typed hash into this dictionary instance. Existing values are updated and new ones are created as appropriate. + */ + Dictionary.prototype.merge = function (source) { + var _this = this; + if ("getKeys" in source) { + var sourceAsDictionary_1 = source; + sourceAsDictionary_1.getKeys().map(function (key) { + _this.add(key, sourceAsDictionary_1.get(key)); + }); + } + else { + var sourceAsHash = source; + for (var key in sourceAsHash) { + if (sourceAsHash.hasOwnProperty(key)) { + this.add(key, sourceAsHash[key]); + } + } + } + }; + /** + * Removes a value from the dictionary + * + * @param key The key of the key/value pair to remove. Returns null if the key was not found. + */ + Dictionary.prototype.remove = function (key) { + var index = this.keys.indexOf(key); + if (index < 0) { + return null; + } + var val = this.values[index]; + this.keys.splice(index, 1); + this.values.splice(index, 1); + return val; + }; + /** + * Returns all the keys currently in the dictionary as an array + */ + Dictionary.prototype.getKeys = function () { + return this.keys; + }; + /** + * Returns all the values currently in the dictionary as an array + */ + Dictionary.prototype.getValues = function () { + return this.values; + }; + /** + * Clears the current dictionary + */ + Dictionary.prototype.clear = function () { + this.keys = []; + this.values = []; + }; + /** + * Gets a count of the items currently in the dictionary + */ + Dictionary.prototype.count = function () { + return this.keys.length; + }; + return Dictionary; +}()); +exports.Dictionary = Dictionary; + + +/***/ }), +/* 9 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +Object.defineProperty(exports, "__esModule", { value: true }); +var util_1 = __webpack_require__(0); +function mergeOptions(target, source) { + target.headers = target.headers || {}; + var headers = util_1.Util.extend(target.headers, source.headers); + target = util_1.Util.extend(target, source); + target.headers = headers; +} +exports.mergeOptions = mergeOptions; +function mergeHeaders(target, source) { + if (typeof source !== "undefined" && source !== null) { + var temp = new Request("", { headers: source }); + temp.headers.forEach(function (value, name) { + target.append(name, value); + }); + } +} +exports.mergeHeaders = mergeHeaders; + + +/***/ }), +/* 10 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var __extends = (this && this.__extends) || (function () { + var extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +var sharepointqueryable_1 = __webpack_require__(1); +var lists_1 = __webpack_require__(15); +var fields_1 = __webpack_require__(29); +var navigation_1 = __webpack_require__(46); +var sitegroups_1 = __webpack_require__(17); +var contenttypes_1 = __webpack_require__(20); +var folders_1 = __webpack_require__(19); +var roles_1 = __webpack_require__(27); +var files_1 = __webpack_require__(12); +var util_1 = __webpack_require__(0); +var lists_2 = __webpack_require__(15); +var siteusers_1 = __webpack_require__(28); +var usercustomactions_1 = __webpack_require__(21); +var odata_1 = __webpack_require__(6); +var batch_1 = __webpack_require__(30); +var features_1 = __webpack_require__(31); +var sharepointqueryableshareable_1 = __webpack_require__(11); +var relateditems_1 = __webpack_require__(47); +/** + * Describes a collection of webs + * + */ +var Webs = /** @class */ (function (_super) { + __extends(Webs, _super); + /** + * Creates a new instance of the Webs class + * + * @param baseUrl The url or SharePointQueryable which forms the parent of this web collection + */ + function Webs(baseUrl, webPath) { + if (webPath === void 0) { webPath = "webs"; } + return _super.call(this, baseUrl, webPath) || this; + } + /** + * Adds a new web to the collection + * + * @param title The new web's title + * @param url The new web's relative url + * @param description The new web's description + * @param template The new web's template internal name (default = STS) + * @param language The locale id that specifies the new web's language (default = 1033 [English, US]) + * @param inheritPermissions When true, permissions will be inherited from the new web's parent (default = true) + */ + Webs.prototype.add = function (title, url, description, template, language, inheritPermissions) { + if (description === void 0) { description = ""; } + if (template === void 0) { template = "STS"; } + if (language === void 0) { language = 1033; } + if (inheritPermissions === void 0) { inheritPermissions = true; } + var props = { + Description: description, + Language: language, + Title: title, + Url: url, + UseSamePermissionsAsParentSite: inheritPermissions, + WebTemplate: template, + }; + var postBody = JSON.stringify({ + "parameters": util_1.Util.extend({ + "__metadata": { "type": "SP.WebCreationInformation" }, + }, props), + }); + return this.clone(Webs, "add").postCore({ body: postBody }).then(function (data) { + return { + data: data, + web: new Web(odata_1.spExtractODataId(data).replace(/_api\/web\/?/i, "")), + }; + }); + }; + return Webs; +}(sharepointqueryable_1.SharePointQueryableCollection)); +exports.Webs = Webs; +/** + * Describes a collection of web infos + * + */ +var WebInfos = /** @class */ (function (_super) { + __extends(WebInfos, _super); + /** + * Creates a new instance of the WebInfos class + * + * @param baseUrl The url or SharePointQueryable which forms the parent of this web infos collection + */ + function WebInfos(baseUrl, webPath) { + if (webPath === void 0) { webPath = "webinfos"; } + return _super.call(this, baseUrl, webPath) || this; + } + return WebInfos; +}(sharepointqueryable_1.SharePointQueryableCollection)); +exports.WebInfos = WebInfos; +/** + * Describes a web + * + */ +var Web = /** @class */ (function (_super) { + __extends(Web, _super); + /** + * Creates a new instance of the Web class + * + * @param baseUrl The url or SharePointQueryable which forms the parent of this web + */ + function Web(baseUrl, path) { + if (path === void 0) { path = "_api/web"; } + return _super.call(this, baseUrl, path) || this; + } + /** + * Creates a new web instance from the given url by indexing the location of the /_api/ + * segment. If this is not found the method creates a new web with the entire string as + * supplied. + * + * @param url + */ + Web.fromUrl = function (url, path) { + return new Web(util_1.extractWebUrl(url), path); + }; + Object.defineProperty(Web.prototype, "webs", { + /** + * Gets this web's subwebs + * + */ + get: function () { + return new Webs(this); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Web.prototype, "webinfos", { + /** + * Gets a collection of WebInfos for this web's subwebs + * + */ + get: function () { + return new WebInfos(this); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Web.prototype, "contentTypes", { + /** + * Gets the content types available in this web + * + */ + get: function () { + return new contenttypes_1.ContentTypes(this); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Web.prototype, "lists", { + /** + * Gets the lists in this web + * + */ + get: function () { + return new lists_1.Lists(this); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Web.prototype, "fields", { + /** + * Gets the fields in this web + * + */ + get: function () { + return new fields_1.Fields(this); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Web.prototype, "features", { + /** + * Gets the active features for this web + * + */ + get: function () { + return new features_1.Features(this); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Web.prototype, "availablefields", { + /** + * Gets the available fields in this web + * + */ + get: function () { + return new fields_1.Fields(this, "availablefields"); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Web.prototype, "navigation", { + /** + * Gets the navigation options in this web + * + */ + get: function () { + return new navigation_1.Navigation(this); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Web.prototype, "siteUsers", { + /** + * Gets the site users + * + */ + get: function () { + return new siteusers_1.SiteUsers(this); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Web.prototype, "siteGroups", { + /** + * Gets the site groups + * + */ + get: function () { + return new sitegroups_1.SiteGroups(this); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Web.prototype, "currentUser", { + /** + * Gets the current user + */ + get: function () { + return new siteusers_1.CurrentUser(this); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Web.prototype, "folders", { + /** + * Gets the top-level folders in this web + * + */ + get: function () { + return new folders_1.Folders(this); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Web.prototype, "userCustomActions", { + /** + * Gets all user custom actions for this web + * + */ + get: function () { + return new usercustomactions_1.UserCustomActions(this); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Web.prototype, "roleDefinitions", { + /** + * Gets the collection of RoleDefinition resources + * + */ + get: function () { + return new roles_1.RoleDefinitions(this); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Web.prototype, "relatedItems", { + /** + * Provides an interface to manage related items + * + */ + get: function () { + return relateditems_1.RelatedItemManagerImpl.FromUrl(this.toUrl()); + }, + enumerable: true, + configurable: true + }); + /** + * Creates a new batch for requests within the context of this web + * + */ + Web.prototype.createBatch = function () { + return new batch_1.ODataBatch(this.parentUrl); + }; + Object.defineProperty(Web.prototype, "rootFolder", { + /** + * Gets the root folder of this web + * + */ + get: function () { + return new folders_1.Folder(this, "rootFolder"); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Web.prototype, "associatedOwnerGroup", { + /** + * Gets the associated owner group for this web + * + */ + get: function () { + return new sitegroups_1.SiteGroup(this, "associatedownergroup"); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Web.prototype, "associatedMemberGroup", { + /** + * Gets the associated member group for this web + * + */ + get: function () { + return new sitegroups_1.SiteGroup(this, "associatedmembergroup"); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Web.prototype, "associatedVisitorGroup", { + /** + * Gets the associated visitor group for this web + * + */ + get: function () { + return new sitegroups_1.SiteGroup(this, "associatedvisitorgroup"); + }, + enumerable: true, + configurable: true + }); + /** + * Gets a folder by server relative url + * + * @param folderRelativeUrl The server relative path to the folder (including /sites/ if applicable) + */ + Web.prototype.getFolderByServerRelativeUrl = function (folderRelativeUrl) { + return new folders_1.Folder(this, "getFolderByServerRelativeUrl('" + folderRelativeUrl + "')"); + }; + /** + * Gets a file by server relative url + * + * @param fileRelativeUrl The server relative path to the file (including /sites/ if applicable) + */ + Web.prototype.getFileByServerRelativeUrl = function (fileRelativeUrl) { + return new files_1.File(this, "getFileByServerRelativeUrl('" + fileRelativeUrl + "')"); + }; + /** + * Gets a list by server relative url (list's root folder) + * + * @param listRelativeUrl The server relative path to the list's root folder (including /sites/ if applicable) + */ + Web.prototype.getList = function (listRelativeUrl) { + return new lists_2.List(this, "getList('" + listRelativeUrl + "')"); + }; + /** + * Updates this web instance with the supplied properties + * + * @param properties A plain object hash of values to update for the web + */ + Web.prototype.update = function (properties) { + var _this = this; + var postBody = JSON.stringify(util_1.Util.extend({ + "__metadata": { "type": "SP.Web" }, + }, properties)); + return this.postCore({ + body: postBody, + headers: { + "X-HTTP-Method": "MERGE", + }, + }).then(function (data) { + return { + data: data, + web: _this, + }; + }); + }; + /** + * Deletes this web + * + */ + Web.prototype.delete = function () { + return _super.prototype.deleteCore.call(this); + }; + /** + * Applies the theme specified by the contents of each of the files specified in the arguments to the site + * + * @param colorPaletteUrl The server-relative URL of the color palette file + * @param fontSchemeUrl The server-relative URL of the font scheme + * @param backgroundImageUrl The server-relative URL of the background image + * @param shareGenerated When true, the generated theme files are stored in the root site. When false, they are stored in this web + */ + Web.prototype.applyTheme = function (colorPaletteUrl, fontSchemeUrl, backgroundImageUrl, shareGenerated) { + var postBody = JSON.stringify({ + backgroundImageUrl: backgroundImageUrl, + colorPaletteUrl: colorPaletteUrl, + fontSchemeUrl: fontSchemeUrl, + shareGenerated: shareGenerated, + }); + return this.clone(Web, "applytheme").postCore({ body: postBody }); + }; + /** + * Applies the specified site definition or site template to the Web site that has no template applied to it + * + * @param template Name of the site definition or the name of the site template + */ + Web.prototype.applyWebTemplate = function (template) { + var q = this.clone(Web, "applywebtemplate"); + q.concat("(@t)"); + q.query.add("@t", template); + return q.postCore(); + }; + /** + * Checks whether the specified login name belongs to a valid user in the web. If the user doesn't exist, adds the user to the web. + * + * @param loginName The login name of the user (ex: i:0#.f|membership|user@domain.onmicrosoft.com) + */ + Web.prototype.ensureUser = function (loginName) { + var postBody = JSON.stringify({ + logonName: loginName, + }); + return this.clone(Web, "ensureuser").postCore({ body: postBody }).then(function (data) { + return { + data: data, + user: new siteusers_1.SiteUser(odata_1.spExtractODataId(data)), + }; + }); + }; + /** + * Returns a collection of site templates available for the site + * + * @param language The locale id of the site templates to retrieve (default = 1033 [English, US]) + * @param includeCrossLanguage When true, includes language-neutral site templates; otherwise false (default = true) + */ + Web.prototype.availableWebTemplates = function (language, includeCrossLanugage) { + if (language === void 0) { language = 1033; } + if (includeCrossLanugage === void 0) { includeCrossLanugage = true; } + return new sharepointqueryable_1.SharePointQueryableCollection(this, "getavailablewebtemplates(lcid=" + language + ", doincludecrosslanguage=" + includeCrossLanugage + ")"); + }; + /** + * Returns the list gallery on the site + * + * @param type The gallery type - WebTemplateCatalog = 111, WebPartCatalog = 113 ListTemplateCatalog = 114, + * MasterPageCatalog = 116, SolutionCatalog = 121, ThemeCatalog = 123, DesignCatalog = 124, AppDataCatalog = 125 + */ + Web.prototype.getCatalog = function (type) { + return this.clone(Web, "getcatalog(" + type + ")").select("Id").get().then(function (data) { + return new lists_2.List(odata_1.spExtractODataId(data)); + }); + }; + /** + * Returns the collection of changes from the change log that have occurred within the list, based on the specified query + * + * @param query The change query + */ + Web.prototype.getChanges = function (query) { + var postBody = JSON.stringify({ "query": util_1.Util.extend({ "__metadata": { "type": "SP.ChangeQuery" } }, query) }); + return this.clone(Web, "getchanges").postCore({ body: postBody }); + }; + Object.defineProperty(Web.prototype, "customListTemplate", { + /** + * Gets the custom list templates for the site + * + */ + get: function () { + return new sharepointqueryable_1.SharePointQueryableCollection(this, "getcustomlisttemplates"); + }, + enumerable: true, + configurable: true + }); + /** + * Returns the user corresponding to the specified member identifier for the current site + * + * @param id The id of the user + */ + Web.prototype.getUserById = function (id) { + return new siteusers_1.SiteUser(this, "getUserById(" + id + ")"); + }; + /** + * Returns the name of the image file for the icon that is used to represent the specified file + * + * @param filename The file name. If this parameter is empty, the server returns an empty string + * @param size The size of the icon: 16x16 pixels = 0, 32x32 pixels = 1 (default = 0) + * @param progId The ProgID of the application that was used to create the file, in the form OLEServerName.ObjectName + */ + Web.prototype.mapToIcon = function (filename, size, progId) { + if (size === void 0) { size = 0; } + if (progId === void 0) { progId = ""; } + return this.clone(Web, "maptoicon(filename='" + filename + "', progid='" + progId + "', size=" + size + ")").get(); + }; + return Web; +}(sharepointqueryableshareable_1.SharePointQueryableShareableWeb)); +exports.Web = Web; + + +/***/ }), +/* 11 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var __extends = (this && this.__extends) || (function () { + var extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +var util_1 = __webpack_require__(0); +var webs_1 = __webpack_require__(10); +var odata_1 = __webpack_require__(6); +var sharepointqueryable_1 = __webpack_require__(1); +var sharepointqueryablesecurable_1 = __webpack_require__(26); +var types_1 = __webpack_require__(18); +/** + * Internal helper class used to augment classes to include sharing functionality + */ +var SharePointQueryableShareable = /** @class */ (function (_super) { + __extends(SharePointQueryableShareable, _super); + function SharePointQueryableShareable() { + return _super !== null && _super.apply(this, arguments) || this; + } + /** + * Gets a sharing link for the supplied + * + * @param kind The kind of link to share + * @param expiration The optional expiration for this link + */ + SharePointQueryableShareable.prototype.getShareLink = function (kind, expiration) { + if (expiration === void 0) { expiration = null; } + // date needs to be an ISO string or null + var expString = expiration !== null ? expiration.toISOString() : null; + // clone using the factory and send the request + return this.clone(SharePointQueryableShareable, "shareLink").postAsCore({ + body: JSON.stringify({ + request: { + createLink: true, + emailData: null, + settings: { + expiration: expString, + linkKind: kind, + }, + }, + }), + }); + }; + /** + * Shares this instance with the supplied users + * + * @param loginNames Resolved login names to share + * @param role The role + * @param requireSignin True to require the user is authenticated, otherwise false + * @param propagateAcl True to apply this share to all children + * @param emailData If supplied an email will be sent with the indicated properties + */ + SharePointQueryableShareable.prototype.shareWith = function (loginNames, role, requireSignin, propagateAcl, emailData) { + var _this = this; + if (requireSignin === void 0) { requireSignin = false; } + if (propagateAcl === void 0) { propagateAcl = false; } + // handle the multiple input types + if (!Array.isArray(loginNames)) { + loginNames = [loginNames]; + } + var userStr = JSON.stringify(loginNames.map(function (login) { return { Key: login }; })); + var roleFilter = role === types_1.SharingRole.Edit ? types_1.RoleType.Contributor : types_1.RoleType.Reader; + // start by looking up the role definition id we need to set the roleValue + return webs_1.Web.fromUrl(this.toUrl()).roleDefinitions.select("Id").filter("RoleTypeKind eq " + roleFilter).get().then(function (def) { + if (!Array.isArray(def) || def.length < 1) { + throw new Error("Could not locate a role defintion with RoleTypeKind " + roleFilter); + } + var postBody = { + includeAnonymousLinkInEmail: requireSignin, + peoplePickerInput: userStr, + propagateAcl: propagateAcl, + roleValue: "role:" + def[0].Id, + useSimplifiedRoles: true, + }; + if (typeof emailData !== "undefined") { + postBody = util_1.Util.extend(postBody, { + emailBody: emailData.body, + emailSubject: typeof emailData.subject !== "undefined" ? emailData.subject : "", + sendEmail: true, + }); + } + return _this.clone(SharePointQueryableShareable, "shareObject").postAsCore({ + body: JSON.stringify(postBody), + }); + }); + }; + /** + * Shares an object based on the supplied options + * + * @param options The set of options to send to the ShareObject method + * @param bypass If true any processing is skipped and the options are sent directly to the ShareObject method + */ + SharePointQueryableShareable.prototype.shareObject = function (options, bypass) { + var _this = this; + if (bypass === void 0) { bypass = false; } + if (bypass) { + // if the bypass flag is set send the supplied parameters directly to the service + return this.sendShareObjectRequest(options); + } + // extend our options with some defaults + options = util_1.Util.extend(options, { + group: null, + includeAnonymousLinkInEmail: false, + propagateAcl: false, + useSimplifiedRoles: true, + }, true); + return this.getRoleValue(options.role, options.group).then(function (roleValue) { + // handle the multiple input types + if (!Array.isArray(options.loginNames)) { + options.loginNames = [options.loginNames]; + } + var userStr = JSON.stringify(options.loginNames.map(function (login) { return { Key: login }; })); + var postBody = { + peoplePickerInput: userStr, + roleValue: roleValue, + url: options.url, + }; + if (typeof options.emailData !== "undefined" && options.emailData !== null) { + postBody = util_1.Util.extend(postBody, { + emailBody: options.emailData.body, + emailSubject: typeof options.emailData.subject !== "undefined" ? options.emailData.subject : "Shared with you.", + sendEmail: true, + }); + } + return _this.sendShareObjectRequest(postBody); + }); + }; + /** + * Calls the web's UnshareObject method + * + * @param url The url of the object to unshare + */ + SharePointQueryableShareable.prototype.unshareObjectWeb = function (url) { + return this.clone(SharePointQueryableShareable, "unshareObject").postAsCore({ + body: JSON.stringify({ + url: url, + }), + }); + }; + /** + * Checks Permissions on the list of Users and returns back role the users have on the Item. + * + * @param recipients The array of Entities for which Permissions need to be checked. + */ + SharePointQueryableShareable.prototype.checkPermissions = function (recipients) { + return this.clone(SharePointQueryableShareable, "checkPermissions").postAsCore({ + body: JSON.stringify({ + recipients: recipients, + }), + }); + }; + /** + * Get Sharing Information. + * + * @param request The SharingInformationRequest Object. + */ + SharePointQueryableShareable.prototype.getSharingInformation = function (request) { + if (request === void 0) { request = null; } + return this.clone(SharePointQueryableShareable, "getSharingInformation").postAsCore({ + body: JSON.stringify({ + request: request, + }), + }); + }; + /** + * Gets the sharing settings of an item. + * + * @param useSimplifiedRoles Determines whether to use simplified roles. + */ + SharePointQueryableShareable.prototype.getObjectSharingSettings = function (useSimplifiedRoles) { + if (useSimplifiedRoles === void 0) { useSimplifiedRoles = true; } + return this.clone(SharePointQueryableShareable, "getObjectSharingSettings").postAsCore({ + body: JSON.stringify({ + useSimplifiedRoles: useSimplifiedRoles, + }), + }); + }; + /** + * Unshares this object + */ + SharePointQueryableShareable.prototype.unshareObject = function () { + return this.clone(SharePointQueryableShareable, "unshareObject").postAsCore(); + }; + /** + * Deletes a link by type + * + * @param kind Deletes a sharing link by the kind of link + */ + SharePointQueryableShareable.prototype.deleteLinkByKind = function (kind) { + return this.clone(SharePointQueryableShareable, "deleteLinkByKind").postCore({ + body: JSON.stringify({ linkKind: kind }), + }); + }; + /** + * Removes the specified link to the item. + * + * @param kind The kind of link to be deleted. + * @param shareId + */ + SharePointQueryableShareable.prototype.unshareLink = function (kind, shareId) { + if (shareId === void 0) { shareId = "00000000-0000-0000-0000-000000000000"; } + return this.clone(SharePointQueryableShareable, "unshareLink").postCore({ + body: JSON.stringify({ linkKind: kind, shareId: shareId }), + }); + }; + /** + * Calculates the roleValue string used in the sharing query + * + * @param role The Sharing Role + * @param group The Group type + */ + SharePointQueryableShareable.prototype.getRoleValue = function (role, group) { + // we will give group precedence, because we had to make a choice + if (typeof group !== "undefined" && group !== null) { + switch (group) { + case types_1.RoleType.Contributor: + return webs_1.Web.fromUrl(this.toUrl()).associatedMemberGroup.select("Id").getAs().then(function (g) { return "group: " + g.Id; }); + case types_1.RoleType.Reader: + case types_1.RoleType.Guest: + return webs_1.Web.fromUrl(this.toUrl()).associatedVisitorGroup.select("Id").getAs().then(function (g) { return "group: " + g.Id; }); + default: + throw new Error("Could not determine role value for supplied value. Contributor, Reader, and Guest are supported"); + } + } + else { + var roleFilter = role === types_1.SharingRole.Edit ? types_1.RoleType.Contributor : types_1.RoleType.Reader; + return webs_1.Web.fromUrl(this.toUrl()).roleDefinitions.select("Id").top(1).filter("RoleTypeKind eq " + roleFilter).getAs().then(function (def) { + if (def.length < 1) { + throw new Error("Could not locate associated role definition for supplied role. Edit and View are supported"); + } + return "role: " + def[0].Id; + }); + } + }; + SharePointQueryableShareable.prototype.getShareObjectWeb = function (candidate) { + return Promise.resolve(webs_1.Web.fromUrl(candidate, "/_api/SP.Web.ShareObject")); + }; + SharePointQueryableShareable.prototype.sendShareObjectRequest = function (options) { + return this.getShareObjectWeb(this.toUrl()).then(function (web) { + return web.expand("UsersWithAccessRequests", "GroupsSharedWith").as(SharePointQueryableShareable).postCore({ + body: JSON.stringify(options), + }); + }); + }; + return SharePointQueryableShareable; +}(sharepointqueryable_1.SharePointQueryable)); +exports.SharePointQueryableShareable = SharePointQueryableShareable; +var SharePointQueryableShareableWeb = /** @class */ (function (_super) { + __extends(SharePointQueryableShareableWeb, _super); + function SharePointQueryableShareableWeb() { + return _super !== null && _super.apply(this, arguments) || this; + } + /** + * Shares this web with the supplied users + * @param loginNames The resolved login names to share + * @param role The role to share this web + * @param emailData Optional email data + */ + SharePointQueryableShareableWeb.prototype.shareWith = function (loginNames, role, emailData) { + var _this = this; + if (role === void 0) { role = types_1.SharingRole.View; } + var dependency = this.addBatchDependency(); + return webs_1.Web.fromUrl(this.toUrl(), "/_api/web/url").get().then(function (url) { + dependency(); + return _this.shareObject(util_1.Util.combinePaths(url, "/_layouts/15/aclinv.aspx?forSharing=1&mbypass=1"), loginNames, role, emailData); + }); + }; + /** + * Provides direct access to the static web.ShareObject method + * + * @param url The url to share + * @param loginNames Resolved loginnames string[] of a single login name string + * @param roleValue Role value + * @param emailData Optional email data + * @param groupId Optional group id + * @param propagateAcl + * @param includeAnonymousLinkInEmail + * @param useSimplifiedRoles + */ + SharePointQueryableShareableWeb.prototype.shareObject = function (url, loginNames, role, emailData, group, propagateAcl, includeAnonymousLinkInEmail, useSimplifiedRoles) { + if (propagateAcl === void 0) { propagateAcl = false; } + if (includeAnonymousLinkInEmail === void 0) { includeAnonymousLinkInEmail = false; } + if (useSimplifiedRoles === void 0) { useSimplifiedRoles = true; } + return this.clone(SharePointQueryableShareable, null).shareObject({ + emailData: emailData, + group: group, + includeAnonymousLinkInEmail: includeAnonymousLinkInEmail, + loginNames: loginNames, + propagateAcl: propagateAcl, + role: role, + url: url, + useSimplifiedRoles: useSimplifiedRoles, + }); + }; + /** + * Supplies a method to pass any set of arguments to ShareObject + * + * @param options The set of options to send to ShareObject + */ + SharePointQueryableShareableWeb.prototype.shareObjectRaw = function (options) { + return this.clone(SharePointQueryableShareable, null).shareObject(options, true); + }; + /** + * Unshares the object + * + * @param url The url of the object to stop sharing + */ + SharePointQueryableShareableWeb.prototype.unshareObject = function (url) { + return this.clone(SharePointQueryableShareable, null).unshareObjectWeb(url); + }; + return SharePointQueryableShareableWeb; +}(sharepointqueryablesecurable_1.SharePointQueryableSecurable)); +exports.SharePointQueryableShareableWeb = SharePointQueryableShareableWeb; +var SharePointQueryableShareableItem = /** @class */ (function (_super) { + __extends(SharePointQueryableShareableItem, _super); + function SharePointQueryableShareableItem() { + return _super !== null && _super.apply(this, arguments) || this; + } + /** + * Gets a link suitable for sharing for this item + * + * @param kind The type of link to share + * @param expiration The optional expiration date + */ + SharePointQueryableShareableItem.prototype.getShareLink = function (kind, expiration) { + if (kind === void 0) { kind = types_1.SharingLinkKind.OrganizationView; } + if (expiration === void 0) { expiration = null; } + return this.clone(SharePointQueryableShareable, null).getShareLink(kind, expiration); + }; + /** + * Shares this item with one or more users + * + * @param loginNames string or string[] of resolved login names to which this item will be shared + * @param role The role (View | Edit) applied to the share + * @param emailData Optional, if inlucded an email will be sent. Note subject currently has no effect. + */ + SharePointQueryableShareableItem.prototype.shareWith = function (loginNames, role, requireSignin, emailData) { + if (role === void 0) { role = types_1.SharingRole.View; } + if (requireSignin === void 0) { requireSignin = false; } + return this.clone(SharePointQueryableShareable, null).shareWith(loginNames, role, requireSignin, false, emailData); + }; + /** + * Checks Permissions on the list of Users and returns back role the users have on the Item. + * + * @param recipients The array of Entities for which Permissions need to be checked. + */ + SharePointQueryableShareableItem.prototype.checkSharingPermissions = function (recipients) { + return this.clone(SharePointQueryableShareable, null).checkPermissions(recipients); + }; + /** + * Get Sharing Information. + * + * @param request The SharingInformationRequest Object. + */ + SharePointQueryableShareableItem.prototype.getSharingInformation = function (request) { + if (request === void 0) { request = null; } + return this.clone(SharePointQueryableShareable, null).getSharingInformation(request); + }; + /** + * Gets the sharing settings of an item. + * + * @param useSimplifiedRoles Determines whether to use simplified roles. + */ + SharePointQueryableShareableItem.prototype.getObjectSharingSettings = function (useSimplifiedRoles) { + if (useSimplifiedRoles === void 0) { useSimplifiedRoles = true; } + return this.clone(SharePointQueryableShareable, null).getObjectSharingSettings(useSimplifiedRoles); + }; + /** + * Unshare this item + */ + SharePointQueryableShareableItem.prototype.unshare = function () { + return this.clone(SharePointQueryableShareable, null).unshareObject(); + }; + /** + * Deletes a sharing link by kind + * + * @param kind Deletes a sharing link by the kind of link + */ + SharePointQueryableShareableItem.prototype.deleteSharingLinkByKind = function (kind) { + return this.clone(SharePointQueryableShareable, null).deleteLinkByKind(kind); + }; + /** + * Removes the specified link to the item. + * + * @param kind The kind of link to be deleted. + * @param shareId + */ + SharePointQueryableShareableItem.prototype.unshareLink = function (kind, shareId) { + return this.clone(SharePointQueryableShareable, null).unshareLink(kind, shareId); + }; + return SharePointQueryableShareableItem; +}(sharepointqueryablesecurable_1.SharePointQueryableSecurable)); +exports.SharePointQueryableShareableItem = SharePointQueryableShareableItem; +var FileFolderShared = /** @class */ (function (_super) { + __extends(FileFolderShared, _super); + function FileFolderShared() { + return _super !== null && _super.apply(this, arguments) || this; + } + /** + * Gets a link suitable for sharing + * + * @param kind The kind of link to get + * @param expiration Optional, an expiration for this link + */ + FileFolderShared.prototype.getShareLink = function (kind, expiration) { + if (kind === void 0) { kind = types_1.SharingLinkKind.OrganizationView; } + if (expiration === void 0) { expiration = null; } + var dependency = this.addBatchDependency(); + return this.getShareable().then(function (shareable) { + dependency(); + return shareable.getShareLink(kind, expiration); + }); + }; + /** + * Checks Permissions on the list of Users and returns back role the users have on the Item. + * + * @param recipients The array of Entities for which Permissions need to be checked. + */ + FileFolderShared.prototype.checkSharingPermissions = function (recipients) { + var dependency = this.addBatchDependency(); + return this.getShareable().then(function (shareable) { + dependency(); + return shareable.checkPermissions(recipients); + }); + }; + /** + * Get Sharing Information. + * + * @param request The SharingInformationRequest Object. + */ + FileFolderShared.prototype.getSharingInformation = function (request) { + if (request === void 0) { request = null; } + var dependency = this.addBatchDependency(); + return this.getShareable().then(function (shareable) { + dependency(); + return shareable.getSharingInformation(request); + }); + }; + /** + * Gets the sharing settings of an item. + * + * @param useSimplifiedRoles Determines whether to use simplified roles. + */ + FileFolderShared.prototype.getObjectSharingSettings = function (useSimplifiedRoles) { + if (useSimplifiedRoles === void 0) { useSimplifiedRoles = true; } + var dependency = this.addBatchDependency(); + return this.getShareable().then(function (shareable) { + dependency(); + return shareable.getObjectSharingSettings(useSimplifiedRoles); + }); + }; + /** + * Unshare this item + */ + FileFolderShared.prototype.unshare = function () { + var dependency = this.addBatchDependency(); + return this.getShareable().then(function (shareable) { + dependency(); + return shareable.unshareObject(); + }); + }; + /** + * Deletes a sharing link by the kind of link + * + * @param kind The kind of link to be deleted. + */ + FileFolderShared.prototype.deleteSharingLinkByKind = function (kind) { + var dependency = this.addBatchDependency(); + return this.getShareable().then(function (shareable) { + dependency(); + return shareable.deleteLinkByKind(kind); + }); + }; + /** + * Removes the specified link to the item. + * + * @param kind The kind of link to be deleted. + * @param shareId The share id to delete + */ + FileFolderShared.prototype.unshareLink = function (kind, shareId) { + var dependency = this.addBatchDependency(); + return this.getShareable().then(function (shareable) { + dependency(); + return shareable.unshareLink(kind, shareId); + }); + }; + /** + * For files and folders we need to use the associated item end point + */ + FileFolderShared.prototype.getShareable = function () { + var _this = this; + // sharing only works on the item end point, not the file one - so we create a folder instance with the item url internally + return this.clone(SharePointQueryableShareableFile, "listItemAllFields", false).select("odata.editlink").get().then(function (d) { + var shareable = new SharePointQueryableShareable(odata_1.spGetEntityUrl(d)); + // we need to handle batching + if (_this.hasBatch) { + shareable = shareable.inBatch(_this.batch); + } + return shareable; + }); + }; + return FileFolderShared; +}(sharepointqueryable_1.SharePointQueryableInstance)); +exports.FileFolderShared = FileFolderShared; +var SharePointQueryableShareableFile = /** @class */ (function (_super) { + __extends(SharePointQueryableShareableFile, _super); + function SharePointQueryableShareableFile() { + return _super !== null && _super.apply(this, arguments) || this; + } + /** + * Shares this item with one or more users + * + * @param loginNames string or string[] of resolved login names to which this item will be shared + * @param role The role (View | Edit) applied to the share + * @param shareEverything Share everything in this folder, even items with unique permissions. + * @param requireSignin If true the user must signin to view link, otherwise anyone with the link can access the resource + * @param emailData Optional, if inlucded an email will be sent. Note subject currently has no effect. + */ + SharePointQueryableShareableFile.prototype.shareWith = function (loginNames, role, requireSignin, emailData) { + if (role === void 0) { role = types_1.SharingRole.View; } + if (requireSignin === void 0) { requireSignin = false; } + var dependency = this.addBatchDependency(); + return this.getShareable().then(function (shareable) { + dependency(); + return shareable.shareWith(loginNames, role, requireSignin, false, emailData); + }); + }; + return SharePointQueryableShareableFile; +}(FileFolderShared)); +exports.SharePointQueryableShareableFile = SharePointQueryableShareableFile; +var SharePointQueryableShareableFolder = /** @class */ (function (_super) { + __extends(SharePointQueryableShareableFolder, _super); + function SharePointQueryableShareableFolder() { + return _super !== null && _super.apply(this, arguments) || this; + } + /** + * Shares this item with one or more users + * + * @param loginNames string or string[] of resolved login names to which this item will be shared + * @param role The role (View | Edit) applied to the share + * @param shareEverything Share everything in this folder, even items with unique permissions. + * @param requireSignin If true the user must signin to view link, otherwise anyone with the link can access the resource + * @param emailData Optional, if inlucded an email will be sent. Note subject currently has no effect. + */ + SharePointQueryableShareableFolder.prototype.shareWith = function (loginNames, role, requireSignin, shareEverything, emailData) { + if (role === void 0) { role = types_1.SharingRole.View; } + if (requireSignin === void 0) { requireSignin = false; } + if (shareEverything === void 0) { shareEverything = false; } + var dependency = this.addBatchDependency(); + return this.getShareable().then(function (shareable) { + dependency(); + return shareable.shareWith(loginNames, role, requireSignin, shareEverything, emailData); + }); + }; + return SharePointQueryableShareableFolder; +}(FileFolderShared)); +exports.SharePointQueryableShareableFolder = SharePointQueryableShareableFolder; + + +/***/ }), +/* 12 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var __extends = (this && this.__extends) || (function () { + var extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +var sharepointqueryable_1 = __webpack_require__(1); +var parsers_1 = __webpack_require__(7); +var util_1 = __webpack_require__(0); +var exceptions_1 = __webpack_require__(4); +var webparts_1 = __webpack_require__(41); +var items_1 = __webpack_require__(16); +var sharepointqueryableshareable_1 = __webpack_require__(11); +var odata_1 = __webpack_require__(6); +/** + * Describes a collection of File objects + * + */ +var Files = /** @class */ (function (_super) { + __extends(Files, _super); + /** + * Creates a new instance of the Files class + * + * @param baseUrl The url or SharePointQueryable which forms the parent of this fields collection + */ + function Files(baseUrl, path) { + if (path === void 0) { path = "files"; } + return _super.call(this, baseUrl, path) || this; + } + /** + * Gets a File by filename + * + * @param name The name of the file, including extension. + */ + Files.prototype.getByName = function (name) { + var f = new File(this); + f.concat("('" + name + "')"); + return f; + }; + /** + * Uploads a file. Not supported for batching + * + * @param url The folder-relative url of the file. + * @param content The file contents blob. + * @param shouldOverWrite Should a file with the same name in the same location be overwritten? (default: true) + * @returns The new File and the raw response. + */ + Files.prototype.add = function (url, content, shouldOverWrite) { + var _this = this; + if (shouldOverWrite === void 0) { shouldOverWrite = true; } + return new Files(this, "add(overwrite=" + shouldOverWrite + ",url='" + url + "')") + .postCore({ + body: content, + }).then(function (response) { + return { + data: response, + file: _this.getByName(url), + }; + }); + }; + /** + * Uploads a file. Not supported for batching + * + * @param url The folder-relative url of the file. + * @param content The Blob file content to add + * @param progress A callback function which can be used to track the progress of the upload + * @param shouldOverWrite Should a file with the same name in the same location be overwritten? (default: true) + * @param chunkSize The size of each file slice, in bytes (default: 10485760) + * @returns The new File and the raw response. + */ + Files.prototype.addChunked = function (url, content, progress, shouldOverWrite, chunkSize) { + var _this = this; + if (shouldOverWrite === void 0) { shouldOverWrite = true; } + if (chunkSize === void 0) { chunkSize = 10485760; } + var adder = this.clone(Files, "add(overwrite=" + shouldOverWrite + ",url='" + url + "')", false); + return adder.postCore().then(function () { return _this.getByName(url); }).then(function (file) { return file.setContentChunked(content, progress, chunkSize); }).then(function (response) { + return { + data: response, + file: _this.getByName(url), + }; + }); + }; + /** + * Adds a ghosted file to an existing list or document library. Not supported for batching. + * + * @param fileUrl The server-relative url where you want to save the file. + * @param templateFileType The type of use to create the file. + * @returns The template file that was added and the raw response. + */ + Files.prototype.addTemplateFile = function (fileUrl, templateFileType) { + var _this = this; + return this.clone(Files, "addTemplateFile(urloffile='" + fileUrl + "',templatefiletype=" + templateFileType + ")", false) + .postCore().then(function (response) { + return { + data: response, + file: _this.getByName(fileUrl), + }; + }); + }; + return Files; +}(sharepointqueryable_1.SharePointQueryableCollection)); +exports.Files = Files; +/** + * Describes a single File instance + * + */ +var File = /** @class */ (function (_super) { + __extends(File, _super); + function File() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(File.prototype, "listItemAllFields", { + /** + * Gets a value that specifies the list item field values for the list item corresponding to the file. + * + */ + get: function () { + return new sharepointqueryable_1.SharePointQueryableCollection(this, "listItemAllFields"); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(File.prototype, "versions", { + /** + * Gets a collection of versions + * + */ + get: function () { + return new Versions(this); + }, + enumerable: true, + configurable: true + }); + /** + * Approves the file submitted for content approval with the specified comment. + * Only documents in lists that are enabled for content approval can be approved. + * + * @param comment The comment for the approval. + */ + File.prototype.approve = function (comment) { + if (comment === void 0) { comment = ""; } + return this.clone(File, "approve(comment='" + comment + "')").postCore(); + }; + /** + * Stops the chunk upload session without saving the uploaded data. Does not support batching. + * If the file doesn’t already exist in the library, the partially uploaded file will be deleted. + * Use this in response to user action (as in a request to cancel an upload) or an error or exception. + * Use the uploadId value that was passed to the StartUpload method that started the upload session. + * This method is currently available only on Office 365. + * + * @param uploadId The unique identifier of the upload session. + */ + File.prototype.cancelUpload = function (uploadId) { + return this.clone(File, "cancelUpload(uploadId=guid'" + uploadId + "')", false).postCore(); + }; + /** + * Checks the file in to a document library based on the check-in type. + * + * @param comment A comment for the check-in. Its length must be <= 1023. + * @param checkinType The check-in type for the file. + */ + File.prototype.checkin = function (comment, checkinType) { + if (comment === void 0) { comment = ""; } + if (checkinType === void 0) { checkinType = CheckinType.Major; } + if (comment.length > 1023) { + throw new exceptions_1.MaxCommentLengthException(); + } + return this.clone(File, "checkin(comment='" + comment + "',checkintype=" + checkinType + ")").postCore(); + }; + /** + * Checks out the file from a document library. + */ + File.prototype.checkout = function () { + return this.clone(File, "checkout").postCore(); + }; + /** + * Copies the file to the destination url. + * + * @param url The absolute url or server relative url of the destination file path to copy to. + * @param shouldOverWrite Should a file with the same name in the same location be overwritten? + */ + File.prototype.copyTo = function (url, shouldOverWrite) { + if (shouldOverWrite === void 0) { shouldOverWrite = true; } + return this.clone(File, "copyTo(strnewurl='" + url + "',boverwrite=" + shouldOverWrite + ")").postCore(); + }; + /** + * Delete this file. + * + * @param eTag Value used in the IF-Match header, by default "*" + */ + File.prototype.delete = function (eTag) { + if (eTag === void 0) { eTag = "*"; } + return this.clone(File, null).postCore({ + headers: { + "IF-Match": eTag, + "X-HTTP-Method": "DELETE", + }, + }); + }; + /** + * Denies approval for a file that was submitted for content approval. + * Only documents in lists that are enabled for content approval can be denied. + * + * @param comment The comment for the denial. + */ + File.prototype.deny = function (comment) { + if (comment === void 0) { comment = ""; } + if (comment.length > 1023) { + throw new exceptions_1.MaxCommentLengthException(); + } + return this.clone(File, "deny(comment='" + comment + "')").postCore(); + }; + /** + * Specifies the control set used to access, modify, or add Web Parts associated with this Web Part Page and view. + * An exception is thrown if the file is not an ASPX page. + * + * @param scope The WebPartsPersonalizationScope view on the Web Parts page. + */ + File.prototype.getLimitedWebPartManager = function (scope) { + if (scope === void 0) { scope = WebPartsPersonalizationScope.Shared; } + return new webparts_1.LimitedWebPartManager(this, "getLimitedWebPartManager(scope=" + scope + ")"); + }; + /** + * Moves the file to the specified destination url. + * + * @param url The absolute url or server relative url of the destination file path to move to. + * @param moveOperations The bitwise MoveOperations value for how to move the file. + */ + File.prototype.moveTo = function (url, moveOperations) { + if (moveOperations === void 0) { moveOperations = MoveOperations.Overwrite; } + return this.clone(File, "moveTo(newurl='" + url + "',flags=" + moveOperations + ")").postCore(); + }; + /** + * Submits the file for content approval with the specified comment. + * + * @param comment The comment for the published file. Its length must be <= 1023. + */ + File.prototype.publish = function (comment) { + if (comment === void 0) { comment = ""; } + if (comment.length > 1023) { + throw new exceptions_1.MaxCommentLengthException(); + } + return this.clone(File, "publish(comment='" + comment + "')").postCore(); + }; + /** + * Moves the file to the Recycle Bin and returns the identifier of the new Recycle Bin item. + * + * @returns The GUID of the recycled file. + */ + File.prototype.recycle = function () { + return this.clone(File, "recycle").postCore(); + }; + /** + * Reverts an existing checkout for the file. + * + */ + File.prototype.undoCheckout = function () { + return this.clone(File, "undoCheckout").postCore(); + }; + /** + * Removes the file from content approval or unpublish a major version. + * + * @param comment The comment for the unpublish operation. Its length must be <= 1023. + */ + File.prototype.unpublish = function (comment) { + if (comment === void 0) { comment = ""; } + if (comment.length > 1023) { + throw new exceptions_1.MaxCommentLengthException(); + } + return this.clone(File, "unpublish(comment='" + comment + "')").postCore(); + }; + /** + * Gets the contents of the file as text. Not supported in batching. + * + */ + File.prototype.getText = function () { + return this.clone(File, "$value", false).get(new parsers_1.TextFileParser(), { headers: { "binaryStringResponseBody": "true" } }); + }; + /** + * Gets the contents of the file as a blob, does not work in Node.js. Not supported in batching. + * + */ + File.prototype.getBlob = function () { + return this.clone(File, "$value", false).get(new parsers_1.BlobFileParser(), { headers: { "binaryStringResponseBody": "true" } }); + }; + /** + * Gets the contents of a file as an ArrayBuffer, works in Node.js. Not supported in batching. + */ + File.prototype.getBuffer = function () { + return this.clone(File, "$value", false).get(new parsers_1.BufferFileParser(), { headers: { "binaryStringResponseBody": "true" } }); + }; + /** + * Gets the contents of a file as an ArrayBuffer, works in Node.js. Not supported in batching. + */ + File.prototype.getJSON = function () { + return this.clone(File, "$value", false).get(new parsers_1.JSONFileParser(), { headers: { "binaryStringResponseBody": "true" } }); + }; + /** + * Sets the content of a file, for large files use setContentChunked. Not supported in batching. + * + * @param content The file content + * + */ + File.prototype.setContent = function (content) { + var _this = this; + return this.clone(File, "$value", false).postCore({ + body: content, + headers: { + "X-HTTP-Method": "PUT", + }, + }).then(function (_) { return new File(_this); }); + }; + /** + * Gets the associated list item for this folder, loading the default properties + */ + File.prototype.getItem = function () { + var selects = []; + for (var _i = 0; _i < arguments.length; _i++) { + selects[_i] = arguments[_i]; + } + var q = this.listItemAllFields; + return q.select.apply(q, selects).get().then(function (d) { + return util_1.Util.extend(new items_1.Item(odata_1.spGetEntityUrl(d)), d); + }); + }; + /** + * Sets the contents of a file using a chunked upload approach. Not supported in batching. + * + * @param file The file to upload + * @param progress A callback function which can be used to track the progress of the upload + * @param chunkSize The size of each file slice, in bytes (default: 10485760) + */ + File.prototype.setContentChunked = function (file, progress, chunkSize) { + if (chunkSize === void 0) { chunkSize = 10485760; } + if (typeof progress === "undefined") { + progress = function () { return null; }; + } + var self = this; + var fileSize = file.size; + var blockCount = parseInt((file.size / chunkSize).toString(), 10) + ((file.size % chunkSize === 0) ? 1 : 0); + var uploadId = util_1.Util.getGUID(); + // start the chain with the first fragment + progress({ blockNumber: 1, chunkSize: chunkSize, currentPointer: 0, fileSize: fileSize, stage: "starting", totalBlocks: blockCount }); + var chain = self.startUpload(uploadId, file.slice(0, chunkSize)); + var _loop_1 = function (i) { + chain = chain.then(function (pointer) { + progress({ blockNumber: i, chunkSize: chunkSize, currentPointer: pointer, fileSize: fileSize, stage: "continue", totalBlocks: blockCount }); + return self.continueUpload(uploadId, pointer, file.slice(pointer, pointer + chunkSize)); + }); + }; + // skip the first and last blocks + for (var i = 2; i < blockCount; i++) { + _loop_1(i); + } + return chain.then(function (pointer) { + progress({ blockNumber: blockCount, chunkSize: chunkSize, currentPointer: pointer, fileSize: fileSize, stage: "finishing", totalBlocks: blockCount }); + return self.finishUpload(uploadId, pointer, file.slice(pointer)); + }).then(function (_) { + return self; + }); + }; + /** + * Starts a new chunk upload session and uploads the first fragment. + * The current file content is not changed when this method completes. + * The method is idempotent (and therefore does not change the result) as long as you use the same values for uploadId and stream. + * The upload session ends either when you use the CancelUpload method or when you successfully + * complete the upload session by passing the rest of the file contents through the ContinueUpload and FinishUpload methods. + * The StartUpload and ContinueUpload methods return the size of the running total of uploaded data in bytes, + * so you can pass those return values to subsequent uses of ContinueUpload and FinishUpload. + * This method is currently available only on Office 365. + * + * @param uploadId The unique identifier of the upload session. + * @param fragment The file contents. + * @returns The size of the total uploaded data in bytes. + */ + File.prototype.startUpload = function (uploadId, fragment) { + return this.clone(File, "startUpload(uploadId=guid'" + uploadId + "')", false).postAsCore({ body: fragment }).then(function (n) { return parseFloat(n); }); + }; + /** + * Continues the chunk upload session with an additional fragment. + * The current file content is not changed. + * Use the uploadId value that was passed to the StartUpload method that started the upload session. + * This method is currently available only on Office 365. + * + * @param uploadId The unique identifier of the upload session. + * @param fileOffset The size of the offset into the file where the fragment starts. + * @param fragment The file contents. + * @returns The size of the total uploaded data in bytes. + */ + File.prototype.continueUpload = function (uploadId, fileOffset, fragment) { + return this.clone(File, "continueUpload(uploadId=guid'" + uploadId + "',fileOffset=" + fileOffset + ")", false).postAsCore({ body: fragment }).then(function (n) { return parseFloat(n); }); + }; + /** + * Uploads the last file fragment and commits the file. The current file content is changed when this method completes. + * Use the uploadId value that was passed to the StartUpload method that started the upload session. + * This method is currently available only on Office 365. + * + * @param uploadId The unique identifier of the upload session. + * @param fileOffset The size of the offset into the file where the fragment starts. + * @param fragment The file contents. + * @returns The newly uploaded file. + */ + File.prototype.finishUpload = function (uploadId, fileOffset, fragment) { + return this.clone(File, "finishUpload(uploadId=guid'" + uploadId + "',fileOffset=" + fileOffset + ")", false) + .postAsCore({ body: fragment }).then(function (response) { + return { + data: response, + file: new File(response.ServerRelativeUrl), + }; + }); + }; + return File; +}(sharepointqueryableshareable_1.SharePointQueryableShareableFile)); +exports.File = File; +/** + * Describes a collection of Version objects + * + */ +var Versions = /** @class */ (function (_super) { + __extends(Versions, _super); + /** + * Creates a new instance of the File class + * + * @param baseUrl The url or SharePointQueryable which forms the parent of this fields collection + */ + function Versions(baseUrl, path) { + if (path === void 0) { path = "versions"; } + return _super.call(this, baseUrl, path) || this; + } + /** + * Gets a version by id + * + * @param versionId The id of the version to retrieve + */ + Versions.prototype.getById = function (versionId) { + var v = new Version(this); + v.concat("(" + versionId + ")"); + return v; + }; + /** + * Deletes all the file version objects in the collection. + * + */ + Versions.prototype.deleteAll = function () { + return new Versions(this, "deleteAll").postCore(); + }; + /** + * Deletes the specified version of the file. + * + * @param versionId The ID of the file version to delete. + */ + Versions.prototype.deleteById = function (versionId) { + return this.clone(Versions, "deleteById(vid=" + versionId + ")").postCore(); + }; + /** + * Deletes the file version object with the specified version label. + * + * @param label The version label of the file version to delete, for example: 1.2 + */ + Versions.prototype.deleteByLabel = function (label) { + return this.clone(Versions, "deleteByLabel(versionlabel='" + label + "')").postCore(); + }; + /** + * Creates a new file version from the file specified by the version label. + * + * @param label The version label of the file version to restore, for example: 1.2 + */ + Versions.prototype.restoreByLabel = function (label) { + return this.clone(Versions, "restoreByLabel(versionlabel='" + label + "')").postCore(); + }; + return Versions; +}(sharepointqueryable_1.SharePointQueryableCollection)); +exports.Versions = Versions; +/** + * Describes a single Version instance + * + */ +var Version = /** @class */ (function (_super) { + __extends(Version, _super); + function Version() { + return _super !== null && _super.apply(this, arguments) || this; + } + /** + * Delete a specific version of a file. + * + * @param eTag Value used in the IF-Match header, by default "*" + */ + Version.prototype.delete = function (eTag) { + if (eTag === void 0) { eTag = "*"; } + return this.postCore({ + headers: { + "IF-Match": eTag, + "X-HTTP-Method": "DELETE", + }, + }); + }; + return Version; +}(sharepointqueryable_1.SharePointQueryableInstance)); +exports.Version = Version; +var CheckinType; +(function (CheckinType) { + CheckinType[CheckinType["Minor"] = 0] = "Minor"; + CheckinType[CheckinType["Major"] = 1] = "Major"; + CheckinType[CheckinType["Overwrite"] = 2] = "Overwrite"; +})(CheckinType = exports.CheckinType || (exports.CheckinType = {})); +var WebPartsPersonalizationScope; +(function (WebPartsPersonalizationScope) { + WebPartsPersonalizationScope[WebPartsPersonalizationScope["User"] = 0] = "User"; + WebPartsPersonalizationScope[WebPartsPersonalizationScope["Shared"] = 1] = "Shared"; +})(WebPartsPersonalizationScope = exports.WebPartsPersonalizationScope || (exports.WebPartsPersonalizationScope = {})); +var MoveOperations; +(function (MoveOperations) { + MoveOperations[MoveOperations["Overwrite"] = 1] = "Overwrite"; + MoveOperations[MoveOperations["AllowBrokenThickets"] = 8] = "AllowBrokenThickets"; +})(MoveOperations = exports.MoveOperations || (exports.MoveOperations = {})); +var TemplateFileType; +(function (TemplateFileType) { + TemplateFileType[TemplateFileType["StandardPage"] = 0] = "StandardPage"; + TemplateFileType[TemplateFileType["WikiPage"] = 1] = "WikiPage"; + TemplateFileType[TemplateFileType["FormPage"] = 2] = "FormPage"; +})(TemplateFileType = exports.TemplateFileType || (exports.TemplateFileType = {})); + + +/***/ }), +/* 13 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +Object.defineProperty(exports, "__esModule", { value: true }); +var exceptions_1 = __webpack_require__(4); +var logging_1 = __webpack_require__(3); +var ODataParserBase = /** @class */ (function () { + function ODataParserBase() { + } + ODataParserBase.prototype.parse = function (r) { + var _this = this; + return new Promise(function (resolve, reject) { + if (_this.handleError(r, reject)) { + if ((r.headers.has("Content-Length") && parseFloat(r.headers.get("Content-Length")) === 0) || r.status === 204) { + resolve({}); + } + else { + // patch to handle cases of 200 response with no or whitespace only bodies (#487 & #545) + r.text() + .then(function (txt) { return txt.replace(/\s/ig, "").length > 0 ? JSON.parse(txt) : {}; }) + .then(function (json) { return resolve(_this.parseODataJSON(json)); }) + .catch(function (e) { return reject(e); }); + } + } + }); + }; + ODataParserBase.prototype.handleError = function (r, reject) { + if (!r.ok) { + r.json().then(function (json) { + // include the headers as they contain diagnostic information + var data = { + responseBody: json, + responseHeaders: r.headers, + }; + reject(new exceptions_1.ProcessHttpClientResponseException(r.status, r.statusText, data)); + }).catch(function (e) { + // we failed to read the body - possibly it is empty. Let's report the original status that caused + // the request to fail and log the error with parsing the body if anyone needs it for debugging + logging_1.Logger.log({ + data: e, + level: logging_1.LogLevel.Warning, + message: "There was an error parsing the error response body. See data for details.", + }); + // include the headers as they contain diagnostic information + var data = { + responseBody: "[[body not available]]", + responseHeaders: r.headers, + }; + reject(new exceptions_1.ProcessHttpClientResponseException(r.status, r.statusText, data)); + }); + } + return r.ok; + }; + ODataParserBase.prototype.parseODataJSON = function (json) { + var result = json; + if (json.hasOwnProperty("d")) { + if (json.d.hasOwnProperty("results")) { + result = json.d.results; + } + else { + result = json.d; + } + } + else if (json.hasOwnProperty("value")) { + result = json.value; + } + return result; + }; + return ODataParserBase; +}()); +exports.ODataParserBase = ODataParserBase; + + +/***/ }), +/* 14 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +var caching_1 = __webpack_require__(37); +var logging_1 = __webpack_require__(3); +var util_1 = __webpack_require__(0); +/** + * Resolves the context's result value + * + * @param context The current context + */ +function returnResult(context) { + logging_1.Logger.log({ + data: context.result, + level: logging_1.LogLevel.Verbose, + message: "[" + context.requestId + "] (" + (new Date()).getTime() + ") Returning result, see data property for value.", + }); + return Promise.resolve(context.result); +} +/** + * Sets the result on the context + */ +function setResult(context, value) { + return new Promise(function (resolve) { + context.result = value; + context.hasResult = true; + resolve(context); + }); +} +exports.setResult = setResult; +/** + * Invokes the next method in the provided context's pipeline + * + * @param c The current request context + */ +function next(c) { + if (c.pipeline.length < 1) { + return Promise.resolve(c); + } + return c.pipeline.shift()(c); +} +/** + * Executes the current request context's pipeline + * + * @param context Current context + */ +function pipe(context) { + return next(context) + .then(function (ctx) { return returnResult(ctx); }) + .catch(function (e) { + logging_1.Logger.log({ + data: e, + level: logging_1.LogLevel.Error, + message: "Error in request pipeline: " + e.message, + }); + throw e; + }); +} +exports.pipe = pipe; +/** + * decorator factory applied to methods in the pipeline to control behavior + */ +function requestPipelineMethod(alwaysRun) { + if (alwaysRun === void 0) { alwaysRun = false; } + return function (target, propertyKey, descriptor) { + var method = descriptor.value; + descriptor.value = function () { + var args = []; + for (var _i = 0; _i < arguments.length; _i++) { + args[_i] = arguments[_i]; + } + // if we have a result already in the pipeline, pass it along and don't call the tagged method + if (!alwaysRun && args.length > 0 && args[0].hasOwnProperty("hasResult") && args[0].hasResult) { + logging_1.Logger.write("[" + args[0].requestId + "] (" + (new Date()).getTime() + ") Skipping request pipeline method " + propertyKey + ", existing result in pipeline.", logging_1.LogLevel.Verbose); + return Promise.resolve(args[0]); + } + // apply the tagged method + logging_1.Logger.write("[" + args[0].requestId + "] (" + (new Date()).getTime() + ") Calling request pipeline method " + propertyKey + ".", logging_1.LogLevel.Verbose); + // then chain the next method in the context's pipeline - allows for dynamic pipeline + return method.apply(target, args).then(function (ctx) { return next(ctx); }); + }; + }; +} +exports.requestPipelineMethod = requestPipelineMethod; +/** + * Contains the methods used within the request pipeline + */ +var PipelineMethods = /** @class */ (function () { + function PipelineMethods() { + } + /** + * Logs the start of the request + */ + PipelineMethods.logStart = function (context) { + return new Promise(function (resolve) { + logging_1.Logger.log({ + data: logging_1.Logger.activeLogLevel === logging_1.LogLevel.Info ? {} : context, + level: logging_1.LogLevel.Info, + message: "[" + context.requestId + "] (" + (new Date()).getTime() + ") Beginning " + context.verb + " request (" + context.requestAbsoluteUrl + ")", + }); + resolve(context); + }); + }; + /** + * Handles caching of the request + */ + PipelineMethods.caching = function (context) { + return new Promise(function (resolve) { + // handle caching, if applicable + if (context.verb === "GET" && context.isCached) { + logging_1.Logger.write("[" + context.requestId + "] (" + (new Date()).getTime() + ") Caching is enabled for request, checking cache...", logging_1.LogLevel.Info); + var cacheOptions = new caching_1.CachingOptions(context.requestAbsoluteUrl.toLowerCase()); + if (typeof context.cachingOptions !== "undefined") { + cacheOptions = util_1.Util.extend(cacheOptions, context.cachingOptions); + } + // we may not have a valid store + if (cacheOptions.store !== null) { + // check if we have the data in cache and if so resolve the promise and return + var data = cacheOptions.store.get(cacheOptions.key); + if (data !== null) { + // ensure we clear any help batch dependency we are resolving from the cache + logging_1.Logger.log({ + data: logging_1.Logger.activeLogLevel === logging_1.LogLevel.Info ? {} : data, + level: logging_1.LogLevel.Info, + message: "[" + context.requestId + "] (" + (new Date()).getTime() + ") Value returned from cache.", + }); + context.batchDependency(); + return setResult(context, data).then(function (ctx) { return resolve(ctx); }); + } + } + logging_1.Logger.write("[" + context.requestId + "] (" + (new Date()).getTime() + ") Value not found in cache.", logging_1.LogLevel.Info); + // if we don't then wrap the supplied parser in the caching parser wrapper + // and send things on their way + context.parser = new caching_1.CachingParserWrapper(context.parser, cacheOptions); + } + return resolve(context); + }); + }; + /** + * Sends the request + */ + PipelineMethods.send = function (context) { + return new Promise(function (resolve, reject) { + // send or batch the request + if (context.isBatched) { + // we are in a batch, so add to batch, remove dependency, and resolve with the batch's promise + var p = context.batch.add(context.requestAbsoluteUrl, context.verb, context.options, context.parser); + // we release the dependency here to ensure the batch does not execute until the request is added to the batch + context.batchDependency(); + logging_1.Logger.write("[" + context.requestId + "] (" + (new Date()).getTime() + ") Batching request in batch " + context.batch.batchId + ".", logging_1.LogLevel.Info); + // we set the result as the promise which will be resolved by the batch's execution + resolve(setResult(context, p)); + } + else { + logging_1.Logger.write("[" + context.requestId + "] (" + (new Date()).getTime() + ") Sending request.", logging_1.LogLevel.Info); + // we are not part of a batch, so proceed as normal + var client = context.clientFactory(); + var opts = util_1.Util.extend(context.options || {}, { method: context.verb }); + client.fetch(context.requestAbsoluteUrl, opts) + .then(function (response) { return context.parser.parse(response); }) + .then(function (result) { return setResult(context, result); }) + .then(function (ctx) { return resolve(ctx); }) + .catch(function (e) { return reject(e); }); + } + }); + }; + /** + * Logs the end of the request + */ + PipelineMethods.logEnd = function (context) { + return new Promise(function (resolve) { + if (context.isBatched) { + logging_1.Logger.log({ + data: logging_1.Logger.activeLogLevel === logging_1.LogLevel.Info ? {} : context, + level: logging_1.LogLevel.Info, + message: "[" + context.requestId + "] (" + (new Date()).getTime() + ") " + context.verb + " request will complete in batch " + context.batch.batchId + ".", + }); + } + else { + logging_1.Logger.log({ + data: logging_1.Logger.activeLogLevel === logging_1.LogLevel.Info ? {} : context, + level: logging_1.LogLevel.Info, + message: "[" + context.requestId + "] (" + (new Date()).getTime() + ") Completing " + context.verb + " request.", + }); + } + resolve(context); + }); + }; + Object.defineProperty(PipelineMethods, "default", { + get: function () { + return [ + PipelineMethods.logStart, + PipelineMethods.caching, + PipelineMethods.send, + PipelineMethods.logEnd, + ]; + }, + enumerable: true, + configurable: true + }); + __decorate([ + requestPipelineMethod(true) + ], PipelineMethods, "logStart", null); + __decorate([ + requestPipelineMethod() + ], PipelineMethods, "caching", null); + __decorate([ + requestPipelineMethod() + ], PipelineMethods, "send", null); + __decorate([ + requestPipelineMethod(true) + ], PipelineMethods, "logEnd", null); + return PipelineMethods; +}()); +exports.PipelineMethods = PipelineMethods; + + +/***/ }), +/* 15 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var __extends = (this && this.__extends) || (function () { + var extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +var items_1 = __webpack_require__(16); +var views_1 = __webpack_require__(43); +var contenttypes_1 = __webpack_require__(20); +var fields_1 = __webpack_require__(29); +var forms_1 = __webpack_require__(44); +var subscriptions_1 = __webpack_require__(45); +var sharepointqueryable_1 = __webpack_require__(1); +var sharepointqueryablesecurable_1 = __webpack_require__(26); +var util_1 = __webpack_require__(0); +var usercustomactions_1 = __webpack_require__(21); +var odata_1 = __webpack_require__(6); +var exceptions_1 = __webpack_require__(4); +var folders_1 = __webpack_require__(19); +/** + * Describes a collection of List objects + * + */ +var Lists = /** @class */ (function (_super) { + __extends(Lists, _super); + /** + * Creates a new instance of the Lists class + * + * @param baseUrl The url or SharePointQueryable which forms the parent of this fields collection + */ + function Lists(baseUrl, path) { + if (path === void 0) { path = "lists"; } + return _super.call(this, baseUrl, path) || this; + } + /** + * Gets a list from the collection by title + * + * @param title The title of the list + */ + Lists.prototype.getByTitle = function (title) { + return new List(this, "getByTitle('" + title + "')"); + }; + /** + * Gets a list from the collection by guid id + * + * @param id The Id of the list (GUID) + */ + Lists.prototype.getById = function (id) { + var list = new List(this); + list.concat("('" + id + "')"); + return list; + }; + /** + * Adds a new list to the collection + * + * @param title The new list's title + * @param description The new list's description + * @param template The list template value + * @param enableContentTypes If true content types will be allowed and enabled, otherwise they will be disallowed and not enabled + * @param additionalSettings Will be passed as part of the list creation body + */ + Lists.prototype.add = function (title, description, template, enableContentTypes, additionalSettings) { + var _this = this; + if (description === void 0) { description = ""; } + if (template === void 0) { template = 100; } + if (enableContentTypes === void 0) { enableContentTypes = false; } + if (additionalSettings === void 0) { additionalSettings = {}; } + var addSettings = util_1.Util.extend({ + "AllowContentTypes": enableContentTypes, + "BaseTemplate": template, + "ContentTypesEnabled": enableContentTypes, + "Description": description, + "Title": title, + "__metadata": { "type": "SP.List" }, + }, additionalSettings); + return this.postCore({ body: JSON.stringify(addSettings) }).then(function (data) { + return { data: data, list: _this.getByTitle(addSettings.Title) }; + }); + }; + /** + * Ensures that the specified list exists in the collection (note: this method not supported for batching) + * + * @param title The new list's title + * @param description The new list's description + * @param template The list template value + * @param enableContentTypes If true content types will be allowed and enabled, otherwise they will be disallowed and not enabled + * @param additionalSettings Will be passed as part of the list creation body or used to update an existing list + */ + Lists.prototype.ensure = function (title, description, template, enableContentTypes, additionalSettings) { + var _this = this; + if (description === void 0) { description = ""; } + if (template === void 0) { template = 100; } + if (enableContentTypes === void 0) { enableContentTypes = false; } + if (additionalSettings === void 0) { additionalSettings = {}; } + if (this.hasBatch) { + throw new exceptions_1.NotSupportedInBatchException("The ensure list method"); + } + return new Promise(function (resolve, reject) { + var addOrUpdateSettings = util_1.Util.extend(additionalSettings, { Title: title, Description: description, ContentTypesEnabled: enableContentTypes }, true); + var list = _this.getByTitle(addOrUpdateSettings.Title); + list.get().then(function (_) { + list.update(addOrUpdateSettings).then(function (d) { + resolve({ created: false, data: d, list: _this.getByTitle(addOrUpdateSettings.Title) }); + }).catch(function (e) { return reject(e); }); + }).catch(function (_) { + _this.add(title, description, template, enableContentTypes, addOrUpdateSettings).then(function (r) { + resolve({ created: true, data: r.data, list: _this.getByTitle(addOrUpdateSettings.Title) }); + }).catch(function (e) { return reject(e); }); + }); + }); + }; + /** + * Gets a list that is the default asset location for images or other files, which the users upload to their wiki pages. + */ + Lists.prototype.ensureSiteAssetsLibrary = function () { + return this.clone(Lists, "ensuresiteassetslibrary").postCore().then(function (json) { + return new List(odata_1.spExtractODataId(json)); + }); + }; + /** + * Gets a list that is the default location for wiki pages. + */ + Lists.prototype.ensureSitePagesLibrary = function () { + return this.clone(Lists, "ensuresitepageslibrary").postCore().then(function (json) { + return new List(odata_1.spExtractODataId(json)); + }); + }; + return Lists; +}(sharepointqueryable_1.SharePointQueryableCollection)); +exports.Lists = Lists; +/** + * Describes a single List instance + * + */ +var List = /** @class */ (function (_super) { + __extends(List, _super); + function List() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(List.prototype, "contentTypes", { + /** + * Gets the content types in this list + * + */ + get: function () { + return new contenttypes_1.ContentTypes(this); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(List.prototype, "items", { + /** + * Gets the items in this list + * + */ + get: function () { + return new items_1.Items(this); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(List.prototype, "views", { + /** + * Gets the views in this list + * + */ + get: function () { + return new views_1.Views(this); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(List.prototype, "fields", { + /** + * Gets the fields in this list + * + */ + get: function () { + return new fields_1.Fields(this); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(List.prototype, "forms", { + /** + * Gets the forms in this list + * + */ + get: function () { + return new forms_1.Forms(this); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(List.prototype, "defaultView", { + /** + * Gets the default view of this list + * + */ + get: function () { + return new sharepointqueryable_1.SharePointQueryableInstance(this, "DefaultView"); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(List.prototype, "userCustomActions", { + /** + * Get all custom actions on a site collection + * + */ + get: function () { + return new usercustomactions_1.UserCustomActions(this); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(List.prototype, "effectiveBasePermissions", { + /** + * Gets the effective base permissions of this list + * + */ + get: function () { + return new sharepointqueryable_1.SharePointQueryable(this, "EffectiveBasePermissions"); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(List.prototype, "eventReceivers", { + /** + * Gets the event receivers attached to this list + * + */ + get: function () { + return new sharepointqueryable_1.SharePointQueryableCollection(this, "EventReceivers"); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(List.prototype, "relatedFields", { + /** + * Gets the related fields of this list + * + */ + get: function () { + return new sharepointqueryable_1.SharePointQueryable(this, "getRelatedFields"); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(List.prototype, "informationRightsManagementSettings", { + /** + * Gets the IRM settings for this list + * + */ + get: function () { + return new sharepointqueryable_1.SharePointQueryable(this, "InformationRightsManagementSettings"); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(List.prototype, "subscriptions", { + /** + * Gets the webhook subscriptions of this list + * + */ + get: function () { + return new subscriptions_1.Subscriptions(this); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(List.prototype, "rootFolder", { + /** + * The root folder of the list + */ + get: function () { + return new folders_1.Folder(this, "rootFolder"); + }, + enumerable: true, + configurable: true + }); + /** + * Gets a view by view guid id + * + */ + List.prototype.getView = function (viewId) { + return new views_1.View(this, "getView('" + viewId + "')"); + }; + /** + * Updates this list intance with the supplied properties + * + * @param properties A plain object hash of values to update for the list + * @param eTag Value used in the IF-Match header, by default "*" + */ + /* tslint:disable no-string-literal */ + List.prototype.update = function (properties, eTag) { + var _this = this; + if (eTag === void 0) { eTag = "*"; } + var postBody = JSON.stringify(util_1.Util.extend({ + "__metadata": { "type": "SP.List" }, + }, properties)); + return this.postCore({ + body: postBody, + headers: { + "IF-Match": eTag, + "X-HTTP-Method": "MERGE", + }, + }).then(function (data) { + var retList = _this; + if (properties.hasOwnProperty("Title")) { + retList = _this.getParent(List, _this.parentUrl, "getByTitle('" + properties["Title"] + "')"); + } + return { + data: data, + list: retList, + }; + }); + }; + /* tslint:enable */ + /** + * Delete this list + * + * @param eTag Value used in the IF-Match header, by default "*" + */ + List.prototype.delete = function (eTag) { + if (eTag === void 0) { eTag = "*"; } + return this.postCore({ + headers: { + "IF-Match": eTag, + "X-HTTP-Method": "DELETE", + }, + }); + }; + /** + * Returns the collection of changes from the change log that have occurred within the list, based on the specified query. + */ + List.prototype.getChanges = function (query) { + return this.clone(List, "getchanges").postCore({ + body: JSON.stringify({ "query": util_1.Util.extend({ "__metadata": { "type": "SP.ChangeQuery" } }, query) }), + }); + }; + /** + * Returns a collection of items from the list based on the specified query. + * + * @param CamlQuery The Query schema of Collaborative Application Markup + * Language (CAML) is used in various ways within the context of Microsoft SharePoint Foundation + * to define queries against list data. + * see: + * + * https://msdn.microsoft.com/en-us/library/office/ms467521.aspx + * + * @param expands A URI with a $expand System Query Option indicates that Entries associated with + * the Entry or Collection of Entries identified by the Resource Path + * section of the URI must be represented inline (i.e. eagerly loaded). + * see: + * + * https://msdn.microsoft.com/en-us/library/office/fp142385.aspx + * + * http://www.odata.org/documentation/odata-version-2-0/uri-conventions/#ExpandSystemQueryOption + */ + List.prototype.getItemsByCAMLQuery = function (query) { + var expands = []; + for (var _i = 1; _i < arguments.length; _i++) { + expands[_i - 1] = arguments[_i]; + } + var q = this.clone(List, "getitems"); + return q.expand.apply(q, expands).postCore({ + body: JSON.stringify({ "query": util_1.Util.extend({ "__metadata": { "type": "SP.CamlQuery" } }, query) }), + }); + }; + /** + * See: https://msdn.microsoft.com/en-us/library/office/dn292554.aspx + */ + List.prototype.getListItemChangesSinceToken = function (query) { + return this.clone(List, "getlistitemchangessincetoken").postCore({ + body: JSON.stringify({ "query": util_1.Util.extend({ "__metadata": { "type": "SP.ChangeLogItemQuery" } }, query) }), + }, { parse: function (r) { return r.text(); } }); + }; + /** + * Moves the list to the Recycle Bin and returns the identifier of the new Recycle Bin item. + */ + List.prototype.recycle = function () { + return this.clone(List, "recycle").postCore().then(function (data) { + if (data.hasOwnProperty("Recycle")) { + return data.Recycle; + } + else { + return data; + } + }); + }; + /** + * Renders list data based on the view xml provided + */ + List.prototype.renderListData = function (viewXml) { + var q = this.clone(List, "renderlistdata(@viewXml)"); + q.query.add("@viewXml", "'" + viewXml + "'"); + return q.postCore().then(function (data) { + // data will be a string, so we parse it again + data = JSON.parse(data); + if (data.hasOwnProperty("RenderListData")) { + return data.RenderListData; + } + else { + return data; + } + }); + }; + /** + * Returns the data for the specified query view + * + * @param parameters The parameters to be used to render list data as JSON string. + * @param overrideParameters The parameters that are used to override and extend the regular SPRenderListDataParameters. + */ + List.prototype.renderListDataAsStream = function (parameters, overrideParameters) { + if (overrideParameters === void 0) { overrideParameters = null; } + var postBody = { + overrideParameters: util_1.Util.extend({ + "__metadata": { "type": "SP.RenderListDataOverrideParameters" }, + }, overrideParameters), + parameters: util_1.Util.extend({ + "__metadata": { "type": "SP.RenderListDataParameters" }, + }, parameters), + }; + return this.clone(List, "RenderListDataAsStream", true).postCore({ + body: JSON.stringify(postBody), + }); + }; + /** + * Gets the field values and field schema attributes for a list item. + */ + List.prototype.renderListFormData = function (itemId, formId, mode) { + return this.clone(List, "renderlistformdata(itemid=" + itemId + ", formid='" + formId + "', mode='" + mode + "')").postCore().then(function (data) { + // data will be a string, so we parse it again + data = JSON.parse(data); + if (data.hasOwnProperty("ListData")) { + return data.ListData; + } + else { + return data; + } + }); + }; + /** + * Reserves a list item ID for idempotent list item creation. + */ + List.prototype.reserveListItemId = function () { + return this.clone(List, "reservelistitemid").postCore().then(function (data) { + if (data.hasOwnProperty("ReserveListItemId")) { + return data.ReserveListItemId; + } + else { + return data; + } + }); + }; + /** + * Returns the ListItemEntityTypeFullName for this list, used when adding/updating list items. Does not support batching. + * + */ + List.prototype.getListItemEntityTypeFullName = function () { + return this.clone(List, null, false).select("ListItemEntityTypeFullName").getAs().then(function (o) { return o.ListItemEntityTypeFullName; }); + }; + return List; +}(sharepointqueryablesecurable_1.SharePointQueryableSecurable)); +exports.List = List; + + +/***/ }), +/* 16 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var __extends = (this && this.__extends) || (function () { + var extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +var sharepointqueryable_1 = __webpack_require__(1); +var sharepointqueryableshareable_1 = __webpack_require__(11); +var folders_1 = __webpack_require__(19); +var files_1 = __webpack_require__(12); +var contenttypes_1 = __webpack_require__(20); +var util_1 = __webpack_require__(0); +var core_1 = __webpack_require__(13); +var attachmentfiles_1 = __webpack_require__(42); +var lists_1 = __webpack_require__(15); +/** + * Describes a collection of Item objects + * + */ +var Items = /** @class */ (function (_super) { + __extends(Items, _super); + /** + * Creates a new instance of the Items class + * + * @param baseUrl The url or SharePointQueryable which forms the parent of this fields collection + */ + function Items(baseUrl, path) { + if (path === void 0) { path = "items"; } + return _super.call(this, baseUrl, path) || this; + } + /** + * Gets an Item by id + * + * @param id The integer id of the item to retrieve + */ + Items.prototype.getById = function (id) { + var i = new Item(this); + i.concat("(" + id + ")"); + return i; + }; + /** + * Skips the specified number of items (https://msdn.microsoft.com/en-us/library/office/fp142385.aspx#sectionSection6) + * + * @param skip The starting id where the page should start, use with top to specify pages + */ + Items.prototype.skip = function (skip) { + this._query.add("$skiptoken", encodeURIComponent("Paged=TRUE&p_ID=" + skip)); + return this; + }; + /** + * Gets a collection designed to aid in paging through data + * + */ + Items.prototype.getPaged = function () { + return this.getAs(new PagedItemCollectionParser()); + }; + // + /** + * Adds a new item to the collection + * + * @param properties The new items's properties + */ + Items.prototype.add = function (properties, listItemEntityTypeFullName) { + var _this = this; + if (properties === void 0) { properties = {}; } + if (listItemEntityTypeFullName === void 0) { listItemEntityTypeFullName = null; } + var removeDependency = this.addBatchDependency(); + return this.ensureListItemEntityTypeName(listItemEntityTypeFullName).then(function (listItemEntityType) { + var postBody = JSON.stringify(util_1.Util.extend({ + "__metadata": { "type": listItemEntityType }, + }, properties)); + var promise = _this.clone(Items, null).postAsCore({ body: postBody }).then(function (data) { + return { + data: data, + item: _this.getById(data.Id), + }; + }); + removeDependency(); + return promise; + }); + }; + /** + * Ensures we have the proper list item entity type name, either from the value provided or from the list + * + * @param candidatelistItemEntityTypeFullName The potential type name + */ + Items.prototype.ensureListItemEntityTypeName = function (candidatelistItemEntityTypeFullName) { + return candidatelistItemEntityTypeFullName ? + Promise.resolve(candidatelistItemEntityTypeFullName) : + this.getParent(lists_1.List).getListItemEntityTypeFullName(); + }; + return Items; +}(sharepointqueryable_1.SharePointQueryableCollection)); +exports.Items = Items; +/** + * Descrines a single Item instance + * + */ +var Item = /** @class */ (function (_super) { + __extends(Item, _super); + function Item() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(Item.prototype, "attachmentFiles", { + /** + * Gets the set of attachments for this item + * + */ + get: function () { + return new attachmentfiles_1.AttachmentFiles(this); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Item.prototype, "contentType", { + /** + * Gets the content type for this item + * + */ + get: function () { + return new contenttypes_1.ContentType(this, "ContentType"); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Item.prototype, "effectiveBasePermissions", { + /** + * Gets the effective base permissions for the item + * + */ + get: function () { + return new sharepointqueryable_1.SharePointQueryable(this, "EffectiveBasePermissions"); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Item.prototype, "effectiveBasePermissionsForUI", { + /** + * Gets the effective base permissions for the item in a UI context + * + */ + get: function () { + return new sharepointqueryable_1.SharePointQueryable(this, "EffectiveBasePermissionsForUI"); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Item.prototype, "fieldValuesAsHTML", { + /** + * Gets the field values for this list item in their HTML representation + * + */ + get: function () { + return new sharepointqueryable_1.SharePointQueryableInstance(this, "FieldValuesAsHTML"); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Item.prototype, "fieldValuesAsText", { + /** + * Gets the field values for this list item in their text representation + * + */ + get: function () { + return new sharepointqueryable_1.SharePointQueryableInstance(this, "FieldValuesAsText"); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Item.prototype, "fieldValuesForEdit", { + /** + * Gets the field values for this list item for use in editing controls + * + */ + get: function () { + return new sharepointqueryable_1.SharePointQueryableInstance(this, "FieldValuesForEdit"); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Item.prototype, "folder", { + /** + * Gets the folder associated with this list item (if this item represents a folder) + * + */ + get: function () { + return new folders_1.Folder(this, "folder"); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Item.prototype, "file", { + /** + * Gets the folder associated with this list item (if this item represents a folder) + * + */ + get: function () { + return new files_1.File(this, "file"); + }, + enumerable: true, + configurable: true + }); + /** + * Updates this list intance with the supplied properties + * + * @param properties A plain object hash of values to update for the list + * @param eTag Value used in the IF-Match header, by default "*" + */ + Item.prototype.update = function (properties, eTag, listItemEntityTypeFullName) { + var _this = this; + if (eTag === void 0) { eTag = "*"; } + if (listItemEntityTypeFullName === void 0) { listItemEntityTypeFullName = null; } + return new Promise(function (resolve, reject) { + var removeDependency = _this.addBatchDependency(); + return _this.ensureListItemEntityTypeName(listItemEntityTypeFullName).then(function (listItemEntityType) { + var postBody = JSON.stringify(util_1.Util.extend({ + "__metadata": { "type": listItemEntityType }, + }, properties)); + removeDependency(); + return _this.postCore({ + body: postBody, + headers: { + "IF-Match": eTag, + "X-HTTP-Method": "MERGE", + }, + }, new ItemUpdatedParser()).then(function (data) { + resolve({ + data: data, + item: _this, + }); + }); + }).catch(function (e) { return reject(e); }); + }); + }; + /** + * Delete this item + * + * @param eTag Value used in the IF-Match header, by default "*" + */ + Item.prototype.delete = function (eTag) { + if (eTag === void 0) { eTag = "*"; } + return this.postCore({ + headers: { + "IF-Match": eTag, + "X-HTTP-Method": "DELETE", + }, + }); + }; + /** + * Moves the list item to the Recycle Bin and returns the identifier of the new Recycle Bin item. + */ + Item.prototype.recycle = function () { + return this.clone(Item, "recycle").postCore(); + }; + /** + * Gets a string representation of the full URL to the WOPI frame. + * If there is no associated WOPI application, or no associated action, an empty string is returned. + * + * @param action Display mode: 0: view, 1: edit, 2: mobileView, 3: interactivePreview + */ + Item.prototype.getWopiFrameUrl = function (action) { + if (action === void 0) { action = 0; } + var i = this.clone(Item, "getWOPIFrameUrl(@action)"); + i._query.add("@action", action); + return i.postCore().then(function (data) { + // handle verbose mode + if (data.hasOwnProperty("GetWOPIFrameUrl")) { + return data.GetWOPIFrameUrl; + } + return data; + }); + }; + /** + * Validates and sets the values of the specified collection of fields for the list item. + * + * @param formValues The fields to change and their new values. + * @param newDocumentUpdate true if the list item is a document being updated after upload; otherwise false. + */ + Item.prototype.validateUpdateListItem = function (formValues, newDocumentUpdate) { + if (newDocumentUpdate === void 0) { newDocumentUpdate = false; } + return this.clone(Item, "validateupdatelistitem").postCore({ + body: JSON.stringify({ "formValues": formValues, bNewDocumentUpdate: newDocumentUpdate }), + }); + }; + /** + * Ensures we have the proper list item entity type name, either from the value provided or from the list + * + * @param candidatelistItemEntityTypeFullName The potential type name + */ + Item.prototype.ensureListItemEntityTypeName = function (candidatelistItemEntityTypeFullName) { + return candidatelistItemEntityTypeFullName ? + Promise.resolve(candidatelistItemEntityTypeFullName) : + this.getParent(lists_1.List, this.parentUrl.substr(0, this.parentUrl.lastIndexOf("/"))).getListItemEntityTypeFullName(); + }; + return Item; +}(sharepointqueryableshareable_1.SharePointQueryableShareableItem)); +exports.Item = Item; +/** + * Provides paging functionality for list items + */ +var PagedItemCollection = /** @class */ (function () { + function PagedItemCollection(nextUrl, results) { + this.nextUrl = nextUrl; + this.results = results; + } + Object.defineProperty(PagedItemCollection.prototype, "hasNext", { + /** + * If true there are more results available in the set, otherwise there are not + */ + get: function () { + return typeof this.nextUrl === "string" && this.nextUrl.length > 0; + }, + enumerable: true, + configurable: true + }); + /** + * Gets the next set of results, or resolves to null if no results are available + */ + PagedItemCollection.prototype.getNext = function () { + if (this.hasNext) { + var items = new Items(this.nextUrl, null); + return items.getPaged(); + } + return new Promise(function (r) { return r(null); }); + }; + return PagedItemCollection; +}()); +exports.PagedItemCollection = PagedItemCollection; +var PagedItemCollectionParser = /** @class */ (function (_super) { + __extends(PagedItemCollectionParser, _super); + function PagedItemCollectionParser() { + return _super !== null && _super.apply(this, arguments) || this; + } + PagedItemCollectionParser.prototype.parse = function (r) { + var _this = this; + return new Promise(function (resolve, reject) { + if (_this.handleError(r, reject)) { + r.json().then(function (json) { + var nextUrl = json.hasOwnProperty("d") && json.d.hasOwnProperty("__next") ? json.d.__next : json["odata.nextLink"]; + resolve(new PagedItemCollection(nextUrl, _this.parseODataJSON(json))); + }); + } + }); + }; + return PagedItemCollectionParser; +}(core_1.ODataParserBase)); +var ItemUpdatedParser = /** @class */ (function (_super) { + __extends(ItemUpdatedParser, _super); + function ItemUpdatedParser() { + return _super !== null && _super.apply(this, arguments) || this; + } + ItemUpdatedParser.prototype.parse = function (r) { + var _this = this; + return new Promise(function (resolve, reject) { + if (_this.handleError(r, reject)) { + resolve({ + "odata.etag": r.headers.get("etag"), + }); + } + }); + }; + return ItemUpdatedParser; +}(core_1.ODataParserBase)); + + +/***/ }), +/* 17 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var __extends = (this && this.__extends) || (function () { + var extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +var sharepointqueryable_1 = __webpack_require__(1); +var siteusers_1 = __webpack_require__(28); +var util_1 = __webpack_require__(0); +/** + * Principal Type enum + * + */ +var PrincipalType; +(function (PrincipalType) { + PrincipalType[PrincipalType["None"] = 0] = "None"; + PrincipalType[PrincipalType["User"] = 1] = "User"; + PrincipalType[PrincipalType["DistributionList"] = 2] = "DistributionList"; + PrincipalType[PrincipalType["SecurityGroup"] = 4] = "SecurityGroup"; + PrincipalType[PrincipalType["SharePointGroup"] = 8] = "SharePointGroup"; + PrincipalType[PrincipalType["All"] = 15] = "All"; +})(PrincipalType = exports.PrincipalType || (exports.PrincipalType = {})); +/** + * Describes a collection of site groups + * + */ +var SiteGroups = /** @class */ (function (_super) { + __extends(SiteGroups, _super); + /** + * Creates a new instance of the SiteGroups class + * + * @param baseUrl The url or SharePointQueryable which forms the parent of this group collection + */ + function SiteGroups(baseUrl, path) { + if (path === void 0) { path = "sitegroups"; } + return _super.call(this, baseUrl, path) || this; + } + /** + * Adds a new group to the site collection + * + * @param props The group properties object of property names and values to be set for the group + */ + SiteGroups.prototype.add = function (properties) { + var _this = this; + var postBody = JSON.stringify(util_1.Util.extend({ "__metadata": { "type": "SP.Group" } }, properties)); + return this.postCore({ body: postBody }).then(function (data) { + return { + data: data, + group: _this.getById(data.Id), + }; + }); + }; + /** + * Gets a group from the collection by name + * + * @param groupName The name of the group to retrieve + */ + SiteGroups.prototype.getByName = function (groupName) { + return new SiteGroup(this, "getByName('" + groupName + "')"); + }; + /** + * Gets a group from the collection by id + * + * @param id The id of the group to retrieve + */ + SiteGroups.prototype.getById = function (id) { + var sg = new SiteGroup(this); + sg.concat("(" + id + ")"); + return sg; + }; + /** + * Removes the group with the specified member id from the collection + * + * @param id The id of the group to remove + */ + SiteGroups.prototype.removeById = function (id) { + return this.clone(SiteGroups, "removeById('" + id + "')").postCore(); + }; + /** + * Removes the cross-site group with the specified name from the collection + * + * @param loginName The name of the group to remove + */ + SiteGroups.prototype.removeByLoginName = function (loginName) { + return this.clone(SiteGroups, "removeByLoginName('" + loginName + "')").postCore(); + }; + return SiteGroups; +}(sharepointqueryable_1.SharePointQueryableCollection)); +exports.SiteGroups = SiteGroups; +/** + * Describes a single group + * + */ +var SiteGroup = /** @class */ (function (_super) { + __extends(SiteGroup, _super); + function SiteGroup() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(SiteGroup.prototype, "users", { + /** + * Gets the users for this group + * + */ + get: function () { + return new siteusers_1.SiteUsers(this, "users"); + }, + enumerable: true, + configurable: true + }); + /** + * Updates this group instance with the supplied properties + * + * @param properties A GroupWriteableProperties object of property names and values to update for the group + */ + /* tslint:disable no-string-literal */ + SiteGroup.prototype.update = function (properties) { + var _this = this; + var postBody = util_1.Util.extend({ "__metadata": { "type": "SP.Group" } }, properties); + return this.postCore({ + body: JSON.stringify(postBody), + headers: { + "X-HTTP-Method": "MERGE", + }, + }).then(function (data) { + var retGroup = _this; + if (properties.hasOwnProperty("Title")) { + retGroup = _this.getParent(SiteGroup, _this.parentUrl, "getByName('" + properties["Title"] + "')"); + } + return { + data: data, + group: retGroup, + }; + }); + }; + return SiteGroup; +}(sharepointqueryable_1.SharePointQueryableInstance)); +exports.SiteGroup = SiteGroup; + + +/***/ }), +/* 18 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +Object.defineProperty(exports, "__esModule", { value: true }); +/** + * Determines the display mode of the given control or view + */ +var ControlMode; +(function (ControlMode) { + ControlMode[ControlMode["Display"] = 1] = "Display"; + ControlMode[ControlMode["Edit"] = 2] = "Edit"; + ControlMode[ControlMode["New"] = 3] = "New"; +})(ControlMode = exports.ControlMode || (exports.ControlMode = {})); +/** + * Specifies the type of the field. + */ +var FieldTypes; +(function (FieldTypes) { + FieldTypes[FieldTypes["Invalid"] = 0] = "Invalid"; + FieldTypes[FieldTypes["Integer"] = 1] = "Integer"; + FieldTypes[FieldTypes["Text"] = 2] = "Text"; + FieldTypes[FieldTypes["Note"] = 3] = "Note"; + FieldTypes[FieldTypes["DateTime"] = 4] = "DateTime"; + FieldTypes[FieldTypes["Counter"] = 5] = "Counter"; + FieldTypes[FieldTypes["Choice"] = 6] = "Choice"; + FieldTypes[FieldTypes["Lookup"] = 7] = "Lookup"; + FieldTypes[FieldTypes["Boolean"] = 8] = "Boolean"; + FieldTypes[FieldTypes["Number"] = 9] = "Number"; + FieldTypes[FieldTypes["Currency"] = 10] = "Currency"; + FieldTypes[FieldTypes["URL"] = 11] = "URL"; + FieldTypes[FieldTypes["Computed"] = 12] = "Computed"; + FieldTypes[FieldTypes["Threading"] = 13] = "Threading"; + FieldTypes[FieldTypes["Guid"] = 14] = "Guid"; + FieldTypes[FieldTypes["MultiChoice"] = 15] = "MultiChoice"; + FieldTypes[FieldTypes["GridChoice"] = 16] = "GridChoice"; + FieldTypes[FieldTypes["Calculated"] = 17] = "Calculated"; + FieldTypes[FieldTypes["File"] = 18] = "File"; + FieldTypes[FieldTypes["Attachments"] = 19] = "Attachments"; + FieldTypes[FieldTypes["User"] = 20] = "User"; + FieldTypes[FieldTypes["Recurrence"] = 21] = "Recurrence"; + FieldTypes[FieldTypes["CrossProjectLink"] = 22] = "CrossProjectLink"; + FieldTypes[FieldTypes["ModStat"] = 23] = "ModStat"; + FieldTypes[FieldTypes["Error"] = 24] = "Error"; + FieldTypes[FieldTypes["ContentTypeId"] = 25] = "ContentTypeId"; + FieldTypes[FieldTypes["PageSeparator"] = 26] = "PageSeparator"; + FieldTypes[FieldTypes["ThreadIndex"] = 27] = "ThreadIndex"; + FieldTypes[FieldTypes["WorkflowStatus"] = 28] = "WorkflowStatus"; + FieldTypes[FieldTypes["AllDayEvent"] = 29] = "AllDayEvent"; + FieldTypes[FieldTypes["WorkflowEventType"] = 30] = "WorkflowEventType"; +})(FieldTypes = exports.FieldTypes || (exports.FieldTypes = {})); +var DateTimeFieldFormatType; +(function (DateTimeFieldFormatType) { + DateTimeFieldFormatType[DateTimeFieldFormatType["DateOnly"] = 0] = "DateOnly"; + DateTimeFieldFormatType[DateTimeFieldFormatType["DateTime"] = 1] = "DateTime"; +})(DateTimeFieldFormatType = exports.DateTimeFieldFormatType || (exports.DateTimeFieldFormatType = {})); +/** + * Specifies the control settings while adding a field. + */ +var AddFieldOptions; +(function (AddFieldOptions) { + /** + * Specify that a new field added to the list must also be added to the default content type in the site collection + */ + AddFieldOptions[AddFieldOptions["DefaultValue"] = 0] = "DefaultValue"; + /** + * Specify that a new field added to the list must also be added to the default content type in the site collection. + */ + AddFieldOptions[AddFieldOptions["AddToDefaultContentType"] = 1] = "AddToDefaultContentType"; + /** + * Specify that a new field must not be added to any other content type + */ + AddFieldOptions[AddFieldOptions["AddToNoContentType"] = 2] = "AddToNoContentType"; + /** + * Specify that a new field that is added to the specified list must also be added to all content types in the site collection + */ + AddFieldOptions[AddFieldOptions["AddToAllContentTypes"] = 4] = "AddToAllContentTypes"; + /** + * Specify adding an internal field name hint for the purpose of avoiding possible database locking or field renaming operations + */ + AddFieldOptions[AddFieldOptions["AddFieldInternalNameHint"] = 8] = "AddFieldInternalNameHint"; + /** + * Specify that a new field that is added to the specified list must also be added to the default list view + */ + AddFieldOptions[AddFieldOptions["AddFieldToDefaultView"] = 16] = "AddFieldToDefaultView"; + /** + * Specify to confirm that no other field has the same display name + */ + AddFieldOptions[AddFieldOptions["AddFieldCheckDisplayName"] = 32] = "AddFieldCheckDisplayName"; +})(AddFieldOptions = exports.AddFieldOptions || (exports.AddFieldOptions = {})); +var CalendarType; +(function (CalendarType) { + CalendarType[CalendarType["Gregorian"] = 1] = "Gregorian"; + CalendarType[CalendarType["Japan"] = 3] = "Japan"; + CalendarType[CalendarType["Taiwan"] = 4] = "Taiwan"; + CalendarType[CalendarType["Korea"] = 5] = "Korea"; + CalendarType[CalendarType["Hijri"] = 6] = "Hijri"; + CalendarType[CalendarType["Thai"] = 7] = "Thai"; + CalendarType[CalendarType["Hebrew"] = 8] = "Hebrew"; + CalendarType[CalendarType["GregorianMEFrench"] = 9] = "GregorianMEFrench"; + CalendarType[CalendarType["GregorianArabic"] = 10] = "GregorianArabic"; + CalendarType[CalendarType["GregorianXLITEnglish"] = 11] = "GregorianXLITEnglish"; + CalendarType[CalendarType["GregorianXLITFrench"] = 12] = "GregorianXLITFrench"; + CalendarType[CalendarType["KoreaJapanLunar"] = 14] = "KoreaJapanLunar"; + CalendarType[CalendarType["ChineseLunar"] = 15] = "ChineseLunar"; + CalendarType[CalendarType["SakaEra"] = 16] = "SakaEra"; + CalendarType[CalendarType["UmAlQura"] = 23] = "UmAlQura"; +})(CalendarType = exports.CalendarType || (exports.CalendarType = {})); +var UrlFieldFormatType; +(function (UrlFieldFormatType) { + UrlFieldFormatType[UrlFieldFormatType["Hyperlink"] = 0] = "Hyperlink"; + UrlFieldFormatType[UrlFieldFormatType["Image"] = 1] = "Image"; +})(UrlFieldFormatType = exports.UrlFieldFormatType || (exports.UrlFieldFormatType = {})); +var PermissionKind; +(function (PermissionKind) { + /** + * Has no permissions on the Site. Not available through the user interface. + */ + PermissionKind[PermissionKind["EmptyMask"] = 0] = "EmptyMask"; + /** + * View items in lists, documents in document libraries, and Web discussion comments. + */ + PermissionKind[PermissionKind["ViewListItems"] = 1] = "ViewListItems"; + /** + * Add items to lists, documents to document libraries, and Web discussion comments. + */ + PermissionKind[PermissionKind["AddListItems"] = 2] = "AddListItems"; + /** + * Edit items in lists, edit documents in document libraries, edit Web discussion comments + * in documents, and customize Web Part Pages in document libraries. + */ + PermissionKind[PermissionKind["EditListItems"] = 3] = "EditListItems"; + /** + * Delete items from a list, documents from a document library, and Web discussion + * comments in documents. + */ + PermissionKind[PermissionKind["DeleteListItems"] = 4] = "DeleteListItems"; + /** + * Approve a minor version of a list item or document. + */ + PermissionKind[PermissionKind["ApproveItems"] = 5] = "ApproveItems"; + /** + * View the source of documents with server-side file handlers. + */ + PermissionKind[PermissionKind["OpenItems"] = 6] = "OpenItems"; + /** + * View past versions of a list item or document. + */ + PermissionKind[PermissionKind["ViewVersions"] = 7] = "ViewVersions"; + /** + * Delete past versions of a list item or document. + */ + PermissionKind[PermissionKind["DeleteVersions"] = 8] = "DeleteVersions"; + /** + * Discard or check in a document which is checked out to another user. + */ + PermissionKind[PermissionKind["CancelCheckout"] = 9] = "CancelCheckout"; + /** + * Create, change, and delete personal views of lists. + */ + PermissionKind[PermissionKind["ManagePersonalViews"] = 10] = "ManagePersonalViews"; + /** + * Create and delete lists, add or remove columns in a list, and add or remove public views of a list. + */ + PermissionKind[PermissionKind["ManageLists"] = 12] = "ManageLists"; + /** + * View forms, views, and application pages, and enumerate lists. + */ + PermissionKind[PermissionKind["ViewFormPages"] = 13] = "ViewFormPages"; + /** + * Make content of a list or document library retrieveable for anonymous users through SharePoint search. + * The list permissions in the site do not change. + */ + PermissionKind[PermissionKind["AnonymousSearchAccessList"] = 14] = "AnonymousSearchAccessList"; + /** + * Allow users to open a Site, list, or folder to access items inside that container. + */ + PermissionKind[PermissionKind["Open"] = 17] = "Open"; + /** + * View pages in a Site. + */ + PermissionKind[PermissionKind["ViewPages"] = 18] = "ViewPages"; + /** + * Add, change, or delete HTML pages or Web Part Pages, and edit the Site using + * a Windows SharePoint Services compatible editor. + */ + PermissionKind[PermissionKind["AddAndCustomizePages"] = 19] = "AddAndCustomizePages"; + /** + * Apply a theme or borders to the entire Site. + */ + PermissionKind[PermissionKind["ApplyThemeAndBorder"] = 20] = "ApplyThemeAndBorder"; + /** + * Apply a style sheet (.css file) to the Site. + */ + PermissionKind[PermissionKind["ApplyStyleSheets"] = 21] = "ApplyStyleSheets"; + /** + * View reports on Site usage. + */ + PermissionKind[PermissionKind["ViewUsageData"] = 22] = "ViewUsageData"; + /** + * Create a Site using Self-Service Site Creation. + */ + PermissionKind[PermissionKind["CreateSSCSite"] = 23] = "CreateSSCSite"; + /** + * Create subsites such as team sites, Meeting Workspace sites, and Document Workspace sites. + */ + PermissionKind[PermissionKind["ManageSubwebs"] = 24] = "ManageSubwebs"; + /** + * Create a group of users that can be used anywhere within the site collection. + */ + PermissionKind[PermissionKind["CreateGroups"] = 25] = "CreateGroups"; + /** + * Create and change permission levels on the Site and assign permissions to users + * and groups. + */ + PermissionKind[PermissionKind["ManagePermissions"] = 26] = "ManagePermissions"; + /** + * Enumerate files and folders in a Site using Microsoft Office SharePoint Designer + * and WebDAV interfaces. + */ + PermissionKind[PermissionKind["BrowseDirectories"] = 27] = "BrowseDirectories"; + /** + * View information about users of the Site. + */ + PermissionKind[PermissionKind["BrowseUserInfo"] = 28] = "BrowseUserInfo"; + /** + * Add or remove personal Web Parts on a Web Part Page. + */ + PermissionKind[PermissionKind["AddDelPrivateWebParts"] = 29] = "AddDelPrivateWebParts"; + /** + * Update Web Parts to display personalized information. + */ + PermissionKind[PermissionKind["UpdatePersonalWebParts"] = 30] = "UpdatePersonalWebParts"; + /** + * Grant the ability to perform all administration tasks for the Site as well as + * manage content, activate, deactivate, or edit properties of Site scoped Features + * through the object model or through the user interface (UI). When granted on the + * root Site of a Site Collection, activate, deactivate, or edit properties of + * site collection scoped Features through the object model. To browse to the Site + * Collection Features page and activate or deactivate Site Collection scoped Features + * through the UI, you must be a Site Collection administrator. + */ + PermissionKind[PermissionKind["ManageWeb"] = 31] = "ManageWeb"; + /** + * Content of lists and document libraries in the Web site will be retrieveable for anonymous users through + * SharePoint search if the list or document library has AnonymousSearchAccessList set. + */ + PermissionKind[PermissionKind["AnonymousSearchAccessWebLists"] = 32] = "AnonymousSearchAccessWebLists"; + /** + * Use features that launch client applications. Otherwise, users must work on documents + * locally and upload changes. + */ + PermissionKind[PermissionKind["UseClientIntegration"] = 37] = "UseClientIntegration"; + /** + * Use SOAP, WebDAV, or Microsoft Office SharePoint Designer interfaces to access the Site. + */ + PermissionKind[PermissionKind["UseRemoteAPIs"] = 38] = "UseRemoteAPIs"; + /** + * Manage alerts for all users of the Site. + */ + PermissionKind[PermissionKind["ManageAlerts"] = 39] = "ManageAlerts"; + /** + * Create e-mail alerts. + */ + PermissionKind[PermissionKind["CreateAlerts"] = 40] = "CreateAlerts"; + /** + * Allows a user to change his or her user information, such as adding a picture. + */ + PermissionKind[PermissionKind["EditMyUserInfo"] = 41] = "EditMyUserInfo"; + /** + * Enumerate permissions on Site, list, folder, document, or list item. + */ + PermissionKind[PermissionKind["EnumeratePermissions"] = 63] = "EnumeratePermissions"; + /** + * Has all permissions on the Site. Not available through the user interface. + */ + PermissionKind[PermissionKind["FullMask"] = 65] = "FullMask"; +})(PermissionKind = exports.PermissionKind || (exports.PermissionKind = {})); +var PrincipalType; +(function (PrincipalType) { + PrincipalType[PrincipalType["None"] = 0] = "None"; + PrincipalType[PrincipalType["User"] = 1] = "User"; + PrincipalType[PrincipalType["DistributionList"] = 2] = "DistributionList"; + PrincipalType[PrincipalType["SecurityGroup"] = 4] = "SecurityGroup"; + PrincipalType[PrincipalType["SharePointGroup"] = 8] = "SharePointGroup"; + PrincipalType[PrincipalType["All"] = 15] = "All"; +})(PrincipalType = exports.PrincipalType || (exports.PrincipalType = {})); +var PrincipalSource; +(function (PrincipalSource) { + PrincipalSource[PrincipalSource["None"] = 0] = "None"; + PrincipalSource[PrincipalSource["UserInfoList"] = 1] = "UserInfoList"; + PrincipalSource[PrincipalSource["Windows"] = 2] = "Windows"; + PrincipalSource[PrincipalSource["MembershipProvider"] = 4] = "MembershipProvider"; + PrincipalSource[PrincipalSource["RoleProvider"] = 8] = "RoleProvider"; + PrincipalSource[PrincipalSource["All"] = 15] = "All"; +})(PrincipalSource = exports.PrincipalSource || (exports.PrincipalSource = {})); +var RoleType; +(function (RoleType) { + RoleType[RoleType["None"] = 0] = "None"; + RoleType[RoleType["Guest"] = 1] = "Guest"; + RoleType[RoleType["Reader"] = 2] = "Reader"; + RoleType[RoleType["Contributor"] = 3] = "Contributor"; + RoleType[RoleType["WebDesigner"] = 4] = "WebDesigner"; + RoleType[RoleType["Administrator"] = 5] = "Administrator"; +})(RoleType = exports.RoleType || (exports.RoleType = {})); +var PageType; +(function (PageType) { + PageType[PageType["Invalid"] = -1] = "Invalid"; + PageType[PageType["DefaultView"] = 0] = "DefaultView"; + PageType[PageType["NormalView"] = 1] = "NormalView"; + PageType[PageType["DialogView"] = 2] = "DialogView"; + PageType[PageType["View"] = 3] = "View"; + PageType[PageType["DisplayForm"] = 4] = "DisplayForm"; + PageType[PageType["DisplayFormDialog"] = 5] = "DisplayFormDialog"; + PageType[PageType["EditForm"] = 6] = "EditForm"; + PageType[PageType["EditFormDialog"] = 7] = "EditFormDialog"; + PageType[PageType["NewForm"] = 8] = "NewForm"; + PageType[PageType["NewFormDialog"] = 9] = "NewFormDialog"; + PageType[PageType["SolutionForm"] = 10] = "SolutionForm"; + PageType[PageType["PAGE_MAXITEMS"] = 11] = "PAGE_MAXITEMS"; +})(PageType = exports.PageType || (exports.PageType = {})); +var SharingLinkKind; +(function (SharingLinkKind) { + /** + * Uninitialized link + */ + SharingLinkKind[SharingLinkKind["Uninitialized"] = 0] = "Uninitialized"; + /** + * Direct link to the object being shared + */ + SharingLinkKind[SharingLinkKind["Direct"] = 1] = "Direct"; + /** + * Organization-shareable link to the object being shared with view permissions + */ + SharingLinkKind[SharingLinkKind["OrganizationView"] = 2] = "OrganizationView"; + /** + * Organization-shareable link to the object being shared with edit permissions + */ + SharingLinkKind[SharingLinkKind["OrganizationEdit"] = 3] = "OrganizationEdit"; + /** + * View only anonymous link + */ + SharingLinkKind[SharingLinkKind["AnonymousView"] = 4] = "AnonymousView"; + /** + * Read/Write anonymous link + */ + SharingLinkKind[SharingLinkKind["AnonymousEdit"] = 5] = "AnonymousEdit"; + /** + * Flexible sharing Link where properties can change without affecting link URL + */ + SharingLinkKind[SharingLinkKind["Flexible"] = 6] = "Flexible"; +})(SharingLinkKind = exports.SharingLinkKind || (exports.SharingLinkKind = {})); +/** + * Indicates the role of the sharing link + */ +var SharingRole; +(function (SharingRole) { + SharingRole[SharingRole["None"] = 0] = "None"; + SharingRole[SharingRole["View"] = 1] = "View"; + SharingRole[SharingRole["Edit"] = 2] = "Edit"; + SharingRole[SharingRole["Owner"] = 3] = "Owner"; +})(SharingRole = exports.SharingRole || (exports.SharingRole = {})); +var SharingOperationStatusCode; +(function (SharingOperationStatusCode) { + /** + * The share operation completed without errors. + */ + SharingOperationStatusCode[SharingOperationStatusCode["CompletedSuccessfully"] = 0] = "CompletedSuccessfully"; + /** + * The share operation completed and generated requests for access. + */ + SharingOperationStatusCode[SharingOperationStatusCode["AccessRequestsQueued"] = 1] = "AccessRequestsQueued"; + /** + * The share operation failed as there were no resolved users. + */ + SharingOperationStatusCode[SharingOperationStatusCode["NoResolvedUsers"] = -1] = "NoResolvedUsers"; + /** + * The share operation failed due to insufficient permissions. + */ + SharingOperationStatusCode[SharingOperationStatusCode["AccessDenied"] = -2] = "AccessDenied"; + /** + * The share operation failed when attempting a cross site share, which is not supported. + */ + SharingOperationStatusCode[SharingOperationStatusCode["CrossSiteRequestNotSupported"] = -3] = "CrossSiteRequestNotSupported"; + /** + * The sharing operation failed due to an unknown error. + */ + SharingOperationStatusCode[SharingOperationStatusCode["UnknowError"] = -4] = "UnknowError"; + /** + * The text you typed is too long. Please shorten it. + */ + SharingOperationStatusCode[SharingOperationStatusCode["EmailBodyTooLong"] = -5] = "EmailBodyTooLong"; + /** + * The maximum number of unique scopes in the list has been exceeded. + */ + SharingOperationStatusCode[SharingOperationStatusCode["ListUniqueScopesExceeded"] = -6] = "ListUniqueScopesExceeded"; + /** + * The share operation failed because a sharing capability is disabled in the site. + */ + SharingOperationStatusCode[SharingOperationStatusCode["CapabilityDisabled"] = -7] = "CapabilityDisabled"; + /** + * The specified object for the share operation is not supported. + */ + SharingOperationStatusCode[SharingOperationStatusCode["ObjectNotSupported"] = -8] = "ObjectNotSupported"; + /** + * A SharePoint group cannot contain another SharePoint group. + */ + SharingOperationStatusCode[SharingOperationStatusCode["NestedGroupsNotSupported"] = -9] = "NestedGroupsNotSupported"; +})(SharingOperationStatusCode = exports.SharingOperationStatusCode || (exports.SharingOperationStatusCode = {})); +var SPSharedObjectType; +(function (SPSharedObjectType) { + SPSharedObjectType[SPSharedObjectType["Unknown"] = 0] = "Unknown"; + SPSharedObjectType[SPSharedObjectType["File"] = 1] = "File"; + SPSharedObjectType[SPSharedObjectType["Folder"] = 2] = "Folder"; + SPSharedObjectType[SPSharedObjectType["Item"] = 3] = "Item"; + SPSharedObjectType[SPSharedObjectType["List"] = 4] = "List"; + SPSharedObjectType[SPSharedObjectType["Web"] = 5] = "Web"; + SPSharedObjectType[SPSharedObjectType["Max"] = 6] = "Max"; +})(SPSharedObjectType = exports.SPSharedObjectType || (exports.SPSharedObjectType = {})); +var SharingDomainRestrictionMode; +(function (SharingDomainRestrictionMode) { + SharingDomainRestrictionMode[SharingDomainRestrictionMode["None"] = 0] = "None"; + SharingDomainRestrictionMode[SharingDomainRestrictionMode["AllowList"] = 1] = "AllowList"; + SharingDomainRestrictionMode[SharingDomainRestrictionMode["BlockList"] = 2] = "BlockList"; +})(SharingDomainRestrictionMode = exports.SharingDomainRestrictionMode || (exports.SharingDomainRestrictionMode = {})); +var RenderListDataOptions; +(function (RenderListDataOptions) { + RenderListDataOptions[RenderListDataOptions["None"] = 0] = "None"; + RenderListDataOptions[RenderListDataOptions["ContextInfo"] = 1] = "ContextInfo"; + RenderListDataOptions[RenderListDataOptions["ListData"] = 2] = "ListData"; + RenderListDataOptions[RenderListDataOptions["ListSchema"] = 4] = "ListSchema"; + RenderListDataOptions[RenderListDataOptions["MenuView"] = 8] = "MenuView"; +})(RenderListDataOptions = exports.RenderListDataOptions || (exports.RenderListDataOptions = {})); + + +/***/ }), +/* 19 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var __extends = (this && this.__extends) || (function () { + var extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +var sharepointqueryable_1 = __webpack_require__(1); +var sharepointqueryableshareable_1 = __webpack_require__(11); +var files_1 = __webpack_require__(12); +var util_1 = __webpack_require__(0); +var odata_1 = __webpack_require__(6); +var items_1 = __webpack_require__(16); +/** + * Describes a collection of Folder objects + * + */ +var Folders = /** @class */ (function (_super) { + __extends(Folders, _super); + /** + * Creates a new instance of the Folders class + * + * @param baseUrl The url or SharePointQueryable which forms the parent of this fields collection + */ + function Folders(baseUrl, path) { + if (path === void 0) { path = "folders"; } + return _super.call(this, baseUrl, path) || this; + } + /** + * Gets a folder by folder name + * + */ + Folders.prototype.getByName = function (name) { + var f = new Folder(this); + f.concat("('" + name + "')"); + return f; + }; + /** + * Adds a new folder to the current folder (relative) or any folder (absolute) + * + * @param url The relative or absolute url where the new folder will be created. Urls starting with a forward slash are absolute. + * @returns The new Folder and the raw response. + */ + Folders.prototype.add = function (url) { + var _this = this; + return this.clone(Folders, "add('" + url + "')").postCore().then(function (response) { + return { + data: response, + folder: _this.getByName(url), + }; + }); + }; + return Folders; +}(sharepointqueryable_1.SharePointQueryableCollection)); +exports.Folders = Folders; +/** + * Describes a single Folder instance + * + */ +var Folder = /** @class */ (function (_super) { + __extends(Folder, _super); + function Folder() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(Folder.prototype, "contentTypeOrder", { + /** + * Specifies the sequence in which content types are displayed. + * + */ + get: function () { + return new sharepointqueryable_1.SharePointQueryableCollection(this, "contentTypeOrder"); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Folder.prototype, "files", { + /** + * Gets this folder's files + * + */ + get: function () { + return new files_1.Files(this); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Folder.prototype, "folders", { + /** + * Gets this folder's sub folders + * + */ + get: function () { + return new Folders(this); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Folder.prototype, "listItemAllFields", { + /** + * Gets this folder's list item field values + * + */ + get: function () { + return new sharepointqueryable_1.SharePointQueryableCollection(this, "listItemAllFields"); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Folder.prototype, "parentFolder", { + /** + * Gets the parent folder, if available + * + */ + get: function () { + return new Folder(this, "parentFolder"); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Folder.prototype, "properties", { + /** + * Gets this folder's properties + * + */ + get: function () { + return new sharepointqueryable_1.SharePointQueryableInstance(this, "properties"); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Folder.prototype, "serverRelativeUrl", { + /** + * Gets this folder's server relative url + * + */ + get: function () { + return new sharepointqueryable_1.SharePointQueryable(this, "serverRelativeUrl"); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Folder.prototype, "uniqueContentTypeOrder", { + /** + * Gets a value that specifies the content type order. + * + */ + get: function () { + return new sharepointqueryable_1.SharePointQueryableCollection(this, "uniqueContentTypeOrder"); + }, + enumerable: true, + configurable: true + }); + Folder.prototype.update = function (properties) { + var _this = this; + var postBody = JSON.stringify(util_1.Util.extend({ + "__metadata": { "type": "SP.Folder" }, + }, properties)); + return this.postCore({ + body: postBody, + headers: { + "X-HTTP-Method": "MERGE", + }, + }).then(function (data) { + return { + data: data, + folder: _this, + }; + }); + }; + /** + * Delete this folder + * + * @param eTag Value used in the IF-Match header, by default "*" + */ + Folder.prototype.delete = function (eTag) { + if (eTag === void 0) { eTag = "*"; } + return this.clone(Folder, null).postCore({ + headers: { + "IF-Match": eTag, + "X-HTTP-Method": "DELETE", + }, + }); + }; + /** + * Moves the folder to the Recycle Bin and returns the identifier of the new Recycle Bin item. + */ + Folder.prototype.recycle = function () { + return this.clone(Folder, "recycle").postCore(); + }; + /** + * Gets the associated list item for this folder, loading the default properties + */ + Folder.prototype.getItem = function () { + var selects = []; + for (var _i = 0; _i < arguments.length; _i++) { + selects[_i] = arguments[_i]; + } + var q = this.listItemAllFields; + return q.select.apply(q, selects).get().then(function (d) { + return util_1.Util.extend(new items_1.Item(odata_1.spGetEntityUrl(d)), d); + }); + }; + return Folder; +}(sharepointqueryableshareable_1.SharePointQueryableShareableFolder)); +exports.Folder = Folder; + + +/***/ }), +/* 20 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var __extends = (this && this.__extends) || (function () { + var extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +var util_1 = __webpack_require__(0); +var sharepointqueryable_1 = __webpack_require__(1); +/** + * Describes a collection of content types + * + */ +var ContentTypes = /** @class */ (function (_super) { + __extends(ContentTypes, _super); + /** + * Creates a new instance of the ContentTypes class + * + * @param baseUrl The url or SharePointQueryable which forms the parent of this content types collection + */ + function ContentTypes(baseUrl, path) { + if (path === void 0) { path = "contenttypes"; } + return _super.call(this, baseUrl, path) || this; + } + /** + * Gets a ContentType by content type id + */ + ContentTypes.prototype.getById = function (id) { + var ct = new ContentType(this); + ct.concat("('" + id + "')"); + return ct; + }; + /** + * Adds an existing contenttype to a content type collection + * + * @param contentTypeId in the following format, for example: 0x010102 + */ + ContentTypes.prototype.addAvailableContentType = function (contentTypeId) { + var _this = this; + var postBody = JSON.stringify({ + "contentTypeId": contentTypeId, + }); + return this.clone(ContentTypes, "addAvailableContentType").postAsCore({ body: postBody }).then(function (data) { + return { + contentType: _this.getById(data.id), + data: data, + }; + }); + }; + /** + * Adds a new content type to the collection + * + * @param id The desired content type id for the new content type (also determines the parent content type) + * @param name The name of the content type + * @param description The description of the content type + * @param group The group in which to add the content type + * @param additionalSettings Any additional settings to provide when creating the content type + * + */ + ContentTypes.prototype.add = function (id, name, description, group, additionalSettings) { + var _this = this; + if (description === void 0) { description = ""; } + if (group === void 0) { group = "Custom Content Types"; } + if (additionalSettings === void 0) { additionalSettings = {}; } + var postBody = JSON.stringify(util_1.Util.extend({ + "Description": description, + "Group": group, + "Id": { "StringValue": id }, + "Name": name, + "__metadata": { "type": "SP.ContentType" }, + }, additionalSettings)); + return this.postCore({ body: postBody }).then(function (data) { + return { contentType: _this.getById(data.id), data: data }; + }); + }; + return ContentTypes; +}(sharepointqueryable_1.SharePointQueryableCollection)); +exports.ContentTypes = ContentTypes; +/** + * Describes a single ContentType instance + * + */ +var ContentType = /** @class */ (function (_super) { + __extends(ContentType, _super); + function ContentType() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(ContentType.prototype, "fieldLinks", { + /** + * Gets the column (also known as field) references in the content type. + */ + get: function () { + return new FieldLinks(this); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ContentType.prototype, "fields", { + /** + * Gets a value that specifies the collection of fields for the content type. + */ + get: function () { + return new sharepointqueryable_1.SharePointQueryableCollection(this, "fields"); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ContentType.prototype, "parent", { + /** + * Gets the parent content type of the content type. + */ + get: function () { + return new ContentType(this, "parent"); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ContentType.prototype, "workflowAssociations", { + /** + * Gets a value that specifies the collection of workflow associations for the content type. + */ + get: function () { + return new sharepointqueryable_1.SharePointQueryableCollection(this, "workflowAssociations"); + }, + enumerable: true, + configurable: true + }); + /** + * Delete this content type + */ + ContentType.prototype.delete = function () { + return this.postCore({ + headers: { + "X-HTTP-Method": "DELETE", + }, + }); + }; + return ContentType; +}(sharepointqueryable_1.SharePointQueryableInstance)); +exports.ContentType = ContentType; +/** + * Represents a collection of field link instances + */ +var FieldLinks = /** @class */ (function (_super) { + __extends(FieldLinks, _super); + /** + * Creates a new instance of the ContentType class + * + * @param baseUrl The url or SharePointQueryable which forms the parent of this content type instance + */ + function FieldLinks(baseUrl, path) { + if (path === void 0) { path = "fieldlinks"; } + return _super.call(this, baseUrl, path) || this; + } + /** + * Gets a FieldLink by GUID id + * + * @param id The GUID id of the field link + */ + FieldLinks.prototype.getById = function (id) { + var fl = new FieldLink(this); + fl.concat("(guid'" + id + "')"); + return fl; + }; + return FieldLinks; +}(sharepointqueryable_1.SharePointQueryableCollection)); +exports.FieldLinks = FieldLinks; +/** + * Represents a field link instance + */ +var FieldLink = /** @class */ (function (_super) { + __extends(FieldLink, _super); + function FieldLink() { + return _super !== null && _super.apply(this, arguments) || this; + } + return FieldLink; +}(sharepointqueryable_1.SharePointQueryableInstance)); +exports.FieldLink = FieldLink; + + +/***/ }), +/* 21 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var __extends = (this && this.__extends) || (function () { + var extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +var sharepointqueryable_1 = __webpack_require__(1); +var util_1 = __webpack_require__(0); +/** + * Describes a collection of user custom actions + * + */ +var UserCustomActions = /** @class */ (function (_super) { + __extends(UserCustomActions, _super); + /** + * Creates a new instance of the UserCustomActions class + * + * @param baseUrl The url or SharePointQueryable which forms the parent of this user custom actions collection + */ + function UserCustomActions(baseUrl, path) { + if (path === void 0) { path = "usercustomactions"; } + return _super.call(this, baseUrl, path) || this; + } + /** + * Returns the user custom action with the specified id + * + * @param id The GUID id of the user custom action to retrieve + */ + UserCustomActions.prototype.getById = function (id) { + var uca = new UserCustomAction(this); + uca.concat("('" + id + "')"); + return uca; + }; + /** + * Creates a user custom action + * + * @param properties The information object of property names and values which define the new user custom action + * + */ + UserCustomActions.prototype.add = function (properties) { + var _this = this; + var postBody = JSON.stringify(util_1.Util.extend({ __metadata: { "type": "SP.UserCustomAction" } }, properties)); + return this.postCore({ body: postBody }).then(function (data) { + return { + action: _this.getById(data.Id), + data: data, + }; + }); + }; + /** + * Deletes all user custom actions in the collection + * + */ + UserCustomActions.prototype.clear = function () { + return this.clone(UserCustomActions, "clear").postCore(); + }; + return UserCustomActions; +}(sharepointqueryable_1.SharePointQueryableCollection)); +exports.UserCustomActions = UserCustomActions; +/** + * Describes a single user custom action + * + */ +var UserCustomAction = /** @class */ (function (_super) { + __extends(UserCustomAction, _super); + function UserCustomAction() { + return _super !== null && _super.apply(this, arguments) || this; + } + /** + * Updates this user custom action with the supplied properties + * + * @param properties An information object of property names and values to update for this user custom action + */ + UserCustomAction.prototype.update = function (properties) { + var _this = this; + var postBody = JSON.stringify(util_1.Util.extend({ + "__metadata": { "type": "SP.UserCustomAction" }, + }, properties)); + return this.postCore({ + body: postBody, + headers: { + "X-HTTP-Method": "MERGE", + }, + }).then(function (data) { + return { + action: _this, + data: data, + }; + }); + }; + /** + * Removes this user custom action + * + */ + UserCustomAction.prototype.delete = function () { + return _super.prototype.deleteCore.call(this); + }; + return UserCustomAction; +}(sharepointqueryable_1.SharePointQueryableInstance)); +exports.UserCustomAction = UserCustomAction; + + +/***/ }), +/* 22 */ +/***/ (function(module, exports) { + +var g; + +// This works in non-strict mode +g = (function() { + return this; +})(); + +try { + // This works if eval is allowed (see CSP) + g = g || Function("return this")() || (1,eval)("this"); +} catch(e) { + // This works if the window reference is available + if(typeof window === "object") + g = window; +} + +// g can still be undefined, but nothing to do about it... +// We return undefined, instead of nothing here, so it's +// easier to handle this case. if(!global) { ...} + +module.exports = g; + + +/***/ }), +/* 23 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +Object.defineProperty(exports, "__esModule", { value: true }); +var util_1 = __webpack_require__(0); +var collections_1 = __webpack_require__(8); +var pnplibconfig_1 = __webpack_require__(2); +var logging_1 = __webpack_require__(3); +/** + * A wrapper class to provide a consistent interface to browser based storage + * + */ +var PnPClientStorageWrapper = /** @class */ (function () { + /** + * Creates a new instance of the PnPClientStorageWrapper class + * + * @constructor + */ + function PnPClientStorageWrapper(store, defaultTimeoutMinutes) { + this.store = store; + this.defaultTimeoutMinutes = defaultTimeoutMinutes; + this.defaultTimeoutMinutes = (defaultTimeoutMinutes === void 0) ? -1 : defaultTimeoutMinutes; + this.enabled = this.test(); + // if the cache timeout is enabled call the handler + // this will clear any expired items and set the timeout function + if (pnplibconfig_1.RuntimeConfig.enableCacheExpiration) { + logging_1.Logger.write("Enabling cache expiration.", logging_1.LogLevel.Info); + this.cacheExpirationHandler(); + } + } + /** + * Get a value from storage, or null if that value does not exist + * + * @param key The key whose value we want to retrieve + */ + PnPClientStorageWrapper.prototype.get = function (key) { + if (!this.enabled) { + return null; + } + var o = this.store.getItem(key); + if (o == null) { + return null; + } + var persistable = JSON.parse(o); + if (new Date(persistable.expiration) <= new Date()) { + logging_1.Logger.write("Removing item with key '" + key + "' from cache due to expiration.", logging_1.LogLevel.Info); + this.delete(key); + return null; + } + else { + return persistable.value; + } + }; + /** + * Adds a value to the underlying storage + * + * @param key The key to use when storing the provided value + * @param o The value to store + * @param expire Optional, if provided the expiration of the item, otherwise the default is used + */ + PnPClientStorageWrapper.prototype.put = function (key, o, expire) { + if (this.enabled) { + this.store.setItem(key, this.createPersistable(o, expire)); + } + }; + /** + * Deletes a value from the underlying storage + * + * @param key The key of the pair we want to remove from storage + */ + PnPClientStorageWrapper.prototype.delete = function (key) { + if (this.enabled) { + this.store.removeItem(key); + } + }; + /** + * Gets an item from the underlying storage, or adds it if it does not exist using the supplied getter function + * + * @param key The key to use when storing the provided value + * @param getter A function which will upon execution provide the desired value + * @param expire Optional, if provided the expiration of the item, otherwise the default is used + */ + PnPClientStorageWrapper.prototype.getOrPut = function (key, getter, expire) { + var _this = this; + if (!this.enabled) { + return getter(); + } + return new Promise(function (resolve) { + var o = _this.get(key); + if (o == null) { + getter().then(function (d) { + _this.put(key, d, expire); + resolve(d); + }); + } + else { + resolve(o); + } + }); + }; + /** + * Deletes any expired items placed in the store by the pnp library, leaves other items untouched + */ + PnPClientStorageWrapper.prototype.deleteExpired = function () { + var _this = this; + return new Promise(function (resolve, reject) { + if (!_this.enabled) { + resolve(); + } + try { + for (var i = 0; i < _this.store.length; i++) { + var key = _this.store.key(i); + // test the stored item to see if we stored it + if (/["|']?pnp["|']? ?: ?1/i.test(_this.store.getItem(key))) { + // get those items as get will delete from cache if they are expired + _this.get(key); + } + } + resolve(); + } + catch (e) { + reject(e); + } + }); + }; + /** + * Used to determine if the wrapped storage is available currently + */ + PnPClientStorageWrapper.prototype.test = function () { + var str = "test"; + try { + this.store.setItem(str, str); + this.store.removeItem(str); + return true; + } + catch (e) { + return false; + } + }; + /** + * Creates the persistable to store + */ + PnPClientStorageWrapper.prototype.createPersistable = function (o, expire) { + if (typeof expire === "undefined") { + // ensure we are by default inline with the global library setting + var defaultTimeout = pnplibconfig_1.RuntimeConfig.defaultCachingTimeoutSeconds; + if (this.defaultTimeoutMinutes > 0) { + defaultTimeout = this.defaultTimeoutMinutes * 60; + } + expire = util_1.Util.dateAdd(new Date(), "second", defaultTimeout); + } + return JSON.stringify({ pnp: 1, expiration: expire, value: o }); + }; + /** + * Deletes expired items added by this library in this.store and sets a timeout to call itself + */ + PnPClientStorageWrapper.prototype.cacheExpirationHandler = function () { + var _this = this; + logging_1.Logger.write("Called cache expiration handler.", logging_1.LogLevel.Verbose); + this.deleteExpired().then(function (_) { + // call ourself in the future + setTimeout(util_1.Util.getCtxCallback(_this, _this.cacheExpirationHandler), pnplibconfig_1.RuntimeConfig.cacheExpirationIntervalMilliseconds); + }).catch(function (e) { + // we've got some error - so just stop the loop and report the error + logging_1.Logger.log({ + data: e, + level: logging_1.LogLevel.Error, + message: "Error deleting expired cache entries, see data for details. Timeout not reset.", + }); + }); + }; + return PnPClientStorageWrapper; +}()); +exports.PnPClientStorageWrapper = PnPClientStorageWrapper; +/** + * A thin implementation of in-memory storage for use in nodejs + */ +var MemoryStorage = /** @class */ (function () { + function MemoryStorage(_store) { + if (_store === void 0) { _store = new collections_1.Dictionary(); } + this._store = _store; + } + Object.defineProperty(MemoryStorage.prototype, "length", { + get: function () { + return this._store.count(); + }, + enumerable: true, + configurable: true + }); + MemoryStorage.prototype.clear = function () { + this._store.clear(); + }; + MemoryStorage.prototype.getItem = function (key) { + return this._store.get(key); + }; + MemoryStorage.prototype.key = function (index) { + return this._store.getKeys()[index]; + }; + MemoryStorage.prototype.removeItem = function (key) { + this._store.remove(key); + }; + MemoryStorage.prototype.setItem = function (key, data) { + this._store.add(key, data); + }; + return MemoryStorage; +}()); +/** + * A class that will establish wrappers for both local and session storage + */ +var PnPClientStorage = /** @class */ (function () { + /** + * Creates a new instance of the PnPClientStorage class + * + * @constructor + */ + function PnPClientStorage(_local, _session) { + if (_local === void 0) { _local = null; } + if (_session === void 0) { _session = null; } + this._local = _local; + this._session = _session; + } + Object.defineProperty(PnPClientStorage.prototype, "local", { + /** + * Provides access to the local storage of the browser + */ + get: function () { + if (this._local === null) { + this._local = typeof localStorage !== "undefined" ? new PnPClientStorageWrapper(localStorage) : new PnPClientStorageWrapper(new MemoryStorage()); + } + return this._local; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PnPClientStorage.prototype, "session", { + /** + * Provides access to the session storage of the browser + */ + get: function () { + if (this._session === null) { + this._session = typeof sessionStorage !== "undefined" ? new PnPClientStorageWrapper(sessionStorage) : new PnPClientStorageWrapper(new MemoryStorage()); + } + return this._session; + }, + enumerable: true, + configurable: true + }); + return PnPClientStorage; +}()); +exports.PnPClientStorage = PnPClientStorage; + + +/***/ }), +/* 24 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +Object.defineProperty(exports, "__esModule", { value: true }); +var util_1 = __webpack_require__(0); +var utils_1 = __webpack_require__(9); +var parsers_1 = __webpack_require__(7); +var pnplibconfig_1 = __webpack_require__(2); +var pipeline_1 = __webpack_require__(14); +var ODataQueryable = /** @class */ (function () { + function ODataQueryable() { + } + /** + * Directly concatonates the supplied string to the current url, not normalizing "/" chars + * + * @param pathPart The string to concatonate to the url + */ + ODataQueryable.prototype.concat = function (pathPart) { + this._url += pathPart; + return this; + }; + /** + * Appends the given string and normalizes "/" chars + * + * @param pathPart The string to append + */ + ODataQueryable.prototype.append = function (pathPart) { + this._url = util_1.Util.combinePaths(this._url, pathPart); + }; + Object.defineProperty(ODataQueryable.prototype, "parentUrl", { + /** + * Gets the parent url used when creating this instance + * + */ + get: function () { + return this._parentUrl; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ODataQueryable.prototype, "query", { + /** + * Provides access to the query builder for this url + * + */ + get: function () { + return this._query; + }, + enumerable: true, + configurable: true + }); + /** + * Sets custom options for current object and all derived objects accessible via chaining + * + * @param options custom options + */ + ODataQueryable.prototype.configure = function (options) { + utils_1.mergeOptions(this._options, options); + return this; + }; + /** + * Enables caching for this request + * + * @param options Defines the options used when caching this request + */ + ODataQueryable.prototype.usingCaching = function (options) { + if (!pnplibconfig_1.RuntimeConfig.globalCacheDisable) { + this._useCaching = true; + this._cachingOptions = options; + } + return this; + }; + /** + * Gets the currentl url, made absolute based on the availability of the _spPageContextInfo object + * + */ + ODataQueryable.prototype.toUrl = function () { + return this._url; + }; + /** + * Executes the currently built request + * + * @param parser Allows you to specify a parser to handle the result + * @param getOptions The options used for this request + */ + ODataQueryable.prototype.get = function (parser, options) { + if (parser === void 0) { parser = new parsers_1.ODataDefaultParser(); } + if (options === void 0) { options = {}; } + return this.toRequestContext("GET", options, parser, pipeline_1.PipelineMethods.default).then(function (context) { return pipeline_1.pipe(context); }); + }; + ODataQueryable.prototype.getAs = function (parser, options) { + if (parser === void 0) { parser = new parsers_1.ODataDefaultParser(); } + if (options === void 0) { options = {}; } + return this.toRequestContext("GET", options, parser, pipeline_1.PipelineMethods.default).then(function (context) { return pipeline_1.pipe(context); }); + }; + ODataQueryable.prototype.postCore = function (options, parser) { + if (options === void 0) { options = {}; } + if (parser === void 0) { parser = new parsers_1.ODataDefaultParser(); } + return this.toRequestContext("POST", options, parser, pipeline_1.PipelineMethods.default).then(function (context) { return pipeline_1.pipe(context); }); + }; + ODataQueryable.prototype.postAsCore = function (options, parser) { + if (options === void 0) { options = {}; } + if (parser === void 0) { parser = new parsers_1.ODataDefaultParser(); } + return this.toRequestContext("POST", options, parser, pipeline_1.PipelineMethods.default).then(function (context) { return pipeline_1.pipe(context); }); + }; + ODataQueryable.prototype.patchCore = function (options, parser) { + if (options === void 0) { options = {}; } + if (parser === void 0) { parser = new parsers_1.ODataDefaultParser(); } + return this.toRequestContext("PATCH", options, parser, pipeline_1.PipelineMethods.default).then(function (context) { return pipeline_1.pipe(context); }); + }; + ODataQueryable.prototype.deleteCore = function (options, parser) { + if (options === void 0) { options = {}; } + if (parser === void 0) { parser = new parsers_1.ODataDefaultParser(); } + return this.toRequestContext("DELETE", options, parser, pipeline_1.PipelineMethods.default).then(function (context) { return pipeline_1.pipe(context); }); + }; + return ODataQueryable; +}()); +exports.ODataQueryable = ODataQueryable; + + +/***/ }), +/* 25 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +Object.defineProperty(exports, "__esModule", { value: true }); +var digestcache_1 = __webpack_require__(38); +var util_1 = __webpack_require__(0); +var pnplibconfig_1 = __webpack_require__(2); +var exceptions_1 = __webpack_require__(4); +var utils_1 = __webpack_require__(9); +var HttpClient = /** @class */ (function () { + function HttpClient() { + this._impl = pnplibconfig_1.RuntimeConfig.spFetchClientFactory(); + this._digestCache = new digestcache_1.DigestCache(this); + } + HttpClient.prototype.fetch = function (url, options) { + var _this = this; + if (options === void 0) { options = {}; } + var opts = util_1.Util.extend(options, { cache: "no-cache", credentials: "same-origin" }, true); + var headers = new Headers(); + // first we add the global headers so they can be overwritten by any passed in locally to this call + utils_1.mergeHeaders(headers, pnplibconfig_1.RuntimeConfig.spHeaders); + // second we add the local options so we can overwrite the globals + utils_1.mergeHeaders(headers, options.headers); + // lastly we apply any default headers we need that may not exist + if (!headers.has("Accept")) { + headers.append("Accept", "application/json"); + } + if (!headers.has("Content-Type")) { + headers.append("Content-Type", "application/json;odata=verbose;charset=utf-8"); + } + if (!headers.has("X-ClientService-ClientTag")) { + headers.append("X-ClientService-ClientTag", "PnPCoreJS:3.0.0"); + } + opts = util_1.Util.extend(opts, { headers: headers }); + if (opts.method && opts.method.toUpperCase() !== "GET") { + // if we have either a request digest or an authorization header we don't need a digest + if (!headers.has("X-RequestDigest") && !headers.has("Authorization")) { + var index = url.indexOf("_api/"); + if (index < 0) { + throw new exceptions_1.APIUrlException(); + } + var webUrl = url.substr(0, index); + return this._digestCache.getDigest(webUrl) + .then(function (digest) { + headers.append("X-RequestDigest", digest); + return _this.fetchRaw(url, opts); + }); + } + } + return this.fetchRaw(url, opts); + }; + HttpClient.prototype.fetchRaw = function (url, options) { + var _this = this; + if (options === void 0) { options = {}; } + // here we need to normalize the headers + var rawHeaders = new Headers(); + utils_1.mergeHeaders(rawHeaders, options.headers); + options = util_1.Util.extend(options, { headers: rawHeaders }); + var retry = function (ctx) { + _this._impl.fetch(url, options).then(function (response) { return ctx.resolve(response); }).catch(function (response) { + // Check if request was throttled - http status code 429 + // Check if request failed due to server unavailable - http status code 503 + if (response.status !== 429 && response.status !== 503) { + ctx.reject(response); + } + // grab our current delay + var delay = ctx.delay; + // Increment our counters. + ctx.delay *= 2; + ctx.attempts++; + // If we have exceeded the retry count, reject. + if (ctx.retryCount <= ctx.attempts) { + ctx.reject(response); + } + // Set our retry timeout for {delay} milliseconds. + setTimeout(util_1.Util.getCtxCallback(_this, retry, ctx), delay); + }); + }; + return new Promise(function (resolve, reject) { + var retryContext = { + attempts: 0, + delay: 100, + reject: reject, + resolve: resolve, + retryCount: 7, + }; + retry.call(_this, retryContext); + }); + }; + HttpClient.prototype.get = function (url, options) { + if (options === void 0) { options = {}; } + var opts = util_1.Util.extend(options, { method: "GET" }); + return this.fetch(url, opts); + }; + HttpClient.prototype.post = function (url, options) { + if (options === void 0) { options = {}; } + var opts = util_1.Util.extend(options, { method: "POST" }); + return this.fetch(url, opts); + }; + HttpClient.prototype.patch = function (url, options) { + if (options === void 0) { options = {}; } + var opts = util_1.Util.extend(options, { method: "PATCH" }); + return this.fetch(url, opts); + }; + HttpClient.prototype.delete = function (url, options) { + if (options === void 0) { options = {}; } + var opts = util_1.Util.extend(options, { method: "DELETE" }); + return this.fetch(url, opts); + }; + return HttpClient; +}()); +exports.HttpClient = HttpClient; + + +/***/ }), +/* 26 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var __extends = (this && this.__extends) || (function () { + var extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +var webs_1 = __webpack_require__(10); +var roles_1 = __webpack_require__(27); +var types_1 = __webpack_require__(18); +var sharepointqueryable_1 = __webpack_require__(1); +var SharePointQueryableSecurable = /** @class */ (function (_super) { + __extends(SharePointQueryableSecurable, _super); + function SharePointQueryableSecurable() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(SharePointQueryableSecurable.prototype, "roleAssignments", { + /** + * Gets the set of role assignments for this item + * + */ + get: function () { + return new roles_1.RoleAssignments(this); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(SharePointQueryableSecurable.prototype, "firstUniqueAncestorSecurableObject", { + /** + * Gets the closest securable up the security hierarchy whose permissions are applied to this list item + * + */ + get: function () { + return new sharepointqueryable_1.SharePointQueryableInstance(this, "FirstUniqueAncestorSecurableObject"); + }, + enumerable: true, + configurable: true + }); + /** + * Gets the effective permissions for the user supplied + * + * @param loginName The claims username for the user (ex: i:0#.f|membership|user@domain.com) + */ + SharePointQueryableSecurable.prototype.getUserEffectivePermissions = function (loginName) { + var q = this.clone(sharepointqueryable_1.SharePointQueryable, "getUserEffectivePermissions(@user)"); + q.query.add("@user", "'" + encodeURIComponent(loginName) + "'"); + return q.get().then(function (r) { + // handle verbose mode + return r.hasOwnProperty("GetUserEffectivePermissions") ? r.GetUserEffectivePermissions : r; + }); + }; + /** + * Gets the effective permissions for the current user + */ + SharePointQueryableSecurable.prototype.getCurrentUserEffectivePermissions = function () { + var _this = this; + var w = webs_1.Web.fromUrl(this.toUrl()); + return w.currentUser.select("LoginName").getAs().then(function (user) { + return _this.getUserEffectivePermissions(user.LoginName); + }); + }; + /** + * Breaks the security inheritance at this level optinally copying permissions and clearing subscopes + * + * @param copyRoleAssignments If true the permissions are copied from the current parent scope + * @param clearSubscopes Optional. true to make all child securable objects inherit role assignments from the current object + */ + SharePointQueryableSecurable.prototype.breakRoleInheritance = function (copyRoleAssignments, clearSubscopes) { + if (copyRoleAssignments === void 0) { copyRoleAssignments = false; } + if (clearSubscopes === void 0) { clearSubscopes = false; } + return this.clone(SharePointQueryableSecurable, "breakroleinheritance(copyroleassignments=" + copyRoleAssignments + ", clearsubscopes=" + clearSubscopes + ")").postCore(); + }; + /** + * Removes the local role assignments so that it re-inherit role assignments from the parent object. + * + */ + SharePointQueryableSecurable.prototype.resetRoleInheritance = function () { + return this.clone(SharePointQueryableSecurable, "resetroleinheritance").postCore(); + }; + /** + * Determines if a given user has the appropriate permissions + * + * @param loginName The user to check + * @param permission The permission being checked + */ + SharePointQueryableSecurable.prototype.userHasPermissions = function (loginName, permission) { + var _this = this; + return this.getUserEffectivePermissions(loginName).then(function (perms) { + return _this.hasPermissions(perms, permission); + }); + }; + /** + * Determines if the current user has the requested permissions + * + * @param permission The permission we wish to check + */ + SharePointQueryableSecurable.prototype.currentUserHasPermissions = function (permission) { + var _this = this; + return this.getCurrentUserEffectivePermissions().then(function (perms) { + return _this.hasPermissions(perms, permission); + }); + }; + /** + * Taken from sp.js, checks the supplied permissions against the mask + * + * @param value The security principal's permissions on the given object + * @param perm The permission checked against the value + */ + /* tslint:disable:no-bitwise */ + SharePointQueryableSecurable.prototype.hasPermissions = function (value, perm) { + if (!perm) { + return true; + } + if (perm === types_1.PermissionKind.FullMask) { + return (value.High & 32767) === 32767 && value.Low === 65535; + } + perm = perm - 1; + var num = 1; + if (perm >= 0 && perm < 32) { + num = num << perm; + return 0 !== (value.Low & num); + } + else if (perm >= 32 && perm < 64) { + num = num << perm - 32; + return 0 !== (value.High & num); + } + return false; + }; + return SharePointQueryableSecurable; +}(sharepointqueryable_1.SharePointQueryableInstance)); +exports.SharePointQueryableSecurable = SharePointQueryableSecurable; + + +/***/ }), +/* 27 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var __extends = (this && this.__extends) || (function () { + var extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +var sharepointqueryable_1 = __webpack_require__(1); +var sitegroups_1 = __webpack_require__(17); +var util_1 = __webpack_require__(0); +/** + * Describes a set of role assignments for the current scope + * + */ +var RoleAssignments = /** @class */ (function (_super) { + __extends(RoleAssignments, _super); + /** + * Creates a new instance of the RoleAssignments class + * + * @param baseUrl The url or SharePointQueryable which forms the parent of this role assignments collection + */ + function RoleAssignments(baseUrl, path) { + if (path === void 0) { path = "roleassignments"; } + return _super.call(this, baseUrl, path) || this; + } + /** + * Adds a new role assignment with the specified principal and role definitions to the collection + * + * @param principalId The id of the user or group to assign permissions to + * @param roleDefId The id of the role definition that defines the permissions to assign + * + */ + RoleAssignments.prototype.add = function (principalId, roleDefId) { + return this.clone(RoleAssignments, "addroleassignment(principalid=" + principalId + ", roledefid=" + roleDefId + ")").postCore(); + }; + /** + * Removes the role assignment with the specified principal and role definition from the collection + * + * @param principalId The id of the user or group in the role assignment + * @param roleDefId The id of the role definition in the role assignment + * + */ + RoleAssignments.prototype.remove = function (principalId, roleDefId) { + return this.clone(RoleAssignments, "removeroleassignment(principalid=" + principalId + ", roledefid=" + roleDefId + ")").postCore(); + }; + /** + * Gets the role assignment associated with the specified principal id from the collection. + * + * @param id The id of the role assignment + */ + RoleAssignments.prototype.getById = function (id) { + var ra = new RoleAssignment(this); + ra.concat("(" + id + ")"); + return ra; + }; + return RoleAssignments; +}(sharepointqueryable_1.SharePointQueryableCollection)); +exports.RoleAssignments = RoleAssignments; +/** + * Describes a role assignment + * + */ +var RoleAssignment = /** @class */ (function (_super) { + __extends(RoleAssignment, _super); + function RoleAssignment() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(RoleAssignment.prototype, "groups", { + /** + * Gets the groups that directly belong to the access control list (ACL) for this securable object + * + */ + get: function () { + return new sitegroups_1.SiteGroups(this, "groups"); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RoleAssignment.prototype, "bindings", { + /** + * Gets the role definition bindings for this role assignment + * + */ + get: function () { + return new RoleDefinitionBindings(this); + }, + enumerable: true, + configurable: true + }); + /** + * Deletes this role assignment + * + */ + RoleAssignment.prototype.delete = function () { + return this.postCore({ + headers: { + "X-HTTP-Method": "DELETE", + }, + }); + }; + return RoleAssignment; +}(sharepointqueryable_1.SharePointQueryableInstance)); +exports.RoleAssignment = RoleAssignment; +/** + * Describes a collection of role definitions + * + */ +var RoleDefinitions = /** @class */ (function (_super) { + __extends(RoleDefinitions, _super); + /** + * Creates a new instance of the RoleDefinitions class + * + * @param baseUrl The url or SharePointQueryable which forms the parent of this role definitions collection + * + */ + function RoleDefinitions(baseUrl, path) { + if (path === void 0) { path = "roledefinitions"; } + return _super.call(this, baseUrl, path) || this; + } + /** + * Gets the role definition with the specified id from the collection + * + * @param id The id of the role definition + * + */ + RoleDefinitions.prototype.getById = function (id) { + return new RoleDefinition(this, "getById(" + id + ")"); + }; + /** + * Gets the role definition with the specified name + * + * @param name The name of the role definition + * + */ + RoleDefinitions.prototype.getByName = function (name) { + return new RoleDefinition(this, "getbyname('" + name + "')"); + }; + /** + * Gets the role definition with the specified role type + * + * @param roleTypeKind The roletypekind of the role definition (None=0, Guest=1, Reader=2, Contributor=3, WebDesigner=4, Administrator=5, Editor=6, System=7) + * + */ + RoleDefinitions.prototype.getByType = function (roleTypeKind) { + return new RoleDefinition(this, "getbytype(" + roleTypeKind + ")"); + }; + /** + * Creates a role definition + * + * @param name The new role definition's name + * @param description The new role definition's description + * @param order The order in which the role definition appears + * @param basePermissions The permissions mask for this role definition + * + */ + RoleDefinitions.prototype.add = function (name, description, order, basePermissions) { + var _this = this; + var postBody = JSON.stringify({ + BasePermissions: util_1.Util.extend({ __metadata: { type: "SP.BasePermissions" } }, basePermissions), + Description: description, + Name: name, + Order: order, + __metadata: { "type": "SP.RoleDefinition" }, + }); + return this.postCore({ body: postBody }).then(function (data) { + return { + data: data, + definition: _this.getById(data.Id), + }; + }); + }; + return RoleDefinitions; +}(sharepointqueryable_1.SharePointQueryableCollection)); +exports.RoleDefinitions = RoleDefinitions; +/** + * Describes a role definition + * + */ +var RoleDefinition = /** @class */ (function (_super) { + __extends(RoleDefinition, _super); + function RoleDefinition() { + return _super !== null && _super.apply(this, arguments) || this; + } + /** + * Updates this role definition with the supplied properties + * + * @param properties A plain object hash of values to update for the role definition + */ + /* tslint:disable no-string-literal */ + RoleDefinition.prototype.update = function (properties) { + var _this = this; + if (typeof properties.hasOwnProperty("BasePermissions") !== "undefined") { + properties["BasePermissions"] = util_1.Util.extend({ __metadata: { type: "SP.BasePermissions" } }, properties["BasePermissions"]); + } + var postBody = JSON.stringify(util_1.Util.extend({ + "__metadata": { "type": "SP.RoleDefinition" }, + }, properties)); + return this.postCore({ + body: postBody, + headers: { + "X-HTTP-Method": "MERGE", + }, + }).then(function (data) { + var retDef = _this; + if (properties.hasOwnProperty("Name")) { + var parent_1 = _this.getParent(RoleDefinitions, _this.parentUrl, ""); + retDef = parent_1.getByName(properties["Name"]); + } + return { + data: data, + definition: retDef, + }; + }); + }; + /* tslint:enable */ + /** + * Deletes this role definition + * + */ + RoleDefinition.prototype.delete = function () { + return this.postCore({ + headers: { + "X-HTTP-Method": "DELETE", + }, + }); + }; + return RoleDefinition; +}(sharepointqueryable_1.SharePointQueryableInstance)); +exports.RoleDefinition = RoleDefinition; +/** + * Describes the role definitons bound to a role assignment object + * + */ +var RoleDefinitionBindings = /** @class */ (function (_super) { + __extends(RoleDefinitionBindings, _super); + /** + * Creates a new instance of the RoleDefinitionBindings class + * + * @param baseUrl The url or SharePointQueryable which forms the parent of this role definition bindings collection + */ + function RoleDefinitionBindings(baseUrl, path) { + if (path === void 0) { path = "roledefinitionbindings"; } + return _super.call(this, baseUrl, path) || this; + } + return RoleDefinitionBindings; +}(sharepointqueryable_1.SharePointQueryableCollection)); +exports.RoleDefinitionBindings = RoleDefinitionBindings; + + +/***/ }), +/* 28 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var __extends = (this && this.__extends) || (function () { + var extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +var sharepointqueryable_1 = __webpack_require__(1); +var sitegroups_1 = __webpack_require__(17); +var util_1 = __webpack_require__(0); +/** + * Describes a collection of all site collection users + * + */ +var SiteUsers = /** @class */ (function (_super) { + __extends(SiteUsers, _super); + /** + * Creates a new instance of the SiteUsers class + * + * @param baseUrl The url or SharePointQueryable which forms the parent of this user collection + */ + function SiteUsers(baseUrl, path) { + if (path === void 0) { path = "siteusers"; } + return _super.call(this, baseUrl, path) || this; + } + /** + * Gets a user from the collection by email + * + * @param email The email address of the user to retrieve + */ + SiteUsers.prototype.getByEmail = function (email) { + return new SiteUser(this, "getByEmail('" + email + "')"); + }; + /** + * Gets a user from the collection by id + * + * @param id The id of the user to retrieve + */ + SiteUsers.prototype.getById = function (id) { + return new SiteUser(this, "getById(" + id + ")"); + }; + /** + * Gets a user from the collection by login name + * + * @param loginName The login name of the user to retrieve + */ + SiteUsers.prototype.getByLoginName = function (loginName) { + var su = new SiteUser(this); + su.concat("('!@v::" + encodeURIComponent(loginName) + "')"); + return su; + }; + /** + * Removes a user from the collection by id + * + * @param id The id of the user to remove + */ + SiteUsers.prototype.removeById = function (id) { + return this.clone(SiteUsers, "removeById(" + id + ")").postCore(); + }; + /** + * Removes a user from the collection by login name + * + * @param loginName The login name of the user to remove + */ + SiteUsers.prototype.removeByLoginName = function (loginName) { + var o = this.clone(SiteUsers, "removeByLoginName(@v)"); + o.query.add("@v", "'" + encodeURIComponent(loginName) + "'"); + return o.postCore(); + }; + /** + * Adds a user to a group + * + * @param loginName The login name of the user to add to the group + * + */ + SiteUsers.prototype.add = function (loginName) { + var _this = this; + return this.clone(SiteUsers, null).postCore({ + body: JSON.stringify({ "__metadata": { "type": "SP.User" }, LoginName: loginName }), + }).then(function () { return _this.getByLoginName(loginName); }); + }; + return SiteUsers; +}(sharepointqueryable_1.SharePointQueryableCollection)); +exports.SiteUsers = SiteUsers; +/** + * Describes a single user + * + */ +var SiteUser = /** @class */ (function (_super) { + __extends(SiteUser, _super); + function SiteUser() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(SiteUser.prototype, "groups", { + /** + * Gets the groups for this user + * + */ + get: function () { + return new sitegroups_1.SiteGroups(this, "groups"); + }, + enumerable: true, + configurable: true + }); + /** + * Updates this user instance with the supplied properties + * + * @param properties A plain object of property names and values to update for the user + */ + SiteUser.prototype.update = function (properties) { + var _this = this; + var postBody = util_1.Util.extend({ "__metadata": { "type": "SP.User" } }, properties); + return this.postCore({ + body: JSON.stringify(postBody), + headers: { + "X-HTTP-Method": "MERGE", + }, + }).then(function (data) { + return { + data: data, + user: _this, + }; + }); + }; + /** + * Delete this user + * + */ + SiteUser.prototype.delete = function () { + return this.postCore({ + headers: { + "X-HTTP-Method": "DELETE", + }, + }); + }; + return SiteUser; +}(sharepointqueryable_1.SharePointQueryableInstance)); +exports.SiteUser = SiteUser; +/** + * Represents the current user + */ +var CurrentUser = /** @class */ (function (_super) { + __extends(CurrentUser, _super); + function CurrentUser(baseUrl, path) { + if (path === void 0) { path = "currentuser"; } + return _super.call(this, baseUrl, path) || this; + } + return CurrentUser; +}(sharepointqueryable_1.SharePointQueryableInstance)); +exports.CurrentUser = CurrentUser; + + +/***/ }), +/* 29 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var __extends = (this && this.__extends) || (function () { + var extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +var sharepointqueryable_1 = __webpack_require__(1); +var util_1 = __webpack_require__(0); +var types_1 = __webpack_require__(18); +/** + * Describes a collection of Field objects + * + */ +var Fields = /** @class */ (function (_super) { + __extends(Fields, _super); + /** + * Creates a new instance of the Fields class + * + * @param baseUrl The url or SharePointQueryable which forms the parent of this fields collection + */ + function Fields(baseUrl, path) { + if (path === void 0) { path = "fields"; } + return _super.call(this, baseUrl, path) || this; + } + /** + * Gets a field from the collection by title + * + * @param title The case-sensitive title of the field + */ + Fields.prototype.getByTitle = function (title) { + return new Field(this, "getByTitle('" + title + "')"); + }; + /** + * Gets a field from the collection by using internal name or title + * + * @param name The case-sensitive internal name or title of the field + */ + Fields.prototype.getByInternalNameOrTitle = function (name) { + return new Field(this, "getByInternalNameOrTitle('" + name + "')"); + }; + /** + * Gets a list from the collection by guid id + * + * @param title The Id of the list + */ + Fields.prototype.getById = function (id) { + var f = new Field(this); + f.concat("('" + id + "')"); + return f; + }; + /** + * Creates a field based on the specified schema + */ + Fields.prototype.createFieldAsXml = function (xml) { + var _this = this; + var info; + if (typeof xml === "string") { + info = { SchemaXml: xml }; + } + else { + info = xml; + } + var postBody = JSON.stringify({ + "parameters": util_1.Util.extend({ + "__metadata": { + "type": "SP.XmlSchemaFieldCreationInformation", + }, + }, info), + }); + return this.clone(Fields, "createfieldasxml").postAsCore({ body: postBody }).then(function (data) { + return { + data: data, + field: _this.getById(data.Id), + }; + }); + }; + /** + * Adds a new list to the collection + * + * @param title The new field's title + * @param fieldType The new field's type (ex: SP.FieldText) + * @param properties Differ by type of field being created (see: https://msdn.microsoft.com/en-us/library/office/dn600182.aspx) + */ + Fields.prototype.add = function (title, fieldType, properties) { + var _this = this; + if (properties === void 0) { properties = {}; } + var postBody = JSON.stringify(util_1.Util.extend({ + "Title": title, + "__metadata": { "type": fieldType }, + }, properties)); + return this.clone(Fields, null).postAsCore({ body: postBody }).then(function (data) { + return { + data: data, + field: _this.getById(data.Id), + }; + }); + }; + /** + * Adds a new SP.FieldText to the collection + * + * @param title The field title + * @param maxLength The maximum number of characters allowed in the value of the field. + * @param properties Differ by type of field being created (see: https://msdn.microsoft.com/en-us/library/office/dn600182.aspx) + */ + Fields.prototype.addText = function (title, maxLength, properties) { + if (maxLength === void 0) { maxLength = 255; } + var props = { + FieldTypeKind: 2, + MaxLength: maxLength, + }; + return this.add(title, "SP.FieldText", util_1.Util.extend(props, properties)); + }; + /** + * Adds a new SP.FieldCalculated to the collection + * + * @param title The field title. + * @param formula The formula for the field. + * @param dateFormat The date and time format that is displayed in the field. + * @param outputType Specifies the output format for the field. Represents a FieldType value. + * @param properties Differ by type of field being created (see: https://msdn.microsoft.com/en-us/library/office/dn600182.aspx) + */ + Fields.prototype.addCalculated = function (title, formula, dateFormat, outputType, properties) { + if (outputType === void 0) { outputType = types_1.FieldTypes.Text; } + var props = { + DateFormat: dateFormat, + FieldTypeKind: 17, + Formula: formula, + OutputType: outputType, + }; + return this.add(title, "SP.FieldCalculated", util_1.Util.extend(props, properties)); + }; + /** + * Adds a new SP.FieldDateTime to the collection + * + * @param title The field title + * @param displayFormat The format of the date and time that is displayed in the field. + * @param calendarType Specifies the calendar type of the field. + * @param properties Differ by type of field being created (see: https://msdn.microsoft.com/en-us/library/office/dn600182.aspx) + */ + Fields.prototype.addDateTime = function (title, displayFormat, calendarType, friendlyDisplayFormat, properties) { + if (displayFormat === void 0) { displayFormat = types_1.DateTimeFieldFormatType.DateOnly; } + if (calendarType === void 0) { calendarType = types_1.CalendarType.Gregorian; } + if (friendlyDisplayFormat === void 0) { friendlyDisplayFormat = 0; } + var props = { + DateTimeCalendarType: calendarType, + DisplayFormat: displayFormat, + FieldTypeKind: 4, + FriendlyDisplayFormat: friendlyDisplayFormat, + }; + return this.add(title, "SP.FieldDateTime", util_1.Util.extend(props, properties)); + }; + /** + * Adds a new SP.FieldNumber to the collection + * + * @param title The field title + * @param minValue The field's minimum value + * @param maxValue The field's maximum value + * @param properties Differ by type of field being created (see: https://msdn.microsoft.com/en-us/library/office/dn600182.aspx) + */ + Fields.prototype.addNumber = function (title, minValue, maxValue, properties) { + var props = { FieldTypeKind: 9 }; + if (typeof minValue !== "undefined") { + props = util_1.Util.extend({ MinimumValue: minValue }, props); + } + if (typeof maxValue !== "undefined") { + props = util_1.Util.extend({ MaximumValue: maxValue }, props); + } + return this.add(title, "SP.FieldNumber", util_1.Util.extend(props, properties)); + }; + /** + * Adds a new SP.FieldCurrency to the collection + * + * @param title The field title + * @param minValue The field's minimum value + * @param maxValue The field's maximum value + * @param currencyLocalId Specifies the language code identifier (LCID) used to format the value of the field + * @param properties Differ by type of field being created (see: https://msdn.microsoft.com/en-us/library/office/dn600182.aspx) + */ + Fields.prototype.addCurrency = function (title, minValue, maxValue, currencyLocalId, properties) { + if (currencyLocalId === void 0) { currencyLocalId = 1033; } + var props = { + CurrencyLocaleId: currencyLocalId, + FieldTypeKind: 10, + }; + if (typeof minValue !== "undefined") { + props = util_1.Util.extend({ MinimumValue: minValue }, props); + } + if (typeof maxValue !== "undefined") { + props = util_1.Util.extend({ MaximumValue: maxValue }, props); + } + return this.add(title, "SP.FieldCurrency", util_1.Util.extend(props, properties)); + }; + /** + * Adds a new SP.FieldMultiLineText to the collection + * + * @param title The field title + * @param numberOfLines Specifies the number of lines of text to display for the field. + * @param richText Specifies whether the field supports rich formatting. + * @param restrictedMode Specifies whether the field supports a subset of rich formatting. + * @param appendOnly Specifies whether all changes to the value of the field are displayed in list forms. + * @param allowHyperlink Specifies whether a hyperlink is allowed as a value of the field. + * @param properties Differ by type of field being created (see: https://msdn.microsoft.com/en-us/library/office/dn600182.aspx) + * + */ + Fields.prototype.addMultilineText = function (title, numberOfLines, richText, restrictedMode, appendOnly, allowHyperlink, properties) { + if (numberOfLines === void 0) { numberOfLines = 6; } + if (richText === void 0) { richText = true; } + if (restrictedMode === void 0) { restrictedMode = false; } + if (appendOnly === void 0) { appendOnly = false; } + if (allowHyperlink === void 0) { allowHyperlink = true; } + var props = { + AllowHyperlink: allowHyperlink, + AppendOnly: appendOnly, + FieldTypeKind: 3, + NumberOfLines: numberOfLines, + RestrictedMode: restrictedMode, + RichText: richText, + }; + return this.add(title, "SP.FieldMultiLineText", util_1.Util.extend(props, properties)); + }; + /** + * Adds a new SP.FieldUrl to the collection + * + * @param title The field title + */ + Fields.prototype.addUrl = function (title, displayFormat, properties) { + if (displayFormat === void 0) { displayFormat = types_1.UrlFieldFormatType.Hyperlink; } + var props = { + DisplayFormat: displayFormat, + FieldTypeKind: 11, + }; + return this.add(title, "SP.FieldUrl", util_1.Util.extend(props, properties)); + }; + return Fields; +}(sharepointqueryable_1.SharePointQueryableCollection)); +exports.Fields = Fields; +/** + * Describes a single of Field instance + * + */ +var Field = /** @class */ (function (_super) { + __extends(Field, _super); + function Field() { + return _super !== null && _super.apply(this, arguments) || this; + } + /** + * Updates this field intance with the supplied properties + * + * @param properties A plain object hash of values to update for the list + * @param fieldType The type value, required to update child field type properties + */ + Field.prototype.update = function (properties, fieldType) { + var _this = this; + if (fieldType === void 0) { fieldType = "SP.Field"; } + var postBody = JSON.stringify(util_1.Util.extend({ + "__metadata": { "type": fieldType }, + }, properties)); + return this.postCore({ + body: postBody, + headers: { + "X-HTTP-Method": "MERGE", + }, + }).then(function (data) { + return { + data: data, + field: _this, + }; + }); + }; + /** + * Delete this fields + * + */ + Field.prototype.delete = function () { + return this.postCore({ + headers: { + "X-HTTP-Method": "DELETE", + }, + }); + }; + /** + * Sets the value of the ShowInDisplayForm property for this field. + */ + Field.prototype.setShowInDisplayForm = function (show) { + return this.clone(Field, "setshowindisplayform(" + show + ")").postCore(); + }; + /** + * Sets the value of the ShowInEditForm property for this field. + */ + Field.prototype.setShowInEditForm = function (show) { + return this.clone(Field, "setshowineditform(" + show + ")").postCore(); + }; + /** + * Sets the value of the ShowInNewForm property for this field. + */ + Field.prototype.setShowInNewForm = function (show) { + return this.clone(Field, "setshowinnewform(" + show + ")").postCore(); + }; + return Field; +}(sharepointqueryable_1.SharePointQueryableInstance)); +exports.Field = Field; + + +/***/ }), +/* 30 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +Object.defineProperty(exports, "__esModule", { value: true }); +var util_1 = __webpack_require__(0); +var logging_1 = __webpack_require__(3); +var httpclient_1 = __webpack_require__(25); +var utils_1 = __webpack_require__(9); +var pnplibconfig_1 = __webpack_require__(2); +var exceptions_1 = __webpack_require__(4); +/** + * Manages a batch of OData operations + */ +var ODataBatch = /** @class */ (function () { + function ODataBatch(baseUrl, _batchId) { + if (_batchId === void 0) { _batchId = util_1.Util.getGUID(); } + this.baseUrl = baseUrl; + this._batchId = _batchId; + this._requests = []; + this._dependencies = []; + } + Object.defineProperty(ODataBatch.prototype, "batchId", { + get: function () { + return this._batchId; + }, + enumerable: true, + configurable: true + }); + /** + * Adds a request to a batch (not designed for public use) + * + * @param url The full url of the request + * @param method The http method GET, POST, etc + * @param options Any options to include in the request + * @param parser The parser that will hadle the results of the request + */ + ODataBatch.prototype.add = function (url, method, options, parser) { + var info = { + method: method.toUpperCase(), + options: options, + parser: parser, + reject: null, + resolve: null, + url: url, + }; + var p = new Promise(function (resolve, reject) { + info.resolve = resolve; + info.reject = reject; + }); + this._requests.push(info); + return p; + }; + /** + * Adds a dependency insuring that some set of actions will occur before a batch is processed. + * MUST be cleared using the returned resolve delegate to allow batches to run + */ + ODataBatch.prototype.addDependency = function () { + var resolver; + var promise = new Promise(function (resolve) { + resolver = resolve; + }); + this._dependencies.push(promise); + return resolver; + }; + /** + * Execute the current batch and resolve the associated promises + * + * @returns A promise which will be resolved once all of the batch's child promises have resolved + */ + ODataBatch.prototype.execute = function () { + var _this = this; + // we need to check the dependencies twice due to how different engines handle things. + // We can get a second set of promises added after the first set resolve + return Promise.all(this._dependencies).then(function () { return Promise.all(_this._dependencies); }).then(function () { return _this.executeImpl(); }); + }; + ODataBatch.prototype.executeImpl = function () { + var _this = this; + logging_1.Logger.write("[" + this.batchId + "] (" + (new Date()).getTime() + ") Executing batch with " + this._requests.length + " requests.", logging_1.LogLevel.Info); + // if we don't have any requests, don't bother sending anything + // this could be due to caching further upstream, or just an empty batch + if (this._requests.length < 1) { + logging_1.Logger.write("Resolving empty batch.", logging_1.LogLevel.Info); + return Promise.resolve(); + } + // creating the client here allows the url to be populated for nodejs client as well as potentially + // any other hacks needed for other types of clients. Essentially allows the absoluteRequestUrl + // below to be correct + var client = new httpclient_1.HttpClient(); + // due to timing we need to get the absolute url here so we can use it for all the individual requests + // and for sending the entire batch + return util_1.Util.toAbsoluteUrl(this.baseUrl).then(function (absoluteRequestUrl) { + // build all the requests, send them, pipe results in order to parsers + var batchBody = []; + var currentChangeSetId = ""; + for (var i = 0; i < _this._requests.length; i++) { + var reqInfo = _this._requests[i]; + if (reqInfo.method === "GET") { + if (currentChangeSetId.length > 0) { + // end an existing change set + batchBody.push("--changeset_" + currentChangeSetId + "--\n\n"); + currentChangeSetId = ""; + } + batchBody.push("--batch_" + _this._batchId + "\n"); + } + else { + if (currentChangeSetId.length < 1) { + // start new change set + currentChangeSetId = util_1.Util.getGUID(); + batchBody.push("--batch_" + _this._batchId + "\n"); + batchBody.push("Content-Type: multipart/mixed; boundary=\"changeset_" + currentChangeSetId + "\"\n\n"); + } + batchBody.push("--changeset_" + currentChangeSetId + "\n"); + } + // common batch part prefix + batchBody.push("Content-Type: application/http\n"); + batchBody.push("Content-Transfer-Encoding: binary\n\n"); + var headers = new Headers(); + // this is the url of the individual request within the batch + var url = util_1.Util.isUrlAbsolute(reqInfo.url) ? reqInfo.url : util_1.Util.combinePaths(absoluteRequestUrl, reqInfo.url); + logging_1.Logger.write("[" + _this.batchId + "] (" + (new Date()).getTime() + ") Adding request " + reqInfo.method + " " + url + " to batch.", logging_1.LogLevel.Verbose); + if (reqInfo.method !== "GET") { + var method = reqInfo.method; + if (reqInfo.hasOwnProperty("options") && reqInfo.options.hasOwnProperty("headers") && typeof reqInfo.options.headers["X-HTTP-Method"] !== "undefined") { + method = reqInfo.options.headers["X-HTTP-Method"]; + delete reqInfo.options.headers["X-HTTP-Method"]; + } + batchBody.push(method + " " + url + " HTTP/1.1\n"); + headers.set("Content-Type", "application/json;odata=verbose;charset=utf-8"); + } + else { + batchBody.push(reqInfo.method + " " + url + " HTTP/1.1\n"); + } + // merge global config headers + utils_1.mergeHeaders(headers, pnplibconfig_1.RuntimeConfig.spHeaders); + // merge per-request headers + if (reqInfo.options) { + utils_1.mergeHeaders(headers, reqInfo.options.headers); + } + // lastly we apply any default headers we need that may not exist + if (!headers.has("Accept")) { + headers.append("Accept", "application/json"); + } + if (!headers.has("Content-Type")) { + headers.append("Content-Type", "application/json;odata=verbose;charset=utf-8"); + } + if (!headers.has("X-ClientService-ClientTag")) { + headers.append("X-ClientService-ClientTag", "PnPCoreJS:3.0.0"); + } + // write headers into batch body + headers.forEach(function (value, name) { + batchBody.push(name + ": " + value + "\n"); + }); + batchBody.push("\n"); + if (reqInfo.options.body) { + batchBody.push(reqInfo.options.body + "\n\n"); + } + } + if (currentChangeSetId.length > 0) { + // Close the changeset + batchBody.push("--changeset_" + currentChangeSetId + "--\n\n"); + currentChangeSetId = ""; + } + batchBody.push("--batch_" + _this._batchId + "--\n"); + var batchHeaders = { + "Content-Type": "multipart/mixed; boundary=batch_" + _this._batchId, + }; + var batchOptions = { + "body": batchBody.join(""), + "headers": batchHeaders, + "method": "POST", + }; + logging_1.Logger.write("[" + _this.batchId + "] (" + (new Date()).getTime() + ") Sending batch request.", logging_1.LogLevel.Info); + return client.fetch(util_1.Util.combinePaths(absoluteRequestUrl, "/_api/$batch"), batchOptions) + .then(function (r) { return r.text(); }) + .then(_this._parseResponse) + .then(function (responses) { + if (responses.length !== _this._requests.length) { + throw new exceptions_1.BatchParseException("Could not properly parse responses to match requests in batch."); + } + logging_1.Logger.write("[" + _this.batchId + "] (" + (new Date()).getTime() + ") Resolving batched requests.", logging_1.LogLevel.Info); + return responses.reduce(function (chain, response, index) { + var request = _this._requests[index]; + logging_1.Logger.write("[" + _this.batchId + "] (" + (new Date()).getTime() + ") Resolving batched request " + request.method + " " + request.url + ".", logging_1.LogLevel.Verbose); + return chain.then(function (_) { return request.parser.parse(response).then(request.resolve).catch(request.reject); }); + }, Promise.resolve()); + }); + }); + }; + /** + * Parses the response from a batch request into an array of Response instances + * + * @param body Text body of the response from the batch request + */ + ODataBatch.prototype._parseResponse = function (body) { + return new Promise(function (resolve, reject) { + var responses = []; + var header = "--batchresponse_"; + // Ex. "HTTP/1.1 500 Internal Server Error" + var statusRegExp = new RegExp("^HTTP/[0-9.]+ +([0-9]+) +(.*)", "i"); + var lines = body.split("\n"); + var state = "batch"; + var status; + var statusText; + for (var i = 0; i < lines.length; ++i) { + var line = lines[i]; + switch (state) { + case "batch": + if (line.substr(0, header.length) === header) { + state = "batchHeaders"; + } + else { + if (line.trim() !== "") { + throw new exceptions_1.BatchParseException("Invalid response, line " + i); + } + } + break; + case "batchHeaders": + if (line.trim() === "") { + state = "status"; + } + break; + case "status": + var parts = statusRegExp.exec(line); + if (parts.length !== 3) { + throw new exceptions_1.BatchParseException("Invalid status, line " + i); + } + status = parseInt(parts[1], 10); + statusText = parts[2]; + state = "statusHeaders"; + break; + case "statusHeaders": + if (line.trim() === "") { + state = "body"; + } + break; + case "body": + responses.push((status === 204) ? new Response() : new Response(line, { status: status, statusText: statusText })); + state = "batch"; + break; + } + } + if (state !== "status") { + reject(new exceptions_1.BatchParseException("Unexpected end of input")); + } + resolve(responses); + }); + }; + return ODataBatch; +}()); +exports.ODataBatch = ODataBatch; + + +/***/ }), +/* 31 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var __extends = (this && this.__extends) || (function () { + var extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +var sharepointqueryable_1 = __webpack_require__(1); +/** + * Describes a collection of List objects + * + */ +var Features = /** @class */ (function (_super) { + __extends(Features, _super); + /** + * Creates a new instance of the Lists class + * + * @param baseUrl The url or SharePointQueryable which forms the parent of this fields collection + */ + function Features(baseUrl, path) { + if (path === void 0) { path = "features"; } + return _super.call(this, baseUrl, path) || this; + } + /** + * Gets a list from the collection by guid id + * + * @param id The Id of the feature (GUID) + */ + Features.prototype.getById = function (id) { + var feature = new Feature(this); + feature.concat("('" + id + "')"); + return feature; + }; + /** + * Adds a new list to the collection + * + * @param id The Id of the feature (GUID) + * @param force If true the feature activation will be forced + */ + Features.prototype.add = function (id, force) { + var _this = this; + if (force === void 0) { force = false; } + return this.clone(Features, "add").postCore({ + body: JSON.stringify({ + featdefScope: 0, + featureId: id, + force: force, + }), + }).then(function (data) { + return { + data: data, + feature: _this.getById(id), + }; + }); + }; + /** + * Removes (deactivates) a feature from the collection + * + * @param id The Id of the feature (GUID) + * @param force If true the feature deactivation will be forced + */ + Features.prototype.remove = function (id, force) { + if (force === void 0) { force = false; } + return this.clone(Features, "remove").postCore({ + body: JSON.stringify({ + featureId: id, + force: force, + }), + }); + }; + return Features; +}(sharepointqueryable_1.SharePointQueryableCollection)); +exports.Features = Features; +var Feature = /** @class */ (function (_super) { + __extends(Feature, _super); + function Feature() { + return _super !== null && _super.apply(this, arguments) || this; + } + /** + * Removes (deactivates) a feature from the collection + * + * @param force If true the feature deactivation will be forced + */ + Feature.prototype.deactivate = function (force) { + var _this = this; + if (force === void 0) { force = false; } + var removeDependency = this.addBatchDependency(); + var idGet = new Feature(this).select("DefinitionId"); + return idGet.getAs().then(function (feature) { + var promise = _this.getParent(Features, _this.parentUrl, "", _this.batch).remove(feature.DefinitionId, force); + removeDependency(); + return promise; + }); + }; + return Feature; +}(sharepointqueryable_1.SharePointQueryableInstance)); +exports.Feature = Feature; + + +/***/ }), +/* 32 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +Object.defineProperty(exports, "__esModule", { value: true }); +var util_1 = __webpack_require__(0); +var storage_1 = __webpack_require__(23); +var configuration_1 = __webpack_require__(34); +var logging_1 = __webpack_require__(3); +var rest_1 = __webpack_require__(35); +var pnplibconfig_1 = __webpack_require__(2); +var rest_2 = __webpack_require__(51); +/** + * Root class of the Patterns and Practices namespace, provides an entry point to the library + */ +/** + * Utility methods + */ +exports.util = util_1.Util; +/** + * Provides access to the SharePoint REST interface + */ +exports.sp = new rest_1.SPRest(); +/** + * Provides access to the Microsoft Graph REST interface + */ +exports.graph = new rest_2.GraphRest(); +/** + * Provides access to local and session storage + */ +exports.storage = new storage_1.PnPClientStorage(); +/** + * Global configuration instance to which providers can be added + */ +exports.config = new configuration_1.Settings(); +/** + * Global logging instance to which subscribers can be registered and messages written + */ +exports.log = logging_1.Logger; +/** + * Allows for the configuration of the library + */ +exports.setup = pnplibconfig_1.setRuntimeConfig; +// /** +// * Expose a subset of classes from the library for public consumption +// */ +// creating this class instead of directly assigning to default fixes issue #116 +var Def = { + /** + * Global configuration instance to which providers can be added + */ + config: exports.config, + /** + * Provides access to the Microsoft Graph REST interface + */ + graph: exports.graph, + /** + * Global logging instance to which subscribers can be registered and messages written + */ + log: exports.log, + /** + * Provides access to local and session storage + */ + setup: exports.setup, + /** + * Provides access to the REST interface + */ + sp: exports.sp, + /** + * Provides access to local and session storage + */ + storage: exports.storage, + /** + * Utility methods + */ + util: exports.util, +}; +/** + * Enables use of the import pnp from syntax + */ +exports.default = Def; + + +/***/ }), +/* 33 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(global) { +Object.defineProperty(exports, "__esModule", { value: true }); +/** + * Makes requests using the fetch API + */ +var FetchClient = /** @class */ (function () { + function FetchClient() { + } + FetchClient.prototype.fetch = function (url, options) { + return global.fetch(url, options); + }; + return FetchClient; +}()); +exports.FetchClient = FetchClient; + +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(22))) + +/***/ }), +/* 34 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +Object.defineProperty(exports, "__esModule", { value: true }); +var collections_1 = __webpack_require__(8); +/** + * Class used to manage the current application settings + * + */ +var Settings = /** @class */ (function () { + /** + * Creates a new instance of the settings class + * + * @constructor + */ + function Settings() { + this._settings = new collections_1.Dictionary(); + } + /** + * Adds a new single setting, or overwrites a previous setting with the same key + * + * @param {string} key The key used to store this setting + * @param {string} value The setting value to store + */ + Settings.prototype.add = function (key, value) { + this._settings.add(key, value); + }; + /** + * Adds a JSON value to the collection as a string, you must use getJSON to rehydrate the object when read + * + * @param {string} key The key used to store this setting + * @param {any} value The setting value to store + */ + Settings.prototype.addJSON = function (key, value) { + this._settings.add(key, JSON.stringify(value)); + }; + /** + * Applies the supplied hash to the setting collection overwriting any existing value, or created new values + * + * @param {TypedHash} hash The set of values to add + */ + Settings.prototype.apply = function (hash) { + var _this = this; + return new Promise(function (resolve, reject) { + try { + _this._settings.merge(hash); + resolve(); + } + catch (e) { + reject(e); + } + }); + }; + /** + * Loads configuration settings into the collection from the supplied provider and returns a Promise + * + * @param {IConfigurationProvider} provider The provider from which we will load the settings + */ + Settings.prototype.load = function (provider) { + var _this = this; + return new Promise(function (resolve, reject) { + provider.getConfiguration().then(function (value) { + _this._settings.merge(value); + resolve(); + }).catch(function (reason) { + reject(reason); + }); + }); + }; + /** + * Gets a value from the configuration + * + * @param {string} key The key whose value we want to return. Returns null if the key does not exist + * @return {string} string value from the configuration + */ + Settings.prototype.get = function (key) { + return this._settings.get(key); + }; + /** + * Gets a JSON value, rehydrating the stored string to the original object + * + * @param {string} key The key whose value we want to return. Returns null if the key does not exist + * @return {any} object from the configuration + */ + Settings.prototype.getJSON = function (key) { + var o = this.get(key); + if (typeof o === "undefined" || o === null) { + return o; + } + return JSON.parse(o); + }; + return Settings; +}()); +exports.Settings = Settings; + + +/***/ }), +/* 35 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +Object.defineProperty(exports, "__esModule", { value: true }); +var search_1 = __webpack_require__(36); +var searchsuggest_1 = __webpack_require__(39); +var site_1 = __webpack_require__(40); +var webs_1 = __webpack_require__(10); +var util_1 = __webpack_require__(0); +var userprofiles_1 = __webpack_require__(48); +var exceptions_1 = __webpack_require__(4); +var utilities_1 = __webpack_require__(50); +/** + * Root of the SharePoint REST module + */ +var SPRest = /** @class */ (function () { + /** + * Creates a new instance of the SPRest class + * + * @param options Additional options + * @param baseUrl A string that should form the base part of the url + */ + function SPRest(options, baseUrl) { + if (options === void 0) { options = {}; } + if (baseUrl === void 0) { baseUrl = ""; } + this._options = options; + this._baseUrl = baseUrl; + } + /** + * Configures instance with additional options and baseUrl. + * Provided configuration used by other objects in a chain + * + * @param options Additional options + * @param baseUrl A string that should form the base part of the url + */ + SPRest.prototype.configure = function (options, baseUrl) { + if (baseUrl === void 0) { baseUrl = ""; } + return new SPRest(options, baseUrl); + }; + /** + * Executes a search against this web context + * + * @param query The SearchQuery definition + */ + SPRest.prototype.searchSuggest = function (query) { + var finalQuery; + if (typeof query === "string") { + finalQuery = { querytext: query }; + } + else { + finalQuery = query; + } + return new searchsuggest_1.SearchSuggest(this._baseUrl).configure(this._options).execute(finalQuery); + }; + /** + * Executes a search against this web context + * + * @param query The SearchQuery definition + */ + SPRest.prototype.search = function (query) { + var finalQuery; + if (typeof query === "string") { + finalQuery = { Querytext: query }; + } + else if (query instanceof search_1.SearchQueryBuilder) { + finalQuery = query.toSearchQuery(); + } + else { + finalQuery = query; + } + return new search_1.Search(this._baseUrl).configure(this._options).execute(finalQuery); + }; + Object.defineProperty(SPRest.prototype, "site", { + /** + * Begins a site collection scoped REST request + * + */ + get: function () { + return new site_1.Site(this._baseUrl).configure(this._options); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(SPRest.prototype, "web", { + /** + * Begins a web scoped REST request + * + */ + get: function () { + return new webs_1.Web(this._baseUrl).configure(this._options); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(SPRest.prototype, "profiles", { + /** + * Access to user profile methods + * + */ + get: function () { + return new userprofiles_1.UserProfileQuery(this._baseUrl).configure(this._options); + }, + enumerable: true, + configurable: true + }); + /** + * Creates a new batch object for use with the SharePointQueryable.addToBatch method + * + */ + SPRest.prototype.createBatch = function () { + return this.web.createBatch(); + }; + Object.defineProperty(SPRest.prototype, "utility", { + /** + * Static utilities methods from SP.Utilities.Utility + */ + get: function () { + return new utilities_1.UtilityMethod(this._baseUrl, "").configure(this._options); + }, + enumerable: true, + configurable: true + }); + /** + * Begins a cross-domain, host site scoped REST request, for use in add-in webs + * + * @param addInWebUrl The absolute url of the add-in web + * @param hostWebUrl The absolute url of the host web + */ + SPRest.prototype.crossDomainSite = function (addInWebUrl, hostWebUrl) { + return this._cdImpl(site_1.Site, addInWebUrl, hostWebUrl, "site"); + }; + /** + * Begins a cross-domain, host web scoped REST request, for use in add-in webs + * + * @param addInWebUrl The absolute url of the add-in web + * @param hostWebUrl The absolute url of the host web + */ + SPRest.prototype.crossDomainWeb = function (addInWebUrl, hostWebUrl) { + return this._cdImpl(webs_1.Web, addInWebUrl, hostWebUrl, "web"); + }; + /** + * Implements the creation of cross domain REST urls + * + * @param factory The constructor of the object to create Site | Web + * @param addInWebUrl The absolute url of the add-in web + * @param hostWebUrl The absolute url of the host web + * @param urlPart String part to append to the url "site" | "web" + */ + SPRest.prototype._cdImpl = function (factory, addInWebUrl, hostWebUrl, urlPart) { + if (!util_1.Util.isUrlAbsolute(addInWebUrl)) { + throw new exceptions_1.UrlException("The addInWebUrl parameter must be an absolute url."); + } + if (!util_1.Util.isUrlAbsolute(hostWebUrl)) { + throw new exceptions_1.UrlException("The hostWebUrl parameter must be an absolute url."); + } + var url = util_1.Util.combinePaths(addInWebUrl, "_api/SP.AppContextSite(@target)"); + var instance = new factory(url, urlPart); + instance.query.add("@target", "'" + encodeURIComponent(hostWebUrl) + "'"); + return instance.configure(this._options); + }; + return SPRest; +}()); +exports.SPRest = SPRest; + + +/***/ }), +/* 36 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var __extends = (this && this.__extends) || (function () { + var extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +var sharepointqueryable_1 = __webpack_require__(1); +var util_1 = __webpack_require__(0); +/** + * Allows for the fluent construction of search queries + */ +var SearchQueryBuilder = /** @class */ (function () { + function SearchQueryBuilder(queryText, _query) { + if (queryText === void 0) { queryText = ""; } + if (_query === void 0) { _query = {}; } + this._query = _query; + if (typeof queryText === "string" && queryText.length > 0) { + this.extendQuery({ Querytext: queryText }); + } + } + SearchQueryBuilder.create = function (queryText, queryTemplate) { + if (queryText === void 0) { queryText = ""; } + if (queryTemplate === void 0) { queryTemplate = {}; } + return new SearchQueryBuilder(queryText, queryTemplate); + }; + SearchQueryBuilder.prototype.text = function (queryText) { + return this.extendQuery({ Querytext: queryText }); + }; + SearchQueryBuilder.prototype.template = function (template) { + return this.extendQuery({ QueryTemplate: template }); + }; + SearchQueryBuilder.prototype.sourceId = function (id) { + return this.extendQuery({ SourceId: id }); + }; + Object.defineProperty(SearchQueryBuilder.prototype, "enableInterleaving", { + get: function () { + return this.extendQuery({ EnableInterleaving: true }); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(SearchQueryBuilder.prototype, "enableStemming", { + get: function () { + return this.extendQuery({ EnableStemming: true }); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(SearchQueryBuilder.prototype, "trimDuplicates", { + get: function () { + return this.extendQuery({ TrimDuplicates: true }); + }, + enumerable: true, + configurable: true + }); + SearchQueryBuilder.prototype.trimDuplicatesIncludeId = function (n) { + return this.extendQuery({ TrimDuplicatesIncludeId: n }); + }; + Object.defineProperty(SearchQueryBuilder.prototype, "enableNicknames", { + get: function () { + return this.extendQuery({ EnableNicknames: true }); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(SearchQueryBuilder.prototype, "enableFql", { + get: function () { + return this.extendQuery({ EnableFQL: true }); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(SearchQueryBuilder.prototype, "enablePhonetic", { + get: function () { + return this.extendQuery({ EnablePhonetic: true }); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(SearchQueryBuilder.prototype, "bypassResultTypes", { + get: function () { + return this.extendQuery({ BypassResultTypes: true }); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(SearchQueryBuilder.prototype, "processBestBets", { + get: function () { + return this.extendQuery({ ProcessBestBets: true }); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(SearchQueryBuilder.prototype, "enableQueryRules", { + get: function () { + return this.extendQuery({ EnableQueryRules: true }); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(SearchQueryBuilder.prototype, "enableSorting", { + get: function () { + return this.extendQuery({ EnableSorting: true }); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(SearchQueryBuilder.prototype, "generateBlockRankLog", { + get: function () { + return this.extendQuery({ GenerateBlockRankLog: true }); + }, + enumerable: true, + configurable: true + }); + SearchQueryBuilder.prototype.rankingModelId = function (id) { + return this.extendQuery({ RankingModelId: id }); + }; + SearchQueryBuilder.prototype.startRow = function (n) { + return this.extendQuery({ StartRow: n }); + }; + SearchQueryBuilder.prototype.rowLimit = function (n) { + return this.extendQuery({ RowLimit: n }); + }; + SearchQueryBuilder.prototype.rowsPerPage = function (n) { + return this.extendQuery({ RowsPerPage: n }); + }; + SearchQueryBuilder.prototype.selectProperties = function () { + var properties = []; + for (var _i = 0; _i < arguments.length; _i++) { + properties[_i] = arguments[_i]; + } + return this.extendQuery({ SelectProperties: properties }); + }; + SearchQueryBuilder.prototype.culture = function (culture) { + return this.extendQuery({ Culture: culture }); + }; + SearchQueryBuilder.prototype.timeZoneId = function (id) { + return this.extendQuery({ TimeZoneId: id }); + }; + SearchQueryBuilder.prototype.refinementFilters = function () { + var filters = []; + for (var _i = 0; _i < arguments.length; _i++) { + filters[_i] = arguments[_i]; + } + return this.extendQuery({ RefinementFilters: filters }); + }; + SearchQueryBuilder.prototype.refiners = function (refiners) { + return this.extendQuery({ Refiners: refiners }); + }; + SearchQueryBuilder.prototype.hiddenConstraints = function (constraints) { + return this.extendQuery({ HiddenConstraints: constraints }); + }; + SearchQueryBuilder.prototype.sortList = function () { + var sorts = []; + for (var _i = 0; _i < arguments.length; _i++) { + sorts[_i] = arguments[_i]; + } + return this.extendQuery({ SortList: sorts }); + }; + SearchQueryBuilder.prototype.timeout = function (milliseconds) { + return this.extendQuery({ Timeout: milliseconds }); + }; + SearchQueryBuilder.prototype.hithighlightedProperties = function () { + var properties = []; + for (var _i = 0; _i < arguments.length; _i++) { + properties[_i] = arguments[_i]; + } + return this.extendQuery({ HitHighlightedProperties: properties }); + }; + SearchQueryBuilder.prototype.clientType = function (clientType) { + return this.extendQuery({ ClientType: clientType }); + }; + SearchQueryBuilder.prototype.personalizationData = function (data) { + return this.extendQuery({ PersonalizationData: data }); + }; + SearchQueryBuilder.prototype.resultsURL = function (url) { + return this.extendQuery({ ResultsUrl: url }); + }; + SearchQueryBuilder.prototype.queryTag = function () { + var tags = []; + for (var _i = 0; _i < arguments.length; _i++) { + tags[_i] = arguments[_i]; + } + return this.extendQuery({ QueryTag: tags }); + }; + SearchQueryBuilder.prototype.properties = function () { + var properties = []; + for (var _i = 0; _i < arguments.length; _i++) { + properties[_i] = arguments[_i]; + } + return this.extendQuery({ Properties: properties }); + }; + Object.defineProperty(SearchQueryBuilder.prototype, "processPersonalFavorites", { + get: function () { + return this.extendQuery({ ProcessPersonalFavorites: true }); + }, + enumerable: true, + configurable: true + }); + SearchQueryBuilder.prototype.queryTemplatePropertiesUrl = function (url) { + return this.extendQuery({ QueryTemplatePropertiesUrl: url }); + }; + SearchQueryBuilder.prototype.reorderingRules = function () { + var rules = []; + for (var _i = 0; _i < arguments.length; _i++) { + rules[_i] = arguments[_i]; + } + return this.extendQuery({ ReorderingRules: rules }); + }; + SearchQueryBuilder.prototype.hitHighlightedMultivaluePropertyLimit = function (limit) { + return this.extendQuery({ HitHighlightedMultivaluePropertyLimit: limit }); + }; + Object.defineProperty(SearchQueryBuilder.prototype, "enableOrderingHitHighlightedProperty", { + get: function () { + return this.extendQuery({ EnableOrderingHitHighlightedProperty: true }); + }, + enumerable: true, + configurable: true + }); + SearchQueryBuilder.prototype.collapseSpecification = function (spec) { + return this.extendQuery({ CollapseSpecification: spec }); + }; + SearchQueryBuilder.prototype.uiLanguage = function (lang) { + return this.extendQuery({ UILanguage: lang }); + }; + SearchQueryBuilder.prototype.desiredSnippetLength = function (len) { + return this.extendQuery({ DesiredSnippetLength: len }); + }; + SearchQueryBuilder.prototype.maxSnippetLength = function (len) { + return this.extendQuery({ MaxSnippetLength: len }); + }; + SearchQueryBuilder.prototype.summaryLength = function (len) { + return this.extendQuery({ SummaryLength: len }); + }; + SearchQueryBuilder.prototype.toSearchQuery = function () { + return this._query; + }; + SearchQueryBuilder.prototype.extendQuery = function (part) { + this._query = util_1.Util.extend(this._query, part); + return this; + }; + return SearchQueryBuilder; +}()); +exports.SearchQueryBuilder = SearchQueryBuilder; +/** + * Describes the search API + * + */ +var Search = /** @class */ (function (_super) { + __extends(Search, _super); + /** + * Creates a new instance of the Search class + * + * @param baseUrl The url for the search context + * @param query The SearchQuery object to execute + */ + function Search(baseUrl, path) { + if (path === void 0) { path = "_api/search/postquery"; } + return _super.call(this, baseUrl, path) || this; + } + /** + * ....... + * @returns Promise + */ + Search.prototype.execute = function (query) { + var _this = this; + var formattedBody; + formattedBody = query; + if (formattedBody.SelectProperties) { + formattedBody.SelectProperties = this.fixupProp(query.SelectProperties); + } + if (formattedBody.RefinementFilters) { + formattedBody.RefinementFilters = this.fixupProp(query.RefinementFilters); + } + if (formattedBody.SortList) { + formattedBody.SortList = this.fixupProp(query.SortList); + } + if (formattedBody.HithighlightedProperties) { + formattedBody.HithighlightedProperties = this.fixupProp(query.HitHighlightedProperties); + } + if (formattedBody.ReorderingRules) { + formattedBody.ReorderingRules = this.fixupProp(query.ReorderingRules); + } + if (formattedBody.Properties) { + formattedBody.Properties = this.fixupProp(query.Properties); + } + var postBody = JSON.stringify({ + request: util_1.Util.extend({ + "__metadata": { "type": "Microsoft.Office.Server.Search.REST.SearchRequest" }, + }, formattedBody), + }); + return this.postCore({ body: postBody }).then(function (data) { return new SearchResults(data, _this.toUrl(), query); }); + }; + /** + * Fixes up properties that expect to consist of a "results" collection when needed + * + * @param prop property to fixup for container struct + */ + Search.prototype.fixupProp = function (prop) { + if (prop.hasOwnProperty("results")) { + return prop; + } + return { results: prop }; + }; + return Search; +}(sharepointqueryable_1.SharePointQueryableInstance)); +exports.Search = Search; +/** + * Describes the SearchResults class, which returns the formatted and raw version of the query response + */ +var SearchResults = /** @class */ (function () { + /** + * Creates a new instance of the SearchResult class + * + */ + function SearchResults(rawResponse, _url, _query, _raw, _primary) { + if (_raw === void 0) { _raw = null; } + if (_primary === void 0) { _primary = null; } + this._url = _url; + this._query = _query; + this._raw = _raw; + this._primary = _primary; + this._raw = rawResponse.postquery ? rawResponse.postquery : rawResponse; + } + Object.defineProperty(SearchResults.prototype, "ElapsedTime", { + get: function () { + return this.RawSearchResults.ElapsedTime; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(SearchResults.prototype, "RowCount", { + get: function () { + return this.RawSearchResults.PrimaryQueryResult.RelevantResults.RowCount; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(SearchResults.prototype, "TotalRows", { + get: function () { + return this.RawSearchResults.PrimaryQueryResult.RelevantResults.TotalRows; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(SearchResults.prototype, "TotalRowsIncludingDuplicates", { + get: function () { + return this.RawSearchResults.PrimaryQueryResult.RelevantResults.TotalRowsIncludingDuplicates; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(SearchResults.prototype, "RawSearchResults", { + get: function () { + return this._raw; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(SearchResults.prototype, "PrimarySearchResults", { + get: function () { + if (this._primary === null) { + this._primary = this.formatSearchResults(this._raw.PrimaryQueryResult.RelevantResults.Table.Rows); + } + return this._primary; + }, + enumerable: true, + configurable: true + }); + /** + * Gets a page of results + * + * @param pageNumber Index of the page to return. Used to determine StartRow + * @param pageSize Optional, items per page (default = 10) + */ + SearchResults.prototype.getPage = function (pageNumber, pageSize) { + // if we got all the available rows we don't have another page + if (this.TotalRows < this.RowCount) { + return Promise.resolve(null); + } + // if pageSize is supplied, then we use that regardless of any previous values + // otherwise get the previous RowLimit or default to 10 + var rows = typeof pageSize !== "undefined" ? pageSize : this._query.hasOwnProperty("RowLimit") ? this._query.RowLimit : 10; + var query = util_1.Util.extend(this._query, { + RowLimit: rows, + StartRow: rows * (pageNumber - 1), + }); + // we have reached the end + if (query.StartRow > this.TotalRows) { + return Promise.resolve(null); + } + var search = new Search(this._url, null); + return search.execute(query); + }; + /** + * Formats a search results array + * + * @param rawResults The array to process + */ + SearchResults.prototype.formatSearchResults = function (rawResults) { + var results = new Array(); + var tempResults = rawResults.results ? rawResults.results : rawResults; + for (var _i = 0, tempResults_1 = tempResults; _i < tempResults_1.length; _i++) { + var tempResult = tempResults_1[_i]; + var cells = tempResult.Cells.results ? tempResult.Cells.results : tempResult.Cells; + results.push(cells.reduce(function (res, cell) { + Object.defineProperty(res, cell.Key, { + configurable: false, + enumerable: false, + value: cell.Value, + writable: false, + }); + return res; + }, {})); + } + return results; + }; + return SearchResults; +}()); +exports.SearchResults = SearchResults; +/** + * defines the SortDirection enum + */ +var SortDirection; +(function (SortDirection) { + SortDirection[SortDirection["Ascending"] = 0] = "Ascending"; + SortDirection[SortDirection["Descending"] = 1] = "Descending"; + SortDirection[SortDirection["FQLFormula"] = 2] = "FQLFormula"; +})(SortDirection = exports.SortDirection || (exports.SortDirection = {})); +/** + * defines the ReorderingRuleMatchType enum + */ +var ReorderingRuleMatchType; +(function (ReorderingRuleMatchType) { + ReorderingRuleMatchType[ReorderingRuleMatchType["ResultContainsKeyword"] = 0] = "ResultContainsKeyword"; + ReorderingRuleMatchType[ReorderingRuleMatchType["TitleContainsKeyword"] = 1] = "TitleContainsKeyword"; + ReorderingRuleMatchType[ReorderingRuleMatchType["TitleMatchesKeyword"] = 2] = "TitleMatchesKeyword"; + ReorderingRuleMatchType[ReorderingRuleMatchType["UrlStartsWith"] = 3] = "UrlStartsWith"; + ReorderingRuleMatchType[ReorderingRuleMatchType["UrlExactlyMatches"] = 4] = "UrlExactlyMatches"; + ReorderingRuleMatchType[ReorderingRuleMatchType["ContentTypeIs"] = 5] = "ContentTypeIs"; + ReorderingRuleMatchType[ReorderingRuleMatchType["FileExtensionMatches"] = 6] = "FileExtensionMatches"; + ReorderingRuleMatchType[ReorderingRuleMatchType["ResultHasTag"] = 7] = "ResultHasTag"; + ReorderingRuleMatchType[ReorderingRuleMatchType["ManualCondition"] = 8] = "ManualCondition"; +})(ReorderingRuleMatchType = exports.ReorderingRuleMatchType || (exports.ReorderingRuleMatchType = {})); +/** + * Specifies the type value for the property + */ +var QueryPropertyValueType; +(function (QueryPropertyValueType) { + QueryPropertyValueType[QueryPropertyValueType["None"] = 0] = "None"; + QueryPropertyValueType[QueryPropertyValueType["StringType"] = 1] = "StringType"; + QueryPropertyValueType[QueryPropertyValueType["Int32TYpe"] = 2] = "Int32TYpe"; + QueryPropertyValueType[QueryPropertyValueType["BooleanType"] = 3] = "BooleanType"; + QueryPropertyValueType[QueryPropertyValueType["StringArrayType"] = 4] = "StringArrayType"; + QueryPropertyValueType[QueryPropertyValueType["UnSupportedType"] = 5] = "UnSupportedType"; +})(QueryPropertyValueType = exports.QueryPropertyValueType || (exports.QueryPropertyValueType = {})); +var SearchBuiltInSourceId = /** @class */ (function () { + function SearchBuiltInSourceId() { + } + SearchBuiltInSourceId.Documents = "e7ec8cee-ded8-43c9-beb5-436b54b31e84"; + SearchBuiltInSourceId.ItemsMatchingContentType = "5dc9f503-801e-4ced-8a2c-5d1237132419"; + SearchBuiltInSourceId.ItemsMatchingTag = "e1327b9c-2b8c-4b23-99c9-3730cb29c3f7"; + SearchBuiltInSourceId.ItemsRelatedToCurrentUser = "48fec42e-4a92-48ce-8363-c2703a40e67d"; + SearchBuiltInSourceId.ItemsWithSameKeywordAsThisItem = "5c069288-1d17-454a-8ac6-9c642a065f48"; + SearchBuiltInSourceId.LocalPeopleResults = "b09a7990-05ea-4af9-81ef-edfab16c4e31"; + SearchBuiltInSourceId.LocalReportsAndDataResults = "203fba36-2763-4060-9931-911ac8c0583b"; + SearchBuiltInSourceId.LocalSharePointResults = "8413cd39-2156-4e00-b54d-11efd9abdb89"; + SearchBuiltInSourceId.LocalVideoResults = "78b793ce-7956-4669-aa3b-451fc5defebf"; + SearchBuiltInSourceId.Pages = "5e34578e-4d08-4edc-8bf3-002acf3cdbcc"; + SearchBuiltInSourceId.Pictures = "38403c8c-3975-41a8-826e-717f2d41568a"; + SearchBuiltInSourceId.Popular = "97c71db1-58ce-4891-8b64-585bc2326c12"; + SearchBuiltInSourceId.RecentlyChangedItems = "ba63bbae-fa9c-42c0-b027-9a878f16557c"; + SearchBuiltInSourceId.RecommendedItems = "ec675252-14fa-4fbe-84dd-8d098ed74181"; + SearchBuiltInSourceId.Wiki = "9479bf85-e257-4318-b5a8-81a180f5faa1"; + return SearchBuiltInSourceId; +}()); +exports.SearchBuiltInSourceId = SearchBuiltInSourceId; + + +/***/ }), +/* 37 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +Object.defineProperty(exports, "__esModule", { value: true }); +var storage_1 = __webpack_require__(23); +var util_1 = __webpack_require__(0); +var pnplibconfig_1 = __webpack_require__(2); +var CachingOptions = /** @class */ (function () { + function CachingOptions(key) { + this.key = key; + this.expiration = util_1.Util.dateAdd(new Date(), "second", pnplibconfig_1.RuntimeConfig.defaultCachingTimeoutSeconds); + this.storeName = pnplibconfig_1.RuntimeConfig.defaultCachingStore; + } + Object.defineProperty(CachingOptions.prototype, "store", { + get: function () { + if (this.storeName === "local") { + return CachingOptions.storage.local; + } + else { + return CachingOptions.storage.session; + } + }, + enumerable: true, + configurable: true + }); + CachingOptions.storage = new storage_1.PnPClientStorage(); + return CachingOptions; +}()); +exports.CachingOptions = CachingOptions; +var CachingParserWrapper = /** @class */ (function () { + function CachingParserWrapper(_parser, _cacheOptions) { + this._parser = _parser; + this._cacheOptions = _cacheOptions; + } + CachingParserWrapper.prototype.parse = function (response) { + var _this = this; + // add this to the cache based on the options + return this._parser.parse(response).then(function (data) { + if (_this._cacheOptions.store !== null) { + _this._cacheOptions.store.put(_this._cacheOptions.key, data, _this._cacheOptions.expiration); + } + return data; + }); + }; + return CachingParserWrapper; +}()); +exports.CachingParserWrapper = CachingParserWrapper; + + +/***/ }), +/* 38 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +Object.defineProperty(exports, "__esModule", { value: true }); +var collections_1 = __webpack_require__(8); +var util_1 = __webpack_require__(0); +var parsers_1 = __webpack_require__(7); +var pnplibconfig_1 = __webpack_require__(2); +var CachedDigest = /** @class */ (function () { + function CachedDigest() { + } + return CachedDigest; +}()); +exports.CachedDigest = CachedDigest; +// allows for the caching of digests across all HttpClient's which each have their own DigestCache wrapper. +var digests = new collections_1.Dictionary(); +var DigestCache = /** @class */ (function () { + function DigestCache(_httpClient, _digests) { + if (_digests === void 0) { _digests = digests; } + this._httpClient = _httpClient; + this._digests = _digests; + } + DigestCache.prototype.getDigest = function (webUrl) { + var _this = this; + var cachedDigest = this._digests.get(webUrl); + if (cachedDigest !== null) { + var now = new Date(); + if (now < cachedDigest.expiration) { + return Promise.resolve(cachedDigest.value); + } + } + var url = util_1.Util.combinePaths(webUrl, "/_api/contextinfo"); + var headers = { + "Accept": "application/json;odata=verbose", + "Content-Type": "application/json;odata=verbose;charset=utf-8", + }; + return this._httpClient.fetchRaw(url, { + cache: "no-cache", + credentials: "same-origin", + headers: util_1.Util.extend(headers, pnplibconfig_1.RuntimeConfig.spHeaders, true), + method: "POST", + }).then(function (response) { + var parser = new parsers_1.ODataDefaultParser(); + return parser.parse(response).then(function (d) { return d.GetContextWebInformation; }); + }).then(function (data) { + var newCachedDigest = new CachedDigest(); + newCachedDigest.value = data.FormDigestValue; + var seconds = data.FormDigestTimeoutSeconds; + var expiration = new Date(); + expiration.setTime(expiration.getTime() + 1000 * seconds); + newCachedDigest.expiration = expiration; + _this._digests.add(webUrl, newCachedDigest); + return newCachedDigest.value; + }); + }; + DigestCache.prototype.clear = function () { + this._digests.clear(); + }; + return DigestCache; +}()); +exports.DigestCache = DigestCache; + + +/***/ }), +/* 39 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var __extends = (this && this.__extends) || (function () { + var extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +var sharepointqueryable_1 = __webpack_require__(1); +var SearchSuggest = /** @class */ (function (_super) { + __extends(SearchSuggest, _super); + function SearchSuggest(baseUrl, path) { + if (path === void 0) { path = "_api/search/suggest"; } + return _super.call(this, baseUrl, path) || this; + } + SearchSuggest.prototype.execute = function (query) { + this.mapQueryToQueryString(query); + return this.get().then(function (response) { return new SearchSuggestResult(response); }); + }; + SearchSuggest.prototype.mapQueryToQueryString = function (query) { + this.query.add("querytext", "'" + query.querytext + "'"); + if (query.hasOwnProperty("count")) { + this.query.add("inumberofquerysuggestions", query.count.toString()); + } + if (query.hasOwnProperty("personalCount")) { + this.query.add("inumberofresultsuggestions", query.personalCount.toString()); + } + if (query.hasOwnProperty("preQuery")) { + this.query.add("fprequerysuggestions", query.preQuery.toString()); + } + if (query.hasOwnProperty("hitHighlighting")) { + this.query.add("fhithighlighting", query.hitHighlighting.toString()); + } + if (query.hasOwnProperty("capitalize")) { + this.query.add("fcapitalizefirstletters", query.capitalize.toString()); + } + if (query.hasOwnProperty("culture")) { + this.query.add("culture", query.culture.toString()); + } + if (query.hasOwnProperty("stemming")) { + this.query.add("enablestemming", query.stemming.toString()); + } + if (query.hasOwnProperty("includePeople")) { + this.query.add("showpeoplenamesuggestions", query.includePeople.toString()); + } + if (query.hasOwnProperty("queryRules")) { + this.query.add("enablequeryrules", query.queryRules.toString()); + } + if (query.hasOwnProperty("prefixMatch")) { + this.query.add("fprefixmatchallterms", query.prefixMatch.toString()); + } + }; + return SearchSuggest; +}(sharepointqueryable_1.SharePointQueryableInstance)); +exports.SearchSuggest = SearchSuggest; +var SearchSuggestResult = /** @class */ (function () { + function SearchSuggestResult(json) { + if (json.hasOwnProperty("suggest")) { + // verbose + this.PeopleNames = json.suggest.PeopleNames.results; + this.PersonalResults = json.suggest.PersonalResults.results; + this.Queries = json.suggest.Queries.results; + } + else { + this.PeopleNames = json.PeopleNames; + this.PersonalResults = json.PersonalResults; + this.Queries = json.Queries; + } + } + return SearchSuggestResult; +}()); +exports.SearchSuggestResult = SearchSuggestResult; + + +/***/ }), +/* 40 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var __extends = (this && this.__extends) || (function () { + var extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +var sharepointqueryable_1 = __webpack_require__(1); +var webs_1 = __webpack_require__(10); +var usercustomactions_1 = __webpack_require__(21); +var odata_1 = __webpack_require__(6); +var batch_1 = __webpack_require__(30); +var features_1 = __webpack_require__(31); +/** + * Describes a site collection + * + */ +var Site = /** @class */ (function (_super) { + __extends(Site, _super); + /** + * Creates a new instance of the Site class + * + * @param baseUrl The url or SharePointQueryable which forms the parent of this site collection + */ + function Site(baseUrl, path) { + if (path === void 0) { path = "_api/site"; } + return _super.call(this, baseUrl, path) || this; + } + Object.defineProperty(Site.prototype, "rootWeb", { + /** + * Gets the root web of the site collection + * + */ + get: function () { + return new webs_1.Web(this, "rootweb"); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Site.prototype, "features", { + /** + * Gets the active features for this site collection + * + */ + get: function () { + return new features_1.Features(this); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Site.prototype, "userCustomActions", { + /** + * Gets all custom actions for this site collection + * + */ + get: function () { + return new usercustomactions_1.UserCustomActions(this); + }, + enumerable: true, + configurable: true + }); + /** + * Gets the context information for this site collection + */ + Site.prototype.getContextInfo = function () { + var q = new Site(this.parentUrl, "_api/contextinfo"); + return q.postCore().then(function (data) { + if (data.hasOwnProperty("GetContextWebInformation")) { + var info = data.GetContextWebInformation; + info.SupportedSchemaVersions = info.SupportedSchemaVersions.results; + return info; + } + else { + return data; + } + }); + }; + /** + * Gets the document libraries on a site. Static method. (SharePoint Online only) + * + * @param absoluteWebUrl The absolute url of the web whose document libraries should be returned + */ + Site.prototype.getDocumentLibraries = function (absoluteWebUrl) { + var q = new sharepointqueryable_1.SharePointQueryable("", "_api/sp.web.getdocumentlibraries(@v)"); + q.query.add("@v", "'" + absoluteWebUrl + "'"); + return q.get().then(function (data) { + if (data.hasOwnProperty("GetDocumentLibraries")) { + return data.GetDocumentLibraries; + } + else { + return data; + } + }); + }; + /** + * Gets the site url from a page url + * + * @param absolutePageUrl The absolute url of the page + */ + Site.prototype.getWebUrlFromPageUrl = function (absolutePageUrl) { + var q = new sharepointqueryable_1.SharePointQueryable("", "_api/sp.web.getweburlfrompageurl(@v)"); + q.query.add("@v", "'" + absolutePageUrl + "'"); + return q.get().then(function (data) { + if (data.hasOwnProperty("GetWebUrlFromPageUrl")) { + return data.GetWebUrlFromPageUrl; + } + else { + return data; + } + }); + }; + /** + * Creates a new batch for requests within the context of this site collection + * + */ + Site.prototype.createBatch = function () { + return new batch_1.ODataBatch(this.parentUrl); + }; + /** + * Opens a web by id (using POST) + * + * @param webId The GUID id of the web to open + */ + Site.prototype.openWebById = function (webId) { + return this.clone(Site, "openWebById('" + webId + "')").postCore().then(function (d) { + return { + data: d, + web: webs_1.Web.fromUrl(odata_1.spExtractODataId(d)), + }; + }); + }; + return Site; +}(sharepointqueryable_1.SharePointQueryableInstance)); +exports.Site = Site; + + +/***/ }), +/* 41 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var __extends = (this && this.__extends) || (function () { + var extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +var sharepointqueryable_1 = __webpack_require__(1); +var LimitedWebPartManager = /** @class */ (function (_super) { + __extends(LimitedWebPartManager, _super); + function LimitedWebPartManager() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(LimitedWebPartManager.prototype, "webparts", { + /** + * Gets the set of web part definitions contained by this web part manager + * + */ + get: function () { + return new WebPartDefinitions(this, "webparts"); + }, + enumerable: true, + configurable: true + }); + /** + * Exports a webpart definition + * + * @param id the GUID id of the definition to export + */ + LimitedWebPartManager.prototype.export = function (id) { + return this.clone(LimitedWebPartManager, "ExportWebPart").postCore({ + body: JSON.stringify({ webPartId: id }), + }); + }; + /** + * Imports a webpart + * + * @param xml webpart definition which must be valid XML in the .dwp or .webpart format + */ + LimitedWebPartManager.prototype.import = function (xml) { + return this.clone(LimitedWebPartManager, "ImportWebPart").postCore({ + body: JSON.stringify({ webPartXml: xml }), + }); + }; + return LimitedWebPartManager; +}(sharepointqueryable_1.SharePointQueryable)); +exports.LimitedWebPartManager = LimitedWebPartManager; +var WebPartDefinitions = /** @class */ (function (_super) { + __extends(WebPartDefinitions, _super); + function WebPartDefinitions() { + return _super !== null && _super.apply(this, arguments) || this; + } + /** + * Gets a web part definition from the collection by id + * + * @param id The storage ID of the SPWebPartDefinition to retrieve + */ + WebPartDefinitions.prototype.getById = function (id) { + return new WebPartDefinition(this, "getbyid('" + id + "')"); + }; + /** + * Gets a web part definition from the collection by storage id + * + * @param id The WebPart.ID of the SPWebPartDefinition to retrieve + */ + WebPartDefinitions.prototype.getByControlId = function (id) { + return new WebPartDefinition(this, "getByControlId('" + id + "')"); + }; + return WebPartDefinitions; +}(sharepointqueryable_1.SharePointQueryableCollection)); +exports.WebPartDefinitions = WebPartDefinitions; +var WebPartDefinition = /** @class */ (function (_super) { + __extends(WebPartDefinition, _super); + function WebPartDefinition() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(WebPartDefinition.prototype, "webpart", { + /** + * Gets the webpart information associated with this definition + */ + get: function () { + return new WebPart(this); + }, + enumerable: true, + configurable: true + }); + /** + * Saves changes to the Web Part made using other properties and methods on the SPWebPartDefinition object + */ + WebPartDefinition.prototype.saveChanges = function () { + return this.clone(WebPartDefinition, "SaveWebPartChanges").postCore(); + }; + /** + * Moves the Web Part to a different location on a Web Part Page + * + * @param zoneId The ID of the Web Part Zone to which to move the Web Part + * @param zoneIndex A Web Part zone index that specifies the position at which the Web Part is to be moved within the destination Web Part zone + */ + WebPartDefinition.prototype.moveTo = function (zoneId, zoneIndex) { + return this.clone(WebPartDefinition, "MoveWebPartTo(zoneID='" + zoneId + "', zoneIndex=" + zoneIndex + ")").postCore(); + }; + /** + * Closes the Web Part. If the Web Part is already closed, this method does nothing + */ + WebPartDefinition.prototype.close = function () { + return this.clone(WebPartDefinition, "CloseWebPart").postCore(); + }; + /** + * Opens the Web Part. If the Web Part is already closed, this method does nothing + */ + WebPartDefinition.prototype.open = function () { + return this.clone(WebPartDefinition, "OpenWebPart").postCore(); + }; + /** + * Removes a webpart from a page, all settings will be lost + */ + WebPartDefinition.prototype.delete = function () { + return this.clone(WebPartDefinition, "DeleteWebPart").postCore(); + }; + return WebPartDefinition; +}(sharepointqueryable_1.SharePointQueryableInstance)); +exports.WebPartDefinition = WebPartDefinition; +var WebPart = /** @class */ (function (_super) { + __extends(WebPart, _super); + /** + * Creates a new instance of the WebPart class + * + * @param baseUrl The url or SharePointQueryable which forms the parent of this fields collection + * @param path Optional, if supplied will be appended to the supplied baseUrl + */ + function WebPart(baseUrl, path) { + if (path === void 0) { path = "webpart"; } + return _super.call(this, baseUrl, path) || this; + } + return WebPart; +}(sharepointqueryable_1.SharePointQueryableInstance)); +exports.WebPart = WebPart; + + +/***/ }), +/* 42 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var __extends = (this && this.__extends) || (function () { + var extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +var sharepointqueryable_1 = __webpack_require__(1); +var parsers_1 = __webpack_require__(7); +/** + * Describes a collection of Item objects + * + */ +var AttachmentFiles = /** @class */ (function (_super) { + __extends(AttachmentFiles, _super); + /** + * Creates a new instance of the AttachmentFiles class + * + * @param baseUrl The url or SharePointQueryable which forms the parent of this attachments collection + */ + function AttachmentFiles(baseUrl, path) { + if (path === void 0) { path = "AttachmentFiles"; } + return _super.call(this, baseUrl, path) || this; + } + /** + * Gets a Attachment File by filename + * + * @param name The name of the file, including extension. + */ + AttachmentFiles.prototype.getByName = function (name) { + var f = new AttachmentFile(this); + f.concat("('" + name + "')"); + return f; + }; + /** + * Adds a new attachment to the collection. Not supported for batching. + * + * @param name The name of the file, including extension. + * @param content The Base64 file content. + */ + AttachmentFiles.prototype.add = function (name, content) { + var _this = this; + return this.clone(AttachmentFiles, "add(FileName='" + name + "')", false).postCore({ + body: content, + }).then(function (response) { + return { + data: response, + file: _this.getByName(name), + }; + }); + }; + /** + * Adds mjultiple new attachment to the collection. Not supported for batching. + * + * @files name The collection of files to add + */ + AttachmentFiles.prototype.addMultiple = function (files) { + var _this = this; + // add the files in series so we don't get update conflicts + return files.reduce(function (chain, file) { return chain.then(function () { return _this.clone(AttachmentFiles, "add(FileName='" + file.name + "')", false).postCore({ + body: file.content, + }); }); }, Promise.resolve()); + }; + return AttachmentFiles; +}(sharepointqueryable_1.SharePointQueryableCollection)); +exports.AttachmentFiles = AttachmentFiles; +/** + * Describes a single attachment file instance + * + */ +var AttachmentFile = /** @class */ (function (_super) { + __extends(AttachmentFile, _super); + function AttachmentFile() { + return _super !== null && _super.apply(this, arguments) || this; + } + /** + * Gets the contents of the file as text + * + */ + AttachmentFile.prototype.getText = function () { + return this.clone(AttachmentFile, "$value", false).get(new parsers_1.TextFileParser()); + }; + /** + * Gets the contents of the file as a blob, does not work in Node.js + * + */ + AttachmentFile.prototype.getBlob = function () { + return this.clone(AttachmentFile, "$value", false).get(new parsers_1.BlobFileParser()); + }; + /** + * Gets the contents of a file as an ArrayBuffer, works in Node.js + */ + AttachmentFile.prototype.getBuffer = function () { + return this.clone(AttachmentFile, "$value", false).get(new parsers_1.BufferFileParser()); + }; + /** + * Gets the contents of a file as an ArrayBuffer, works in Node.js + */ + AttachmentFile.prototype.getJSON = function () { + return this.clone(AttachmentFile, "$value", false).get(new parsers_1.JSONFileParser()); + }; + /** + * Sets the content of a file. Not supported for batching + * + * @param content The value to set for the file contents + */ + AttachmentFile.prototype.setContent = function (content) { + var _this = this; + return this.clone(AttachmentFile, "$value", false).postCore({ + body: content, + headers: { + "X-HTTP-Method": "PUT", + }, + }).then(function (_) { return new AttachmentFile(_this); }); + }; + /** + * Delete this attachment file + * + * @param eTag Value used in the IF-Match header, by default "*" + */ + AttachmentFile.prototype.delete = function (eTag) { + if (eTag === void 0) { eTag = "*"; } + return this.postCore({ + headers: { + "IF-Match": eTag, + "X-HTTP-Method": "DELETE", + }, + }); + }; + return AttachmentFile; +}(sharepointqueryable_1.SharePointQueryableInstance)); +exports.AttachmentFile = AttachmentFile; + + +/***/ }), +/* 43 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var __extends = (this && this.__extends) || (function () { + var extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +var sharepointqueryable_1 = __webpack_require__(1); +var util_1 = __webpack_require__(0); +/** + * Describes the views available in the current context + * + */ +var Views = /** @class */ (function (_super) { + __extends(Views, _super); + /** + * Creates a new instance of the Views class + * + * @param baseUrl The url or SharePointQueryable which forms the parent of this fields collection + */ + function Views(baseUrl, path) { + if (path === void 0) { path = "views"; } + return _super.call(this, baseUrl, path) || this; + } + /** + * Gets a view by guid id + * + * @param id The GUID id of the view + */ + Views.prototype.getById = function (id) { + var v = new View(this); + v.concat("('" + id + "')"); + return v; + }; + /** + * Gets a view by title (case-sensitive) + * + * @param title The case-sensitive title of the view + */ + Views.prototype.getByTitle = function (title) { + return new View(this, "getByTitle('" + title + "')"); + }; + /** + * Adds a new view to the collection + * + * @param title The new views's title + * @param personalView True if this is a personal view, otherwise false, default = false + * @param additionalSettings Will be passed as part of the view creation body + */ + Views.prototype.add = function (title, personalView, additionalSettings) { + var _this = this; + if (personalView === void 0) { personalView = false; } + if (additionalSettings === void 0) { additionalSettings = {}; } + var postBody = JSON.stringify(util_1.Util.extend({ + "PersonalView": personalView, + "Title": title, + "__metadata": { "type": "SP.View" }, + }, additionalSettings)); + return this.clone(Views, null).postAsCore({ body: postBody }).then(function (data) { + return { + data: data, + view: _this.getById(data.Id), + }; + }); + }; + return Views; +}(sharepointqueryable_1.SharePointQueryableCollection)); +exports.Views = Views; +/** + * Describes a single View instance + * + */ +var View = /** @class */ (function (_super) { + __extends(View, _super); + function View() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(View.prototype, "fields", { + get: function () { + return new ViewFields(this); + }, + enumerable: true, + configurable: true + }); + /** + * Updates this view intance with the supplied properties + * + * @param properties A plain object hash of values to update for the view + */ + View.prototype.update = function (properties) { + var _this = this; + var postBody = JSON.stringify(util_1.Util.extend({ + "__metadata": { "type": "SP.View" }, + }, properties)); + return this.postCore({ + body: postBody, + headers: { + "X-HTTP-Method": "MERGE", + }, + }).then(function (data) { + return { + data: data, + view: _this, + }; + }); + }; + /** + * Delete this view + * + */ + View.prototype.delete = function () { + return this.postCore({ + headers: { + "X-HTTP-Method": "DELETE", + }, + }); + }; + /** + * Returns the list view as HTML. + * + */ + View.prototype.renderAsHtml = function () { + return this.clone(sharepointqueryable_1.SharePointQueryable, "renderashtml").get(); + }; + return View; +}(sharepointqueryable_1.SharePointQueryableInstance)); +exports.View = View; +var ViewFields = /** @class */ (function (_super) { + __extends(ViewFields, _super); + function ViewFields(baseUrl, path) { + if (path === void 0) { path = "viewfields"; } + return _super.call(this, baseUrl, path) || this; + } + /** + * Gets a value that specifies the XML schema that represents the collection. + */ + ViewFields.prototype.getSchemaXml = function () { + return this.clone(sharepointqueryable_1.SharePointQueryable, "schemaxml").get(); + }; + /** + * Adds the field with the specified field internal name or display name to the collection. + * + * @param fieldTitleOrInternalName The case-sensitive internal name or display name of the field to add. + */ + ViewFields.prototype.add = function (fieldTitleOrInternalName) { + return this.clone(ViewFields, "addviewfield('" + fieldTitleOrInternalName + "')").postCore(); + }; + /** + * Moves the field with the specified field internal name to the specified position in the collection. + * + * @param fieldInternalName The case-sensitive internal name of the field to move. + * @param index The zero-based index of the new position for the field. + */ + ViewFields.prototype.move = function (fieldInternalName, index) { + return this.clone(ViewFields, "moveviewfieldto").postCore({ + body: JSON.stringify({ "field": fieldInternalName, "index": index }), + }); + }; + /** + * Removes all the fields from the collection. + */ + ViewFields.prototype.removeAll = function () { + return this.clone(ViewFields, "removeallviewfields").postCore(); + }; + /** + * Removes the field with the specified field internal name from the collection. + * + * @param fieldInternalName The case-sensitive internal name of the field to remove from the view. + */ + ViewFields.prototype.remove = function (fieldInternalName) { + return this.clone(ViewFields, "removeviewfield('" + fieldInternalName + "')").postCore(); + }; + return ViewFields; +}(sharepointqueryable_1.SharePointQueryableCollection)); +exports.ViewFields = ViewFields; + + +/***/ }), +/* 44 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var __extends = (this && this.__extends) || (function () { + var extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +var sharepointqueryable_1 = __webpack_require__(1); +/** + * Describes a collection of Field objects + * + */ +var Forms = /** @class */ (function (_super) { + __extends(Forms, _super); + /** + * Creates a new instance of the Fields class + * + * @param baseUrl The url or SharePointQueryable which forms the parent of this fields collection + */ + function Forms(baseUrl, path) { + if (path === void 0) { path = "forms"; } + return _super.call(this, baseUrl, path) || this; + } + /** + * Gets a form by id + * + * @param id The guid id of the item to retrieve + */ + Forms.prototype.getById = function (id) { + var i = new Form(this); + i.concat("('" + id + "')"); + return i; + }; + return Forms; +}(sharepointqueryable_1.SharePointQueryableCollection)); +exports.Forms = Forms; +/** + * Describes a single of Form instance + * + */ +var Form = /** @class */ (function (_super) { + __extends(Form, _super); + function Form() { + return _super !== null && _super.apply(this, arguments) || this; + } + return Form; +}(sharepointqueryable_1.SharePointQueryableInstance)); +exports.Form = Form; + + +/***/ }), +/* 45 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var __extends = (this && this.__extends) || (function () { + var extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +var sharepointqueryable_1 = __webpack_require__(1); +/** + * Describes a collection of webhook subscriptions + * + */ +var Subscriptions = /** @class */ (function (_super) { + __extends(Subscriptions, _super); + /** + * Creates a new instance of the Subscriptions class + * + * @param baseUrl - The url or SharePointQueryable which forms the parent of this webhook subscriptions collection + */ + function Subscriptions(baseUrl, path) { + if (path === void 0) { path = "subscriptions"; } + return _super.call(this, baseUrl, path) || this; + } + /** + * Returns all the webhook subscriptions or the specified webhook subscription + * + * @param subscriptionId The id of a specific webhook subscription to retrieve, omit to retrieve all the webhook subscriptions + */ + Subscriptions.prototype.getById = function (subscriptionId) { + var subscription = new Subscription(this); + subscription.concat("('" + subscriptionId + "')"); + return subscription; + }; + /** + * Creates a new webhook subscription + * + * @param notificationUrl The url to receive the notifications + * @param expirationDate The date and time to expire the subscription in the form YYYY-MM-ddTHH:mm:ss+00:00 (maximum of 6 months) + * @param clientState A client specific string (defaults to pnp-js-core-subscription when omitted) + */ + Subscriptions.prototype.add = function (notificationUrl, expirationDate, clientState) { + var _this = this; + var postBody = JSON.stringify({ + "clientState": clientState || "pnp-js-core-subscription", + "expirationDateTime": expirationDate, + "notificationUrl": notificationUrl, + "resource": this.toUrl(), + }); + return this.postCore({ body: postBody, headers: { "Content-Type": "application/json" } }).then(function (result) { + return { data: result, subscription: _this.getById(result.id) }; + }); + }; + return Subscriptions; +}(sharepointqueryable_1.SharePointQueryableCollection)); +exports.Subscriptions = Subscriptions; +/** + * Describes a single webhook subscription instance + * + */ +var Subscription = /** @class */ (function (_super) { + __extends(Subscription, _super); + function Subscription() { + return _super !== null && _super.apply(this, arguments) || this; + } + /** + * Renews this webhook subscription + * + * @param expirationDate The date and time to expire the subscription in the form YYYY-MM-ddTHH:mm:ss+00:00 (maximum of 6 months) + */ + Subscription.prototype.update = function (expirationDate) { + var _this = this; + var postBody = JSON.stringify({ + "expirationDateTime": expirationDate, + }); + return this.patchCore({ body: postBody, headers: { "Content-Type": "application/json" } }).then(function (data) { + return { data: data, subscription: _this }; + }); + }; + /** + * Removes this webhook subscription + * + */ + Subscription.prototype.delete = function () { + return _super.prototype.deleteCore.call(this); + }; + return Subscription; +}(sharepointqueryable_1.SharePointQueryableInstance)); +exports.Subscription = Subscription; + + +/***/ }), +/* 46 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var __extends = (this && this.__extends) || (function () { + var extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +var util_1 = __webpack_require__(0); +var sharepointqueryable_1 = __webpack_require__(1); +/** + * Represents a collection of navigation nodes + * + */ +var NavigationNodes = /** @class */ (function (_super) { + __extends(NavigationNodes, _super); + function NavigationNodes() { + return _super !== null && _super.apply(this, arguments) || this; + } + /** + * Gets a navigation node by id + * + * @param id The id of the node + */ + NavigationNodes.prototype.getById = function (id) { + var node = new NavigationNode(this); + node.concat("(" + id + ")"); + return node; + }; + /** + * Adds a new node to the collection + * + * @param title Display name of the node + * @param url The url of the node + * @param visible If true the node is visible, otherwise it is hidden (default: true) + */ + NavigationNodes.prototype.add = function (title, url, visible) { + var _this = this; + if (visible === void 0) { visible = true; } + var postBody = JSON.stringify({ + IsVisible: visible, + Title: title, + Url: url, + "__metadata": { "type": "SP.NavigationNode" }, + }); + return this.clone(NavigationNodes, null).postCore({ body: postBody }).then(function (data) { + return { + data: data, + node: _this.getById(data.Id), + }; + }); + }; + /** + * Moves a node to be after another node in the navigation + * + * @param nodeId Id of the node to move + * @param previousNodeId Id of the node after which we move the node specified by nodeId + */ + NavigationNodes.prototype.moveAfter = function (nodeId, previousNodeId) { + var postBody = JSON.stringify({ + nodeId: nodeId, + previousNodeId: previousNodeId, + }); + return this.clone(NavigationNodes, "MoveAfter").postCore({ body: postBody }); + }; + return NavigationNodes; +}(sharepointqueryable_1.SharePointQueryableCollection)); +exports.NavigationNodes = NavigationNodes; +/** + * Represents an instance of a navigation node + * + */ +var NavigationNode = /** @class */ (function (_super) { + __extends(NavigationNode, _super); + function NavigationNode() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(NavigationNode.prototype, "children", { + /** + * Represents the child nodes of this node + */ + get: function () { + return new NavigationNodes(this, "Children"); + }, + enumerable: true, + configurable: true + }); + /** + * Updates this node based on the supplied properties + * + * @param properties The hash of key/value pairs to update + */ + NavigationNode.prototype.update = function (properties) { + var _this = this; + var postBody = JSON.stringify(util_1.Util.extend({ + "__metadata": { "type": "SP.NavigationNode" }, + }, properties)); + return this.postCore({ + body: postBody, + headers: { + "X-HTTP-Method": "MERGE", + }, + }).then(function (data) { + return { + data: data, + node: _this, + }; + }); + }; + /** + * Deletes this node and any child nodes + */ + NavigationNode.prototype.delete = function () { + return _super.prototype.deleteCore.call(this); + }; + return NavigationNode; +}(sharepointqueryable_1.SharePointQueryableInstance)); +exports.NavigationNode = NavigationNode; +/** + * Exposes the navigation components + * + */ +var Navigation = /** @class */ (function (_super) { + __extends(Navigation, _super); + /** + * Creates a new instance of the Navigation class + * + * @param baseUrl The url or SharePointQueryable which forms the parent of these navigation components + */ + function Navigation(baseUrl, path) { + if (path === void 0) { path = "navigation"; } + return _super.call(this, baseUrl, path) || this; + } + Object.defineProperty(Navigation.prototype, "quicklaunch", { + /** + * Gets the quicklaunch navigation nodes for the current context + * + */ + get: function () { + return new NavigationNodes(this, "quicklaunch"); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Navigation.prototype, "topNavigationBar", { + /** + * Gets the top bar navigation nodes for the current context + * + */ + get: function () { + return new NavigationNodes(this, "topnavigationbar"); + }, + enumerable: true, + configurable: true + }); + return Navigation; +}(sharepointqueryable_1.SharePointQueryable)); +exports.Navigation = Navigation; + + +/***/ }), +/* 47 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var __extends = (this && this.__extends) || (function () { + var extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +var sharepointqueryable_1 = __webpack_require__(1); +var RelatedItemManagerImpl = /** @class */ (function (_super) { + __extends(RelatedItemManagerImpl, _super); + function RelatedItemManagerImpl(baseUrl, path) { + if (path === void 0) { path = "_api/SP.RelatedItemManager"; } + return _super.call(this, baseUrl, path) || this; + } + RelatedItemManagerImpl.FromUrl = function (url) { + if (url === null) { + return new RelatedItemManagerImpl(""); + } + var index = url.indexOf("_api/"); + if (index > -1) { + return new RelatedItemManagerImpl(url.substr(0, index)); + } + return new RelatedItemManagerImpl(url); + }; + RelatedItemManagerImpl.prototype.getRelatedItems = function (sourceListName, sourceItemId) { + var query = this.clone(RelatedItemManagerImpl, null); + query.concat(".GetRelatedItems"); + return query.postCore({ + body: JSON.stringify({ + SourceItemID: sourceItemId, + SourceListName: sourceListName, + }), + }); + }; + RelatedItemManagerImpl.prototype.getPageOneRelatedItems = function (sourceListName, sourceItemId) { + var query = this.clone(RelatedItemManagerImpl, null); + query.concat(".GetPageOneRelatedItems"); + return query.postCore({ + body: JSON.stringify({ + SourceItemID: sourceItemId, + SourceListName: sourceListName, + }), + }); + }; + RelatedItemManagerImpl.prototype.addSingleLink = function (sourceListName, sourceItemId, sourceWebUrl, targetListName, targetItemID, targetWebUrl, tryAddReverseLink) { + if (tryAddReverseLink === void 0) { tryAddReverseLink = false; } + var query = this.clone(RelatedItemManagerImpl, null); + query.concat(".AddSingleLink"); + return query.postCore({ + body: JSON.stringify({ + SourceItemID: sourceItemId, + SourceListName: sourceListName, + SourceWebUrl: sourceWebUrl, + TargetItemID: targetItemID, + TargetListName: targetListName, + TargetWebUrl: targetWebUrl, + TryAddReverseLink: tryAddReverseLink, + }), + }); + }; + /** + * Adds a related item link from an item specified by list name and item id, to an item specified by url + * + * @param sourceListName The source list name or list id + * @param sourceItemId The source item id + * @param targetItemUrl The target item url + * @param tryAddReverseLink If set to true try to add the reverse link (will not return error if it fails) + */ + RelatedItemManagerImpl.prototype.addSingleLinkToUrl = function (sourceListName, sourceItemId, targetItemUrl, tryAddReverseLink) { + if (tryAddReverseLink === void 0) { tryAddReverseLink = false; } + var query = this.clone(RelatedItemManagerImpl, null); + query.concat(".AddSingleLinkToUrl"); + return query.postCore({ + body: JSON.stringify({ + SourceItemID: sourceItemId, + SourceListName: sourceListName, + TargetItemUrl: targetItemUrl, + TryAddReverseLink: tryAddReverseLink, + }), + }); + }; + /** + * Adds a related item link from an item specified by url, to an item specified by list name and item id + * + * @param sourceItemUrl The source item url + * @param targetListName The target list name or list id + * @param targetItemId The target item id + * @param tryAddReverseLink If set to true try to add the reverse link (will not return error if it fails) + */ + RelatedItemManagerImpl.prototype.addSingleLinkFromUrl = function (sourceItemUrl, targetListName, targetItemId, tryAddReverseLink) { + if (tryAddReverseLink === void 0) { tryAddReverseLink = false; } + var query = this.clone(RelatedItemManagerImpl, null); + query.concat(".AddSingleLinkFromUrl"); + return query.postCore({ + body: JSON.stringify({ + SourceItemUrl: sourceItemUrl, + TargetItemID: targetItemId, + TargetListName: targetListName, + TryAddReverseLink: tryAddReverseLink, + }), + }); + }; + RelatedItemManagerImpl.prototype.deleteSingleLink = function (sourceListName, sourceItemId, sourceWebUrl, targetListName, targetItemId, targetWebUrl, tryDeleteReverseLink) { + if (tryDeleteReverseLink === void 0) { tryDeleteReverseLink = false; } + var query = this.clone(RelatedItemManagerImpl, null); + query.concat(".DeleteSingleLink"); + return query.postCore({ + body: JSON.stringify({ + SourceItemID: sourceItemId, + SourceListName: sourceListName, + SourceWebUrl: sourceWebUrl, + TargetItemID: targetItemId, + TargetListName: targetListName, + TargetWebUrl: targetWebUrl, + TryDeleteReverseLink: tryDeleteReverseLink, + }), + }); + }; + return RelatedItemManagerImpl; +}(sharepointqueryable_1.SharePointQueryable)); +exports.RelatedItemManagerImpl = RelatedItemManagerImpl; + + +/***/ }), +/* 48 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var __extends = (this && this.__extends) || (function () { + var extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +var sharepointqueryable_1 = __webpack_require__(1); +var files_1 = __webpack_require__(49); +var parsers_1 = __webpack_require__(7); +var UserProfileQuery = /** @class */ (function (_super) { + __extends(UserProfileQuery, _super); + /** + * Creates a new instance of the UserProfileQuery class + * + * @param baseUrl The url or SharePointQueryable which forms the parent of this user profile query + */ + function UserProfileQuery(baseUrl, path) { + if (path === void 0) { path = "_api/sp.userprofiles.peoplemanager"; } + var _this = _super.call(this, baseUrl, path) || this; + _this.profileLoader = new ProfileLoader(baseUrl); + return _this; + } + Object.defineProperty(UserProfileQuery.prototype, "editProfileLink", { + /** + * The url of the edit profile page for the current user + */ + get: function () { + return this.clone(UserProfileQuery, "EditProfileLink").getAs(parsers_1.ODataValue()); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(UserProfileQuery.prototype, "isMyPeopleListPublic", { + /** + * A boolean value that indicates whether the current user's "People I'm Following" list is public + */ + get: function () { + return this.clone(UserProfileQuery, "IsMyPeopleListPublic").getAs(parsers_1.ODataValue()); + }, + enumerable: true, + configurable: true + }); + /** + * A boolean value that indicates whether the current user is being followed by the specified user + * + * @param loginName The account name of the user + */ + UserProfileQuery.prototype.amIFollowedBy = function (loginName) { + var q = this.clone(UserProfileQuery, "amifollowedby(@v)"); + q.query.add("@v", "'" + encodeURIComponent(loginName) + "'"); + return q.get(); + }; + /** + * A boolean value that indicates whether the current user is following the specified user + * + * @param loginName The account name of the user + */ + UserProfileQuery.prototype.amIFollowing = function (loginName) { + var q = this.clone(UserProfileQuery, "amifollowing(@v)"); + q.query.add("@v", "'" + encodeURIComponent(loginName) + "'"); + return q.get(); + }; + /** + * Gets tags that the current user is following + * + * @param maxCount The maximum number of tags to retrieve (default is 20) + */ + UserProfileQuery.prototype.getFollowedTags = function (maxCount) { + if (maxCount === void 0) { maxCount = 20; } + return this.clone(UserProfileQuery, "getfollowedtags(" + maxCount + ")").get(); + }; + /** + * Gets the people who are following the specified user + * + * @param loginName The account name of the user + */ + UserProfileQuery.prototype.getFollowersFor = function (loginName) { + var q = this.clone(UserProfileQuery, "getfollowersfor(@v)"); + q.query.add("@v", "'" + encodeURIComponent(loginName) + "'"); + return q.get(); + }; + Object.defineProperty(UserProfileQuery.prototype, "myFollowers", { + /** + * Gets the people who are following the current user + * + */ + get: function () { + return new sharepointqueryable_1.SharePointQueryableCollection(this, "getmyfollowers"); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(UserProfileQuery.prototype, "myProperties", { + /** + * Gets user properties for the current user + * + */ + get: function () { + return new UserProfileQuery(this, "getmyproperties"); + }, + enumerable: true, + configurable: true + }); + /** + * Gets the people who the specified user is following + * + * @param loginName The account name of the user. + */ + UserProfileQuery.prototype.getPeopleFollowedBy = function (loginName) { + var q = this.clone(UserProfileQuery, "getpeoplefollowedby(@v)"); + q.query.add("@v", "'" + encodeURIComponent(loginName) + "'"); + return q.get(); + }; + /** + * Gets user properties for the specified user. + * + * @param loginName The account name of the user. + */ + UserProfileQuery.prototype.getPropertiesFor = function (loginName) { + var q = this.clone(UserProfileQuery, "getpropertiesfor(@v)"); + q.query.add("@v", "'" + encodeURIComponent(loginName) + "'"); + return q.get(); + }; + Object.defineProperty(UserProfileQuery.prototype, "trendingTags", { + /** + * Gets the 20 most popular hash tags over the past week, sorted so that the most popular tag appears first + * + */ + get: function () { + var q = this.clone(UserProfileQuery, null); + q.concat(".gettrendingtags"); + return q.get(); + }, + enumerable: true, + configurable: true + }); + /** + * Gets the specified user profile property for the specified user + * + * @param loginName The account name of the user + * @param propertyName The case-sensitive name of the property to get + */ + UserProfileQuery.prototype.getUserProfilePropertyFor = function (loginName, propertyName) { + var q = this.clone(UserProfileQuery, "getuserprofilepropertyfor(accountname=@v, propertyname='" + propertyName + "')"); + q.query.add("@v", "'" + encodeURIComponent(loginName) + "'"); + return q.get(); + }; + /** + * Removes the specified user from the user's list of suggested people to follow + * + * @param loginName The account name of the user + */ + UserProfileQuery.prototype.hideSuggestion = function (loginName) { + var q = this.clone(UserProfileQuery, "hidesuggestion(@v)"); + q.query.add("@v", "'" + encodeURIComponent(loginName) + "'"); + return q.postCore(); + }; + /** + * A boolean values that indicates whether the first user is following the second user + * + * @param follower The account name of the user who might be following the followee + * @param followee The account name of the user who might be followed by the follower + */ + UserProfileQuery.prototype.isFollowing = function (follower, followee) { + var q = this.clone(UserProfileQuery, null); + q.concat(".isfollowing(possiblefolloweraccountname=@v, possiblefolloweeaccountname=@y)"); + q.query.add("@v", "'" + encodeURIComponent(follower) + "'"); + q.query.add("@y", "'" + encodeURIComponent(followee) + "'"); + return q.get(); + }; + /** + * Uploads and sets the user profile picture (Users can upload a picture to their own profile only). Not supported for batching. + * + * @param profilePicSource Blob data representing the user's picture in BMP, JPEG, or PNG format of up to 4.76MB + */ + UserProfileQuery.prototype.setMyProfilePic = function (profilePicSource) { + var _this = this; + return new Promise(function (resolve, reject) { + files_1.readBlobAsArrayBuffer(profilePicSource).then(function (buffer) { + var request = new UserProfileQuery(_this, "setmyprofilepicture"); + request.postCore({ + body: String.fromCharCode.apply(null, new Uint16Array(buffer)), + }).then(function (_) { return resolve(); }); + }).catch(function (e) { return reject(e); }); + }); + }; + /** + * Provisions one or more users' personal sites. (My Site administrator on SharePoint Online only) + * + * @param emails The email addresses of the users to provision sites for + */ + UserProfileQuery.prototype.createPersonalSiteEnqueueBulk = function () { + var emails = []; + for (var _i = 0; _i < arguments.length; _i++) { + emails[_i] = arguments[_i]; + } + return this.profileLoader.createPersonalSiteEnqueueBulk(emails); + }; + Object.defineProperty(UserProfileQuery.prototype, "ownerUserProfile", { + /** + * Gets the user profile of the site owner + * + */ + get: function () { + return this.profileLoader.ownerUserProfile; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(UserProfileQuery.prototype, "userProfile", { + /** + * Gets the user profile for the current user + */ + get: function () { + return this.profileLoader.userProfile; + }, + enumerable: true, + configurable: true + }); + /** + * Enqueues creating a personal site for this user, which can be used to share documents, web pages, and other files + * + * @param interactiveRequest true if interactively (web) initiated request, or false (default) if non-interactively (client) initiated request + */ + UserProfileQuery.prototype.createPersonalSite = function (interactiveRequest) { + if (interactiveRequest === void 0) { interactiveRequest = false; } + return this.profileLoader.createPersonalSite(interactiveRequest); + }; + /** + * Sets the privacy settings for this profile + * + * @param share true to make all social data public; false to make all social data private + */ + UserProfileQuery.prototype.shareAllSocialData = function (share) { + return this.profileLoader.shareAllSocialData(share); + }; + return UserProfileQuery; +}(sharepointqueryable_1.SharePointQueryableInstance)); +exports.UserProfileQuery = UserProfileQuery; +var ProfileLoader = /** @class */ (function (_super) { + __extends(ProfileLoader, _super); + /** + * Creates a new instance of the ProfileLoader class + * + * @param baseUrl The url or SharePointQueryable which forms the parent of this profile loader + */ + function ProfileLoader(baseUrl, path) { + if (path === void 0) { path = "_api/sp.userprofiles.profileloader.getprofileloader"; } + return _super.call(this, baseUrl, path) || this; + } + /** + * Provisions one or more users' personal sites. (My Site administrator on SharePoint Online only) Doesn't support batching + * + * @param emails The email addresses of the users to provision sites for + */ + ProfileLoader.prototype.createPersonalSiteEnqueueBulk = function (emails) { + return this.clone(ProfileLoader, "createpersonalsiteenqueuebulk", false).postCore({ + body: JSON.stringify({ "emailIDs": emails }), + }); + }; + Object.defineProperty(ProfileLoader.prototype, "ownerUserProfile", { + /** + * Gets the user profile of the site owner. + * + */ + get: function () { + var q = this.getParent(ProfileLoader, this.parentUrl, "_api/sp.userprofiles.profileloader.getowneruserprofile"); + if (this.hasBatch) { + q = q.inBatch(this.batch); + } + return q.postAsCore(); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ProfileLoader.prototype, "userProfile", { + /** + * Gets the user profile of the current user. + * + */ + get: function () { + return this.clone(ProfileLoader, "getuserprofile").postAsCore(); + }, + enumerable: true, + configurable: true + }); + /** + * Enqueues creating a personal site for this user, which can be used to share documents, web pages, and other files. + * + * @param interactiveRequest true if interactively (web) initiated request, or false (default) if non-interactively (client) initiated request + */ + ProfileLoader.prototype.createPersonalSite = function (interactiveRequest) { + if (interactiveRequest === void 0) { interactiveRequest = false; } + return this.clone(ProfileLoader, "getuserprofile/createpersonalsiteenque(" + interactiveRequest + ")").postCore(); + }; + /** + * Sets the privacy settings for this profile + * + * @param share true to make all social data public; false to make all social data private. + */ + ProfileLoader.prototype.shareAllSocialData = function (share) { + return this.clone(ProfileLoader, "getuserprofile/shareallsocialdata(" + share + ")").postCore(); + }; + return ProfileLoader; +}(sharepointqueryable_1.SharePointQueryable)); + + +/***/ }), +/* 49 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +Object.defineProperty(exports, "__esModule", { value: true }); +/** + * Reads a blob as text + * + * @param blob The data to read + */ +function readBlobAsText(blob) { + return readBlobAs(blob, "string"); +} +exports.readBlobAsText = readBlobAsText; +/** + * Reads a blob into an array buffer + * + * @param blob The data to read + */ +function readBlobAsArrayBuffer(blob) { + return readBlobAs(blob, "buffer"); +} +exports.readBlobAsArrayBuffer = readBlobAsArrayBuffer; +/** + * Generic method to read blob's content + * + * @param blob The data to read + * @param mode The read mode + */ +function readBlobAs(blob, mode) { + return new Promise(function (resolve, reject) { + try { + var reader = new FileReader(); + reader.onload = function (e) { + resolve(e.target.result); + }; + switch (mode) { + case "string": + reader.readAsText(blob); + break; + case "buffer": + reader.readAsArrayBuffer(blob); + break; + } + } + catch (e) { + reject(e); + } + }); +} + + +/***/ }), +/* 50 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var __extends = (this && this.__extends) || (function () { + var extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +var sharepointqueryable_1 = __webpack_require__(1); +var util_1 = __webpack_require__(0); +var files_1 = __webpack_require__(12); +var odata_1 = __webpack_require__(6); +/** + * Allows for calling of the static SP.Utilities.Utility methods by supplying the method name + */ +var UtilityMethod = /** @class */ (function (_super) { + __extends(UtilityMethod, _super); + /** + * Creates a new instance of the Utility method class + * + * @param baseUrl The parent url provider + * @param methodName The static method name to call on the utility class + */ + function UtilityMethod(baseUrl, methodName) { + return _super.call(this, UtilityMethod.getBaseUrl(baseUrl), "_api/SP.Utilities.Utility." + methodName) || this; + } + UtilityMethod.getBaseUrl = function (candidate) { + if (typeof candidate === "string") { + return candidate; + } + var c = candidate; + var url = c.toUrl(); + var index = url.indexOf("_api/"); + if (index < 0) { + return url; + } + return url.substr(0, index); + }; + UtilityMethod.prototype.excute = function (props) { + return this.postAsCore({ + body: JSON.stringify(props), + }); + }; + /** + * Clones this SharePointQueryable into a new SharePointQueryable instance of T + * @param factory Constructor used to create the new instance + * @param additionalPath Any additional path to include in the clone + * @param includeBatch If true this instance's batch will be added to the cloned instance + */ + UtilityMethod.prototype.create = function (methodName, includeBatch) { + var clone = new UtilityMethod(this.parentUrl, methodName); + var target = this.query.get("@target"); + if (target !== null) { + clone.query.add("@target", target); + } + if (includeBatch && this.hasBatch) { + clone = clone.inBatch(this.batch); + } + return clone; + }; + /** + * Sends an email based on the supplied properties + * + * @param props The properties of the email to send + */ + UtilityMethod.prototype.sendEmail = function (props) { + var params = { + properties: { + Body: props.Body, + From: props.From, + Subject: props.Subject, + "__metadata": { "type": "SP.Utilities.EmailProperties" }, + }, + }; + if (props.To && props.To.length > 0) { + params.properties = util_1.Util.extend(params.properties, { + To: { results: props.To }, + }); + } + if (props.CC && props.CC.length > 0) { + params.properties = util_1.Util.extend(params.properties, { + CC: { results: props.CC }, + }); + } + if (props.BCC && props.BCC.length > 0) { + params.properties = util_1.Util.extend(params.properties, { + BCC: { results: props.BCC }, + }); + } + if (props.AdditionalHeaders) { + params.properties = util_1.Util.extend(params.properties, { + AdditionalHeaders: props.AdditionalHeaders, + }); + } + return this.create("SendEmail", true).excute(params); + }; + UtilityMethod.prototype.getCurrentUserEmailAddresses = function () { + return this.create("GetCurrentUserEmailAddresses", true).excute({}); + }; + UtilityMethod.prototype.resolvePrincipal = function (input, scopes, sources, inputIsEmailOnly, addToUserInfoList, matchUserInfoList) { + if (matchUserInfoList === void 0) { matchUserInfoList = false; } + var params = { + addToUserInfoList: addToUserInfoList, + input: input, + inputIsEmailOnly: inputIsEmailOnly, + matchUserInfoList: matchUserInfoList, + scopes: scopes, + sources: sources, + }; + return this.create("ResolvePrincipalInCurrentContext", true).excute(params); + }; + UtilityMethod.prototype.searchPrincipals = function (input, scopes, sources, groupName, maxCount) { + var params = { + groupName: groupName, + input: input, + maxCount: maxCount, + scopes: scopes, + sources: sources, + }; + return this.create("SearchPrincipalsUsingContextWeb", true).excute(params); + }; + UtilityMethod.prototype.createEmailBodyForInvitation = function (pageAddress) { + var params = { + pageAddress: pageAddress, + }; + return this.create("CreateEmailBodyForInvitation", true).excute(params); + }; + UtilityMethod.prototype.expandGroupsToPrincipals = function (inputs, maxCount) { + if (maxCount === void 0) { maxCount = 30; } + var params = { + inputs: inputs, + maxCount: maxCount, + }; + return this.create("ExpandGroupsToPrincipals", true).excute(params); + }; + UtilityMethod.prototype.createWikiPage = function (info) { + return this.create("CreateWikiPageInContextWeb", true).excute({ + parameters: info, + }).then(function (r) { + return { + data: r, + file: new files_1.File(odata_1.spExtractODataId(r)), + }; + }); + }; + return UtilityMethod; +}(sharepointqueryable_1.SharePointQueryable)); +exports.UtilityMethod = UtilityMethod; + + +/***/ }), +/* 51 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +Object.defineProperty(exports, "__esModule", { value: true }); +var v1_1 = __webpack_require__(52); +var GraphRest = /** @class */ (function () { + function GraphRest() { + } + Object.defineProperty(GraphRest.prototype, "v1", { + get: function () { + return new v1_1.V1(""); + }, + enumerable: true, + configurable: true + }); + return GraphRest; +}()); +exports.GraphRest = GraphRest; + + +/***/ }), +/* 52 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var __extends = (this && this.__extends) || (function () { + var extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +var graphqueryable_1 = __webpack_require__(5); +var groups_1 = __webpack_require__(54); +// import { Me } from "./me"; +/** + * Root object wrapping v1 functionality for MS Graph + * + */ +var V1 = /** @class */ (function (_super) { + __extends(V1, _super); + /** + * Creates a new instance of the V1 class + * + * @param baseUrl The url or Queryable which forms the parent of this fields collection + * @param path Optional additional path + */ + function V1(baseUrl, path) { + if (path === void 0) { path = "v1.0"; } + return _super.call(this, baseUrl, path) || this; + } + Object.defineProperty(V1.prototype, "groups", { + get: function () { + return new groups_1.Groups(this); + }, + enumerable: true, + configurable: true + }); + return V1; +}(graphqueryable_1.GraphQueryable)); +exports.V1 = V1; + + +/***/ }), +/* 53 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +Object.defineProperty(exports, "__esModule", { value: true }); +var util_1 = __webpack_require__(0); +var pnplibconfig_1 = __webpack_require__(2); +var utils_1 = __webpack_require__(9); +// import { APIUrlException } from "../utils/exceptions"; +var GraphHttpClient = /** @class */ (function () { + function GraphHttpClient() { + this._impl = pnplibconfig_1.RuntimeConfig.graphFetchClientFactory(); + } + GraphHttpClient.prototype.fetch = function (url, options) { + if (options === void 0) { options = {}; } + var headers = new Headers(); + // first we add the global headers so they can be overwritten by any passed in locally to this call + utils_1.mergeHeaders(headers, pnplibconfig_1.RuntimeConfig.graphHeaders); + // second we add the local options so we can overwrite the globals + utils_1.mergeHeaders(headers, options.headers); + var opts = util_1.Util.extend(options, { headers: headers }); + // TODO: we could process auth here + return this.fetchRaw(url, opts); + }; + GraphHttpClient.prototype.fetchRaw = function (url, options) { + var _this = this; + if (options === void 0) { options = {}; } + // here we need to normalize the headers + var rawHeaders = new Headers(); + utils_1.mergeHeaders(rawHeaders, options.headers); + options = util_1.Util.extend(options, { headers: rawHeaders }); + var retry = function (ctx) { + _this._impl.fetch(url, {}, options).then(function (response) { return ctx.resolve(response); }).catch(function (response) { + // Check if request was throttled - http status code 429 + // Check if request failed due to server unavailable - http status code 503 + if (response.status !== 429 && response.status !== 503) { + ctx.reject(response); + } + // grab our current delay + var delay = ctx.delay; + // Increment our counters. + ctx.delay *= 2; + ctx.attempts++; + // If we have exceeded the retry count, reject. + if (ctx.retryCount <= ctx.attempts) { + ctx.reject(response); + } + // Set our retry timeout for {delay} milliseconds. + setTimeout(util_1.Util.getCtxCallback(_this, retry, ctx), delay); + }); + }; + return new Promise(function (resolve, reject) { + var retryContext = { + attempts: 0, + delay: 100, + reject: reject, + resolve: resolve, + retryCount: 7, + }; + retry.call(_this, retryContext); + }); + }; + GraphHttpClient.prototype.get = function (url, options) { + if (options === void 0) { options = {}; } + var opts = util_1.Util.extend(options, { method: "GET" }); + return this.fetch(url, opts); + }; + GraphHttpClient.prototype.post = function (url, options) { + if (options === void 0) { options = {}; } + var opts = util_1.Util.extend(options, { method: "POST" }); + return this.fetch(url, opts); + }; + GraphHttpClient.prototype.patch = function (url, options) { + if (options === void 0) { options = {}; } + var opts = util_1.Util.extend(options, { method: "PATCH" }); + return this.fetch(url, opts); + }; + GraphHttpClient.prototype.delete = function (url, options) { + if (options === void 0) { options = {}; } + var opts = util_1.Util.extend(options, { method: "DELETE" }); + return this.fetch(url, opts); + }; + return GraphHttpClient; +}()); +exports.GraphHttpClient = GraphHttpClient; + + +/***/ }), +/* 54 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var __extends = (this && this.__extends) || (function () { + var extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +var graphqueryable_1 = __webpack_require__(5); +var members_1 = __webpack_require__(55); +var util_1 = __webpack_require__(0); +var calendars_1 = __webpack_require__(56); +var conversations_1 = __webpack_require__(57); +var plans_1 = __webpack_require__(59); +var photos_1 = __webpack_require__(60); +var GroupType; +(function (GroupType) { + /** + * Office 365 (aka unified group) + */ + GroupType[GroupType["Office365"] = 0] = "Office365"; + /** + * Dynamic membership + */ + GroupType[GroupType["Dynamic"] = 1] = "Dynamic"; + /** + * Security + */ + GroupType[GroupType["Security"] = 2] = "Security"; +})(GroupType = exports.GroupType || (exports.GroupType = {})); +/** + * Describes a collection of Field objects + * + */ +var Groups = /** @class */ (function (_super) { + __extends(Groups, _super); + function Groups(baseUrl, path) { + if (path === void 0) { path = "groups"; } + return _super.call(this, baseUrl, path) || this; + } + /** + * Gets a group from the collection using the specified id + * + * @param id Id of the group to get from this collection + */ + Groups.prototype.getById = function (id) { + return new Group(this, id); + }; + /** + * Create a new group as specified in the request body. + * + * @param name Name to display in the address book for the group + * @param mailNickname Mail alias for the group + * @param groupType Type of group being created + * @param additionalProperties A plain object collection of additional properties you want to set on the new group + */ + Groups.prototype.add = function (name, mailNickname, groupType, additionalProperties) { + var _this = this; + if (additionalProperties === void 0) { additionalProperties = {}; } + var postBody = util_1.Util.extend({ + displayName: name, + mailEnabled: groupType === GroupType.Office365, + mailNickname: mailNickname, + securityEnabled: groupType !== GroupType.Office365, + }, additionalProperties); + // include a group type if required + if (groupType !== GroupType.Security) { + postBody = util_1.Util.extend(postBody, { + groupTypes: [groupType === GroupType.Office365 ? "Unified" : "DynamicMembership"], + }); + } + return this.postCore({ + body: JSON.stringify(postBody), + }).then(function (r) { + return { + data: r, + group: _this.getById(r.id), + }; + }); + }; + return Groups; +}(graphqueryable_1.GraphQueryableCollection)); +exports.Groups = Groups; +/** + * Represents a group entity + */ +var Group = /** @class */ (function (_super) { + __extends(Group, _super); + function Group() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(Group.prototype, "caldendar", { + /** + * The calendar associated with this group + */ + get: function () { + return new calendars_1.Calendar(this, "calendar"); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Group.prototype, "events", { + /** + * Retrieve a list of event objects + */ + get: function () { + return new calendars_1.Events(this); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Group.prototype, "owners", { + /** + * Gets the collection of owners for this group + */ + get: function () { + return new members_1.Owners(this); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Group.prototype, "plans", { + /** + * The collection of plans for this group + */ + get: function () { + return new plans_1.Plans(this); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Group.prototype, "members", { + /** + * Gets the collection of members for this group + */ + get: function () { + return new members_1.Members(this); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Group.prototype, "conversations", { + /** + * Gets the conversations collection for this group + */ + get: function () { + return new conversations_1.Conversations(this); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Group.prototype, "acceptedSenders", { + /** + * Gets the collection of accepted senders for this group + */ + get: function () { + return new conversations_1.Senders(this, "acceptedsenders"); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Group.prototype, "rejectedSenders", { + /** + * Gets the collection of rejected senders for this group + */ + get: function () { + return new conversations_1.Senders(this, "rejectedsenders"); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Group.prototype, "photo", { + /** + * The photo associated with the group + */ + get: function () { + return new photos_1.Photo(this); + }, + enumerable: true, + configurable: true + }); + /** + * Add the group to the list of the current user's favorite groups. Supported for only Office 365 groups + */ + Group.prototype.addFavorite = function () { + return this.clone(Group, "addFavorite").postCore(); + }; + /** + * Return all the groups that the specified group is a member of. The check is transitive + * + * @param securityEnabledOnly + */ + Group.prototype.getMemberGroups = function (securityEnabledOnly) { + if (securityEnabledOnly === void 0) { securityEnabledOnly = false; } + return this.clone(Group, "getMemberGroups").postCore({ + body: JSON.stringify({ + securityEnabledOnly: securityEnabledOnly, + }), + }); + }; + /** + * Deletes this group + */ + Group.prototype.delete = function () { + return this.deleteCore(); + }; + /** + * Update the properties of a group object + * + * @param properties Set of properties of this group to update + */ + Group.prototype.update = function (properties) { + return this.patchCore({ + body: JSON.stringify(properties), + }); + }; + /** + * Remove the group from the list of the current user's favorite groups. Supported for only Office 365 groups + */ + Group.prototype.removeFavorite = function () { + return this.clone(Group, "removeFavorite").postCore(); + }; + /** + * Reset the unseenCount of all the posts that the current user has not seen since their last visit + */ + Group.prototype.resetUnseenCount = function () { + return this.clone(Group, "resetUnseenCount").postCore(); + }; + /** + * Calling this method will enable the current user to receive email notifications for this group, + * about new posts, events, and files in that group. Supported for only Office 365 groups + */ + Group.prototype.subscribeByMail = function () { + return this.clone(Group, "subscribeByMail").postCore(); + }; + /** + * Calling this method will prevent the current user from receiving email notifications for this group + * about new posts, events, and files in that group. Supported for only Office 365 groups + */ + Group.prototype.unsubscribeByMail = function () { + return this.clone(Group, "unsubscribeByMail").postCore(); + }; + /** + * Get the occurrences, exceptions, and single instances of events in a calendar view defined by a time range, from the default calendar of a group + * + * @param start Start date and time of the time range + * @param end End date and time of the time range + */ + Group.prototype.getCalendarView = function (start, end) { + var view = this.clone(Group, "calendarView"); + view.query.add("startDateTime", start.toISOString()); + view.query.add("endDateTime", end.toISOString()); + return view.get(); + }; + return Group; +}(graphqueryable_1.GraphQueryableInstance)); +exports.Group = Group; + + +/***/ }), +/* 55 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var __extends = (this && this.__extends) || (function () { + var extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +var graphqueryable_1 = __webpack_require__(5); +var Members = /** @class */ (function (_super) { + __extends(Members, _super); + function Members(baseUrl, path) { + if (path === void 0) { path = "members"; } + return _super.call(this, baseUrl, path) || this; + } + /** + * Use this API to add a member to an Office 365 group, a security group or a mail-enabled security group through + * the members navigation property. You can add users or other groups. + * Important: You can add only users to Office 365 groups. + * + * @param id Full @odata.id of the directoryObject, user, or group object you want to add (ex: https://graph.microsoft.com/v1.0/directoryObjects/${id}) + */ + Members.prototype.add = function (id) { + return this.clone(Members, "$ref").postCore({ + body: JSON.stringify({ + "@odata.id": id, + }), + }); + }; + /** + * Gets a member of the group by id + * + * @param id Group member's id + */ + Members.prototype.getById = function (id) { + return new Member(this, id); + }; + return Members; +}(graphqueryable_1.GraphQueryableCollection)); +exports.Members = Members; +var Member = /** @class */ (function (_super) { + __extends(Member, _super); + function Member() { + return _super !== null && _super.apply(this, arguments) || this; + } + return Member; +}(graphqueryable_1.GraphQueryableInstance)); +exports.Member = Member; +var Owners = /** @class */ (function (_super) { + __extends(Owners, _super); + function Owners(baseUrl, path) { + if (path === void 0) { path = "owners"; } + return _super.call(this, baseUrl, path) || this; + } + return Owners; +}(Members)); +exports.Owners = Owners; + + +/***/ }), +/* 56 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var __extends = (this && this.__extends) || (function () { + var extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +var graphqueryable_1 = __webpack_require__(5); +// import { Attachments } from "./attachments"; +var Calendars = /** @class */ (function (_super) { + __extends(Calendars, _super); + function Calendars(baseUrl, path) { + if (path === void 0) { path = "calendars"; } + return _super.call(this, baseUrl, path) || this; + } + return Calendars; +}(graphqueryable_1.GraphQueryableCollection)); +exports.Calendars = Calendars; +var Calendar = /** @class */ (function (_super) { + __extends(Calendar, _super); + function Calendar() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(Calendar.prototype, "events", { + get: function () { + return new Events(this); + }, + enumerable: true, + configurable: true + }); + return Calendar; +}(graphqueryable_1.GraphQueryableInstance)); +exports.Calendar = Calendar; +var Events = /** @class */ (function (_super) { + __extends(Events, _super); + function Events(baseUrl, path) { + if (path === void 0) { path = "events"; } + return _super.call(this, baseUrl, path) || this; + } + Events.prototype.getById = function (id) { + return new Event(this, id); + }; + /** + * Adds a new event to the collection + * + * @param properties The set of properties used to create the event + */ + Events.prototype.add = function (properties) { + var _this = this; + return this.postCore({ + body: JSON.stringify(properties), + }).then(function (r) { + return { + data: r, + event: _this.getById(r.id), + }; + }); + }; + return Events; +}(graphqueryable_1.GraphQueryableCollection)); +exports.Events = Events; +var Event = /** @class */ (function (_super) { + __extends(Event, _super); + function Event() { + return _super !== null && _super.apply(this, arguments) || this; + } + // TODO:: when supported + // /** + // * Gets the collection of attachments for this event + // */ + // public get attachments(): Attachments { + // return new Attachments(this); + // } + /** + * Update the properties of an event object + * + * @param properties Set of properties of this event to update + */ + Event.prototype.update = function (properties) { + return this.patchCore({ + body: JSON.stringify(properties), + }); + }; + /** + * Deletes this event + */ + Event.prototype.delete = function () { + return this.deleteCore(); + }; + return Event; +}(graphqueryable_1.GraphQueryableInstance)); +exports.Event = Event; + + +/***/ }), +/* 57 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var __extends = (this && this.__extends) || (function () { + var extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +var graphqueryable_1 = __webpack_require__(5); +var attachments_1 = __webpack_require__(58); +var Conversations = /** @class */ (function (_super) { + __extends(Conversations, _super); + function Conversations(baseUrl, path) { + if (path === void 0) { path = "conversations"; } + return _super.call(this, baseUrl, path) || this; + } + /** + * Create a new conversation by including a thread and a post. + * + * @param properties Properties used to create the new conversation + */ + Conversations.prototype.add = function (properties) { + return this.postCore({ + body: JSON.stringify(properties), + }); + }; + /** + * Gets a conversation from this collection by id + * + * @param id Group member's id + */ + Conversations.prototype.getById = function (id) { + return new Conversation(this, id); + }; + return Conversations; +}(graphqueryable_1.GraphQueryableCollection)); +exports.Conversations = Conversations; +var Threads = /** @class */ (function (_super) { + __extends(Threads, _super); + function Threads(baseUrl, path) { + if (path === void 0) { path = "threads"; } + return _super.call(this, baseUrl, path) || this; + } + /** + * Gets a thread from this collection by id + * + * @param id Group member's id + */ + Threads.prototype.getById = function (id) { + return new Thread(this, id); + }; + /** + * Adds a new thread to this collection + * + * @param properties properties used to create the new thread + * @returns Id of the new thread + */ + Threads.prototype.add = function (properties) { + return this.postCore({ + body: JSON.stringify(properties), + }); + }; + return Threads; +}(graphqueryable_1.GraphQueryableCollection)); +exports.Threads = Threads; +var Posts = /** @class */ (function (_super) { + __extends(Posts, _super); + function Posts(baseUrl, path) { + if (path === void 0) { path = "posts"; } + return _super.call(this, baseUrl, path) || this; + } + /** + * Gets a thread from this collection by id + * + * @param id Group member's id + */ + Posts.prototype.getById = function (id) { + return new Post(this, id); + }; + /** + * Adds a new thread to this collection + * + * @param properties properties used to create the new thread + * @returns Id of the new thread + */ + Posts.prototype.add = function (properties) { + return this.postCore({ + body: JSON.stringify(properties), + }); + }; + return Posts; +}(graphqueryable_1.GraphQueryableCollection)); +exports.Posts = Posts; +var Conversation = /** @class */ (function (_super) { + __extends(Conversation, _super); + function Conversation() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(Conversation.prototype, "threads", { + /** + * Get all the threads in a group conversation. + */ + get: function () { + return new Threads(this); + }, + enumerable: true, + configurable: true + }); + /** + * Updates this conversation + */ + Conversation.prototype.update = function (properties) { + return this.patchCore({ + body: JSON.stringify(properties), + }); + }; + /** + * Deletes this member from the group + */ + Conversation.prototype.delete = function () { + return this.deleteCore(); + }; + return Conversation; +}(graphqueryable_1.GraphQueryableInstance)); +exports.Conversation = Conversation; +var Thread = /** @class */ (function (_super) { + __extends(Thread, _super); + function Thread() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(Thread.prototype, "posts", { + /** + * Get all the threads in a group conversation. + */ + get: function () { + return new Posts(this); + }, + enumerable: true, + configurable: true + }); + /** + * Reply to a thread in a group conversation and add a new post to it + * + * @param post Contents of the post + */ + Thread.prototype.reply = function (post) { + return this.clone(Thread, "reply").postCore({ + body: JSON.stringify({ + post: post, + }), + }); + }; + /** + * Deletes this member from the group + */ + Thread.prototype.delete = function () { + return this.deleteCore(); + }; + return Thread; +}(graphqueryable_1.GraphQueryableInstance)); +exports.Thread = Thread; +var Post = /** @class */ (function (_super) { + __extends(Post, _super); + function Post() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(Post.prototype, "attachments", { + get: function () { + return new attachments_1.Attachments(this); + }, + enumerable: true, + configurable: true + }); + /** + * Deletes this post + */ + Post.prototype.delete = function () { + return this.deleteCore(); + }; + /** + * Forward a post to a recipient + */ + Post.prototype.forward = function (info) { + return this.clone(Post, "forward").postCore({ + body: JSON.stringify(info), + }); + }; + /** + * Reply to a thread in a group conversation and add a new post to it + * + * @param post Contents of the post + */ + Post.prototype.reply = function (post) { + return this.clone(Post, "reply").postCore({ + body: JSON.stringify({ + post: post, + }), + }); + }; + return Post; +}(graphqueryable_1.GraphQueryableInstance)); +exports.Post = Post; +var Senders = /** @class */ (function (_super) { + __extends(Senders, _super); + function Senders(baseUrl, path) { + return _super.call(this, baseUrl, path) || this; + } + /** + * Add a new user or group to this senders collection + * @param id The full @odata.id value to add (ex: https://graph.microsoft.com/v1.0/users/user@contoso.com) + */ + Senders.prototype.add = function (id) { + return this.clone(Senders, "$ref").postCore({ + body: JSON.stringify({ + "@odata.id": id, + }), + }); + }; + /** + * Removes the entity from the collection + * + * @param id The full @odata.id value to remove (ex: https://graph.microsoft.com/v1.0/users/user@contoso.com) + */ + Senders.prototype.remove = function (id) { + var remover = this.clone(Senders, "$ref"); + remover.query.add("$id", id); + return remover.deleteCore(); + }; + return Senders; +}(graphqueryable_1.GraphQueryableCollection)); +exports.Senders = Senders; + + +/***/ }), +/* 58 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var __extends = (this && this.__extends) || (function () { + var extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +var graphqueryable_1 = __webpack_require__(5); +var Attachments = /** @class */ (function (_super) { + __extends(Attachments, _super); + function Attachments(baseUrl, path) { + if (path === void 0) { path = "attachments"; } + return _super.call(this, baseUrl, path) || this; + } + /** + * Gets a member of the group by id + * + * @param id Attachment id + */ + Attachments.prototype.getById = function (id) { + return new Attachment(this, id); + }; + /** + * Add attachment to this collection + * + * @param name Name given to the attachment file + * @param bytes File content + */ + Attachments.prototype.addFile = function (name, bytes) { + return this.postCore({ + body: JSON.stringify({ + "@odata.type": "#microsoft.graph.fileAttachment", + contentBytes: bytes, + name: name, + }), + }); + }; + return Attachments; +}(graphqueryable_1.GraphQueryableCollection)); +exports.Attachments = Attachments; +var Attachment = /** @class */ (function (_super) { + __extends(Attachment, _super); + function Attachment() { + return _super !== null && _super.apply(this, arguments) || this; + } + return Attachment; +}(graphqueryable_1.GraphQueryableInstance)); +exports.Attachment = Attachment; + + +/***/ }), +/* 59 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var __extends = (this && this.__extends) || (function () { + var extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +var graphqueryable_1 = __webpack_require__(5); +var Plans = /** @class */ (function (_super) { + __extends(Plans, _super); + function Plans(baseUrl, path) { + if (path === void 0) { path = "planner/plans"; } + return _super.call(this, baseUrl, path) || this; + } + /** + * Gets a plan from this collection by id + * + * @param id Plan's id + */ + Plans.prototype.getById = function (id) { + return new Plan(this, id); + }; + return Plans; +}(graphqueryable_1.GraphQueryableCollection)); +exports.Plans = Plans; +var Plan = /** @class */ (function (_super) { + __extends(Plan, _super); + function Plan() { + return _super !== null && _super.apply(this, arguments) || this; + } + return Plan; +}(graphqueryable_1.GraphQueryableInstance)); +exports.Plan = Plan; + + +/***/ }), +/* 60 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var __extends = (this && this.__extends) || (function () { + var extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +var graphqueryable_1 = __webpack_require__(5); +var parsers_1 = __webpack_require__(7); +var Photo = /** @class */ (function (_super) { + __extends(Photo, _super); + function Photo(baseUrl, path) { + if (path === void 0) { path = "photo"; } + return _super.call(this, baseUrl, path) || this; + } + /** + * Gets the image bytes as a blob (browser) + */ + Photo.prototype.getBlob = function () { + return this.clone(Photo, "$value", false).get(new parsers_1.BlobFileParser()); + }; + /** + * Gets the image file byets as a Buffer (node.js) + */ + Photo.prototype.getBuffer = function () { + return this.clone(Photo, "$value", false).get(new parsers_1.BufferFileParser()); + }; + /** + * Sets the file bytes + * + * @param content Image file contents, max 4 MB + */ + Photo.prototype.setContent = function (content) { + return this.clone(Photo, "$value", false).patchCore({ + body: content, + }); + }; + return Photo; +}(graphqueryable_1.GraphQueryableInstance)); +exports.Photo = Photo; + + +/***/ }) +/******/ ]); +}); +//# sourceMappingURL=pnp.js.map \ No newline at end of file diff --git a/dist/pnp.js.map b/dist/pnp.js.map new file mode 100644 index 00000000..71ab67dc --- /dev/null +++ b/dist/pnp.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["webpack:///webpack/universalModuleDefinition","webpack:///webpack/bootstrap 5a556050b9db51f8fd16","webpack:///./lib/utils/util.js","webpack:///./lib/sharepoint/sharepointqueryable.js","webpack:///./lib/configuration/pnplibconfig.js","webpack:///./lib/utils/logging.js","webpack:///./lib/utils/exceptions.js","webpack:///./lib/graph/graphqueryable.js","webpack:///./lib/sharepoint/odata.js","webpack:///./lib/odata/parsers.js","webpack:///./lib/collections/collections.js","webpack:///./lib/net/utils.js","webpack:///./lib/sharepoint/webs.js","webpack:///./lib/sharepoint/sharepointqueryableshareable.js","webpack:///./lib/sharepoint/files.js","webpack:///./lib/odata/core.js","webpack:///./lib/request/pipeline.js","webpack:///./lib/sharepoint/lists.js","webpack:///./lib/sharepoint/items.js","webpack:///./lib/sharepoint/sitegroups.js","webpack:///./lib/sharepoint/types.js","webpack:///./lib/sharepoint/folders.js","webpack:///./lib/sharepoint/contenttypes.js","webpack:///./lib/sharepoint/usercustomactions.js","webpack:///(webpack)/buildin/global.js","webpack:///./lib/utils/storage.js","webpack:///./lib/odata/queryable.js","webpack:///./lib/net/httpclient.js","webpack:///./lib/sharepoint/sharepointqueryablesecurable.js","webpack:///./lib/sharepoint/roles.js","webpack:///./lib/sharepoint/siteusers.js","webpack:///./lib/sharepoint/fields.js","webpack:///./lib/sharepoint/batch.js","webpack:///./lib/sharepoint/features.js","webpack:///./lib/pnp.js","webpack:///./lib/net/fetchclient.js","webpack:///./lib/configuration/configuration.js","webpack:///./lib/sharepoint/rest.js","webpack:///./lib/sharepoint/search.js","webpack:///./lib/odata/caching.js","webpack:///./lib/net/digestcache.js","webpack:///./lib/sharepoint/searchsuggest.js","webpack:///./lib/sharepoint/site.js","webpack:///./lib/sharepoint/webparts.js","webpack:///./lib/sharepoint/attachmentfiles.js","webpack:///./lib/sharepoint/views.js","webpack:///./lib/sharepoint/forms.js","webpack:///./lib/sharepoint/subscriptions.js","webpack:///./lib/sharepoint/navigation.js","webpack:///./lib/sharepoint/relateditems.js","webpack:///./lib/sharepoint/userprofiles.js","webpack:///./lib/utils/files.js","webpack:///./lib/sharepoint/utilities.js","webpack:///./lib/graph/rest.js","webpack:///./lib/graph/v1.js","webpack:///./lib/net/graphclient.js","webpack:///./lib/graph/groups.js","webpack:///./lib/graph/members.js","webpack:///./lib/graph/calendars.js","webpack:///./lib/graph/conversations.js","webpack:///./lib/graph/attachments.js","webpack:///./lib/graph/plans.js","webpack:///./lib/graph/photos.js"],"names":[],"mappings":";;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,O;ACVA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAK;AACL;AACA;;AAEA;AACA;AACA;AACA,mCAA2B,0BAA0B,EAAE;AACvD,yCAAiC,eAAe;AAChD;AACA;AACA;;AAEA;AACA,8DAAsD,+DAA+D;;AAErH;AACA;;AAEA;AACA;;;;;;;;8CC7DA;AACA,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,uBAAuB;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,uBAAuB;AAC/C;AACA;AACA;AACA,qCAAqC,wCAAwC,EAAE;AAC/E,kCAAkC,6DAA6D,EAAE;AACjG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,WAAW;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC,qBAAqB;AAC1D;AACA;AACA;AACA;AACA,mDAAmD,kBAAkB,EAAE,gBAAgB,aAAa;AACpG;AACA,kCAAkC,yBAAyB,EAAE;AAC7D;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA,SAAS;AACT;AACA;AACA,CAAC;AACD;;;;;;;;;ACxRA;AACA;AACA;AACA,UAAU,gBAAgB,sCAAsC,iBAAiB,EAAE;AACnF,yBAAyB,uDAAuD;AAChF;AACA;AACA,uBAAuB,sBAAsB;AAC7C;AACA;AACA,CAAC;AACD,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,aAAa;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,qEAAqE,2CAA2C,EAAE;AAClH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC,0BAA0B;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,qBAAqB;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC,cAAc;AAC/C,kCAAkC,+CAA+C;AACjF,yFAAyF,QAAQ;AACjG;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C,sCAAsC,EAAE;AACpF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,uBAAuB;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,uBAAuB;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,kBAAkB;AACrD;AACA;AACA;AACA,uBAAuB,iBAAiB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,uBAAuB;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,uBAAuB;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;;;;;;;;AC/VA;AACA,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kDAAkD,wCAAwC;AAC1F;AACA;AACA;AACA;AACA,qDAAqD,aAAa;AAClE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6DAA6D,2CAA2C;AACxG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC7JA;AACA,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,uDAAuD;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,uBAAuB;AAC/C;AACA;AACA,2CAA2C,4CAA4C,EAAE;AACzF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,0BAA0B;AACzD,6BAA6B,iCAAiC;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,0BAA0B;AACzD,6BAA6B,8CAA8C;AAC3E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA,wCAAwC,mCAAmC;AAC3E,qCAAqC,kBAAkB;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA,+BAA+B,0BAA0B;AACzD,kBAAkB,iCAAiC;AACnD;AACA;AACA;AACA;AACA;AACA,oDAAoD,8BAA8B,EAAE;AACpF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;;;;;;;;AC3NA;AACA;AACA;AACA,UAAU,gBAAgB,sCAAsC,iBAAiB,EAAE;AACnF,yBAAyB,uDAAuD;AAChF;AACA;AACA,uBAAuB,sBAAsB;AAC7C;AACA;AACA,CAAC;AACD,8CAA8C,cAAc;AAC5D;AACA;AACA,0BAA0B,SAAS,sFAAsF;AACzH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,4EAA4E;AAC1G;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA,6BAA6B,sFAAsF;AACnH;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA,6BAA6B,sCAAsC;AACnE;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA,6BAA6B,2EAA2E;AACxG;AACA;AACA,8BAA8B,sEAAsE;AACpG;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA,6BAA6B,gEAAgE;AAC7F;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA,6BAA6B,wDAAwD;AACrF;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA,mCAAmC,8BAA8B;AACjE;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA,6BAA6B,0GAA0G;AACvI;AACA;AACA,8BAA8B,sEAAsE;AACpG;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA,6BAA6B,gDAAgD;AAC7E;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA,6BAA6B,gDAAgD;AAC7E;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;;;;;;;;ACnLA;AACA;AACA;AACA,UAAU,gBAAgB,sCAAsC,iBAAiB,EAAE;AACnF,yBAAyB,uDAAuD;AAChF;AACA;AACA,uBAAuB,sBAAsB;AAC7C;AACA;AACA,CAAC;AACD,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+EAA+E,0CAA0C,EAAE;AAC3H;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC,0BAA0B;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,qBAAqB;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC,cAAc;AAC/C,kCAAkC,+CAA+C;AACjF;AACA;AACA;AACA,0CAA0C,iBAAiB,EAAE;AAC7D;AACA,wCAAwC,4CAA4C,EAAE;AACtF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,uBAAuB;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,uBAAuB;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,kBAAkB;AACrD;AACA;AACA;AACA,uBAAuB,iBAAiB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,uBAAuB;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,uBAAuB;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;;;;;;;;ACtRA;AACA;AACA;AACA,UAAU,gBAAgB,sCAAsC,iBAAiB,EAAE;AACnF,yBAAyB,uDAAuD;AAChF;AACA;AACA,uBAAuB,sBAAsB;AAC7C;AACA;AACA,CAAC;AACD,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACtFA;AACA;AACA;AACA,UAAU,gBAAgB,sCAAsC,iBAAiB,EAAE;AACnF,yBAAyB,uDAAuD;AAChF;AACA;AACA,uBAAuB,sBAAsB;AAC7C;AACA;AACA,CAAC;AACD,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uEAAuE,UAAU,EAAE;AACnF;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;;;;;;;;ACpFA;AACA,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,WAAW;AACzC,gCAAgC,aAAa;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;;;;;;;;AC3GA;AACA,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC,kBAAkB;AACtD;AACA;AACA,SAAS;AACT;AACA;AACA;;;;;;;;AClBA;AACA;AACA;AACA,UAAU,gBAAgB,sCAAsC,iBAAiB,EAAE;AACnF,yBAAyB,uDAAuD;AAChF;AACA;AACA,uBAAuB,sBAAsB;AAC7C;AACA;AACA,CAAC;AACD,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC,kBAAkB;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC,kBAAkB;AACvD,kCAAkC,kBAAkB;AACpD,kCAAkC,iBAAiB;AACnD,4CAA4C,2BAA2B;AACvE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,sCAAsC;AACrE,aAAa;AACb,SAAS;AACT,iDAAiD,iBAAiB;AAClE;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC,sBAAsB;AACvD;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,mBAAmB;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,mBAAmB;AAC9C,SAAS;AACT;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,uDAAuD,iBAAiB;AACxE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,uDAAuD,iBAAiB;AACxE;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,uFAAuF;AACvF;AACA;AACA,kCAAkC,iBAAiB;AACnD,8CAA8C,6BAA6B;AAC3E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,8BAA8B,gBAAgB,2BAA2B,EAAE,UAAU;AAC5H,uDAAuD,iBAAiB;AACxE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,UAAU;AACxC,gCAAgC,aAAa;AAC7C;AACA;AACA;AACA,CAAC;AACD;;;;;;;;ACtfA;AACA;AACA;AACA,UAAU,gBAAgB,sCAAsC,iBAAiB,EAAE;AACnF,yBAAyB,uDAAuD;AAChF;AACA;AACA,uBAAuB,sBAAsB;AAC7C;AACA;AACA,CAAC;AACD,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC,mBAAmB;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB,iBAAiB;AACjB,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,uBAAuB;AAC9D,sCAAsC,sBAAsB;AAC5D;AACA;AACA;AACA;AACA,sEAAsE,SAAS,cAAc,EAAE;AAC/F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,gBAAgB;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,kFAAkF,SAAS,cAAc,EAAE;AAC3G;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC,gBAAgB;AACjD;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C,2BAA2B;AACvE;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC,iBAAiB;AACnD,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC,kDAAkD;AACnF;AACA,kCAAkC,mCAAmC;AACrE,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0HAA0H,yBAAyB,EAAE;AACrJ;AACA;AACA,2HAA2H,yBAAyB,EAAE;AACtJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,iCAAiC;AAC/D;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,sBAAsB;AAC5D,qDAAqD,qCAAqC;AAC1F,4CAA4C,2BAA2B;AACvE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,iDAAiD;AAC/E,oCAAoC,mBAAmB;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,iCAAiC;AAC/D,uCAAuC,uBAAuB;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC,gBAAgB;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C,2BAA2B;AACvE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,iDAAiD;AAC/E,oCAAoC,mBAAmB;AACvD;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC,gBAAgB;AACjD;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C,2BAA2B;AACvE;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,iCAAiC;AAC/D,uCAAuC,uBAAuB;AAC9D;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,iCAAiC;AAC/D,uCAAuC,uBAAuB;AAC9D,yCAAyC,yBAAyB;AAClE;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,CAAC;AACD;;;;;;;;ACnjBA;AACA;AACA;AACA,UAAU,gBAAgB,sCAAsC,iBAAiB,EAAE;AACnF,yBAAyB,uDAAuD;AAChF;AACA;AACA,uBAAuB,sBAAsB;AAC7C;AACA;AACA,CAAC;AACD,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,gBAAgB;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC,wBAAwB;AACjE;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC,wBAAwB;AACjE,mCAAmC,sBAAsB;AACzD;AACA,kDAAkD,6BAA6B,EAAE,wBAAwB,6DAA6D,EAAE;AACxK;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC,cAAc;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC,cAAc;AAC/C,qCAAqC,iCAAiC;AACtE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC,wBAAwB;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,YAAY;AAC1C;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC,cAAc;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,6CAA6C;AAC5E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,2CAA2C;AACnF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC,cAAc;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC,cAAc;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sFAAsF,WAAW,qCAAqC,EAAE;AACxI;AACA;AACA;AACA;AACA;AACA;AACA,sFAAsF,WAAW,qCAAqC,EAAE;AACxI;AACA;AACA;AACA;AACA;AACA,wFAAwF,WAAW,qCAAqC,EAAE;AAC1I;AACA;AACA;AACA;AACA;AACA,sFAAsF,WAAW,qCAAqC,EAAE;AACxI;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS,qBAAqB,wBAAwB,EAAE;AACxD;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,uBAAuB;AAC/C;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,sBAAsB;AACzD;AACA,oCAAoC,aAAa;AACjD;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,0HAA0H;AAC5I;AACA;AACA;AACA,0BAA0B,gIAAgI;AAC1J;AACA,aAAa;AACb;AACA;AACA,uBAAuB,gBAAgB;AACvC;AACA;AACA;AACA,sBAAsB,0IAA0I;AAChK;AACA,SAAS;AACT;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mGAAmG,iBAAiB,qBAAqB,sBAAsB,EAAE;AACjK;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oIAAoI,iBAAiB,qBAAqB,sBAAsB,EAAE;AAClM;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB,iBAAiB;AAC1C;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,mBAAmB;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,YAAY;AAC1C;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,gEAAgE;AACjE;AACA;AACA;AACA;AACA,CAAC,mHAAmH;AACpH;AACA;AACA;AACA;AACA,CAAC,yEAAyE;AAC1E;AACA;AACA;AACA;AACA;AACA,CAAC,+EAA+E;;;;;;;;AC9gBhF;AACA,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B;AAC9B;AACA;AACA;AACA;AACA,8CAA8C,kEAAkE,EAAE;AAClH,+CAA+C,4CAA4C,EAAE;AAC7F,6CAA6C,kBAAkB,EAAE;AACjE;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;;;;;;;;ACpEA;AACA;AACA;AACA;AACA,4CAA4C,QAAQ;AACpD;AACA;AACA,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,0BAA0B,EAAE;AAC1D;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,mBAAmB;AAClD;AACA;AACA;AACA;AACA,4BAA4B,uBAAuB;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mEAAmE,kBAAkB,EAAE;AACvF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sFAAsF;AACtF;AACA;AACA,aAAa;AACb;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kGAAkG;AAClG;AACA;AACA,yBAAyB;AACzB;AACA,6EAA6E,qBAAqB,EAAE;AACpG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mEAAmE,GAAG,uBAAuB;AAC7F;AACA,+CAA+C,uCAAuC,EAAE;AACxF,6CAA6C,mCAAmC,EAAE;AAClF,0CAA0C,qBAAqB,EAAE;AACjE,yCAAyC,kBAAkB,EAAE;AAC7D;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0FAA0F;AAC1F;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA,0FAA0F;AAC1F;AACA;AACA,iBAAiB;AACjB;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;;;;;;;;AC3NA;AACA;AACA;AACA,UAAU,gBAAgB,sCAAsC,iBAAiB,EAAE;AACnF,yBAAyB,uDAAuD;AAChF;AACA;AACA,uBAAuB,sBAAsB;AAC7C;AACA;AACA,CAAC;AACD,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,gBAAgB;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC,kBAAkB;AACvD,kCAAkC,gBAAgB;AAClD,4CAA4C,4BAA4B;AACxE,4CAA4C,yBAAyB;AACrE;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,oBAAoB;AAC/C,SAAS;AACT,8BAA8B,oCAAoC;AAClE,oBAAoB;AACpB,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC,kBAAkB;AACvD,kCAAkC,gBAAgB;AAClD,4CAA4C,4BAA4B;AACxE,4CAA4C,yBAAyB;AACrE;AACA;AACA;AACA;AACA,8EAA8E,kFAAkF;AAChK;AACA;AACA;AACA,6BAA6B,6EAA6E;AAC1G,iBAAiB,sBAAsB,kBAAkB,EAAE;AAC3D,aAAa;AACb;AACA,6BAA6B,iFAAiF;AAC9G,iBAAiB,sBAAsB,kBAAkB,EAAE;AAC3D,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,YAAY;AAC1C;AACA,2BAA2B,oBAAoB;AAC/C,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,YAAY;AAC1C;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC,8BAA8B,gBAAgB,2BAA2B,EAAE,UAAU;AACvH,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,uBAAuB;AAC/C;AACA;AACA;AACA;AACA,kCAAkC,8BAA8B,gBAAgB,yBAAyB,EAAE,UAAU;AACrH,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC,8BAA8B,gBAAgB,kCAAkC,EAAE,UAAU;AAC9H,SAAS,GAAG,sBAAsB,iBAAiB,EAAE,EAAE;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C,2BAA2B;AACvE;AACA;AACA,+BAA+B,gDAAgD;AAC/E,aAAa;AACb;AACA,+BAA+B,wCAAwC;AACvE,aAAa;AACb;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,6GAA6G,qCAAqC,EAAE;AACpJ;AACA;AACA,CAAC;AACD;;;;;;;;ACvdA;AACA;AACA;AACA,UAAU,gBAAgB,sCAAsC,iBAAiB,EAAE;AACnF,yBAAyB,uDAAuD;AAChF;AACA;AACA,uBAAuB,sBAAsB;AAC7C;AACA;AACA,CAAC;AACD,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,gBAAgB;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC,iBAAiB;AACrD,oDAAoD,mCAAmC;AACvF;AACA;AACA;AACA,+BAA+B,6BAA6B;AAC5D,aAAa;AACb,+DAA+D,iBAAiB;AAChF;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,YAAY;AAC1C,oDAAoD,mCAAmC;AACvF;AACA;AACA;AACA;AACA,mCAAmC,6BAA6B;AAChE,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB,iBAAiB;AACjB;AACA;AACA;AACA,qBAAqB;AACrB,iBAAiB;AACjB,aAAa,sBAAsB,kBAAkB,EAAE;AACvD,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,YAAY;AAC1C;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,YAAY;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,+FAA+F;AAC/F;AACA;AACA,2CAA2C,2BAA2B;AACtE;AACA,kCAAkC,kEAAkE;AACpG,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC,gBAAgB,EAAE;AAC3D;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA,SAAS;AACT;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA,SAAS;AACT;AACA;AACA,CAAC;;;;;;;;AChXD;AACA;AACA;AACA,UAAU,gBAAgB,sCAAsC,iBAAiB,EAAE;AACnF,yBAAyB,uDAAuD;AAChF;AACA;AACA,uBAAuB,sBAAsB;AAC7C;AACA;AACA,CAAC;AACD,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,sEAAsE;AACvE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,qBAAqB;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0DAA0D,gBAAgB,qBAAqB,EAAE;AACjG,8BAA8B,iBAAiB;AAC/C;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,gBAAgB,qBAAqB,EAAE;AAClF;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,CAAC;AACD;;;;;;;;AC9IA;AACA,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,gEAAgE;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,6DAA6D;AAC9D;AACA;AACA;AACA;AACA,CAAC,oGAAoG;AACrG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,4EAA4E;AAC7E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,mEAAmE;AACpE;AACA;AACA;AACA;AACA,CAAC,qFAAqF;AACtF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,yEAAyE;AAC1E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,sEAAsE;AACvE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,4EAA4E;AAC7E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,uDAAuD;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,uDAAuD;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,4EAA4E;AAC7E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,gEAAgE;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,6GAA6G;AAC9G;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,qFAAqF;AACtF;AACA;AACA;AACA;AACA;AACA,CAAC,mHAAmH;AACpH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,8FAA8F;;;;;;;;AC7a/F;AACA;AACA;AACA,UAAU,gBAAgB,sCAAsC,iBAAiB,EAAE;AACnF,yBAAyB,uDAAuD;AAChF;AACA;AACA,uBAAuB,sBAAsB;AAC7C;AACA;AACA,CAAC;AACD,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,kBAAkB;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,2BAA2B,sBAAsB;AACjD,SAAS;AACT;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,YAAY;AAC1C;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,uBAAuB;AAC/C;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,CAAC;AACD;;;;;;;;ACjNA;AACA;AACA;AACA,UAAU,gBAAgB,sCAAsC,iBAAiB,EAAE;AACnF,yBAAyB,uDAAuD;AAChF;AACA;AACA,uBAAuB,sBAAsB;AAC7C;AACA;AACA,CAAC;AACD,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,uBAAuB;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,+EAA+E,iBAAiB;AAChG;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC,kBAAkB;AACvD,+BAA+B,gCAAgC;AAC/D,4CAA4C,yBAAyB;AACrE;AACA;AACA;AACA,mBAAmB,oBAAoB;AACvC;AACA,2BAA2B,2BAA2B;AACtD,SAAS;AACT,8BAA8B,iBAAiB;AAC/C,oBAAoB;AACpB,SAAS;AACT;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,qBAAqB;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;;;;;;;;ACtLA;AACA;AACA;AACA,UAAU,gBAAgB,sCAAsC,iBAAiB,EAAE;AACnF,yBAAyB,uDAAuD;AAChF;AACA;AACA,uBAAuB,sBAAsB;AAC7C;AACA;AACA,CAAC;AACD,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,4BAA4B;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0DAA0D,cAAc,gCAAgC,EAAE;AAC1G,8BAA8B,iBAAiB;AAC/C;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,gCAAgC;AAC3D,SAAS;AACT;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;;;;;;;ACzGA;;AAEA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;;AAEA;AACA;AACA,4CAA4C;;AAE5C;;;;;;;;ACpBA;AACA,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,wBAAwB;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,uCAAuC;AACtE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,yCAAyC;AACzE;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,eAAe;AAC/C,kCAAkC,iBAAiB;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA,CAAC;AACD;;;;;;;;ACvPA;AACA,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,6CAA6C;AAC7E,iCAAiC,cAAc;AAC/C,0HAA0H,iCAAiC,EAAE;AAC7J;AACA;AACA,gCAAgC,6CAA6C;AAC7E,iCAAiC,cAAc;AAC/C,0HAA0H,iCAAiC,EAAE;AAC7J;AACA;AACA,iCAAiC,cAAc;AAC/C,gCAAgC,6CAA6C;AAC7E,2HAA2H,iCAAiC,EAAE;AAC9J;AACA;AACA,iCAAiC,cAAc;AAC/C,gCAAgC,6CAA6C;AAC7E,2HAA2H,iCAAiC,EAAE;AAC9J;AACA;AACA,iCAAiC,cAAc;AAC/C,gCAAgC,6CAA6C;AAC7E,4HAA4H,iCAAiC,EAAE;AAC/J;AACA;AACA,iCAAiC,cAAc;AAC/C,gCAAgC,6CAA6C;AAC7E,6HAA6H,iCAAiC,EAAE;AAChK;AACA;AACA,CAAC;AACD;;;;;;;;ACnHA;AACA,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC,cAAc;AAC/C,gDAAgD,gDAAgD;AAChG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6DAA6D,cAAc;AAC3E;AACA;AACA;AACA;AACA,yCAAyC,mBAAmB;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC,cAAc;AAC/C;AACA;AACA;AACA,+CAA+C,sBAAsB;AACrE;AACA,sEAAsE,8BAA8B,EAAE;AACtG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,MAAM;AACpD;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,iCAAiC,cAAc;AAC/C,gDAAgD,gBAAgB;AAChE;AACA;AACA;AACA,iCAAiC,cAAc;AAC/C,gDAAgD,iBAAiB;AACjE;AACA;AACA;AACA,iCAAiC,cAAc;AAC/C,gDAAgD,kBAAkB;AAClE;AACA;AACA;AACA,iCAAiC,cAAc;AAC/C,gDAAgD,mBAAmB;AACnE;AACA;AACA;AACA,CAAC;AACD;;;;;;;;AC7GA;AACA;AACA;AACA,UAAU,gBAAgB,sCAAsC,iBAAiB,EAAE;AACnF,yBAAyB,uDAAuD;AAChF;AACA;AACA,uBAAuB,sBAAsB;AAC7C;AACA;AACA,CAAC;AACD,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,6BAA6B;AAC1E,wCAAwC,wBAAwB;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;;;;;;;;ACvIA;AACA;AACA;AACA,UAAU,gBAAgB,sCAAsC,iBAAiB,EAAE;AACnF,yBAAyB,uDAAuD;AAChF;AACA;AACA,uBAAuB,sBAAsB;AAC7C;AACA;AACA,CAAC;AACD,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,0BAA0B;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,0BAA0B;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD,cAAc,6BAA6B,EAAE;AAC9F;AACA;AACA;AACA,yBAAyB,8BAA8B;AACvD,SAAS;AACT,8BAA8B,iBAAiB;AAC/C;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gEAAgE,cAAc,6BAA6B,EAAE;AAC7G;AACA;AACA,2BAA2B,8BAA8B;AACzD,SAAS;AACT;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,iCAAiC;AAC/D;AACA;AACA;AACA,CAAC;AACD;;;;;;;;AC3PA;AACA;AACA;AACA,UAAU,gBAAgB,sCAAsC,iBAAiB,EAAE;AACnF,yBAAyB,uDAAuD;AAChF;AACA;AACA,uBAAuB,sBAAsB;AAC7C;AACA;AACA,CAAC;AACD,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,oBAAoB;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC,gBAAgB,oBAAoB,wBAAwB;AAC9F,SAAS,oBAAoB,wCAAwC,EAAE;AACvE;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,gBAAgB,oBAAoB,EAAE;AACjF;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,sBAAsB;AACpD;AACA;AACA;AACA,CAAC;AACD;;;;;;;;AC1JA;AACA;AACA;AACA,UAAU,gBAAgB,sCAAsC,iBAAiB,EAAE;AACnF,yBAAyB,uDAAuD;AAChF;AACA;AACA,uBAAuB,sBAAsB;AAC7C;AACA;AACA,CAAC;AACD,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,iBAAiB;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB,aAAa;AACb,SAAS;AACT,kEAAkE,iBAAiB;AACnF;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC,iBAAiB;AACrD;AACA;AACA,2BAA2B,oBAAoB;AAC/C,SAAS;AACT,oDAAoD,iBAAiB;AACrE;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,iBAAiB;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC,sCAAsC;AAC1E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,0DAA0D;AACjG,sCAAsC,+CAA+C;AACrF,+CAA+C,2BAA2B;AAC1E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA,wCAAwC,yBAAyB;AACjE;AACA;AACA,wCAAwC,yBAAyB;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC,wBAAwB;AACjE;AACA;AACA;AACA;AACA;AACA,wCAAwC,yBAAyB;AACjE;AACA;AACA,wCAAwC,yBAAyB;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,mBAAmB;AAC1D,kCAAkC,iBAAiB;AACnD,wCAAwC,wBAAwB;AAChE,oCAAoC,oBAAoB;AACxD,wCAAwC,uBAAuB;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,sDAAsD;AAC7F;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,wBAAwB;AAC3D;AACA,2BAA2B,oBAAoB;AAC/C,SAAS;AACT;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;;;;;;;;AClTA;AACA,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC,kCAAkC;AACpE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iEAAiE,yCAAyC,EAAE,oBAAoB,4BAA4B,EAAE;AAC9J;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,4BAA4B;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sEAAsE;AACtE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kEAAkE,cAAc;AAChF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qEAAqE,cAAc;AACnF;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC,iBAAiB,EAAE;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,mFAAmF,EAAE;AACzI,iBAAiB;AACjB,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,kBAAkB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+FAA+F,yCAAyC;AACxI;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,CAAC;AACD;;;;;;;;ACvPA;AACA;AACA;AACA,UAAU,gBAAgB,sCAAsC,iBAAiB,EAAE;AACnF,yBAAyB,uDAAuD;AAChF;AACA;AACA,uBAAuB,sBAAsB;AAC7C;AACA;AACA,CAAC;AACD,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,mBAAmB;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,eAAe;AAC9C;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,eAAe;AAC9C;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,eAAe;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,CAAC;AACD;;;;;;;;ACrGA;AACA,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;8CC7EA;AACA,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;;;;;;;;;ACbA;AACA,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,IAAI;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,eAAe;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,eAAe,uBAAuB;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,gBAAgB,IAAI;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;;;;;;;;AC3FA;AACA,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC,cAAc;AAC/C,iCAAiC,cAAc;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC,cAAc;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;;;;;;;;AChKA;AACA;AACA;AACA,UAAU,gBAAgB,sCAAsC,iBAAiB,EAAE;AACnF,yBAAyB,uDAAuD;AAChF;AACA;AACA,uBAAuB,sBAAsB;AAC7C;AACA;AACA,CAAC;AACD,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,gBAAgB;AACnD,gCAAgC,aAAa;AAC7C;AACA;AACA,8BAA8B,uBAAuB;AACrD;AACA;AACA;AACA,mCAAmC,gBAAgB;AACnD,uCAAuC,oBAAoB;AAC3D;AACA;AACA;AACA,iCAAiC,uBAAuB;AACxD;AACA;AACA,iCAAiC,0BAA0B;AAC3D;AACA;AACA,iCAAiC,eAAe;AAChD;AACA;AACA;AACA,qCAAqC,2BAA2B;AAChE,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA,qCAAqC,uBAAuB;AAC5D,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA,qCAAqC,uBAAuB;AAC5D,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA,iCAAiC,6BAA6B;AAC9D;AACA;AACA;AACA,qCAAqC,wBAAwB;AAC7D,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA,qCAAqC,kBAAkB;AACvD,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA,qCAAqC,uBAAuB;AAC5D,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA,qCAAqC,0BAA0B;AAC/D,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA,qCAAqC,wBAAwB;AAC7D,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA,qCAAqC,yBAAyB;AAC9D,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA,qCAAqC,sBAAsB;AAC3D,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA,qCAAqC,6BAA6B;AAClE,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA,iCAAiC,qBAAqB;AACtD;AACA;AACA,iCAAiC,cAAc;AAC/C;AACA;AACA,iCAAiC,cAAc;AAC/C;AACA;AACA,iCAAiC,iBAAiB;AAClD;AACA;AACA;AACA,wBAAwB,uBAAuB;AAC/C;AACA;AACA,iCAAiC,+BAA+B;AAChE;AACA;AACA,iCAAiC,mBAAmB;AACpD;AACA;AACA,iCAAiC,iBAAiB;AAClD;AACA;AACA;AACA,wBAAwB,uBAAuB;AAC/C;AACA;AACA,iCAAiC,6BAA6B;AAC9D;AACA;AACA,iCAAiC,qBAAqB;AACtD;AACA;AACA,iCAAiC,iCAAiC;AAClE;AACA;AACA;AACA,wBAAwB,uBAAuB;AAC/C;AACA;AACA,iCAAiC,kBAAkB;AACnD;AACA;AACA,iCAAiC,wBAAwB;AACzD;AACA;AACA;AACA,wBAAwB,uBAAuB;AAC/C;AACA;AACA,iCAAiC,uCAAuC;AACxE;AACA;AACA,iCAAiC,yBAAyB;AAC1D;AACA;AACA,iCAAiC,4BAA4B;AAC7D;AACA;AACA,iCAAiC,kBAAkB;AACnD;AACA;AACA;AACA,wBAAwB,uBAAuB;AAC/C;AACA;AACA,iCAAiC,iBAAiB;AAClD;AACA;AACA;AACA,wBAAwB,uBAAuB;AAC/C;AACA;AACA,iCAAiC,yBAAyB;AAC1D;AACA;AACA;AACA,qCAAqC,iCAAiC;AACtE,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA,iCAAiC,kCAAkC;AACnE;AACA;AACA;AACA,wBAAwB,uBAAuB;AAC/C;AACA;AACA,iCAAiC,yBAAyB;AAC1D;AACA;AACA,iCAAiC,+CAA+C;AAChF;AACA;AACA;AACA,qCAAqC,6CAA6C;AAClF,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA,iCAAiC,8BAA8B;AAC/D;AACA;AACA,iCAAiC,mBAAmB;AACpD;AACA;AACA,iCAAiC,4BAA4B;AAC7D;AACA;AACA,iCAAiC,wBAAwB;AACzD;AACA;AACA,iCAAiC,qBAAqB;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,gCAAgC;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,8DAA8D;AAC7F,aAAa;AACb,SAAS;AACT,8BAA8B,iBAAiB,wBAAwB,sDAAsD,EAAE;AAC/H;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,aAAa;AAC3C,kCAAkC,iBAAiB;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,2BAA2B;AAChF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA,aAAa,IAAI;AACjB;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,sEAAsE;AACvE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,oGAAoG;AACrG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,iGAAiG;AAClG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;;;;;;;;ACleA;AACA,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,CAAC;AACD;;;;;;;;AC5CA;AACA,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,kCAAkC,oBAAoB;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC;AACxC,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,6DAA6D,mCAAmC,EAAE;AAClG,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;;;;;;;;AC1DA;AACA;AACA;AACA,UAAU,gBAAgB,sCAAsC,iBAAiB,EAAE;AACnF,yBAAyB,uDAAuD;AAChF;AACA;AACA,uBAAuB,sBAAsB;AAC7C;AACA;AACA,CAAC;AACD,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA,8BAA8B,8BAA8B;AAC5D;AACA;AACA;AACA;AACA,oDAAoD,0CAA0C,EAAE;AAChG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;;;;;;;;AC3EA;AACA;AACA;AACA,UAAU,gBAAgB,sCAAsC,iBAAiB,EAAE;AACnF,yBAAyB,uDAAuD;AAChF;AACA;AACA,uBAAuB,sBAAsB;AAC7C;AACA;AACA,CAAC;AACD,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,oBAAoB;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,CAAC;AACD;;;;;;;;AC1IA;AACA;AACA;AACA,UAAU,gBAAgB,sCAAsC,iBAAiB,EAAE;AACnF,yBAAyB,uDAAuD;AAChF;AACA;AACA,uBAAuB,sBAAsB;AAC7C;AACA;AACA,CAAC;AACD,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC,gBAAgB;AAClD,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC,kBAAkB;AACpD,SAAS;AACT;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,kBAAkB;AAChD;AACA;AACA;AACA,CAAC;AACD;;;;;;;;AC7IA;AACA;AACA;AACA,UAAU,gBAAgB,sCAAsC,iBAAiB,EAAE;AACnF,yBAAyB,uDAAuD;AAChF;AACA;AACA,uBAAuB,sBAAsB;AAC7C;AACA;AACA,CAAC;AACD,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,0BAA0B;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,gCAAgC;AACpF;AACA,SAAS,EAAE,EAAE,EAAE,EAAE;AACjB;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS,qBAAqB,kCAAkC,EAAE;AAClE;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,YAAY;AAC1C;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA,CAAC;AACD;;;;;;;;ACxIA;AACA;AACA;AACA,UAAU,gBAAgB,sCAAsC,iBAAiB,EAAE;AACnF,yBAAyB,uDAAuD;AAChF;AACA;AACA,uBAAuB,sBAAsB;AAC7C;AACA;AACA,CAAC;AACD,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,gBAAgB;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,sBAAsB;AAC5D,4CAA4C,yBAAyB;AACrE;AACA;AACA;AACA,2BAA2B,oBAAoB;AAC/C,SAAS;AACT,mDAAmD,iBAAiB;AACpE;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,oBAAoB;AAC/C,SAAS;AACT;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA,8BAA8B,qBAAqB;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC,6CAA6C;AAC/E,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;;;;;;;;ACnLA;AACA;AACA;AACA,UAAU,gBAAgB,sCAAsC,iBAAiB,EAAE;AACnF,yBAAyB,uDAAuD;AAChF;AACA;AACA,uBAAuB,sBAAsB;AAC7C;AACA;AACA,CAAC;AACD,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,gBAAgB;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;;;;;;;;ACpDA;AACA;AACA;AACA,UAAU,gBAAgB,sCAAsC,iBAAiB,EAAE;AACnF,yBAAyB,uDAAuD;AAChF;AACA;AACA,uBAAuB,sBAAsB;AAC7C;AACA;AACA,CAAC;AACD,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,wBAAwB;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,8BAA8B,2BAA2B,qCAAqC,EAAE;AAChG,oBAAoB;AACpB,SAAS;AACT;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,+BAA+B,2BAA2B,qCAAqC,EAAE;AACjG,oBAAoB;AACpB,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;;;;;;;;AC5FA;AACA;AACA;AACA,UAAU,gBAAgB,sCAAsC,iBAAiB,EAAE;AACnF,yBAAyB,uDAAuD;AAChF;AACA;AACA,uBAAuB,sBAAsB;AAC7C;AACA;AACA,CAAC;AACD,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC,gBAAgB;AACjD;AACA;AACA;AACA;AACA,2BAA2B,8BAA8B;AACzD,SAAS;AACT,2DAA2D,iBAAiB;AAC5E;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,kEAAkE,iBAAiB;AACnF;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,8BAA8B;AACzD,SAAS;AACT;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,qBAAqB;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA,CAAC;AACD;;;;;;;;ACjKA;AACA;AACA;AACA,UAAU,gBAAgB,sCAAsC,iBAAiB,EAAE;AACnF,yBAAyB,uDAAuD;AAChF;AACA;AACA,uBAAuB,sBAAsB;AAC7C;AACA;AACA,CAAC;AACD,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA,8BAA8B,qCAAqC;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA,2CAA2C,2BAA2B;AACtE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,2BAA2B;AACtE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,2BAA2B;AACtE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA,8CAA8C,8BAA8B;AAC5E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA,CAAC;AACD;;;;;;;;AC7HA;AACA;AACA;AACA,UAAU,gBAAgB,sCAAsC,iBAAiB,EAAE;AACnF,yBAAyB,uDAAuD;AAChF;AACA;AACA,uBAAuB,sBAAsB;AAC7C;AACA;AACA,CAAC;AACD,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,6CAA6C;AAC3E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC,eAAe;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,qBAAqB,kBAAkB,EAAE;AAC1D,aAAa,sBAAsB,kBAAkB,EAAE;AACvD,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,uBAAuB;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C,4BAA4B;AACxE;AACA;AACA;AACA;AACA;AACA,wDAAwD;AACxD;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,8DAA8D;AAC5F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC,qBAAqB;AACvD,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C,4BAA4B;AACxE;AACA;AACA;AACA;AACA;AACA,wDAAwD;AACxD;AACA;AACA;AACA;AACA;AACA,CAAC;;;;;;;;ACtTD;AACA,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;;;;;;;AC9CA;AACA;AACA;AACA,UAAU,gBAAgB,sCAAsC,iBAAiB,EAAE;AACnF,yBAAyB,uDAAuD;AAChF;AACA;AACA,uBAAuB,sBAAsB;AAC7C;AACA;AACA,CAAC;AACD,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,yCAAyC;AACxE,aAAa;AACb;AACA;AACA;AACA,qBAAqB,oBAAoB;AACzC,aAAa;AACb;AACA;AACA;AACA,qBAAqB,oBAAoB;AACzC,aAAa;AACb;AACA;AACA;AACA,sBAAsB,qBAAqB;AAC3C,aAAa;AACb;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA,0EAA0E;AAC1E;AACA;AACA,2CAA2C,2BAA2B;AACtE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC,eAAe;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,CAAC;AACD;;;;;;;;ACvJA;AACA,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA,CAAC;AACD;;;;;;;;ACfA;AACA;AACA;AACA,UAAU,gBAAgB,sCAAsC,iBAAiB,EAAE;AACnF,yBAAyB,uDAAuD;AAChF;AACA;AACA,uBAAuB,sBAAsB;AAC7C;AACA;AACA,CAAC;AACD,8CAA8C,cAAc;AAC5D;AACA;AACA,WAAW,KAAK;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,eAAe;AAC7C;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA,CAAC;AACD;;;;;;;;ACxCA;AACA,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA,WAAW,kBAAkB;AAC7B;AACA;AACA;AACA;AACA;AACA,iCAAiC,cAAc;AAC/C;AACA;AACA;AACA;AACA;AACA,gDAAgD,mBAAmB;AACnE;AACA;AACA;AACA;AACA;AACA,iCAAiC,cAAc;AAC/C;AACA;AACA;AACA,+CAA+C,sBAAsB;AACrE;AACA,qCAAqC,qCAAqC,8BAA8B,EAAE;AAC1G;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,MAAM;AACpD;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,iCAAiC,cAAc;AAC/C,gDAAgD,gBAAgB;AAChE;AACA;AACA;AACA,iCAAiC,cAAc;AAC/C,gDAAgD,iBAAiB;AACjE;AACA;AACA;AACA,iCAAiC,cAAc;AAC/C,gDAAgD,kBAAkB;AAClE;AACA;AACA;AACA,iCAAiC,cAAc;AAC/C,gDAAgD,mBAAmB;AACnE;AACA;AACA;AACA,CAAC;AACD;;;;;;;;ACjFA;AACA;AACA;AACA,UAAU,gBAAgB,sCAAsC,iBAAiB,EAAE;AACnF,yBAAyB,uDAAuD;AAChF;AACA;AACA,uBAAuB,sBAAsB;AAC7C;AACA;AACA,CAAC;AACD,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,0DAA0D;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,iBAAiB;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,2BAA2B;AACzE;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,6BAA6B;AAC1E;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;;;;;;;;ACpQA;AACA;AACA;AACA,UAAU,gBAAgB,sCAAsC,iBAAiB,EAAE;AACnF,yBAAyB,uDAAuD;AAChF;AACA;AACA,uBAAuB,sBAAsB;AAC7C;AACA;AACA,CAAC;AACD,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA,8BAA8B,kBAAkB;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uJAAuJ,GAAG;AAC1J;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA,8BAA8B,iBAAiB;AAC/C;AACA;AACA;AACA,CAAC;AACD;;;;;;;;AC5DA;AACA;AACA;AACA,UAAU,gBAAgB,sCAAsC,iBAAiB,EAAE;AACnF,yBAAyB,uDAAuD;AAChF;AACA;AACA,uBAAuB,sBAAsB;AAC7C;AACA;AACA,CAAC;AACD,8CAA8C,cAAc;AAC5D;AACA,WAAW,cAAc;AACzB;AACA;AACA;AACA,8BAA8B,oBAAoB;AAClD;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA,CAAC;AACD;AACA;AACA;AACA;AACA,8BAA8B,iBAAiB;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;;;;;;;;AChGA;AACA;AACA;AACA,UAAU,gBAAgB,sCAAsC,iBAAiB,EAAE;AACnF,yBAAyB,uDAAuD;AAChF;AACA;AACA,uBAAuB,sBAAsB;AAC7C;AACA;AACA,CAAC;AACD,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA,8BAA8B,wBAAwB;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA,8BAA8B,kBAAkB;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA,8BAA8B,gBAAgB;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;;;;;;;;AC1OA;AACA;AACA;AACA,UAAU,gBAAgB,sCAAsC,iBAAiB,EAAE;AACnF,yBAAyB,uDAAuD;AAChF;AACA;AACA,uBAAuB,sBAAsB;AAC7C;AACA;AACA,CAAC;AACD,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA,8BAA8B,sBAAsB;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;;;;;;;;ACpDA;AACA;AACA;AACA,UAAU,gBAAgB,sCAAsC,iBAAiB,EAAE;AACnF,yBAAyB,uDAAuD;AAChF;AACA;AACA,uBAAuB,sBAAsB;AAC7C;AACA;AACA,CAAC;AACD,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA,8BAA8B,wBAAwB;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;;;;;;;;ACrCA;AACA;AACA;AACA,UAAU,gBAAgB,sCAAsC,iBAAiB,EAAE;AACnF,yBAAyB,uDAAuD;AAChF;AACA;AACA,uBAAuB,sBAAsB;AAC7C;AACA;AACA,CAAC;AACD,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA,8BAA8B,gBAAgB;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,CAAC;AACD","file":"pnp.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"$pnp\"] = factory();\n\telse\n\t\troot[\"$pnp\"] = factory();\n})(this, function() {\nreturn \n\n\n// WEBPACK FOOTER //\n// webpack/universalModuleDefinition"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"/assets/\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 32);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 5a556050b9db51f8fd16","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar pnplibconfig_1 = require(\"../configuration/pnplibconfig\");\nfunction extractWebUrl(candidateUrl) {\n if (candidateUrl === null) {\n return \"\";\n }\n var index = candidateUrl.indexOf(\"_api/\");\n if (index > -1) {\n return candidateUrl.substr(0, index);\n }\n // if all else fails just give them what they gave us back\n return candidateUrl;\n}\nexports.extractWebUrl = extractWebUrl;\nvar Util = /** @class */ (function () {\n function Util() {\n }\n /**\n * Gets a callback function which will maintain context across async calls.\n * Allows for the calling pattern getCtxCallback(thisobj, method, methodarg1, methodarg2, ...)\n *\n * @param context The object that will be the 'this' value in the callback\n * @param method The method to which we will apply the context and parameters\n * @param params Optional, additional arguments to supply to the wrapped method when it is invoked\n */\n Util.getCtxCallback = function (context, method) {\n var params = [];\n for (var _i = 2; _i < arguments.length; _i++) {\n params[_i - 2] = arguments[_i];\n }\n return function () {\n method.apply(context, params);\n };\n };\n /**\n * Tests if a url param exists\n *\n * @param name The name of the url paramter to check\n */\n Util.urlParamExists = function (name) {\n name = name.replace(/[\\[]/, \"\\\\[\").replace(/[\\]]/, \"\\\\]\");\n var regex = new RegExp(\"[\\\\?&]\" + name + \"=([^&#]*)\");\n return regex.test(location.search);\n };\n /**\n * Gets a url param value by name\n *\n * @param name The name of the paramter for which we want the value\n */\n Util.getUrlParamByName = function (name) {\n name = name.replace(/[\\[]/, \"\\\\[\").replace(/[\\]]/, \"\\\\]\");\n var regex = new RegExp(\"[\\\\?&]\" + name + \"=([^&#]*)\");\n var results = regex.exec(location.search);\n return results == null ? \"\" : decodeURIComponent(results[1].replace(/\\+/g, \" \"));\n };\n /**\n * Gets a url param by name and attempts to parse a bool value\n *\n * @param name The name of the paramter for which we want the boolean value\n */\n Util.getUrlParamBoolByName = function (name) {\n var p = this.getUrlParamByName(name);\n var isFalse = (p === \"\" || /false|0/i.test(p));\n return !isFalse;\n };\n /**\n * Inserts the string s into the string target as the index specified by index\n *\n * @param target The string into which we will insert s\n * @param index The location in target to insert s (zero based)\n * @param s The string to insert into target at position index\n */\n Util.stringInsert = function (target, index, s) {\n if (index > 0) {\n return target.substring(0, index) + s + target.substring(index, target.length);\n }\n return s + target;\n };\n /**\n * Adds a value to a date\n *\n * @param date The date to which we will add units, done in local time\n * @param interval The name of the interval to add, one of: ['year', 'quarter', 'month', 'week', 'day', 'hour', 'minute', 'second']\n * @param units The amount to add to date of the given interval\n *\n * http://stackoverflow.com/questions/1197928/how-to-add-30-minutes-to-a-javascript-date-object\n */\n Util.dateAdd = function (date, interval, units) {\n var ret = new Date(date); // don't change original date\n switch (interval.toLowerCase()) {\n case \"year\":\n ret.setFullYear(ret.getFullYear() + units);\n break;\n case \"quarter\":\n ret.setMonth(ret.getMonth() + 3 * units);\n break;\n case \"month\":\n ret.setMonth(ret.getMonth() + units);\n break;\n case \"week\":\n ret.setDate(ret.getDate() + 7 * units);\n break;\n case \"day\":\n ret.setDate(ret.getDate() + units);\n break;\n case \"hour\":\n ret.setTime(ret.getTime() + units * 3600000);\n break;\n case \"minute\":\n ret.setTime(ret.getTime() + units * 60000);\n break;\n case \"second\":\n ret.setTime(ret.getTime() + units * 1000);\n break;\n default:\n ret = undefined;\n break;\n }\n return ret;\n };\n /**\n * Loads a stylesheet into the current page\n *\n * @param path The url to the stylesheet\n * @param avoidCache If true a value will be appended as a query string to avoid browser caching issues\n */\n Util.loadStylesheet = function (path, avoidCache) {\n if (avoidCache) {\n path += \"?\" + encodeURIComponent((new Date()).getTime().toString());\n }\n var head = document.getElementsByTagName(\"head\");\n if (head.length > 0) {\n var e = document.createElement(\"link\");\n head[0].appendChild(e);\n e.setAttribute(\"type\", \"text/css\");\n e.setAttribute(\"rel\", \"stylesheet\");\n e.setAttribute(\"href\", path);\n }\n };\n /**\n * Combines an arbitrary set of paths ensuring that the slashes are normalized\n *\n * @param paths 0 to n path parts to combine\n */\n Util.combinePaths = function () {\n var paths = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n paths[_i] = arguments[_i];\n }\n return paths\n .filter(function (path) { return !Util.stringIsNullOrEmpty(path); })\n .map(function (path) { return path.replace(/^[\\\\|\\/]/, \"\").replace(/[\\\\|\\/]$/, \"\"); })\n .join(\"/\")\n .replace(/\\\\/g, \"/\");\n };\n /**\n * Gets a random string of chars length\n *\n * @param chars The length of the random string to generate\n */\n Util.getRandomString = function (chars) {\n var text = new Array(chars);\n var possible = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789\";\n for (var i = 0; i < chars; i++) {\n text[i] = possible.charAt(Math.floor(Math.random() * possible.length));\n }\n return text.join(\"\");\n };\n /**\n * Gets a random GUID value\n *\n * http://stackoverflow.com/questions/105034/create-guid-uuid-in-javascript\n */\n /* tslint:disable no-bitwise */\n Util.getGUID = function () {\n var d = new Date().getTime();\n var guid = \"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx\".replace(/[xy]/g, function (c) {\n var r = (d + Math.random() * 16) % 16 | 0;\n d = Math.floor(d / 16);\n return (c === \"x\" ? r : (r & 0x3 | 0x8)).toString(16);\n });\n return guid;\n };\n /* tslint:enable */\n /**\n * Determines if a given value is a function\n *\n * @param candidateFunction The thing to test for being a function\n */\n Util.isFunction = function (candidateFunction) {\n return typeof candidateFunction === \"function\";\n };\n /**\n * @returns whether the provided parameter is a JavaScript Array or not.\n */\n Util.isArray = function (array) {\n if (Array.isArray) {\n return Array.isArray(array);\n }\n return array && typeof array.length === \"number\" && array.constructor === Array;\n };\n /**\n * Determines if a string is null or empty or undefined\n *\n * @param s The string to test\n */\n Util.stringIsNullOrEmpty = function (s) {\n return typeof s === \"undefined\" || s === null || s.length < 1;\n };\n /**\n * Provides functionality to extend the given object by doing a shallow copy\n *\n * @param target The object to which properties will be copied\n * @param source The source object from which properties will be copied\n * @param noOverwrite If true existing properties on the target are not overwritten from the source\n *\n */\n Util.extend = function (target, source, noOverwrite) {\n if (noOverwrite === void 0) { noOverwrite = false; }\n if (source === null || typeof source === \"undefined\") {\n return target;\n }\n // ensure we don't overwrite things we don't want overwritten\n var check = noOverwrite ? function (o, i) { return !(i in o); } : function () { return true; };\n return Object.getOwnPropertyNames(source)\n .filter(function (v) { return check(target, v); })\n .reduce(function (t, v) {\n t[v] = source[v];\n return t;\n }, target);\n };\n /**\n * Determines if a given url is absolute\n *\n * @param url The url to check to see if it is absolute\n */\n Util.isUrlAbsolute = function (url) {\n return /^https?:\\/\\/|^\\/\\//i.test(url);\n };\n /**\n * Ensures that a given url is absolute for the current web based on context\n *\n * @param candidateUrl The url to make absolute\n *\n */\n Util.toAbsoluteUrl = function (candidateUrl) {\n return new Promise(function (resolve) {\n if (Util.isUrlAbsolute(candidateUrl)) {\n // if we are already absolute, then just return the url\n return resolve(candidateUrl);\n }\n if (pnplibconfig_1.RuntimeConfig.spBaseUrl !== null) {\n // base url specified either with baseUrl of spfxContext config property\n return resolve(Util.combinePaths(pnplibconfig_1.RuntimeConfig.spBaseUrl, candidateUrl));\n }\n if (typeof global._spPageContextInfo !== \"undefined\") {\n // operating in classic pages\n if (global._spPageContextInfo.hasOwnProperty(\"webAbsoluteUrl\")) {\n return resolve(Util.combinePaths(global._spPageContextInfo.webAbsoluteUrl, candidateUrl));\n }\n else if (global._spPageContextInfo.hasOwnProperty(\"webServerRelativeUrl\")) {\n return resolve(Util.combinePaths(global._spPageContextInfo.webServerRelativeUrl, candidateUrl));\n }\n }\n // does window.location exist and have a certain path part in it?\n if (typeof global.location !== \"undefined\") {\n var baseUrl_1 = global.location.toString().toLowerCase();\n [\"/_layouts/\", \"/siteassets/\"].forEach(function (s) {\n var index = baseUrl_1.indexOf(s);\n if (index > 0) {\n return resolve(Util.combinePaths(baseUrl_1.substr(0, index), candidateUrl));\n }\n });\n }\n return resolve(candidateUrl);\n });\n };\n return Util;\n}());\nexports.Util = Util;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/utils/util.js\n// module id = 0\n// module chunks = 0","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar util_1 = require(\"../utils/util\");\nvar collections_1 = require(\"../collections/collections\");\nvar utils_1 = require(\"../net/utils\");\nvar exceptions_1 = require(\"../utils/exceptions\");\nvar logging_1 = require(\"../utils/logging\");\nvar queryable_1 = require(\"../odata/queryable\");\nvar pipeline_1 = require(\"../request/pipeline\");\nvar httpclient_1 = require(\"../net/httpclient\");\n/**\n * SharePointQueryable Base Class\n *\n */\nvar SharePointQueryable = /** @class */ (function (_super) {\n __extends(SharePointQueryable, _super);\n /**\n * Creates a new instance of the SharePointQueryable class\n *\n * @constructor\n * @param baseUrl A string or SharePointQueryable that should form the base part of the url\n *\n */\n function SharePointQueryable(baseUrl, path) {\n var _this = _super.call(this) || this;\n _this._options = {};\n _this._query = new collections_1.Dictionary();\n _this._batch = null;\n if (typeof baseUrl === \"string\") {\n // we need to do some extra parsing to get the parent url correct if we are\n // being created from just a string.\n var urlStr = baseUrl;\n if (util_1.Util.isUrlAbsolute(urlStr) || urlStr.lastIndexOf(\"/\") < 0) {\n _this._parentUrl = urlStr;\n _this._url = util_1.Util.combinePaths(urlStr, path);\n }\n else if (urlStr.lastIndexOf(\"/\") > urlStr.lastIndexOf(\"(\")) {\n // .../items(19)/fields\n var index = urlStr.lastIndexOf(\"/\");\n _this._parentUrl = urlStr.slice(0, index);\n path = util_1.Util.combinePaths(urlStr.slice(index), path);\n _this._url = util_1.Util.combinePaths(_this._parentUrl, path);\n }\n else {\n // .../items(19)\n var index = urlStr.lastIndexOf(\"(\");\n _this._parentUrl = urlStr.slice(0, index);\n _this._url = util_1.Util.combinePaths(urlStr, path);\n }\n }\n else {\n var q = baseUrl;\n _this._parentUrl = q._url;\n _this._options = q._options;\n var target = q._query.get(\"@target\");\n if (target !== null) {\n _this._query.add(\"@target\", target);\n }\n _this._url = util_1.Util.combinePaths(_this._parentUrl, path);\n }\n return _this;\n }\n /**\n * Blocks a batch call from occuring, MUST be cleared by calling the returned function\n */\n SharePointQueryable.prototype.addBatchDependency = function () {\n if (this.hasBatch) {\n return this._batch.addDependency();\n }\n return function () { return null; };\n };\n Object.defineProperty(SharePointQueryable.prototype, \"hasBatch\", {\n /**\n * Indicates if the current query has a batch associated\n *\n */\n get: function () {\n return this._batch !== null;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(SharePointQueryable.prototype, \"batch\", {\n /**\n * The batch currently associated with this query or null\n *\n */\n get: function () {\n return this.hasBatch ? this._batch : null;\n },\n enumerable: true,\n configurable: true\n });\n /**\n * Creates a new instance of the supplied factory and extends this into that new instance\n *\n * @param factory constructor for the new SharePointQueryable\n */\n SharePointQueryable.prototype.as = function (factory) {\n var o = new factory(this._url, null);\n return util_1.Util.extend(o, this, true);\n };\n /**\n * Adds this query to the supplied batch\n *\n * @example\n * ```\n *\n * let b = pnp.sp.createBatch();\n * pnp.sp.web.inBatch(b).get().then(...);\n * b.execute().then(...)\n * ```\n */\n SharePointQueryable.prototype.inBatch = function (batch) {\n if (this._batch !== null) {\n throw new exceptions_1.AlreadyInBatchException();\n }\n this._batch = batch;\n return this;\n };\n /**\n * Gets the full url with query information\n *\n */\n SharePointQueryable.prototype.toUrlAndQuery = function () {\n var aliasedParams = new collections_1.Dictionary();\n var url = this.toUrl().replace(/'!(@.*?)::(.*?)'/ig, function (match, labelName, value) {\n logging_1.Logger.write(\"Rewriting aliased parameter from match \" + match + \" to label: \" + labelName + \" value: \" + value, logging_1.LogLevel.Verbose);\n aliasedParams.add(labelName, \"'\" + value + \"'\");\n return labelName;\n });\n // inlude our explicitly set query string params\n aliasedParams.merge(this._query);\n if (aliasedParams.count() > 0) {\n url += \"?\" + aliasedParams.getKeys().map(function (key) { return key + \"=\" + aliasedParams.get(key); }).join(\"&\");\n }\n return url;\n };\n /**\n * Gets a parent for this instance as specified\n *\n * @param factory The contructor for the class to create\n */\n SharePointQueryable.prototype.getParent = function (factory, baseUrl, path, batch) {\n if (baseUrl === void 0) { baseUrl = this.parentUrl; }\n var parent = new factory(baseUrl, path);\n parent.configure(this._options);\n var target = this.query.get(\"@target\");\n if (target !== null) {\n parent.query.add(\"@target\", target);\n }\n if (typeof batch !== \"undefined\") {\n parent = parent.inBatch(batch);\n }\n return parent;\n };\n /**\n * Clones this SharePointQueryable into a new SharePointQueryable instance of T\n * @param factory Constructor used to create the new instance\n * @param additionalPath Any additional path to include in the clone\n * @param includeBatch If true this instance's batch will be added to the cloned instance\n */\n SharePointQueryable.prototype.clone = function (factory, additionalPath, includeBatch) {\n if (includeBatch === void 0) { includeBatch = true; }\n var clone = new factory(this, additionalPath);\n var target = this.query.get(\"@target\");\n if (target !== null) {\n clone.query.add(\"@target\", target);\n }\n if (includeBatch && this.hasBatch) {\n clone = clone.inBatch(this.batch);\n }\n return clone;\n };\n /**\n * Converts the current instance to a request context\n *\n * @param verb The request verb\n * @param options The set of supplied request options\n * @param parser The supplied ODataParser instance\n * @param pipeline Optional request processing pipeline\n */\n SharePointQueryable.prototype.toRequestContext = function (verb, options, parser, pipeline) {\n var _this = this;\n if (options === void 0) { options = {}; }\n if (pipeline === void 0) { pipeline = pipeline_1.PipelineMethods.default; }\n var dependencyDispose = this.hasBatch ? this.addBatchDependency() : function () { return; };\n return util_1.Util.toAbsoluteUrl(this.toUrlAndQuery()).then(function (url) {\n utils_1.mergeOptions(options, _this._options);\n // build our request context\n var context = {\n batch: _this._batch,\n batchDependency: dependencyDispose,\n cachingOptions: _this._cachingOptions,\n clientFactory: function () { return new httpclient_1.HttpClient(); },\n isBatched: _this.hasBatch,\n isCached: _this._useCaching,\n options: options,\n parser: parser,\n pipeline: pipeline,\n requestAbsoluteUrl: url,\n requestId: util_1.Util.getGUID(),\n verb: verb,\n };\n return context;\n });\n };\n return SharePointQueryable;\n}(queryable_1.ODataQueryable));\nexports.SharePointQueryable = SharePointQueryable;\n/**\n * Represents a REST collection which can be filtered, paged, and selected\n *\n */\nvar SharePointQueryableCollection = /** @class */ (function (_super) {\n __extends(SharePointQueryableCollection, _super);\n function SharePointQueryableCollection() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n /**\n * Filters the returned collection (https://msdn.microsoft.com/en-us/library/office/fp142385.aspx#bk_supported)\n *\n * @param filter The string representing the filter query\n */\n SharePointQueryableCollection.prototype.filter = function (filter) {\n this._query.add(\"$filter\", filter);\n return this;\n };\n /**\n * Choose which fields to return\n *\n * @param selects One or more fields to return\n */\n SharePointQueryableCollection.prototype.select = function () {\n var selects = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n selects[_i] = arguments[_i];\n }\n if (selects.length > 0) {\n this._query.add(\"$select\", selects.join(\",\"));\n }\n return this;\n };\n /**\n * Expands fields such as lookups to get additional data\n *\n * @param expands The Fields for which to expand the values\n */\n SharePointQueryableCollection.prototype.expand = function () {\n var expands = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n expands[_i] = arguments[_i];\n }\n if (expands.length > 0) {\n this._query.add(\"$expand\", expands.join(\",\"));\n }\n return this;\n };\n /**\n * Orders based on the supplied fields ascending\n *\n * @param orderby The name of the field to sort on\n * @param ascending If false DESC is appended, otherwise ASC (default)\n */\n SharePointQueryableCollection.prototype.orderBy = function (orderBy, ascending) {\n if (ascending === void 0) { ascending = true; }\n var keys = this._query.getKeys();\n var query = [];\n var asc = ascending ? \" asc\" : \" desc\";\n for (var i = 0; i < keys.length; i++) {\n if (keys[i] === \"$orderby\") {\n query.push(this._query.get(\"$orderby\"));\n break;\n }\n }\n query.push(\"\" + orderBy + asc);\n this._query.add(\"$orderby\", query.join(\",\"));\n return this;\n };\n /**\n * Skips the specified number of items\n *\n * @param skip The number of items to skip\n */\n SharePointQueryableCollection.prototype.skip = function (skip) {\n this._query.add(\"$skip\", skip.toString());\n return this;\n };\n /**\n * Limits the query to only return the specified number of items\n *\n * @param top The query row limit\n */\n SharePointQueryableCollection.prototype.top = function (top) {\n this._query.add(\"$top\", top.toString());\n return this;\n };\n return SharePointQueryableCollection;\n}(SharePointQueryable));\nexports.SharePointQueryableCollection = SharePointQueryableCollection;\n/**\n * Represents an instance that can be selected\n *\n */\nvar SharePointQueryableInstance = /** @class */ (function (_super) {\n __extends(SharePointQueryableInstance, _super);\n function SharePointQueryableInstance() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n /**\n * Choose which fields to return\n *\n * @param selects One or more fields to return\n */\n SharePointQueryableInstance.prototype.select = function () {\n var selects = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n selects[_i] = arguments[_i];\n }\n if (selects.length > 0) {\n this._query.add(\"$select\", selects.join(\",\"));\n }\n return this;\n };\n /**\n * Expands fields such as lookups to get additional data\n *\n * @param expands The Fields for which to expand the values\n */\n SharePointQueryableInstance.prototype.expand = function () {\n var expands = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n expands[_i] = arguments[_i];\n }\n if (expands.length > 0) {\n this._query.add(\"$expand\", expands.join(\",\"));\n }\n return this;\n };\n return SharePointQueryableInstance;\n}(SharePointQueryable));\nexports.SharePointQueryableInstance = SharePointQueryableInstance;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/sharepoint/sharepointqueryable.js\n// module id = 1\n// module chunks = 0","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar fetchclient_1 = require(\"../net/fetchclient\");\nvar RuntimeConfigImpl = /** @class */ (function () {\n function RuntimeConfigImpl() {\n // these are our default values for the library\n this._defaultCachingStore = \"session\";\n this._defaultCachingTimeoutSeconds = 60;\n this._globalCacheDisable = false;\n this._enableCacheExpiration = false;\n this._cacheExpirationIntervalMilliseconds = 750;\n this._spfxContext = null;\n // sharepoint settings\n this._spFetchClientFactory = function () { return new fetchclient_1.FetchClient(); };\n this._spBaseUrl = null;\n this._spHeaders = null;\n // ms graph settings\n this._graphHeaders = null;\n this._graphFetchClientFactory = function () { return null; };\n }\n RuntimeConfigImpl.prototype.set = function (config) {\n var _this = this;\n if (config.hasOwnProperty(\"globalCacheDisable\")) {\n this._globalCacheDisable = config.globalCacheDisable;\n }\n if (config.hasOwnProperty(\"defaultCachingStore\")) {\n this._defaultCachingStore = config.defaultCachingStore;\n }\n if (config.hasOwnProperty(\"defaultCachingTimeoutSeconds\")) {\n this._defaultCachingTimeoutSeconds = config.defaultCachingTimeoutSeconds;\n }\n if (config.hasOwnProperty(\"sp\")) {\n if (config.sp.hasOwnProperty(\"fetchClientFactory\")) {\n this._spFetchClientFactory = config.sp.fetchClientFactory;\n }\n if (config.sp.hasOwnProperty(\"baseUrl\")) {\n this._spBaseUrl = config.sp.baseUrl;\n }\n if (config.sp.hasOwnProperty(\"headers\")) {\n this._spHeaders = config.sp.headers;\n }\n }\n if (config.hasOwnProperty(\"spfxContext\")) {\n this._spfxContext = config.spfxContext;\n if (typeof this._spfxContext.graphHttpClient !== \"undefined\") {\n this._graphFetchClientFactory = function () { return _this._spfxContext.graphHttpClient; };\n }\n }\n if (config.hasOwnProperty(\"graph\")) {\n if (config.graph.hasOwnProperty(\"headers\")) {\n this._graphHeaders = config.graph.headers;\n }\n // this comes after the default setting of the _graphFetchClientFactory client so it can be overwritten\n if (config.graph.hasOwnProperty(\"fetchClientFactory\")) {\n this._graphFetchClientFactory = config.graph.fetchClientFactory;\n }\n }\n if (config.hasOwnProperty(\"enableCacheExpiration\")) {\n this._enableCacheExpiration = config.enableCacheExpiration;\n }\n if (config.hasOwnProperty(\"cacheExpirationIntervalMilliseconds\")) {\n // we don't let the interval be less than 300 milliseconds\n var interval = config.cacheExpirationIntervalMilliseconds < 300 ? 300 : config.cacheExpirationIntervalMilliseconds;\n this._cacheExpirationIntervalMilliseconds = interval;\n }\n };\n Object.defineProperty(RuntimeConfigImpl.prototype, \"defaultCachingStore\", {\n get: function () {\n return this._defaultCachingStore;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(RuntimeConfigImpl.prototype, \"defaultCachingTimeoutSeconds\", {\n get: function () {\n return this._defaultCachingTimeoutSeconds;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(RuntimeConfigImpl.prototype, \"globalCacheDisable\", {\n get: function () {\n return this._globalCacheDisable;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(RuntimeConfigImpl.prototype, \"spFetchClientFactory\", {\n get: function () {\n return this._spFetchClientFactory;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(RuntimeConfigImpl.prototype, \"spBaseUrl\", {\n get: function () {\n if (this._spBaseUrl !== null) {\n return this._spBaseUrl;\n }\n else if (this._spfxContext !== null) {\n return this._spfxContext.pageContext.web.absoluteUrl;\n }\n return null;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(RuntimeConfigImpl.prototype, \"spHeaders\", {\n get: function () {\n return this._spHeaders;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(RuntimeConfigImpl.prototype, \"enableCacheExpiration\", {\n get: function () {\n return this._enableCacheExpiration;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(RuntimeConfigImpl.prototype, \"cacheExpirationIntervalMilliseconds\", {\n get: function () {\n return this._cacheExpirationIntervalMilliseconds;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(RuntimeConfigImpl.prototype, \"spfxContext\", {\n get: function () {\n return this._spfxContext;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(RuntimeConfigImpl.prototype, \"graphFetchClientFactory\", {\n get: function () {\n return this._graphFetchClientFactory;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(RuntimeConfigImpl.prototype, \"graphHeaders\", {\n get: function () {\n return this._graphHeaders;\n },\n enumerable: true,\n configurable: true\n });\n return RuntimeConfigImpl;\n}());\nexports.RuntimeConfigImpl = RuntimeConfigImpl;\nvar _runtimeConfig = new RuntimeConfigImpl();\nexports.RuntimeConfig = _runtimeConfig;\nfunction setRuntimeConfig(config) {\n _runtimeConfig.set(config);\n}\nexports.setRuntimeConfig = setRuntimeConfig;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/configuration/pnplibconfig.js\n// module id = 2\n// module chunks = 0","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\n/**\n * A set of logging levels\n *\n */\nvar LogLevel;\n(function (LogLevel) {\n LogLevel[LogLevel[\"Verbose\"] = 0] = \"Verbose\";\n LogLevel[LogLevel[\"Info\"] = 1] = \"Info\";\n LogLevel[LogLevel[\"Warning\"] = 2] = \"Warning\";\n LogLevel[LogLevel[\"Error\"] = 3] = \"Error\";\n LogLevel[LogLevel[\"Off\"] = 99] = \"Off\";\n})(LogLevel = exports.LogLevel || (exports.LogLevel = {}));\n/**\n * Class used to subscribe ILogListener and log messages throughout an application\n *\n */\nvar Logger = /** @class */ (function () {\n function Logger() {\n }\n Object.defineProperty(Logger, \"activeLogLevel\", {\n get: function () {\n return Logger.instance.activeLogLevel;\n },\n set: function (value) {\n Logger.instance.activeLogLevel = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Logger, \"instance\", {\n get: function () {\n if (typeof Logger._instance === \"undefined\" || Logger._instance === null) {\n Logger._instance = new LoggerImpl();\n }\n return Logger._instance;\n },\n enumerable: true,\n configurable: true\n });\n /**\n * Adds ILogListener instances to the set of subscribed listeners\n *\n * @param listeners One or more listeners to subscribe to this log\n */\n Logger.subscribe = function () {\n var listeners = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n listeners[_i] = arguments[_i];\n }\n listeners.map(function (listener) { return Logger.instance.subscribe(listener); });\n };\n /**\n * Clears the subscribers collection, returning the collection before modifiction\n */\n Logger.clearSubscribers = function () {\n return Logger.instance.clearSubscribers();\n };\n Object.defineProperty(Logger, \"count\", {\n /**\n * Gets the current subscriber count\n */\n get: function () {\n return Logger.instance.count;\n },\n enumerable: true,\n configurable: true\n });\n /**\n * Writes the supplied string to the subscribed listeners\n *\n * @param message The message to write\n * @param level [Optional] if supplied will be used as the level of the entry (Default: LogLevel.Verbose)\n */\n Logger.write = function (message, level) {\n if (level === void 0) { level = LogLevel.Verbose; }\n Logger.instance.log({ level: level, message: message });\n };\n /**\n * Writes the supplied string to the subscribed listeners\n *\n * @param json The json object to stringify and write\n * @param level [Optional] if supplied will be used as the level of the entry (Default: LogLevel.Verbose)\n */\n Logger.writeJSON = function (json, level) {\n if (level === void 0) { level = LogLevel.Verbose; }\n Logger.instance.log({ level: level, message: JSON.stringify(json) });\n };\n /**\n * Logs the supplied entry to the subscribed listeners\n *\n * @param entry The message to log\n */\n Logger.log = function (entry) {\n Logger.instance.log(entry);\n };\n /**\n * Logs performance tracking data for the the execution duration of the supplied function using console.profile\n *\n * @param name The name of this profile boundary\n * @param f The function to execute and track within this performance boundary\n */\n Logger.measure = function (name, f) {\n return Logger.instance.measure(name, f);\n };\n return Logger;\n}());\nexports.Logger = Logger;\nvar LoggerImpl = /** @class */ (function () {\n function LoggerImpl(activeLogLevel, subscribers) {\n if (activeLogLevel === void 0) { activeLogLevel = LogLevel.Warning; }\n if (subscribers === void 0) { subscribers = []; }\n this.activeLogLevel = activeLogLevel;\n this.subscribers = subscribers;\n }\n LoggerImpl.prototype.subscribe = function (listener) {\n this.subscribers.push(listener);\n };\n LoggerImpl.prototype.clearSubscribers = function () {\n var s = this.subscribers.slice(0);\n this.subscribers.length = 0;\n return s;\n };\n Object.defineProperty(LoggerImpl.prototype, \"count\", {\n get: function () {\n return this.subscribers.length;\n },\n enumerable: true,\n configurable: true\n });\n LoggerImpl.prototype.write = function (message, level) {\n if (level === void 0) { level = LogLevel.Verbose; }\n this.log({ level: level, message: message });\n };\n LoggerImpl.prototype.log = function (entry) {\n if (typeof entry === \"undefined\" || entry.level < this.activeLogLevel) {\n return;\n }\n this.subscribers.map(function (subscriber) { return subscriber.log(entry); });\n };\n LoggerImpl.prototype.measure = function (name, f) {\n console.profile(name);\n try {\n return f();\n }\n finally {\n console.profileEnd();\n }\n };\n return LoggerImpl;\n}());\n/**\n * Implementation of ILogListener which logs to the browser console\n *\n */\nvar ConsoleListener = /** @class */ (function () {\n function ConsoleListener() {\n }\n /**\n * Any associated data that a given logging listener may choose to log or ignore\n *\n * @param entry The information to be logged\n */\n ConsoleListener.prototype.log = function (entry) {\n var msg = this.format(entry);\n switch (entry.level) {\n case LogLevel.Verbose:\n case LogLevel.Info:\n console.log(msg);\n break;\n case LogLevel.Warning:\n console.warn(msg);\n break;\n case LogLevel.Error:\n console.error(msg);\n break;\n }\n };\n /**\n * Formats the message\n *\n * @param entry The information to format into a string\n */\n ConsoleListener.prototype.format = function (entry) {\n var msg = [];\n msg.push(\"Message: \" + entry.message);\n if (typeof entry.data !== \"undefined\") {\n msg.push(\" Data: \" + JSON.stringify(entry.data));\n }\n return msg.join(\"\");\n };\n return ConsoleListener;\n}());\nexports.ConsoleListener = ConsoleListener;\n/**\n * Implementation of ILogListener which logs to the supplied function\n *\n */\nvar FunctionListener = /** @class */ (function () {\n /**\n * Creates a new instance of the FunctionListener class\n *\n * @constructor\n * @param method The method to which any logging data will be passed\n */\n function FunctionListener(method) {\n this.method = method;\n }\n /**\n * Any associated data that a given logging listener may choose to log or ignore\n *\n * @param entry The information to be logged\n */\n FunctionListener.prototype.log = function (entry) {\n this.method(entry);\n };\n return FunctionListener;\n}());\nexports.FunctionListener = FunctionListener;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/utils/logging.js\n// module id = 3\n// module chunks = 0","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar logging_1 = require(\"../utils/logging\");\nfunction defaultLog(error) {\n logging_1.Logger.log({ data: {}, level: logging_1.LogLevel.Error, message: \"[\" + error.name + \"]::\" + error.message });\n}\n/**\n * Represents an exception with an HttpClient request\n *\n */\nvar ProcessHttpClientResponseException = /** @class */ (function (_super) {\n __extends(ProcessHttpClientResponseException, _super);\n function ProcessHttpClientResponseException(status, statusText, data) {\n var _this = _super.call(this, \"Error making HttpClient request in queryable: [\" + status + \"] \" + statusText) || this;\n _this.status = status;\n _this.statusText = statusText;\n _this.data = data;\n _this.name = \"ProcessHttpClientResponseException\";\n logging_1.Logger.log({ data: _this.data, level: logging_1.LogLevel.Error, message: _this.message });\n return _this;\n }\n return ProcessHttpClientResponseException;\n}(Error));\nexports.ProcessHttpClientResponseException = ProcessHttpClientResponseException;\nvar NoCacheAvailableException = /** @class */ (function (_super) {\n __extends(NoCacheAvailableException, _super);\n function NoCacheAvailableException(msg) {\n if (msg === void 0) { msg = \"Cannot create a caching configuration provider since cache is not available.\"; }\n var _this = _super.call(this, msg) || this;\n _this.name = \"NoCacheAvailableException\";\n defaultLog(_this);\n return _this;\n }\n return NoCacheAvailableException;\n}(Error));\nexports.NoCacheAvailableException = NoCacheAvailableException;\nvar APIUrlException = /** @class */ (function (_super) {\n __extends(APIUrlException, _super);\n function APIUrlException(msg) {\n if (msg === void 0) { msg = \"Unable to determine API url.\"; }\n var _this = _super.call(this, msg) || this;\n _this.name = \"APIUrlException\";\n defaultLog(_this);\n return _this;\n }\n return APIUrlException;\n}(Error));\nexports.APIUrlException = APIUrlException;\nvar AuthUrlException = /** @class */ (function (_super) {\n __extends(AuthUrlException, _super);\n function AuthUrlException(data, msg) {\n if (msg === void 0) { msg = \"Auth URL Endpoint could not be determined from data. Data logged.\"; }\n var _this = _super.call(this, msg) || this;\n _this.name = \"APIUrlException\";\n logging_1.Logger.log({ data: data, level: logging_1.LogLevel.Error, message: _this.message });\n return _this;\n }\n return AuthUrlException;\n}(Error));\nexports.AuthUrlException = AuthUrlException;\nvar NodeFetchClientUnsupportedException = /** @class */ (function (_super) {\n __extends(NodeFetchClientUnsupportedException, _super);\n function NodeFetchClientUnsupportedException(msg) {\n if (msg === void 0) { msg = \"Using NodeFetchClient in the browser is not supported.\"; }\n var _this = _super.call(this, msg) || this;\n _this.name = \"NodeFetchClientUnsupportedException\";\n defaultLog(_this);\n return _this;\n }\n return NodeFetchClientUnsupportedException;\n}(Error));\nexports.NodeFetchClientUnsupportedException = NodeFetchClientUnsupportedException;\nvar SPRequestExecutorUndefinedException = /** @class */ (function (_super) {\n __extends(SPRequestExecutorUndefinedException, _super);\n function SPRequestExecutorUndefinedException() {\n var _this = this;\n var msg = [\n \"SP.RequestExecutor is undefined. \",\n \"Load the SP.RequestExecutor.js library (/_layouts/15/SP.RequestExecutor.js) before loading the PnP JS Core library.\",\n ].join(\" \");\n _this = _super.call(this, msg) || this;\n _this.name = \"SPRequestExecutorUndefinedException\";\n defaultLog(_this);\n return _this;\n }\n return SPRequestExecutorUndefinedException;\n}(Error));\nexports.SPRequestExecutorUndefinedException = SPRequestExecutorUndefinedException;\nvar MaxCommentLengthException = /** @class */ (function (_super) {\n __extends(MaxCommentLengthException, _super);\n function MaxCommentLengthException(msg) {\n if (msg === void 0) { msg = \"The maximum comment length is 1023 characters.\"; }\n var _this = _super.call(this, msg) || this;\n _this.name = \"MaxCommentLengthException\";\n defaultLog(_this);\n return _this;\n }\n return MaxCommentLengthException;\n}(Error));\nexports.MaxCommentLengthException = MaxCommentLengthException;\nvar NotSupportedInBatchException = /** @class */ (function (_super) {\n __extends(NotSupportedInBatchException, _super);\n function NotSupportedInBatchException(operation) {\n if (operation === void 0) { operation = \"This operation\"; }\n var _this = _super.call(this, operation + \" is not supported as part of a batch.\") || this;\n _this.name = \"NotSupportedInBatchException\";\n defaultLog(_this);\n return _this;\n }\n return NotSupportedInBatchException;\n}(Error));\nexports.NotSupportedInBatchException = NotSupportedInBatchException;\nvar ODataIdException = /** @class */ (function (_super) {\n __extends(ODataIdException, _super);\n function ODataIdException(data, msg) {\n if (msg === void 0) { msg = \"Could not extract odata id in object, you may be using nometadata. Object data logged to logger.\"; }\n var _this = _super.call(this, msg) || this;\n _this.name = \"ODataIdException\";\n logging_1.Logger.log({ data: data, level: logging_1.LogLevel.Error, message: _this.message });\n return _this;\n }\n return ODataIdException;\n}(Error));\nexports.ODataIdException = ODataIdException;\nvar BatchParseException = /** @class */ (function (_super) {\n __extends(BatchParseException, _super);\n function BatchParseException(msg) {\n var _this = _super.call(this, msg) || this;\n _this.name = \"BatchParseException\";\n defaultLog(_this);\n return _this;\n }\n return BatchParseException;\n}(Error));\nexports.BatchParseException = BatchParseException;\nvar AlreadyInBatchException = /** @class */ (function (_super) {\n __extends(AlreadyInBatchException, _super);\n function AlreadyInBatchException(msg) {\n if (msg === void 0) { msg = \"This query is already part of a batch.\"; }\n var _this = _super.call(this, msg) || this;\n _this.name = \"AlreadyInBatchException\";\n defaultLog(_this);\n return _this;\n }\n return AlreadyInBatchException;\n}(Error));\nexports.AlreadyInBatchException = AlreadyInBatchException;\nvar FunctionExpectedException = /** @class */ (function (_super) {\n __extends(FunctionExpectedException, _super);\n function FunctionExpectedException(msg) {\n if (msg === void 0) { msg = \"This query is already part of a batch.\"; }\n var _this = _super.call(this, msg) || this;\n _this.name = \"FunctionExpectedException\";\n defaultLog(_this);\n return _this;\n }\n return FunctionExpectedException;\n}(Error));\nexports.FunctionExpectedException = FunctionExpectedException;\nvar UrlException = /** @class */ (function (_super) {\n __extends(UrlException, _super);\n function UrlException(msg) {\n var _this = _super.call(this, msg) || this;\n _this.name = \"UrlException\";\n defaultLog(_this);\n return _this;\n }\n return UrlException;\n}(Error));\nexports.UrlException = UrlException;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/utils/exceptions.js\n// module id = 4\n// module chunks = 0","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar util_1 = require(\"../utils/util\");\nvar collections_1 = require(\"../collections/collections\");\nvar graphclient_1 = require(\"../net/graphclient\");\nvar queryable_1 = require(\"../odata/queryable\");\nvar pipeline_1 = require(\"../request/pipeline\");\n/**\n * Queryable Base Class\n *\n */\nvar GraphQueryable = /** @class */ (function (_super) {\n __extends(GraphQueryable, _super);\n /**\n * Creates a new instance of the Queryable class\n *\n * @constructor\n * @param baseUrl A string or Queryable that should form the base part of the url\n *\n */\n function GraphQueryable(baseUrl, path) {\n var _this = _super.call(this) || this;\n _this._query = new collections_1.Dictionary();\n if (typeof baseUrl === \"string\") {\n var urlStr = baseUrl;\n _this._parentUrl = urlStr;\n _this._url = util_1.Util.combinePaths(urlStr, path);\n }\n else {\n var q = baseUrl;\n _this._parentUrl = q._url;\n _this._url = util_1.Util.combinePaths(_this._parentUrl, path);\n }\n return _this;\n }\n /**\n * Creates a new instance of the supplied factory and extends this into that new instance\n *\n * @param factory constructor for the new queryable\n */\n GraphQueryable.prototype.as = function (factory) {\n var o = new factory(this._url, null);\n return util_1.Util.extend(o, this, true);\n };\n /**\n * Gets the full url with query information\n *\n */\n GraphQueryable.prototype.toUrlAndQuery = function () {\n var _this = this;\n return this.toUrl() + (\"?\" + this._query.getKeys().map(function (key) { return key + \"=\" + _this._query.get(key); }).join(\"&\"));\n };\n /**\n * Gets a parent for this instance as specified\n *\n * @param factory The contructor for the class to create\n */\n GraphQueryable.prototype.getParent = function (factory, baseUrl, path) {\n if (baseUrl === void 0) { baseUrl = this.parentUrl; }\n return new factory(baseUrl, path);\n };\n /**\n * Clones this queryable into a new queryable instance of T\n * @param factory Constructor used to create the new instance\n * @param additionalPath Any additional path to include in the clone\n * @param includeBatch If true this instance's batch will be added to the cloned instance\n */\n GraphQueryable.prototype.clone = function (factory, additionalPath, includeBatch) {\n if (includeBatch === void 0) { includeBatch = true; }\n // TODO:: include batching info in clone\n if (includeBatch) {\n return new factory(this, additionalPath);\n }\n return new factory(this, additionalPath);\n };\n /**\n * Converts the current instance to a request context\n *\n * @param verb The request verb\n * @param options The set of supplied request options\n * @param parser The supplied ODataParser instance\n * @param pipeline Optional request processing pipeline\n */\n GraphQueryable.prototype.toRequestContext = function (verb, options, parser, pipeline) {\n if (options === void 0) { options = {}; }\n if (pipeline === void 0) { pipeline = pipeline_1.PipelineMethods.default; }\n // TODO:: add batch support\n return Promise.resolve({\n batch: null,\n batchDependency: function () { return void (0); },\n cachingOptions: this._cachingOptions,\n clientFactory: function () { return new graphclient_1.GraphHttpClient(); },\n isBatched: false,\n isCached: this._useCaching,\n options: options,\n parser: parser,\n pipeline: pipeline,\n requestAbsoluteUrl: this.toUrlAndQuery(),\n requestId: util_1.Util.getGUID(),\n verb: verb,\n });\n };\n return GraphQueryable;\n}(queryable_1.ODataQueryable));\nexports.GraphQueryable = GraphQueryable;\n/**\n * Represents a REST collection which can be filtered, paged, and selected\n *\n */\nvar GraphQueryableCollection = /** @class */ (function (_super) {\n __extends(GraphQueryableCollection, _super);\n function GraphQueryableCollection() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n /**\n *\n * @param filter The string representing the filter query\n */\n GraphQueryableCollection.prototype.filter = function (filter) {\n this._query.add(\"$filter\", filter);\n return this;\n };\n /**\n * Choose which fields to return\n *\n * @param selects One or more fields to return\n */\n GraphQueryableCollection.prototype.select = function () {\n var selects = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n selects[_i] = arguments[_i];\n }\n if (selects.length > 0) {\n this._query.add(\"$select\", selects.join(\",\"));\n }\n return this;\n };\n /**\n * Expands fields such as lookups to get additional data\n *\n * @param expands The Fields for which to expand the values\n */\n GraphQueryableCollection.prototype.expand = function () {\n var expands = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n expands[_i] = arguments[_i];\n }\n if (expands.length > 0) {\n this._query.add(\"$expand\", expands.join(\",\"));\n }\n return this;\n };\n /**\n * Orders based on the supplied fields ascending\n *\n * @param orderby The name of the field to sort on\n * @param ascending If false DESC is appended, otherwise ASC (default)\n */\n GraphQueryableCollection.prototype.orderBy = function (orderBy, ascending) {\n if (ascending === void 0) { ascending = true; }\n var keys = this._query.getKeys();\n var query = [];\n var asc = ascending ? \" asc\" : \" desc\";\n for (var i = 0; i < keys.length; i++) {\n if (keys[i] === \"$orderby\") {\n query.push(this._query.get(\"$orderby\"));\n break;\n }\n }\n query.push(\"\" + orderBy + asc);\n this._query.add(\"$orderby\", query.join(\",\"));\n return this;\n };\n /**\n * Limits the query to only return the specified number of items\n *\n * @param top The query row limit\n */\n GraphQueryableCollection.prototype.top = function (top) {\n this._query.add(\"$top\", top.toString());\n return this;\n };\n /**\n * Skips a set number of items in the return set\n *\n * @param num Number of items to skip\n */\n GraphQueryableCollection.prototype.skip = function (num) {\n this._query.add(\"$top\", num.toString());\n return this;\n };\n /**\n * \tTo request second and subsequent pages of Graph data\n */\n GraphQueryableCollection.prototype.skipToken = function (token) {\n this._query.add(\"$skiptoken\", token);\n return this;\n };\n Object.defineProperty(GraphQueryableCollection.prototype, \"count\", {\n /**\n * \tRetrieves the total count of matching resources\n */\n get: function () {\n this._query.add(\"$count\", \"true\");\n return this;\n },\n enumerable: true,\n configurable: true\n });\n return GraphQueryableCollection;\n}(GraphQueryable));\nexports.GraphQueryableCollection = GraphQueryableCollection;\nvar GraphQueryableSearchableCollection = /** @class */ (function (_super) {\n __extends(GraphQueryableSearchableCollection, _super);\n function GraphQueryableSearchableCollection() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n /**\n * \tTo request second and subsequent pages of Graph data\n */\n GraphQueryableSearchableCollection.prototype.search = function (query) {\n this._query.add(\"$search\", query);\n return this;\n };\n return GraphQueryableSearchableCollection;\n}(GraphQueryableCollection));\nexports.GraphQueryableSearchableCollection = GraphQueryableSearchableCollection;\n/**\n * Represents an instance that can be selected\n *\n */\nvar GraphQueryableInstance = /** @class */ (function (_super) {\n __extends(GraphQueryableInstance, _super);\n function GraphQueryableInstance() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n /**\n * Choose which fields to return\n *\n * @param selects One or more fields to return\n */\n GraphQueryableInstance.prototype.select = function () {\n var selects = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n selects[_i] = arguments[_i];\n }\n if (selects.length > 0) {\n this._query.add(\"$select\", selects.join(\",\"));\n }\n return this;\n };\n /**\n * Expands fields such as lookups to get additional data\n *\n * @param expands The Fields for which to expand the values\n */\n GraphQueryableInstance.prototype.expand = function () {\n var expands = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n expands[_i] = arguments[_i];\n }\n if (expands.length > 0) {\n this._query.add(\"$expand\", expands.join(\",\"));\n }\n return this;\n };\n return GraphQueryableInstance;\n}(GraphQueryable));\nexports.GraphQueryableInstance = GraphQueryableInstance;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/graph/graphqueryable.js\n// module id = 5\n// module chunks = 0","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar util_1 = require(\"../utils/util\");\nvar logging_1 = require(\"../utils/logging\");\nvar exceptions_1 = require(\"../utils/exceptions\");\nvar core_1 = require(\"../odata/core\");\nfunction spExtractODataId(candidate) {\n if (candidate.hasOwnProperty(\"odata.id\")) {\n return candidate[\"odata.id\"];\n }\n else if (candidate.hasOwnProperty(\"__metadata\") && candidate.__metadata.hasOwnProperty(\"id\")) {\n return candidate.__metadata.id;\n }\n else {\n throw new exceptions_1.ODataIdException(candidate);\n }\n}\nexports.spExtractODataId = spExtractODataId;\nvar SPODataEntityParserImpl = /** @class */ (function (_super) {\n __extends(SPODataEntityParserImpl, _super);\n function SPODataEntityParserImpl(factory) {\n var _this = _super.call(this) || this;\n _this.factory = factory;\n return _this;\n }\n SPODataEntityParserImpl.prototype.parse = function (r) {\n var _this = this;\n return _super.prototype.parse.call(this, r).then(function (d) {\n var o = new _this.factory(spGetEntityUrl(d), null);\n return util_1.Util.extend(o, d);\n });\n };\n return SPODataEntityParserImpl;\n}(core_1.ODataParserBase));\nvar SPODataEntityArrayParserImpl = /** @class */ (function (_super) {\n __extends(SPODataEntityArrayParserImpl, _super);\n function SPODataEntityArrayParserImpl(factory) {\n var _this = _super.call(this) || this;\n _this.factory = factory;\n return _this;\n }\n SPODataEntityArrayParserImpl.prototype.parse = function (r) {\n var _this = this;\n return _super.prototype.parse.call(this, r).then(function (d) {\n return d.map(function (v) {\n var o = new _this.factory(spGetEntityUrl(v), null);\n return util_1.Util.extend(o, v);\n });\n });\n };\n return SPODataEntityArrayParserImpl;\n}(core_1.ODataParserBase));\nfunction spGetEntityUrl(entity) {\n if (entity.hasOwnProperty(\"odata.metadata\") && entity.hasOwnProperty(\"odata.editLink\")) {\n // we are dealign with minimal metadata (default)\n return util_1.Util.combinePaths(util_1.extractWebUrl(entity[\"odata.metadata\"]), \"_api\", entity[\"odata.editLink\"]);\n }\n else if (entity.hasOwnProperty(\"__metadata\")) {\n // we are dealing with verbose, which has an absolute uri\n return entity.__metadata.uri;\n }\n else {\n // we are likely dealing with nometadata, so don't error but we won't be able to\n // chain off these objects\n logging_1.Logger.write(\"No uri information found in ODataEntity parsing, chaining will fail for this object.\", logging_1.LogLevel.Warning);\n return \"\";\n }\n}\nexports.spGetEntityUrl = spGetEntityUrl;\nfunction spODataEntity(factory) {\n return new SPODataEntityParserImpl(factory);\n}\nexports.spODataEntity = spODataEntity;\nfunction spODataEntityArray(factory) {\n return new SPODataEntityArrayParserImpl(factory);\n}\nexports.spODataEntityArray = spODataEntityArray;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/sharepoint/odata.js\n// module id = 6\n// module chunks = 0","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar core_1 = require(\"./core\");\nvar util_1 = require(\"../utils/util\");\nvar ODataDefaultParser = /** @class */ (function (_super) {\n __extends(ODataDefaultParser, _super);\n function ODataDefaultParser() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n return ODataDefaultParser;\n}(core_1.ODataParserBase));\nexports.ODataDefaultParser = ODataDefaultParser;\nvar ODataValueParserImpl = /** @class */ (function (_super) {\n __extends(ODataValueParserImpl, _super);\n function ODataValueParserImpl() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n ODataValueParserImpl.prototype.parse = function (r) {\n return _super.prototype.parse.call(this, r).then(function (d) { return d; });\n };\n return ODataValueParserImpl;\n}(core_1.ODataParserBase));\nfunction ODataValue() {\n return new ODataValueParserImpl();\n}\nexports.ODataValue = ODataValue;\nvar ODataRawParserImpl = /** @class */ (function () {\n function ODataRawParserImpl() {\n }\n ODataRawParserImpl.prototype.parse = function (r) {\n return r.json();\n };\n return ODataRawParserImpl;\n}());\nexports.ODataRawParserImpl = ODataRawParserImpl;\nexports.ODataRaw = new ODataRawParserImpl();\nvar TextFileParser = /** @class */ (function () {\n function TextFileParser() {\n }\n TextFileParser.prototype.parse = function (r) {\n return r.text();\n };\n return TextFileParser;\n}());\nexports.TextFileParser = TextFileParser;\nvar BlobFileParser = /** @class */ (function () {\n function BlobFileParser() {\n }\n BlobFileParser.prototype.parse = function (r) {\n return r.blob();\n };\n return BlobFileParser;\n}());\nexports.BlobFileParser = BlobFileParser;\nvar JSONFileParser = /** @class */ (function () {\n function JSONFileParser() {\n }\n JSONFileParser.prototype.parse = function (r) {\n return r.json();\n };\n return JSONFileParser;\n}());\nexports.JSONFileParser = JSONFileParser;\nvar BufferFileParser = /** @class */ (function () {\n function BufferFileParser() {\n }\n BufferFileParser.prototype.parse = function (r) {\n if (util_1.Util.isFunction(r.arrayBuffer)) {\n return r.arrayBuffer();\n }\n return r.buffer();\n };\n return BufferFileParser;\n}());\nexports.BufferFileParser = BufferFileParser;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/odata/parsers.js\n// module id = 7\n// module chunks = 0","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\n/**\n * Generic dictionary\n */\nvar Dictionary = /** @class */ (function () {\n /**\n * Creates a new instance of the Dictionary class\n *\n * @constructor\n */\n function Dictionary(keys, values) {\n if (keys === void 0) { keys = []; }\n if (values === void 0) { values = []; }\n this.keys = keys;\n this.values = values;\n }\n /**\n * Gets a value from the collection using the specified key\n *\n * @param key The key whose value we want to return, returns null if the key does not exist\n */\n Dictionary.prototype.get = function (key) {\n var index = this.keys.indexOf(key);\n if (index < 0) {\n return null;\n }\n return this.values[index];\n };\n /**\n * Adds the supplied key and value to the dictionary\n *\n * @param key The key to add\n * @param o The value to add\n */\n Dictionary.prototype.add = function (key, o) {\n var index = this.keys.indexOf(key);\n if (index > -1) {\n this.values[index] = o;\n }\n else {\n this.keys.push(key);\n this.values.push(o);\n }\n };\n /**\n * Merges the supplied typed hash into this dictionary instance. Existing values are updated and new ones are created as appropriate.\n */\n Dictionary.prototype.merge = function (source) {\n var _this = this;\n if (\"getKeys\" in source) {\n var sourceAsDictionary_1 = source;\n sourceAsDictionary_1.getKeys().map(function (key) {\n _this.add(key, sourceAsDictionary_1.get(key));\n });\n }\n else {\n var sourceAsHash = source;\n for (var key in sourceAsHash) {\n if (sourceAsHash.hasOwnProperty(key)) {\n this.add(key, sourceAsHash[key]);\n }\n }\n }\n };\n /**\n * Removes a value from the dictionary\n *\n * @param key The key of the key/value pair to remove. Returns null if the key was not found.\n */\n Dictionary.prototype.remove = function (key) {\n var index = this.keys.indexOf(key);\n if (index < 0) {\n return null;\n }\n var val = this.values[index];\n this.keys.splice(index, 1);\n this.values.splice(index, 1);\n return val;\n };\n /**\n * Returns all the keys currently in the dictionary as an array\n */\n Dictionary.prototype.getKeys = function () {\n return this.keys;\n };\n /**\n * Returns all the values currently in the dictionary as an array\n */\n Dictionary.prototype.getValues = function () {\n return this.values;\n };\n /**\n * Clears the current dictionary\n */\n Dictionary.prototype.clear = function () {\n this.keys = [];\n this.values = [];\n };\n /**\n * Gets a count of the items currently in the dictionary\n */\n Dictionary.prototype.count = function () {\n return this.keys.length;\n };\n return Dictionary;\n}());\nexports.Dictionary = Dictionary;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/collections/collections.js\n// module id = 8\n// module chunks = 0","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar util_1 = require(\"../utils/util\");\nfunction mergeOptions(target, source) {\n target.headers = target.headers || {};\n var headers = util_1.Util.extend(target.headers, source.headers);\n target = util_1.Util.extend(target, source);\n target.headers = headers;\n}\nexports.mergeOptions = mergeOptions;\nfunction mergeHeaders(target, source) {\n if (typeof source !== \"undefined\" && source !== null) {\n var temp = new Request(\"\", { headers: source });\n temp.headers.forEach(function (value, name) {\n target.append(name, value);\n });\n }\n}\nexports.mergeHeaders = mergeHeaders;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/net/utils.js\n// module id = 9\n// module chunks = 0","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar sharepointqueryable_1 = require(\"./sharepointqueryable\");\nvar lists_1 = require(\"./lists\");\nvar fields_1 = require(\"./fields\");\nvar navigation_1 = require(\"./navigation\");\nvar sitegroups_1 = require(\"./sitegroups\");\nvar contenttypes_1 = require(\"./contenttypes\");\nvar folders_1 = require(\"./folders\");\nvar roles_1 = require(\"./roles\");\nvar files_1 = require(\"./files\");\nvar util_1 = require(\"../utils/util\");\nvar lists_2 = require(\"./lists\");\nvar siteusers_1 = require(\"./siteusers\");\nvar usercustomactions_1 = require(\"./usercustomactions\");\nvar odata_1 = require(\"./odata\");\nvar batch_1 = require(\"./batch\");\nvar features_1 = require(\"./features\");\nvar sharepointqueryableshareable_1 = require(\"./sharepointqueryableshareable\");\nvar relateditems_1 = require(\"./relateditems\");\n/**\n * Describes a collection of webs\n *\n */\nvar Webs = /** @class */ (function (_super) {\n __extends(Webs, _super);\n /**\n * Creates a new instance of the Webs class\n *\n * @param baseUrl The url or SharePointQueryable which forms the parent of this web collection\n */\n function Webs(baseUrl, webPath) {\n if (webPath === void 0) { webPath = \"webs\"; }\n return _super.call(this, baseUrl, webPath) || this;\n }\n /**\n * Adds a new web to the collection\n *\n * @param title The new web's title\n * @param url The new web's relative url\n * @param description The new web's description\n * @param template The new web's template internal name (default = STS)\n * @param language The locale id that specifies the new web's language (default = 1033 [English, US])\n * @param inheritPermissions When true, permissions will be inherited from the new web's parent (default = true)\n */\n Webs.prototype.add = function (title, url, description, template, language, inheritPermissions) {\n if (description === void 0) { description = \"\"; }\n if (template === void 0) { template = \"STS\"; }\n if (language === void 0) { language = 1033; }\n if (inheritPermissions === void 0) { inheritPermissions = true; }\n var props = {\n Description: description,\n Language: language,\n Title: title,\n Url: url,\n UseSamePermissionsAsParentSite: inheritPermissions,\n WebTemplate: template,\n };\n var postBody = JSON.stringify({\n \"parameters\": util_1.Util.extend({\n \"__metadata\": { \"type\": \"SP.WebCreationInformation\" },\n }, props),\n });\n return this.clone(Webs, \"add\").postCore({ body: postBody }).then(function (data) {\n return {\n data: data,\n web: new Web(odata_1.spExtractODataId(data).replace(/_api\\/web\\/?/i, \"\")),\n };\n });\n };\n return Webs;\n}(sharepointqueryable_1.SharePointQueryableCollection));\nexports.Webs = Webs;\n/**\n * Describes a collection of web infos\n *\n */\nvar WebInfos = /** @class */ (function (_super) {\n __extends(WebInfos, _super);\n /**\n * Creates a new instance of the WebInfos class\n *\n * @param baseUrl The url or SharePointQueryable which forms the parent of this web infos collection\n */\n function WebInfos(baseUrl, webPath) {\n if (webPath === void 0) { webPath = \"webinfos\"; }\n return _super.call(this, baseUrl, webPath) || this;\n }\n return WebInfos;\n}(sharepointqueryable_1.SharePointQueryableCollection));\nexports.WebInfos = WebInfos;\n/**\n * Describes a web\n *\n */\nvar Web = /** @class */ (function (_super) {\n __extends(Web, _super);\n /**\n * Creates a new instance of the Web class\n *\n * @param baseUrl The url or SharePointQueryable which forms the parent of this web\n */\n function Web(baseUrl, path) {\n if (path === void 0) { path = \"_api/web\"; }\n return _super.call(this, baseUrl, path) || this;\n }\n /**\n * Creates a new web instance from the given url by indexing the location of the /_api/\n * segment. If this is not found the method creates a new web with the entire string as\n * supplied.\n *\n * @param url\n */\n Web.fromUrl = function (url, path) {\n return new Web(util_1.extractWebUrl(url), path);\n };\n Object.defineProperty(Web.prototype, \"webs\", {\n /**\n * Gets this web's subwebs\n *\n */\n get: function () {\n return new Webs(this);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Web.prototype, \"webinfos\", {\n /**\n * Gets a collection of WebInfos for this web's subwebs\n *\n */\n get: function () {\n return new WebInfos(this);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Web.prototype, \"contentTypes\", {\n /**\n * Gets the content types available in this web\n *\n */\n get: function () {\n return new contenttypes_1.ContentTypes(this);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Web.prototype, \"lists\", {\n /**\n * Gets the lists in this web\n *\n */\n get: function () {\n return new lists_1.Lists(this);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Web.prototype, \"fields\", {\n /**\n * Gets the fields in this web\n *\n */\n get: function () {\n return new fields_1.Fields(this);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Web.prototype, \"features\", {\n /**\n * Gets the active features for this web\n *\n */\n get: function () {\n return new features_1.Features(this);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Web.prototype, \"availablefields\", {\n /**\n * Gets the available fields in this web\n *\n */\n get: function () {\n return new fields_1.Fields(this, \"availablefields\");\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Web.prototype, \"navigation\", {\n /**\n * Gets the navigation options in this web\n *\n */\n get: function () {\n return new navigation_1.Navigation(this);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Web.prototype, \"siteUsers\", {\n /**\n * Gets the site users\n *\n */\n get: function () {\n return new siteusers_1.SiteUsers(this);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Web.prototype, \"siteGroups\", {\n /**\n * Gets the site groups\n *\n */\n get: function () {\n return new sitegroups_1.SiteGroups(this);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Web.prototype, \"currentUser\", {\n /**\n * Gets the current user\n */\n get: function () {\n return new siteusers_1.CurrentUser(this);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Web.prototype, \"folders\", {\n /**\n * Gets the top-level folders in this web\n *\n */\n get: function () {\n return new folders_1.Folders(this);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Web.prototype, \"userCustomActions\", {\n /**\n * Gets all user custom actions for this web\n *\n */\n get: function () {\n return new usercustomactions_1.UserCustomActions(this);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Web.prototype, \"roleDefinitions\", {\n /**\n * Gets the collection of RoleDefinition resources\n *\n */\n get: function () {\n return new roles_1.RoleDefinitions(this);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Web.prototype, \"relatedItems\", {\n /**\n * Provides an interface to manage related items\n *\n */\n get: function () {\n return relateditems_1.RelatedItemManagerImpl.FromUrl(this.toUrl());\n },\n enumerable: true,\n configurable: true\n });\n /**\n * Creates a new batch for requests within the context of this web\n *\n */\n Web.prototype.createBatch = function () {\n return new batch_1.ODataBatch(this.parentUrl);\n };\n Object.defineProperty(Web.prototype, \"rootFolder\", {\n /**\n * Gets the root folder of this web\n *\n */\n get: function () {\n return new folders_1.Folder(this, \"rootFolder\");\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Web.prototype, \"associatedOwnerGroup\", {\n /**\n * Gets the associated owner group for this web\n *\n */\n get: function () {\n return new sitegroups_1.SiteGroup(this, \"associatedownergroup\");\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Web.prototype, \"associatedMemberGroup\", {\n /**\n * Gets the associated member group for this web\n *\n */\n get: function () {\n return new sitegroups_1.SiteGroup(this, \"associatedmembergroup\");\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Web.prototype, \"associatedVisitorGroup\", {\n /**\n * Gets the associated visitor group for this web\n *\n */\n get: function () {\n return new sitegroups_1.SiteGroup(this, \"associatedvisitorgroup\");\n },\n enumerable: true,\n configurable: true\n });\n /**\n * Gets a folder by server relative url\n *\n * @param folderRelativeUrl The server relative path to the folder (including /sites/ if applicable)\n */\n Web.prototype.getFolderByServerRelativeUrl = function (folderRelativeUrl) {\n return new folders_1.Folder(this, \"getFolderByServerRelativeUrl('\" + folderRelativeUrl + \"')\");\n };\n /**\n * Gets a file by server relative url\n *\n * @param fileRelativeUrl The server relative path to the file (including /sites/ if applicable)\n */\n Web.prototype.getFileByServerRelativeUrl = function (fileRelativeUrl) {\n return new files_1.File(this, \"getFileByServerRelativeUrl('\" + fileRelativeUrl + \"')\");\n };\n /**\n * Gets a list by server relative url (list's root folder)\n *\n * @param listRelativeUrl The server relative path to the list's root folder (including /sites/ if applicable)\n */\n Web.prototype.getList = function (listRelativeUrl) {\n return new lists_2.List(this, \"getList('\" + listRelativeUrl + \"')\");\n };\n /**\n * Updates this web instance with the supplied properties\n *\n * @param properties A plain object hash of values to update for the web\n */\n Web.prototype.update = function (properties) {\n var _this = this;\n var postBody = JSON.stringify(util_1.Util.extend({\n \"__metadata\": { \"type\": \"SP.Web\" },\n }, properties));\n return this.postCore({\n body: postBody,\n headers: {\n \"X-HTTP-Method\": \"MERGE\",\n },\n }).then(function (data) {\n return {\n data: data,\n web: _this,\n };\n });\n };\n /**\n * Deletes this web\n *\n */\n Web.prototype.delete = function () {\n return _super.prototype.deleteCore.call(this);\n };\n /**\n * Applies the theme specified by the contents of each of the files specified in the arguments to the site\n *\n * @param colorPaletteUrl The server-relative URL of the color palette file\n * @param fontSchemeUrl The server-relative URL of the font scheme\n * @param backgroundImageUrl The server-relative URL of the background image\n * @param shareGenerated When true, the generated theme files are stored in the root site. When false, they are stored in this web\n */\n Web.prototype.applyTheme = function (colorPaletteUrl, fontSchemeUrl, backgroundImageUrl, shareGenerated) {\n var postBody = JSON.stringify({\n backgroundImageUrl: backgroundImageUrl,\n colorPaletteUrl: colorPaletteUrl,\n fontSchemeUrl: fontSchemeUrl,\n shareGenerated: shareGenerated,\n });\n return this.clone(Web, \"applytheme\").postCore({ body: postBody });\n };\n /**\n * Applies the specified site definition or site template to the Web site that has no template applied to it\n *\n * @param template Name of the site definition or the name of the site template\n */\n Web.prototype.applyWebTemplate = function (template) {\n var q = this.clone(Web, \"applywebtemplate\");\n q.concat(\"(@t)\");\n q.query.add(\"@t\", template);\n return q.postCore();\n };\n /**\n * Checks whether the specified login name belongs to a valid user in the web. If the user doesn't exist, adds the user to the web.\n *\n * @param loginName The login name of the user (ex: i:0#.f|membership|user@domain.onmicrosoft.com)\n */\n Web.prototype.ensureUser = function (loginName) {\n var postBody = JSON.stringify({\n logonName: loginName,\n });\n return this.clone(Web, \"ensureuser\").postCore({ body: postBody }).then(function (data) {\n return {\n data: data,\n user: new siteusers_1.SiteUser(odata_1.spExtractODataId(data)),\n };\n });\n };\n /**\n * Returns a collection of site templates available for the site\n *\n * @param language The locale id of the site templates to retrieve (default = 1033 [English, US])\n * @param includeCrossLanguage When true, includes language-neutral site templates; otherwise false (default = true)\n */\n Web.prototype.availableWebTemplates = function (language, includeCrossLanugage) {\n if (language === void 0) { language = 1033; }\n if (includeCrossLanugage === void 0) { includeCrossLanugage = true; }\n return new sharepointqueryable_1.SharePointQueryableCollection(this, \"getavailablewebtemplates(lcid=\" + language + \", doincludecrosslanguage=\" + includeCrossLanugage + \")\");\n };\n /**\n * Returns the list gallery on the site\n *\n * @param type The gallery type - WebTemplateCatalog = 111, WebPartCatalog = 113 ListTemplateCatalog = 114,\n * MasterPageCatalog = 116, SolutionCatalog = 121, ThemeCatalog = 123, DesignCatalog = 124, AppDataCatalog = 125\n */\n Web.prototype.getCatalog = function (type) {\n return this.clone(Web, \"getcatalog(\" + type + \")\").select(\"Id\").get().then(function (data) {\n return new lists_2.List(odata_1.spExtractODataId(data));\n });\n };\n /**\n * Returns the collection of changes from the change log that have occurred within the list, based on the specified query\n *\n * @param query The change query\n */\n Web.prototype.getChanges = function (query) {\n var postBody = JSON.stringify({ \"query\": util_1.Util.extend({ \"__metadata\": { \"type\": \"SP.ChangeQuery\" } }, query) });\n return this.clone(Web, \"getchanges\").postCore({ body: postBody });\n };\n Object.defineProperty(Web.prototype, \"customListTemplate\", {\n /**\n * Gets the custom list templates for the site\n *\n */\n get: function () {\n return new sharepointqueryable_1.SharePointQueryableCollection(this, \"getcustomlisttemplates\");\n },\n enumerable: true,\n configurable: true\n });\n /**\n * Returns the user corresponding to the specified member identifier for the current site\n *\n * @param id The id of the user\n */\n Web.prototype.getUserById = function (id) {\n return new siteusers_1.SiteUser(this, \"getUserById(\" + id + \")\");\n };\n /**\n * Returns the name of the image file for the icon that is used to represent the specified file\n *\n * @param filename The file name. If this parameter is empty, the server returns an empty string\n * @param size The size of the icon: 16x16 pixels = 0, 32x32 pixels = 1 (default = 0)\n * @param progId The ProgID of the application that was used to create the file, in the form OLEServerName.ObjectName\n */\n Web.prototype.mapToIcon = function (filename, size, progId) {\n if (size === void 0) { size = 0; }\n if (progId === void 0) { progId = \"\"; }\n return this.clone(Web, \"maptoicon(filename='\" + filename + \"', progid='\" + progId + \"', size=\" + size + \")\").get();\n };\n return Web;\n}(sharepointqueryableshareable_1.SharePointQueryableShareableWeb));\nexports.Web = Web;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/sharepoint/webs.js\n// module id = 10\n// module chunks = 0","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar util_1 = require(\"../utils/util\");\nvar webs_1 = require(\"./webs\");\nvar odata_1 = require(\"./odata\");\nvar sharepointqueryable_1 = require(\"./sharepointqueryable\");\nvar sharepointqueryablesecurable_1 = require(\"./sharepointqueryablesecurable\");\nvar types_1 = require(\"./types\");\n/**\n * Internal helper class used to augment classes to include sharing functionality\n */\nvar SharePointQueryableShareable = /** @class */ (function (_super) {\n __extends(SharePointQueryableShareable, _super);\n function SharePointQueryableShareable() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n /**\n * Gets a sharing link for the supplied\n *\n * @param kind The kind of link to share\n * @param expiration The optional expiration for this link\n */\n SharePointQueryableShareable.prototype.getShareLink = function (kind, expiration) {\n if (expiration === void 0) { expiration = null; }\n // date needs to be an ISO string or null\n var expString = expiration !== null ? expiration.toISOString() : null;\n // clone using the factory and send the request\n return this.clone(SharePointQueryableShareable, \"shareLink\").postAsCore({\n body: JSON.stringify({\n request: {\n createLink: true,\n emailData: null,\n settings: {\n expiration: expString,\n linkKind: kind,\n },\n },\n }),\n });\n };\n /**\n * Shares this instance with the supplied users\n *\n * @param loginNames Resolved login names to share\n * @param role The role\n * @param requireSignin True to require the user is authenticated, otherwise false\n * @param propagateAcl True to apply this share to all children\n * @param emailData If supplied an email will be sent with the indicated properties\n */\n SharePointQueryableShareable.prototype.shareWith = function (loginNames, role, requireSignin, propagateAcl, emailData) {\n var _this = this;\n if (requireSignin === void 0) { requireSignin = false; }\n if (propagateAcl === void 0) { propagateAcl = false; }\n // handle the multiple input types\n if (!Array.isArray(loginNames)) {\n loginNames = [loginNames];\n }\n var userStr = JSON.stringify(loginNames.map(function (login) { return { Key: login }; }));\n var roleFilter = role === types_1.SharingRole.Edit ? types_1.RoleType.Contributor : types_1.RoleType.Reader;\n // start by looking up the role definition id we need to set the roleValue\n return webs_1.Web.fromUrl(this.toUrl()).roleDefinitions.select(\"Id\").filter(\"RoleTypeKind eq \" + roleFilter).get().then(function (def) {\n if (!Array.isArray(def) || def.length < 1) {\n throw new Error(\"Could not locate a role defintion with RoleTypeKind \" + roleFilter);\n }\n var postBody = {\n includeAnonymousLinkInEmail: requireSignin,\n peoplePickerInput: userStr,\n propagateAcl: propagateAcl,\n roleValue: \"role:\" + def[0].Id,\n useSimplifiedRoles: true,\n };\n if (typeof emailData !== \"undefined\") {\n postBody = util_1.Util.extend(postBody, {\n emailBody: emailData.body,\n emailSubject: typeof emailData.subject !== \"undefined\" ? emailData.subject : \"\",\n sendEmail: true,\n });\n }\n return _this.clone(SharePointQueryableShareable, \"shareObject\").postAsCore({\n body: JSON.stringify(postBody),\n });\n });\n };\n /**\n * Shares an object based on the supplied options\n *\n * @param options The set of options to send to the ShareObject method\n * @param bypass If true any processing is skipped and the options are sent directly to the ShareObject method\n */\n SharePointQueryableShareable.prototype.shareObject = function (options, bypass) {\n var _this = this;\n if (bypass === void 0) { bypass = false; }\n if (bypass) {\n // if the bypass flag is set send the supplied parameters directly to the service\n return this.sendShareObjectRequest(options);\n }\n // extend our options with some defaults\n options = util_1.Util.extend(options, {\n group: null,\n includeAnonymousLinkInEmail: false,\n propagateAcl: false,\n useSimplifiedRoles: true,\n }, true);\n return this.getRoleValue(options.role, options.group).then(function (roleValue) {\n // handle the multiple input types\n if (!Array.isArray(options.loginNames)) {\n options.loginNames = [options.loginNames];\n }\n var userStr = JSON.stringify(options.loginNames.map(function (login) { return { Key: login }; }));\n var postBody = {\n peoplePickerInput: userStr,\n roleValue: roleValue,\n url: options.url,\n };\n if (typeof options.emailData !== \"undefined\" && options.emailData !== null) {\n postBody = util_1.Util.extend(postBody, {\n emailBody: options.emailData.body,\n emailSubject: typeof options.emailData.subject !== \"undefined\" ? options.emailData.subject : \"Shared with you.\",\n sendEmail: true,\n });\n }\n return _this.sendShareObjectRequest(postBody);\n });\n };\n /**\n * Calls the web's UnshareObject method\n *\n * @param url The url of the object to unshare\n */\n SharePointQueryableShareable.prototype.unshareObjectWeb = function (url) {\n return this.clone(SharePointQueryableShareable, \"unshareObject\").postAsCore({\n body: JSON.stringify({\n url: url,\n }),\n });\n };\n /**\n * Checks Permissions on the list of Users and returns back role the users have on the Item.\n *\n * @param recipients The array of Entities for which Permissions need to be checked.\n */\n SharePointQueryableShareable.prototype.checkPermissions = function (recipients) {\n return this.clone(SharePointQueryableShareable, \"checkPermissions\").postAsCore({\n body: JSON.stringify({\n recipients: recipients,\n }),\n });\n };\n /**\n * Get Sharing Information.\n *\n * @param request The SharingInformationRequest Object.\n */\n SharePointQueryableShareable.prototype.getSharingInformation = function (request) {\n if (request === void 0) { request = null; }\n return this.clone(SharePointQueryableShareable, \"getSharingInformation\").postAsCore({\n body: JSON.stringify({\n request: request,\n }),\n });\n };\n /**\n * Gets the sharing settings of an item.\n *\n * @param useSimplifiedRoles Determines whether to use simplified roles.\n */\n SharePointQueryableShareable.prototype.getObjectSharingSettings = function (useSimplifiedRoles) {\n if (useSimplifiedRoles === void 0) { useSimplifiedRoles = true; }\n return this.clone(SharePointQueryableShareable, \"getObjectSharingSettings\").postAsCore({\n body: JSON.stringify({\n useSimplifiedRoles: useSimplifiedRoles,\n }),\n });\n };\n /**\n * Unshares this object\n */\n SharePointQueryableShareable.prototype.unshareObject = function () {\n return this.clone(SharePointQueryableShareable, \"unshareObject\").postAsCore();\n };\n /**\n * Deletes a link by type\n *\n * @param kind Deletes a sharing link by the kind of link\n */\n SharePointQueryableShareable.prototype.deleteLinkByKind = function (kind) {\n return this.clone(SharePointQueryableShareable, \"deleteLinkByKind\").postCore({\n body: JSON.stringify({ linkKind: kind }),\n });\n };\n /**\n * Removes the specified link to the item.\n *\n * @param kind The kind of link to be deleted.\n * @param shareId\n */\n SharePointQueryableShareable.prototype.unshareLink = function (kind, shareId) {\n if (shareId === void 0) { shareId = \"00000000-0000-0000-0000-000000000000\"; }\n return this.clone(SharePointQueryableShareable, \"unshareLink\").postCore({\n body: JSON.stringify({ linkKind: kind, shareId: shareId }),\n });\n };\n /**\n * Calculates the roleValue string used in the sharing query\n *\n * @param role The Sharing Role\n * @param group The Group type\n */\n SharePointQueryableShareable.prototype.getRoleValue = function (role, group) {\n // we will give group precedence, because we had to make a choice\n if (typeof group !== \"undefined\" && group !== null) {\n switch (group) {\n case types_1.RoleType.Contributor:\n return webs_1.Web.fromUrl(this.toUrl()).associatedMemberGroup.select(\"Id\").getAs().then(function (g) { return \"group: \" + g.Id; });\n case types_1.RoleType.Reader:\n case types_1.RoleType.Guest:\n return webs_1.Web.fromUrl(this.toUrl()).associatedVisitorGroup.select(\"Id\").getAs().then(function (g) { return \"group: \" + g.Id; });\n default:\n throw new Error(\"Could not determine role value for supplied value. Contributor, Reader, and Guest are supported\");\n }\n }\n else {\n var roleFilter = role === types_1.SharingRole.Edit ? types_1.RoleType.Contributor : types_1.RoleType.Reader;\n return webs_1.Web.fromUrl(this.toUrl()).roleDefinitions.select(\"Id\").top(1).filter(\"RoleTypeKind eq \" + roleFilter).getAs().then(function (def) {\n if (def.length < 1) {\n throw new Error(\"Could not locate associated role definition for supplied role. Edit and View are supported\");\n }\n return \"role: \" + def[0].Id;\n });\n }\n };\n SharePointQueryableShareable.prototype.getShareObjectWeb = function (candidate) {\n return Promise.resolve(webs_1.Web.fromUrl(candidate, \"/_api/SP.Web.ShareObject\"));\n };\n SharePointQueryableShareable.prototype.sendShareObjectRequest = function (options) {\n return this.getShareObjectWeb(this.toUrl()).then(function (web) {\n return web.expand(\"UsersWithAccessRequests\", \"GroupsSharedWith\").as(SharePointQueryableShareable).postCore({\n body: JSON.stringify(options),\n });\n });\n };\n return SharePointQueryableShareable;\n}(sharepointqueryable_1.SharePointQueryable));\nexports.SharePointQueryableShareable = SharePointQueryableShareable;\nvar SharePointQueryableShareableWeb = /** @class */ (function (_super) {\n __extends(SharePointQueryableShareableWeb, _super);\n function SharePointQueryableShareableWeb() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n /**\n * Shares this web with the supplied users\n * @param loginNames The resolved login names to share\n * @param role The role to share this web\n * @param emailData Optional email data\n */\n SharePointQueryableShareableWeb.prototype.shareWith = function (loginNames, role, emailData) {\n var _this = this;\n if (role === void 0) { role = types_1.SharingRole.View; }\n var dependency = this.addBatchDependency();\n return webs_1.Web.fromUrl(this.toUrl(), \"/_api/web/url\").get().then(function (url) {\n dependency();\n return _this.shareObject(util_1.Util.combinePaths(url, \"/_layouts/15/aclinv.aspx?forSharing=1&mbypass=1\"), loginNames, role, emailData);\n });\n };\n /**\n * Provides direct access to the static web.ShareObject method\n *\n * @param url The url to share\n * @param loginNames Resolved loginnames string[] of a single login name string\n * @param roleValue Role value\n * @param emailData Optional email data\n * @param groupId Optional group id\n * @param propagateAcl\n * @param includeAnonymousLinkInEmail\n * @param useSimplifiedRoles\n */\n SharePointQueryableShareableWeb.prototype.shareObject = function (url, loginNames, role, emailData, group, propagateAcl, includeAnonymousLinkInEmail, useSimplifiedRoles) {\n if (propagateAcl === void 0) { propagateAcl = false; }\n if (includeAnonymousLinkInEmail === void 0) { includeAnonymousLinkInEmail = false; }\n if (useSimplifiedRoles === void 0) { useSimplifiedRoles = true; }\n return this.clone(SharePointQueryableShareable, null).shareObject({\n emailData: emailData,\n group: group,\n includeAnonymousLinkInEmail: includeAnonymousLinkInEmail,\n loginNames: loginNames,\n propagateAcl: propagateAcl,\n role: role,\n url: url,\n useSimplifiedRoles: useSimplifiedRoles,\n });\n };\n /**\n * Supplies a method to pass any set of arguments to ShareObject\n *\n * @param options The set of options to send to ShareObject\n */\n SharePointQueryableShareableWeb.prototype.shareObjectRaw = function (options) {\n return this.clone(SharePointQueryableShareable, null).shareObject(options, true);\n };\n /**\n * Unshares the object\n *\n * @param url The url of the object to stop sharing\n */\n SharePointQueryableShareableWeb.prototype.unshareObject = function (url) {\n return this.clone(SharePointQueryableShareable, null).unshareObjectWeb(url);\n };\n return SharePointQueryableShareableWeb;\n}(sharepointqueryablesecurable_1.SharePointQueryableSecurable));\nexports.SharePointQueryableShareableWeb = SharePointQueryableShareableWeb;\nvar SharePointQueryableShareableItem = /** @class */ (function (_super) {\n __extends(SharePointQueryableShareableItem, _super);\n function SharePointQueryableShareableItem() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n /**\n * Gets a link suitable for sharing for this item\n *\n * @param kind The type of link to share\n * @param expiration The optional expiration date\n */\n SharePointQueryableShareableItem.prototype.getShareLink = function (kind, expiration) {\n if (kind === void 0) { kind = types_1.SharingLinkKind.OrganizationView; }\n if (expiration === void 0) { expiration = null; }\n return this.clone(SharePointQueryableShareable, null).getShareLink(kind, expiration);\n };\n /**\n * Shares this item with one or more users\n *\n * @param loginNames string or string[] of resolved login names to which this item will be shared\n * @param role The role (View | Edit) applied to the share\n * @param emailData Optional, if inlucded an email will be sent. Note subject currently has no effect.\n */\n SharePointQueryableShareableItem.prototype.shareWith = function (loginNames, role, requireSignin, emailData) {\n if (role === void 0) { role = types_1.SharingRole.View; }\n if (requireSignin === void 0) { requireSignin = false; }\n return this.clone(SharePointQueryableShareable, null).shareWith(loginNames, role, requireSignin, false, emailData);\n };\n /**\n * Checks Permissions on the list of Users and returns back role the users have on the Item.\n *\n * @param recipients The array of Entities for which Permissions need to be checked.\n */\n SharePointQueryableShareableItem.prototype.checkSharingPermissions = function (recipients) {\n return this.clone(SharePointQueryableShareable, null).checkPermissions(recipients);\n };\n /**\n * Get Sharing Information.\n *\n * @param request The SharingInformationRequest Object.\n */\n SharePointQueryableShareableItem.prototype.getSharingInformation = function (request) {\n if (request === void 0) { request = null; }\n return this.clone(SharePointQueryableShareable, null).getSharingInformation(request);\n };\n /**\n * Gets the sharing settings of an item.\n *\n * @param useSimplifiedRoles Determines whether to use simplified roles.\n */\n SharePointQueryableShareableItem.prototype.getObjectSharingSettings = function (useSimplifiedRoles) {\n if (useSimplifiedRoles === void 0) { useSimplifiedRoles = true; }\n return this.clone(SharePointQueryableShareable, null).getObjectSharingSettings(useSimplifiedRoles);\n };\n /**\n * Unshare this item\n */\n SharePointQueryableShareableItem.prototype.unshare = function () {\n return this.clone(SharePointQueryableShareable, null).unshareObject();\n };\n /**\n * Deletes a sharing link by kind\n *\n * @param kind Deletes a sharing link by the kind of link\n */\n SharePointQueryableShareableItem.prototype.deleteSharingLinkByKind = function (kind) {\n return this.clone(SharePointQueryableShareable, null).deleteLinkByKind(kind);\n };\n /**\n * Removes the specified link to the item.\n *\n * @param kind The kind of link to be deleted.\n * @param shareId\n */\n SharePointQueryableShareableItem.prototype.unshareLink = function (kind, shareId) {\n return this.clone(SharePointQueryableShareable, null).unshareLink(kind, shareId);\n };\n return SharePointQueryableShareableItem;\n}(sharepointqueryablesecurable_1.SharePointQueryableSecurable));\nexports.SharePointQueryableShareableItem = SharePointQueryableShareableItem;\nvar FileFolderShared = /** @class */ (function (_super) {\n __extends(FileFolderShared, _super);\n function FileFolderShared() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n /**\n * Gets a link suitable for sharing\n *\n * @param kind The kind of link to get\n * @param expiration Optional, an expiration for this link\n */\n FileFolderShared.prototype.getShareLink = function (kind, expiration) {\n if (kind === void 0) { kind = types_1.SharingLinkKind.OrganizationView; }\n if (expiration === void 0) { expiration = null; }\n var dependency = this.addBatchDependency();\n return this.getShareable().then(function (shareable) {\n dependency();\n return shareable.getShareLink(kind, expiration);\n });\n };\n /**\n * Checks Permissions on the list of Users and returns back role the users have on the Item.\n *\n * @param recipients The array of Entities for which Permissions need to be checked.\n */\n FileFolderShared.prototype.checkSharingPermissions = function (recipients) {\n var dependency = this.addBatchDependency();\n return this.getShareable().then(function (shareable) {\n dependency();\n return shareable.checkPermissions(recipients);\n });\n };\n /**\n * Get Sharing Information.\n *\n * @param request The SharingInformationRequest Object.\n */\n FileFolderShared.prototype.getSharingInformation = function (request) {\n if (request === void 0) { request = null; }\n var dependency = this.addBatchDependency();\n return this.getShareable().then(function (shareable) {\n dependency();\n return shareable.getSharingInformation(request);\n });\n };\n /**\n * Gets the sharing settings of an item.\n *\n * @param useSimplifiedRoles Determines whether to use simplified roles.\n */\n FileFolderShared.prototype.getObjectSharingSettings = function (useSimplifiedRoles) {\n if (useSimplifiedRoles === void 0) { useSimplifiedRoles = true; }\n var dependency = this.addBatchDependency();\n return this.getShareable().then(function (shareable) {\n dependency();\n return shareable.getObjectSharingSettings(useSimplifiedRoles);\n });\n };\n /**\n * Unshare this item\n */\n FileFolderShared.prototype.unshare = function () {\n var dependency = this.addBatchDependency();\n return this.getShareable().then(function (shareable) {\n dependency();\n return shareable.unshareObject();\n });\n };\n /**\n * Deletes a sharing link by the kind of link\n *\n * @param kind The kind of link to be deleted.\n */\n FileFolderShared.prototype.deleteSharingLinkByKind = function (kind) {\n var dependency = this.addBatchDependency();\n return this.getShareable().then(function (shareable) {\n dependency();\n return shareable.deleteLinkByKind(kind);\n });\n };\n /**\n * Removes the specified link to the item.\n *\n * @param kind The kind of link to be deleted.\n * @param shareId The share id to delete\n */\n FileFolderShared.prototype.unshareLink = function (kind, shareId) {\n var dependency = this.addBatchDependency();\n return this.getShareable().then(function (shareable) {\n dependency();\n return shareable.unshareLink(kind, shareId);\n });\n };\n /**\n * For files and folders we need to use the associated item end point\n */\n FileFolderShared.prototype.getShareable = function () {\n var _this = this;\n // sharing only works on the item end point, not the file one - so we create a folder instance with the item url internally\n return this.clone(SharePointQueryableShareableFile, \"listItemAllFields\", false).select(\"odata.editlink\").get().then(function (d) {\n var shareable = new SharePointQueryableShareable(odata_1.spGetEntityUrl(d));\n // we need to handle batching\n if (_this.hasBatch) {\n shareable = shareable.inBatch(_this.batch);\n }\n return shareable;\n });\n };\n return FileFolderShared;\n}(sharepointqueryable_1.SharePointQueryableInstance));\nexports.FileFolderShared = FileFolderShared;\nvar SharePointQueryableShareableFile = /** @class */ (function (_super) {\n __extends(SharePointQueryableShareableFile, _super);\n function SharePointQueryableShareableFile() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n /**\n * Shares this item with one or more users\n *\n * @param loginNames string or string[] of resolved login names to which this item will be shared\n * @param role The role (View | Edit) applied to the share\n * @param shareEverything Share everything in this folder, even items with unique permissions.\n * @param requireSignin If true the user must signin to view link, otherwise anyone with the link can access the resource\n * @param emailData Optional, if inlucded an email will be sent. Note subject currently has no effect.\n */\n SharePointQueryableShareableFile.prototype.shareWith = function (loginNames, role, requireSignin, emailData) {\n if (role === void 0) { role = types_1.SharingRole.View; }\n if (requireSignin === void 0) { requireSignin = false; }\n var dependency = this.addBatchDependency();\n return this.getShareable().then(function (shareable) {\n dependency();\n return shareable.shareWith(loginNames, role, requireSignin, false, emailData);\n });\n };\n return SharePointQueryableShareableFile;\n}(FileFolderShared));\nexports.SharePointQueryableShareableFile = SharePointQueryableShareableFile;\nvar SharePointQueryableShareableFolder = /** @class */ (function (_super) {\n __extends(SharePointQueryableShareableFolder, _super);\n function SharePointQueryableShareableFolder() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n /**\n * Shares this item with one or more users\n *\n * @param loginNames string or string[] of resolved login names to which this item will be shared\n * @param role The role (View | Edit) applied to the share\n * @param shareEverything Share everything in this folder, even items with unique permissions.\n * @param requireSignin If true the user must signin to view link, otherwise anyone with the link can access the resource\n * @param emailData Optional, if inlucded an email will be sent. Note subject currently has no effect.\n */\n SharePointQueryableShareableFolder.prototype.shareWith = function (loginNames, role, requireSignin, shareEverything, emailData) {\n if (role === void 0) { role = types_1.SharingRole.View; }\n if (requireSignin === void 0) { requireSignin = false; }\n if (shareEverything === void 0) { shareEverything = false; }\n var dependency = this.addBatchDependency();\n return this.getShareable().then(function (shareable) {\n dependency();\n return shareable.shareWith(loginNames, role, requireSignin, shareEverything, emailData);\n });\n };\n return SharePointQueryableShareableFolder;\n}(FileFolderShared));\nexports.SharePointQueryableShareableFolder = SharePointQueryableShareableFolder;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/sharepoint/sharepointqueryableshareable.js\n// module id = 11\n// module chunks = 0","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar sharepointqueryable_1 = require(\"./sharepointqueryable\");\nvar parsers_1 = require(\"../odata/parsers\");\nvar util_1 = require(\"../utils/util\");\nvar exceptions_1 = require(\"../utils/exceptions\");\nvar webparts_1 = require(\"./webparts\");\nvar items_1 = require(\"./items\");\nvar sharepointqueryableshareable_1 = require(\"./sharepointqueryableshareable\");\nvar odata_1 = require(\"./odata\");\n/**\n * Describes a collection of File objects\n *\n */\nvar Files = /** @class */ (function (_super) {\n __extends(Files, _super);\n /**\n * Creates a new instance of the Files class\n *\n * @param baseUrl The url or SharePointQueryable which forms the parent of this fields collection\n */\n function Files(baseUrl, path) {\n if (path === void 0) { path = \"files\"; }\n return _super.call(this, baseUrl, path) || this;\n }\n /**\n * Gets a File by filename\n *\n * @param name The name of the file, including extension.\n */\n Files.prototype.getByName = function (name) {\n var f = new File(this);\n f.concat(\"('\" + name + \"')\");\n return f;\n };\n /**\n * Uploads a file. Not supported for batching\n *\n * @param url The folder-relative url of the file.\n * @param content The file contents blob.\n * @param shouldOverWrite Should a file with the same name in the same location be overwritten? (default: true)\n * @returns The new File and the raw response.\n */\n Files.prototype.add = function (url, content, shouldOverWrite) {\n var _this = this;\n if (shouldOverWrite === void 0) { shouldOverWrite = true; }\n return new Files(this, \"add(overwrite=\" + shouldOverWrite + \",url='\" + url + \"')\")\n .postCore({\n body: content,\n }).then(function (response) {\n return {\n data: response,\n file: _this.getByName(url),\n };\n });\n };\n /**\n * Uploads a file. Not supported for batching\n *\n * @param url The folder-relative url of the file.\n * @param content The Blob file content to add\n * @param progress A callback function which can be used to track the progress of the upload\n * @param shouldOverWrite Should a file with the same name in the same location be overwritten? (default: true)\n * @param chunkSize The size of each file slice, in bytes (default: 10485760)\n * @returns The new File and the raw response.\n */\n Files.prototype.addChunked = function (url, content, progress, shouldOverWrite, chunkSize) {\n var _this = this;\n if (shouldOverWrite === void 0) { shouldOverWrite = true; }\n if (chunkSize === void 0) { chunkSize = 10485760; }\n var adder = this.clone(Files, \"add(overwrite=\" + shouldOverWrite + \",url='\" + url + \"')\", false);\n return adder.postCore().then(function () { return _this.getByName(url); }).then(function (file) { return file.setContentChunked(content, progress, chunkSize); }).then(function (response) {\n return {\n data: response,\n file: _this.getByName(url),\n };\n });\n };\n /**\n * Adds a ghosted file to an existing list or document library. Not supported for batching.\n *\n * @param fileUrl The server-relative url where you want to save the file.\n * @param templateFileType The type of use to create the file.\n * @returns The template file that was added and the raw response.\n */\n Files.prototype.addTemplateFile = function (fileUrl, templateFileType) {\n var _this = this;\n return this.clone(Files, \"addTemplateFile(urloffile='\" + fileUrl + \"',templatefiletype=\" + templateFileType + \")\", false)\n .postCore().then(function (response) {\n return {\n data: response,\n file: _this.getByName(fileUrl),\n };\n });\n };\n return Files;\n}(sharepointqueryable_1.SharePointQueryableCollection));\nexports.Files = Files;\n/**\n * Describes a single File instance\n *\n */\nvar File = /** @class */ (function (_super) {\n __extends(File, _super);\n function File() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n Object.defineProperty(File.prototype, \"listItemAllFields\", {\n /**\n * Gets a value that specifies the list item field values for the list item corresponding to the file.\n *\n */\n get: function () {\n return new sharepointqueryable_1.SharePointQueryableCollection(this, \"listItemAllFields\");\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(File.prototype, \"versions\", {\n /**\n * Gets a collection of versions\n *\n */\n get: function () {\n return new Versions(this);\n },\n enumerable: true,\n configurable: true\n });\n /**\n * Approves the file submitted for content approval with the specified comment.\n * Only documents in lists that are enabled for content approval can be approved.\n *\n * @param comment The comment for the approval.\n */\n File.prototype.approve = function (comment) {\n if (comment === void 0) { comment = \"\"; }\n return this.clone(File, \"approve(comment='\" + comment + \"')\").postCore();\n };\n /**\n * Stops the chunk upload session without saving the uploaded data. Does not support batching.\n * If the file doesn’t already exist in the library, the partially uploaded file will be deleted.\n * Use this in response to user action (as in a request to cancel an upload) or an error or exception.\n * Use the uploadId value that was passed to the StartUpload method that started the upload session.\n * This method is currently available only on Office 365.\n *\n * @param uploadId The unique identifier of the upload session.\n */\n File.prototype.cancelUpload = function (uploadId) {\n return this.clone(File, \"cancelUpload(uploadId=guid'\" + uploadId + \"')\", false).postCore();\n };\n /**\n * Checks the file in to a document library based on the check-in type.\n *\n * @param comment A comment for the check-in. Its length must be <= 1023.\n * @param checkinType The check-in type for the file.\n */\n File.prototype.checkin = function (comment, checkinType) {\n if (comment === void 0) { comment = \"\"; }\n if (checkinType === void 0) { checkinType = CheckinType.Major; }\n if (comment.length > 1023) {\n throw new exceptions_1.MaxCommentLengthException();\n }\n return this.clone(File, \"checkin(comment='\" + comment + \"',checkintype=\" + checkinType + \")\").postCore();\n };\n /**\n * Checks out the file from a document library.\n */\n File.prototype.checkout = function () {\n return this.clone(File, \"checkout\").postCore();\n };\n /**\n * Copies the file to the destination url.\n *\n * @param url The absolute url or server relative url of the destination file path to copy to.\n * @param shouldOverWrite Should a file with the same name in the same location be overwritten?\n */\n File.prototype.copyTo = function (url, shouldOverWrite) {\n if (shouldOverWrite === void 0) { shouldOverWrite = true; }\n return this.clone(File, \"copyTo(strnewurl='\" + url + \"',boverwrite=\" + shouldOverWrite + \")\").postCore();\n };\n /**\n * Delete this file.\n *\n * @param eTag Value used in the IF-Match header, by default \"*\"\n */\n File.prototype.delete = function (eTag) {\n if (eTag === void 0) { eTag = \"*\"; }\n return this.clone(File, null).postCore({\n headers: {\n \"IF-Match\": eTag,\n \"X-HTTP-Method\": \"DELETE\",\n },\n });\n };\n /**\n * Denies approval for a file that was submitted for content approval.\n * Only documents in lists that are enabled for content approval can be denied.\n *\n * @param comment The comment for the denial.\n */\n File.prototype.deny = function (comment) {\n if (comment === void 0) { comment = \"\"; }\n if (comment.length > 1023) {\n throw new exceptions_1.MaxCommentLengthException();\n }\n return this.clone(File, \"deny(comment='\" + comment + \"')\").postCore();\n };\n /**\n * Specifies the control set used to access, modify, or add Web Parts associated with this Web Part Page and view.\n * An exception is thrown if the file is not an ASPX page.\n *\n * @param scope The WebPartsPersonalizationScope view on the Web Parts page.\n */\n File.prototype.getLimitedWebPartManager = function (scope) {\n if (scope === void 0) { scope = WebPartsPersonalizationScope.Shared; }\n return new webparts_1.LimitedWebPartManager(this, \"getLimitedWebPartManager(scope=\" + scope + \")\");\n };\n /**\n * Moves the file to the specified destination url.\n *\n * @param url The absolute url or server relative url of the destination file path to move to.\n * @param moveOperations The bitwise MoveOperations value for how to move the file.\n */\n File.prototype.moveTo = function (url, moveOperations) {\n if (moveOperations === void 0) { moveOperations = MoveOperations.Overwrite; }\n return this.clone(File, \"moveTo(newurl='\" + url + \"',flags=\" + moveOperations + \")\").postCore();\n };\n /**\n * Submits the file for content approval with the specified comment.\n *\n * @param comment The comment for the published file. Its length must be <= 1023.\n */\n File.prototype.publish = function (comment) {\n if (comment === void 0) { comment = \"\"; }\n if (comment.length > 1023) {\n throw new exceptions_1.MaxCommentLengthException();\n }\n return this.clone(File, \"publish(comment='\" + comment + \"')\").postCore();\n };\n /**\n * Moves the file to the Recycle Bin and returns the identifier of the new Recycle Bin item.\n *\n * @returns The GUID of the recycled file.\n */\n File.prototype.recycle = function () {\n return this.clone(File, \"recycle\").postCore();\n };\n /**\n * Reverts an existing checkout for the file.\n *\n */\n File.prototype.undoCheckout = function () {\n return this.clone(File, \"undoCheckout\").postCore();\n };\n /**\n * Removes the file from content approval or unpublish a major version.\n *\n * @param comment The comment for the unpublish operation. Its length must be <= 1023.\n */\n File.prototype.unpublish = function (comment) {\n if (comment === void 0) { comment = \"\"; }\n if (comment.length > 1023) {\n throw new exceptions_1.MaxCommentLengthException();\n }\n return this.clone(File, \"unpublish(comment='\" + comment + \"')\").postCore();\n };\n /**\n * Gets the contents of the file as text. Not supported in batching.\n *\n */\n File.prototype.getText = function () {\n return this.clone(File, \"$value\", false).get(new parsers_1.TextFileParser(), { headers: { \"binaryStringResponseBody\": \"true\" } });\n };\n /**\n * Gets the contents of the file as a blob, does not work in Node.js. Not supported in batching.\n *\n */\n File.prototype.getBlob = function () {\n return this.clone(File, \"$value\", false).get(new parsers_1.BlobFileParser(), { headers: { \"binaryStringResponseBody\": \"true\" } });\n };\n /**\n * Gets the contents of a file as an ArrayBuffer, works in Node.js. Not supported in batching.\n */\n File.prototype.getBuffer = function () {\n return this.clone(File, \"$value\", false).get(new parsers_1.BufferFileParser(), { headers: { \"binaryStringResponseBody\": \"true\" } });\n };\n /**\n * Gets the contents of a file as an ArrayBuffer, works in Node.js. Not supported in batching.\n */\n File.prototype.getJSON = function () {\n return this.clone(File, \"$value\", false).get(new parsers_1.JSONFileParser(), { headers: { \"binaryStringResponseBody\": \"true\" } });\n };\n /**\n * Sets the content of a file, for large files use setContentChunked. Not supported in batching.\n *\n * @param content The file content\n *\n */\n File.prototype.setContent = function (content) {\n var _this = this;\n return this.clone(File, \"$value\", false).postCore({\n body: content,\n headers: {\n \"X-HTTP-Method\": \"PUT\",\n },\n }).then(function (_) { return new File(_this); });\n };\n /**\n * Gets the associated list item for this folder, loading the default properties\n */\n File.prototype.getItem = function () {\n var selects = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n selects[_i] = arguments[_i];\n }\n var q = this.listItemAllFields;\n return q.select.apply(q, selects).get().then(function (d) {\n return util_1.Util.extend(new items_1.Item(odata_1.spGetEntityUrl(d)), d);\n });\n };\n /**\n * Sets the contents of a file using a chunked upload approach. Not supported in batching.\n *\n * @param file The file to upload\n * @param progress A callback function which can be used to track the progress of the upload\n * @param chunkSize The size of each file slice, in bytes (default: 10485760)\n */\n File.prototype.setContentChunked = function (file, progress, chunkSize) {\n if (chunkSize === void 0) { chunkSize = 10485760; }\n if (typeof progress === \"undefined\") {\n progress = function () { return null; };\n }\n var self = this;\n var fileSize = file.size;\n var blockCount = parseInt((file.size / chunkSize).toString(), 10) + ((file.size % chunkSize === 0) ? 1 : 0);\n var uploadId = util_1.Util.getGUID();\n // start the chain with the first fragment\n progress({ blockNumber: 1, chunkSize: chunkSize, currentPointer: 0, fileSize: fileSize, stage: \"starting\", totalBlocks: blockCount });\n var chain = self.startUpload(uploadId, file.slice(0, chunkSize));\n var _loop_1 = function (i) {\n chain = chain.then(function (pointer) {\n progress({ blockNumber: i, chunkSize: chunkSize, currentPointer: pointer, fileSize: fileSize, stage: \"continue\", totalBlocks: blockCount });\n return self.continueUpload(uploadId, pointer, file.slice(pointer, pointer + chunkSize));\n });\n };\n // skip the first and last blocks\n for (var i = 2; i < blockCount; i++) {\n _loop_1(i);\n }\n return chain.then(function (pointer) {\n progress({ blockNumber: blockCount, chunkSize: chunkSize, currentPointer: pointer, fileSize: fileSize, stage: \"finishing\", totalBlocks: blockCount });\n return self.finishUpload(uploadId, pointer, file.slice(pointer));\n }).then(function (_) {\n return self;\n });\n };\n /**\n * Starts a new chunk upload session and uploads the first fragment.\n * The current file content is not changed when this method completes.\n * The method is idempotent (and therefore does not change the result) as long as you use the same values for uploadId and stream.\n * The upload session ends either when you use the CancelUpload method or when you successfully\n * complete the upload session by passing the rest of the file contents through the ContinueUpload and FinishUpload methods.\n * The StartUpload and ContinueUpload methods return the size of the running total of uploaded data in bytes,\n * so you can pass those return values to subsequent uses of ContinueUpload and FinishUpload.\n * This method is currently available only on Office 365.\n *\n * @param uploadId The unique identifier of the upload session.\n * @param fragment The file contents.\n * @returns The size of the total uploaded data in bytes.\n */\n File.prototype.startUpload = function (uploadId, fragment) {\n return this.clone(File, \"startUpload(uploadId=guid'\" + uploadId + \"')\", false).postAsCore({ body: fragment }).then(function (n) { return parseFloat(n); });\n };\n /**\n * Continues the chunk upload session with an additional fragment.\n * The current file content is not changed.\n * Use the uploadId value that was passed to the StartUpload method that started the upload session.\n * This method is currently available only on Office 365.\n *\n * @param uploadId The unique identifier of the upload session.\n * @param fileOffset The size of the offset into the file where the fragment starts.\n * @param fragment The file contents.\n * @returns The size of the total uploaded data in bytes.\n */\n File.prototype.continueUpload = function (uploadId, fileOffset, fragment) {\n return this.clone(File, \"continueUpload(uploadId=guid'\" + uploadId + \"',fileOffset=\" + fileOffset + \")\", false).postAsCore({ body: fragment }).then(function (n) { return parseFloat(n); });\n };\n /**\n * Uploads the last file fragment and commits the file. The current file content is changed when this method completes.\n * Use the uploadId value that was passed to the StartUpload method that started the upload session.\n * This method is currently available only on Office 365.\n *\n * @param uploadId The unique identifier of the upload session.\n * @param fileOffset The size of the offset into the file where the fragment starts.\n * @param fragment The file contents.\n * @returns The newly uploaded file.\n */\n File.prototype.finishUpload = function (uploadId, fileOffset, fragment) {\n return this.clone(File, \"finishUpload(uploadId=guid'\" + uploadId + \"',fileOffset=\" + fileOffset + \")\", false)\n .postAsCore({ body: fragment }).then(function (response) {\n return {\n data: response,\n file: new File(response.ServerRelativeUrl),\n };\n });\n };\n return File;\n}(sharepointqueryableshareable_1.SharePointQueryableShareableFile));\nexports.File = File;\n/**\n * Describes a collection of Version objects\n *\n */\nvar Versions = /** @class */ (function (_super) {\n __extends(Versions, _super);\n /**\n * Creates a new instance of the File class\n *\n * @param baseUrl The url or SharePointQueryable which forms the parent of this fields collection\n */\n function Versions(baseUrl, path) {\n if (path === void 0) { path = \"versions\"; }\n return _super.call(this, baseUrl, path) || this;\n }\n /**\n * Gets a version by id\n *\n * @param versionId The id of the version to retrieve\n */\n Versions.prototype.getById = function (versionId) {\n var v = new Version(this);\n v.concat(\"(\" + versionId + \")\");\n return v;\n };\n /**\n * Deletes all the file version objects in the collection.\n *\n */\n Versions.prototype.deleteAll = function () {\n return new Versions(this, \"deleteAll\").postCore();\n };\n /**\n * Deletes the specified version of the file.\n *\n * @param versionId The ID of the file version to delete.\n */\n Versions.prototype.deleteById = function (versionId) {\n return this.clone(Versions, \"deleteById(vid=\" + versionId + \")\").postCore();\n };\n /**\n * Deletes the file version object with the specified version label.\n *\n * @param label The version label of the file version to delete, for example: 1.2\n */\n Versions.prototype.deleteByLabel = function (label) {\n return this.clone(Versions, \"deleteByLabel(versionlabel='\" + label + \"')\").postCore();\n };\n /**\n * Creates a new file version from the file specified by the version label.\n *\n * @param label The version label of the file version to restore, for example: 1.2\n */\n Versions.prototype.restoreByLabel = function (label) {\n return this.clone(Versions, \"restoreByLabel(versionlabel='\" + label + \"')\").postCore();\n };\n return Versions;\n}(sharepointqueryable_1.SharePointQueryableCollection));\nexports.Versions = Versions;\n/**\n * Describes a single Version instance\n *\n */\nvar Version = /** @class */ (function (_super) {\n __extends(Version, _super);\n function Version() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n /**\n * Delete a specific version of a file.\n *\n * @param eTag Value used in the IF-Match header, by default \"*\"\n */\n Version.prototype.delete = function (eTag) {\n if (eTag === void 0) { eTag = \"*\"; }\n return this.postCore({\n headers: {\n \"IF-Match\": eTag,\n \"X-HTTP-Method\": \"DELETE\",\n },\n });\n };\n return Version;\n}(sharepointqueryable_1.SharePointQueryableInstance));\nexports.Version = Version;\nvar CheckinType;\n(function (CheckinType) {\n CheckinType[CheckinType[\"Minor\"] = 0] = \"Minor\";\n CheckinType[CheckinType[\"Major\"] = 1] = \"Major\";\n CheckinType[CheckinType[\"Overwrite\"] = 2] = \"Overwrite\";\n})(CheckinType = exports.CheckinType || (exports.CheckinType = {}));\nvar WebPartsPersonalizationScope;\n(function (WebPartsPersonalizationScope) {\n WebPartsPersonalizationScope[WebPartsPersonalizationScope[\"User\"] = 0] = \"User\";\n WebPartsPersonalizationScope[WebPartsPersonalizationScope[\"Shared\"] = 1] = \"Shared\";\n})(WebPartsPersonalizationScope = exports.WebPartsPersonalizationScope || (exports.WebPartsPersonalizationScope = {}));\nvar MoveOperations;\n(function (MoveOperations) {\n MoveOperations[MoveOperations[\"Overwrite\"] = 1] = \"Overwrite\";\n MoveOperations[MoveOperations[\"AllowBrokenThickets\"] = 8] = \"AllowBrokenThickets\";\n})(MoveOperations = exports.MoveOperations || (exports.MoveOperations = {}));\nvar TemplateFileType;\n(function (TemplateFileType) {\n TemplateFileType[TemplateFileType[\"StandardPage\"] = 0] = \"StandardPage\";\n TemplateFileType[TemplateFileType[\"WikiPage\"] = 1] = \"WikiPage\";\n TemplateFileType[TemplateFileType[\"FormPage\"] = 2] = \"FormPage\";\n})(TemplateFileType = exports.TemplateFileType || (exports.TemplateFileType = {}));\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/sharepoint/files.js\n// module id = 12\n// module chunks = 0","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar exceptions_1 = require(\"../utils/exceptions\");\nvar logging_1 = require(\"../utils/logging\");\nvar ODataParserBase = /** @class */ (function () {\n function ODataParserBase() {\n }\n ODataParserBase.prototype.parse = function (r) {\n var _this = this;\n return new Promise(function (resolve, reject) {\n if (_this.handleError(r, reject)) {\n if ((r.headers.has(\"Content-Length\") && parseFloat(r.headers.get(\"Content-Length\")) === 0) || r.status === 204) {\n resolve({});\n }\n else {\n // patch to handle cases of 200 response with no or whitespace only bodies (#487 & #545)\n r.text()\n .then(function (txt) { return txt.replace(/\\s/ig, \"\").length > 0 ? JSON.parse(txt) : {}; })\n .then(function (json) { return resolve(_this.parseODataJSON(json)); })\n .catch(function (e) { return reject(e); });\n }\n }\n });\n };\n ODataParserBase.prototype.handleError = function (r, reject) {\n if (!r.ok) {\n r.json().then(function (json) {\n // include the headers as they contain diagnostic information\n var data = {\n responseBody: json,\n responseHeaders: r.headers,\n };\n reject(new exceptions_1.ProcessHttpClientResponseException(r.status, r.statusText, data));\n }).catch(function (e) {\n // we failed to read the body - possibly it is empty. Let's report the original status that caused\n // the request to fail and log the error with parsing the body if anyone needs it for debugging\n logging_1.Logger.log({\n data: e,\n level: logging_1.LogLevel.Warning,\n message: \"There was an error parsing the error response body. See data for details.\",\n });\n // include the headers as they contain diagnostic information\n var data = {\n responseBody: \"[[body not available]]\",\n responseHeaders: r.headers,\n };\n reject(new exceptions_1.ProcessHttpClientResponseException(r.status, r.statusText, data));\n });\n }\n return r.ok;\n };\n ODataParserBase.prototype.parseODataJSON = function (json) {\n var result = json;\n if (json.hasOwnProperty(\"d\")) {\n if (json.d.hasOwnProperty(\"results\")) {\n result = json.d.results;\n }\n else {\n result = json.d;\n }\n }\n else if (json.hasOwnProperty(\"value\")) {\n result = json.value;\n }\n return result;\n };\n return ODataParserBase;\n}());\nexports.ODataParserBase = ODataParserBase;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/odata/core.js\n// module id = 13\n// module chunks = 0","\"use strict\";\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar caching_1 = require(\"../odata/caching\");\nvar logging_1 = require(\"../utils/logging\");\nvar util_1 = require(\"../utils/util\");\n/**\n * Resolves the context's result value\n *\n * @param context The current context\n */\nfunction returnResult(context) {\n logging_1.Logger.log({\n data: context.result,\n level: logging_1.LogLevel.Verbose,\n message: \"[\" + context.requestId + \"] (\" + (new Date()).getTime() + \") Returning result, see data property for value.\",\n });\n return Promise.resolve(context.result);\n}\n/**\n * Sets the result on the context\n */\nfunction setResult(context, value) {\n return new Promise(function (resolve) {\n context.result = value;\n context.hasResult = true;\n resolve(context);\n });\n}\nexports.setResult = setResult;\n/**\n * Invokes the next method in the provided context's pipeline\n *\n * @param c The current request context\n */\nfunction next(c) {\n if (c.pipeline.length < 1) {\n return Promise.resolve(c);\n }\n return c.pipeline.shift()(c);\n}\n/**\n * Executes the current request context's pipeline\n *\n * @param context Current context\n */\nfunction pipe(context) {\n return next(context)\n .then(function (ctx) { return returnResult(ctx); })\n .catch(function (e) {\n logging_1.Logger.log({\n data: e,\n level: logging_1.LogLevel.Error,\n message: \"Error in request pipeline: \" + e.message,\n });\n throw e;\n });\n}\nexports.pipe = pipe;\n/**\n * decorator factory applied to methods in the pipeline to control behavior\n */\nfunction requestPipelineMethod(alwaysRun) {\n if (alwaysRun === void 0) { alwaysRun = false; }\n return function (target, propertyKey, descriptor) {\n var method = descriptor.value;\n descriptor.value = function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n // if we have a result already in the pipeline, pass it along and don't call the tagged method\n if (!alwaysRun && args.length > 0 && args[0].hasOwnProperty(\"hasResult\") && args[0].hasResult) {\n logging_1.Logger.write(\"[\" + args[0].requestId + \"] (\" + (new Date()).getTime() + \") Skipping request pipeline method \" + propertyKey + \", existing result in pipeline.\", logging_1.LogLevel.Verbose);\n return Promise.resolve(args[0]);\n }\n // apply the tagged method\n logging_1.Logger.write(\"[\" + args[0].requestId + \"] (\" + (new Date()).getTime() + \") Calling request pipeline method \" + propertyKey + \".\", logging_1.LogLevel.Verbose);\n // then chain the next method in the context's pipeline - allows for dynamic pipeline\n return method.apply(target, args).then(function (ctx) { return next(ctx); });\n };\n };\n}\nexports.requestPipelineMethod = requestPipelineMethod;\n/**\n * Contains the methods used within the request pipeline\n */\nvar PipelineMethods = /** @class */ (function () {\n function PipelineMethods() {\n }\n /**\n * Logs the start of the request\n */\n PipelineMethods.logStart = function (context) {\n return new Promise(function (resolve) {\n logging_1.Logger.log({\n data: logging_1.Logger.activeLogLevel === logging_1.LogLevel.Info ? {} : context,\n level: logging_1.LogLevel.Info,\n message: \"[\" + context.requestId + \"] (\" + (new Date()).getTime() + \") Beginning \" + context.verb + \" request (\" + context.requestAbsoluteUrl + \")\",\n });\n resolve(context);\n });\n };\n /**\n * Handles caching of the request\n */\n PipelineMethods.caching = function (context) {\n return new Promise(function (resolve) {\n // handle caching, if applicable\n if (context.verb === \"GET\" && context.isCached) {\n logging_1.Logger.write(\"[\" + context.requestId + \"] (\" + (new Date()).getTime() + \") Caching is enabled for request, checking cache...\", logging_1.LogLevel.Info);\n var cacheOptions = new caching_1.CachingOptions(context.requestAbsoluteUrl.toLowerCase());\n if (typeof context.cachingOptions !== \"undefined\") {\n cacheOptions = util_1.Util.extend(cacheOptions, context.cachingOptions);\n }\n // we may not have a valid store\n if (cacheOptions.store !== null) {\n // check if we have the data in cache and if so resolve the promise and return\n var data = cacheOptions.store.get(cacheOptions.key);\n if (data !== null) {\n // ensure we clear any help batch dependency we are resolving from the cache\n logging_1.Logger.log({\n data: logging_1.Logger.activeLogLevel === logging_1.LogLevel.Info ? {} : data,\n level: logging_1.LogLevel.Info,\n message: \"[\" + context.requestId + \"] (\" + (new Date()).getTime() + \") Value returned from cache.\",\n });\n context.batchDependency();\n return setResult(context, data).then(function (ctx) { return resolve(ctx); });\n }\n }\n logging_1.Logger.write(\"[\" + context.requestId + \"] (\" + (new Date()).getTime() + \") Value not found in cache.\", logging_1.LogLevel.Info);\n // if we don't then wrap the supplied parser in the caching parser wrapper\n // and send things on their way\n context.parser = new caching_1.CachingParserWrapper(context.parser, cacheOptions);\n }\n return resolve(context);\n });\n };\n /**\n * Sends the request\n */\n PipelineMethods.send = function (context) {\n return new Promise(function (resolve, reject) {\n // send or batch the request\n if (context.isBatched) {\n // we are in a batch, so add to batch, remove dependency, and resolve with the batch's promise\n var p = context.batch.add(context.requestAbsoluteUrl, context.verb, context.options, context.parser);\n // we release the dependency here to ensure the batch does not execute until the request is added to the batch\n context.batchDependency();\n logging_1.Logger.write(\"[\" + context.requestId + \"] (\" + (new Date()).getTime() + \") Batching request in batch \" + context.batch.batchId + \".\", logging_1.LogLevel.Info);\n // we set the result as the promise which will be resolved by the batch's execution\n resolve(setResult(context, p));\n }\n else {\n logging_1.Logger.write(\"[\" + context.requestId + \"] (\" + (new Date()).getTime() + \") Sending request.\", logging_1.LogLevel.Info);\n // we are not part of a batch, so proceed as normal\n var client = context.clientFactory();\n var opts = util_1.Util.extend(context.options || {}, { method: context.verb });\n client.fetch(context.requestAbsoluteUrl, opts)\n .then(function (response) { return context.parser.parse(response); })\n .then(function (result) { return setResult(context, result); })\n .then(function (ctx) { return resolve(ctx); })\n .catch(function (e) { return reject(e); });\n }\n });\n };\n /**\n * Logs the end of the request\n */\n PipelineMethods.logEnd = function (context) {\n return new Promise(function (resolve) {\n if (context.isBatched) {\n logging_1.Logger.log({\n data: logging_1.Logger.activeLogLevel === logging_1.LogLevel.Info ? {} : context,\n level: logging_1.LogLevel.Info,\n message: \"[\" + context.requestId + \"] (\" + (new Date()).getTime() + \") \" + context.verb + \" request will complete in batch \" + context.batch.batchId + \".\",\n });\n }\n else {\n logging_1.Logger.log({\n data: logging_1.Logger.activeLogLevel === logging_1.LogLevel.Info ? {} : context,\n level: logging_1.LogLevel.Info,\n message: \"[\" + context.requestId + \"] (\" + (new Date()).getTime() + \") Completing \" + context.verb + \" request.\",\n });\n }\n resolve(context);\n });\n };\n Object.defineProperty(PipelineMethods, \"default\", {\n get: function () {\n return [\n PipelineMethods.logStart,\n PipelineMethods.caching,\n PipelineMethods.send,\n PipelineMethods.logEnd,\n ];\n },\n enumerable: true,\n configurable: true\n });\n __decorate([\n requestPipelineMethod(true)\n ], PipelineMethods, \"logStart\", null);\n __decorate([\n requestPipelineMethod()\n ], PipelineMethods, \"caching\", null);\n __decorate([\n requestPipelineMethod()\n ], PipelineMethods, \"send\", null);\n __decorate([\n requestPipelineMethod(true)\n ], PipelineMethods, \"logEnd\", null);\n return PipelineMethods;\n}());\nexports.PipelineMethods = PipelineMethods;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/request/pipeline.js\n// module id = 14\n// module chunks = 0","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar items_1 = require(\"./items\");\nvar views_1 = require(\"./views\");\nvar contenttypes_1 = require(\"./contenttypes\");\nvar fields_1 = require(\"./fields\");\nvar forms_1 = require(\"./forms\");\nvar subscriptions_1 = require(\"./subscriptions\");\nvar sharepointqueryable_1 = require(\"./sharepointqueryable\");\nvar sharepointqueryablesecurable_1 = require(\"./sharepointqueryablesecurable\");\nvar util_1 = require(\"../utils/util\");\nvar usercustomactions_1 = require(\"./usercustomactions\");\nvar odata_1 = require(\"./odata\");\nvar exceptions_1 = require(\"../utils/exceptions\");\nvar folders_1 = require(\"./folders\");\n/**\n * Describes a collection of List objects\n *\n */\nvar Lists = /** @class */ (function (_super) {\n __extends(Lists, _super);\n /**\n * Creates a new instance of the Lists class\n *\n * @param baseUrl The url or SharePointQueryable which forms the parent of this fields collection\n */\n function Lists(baseUrl, path) {\n if (path === void 0) { path = \"lists\"; }\n return _super.call(this, baseUrl, path) || this;\n }\n /**\n * Gets a list from the collection by title\n *\n * @param title The title of the list\n */\n Lists.prototype.getByTitle = function (title) {\n return new List(this, \"getByTitle('\" + title + \"')\");\n };\n /**\n * Gets a list from the collection by guid id\n *\n * @param id The Id of the list (GUID)\n */\n Lists.prototype.getById = function (id) {\n var list = new List(this);\n list.concat(\"('\" + id + \"')\");\n return list;\n };\n /**\n * Adds a new list to the collection\n *\n * @param title The new list's title\n * @param description The new list's description\n * @param template The list template value\n * @param enableContentTypes If true content types will be allowed and enabled, otherwise they will be disallowed and not enabled\n * @param additionalSettings Will be passed as part of the list creation body\n */\n Lists.prototype.add = function (title, description, template, enableContentTypes, additionalSettings) {\n var _this = this;\n if (description === void 0) { description = \"\"; }\n if (template === void 0) { template = 100; }\n if (enableContentTypes === void 0) { enableContentTypes = false; }\n if (additionalSettings === void 0) { additionalSettings = {}; }\n var addSettings = util_1.Util.extend({\n \"AllowContentTypes\": enableContentTypes,\n \"BaseTemplate\": template,\n \"ContentTypesEnabled\": enableContentTypes,\n \"Description\": description,\n \"Title\": title,\n \"__metadata\": { \"type\": \"SP.List\" },\n }, additionalSettings);\n return this.postCore({ body: JSON.stringify(addSettings) }).then(function (data) {\n return { data: data, list: _this.getByTitle(addSettings.Title) };\n });\n };\n /**\n * Ensures that the specified list exists in the collection (note: this method not supported for batching)\n *\n * @param title The new list's title\n * @param description The new list's description\n * @param template The list template value\n * @param enableContentTypes If true content types will be allowed and enabled, otherwise they will be disallowed and not enabled\n * @param additionalSettings Will be passed as part of the list creation body or used to update an existing list\n */\n Lists.prototype.ensure = function (title, description, template, enableContentTypes, additionalSettings) {\n var _this = this;\n if (description === void 0) { description = \"\"; }\n if (template === void 0) { template = 100; }\n if (enableContentTypes === void 0) { enableContentTypes = false; }\n if (additionalSettings === void 0) { additionalSettings = {}; }\n if (this.hasBatch) {\n throw new exceptions_1.NotSupportedInBatchException(\"The ensure list method\");\n }\n return new Promise(function (resolve, reject) {\n var addOrUpdateSettings = util_1.Util.extend(additionalSettings, { Title: title, Description: description, ContentTypesEnabled: enableContentTypes }, true);\n var list = _this.getByTitle(addOrUpdateSettings.Title);\n list.get().then(function (_) {\n list.update(addOrUpdateSettings).then(function (d) {\n resolve({ created: false, data: d, list: _this.getByTitle(addOrUpdateSettings.Title) });\n }).catch(function (e) { return reject(e); });\n }).catch(function (_) {\n _this.add(title, description, template, enableContentTypes, addOrUpdateSettings).then(function (r) {\n resolve({ created: true, data: r.data, list: _this.getByTitle(addOrUpdateSettings.Title) });\n }).catch(function (e) { return reject(e); });\n });\n });\n };\n /**\n * Gets a list that is the default asset location for images or other files, which the users upload to their wiki pages.\n */\n Lists.prototype.ensureSiteAssetsLibrary = function () {\n return this.clone(Lists, \"ensuresiteassetslibrary\").postCore().then(function (json) {\n return new List(odata_1.spExtractODataId(json));\n });\n };\n /**\n * Gets a list that is the default location for wiki pages.\n */\n Lists.prototype.ensureSitePagesLibrary = function () {\n return this.clone(Lists, \"ensuresitepageslibrary\").postCore().then(function (json) {\n return new List(odata_1.spExtractODataId(json));\n });\n };\n return Lists;\n}(sharepointqueryable_1.SharePointQueryableCollection));\nexports.Lists = Lists;\n/**\n * Describes a single List instance\n *\n */\nvar List = /** @class */ (function (_super) {\n __extends(List, _super);\n function List() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n Object.defineProperty(List.prototype, \"contentTypes\", {\n /**\n * Gets the content types in this list\n *\n */\n get: function () {\n return new contenttypes_1.ContentTypes(this);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(List.prototype, \"items\", {\n /**\n * Gets the items in this list\n *\n */\n get: function () {\n return new items_1.Items(this);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(List.prototype, \"views\", {\n /**\n * Gets the views in this list\n *\n */\n get: function () {\n return new views_1.Views(this);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(List.prototype, \"fields\", {\n /**\n * Gets the fields in this list\n *\n */\n get: function () {\n return new fields_1.Fields(this);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(List.prototype, \"forms\", {\n /**\n * Gets the forms in this list\n *\n */\n get: function () {\n return new forms_1.Forms(this);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(List.prototype, \"defaultView\", {\n /**\n * Gets the default view of this list\n *\n */\n get: function () {\n return new sharepointqueryable_1.SharePointQueryableInstance(this, \"DefaultView\");\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(List.prototype, \"userCustomActions\", {\n /**\n * Get all custom actions on a site collection\n *\n */\n get: function () {\n return new usercustomactions_1.UserCustomActions(this);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(List.prototype, \"effectiveBasePermissions\", {\n /**\n * Gets the effective base permissions of this list\n *\n */\n get: function () {\n return new sharepointqueryable_1.SharePointQueryable(this, \"EffectiveBasePermissions\");\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(List.prototype, \"eventReceivers\", {\n /**\n * Gets the event receivers attached to this list\n *\n */\n get: function () {\n return new sharepointqueryable_1.SharePointQueryableCollection(this, \"EventReceivers\");\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(List.prototype, \"relatedFields\", {\n /**\n * Gets the related fields of this list\n *\n */\n get: function () {\n return new sharepointqueryable_1.SharePointQueryable(this, \"getRelatedFields\");\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(List.prototype, \"informationRightsManagementSettings\", {\n /**\n * Gets the IRM settings for this list\n *\n */\n get: function () {\n return new sharepointqueryable_1.SharePointQueryable(this, \"InformationRightsManagementSettings\");\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(List.prototype, \"subscriptions\", {\n /**\n * Gets the webhook subscriptions of this list\n *\n */\n get: function () {\n return new subscriptions_1.Subscriptions(this);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(List.prototype, \"rootFolder\", {\n /**\n * The root folder of the list\n */\n get: function () {\n return new folders_1.Folder(this, \"rootFolder\");\n },\n enumerable: true,\n configurable: true\n });\n /**\n * Gets a view by view guid id\n *\n */\n List.prototype.getView = function (viewId) {\n return new views_1.View(this, \"getView('\" + viewId + \"')\");\n };\n /**\n * Updates this list intance with the supplied properties\n *\n * @param properties A plain object hash of values to update for the list\n * @param eTag Value used in the IF-Match header, by default \"*\"\n */\n /* tslint:disable no-string-literal */\n List.prototype.update = function (properties, eTag) {\n var _this = this;\n if (eTag === void 0) { eTag = \"*\"; }\n var postBody = JSON.stringify(util_1.Util.extend({\n \"__metadata\": { \"type\": \"SP.List\" },\n }, properties));\n return this.postCore({\n body: postBody,\n headers: {\n \"IF-Match\": eTag,\n \"X-HTTP-Method\": \"MERGE\",\n },\n }).then(function (data) {\n var retList = _this;\n if (properties.hasOwnProperty(\"Title\")) {\n retList = _this.getParent(List, _this.parentUrl, \"getByTitle('\" + properties[\"Title\"] + \"')\");\n }\n return {\n data: data,\n list: retList,\n };\n });\n };\n /* tslint:enable */\n /**\n * Delete this list\n *\n * @param eTag Value used in the IF-Match header, by default \"*\"\n */\n List.prototype.delete = function (eTag) {\n if (eTag === void 0) { eTag = \"*\"; }\n return this.postCore({\n headers: {\n \"IF-Match\": eTag,\n \"X-HTTP-Method\": \"DELETE\",\n },\n });\n };\n /**\n * Returns the collection of changes from the change log that have occurred within the list, based on the specified query.\n */\n List.prototype.getChanges = function (query) {\n return this.clone(List, \"getchanges\").postCore({\n body: JSON.stringify({ \"query\": util_1.Util.extend({ \"__metadata\": { \"type\": \"SP.ChangeQuery\" } }, query) }),\n });\n };\n /**\n * Returns a collection of items from the list based on the specified query.\n *\n * @param CamlQuery The Query schema of Collaborative Application Markup\n * Language (CAML) is used in various ways within the context of Microsoft SharePoint Foundation\n * to define queries against list data.\n * see:\n *\n * https://msdn.microsoft.com/en-us/library/office/ms467521.aspx\n *\n * @param expands A URI with a $expand System Query Option indicates that Entries associated with\n * the Entry or Collection of Entries identified by the Resource Path\n * section of the URI must be represented inline (i.e. eagerly loaded).\n * see:\n *\n * https://msdn.microsoft.com/en-us/library/office/fp142385.aspx\n *\n * http://www.odata.org/documentation/odata-version-2-0/uri-conventions/#ExpandSystemQueryOption\n */\n List.prototype.getItemsByCAMLQuery = function (query) {\n var expands = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n expands[_i - 1] = arguments[_i];\n }\n var q = this.clone(List, \"getitems\");\n return q.expand.apply(q, expands).postCore({\n body: JSON.stringify({ \"query\": util_1.Util.extend({ \"__metadata\": { \"type\": \"SP.CamlQuery\" } }, query) }),\n });\n };\n /**\n * See: https://msdn.microsoft.com/en-us/library/office/dn292554.aspx\n */\n List.prototype.getListItemChangesSinceToken = function (query) {\n return this.clone(List, \"getlistitemchangessincetoken\").postCore({\n body: JSON.stringify({ \"query\": util_1.Util.extend({ \"__metadata\": { \"type\": \"SP.ChangeLogItemQuery\" } }, query) }),\n }, { parse: function (r) { return r.text(); } });\n };\n /**\n * Moves the list to the Recycle Bin and returns the identifier of the new Recycle Bin item.\n */\n List.prototype.recycle = function () {\n return this.clone(List, \"recycle\").postCore().then(function (data) {\n if (data.hasOwnProperty(\"Recycle\")) {\n return data.Recycle;\n }\n else {\n return data;\n }\n });\n };\n /**\n * Renders list data based on the view xml provided\n */\n List.prototype.renderListData = function (viewXml) {\n var q = this.clone(List, \"renderlistdata(@viewXml)\");\n q.query.add(\"@viewXml\", \"'\" + viewXml + \"'\");\n return q.postCore().then(function (data) {\n // data will be a string, so we parse it again\n data = JSON.parse(data);\n if (data.hasOwnProperty(\"RenderListData\")) {\n return data.RenderListData;\n }\n else {\n return data;\n }\n });\n };\n /**\n * Returns the data for the specified query view\n *\n * @param parameters The parameters to be used to render list data as JSON string.\n * @param overrideParameters The parameters that are used to override and extend the regular SPRenderListDataParameters.\n */\n List.prototype.renderListDataAsStream = function (parameters, overrideParameters) {\n if (overrideParameters === void 0) { overrideParameters = null; }\n var postBody = {\n overrideParameters: util_1.Util.extend({\n \"__metadata\": { \"type\": \"SP.RenderListDataOverrideParameters\" },\n }, overrideParameters),\n parameters: util_1.Util.extend({\n \"__metadata\": { \"type\": \"SP.RenderListDataParameters\" },\n }, parameters),\n };\n return this.clone(List, \"RenderListDataAsStream\", true).postCore({\n body: JSON.stringify(postBody),\n });\n };\n /**\n * Gets the field values and field schema attributes for a list item.\n */\n List.prototype.renderListFormData = function (itemId, formId, mode) {\n return this.clone(List, \"renderlistformdata(itemid=\" + itemId + \", formid='\" + formId + \"', mode='\" + mode + \"')\").postCore().then(function (data) {\n // data will be a string, so we parse it again\n data = JSON.parse(data);\n if (data.hasOwnProperty(\"ListData\")) {\n return data.ListData;\n }\n else {\n return data;\n }\n });\n };\n /**\n * Reserves a list item ID for idempotent list item creation.\n */\n List.prototype.reserveListItemId = function () {\n return this.clone(List, \"reservelistitemid\").postCore().then(function (data) {\n if (data.hasOwnProperty(\"ReserveListItemId\")) {\n return data.ReserveListItemId;\n }\n else {\n return data;\n }\n });\n };\n /**\n * Returns the ListItemEntityTypeFullName for this list, used when adding/updating list items. Does not support batching.\n *\n */\n List.prototype.getListItemEntityTypeFullName = function () {\n return this.clone(List, null, false).select(\"ListItemEntityTypeFullName\").getAs().then(function (o) { return o.ListItemEntityTypeFullName; });\n };\n return List;\n}(sharepointqueryablesecurable_1.SharePointQueryableSecurable));\nexports.List = List;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/sharepoint/lists.js\n// module id = 15\n// module chunks = 0","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar sharepointqueryable_1 = require(\"./sharepointqueryable\");\nvar sharepointqueryableshareable_1 = require(\"./sharepointqueryableshareable\");\nvar folders_1 = require(\"./folders\");\nvar files_1 = require(\"./files\");\nvar contenttypes_1 = require(\"./contenttypes\");\nvar util_1 = require(\"../utils/util\");\nvar core_1 = require(\"../odata/core\");\nvar attachmentfiles_1 = require(\"./attachmentfiles\");\nvar lists_1 = require(\"./lists\");\n/**\n * Describes a collection of Item objects\n *\n */\nvar Items = /** @class */ (function (_super) {\n __extends(Items, _super);\n /**\n * Creates a new instance of the Items class\n *\n * @param baseUrl The url or SharePointQueryable which forms the parent of this fields collection\n */\n function Items(baseUrl, path) {\n if (path === void 0) { path = \"items\"; }\n return _super.call(this, baseUrl, path) || this;\n }\n /**\n * Gets an Item by id\n *\n * @param id The integer id of the item to retrieve\n */\n Items.prototype.getById = function (id) {\n var i = new Item(this);\n i.concat(\"(\" + id + \")\");\n return i;\n };\n /**\n * Skips the specified number of items (https://msdn.microsoft.com/en-us/library/office/fp142385.aspx#sectionSection6)\n *\n * @param skip The starting id where the page should start, use with top to specify pages\n */\n Items.prototype.skip = function (skip) {\n this._query.add(\"$skiptoken\", encodeURIComponent(\"Paged=TRUE&p_ID=\" + skip));\n return this;\n };\n /**\n * Gets a collection designed to aid in paging through data\n *\n */\n Items.prototype.getPaged = function () {\n return this.getAs(new PagedItemCollectionParser());\n };\n //\n /**\n * Adds a new item to the collection\n *\n * @param properties The new items's properties\n */\n Items.prototype.add = function (properties, listItemEntityTypeFullName) {\n var _this = this;\n if (properties === void 0) { properties = {}; }\n if (listItemEntityTypeFullName === void 0) { listItemEntityTypeFullName = null; }\n var removeDependency = this.addBatchDependency();\n return this.ensureListItemEntityTypeName(listItemEntityTypeFullName).then(function (listItemEntityType) {\n var postBody = JSON.stringify(util_1.Util.extend({\n \"__metadata\": { \"type\": listItemEntityType },\n }, properties));\n var promise = _this.clone(Items, null).postAsCore({ body: postBody }).then(function (data) {\n return {\n data: data,\n item: _this.getById(data.Id),\n };\n });\n removeDependency();\n return promise;\n });\n };\n /**\n * Ensures we have the proper list item entity type name, either from the value provided or from the list\n *\n * @param candidatelistItemEntityTypeFullName The potential type name\n */\n Items.prototype.ensureListItemEntityTypeName = function (candidatelistItemEntityTypeFullName) {\n return candidatelistItemEntityTypeFullName ?\n Promise.resolve(candidatelistItemEntityTypeFullName) :\n this.getParent(lists_1.List).getListItemEntityTypeFullName();\n };\n return Items;\n}(sharepointqueryable_1.SharePointQueryableCollection));\nexports.Items = Items;\n/**\n * Descrines a single Item instance\n *\n */\nvar Item = /** @class */ (function (_super) {\n __extends(Item, _super);\n function Item() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n Object.defineProperty(Item.prototype, \"attachmentFiles\", {\n /**\n * Gets the set of attachments for this item\n *\n */\n get: function () {\n return new attachmentfiles_1.AttachmentFiles(this);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Item.prototype, \"contentType\", {\n /**\n * Gets the content type for this item\n *\n */\n get: function () {\n return new contenttypes_1.ContentType(this, \"ContentType\");\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Item.prototype, \"effectiveBasePermissions\", {\n /**\n * Gets the effective base permissions for the item\n *\n */\n get: function () {\n return new sharepointqueryable_1.SharePointQueryable(this, \"EffectiveBasePermissions\");\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Item.prototype, \"effectiveBasePermissionsForUI\", {\n /**\n * Gets the effective base permissions for the item in a UI context\n *\n */\n get: function () {\n return new sharepointqueryable_1.SharePointQueryable(this, \"EffectiveBasePermissionsForUI\");\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Item.prototype, \"fieldValuesAsHTML\", {\n /**\n * Gets the field values for this list item in their HTML representation\n *\n */\n get: function () {\n return new sharepointqueryable_1.SharePointQueryableInstance(this, \"FieldValuesAsHTML\");\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Item.prototype, \"fieldValuesAsText\", {\n /**\n * Gets the field values for this list item in their text representation\n *\n */\n get: function () {\n return new sharepointqueryable_1.SharePointQueryableInstance(this, \"FieldValuesAsText\");\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Item.prototype, \"fieldValuesForEdit\", {\n /**\n * Gets the field values for this list item for use in editing controls\n *\n */\n get: function () {\n return new sharepointqueryable_1.SharePointQueryableInstance(this, \"FieldValuesForEdit\");\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Item.prototype, \"folder\", {\n /**\n * Gets the folder associated with this list item (if this item represents a folder)\n *\n */\n get: function () {\n return new folders_1.Folder(this, \"folder\");\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Item.prototype, \"file\", {\n /**\n * Gets the folder associated with this list item (if this item represents a folder)\n *\n */\n get: function () {\n return new files_1.File(this, \"file\");\n },\n enumerable: true,\n configurable: true\n });\n /**\n * Updates this list intance with the supplied properties\n *\n * @param properties A plain object hash of values to update for the list\n * @param eTag Value used in the IF-Match header, by default \"*\"\n */\n Item.prototype.update = function (properties, eTag, listItemEntityTypeFullName) {\n var _this = this;\n if (eTag === void 0) { eTag = \"*\"; }\n if (listItemEntityTypeFullName === void 0) { listItemEntityTypeFullName = null; }\n return new Promise(function (resolve, reject) {\n var removeDependency = _this.addBatchDependency();\n return _this.ensureListItemEntityTypeName(listItemEntityTypeFullName).then(function (listItemEntityType) {\n var postBody = JSON.stringify(util_1.Util.extend({\n \"__metadata\": { \"type\": listItemEntityType },\n }, properties));\n removeDependency();\n return _this.postCore({\n body: postBody,\n headers: {\n \"IF-Match\": eTag,\n \"X-HTTP-Method\": \"MERGE\",\n },\n }, new ItemUpdatedParser()).then(function (data) {\n resolve({\n data: data,\n item: _this,\n });\n });\n }).catch(function (e) { return reject(e); });\n });\n };\n /**\n * Delete this item\n *\n * @param eTag Value used in the IF-Match header, by default \"*\"\n */\n Item.prototype.delete = function (eTag) {\n if (eTag === void 0) { eTag = \"*\"; }\n return this.postCore({\n headers: {\n \"IF-Match\": eTag,\n \"X-HTTP-Method\": \"DELETE\",\n },\n });\n };\n /**\n * Moves the list item to the Recycle Bin and returns the identifier of the new Recycle Bin item.\n */\n Item.prototype.recycle = function () {\n return this.clone(Item, \"recycle\").postCore();\n };\n /**\n * Gets a string representation of the full URL to the WOPI frame.\n * If there is no associated WOPI application, or no associated action, an empty string is returned.\n *\n * @param action Display mode: 0: view, 1: edit, 2: mobileView, 3: interactivePreview\n */\n Item.prototype.getWopiFrameUrl = function (action) {\n if (action === void 0) { action = 0; }\n var i = this.clone(Item, \"getWOPIFrameUrl(@action)\");\n i._query.add(\"@action\", action);\n return i.postCore().then(function (data) {\n // handle verbose mode\n if (data.hasOwnProperty(\"GetWOPIFrameUrl\")) {\n return data.GetWOPIFrameUrl;\n }\n return data;\n });\n };\n /**\n * Validates and sets the values of the specified collection of fields for the list item.\n *\n * @param formValues The fields to change and their new values.\n * @param newDocumentUpdate true if the list item is a document being updated after upload; otherwise false.\n */\n Item.prototype.validateUpdateListItem = function (formValues, newDocumentUpdate) {\n if (newDocumentUpdate === void 0) { newDocumentUpdate = false; }\n return this.clone(Item, \"validateupdatelistitem\").postCore({\n body: JSON.stringify({ \"formValues\": formValues, bNewDocumentUpdate: newDocumentUpdate }),\n });\n };\n /**\n * Ensures we have the proper list item entity type name, either from the value provided or from the list\n *\n * @param candidatelistItemEntityTypeFullName The potential type name\n */\n Item.prototype.ensureListItemEntityTypeName = function (candidatelistItemEntityTypeFullName) {\n return candidatelistItemEntityTypeFullName ?\n Promise.resolve(candidatelistItemEntityTypeFullName) :\n this.getParent(lists_1.List, this.parentUrl.substr(0, this.parentUrl.lastIndexOf(\"/\"))).getListItemEntityTypeFullName();\n };\n return Item;\n}(sharepointqueryableshareable_1.SharePointQueryableShareableItem));\nexports.Item = Item;\n/**\n * Provides paging functionality for list items\n */\nvar PagedItemCollection = /** @class */ (function () {\n function PagedItemCollection(nextUrl, results) {\n this.nextUrl = nextUrl;\n this.results = results;\n }\n Object.defineProperty(PagedItemCollection.prototype, \"hasNext\", {\n /**\n * If true there are more results available in the set, otherwise there are not\n */\n get: function () {\n return typeof this.nextUrl === \"string\" && this.nextUrl.length > 0;\n },\n enumerable: true,\n configurable: true\n });\n /**\n * Gets the next set of results, or resolves to null if no results are available\n */\n PagedItemCollection.prototype.getNext = function () {\n if (this.hasNext) {\n var items = new Items(this.nextUrl, null);\n return items.getPaged();\n }\n return new Promise(function (r) { return r(null); });\n };\n return PagedItemCollection;\n}());\nexports.PagedItemCollection = PagedItemCollection;\nvar PagedItemCollectionParser = /** @class */ (function (_super) {\n __extends(PagedItemCollectionParser, _super);\n function PagedItemCollectionParser() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n PagedItemCollectionParser.prototype.parse = function (r) {\n var _this = this;\n return new Promise(function (resolve, reject) {\n if (_this.handleError(r, reject)) {\n r.json().then(function (json) {\n var nextUrl = json.hasOwnProperty(\"d\") && json.d.hasOwnProperty(\"__next\") ? json.d.__next : json[\"odata.nextLink\"];\n resolve(new PagedItemCollection(nextUrl, _this.parseODataJSON(json)));\n });\n }\n });\n };\n return PagedItemCollectionParser;\n}(core_1.ODataParserBase));\nvar ItemUpdatedParser = /** @class */ (function (_super) {\n __extends(ItemUpdatedParser, _super);\n function ItemUpdatedParser() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n ItemUpdatedParser.prototype.parse = function (r) {\n var _this = this;\n return new Promise(function (resolve, reject) {\n if (_this.handleError(r, reject)) {\n resolve({\n \"odata.etag\": r.headers.get(\"etag\"),\n });\n }\n });\n };\n return ItemUpdatedParser;\n}(core_1.ODataParserBase));\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/sharepoint/items.js\n// module id = 16\n// module chunks = 0","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar sharepointqueryable_1 = require(\"./sharepointqueryable\");\nvar siteusers_1 = require(\"./siteusers\");\nvar util_1 = require(\"../utils/util\");\n/**\n * Principal Type enum\n *\n */\nvar PrincipalType;\n(function (PrincipalType) {\n PrincipalType[PrincipalType[\"None\"] = 0] = \"None\";\n PrincipalType[PrincipalType[\"User\"] = 1] = \"User\";\n PrincipalType[PrincipalType[\"DistributionList\"] = 2] = \"DistributionList\";\n PrincipalType[PrincipalType[\"SecurityGroup\"] = 4] = \"SecurityGroup\";\n PrincipalType[PrincipalType[\"SharePointGroup\"] = 8] = \"SharePointGroup\";\n PrincipalType[PrincipalType[\"All\"] = 15] = \"All\";\n})(PrincipalType = exports.PrincipalType || (exports.PrincipalType = {}));\n/**\n * Describes a collection of site groups\n *\n */\nvar SiteGroups = /** @class */ (function (_super) {\n __extends(SiteGroups, _super);\n /**\n * Creates a new instance of the SiteGroups class\n *\n * @param baseUrl The url or SharePointQueryable which forms the parent of this group collection\n */\n function SiteGroups(baseUrl, path) {\n if (path === void 0) { path = \"sitegroups\"; }\n return _super.call(this, baseUrl, path) || this;\n }\n /**\n * Adds a new group to the site collection\n *\n * @param props The group properties object of property names and values to be set for the group\n */\n SiteGroups.prototype.add = function (properties) {\n var _this = this;\n var postBody = JSON.stringify(util_1.Util.extend({ \"__metadata\": { \"type\": \"SP.Group\" } }, properties));\n return this.postCore({ body: postBody }).then(function (data) {\n return {\n data: data,\n group: _this.getById(data.Id),\n };\n });\n };\n /**\n * Gets a group from the collection by name\n *\n * @param groupName The name of the group to retrieve\n */\n SiteGroups.prototype.getByName = function (groupName) {\n return new SiteGroup(this, \"getByName('\" + groupName + \"')\");\n };\n /**\n * Gets a group from the collection by id\n *\n * @param id The id of the group to retrieve\n */\n SiteGroups.prototype.getById = function (id) {\n var sg = new SiteGroup(this);\n sg.concat(\"(\" + id + \")\");\n return sg;\n };\n /**\n * Removes the group with the specified member id from the collection\n *\n * @param id The id of the group to remove\n */\n SiteGroups.prototype.removeById = function (id) {\n return this.clone(SiteGroups, \"removeById('\" + id + \"')\").postCore();\n };\n /**\n * Removes the cross-site group with the specified name from the collection\n *\n * @param loginName The name of the group to remove\n */\n SiteGroups.prototype.removeByLoginName = function (loginName) {\n return this.clone(SiteGroups, \"removeByLoginName('\" + loginName + \"')\").postCore();\n };\n return SiteGroups;\n}(sharepointqueryable_1.SharePointQueryableCollection));\nexports.SiteGroups = SiteGroups;\n/**\n * Describes a single group\n *\n */\nvar SiteGroup = /** @class */ (function (_super) {\n __extends(SiteGroup, _super);\n function SiteGroup() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n Object.defineProperty(SiteGroup.prototype, \"users\", {\n /**\n * Gets the users for this group\n *\n */\n get: function () {\n return new siteusers_1.SiteUsers(this, \"users\");\n },\n enumerable: true,\n configurable: true\n });\n /**\n * Updates this group instance with the supplied properties\n *\n * @param properties A GroupWriteableProperties object of property names and values to update for the group\n */\n /* tslint:disable no-string-literal */\n SiteGroup.prototype.update = function (properties) {\n var _this = this;\n var postBody = util_1.Util.extend({ \"__metadata\": { \"type\": \"SP.Group\" } }, properties);\n return this.postCore({\n body: JSON.stringify(postBody),\n headers: {\n \"X-HTTP-Method\": \"MERGE\",\n },\n }).then(function (data) {\n var retGroup = _this;\n if (properties.hasOwnProperty(\"Title\")) {\n retGroup = _this.getParent(SiteGroup, _this.parentUrl, \"getByName('\" + properties[\"Title\"] + \"')\");\n }\n return {\n data: data,\n group: retGroup,\n };\n });\n };\n return SiteGroup;\n}(sharepointqueryable_1.SharePointQueryableInstance));\nexports.SiteGroup = SiteGroup;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/sharepoint/sitegroups.js\n// module id = 17\n// module chunks = 0","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\n/**\n * Determines the display mode of the given control or view\n */\nvar ControlMode;\n(function (ControlMode) {\n ControlMode[ControlMode[\"Display\"] = 1] = \"Display\";\n ControlMode[ControlMode[\"Edit\"] = 2] = \"Edit\";\n ControlMode[ControlMode[\"New\"] = 3] = \"New\";\n})(ControlMode = exports.ControlMode || (exports.ControlMode = {}));\n/**\n * Specifies the type of the field.\n */\nvar FieldTypes;\n(function (FieldTypes) {\n FieldTypes[FieldTypes[\"Invalid\"] = 0] = \"Invalid\";\n FieldTypes[FieldTypes[\"Integer\"] = 1] = \"Integer\";\n FieldTypes[FieldTypes[\"Text\"] = 2] = \"Text\";\n FieldTypes[FieldTypes[\"Note\"] = 3] = \"Note\";\n FieldTypes[FieldTypes[\"DateTime\"] = 4] = \"DateTime\";\n FieldTypes[FieldTypes[\"Counter\"] = 5] = \"Counter\";\n FieldTypes[FieldTypes[\"Choice\"] = 6] = \"Choice\";\n FieldTypes[FieldTypes[\"Lookup\"] = 7] = \"Lookup\";\n FieldTypes[FieldTypes[\"Boolean\"] = 8] = \"Boolean\";\n FieldTypes[FieldTypes[\"Number\"] = 9] = \"Number\";\n FieldTypes[FieldTypes[\"Currency\"] = 10] = \"Currency\";\n FieldTypes[FieldTypes[\"URL\"] = 11] = \"URL\";\n FieldTypes[FieldTypes[\"Computed\"] = 12] = \"Computed\";\n FieldTypes[FieldTypes[\"Threading\"] = 13] = \"Threading\";\n FieldTypes[FieldTypes[\"Guid\"] = 14] = \"Guid\";\n FieldTypes[FieldTypes[\"MultiChoice\"] = 15] = \"MultiChoice\";\n FieldTypes[FieldTypes[\"GridChoice\"] = 16] = \"GridChoice\";\n FieldTypes[FieldTypes[\"Calculated\"] = 17] = \"Calculated\";\n FieldTypes[FieldTypes[\"File\"] = 18] = \"File\";\n FieldTypes[FieldTypes[\"Attachments\"] = 19] = \"Attachments\";\n FieldTypes[FieldTypes[\"User\"] = 20] = \"User\";\n FieldTypes[FieldTypes[\"Recurrence\"] = 21] = \"Recurrence\";\n FieldTypes[FieldTypes[\"CrossProjectLink\"] = 22] = \"CrossProjectLink\";\n FieldTypes[FieldTypes[\"ModStat\"] = 23] = \"ModStat\";\n FieldTypes[FieldTypes[\"Error\"] = 24] = \"Error\";\n FieldTypes[FieldTypes[\"ContentTypeId\"] = 25] = \"ContentTypeId\";\n FieldTypes[FieldTypes[\"PageSeparator\"] = 26] = \"PageSeparator\";\n FieldTypes[FieldTypes[\"ThreadIndex\"] = 27] = \"ThreadIndex\";\n FieldTypes[FieldTypes[\"WorkflowStatus\"] = 28] = \"WorkflowStatus\";\n FieldTypes[FieldTypes[\"AllDayEvent\"] = 29] = \"AllDayEvent\";\n FieldTypes[FieldTypes[\"WorkflowEventType\"] = 30] = \"WorkflowEventType\";\n})(FieldTypes = exports.FieldTypes || (exports.FieldTypes = {}));\nvar DateTimeFieldFormatType;\n(function (DateTimeFieldFormatType) {\n DateTimeFieldFormatType[DateTimeFieldFormatType[\"DateOnly\"] = 0] = \"DateOnly\";\n DateTimeFieldFormatType[DateTimeFieldFormatType[\"DateTime\"] = 1] = \"DateTime\";\n})(DateTimeFieldFormatType = exports.DateTimeFieldFormatType || (exports.DateTimeFieldFormatType = {}));\n/**\n * Specifies the control settings while adding a field.\n */\nvar AddFieldOptions;\n(function (AddFieldOptions) {\n /**\n * Specify that a new field added to the list must also be added to the default content type in the site collection\n */\n AddFieldOptions[AddFieldOptions[\"DefaultValue\"] = 0] = \"DefaultValue\";\n /**\n * Specify that a new field added to the list must also be added to the default content type in the site collection.\n */\n AddFieldOptions[AddFieldOptions[\"AddToDefaultContentType\"] = 1] = \"AddToDefaultContentType\";\n /**\n * Specify that a new field must not be added to any other content type\n */\n AddFieldOptions[AddFieldOptions[\"AddToNoContentType\"] = 2] = \"AddToNoContentType\";\n /**\n * Specify that a new field that is added to the specified list must also be added to all content types in the site collection\n */\n AddFieldOptions[AddFieldOptions[\"AddToAllContentTypes\"] = 4] = \"AddToAllContentTypes\";\n /**\n * Specify adding an internal field name hint for the purpose of avoiding possible database locking or field renaming operations\n */\n AddFieldOptions[AddFieldOptions[\"AddFieldInternalNameHint\"] = 8] = \"AddFieldInternalNameHint\";\n /**\n * Specify that a new field that is added to the specified list must also be added to the default list view\n */\n AddFieldOptions[AddFieldOptions[\"AddFieldToDefaultView\"] = 16] = \"AddFieldToDefaultView\";\n /**\n * Specify to confirm that no other field has the same display name\n */\n AddFieldOptions[AddFieldOptions[\"AddFieldCheckDisplayName\"] = 32] = \"AddFieldCheckDisplayName\";\n})(AddFieldOptions = exports.AddFieldOptions || (exports.AddFieldOptions = {}));\nvar CalendarType;\n(function (CalendarType) {\n CalendarType[CalendarType[\"Gregorian\"] = 1] = \"Gregorian\";\n CalendarType[CalendarType[\"Japan\"] = 3] = \"Japan\";\n CalendarType[CalendarType[\"Taiwan\"] = 4] = \"Taiwan\";\n CalendarType[CalendarType[\"Korea\"] = 5] = \"Korea\";\n CalendarType[CalendarType[\"Hijri\"] = 6] = \"Hijri\";\n CalendarType[CalendarType[\"Thai\"] = 7] = \"Thai\";\n CalendarType[CalendarType[\"Hebrew\"] = 8] = \"Hebrew\";\n CalendarType[CalendarType[\"GregorianMEFrench\"] = 9] = \"GregorianMEFrench\";\n CalendarType[CalendarType[\"GregorianArabic\"] = 10] = \"GregorianArabic\";\n CalendarType[CalendarType[\"GregorianXLITEnglish\"] = 11] = \"GregorianXLITEnglish\";\n CalendarType[CalendarType[\"GregorianXLITFrench\"] = 12] = \"GregorianXLITFrench\";\n CalendarType[CalendarType[\"KoreaJapanLunar\"] = 14] = \"KoreaJapanLunar\";\n CalendarType[CalendarType[\"ChineseLunar\"] = 15] = \"ChineseLunar\";\n CalendarType[CalendarType[\"SakaEra\"] = 16] = \"SakaEra\";\n CalendarType[CalendarType[\"UmAlQura\"] = 23] = \"UmAlQura\";\n})(CalendarType = exports.CalendarType || (exports.CalendarType = {}));\nvar UrlFieldFormatType;\n(function (UrlFieldFormatType) {\n UrlFieldFormatType[UrlFieldFormatType[\"Hyperlink\"] = 0] = \"Hyperlink\";\n UrlFieldFormatType[UrlFieldFormatType[\"Image\"] = 1] = \"Image\";\n})(UrlFieldFormatType = exports.UrlFieldFormatType || (exports.UrlFieldFormatType = {}));\nvar PermissionKind;\n(function (PermissionKind) {\n /**\n * Has no permissions on the Site. Not available through the user interface.\n */\n PermissionKind[PermissionKind[\"EmptyMask\"] = 0] = \"EmptyMask\";\n /**\n * View items in lists, documents in document libraries, and Web discussion comments.\n */\n PermissionKind[PermissionKind[\"ViewListItems\"] = 1] = \"ViewListItems\";\n /**\n * Add items to lists, documents to document libraries, and Web discussion comments.\n */\n PermissionKind[PermissionKind[\"AddListItems\"] = 2] = \"AddListItems\";\n /**\n * Edit items in lists, edit documents in document libraries, edit Web discussion comments\n * in documents, and customize Web Part Pages in document libraries.\n */\n PermissionKind[PermissionKind[\"EditListItems\"] = 3] = \"EditListItems\";\n /**\n * Delete items from a list, documents from a document library, and Web discussion\n * comments in documents.\n */\n PermissionKind[PermissionKind[\"DeleteListItems\"] = 4] = \"DeleteListItems\";\n /**\n * Approve a minor version of a list item or document.\n */\n PermissionKind[PermissionKind[\"ApproveItems\"] = 5] = \"ApproveItems\";\n /**\n * View the source of documents with server-side file handlers.\n */\n PermissionKind[PermissionKind[\"OpenItems\"] = 6] = \"OpenItems\";\n /**\n * View past versions of a list item or document.\n */\n PermissionKind[PermissionKind[\"ViewVersions\"] = 7] = \"ViewVersions\";\n /**\n * Delete past versions of a list item or document.\n */\n PermissionKind[PermissionKind[\"DeleteVersions\"] = 8] = \"DeleteVersions\";\n /**\n * Discard or check in a document which is checked out to another user.\n */\n PermissionKind[PermissionKind[\"CancelCheckout\"] = 9] = \"CancelCheckout\";\n /**\n * Create, change, and delete personal views of lists.\n */\n PermissionKind[PermissionKind[\"ManagePersonalViews\"] = 10] = \"ManagePersonalViews\";\n /**\n * Create and delete lists, add or remove columns in a list, and add or remove public views of a list.\n */\n PermissionKind[PermissionKind[\"ManageLists\"] = 12] = \"ManageLists\";\n /**\n * View forms, views, and application pages, and enumerate lists.\n */\n PermissionKind[PermissionKind[\"ViewFormPages\"] = 13] = \"ViewFormPages\";\n /**\n * Make content of a list or document library retrieveable for anonymous users through SharePoint search.\n * The list permissions in the site do not change.\n */\n PermissionKind[PermissionKind[\"AnonymousSearchAccessList\"] = 14] = \"AnonymousSearchAccessList\";\n /**\n * Allow users to open a Site, list, or folder to access items inside that container.\n */\n PermissionKind[PermissionKind[\"Open\"] = 17] = \"Open\";\n /**\n * View pages in a Site.\n */\n PermissionKind[PermissionKind[\"ViewPages\"] = 18] = \"ViewPages\";\n /**\n * Add, change, or delete HTML pages or Web Part Pages, and edit the Site using\n * a Windows SharePoint Services compatible editor.\n */\n PermissionKind[PermissionKind[\"AddAndCustomizePages\"] = 19] = \"AddAndCustomizePages\";\n /**\n * Apply a theme or borders to the entire Site.\n */\n PermissionKind[PermissionKind[\"ApplyThemeAndBorder\"] = 20] = \"ApplyThemeAndBorder\";\n /**\n * Apply a style sheet (.css file) to the Site.\n */\n PermissionKind[PermissionKind[\"ApplyStyleSheets\"] = 21] = \"ApplyStyleSheets\";\n /**\n * View reports on Site usage.\n */\n PermissionKind[PermissionKind[\"ViewUsageData\"] = 22] = \"ViewUsageData\";\n /**\n * Create a Site using Self-Service Site Creation.\n */\n PermissionKind[PermissionKind[\"CreateSSCSite\"] = 23] = \"CreateSSCSite\";\n /**\n * Create subsites such as team sites, Meeting Workspace sites, and Document Workspace sites.\n */\n PermissionKind[PermissionKind[\"ManageSubwebs\"] = 24] = \"ManageSubwebs\";\n /**\n * Create a group of users that can be used anywhere within the site collection.\n */\n PermissionKind[PermissionKind[\"CreateGroups\"] = 25] = \"CreateGroups\";\n /**\n * Create and change permission levels on the Site and assign permissions to users\n * and groups.\n */\n PermissionKind[PermissionKind[\"ManagePermissions\"] = 26] = \"ManagePermissions\";\n /**\n * Enumerate files and folders in a Site using Microsoft Office SharePoint Designer\n * and WebDAV interfaces.\n */\n PermissionKind[PermissionKind[\"BrowseDirectories\"] = 27] = \"BrowseDirectories\";\n /**\n * View information about users of the Site.\n */\n PermissionKind[PermissionKind[\"BrowseUserInfo\"] = 28] = \"BrowseUserInfo\";\n /**\n * Add or remove personal Web Parts on a Web Part Page.\n */\n PermissionKind[PermissionKind[\"AddDelPrivateWebParts\"] = 29] = \"AddDelPrivateWebParts\";\n /**\n * Update Web Parts to display personalized information.\n */\n PermissionKind[PermissionKind[\"UpdatePersonalWebParts\"] = 30] = \"UpdatePersonalWebParts\";\n /**\n * Grant the ability to perform all administration tasks for the Site as well as\n * manage content, activate, deactivate, or edit properties of Site scoped Features\n * through the object model or through the user interface (UI). When granted on the\n * root Site of a Site Collection, activate, deactivate, or edit properties of\n * site collection scoped Features through the object model. To browse to the Site\n * Collection Features page and activate or deactivate Site Collection scoped Features\n * through the UI, you must be a Site Collection administrator.\n */\n PermissionKind[PermissionKind[\"ManageWeb\"] = 31] = \"ManageWeb\";\n /**\n * Content of lists and document libraries in the Web site will be retrieveable for anonymous users through\n * SharePoint search if the list or document library has AnonymousSearchAccessList set.\n */\n PermissionKind[PermissionKind[\"AnonymousSearchAccessWebLists\"] = 32] = \"AnonymousSearchAccessWebLists\";\n /**\n * Use features that launch client applications. Otherwise, users must work on documents\n * locally and upload changes.\n */\n PermissionKind[PermissionKind[\"UseClientIntegration\"] = 37] = \"UseClientIntegration\";\n /**\n * Use SOAP, WebDAV, or Microsoft Office SharePoint Designer interfaces to access the Site.\n */\n PermissionKind[PermissionKind[\"UseRemoteAPIs\"] = 38] = \"UseRemoteAPIs\";\n /**\n * Manage alerts for all users of the Site.\n */\n PermissionKind[PermissionKind[\"ManageAlerts\"] = 39] = \"ManageAlerts\";\n /**\n * Create e-mail alerts.\n */\n PermissionKind[PermissionKind[\"CreateAlerts\"] = 40] = \"CreateAlerts\";\n /**\n * Allows a user to change his or her user information, such as adding a picture.\n */\n PermissionKind[PermissionKind[\"EditMyUserInfo\"] = 41] = \"EditMyUserInfo\";\n /**\n * Enumerate permissions on Site, list, folder, document, or list item.\n */\n PermissionKind[PermissionKind[\"EnumeratePermissions\"] = 63] = \"EnumeratePermissions\";\n /**\n * Has all permissions on the Site. Not available through the user interface.\n */\n PermissionKind[PermissionKind[\"FullMask\"] = 65] = \"FullMask\";\n})(PermissionKind = exports.PermissionKind || (exports.PermissionKind = {}));\nvar PrincipalType;\n(function (PrincipalType) {\n PrincipalType[PrincipalType[\"None\"] = 0] = \"None\";\n PrincipalType[PrincipalType[\"User\"] = 1] = \"User\";\n PrincipalType[PrincipalType[\"DistributionList\"] = 2] = \"DistributionList\";\n PrincipalType[PrincipalType[\"SecurityGroup\"] = 4] = \"SecurityGroup\";\n PrincipalType[PrincipalType[\"SharePointGroup\"] = 8] = \"SharePointGroup\";\n PrincipalType[PrincipalType[\"All\"] = 15] = \"All\";\n})(PrincipalType = exports.PrincipalType || (exports.PrincipalType = {}));\nvar PrincipalSource;\n(function (PrincipalSource) {\n PrincipalSource[PrincipalSource[\"None\"] = 0] = \"None\";\n PrincipalSource[PrincipalSource[\"UserInfoList\"] = 1] = \"UserInfoList\";\n PrincipalSource[PrincipalSource[\"Windows\"] = 2] = \"Windows\";\n PrincipalSource[PrincipalSource[\"MembershipProvider\"] = 4] = \"MembershipProvider\";\n PrincipalSource[PrincipalSource[\"RoleProvider\"] = 8] = \"RoleProvider\";\n PrincipalSource[PrincipalSource[\"All\"] = 15] = \"All\";\n})(PrincipalSource = exports.PrincipalSource || (exports.PrincipalSource = {}));\nvar RoleType;\n(function (RoleType) {\n RoleType[RoleType[\"None\"] = 0] = \"None\";\n RoleType[RoleType[\"Guest\"] = 1] = \"Guest\";\n RoleType[RoleType[\"Reader\"] = 2] = \"Reader\";\n RoleType[RoleType[\"Contributor\"] = 3] = \"Contributor\";\n RoleType[RoleType[\"WebDesigner\"] = 4] = \"WebDesigner\";\n RoleType[RoleType[\"Administrator\"] = 5] = \"Administrator\";\n})(RoleType = exports.RoleType || (exports.RoleType = {}));\nvar PageType;\n(function (PageType) {\n PageType[PageType[\"Invalid\"] = -1] = \"Invalid\";\n PageType[PageType[\"DefaultView\"] = 0] = \"DefaultView\";\n PageType[PageType[\"NormalView\"] = 1] = \"NormalView\";\n PageType[PageType[\"DialogView\"] = 2] = \"DialogView\";\n PageType[PageType[\"View\"] = 3] = \"View\";\n PageType[PageType[\"DisplayForm\"] = 4] = \"DisplayForm\";\n PageType[PageType[\"DisplayFormDialog\"] = 5] = \"DisplayFormDialog\";\n PageType[PageType[\"EditForm\"] = 6] = \"EditForm\";\n PageType[PageType[\"EditFormDialog\"] = 7] = \"EditFormDialog\";\n PageType[PageType[\"NewForm\"] = 8] = \"NewForm\";\n PageType[PageType[\"NewFormDialog\"] = 9] = \"NewFormDialog\";\n PageType[PageType[\"SolutionForm\"] = 10] = \"SolutionForm\";\n PageType[PageType[\"PAGE_MAXITEMS\"] = 11] = \"PAGE_MAXITEMS\";\n})(PageType = exports.PageType || (exports.PageType = {}));\nvar SharingLinkKind;\n(function (SharingLinkKind) {\n /**\n * Uninitialized link\n */\n SharingLinkKind[SharingLinkKind[\"Uninitialized\"] = 0] = \"Uninitialized\";\n /**\n * Direct link to the object being shared\n */\n SharingLinkKind[SharingLinkKind[\"Direct\"] = 1] = \"Direct\";\n /**\n * Organization-shareable link to the object being shared with view permissions\n */\n SharingLinkKind[SharingLinkKind[\"OrganizationView\"] = 2] = \"OrganizationView\";\n /**\n * Organization-shareable link to the object being shared with edit permissions\n */\n SharingLinkKind[SharingLinkKind[\"OrganizationEdit\"] = 3] = \"OrganizationEdit\";\n /**\n * View only anonymous link\n */\n SharingLinkKind[SharingLinkKind[\"AnonymousView\"] = 4] = \"AnonymousView\";\n /**\n * Read/Write anonymous link\n */\n SharingLinkKind[SharingLinkKind[\"AnonymousEdit\"] = 5] = \"AnonymousEdit\";\n /**\n * Flexible sharing Link where properties can change without affecting link URL\n */\n SharingLinkKind[SharingLinkKind[\"Flexible\"] = 6] = \"Flexible\";\n})(SharingLinkKind = exports.SharingLinkKind || (exports.SharingLinkKind = {}));\n/**\n * Indicates the role of the sharing link\n */\nvar SharingRole;\n(function (SharingRole) {\n SharingRole[SharingRole[\"None\"] = 0] = \"None\";\n SharingRole[SharingRole[\"View\"] = 1] = \"View\";\n SharingRole[SharingRole[\"Edit\"] = 2] = \"Edit\";\n SharingRole[SharingRole[\"Owner\"] = 3] = \"Owner\";\n})(SharingRole = exports.SharingRole || (exports.SharingRole = {}));\nvar SharingOperationStatusCode;\n(function (SharingOperationStatusCode) {\n /**\n * The share operation completed without errors.\n */\n SharingOperationStatusCode[SharingOperationStatusCode[\"CompletedSuccessfully\"] = 0] = \"CompletedSuccessfully\";\n /**\n * The share operation completed and generated requests for access.\n */\n SharingOperationStatusCode[SharingOperationStatusCode[\"AccessRequestsQueued\"] = 1] = \"AccessRequestsQueued\";\n /**\n * The share operation failed as there were no resolved users.\n */\n SharingOperationStatusCode[SharingOperationStatusCode[\"NoResolvedUsers\"] = -1] = \"NoResolvedUsers\";\n /**\n * The share operation failed due to insufficient permissions.\n */\n SharingOperationStatusCode[SharingOperationStatusCode[\"AccessDenied\"] = -2] = \"AccessDenied\";\n /**\n * The share operation failed when attempting a cross site share, which is not supported.\n */\n SharingOperationStatusCode[SharingOperationStatusCode[\"CrossSiteRequestNotSupported\"] = -3] = \"CrossSiteRequestNotSupported\";\n /**\n * The sharing operation failed due to an unknown error.\n */\n SharingOperationStatusCode[SharingOperationStatusCode[\"UnknowError\"] = -4] = \"UnknowError\";\n /**\n * The text you typed is too long. Please shorten it.\n */\n SharingOperationStatusCode[SharingOperationStatusCode[\"EmailBodyTooLong\"] = -5] = \"EmailBodyTooLong\";\n /**\n * The maximum number of unique scopes in the list has been exceeded.\n */\n SharingOperationStatusCode[SharingOperationStatusCode[\"ListUniqueScopesExceeded\"] = -6] = \"ListUniqueScopesExceeded\";\n /**\n * The share operation failed because a sharing capability is disabled in the site.\n */\n SharingOperationStatusCode[SharingOperationStatusCode[\"CapabilityDisabled\"] = -7] = \"CapabilityDisabled\";\n /**\n * The specified object for the share operation is not supported.\n */\n SharingOperationStatusCode[SharingOperationStatusCode[\"ObjectNotSupported\"] = -8] = \"ObjectNotSupported\";\n /**\n * A SharePoint group cannot contain another SharePoint group.\n */\n SharingOperationStatusCode[SharingOperationStatusCode[\"NestedGroupsNotSupported\"] = -9] = \"NestedGroupsNotSupported\";\n})(SharingOperationStatusCode = exports.SharingOperationStatusCode || (exports.SharingOperationStatusCode = {}));\nvar SPSharedObjectType;\n(function (SPSharedObjectType) {\n SPSharedObjectType[SPSharedObjectType[\"Unknown\"] = 0] = \"Unknown\";\n SPSharedObjectType[SPSharedObjectType[\"File\"] = 1] = \"File\";\n SPSharedObjectType[SPSharedObjectType[\"Folder\"] = 2] = \"Folder\";\n SPSharedObjectType[SPSharedObjectType[\"Item\"] = 3] = \"Item\";\n SPSharedObjectType[SPSharedObjectType[\"List\"] = 4] = \"List\";\n SPSharedObjectType[SPSharedObjectType[\"Web\"] = 5] = \"Web\";\n SPSharedObjectType[SPSharedObjectType[\"Max\"] = 6] = \"Max\";\n})(SPSharedObjectType = exports.SPSharedObjectType || (exports.SPSharedObjectType = {}));\nvar SharingDomainRestrictionMode;\n(function (SharingDomainRestrictionMode) {\n SharingDomainRestrictionMode[SharingDomainRestrictionMode[\"None\"] = 0] = \"None\";\n SharingDomainRestrictionMode[SharingDomainRestrictionMode[\"AllowList\"] = 1] = \"AllowList\";\n SharingDomainRestrictionMode[SharingDomainRestrictionMode[\"BlockList\"] = 2] = \"BlockList\";\n})(SharingDomainRestrictionMode = exports.SharingDomainRestrictionMode || (exports.SharingDomainRestrictionMode = {}));\nvar RenderListDataOptions;\n(function (RenderListDataOptions) {\n RenderListDataOptions[RenderListDataOptions[\"None\"] = 0] = \"None\";\n RenderListDataOptions[RenderListDataOptions[\"ContextInfo\"] = 1] = \"ContextInfo\";\n RenderListDataOptions[RenderListDataOptions[\"ListData\"] = 2] = \"ListData\";\n RenderListDataOptions[RenderListDataOptions[\"ListSchema\"] = 4] = \"ListSchema\";\n RenderListDataOptions[RenderListDataOptions[\"MenuView\"] = 8] = \"MenuView\";\n})(RenderListDataOptions = exports.RenderListDataOptions || (exports.RenderListDataOptions = {}));\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/sharepoint/types.js\n// module id = 18\n// module chunks = 0","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar sharepointqueryable_1 = require(\"./sharepointqueryable\");\nvar sharepointqueryableshareable_1 = require(\"./sharepointqueryableshareable\");\nvar files_1 = require(\"./files\");\nvar util_1 = require(\"../utils/util\");\nvar odata_1 = require(\"./odata\");\nvar items_1 = require(\"./items\");\n/**\n * Describes a collection of Folder objects\n *\n */\nvar Folders = /** @class */ (function (_super) {\n __extends(Folders, _super);\n /**\n * Creates a new instance of the Folders class\n *\n * @param baseUrl The url or SharePointQueryable which forms the parent of this fields collection\n */\n function Folders(baseUrl, path) {\n if (path === void 0) { path = \"folders\"; }\n return _super.call(this, baseUrl, path) || this;\n }\n /**\n * Gets a folder by folder name\n *\n */\n Folders.prototype.getByName = function (name) {\n var f = new Folder(this);\n f.concat(\"('\" + name + \"')\");\n return f;\n };\n /**\n * Adds a new folder to the current folder (relative) or any folder (absolute)\n *\n * @param url The relative or absolute url where the new folder will be created. Urls starting with a forward slash are absolute.\n * @returns The new Folder and the raw response.\n */\n Folders.prototype.add = function (url) {\n var _this = this;\n return this.clone(Folders, \"add('\" + url + \"')\").postCore().then(function (response) {\n return {\n data: response,\n folder: _this.getByName(url),\n };\n });\n };\n return Folders;\n}(sharepointqueryable_1.SharePointQueryableCollection));\nexports.Folders = Folders;\n/**\n * Describes a single Folder instance\n *\n */\nvar Folder = /** @class */ (function (_super) {\n __extends(Folder, _super);\n function Folder() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n Object.defineProperty(Folder.prototype, \"contentTypeOrder\", {\n /**\n * Specifies the sequence in which content types are displayed.\n *\n */\n get: function () {\n return new sharepointqueryable_1.SharePointQueryableCollection(this, \"contentTypeOrder\");\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Folder.prototype, \"files\", {\n /**\n * Gets this folder's files\n *\n */\n get: function () {\n return new files_1.Files(this);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Folder.prototype, \"folders\", {\n /**\n * Gets this folder's sub folders\n *\n */\n get: function () {\n return new Folders(this);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Folder.prototype, \"listItemAllFields\", {\n /**\n * Gets this folder's list item field values\n *\n */\n get: function () {\n return new sharepointqueryable_1.SharePointQueryableCollection(this, \"listItemAllFields\");\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Folder.prototype, \"parentFolder\", {\n /**\n * Gets the parent folder, if available\n *\n */\n get: function () {\n return new Folder(this, \"parentFolder\");\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Folder.prototype, \"properties\", {\n /**\n * Gets this folder's properties\n *\n */\n get: function () {\n return new sharepointqueryable_1.SharePointQueryableInstance(this, \"properties\");\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Folder.prototype, \"serverRelativeUrl\", {\n /**\n * Gets this folder's server relative url\n *\n */\n get: function () {\n return new sharepointqueryable_1.SharePointQueryable(this, \"serverRelativeUrl\");\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Folder.prototype, \"uniqueContentTypeOrder\", {\n /**\n * Gets a value that specifies the content type order.\n *\n */\n get: function () {\n return new sharepointqueryable_1.SharePointQueryableCollection(this, \"uniqueContentTypeOrder\");\n },\n enumerable: true,\n configurable: true\n });\n Folder.prototype.update = function (properties) {\n var _this = this;\n var postBody = JSON.stringify(util_1.Util.extend({\n \"__metadata\": { \"type\": \"SP.Folder\" },\n }, properties));\n return this.postCore({\n body: postBody,\n headers: {\n \"X-HTTP-Method\": \"MERGE\",\n },\n }).then(function (data) {\n return {\n data: data,\n folder: _this,\n };\n });\n };\n /**\n * Delete this folder\n *\n * @param eTag Value used in the IF-Match header, by default \"*\"\n */\n Folder.prototype.delete = function (eTag) {\n if (eTag === void 0) { eTag = \"*\"; }\n return this.clone(Folder, null).postCore({\n headers: {\n \"IF-Match\": eTag,\n \"X-HTTP-Method\": \"DELETE\",\n },\n });\n };\n /**\n * Moves the folder to the Recycle Bin and returns the identifier of the new Recycle Bin item.\n */\n Folder.prototype.recycle = function () {\n return this.clone(Folder, \"recycle\").postCore();\n };\n /**\n * Gets the associated list item for this folder, loading the default properties\n */\n Folder.prototype.getItem = function () {\n var selects = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n selects[_i] = arguments[_i];\n }\n var q = this.listItemAllFields;\n return q.select.apply(q, selects).get().then(function (d) {\n return util_1.Util.extend(new items_1.Item(odata_1.spGetEntityUrl(d)), d);\n });\n };\n return Folder;\n}(sharepointqueryableshareable_1.SharePointQueryableShareableFolder));\nexports.Folder = Folder;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/sharepoint/folders.js\n// module id = 19\n// module chunks = 0","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar util_1 = require(\"../utils/util\");\nvar sharepointqueryable_1 = require(\"./sharepointqueryable\");\n/**\n * Describes a collection of content types\n *\n */\nvar ContentTypes = /** @class */ (function (_super) {\n __extends(ContentTypes, _super);\n /**\n * Creates a new instance of the ContentTypes class\n *\n * @param baseUrl The url or SharePointQueryable which forms the parent of this content types collection\n */\n function ContentTypes(baseUrl, path) {\n if (path === void 0) { path = \"contenttypes\"; }\n return _super.call(this, baseUrl, path) || this;\n }\n /**\n * Gets a ContentType by content type id\n */\n ContentTypes.prototype.getById = function (id) {\n var ct = new ContentType(this);\n ct.concat(\"('\" + id + \"')\");\n return ct;\n };\n /**\n * Adds an existing contenttype to a content type collection\n *\n * @param contentTypeId in the following format, for example: 0x010102\n */\n ContentTypes.prototype.addAvailableContentType = function (contentTypeId) {\n var _this = this;\n var postBody = JSON.stringify({\n \"contentTypeId\": contentTypeId,\n });\n return this.clone(ContentTypes, \"addAvailableContentType\").postAsCore({ body: postBody }).then(function (data) {\n return {\n contentType: _this.getById(data.id),\n data: data,\n };\n });\n };\n /**\n * Adds a new content type to the collection\n *\n * @param id The desired content type id for the new content type (also determines the parent content type)\n * @param name The name of the content type\n * @param description The description of the content type\n * @param group The group in which to add the content type\n * @param additionalSettings Any additional settings to provide when creating the content type\n *\n */\n ContentTypes.prototype.add = function (id, name, description, group, additionalSettings) {\n var _this = this;\n if (description === void 0) { description = \"\"; }\n if (group === void 0) { group = \"Custom Content Types\"; }\n if (additionalSettings === void 0) { additionalSettings = {}; }\n var postBody = JSON.stringify(util_1.Util.extend({\n \"Description\": description,\n \"Group\": group,\n \"Id\": { \"StringValue\": id },\n \"Name\": name,\n \"__metadata\": { \"type\": \"SP.ContentType\" },\n }, additionalSettings));\n return this.postCore({ body: postBody }).then(function (data) {\n return { contentType: _this.getById(data.id), data: data };\n });\n };\n return ContentTypes;\n}(sharepointqueryable_1.SharePointQueryableCollection));\nexports.ContentTypes = ContentTypes;\n/**\n * Describes a single ContentType instance\n *\n */\nvar ContentType = /** @class */ (function (_super) {\n __extends(ContentType, _super);\n function ContentType() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n Object.defineProperty(ContentType.prototype, \"fieldLinks\", {\n /**\n * Gets the column (also known as field) references in the content type.\n */\n get: function () {\n return new FieldLinks(this);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(ContentType.prototype, \"fields\", {\n /**\n * Gets a value that specifies the collection of fields for the content type.\n */\n get: function () {\n return new sharepointqueryable_1.SharePointQueryableCollection(this, \"fields\");\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(ContentType.prototype, \"parent\", {\n /**\n * Gets the parent content type of the content type.\n */\n get: function () {\n return new ContentType(this, \"parent\");\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(ContentType.prototype, \"workflowAssociations\", {\n /**\n * Gets a value that specifies the collection of workflow associations for the content type.\n */\n get: function () {\n return new sharepointqueryable_1.SharePointQueryableCollection(this, \"workflowAssociations\");\n },\n enumerable: true,\n configurable: true\n });\n /**\n * Delete this content type\n */\n ContentType.prototype.delete = function () {\n return this.postCore({\n headers: {\n \"X-HTTP-Method\": \"DELETE\",\n },\n });\n };\n return ContentType;\n}(sharepointqueryable_1.SharePointQueryableInstance));\nexports.ContentType = ContentType;\n/**\n * Represents a collection of field link instances\n */\nvar FieldLinks = /** @class */ (function (_super) {\n __extends(FieldLinks, _super);\n /**\n * Creates a new instance of the ContentType class\n *\n * @param baseUrl The url or SharePointQueryable which forms the parent of this content type instance\n */\n function FieldLinks(baseUrl, path) {\n if (path === void 0) { path = \"fieldlinks\"; }\n return _super.call(this, baseUrl, path) || this;\n }\n /**\n * Gets a FieldLink by GUID id\n *\n * @param id The GUID id of the field link\n */\n FieldLinks.prototype.getById = function (id) {\n var fl = new FieldLink(this);\n fl.concat(\"(guid'\" + id + \"')\");\n return fl;\n };\n return FieldLinks;\n}(sharepointqueryable_1.SharePointQueryableCollection));\nexports.FieldLinks = FieldLinks;\n/**\n * Represents a field link instance\n */\nvar FieldLink = /** @class */ (function (_super) {\n __extends(FieldLink, _super);\n function FieldLink() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n return FieldLink;\n}(sharepointqueryable_1.SharePointQueryableInstance));\nexports.FieldLink = FieldLink;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/sharepoint/contenttypes.js\n// module id = 20\n// module chunks = 0","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar sharepointqueryable_1 = require(\"./sharepointqueryable\");\nvar util_1 = require(\"../utils/util\");\n/**\n * Describes a collection of user custom actions\n *\n */\nvar UserCustomActions = /** @class */ (function (_super) {\n __extends(UserCustomActions, _super);\n /**\n * Creates a new instance of the UserCustomActions class\n *\n * @param baseUrl The url or SharePointQueryable which forms the parent of this user custom actions collection\n */\n function UserCustomActions(baseUrl, path) {\n if (path === void 0) { path = \"usercustomactions\"; }\n return _super.call(this, baseUrl, path) || this;\n }\n /**\n * Returns the user custom action with the specified id\n *\n * @param id The GUID id of the user custom action to retrieve\n */\n UserCustomActions.prototype.getById = function (id) {\n var uca = new UserCustomAction(this);\n uca.concat(\"('\" + id + \"')\");\n return uca;\n };\n /**\n * Creates a user custom action\n *\n * @param properties The information object of property names and values which define the new user custom action\n *\n */\n UserCustomActions.prototype.add = function (properties) {\n var _this = this;\n var postBody = JSON.stringify(util_1.Util.extend({ __metadata: { \"type\": \"SP.UserCustomAction\" } }, properties));\n return this.postCore({ body: postBody }).then(function (data) {\n return {\n action: _this.getById(data.Id),\n data: data,\n };\n });\n };\n /**\n * Deletes all user custom actions in the collection\n *\n */\n UserCustomActions.prototype.clear = function () {\n return this.clone(UserCustomActions, \"clear\").postCore();\n };\n return UserCustomActions;\n}(sharepointqueryable_1.SharePointQueryableCollection));\nexports.UserCustomActions = UserCustomActions;\n/**\n * Describes a single user custom action\n *\n */\nvar UserCustomAction = /** @class */ (function (_super) {\n __extends(UserCustomAction, _super);\n function UserCustomAction() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n /**\n * Updates this user custom action with the supplied properties\n *\n * @param properties An information object of property names and values to update for this user custom action\n */\n UserCustomAction.prototype.update = function (properties) {\n var _this = this;\n var postBody = JSON.stringify(util_1.Util.extend({\n \"__metadata\": { \"type\": \"SP.UserCustomAction\" },\n }, properties));\n return this.postCore({\n body: postBody,\n headers: {\n \"X-HTTP-Method\": \"MERGE\",\n },\n }).then(function (data) {\n return {\n action: _this,\n data: data,\n };\n });\n };\n /**\n * Removes this user custom action\n *\n */\n UserCustomAction.prototype.delete = function () {\n return _super.prototype.deleteCore.call(this);\n };\n return UserCustomAction;\n}(sharepointqueryable_1.SharePointQueryableInstance));\nexports.UserCustomAction = UserCustomAction;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/sharepoint/usercustomactions.js\n// module id = 21\n// module chunks = 0","var g;\r\n\r\n// This works in non-strict mode\r\ng = (function() {\r\n\treturn this;\r\n})();\r\n\r\ntry {\r\n\t// This works if eval is allowed (see CSP)\r\n\tg = g || Function(\"return this\")() || (1,eval)(\"this\");\r\n} catch(e) {\r\n\t// This works if the window reference is available\r\n\tif(typeof window === \"object\")\r\n\t\tg = window;\r\n}\r\n\r\n// g can still be undefined, but nothing to do about it...\r\n// We return undefined, instead of nothing here, so it's\r\n// easier to handle this case. if(!global) { ...}\r\n\r\nmodule.exports = g;\r\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// (webpack)/buildin/global.js\n// module id = 22\n// module chunks = 0","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar util_1 = require(\"./util\");\nvar collections_1 = require(\"../collections/collections\");\nvar pnplibconfig_1 = require(\"../configuration/pnplibconfig\");\nvar logging_1 = require(\"./logging\");\n/**\n * A wrapper class to provide a consistent interface to browser based storage\n *\n */\nvar PnPClientStorageWrapper = /** @class */ (function () {\n /**\n * Creates a new instance of the PnPClientStorageWrapper class\n *\n * @constructor\n */\n function PnPClientStorageWrapper(store, defaultTimeoutMinutes) {\n this.store = store;\n this.defaultTimeoutMinutes = defaultTimeoutMinutes;\n this.defaultTimeoutMinutes = (defaultTimeoutMinutes === void 0) ? -1 : defaultTimeoutMinutes;\n this.enabled = this.test();\n // if the cache timeout is enabled call the handler\n // this will clear any expired items and set the timeout function\n if (pnplibconfig_1.RuntimeConfig.enableCacheExpiration) {\n logging_1.Logger.write(\"Enabling cache expiration.\", logging_1.LogLevel.Info);\n this.cacheExpirationHandler();\n }\n }\n /**\n * Get a value from storage, or null if that value does not exist\n *\n * @param key The key whose value we want to retrieve\n */\n PnPClientStorageWrapper.prototype.get = function (key) {\n if (!this.enabled) {\n return null;\n }\n var o = this.store.getItem(key);\n if (o == null) {\n return null;\n }\n var persistable = JSON.parse(o);\n if (new Date(persistable.expiration) <= new Date()) {\n logging_1.Logger.write(\"Removing item with key '\" + key + \"' from cache due to expiration.\", logging_1.LogLevel.Info);\n this.delete(key);\n return null;\n }\n else {\n return persistable.value;\n }\n };\n /**\n * Adds a value to the underlying storage\n *\n * @param key The key to use when storing the provided value\n * @param o The value to store\n * @param expire Optional, if provided the expiration of the item, otherwise the default is used\n */\n PnPClientStorageWrapper.prototype.put = function (key, o, expire) {\n if (this.enabled) {\n this.store.setItem(key, this.createPersistable(o, expire));\n }\n };\n /**\n * Deletes a value from the underlying storage\n *\n * @param key The key of the pair we want to remove from storage\n */\n PnPClientStorageWrapper.prototype.delete = function (key) {\n if (this.enabled) {\n this.store.removeItem(key);\n }\n };\n /**\n * Gets an item from the underlying storage, or adds it if it does not exist using the supplied getter function\n *\n * @param key The key to use when storing the provided value\n * @param getter A function which will upon execution provide the desired value\n * @param expire Optional, if provided the expiration of the item, otherwise the default is used\n */\n PnPClientStorageWrapper.prototype.getOrPut = function (key, getter, expire) {\n var _this = this;\n if (!this.enabled) {\n return getter();\n }\n return new Promise(function (resolve) {\n var o = _this.get(key);\n if (o == null) {\n getter().then(function (d) {\n _this.put(key, d, expire);\n resolve(d);\n });\n }\n else {\n resolve(o);\n }\n });\n };\n /**\n * Deletes any expired items placed in the store by the pnp library, leaves other items untouched\n */\n PnPClientStorageWrapper.prototype.deleteExpired = function () {\n var _this = this;\n return new Promise(function (resolve, reject) {\n if (!_this.enabled) {\n resolve();\n }\n try {\n for (var i = 0; i < _this.store.length; i++) {\n var key = _this.store.key(i);\n // test the stored item to see if we stored it\n if (/[\"|']?pnp[\"|']? ?: ?1/i.test(_this.store.getItem(key))) {\n // get those items as get will delete from cache if they are expired\n _this.get(key);\n }\n }\n resolve();\n }\n catch (e) {\n reject(e);\n }\n });\n };\n /**\n * Used to determine if the wrapped storage is available currently\n */\n PnPClientStorageWrapper.prototype.test = function () {\n var str = \"test\";\n try {\n this.store.setItem(str, str);\n this.store.removeItem(str);\n return true;\n }\n catch (e) {\n return false;\n }\n };\n /**\n * Creates the persistable to store\n */\n PnPClientStorageWrapper.prototype.createPersistable = function (o, expire) {\n if (typeof expire === \"undefined\") {\n // ensure we are by default inline with the global library setting\n var defaultTimeout = pnplibconfig_1.RuntimeConfig.defaultCachingTimeoutSeconds;\n if (this.defaultTimeoutMinutes > 0) {\n defaultTimeout = this.defaultTimeoutMinutes * 60;\n }\n expire = util_1.Util.dateAdd(new Date(), \"second\", defaultTimeout);\n }\n return JSON.stringify({ pnp: 1, expiration: expire, value: o });\n };\n /**\n * Deletes expired items added by this library in this.store and sets a timeout to call itself\n */\n PnPClientStorageWrapper.prototype.cacheExpirationHandler = function () {\n var _this = this;\n logging_1.Logger.write(\"Called cache expiration handler.\", logging_1.LogLevel.Verbose);\n this.deleteExpired().then(function (_) {\n // call ourself in the future\n setTimeout(util_1.Util.getCtxCallback(_this, _this.cacheExpirationHandler), pnplibconfig_1.RuntimeConfig.cacheExpirationIntervalMilliseconds);\n }).catch(function (e) {\n // we've got some error - so just stop the loop and report the error\n logging_1.Logger.log({\n data: e,\n level: logging_1.LogLevel.Error,\n message: \"Error deleting expired cache entries, see data for details. Timeout not reset.\",\n });\n });\n };\n return PnPClientStorageWrapper;\n}());\nexports.PnPClientStorageWrapper = PnPClientStorageWrapper;\n/**\n * A thin implementation of in-memory storage for use in nodejs\n */\nvar MemoryStorage = /** @class */ (function () {\n function MemoryStorage(_store) {\n if (_store === void 0) { _store = new collections_1.Dictionary(); }\n this._store = _store;\n }\n Object.defineProperty(MemoryStorage.prototype, \"length\", {\n get: function () {\n return this._store.count();\n },\n enumerable: true,\n configurable: true\n });\n MemoryStorage.prototype.clear = function () {\n this._store.clear();\n };\n MemoryStorage.prototype.getItem = function (key) {\n return this._store.get(key);\n };\n MemoryStorage.prototype.key = function (index) {\n return this._store.getKeys()[index];\n };\n MemoryStorage.prototype.removeItem = function (key) {\n this._store.remove(key);\n };\n MemoryStorage.prototype.setItem = function (key, data) {\n this._store.add(key, data);\n };\n return MemoryStorage;\n}());\n/**\n * A class that will establish wrappers for both local and session storage\n */\nvar PnPClientStorage = /** @class */ (function () {\n /**\n * Creates a new instance of the PnPClientStorage class\n *\n * @constructor\n */\n function PnPClientStorage(_local, _session) {\n if (_local === void 0) { _local = null; }\n if (_session === void 0) { _session = null; }\n this._local = _local;\n this._session = _session;\n }\n Object.defineProperty(PnPClientStorage.prototype, \"local\", {\n /**\n * Provides access to the local storage of the browser\n */\n get: function () {\n if (this._local === null) {\n this._local = typeof localStorage !== \"undefined\" ? new PnPClientStorageWrapper(localStorage) : new PnPClientStorageWrapper(new MemoryStorage());\n }\n return this._local;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PnPClientStorage.prototype, \"session\", {\n /**\n * Provides access to the session storage of the browser\n */\n get: function () {\n if (this._session === null) {\n this._session = typeof sessionStorage !== \"undefined\" ? new PnPClientStorageWrapper(sessionStorage) : new PnPClientStorageWrapper(new MemoryStorage());\n }\n return this._session;\n },\n enumerable: true,\n configurable: true\n });\n return PnPClientStorage;\n}());\nexports.PnPClientStorage = PnPClientStorage;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/utils/storage.js\n// module id = 23\n// module chunks = 0","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar util_1 = require(\"../utils/util\");\nvar utils_1 = require(\"../net/utils\");\nvar parsers_1 = require(\"../odata/parsers\");\nvar pnplibconfig_1 = require(\"../configuration/pnplibconfig\");\nvar pipeline_1 = require(\"../request/pipeline\");\nvar ODataQueryable = /** @class */ (function () {\n function ODataQueryable() {\n }\n /**\n * Directly concatonates the supplied string to the current url, not normalizing \"/\" chars\n *\n * @param pathPart The string to concatonate to the url\n */\n ODataQueryable.prototype.concat = function (pathPart) {\n this._url += pathPart;\n return this;\n };\n /**\n * Appends the given string and normalizes \"/\" chars\n *\n * @param pathPart The string to append\n */\n ODataQueryable.prototype.append = function (pathPart) {\n this._url = util_1.Util.combinePaths(this._url, pathPart);\n };\n Object.defineProperty(ODataQueryable.prototype, \"parentUrl\", {\n /**\n * Gets the parent url used when creating this instance\n *\n */\n get: function () {\n return this._parentUrl;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(ODataQueryable.prototype, \"query\", {\n /**\n * Provides access to the query builder for this url\n *\n */\n get: function () {\n return this._query;\n },\n enumerable: true,\n configurable: true\n });\n /**\n * Sets custom options for current object and all derived objects accessible via chaining\n *\n * @param options custom options\n */\n ODataQueryable.prototype.configure = function (options) {\n utils_1.mergeOptions(this._options, options);\n return this;\n };\n /**\n * Enables caching for this request\n *\n * @param options Defines the options used when caching this request\n */\n ODataQueryable.prototype.usingCaching = function (options) {\n if (!pnplibconfig_1.RuntimeConfig.globalCacheDisable) {\n this._useCaching = true;\n this._cachingOptions = options;\n }\n return this;\n };\n /**\n * Gets the currentl url, made absolute based on the availability of the _spPageContextInfo object\n *\n */\n ODataQueryable.prototype.toUrl = function () {\n return this._url;\n };\n /**\n * Executes the currently built request\n *\n * @param parser Allows you to specify a parser to handle the result\n * @param getOptions The options used for this request\n */\n ODataQueryable.prototype.get = function (parser, options) {\n if (parser === void 0) { parser = new parsers_1.ODataDefaultParser(); }\n if (options === void 0) { options = {}; }\n return this.toRequestContext(\"GET\", options, parser, pipeline_1.PipelineMethods.default).then(function (context) { return pipeline_1.pipe(context); });\n };\n ODataQueryable.prototype.getAs = function (parser, options) {\n if (parser === void 0) { parser = new parsers_1.ODataDefaultParser(); }\n if (options === void 0) { options = {}; }\n return this.toRequestContext(\"GET\", options, parser, pipeline_1.PipelineMethods.default).then(function (context) { return pipeline_1.pipe(context); });\n };\n ODataQueryable.prototype.postCore = function (options, parser) {\n if (options === void 0) { options = {}; }\n if (parser === void 0) { parser = new parsers_1.ODataDefaultParser(); }\n return this.toRequestContext(\"POST\", options, parser, pipeline_1.PipelineMethods.default).then(function (context) { return pipeline_1.pipe(context); });\n };\n ODataQueryable.prototype.postAsCore = function (options, parser) {\n if (options === void 0) { options = {}; }\n if (parser === void 0) { parser = new parsers_1.ODataDefaultParser(); }\n return this.toRequestContext(\"POST\", options, parser, pipeline_1.PipelineMethods.default).then(function (context) { return pipeline_1.pipe(context); });\n };\n ODataQueryable.prototype.patchCore = function (options, parser) {\n if (options === void 0) { options = {}; }\n if (parser === void 0) { parser = new parsers_1.ODataDefaultParser(); }\n return this.toRequestContext(\"PATCH\", options, parser, pipeline_1.PipelineMethods.default).then(function (context) { return pipeline_1.pipe(context); });\n };\n ODataQueryable.prototype.deleteCore = function (options, parser) {\n if (options === void 0) { options = {}; }\n if (parser === void 0) { parser = new parsers_1.ODataDefaultParser(); }\n return this.toRequestContext(\"DELETE\", options, parser, pipeline_1.PipelineMethods.default).then(function (context) { return pipeline_1.pipe(context); });\n };\n return ODataQueryable;\n}());\nexports.ODataQueryable = ODataQueryable;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/odata/queryable.js\n// module id = 24\n// module chunks = 0","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar digestcache_1 = require(\"./digestcache\");\nvar util_1 = require(\"../utils/util\");\nvar pnplibconfig_1 = require(\"../configuration/pnplibconfig\");\nvar exceptions_1 = require(\"../utils/exceptions\");\nvar utils_1 = require(\"./utils\");\nvar HttpClient = /** @class */ (function () {\n function HttpClient() {\n this._impl = pnplibconfig_1.RuntimeConfig.spFetchClientFactory();\n this._digestCache = new digestcache_1.DigestCache(this);\n }\n HttpClient.prototype.fetch = function (url, options) {\n var _this = this;\n if (options === void 0) { options = {}; }\n var opts = util_1.Util.extend(options, { cache: \"no-cache\", credentials: \"same-origin\" }, true);\n var headers = new Headers();\n // first we add the global headers so they can be overwritten by any passed in locally to this call\n utils_1.mergeHeaders(headers, pnplibconfig_1.RuntimeConfig.spHeaders);\n // second we add the local options so we can overwrite the globals\n utils_1.mergeHeaders(headers, options.headers);\n // lastly we apply any default headers we need that may not exist\n if (!headers.has(\"Accept\")) {\n headers.append(\"Accept\", \"application/json\");\n }\n if (!headers.has(\"Content-Type\")) {\n headers.append(\"Content-Type\", \"application/json;odata=verbose;charset=utf-8\");\n }\n if (!headers.has(\"X-ClientService-ClientTag\")) {\n headers.append(\"X-ClientService-ClientTag\", \"PnPCoreJS:3.0.0\");\n }\n opts = util_1.Util.extend(opts, { headers: headers });\n if (opts.method && opts.method.toUpperCase() !== \"GET\") {\n // if we have either a request digest or an authorization header we don't need a digest\n if (!headers.has(\"X-RequestDigest\") && !headers.has(\"Authorization\")) {\n var index = url.indexOf(\"_api/\");\n if (index < 0) {\n throw new exceptions_1.APIUrlException();\n }\n var webUrl = url.substr(0, index);\n return this._digestCache.getDigest(webUrl)\n .then(function (digest) {\n headers.append(\"X-RequestDigest\", digest);\n return _this.fetchRaw(url, opts);\n });\n }\n }\n return this.fetchRaw(url, opts);\n };\n HttpClient.prototype.fetchRaw = function (url, options) {\n var _this = this;\n if (options === void 0) { options = {}; }\n // here we need to normalize the headers\n var rawHeaders = new Headers();\n utils_1.mergeHeaders(rawHeaders, options.headers);\n options = util_1.Util.extend(options, { headers: rawHeaders });\n var retry = function (ctx) {\n _this._impl.fetch(url, options).then(function (response) { return ctx.resolve(response); }).catch(function (response) {\n // Check if request was throttled - http status code 429\n // Check if request failed due to server unavailable - http status code 503\n if (response.status !== 429 && response.status !== 503) {\n ctx.reject(response);\n }\n // grab our current delay\n var delay = ctx.delay;\n // Increment our counters.\n ctx.delay *= 2;\n ctx.attempts++;\n // If we have exceeded the retry count, reject.\n if (ctx.retryCount <= ctx.attempts) {\n ctx.reject(response);\n }\n // Set our retry timeout for {delay} milliseconds.\n setTimeout(util_1.Util.getCtxCallback(_this, retry, ctx), delay);\n });\n };\n return new Promise(function (resolve, reject) {\n var retryContext = {\n attempts: 0,\n delay: 100,\n reject: reject,\n resolve: resolve,\n retryCount: 7,\n };\n retry.call(_this, retryContext);\n });\n };\n HttpClient.prototype.get = function (url, options) {\n if (options === void 0) { options = {}; }\n var opts = util_1.Util.extend(options, { method: \"GET\" });\n return this.fetch(url, opts);\n };\n HttpClient.prototype.post = function (url, options) {\n if (options === void 0) { options = {}; }\n var opts = util_1.Util.extend(options, { method: \"POST\" });\n return this.fetch(url, opts);\n };\n HttpClient.prototype.patch = function (url, options) {\n if (options === void 0) { options = {}; }\n var opts = util_1.Util.extend(options, { method: \"PATCH\" });\n return this.fetch(url, opts);\n };\n HttpClient.prototype.delete = function (url, options) {\n if (options === void 0) { options = {}; }\n var opts = util_1.Util.extend(options, { method: \"DELETE\" });\n return this.fetch(url, opts);\n };\n return HttpClient;\n}());\nexports.HttpClient = HttpClient;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/net/httpclient.js\n// module id = 25\n// module chunks = 0","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar webs_1 = require(\"./webs\");\nvar roles_1 = require(\"./roles\");\nvar types_1 = require(\"./types\");\nvar sharepointqueryable_1 = require(\"./sharepointqueryable\");\nvar SharePointQueryableSecurable = /** @class */ (function (_super) {\n __extends(SharePointQueryableSecurable, _super);\n function SharePointQueryableSecurable() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n Object.defineProperty(SharePointQueryableSecurable.prototype, \"roleAssignments\", {\n /**\n * Gets the set of role assignments for this item\n *\n */\n get: function () {\n return new roles_1.RoleAssignments(this);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(SharePointQueryableSecurable.prototype, \"firstUniqueAncestorSecurableObject\", {\n /**\n * Gets the closest securable up the security hierarchy whose permissions are applied to this list item\n *\n */\n get: function () {\n return new sharepointqueryable_1.SharePointQueryableInstance(this, \"FirstUniqueAncestorSecurableObject\");\n },\n enumerable: true,\n configurable: true\n });\n /**\n * Gets the effective permissions for the user supplied\n *\n * @param loginName The claims username for the user (ex: i:0#.f|membership|user@domain.com)\n */\n SharePointQueryableSecurable.prototype.getUserEffectivePermissions = function (loginName) {\n var q = this.clone(sharepointqueryable_1.SharePointQueryable, \"getUserEffectivePermissions(@user)\");\n q.query.add(\"@user\", \"'\" + encodeURIComponent(loginName) + \"'\");\n return q.get().then(function (r) {\n // handle verbose mode\n return r.hasOwnProperty(\"GetUserEffectivePermissions\") ? r.GetUserEffectivePermissions : r;\n });\n };\n /**\n * Gets the effective permissions for the current user\n */\n SharePointQueryableSecurable.prototype.getCurrentUserEffectivePermissions = function () {\n var _this = this;\n var w = webs_1.Web.fromUrl(this.toUrl());\n return w.currentUser.select(\"LoginName\").getAs().then(function (user) {\n return _this.getUserEffectivePermissions(user.LoginName);\n });\n };\n /**\n * Breaks the security inheritance at this level optinally copying permissions and clearing subscopes\n *\n * @param copyRoleAssignments If true the permissions are copied from the current parent scope\n * @param clearSubscopes Optional. true to make all child securable objects inherit role assignments from the current object\n */\n SharePointQueryableSecurable.prototype.breakRoleInheritance = function (copyRoleAssignments, clearSubscopes) {\n if (copyRoleAssignments === void 0) { copyRoleAssignments = false; }\n if (clearSubscopes === void 0) { clearSubscopes = false; }\n return this.clone(SharePointQueryableSecurable, \"breakroleinheritance(copyroleassignments=\" + copyRoleAssignments + \", clearsubscopes=\" + clearSubscopes + \")\").postCore();\n };\n /**\n * Removes the local role assignments so that it re-inherit role assignments from the parent object.\n *\n */\n SharePointQueryableSecurable.prototype.resetRoleInheritance = function () {\n return this.clone(SharePointQueryableSecurable, \"resetroleinheritance\").postCore();\n };\n /**\n * Determines if a given user has the appropriate permissions\n *\n * @param loginName The user to check\n * @param permission The permission being checked\n */\n SharePointQueryableSecurable.prototype.userHasPermissions = function (loginName, permission) {\n var _this = this;\n return this.getUserEffectivePermissions(loginName).then(function (perms) {\n return _this.hasPermissions(perms, permission);\n });\n };\n /**\n * Determines if the current user has the requested permissions\n *\n * @param permission The permission we wish to check\n */\n SharePointQueryableSecurable.prototype.currentUserHasPermissions = function (permission) {\n var _this = this;\n return this.getCurrentUserEffectivePermissions().then(function (perms) {\n return _this.hasPermissions(perms, permission);\n });\n };\n /**\n * Taken from sp.js, checks the supplied permissions against the mask\n *\n * @param value The security principal's permissions on the given object\n * @param perm The permission checked against the value\n */\n /* tslint:disable:no-bitwise */\n SharePointQueryableSecurable.prototype.hasPermissions = function (value, perm) {\n if (!perm) {\n return true;\n }\n if (perm === types_1.PermissionKind.FullMask) {\n return (value.High & 32767) === 32767 && value.Low === 65535;\n }\n perm = perm - 1;\n var num = 1;\n if (perm >= 0 && perm < 32) {\n num = num << perm;\n return 0 !== (value.Low & num);\n }\n else if (perm >= 32 && perm < 64) {\n num = num << perm - 32;\n return 0 !== (value.High & num);\n }\n return false;\n };\n return SharePointQueryableSecurable;\n}(sharepointqueryable_1.SharePointQueryableInstance));\nexports.SharePointQueryableSecurable = SharePointQueryableSecurable;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/sharepoint/sharepointqueryablesecurable.js\n// module id = 26\n// module chunks = 0","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar sharepointqueryable_1 = require(\"./sharepointqueryable\");\nvar sitegroups_1 = require(\"./sitegroups\");\nvar util_1 = require(\"../utils/util\");\n/**\n * Describes a set of role assignments for the current scope\n *\n */\nvar RoleAssignments = /** @class */ (function (_super) {\n __extends(RoleAssignments, _super);\n /**\n * Creates a new instance of the RoleAssignments class\n *\n * @param baseUrl The url or SharePointQueryable which forms the parent of this role assignments collection\n */\n function RoleAssignments(baseUrl, path) {\n if (path === void 0) { path = \"roleassignments\"; }\n return _super.call(this, baseUrl, path) || this;\n }\n /**\n * Adds a new role assignment with the specified principal and role definitions to the collection\n *\n * @param principalId The id of the user or group to assign permissions to\n * @param roleDefId The id of the role definition that defines the permissions to assign\n *\n */\n RoleAssignments.prototype.add = function (principalId, roleDefId) {\n return this.clone(RoleAssignments, \"addroleassignment(principalid=\" + principalId + \", roledefid=\" + roleDefId + \")\").postCore();\n };\n /**\n * Removes the role assignment with the specified principal and role definition from the collection\n *\n * @param principalId The id of the user or group in the role assignment\n * @param roleDefId The id of the role definition in the role assignment\n *\n */\n RoleAssignments.prototype.remove = function (principalId, roleDefId) {\n return this.clone(RoleAssignments, \"removeroleassignment(principalid=\" + principalId + \", roledefid=\" + roleDefId + \")\").postCore();\n };\n /**\n * Gets the role assignment associated with the specified principal id from the collection.\n *\n * @param id The id of the role assignment\n */\n RoleAssignments.prototype.getById = function (id) {\n var ra = new RoleAssignment(this);\n ra.concat(\"(\" + id + \")\");\n return ra;\n };\n return RoleAssignments;\n}(sharepointqueryable_1.SharePointQueryableCollection));\nexports.RoleAssignments = RoleAssignments;\n/**\n * Describes a role assignment\n *\n */\nvar RoleAssignment = /** @class */ (function (_super) {\n __extends(RoleAssignment, _super);\n function RoleAssignment() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n Object.defineProperty(RoleAssignment.prototype, \"groups\", {\n /**\n * Gets the groups that directly belong to the access control list (ACL) for this securable object\n *\n */\n get: function () {\n return new sitegroups_1.SiteGroups(this, \"groups\");\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(RoleAssignment.prototype, \"bindings\", {\n /**\n * Gets the role definition bindings for this role assignment\n *\n */\n get: function () {\n return new RoleDefinitionBindings(this);\n },\n enumerable: true,\n configurable: true\n });\n /**\n * Deletes this role assignment\n *\n */\n RoleAssignment.prototype.delete = function () {\n return this.postCore({\n headers: {\n \"X-HTTP-Method\": \"DELETE\",\n },\n });\n };\n return RoleAssignment;\n}(sharepointqueryable_1.SharePointQueryableInstance));\nexports.RoleAssignment = RoleAssignment;\n/**\n * Describes a collection of role definitions\n *\n */\nvar RoleDefinitions = /** @class */ (function (_super) {\n __extends(RoleDefinitions, _super);\n /**\n * Creates a new instance of the RoleDefinitions class\n *\n * @param baseUrl The url or SharePointQueryable which forms the parent of this role definitions collection\n *\n */\n function RoleDefinitions(baseUrl, path) {\n if (path === void 0) { path = \"roledefinitions\"; }\n return _super.call(this, baseUrl, path) || this;\n }\n /**\n * Gets the role definition with the specified id from the collection\n *\n * @param id The id of the role definition\n *\n */\n RoleDefinitions.prototype.getById = function (id) {\n return new RoleDefinition(this, \"getById(\" + id + \")\");\n };\n /**\n * Gets the role definition with the specified name\n *\n * @param name The name of the role definition\n *\n */\n RoleDefinitions.prototype.getByName = function (name) {\n return new RoleDefinition(this, \"getbyname('\" + name + \"')\");\n };\n /**\n * Gets the role definition with the specified role type\n *\n * @param roleTypeKind The roletypekind of the role definition (None=0, Guest=1, Reader=2, Contributor=3, WebDesigner=4, Administrator=5, Editor=6, System=7)\n *\n */\n RoleDefinitions.prototype.getByType = function (roleTypeKind) {\n return new RoleDefinition(this, \"getbytype(\" + roleTypeKind + \")\");\n };\n /**\n * Creates a role definition\n *\n * @param name The new role definition's name\n * @param description The new role definition's description\n * @param order The order in which the role definition appears\n * @param basePermissions The permissions mask for this role definition\n *\n */\n RoleDefinitions.prototype.add = function (name, description, order, basePermissions) {\n var _this = this;\n var postBody = JSON.stringify({\n BasePermissions: util_1.Util.extend({ __metadata: { type: \"SP.BasePermissions\" } }, basePermissions),\n Description: description,\n Name: name,\n Order: order,\n __metadata: { \"type\": \"SP.RoleDefinition\" },\n });\n return this.postCore({ body: postBody }).then(function (data) {\n return {\n data: data,\n definition: _this.getById(data.Id),\n };\n });\n };\n return RoleDefinitions;\n}(sharepointqueryable_1.SharePointQueryableCollection));\nexports.RoleDefinitions = RoleDefinitions;\n/**\n * Describes a role definition\n *\n */\nvar RoleDefinition = /** @class */ (function (_super) {\n __extends(RoleDefinition, _super);\n function RoleDefinition() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n /**\n * Updates this role definition with the supplied properties\n *\n * @param properties A plain object hash of values to update for the role definition\n */\n /* tslint:disable no-string-literal */\n RoleDefinition.prototype.update = function (properties) {\n var _this = this;\n if (typeof properties.hasOwnProperty(\"BasePermissions\") !== \"undefined\") {\n properties[\"BasePermissions\"] = util_1.Util.extend({ __metadata: { type: \"SP.BasePermissions\" } }, properties[\"BasePermissions\"]);\n }\n var postBody = JSON.stringify(util_1.Util.extend({\n \"__metadata\": { \"type\": \"SP.RoleDefinition\" },\n }, properties));\n return this.postCore({\n body: postBody,\n headers: {\n \"X-HTTP-Method\": \"MERGE\",\n },\n }).then(function (data) {\n var retDef = _this;\n if (properties.hasOwnProperty(\"Name\")) {\n var parent_1 = _this.getParent(RoleDefinitions, _this.parentUrl, \"\");\n retDef = parent_1.getByName(properties[\"Name\"]);\n }\n return {\n data: data,\n definition: retDef,\n };\n });\n };\n /* tslint:enable */\n /**\n * Deletes this role definition\n *\n */\n RoleDefinition.prototype.delete = function () {\n return this.postCore({\n headers: {\n \"X-HTTP-Method\": \"DELETE\",\n },\n });\n };\n return RoleDefinition;\n}(sharepointqueryable_1.SharePointQueryableInstance));\nexports.RoleDefinition = RoleDefinition;\n/**\n * Describes the role definitons bound to a role assignment object\n *\n */\nvar RoleDefinitionBindings = /** @class */ (function (_super) {\n __extends(RoleDefinitionBindings, _super);\n /**\n * Creates a new instance of the RoleDefinitionBindings class\n *\n * @param baseUrl The url or SharePointQueryable which forms the parent of this role definition bindings collection\n */\n function RoleDefinitionBindings(baseUrl, path) {\n if (path === void 0) { path = \"roledefinitionbindings\"; }\n return _super.call(this, baseUrl, path) || this;\n }\n return RoleDefinitionBindings;\n}(sharepointqueryable_1.SharePointQueryableCollection));\nexports.RoleDefinitionBindings = RoleDefinitionBindings;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/sharepoint/roles.js\n// module id = 27\n// module chunks = 0","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar sharepointqueryable_1 = require(\"./sharepointqueryable\");\nvar sitegroups_1 = require(\"./sitegroups\");\nvar util_1 = require(\"../utils/util\");\n/**\n * Describes a collection of all site collection users\n *\n */\nvar SiteUsers = /** @class */ (function (_super) {\n __extends(SiteUsers, _super);\n /**\n * Creates a new instance of the SiteUsers class\n *\n * @param baseUrl The url or SharePointQueryable which forms the parent of this user collection\n */\n function SiteUsers(baseUrl, path) {\n if (path === void 0) { path = \"siteusers\"; }\n return _super.call(this, baseUrl, path) || this;\n }\n /**\n * Gets a user from the collection by email\n *\n * @param email The email address of the user to retrieve\n */\n SiteUsers.prototype.getByEmail = function (email) {\n return new SiteUser(this, \"getByEmail('\" + email + \"')\");\n };\n /**\n * Gets a user from the collection by id\n *\n * @param id The id of the user to retrieve\n */\n SiteUsers.prototype.getById = function (id) {\n return new SiteUser(this, \"getById(\" + id + \")\");\n };\n /**\n * Gets a user from the collection by login name\n *\n * @param loginName The login name of the user to retrieve\n */\n SiteUsers.prototype.getByLoginName = function (loginName) {\n var su = new SiteUser(this);\n su.concat(\"('!@v::\" + encodeURIComponent(loginName) + \"')\");\n return su;\n };\n /**\n * Removes a user from the collection by id\n *\n * @param id The id of the user to remove\n */\n SiteUsers.prototype.removeById = function (id) {\n return this.clone(SiteUsers, \"removeById(\" + id + \")\").postCore();\n };\n /**\n * Removes a user from the collection by login name\n *\n * @param loginName The login name of the user to remove\n */\n SiteUsers.prototype.removeByLoginName = function (loginName) {\n var o = this.clone(SiteUsers, \"removeByLoginName(@v)\");\n o.query.add(\"@v\", \"'\" + encodeURIComponent(loginName) + \"'\");\n return o.postCore();\n };\n /**\n * Adds a user to a group\n *\n * @param loginName The login name of the user to add to the group\n *\n */\n SiteUsers.prototype.add = function (loginName) {\n var _this = this;\n return this.clone(SiteUsers, null).postCore({\n body: JSON.stringify({ \"__metadata\": { \"type\": \"SP.User\" }, LoginName: loginName }),\n }).then(function () { return _this.getByLoginName(loginName); });\n };\n return SiteUsers;\n}(sharepointqueryable_1.SharePointQueryableCollection));\nexports.SiteUsers = SiteUsers;\n/**\n * Describes a single user\n *\n */\nvar SiteUser = /** @class */ (function (_super) {\n __extends(SiteUser, _super);\n function SiteUser() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n Object.defineProperty(SiteUser.prototype, \"groups\", {\n /**\n * Gets the groups for this user\n *\n */\n get: function () {\n return new sitegroups_1.SiteGroups(this, \"groups\");\n },\n enumerable: true,\n configurable: true\n });\n /**\n * Updates this user instance with the supplied properties\n *\n * @param properties A plain object of property names and values to update for the user\n */\n SiteUser.prototype.update = function (properties) {\n var _this = this;\n var postBody = util_1.Util.extend({ \"__metadata\": { \"type\": \"SP.User\" } }, properties);\n return this.postCore({\n body: JSON.stringify(postBody),\n headers: {\n \"X-HTTP-Method\": \"MERGE\",\n },\n }).then(function (data) {\n return {\n data: data,\n user: _this,\n };\n });\n };\n /**\n * Delete this user\n *\n */\n SiteUser.prototype.delete = function () {\n return this.postCore({\n headers: {\n \"X-HTTP-Method\": \"DELETE\",\n },\n });\n };\n return SiteUser;\n}(sharepointqueryable_1.SharePointQueryableInstance));\nexports.SiteUser = SiteUser;\n/**\n * Represents the current user\n */\nvar CurrentUser = /** @class */ (function (_super) {\n __extends(CurrentUser, _super);\n function CurrentUser(baseUrl, path) {\n if (path === void 0) { path = \"currentuser\"; }\n return _super.call(this, baseUrl, path) || this;\n }\n return CurrentUser;\n}(sharepointqueryable_1.SharePointQueryableInstance));\nexports.CurrentUser = CurrentUser;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/sharepoint/siteusers.js\n// module id = 28\n// module chunks = 0","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar sharepointqueryable_1 = require(\"./sharepointqueryable\");\nvar util_1 = require(\"../utils/util\");\nvar types_1 = require(\"./types\");\n/**\n * Describes a collection of Field objects\n *\n */\nvar Fields = /** @class */ (function (_super) {\n __extends(Fields, _super);\n /**\n * Creates a new instance of the Fields class\n *\n * @param baseUrl The url or SharePointQueryable which forms the parent of this fields collection\n */\n function Fields(baseUrl, path) {\n if (path === void 0) { path = \"fields\"; }\n return _super.call(this, baseUrl, path) || this;\n }\n /**\n * Gets a field from the collection by title\n *\n * @param title The case-sensitive title of the field\n */\n Fields.prototype.getByTitle = function (title) {\n return new Field(this, \"getByTitle('\" + title + \"')\");\n };\n /**\n * Gets a field from the collection by using internal name or title\n *\n * @param name The case-sensitive internal name or title of the field\n */\n Fields.prototype.getByInternalNameOrTitle = function (name) {\n return new Field(this, \"getByInternalNameOrTitle('\" + name + \"')\");\n };\n /**\n * Gets a list from the collection by guid id\n *\n * @param title The Id of the list\n */\n Fields.prototype.getById = function (id) {\n var f = new Field(this);\n f.concat(\"('\" + id + \"')\");\n return f;\n };\n /**\n * Creates a field based on the specified schema\n */\n Fields.prototype.createFieldAsXml = function (xml) {\n var _this = this;\n var info;\n if (typeof xml === \"string\") {\n info = { SchemaXml: xml };\n }\n else {\n info = xml;\n }\n var postBody = JSON.stringify({\n \"parameters\": util_1.Util.extend({\n \"__metadata\": {\n \"type\": \"SP.XmlSchemaFieldCreationInformation\",\n },\n }, info),\n });\n return this.clone(Fields, \"createfieldasxml\").postAsCore({ body: postBody }).then(function (data) {\n return {\n data: data,\n field: _this.getById(data.Id),\n };\n });\n };\n /**\n * Adds a new list to the collection\n *\n * @param title The new field's title\n * @param fieldType The new field's type (ex: SP.FieldText)\n * @param properties Differ by type of field being created (see: https://msdn.microsoft.com/en-us/library/office/dn600182.aspx)\n */\n Fields.prototype.add = function (title, fieldType, properties) {\n var _this = this;\n if (properties === void 0) { properties = {}; }\n var postBody = JSON.stringify(util_1.Util.extend({\n \"Title\": title,\n \"__metadata\": { \"type\": fieldType },\n }, properties));\n return this.clone(Fields, null).postAsCore({ body: postBody }).then(function (data) {\n return {\n data: data,\n field: _this.getById(data.Id),\n };\n });\n };\n /**\n * Adds a new SP.FieldText to the collection\n *\n * @param title The field title\n * @param maxLength The maximum number of characters allowed in the value of the field.\n * @param properties Differ by type of field being created (see: https://msdn.microsoft.com/en-us/library/office/dn600182.aspx)\n */\n Fields.prototype.addText = function (title, maxLength, properties) {\n if (maxLength === void 0) { maxLength = 255; }\n var props = {\n FieldTypeKind: 2,\n MaxLength: maxLength,\n };\n return this.add(title, \"SP.FieldText\", util_1.Util.extend(props, properties));\n };\n /**\n * Adds a new SP.FieldCalculated to the collection\n *\n * @param title The field title.\n * @param formula The formula for the field.\n * @param dateFormat The date and time format that is displayed in the field.\n * @param outputType Specifies the output format for the field. Represents a FieldType value.\n * @param properties Differ by type of field being created (see: https://msdn.microsoft.com/en-us/library/office/dn600182.aspx)\n */\n Fields.prototype.addCalculated = function (title, formula, dateFormat, outputType, properties) {\n if (outputType === void 0) { outputType = types_1.FieldTypes.Text; }\n var props = {\n DateFormat: dateFormat,\n FieldTypeKind: 17,\n Formula: formula,\n OutputType: outputType,\n };\n return this.add(title, \"SP.FieldCalculated\", util_1.Util.extend(props, properties));\n };\n /**\n * Adds a new SP.FieldDateTime to the collection\n *\n * @param title The field title\n * @param displayFormat The format of the date and time that is displayed in the field.\n * @param calendarType Specifies the calendar type of the field.\n * @param properties Differ by type of field being created (see: https://msdn.microsoft.com/en-us/library/office/dn600182.aspx)\n */\n Fields.prototype.addDateTime = function (title, displayFormat, calendarType, friendlyDisplayFormat, properties) {\n if (displayFormat === void 0) { displayFormat = types_1.DateTimeFieldFormatType.DateOnly; }\n if (calendarType === void 0) { calendarType = types_1.CalendarType.Gregorian; }\n if (friendlyDisplayFormat === void 0) { friendlyDisplayFormat = 0; }\n var props = {\n DateTimeCalendarType: calendarType,\n DisplayFormat: displayFormat,\n FieldTypeKind: 4,\n FriendlyDisplayFormat: friendlyDisplayFormat,\n };\n return this.add(title, \"SP.FieldDateTime\", util_1.Util.extend(props, properties));\n };\n /**\n * Adds a new SP.FieldNumber to the collection\n *\n * @param title The field title\n * @param minValue The field's minimum value\n * @param maxValue The field's maximum value\n * @param properties Differ by type of field being created (see: https://msdn.microsoft.com/en-us/library/office/dn600182.aspx)\n */\n Fields.prototype.addNumber = function (title, minValue, maxValue, properties) {\n var props = { FieldTypeKind: 9 };\n if (typeof minValue !== \"undefined\") {\n props = util_1.Util.extend({ MinimumValue: minValue }, props);\n }\n if (typeof maxValue !== \"undefined\") {\n props = util_1.Util.extend({ MaximumValue: maxValue }, props);\n }\n return this.add(title, \"SP.FieldNumber\", util_1.Util.extend(props, properties));\n };\n /**\n * Adds a new SP.FieldCurrency to the collection\n *\n * @param title The field title\n * @param minValue The field's minimum value\n * @param maxValue The field's maximum value\n * @param currencyLocalId Specifies the language code identifier (LCID) used to format the value of the field\n * @param properties Differ by type of field being created (see: https://msdn.microsoft.com/en-us/library/office/dn600182.aspx)\n */\n Fields.prototype.addCurrency = function (title, minValue, maxValue, currencyLocalId, properties) {\n if (currencyLocalId === void 0) { currencyLocalId = 1033; }\n var props = {\n CurrencyLocaleId: currencyLocalId,\n FieldTypeKind: 10,\n };\n if (typeof minValue !== \"undefined\") {\n props = util_1.Util.extend({ MinimumValue: minValue }, props);\n }\n if (typeof maxValue !== \"undefined\") {\n props = util_1.Util.extend({ MaximumValue: maxValue }, props);\n }\n return this.add(title, \"SP.FieldCurrency\", util_1.Util.extend(props, properties));\n };\n /**\n * Adds a new SP.FieldMultiLineText to the collection\n *\n * @param title The field title\n * @param numberOfLines Specifies the number of lines of text to display for the field.\n * @param richText Specifies whether the field supports rich formatting.\n * @param restrictedMode Specifies whether the field supports a subset of rich formatting.\n * @param appendOnly Specifies whether all changes to the value of the field are displayed in list forms.\n * @param allowHyperlink Specifies whether a hyperlink is allowed as a value of the field.\n * @param properties Differ by type of field being created (see: https://msdn.microsoft.com/en-us/library/office/dn600182.aspx)\n *\n */\n Fields.prototype.addMultilineText = function (title, numberOfLines, richText, restrictedMode, appendOnly, allowHyperlink, properties) {\n if (numberOfLines === void 0) { numberOfLines = 6; }\n if (richText === void 0) { richText = true; }\n if (restrictedMode === void 0) { restrictedMode = false; }\n if (appendOnly === void 0) { appendOnly = false; }\n if (allowHyperlink === void 0) { allowHyperlink = true; }\n var props = {\n AllowHyperlink: allowHyperlink,\n AppendOnly: appendOnly,\n FieldTypeKind: 3,\n NumberOfLines: numberOfLines,\n RestrictedMode: restrictedMode,\n RichText: richText,\n };\n return this.add(title, \"SP.FieldMultiLineText\", util_1.Util.extend(props, properties));\n };\n /**\n * Adds a new SP.FieldUrl to the collection\n *\n * @param title The field title\n */\n Fields.prototype.addUrl = function (title, displayFormat, properties) {\n if (displayFormat === void 0) { displayFormat = types_1.UrlFieldFormatType.Hyperlink; }\n var props = {\n DisplayFormat: displayFormat,\n FieldTypeKind: 11,\n };\n return this.add(title, \"SP.FieldUrl\", util_1.Util.extend(props, properties));\n };\n return Fields;\n}(sharepointqueryable_1.SharePointQueryableCollection));\nexports.Fields = Fields;\n/**\n * Describes a single of Field instance\n *\n */\nvar Field = /** @class */ (function (_super) {\n __extends(Field, _super);\n function Field() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n /**\n * Updates this field intance with the supplied properties\n *\n * @param properties A plain object hash of values to update for the list\n * @param fieldType The type value, required to update child field type properties\n */\n Field.prototype.update = function (properties, fieldType) {\n var _this = this;\n if (fieldType === void 0) { fieldType = \"SP.Field\"; }\n var postBody = JSON.stringify(util_1.Util.extend({\n \"__metadata\": { \"type\": fieldType },\n }, properties));\n return this.postCore({\n body: postBody,\n headers: {\n \"X-HTTP-Method\": \"MERGE\",\n },\n }).then(function (data) {\n return {\n data: data,\n field: _this,\n };\n });\n };\n /**\n * Delete this fields\n *\n */\n Field.prototype.delete = function () {\n return this.postCore({\n headers: {\n \"X-HTTP-Method\": \"DELETE\",\n },\n });\n };\n /**\n * Sets the value of the ShowInDisplayForm property for this field.\n */\n Field.prototype.setShowInDisplayForm = function (show) {\n return this.clone(Field, \"setshowindisplayform(\" + show + \")\").postCore();\n };\n /**\n * Sets the value of the ShowInEditForm property for this field.\n */\n Field.prototype.setShowInEditForm = function (show) {\n return this.clone(Field, \"setshowineditform(\" + show + \")\").postCore();\n };\n /**\n * Sets the value of the ShowInNewForm property for this field.\n */\n Field.prototype.setShowInNewForm = function (show) {\n return this.clone(Field, \"setshowinnewform(\" + show + \")\").postCore();\n };\n return Field;\n}(sharepointqueryable_1.SharePointQueryableInstance));\nexports.Field = Field;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/sharepoint/fields.js\n// module id = 29\n// module chunks = 0","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar util_1 = require(\"../utils/util\");\nvar logging_1 = require(\"../utils/logging\");\nvar httpclient_1 = require(\"../net/httpclient\");\nvar utils_1 = require(\"../net/utils\");\nvar pnplibconfig_1 = require(\"../configuration/pnplibconfig\");\nvar exceptions_1 = require(\"../utils/exceptions\");\n/**\n * Manages a batch of OData operations\n */\nvar ODataBatch = /** @class */ (function () {\n function ODataBatch(baseUrl, _batchId) {\n if (_batchId === void 0) { _batchId = util_1.Util.getGUID(); }\n this.baseUrl = baseUrl;\n this._batchId = _batchId;\n this._requests = [];\n this._dependencies = [];\n }\n Object.defineProperty(ODataBatch.prototype, \"batchId\", {\n get: function () {\n return this._batchId;\n },\n enumerable: true,\n configurable: true\n });\n /**\n * Adds a request to a batch (not designed for public use)\n *\n * @param url The full url of the request\n * @param method The http method GET, POST, etc\n * @param options Any options to include in the request\n * @param parser The parser that will hadle the results of the request\n */\n ODataBatch.prototype.add = function (url, method, options, parser) {\n var info = {\n method: method.toUpperCase(),\n options: options,\n parser: parser,\n reject: null,\n resolve: null,\n url: url,\n };\n var p = new Promise(function (resolve, reject) {\n info.resolve = resolve;\n info.reject = reject;\n });\n this._requests.push(info);\n return p;\n };\n /**\n * Adds a dependency insuring that some set of actions will occur before a batch is processed.\n * MUST be cleared using the returned resolve delegate to allow batches to run\n */\n ODataBatch.prototype.addDependency = function () {\n var resolver;\n var promise = new Promise(function (resolve) {\n resolver = resolve;\n });\n this._dependencies.push(promise);\n return resolver;\n };\n /**\n * Execute the current batch and resolve the associated promises\n *\n * @returns A promise which will be resolved once all of the batch's child promises have resolved\n */\n ODataBatch.prototype.execute = function () {\n var _this = this;\n // we need to check the dependencies twice due to how different engines handle things.\n // We can get a second set of promises added after the first set resolve\n return Promise.all(this._dependencies).then(function () { return Promise.all(_this._dependencies); }).then(function () { return _this.executeImpl(); });\n };\n ODataBatch.prototype.executeImpl = function () {\n var _this = this;\n logging_1.Logger.write(\"[\" + this.batchId + \"] (\" + (new Date()).getTime() + \") Executing batch with \" + this._requests.length + \" requests.\", logging_1.LogLevel.Info);\n // if we don't have any requests, don't bother sending anything\n // this could be due to caching further upstream, or just an empty batch\n if (this._requests.length < 1) {\n logging_1.Logger.write(\"Resolving empty batch.\", logging_1.LogLevel.Info);\n return Promise.resolve();\n }\n // creating the client here allows the url to be populated for nodejs client as well as potentially\n // any other hacks needed for other types of clients. Essentially allows the absoluteRequestUrl\n // below to be correct\n var client = new httpclient_1.HttpClient();\n // due to timing we need to get the absolute url here so we can use it for all the individual requests\n // and for sending the entire batch\n return util_1.Util.toAbsoluteUrl(this.baseUrl).then(function (absoluteRequestUrl) {\n // build all the requests, send them, pipe results in order to parsers\n var batchBody = [];\n var currentChangeSetId = \"\";\n for (var i = 0; i < _this._requests.length; i++) {\n var reqInfo = _this._requests[i];\n if (reqInfo.method === \"GET\") {\n if (currentChangeSetId.length > 0) {\n // end an existing change set\n batchBody.push(\"--changeset_\" + currentChangeSetId + \"--\\n\\n\");\n currentChangeSetId = \"\";\n }\n batchBody.push(\"--batch_\" + _this._batchId + \"\\n\");\n }\n else {\n if (currentChangeSetId.length < 1) {\n // start new change set\n currentChangeSetId = util_1.Util.getGUID();\n batchBody.push(\"--batch_\" + _this._batchId + \"\\n\");\n batchBody.push(\"Content-Type: multipart/mixed; boundary=\\\"changeset_\" + currentChangeSetId + \"\\\"\\n\\n\");\n }\n batchBody.push(\"--changeset_\" + currentChangeSetId + \"\\n\");\n }\n // common batch part prefix\n batchBody.push(\"Content-Type: application/http\\n\");\n batchBody.push(\"Content-Transfer-Encoding: binary\\n\\n\");\n var headers = new Headers();\n // this is the url of the individual request within the batch\n var url = util_1.Util.isUrlAbsolute(reqInfo.url) ? reqInfo.url : util_1.Util.combinePaths(absoluteRequestUrl, reqInfo.url);\n logging_1.Logger.write(\"[\" + _this.batchId + \"] (\" + (new Date()).getTime() + \") Adding request \" + reqInfo.method + \" \" + url + \" to batch.\", logging_1.LogLevel.Verbose);\n if (reqInfo.method !== \"GET\") {\n var method = reqInfo.method;\n if (reqInfo.hasOwnProperty(\"options\") && reqInfo.options.hasOwnProperty(\"headers\") && typeof reqInfo.options.headers[\"X-HTTP-Method\"] !== \"undefined\") {\n method = reqInfo.options.headers[\"X-HTTP-Method\"];\n delete reqInfo.options.headers[\"X-HTTP-Method\"];\n }\n batchBody.push(method + \" \" + url + \" HTTP/1.1\\n\");\n headers.set(\"Content-Type\", \"application/json;odata=verbose;charset=utf-8\");\n }\n else {\n batchBody.push(reqInfo.method + \" \" + url + \" HTTP/1.1\\n\");\n }\n // merge global config headers\n utils_1.mergeHeaders(headers, pnplibconfig_1.RuntimeConfig.spHeaders);\n // merge per-request headers\n if (reqInfo.options) {\n utils_1.mergeHeaders(headers, reqInfo.options.headers);\n }\n // lastly we apply any default headers we need that may not exist\n if (!headers.has(\"Accept\")) {\n headers.append(\"Accept\", \"application/json\");\n }\n if (!headers.has(\"Content-Type\")) {\n headers.append(\"Content-Type\", \"application/json;odata=verbose;charset=utf-8\");\n }\n if (!headers.has(\"X-ClientService-ClientTag\")) {\n headers.append(\"X-ClientService-ClientTag\", \"PnPCoreJS:3.0.0\");\n }\n // write headers into batch body\n headers.forEach(function (value, name) {\n batchBody.push(name + \": \" + value + \"\\n\");\n });\n batchBody.push(\"\\n\");\n if (reqInfo.options.body) {\n batchBody.push(reqInfo.options.body + \"\\n\\n\");\n }\n }\n if (currentChangeSetId.length > 0) {\n // Close the changeset\n batchBody.push(\"--changeset_\" + currentChangeSetId + \"--\\n\\n\");\n currentChangeSetId = \"\";\n }\n batchBody.push(\"--batch_\" + _this._batchId + \"--\\n\");\n var batchHeaders = {\n \"Content-Type\": \"multipart/mixed; boundary=batch_\" + _this._batchId,\n };\n var batchOptions = {\n \"body\": batchBody.join(\"\"),\n \"headers\": batchHeaders,\n \"method\": \"POST\",\n };\n logging_1.Logger.write(\"[\" + _this.batchId + \"] (\" + (new Date()).getTime() + \") Sending batch request.\", logging_1.LogLevel.Info);\n return client.fetch(util_1.Util.combinePaths(absoluteRequestUrl, \"/_api/$batch\"), batchOptions)\n .then(function (r) { return r.text(); })\n .then(_this._parseResponse)\n .then(function (responses) {\n if (responses.length !== _this._requests.length) {\n throw new exceptions_1.BatchParseException(\"Could not properly parse responses to match requests in batch.\");\n }\n logging_1.Logger.write(\"[\" + _this.batchId + \"] (\" + (new Date()).getTime() + \") Resolving batched requests.\", logging_1.LogLevel.Info);\n return responses.reduce(function (chain, response, index) {\n var request = _this._requests[index];\n logging_1.Logger.write(\"[\" + _this.batchId + \"] (\" + (new Date()).getTime() + \") Resolving batched request \" + request.method + \" \" + request.url + \".\", logging_1.LogLevel.Verbose);\n return chain.then(function (_) { return request.parser.parse(response).then(request.resolve).catch(request.reject); });\n }, Promise.resolve());\n });\n });\n };\n /**\n * Parses the response from a batch request into an array of Response instances\n *\n * @param body Text body of the response from the batch request\n */\n ODataBatch.prototype._parseResponse = function (body) {\n return new Promise(function (resolve, reject) {\n var responses = [];\n var header = \"--batchresponse_\";\n // Ex. \"HTTP/1.1 500 Internal Server Error\"\n var statusRegExp = new RegExp(\"^HTTP/[0-9.]+ +([0-9]+) +(.*)\", \"i\");\n var lines = body.split(\"\\n\");\n var state = \"batch\";\n var status;\n var statusText;\n for (var i = 0; i < lines.length; ++i) {\n var line = lines[i];\n switch (state) {\n case \"batch\":\n if (line.substr(0, header.length) === header) {\n state = \"batchHeaders\";\n }\n else {\n if (line.trim() !== \"\") {\n throw new exceptions_1.BatchParseException(\"Invalid response, line \" + i);\n }\n }\n break;\n case \"batchHeaders\":\n if (line.trim() === \"\") {\n state = \"status\";\n }\n break;\n case \"status\":\n var parts = statusRegExp.exec(line);\n if (parts.length !== 3) {\n throw new exceptions_1.BatchParseException(\"Invalid status, line \" + i);\n }\n status = parseInt(parts[1], 10);\n statusText = parts[2];\n state = \"statusHeaders\";\n break;\n case \"statusHeaders\":\n if (line.trim() === \"\") {\n state = \"body\";\n }\n break;\n case \"body\":\n responses.push((status === 204) ? new Response() : new Response(line, { status: status, statusText: statusText }));\n state = \"batch\";\n break;\n }\n }\n if (state !== \"status\") {\n reject(new exceptions_1.BatchParseException(\"Unexpected end of input\"));\n }\n resolve(responses);\n });\n };\n return ODataBatch;\n}());\nexports.ODataBatch = ODataBatch;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/sharepoint/batch.js\n// module id = 30\n// module chunks = 0","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar sharepointqueryable_1 = require(\"./sharepointqueryable\");\n/**\n * Describes a collection of List objects\n *\n */\nvar Features = /** @class */ (function (_super) {\n __extends(Features, _super);\n /**\n * Creates a new instance of the Lists class\n *\n * @param baseUrl The url or SharePointQueryable which forms the parent of this fields collection\n */\n function Features(baseUrl, path) {\n if (path === void 0) { path = \"features\"; }\n return _super.call(this, baseUrl, path) || this;\n }\n /**\n * Gets a list from the collection by guid id\n *\n * @param id The Id of the feature (GUID)\n */\n Features.prototype.getById = function (id) {\n var feature = new Feature(this);\n feature.concat(\"('\" + id + \"')\");\n return feature;\n };\n /**\n * Adds a new list to the collection\n *\n * @param id The Id of the feature (GUID)\n * @param force If true the feature activation will be forced\n */\n Features.prototype.add = function (id, force) {\n var _this = this;\n if (force === void 0) { force = false; }\n return this.clone(Features, \"add\").postCore({\n body: JSON.stringify({\n featdefScope: 0,\n featureId: id,\n force: force,\n }),\n }).then(function (data) {\n return {\n data: data,\n feature: _this.getById(id),\n };\n });\n };\n /**\n * Removes (deactivates) a feature from the collection\n *\n * @param id The Id of the feature (GUID)\n * @param force If true the feature deactivation will be forced\n */\n Features.prototype.remove = function (id, force) {\n if (force === void 0) { force = false; }\n return this.clone(Features, \"remove\").postCore({\n body: JSON.stringify({\n featureId: id,\n force: force,\n }),\n });\n };\n return Features;\n}(sharepointqueryable_1.SharePointQueryableCollection));\nexports.Features = Features;\nvar Feature = /** @class */ (function (_super) {\n __extends(Feature, _super);\n function Feature() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n /**\n * Removes (deactivates) a feature from the collection\n *\n * @param force If true the feature deactivation will be forced\n */\n Feature.prototype.deactivate = function (force) {\n var _this = this;\n if (force === void 0) { force = false; }\n var removeDependency = this.addBatchDependency();\n var idGet = new Feature(this).select(\"DefinitionId\");\n return idGet.getAs().then(function (feature) {\n var promise = _this.getParent(Features, _this.parentUrl, \"\", _this.batch).remove(feature.DefinitionId, force);\n removeDependency();\n return promise;\n });\n };\n return Feature;\n}(sharepointqueryable_1.SharePointQueryableInstance));\nexports.Feature = Feature;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/sharepoint/features.js\n// module id = 31\n// module chunks = 0","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar util_1 = require(\"./utils/util\");\nvar storage_1 = require(\"./utils/storage\");\nvar configuration_1 = require(\"./configuration/configuration\");\nvar logging_1 = require(\"./utils/logging\");\nvar rest_1 = require(\"./sharepoint/rest\");\nvar pnplibconfig_1 = require(\"./configuration/pnplibconfig\");\nvar rest_2 = require(\"./graph/rest\");\n/**\n * Root class of the Patterns and Practices namespace, provides an entry point to the library\n */\n/**\n * Utility methods\n */\nexports.util = util_1.Util;\n/**\n * Provides access to the SharePoint REST interface\n */\nexports.sp = new rest_1.SPRest();\n/**\n * Provides access to the Microsoft Graph REST interface\n */\nexports.graph = new rest_2.GraphRest();\n/**\n * Provides access to local and session storage\n */\nexports.storage = new storage_1.PnPClientStorage();\n/**\n * Global configuration instance to which providers can be added\n */\nexports.config = new configuration_1.Settings();\n/**\n * Global logging instance to which subscribers can be registered and messages written\n */\nexports.log = logging_1.Logger;\n/**\n * Allows for the configuration of the library\n */\nexports.setup = pnplibconfig_1.setRuntimeConfig;\n// /**\n// * Expose a subset of classes from the library for public consumption\n// */\n// creating this class instead of directly assigning to default fixes issue #116\nvar Def = {\n /**\n * Global configuration instance to which providers can be added\n */\n config: exports.config,\n /**\n * Provides access to the Microsoft Graph REST interface\n */\n graph: exports.graph,\n /**\n * Global logging instance to which subscribers can be registered and messages written\n */\n log: exports.log,\n /**\n * Provides access to local and session storage\n */\n setup: exports.setup,\n /**\n * Provides access to the REST interface\n */\n sp: exports.sp,\n /**\n * Provides access to local and session storage\n */\n storage: exports.storage,\n /**\n * Utility methods\n */\n util: exports.util,\n};\n/**\n * Enables use of the import pnp from syntax\n */\nexports.default = Def;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/pnp.js\n// module id = 32\n// module chunks = 0","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\n/**\n * Makes requests using the fetch API\n */\nvar FetchClient = /** @class */ (function () {\n function FetchClient() {\n }\n FetchClient.prototype.fetch = function (url, options) {\n return global.fetch(url, options);\n };\n return FetchClient;\n}());\nexports.FetchClient = FetchClient;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/net/fetchclient.js\n// module id = 33\n// module chunks = 0","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar collections_1 = require(\"../collections/collections\");\n/**\n * Class used to manage the current application settings\n *\n */\nvar Settings = /** @class */ (function () {\n /**\n * Creates a new instance of the settings class\n *\n * @constructor\n */\n function Settings() {\n this._settings = new collections_1.Dictionary();\n }\n /**\n * Adds a new single setting, or overwrites a previous setting with the same key\n *\n * @param {string} key The key used to store this setting\n * @param {string} value The setting value to store\n */\n Settings.prototype.add = function (key, value) {\n this._settings.add(key, value);\n };\n /**\n * Adds a JSON value to the collection as a string, you must use getJSON to rehydrate the object when read\n *\n * @param {string} key The key used to store this setting\n * @param {any} value The setting value to store\n */\n Settings.prototype.addJSON = function (key, value) {\n this._settings.add(key, JSON.stringify(value));\n };\n /**\n * Applies the supplied hash to the setting collection overwriting any existing value, or created new values\n *\n * @param {TypedHash} hash The set of values to add\n */\n Settings.prototype.apply = function (hash) {\n var _this = this;\n return new Promise(function (resolve, reject) {\n try {\n _this._settings.merge(hash);\n resolve();\n }\n catch (e) {\n reject(e);\n }\n });\n };\n /**\n * Loads configuration settings into the collection from the supplied provider and returns a Promise\n *\n * @param {IConfigurationProvider} provider The provider from which we will load the settings\n */\n Settings.prototype.load = function (provider) {\n var _this = this;\n return new Promise(function (resolve, reject) {\n provider.getConfiguration().then(function (value) {\n _this._settings.merge(value);\n resolve();\n }).catch(function (reason) {\n reject(reason);\n });\n });\n };\n /**\n * Gets a value from the configuration\n *\n * @param {string} key The key whose value we want to return. Returns null if the key does not exist\n * @return {string} string value from the configuration\n */\n Settings.prototype.get = function (key) {\n return this._settings.get(key);\n };\n /**\n * Gets a JSON value, rehydrating the stored string to the original object\n *\n * @param {string} key The key whose value we want to return. Returns null if the key does not exist\n * @return {any} object from the configuration\n */\n Settings.prototype.getJSON = function (key) {\n var o = this.get(key);\n if (typeof o === \"undefined\" || o === null) {\n return o;\n }\n return JSON.parse(o);\n };\n return Settings;\n}());\nexports.Settings = Settings;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/configuration/configuration.js\n// module id = 34\n// module chunks = 0","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar search_1 = require(\"./search\");\nvar searchsuggest_1 = require(\"./searchsuggest\");\nvar site_1 = require(\"./site\");\nvar webs_1 = require(\"./webs\");\nvar util_1 = require(\"../utils/util\");\nvar userprofiles_1 = require(\"./userprofiles\");\nvar exceptions_1 = require(\"../utils/exceptions\");\nvar utilities_1 = require(\"./utilities\");\n/**\n * Root of the SharePoint REST module\n */\nvar SPRest = /** @class */ (function () {\n /**\n * Creates a new instance of the SPRest class\n *\n * @param options Additional options\n * @param baseUrl A string that should form the base part of the url\n */\n function SPRest(options, baseUrl) {\n if (options === void 0) { options = {}; }\n if (baseUrl === void 0) { baseUrl = \"\"; }\n this._options = options;\n this._baseUrl = baseUrl;\n }\n /**\n * Configures instance with additional options and baseUrl.\n * Provided configuration used by other objects in a chain\n *\n * @param options Additional options\n * @param baseUrl A string that should form the base part of the url\n */\n SPRest.prototype.configure = function (options, baseUrl) {\n if (baseUrl === void 0) { baseUrl = \"\"; }\n return new SPRest(options, baseUrl);\n };\n /**\n * Executes a search against this web context\n *\n * @param query The SearchQuery definition\n */\n SPRest.prototype.searchSuggest = function (query) {\n var finalQuery;\n if (typeof query === \"string\") {\n finalQuery = { querytext: query };\n }\n else {\n finalQuery = query;\n }\n return new searchsuggest_1.SearchSuggest(this._baseUrl).configure(this._options).execute(finalQuery);\n };\n /**\n * Executes a search against this web context\n *\n * @param query The SearchQuery definition\n */\n SPRest.prototype.search = function (query) {\n var finalQuery;\n if (typeof query === \"string\") {\n finalQuery = { Querytext: query };\n }\n else if (query instanceof search_1.SearchQueryBuilder) {\n finalQuery = query.toSearchQuery();\n }\n else {\n finalQuery = query;\n }\n return new search_1.Search(this._baseUrl).configure(this._options).execute(finalQuery);\n };\n Object.defineProperty(SPRest.prototype, \"site\", {\n /**\n * Begins a site collection scoped REST request\n *\n */\n get: function () {\n return new site_1.Site(this._baseUrl).configure(this._options);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(SPRest.prototype, \"web\", {\n /**\n * Begins a web scoped REST request\n *\n */\n get: function () {\n return new webs_1.Web(this._baseUrl).configure(this._options);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(SPRest.prototype, \"profiles\", {\n /**\n * Access to user profile methods\n *\n */\n get: function () {\n return new userprofiles_1.UserProfileQuery(this._baseUrl).configure(this._options);\n },\n enumerable: true,\n configurable: true\n });\n /**\n * Creates a new batch object for use with the SharePointQueryable.addToBatch method\n *\n */\n SPRest.prototype.createBatch = function () {\n return this.web.createBatch();\n };\n Object.defineProperty(SPRest.prototype, \"utility\", {\n /**\n * Static utilities methods from SP.Utilities.Utility\n */\n get: function () {\n return new utilities_1.UtilityMethod(this._baseUrl, \"\").configure(this._options);\n },\n enumerable: true,\n configurable: true\n });\n /**\n * Begins a cross-domain, host site scoped REST request, for use in add-in webs\n *\n * @param addInWebUrl The absolute url of the add-in web\n * @param hostWebUrl The absolute url of the host web\n */\n SPRest.prototype.crossDomainSite = function (addInWebUrl, hostWebUrl) {\n return this._cdImpl(site_1.Site, addInWebUrl, hostWebUrl, \"site\");\n };\n /**\n * Begins a cross-domain, host web scoped REST request, for use in add-in webs\n *\n * @param addInWebUrl The absolute url of the add-in web\n * @param hostWebUrl The absolute url of the host web\n */\n SPRest.prototype.crossDomainWeb = function (addInWebUrl, hostWebUrl) {\n return this._cdImpl(webs_1.Web, addInWebUrl, hostWebUrl, \"web\");\n };\n /**\n * Implements the creation of cross domain REST urls\n *\n * @param factory The constructor of the object to create Site | Web\n * @param addInWebUrl The absolute url of the add-in web\n * @param hostWebUrl The absolute url of the host web\n * @param urlPart String part to append to the url \"site\" | \"web\"\n */\n SPRest.prototype._cdImpl = function (factory, addInWebUrl, hostWebUrl, urlPart) {\n if (!util_1.Util.isUrlAbsolute(addInWebUrl)) {\n throw new exceptions_1.UrlException(\"The addInWebUrl parameter must be an absolute url.\");\n }\n if (!util_1.Util.isUrlAbsolute(hostWebUrl)) {\n throw new exceptions_1.UrlException(\"The hostWebUrl parameter must be an absolute url.\");\n }\n var url = util_1.Util.combinePaths(addInWebUrl, \"_api/SP.AppContextSite(@target)\");\n var instance = new factory(url, urlPart);\n instance.query.add(\"@target\", \"'\" + encodeURIComponent(hostWebUrl) + \"'\");\n return instance.configure(this._options);\n };\n return SPRest;\n}());\nexports.SPRest = SPRest;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/sharepoint/rest.js\n// module id = 35\n// module chunks = 0","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar sharepointqueryable_1 = require(\"./sharepointqueryable\");\nvar util_1 = require(\"../utils/util\");\n/**\n * Allows for the fluent construction of search queries\n */\nvar SearchQueryBuilder = /** @class */ (function () {\n function SearchQueryBuilder(queryText, _query) {\n if (queryText === void 0) { queryText = \"\"; }\n if (_query === void 0) { _query = {}; }\n this._query = _query;\n if (typeof queryText === \"string\" && queryText.length > 0) {\n this.extendQuery({ Querytext: queryText });\n }\n }\n SearchQueryBuilder.create = function (queryText, queryTemplate) {\n if (queryText === void 0) { queryText = \"\"; }\n if (queryTemplate === void 0) { queryTemplate = {}; }\n return new SearchQueryBuilder(queryText, queryTemplate);\n };\n SearchQueryBuilder.prototype.text = function (queryText) {\n return this.extendQuery({ Querytext: queryText });\n };\n SearchQueryBuilder.prototype.template = function (template) {\n return this.extendQuery({ QueryTemplate: template });\n };\n SearchQueryBuilder.prototype.sourceId = function (id) {\n return this.extendQuery({ SourceId: id });\n };\n Object.defineProperty(SearchQueryBuilder.prototype, \"enableInterleaving\", {\n get: function () {\n return this.extendQuery({ EnableInterleaving: true });\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(SearchQueryBuilder.prototype, \"enableStemming\", {\n get: function () {\n return this.extendQuery({ EnableStemming: true });\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(SearchQueryBuilder.prototype, \"trimDuplicates\", {\n get: function () {\n return this.extendQuery({ TrimDuplicates: true });\n },\n enumerable: true,\n configurable: true\n });\n SearchQueryBuilder.prototype.trimDuplicatesIncludeId = function (n) {\n return this.extendQuery({ TrimDuplicatesIncludeId: n });\n };\n Object.defineProperty(SearchQueryBuilder.prototype, \"enableNicknames\", {\n get: function () {\n return this.extendQuery({ EnableNicknames: true });\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(SearchQueryBuilder.prototype, \"enableFql\", {\n get: function () {\n return this.extendQuery({ EnableFQL: true });\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(SearchQueryBuilder.prototype, \"enablePhonetic\", {\n get: function () {\n return this.extendQuery({ EnablePhonetic: true });\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(SearchQueryBuilder.prototype, \"bypassResultTypes\", {\n get: function () {\n return this.extendQuery({ BypassResultTypes: true });\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(SearchQueryBuilder.prototype, \"processBestBets\", {\n get: function () {\n return this.extendQuery({ ProcessBestBets: true });\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(SearchQueryBuilder.prototype, \"enableQueryRules\", {\n get: function () {\n return this.extendQuery({ EnableQueryRules: true });\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(SearchQueryBuilder.prototype, \"enableSorting\", {\n get: function () {\n return this.extendQuery({ EnableSorting: true });\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(SearchQueryBuilder.prototype, \"generateBlockRankLog\", {\n get: function () {\n return this.extendQuery({ GenerateBlockRankLog: true });\n },\n enumerable: true,\n configurable: true\n });\n SearchQueryBuilder.prototype.rankingModelId = function (id) {\n return this.extendQuery({ RankingModelId: id });\n };\n SearchQueryBuilder.prototype.startRow = function (n) {\n return this.extendQuery({ StartRow: n });\n };\n SearchQueryBuilder.prototype.rowLimit = function (n) {\n return this.extendQuery({ RowLimit: n });\n };\n SearchQueryBuilder.prototype.rowsPerPage = function (n) {\n return this.extendQuery({ RowsPerPage: n });\n };\n SearchQueryBuilder.prototype.selectProperties = function () {\n var properties = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n properties[_i] = arguments[_i];\n }\n return this.extendQuery({ SelectProperties: properties });\n };\n SearchQueryBuilder.prototype.culture = function (culture) {\n return this.extendQuery({ Culture: culture });\n };\n SearchQueryBuilder.prototype.timeZoneId = function (id) {\n return this.extendQuery({ TimeZoneId: id });\n };\n SearchQueryBuilder.prototype.refinementFilters = function () {\n var filters = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n filters[_i] = arguments[_i];\n }\n return this.extendQuery({ RefinementFilters: filters });\n };\n SearchQueryBuilder.prototype.refiners = function (refiners) {\n return this.extendQuery({ Refiners: refiners });\n };\n SearchQueryBuilder.prototype.hiddenConstraints = function (constraints) {\n return this.extendQuery({ HiddenConstraints: constraints });\n };\n SearchQueryBuilder.prototype.sortList = function () {\n var sorts = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n sorts[_i] = arguments[_i];\n }\n return this.extendQuery({ SortList: sorts });\n };\n SearchQueryBuilder.prototype.timeout = function (milliseconds) {\n return this.extendQuery({ Timeout: milliseconds });\n };\n SearchQueryBuilder.prototype.hithighlightedProperties = function () {\n var properties = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n properties[_i] = arguments[_i];\n }\n return this.extendQuery({ HitHighlightedProperties: properties });\n };\n SearchQueryBuilder.prototype.clientType = function (clientType) {\n return this.extendQuery({ ClientType: clientType });\n };\n SearchQueryBuilder.prototype.personalizationData = function (data) {\n return this.extendQuery({ PersonalizationData: data });\n };\n SearchQueryBuilder.prototype.resultsURL = function (url) {\n return this.extendQuery({ ResultsUrl: url });\n };\n SearchQueryBuilder.prototype.queryTag = function () {\n var tags = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n tags[_i] = arguments[_i];\n }\n return this.extendQuery({ QueryTag: tags });\n };\n SearchQueryBuilder.prototype.properties = function () {\n var properties = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n properties[_i] = arguments[_i];\n }\n return this.extendQuery({ Properties: properties });\n };\n Object.defineProperty(SearchQueryBuilder.prototype, \"processPersonalFavorites\", {\n get: function () {\n return this.extendQuery({ ProcessPersonalFavorites: true });\n },\n enumerable: true,\n configurable: true\n });\n SearchQueryBuilder.prototype.queryTemplatePropertiesUrl = function (url) {\n return this.extendQuery({ QueryTemplatePropertiesUrl: url });\n };\n SearchQueryBuilder.prototype.reorderingRules = function () {\n var rules = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n rules[_i] = arguments[_i];\n }\n return this.extendQuery({ ReorderingRules: rules });\n };\n SearchQueryBuilder.prototype.hitHighlightedMultivaluePropertyLimit = function (limit) {\n return this.extendQuery({ HitHighlightedMultivaluePropertyLimit: limit });\n };\n Object.defineProperty(SearchQueryBuilder.prototype, \"enableOrderingHitHighlightedProperty\", {\n get: function () {\n return this.extendQuery({ EnableOrderingHitHighlightedProperty: true });\n },\n enumerable: true,\n configurable: true\n });\n SearchQueryBuilder.prototype.collapseSpecification = function (spec) {\n return this.extendQuery({ CollapseSpecification: spec });\n };\n SearchQueryBuilder.prototype.uiLanguage = function (lang) {\n return this.extendQuery({ UILanguage: lang });\n };\n SearchQueryBuilder.prototype.desiredSnippetLength = function (len) {\n return this.extendQuery({ DesiredSnippetLength: len });\n };\n SearchQueryBuilder.prototype.maxSnippetLength = function (len) {\n return this.extendQuery({ MaxSnippetLength: len });\n };\n SearchQueryBuilder.prototype.summaryLength = function (len) {\n return this.extendQuery({ SummaryLength: len });\n };\n SearchQueryBuilder.prototype.toSearchQuery = function () {\n return this._query;\n };\n SearchQueryBuilder.prototype.extendQuery = function (part) {\n this._query = util_1.Util.extend(this._query, part);\n return this;\n };\n return SearchQueryBuilder;\n}());\nexports.SearchQueryBuilder = SearchQueryBuilder;\n/**\n * Describes the search API\n *\n */\nvar Search = /** @class */ (function (_super) {\n __extends(Search, _super);\n /**\n * Creates a new instance of the Search class\n *\n * @param baseUrl The url for the search context\n * @param query The SearchQuery object to execute\n */\n function Search(baseUrl, path) {\n if (path === void 0) { path = \"_api/search/postquery\"; }\n return _super.call(this, baseUrl, path) || this;\n }\n /**\n * .......\n * @returns Promise\n */\n Search.prototype.execute = function (query) {\n var _this = this;\n var formattedBody;\n formattedBody = query;\n if (formattedBody.SelectProperties) {\n formattedBody.SelectProperties = this.fixupProp(query.SelectProperties);\n }\n if (formattedBody.RefinementFilters) {\n formattedBody.RefinementFilters = this.fixupProp(query.RefinementFilters);\n }\n if (formattedBody.SortList) {\n formattedBody.SortList = this.fixupProp(query.SortList);\n }\n if (formattedBody.HithighlightedProperties) {\n formattedBody.HithighlightedProperties = this.fixupProp(query.HitHighlightedProperties);\n }\n if (formattedBody.ReorderingRules) {\n formattedBody.ReorderingRules = this.fixupProp(query.ReorderingRules);\n }\n if (formattedBody.Properties) {\n formattedBody.Properties = this.fixupProp(query.Properties);\n }\n var postBody = JSON.stringify({\n request: util_1.Util.extend({\n \"__metadata\": { \"type\": \"Microsoft.Office.Server.Search.REST.SearchRequest\" },\n }, formattedBody),\n });\n return this.postCore({ body: postBody }).then(function (data) { return new SearchResults(data, _this.toUrl(), query); });\n };\n /**\n * Fixes up properties that expect to consist of a \"results\" collection when needed\n *\n * @param prop property to fixup for container struct\n */\n Search.prototype.fixupProp = function (prop) {\n if (prop.hasOwnProperty(\"results\")) {\n return prop;\n }\n return { results: prop };\n };\n return Search;\n}(sharepointqueryable_1.SharePointQueryableInstance));\nexports.Search = Search;\n/**\n * Describes the SearchResults class, which returns the formatted and raw version of the query response\n */\nvar SearchResults = /** @class */ (function () {\n /**\n * Creates a new instance of the SearchResult class\n *\n */\n function SearchResults(rawResponse, _url, _query, _raw, _primary) {\n if (_raw === void 0) { _raw = null; }\n if (_primary === void 0) { _primary = null; }\n this._url = _url;\n this._query = _query;\n this._raw = _raw;\n this._primary = _primary;\n this._raw = rawResponse.postquery ? rawResponse.postquery : rawResponse;\n }\n Object.defineProperty(SearchResults.prototype, \"ElapsedTime\", {\n get: function () {\n return this.RawSearchResults.ElapsedTime;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(SearchResults.prototype, \"RowCount\", {\n get: function () {\n return this.RawSearchResults.PrimaryQueryResult.RelevantResults.RowCount;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(SearchResults.prototype, \"TotalRows\", {\n get: function () {\n return this.RawSearchResults.PrimaryQueryResult.RelevantResults.TotalRows;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(SearchResults.prototype, \"TotalRowsIncludingDuplicates\", {\n get: function () {\n return this.RawSearchResults.PrimaryQueryResult.RelevantResults.TotalRowsIncludingDuplicates;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(SearchResults.prototype, \"RawSearchResults\", {\n get: function () {\n return this._raw;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(SearchResults.prototype, \"PrimarySearchResults\", {\n get: function () {\n if (this._primary === null) {\n this._primary = this.formatSearchResults(this._raw.PrimaryQueryResult.RelevantResults.Table.Rows);\n }\n return this._primary;\n },\n enumerable: true,\n configurable: true\n });\n /**\n * Gets a page of results\n *\n * @param pageNumber Index of the page to return. Used to determine StartRow\n * @param pageSize Optional, items per page (default = 10)\n */\n SearchResults.prototype.getPage = function (pageNumber, pageSize) {\n // if we got all the available rows we don't have another page\n if (this.TotalRows < this.RowCount) {\n return Promise.resolve(null);\n }\n // if pageSize is supplied, then we use that regardless of any previous values\n // otherwise get the previous RowLimit or default to 10\n var rows = typeof pageSize !== \"undefined\" ? pageSize : this._query.hasOwnProperty(\"RowLimit\") ? this._query.RowLimit : 10;\n var query = util_1.Util.extend(this._query, {\n RowLimit: rows,\n StartRow: rows * (pageNumber - 1),\n });\n // we have reached the end\n if (query.StartRow > this.TotalRows) {\n return Promise.resolve(null);\n }\n var search = new Search(this._url, null);\n return search.execute(query);\n };\n /**\n * Formats a search results array\n *\n * @param rawResults The array to process\n */\n SearchResults.prototype.formatSearchResults = function (rawResults) {\n var results = new Array();\n var tempResults = rawResults.results ? rawResults.results : rawResults;\n for (var _i = 0, tempResults_1 = tempResults; _i < tempResults_1.length; _i++) {\n var tempResult = tempResults_1[_i];\n var cells = tempResult.Cells.results ? tempResult.Cells.results : tempResult.Cells;\n results.push(cells.reduce(function (res, cell) {\n Object.defineProperty(res, cell.Key, {\n configurable: false,\n enumerable: false,\n value: cell.Value,\n writable: false,\n });\n return res;\n }, {}));\n }\n return results;\n };\n return SearchResults;\n}());\nexports.SearchResults = SearchResults;\n/**\n * defines the SortDirection enum\n */\nvar SortDirection;\n(function (SortDirection) {\n SortDirection[SortDirection[\"Ascending\"] = 0] = \"Ascending\";\n SortDirection[SortDirection[\"Descending\"] = 1] = \"Descending\";\n SortDirection[SortDirection[\"FQLFormula\"] = 2] = \"FQLFormula\";\n})(SortDirection = exports.SortDirection || (exports.SortDirection = {}));\n/**\n * defines the ReorderingRuleMatchType enum\n */\nvar ReorderingRuleMatchType;\n(function (ReorderingRuleMatchType) {\n ReorderingRuleMatchType[ReorderingRuleMatchType[\"ResultContainsKeyword\"] = 0] = \"ResultContainsKeyword\";\n ReorderingRuleMatchType[ReorderingRuleMatchType[\"TitleContainsKeyword\"] = 1] = \"TitleContainsKeyword\";\n ReorderingRuleMatchType[ReorderingRuleMatchType[\"TitleMatchesKeyword\"] = 2] = \"TitleMatchesKeyword\";\n ReorderingRuleMatchType[ReorderingRuleMatchType[\"UrlStartsWith\"] = 3] = \"UrlStartsWith\";\n ReorderingRuleMatchType[ReorderingRuleMatchType[\"UrlExactlyMatches\"] = 4] = \"UrlExactlyMatches\";\n ReorderingRuleMatchType[ReorderingRuleMatchType[\"ContentTypeIs\"] = 5] = \"ContentTypeIs\";\n ReorderingRuleMatchType[ReorderingRuleMatchType[\"FileExtensionMatches\"] = 6] = \"FileExtensionMatches\";\n ReorderingRuleMatchType[ReorderingRuleMatchType[\"ResultHasTag\"] = 7] = \"ResultHasTag\";\n ReorderingRuleMatchType[ReorderingRuleMatchType[\"ManualCondition\"] = 8] = \"ManualCondition\";\n})(ReorderingRuleMatchType = exports.ReorderingRuleMatchType || (exports.ReorderingRuleMatchType = {}));\n/**\n * Specifies the type value for the property\n */\nvar QueryPropertyValueType;\n(function (QueryPropertyValueType) {\n QueryPropertyValueType[QueryPropertyValueType[\"None\"] = 0] = \"None\";\n QueryPropertyValueType[QueryPropertyValueType[\"StringType\"] = 1] = \"StringType\";\n QueryPropertyValueType[QueryPropertyValueType[\"Int32TYpe\"] = 2] = \"Int32TYpe\";\n QueryPropertyValueType[QueryPropertyValueType[\"BooleanType\"] = 3] = \"BooleanType\";\n QueryPropertyValueType[QueryPropertyValueType[\"StringArrayType\"] = 4] = \"StringArrayType\";\n QueryPropertyValueType[QueryPropertyValueType[\"UnSupportedType\"] = 5] = \"UnSupportedType\";\n})(QueryPropertyValueType = exports.QueryPropertyValueType || (exports.QueryPropertyValueType = {}));\nvar SearchBuiltInSourceId = /** @class */ (function () {\n function SearchBuiltInSourceId() {\n }\n SearchBuiltInSourceId.Documents = \"e7ec8cee-ded8-43c9-beb5-436b54b31e84\";\n SearchBuiltInSourceId.ItemsMatchingContentType = \"5dc9f503-801e-4ced-8a2c-5d1237132419\";\n SearchBuiltInSourceId.ItemsMatchingTag = \"e1327b9c-2b8c-4b23-99c9-3730cb29c3f7\";\n SearchBuiltInSourceId.ItemsRelatedToCurrentUser = \"48fec42e-4a92-48ce-8363-c2703a40e67d\";\n SearchBuiltInSourceId.ItemsWithSameKeywordAsThisItem = \"5c069288-1d17-454a-8ac6-9c642a065f48\";\n SearchBuiltInSourceId.LocalPeopleResults = \"b09a7990-05ea-4af9-81ef-edfab16c4e31\";\n SearchBuiltInSourceId.LocalReportsAndDataResults = \"203fba36-2763-4060-9931-911ac8c0583b\";\n SearchBuiltInSourceId.LocalSharePointResults = \"8413cd39-2156-4e00-b54d-11efd9abdb89\";\n SearchBuiltInSourceId.LocalVideoResults = \"78b793ce-7956-4669-aa3b-451fc5defebf\";\n SearchBuiltInSourceId.Pages = \"5e34578e-4d08-4edc-8bf3-002acf3cdbcc\";\n SearchBuiltInSourceId.Pictures = \"38403c8c-3975-41a8-826e-717f2d41568a\";\n SearchBuiltInSourceId.Popular = \"97c71db1-58ce-4891-8b64-585bc2326c12\";\n SearchBuiltInSourceId.RecentlyChangedItems = \"ba63bbae-fa9c-42c0-b027-9a878f16557c\";\n SearchBuiltInSourceId.RecommendedItems = \"ec675252-14fa-4fbe-84dd-8d098ed74181\";\n SearchBuiltInSourceId.Wiki = \"9479bf85-e257-4318-b5a8-81a180f5faa1\";\n return SearchBuiltInSourceId;\n}());\nexports.SearchBuiltInSourceId = SearchBuiltInSourceId;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/sharepoint/search.js\n// module id = 36\n// module chunks = 0","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar storage_1 = require(\"../utils/storage\");\nvar util_1 = require(\"../utils/util\");\nvar pnplibconfig_1 = require(\"../configuration/pnplibconfig\");\nvar CachingOptions = /** @class */ (function () {\n function CachingOptions(key) {\n this.key = key;\n this.expiration = util_1.Util.dateAdd(new Date(), \"second\", pnplibconfig_1.RuntimeConfig.defaultCachingTimeoutSeconds);\n this.storeName = pnplibconfig_1.RuntimeConfig.defaultCachingStore;\n }\n Object.defineProperty(CachingOptions.prototype, \"store\", {\n get: function () {\n if (this.storeName === \"local\") {\n return CachingOptions.storage.local;\n }\n else {\n return CachingOptions.storage.session;\n }\n },\n enumerable: true,\n configurable: true\n });\n CachingOptions.storage = new storage_1.PnPClientStorage();\n return CachingOptions;\n}());\nexports.CachingOptions = CachingOptions;\nvar CachingParserWrapper = /** @class */ (function () {\n function CachingParserWrapper(_parser, _cacheOptions) {\n this._parser = _parser;\n this._cacheOptions = _cacheOptions;\n }\n CachingParserWrapper.prototype.parse = function (response) {\n var _this = this;\n // add this to the cache based on the options\n return this._parser.parse(response).then(function (data) {\n if (_this._cacheOptions.store !== null) {\n _this._cacheOptions.store.put(_this._cacheOptions.key, data, _this._cacheOptions.expiration);\n }\n return data;\n });\n };\n return CachingParserWrapper;\n}());\nexports.CachingParserWrapper = CachingParserWrapper;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/odata/caching.js\n// module id = 37\n// module chunks = 0","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar collections_1 = require(\"../collections/collections\");\nvar util_1 = require(\"../utils/util\");\nvar parsers_1 = require(\"../odata/parsers\");\nvar pnplibconfig_1 = require(\"../configuration/pnplibconfig\");\nvar CachedDigest = /** @class */ (function () {\n function CachedDigest() {\n }\n return CachedDigest;\n}());\nexports.CachedDigest = CachedDigest;\n// allows for the caching of digests across all HttpClient's which each have their own DigestCache wrapper.\nvar digests = new collections_1.Dictionary();\nvar DigestCache = /** @class */ (function () {\n function DigestCache(_httpClient, _digests) {\n if (_digests === void 0) { _digests = digests; }\n this._httpClient = _httpClient;\n this._digests = _digests;\n }\n DigestCache.prototype.getDigest = function (webUrl) {\n var _this = this;\n var cachedDigest = this._digests.get(webUrl);\n if (cachedDigest !== null) {\n var now = new Date();\n if (now < cachedDigest.expiration) {\n return Promise.resolve(cachedDigest.value);\n }\n }\n var url = util_1.Util.combinePaths(webUrl, \"/_api/contextinfo\");\n var headers = {\n \"Accept\": \"application/json;odata=verbose\",\n \"Content-Type\": \"application/json;odata=verbose;charset=utf-8\",\n };\n return this._httpClient.fetchRaw(url, {\n cache: \"no-cache\",\n credentials: \"same-origin\",\n headers: util_1.Util.extend(headers, pnplibconfig_1.RuntimeConfig.spHeaders, true),\n method: \"POST\",\n }).then(function (response) {\n var parser = new parsers_1.ODataDefaultParser();\n return parser.parse(response).then(function (d) { return d.GetContextWebInformation; });\n }).then(function (data) {\n var newCachedDigest = new CachedDigest();\n newCachedDigest.value = data.FormDigestValue;\n var seconds = data.FormDigestTimeoutSeconds;\n var expiration = new Date();\n expiration.setTime(expiration.getTime() + 1000 * seconds);\n newCachedDigest.expiration = expiration;\n _this._digests.add(webUrl, newCachedDigest);\n return newCachedDigest.value;\n });\n };\n DigestCache.prototype.clear = function () {\n this._digests.clear();\n };\n return DigestCache;\n}());\nexports.DigestCache = DigestCache;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/net/digestcache.js\n// module id = 38\n// module chunks = 0","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar sharepointqueryable_1 = require(\"./sharepointqueryable\");\nvar SearchSuggest = /** @class */ (function (_super) {\n __extends(SearchSuggest, _super);\n function SearchSuggest(baseUrl, path) {\n if (path === void 0) { path = \"_api/search/suggest\"; }\n return _super.call(this, baseUrl, path) || this;\n }\n SearchSuggest.prototype.execute = function (query) {\n this.mapQueryToQueryString(query);\n return this.get().then(function (response) { return new SearchSuggestResult(response); });\n };\n SearchSuggest.prototype.mapQueryToQueryString = function (query) {\n this.query.add(\"querytext\", \"'\" + query.querytext + \"'\");\n if (query.hasOwnProperty(\"count\")) {\n this.query.add(\"inumberofquerysuggestions\", query.count.toString());\n }\n if (query.hasOwnProperty(\"personalCount\")) {\n this.query.add(\"inumberofresultsuggestions\", query.personalCount.toString());\n }\n if (query.hasOwnProperty(\"preQuery\")) {\n this.query.add(\"fprequerysuggestions\", query.preQuery.toString());\n }\n if (query.hasOwnProperty(\"hitHighlighting\")) {\n this.query.add(\"fhithighlighting\", query.hitHighlighting.toString());\n }\n if (query.hasOwnProperty(\"capitalize\")) {\n this.query.add(\"fcapitalizefirstletters\", query.capitalize.toString());\n }\n if (query.hasOwnProperty(\"culture\")) {\n this.query.add(\"culture\", query.culture.toString());\n }\n if (query.hasOwnProperty(\"stemming\")) {\n this.query.add(\"enablestemming\", query.stemming.toString());\n }\n if (query.hasOwnProperty(\"includePeople\")) {\n this.query.add(\"showpeoplenamesuggestions\", query.includePeople.toString());\n }\n if (query.hasOwnProperty(\"queryRules\")) {\n this.query.add(\"enablequeryrules\", query.queryRules.toString());\n }\n if (query.hasOwnProperty(\"prefixMatch\")) {\n this.query.add(\"fprefixmatchallterms\", query.prefixMatch.toString());\n }\n };\n return SearchSuggest;\n}(sharepointqueryable_1.SharePointQueryableInstance));\nexports.SearchSuggest = SearchSuggest;\nvar SearchSuggestResult = /** @class */ (function () {\n function SearchSuggestResult(json) {\n if (json.hasOwnProperty(\"suggest\")) {\n // verbose\n this.PeopleNames = json.suggest.PeopleNames.results;\n this.PersonalResults = json.suggest.PersonalResults.results;\n this.Queries = json.suggest.Queries.results;\n }\n else {\n this.PeopleNames = json.PeopleNames;\n this.PersonalResults = json.PersonalResults;\n this.Queries = json.Queries;\n }\n }\n return SearchSuggestResult;\n}());\nexports.SearchSuggestResult = SearchSuggestResult;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/sharepoint/searchsuggest.js\n// module id = 39\n// module chunks = 0","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar sharepointqueryable_1 = require(\"./sharepointqueryable\");\nvar webs_1 = require(\"./webs\");\nvar usercustomactions_1 = require(\"./usercustomactions\");\nvar odata_1 = require(\"./odata\");\nvar batch_1 = require(\"./batch\");\nvar features_1 = require(\"./features\");\n/**\n * Describes a site collection\n *\n */\nvar Site = /** @class */ (function (_super) {\n __extends(Site, _super);\n /**\n * Creates a new instance of the Site class\n *\n * @param baseUrl The url or SharePointQueryable which forms the parent of this site collection\n */\n function Site(baseUrl, path) {\n if (path === void 0) { path = \"_api/site\"; }\n return _super.call(this, baseUrl, path) || this;\n }\n Object.defineProperty(Site.prototype, \"rootWeb\", {\n /**\n * Gets the root web of the site collection\n *\n */\n get: function () {\n return new webs_1.Web(this, \"rootweb\");\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Site.prototype, \"features\", {\n /**\n * Gets the active features for this site collection\n *\n */\n get: function () {\n return new features_1.Features(this);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Site.prototype, \"userCustomActions\", {\n /**\n * Gets all custom actions for this site collection\n *\n */\n get: function () {\n return new usercustomactions_1.UserCustomActions(this);\n },\n enumerable: true,\n configurable: true\n });\n /**\n * Gets the context information for this site collection\n */\n Site.prototype.getContextInfo = function () {\n var q = new Site(this.parentUrl, \"_api/contextinfo\");\n return q.postCore().then(function (data) {\n if (data.hasOwnProperty(\"GetContextWebInformation\")) {\n var info = data.GetContextWebInformation;\n info.SupportedSchemaVersions = info.SupportedSchemaVersions.results;\n return info;\n }\n else {\n return data;\n }\n });\n };\n /**\n * Gets the document libraries on a site. Static method. (SharePoint Online only)\n *\n * @param absoluteWebUrl The absolute url of the web whose document libraries should be returned\n */\n Site.prototype.getDocumentLibraries = function (absoluteWebUrl) {\n var q = new sharepointqueryable_1.SharePointQueryable(\"\", \"_api/sp.web.getdocumentlibraries(@v)\");\n q.query.add(\"@v\", \"'\" + absoluteWebUrl + \"'\");\n return q.get().then(function (data) {\n if (data.hasOwnProperty(\"GetDocumentLibraries\")) {\n return data.GetDocumentLibraries;\n }\n else {\n return data;\n }\n });\n };\n /**\n * Gets the site url from a page url\n *\n * @param absolutePageUrl The absolute url of the page\n */\n Site.prototype.getWebUrlFromPageUrl = function (absolutePageUrl) {\n var q = new sharepointqueryable_1.SharePointQueryable(\"\", \"_api/sp.web.getweburlfrompageurl(@v)\");\n q.query.add(\"@v\", \"'\" + absolutePageUrl + \"'\");\n return q.get().then(function (data) {\n if (data.hasOwnProperty(\"GetWebUrlFromPageUrl\")) {\n return data.GetWebUrlFromPageUrl;\n }\n else {\n return data;\n }\n });\n };\n /**\n * Creates a new batch for requests within the context of this site collection\n *\n */\n Site.prototype.createBatch = function () {\n return new batch_1.ODataBatch(this.parentUrl);\n };\n /**\n * Opens a web by id (using POST)\n *\n * @param webId The GUID id of the web to open\n */\n Site.prototype.openWebById = function (webId) {\n return this.clone(Site, \"openWebById('\" + webId + \"')\").postCore().then(function (d) {\n return {\n data: d,\n web: webs_1.Web.fromUrl(odata_1.spExtractODataId(d)),\n };\n });\n };\n return Site;\n}(sharepointqueryable_1.SharePointQueryableInstance));\nexports.Site = Site;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/sharepoint/site.js\n// module id = 40\n// module chunks = 0","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar sharepointqueryable_1 = require(\"./sharepointqueryable\");\nvar LimitedWebPartManager = /** @class */ (function (_super) {\n __extends(LimitedWebPartManager, _super);\n function LimitedWebPartManager() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n Object.defineProperty(LimitedWebPartManager.prototype, \"webparts\", {\n /**\n * Gets the set of web part definitions contained by this web part manager\n *\n */\n get: function () {\n return new WebPartDefinitions(this, \"webparts\");\n },\n enumerable: true,\n configurable: true\n });\n /**\n * Exports a webpart definition\n *\n * @param id the GUID id of the definition to export\n */\n LimitedWebPartManager.prototype.export = function (id) {\n return this.clone(LimitedWebPartManager, \"ExportWebPart\").postCore({\n body: JSON.stringify({ webPartId: id }),\n });\n };\n /**\n * Imports a webpart\n *\n * @param xml webpart definition which must be valid XML in the .dwp or .webpart format\n */\n LimitedWebPartManager.prototype.import = function (xml) {\n return this.clone(LimitedWebPartManager, \"ImportWebPart\").postCore({\n body: JSON.stringify({ webPartXml: xml }),\n });\n };\n return LimitedWebPartManager;\n}(sharepointqueryable_1.SharePointQueryable));\nexports.LimitedWebPartManager = LimitedWebPartManager;\nvar WebPartDefinitions = /** @class */ (function (_super) {\n __extends(WebPartDefinitions, _super);\n function WebPartDefinitions() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n /**\n * Gets a web part definition from the collection by id\n *\n * @param id The storage ID of the SPWebPartDefinition to retrieve\n */\n WebPartDefinitions.prototype.getById = function (id) {\n return new WebPartDefinition(this, \"getbyid('\" + id + \"')\");\n };\n /**\n * Gets a web part definition from the collection by storage id\n *\n * @param id The WebPart.ID of the SPWebPartDefinition to retrieve\n */\n WebPartDefinitions.prototype.getByControlId = function (id) {\n return new WebPartDefinition(this, \"getByControlId('\" + id + \"')\");\n };\n return WebPartDefinitions;\n}(sharepointqueryable_1.SharePointQueryableCollection));\nexports.WebPartDefinitions = WebPartDefinitions;\nvar WebPartDefinition = /** @class */ (function (_super) {\n __extends(WebPartDefinition, _super);\n function WebPartDefinition() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n Object.defineProperty(WebPartDefinition.prototype, \"webpart\", {\n /**\n * Gets the webpart information associated with this definition\n */\n get: function () {\n return new WebPart(this);\n },\n enumerable: true,\n configurable: true\n });\n /**\n * Saves changes to the Web Part made using other properties and methods on the SPWebPartDefinition object\n */\n WebPartDefinition.prototype.saveChanges = function () {\n return this.clone(WebPartDefinition, \"SaveWebPartChanges\").postCore();\n };\n /**\n * Moves the Web Part to a different location on a Web Part Page\n *\n * @param zoneId The ID of the Web Part Zone to which to move the Web Part\n * @param zoneIndex A Web Part zone index that specifies the position at which the Web Part is to be moved within the destination Web Part zone\n */\n WebPartDefinition.prototype.moveTo = function (zoneId, zoneIndex) {\n return this.clone(WebPartDefinition, \"MoveWebPartTo(zoneID='\" + zoneId + \"', zoneIndex=\" + zoneIndex + \")\").postCore();\n };\n /**\n * Closes the Web Part. If the Web Part is already closed, this method does nothing\n */\n WebPartDefinition.prototype.close = function () {\n return this.clone(WebPartDefinition, \"CloseWebPart\").postCore();\n };\n /**\n * Opens the Web Part. If the Web Part is already closed, this method does nothing\n */\n WebPartDefinition.prototype.open = function () {\n return this.clone(WebPartDefinition, \"OpenWebPart\").postCore();\n };\n /**\n * Removes a webpart from a page, all settings will be lost\n */\n WebPartDefinition.prototype.delete = function () {\n return this.clone(WebPartDefinition, \"DeleteWebPart\").postCore();\n };\n return WebPartDefinition;\n}(sharepointqueryable_1.SharePointQueryableInstance));\nexports.WebPartDefinition = WebPartDefinition;\nvar WebPart = /** @class */ (function (_super) {\n __extends(WebPart, _super);\n /**\n * Creates a new instance of the WebPart class\n *\n * @param baseUrl The url or SharePointQueryable which forms the parent of this fields collection\n * @param path Optional, if supplied will be appended to the supplied baseUrl\n */\n function WebPart(baseUrl, path) {\n if (path === void 0) { path = \"webpart\"; }\n return _super.call(this, baseUrl, path) || this;\n }\n return WebPart;\n}(sharepointqueryable_1.SharePointQueryableInstance));\nexports.WebPart = WebPart;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/sharepoint/webparts.js\n// module id = 41\n// module chunks = 0","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar sharepointqueryable_1 = require(\"./sharepointqueryable\");\nvar parsers_1 = require(\"../odata/parsers\");\n/**\n * Describes a collection of Item objects\n *\n */\nvar AttachmentFiles = /** @class */ (function (_super) {\n __extends(AttachmentFiles, _super);\n /**\n * Creates a new instance of the AttachmentFiles class\n *\n * @param baseUrl The url or SharePointQueryable which forms the parent of this attachments collection\n */\n function AttachmentFiles(baseUrl, path) {\n if (path === void 0) { path = \"AttachmentFiles\"; }\n return _super.call(this, baseUrl, path) || this;\n }\n /**\n * Gets a Attachment File by filename\n *\n * @param name The name of the file, including extension.\n */\n AttachmentFiles.prototype.getByName = function (name) {\n var f = new AttachmentFile(this);\n f.concat(\"('\" + name + \"')\");\n return f;\n };\n /**\n * Adds a new attachment to the collection. Not supported for batching.\n *\n * @param name The name of the file, including extension.\n * @param content The Base64 file content.\n */\n AttachmentFiles.prototype.add = function (name, content) {\n var _this = this;\n return this.clone(AttachmentFiles, \"add(FileName='\" + name + \"')\", false).postCore({\n body: content,\n }).then(function (response) {\n return {\n data: response,\n file: _this.getByName(name),\n };\n });\n };\n /**\n * Adds mjultiple new attachment to the collection. Not supported for batching.\n *\n * @files name The collection of files to add\n */\n AttachmentFiles.prototype.addMultiple = function (files) {\n var _this = this;\n // add the files in series so we don't get update conflicts\n return files.reduce(function (chain, file) { return chain.then(function () { return _this.clone(AttachmentFiles, \"add(FileName='\" + file.name + \"')\", false).postCore({\n body: file.content,\n }); }); }, Promise.resolve());\n };\n return AttachmentFiles;\n}(sharepointqueryable_1.SharePointQueryableCollection));\nexports.AttachmentFiles = AttachmentFiles;\n/**\n * Describes a single attachment file instance\n *\n */\nvar AttachmentFile = /** @class */ (function (_super) {\n __extends(AttachmentFile, _super);\n function AttachmentFile() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n /**\n * Gets the contents of the file as text\n *\n */\n AttachmentFile.prototype.getText = function () {\n return this.clone(AttachmentFile, \"$value\", false).get(new parsers_1.TextFileParser());\n };\n /**\n * Gets the contents of the file as a blob, does not work in Node.js\n *\n */\n AttachmentFile.prototype.getBlob = function () {\n return this.clone(AttachmentFile, \"$value\", false).get(new parsers_1.BlobFileParser());\n };\n /**\n * Gets the contents of a file as an ArrayBuffer, works in Node.js\n */\n AttachmentFile.prototype.getBuffer = function () {\n return this.clone(AttachmentFile, \"$value\", false).get(new parsers_1.BufferFileParser());\n };\n /**\n * Gets the contents of a file as an ArrayBuffer, works in Node.js\n */\n AttachmentFile.prototype.getJSON = function () {\n return this.clone(AttachmentFile, \"$value\", false).get(new parsers_1.JSONFileParser());\n };\n /**\n * Sets the content of a file. Not supported for batching\n *\n * @param content The value to set for the file contents\n */\n AttachmentFile.prototype.setContent = function (content) {\n var _this = this;\n return this.clone(AttachmentFile, \"$value\", false).postCore({\n body: content,\n headers: {\n \"X-HTTP-Method\": \"PUT\",\n },\n }).then(function (_) { return new AttachmentFile(_this); });\n };\n /**\n * Delete this attachment file\n *\n * @param eTag Value used in the IF-Match header, by default \"*\"\n */\n AttachmentFile.prototype.delete = function (eTag) {\n if (eTag === void 0) { eTag = \"*\"; }\n return this.postCore({\n headers: {\n \"IF-Match\": eTag,\n \"X-HTTP-Method\": \"DELETE\",\n },\n });\n };\n return AttachmentFile;\n}(sharepointqueryable_1.SharePointQueryableInstance));\nexports.AttachmentFile = AttachmentFile;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/sharepoint/attachmentfiles.js\n// module id = 42\n// module chunks = 0","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar sharepointqueryable_1 = require(\"./sharepointqueryable\");\nvar util_1 = require(\"../utils/util\");\n/**\n * Describes the views available in the current context\n *\n */\nvar Views = /** @class */ (function (_super) {\n __extends(Views, _super);\n /**\n * Creates a new instance of the Views class\n *\n * @param baseUrl The url or SharePointQueryable which forms the parent of this fields collection\n */\n function Views(baseUrl, path) {\n if (path === void 0) { path = \"views\"; }\n return _super.call(this, baseUrl, path) || this;\n }\n /**\n * Gets a view by guid id\n *\n * @param id The GUID id of the view\n */\n Views.prototype.getById = function (id) {\n var v = new View(this);\n v.concat(\"('\" + id + \"')\");\n return v;\n };\n /**\n * Gets a view by title (case-sensitive)\n *\n * @param title The case-sensitive title of the view\n */\n Views.prototype.getByTitle = function (title) {\n return new View(this, \"getByTitle('\" + title + \"')\");\n };\n /**\n * Adds a new view to the collection\n *\n * @param title The new views's title\n * @param personalView True if this is a personal view, otherwise false, default = false\n * @param additionalSettings Will be passed as part of the view creation body\n */\n Views.prototype.add = function (title, personalView, additionalSettings) {\n var _this = this;\n if (personalView === void 0) { personalView = false; }\n if (additionalSettings === void 0) { additionalSettings = {}; }\n var postBody = JSON.stringify(util_1.Util.extend({\n \"PersonalView\": personalView,\n \"Title\": title,\n \"__metadata\": { \"type\": \"SP.View\" },\n }, additionalSettings));\n return this.clone(Views, null).postAsCore({ body: postBody }).then(function (data) {\n return {\n data: data,\n view: _this.getById(data.Id),\n };\n });\n };\n return Views;\n}(sharepointqueryable_1.SharePointQueryableCollection));\nexports.Views = Views;\n/**\n * Describes a single View instance\n *\n */\nvar View = /** @class */ (function (_super) {\n __extends(View, _super);\n function View() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n Object.defineProperty(View.prototype, \"fields\", {\n get: function () {\n return new ViewFields(this);\n },\n enumerable: true,\n configurable: true\n });\n /**\n * Updates this view intance with the supplied properties\n *\n * @param properties A plain object hash of values to update for the view\n */\n View.prototype.update = function (properties) {\n var _this = this;\n var postBody = JSON.stringify(util_1.Util.extend({\n \"__metadata\": { \"type\": \"SP.View\" },\n }, properties));\n return this.postCore({\n body: postBody,\n headers: {\n \"X-HTTP-Method\": \"MERGE\",\n },\n }).then(function (data) {\n return {\n data: data,\n view: _this,\n };\n });\n };\n /**\n * Delete this view\n *\n */\n View.prototype.delete = function () {\n return this.postCore({\n headers: {\n \"X-HTTP-Method\": \"DELETE\",\n },\n });\n };\n /**\n * Returns the list view as HTML.\n *\n */\n View.prototype.renderAsHtml = function () {\n return this.clone(sharepointqueryable_1.SharePointQueryable, \"renderashtml\").get();\n };\n return View;\n}(sharepointqueryable_1.SharePointQueryableInstance));\nexports.View = View;\nvar ViewFields = /** @class */ (function (_super) {\n __extends(ViewFields, _super);\n function ViewFields(baseUrl, path) {\n if (path === void 0) { path = \"viewfields\"; }\n return _super.call(this, baseUrl, path) || this;\n }\n /**\n * Gets a value that specifies the XML schema that represents the collection.\n */\n ViewFields.prototype.getSchemaXml = function () {\n return this.clone(sharepointqueryable_1.SharePointQueryable, \"schemaxml\").get();\n };\n /**\n * Adds the field with the specified field internal name or display name to the collection.\n *\n * @param fieldTitleOrInternalName The case-sensitive internal name or display name of the field to add.\n */\n ViewFields.prototype.add = function (fieldTitleOrInternalName) {\n return this.clone(ViewFields, \"addviewfield('\" + fieldTitleOrInternalName + \"')\").postCore();\n };\n /**\n * Moves the field with the specified field internal name to the specified position in the collection.\n *\n * @param fieldInternalName The case-sensitive internal name of the field to move.\n * @param index The zero-based index of the new position for the field.\n */\n ViewFields.prototype.move = function (fieldInternalName, index) {\n return this.clone(ViewFields, \"moveviewfieldto\").postCore({\n body: JSON.stringify({ \"field\": fieldInternalName, \"index\": index }),\n });\n };\n /**\n * Removes all the fields from the collection.\n */\n ViewFields.prototype.removeAll = function () {\n return this.clone(ViewFields, \"removeallviewfields\").postCore();\n };\n /**\n * Removes the field with the specified field internal name from the collection.\n *\n * @param fieldInternalName The case-sensitive internal name of the field to remove from the view.\n */\n ViewFields.prototype.remove = function (fieldInternalName) {\n return this.clone(ViewFields, \"removeviewfield('\" + fieldInternalName + \"')\").postCore();\n };\n return ViewFields;\n}(sharepointqueryable_1.SharePointQueryableCollection));\nexports.ViewFields = ViewFields;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/sharepoint/views.js\n// module id = 43\n// module chunks = 0","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar sharepointqueryable_1 = require(\"./sharepointqueryable\");\n/**\n * Describes a collection of Field objects\n *\n */\nvar Forms = /** @class */ (function (_super) {\n __extends(Forms, _super);\n /**\n * Creates a new instance of the Fields class\n *\n * @param baseUrl The url or SharePointQueryable which forms the parent of this fields collection\n */\n function Forms(baseUrl, path) {\n if (path === void 0) { path = \"forms\"; }\n return _super.call(this, baseUrl, path) || this;\n }\n /**\n * Gets a form by id\n *\n * @param id The guid id of the item to retrieve\n */\n Forms.prototype.getById = function (id) {\n var i = new Form(this);\n i.concat(\"('\" + id + \"')\");\n return i;\n };\n return Forms;\n}(sharepointqueryable_1.SharePointQueryableCollection));\nexports.Forms = Forms;\n/**\n * Describes a single of Form instance\n *\n */\nvar Form = /** @class */ (function (_super) {\n __extends(Form, _super);\n function Form() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n return Form;\n}(sharepointqueryable_1.SharePointQueryableInstance));\nexports.Form = Form;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/sharepoint/forms.js\n// module id = 44\n// module chunks = 0","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar sharepointqueryable_1 = require(\"./sharepointqueryable\");\n/**\n * Describes a collection of webhook subscriptions\n *\n */\nvar Subscriptions = /** @class */ (function (_super) {\n __extends(Subscriptions, _super);\n /**\n * Creates a new instance of the Subscriptions class\n *\n * @param baseUrl - The url or SharePointQueryable which forms the parent of this webhook subscriptions collection\n */\n function Subscriptions(baseUrl, path) {\n if (path === void 0) { path = \"subscriptions\"; }\n return _super.call(this, baseUrl, path) || this;\n }\n /**\n * Returns all the webhook subscriptions or the specified webhook subscription\n *\n * @param subscriptionId The id of a specific webhook subscription to retrieve, omit to retrieve all the webhook subscriptions\n */\n Subscriptions.prototype.getById = function (subscriptionId) {\n var subscription = new Subscription(this);\n subscription.concat(\"('\" + subscriptionId + \"')\");\n return subscription;\n };\n /**\n * Creates a new webhook subscription\n *\n * @param notificationUrl The url to receive the notifications\n * @param expirationDate The date and time to expire the subscription in the form YYYY-MM-ddTHH:mm:ss+00:00 (maximum of 6 months)\n * @param clientState A client specific string (defaults to pnp-js-core-subscription when omitted)\n */\n Subscriptions.prototype.add = function (notificationUrl, expirationDate, clientState) {\n var _this = this;\n var postBody = JSON.stringify({\n \"clientState\": clientState || \"pnp-js-core-subscription\",\n \"expirationDateTime\": expirationDate,\n \"notificationUrl\": notificationUrl,\n \"resource\": this.toUrl(),\n });\n return this.postCore({ body: postBody, headers: { \"Content-Type\": \"application/json\" } }).then(function (result) {\n return { data: result, subscription: _this.getById(result.id) };\n });\n };\n return Subscriptions;\n}(sharepointqueryable_1.SharePointQueryableCollection));\nexports.Subscriptions = Subscriptions;\n/**\n * Describes a single webhook subscription instance\n *\n */\nvar Subscription = /** @class */ (function (_super) {\n __extends(Subscription, _super);\n function Subscription() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n /**\n * Renews this webhook subscription\n *\n * @param expirationDate The date and time to expire the subscription in the form YYYY-MM-ddTHH:mm:ss+00:00 (maximum of 6 months)\n */\n Subscription.prototype.update = function (expirationDate) {\n var _this = this;\n var postBody = JSON.stringify({\n \"expirationDateTime\": expirationDate,\n });\n return this.patchCore({ body: postBody, headers: { \"Content-Type\": \"application/json\" } }).then(function (data) {\n return { data: data, subscription: _this };\n });\n };\n /**\n * Removes this webhook subscription\n *\n */\n Subscription.prototype.delete = function () {\n return _super.prototype.deleteCore.call(this);\n };\n return Subscription;\n}(sharepointqueryable_1.SharePointQueryableInstance));\nexports.Subscription = Subscription;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/sharepoint/subscriptions.js\n// module id = 45\n// module chunks = 0","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar util_1 = require(\"../utils/util\");\nvar sharepointqueryable_1 = require(\"./sharepointqueryable\");\n/**\n * Represents a collection of navigation nodes\n *\n */\nvar NavigationNodes = /** @class */ (function (_super) {\n __extends(NavigationNodes, _super);\n function NavigationNodes() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n /**\n * Gets a navigation node by id\n *\n * @param id The id of the node\n */\n NavigationNodes.prototype.getById = function (id) {\n var node = new NavigationNode(this);\n node.concat(\"(\" + id + \")\");\n return node;\n };\n /**\n * Adds a new node to the collection\n *\n * @param title Display name of the node\n * @param url The url of the node\n * @param visible If true the node is visible, otherwise it is hidden (default: true)\n */\n NavigationNodes.prototype.add = function (title, url, visible) {\n var _this = this;\n if (visible === void 0) { visible = true; }\n var postBody = JSON.stringify({\n IsVisible: visible,\n Title: title,\n Url: url,\n \"__metadata\": { \"type\": \"SP.NavigationNode\" },\n });\n return this.clone(NavigationNodes, null).postCore({ body: postBody }).then(function (data) {\n return {\n data: data,\n node: _this.getById(data.Id),\n };\n });\n };\n /**\n * Moves a node to be after another node in the navigation\n *\n * @param nodeId Id of the node to move\n * @param previousNodeId Id of the node after which we move the node specified by nodeId\n */\n NavigationNodes.prototype.moveAfter = function (nodeId, previousNodeId) {\n var postBody = JSON.stringify({\n nodeId: nodeId,\n previousNodeId: previousNodeId,\n });\n return this.clone(NavigationNodes, \"MoveAfter\").postCore({ body: postBody });\n };\n return NavigationNodes;\n}(sharepointqueryable_1.SharePointQueryableCollection));\nexports.NavigationNodes = NavigationNodes;\n/**\n * Represents an instance of a navigation node\n *\n */\nvar NavigationNode = /** @class */ (function (_super) {\n __extends(NavigationNode, _super);\n function NavigationNode() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n Object.defineProperty(NavigationNode.prototype, \"children\", {\n /**\n * Represents the child nodes of this node\n */\n get: function () {\n return new NavigationNodes(this, \"Children\");\n },\n enumerable: true,\n configurable: true\n });\n /**\n * Updates this node based on the supplied properties\n *\n * @param properties The hash of key/value pairs to update\n */\n NavigationNode.prototype.update = function (properties) {\n var _this = this;\n var postBody = JSON.stringify(util_1.Util.extend({\n \"__metadata\": { \"type\": \"SP.NavigationNode\" },\n }, properties));\n return this.postCore({\n body: postBody,\n headers: {\n \"X-HTTP-Method\": \"MERGE\",\n },\n }).then(function (data) {\n return {\n data: data,\n node: _this,\n };\n });\n };\n /**\n * Deletes this node and any child nodes\n */\n NavigationNode.prototype.delete = function () {\n return _super.prototype.deleteCore.call(this);\n };\n return NavigationNode;\n}(sharepointqueryable_1.SharePointQueryableInstance));\nexports.NavigationNode = NavigationNode;\n/**\n * Exposes the navigation components\n *\n */\nvar Navigation = /** @class */ (function (_super) {\n __extends(Navigation, _super);\n /**\n * Creates a new instance of the Navigation class\n *\n * @param baseUrl The url or SharePointQueryable which forms the parent of these navigation components\n */\n function Navigation(baseUrl, path) {\n if (path === void 0) { path = \"navigation\"; }\n return _super.call(this, baseUrl, path) || this;\n }\n Object.defineProperty(Navigation.prototype, \"quicklaunch\", {\n /**\n * Gets the quicklaunch navigation nodes for the current context\n *\n */\n get: function () {\n return new NavigationNodes(this, \"quicklaunch\");\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Navigation.prototype, \"topNavigationBar\", {\n /**\n * Gets the top bar navigation nodes for the current context\n *\n */\n get: function () {\n return new NavigationNodes(this, \"topnavigationbar\");\n },\n enumerable: true,\n configurable: true\n });\n return Navigation;\n}(sharepointqueryable_1.SharePointQueryable));\nexports.Navigation = Navigation;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/sharepoint/navigation.js\n// module id = 46\n// module chunks = 0","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar sharepointqueryable_1 = require(\"./sharepointqueryable\");\nvar RelatedItemManagerImpl = /** @class */ (function (_super) {\n __extends(RelatedItemManagerImpl, _super);\n function RelatedItemManagerImpl(baseUrl, path) {\n if (path === void 0) { path = \"_api/SP.RelatedItemManager\"; }\n return _super.call(this, baseUrl, path) || this;\n }\n RelatedItemManagerImpl.FromUrl = function (url) {\n if (url === null) {\n return new RelatedItemManagerImpl(\"\");\n }\n var index = url.indexOf(\"_api/\");\n if (index > -1) {\n return new RelatedItemManagerImpl(url.substr(0, index));\n }\n return new RelatedItemManagerImpl(url);\n };\n RelatedItemManagerImpl.prototype.getRelatedItems = function (sourceListName, sourceItemId) {\n var query = this.clone(RelatedItemManagerImpl, null);\n query.concat(\".GetRelatedItems\");\n return query.postCore({\n body: JSON.stringify({\n SourceItemID: sourceItemId,\n SourceListName: sourceListName,\n }),\n });\n };\n RelatedItemManagerImpl.prototype.getPageOneRelatedItems = function (sourceListName, sourceItemId) {\n var query = this.clone(RelatedItemManagerImpl, null);\n query.concat(\".GetPageOneRelatedItems\");\n return query.postCore({\n body: JSON.stringify({\n SourceItemID: sourceItemId,\n SourceListName: sourceListName,\n }),\n });\n };\n RelatedItemManagerImpl.prototype.addSingleLink = function (sourceListName, sourceItemId, sourceWebUrl, targetListName, targetItemID, targetWebUrl, tryAddReverseLink) {\n if (tryAddReverseLink === void 0) { tryAddReverseLink = false; }\n var query = this.clone(RelatedItemManagerImpl, null);\n query.concat(\".AddSingleLink\");\n return query.postCore({\n body: JSON.stringify({\n SourceItemID: sourceItemId,\n SourceListName: sourceListName,\n SourceWebUrl: sourceWebUrl,\n TargetItemID: targetItemID,\n TargetListName: targetListName,\n TargetWebUrl: targetWebUrl,\n TryAddReverseLink: tryAddReverseLink,\n }),\n });\n };\n /**\n * Adds a related item link from an item specified by list name and item id, to an item specified by url\n *\n * @param sourceListName The source list name or list id\n * @param sourceItemId The source item id\n * @param targetItemUrl The target item url\n * @param tryAddReverseLink If set to true try to add the reverse link (will not return error if it fails)\n */\n RelatedItemManagerImpl.prototype.addSingleLinkToUrl = function (sourceListName, sourceItemId, targetItemUrl, tryAddReverseLink) {\n if (tryAddReverseLink === void 0) { tryAddReverseLink = false; }\n var query = this.clone(RelatedItemManagerImpl, null);\n query.concat(\".AddSingleLinkToUrl\");\n return query.postCore({\n body: JSON.stringify({\n SourceItemID: sourceItemId,\n SourceListName: sourceListName,\n TargetItemUrl: targetItemUrl,\n TryAddReverseLink: tryAddReverseLink,\n }),\n });\n };\n /**\n * Adds a related item link from an item specified by url, to an item specified by list name and item id\n *\n * @param sourceItemUrl The source item url\n * @param targetListName The target list name or list id\n * @param targetItemId The target item id\n * @param tryAddReverseLink If set to true try to add the reverse link (will not return error if it fails)\n */\n RelatedItemManagerImpl.prototype.addSingleLinkFromUrl = function (sourceItemUrl, targetListName, targetItemId, tryAddReverseLink) {\n if (tryAddReverseLink === void 0) { tryAddReverseLink = false; }\n var query = this.clone(RelatedItemManagerImpl, null);\n query.concat(\".AddSingleLinkFromUrl\");\n return query.postCore({\n body: JSON.stringify({\n SourceItemUrl: sourceItemUrl,\n TargetItemID: targetItemId,\n TargetListName: targetListName,\n TryAddReverseLink: tryAddReverseLink,\n }),\n });\n };\n RelatedItemManagerImpl.prototype.deleteSingleLink = function (sourceListName, sourceItemId, sourceWebUrl, targetListName, targetItemId, targetWebUrl, tryDeleteReverseLink) {\n if (tryDeleteReverseLink === void 0) { tryDeleteReverseLink = false; }\n var query = this.clone(RelatedItemManagerImpl, null);\n query.concat(\".DeleteSingleLink\");\n return query.postCore({\n body: JSON.stringify({\n SourceItemID: sourceItemId,\n SourceListName: sourceListName,\n SourceWebUrl: sourceWebUrl,\n TargetItemID: targetItemId,\n TargetListName: targetListName,\n TargetWebUrl: targetWebUrl,\n TryDeleteReverseLink: tryDeleteReverseLink,\n }),\n });\n };\n return RelatedItemManagerImpl;\n}(sharepointqueryable_1.SharePointQueryable));\nexports.RelatedItemManagerImpl = RelatedItemManagerImpl;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/sharepoint/relateditems.js\n// module id = 47\n// module chunks = 0","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar sharepointqueryable_1 = require(\"./sharepointqueryable\");\nvar files_1 = require(\"../utils/files\");\nvar parsers_1 = require(\"../odata/parsers\");\nvar UserProfileQuery = /** @class */ (function (_super) {\n __extends(UserProfileQuery, _super);\n /**\n * Creates a new instance of the UserProfileQuery class\n *\n * @param baseUrl The url or SharePointQueryable which forms the parent of this user profile query\n */\n function UserProfileQuery(baseUrl, path) {\n if (path === void 0) { path = \"_api/sp.userprofiles.peoplemanager\"; }\n var _this = _super.call(this, baseUrl, path) || this;\n _this.profileLoader = new ProfileLoader(baseUrl);\n return _this;\n }\n Object.defineProperty(UserProfileQuery.prototype, \"editProfileLink\", {\n /**\n * The url of the edit profile page for the current user\n */\n get: function () {\n return this.clone(UserProfileQuery, \"EditProfileLink\").getAs(parsers_1.ODataValue());\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(UserProfileQuery.prototype, \"isMyPeopleListPublic\", {\n /**\n * A boolean value that indicates whether the current user's \"People I'm Following\" list is public\n */\n get: function () {\n return this.clone(UserProfileQuery, \"IsMyPeopleListPublic\").getAs(parsers_1.ODataValue());\n },\n enumerable: true,\n configurable: true\n });\n /**\n * A boolean value that indicates whether the current user is being followed by the specified user\n *\n * @param loginName The account name of the user\n */\n UserProfileQuery.prototype.amIFollowedBy = function (loginName) {\n var q = this.clone(UserProfileQuery, \"amifollowedby(@v)\");\n q.query.add(\"@v\", \"'\" + encodeURIComponent(loginName) + \"'\");\n return q.get();\n };\n /**\n * A boolean value that indicates whether the current user is following the specified user\n *\n * @param loginName The account name of the user\n */\n UserProfileQuery.prototype.amIFollowing = function (loginName) {\n var q = this.clone(UserProfileQuery, \"amifollowing(@v)\");\n q.query.add(\"@v\", \"'\" + encodeURIComponent(loginName) + \"'\");\n return q.get();\n };\n /**\n * Gets tags that the current user is following\n *\n * @param maxCount The maximum number of tags to retrieve (default is 20)\n */\n UserProfileQuery.prototype.getFollowedTags = function (maxCount) {\n if (maxCount === void 0) { maxCount = 20; }\n return this.clone(UserProfileQuery, \"getfollowedtags(\" + maxCount + \")\").get();\n };\n /**\n * Gets the people who are following the specified user\n *\n * @param loginName The account name of the user\n */\n UserProfileQuery.prototype.getFollowersFor = function (loginName) {\n var q = this.clone(UserProfileQuery, \"getfollowersfor(@v)\");\n q.query.add(\"@v\", \"'\" + encodeURIComponent(loginName) + \"'\");\n return q.get();\n };\n Object.defineProperty(UserProfileQuery.prototype, \"myFollowers\", {\n /**\n * Gets the people who are following the current user\n *\n */\n get: function () {\n return new sharepointqueryable_1.SharePointQueryableCollection(this, \"getmyfollowers\");\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(UserProfileQuery.prototype, \"myProperties\", {\n /**\n * Gets user properties for the current user\n *\n */\n get: function () {\n return new UserProfileQuery(this, \"getmyproperties\");\n },\n enumerable: true,\n configurable: true\n });\n /**\n * Gets the people who the specified user is following\n *\n * @param loginName The account name of the user.\n */\n UserProfileQuery.prototype.getPeopleFollowedBy = function (loginName) {\n var q = this.clone(UserProfileQuery, \"getpeoplefollowedby(@v)\");\n q.query.add(\"@v\", \"'\" + encodeURIComponent(loginName) + \"'\");\n return q.get();\n };\n /**\n * Gets user properties for the specified user.\n *\n * @param loginName The account name of the user.\n */\n UserProfileQuery.prototype.getPropertiesFor = function (loginName) {\n var q = this.clone(UserProfileQuery, \"getpropertiesfor(@v)\");\n q.query.add(\"@v\", \"'\" + encodeURIComponent(loginName) + \"'\");\n return q.get();\n };\n Object.defineProperty(UserProfileQuery.prototype, \"trendingTags\", {\n /**\n * Gets the 20 most popular hash tags over the past week, sorted so that the most popular tag appears first\n *\n */\n get: function () {\n var q = this.clone(UserProfileQuery, null);\n q.concat(\".gettrendingtags\");\n return q.get();\n },\n enumerable: true,\n configurable: true\n });\n /**\n * Gets the specified user profile property for the specified user\n *\n * @param loginName The account name of the user\n * @param propertyName The case-sensitive name of the property to get\n */\n UserProfileQuery.prototype.getUserProfilePropertyFor = function (loginName, propertyName) {\n var q = this.clone(UserProfileQuery, \"getuserprofilepropertyfor(accountname=@v, propertyname='\" + propertyName + \"')\");\n q.query.add(\"@v\", \"'\" + encodeURIComponent(loginName) + \"'\");\n return q.get();\n };\n /**\n * Removes the specified user from the user's list of suggested people to follow\n *\n * @param loginName The account name of the user\n */\n UserProfileQuery.prototype.hideSuggestion = function (loginName) {\n var q = this.clone(UserProfileQuery, \"hidesuggestion(@v)\");\n q.query.add(\"@v\", \"'\" + encodeURIComponent(loginName) + \"'\");\n return q.postCore();\n };\n /**\n * A boolean values that indicates whether the first user is following the second user\n *\n * @param follower The account name of the user who might be following the followee\n * @param followee The account name of the user who might be followed by the follower\n */\n UserProfileQuery.prototype.isFollowing = function (follower, followee) {\n var q = this.clone(UserProfileQuery, null);\n q.concat(\".isfollowing(possiblefolloweraccountname=@v, possiblefolloweeaccountname=@y)\");\n q.query.add(\"@v\", \"'\" + encodeURIComponent(follower) + \"'\");\n q.query.add(\"@y\", \"'\" + encodeURIComponent(followee) + \"'\");\n return q.get();\n };\n /**\n * Uploads and sets the user profile picture (Users can upload a picture to their own profile only). Not supported for batching.\n *\n * @param profilePicSource Blob data representing the user's picture in BMP, JPEG, or PNG format of up to 4.76MB\n */\n UserProfileQuery.prototype.setMyProfilePic = function (profilePicSource) {\n var _this = this;\n return new Promise(function (resolve, reject) {\n files_1.readBlobAsArrayBuffer(profilePicSource).then(function (buffer) {\n var request = new UserProfileQuery(_this, \"setmyprofilepicture\");\n request.postCore({\n body: String.fromCharCode.apply(null, new Uint16Array(buffer)),\n }).then(function (_) { return resolve(); });\n }).catch(function (e) { return reject(e); });\n });\n };\n /**\n * Provisions one or more users' personal sites. (My Site administrator on SharePoint Online only)\n *\n * @param emails The email addresses of the users to provision sites for\n */\n UserProfileQuery.prototype.createPersonalSiteEnqueueBulk = function () {\n var emails = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n emails[_i] = arguments[_i];\n }\n return this.profileLoader.createPersonalSiteEnqueueBulk(emails);\n };\n Object.defineProperty(UserProfileQuery.prototype, \"ownerUserProfile\", {\n /**\n * Gets the user profile of the site owner\n *\n */\n get: function () {\n return this.profileLoader.ownerUserProfile;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(UserProfileQuery.prototype, \"userProfile\", {\n /**\n * Gets the user profile for the current user\n */\n get: function () {\n return this.profileLoader.userProfile;\n },\n enumerable: true,\n configurable: true\n });\n /**\n * Enqueues creating a personal site for this user, which can be used to share documents, web pages, and other files\n *\n * @param interactiveRequest true if interactively (web) initiated request, or false (default) if non-interactively (client) initiated request\n */\n UserProfileQuery.prototype.createPersonalSite = function (interactiveRequest) {\n if (interactiveRequest === void 0) { interactiveRequest = false; }\n return this.profileLoader.createPersonalSite(interactiveRequest);\n };\n /**\n * Sets the privacy settings for this profile\n *\n * @param share true to make all social data public; false to make all social data private\n */\n UserProfileQuery.prototype.shareAllSocialData = function (share) {\n return this.profileLoader.shareAllSocialData(share);\n };\n return UserProfileQuery;\n}(sharepointqueryable_1.SharePointQueryableInstance));\nexports.UserProfileQuery = UserProfileQuery;\nvar ProfileLoader = /** @class */ (function (_super) {\n __extends(ProfileLoader, _super);\n /**\n * Creates a new instance of the ProfileLoader class\n *\n * @param baseUrl The url or SharePointQueryable which forms the parent of this profile loader\n */\n function ProfileLoader(baseUrl, path) {\n if (path === void 0) { path = \"_api/sp.userprofiles.profileloader.getprofileloader\"; }\n return _super.call(this, baseUrl, path) || this;\n }\n /**\n * Provisions one or more users' personal sites. (My Site administrator on SharePoint Online only) Doesn't support batching\n *\n * @param emails The email addresses of the users to provision sites for\n */\n ProfileLoader.prototype.createPersonalSiteEnqueueBulk = function (emails) {\n return this.clone(ProfileLoader, \"createpersonalsiteenqueuebulk\", false).postCore({\n body: JSON.stringify({ \"emailIDs\": emails }),\n });\n };\n Object.defineProperty(ProfileLoader.prototype, \"ownerUserProfile\", {\n /**\n * Gets the user profile of the site owner.\n *\n */\n get: function () {\n var q = this.getParent(ProfileLoader, this.parentUrl, \"_api/sp.userprofiles.profileloader.getowneruserprofile\");\n if (this.hasBatch) {\n q = q.inBatch(this.batch);\n }\n return q.postAsCore();\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(ProfileLoader.prototype, \"userProfile\", {\n /**\n * Gets the user profile of the current user.\n *\n */\n get: function () {\n return this.clone(ProfileLoader, \"getuserprofile\").postAsCore();\n },\n enumerable: true,\n configurable: true\n });\n /**\n * Enqueues creating a personal site for this user, which can be used to share documents, web pages, and other files.\n *\n * @param interactiveRequest true if interactively (web) initiated request, or false (default) if non-interactively (client) initiated request\n */\n ProfileLoader.prototype.createPersonalSite = function (interactiveRequest) {\n if (interactiveRequest === void 0) { interactiveRequest = false; }\n return this.clone(ProfileLoader, \"getuserprofile/createpersonalsiteenque(\" + interactiveRequest + \")\").postCore();\n };\n /**\n * Sets the privacy settings for this profile\n *\n * @param share true to make all social data public; false to make all social data private.\n */\n ProfileLoader.prototype.shareAllSocialData = function (share) {\n return this.clone(ProfileLoader, \"getuserprofile/shareallsocialdata(\" + share + \")\").postCore();\n };\n return ProfileLoader;\n}(sharepointqueryable_1.SharePointQueryable));\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/sharepoint/userprofiles.js\n// module id = 48\n// module chunks = 0","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\n/**\n * Reads a blob as text\n *\n * @param blob The data to read\n */\nfunction readBlobAsText(blob) {\n return readBlobAs(blob, \"string\");\n}\nexports.readBlobAsText = readBlobAsText;\n/**\n * Reads a blob into an array buffer\n *\n * @param blob The data to read\n */\nfunction readBlobAsArrayBuffer(blob) {\n return readBlobAs(blob, \"buffer\");\n}\nexports.readBlobAsArrayBuffer = readBlobAsArrayBuffer;\n/**\n * Generic method to read blob's content\n *\n * @param blob The data to read\n * @param mode The read mode\n */\nfunction readBlobAs(blob, mode) {\n return new Promise(function (resolve, reject) {\n try {\n var reader = new FileReader();\n reader.onload = function (e) {\n resolve(e.target.result);\n };\n switch (mode) {\n case \"string\":\n reader.readAsText(blob);\n break;\n case \"buffer\":\n reader.readAsArrayBuffer(blob);\n break;\n }\n }\n catch (e) {\n reject(e);\n }\n });\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/utils/files.js\n// module id = 49\n// module chunks = 0","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar sharepointqueryable_1 = require(\"./sharepointqueryable\");\nvar util_1 = require(\"../utils/util\");\nvar files_1 = require(\"./files\");\nvar odata_1 = require(\"./odata\");\n/**\n * Allows for calling of the static SP.Utilities.Utility methods by supplying the method name\n */\nvar UtilityMethod = /** @class */ (function (_super) {\n __extends(UtilityMethod, _super);\n /**\n * Creates a new instance of the Utility method class\n *\n * @param baseUrl The parent url provider\n * @param methodName The static method name to call on the utility class\n */\n function UtilityMethod(baseUrl, methodName) {\n return _super.call(this, UtilityMethod.getBaseUrl(baseUrl), \"_api/SP.Utilities.Utility.\" + methodName) || this;\n }\n UtilityMethod.getBaseUrl = function (candidate) {\n if (typeof candidate === \"string\") {\n return candidate;\n }\n var c = candidate;\n var url = c.toUrl();\n var index = url.indexOf(\"_api/\");\n if (index < 0) {\n return url;\n }\n return url.substr(0, index);\n };\n UtilityMethod.prototype.excute = function (props) {\n return this.postAsCore({\n body: JSON.stringify(props),\n });\n };\n /**\n * Clones this SharePointQueryable into a new SharePointQueryable instance of T\n * @param factory Constructor used to create the new instance\n * @param additionalPath Any additional path to include in the clone\n * @param includeBatch If true this instance's batch will be added to the cloned instance\n */\n UtilityMethod.prototype.create = function (methodName, includeBatch) {\n var clone = new UtilityMethod(this.parentUrl, methodName);\n var target = this.query.get(\"@target\");\n if (target !== null) {\n clone.query.add(\"@target\", target);\n }\n if (includeBatch && this.hasBatch) {\n clone = clone.inBatch(this.batch);\n }\n return clone;\n };\n /**\n * Sends an email based on the supplied properties\n *\n * @param props The properties of the email to send\n */\n UtilityMethod.prototype.sendEmail = function (props) {\n var params = {\n properties: {\n Body: props.Body,\n From: props.From,\n Subject: props.Subject,\n \"__metadata\": { \"type\": \"SP.Utilities.EmailProperties\" },\n },\n };\n if (props.To && props.To.length > 0) {\n params.properties = util_1.Util.extend(params.properties, {\n To: { results: props.To },\n });\n }\n if (props.CC && props.CC.length > 0) {\n params.properties = util_1.Util.extend(params.properties, {\n CC: { results: props.CC },\n });\n }\n if (props.BCC && props.BCC.length > 0) {\n params.properties = util_1.Util.extend(params.properties, {\n BCC: { results: props.BCC },\n });\n }\n if (props.AdditionalHeaders) {\n params.properties = util_1.Util.extend(params.properties, {\n AdditionalHeaders: props.AdditionalHeaders,\n });\n }\n return this.create(\"SendEmail\", true).excute(params);\n };\n UtilityMethod.prototype.getCurrentUserEmailAddresses = function () {\n return this.create(\"GetCurrentUserEmailAddresses\", true).excute({});\n };\n UtilityMethod.prototype.resolvePrincipal = function (input, scopes, sources, inputIsEmailOnly, addToUserInfoList, matchUserInfoList) {\n if (matchUserInfoList === void 0) { matchUserInfoList = false; }\n var params = {\n addToUserInfoList: addToUserInfoList,\n input: input,\n inputIsEmailOnly: inputIsEmailOnly,\n matchUserInfoList: matchUserInfoList,\n scopes: scopes,\n sources: sources,\n };\n return this.create(\"ResolvePrincipalInCurrentContext\", true).excute(params);\n };\n UtilityMethod.prototype.searchPrincipals = function (input, scopes, sources, groupName, maxCount) {\n var params = {\n groupName: groupName,\n input: input,\n maxCount: maxCount,\n scopes: scopes,\n sources: sources,\n };\n return this.create(\"SearchPrincipalsUsingContextWeb\", true).excute(params);\n };\n UtilityMethod.prototype.createEmailBodyForInvitation = function (pageAddress) {\n var params = {\n pageAddress: pageAddress,\n };\n return this.create(\"CreateEmailBodyForInvitation\", true).excute(params);\n };\n UtilityMethod.prototype.expandGroupsToPrincipals = function (inputs, maxCount) {\n if (maxCount === void 0) { maxCount = 30; }\n var params = {\n inputs: inputs,\n maxCount: maxCount,\n };\n return this.create(\"ExpandGroupsToPrincipals\", true).excute(params);\n };\n UtilityMethod.prototype.createWikiPage = function (info) {\n return this.create(\"CreateWikiPageInContextWeb\", true).excute({\n parameters: info,\n }).then(function (r) {\n return {\n data: r,\n file: new files_1.File(odata_1.spExtractODataId(r)),\n };\n });\n };\n return UtilityMethod;\n}(sharepointqueryable_1.SharePointQueryable));\nexports.UtilityMethod = UtilityMethod;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/sharepoint/utilities.js\n// module id = 50\n// module chunks = 0","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar v1_1 = require(\"./v1\");\nvar GraphRest = /** @class */ (function () {\n function GraphRest() {\n }\n Object.defineProperty(GraphRest.prototype, \"v1\", {\n get: function () {\n return new v1_1.V1(\"\");\n },\n enumerable: true,\n configurable: true\n });\n return GraphRest;\n}());\nexports.GraphRest = GraphRest;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/graph/rest.js\n// module id = 51\n// module chunks = 0","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar graphqueryable_1 = require(\"./graphqueryable\");\nvar groups_1 = require(\"./groups\");\n// import { Me } from \"./me\";\n/**\n * Root object wrapping v1 functionality for MS Graph\n *\n */\nvar V1 = /** @class */ (function (_super) {\n __extends(V1, _super);\n /**\n * Creates a new instance of the V1 class\n *\n * @param baseUrl The url or Queryable which forms the parent of this fields collection\n * @param path Optional additional path\n */\n function V1(baseUrl, path) {\n if (path === void 0) { path = \"v1.0\"; }\n return _super.call(this, baseUrl, path) || this;\n }\n Object.defineProperty(V1.prototype, \"groups\", {\n get: function () {\n return new groups_1.Groups(this);\n },\n enumerable: true,\n configurable: true\n });\n return V1;\n}(graphqueryable_1.GraphQueryable));\nexports.V1 = V1;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/graph/v1.js\n// module id = 52\n// module chunks = 0","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar util_1 = require(\"../utils/util\");\nvar pnplibconfig_1 = require(\"../configuration/pnplibconfig\");\nvar utils_1 = require(\"./utils\");\n// import { APIUrlException } from \"../utils/exceptions\";\nvar GraphHttpClient = /** @class */ (function () {\n function GraphHttpClient() {\n this._impl = pnplibconfig_1.RuntimeConfig.graphFetchClientFactory();\n }\n GraphHttpClient.prototype.fetch = function (url, options) {\n if (options === void 0) { options = {}; }\n var headers = new Headers();\n // first we add the global headers so they can be overwritten by any passed in locally to this call\n utils_1.mergeHeaders(headers, pnplibconfig_1.RuntimeConfig.graphHeaders);\n // second we add the local options so we can overwrite the globals\n utils_1.mergeHeaders(headers, options.headers);\n var opts = util_1.Util.extend(options, { headers: headers });\n // TODO: we could process auth here\n return this.fetchRaw(url, opts);\n };\n GraphHttpClient.prototype.fetchRaw = function (url, options) {\n var _this = this;\n if (options === void 0) { options = {}; }\n // here we need to normalize the headers\n var rawHeaders = new Headers();\n utils_1.mergeHeaders(rawHeaders, options.headers);\n options = util_1.Util.extend(options, { headers: rawHeaders });\n var retry = function (ctx) {\n _this._impl.fetch(url, {}, options).then(function (response) { return ctx.resolve(response); }).catch(function (response) {\n // Check if request was throttled - http status code 429\n // Check if request failed due to server unavailable - http status code 503\n if (response.status !== 429 && response.status !== 503) {\n ctx.reject(response);\n }\n // grab our current delay\n var delay = ctx.delay;\n // Increment our counters.\n ctx.delay *= 2;\n ctx.attempts++;\n // If we have exceeded the retry count, reject.\n if (ctx.retryCount <= ctx.attempts) {\n ctx.reject(response);\n }\n // Set our retry timeout for {delay} milliseconds.\n setTimeout(util_1.Util.getCtxCallback(_this, retry, ctx), delay);\n });\n };\n return new Promise(function (resolve, reject) {\n var retryContext = {\n attempts: 0,\n delay: 100,\n reject: reject,\n resolve: resolve,\n retryCount: 7,\n };\n retry.call(_this, retryContext);\n });\n };\n GraphHttpClient.prototype.get = function (url, options) {\n if (options === void 0) { options = {}; }\n var opts = util_1.Util.extend(options, { method: \"GET\" });\n return this.fetch(url, opts);\n };\n GraphHttpClient.prototype.post = function (url, options) {\n if (options === void 0) { options = {}; }\n var opts = util_1.Util.extend(options, { method: \"POST\" });\n return this.fetch(url, opts);\n };\n GraphHttpClient.prototype.patch = function (url, options) {\n if (options === void 0) { options = {}; }\n var opts = util_1.Util.extend(options, { method: \"PATCH\" });\n return this.fetch(url, opts);\n };\n GraphHttpClient.prototype.delete = function (url, options) {\n if (options === void 0) { options = {}; }\n var opts = util_1.Util.extend(options, { method: \"DELETE\" });\n return this.fetch(url, opts);\n };\n return GraphHttpClient;\n}());\nexports.GraphHttpClient = GraphHttpClient;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/net/graphclient.js\n// module id = 53\n// module chunks = 0","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar graphqueryable_1 = require(\"./graphqueryable\");\nvar members_1 = require(\"./members\");\nvar util_1 = require(\"../utils/util\");\nvar calendars_1 = require(\"./calendars\");\nvar conversations_1 = require(\"./conversations\");\nvar plans_1 = require(\"./plans\");\nvar photos_1 = require(\"./photos\");\nvar GroupType;\n(function (GroupType) {\n /**\n * Office 365 (aka unified group)\n */\n GroupType[GroupType[\"Office365\"] = 0] = \"Office365\";\n /**\n * Dynamic membership\n */\n GroupType[GroupType[\"Dynamic\"] = 1] = \"Dynamic\";\n /**\n * Security\n */\n GroupType[GroupType[\"Security\"] = 2] = \"Security\";\n})(GroupType = exports.GroupType || (exports.GroupType = {}));\n/**\n * Describes a collection of Field objects\n *\n */\nvar Groups = /** @class */ (function (_super) {\n __extends(Groups, _super);\n function Groups(baseUrl, path) {\n if (path === void 0) { path = \"groups\"; }\n return _super.call(this, baseUrl, path) || this;\n }\n /**\n * Gets a group from the collection using the specified id\n *\n * @param id Id of the group to get from this collection\n */\n Groups.prototype.getById = function (id) {\n return new Group(this, id);\n };\n /**\n * Create a new group as specified in the request body.\n *\n * @param name Name to display in the address book for the group\n * @param mailNickname Mail alias for the group\n * @param groupType Type of group being created\n * @param additionalProperties A plain object collection of additional properties you want to set on the new group\n */\n Groups.prototype.add = function (name, mailNickname, groupType, additionalProperties) {\n var _this = this;\n if (additionalProperties === void 0) { additionalProperties = {}; }\n var postBody = util_1.Util.extend({\n displayName: name,\n mailEnabled: groupType === GroupType.Office365,\n mailNickname: mailNickname,\n securityEnabled: groupType !== GroupType.Office365,\n }, additionalProperties);\n // include a group type if required\n if (groupType !== GroupType.Security) {\n postBody = util_1.Util.extend(postBody, {\n groupTypes: [groupType === GroupType.Office365 ? \"Unified\" : \"DynamicMembership\"],\n });\n }\n return this.postCore({\n body: JSON.stringify(postBody),\n }).then(function (r) {\n return {\n data: r,\n group: _this.getById(r.id),\n };\n });\n };\n return Groups;\n}(graphqueryable_1.GraphQueryableCollection));\nexports.Groups = Groups;\n/**\n * Represents a group entity\n */\nvar Group = /** @class */ (function (_super) {\n __extends(Group, _super);\n function Group() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n Object.defineProperty(Group.prototype, \"caldendar\", {\n /**\n * The calendar associated with this group\n */\n get: function () {\n return new calendars_1.Calendar(this, \"calendar\");\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Group.prototype, \"events\", {\n /**\n * Retrieve a list of event objects\n */\n get: function () {\n return new calendars_1.Events(this);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Group.prototype, \"owners\", {\n /**\n * Gets the collection of owners for this group\n */\n get: function () {\n return new members_1.Owners(this);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Group.prototype, \"plans\", {\n /**\n * The collection of plans for this group\n */\n get: function () {\n return new plans_1.Plans(this);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Group.prototype, \"members\", {\n /**\n * Gets the collection of members for this group\n */\n get: function () {\n return new members_1.Members(this);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Group.prototype, \"conversations\", {\n /**\n * Gets the conversations collection for this group\n */\n get: function () {\n return new conversations_1.Conversations(this);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Group.prototype, \"acceptedSenders\", {\n /**\n * Gets the collection of accepted senders for this group\n */\n get: function () {\n return new conversations_1.Senders(this, \"acceptedsenders\");\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Group.prototype, \"rejectedSenders\", {\n /**\n * Gets the collection of rejected senders for this group\n */\n get: function () {\n return new conversations_1.Senders(this, \"rejectedsenders\");\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Group.prototype, \"photo\", {\n /**\n * The photo associated with the group\n */\n get: function () {\n return new photos_1.Photo(this);\n },\n enumerable: true,\n configurable: true\n });\n /**\n * Add the group to the list of the current user's favorite groups. Supported for only Office 365 groups\n */\n Group.prototype.addFavorite = function () {\n return this.clone(Group, \"addFavorite\").postCore();\n };\n /**\n * Return all the groups that the specified group is a member of. The check is transitive\n *\n * @param securityEnabledOnly\n */\n Group.prototype.getMemberGroups = function (securityEnabledOnly) {\n if (securityEnabledOnly === void 0) { securityEnabledOnly = false; }\n return this.clone(Group, \"getMemberGroups\").postCore({\n body: JSON.stringify({\n securityEnabledOnly: securityEnabledOnly,\n }),\n });\n };\n /**\n * Deletes this group\n */\n Group.prototype.delete = function () {\n return this.deleteCore();\n };\n /**\n * Update the properties of a group object\n *\n * @param properties Set of properties of this group to update\n */\n Group.prototype.update = function (properties) {\n return this.patchCore({\n body: JSON.stringify(properties),\n });\n };\n /**\n * Remove the group from the list of the current user's favorite groups. Supported for only Office 365 groups\n */\n Group.prototype.removeFavorite = function () {\n return this.clone(Group, \"removeFavorite\").postCore();\n };\n /**\n * Reset the unseenCount of all the posts that the current user has not seen since their last visit\n */\n Group.prototype.resetUnseenCount = function () {\n return this.clone(Group, \"resetUnseenCount\").postCore();\n };\n /**\n * Calling this method will enable the current user to receive email notifications for this group,\n * about new posts, events, and files in that group. Supported for only Office 365 groups\n */\n Group.prototype.subscribeByMail = function () {\n return this.clone(Group, \"subscribeByMail\").postCore();\n };\n /**\n * Calling this method will prevent the current user from receiving email notifications for this group\n * about new posts, events, and files in that group. Supported for only Office 365 groups\n */\n Group.prototype.unsubscribeByMail = function () {\n return this.clone(Group, \"unsubscribeByMail\").postCore();\n };\n /**\n * Get the occurrences, exceptions, and single instances of events in a calendar view defined by a time range, from the default calendar of a group\n *\n * @param start Start date and time of the time range\n * @param end End date and time of the time range\n */\n Group.prototype.getCalendarView = function (start, end) {\n var view = this.clone(Group, \"calendarView\");\n view.query.add(\"startDateTime\", start.toISOString());\n view.query.add(\"endDateTime\", end.toISOString());\n return view.get();\n };\n return Group;\n}(graphqueryable_1.GraphQueryableInstance));\nexports.Group = Group;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/graph/groups.js\n// module id = 54\n// module chunks = 0","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar graphqueryable_1 = require(\"./graphqueryable\");\nvar Members = /** @class */ (function (_super) {\n __extends(Members, _super);\n function Members(baseUrl, path) {\n if (path === void 0) { path = \"members\"; }\n return _super.call(this, baseUrl, path) || this;\n }\n /**\n * Use this API to add a member to an Office 365 group, a security group or a mail-enabled security group through\n * the members navigation property. You can add users or other groups.\n * Important: You can add only users to Office 365 groups.\n *\n * @param id Full @odata.id of the directoryObject, user, or group object you want to add (ex: https://graph.microsoft.com/v1.0/directoryObjects/${id})\n */\n Members.prototype.add = function (id) {\n return this.clone(Members, \"$ref\").postCore({\n body: JSON.stringify({\n \"@odata.id\": id,\n }),\n });\n };\n /**\n * Gets a member of the group by id\n *\n * @param id Group member's id\n */\n Members.prototype.getById = function (id) {\n return new Member(this, id);\n };\n return Members;\n}(graphqueryable_1.GraphQueryableCollection));\nexports.Members = Members;\nvar Member = /** @class */ (function (_super) {\n __extends(Member, _super);\n function Member() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n return Member;\n}(graphqueryable_1.GraphQueryableInstance));\nexports.Member = Member;\nvar Owners = /** @class */ (function (_super) {\n __extends(Owners, _super);\n function Owners(baseUrl, path) {\n if (path === void 0) { path = \"owners\"; }\n return _super.call(this, baseUrl, path) || this;\n }\n return Owners;\n}(Members));\nexports.Owners = Owners;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/graph/members.js\n// module id = 55\n// module chunks = 0","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar graphqueryable_1 = require(\"./graphqueryable\");\n// import { Attachments } from \"./attachments\";\nvar Calendars = /** @class */ (function (_super) {\n __extends(Calendars, _super);\n function Calendars(baseUrl, path) {\n if (path === void 0) { path = \"calendars\"; }\n return _super.call(this, baseUrl, path) || this;\n }\n return Calendars;\n}(graphqueryable_1.GraphQueryableCollection));\nexports.Calendars = Calendars;\nvar Calendar = /** @class */ (function (_super) {\n __extends(Calendar, _super);\n function Calendar() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n Object.defineProperty(Calendar.prototype, \"events\", {\n get: function () {\n return new Events(this);\n },\n enumerable: true,\n configurable: true\n });\n return Calendar;\n}(graphqueryable_1.GraphQueryableInstance));\nexports.Calendar = Calendar;\nvar Events = /** @class */ (function (_super) {\n __extends(Events, _super);\n function Events(baseUrl, path) {\n if (path === void 0) { path = \"events\"; }\n return _super.call(this, baseUrl, path) || this;\n }\n Events.prototype.getById = function (id) {\n return new Event(this, id);\n };\n /**\n * Adds a new event to the collection\n *\n * @param properties The set of properties used to create the event\n */\n Events.prototype.add = function (properties) {\n var _this = this;\n return this.postCore({\n body: JSON.stringify(properties),\n }).then(function (r) {\n return {\n data: r,\n event: _this.getById(r.id),\n };\n });\n };\n return Events;\n}(graphqueryable_1.GraphQueryableCollection));\nexports.Events = Events;\nvar Event = /** @class */ (function (_super) {\n __extends(Event, _super);\n function Event() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n // TODO:: when supported\n // /**\n // * Gets the collection of attachments for this event\n // */\n // public get attachments(): Attachments {\n // return new Attachments(this);\n // }\n /**\n * Update the properties of an event object\n *\n * @param properties Set of properties of this event to update\n */\n Event.prototype.update = function (properties) {\n return this.patchCore({\n body: JSON.stringify(properties),\n });\n };\n /**\n * Deletes this event\n */\n Event.prototype.delete = function () {\n return this.deleteCore();\n };\n return Event;\n}(graphqueryable_1.GraphQueryableInstance));\nexports.Event = Event;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/graph/calendars.js\n// module id = 56\n// module chunks = 0","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar graphqueryable_1 = require(\"./graphqueryable\");\nvar attachments_1 = require(\"./attachments\");\nvar Conversations = /** @class */ (function (_super) {\n __extends(Conversations, _super);\n function Conversations(baseUrl, path) {\n if (path === void 0) { path = \"conversations\"; }\n return _super.call(this, baseUrl, path) || this;\n }\n /**\n * Create a new conversation by including a thread and a post.\n *\n * @param properties Properties used to create the new conversation\n */\n Conversations.prototype.add = function (properties) {\n return this.postCore({\n body: JSON.stringify(properties),\n });\n };\n /**\n * Gets a conversation from this collection by id\n *\n * @param id Group member's id\n */\n Conversations.prototype.getById = function (id) {\n return new Conversation(this, id);\n };\n return Conversations;\n}(graphqueryable_1.GraphQueryableCollection));\nexports.Conversations = Conversations;\nvar Threads = /** @class */ (function (_super) {\n __extends(Threads, _super);\n function Threads(baseUrl, path) {\n if (path === void 0) { path = \"threads\"; }\n return _super.call(this, baseUrl, path) || this;\n }\n /**\n * Gets a thread from this collection by id\n *\n * @param id Group member's id\n */\n Threads.prototype.getById = function (id) {\n return new Thread(this, id);\n };\n /**\n * Adds a new thread to this collection\n *\n * @param properties properties used to create the new thread\n * @returns Id of the new thread\n */\n Threads.prototype.add = function (properties) {\n return this.postCore({\n body: JSON.stringify(properties),\n });\n };\n return Threads;\n}(graphqueryable_1.GraphQueryableCollection));\nexports.Threads = Threads;\nvar Posts = /** @class */ (function (_super) {\n __extends(Posts, _super);\n function Posts(baseUrl, path) {\n if (path === void 0) { path = \"posts\"; }\n return _super.call(this, baseUrl, path) || this;\n }\n /**\n * Gets a thread from this collection by id\n *\n * @param id Group member's id\n */\n Posts.prototype.getById = function (id) {\n return new Post(this, id);\n };\n /**\n * Adds a new thread to this collection\n *\n * @param properties properties used to create the new thread\n * @returns Id of the new thread\n */\n Posts.prototype.add = function (properties) {\n return this.postCore({\n body: JSON.stringify(properties),\n });\n };\n return Posts;\n}(graphqueryable_1.GraphQueryableCollection));\nexports.Posts = Posts;\nvar Conversation = /** @class */ (function (_super) {\n __extends(Conversation, _super);\n function Conversation() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n Object.defineProperty(Conversation.prototype, \"threads\", {\n /**\n * Get all the threads in a group conversation.\n */\n get: function () {\n return new Threads(this);\n },\n enumerable: true,\n configurable: true\n });\n /**\n * Updates this conversation\n */\n Conversation.prototype.update = function (properties) {\n return this.patchCore({\n body: JSON.stringify(properties),\n });\n };\n /**\n * Deletes this member from the group\n */\n Conversation.prototype.delete = function () {\n return this.deleteCore();\n };\n return Conversation;\n}(graphqueryable_1.GraphQueryableInstance));\nexports.Conversation = Conversation;\nvar Thread = /** @class */ (function (_super) {\n __extends(Thread, _super);\n function Thread() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n Object.defineProperty(Thread.prototype, \"posts\", {\n /**\n * Get all the threads in a group conversation.\n */\n get: function () {\n return new Posts(this);\n },\n enumerable: true,\n configurable: true\n });\n /**\n * Reply to a thread in a group conversation and add a new post to it\n *\n * @param post Contents of the post\n */\n Thread.prototype.reply = function (post) {\n return this.clone(Thread, \"reply\").postCore({\n body: JSON.stringify({\n post: post,\n }),\n });\n };\n /**\n * Deletes this member from the group\n */\n Thread.prototype.delete = function () {\n return this.deleteCore();\n };\n return Thread;\n}(graphqueryable_1.GraphQueryableInstance));\nexports.Thread = Thread;\nvar Post = /** @class */ (function (_super) {\n __extends(Post, _super);\n function Post() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n Object.defineProperty(Post.prototype, \"attachments\", {\n get: function () {\n return new attachments_1.Attachments(this);\n },\n enumerable: true,\n configurable: true\n });\n /**\n * Deletes this post\n */\n Post.prototype.delete = function () {\n return this.deleteCore();\n };\n /**\n * Forward a post to a recipient\n */\n Post.prototype.forward = function (info) {\n return this.clone(Post, \"forward\").postCore({\n body: JSON.stringify(info),\n });\n };\n /**\n * Reply to a thread in a group conversation and add a new post to it\n *\n * @param post Contents of the post\n */\n Post.prototype.reply = function (post) {\n return this.clone(Post, \"reply\").postCore({\n body: JSON.stringify({\n post: post,\n }),\n });\n };\n return Post;\n}(graphqueryable_1.GraphQueryableInstance));\nexports.Post = Post;\nvar Senders = /** @class */ (function (_super) {\n __extends(Senders, _super);\n function Senders(baseUrl, path) {\n return _super.call(this, baseUrl, path) || this;\n }\n /**\n * Add a new user or group to this senders collection\n * @param id The full @odata.id value to add (ex: https://graph.microsoft.com/v1.0/users/user@contoso.com)\n */\n Senders.prototype.add = function (id) {\n return this.clone(Senders, \"$ref\").postCore({\n body: JSON.stringify({\n \"@odata.id\": id,\n }),\n });\n };\n /**\n * Removes the entity from the collection\n *\n * @param id The full @odata.id value to remove (ex: https://graph.microsoft.com/v1.0/users/user@contoso.com)\n */\n Senders.prototype.remove = function (id) {\n var remover = this.clone(Senders, \"$ref\");\n remover.query.add(\"$id\", id);\n return remover.deleteCore();\n };\n return Senders;\n}(graphqueryable_1.GraphQueryableCollection));\nexports.Senders = Senders;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/graph/conversations.js\n// module id = 57\n// module chunks = 0","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar graphqueryable_1 = require(\"./graphqueryable\");\nvar Attachments = /** @class */ (function (_super) {\n __extends(Attachments, _super);\n function Attachments(baseUrl, path) {\n if (path === void 0) { path = \"attachments\"; }\n return _super.call(this, baseUrl, path) || this;\n }\n /**\n * Gets a member of the group by id\n *\n * @param id Attachment id\n */\n Attachments.prototype.getById = function (id) {\n return new Attachment(this, id);\n };\n /**\n * Add attachment to this collection\n *\n * @param name Name given to the attachment file\n * @param bytes File content\n */\n Attachments.prototype.addFile = function (name, bytes) {\n return this.postCore({\n body: JSON.stringify({\n \"@odata.type\": \"#microsoft.graph.fileAttachment\",\n contentBytes: bytes,\n name: name,\n }),\n });\n };\n return Attachments;\n}(graphqueryable_1.GraphQueryableCollection));\nexports.Attachments = Attachments;\nvar Attachment = /** @class */ (function (_super) {\n __extends(Attachment, _super);\n function Attachment() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n return Attachment;\n}(graphqueryable_1.GraphQueryableInstance));\nexports.Attachment = Attachment;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/graph/attachments.js\n// module id = 58\n// module chunks = 0","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar graphqueryable_1 = require(\"./graphqueryable\");\nvar Plans = /** @class */ (function (_super) {\n __extends(Plans, _super);\n function Plans(baseUrl, path) {\n if (path === void 0) { path = \"planner/plans\"; }\n return _super.call(this, baseUrl, path) || this;\n }\n /**\n * Gets a plan from this collection by id\n *\n * @param id Plan's id\n */\n Plans.prototype.getById = function (id) {\n return new Plan(this, id);\n };\n return Plans;\n}(graphqueryable_1.GraphQueryableCollection));\nexports.Plans = Plans;\nvar Plan = /** @class */ (function (_super) {\n __extends(Plan, _super);\n function Plan() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n return Plan;\n}(graphqueryable_1.GraphQueryableInstance));\nexports.Plan = Plan;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/graph/plans.js\n// module id = 59\n// module chunks = 0","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar graphqueryable_1 = require(\"./graphqueryable\");\nvar parsers_1 = require(\"../odata/parsers\");\nvar Photo = /** @class */ (function (_super) {\n __extends(Photo, _super);\n function Photo(baseUrl, path) {\n if (path === void 0) { path = \"photo\"; }\n return _super.call(this, baseUrl, path) || this;\n }\n /**\n * Gets the image bytes as a blob (browser)\n */\n Photo.prototype.getBlob = function () {\n return this.clone(Photo, \"$value\", false).get(new parsers_1.BlobFileParser());\n };\n /**\n * Gets the image file byets as a Buffer (node.js)\n */\n Photo.prototype.getBuffer = function () {\n return this.clone(Photo, \"$value\", false).get(new parsers_1.BufferFileParser());\n };\n /**\n * Sets the file bytes\n *\n * @param content Image file contents, max 4 MB\n */\n Photo.prototype.setContent = function (content) {\n return this.clone(Photo, \"$value\", false).patchCore({\n body: content,\n });\n };\n return Photo;\n}(graphqueryable_1.GraphQueryableInstance));\nexports.Photo = Photo;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/graph/photos.js\n// module id = 60\n// module chunks = 0"],"sourceRoot":""} \ No newline at end of file diff --git a/dist/pnp.min.js b/dist/pnp.min.js new file mode 100644 index 00000000..78729097 --- /dev/null +++ b/dist/pnp.min.js @@ -0,0 +1,2 @@ +!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()}(this,function(){return function(e){function t(n){if(r[n])return r[n].exports;var o=r[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var r={};return t.m=e,t.c=r,t.d=function(e,r,n){t.o(e,r)||Object.defineProperty(e,r,{configurable:!1,enumerable:!0,get:n})},t.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(r,"a",r),r},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="/assets/",t(t.s=32)}([function(e,t,r){"use strict";(function(e){function n(e){if(null===e)return"";var t=e.indexOf("_api/");return t>-1?e.substr(0,t):e}Object.defineProperty(t,"__esModule",{value:!0});var o=r(2);t.extractWebUrl=n;var i=function(){function t(){}return t.getCtxCallback=function(e,t){for(var r=[],n=2;n0?e.substring(0,t)+r+e.substring(t,e.length):r+e},t.dateAdd=function(e,t,r){var n=new Date(e);switch(t.toLowerCase()){case"year":n.setFullYear(n.getFullYear()+r);break;case"quarter":n.setMonth(n.getMonth()+3*r);break;case"month":n.setMonth(n.getMonth()+r);break;case"week":n.setDate(n.getDate()+7*r);break;case"day":n.setDate(n.getDate()+r);break;case"hour":n.setTime(n.getTime()+36e5*r);break;case"minute":n.setTime(n.getTime()+6e4*r);break;case"second":n.setTime(n.getTime()+1e3*r);break;default:n=void 0}return n},t.loadStylesheet=function(e,t){t&&(e+="?"+encodeURIComponent((new Date).getTime().toString()));var r=document.getElementsByTagName("head");if(r.length>0){var n=document.createElement("link");r[0].appendChild(n),n.setAttribute("type","text/css"),n.setAttribute("rel","stylesheet"),n.setAttribute("href",e)}},t.combinePaths=function(){for(var e=[],r=0;r0)return n(t.combinePaths(i.substr(0,o),r))})}return n(r)})},t}();t.Util=i}).call(t,r(22))},function(e,t,r){"use strict";var n=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(t,"__esModule",{value:!0});var o=r(0),i=r(8),a=r(9),u=r(4),s=r(3),c=r(24),l=r(14),p=r(25),f=function(e){function t(t,r){var n=e.call(this)||this;if(n._options={},n._query=new i.Dictionary,n._batch=null,"string"==typeof t){var a=t;if(o.Util.isUrlAbsolute(a)||a.lastIndexOf("/")<0)n._parentUrl=a,n._url=o.Util.combinePaths(a,r);else if(a.lastIndexOf("/")>a.lastIndexOf("(")){var u=a.lastIndexOf("/");n._parentUrl=a.slice(0,u),r=o.Util.combinePaths(a.slice(u),r),n._url=o.Util.combinePaths(n._parentUrl,r)}else{var u=a.lastIndexOf("(");n._parentUrl=a.slice(0,u),n._url=o.Util.combinePaths(a,r)}}else{var s=t;n._parentUrl=s._url,n._options=s._options;var c=s._query.get("@target");null!==c&&n._query.add("@target",c),n._url=o.Util.combinePaths(n._parentUrl,r)}return n}return n(t,e),t.prototype.addBatchDependency=function(){return this.hasBatch?this._batch.addDependency():function(){return null}},Object.defineProperty(t.prototype,"hasBatch",{get:function(){return null!==this._batch},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"batch",{get:function(){return this.hasBatch?this._batch:null},enumerable:!0,configurable:!0}),t.prototype.as=function(e){var t=new e(this._url,null);return o.Util.extend(t,this,!0)},t.prototype.inBatch=function(e){if(null!==this._batch)throw new u.AlreadyInBatchException;return this._batch=e,this},t.prototype.toUrlAndQuery=function(){var e=new i.Dictionary,t=this.toUrl().replace(/'!(@.*?)::(.*?)'/gi,function(t,r,n){return s.Logger.write("Rewriting aliased parameter from match "+t+" to label: "+r+" value: "+n,s.LogLevel.Verbose),e.add(r,"'"+n+"'"),r});return e.merge(this._query),e.count()>0&&(t+="?"+e.getKeys().map(function(t){return t+"="+e.get(t)}).join("&")),t},t.prototype.getParent=function(e,t,r,n){void 0===t&&(t=this.parentUrl);var o=new e(t,r);o.configure(this._options);var i=this.query.get("@target");return null!==i&&o.query.add("@target",i),void 0!==n&&(o=o.inBatch(n)),o},t.prototype.clone=function(e,t,r){void 0===r&&(r=!0);var n=new e(this,t),o=this.query.get("@target");return null!==o&&n.query.add("@target",o),r&&this.hasBatch&&(n=n.inBatch(this.batch)),n},t.prototype.toRequestContext=function(e,t,r,n){var i=this;void 0===t&&(t={}),void 0===n&&(n=l.PipelineMethods.default);var u=this.hasBatch?this.addBatchDependency():function(){};return o.Util.toAbsoluteUrl(this.toUrlAndQuery()).then(function(s){return a.mergeOptions(t,i._options),{batch:i._batch,batchDependency:u,cachingOptions:i._cachingOptions,clientFactory:function(){return new p.HttpClient},isBatched:i.hasBatch,isCached:i._useCaching,options:t,parser:r,pipeline:n,requestAbsoluteUrl:s,requestId:o.Util.getGUID(),verb:e}})},t}(c.ODataQueryable);t.SharePointQueryable=f;var h=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.filter=function(e){return this._query.add("$filter",e),this},t.prototype.select=function(){for(var e=[],t=0;t0&&this._query.add("$select",e.join(",")),this},t.prototype.expand=function(){for(var e=[],t=0;t0&&this._query.add("$expand",e.join(",")),this},t.prototype.orderBy=function(e,t){void 0===t&&(t=!0);for(var r=this._query.getKeys(),n=[],o=t?" asc":" desc",i=0;i0&&this._query.add("$select",e.join(",")),this},t.prototype.expand=function(){for(var e=[],t=0;t0&&this._query.add("$expand",e.join(",")),this},t}(f);t.SharePointQueryableInstance=d},function(e,t,r){"use strict";function n(e){a.set(e)}Object.defineProperty(t,"__esModule",{value:!0});var o=r(33),i=function(){function e(){this._defaultCachingStore="session",this._defaultCachingTimeoutSeconds=60,this._globalCacheDisable=!1,this._enableCacheExpiration=!1,this._cacheExpirationIntervalMilliseconds=750,this._spfxContext=null,this._spFetchClientFactory=function(){return new o.FetchClient},this._spBaseUrl=null,this._spHeaders=null,this._graphHeaders=null,this._graphFetchClientFactory=function(){return null}}return e.prototype.set=function(e){var t=this;if(e.hasOwnProperty("globalCacheDisable")&&(this._globalCacheDisable=e.globalCacheDisable),e.hasOwnProperty("defaultCachingStore")&&(this._defaultCachingStore=e.defaultCachingStore),e.hasOwnProperty("defaultCachingTimeoutSeconds")&&(this._defaultCachingTimeoutSeconds=e.defaultCachingTimeoutSeconds),e.hasOwnProperty("sp")&&(e.sp.hasOwnProperty("fetchClientFactory")&&(this._spFetchClientFactory=e.sp.fetchClientFactory),e.sp.hasOwnProperty("baseUrl")&&(this._spBaseUrl=e.sp.baseUrl),e.sp.hasOwnProperty("headers")&&(this._spHeaders=e.sp.headers)),e.hasOwnProperty("spfxContext")&&(this._spfxContext=e.spfxContext,void 0!==this._spfxContext.graphHttpClient&&(this._graphFetchClientFactory=function(){return t._spfxContext.graphHttpClient})),e.hasOwnProperty("graph")&&(e.graph.hasOwnProperty("headers")&&(this._graphHeaders=e.graph.headers),e.graph.hasOwnProperty("fetchClientFactory")&&(this._graphFetchClientFactory=e.graph.fetchClientFactory)),e.hasOwnProperty("enableCacheExpiration")&&(this._enableCacheExpiration=e.enableCacheExpiration),e.hasOwnProperty("cacheExpirationIntervalMilliseconds")){var r=e.cacheExpirationIntervalMilliseconds<300?300:e.cacheExpirationIntervalMilliseconds;this._cacheExpirationIntervalMilliseconds=r}},Object.defineProperty(e.prototype,"defaultCachingStore",{get:function(){return this._defaultCachingStore},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"defaultCachingTimeoutSeconds",{get:function(){return this._defaultCachingTimeoutSeconds},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"globalCacheDisable",{get:function(){return this._globalCacheDisable},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"spFetchClientFactory",{get:function(){return this._spFetchClientFactory},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"spBaseUrl",{get:function(){return null!==this._spBaseUrl?this._spBaseUrl:null!==this._spfxContext?this._spfxContext.pageContext.web.absoluteUrl:null},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"spHeaders",{get:function(){return this._spHeaders},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"enableCacheExpiration",{get:function(){return this._enableCacheExpiration},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"cacheExpirationIntervalMilliseconds",{get:function(){return this._cacheExpirationIntervalMilliseconds},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"spfxContext",{get:function(){return this._spfxContext},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"graphFetchClientFactory",{get:function(){return this._graphFetchClientFactory},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"graphHeaders",{get:function(){return this._graphHeaders},enumerable:!0,configurable:!0}),e}();t.RuntimeConfigImpl=i;var a=new i;t.RuntimeConfig=a,t.setRuntimeConfig=n},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n;!function(e){e[e.Verbose=0]="Verbose",e[e.Info=1]="Info",e[e.Warning=2]="Warning",e[e.Error=3]="Error",e[e.Off=99]="Off"}(n=t.LogLevel||(t.LogLevel={}));var o=function(){function e(){}return Object.defineProperty(e,"activeLogLevel",{get:function(){return e.instance.activeLogLevel},set:function(t){e.instance.activeLogLevel=t},enumerable:!0,configurable:!0}),Object.defineProperty(e,"instance",{get:function(){return void 0!==e._instance&&null!==e._instance||(e._instance=new i),e._instance},enumerable:!0,configurable:!0}),e.subscribe=function(){for(var t=[],r=0;r0&&this._query.add("$select",e.join(",")),this},t.prototype.expand=function(){for(var e=[],t=0;t0&&this._query.add("$expand",e.join(",")),this},t.prototype.orderBy=function(e,t){void 0===t&&(t=!0);for(var r=this._query.getKeys(),n=[],o=t?" asc":" desc",i=0;i0&&this._query.add("$select",e.join(",")),this},t.prototype.expand=function(){for(var e=[],t=0;t0&&this._query.add("$expand",e.join(",")),this},t}(c);t.GraphQueryableInstance=f},function(e,t,r){"use strict";function n(e){if(e.hasOwnProperty("odata.id"))return e["odata.id"];if(e.hasOwnProperty("__metadata")&&e.__metadata.hasOwnProperty("id"))return e.__metadata.id;throw new l.ODataIdException(e)}function o(e){return e.hasOwnProperty("odata.metadata")&&e.hasOwnProperty("odata.editLink")?s.Util.combinePaths(s.extractWebUrl(e["odata.metadata"]),"_api",e["odata.editLink"]):e.hasOwnProperty("__metadata")?e.__metadata.uri:(c.Logger.write("No uri information found in ODataEntity parsing, chaining will fail for this object.",c.LogLevel.Warning),"")}function i(e){return new f(e)}function a(e){return new h(e)}var u=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(t,"__esModule",{value:!0});var s=r(0),c=r(3),l=r(4),p=r(13);t.spExtractODataId=n;var f=function(e){function t(t){var r=e.call(this)||this;return r.factory=t,r}return u(t,e),t.prototype.parse=function(t){var r=this;return e.prototype.parse.call(this,t).then(function(e){var t=new r.factory(o(e),null);return s.Util.extend(t,e)})},t}(p.ODataParserBase),h=function(e){function t(t){var r=e.call(this)||this;return r.factory=t,r}return u(t,e),t.prototype.parse=function(t){var r=this;return e.prototype.parse.call(this,t).then(function(e){return e.map(function(e){var t=new r.factory(o(e),null);return s.Util.extend(t,e)})})},t}(p.ODataParserBase);t.spGetEntityUrl=o,t.spODataEntity=i,t.spODataEntityArray=a},function(e,t,r){"use strict";function n(){return new s}var o=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(t,"__esModule",{value:!0});var i=r(13),a=r(0),u=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(i.ODataParserBase);t.ODataDefaultParser=u;var s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.parse=function(t){return e.prototype.parse.call(this,t).then(function(e){return e})},t}(i.ODataParserBase);t.ODataValue=n;var c=function(){function e(){}return e.prototype.parse=function(e){return e.json()},e}();t.ODataRawParserImpl=c,t.ODataRaw=new c;var l=function(){function e(){}return e.prototype.parse=function(e){return e.text()},e}();t.TextFileParser=l;var p=function(){function e(){}return e.prototype.parse=function(e){return e.blob()},e}();t.BlobFileParser=p;var f=function(){function e(){}return e.prototype.parse=function(e){return e.json()},e}();t.JSONFileParser=f;var h=function(){function e(){}return e.prototype.parse=function(e){return a.Util.isFunction(e.arrayBuffer)?e.arrayBuffer():e.buffer()},e}();t.BufferFileParser=h},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){void 0===e&&(e=[]),void 0===t&&(t=[]),this.keys=e,this.values=t}return e.prototype.get=function(e){var t=this.keys.indexOf(e);return t<0?null:this.values[t]},e.prototype.add=function(e,t){var r=this.keys.indexOf(e);r>-1?this.values[r]=t:(this.keys.push(e),this.values.push(t))},e.prototype.merge=function(e){var t=this;if("getKeys"in e){var r=e;r.getKeys().map(function(e){t.add(e,r.get(e))})}else{var n=e;for(var o in n)n.hasOwnProperty(o)&&this.add(o,n[o])}},e.prototype.remove=function(e){var t=this.keys.indexOf(e);if(t<0)return null;var r=this.values[t];return this.keys.splice(t,1),this.values.splice(t,1),r},e.prototype.getKeys=function(){return this.keys},e.prototype.getValues=function(){return this.values},e.prototype.clear=function(){this.keys=[],this.values=[]},e.prototype.count=function(){return this.keys.length},e}();t.Dictionary=n},function(e,t,r){"use strict";function n(e,t){e.headers=e.headers||{};var r=i.Util.extend(e.headers,t.headers);e=i.Util.extend(e,t),e.headers=r}function o(e,t){if(void 0!==t&&null!==t){new Request("",{headers:t}).headers.forEach(function(t,r){e.append(r,t)})}}Object.defineProperty(t,"__esModule",{value:!0});var i=r(0);t.mergeOptions=n,t.mergeHeaders=o},function(e,t,r){"use strict";var n=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(t,"__esModule",{value:!0});var o=r(1),i=r(15),a=r(29),u=r(46),s=r(17),c=r(20),l=r(19),p=r(27),f=r(12),h=r(0),d=r(15),y=r(28),g=r(21),b=r(6),v=r(30),m=r(31),P=r(11),_=r(47),w=function(e){function t(t,r){return void 0===r&&(r="webs"),e.call(this,t,r)||this}return n(t,e),t.prototype.add=function(e,r,n,o,i,a){void 0===n&&(n=""),void 0===o&&(o="STS"),void 0===i&&(i=1033),void 0===a&&(a=!0);var u={Description:n,Language:i,Title:e,Url:r,UseSamePermissionsAsParentSite:a,WebTemplate:o},s=JSON.stringify({parameters:h.Util.extend({__metadata:{type:"SP.WebCreationInformation"}},u)});return this.clone(t,"add").postCore({body:s}).then(function(e){return{data:e,web:new S(b.spExtractODataId(e).replace(/_api\/web\/?/i,""))}})},t}(o.SharePointQueryableCollection);t.Webs=w;var O=function(e){function t(t,r){return void 0===r&&(r="webinfos"),e.call(this,t,r)||this}return n(t,e),t}(o.SharePointQueryableCollection);t.WebInfos=O;var S=function(e){function t(t,r){return void 0===r&&(r="_api/web"),e.call(this,t,r)||this}return n(t,e),t.fromUrl=function(e,r){return new t(h.extractWebUrl(e),r)},Object.defineProperty(t.prototype,"webs",{get:function(){return new w(this)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"webinfos",{get:function(){return new O(this)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"contentTypes",{get:function(){return new c.ContentTypes(this)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"lists",{get:function(){return new i.Lists(this)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"fields",{get:function(){return new a.Fields(this)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"features",{get:function(){return new m.Features(this)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"availablefields",{get:function(){return new a.Fields(this,"availablefields")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"navigation",{get:function(){return new u.Navigation(this)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"siteUsers",{get:function(){return new y.SiteUsers(this)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"siteGroups",{get:function(){return new s.SiteGroups(this)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"currentUser",{get:function(){return new y.CurrentUser(this)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"folders",{get:function(){return new l.Folders(this)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"userCustomActions",{get:function(){return new g.UserCustomActions(this)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"roleDefinitions",{get:function(){return new p.RoleDefinitions(this)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"relatedItems",{get:function(){return _.RelatedItemManagerImpl.FromUrl(this.toUrl())},enumerable:!0,configurable:!0}),t.prototype.createBatch=function(){return new v.ODataBatch(this.parentUrl)},Object.defineProperty(t.prototype,"rootFolder",{get:function(){return new l.Folder(this,"rootFolder")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"associatedOwnerGroup",{get:function(){return new s.SiteGroup(this,"associatedownergroup")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"associatedMemberGroup",{get:function(){return new s.SiteGroup(this,"associatedmembergroup")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"associatedVisitorGroup",{get:function(){return new s.SiteGroup(this,"associatedvisitorgroup")},enumerable:!0,configurable:!0}),t.prototype.getFolderByServerRelativeUrl=function(e){return new l.Folder(this,"getFolderByServerRelativeUrl('"+e+"')")},t.prototype.getFileByServerRelativeUrl=function(e){return new f.File(this,"getFileByServerRelativeUrl('"+e+"')")},t.prototype.getList=function(e){return new d.List(this,"getList('"+e+"')")},t.prototype.update=function(e){var t=this,r=JSON.stringify(h.Util.extend({__metadata:{type:"SP.Web"}},e));return this.postCore({body:r,headers:{"X-HTTP-Method":"MERGE"}}).then(function(e){return{data:e,web:t}})},t.prototype.delete=function(){return e.prototype.deleteCore.call(this)},t.prototype.applyTheme=function(e,r,n,o){var i=JSON.stringify({backgroundImageUrl:n,colorPaletteUrl:e,fontSchemeUrl:r,shareGenerated:o});return this.clone(t,"applytheme").postCore({body:i})},t.prototype.applyWebTemplate=function(e){var r=this.clone(t,"applywebtemplate");return r.concat("(@t)"),r.query.add("@t",e),r.postCore()},t.prototype.ensureUser=function(e){var r=JSON.stringify({logonName:e});return this.clone(t,"ensureuser").postCore({body:r}).then(function(e){return{data:e,user:new y.SiteUser(b.spExtractODataId(e))}})},t.prototype.availableWebTemplates=function(e,t){return void 0===e&&(e=1033),void 0===t&&(t=!0),new o.SharePointQueryableCollection(this,"getavailablewebtemplates(lcid="+e+", doincludecrosslanguage="+t+")")},t.prototype.getCatalog=function(e){return this.clone(t,"getcatalog("+e+")").select("Id").get().then(function(e){return new d.List(b.spExtractODataId(e))})},t.prototype.getChanges=function(e){var r=JSON.stringify({query:h.Util.extend({__metadata:{type:"SP.ChangeQuery"}},e)});return this.clone(t,"getchanges").postCore({body:r})},Object.defineProperty(t.prototype,"customListTemplate",{get:function(){return new o.SharePointQueryableCollection(this,"getcustomlisttemplates")},enumerable:!0,configurable:!0}),t.prototype.getUserById=function(e){return new y.SiteUser(this,"getUserById("+e+")")},t.prototype.mapToIcon=function(e,r,n){return void 0===r&&(r=0),void 0===n&&(n=""),this.clone(t,"maptoicon(filename='"+e+"', progid='"+n+"', size="+r+")").get()},t}(P.SharePointQueryableShareableWeb);t.Web=S},function(e,t,r){"use strict";var n=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(t,"__esModule",{value:!0});var o=r(0),i=r(10),a=r(6),u=r(1),s=r(26),c=r(18),l=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.getShareLink=function(e,r){void 0===r&&(r=null);var n=null!==r?r.toISOString():null;return this.clone(t,"shareLink").postAsCore({body:JSON.stringify({request:{createLink:!0,emailData:null,settings:{expiration:n,linkKind:e}}})})},t.prototype.shareWith=function(e,r,n,a,u){var s=this;void 0===n&&(n=!1),void 0===a&&(a=!1),Array.isArray(e)||(e=[e]);var l=JSON.stringify(e.map(function(e){return{Key:e}})),p=r===c.SharingRole.Edit?c.RoleType.Contributor:c.RoleType.Reader;return i.Web.fromUrl(this.toUrl()).roleDefinitions.select("Id").filter("RoleTypeKind eq "+p).get().then(function(e){if(!Array.isArray(e)||e.length<1)throw new Error("Could not locate a role defintion with RoleTypeKind "+p);var r={includeAnonymousLinkInEmail:n,peoplePickerInput:l,propagateAcl:a,roleValue:"role:"+e[0].Id,useSimplifiedRoles:!0};return void 0!==u&&(r=o.Util.extend(r,{emailBody:u.body,emailSubject:void 0!==u.subject?u.subject:"",sendEmail:!0})),s.clone(t,"shareObject").postAsCore({body:JSON.stringify(r)})})},t.prototype.shareObject=function(e,t){var r=this;return void 0===t&&(t=!1),t?this.sendShareObjectRequest(e):(e=o.Util.extend(e,{group:null,includeAnonymousLinkInEmail:!1,propagateAcl:!1,useSimplifiedRoles:!0},!0),this.getRoleValue(e.role,e.group).then(function(t){Array.isArray(e.loginNames)||(e.loginNames=[e.loginNames]);var n=JSON.stringify(e.loginNames.map(function(e){return{Key:e}})),i={peoplePickerInput:n,roleValue:t,url:e.url};return void 0!==e.emailData&&null!==e.emailData&&(i=o.Util.extend(i,{emailBody:e.emailData.body,emailSubject:void 0!==e.emailData.subject?e.emailData.subject:"Shared with you.",sendEmail:!0})),r.sendShareObjectRequest(i)}))},t.prototype.unshareObjectWeb=function(e){return this.clone(t,"unshareObject").postAsCore({body:JSON.stringify({url:e})})},t.prototype.checkPermissions=function(e){return this.clone(t,"checkPermissions").postAsCore({body:JSON.stringify({recipients:e})})},t.prototype.getSharingInformation=function(e){return void 0===e&&(e=null),this.clone(t,"getSharingInformation").postAsCore({body:JSON.stringify({request:e})})},t.prototype.getObjectSharingSettings=function(e){return void 0===e&&(e=!0),this.clone(t,"getObjectSharingSettings").postAsCore({body:JSON.stringify({useSimplifiedRoles:e})})},t.prototype.unshareObject=function(){return this.clone(t,"unshareObject").postAsCore()},t.prototype.deleteLinkByKind=function(e){return this.clone(t,"deleteLinkByKind").postCore({body:JSON.stringify({linkKind:e})})},t.prototype.unshareLink=function(e,r){return void 0===r&&(r="00000000-0000-0000-0000-000000000000"),this.clone(t,"unshareLink").postCore({body:JSON.stringify({linkKind:e,shareId:r})})},t.prototype.getRoleValue=function(e,t){if(void 0===t||null===t){var r=e===c.SharingRole.Edit?c.RoleType.Contributor:c.RoleType.Reader;return i.Web.fromUrl(this.toUrl()).roleDefinitions.select("Id").top(1).filter("RoleTypeKind eq "+r).getAs().then(function(e){if(e.length<1)throw new Error("Could not locate associated role definition for supplied role. Edit and View are supported");return"role: "+e[0].Id})}switch(t){case c.RoleType.Contributor:return i.Web.fromUrl(this.toUrl()).associatedMemberGroup.select("Id").getAs().then(function(e){return"group: "+e.Id});case c.RoleType.Reader:case c.RoleType.Guest:return i.Web.fromUrl(this.toUrl()).associatedVisitorGroup.select("Id").getAs().then(function(e){return"group: "+e.Id});default:throw new Error("Could not determine role value for supplied value. Contributor, Reader, and Guest are supported")}},t.prototype.getShareObjectWeb=function(e){return Promise.resolve(i.Web.fromUrl(e,"/_api/SP.Web.ShareObject"))},t.prototype.sendShareObjectRequest=function(e){return this.getShareObjectWeb(this.toUrl()).then(function(r){return r.expand("UsersWithAccessRequests","GroupsSharedWith").as(t).postCore({body:JSON.stringify(e)})})},t}(u.SharePointQueryable);t.SharePointQueryableShareable=l;var p=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.shareWith=function(e,t,r){var n=this;void 0===t&&(t=c.SharingRole.View);var a=this.addBatchDependency();return i.Web.fromUrl(this.toUrl(),"/_api/web/url").get().then(function(i){return a(),n.shareObject(o.Util.combinePaths(i,"/_layouts/15/aclinv.aspx?forSharing=1&mbypass=1"),e,t,r)})},t.prototype.shareObject=function(e,t,r,n,o,i,a,u){return void 0===i&&(i=!1),void 0===a&&(a=!1),void 0===u&&(u=!0),this.clone(l,null).shareObject({emailData:n,group:o,includeAnonymousLinkInEmail:a,loginNames:t,propagateAcl:i,role:r,url:e,useSimplifiedRoles:u})},t.prototype.shareObjectRaw=function(e){return this.clone(l,null).shareObject(e,!0)},t.prototype.unshareObject=function(e){return this.clone(l,null).unshareObjectWeb(e)},t}(s.SharePointQueryableSecurable);t.SharePointQueryableShareableWeb=p;var f=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.getShareLink=function(e,t){return void 0===e&&(e=c.SharingLinkKind.OrganizationView),void 0===t&&(t=null),this.clone(l,null).getShareLink(e,t)},t.prototype.shareWith=function(e,t,r,n){return void 0===t&&(t=c.SharingRole.View),void 0===r&&(r=!1),this.clone(l,null).shareWith(e,t,r,!1,n)},t.prototype.checkSharingPermissions=function(e){return this.clone(l,null).checkPermissions(e)},t.prototype.getSharingInformation=function(e){return void 0===e&&(e=null),this.clone(l,null).getSharingInformation(e)},t.prototype.getObjectSharingSettings=function(e){return void 0===e&&(e=!0),this.clone(l,null).getObjectSharingSettings(e)},t.prototype.unshare=function(){return this.clone(l,null).unshareObject()},t.prototype.deleteSharingLinkByKind=function(e){return this.clone(l,null).deleteLinkByKind(e)},t.prototype.unshareLink=function(e,t){return this.clone(l,null).unshareLink(e,t)},t}(s.SharePointQueryableSecurable);t.SharePointQueryableShareableItem=f;var h=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.getShareLink=function(e,t){void 0===e&&(e=c.SharingLinkKind.OrganizationView),void 0===t&&(t=null);var r=this.addBatchDependency();return this.getShareable().then(function(n){return r(),n.getShareLink(e,t)})},t.prototype.checkSharingPermissions=function(e){var t=this.addBatchDependency();return this.getShareable().then(function(r){return t(),r.checkPermissions(e)})},t.prototype.getSharingInformation=function(e){void 0===e&&(e=null);var t=this.addBatchDependency();return this.getShareable().then(function(r){return t(),r.getSharingInformation(e)})},t.prototype.getObjectSharingSettings=function(e){void 0===e&&(e=!0);var t=this.addBatchDependency();return this.getShareable().then(function(r){return t(),r.getObjectSharingSettings(e)})},t.prototype.unshare=function(){var e=this.addBatchDependency();return this.getShareable().then(function(t){return e(),t.unshareObject()})},t.prototype.deleteSharingLinkByKind=function(e){var t=this.addBatchDependency();return this.getShareable().then(function(r){return t(),r.deleteLinkByKind(e)})},t.prototype.unshareLink=function(e,t){var r=this.addBatchDependency();return this.getShareable().then(function(n){return r(),n.unshareLink(e,t)})},t.prototype.getShareable=function(){var e=this;return this.clone(d,"listItemAllFields",!1).select("odata.editlink").get().then(function(t){var r=new l(a.spGetEntityUrl(t));return e.hasBatch&&(r=r.inBatch(e.batch)),r})},t}(u.SharePointQueryableInstance);t.FileFolderShared=h;var d=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.shareWith=function(e,t,r,n){void 0===t&&(t=c.SharingRole.View),void 0===r&&(r=!1);var o=this.addBatchDependency();return this.getShareable().then(function(i){return o(),i.shareWith(e,t,r,!1,n)})},t}(h);t.SharePointQueryableShareableFile=d;var y=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.shareWith=function(e,t,r,n,o){void 0===t&&(t=c.SharingRole.View),void 0===r&&(r=!1),void 0===n&&(n=!1);var i=this.addBatchDependency();return this.getShareable().then(function(a){return i(),a.shareWith(e,t,r,n,o)})},t}(h);t.SharePointQueryableShareableFolder=y},function(e,t,r){"use strict";var n=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(t,"__esModule",{value:!0});var o=r(1),i=r(7),a=r(0),u=r(4),s=r(41),c=r(16),l=r(11),p=r(6),f=function(e){function t(t,r){return void 0===r&&(r="files"),e.call(this,t,r)||this}return n(t,e),t.prototype.getByName=function(e){var t=new h(this);return t.concat("('"+e+"')"),t},t.prototype.add=function(e,r,n){var o=this;return void 0===n&&(n=!0),new t(this,"add(overwrite="+n+",url='"+e+"')").postCore({body:r}).then(function(t){return{data:t,file:o.getByName(e)}})},t.prototype.addChunked=function(e,r,n,o,i){var a=this;return void 0===o&&(o=!0),void 0===i&&(i=10485760),this.clone(t,"add(overwrite="+o+",url='"+e+"')",!1).postCore().then(function(){return a.getByName(e)}).then(function(e){return e.setContentChunked(r,n,i)}).then(function(t){return{data:t,file:a.getByName(e)}})},t.prototype.addTemplateFile=function(e,r){var n=this;return this.clone(t,"addTemplateFile(urloffile='"+e+"',templatefiletype="+r+")",!1).postCore().then(function(t){return{data:t,file:n.getByName(e)}})},t}(o.SharePointQueryableCollection);t.Files=f;var h=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),Object.defineProperty(t.prototype,"listItemAllFields",{get:function(){return new o.SharePointQueryableCollection(this,"listItemAllFields")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"versions",{get:function(){return new d(this)},enumerable:!0,configurable:!0}),t.prototype.approve=function(e){return void 0===e&&(e=""),this.clone(t,"approve(comment='"+e+"')").postCore()},t.prototype.cancelUpload=function(e){return this.clone(t,"cancelUpload(uploadId=guid'"+e+"')",!1).postCore()},t.prototype.checkin=function(e,r){if(void 0===e&&(e=""),void 0===r&&(r=g.Major),e.length>1023)throw new u.MaxCommentLengthException;return this.clone(t,"checkin(comment='"+e+"',checkintype="+r+")").postCore()},t.prototype.checkout=function(){return this.clone(t,"checkout").postCore()},t.prototype.copyTo=function(e,r){return void 0===r&&(r=!0),this.clone(t,"copyTo(strnewurl='"+e+"',boverwrite="+r+")").postCore()},t.prototype.delete=function(e){return void 0===e&&(e="*"),this.clone(t,null).postCore({headers:{"IF-Match":e,"X-HTTP-Method":"DELETE"}})},t.prototype.deny=function(e){if(void 0===e&&(e=""),e.length>1023)throw new u.MaxCommentLengthException;return this.clone(t,"deny(comment='"+e+"')").postCore()},t.prototype.getLimitedWebPartManager=function(e){return void 0===e&&(e=b.Shared),new s.LimitedWebPartManager(this,"getLimitedWebPartManager(scope="+e+")")},t.prototype.moveTo=function(e,r){return void 0===r&&(r=v.Overwrite),this.clone(t,"moveTo(newurl='"+e+"',flags="+r+")").postCore()},t.prototype.publish=function(e){if(void 0===e&&(e=""),e.length>1023)throw new u.MaxCommentLengthException;return this.clone(t,"publish(comment='"+e+"')").postCore()},t.prototype.recycle=function(){return this.clone(t,"recycle").postCore()},t.prototype.undoCheckout=function(){return this.clone(t,"undoCheckout").postCore()},t.prototype.unpublish=function(e){if(void 0===e&&(e=""),e.length>1023)throw new u.MaxCommentLengthException;return this.clone(t,"unpublish(comment='"+e+"')").postCore()},t.prototype.getText=function(){return this.clone(t,"$value",!1).get(new i.TextFileParser,{headers:{binaryStringResponseBody:"true"}})},t.prototype.getBlob=function(){return this.clone(t,"$value",!1).get(new i.BlobFileParser,{headers:{binaryStringResponseBody:"true"}})},t.prototype.getBuffer=function(){return this.clone(t,"$value",!1).get(new i.BufferFileParser,{headers:{binaryStringResponseBody:"true"}})},t.prototype.getJSON=function(){return this.clone(t,"$value",!1).get(new i.JSONFileParser,{headers:{binaryStringResponseBody:"true"}})},t.prototype.setContent=function(e){var r=this;return this.clone(t,"$value",!1).postCore({body:e,headers:{"X-HTTP-Method":"PUT"}}).then(function(e){return new t(r)})},t.prototype.getItem=function(){for(var e=[],t=0;t0?JSON.parse(e):{}}).then(function(e){return r(t.parseODataJSON(e))}).catch(function(e){return n(e)}))})},e.prototype.handleError=function(e,t){return e.ok||e.json().then(function(r){var o={responseBody:r,responseHeaders:e.headers};t(new n.ProcessHttpClientResponseException(e.status,e.statusText,o))}).catch(function(r){o.Logger.log({data:r,level:o.LogLevel.Warning,message:"There was an error parsing the error response body. See data for details."});var i={responseBody:"[[body not available]]",responseHeaders:e.headers};t(new n.ProcessHttpClientResponseException(e.status,e.statusText,i))}),e.ok},e.prototype.parseODataJSON=function(e){var t=e;return e.hasOwnProperty("d")?t=e.d.hasOwnProperty("results")?e.d.results:e.d:e.hasOwnProperty("value")&&(t=e.value),t},e}();t.ODataParserBase=i},function(e,t,r){"use strict";function n(e){return l.Logger.log({data:e.result,level:l.LogLevel.Verbose,message:"["+e.requestId+"] ("+(new Date).getTime()+") Returning result, see data property for value."}),Promise.resolve(e.result)}function o(e,t){return new Promise(function(r){e.result=t,e.hasResult=!0,r(e)})}function i(e){return e.pipeline.length<1?Promise.resolve(e):e.pipeline.shift()(e)}function a(e){return i(e).then(function(e){return n(e)}).catch(function(e){throw l.Logger.log({data:e,level:l.LogLevel.Error,message:"Error in request pipeline: "+e.message}),e})}function u(e){return void 0===e&&(e=!1),function(t,r,n){var o=n.value;n.value=function(){for(var n=[],a=0;a0&&n[0].hasOwnProperty("hasResult")&&n[0].hasResult?(l.Logger.write("["+n[0].requestId+"] ("+(new Date).getTime()+") Skipping request pipeline method "+r+", existing result in pipeline.",l.LogLevel.Verbose),Promise.resolve(n[0])):(l.Logger.write("["+n[0].requestId+"] ("+(new Date).getTime()+") Calling request pipeline method "+r+".",l.LogLevel.Verbose),o.apply(t,n).then(function(e){return i(e)}))}}}var s=this&&this.__decorate||function(e,t,r,n){var o,i=arguments.length,a=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,n);else for(var u=e.length-1;u>=0;u--)(o=e[u])&&(a=(i<3?o(a):i>3?o(t,r,a):o(t,r))||a);return i>3&&a&&Object.defineProperty(t,r,a),a};Object.defineProperty(t,"__esModule",{value:!0});var c=r(37),l=r(3),p=r(0);t.setResult=o,t.pipe=a,t.requestPipelineMethod=u;var f=function(){function e(){}return e.logStart=function(e){return new Promise(function(t){l.Logger.log({data:l.Logger.activeLogLevel===l.LogLevel.Info?{}:e,level:l.LogLevel.Info,message:"["+e.requestId+"] ("+(new Date).getTime()+") Beginning "+e.verb+" request ("+e.requestAbsoluteUrl+")"}),t(e)})},e.caching=function(e){return new Promise(function(t){if("GET"===e.verb&&e.isCached){l.Logger.write("["+e.requestId+"] ("+(new Date).getTime()+") Caching is enabled for request, checking cache...",l.LogLevel.Info);var r=new c.CachingOptions(e.requestAbsoluteUrl.toLowerCase());if(void 0!==e.cachingOptions&&(r=p.Util.extend(r,e.cachingOptions)),null!==r.store){var n=r.store.get(r.key);if(null!==n)return l.Logger.log({data:l.Logger.activeLogLevel===l.LogLevel.Info?{}:n,level:l.LogLevel.Info,message:"["+e.requestId+"] ("+(new Date).getTime()+") Value returned from cache."}),e.batchDependency(),o(e,n).then(function(e){return t(e)})}l.Logger.write("["+e.requestId+"] ("+(new Date).getTime()+") Value not found in cache.",l.LogLevel.Info),e.parser=new c.CachingParserWrapper(e.parser,r)}return t(e)})},e.send=function(e){return new Promise(function(t,r){if(e.isBatched){var n=e.batch.add(e.requestAbsoluteUrl,e.verb,e.options,e.parser);e.batchDependency(),l.Logger.write("["+e.requestId+"] ("+(new Date).getTime()+") Batching request in batch "+e.batch.batchId+".",l.LogLevel.Info),t(o(e,n))}else{l.Logger.write("["+e.requestId+"] ("+(new Date).getTime()+") Sending request.",l.LogLevel.Info);var i=e.clientFactory(),a=p.Util.extend(e.options||{},{method:e.verb});i.fetch(e.requestAbsoluteUrl,a).then(function(t){return e.parser.parse(t)}).then(function(t){return o(e,t)}).then(function(e){return t(e)}).catch(function(e){return r(e)})}})},e.logEnd=function(e){return new Promise(function(t){e.isBatched?l.Logger.log({data:l.Logger.activeLogLevel===l.LogLevel.Info?{}:e,level:l.LogLevel.Info,message:"["+e.requestId+"] ("+(new Date).getTime()+") "+e.verb+" request will complete in batch "+e.batch.batchId+"."}):l.Logger.log({data:l.Logger.activeLogLevel===l.LogLevel.Info?{}:e,level:l.LogLevel.Info,message:"["+e.requestId+"] ("+(new Date).getTime()+") Completing "+e.verb+" request."}),t(e)})},Object.defineProperty(e,"default",{get:function(){return[e.logStart,e.caching,e.send,e.logEnd]},enumerable:!0,configurable:!0}),s([u(!0)],e,"logStart",null),s([u()],e,"caching",null),s([u()],e,"send",null),s([u(!0)],e,"logEnd",null),e}();t.PipelineMethods=f},function(e,t,r){"use strict";var n=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(t,"__esModule",{value:!0});var o=r(16),i=r(43),a=r(20),u=r(29),s=r(44),c=r(45),l=r(1),p=r(26),f=r(0),h=r(21),d=r(6),y=r(4),g=r(19),b=function(e){function t(t,r){return void 0===r&&(r="lists"),e.call(this,t,r)||this}return n(t,e),t.prototype.getByTitle=function(e){return new v(this,"getByTitle('"+e+"')")},t.prototype.getById=function(e){var t=new v(this);return t.concat("('"+e+"')"),t},t.prototype.add=function(e,t,r,n,o){var i=this;void 0===t&&(t=""),void 0===r&&(r=100),void 0===n&&(n=!1),void 0===o&&(o={});var a=f.Util.extend({AllowContentTypes:n,BaseTemplate:r,ContentTypesEnabled:n,Description:t,Title:e,__metadata:{type:"SP.List"}},o);return this.postCore({body:JSON.stringify(a)}).then(function(e){return{data:e,list:i.getByTitle(a.Title)}})},t.prototype.ensure=function(e,t,r,n,o){var i=this;if(void 0===t&&(t=""),void 0===r&&(r=100),void 0===n&&(n=!1),void 0===o&&(o={}),this.hasBatch)throw new y.NotSupportedInBatchException("The ensure list method");return new Promise(function(a,u){var s=f.Util.extend(o,{Title:e,Description:t,ContentTypesEnabled:n},!0),c=i.getByTitle(s.Title);c.get().then(function(e){c.update(s).then(function(e){a({created:!1,data:e,list:i.getByTitle(s.Title)})}).catch(function(e){return u(e)})}).catch(function(o){i.add(e,t,r,n,s).then(function(e){a({created:!0,data:e.data,list:i.getByTitle(s.Title)})}).catch(function(e){return u(e)})})})},t.prototype.ensureSiteAssetsLibrary=function(){return this.clone(t,"ensuresiteassetslibrary").postCore().then(function(e){return new v(d.spExtractODataId(e))})},t.prototype.ensureSitePagesLibrary=function(){return this.clone(t,"ensuresitepageslibrary").postCore().then(function(e){return new v(d.spExtractODataId(e))})},t}(l.SharePointQueryableCollection);t.Lists=b;var v=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),Object.defineProperty(t.prototype,"contentTypes",{get:function(){return new a.ContentTypes(this)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"items",{get:function(){return new o.Items(this)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"views",{get:function(){return new i.Views(this)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"fields",{get:function(){return new u.Fields(this)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"forms",{get:function(){return new s.Forms(this)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"defaultView",{get:function(){return new l.SharePointQueryableInstance(this,"DefaultView")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"userCustomActions",{get:function(){return new h.UserCustomActions(this)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"effectiveBasePermissions",{get:function(){return new l.SharePointQueryable(this,"EffectiveBasePermissions")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"eventReceivers",{get:function(){return new l.SharePointQueryableCollection(this,"EventReceivers")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"relatedFields",{get:function(){return new l.SharePointQueryable(this,"getRelatedFields")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"informationRightsManagementSettings",{get:function(){return new l.SharePointQueryable(this,"InformationRightsManagementSettings")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"subscriptions",{get:function(){return new c.Subscriptions(this)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"rootFolder",{get:function(){return new g.Folder(this,"rootFolder")},enumerable:!0,configurable:!0}),t.prototype.getView=function(e){return new i.View(this,"getView('"+e+"')")},t.prototype.update=function(e,r){var n=this;void 0===r&&(r="*");var o=JSON.stringify(f.Util.extend({__metadata:{type:"SP.List"}},e));return this.postCore({body:o,headers:{"IF-Match":r,"X-HTTP-Method":"MERGE"}}).then(function(r){var o=n;return e.hasOwnProperty("Title")&&(o=n.getParent(t,n.parentUrl,"getByTitle('"+e.Title+"')")),{data:r,list:o}})},t.prototype.delete=function(e){return void 0===e&&(e="*"),this.postCore({headers:{"IF-Match":e,"X-HTTP-Method":"DELETE"}})},t.prototype.getChanges=function(e){return this.clone(t,"getchanges").postCore({body:JSON.stringify({query:f.Util.extend({__metadata:{type:"SP.ChangeQuery"}},e)})})},t.prototype.getItemsByCAMLQuery=function(e){for(var r=[],n=1;n0},enumerable:!0,configurable:!0}),e.prototype.getNext=function(){if(this.hasNext){return new h(this.nextUrl,null).getPaged()}return new Promise(function(e){return e(null)})},e}();t.PagedItemCollection=y;var g=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.parse=function(e){var t=this;return new Promise(function(r,n){t.handleError(e,n)&&e.json().then(function(e){var n=e.hasOwnProperty("d")&&e.d.hasOwnProperty("__next")?e.d.__next:e["odata.nextLink"];r(new y(n,t.parseODataJSON(e)))})})},t}(l.ODataParserBase),b=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.parse=function(e){var t=this;return new Promise(function(r,n){t.handleError(e,n)&&r({"odata.etag":e.headers.get("etag")})})},t}(l.ODataParserBase)},function(e,t,r){"use strict";var n=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(t,"__esModule",{value:!0});var o=r(1),i=r(28),a=r(0);!function(e){e[e.None=0]="None",e[e.User=1]="User",e[e.DistributionList=2]="DistributionList",e[e.SecurityGroup=4]="SecurityGroup",e[e.SharePointGroup=8]="SharePointGroup",e[e.All=15]="All"}(t.PrincipalType||(t.PrincipalType={}));var u=function(e){function t(t,r){return void 0===r&&(r="sitegroups"),e.call(this,t,r)||this}return n(t,e),t.prototype.add=function(e){var t=this,r=JSON.stringify(a.Util.extend({__metadata:{type:"SP.Group"}},e));return this.postCore({body:r}).then(function(e){return{data:e,group:t.getById(e.Id)}})},t.prototype.getByName=function(e){return new s(this,"getByName('"+e+"')")},t.prototype.getById=function(e){var t=new s(this);return t.concat("("+e+")"),t},t.prototype.removeById=function(e){return this.clone(t,"removeById('"+e+"')").postCore()},t.prototype.removeByLoginName=function(e){return this.clone(t,"removeByLoginName('"+e+"')").postCore()},t}(o.SharePointQueryableCollection);t.SiteGroups=u;var s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),Object.defineProperty(t.prototype,"users",{get:function(){return new i.SiteUsers(this,"users")},enumerable:!0,configurable:!0}),t.prototype.update=function(e){var r=this,n=a.Util.extend({__metadata:{type:"SP.Group"}},e);return this.postCore({body:JSON.stringify(n),headers:{"X-HTTP-Method":"MERGE"}}).then(function(n){var o=r;return e.hasOwnProperty("Title")&&(o=r.getParent(t,r.parentUrl,"getByName('"+e.Title+"')")),{data:n,group:o}})},t}(o.SharePointQueryableInstance);t.SiteGroup=s},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});!function(e){e[e.Display=1]="Display",e[e.Edit=2]="Edit",e[e.New=3]="New"}(t.ControlMode||(t.ControlMode={}));!function(e){e[e.Invalid=0]="Invalid",e[e.Integer=1]="Integer",e[e.Text=2]="Text",e[e.Note=3]="Note",e[e.DateTime=4]="DateTime",e[e.Counter=5]="Counter",e[e.Choice=6]="Choice",e[e.Lookup=7]="Lookup",e[e.Boolean=8]="Boolean",e[e.Number=9]="Number",e[e.Currency=10]="Currency",e[e.URL=11]="URL",e[e.Computed=12]="Computed",e[e.Threading=13]="Threading",e[e.Guid=14]="Guid",e[e.MultiChoice=15]="MultiChoice",e[e.GridChoice=16]="GridChoice",e[e.Calculated=17]="Calculated",e[e.File=18]="File",e[e.Attachments=19]="Attachments",e[e.User=20]="User",e[e.Recurrence=21]="Recurrence",e[e.CrossProjectLink=22]="CrossProjectLink",e[e.ModStat=23]="ModStat",e[e.Error=24]="Error",e[e.ContentTypeId=25]="ContentTypeId",e[e.PageSeparator=26]="PageSeparator",e[e.ThreadIndex=27]="ThreadIndex",e[e.WorkflowStatus=28]="WorkflowStatus",e[e.AllDayEvent=29]="AllDayEvent",e[e.WorkflowEventType=30]="WorkflowEventType"}(t.FieldTypes||(t.FieldTypes={}));!function(e){e[e.DateOnly=0]="DateOnly",e[e.DateTime=1]="DateTime"}(t.DateTimeFieldFormatType||(t.DateTimeFieldFormatType={}));!function(e){e[e.DefaultValue=0]="DefaultValue",e[e.AddToDefaultContentType=1]="AddToDefaultContentType",e[e.AddToNoContentType=2]="AddToNoContentType",e[e.AddToAllContentTypes=4]="AddToAllContentTypes",e[e.AddFieldInternalNameHint=8]="AddFieldInternalNameHint",e[e.AddFieldToDefaultView=16]="AddFieldToDefaultView",e[e.AddFieldCheckDisplayName=32]="AddFieldCheckDisplayName"}(t.AddFieldOptions||(t.AddFieldOptions={}));!function(e){e[e.Gregorian=1]="Gregorian",e[e.Japan=3]="Japan",e[e.Taiwan=4]="Taiwan",e[e.Korea=5]="Korea",e[e.Hijri=6]="Hijri",e[e.Thai=7]="Thai",e[e.Hebrew=8]="Hebrew",e[e.GregorianMEFrench=9]="GregorianMEFrench",e[e.GregorianArabic=10]="GregorianArabic",e[e.GregorianXLITEnglish=11]="GregorianXLITEnglish",e[e.GregorianXLITFrench=12]="GregorianXLITFrench",e[e.KoreaJapanLunar=14]="KoreaJapanLunar",e[e.ChineseLunar=15]="ChineseLunar",e[e.SakaEra=16]="SakaEra",e[e.UmAlQura=23]="UmAlQura"}(t.CalendarType||(t.CalendarType={}));!function(e){e[e.Hyperlink=0]="Hyperlink",e[e.Image=1]="Image"}(t.UrlFieldFormatType||(t.UrlFieldFormatType={}));!function(e){e[e.EmptyMask=0]="EmptyMask",e[e.ViewListItems=1]="ViewListItems",e[e.AddListItems=2]="AddListItems",e[e.EditListItems=3]="EditListItems",e[e.DeleteListItems=4]="DeleteListItems",e[e.ApproveItems=5]="ApproveItems",e[e.OpenItems=6]="OpenItems",e[e.ViewVersions=7]="ViewVersions",e[e.DeleteVersions=8]="DeleteVersions",e[e.CancelCheckout=9]="CancelCheckout",e[e.ManagePersonalViews=10]="ManagePersonalViews",e[e.ManageLists=12]="ManageLists",e[e.ViewFormPages=13]="ViewFormPages",e[e.AnonymousSearchAccessList=14]="AnonymousSearchAccessList",e[e.Open=17]="Open",e[e.ViewPages=18]="ViewPages",e[e.AddAndCustomizePages=19]="AddAndCustomizePages",e[e.ApplyThemeAndBorder=20]="ApplyThemeAndBorder",e[e.ApplyStyleSheets=21]="ApplyStyleSheets",e[e.ViewUsageData=22]="ViewUsageData",e[e.CreateSSCSite=23]="CreateSSCSite",e[e.ManageSubwebs=24]="ManageSubwebs",e[e.CreateGroups=25]="CreateGroups",e[e.ManagePermissions=26]="ManagePermissions",e[e.BrowseDirectories=27]="BrowseDirectories",e[e.BrowseUserInfo=28]="BrowseUserInfo",e[e.AddDelPrivateWebParts=29]="AddDelPrivateWebParts",e[e.UpdatePersonalWebParts=30]="UpdatePersonalWebParts",e[e.ManageWeb=31]="ManageWeb",e[e.AnonymousSearchAccessWebLists=32]="AnonymousSearchAccessWebLists",e[e.UseClientIntegration=37]="UseClientIntegration",e[e.UseRemoteAPIs=38]="UseRemoteAPIs",e[e.ManageAlerts=39]="ManageAlerts",e[e.CreateAlerts=40]="CreateAlerts",e[e.EditMyUserInfo=41]="EditMyUserInfo",e[e.EnumeratePermissions=63]="EnumeratePermissions",e[e.FullMask=65]="FullMask"}(t.PermissionKind||(t.PermissionKind={}));!function(e){e[e.None=0]="None",e[e.User=1]="User",e[e.DistributionList=2]="DistributionList",e[e.SecurityGroup=4]="SecurityGroup",e[e.SharePointGroup=8]="SharePointGroup",e[e.All=15]="All"}(t.PrincipalType||(t.PrincipalType={}));!function(e){e[e.None=0]="None",e[e.UserInfoList=1]="UserInfoList",e[e.Windows=2]="Windows",e[e.MembershipProvider=4]="MembershipProvider",e[e.RoleProvider=8]="RoleProvider",e[e.All=15]="All"}(t.PrincipalSource||(t.PrincipalSource={}));!function(e){e[e.None=0]="None",e[e.Guest=1]="Guest",e[e.Reader=2]="Reader",e[e.Contributor=3]="Contributor",e[e.WebDesigner=4]="WebDesigner",e[e.Administrator=5]="Administrator"}(t.RoleType||(t.RoleType={}));!function(e){e[e.Invalid=-1]="Invalid",e[e.DefaultView=0]="DefaultView",e[e.NormalView=1]="NormalView",e[e.DialogView=2]="DialogView",e[e.View=3]="View",e[e.DisplayForm=4]="DisplayForm",e[e.DisplayFormDialog=5]="DisplayFormDialog",e[e.EditForm=6]="EditForm",e[e.EditFormDialog=7]="EditFormDialog",e[e.NewForm=8]="NewForm",e[e.NewFormDialog=9]="NewFormDialog",e[e.SolutionForm=10]="SolutionForm",e[e.PAGE_MAXITEMS=11]="PAGE_MAXITEMS"}(t.PageType||(t.PageType={}));!function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Direct=1]="Direct",e[e.OrganizationView=2]="OrganizationView",e[e.OrganizationEdit=3]="OrganizationEdit",e[e.AnonymousView=4]="AnonymousView",e[e.AnonymousEdit=5]="AnonymousEdit",e[e.Flexible=6]="Flexible"}(t.SharingLinkKind||(t.SharingLinkKind={}));!function(e){e[e.None=0]="None",e[e.View=1]="View",e[e.Edit=2]="Edit",e[e.Owner=3]="Owner"}(t.SharingRole||(t.SharingRole={}));!function(e){e[e.CompletedSuccessfully=0]="CompletedSuccessfully",e[e.AccessRequestsQueued=1]="AccessRequestsQueued",e[e.NoResolvedUsers=-1]="NoResolvedUsers",e[e.AccessDenied=-2]="AccessDenied",e[e.CrossSiteRequestNotSupported=-3]="CrossSiteRequestNotSupported",e[e.UnknowError=-4]="UnknowError",e[e.EmailBodyTooLong=-5]="EmailBodyTooLong",e[e.ListUniqueScopesExceeded=-6]="ListUniqueScopesExceeded",e[e.CapabilityDisabled=-7]="CapabilityDisabled",e[e.ObjectNotSupported=-8]="ObjectNotSupported",e[e.NestedGroupsNotSupported=-9]="NestedGroupsNotSupported"}(t.SharingOperationStatusCode||(t.SharingOperationStatusCode={}));!function(e){e[e.Unknown=0]="Unknown",e[e.File=1]="File",e[e.Folder=2]="Folder",e[e.Item=3]="Item",e[e.List=4]="List",e[e.Web=5]="Web",e[e.Max=6]="Max"}(t.SPSharedObjectType||(t.SPSharedObjectType={}));!function(e){e[e.None=0]="None",e[e.AllowList=1]="AllowList",e[e.BlockList=2]="BlockList"}(t.SharingDomainRestrictionMode||(t.SharingDomainRestrictionMode={}));!function(e){e[e.None=0]="None",e[e.ContextInfo=1]="ContextInfo",e[e.ListData=2]="ListData",e[e.ListSchema=4]="ListSchema",e[e.MenuView=8]="MenuView"}(t.RenderListDataOptions||(t.RenderListDataOptions={}))},function(e,t,r){"use strict";var n=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(t,"__esModule",{value:!0});var o=r(1),i=r(11),a=r(12),u=r(0),s=r(6),c=r(16),l=function(e){function t(t,r){return void 0===r&&(r="folders"),e.call(this,t,r)||this}return n(t,e),t.prototype.getByName=function(e){var t=new p(this);return t.concat("('"+e+"')"),t},t.prototype.add=function(e){var r=this;return this.clone(t,"add('"+e+"')").postCore().then(function(t){return{data:t,folder:r.getByName(e)}})},t}(o.SharePointQueryableCollection);t.Folders=l;var p=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),Object.defineProperty(t.prototype,"contentTypeOrder",{get:function(){return new o.SharePointQueryableCollection(this,"contentTypeOrder")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"files",{get:function(){return new a.Files(this)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"folders",{get:function(){return new l(this)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"listItemAllFields",{get:function(){return new o.SharePointQueryableCollection(this,"listItemAllFields")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"parentFolder",{get:function(){return new t(this,"parentFolder")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"properties",{get:function(){return new o.SharePointQueryableInstance(this,"properties")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"serverRelativeUrl",{get:function(){return new o.SharePointQueryable(this,"serverRelativeUrl")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"uniqueContentTypeOrder",{get:function(){return new o.SharePointQueryableCollection(this,"uniqueContentTypeOrder")},enumerable:!0,configurable:!0}),t.prototype.update=function(e){var t=this,r=JSON.stringify(u.Util.extend({__metadata:{type:"SP.Folder"}},e));return this.postCore({body:r,headers:{"X-HTTP-Method":"MERGE"}}).then(function(e){return{data:e,folder:t}})},t.prototype.delete=function(e){return void 0===e&&(e="*"),this.clone(t,null).postCore({headers:{"IF-Match":e,"X-HTTP-Method":"DELETE"}})},t.prototype.recycle=function(){return this.clone(t,"recycle").postCore()},t.prototype.getItem=function(){for(var e=[],t=0;t0&&(r=60*this.defaultTimeoutMinutes),t=n.Util.dateAdd(new Date,"second",r)}return JSON.stringify({pnp:1,expiration:t,value:e})},e.prototype.cacheExpirationHandler=function(){var e=this;a.Logger.write("Called cache expiration handler.",a.LogLevel.Verbose),this.deleteExpired().then(function(t){setTimeout(n.Util.getCtxCallback(e,e.cacheExpirationHandler),i.RuntimeConfig.cacheExpirationIntervalMilliseconds)}).catch(function(e){a.Logger.log({data:e,level:a.LogLevel.Error,message:"Error deleting expired cache entries, see data for details. Timeout not reset."})})},e}();t.PnPClientStorageWrapper=u;var s=function(){function e(e){void 0===e&&(e=new o.Dictionary),this._store=e}return Object.defineProperty(e.prototype,"length",{get:function(){return this._store.count()},enumerable:!0,configurable:!0}),e.prototype.clear=function(){this._store.clear()},e.prototype.getItem=function(e){return this._store.get(e)},e.prototype.key=function(e){return this._store.getKeys()[e]},e.prototype.removeItem=function(e){this._store.remove(e)},e.prototype.setItem=function(e,t){this._store.add(e,t)},e}(),c=function(){function e(e,t){void 0===e&&(e=null),void 0===t&&(t=null),this._local=e,this._session=t}return Object.defineProperty(e.prototype,"local",{get:function(){return null===this._local&&(this._local=new u("undefined"!=typeof localStorage?localStorage:new s)),this._local},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"session",{get:function(){return null===this._session&&(this._session=new u("undefined"!=typeof sessionStorage?sessionStorage:new s)),this._session},enumerable:!0,configurable:!0}),e}();t.PnPClientStorage=c},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(0),o=r(9),i=r(7),a=r(2),u=r(14),s=function(){function e(){}return e.prototype.concat=function(e){return this._url+=e,this},e.prototype.append=function(e){this._url=n.Util.combinePaths(this._url,e)},Object.defineProperty(e.prototype,"parentUrl",{get:function(){return this._parentUrl},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"query",{get:function(){return this._query},enumerable:!0,configurable:!0}),e.prototype.configure=function(e){return o.mergeOptions(this._options,e),this},e.prototype.usingCaching=function(e){return a.RuntimeConfig.globalCacheDisable||(this._useCaching=!0,this._cachingOptions=e),this},e.prototype.toUrl=function(){return this._url},e.prototype.get=function(e,t){return void 0===e&&(e=new i.ODataDefaultParser),void 0===t&&(t={}),this.toRequestContext("GET",t,e,u.PipelineMethods.default).then(function(e){return u.pipe(e)})},e.prototype.getAs=function(e,t){return void 0===e&&(e=new i.ODataDefaultParser),void 0===t&&(t={}),this.toRequestContext("GET",t,e,u.PipelineMethods.default).then(function(e){return u.pipe(e)})},e.prototype.postCore=function(e,t){return void 0===e&&(e={}),void 0===t&&(t=new i.ODataDefaultParser),this.toRequestContext("POST",e,t,u.PipelineMethods.default).then(function(e){return u.pipe(e)})},e.prototype.postAsCore=function(e,t){return void 0===e&&(e={}),void 0===t&&(t=new i.ODataDefaultParser),this.toRequestContext("POST",e,t,u.PipelineMethods.default).then(function(e){return u.pipe(e)})},e.prototype.patchCore=function(e,t){return void 0===e&&(e={}),void 0===t&&(t=new i.ODataDefaultParser),this.toRequestContext("PATCH",e,t,u.PipelineMethods.default).then(function(e){return u.pipe(e)})},e.prototype.deleteCore=function(e,t){return void 0===e&&(e={}),void 0===t&&(t=new i.ODataDefaultParser),this.toRequestContext("DELETE",e,t,u.PipelineMethods.default).then(function(e){return u.pipe(e)})},e}();t.ODataQueryable=s},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(38),o=r(0),i=r(2),a=r(4),u=r(9),s=function(){function e(){this._impl=i.RuntimeConfig.spFetchClientFactory(),this._digestCache=new n.DigestCache(this)}return e.prototype.fetch=function(e,t){var r=this;void 0===t&&(t={});var n=o.Util.extend(t,{cache:"no-cache",credentials:"same-origin"},!0),s=new Headers;if(u.mergeHeaders(s,i.RuntimeConfig.spHeaders),u.mergeHeaders(s,t.headers),s.has("Accept")||s.append("Accept","application/json"),s.has("Content-Type")||s.append("Content-Type","application/json;odata=verbose;charset=utf-8"),s.has("X-ClientService-ClientTag")||s.append("X-ClientService-ClientTag","PnPCoreJS:3.0.0"),n=o.Util.extend(n,{headers:s}),n.method&&"GET"!==n.method.toUpperCase()&&!s.has("X-RequestDigest")&&!s.has("Authorization")){var c=e.indexOf("_api/");if(c<0)throw new a.APIUrlException;var l=e.substr(0,c);return this._digestCache.getDigest(l).then(function(t){return s.append("X-RequestDigest",t),r.fetchRaw(e,n)})}return this.fetchRaw(e,n)},e.prototype.fetchRaw=function(e,t){var r=this;void 0===t&&(t={});var n=new Headers;u.mergeHeaders(n,t.headers),t=o.Util.extend(t,{headers:n});var i=function(n){r._impl.fetch(e,t).then(function(e){return n.resolve(e)}).catch(function(e){429!==e.status&&503!==e.status&&n.reject(e);var t=n.delay;n.delay*=2,n.attempts++,n.retryCount<=n.attempts&&n.reject(e),setTimeout(o.Util.getCtxCallback(r,i,n),t)})};return new Promise(function(e,t){var n={attempts:0,delay:100,reject:t,resolve:e,retryCount:7};i.call(r,n)})},e.prototype.get=function(e,t){void 0===t&&(t={});var r=o.Util.extend(t,{method:"GET"});return this.fetch(e,r)},e.prototype.post=function(e,t){void 0===t&&(t={});var r=o.Util.extend(t,{method:"POST"});return this.fetch(e,r)},e.prototype.patch=function(e,t){void 0===t&&(t={});var r=o.Util.extend(t,{method:"PATCH"});return this.fetch(e,r)},e.prototype.delete=function(e,t){void 0===t&&(t={});var r=o.Util.extend(t,{method:"DELETE"});return this.fetch(e,r)},e}();t.HttpClient=s},function(e,t,r){"use strict";var n=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(t,"__esModule",{value:!0});var o=r(10),i=r(27),a=r(18),u=r(1),s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),Object.defineProperty(t.prototype,"roleAssignments",{get:function(){return new i.RoleAssignments(this)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"firstUniqueAncestorSecurableObject",{get:function(){return new u.SharePointQueryableInstance(this,"FirstUniqueAncestorSecurableObject")},enumerable:!0,configurable:!0}),t.prototype.getUserEffectivePermissions=function(e){var t=this.clone(u.SharePointQueryable,"getUserEffectivePermissions(@user)");return t.query.add("@user","'"+encodeURIComponent(e)+"'"),t.get().then(function(e){return e.hasOwnProperty("GetUserEffectivePermissions")?e.GetUserEffectivePermissions:e})},t.prototype.getCurrentUserEffectivePermissions=function(){var e=this;return o.Web.fromUrl(this.toUrl()).currentUser.select("LoginName").getAs().then(function(t){return e.getUserEffectivePermissions(t.LoginName)})},t.prototype.breakRoleInheritance=function(e,r){return void 0===e&&(e=!1),void 0===r&&(r=!1),this.clone(t,"breakroleinheritance(copyroleassignments="+e+", clearsubscopes="+r+")").postCore()},t.prototype.resetRoleInheritance=function(){return this.clone(t,"resetroleinheritance").postCore()},t.prototype.userHasPermissions=function(e,t){var r=this;return this.getUserEffectivePermissions(e).then(function(e){return r.hasPermissions(e,t)})},t.prototype.currentUserHasPermissions=function(e){var t=this;return this.getCurrentUserEffectivePermissions().then(function(r){return t.hasPermissions(r,e)})},t.prototype.hasPermissions=function(e,t){if(!t)return!0;if(t===a.PermissionKind.FullMask)return 32767==(32767&e.High)&&65535===e.Low;t-=1;var r=1;return t>=0&&t<32?(r<<=t,0!=(e.Low&r)):t>=32&&t<64&&(r<<=t-32,0!=(e.High&r))},t}(u.SharePointQueryableInstance);t.SharePointQueryableSecurable=s},function(e,t,r){"use strict";var n=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(t,"__esModule",{value:!0});var o=r(1),i=r(17),a=r(0),u=function(e){function t(t,r){return void 0===r&&(r="roleassignments"),e.call(this,t,r)||this}return n(t,e),t.prototype.add=function(e,r){return this.clone(t,"addroleassignment(principalid="+e+", roledefid="+r+")").postCore()},t.prototype.remove=function(e,r){return this.clone(t,"removeroleassignment(principalid="+e+", roledefid="+r+")").postCore()},t.prototype.getById=function(e){var t=new s(this);return t.concat("("+e+")"),t},t}(o.SharePointQueryableCollection);t.RoleAssignments=u;var s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),Object.defineProperty(t.prototype,"groups",{get:function(){return new i.SiteGroups(this,"groups")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"bindings",{get:function(){return new p(this)},enumerable:!0,configurable:!0}),t.prototype.delete=function(){return this.postCore({headers:{"X-HTTP-Method":"DELETE"}})},t}(o.SharePointQueryableInstance);t.RoleAssignment=s;var c=function(e){function t(t,r){return void 0===r&&(r="roledefinitions"),e.call(this,t,r)||this}return n(t,e),t.prototype.getById=function(e){return new l(this,"getById("+e+")")},t.prototype.getByName=function(e){return new l(this,"getbyname('"+e+"')")},t.prototype.getByType=function(e){return new l(this,"getbytype("+e+")")},t.prototype.add=function(e,t,r,n){var o=this,i=JSON.stringify({BasePermissions:a.Util.extend({__metadata:{type:"SP.BasePermissions"}},n),Description:t,Name:e,Order:r,__metadata:{type:"SP.RoleDefinition"}});return this.postCore({body:i}).then(function(e){return{data:e,definition:o.getById(e.Id)}})},t}(o.SharePointQueryableCollection);t.RoleDefinitions=c;var l=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.update=function(e){var t=this;void 0!==e.hasOwnProperty("BasePermissions")&&(e.BasePermissions=a.Util.extend({__metadata:{type:"SP.BasePermissions"}},e.BasePermissions));var r=JSON.stringify(a.Util.extend({__metadata:{type:"SP.RoleDefinition"}},e));return this.postCore({body:r,headers:{"X-HTTP-Method":"MERGE"}}).then(function(r){var n=t;if(e.hasOwnProperty("Name")){n=t.getParent(c,t.parentUrl,"").getByName(e.Name)}return{data:r,definition:n}})},t.prototype.delete=function(){return this.postCore({headers:{"X-HTTP-Method":"DELETE"}})},t}(o.SharePointQueryableInstance);t.RoleDefinition=l;var p=function(e){function t(t,r){return void 0===r&&(r="roledefinitionbindings"),e.call(this,t,r)||this}return n(t,e),t}(o.SharePointQueryableCollection);t.RoleDefinitionBindings=p},function(e,t,r){"use strict";var n=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(t,"__esModule",{value:!0});var o=r(1),i=r(17),a=r(0),u=function(e){function t(t,r){return void 0===r&&(r="siteusers"),e.call(this,t,r)||this}return n(t,e),t.prototype.getByEmail=function(e){return new s(this,"getByEmail('"+e+"')")},t.prototype.getById=function(e){return new s(this,"getById("+e+")")},t.prototype.getByLoginName=function(e){var t=new s(this);return t.concat("('!@v::"+encodeURIComponent(e)+"')"),t},t.prototype.removeById=function(e){return this.clone(t,"removeById("+e+")").postCore()},t.prototype.removeByLoginName=function(e){var r=this.clone(t,"removeByLoginName(@v)");return r.query.add("@v","'"+encodeURIComponent(e)+"'"),r.postCore()},t.prototype.add=function(e){var r=this;return this.clone(t,null).postCore({body:JSON.stringify({__metadata:{type:"SP.User"},LoginName:e})}).then(function(){return r.getByLoginName(e)})},t}(o.SharePointQueryableCollection);t.SiteUsers=u;var s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),Object.defineProperty(t.prototype,"groups",{get:function(){return new i.SiteGroups(this,"groups")},enumerable:!0,configurable:!0}),t.prototype.update=function(e){var t=this,r=a.Util.extend({__metadata:{type:"SP.User"}},e);return this.postCore({body:JSON.stringify(r),headers:{"X-HTTP-Method":"MERGE"}}).then(function(e){return{data:e,user:t}})},t.prototype.delete=function(){return this.postCore({headers:{"X-HTTP-Method":"DELETE"}})},t}(o.SharePointQueryableInstance);t.SiteUser=s;var c=function(e){function t(t,r){return void 0===r&&(r="currentuser"),e.call(this,t,r)||this}return n(t,e),t}(o.SharePointQueryableInstance);t.CurrentUser=c},function(e,t,r){"use strict";var n=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(t,"__esModule",{value:!0});var o=r(1),i=r(0),a=r(18),u=function(e){function t(t,r){return void 0===r&&(r="fields"),e.call(this,t,r)||this}return n(t,e),t.prototype.getByTitle=function(e){return new s(this,"getByTitle('"+e+"')")},t.prototype.getByInternalNameOrTitle=function(e){return new s(this,"getByInternalNameOrTitle('"+e+"')")},t.prototype.getById=function(e){var t=new s(this);return t.concat("('"+e+"')"),t},t.prototype.createFieldAsXml=function(e){var r,n=this;r="string"==typeof e?{SchemaXml:e}:e;var o=JSON.stringify({parameters:i.Util.extend({__metadata:{type:"SP.XmlSchemaFieldCreationInformation"}},r)});return this.clone(t,"createfieldasxml").postAsCore({body:o}).then(function(e){return{data:e,field:n.getById(e.Id)}})},t.prototype.add=function(e,r,n){var o=this;void 0===n&&(n={});var a=JSON.stringify(i.Util.extend({Title:e,__metadata:{type:r}},n));return this.clone(t,null).postAsCore({body:a}).then(function(e){return{data:e,field:o.getById(e.Id)}})},t.prototype.addText=function(e,t,r){void 0===t&&(t=255);var n={FieldTypeKind:2,MaxLength:t};return this.add(e,"SP.FieldText",i.Util.extend(n,r))},t.prototype.addCalculated=function(e,t,r,n,o){void 0===n&&(n=a.FieldTypes.Text);var u={DateFormat:r,FieldTypeKind:17,Formula:t,OutputType:n};return this.add(e,"SP.FieldCalculated",i.Util.extend(u,o))},t.prototype.addDateTime=function(e,t,r,n,o){void 0===t&&(t=a.DateTimeFieldFormatType.DateOnly),void 0===r&&(r=a.CalendarType.Gregorian),void 0===n&&(n=0);var u={DateTimeCalendarType:r,DisplayFormat:t,FieldTypeKind:4,FriendlyDisplayFormat:n};return this.add(e,"SP.FieldDateTime",i.Util.extend(u,o))},t.prototype.addNumber=function(e,t,r,n){var o={FieldTypeKind:9};return void 0!==t&&(o=i.Util.extend({MinimumValue:t},o)),void 0!==r&&(o=i.Util.extend({MaximumValue:r},o)),this.add(e,"SP.FieldNumber",i.Util.extend(o,n))},t.prototype.addCurrency=function(e,t,r,n,o){void 0===n&&(n=1033);var a={CurrencyLocaleId:n,FieldTypeKind:10};return void 0!==t&&(a=i.Util.extend({MinimumValue:t},a)),void 0!==r&&(a=i.Util.extend({MaximumValue:r},a)),this.add(e,"SP.FieldCurrency",i.Util.extend(a,o))},t.prototype.addMultilineText=function(e,t,r,n,o,a,u){void 0===t&&(t=6),void 0===r&&(r=!0),void 0===n&&(n=!1),void 0===o&&(o=!1),void 0===a&&(a=!0);var s={AllowHyperlink:a,AppendOnly:o,FieldTypeKind:3,NumberOfLines:t,RestrictedMode:n,RichText:r};return this.add(e,"SP.FieldMultiLineText",i.Util.extend(s,u))},t.prototype.addUrl=function(e,t,r){void 0===t&&(t=a.UrlFieldFormatType.Hyperlink);var n={DisplayFormat:t,FieldTypeKind:11};return this.add(e,"SP.FieldUrl",i.Util.extend(n,r))},t}(o.SharePointQueryableCollection);t.Fields=u;var s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.update=function(e,t){var r=this;void 0===t&&(t="SP.Field");var n=JSON.stringify(i.Util.extend({__metadata:{type:t}},e));return this.postCore({body:n,headers:{"X-HTTP-Method":"MERGE"}}).then(function(e){return{data:e,field:r}})},t.prototype.delete=function(){return this.postCore({headers:{"X-HTTP-Method":"DELETE"}})},t.prototype.setShowInDisplayForm=function(e){return this.clone(t,"setshowindisplayform("+e+")").postCore()},t.prototype.setShowInEditForm=function(e){return this.clone(t,"setshowineditform("+e+")").postCore()},t.prototype.setShowInNewForm=function(e){return this.clone(t,"setshowinnewform("+e+")").postCore()},t}(o.SharePointQueryableInstance);t.Field=s},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(0),o=r(3),i=r(25),a=r(9),u=r(2),s=r(4),c=function(){function e(e,t){void 0===t&&(t=n.Util.getGUID()),this.baseUrl=e,this._batchId=t,this._requests=[],this._dependencies=[]}return Object.defineProperty(e.prototype,"batchId",{get:function(){return this._batchId},enumerable:!0,configurable:!0}),e.prototype.add=function(e,t,r,n){var o={method:t.toUpperCase(),options:r,parser:n,reject:null,resolve:null,url:e},i=new Promise(function(e,t){o.resolve=e,o.reject=t});return this._requests.push(o),i},e.prototype.addDependency=function(){var e,t=new Promise(function(t){e=t});return this._dependencies.push(t),e},e.prototype.execute=function(){var e=this;return Promise.all(this._dependencies).then(function(){return Promise.all(e._dependencies)}).then(function(){return e.executeImpl()})},e.prototype.executeImpl=function(){var e=this;if(o.Logger.write("["+this.batchId+"] ("+(new Date).getTime()+") Executing batch with "+this._requests.length+" requests.",o.LogLevel.Info),this._requests.length<1)return o.Logger.write("Resolving empty batch.",o.LogLevel.Info),Promise.resolve();var t=new i.HttpClient;return n.Util.toAbsoluteUrl(this.baseUrl).then(function(r){for(var i=[],c="",l=0;l0&&(i.push("--changeset_"+c+"--\n\n"),c=""),i.push("--batch_"+e._batchId+"\n")):(c.length<1&&(c=n.Util.getGUID(),i.push("--batch_"+e._batchId+"\n"),i.push('Content-Type: multipart/mixed; boundary="changeset_'+c+'"\n\n')),i.push("--changeset_"+c+"\n")),i.push("Content-Type: application/http\n"),i.push("Content-Transfer-Encoding: binary\n\n");var f=new Headers,h=n.Util.isUrlAbsolute(p.url)?p.url:n.Util.combinePaths(r,p.url);if(o.Logger.write("["+e.batchId+"] ("+(new Date).getTime()+") Adding request "+p.method+" "+h+" to batch.",o.LogLevel.Verbose),"GET"!==p.method){var d=p.method;p.hasOwnProperty("options")&&p.options.hasOwnProperty("headers")&&void 0!==p.options.headers["X-HTTP-Method"]&&(d=p.options.headers["X-HTTP-Method"],delete p.options.headers["X-HTTP-Method"]),i.push(d+" "+h+" HTTP/1.1\n"),f.set("Content-Type","application/json;odata=verbose;charset=utf-8")}else i.push(p.method+" "+h+" HTTP/1.1\n");a.mergeHeaders(f,u.RuntimeConfig.spHeaders),p.options&&a.mergeHeaders(f,p.options.headers),f.has("Accept")||f.append("Accept","application/json"),f.has("Content-Type")||f.append("Content-Type","application/json;odata=verbose;charset=utf-8"),f.has("X-ClientService-ClientTag")||f.append("X-ClientService-ClientTag","PnPCoreJS:3.0.0"),f.forEach(function(e,t){i.push(t+": "+e+"\n")}),i.push("\n"),p.options.body&&i.push(p.options.body+"\n\n")}c.length>0&&(i.push("--changeset_"+c+"--\n\n"),c=""),i.push("--batch_"+e._batchId+"--\n");var y={"Content-Type":"multipart/mixed; boundary=batch_"+e._batchId},g={body:i.join(""),headers:y,method:"POST"};return o.Logger.write("["+e.batchId+"] ("+(new Date).getTime()+") Sending batch request.",o.LogLevel.Info),t.fetch(n.Util.combinePaths(r,"/_api/$batch"),g).then(function(e){return e.text()}).then(e._parseResponse).then(function(t){if(t.length!==e._requests.length)throw new s.BatchParseException("Could not properly parse responses to match requests in batch.");return o.Logger.write("["+e.batchId+"] ("+(new Date).getTime()+") Resolving batched requests.",o.LogLevel.Info),t.reduce(function(t,r,n){var i=e._requests[n];return o.Logger.write("["+e.batchId+"] ("+(new Date).getTime()+") Resolving batched request "+i.method+" "+i.url+".",o.LogLevel.Verbose),t.then(function(e){return i.parser.parse(r).then(i.resolve).catch(i.reject)})},Promise.resolve())})})},e.prototype._parseResponse=function(e){return new Promise(function(t,r){for(var n,o,i=[],a=new RegExp("^HTTP/[0-9.]+ +([0-9]+) +(.*)","i"),u=e.split("\n"),c="batch",l=0;l0&&this.extendQuery({Querytext:e})}return e.create=function(t,r){return void 0===t&&(t=""),void 0===r&&(r={}),new e(t,r)},e.prototype.text=function(e){return this.extendQuery({Querytext:e})},e.prototype.template=function(e){return this.extendQuery({QueryTemplate:e})},e.prototype.sourceId=function(e){return this.extendQuery({SourceId:e})},Object.defineProperty(e.prototype,"enableInterleaving",{get:function(){return this.extendQuery({EnableInterleaving:!0})},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"enableStemming",{get:function(){return this.extendQuery({EnableStemming:!0})},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"trimDuplicates",{get:function(){return this.extendQuery({TrimDuplicates:!0})},enumerable:!0,configurable:!0}),e.prototype.trimDuplicatesIncludeId=function(e){return this.extendQuery({TrimDuplicatesIncludeId:e})},Object.defineProperty(e.prototype,"enableNicknames",{get:function(){return this.extendQuery({EnableNicknames:!0})},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"enableFql",{get:function(){return this.extendQuery({EnableFQL:!0})},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"enablePhonetic",{get:function(){return this.extendQuery({EnablePhonetic:!0})},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"bypassResultTypes",{get:function(){return this.extendQuery({BypassResultTypes:!0})},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"processBestBets",{get:function(){return this.extendQuery({ProcessBestBets:!0})},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"enableQueryRules",{get:function(){return this.extendQuery({EnableQueryRules:!0})},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"enableSorting",{get:function(){return this.extendQuery({EnableSorting:!0})},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"generateBlockRankLog",{get:function(){return this.extendQuery({GenerateBlockRankLog:!0})},enumerable:!0,configurable:!0}),e.prototype.rankingModelId=function(e){return this.extendQuery({RankingModelId:e})},e.prototype.startRow=function(e){return this.extendQuery({StartRow:e})},e.prototype.rowLimit=function(e){return this.extendQuery({RowLimit:e})},e.prototype.rowsPerPage=function(e){return this.extendQuery({RowsPerPage:e})},e.prototype.selectProperties=function(){for(var e=[],t=0;tthis.TotalRows?Promise.resolve(null):new u(this._url,null).execute(n)},e.prototype.formatSearchResults=function(e){for(var t=new Array,r=e.results?e.results:e,n=0,o=r;n-1?e.substr(0,r):e)},t.prototype.getRelatedItems=function(e,r){var n=this.clone(t,null);return n.concat(".GetRelatedItems"),n.postCore({body:JSON.stringify({SourceItemID:r,SourceListName:e})})},t.prototype.getPageOneRelatedItems=function(e,r){var n=this.clone(t,null);return n.concat(".GetPageOneRelatedItems"),n.postCore({body:JSON.stringify({SourceItemID:r,SourceListName:e})})},t.prototype.addSingleLink=function(e,r,n,o,i,a,u){void 0===u&&(u=!1);var s=this.clone(t,null);return s.concat(".AddSingleLink"),s.postCore({body:JSON.stringify({SourceItemID:r,SourceListName:e,SourceWebUrl:n,TargetItemID:i,TargetListName:o,TargetWebUrl:a,TryAddReverseLink:u})})},t.prototype.addSingleLinkToUrl=function(e,r,n,o){void 0===o&&(o=!1);var i=this.clone(t,null);return i.concat(".AddSingleLinkToUrl"),i.postCore({body:JSON.stringify({SourceItemID:r,SourceListName:e,TargetItemUrl:n,TryAddReverseLink:o})})},t.prototype.addSingleLinkFromUrl=function(e,r,n,o){void 0===o&&(o=!1);var i=this.clone(t,null);return i.concat(".AddSingleLinkFromUrl"),i.postCore({body:JSON.stringify({SourceItemUrl:e,TargetItemID:n,TargetListName:r,TryAddReverseLink:o})})},t.prototype.deleteSingleLink=function(e,r,n,o,i,a,u){void 0===u&&(u=!1);var s=this.clone(t,null);return s.concat(".DeleteSingleLink"),s.postCore({body:JSON.stringify({SourceItemID:r,SourceListName:e,SourceWebUrl:n,TargetItemID:i,TargetListName:o,TargetWebUrl:a,TryDeleteReverseLink:u})})},t}(o.SharePointQueryable);t.RelatedItemManagerImpl=i},function(e,t,r){"use strict";var n=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(t,"__esModule",{value:!0});var o=r(1),i=r(49),a=r(7),u=function(e){function t(t,r){void 0===r&&(r="_api/sp.userprofiles.peoplemanager");var n=e.call(this,t,r)||this;return n.profileLoader=new s(t),n}return n(t,e),Object.defineProperty(t.prototype,"editProfileLink",{get:function(){return this.clone(t,"EditProfileLink").getAs(a.ODataValue())},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isMyPeopleListPublic",{get:function(){return this.clone(t,"IsMyPeopleListPublic").getAs(a.ODataValue())},enumerable:!0,configurable:!0}),t.prototype.amIFollowedBy=function(e){var r=this.clone(t,"amifollowedby(@v)");return r.query.add("@v","'"+encodeURIComponent(e)+"'"),r.get()},t.prototype.amIFollowing=function(e){var r=this.clone(t,"amifollowing(@v)");return r.query.add("@v","'"+encodeURIComponent(e)+"'"),r.get()},t.prototype.getFollowedTags=function(e){return void 0===e&&(e=20),this.clone(t,"getfollowedtags("+e+")").get()},t.prototype.getFollowersFor=function(e){var r=this.clone(t,"getfollowersfor(@v)");return r.query.add("@v","'"+encodeURIComponent(e)+"'"),r.get()},Object.defineProperty(t.prototype,"myFollowers",{get:function(){return new o.SharePointQueryableCollection(this,"getmyfollowers")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"myProperties",{get:function(){return new t(this,"getmyproperties")},enumerable:!0,configurable:!0}),t.prototype.getPeopleFollowedBy=function(e){var r=this.clone(t,"getpeoplefollowedby(@v)");return r.query.add("@v","'"+encodeURIComponent(e)+"'"),r.get()},t.prototype.getPropertiesFor=function(e){var r=this.clone(t,"getpropertiesfor(@v)");return r.query.add("@v","'"+encodeURIComponent(e)+"'"),r.get()},Object.defineProperty(t.prototype,"trendingTags",{get:function(){var e=this.clone(t,null);return e.concat(".gettrendingtags"),e.get()},enumerable:!0,configurable:!0}),t.prototype.getUserProfilePropertyFor=function(e,r){var n=this.clone(t,"getuserprofilepropertyfor(accountname=@v, propertyname='"+r+"')");return n.query.add("@v","'"+encodeURIComponent(e)+"'"),n.get()},t.prototype.hideSuggestion=function(e){var r=this.clone(t,"hidesuggestion(@v)");return r.query.add("@v","'"+encodeURIComponent(e)+"'"),r.postCore()},t.prototype.isFollowing=function(e,r){var n=this.clone(t,null);return n.concat(".isfollowing(possiblefolloweraccountname=@v, possiblefolloweeaccountname=@y)"),n.query.add("@v","'"+encodeURIComponent(e)+"'"),n.query.add("@y","'"+encodeURIComponent(r)+"'"),n.get()},t.prototype.setMyProfilePic=function(e){var r=this;return new Promise(function(n,o){i.readBlobAsArrayBuffer(e).then(function(e){new t(r,"setmyprofilepicture").postCore({body:String.fromCharCode.apply(null,new Uint16Array(e))}).then(function(e){return n()})}).catch(function(e){return o(e)})})},t.prototype.createPersonalSiteEnqueueBulk=function(){for(var e=[],t=0;t0&&(t.properties=i.Util.extend(t.properties,{To:{results:e.To}})),e.CC&&e.CC.length>0&&(t.properties=i.Util.extend(t.properties,{CC:{results:e.CC}})),e.BCC&&e.BCC.length>0&&(t.properties=i.Util.extend(t.properties,{BCC:{results:e.BCC}})),e.AdditionalHeaders&&(t.properties=i.Util.extend(t.properties,{AdditionalHeaders:e.AdditionalHeaders})),this.create("SendEmail",!0).excute(t)},t.prototype.getCurrentUserEmailAddresses=function(){return this.create("GetCurrentUserEmailAddresses",!0).excute({})},t.prototype.resolvePrincipal=function(e,t,r,n,o,i){void 0===i&&(i=!1);var a={addToUserInfoList:o,input:e,inputIsEmailOnly:n,matchUserInfoList:i,scopes:t,sources:r};return this.create("ResolvePrincipalInCurrentContext",!0).excute(a)},t.prototype.searchPrincipals=function(e,t,r,n,o){var i={groupName:n,input:e,maxCount:o,scopes:t,sources:r};return this.create("SearchPrincipalsUsingContextWeb",!0).excute(i)},t.prototype.createEmailBodyForInvitation=function(e){var t={pageAddress:e};return this.create("CreateEmailBodyForInvitation",!0).excute(t)},t.prototype.expandGroupsToPrincipals=function(e,t){void 0===t&&(t=30);var r={inputs:e,maxCount:t};return this.create("ExpandGroupsToPrincipals",!0).excute(r)},t.prototype.createWikiPage=function(e){return this.create("CreateWikiPageInContextWeb",!0).excute({parameters:e}).then(function(e){return{data:e,file:new a.File(u.spExtractODataId(e))}})},t}(o.SharePointQueryable);t.UtilityMethod=s},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(52),o=function(){function e(){}return Object.defineProperty(e.prototype,"v1",{get:function(){return new n.V1("")},enumerable:!0,configurable:!0}),e}();t.GraphRest=o},function(e,t,r){"use strict";var n=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(t,"__esModule",{value:!0});var o=r(5),i=r(54),a=function(e){function t(t,r){return void 0===r&&(r="v1.0"),e.call(this,t,r)||this}return n(t,e),Object.defineProperty(t.prototype,"groups",{get:function(){return new i.Groups(this)},enumerable:!0,configurable:!0}),t}(o.GraphQueryable);t.V1=a},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(0),o=r(2),i=r(9),a=function(){function e(){this._impl=o.RuntimeConfig.graphFetchClientFactory()}return e.prototype.fetch=function(e,t){void 0===t&&(t={});var r=new Headers;i.mergeHeaders(r,o.RuntimeConfig.graphHeaders),i.mergeHeaders(r,t.headers);var a=n.Util.extend(t,{headers:r});return this.fetchRaw(e,a)},e.prototype.fetchRaw=function(e,t){var r=this;void 0===t&&(t={});var o=new Headers;i.mergeHeaders(o,t.headers),t=n.Util.extend(t,{headers:o});var a=function(o){r._impl.fetch(e,{},t).then(function(e){return o.resolve(e)}).catch(function(e){429!==e.status&&503!==e.status&&o.reject(e);var t=o.delay;o.delay*=2,o.attempts++,o.retryCount<=o.attempts&&o.reject(e),setTimeout(n.Util.getCtxCallback(r,a,o),t)})};return new Promise(function(e,t){var n={attempts:0,delay:100,reject:t,resolve:e,retryCount:7};a.call(r,n)})},e.prototype.get=function(e,t){void 0===t&&(t={});var r=n.Util.extend(t,{method:"GET"});return this.fetch(e,r)},e.prototype.post=function(e,t){void 0===t&&(t={});var r=n.Util.extend(t,{method:"POST"});return this.fetch(e,r)},e.prototype.patch=function(e,t){void 0===t&&(t={});var r=n.Util.extend(t,{method:"PATCH"});return this.fetch(e,r)},e.prototype.delete=function(e,t){void 0===t&&(t={});var r=n.Util.extend(t,{method:"DELETE"});return this.fetch(e,r)},e}();t.GraphHttpClient=a},function(e,t,r){"use strict";var n=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(t,"__esModule",{value:!0});var o,i=r(5),a=r(55),u=r(0),s=r(56),c=r(57),l=r(59),p=r(60);!function(e){e[e.Office365=0]="Office365",e[e.Dynamic=1]="Dynamic",e[e.Security=2]="Security"}(o=t.GroupType||(t.GroupType={}));var f=function(e){function t(t,r){return void 0===r&&(r="groups"),e.call(this,t,r)||this}return n(t,e),t.prototype.getById=function(e){return new h(this,e)},t.prototype.add=function(e,t,r,n){var i=this;void 0===n&&(n={});var a=u.Util.extend({displayName:e,mailEnabled:r===o.Office365,mailNickname:t,securityEnabled:r!==o.Office365},n);return r!==o.Security&&(a=u.Util.extend(a,{groupTypes:[r===o.Office365?"Unified":"DynamicMembership"]})),this.postCore({body:JSON.stringify(a)}).then(function(e){return{data:e,group:i.getById(e.id)}})},t}(i.GraphQueryableCollection);t.Groups=f;var h=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),Object.defineProperty(t.prototype,"caldendar",{get:function(){return new s.Calendar(this,"calendar")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"events",{get:function(){return new s.Events(this)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"owners",{get:function(){return new a.Owners(this)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"plans",{get:function(){return new l.Plans(this)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"members",{get:function(){return new a.Members(this)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"conversations",{get:function(){return new c.Conversations(this)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"acceptedSenders",{get:function(){return new c.Senders(this,"acceptedsenders")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"rejectedSenders",{get:function(){return new c.Senders(this,"rejectedsenders")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"photo",{get:function(){return new p.Photo(this)},enumerable:!0,configurable:!0}),t.prototype.addFavorite=function(){return this.clone(t,"addFavorite").postCore()},t.prototype.getMemberGroups=function(e){return void 0===e&&(e=!1),this.clone(t,"getMemberGroups").postCore({body:JSON.stringify({securityEnabledOnly:e})})},t.prototype.delete=function(){return this.deleteCore()},t.prototype.update=function(e){return this.patchCore({body:JSON.stringify(e)})},t.prototype.removeFavorite=function(){return this.clone(t,"removeFavorite").postCore()},t.prototype.resetUnseenCount=function(){return this.clone(t,"resetUnseenCount").postCore()},t.prototype.subscribeByMail=function(){return this.clone(t,"subscribeByMail").postCore()},t.prototype.unsubscribeByMail=function(){return this.clone(t,"unsubscribeByMail").postCore()},t.prototype.getCalendarView=function(e,r){var n=this.clone(t,"calendarView");return n.query.add("startDateTime",e.toISOString()),n.query.add("endDateTime",r.toISOString()),n.get()},t}(i.GraphQueryableInstance);t.Group=h},function(e,t,r){"use strict";var n=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(t,"__esModule",{value:!0});var o=r(5),i=function(e){function t(t,r){return void 0===r&&(r="members"),e.call(this,t,r)||this}return n(t,e),t.prototype.add=function(e){return this.clone(t,"$ref").postCore({body:JSON.stringify({"@odata.id":e})})},t.prototype.getById=function(e){return new a(this,e)},t}(o.GraphQueryableCollection);t.Members=i;var a=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t}(o.GraphQueryableInstance);t.Member=a;var u=function(e){function t(t,r){return void 0===r&&(r="owners"),e.call(this,t,r)||this}return n(t,e),t}(i);t.Owners=u},function(e,t,r){"use strict";var n=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(t,"__esModule",{value:!0});var o=r(5),i=function(e){function t(t,r){return void 0===r&&(r="calendars"),e.call(this,t,r)||this}return n(t,e),t}(o.GraphQueryableCollection);t.Calendars=i;var a=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),Object.defineProperty(t.prototype,"events",{get:function(){return new u(this)},enumerable:!0,configurable:!0}),t}(o.GraphQueryableInstance);t.Calendar=a;var u=function(e){function t(t,r){return void 0===r&&(r="events"),e.call(this,t,r)||this}return n(t,e),t.prototype.getById=function(e){return new s(this,e)},t.prototype.add=function(e){var t=this;return this.postCore({body:JSON.stringify(e)}).then(function(e){return{data:e,event:t.getById(e.id)}})},t}(o.GraphQueryableCollection);t.Events=u;var s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.update=function(e){return this.patchCore({body:JSON.stringify(e)})},t.prototype.delete=function(){return this.deleteCore()},t}(o.GraphQueryableInstance);t.Event=s},function(e,t,r){"use strict";var n=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(t,"__esModule",{value:!0});var o=r(5),i=r(58),a=function(e){function t(t,r){return void 0===r&&(r="conversations"),e.call(this,t,r)||this}return n(t,e),t.prototype.add=function(e){return this.postCore({body:JSON.stringify(e)})},t.prototype.getById=function(e){return new c(this,e)},t}(o.GraphQueryableCollection);t.Conversations=a;var u=function(e){function t(t,r){return void 0===r&&(r="threads"),e.call(this,t,r)||this}return n(t,e),t.prototype.getById=function(e){return new l(this,e)},t.prototype.add=function(e){return this.postCore({body:JSON.stringify(e)})},t}(o.GraphQueryableCollection);t.Threads=u;var s=function(e){function t(t,r){return void 0===r&&(r="posts"),e.call(this,t,r)||this}return n(t,e),t.prototype.getById=function(e){return new p(this,e)},t.prototype.add=function(e){return this.postCore({body:JSON.stringify(e)})},t}(o.GraphQueryableCollection);t.Posts=s;var c=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),Object.defineProperty(t.prototype,"threads",{get:function(){return new u(this)},enumerable:!0,configurable:!0}),t.prototype.update=function(e){return this.patchCore({body:JSON.stringify(e)})},t.prototype.delete=function(){return this.deleteCore()},t}(o.GraphQueryableInstance);t.Conversation=c;var l=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),Object.defineProperty(t.prototype,"posts",{get:function(){return new s(this)},enumerable:!0,configurable:!0}),t.prototype.reply=function(e){return this.clone(t,"reply").postCore({body:JSON.stringify({post:e})})},t.prototype.delete=function(){return this.deleteCore()},t}(o.GraphQueryableInstance);t.Thread=l;var p=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),Object.defineProperty(t.prototype,"attachments",{get:function(){return new i.Attachments(this)},enumerable:!0,configurable:!0}),t.prototype.delete=function(){return this.deleteCore()},t.prototype.forward=function(e){return this.clone(t,"forward").postCore({body:JSON.stringify(e)})},t.prototype.reply=function(e){return this.clone(t,"reply").postCore({body:JSON.stringify({post:e})})},t}(o.GraphQueryableInstance);t.Post=p;var f=function(e){function t(t,r){return e.call(this,t,r)||this}return n(t,e),t.prototype.add=function(e){return this.clone(t,"$ref").postCore({body:JSON.stringify({"@odata.id":e})})},t.prototype.remove=function(e){var r=this.clone(t,"$ref");return r.query.add("$id",e),r.deleteCore()},t}(o.GraphQueryableCollection);t.Senders=f},function(e,t,r){"use strict";var n=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(t,"__esModule",{value:!0});var o=r(5),i=function(e){function t(t,r){return void 0===r&&(r="attachments"),e.call(this,t,r)||this}return n(t,e),t.prototype.getById=function(e){return new a(this,e)},t.prototype.addFile=function(e,t){return this.postCore({body:JSON.stringify({"@odata.type":"#microsoft.graph.fileAttachment",contentBytes:t,name:e})})},t}(o.GraphQueryableCollection);t.Attachments=i;var a=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t}(o.GraphQueryableInstance);t.Attachment=a},function(e,t,r){"use strict";var n=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(t,"__esModule",{value:!0});var o=r(5),i=function(e){function t(t,r){return void 0===r&&(r="planner/plans"),e.call(this,t,r)||this}return n(t,e),t.prototype.getById=function(e){return new a(this,e)},t}(o.GraphQueryableCollection);t.Plans=i;var a=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t}(o.GraphQueryableInstance);t.Plan=a},function(e,t,r){"use strict";var n=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(t,"__esModule",{value:!0});var o=r(5),i=r(7),a=function(e){function t(t,r){return void 0===r&&(r="photo"),e.call(this,t,r)||this}return n(t,e),t.prototype.getBlob=function(){return this.clone(t,"$value",!1).get(new i.BlobFileParser)},t.prototype.getBuffer=function(){return this.clone(t,"$value",!1).get(new i.BufferFileParser)},t.prototype.setContent=function(e){return this.clone(t,"$value",!1).patchCore({body:e})},t}(o.GraphQueryableInstance);t.Photo=a}])}); +//# sourceMappingURL=pnp.min.js.map \ No newline at end of file diff --git a/dist/pnp.min.js.map b/dist/pnp.min.js.map new file mode 100644 index 00000000..956247cc --- /dev/null +++ b/dist/pnp.min.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["webpack:///webpack/universalModuleDefinition","webpack:///pnp.min.js","webpack:///webpack/bootstrap 000deb434d48a44d90ec","webpack:///./lib/utils/util.js","webpack:///./lib/sharepoint/sharepointqueryable.js","webpack:///./lib/configuration/pnplibconfig.js","webpack:///./lib/utils/logging.js","webpack:///./lib/utils/exceptions.js","webpack:///./lib/graph/graphqueryable.js","webpack:///./lib/sharepoint/odata.js","webpack:///./lib/odata/parsers.js","webpack:///./lib/collections/collections.js","webpack:///./lib/net/utils.js","webpack:///./lib/sharepoint/webs.js","webpack:///./lib/sharepoint/sharepointqueryableshareable.js","webpack:///./lib/sharepoint/files.js","webpack:///./lib/odata/core.js","webpack:///./lib/request/pipeline.js","webpack:///./lib/sharepoint/lists.js","webpack:///./lib/sharepoint/items.js","webpack:///./lib/sharepoint/sitegroups.js","webpack:///./lib/sharepoint/types.js","webpack:///./lib/sharepoint/folders.js","webpack:///./lib/sharepoint/contenttypes.js","webpack:///./lib/sharepoint/usercustomactions.js","webpack:///(webpack)/buildin/global.js","webpack:///./lib/utils/storage.js","webpack:///./lib/odata/queryable.js","webpack:///./lib/net/httpclient.js","webpack:///./lib/sharepoint/sharepointqueryablesecurable.js","webpack:///./lib/sharepoint/roles.js","webpack:///./lib/sharepoint/siteusers.js","webpack:///./lib/sharepoint/fields.js","webpack:///./lib/sharepoint/batch.js","webpack:///./lib/sharepoint/features.js","webpack:///./lib/pnp.js","webpack:///./lib/net/fetchclient.js","webpack:///./lib/configuration/configuration.js","webpack:///./lib/sharepoint/rest.js","webpack:///./lib/sharepoint/search.js","webpack:///./lib/odata/caching.js","webpack:///./lib/net/digestcache.js","webpack:///./lib/sharepoint/searchsuggest.js","webpack:///./lib/sharepoint/site.js","webpack:///./lib/sharepoint/webparts.js","webpack:///./lib/sharepoint/attachmentfiles.js","webpack:///./lib/sharepoint/views.js","webpack:///./lib/sharepoint/forms.js","webpack:///./lib/sharepoint/subscriptions.js","webpack:///./lib/sharepoint/navigation.js","webpack:///./lib/sharepoint/relateditems.js","webpack:///./lib/sharepoint/userprofiles.js","webpack:///./lib/utils/files.js","webpack:///./lib/sharepoint/utilities.js","webpack:///./lib/graph/rest.js","webpack:///./lib/graph/v1.js","webpack:///./lib/net/graphclient.js","webpack:///./lib/graph/groups.js","webpack:///./lib/graph/members.js","webpack:///./lib/graph/calendars.js","webpack:///./lib/graph/conversations.js","webpack:///./lib/graph/attachments.js","webpack:///./lib/graph/plans.js","webpack:///./lib/graph/photos.js"],"names":["root","factory","exports","module","define","amd","this","modules","__webpack_require__","moduleId","installedModules","i","l","call","m","c","d","name","getter","o","Object","defineProperty","configurable","enumerable","get","n","__esModule","object","property","prototype","hasOwnProperty","p","s","global","extractWebUrl","candidateUrl","index","indexOf","substr","value","pnplibconfig_1","Util","getCtxCallback","context","method","params","_i","arguments","length","apply","urlParamExists","replace","RegExp","test","location","search","getUrlParamByName","regex","results","exec","decodeURIComponent","getUrlParamBoolByName","stringInsert","target","substring","dateAdd","date","interval","units","ret","Date","toLowerCase","setFullYear","getFullYear","setMonth","getMonth","setDate","getDate","setTime","getTime","undefined","loadStylesheet","path","avoidCache","encodeURIComponent","toString","head","document","getElementsByTagName","e","createElement","appendChild","setAttribute","combinePaths","paths","filter","stringIsNullOrEmpty","map","join","getRandomString","chars","text","Array","possible","charAt","Math","floor","random","getGUID","r","isFunction","candidateFunction","isArray","array","constructor","extend","source","noOverwrite","check","getOwnPropertyNames","v","reduce","t","isUrlAbsolute","url","toAbsoluteUrl","Promise","resolve","RuntimeConfig","spBaseUrl","_spPageContextInfo","webAbsoluteUrl","webServerRelativeUrl","baseUrl_1","forEach","__extends","extendStatics","setPrototypeOf","__proto__","b","__","create","util_1","collections_1","utils_1","exceptions_1","logging_1","queryable_1","pipeline_1","httpclient_1","SharePointQueryable","_super","baseUrl","_this","_options","_query","Dictionary","_batch","urlStr","lastIndexOf","_parentUrl","_url","slice","q","add","addBatchDependency","hasBatch","addDependency","as","inBatch","batch","AlreadyInBatchException","toUrlAndQuery","aliasedParams","toUrl","match","labelName","Logger","write","LogLevel","Verbose","merge","count","getKeys","key","getParent","parentUrl","parent","configure","query","clone","additionalPath","includeBatch","toRequestContext","verb","options","parser","pipeline","PipelineMethods","default","dependencyDispose","then","mergeOptions","batchDependency","cachingOptions","_cachingOptions","clientFactory","HttpClient","isBatched","isCached","_useCaching","requestAbsoluteUrl","requestId","ODataQueryable","SharePointQueryableCollection","select","selects","expand","expands","orderBy","ascending","keys","asc","push","skip","top","SharePointQueryableInstance","setRuntimeConfig","config","_runtimeConfig","set","fetchclient_1","RuntimeConfigImpl","_defaultCachingStore","_defaultCachingTimeoutSeconds","_globalCacheDisable","_enableCacheExpiration","_cacheExpirationIntervalMilliseconds","_spfxContext","_spFetchClientFactory","FetchClient","_spBaseUrl","_spHeaders","_graphHeaders","_graphFetchClientFactory","globalCacheDisable","defaultCachingStore","defaultCachingTimeoutSeconds","sp","fetchClientFactory","headers","spfxContext","graphHttpClient","graph","enableCacheExpiration","cacheExpirationIntervalMilliseconds","pageContext","web","absoluteUrl","instance","activeLogLevel","_instance","LoggerImpl","subscribe","listeners","listener","clearSubscribers","message","level","log","writeJSON","json","JSON","stringify","entry","measure","f","subscribers","Warning","subscriber","console","profile","profileEnd","ConsoleListener","msg","format","Info","warn","Error","error","data","FunctionListener","defaultLog","ProcessHttpClientResponseException","status","statusText","NoCacheAvailableException","APIUrlException","AuthUrlException","NodeFetchClientUnsupportedException","SPRequestExecutorUndefinedException","MaxCommentLengthException","NotSupportedInBatchException","operation","ODataIdException","BatchParseException","FunctionExpectedException","UrlException","graphclient_1","GraphQueryable","GraphHttpClient","GraphQueryableCollection","num","skipToken","token","GraphQueryableSearchableCollection","GraphQueryableInstance","spExtractODataId","candidate","__metadata","id","spGetEntityUrl","entity","uri","spODataEntity","SPODataEntityParserImpl","spODataEntityArray","SPODataEntityArrayParserImpl","core_1","parse","ODataParserBase","ODataValue","ODataValueParserImpl","ODataDefaultParser","ODataRawParserImpl","ODataRaw","TextFileParser","BlobFileParser","blob","JSONFileParser","BufferFileParser","arrayBuffer","buffer","values","sourceAsDictionary_1","sourceAsHash","remove","val","splice","getValues","clear","mergeHeaders","Request","append","sharepointqueryable_1","lists_1","fields_1","navigation_1","sitegroups_1","contenttypes_1","folders_1","roles_1","files_1","lists_2","siteusers_1","usercustomactions_1","odata_1","batch_1","features_1","sharepointqueryableshareable_1","relateditems_1","Webs","webPath","title","description","template","language","inheritPermissions","props","Description","Language","Title","Url","UseSamePermissionsAsParentSite","WebTemplate","postBody","parameters","type","postCore","body","Web","WebInfos","fromUrl","ContentTypes","Lists","Fields","Features","Navigation","SiteUsers","SiteGroups","CurrentUser","Folders","UserCustomActions","RoleDefinitions","RelatedItemManagerImpl","FromUrl","createBatch","ODataBatch","Folder","SiteGroup","getFolderByServerRelativeUrl","folderRelativeUrl","getFileByServerRelativeUrl","fileRelativeUrl","File","getList","listRelativeUrl","List","update","properties","X-HTTP-Method","delete","deleteCore","applyTheme","colorPaletteUrl","fontSchemeUrl","backgroundImageUrl","shareGenerated","applyWebTemplate","concat","ensureUser","loginName","logonName","user","SiteUser","availableWebTemplates","includeCrossLanugage","getCatalog","getChanges","getUserById","mapToIcon","filename","size","progId","SharePointQueryableShareableWeb","webs_1","sharepointqueryablesecurable_1","types_1","SharePointQueryableShareable","getShareLink","kind","expiration","expString","toISOString","postAsCore","request","createLink","emailData","settings","linkKind","shareWith","loginNames","role","requireSignin","propagateAcl","userStr","login","Key","roleFilter","SharingRole","Edit","RoleType","Contributor","Reader","roleDefinitions","def","includeAnonymousLinkInEmail","peoplePickerInput","roleValue","Id","useSimplifiedRoles","emailBody","emailSubject","subject","sendEmail","shareObject","bypass","sendShareObjectRequest","group","getRoleValue","unshareObjectWeb","checkPermissions","recipients","getSharingInformation","getObjectSharingSettings","unshareObject","deleteLinkByKind","unshareLink","shareId","getAs","associatedMemberGroup","g","Guest","associatedVisitorGroup","getShareObjectWeb","View","dependency","shareObjectRaw","SharePointQueryableSecurable","SharePointQueryableShareableItem","SharingLinkKind","OrganizationView","checkSharingPermissions","unshare","deleteSharingLinkByKind","FileFolderShared","getShareable","shareable","SharePointQueryableShareableFile","SharePointQueryableShareableFolder","shareEverything","parsers_1","webparts_1","items_1","Files","getByName","content","shouldOverWrite","response","file","addChunked","progress","chunkSize","setContentChunked","addTemplateFile","fileUrl","templateFileType","Versions","approve","comment","cancelUpload","uploadId","checkin","checkinType","CheckinType","Major","checkout","copyTo","eTag","IF-Match","deny","getLimitedWebPartManager","scope","WebPartsPersonalizationScope","Shared","LimitedWebPartManager","moveTo","moveOperations","MoveOperations","Overwrite","publish","recycle","undoCheckout","unpublish","getText","binaryStringResponseBody","getBlob","getBuffer","getJSON","setContent","_","getItem","listItemAllFields","Item","self","fileSize","blockCount","parseInt","blockNumber","currentPointer","stage","totalBlocks","chain","startUpload","pointer","continueUpload","finishUpload","fragment","parseFloat","fileOffset","ServerRelativeUrl","getById","versionId","Version","deleteAll","deleteById","deleteByLabel","label","restoreByLabel","TemplateFileType","reject","handleError","has","txt","parseODataJSON","catch","ok","responseBody","responseHeaders","result","returnResult","setResult","hasResult","next","shift","pipe","ctx","requestPipelineMethod","alwaysRun","propertyKey","descriptor","args","__decorate","decorators","desc","getOwnPropertyDescriptor","Reflect","decorate","caching_1","logStart","caching","cacheOptions","CachingOptions","store","CachingParserWrapper","send","batchId","client","opts","fetch","logEnd","views_1","forms_1","subscriptions_1","getByTitle","list","enableContentTypes","additionalSettings","addSettings","AllowContentTypes","BaseTemplate","ContentTypesEnabled","ensure","addOrUpdateSettings","created","ensureSiteAssetsLibrary","ensureSitePagesLibrary","Items","Views","Forms","Subscriptions","getView","viewId","retList","getItemsByCAMLQuery","getListItemChangesSinceToken","Recycle","renderListData","viewXml","RenderListData","renderListDataAsStream","overrideParameters","renderListFormData","itemId","formId","mode","ListData","reserveListItemId","ReserveListItemId","getListItemEntityTypeFullName","ListItemEntityTypeFullName","attachmentfiles_1","getPaged","PagedItemCollectionParser","listItemEntityTypeFullName","removeDependency","ensureListItemEntityTypeName","listItemEntityType","promise","item","candidatelistItemEntityTypeFullName","AttachmentFiles","ContentType","ItemUpdatedParser","getWopiFrameUrl","action","GetWOPIFrameUrl","validateUpdateListItem","formValues","newDocumentUpdate","bNewDocumentUpdate","PagedItemCollection","nextUrl","getNext","hasNext","__next","odata.etag","PrincipalType","groupName","sg","removeById","removeByLoginName","retGroup","ControlMode","FieldTypes","DateTimeFieldFormatType","AddFieldOptions","CalendarType","UrlFieldFormatType","PermissionKind","PrincipalSource","PageType","SharingOperationStatusCode","SPSharedObjectType","SharingDomainRestrictionMode","RenderListDataOptions","folder","ct","addAvailableContentType","contentTypeId","contentType","Group","StringValue","Name","FieldLinks","fl","FieldLink","uca","UserCustomAction","Function","eval","window","PnPClientStorageWrapper","defaultTimeoutMinutes","enabled","cacheExpirationHandler","persistable","put","expire","setItem","createPersistable","removeItem","getOrPut","deleteExpired","defaultTimeout","pnp","setTimeout","MemoryStorage","_store","PnPClientStorage","_local","_session","localStorage","sessionStorage","pathPart","usingCaching","patchCore","digestcache_1","_impl","spFetchClientFactory","_digestCache","DigestCache","cache","credentials","Headers","spHeaders","toUpperCase","webUrl","getDigest","digest","fetchRaw","rawHeaders","retry","delay","attempts","retryCount","retryContext","post","patch","RoleAssignments","getUserEffectivePermissions","GetUserEffectivePermissions","getCurrentUserEffectivePermissions","currentUser","LoginName","breakRoleInheritance","copyRoleAssignments","clearSubscopes","resetRoleInheritance","userHasPermissions","permission","perms","hasPermissions","currentUserHasPermissions","perm","FullMask","High","Low","principalId","roleDefId","ra","RoleAssignment","RoleDefinitionBindings","RoleDefinition","getByType","roleTypeKind","order","basePermissions","BasePermissions","Order","definition","retDef","getByEmail","email","getByLoginName","su","Field","getByInternalNameOrTitle","createFieldAsXml","xml","info","SchemaXml","field","fieldType","addText","maxLength","FieldTypeKind","MaxLength","addCalculated","formula","dateFormat","outputType","Text","DateFormat","Formula","OutputType","addDateTime","displayFormat","calendarType","friendlyDisplayFormat","DateOnly","Gregorian","DateTimeCalendarType","DisplayFormat","FriendlyDisplayFormat","addNumber","minValue","maxValue","MinimumValue","MaximumValue","addCurrency","currencyLocalId","CurrencyLocaleId","addMultilineText","numberOfLines","richText","restrictedMode","appendOnly","allowHyperlink","AllowHyperlink","AppendOnly","NumberOfLines","RestrictedMode","RichText","addUrl","Hyperlink","setShowInDisplayForm","show","setShowInEditForm","setShowInNewForm","_batchId","_requests","_dependencies","resolver","execute","all","executeImpl","absoluteRequestUrl","batchBody","currentChangeSetId","reqInfo","batchHeaders","Content-Type","batchOptions","_parseResponse","responses","statusRegExp","lines","split","state","line","trim","parts","Response","feature","Feature","force","featdefScope","featureId","deactivate","DefinitionId","storage_1","configuration_1","rest_1","rest_2","util","SPRest","GraphRest","storage","Settings","setup","Def","_settings","addJSON","hash","load","provider","getConfiguration","reason","search_1","searchsuggest_1","site_1","userprofiles_1","utilities_1","_baseUrl","searchSuggest","finalQuery","querytext","SearchSuggest","Querytext","SearchQueryBuilder","toSearchQuery","Search","Site","UserProfileQuery","UtilityMethod","crossDomainSite","addInWebUrl","hostWebUrl","_cdImpl","crossDomainWeb","urlPart","queryText","extendQuery","queryTemplate","QueryTemplate","sourceId","SourceId","EnableInterleaving","EnableStemming","TrimDuplicates","trimDuplicatesIncludeId","TrimDuplicatesIncludeId","EnableNicknames","EnableFQL","EnablePhonetic","BypassResultTypes","ProcessBestBets","EnableQueryRules","EnableSorting","GenerateBlockRankLog","rankingModelId","RankingModelId","startRow","StartRow","rowLimit","RowLimit","rowsPerPage","RowsPerPage","selectProperties","SelectProperties","culture","Culture","timeZoneId","TimeZoneId","refinementFilters","filters","RefinementFilters","refiners","Refiners","hiddenConstraints","constraints","HiddenConstraints","sortList","sorts","SortList","timeout","milliseconds","Timeout","hithighlightedProperties","HitHighlightedProperties","clientType","ClientType","personalizationData","PersonalizationData","resultsURL","ResultsUrl","queryTag","tags","QueryTag","Properties","ProcessPersonalFavorites","queryTemplatePropertiesUrl","QueryTemplatePropertiesUrl","reorderingRules","rules","ReorderingRules","hitHighlightedMultivaluePropertyLimit","limit","HitHighlightedMultivaluePropertyLimit","EnableOrderingHitHighlightedProperty","collapseSpecification","spec","CollapseSpecification","uiLanguage","lang","UILanguage","desiredSnippetLength","len","DesiredSnippetLength","maxSnippetLength","MaxSnippetLength","summaryLength","SummaryLength","part","formattedBody","fixupProp","HithighlightedProperties","SearchResults","prop","rawResponse","_raw","_primary","postquery","RawSearchResults","ElapsedTime","PrimaryQueryResult","RelevantResults","RowCount","TotalRows","TotalRowsIncludingDuplicates","formatSearchResults","Table","Rows","getPage","pageNumber","pageSize","rows","rawResults","tempResults","tempResults_1","tempResult","cells","Cells","res","cell","Value","writable","SortDirection","ReorderingRuleMatchType","QueryPropertyValueType","SearchBuiltInSourceId","Documents","ItemsMatchingContentType","ItemsMatchingTag","ItemsRelatedToCurrentUser","ItemsWithSameKeywordAsThisItem","LocalPeopleResults","LocalReportsAndDataResults","LocalSharePointResults","LocalVideoResults","Pages","Pictures","Popular","RecentlyChangedItems","RecommendedItems","Wiki","storeName","local","session","_parser","_cacheOptions","CachedDigest","digests","_httpClient","_digests","cachedDigest","Accept","GetContextWebInformation","newCachedDigest","FormDigestValue","seconds","FormDigestTimeoutSeconds","mapQueryToQueryString","SearchSuggestResult","personalCount","preQuery","hitHighlighting","capitalize","stemming","includePeople","queryRules","prefixMatch","PeopleNames","suggest","PersonalResults","Queries","getContextInfo","SupportedSchemaVersions","getDocumentLibraries","absoluteWebUrl","GetDocumentLibraries","getWebUrlFromPageUrl","absolutePageUrl","GetWebUrlFromPageUrl","openWebById","webId","WebPartDefinitions","export","webPartId","import","webPartXml","WebPartDefinition","getByControlId","WebPart","saveChanges","zoneId","zoneIndex","close","open","AttachmentFile","addMultiple","files","personalView","PersonalView","view","ViewFields","renderAsHtml","getSchemaXml","fieldTitleOrInternalName","move","fieldInternalName","removeAll","Form","subscriptionId","subscription","Subscription","notificationUrl","expirationDate","clientState","expirationDateTime","resource","NavigationNodes","node","NavigationNode","visible","IsVisible","moveAfter","nodeId","previousNodeId","getRelatedItems","sourceListName","sourceItemId","SourceItemID","SourceListName","getPageOneRelatedItems","addSingleLink","sourceWebUrl","targetListName","targetItemID","targetWebUrl","tryAddReverseLink","SourceWebUrl","TargetItemID","TargetListName","TargetWebUrl","TryAddReverseLink","addSingleLinkToUrl","targetItemUrl","TargetItemUrl","addSingleLinkFromUrl","sourceItemUrl","targetItemId","SourceItemUrl","deleteSingleLink","tryDeleteReverseLink","TryDeleteReverseLink","profileLoader","ProfileLoader","amIFollowedBy","amIFollowing","getFollowedTags","maxCount","getFollowersFor","getPeopleFollowedBy","getPropertiesFor","getUserProfilePropertyFor","propertyName","hideSuggestion","isFollowing","follower","followee","setMyProfilePic","profilePicSource","readBlobAsArrayBuffer","String","fromCharCode","Uint16Array","createPersonalSiteEnqueueBulk","emails","ownerUserProfile","userProfile","createPersonalSite","interactiveRequest","shareAllSocialData","share","emailIDs","readBlobAsText","readBlobAs","reader","FileReader","onload","readAsText","readAsArrayBuffer","methodName","getBaseUrl","excute","Body","From","Subject","To","CC","BCC","AdditionalHeaders","getCurrentUserEmailAddresses","resolvePrincipal","input","scopes","sources","inputIsEmailOnly","addToUserInfoList","matchUserInfoList","searchPrincipals","createEmailBodyForInvitation","pageAddress","expandGroupsToPrincipals","inputs","createWikiPage","v1_1","V1","graphqueryable_1","groups_1","Groups","graphFetchClientFactory","graphHeaders","GroupType","members_1","calendars_1","conversations_1","plans_1","photos_1","mailNickname","groupType","additionalProperties","displayName","mailEnabled","Office365","securityEnabled","Security","groupTypes","Calendar","Events","Owners","Plans","Members","Conversations","Senders","Photo","addFavorite","getMemberGroups","securityEnabledOnly","removeFavorite","resetUnseenCount","subscribeByMail","unsubscribeByMail","getCalendarView","start","end","@odata.id","Member","Calendars","Event","event","attachments_1","Conversation","Threads","Thread","Posts","Post","reply","Attachments","forward","remover","Attachment","addFile","bytes","@odata.type","contentBytes","Plan"],"mappings":"CA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KAs7B,EAAA1uC,UAAA0hB,UAAA,WACA,MAAAjjB,MAAAwL,MAAAykC,EAAA,aAAA/uC,IAAA,GAAAif,GAAArL,mBAOAm7B,EAAA1uC,UAAA4hB,WAAA,SAAA3C,GACA,MAAAxgB,MAAAwL,MAAAykC,EAAA,aAAAzgB,WACAzX,KAAAyI,KAGAyvB,GACC3B,EAAAh7B,uBACD1T,GAAAqwC","file":"pnp.min.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"$pnp\"] = factory();\n\telse\n\t\troot[\"$pnp\"] = factory();\n})(this, function() {\nreturn \n\n\n// WEBPACK FOOTER //\n// webpack/universalModuleDefinition","/**\n * sp-pnp-js v3.0.0 - A JavaScript library for SharePoint development.\n * MIT (https://github.com/SharePoint/PnP-JS-Core/blob/master/LICENSE)\n * Copyright (c) 2017 Microsoft\n * docs: http://officedev.github.io/PnP-JS-Core\n * source: https://github.com/SharePoint/PnP-JS-Core\n * bugs: https://github.com/SharePoint/PnP-JS-Core/issues\n */\n(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"$pnp\"] = factory();\n\telse\n\t\troot[\"$pnp\"] = factory();\n})(this, function() {\nreturn /******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n/******/\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId]) {\n/******/ \t\t\treturn installedModules[moduleId].exports;\n/******/ \t\t}\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\ti: moduleId,\n/******/ \t\t\tl: false,\n/******/ \t\t\texports: {}\n/******/ \t\t};\n/******/\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.l = true;\n/******/\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/\n/******/\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n/******/\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n/******/\n/******/ \t// define getter function for harmony exports\n/******/ \t__webpack_require__.d = function(exports, name, getter) {\n/******/ \t\tif(!__webpack_require__.o(exports, name)) {\n/******/ \t\t\tObject.defineProperty(exports, name, {\n/******/ \t\t\t\tconfigurable: false,\n/******/ \t\t\t\tenumerable: true,\n/******/ \t\t\t\tget: getter\n/******/ \t\t\t});\n/******/ \t\t}\n/******/ \t};\n/******/\n/******/ \t// getDefaultExport function for compatibility with non-harmony modules\n/******/ \t__webpack_require__.n = function(module) {\n/******/ \t\tvar getter = module && module.__esModule ?\n/******/ \t\t\tfunction getDefault() { return module['default']; } :\n/******/ \t\t\tfunction getModuleExports() { return module; };\n/******/ \t\t__webpack_require__.d(getter, 'a', getter);\n/******/ \t\treturn getter;\n/******/ \t};\n/******/\n/******/ \t// Object.prototype.hasOwnProperty.call\n/******/ \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n/******/\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"/assets/\";\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(__webpack_require__.s = 32);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/* WEBPACK VAR INJECTION */(function(global) {\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar pnplibconfig_1 = __webpack_require__(2);\nfunction extractWebUrl(candidateUrl) {\n if (candidateUrl === null) {\n return \"\";\n }\n var index = candidateUrl.indexOf(\"_api/\");\n if (index > -1) {\n return candidateUrl.substr(0, index);\n }\n // if all else fails just give them what they gave us back\n return candidateUrl;\n}\nexports.extractWebUrl = extractWebUrl;\nvar Util = /** @class */ (function () {\n function Util() {\n }\n /**\n * Gets a callback function which will maintain context across async calls.\n * Allows for the calling pattern getCtxCallback(thisobj, method, methodarg1, methodarg2, ...)\n *\n * @param context The object that will be the 'this' value in the callback\n * @param method The method to which we will apply the context and parameters\n * @param params Optional, additional arguments to supply to the wrapped method when it is invoked\n */\n Util.getCtxCallback = function (context, method) {\n var params = [];\n for (var _i = 2; _i < arguments.length; _i++) {\n params[_i - 2] = arguments[_i];\n }\n return function () {\n method.apply(context, params);\n };\n };\n /**\n * Tests if a url param exists\n *\n * @param name The name of the url paramter to check\n */\n Util.urlParamExists = function (name) {\n name = name.replace(/[\\[]/, \"\\\\[\").replace(/[\\]]/, \"\\\\]\");\n var regex = new RegExp(\"[\\\\?&]\" + name + \"=([^&#]*)\");\n return regex.test(location.search);\n };\n /**\n * Gets a url param value by name\n *\n * @param name The name of the paramter for which we want the value\n */\n Util.getUrlParamByName = function (name) {\n name = name.replace(/[\\[]/, \"\\\\[\").replace(/[\\]]/, \"\\\\]\");\n var regex = new RegExp(\"[\\\\?&]\" + name + \"=([^&#]*)\");\n var results = regex.exec(location.search);\n return results == null ? \"\" : decodeURIComponent(results[1].replace(/\\+/g, \" \"));\n };\n /**\n * Gets a url param by name and attempts to parse a bool value\n *\n * @param name The name of the paramter for which we want the boolean value\n */\n Util.getUrlParamBoolByName = function (name) {\n var p = this.getUrlParamByName(name);\n var isFalse = (p === \"\" || /false|0/i.test(p));\n return !isFalse;\n };\n /**\n * Inserts the string s into the string target as the index specified by index\n *\n * @param target The string into which we will insert s\n * @param index The location in target to insert s (zero based)\n * @param s The string to insert into target at position index\n */\n Util.stringInsert = function (target, index, s) {\n if (index > 0) {\n return target.substring(0, index) + s + target.substring(index, target.length);\n }\n return s + target;\n };\n /**\n * Adds a value to a date\n *\n * @param date The date to which we will add units, done in local time\n * @param interval The name of the interval to add, one of: ['year', 'quarter', 'month', 'week', 'day', 'hour', 'minute', 'second']\n * @param units The amount to add to date of the given interval\n *\n * http://stackoverflow.com/questions/1197928/how-to-add-30-minutes-to-a-javascript-date-object\n */\n Util.dateAdd = function (date, interval, units) {\n var ret = new Date(date); // don't change original date\n switch (interval.toLowerCase()) {\n case \"year\":\n ret.setFullYear(ret.getFullYear() + units);\n break;\n case \"quarter\":\n ret.setMonth(ret.getMonth() + 3 * units);\n break;\n case \"month\":\n ret.setMonth(ret.getMonth() + units);\n break;\n case \"week\":\n ret.setDate(ret.getDate() + 7 * units);\n break;\n case \"day\":\n ret.setDate(ret.getDate() + units);\n break;\n case \"hour\":\n ret.setTime(ret.getTime() + units * 3600000);\n break;\n case \"minute\":\n ret.setTime(ret.getTime() + units * 60000);\n break;\n case \"second\":\n ret.setTime(ret.getTime() + units * 1000);\n break;\n default:\n ret = undefined;\n break;\n }\n return ret;\n };\n /**\n * Loads a stylesheet into the current page\n *\n * @param path The url to the stylesheet\n * @param avoidCache If true a value will be appended as a query string to avoid browser caching issues\n */\n Util.loadStylesheet = function (path, avoidCache) {\n if (avoidCache) {\n path += \"?\" + encodeURIComponent((new Date()).getTime().toString());\n }\n var head = document.getElementsByTagName(\"head\");\n if (head.length > 0) {\n var e = document.createElement(\"link\");\n head[0].appendChild(e);\n e.setAttribute(\"type\", \"text/css\");\n e.setAttribute(\"rel\", \"stylesheet\");\n e.setAttribute(\"href\", path);\n }\n };\n /**\n * Combines an arbitrary set of paths ensuring that the slashes are normalized\n *\n * @param paths 0 to n path parts to combine\n */\n Util.combinePaths = function () {\n var paths = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n paths[_i] = arguments[_i];\n }\n return paths\n .filter(function (path) { return !Util.stringIsNullOrEmpty(path); })\n .map(function (path) { return path.replace(/^[\\\\|\\/]/, \"\").replace(/[\\\\|\\/]$/, \"\"); })\n .join(\"/\")\n .replace(/\\\\/g, \"/\");\n };\n /**\n * Gets a random string of chars length\n *\n * @param chars The length of the random string to generate\n */\n Util.getRandomString = function (chars) {\n var text = new Array(chars);\n var possible = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789\";\n for (var i = 0; i < chars; i++) {\n text[i] = possible.charAt(Math.floor(Math.random() * possible.length));\n }\n return text.join(\"\");\n };\n /**\n * Gets a random GUID value\n *\n * http://stackoverflow.com/questions/105034/create-guid-uuid-in-javascript\n */\n /* tslint:disable no-bitwise */\n Util.getGUID = function () {\n var d = new Date().getTime();\n var guid = \"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx\".replace(/[xy]/g, function (c) {\n var r = (d + Math.random() * 16) % 16 | 0;\n d = Math.floor(d / 16);\n return (c === \"x\" ? r : (r & 0x3 | 0x8)).toString(16);\n });\n return guid;\n };\n /* tslint:enable */\n /**\n * Determines if a given value is a function\n *\n * @param candidateFunction The thing to test for being a function\n */\n Util.isFunction = function (candidateFunction) {\n return typeof candidateFunction === \"function\";\n };\n /**\n * @returns whether the provided parameter is a JavaScript Array or not.\n */\n Util.isArray = function (array) {\n if (Array.isArray) {\n return Array.isArray(array);\n }\n return array && typeof array.length === \"number\" && array.constructor === Array;\n };\n /**\n * Determines if a string is null or empty or undefined\n *\n * @param s The string to test\n */\n Util.stringIsNullOrEmpty = function (s) {\n return typeof s === \"undefined\" || s === null || s.length < 1;\n };\n /**\n * Provides functionality to extend the given object by doing a shallow copy\n *\n * @param target The object to which properties will be copied\n * @param source The source object from which properties will be copied\n * @param noOverwrite If true existing properties on the target are not overwritten from the source\n *\n */\n Util.extend = function (target, source, noOverwrite) {\n if (noOverwrite === void 0) { noOverwrite = false; }\n if (source === null || typeof source === \"undefined\") {\n return target;\n }\n // ensure we don't overwrite things we don't want overwritten\n var check = noOverwrite ? function (o, i) { return !(i in o); } : function () { return true; };\n return Object.getOwnPropertyNames(source)\n .filter(function (v) { return check(target, v); })\n .reduce(function (t, v) {\n t[v] = source[v];\n return t;\n }, target);\n };\n /**\n * Determines if a given url is absolute\n *\n * @param url The url to check to see if it is absolute\n */\n Util.isUrlAbsolute = function (url) {\n return /^https?:\\/\\/|^\\/\\//i.test(url);\n };\n /**\n * Ensures that a given url is absolute for the current web based on context\n *\n * @param candidateUrl The url to make absolute\n *\n */\n Util.toAbsoluteUrl = function (candidateUrl) {\n return new Promise(function (resolve) {\n if (Util.isUrlAbsolute(candidateUrl)) {\n // if we are already absolute, then just return the url\n return resolve(candidateUrl);\n }\n if (pnplibconfig_1.RuntimeConfig.spBaseUrl !== null) {\n // base url specified either with baseUrl of spfxContext config property\n return resolve(Util.combinePaths(pnplibconfig_1.RuntimeConfig.spBaseUrl, candidateUrl));\n }\n if (typeof global._spPageContextInfo !== \"undefined\") {\n // operating in classic pages\n if (global._spPageContextInfo.hasOwnProperty(\"webAbsoluteUrl\")) {\n return resolve(Util.combinePaths(global._spPageContextInfo.webAbsoluteUrl, candidateUrl));\n }\n else if (global._spPageContextInfo.hasOwnProperty(\"webServerRelativeUrl\")) {\n return resolve(Util.combinePaths(global._spPageContextInfo.webServerRelativeUrl, candidateUrl));\n }\n }\n // does window.location exist and have a certain path part in it?\n if (typeof global.location !== \"undefined\") {\n var baseUrl_1 = global.location.toString().toLowerCase();\n [\"/_layouts/\", \"/siteassets/\"].forEach(function (s) {\n var index = baseUrl_1.indexOf(s);\n if (index > 0) {\n return resolve(Util.combinePaths(baseUrl_1.substr(0, index), candidateUrl));\n }\n });\n }\n return resolve(candidateUrl);\n });\n };\n return Util;\n}());\nexports.Util = Util;\n\n/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(22)))\n\n/***/ }),\n/* 1 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar util_1 = __webpack_require__(0);\nvar collections_1 = __webpack_require__(8);\nvar utils_1 = __webpack_require__(9);\nvar exceptions_1 = __webpack_require__(4);\nvar logging_1 = __webpack_require__(3);\nvar queryable_1 = __webpack_require__(24);\nvar pipeline_1 = __webpack_require__(14);\nvar httpclient_1 = __webpack_require__(25);\n/**\n * SharePointQueryable Base Class\n *\n */\nvar SharePointQueryable = /** @class */ (function (_super) {\n __extends(SharePointQueryable, _super);\n /**\n * Creates a new instance of the SharePointQueryable class\n *\n * @constructor\n * @param baseUrl A string or SharePointQueryable that should form the base part of the url\n *\n */\n function SharePointQueryable(baseUrl, path) {\n var _this = _super.call(this) || this;\n _this._options = {};\n _this._query = new collections_1.Dictionary();\n _this._batch = null;\n if (typeof baseUrl === \"string\") {\n // we need to do some extra parsing to get the parent url correct if we are\n // being created from just a string.\n var urlStr = baseUrl;\n if (util_1.Util.isUrlAbsolute(urlStr) || urlStr.lastIndexOf(\"/\") < 0) {\n _this._parentUrl = urlStr;\n _this._url = util_1.Util.combinePaths(urlStr, path);\n }\n else if (urlStr.lastIndexOf(\"/\") > urlStr.lastIndexOf(\"(\")) {\n // .../items(19)/fields\n var index = urlStr.lastIndexOf(\"/\");\n _this._parentUrl = urlStr.slice(0, index);\n path = util_1.Util.combinePaths(urlStr.slice(index), path);\n _this._url = util_1.Util.combinePaths(_this._parentUrl, path);\n }\n else {\n // .../items(19)\n var index = urlStr.lastIndexOf(\"(\");\n _this._parentUrl = urlStr.slice(0, index);\n _this._url = util_1.Util.combinePaths(urlStr, path);\n }\n }\n else {\n var q = baseUrl;\n _this._parentUrl = q._url;\n _this._options = q._options;\n var target = q._query.get(\"@target\");\n if (target !== null) {\n _this._query.add(\"@target\", target);\n }\n _this._url = util_1.Util.combinePaths(_this._parentUrl, path);\n }\n return _this;\n }\n /**\n * Blocks a batch call from occuring, MUST be cleared by calling the returned function\n */\n SharePointQueryable.prototype.addBatchDependency = function () {\n if (this.hasBatch) {\n return this._batch.addDependency();\n }\n return function () { return null; };\n };\n Object.defineProperty(SharePointQueryable.prototype, \"hasBatch\", {\n /**\n * Indicates if the current query has a batch associated\n *\n */\n get: function () {\n return this._batch !== null;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(SharePointQueryable.prototype, \"batch\", {\n /**\n * The batch currently associated with this query or null\n *\n */\n get: function () {\n return this.hasBatch ? this._batch : null;\n },\n enumerable: true,\n configurable: true\n });\n /**\n * Creates a new instance of the supplied factory and extends this into that new instance\n *\n * @param factory constructor for the new SharePointQueryable\n */\n SharePointQueryable.prototype.as = function (factory) {\n var o = new factory(this._url, null);\n return util_1.Util.extend(o, this, true);\n };\n /**\n * Adds this query to the supplied batch\n *\n * @example\n * ```\n *\n * let b = pnp.sp.createBatch();\n * pnp.sp.web.inBatch(b).get().then(...);\n * b.execute().then(...)\n * ```\n */\n SharePointQueryable.prototype.inBatch = function (batch) {\n if (this._batch !== null) {\n throw new exceptions_1.AlreadyInBatchException();\n }\n this._batch = batch;\n return this;\n };\n /**\n * Gets the full url with query information\n *\n */\n SharePointQueryable.prototype.toUrlAndQuery = function () {\n var aliasedParams = new collections_1.Dictionary();\n var url = this.toUrl().replace(/'!(@.*?)::(.*?)'/ig, function (match, labelName, value) {\n logging_1.Logger.write(\"Rewriting aliased parameter from match \" + match + \" to label: \" + labelName + \" value: \" + value, logging_1.LogLevel.Verbose);\n aliasedParams.add(labelName, \"'\" + value + \"'\");\n return labelName;\n });\n // inlude our explicitly set query string params\n aliasedParams.merge(this._query);\n if (aliasedParams.count() > 0) {\n url += \"?\" + aliasedParams.getKeys().map(function (key) { return key + \"=\" + aliasedParams.get(key); }).join(\"&\");\n }\n return url;\n };\n /**\n * Gets a parent for this instance as specified\n *\n * @param factory The contructor for the class to create\n */\n SharePointQueryable.prototype.getParent = function (factory, baseUrl, path, batch) {\n if (baseUrl === void 0) { baseUrl = this.parentUrl; }\n var parent = new factory(baseUrl, path);\n parent.configure(this._options);\n var target = this.query.get(\"@target\");\n if (target !== null) {\n parent.query.add(\"@target\", target);\n }\n if (typeof batch !== \"undefined\") {\n parent = parent.inBatch(batch);\n }\n return parent;\n };\n /**\n * Clones this SharePointQueryable into a new SharePointQueryable instance of T\n * @param factory Constructor used to create the new instance\n * @param additionalPath Any additional path to include in the clone\n * @param includeBatch If true this instance's batch will be added to the cloned instance\n */\n SharePointQueryable.prototype.clone = function (factory, additionalPath, includeBatch) {\n if (includeBatch === void 0) { includeBatch = true; }\n var clone = new factory(this, additionalPath);\n var target = this.query.get(\"@target\");\n if (target !== null) {\n clone.query.add(\"@target\", target);\n }\n if (includeBatch && this.hasBatch) {\n clone = clone.inBatch(this.batch);\n }\n return clone;\n };\n /**\n * Converts the current instance to a request context\n *\n * @param verb The request verb\n * @param options The set of supplied request options\n * @param parser The supplied ODataParser instance\n * @param pipeline Optional request processing pipeline\n */\n SharePointQueryable.prototype.toRequestContext = function (verb, options, parser, pipeline) {\n var _this = this;\n if (options === void 0) { options = {}; }\n if (pipeline === void 0) { pipeline = pipeline_1.PipelineMethods.default; }\n var dependencyDispose = this.hasBatch ? this.addBatchDependency() : function () { return; };\n return util_1.Util.toAbsoluteUrl(this.toUrlAndQuery()).then(function (url) {\n utils_1.mergeOptions(options, _this._options);\n // build our request context\n var context = {\n batch: _this._batch,\n batchDependency: dependencyDispose,\n cachingOptions: _this._cachingOptions,\n clientFactory: function () { return new httpclient_1.HttpClient(); },\n isBatched: _this.hasBatch,\n isCached: _this._useCaching,\n options: options,\n parser: parser,\n pipeline: pipeline,\n requestAbsoluteUrl: url,\n requestId: util_1.Util.getGUID(),\n verb: verb,\n };\n return context;\n });\n };\n return SharePointQueryable;\n}(queryable_1.ODataQueryable));\nexports.SharePointQueryable = SharePointQueryable;\n/**\n * Represents a REST collection which can be filtered, paged, and selected\n *\n */\nvar SharePointQueryableCollection = /** @class */ (function (_super) {\n __extends(SharePointQueryableCollection, _super);\n function SharePointQueryableCollection() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n /**\n * Filters the returned collection (https://msdn.microsoft.com/en-us/library/office/fp142385.aspx#bk_supported)\n *\n * @param filter The string representing the filter query\n */\n SharePointQueryableCollection.prototype.filter = function (filter) {\n this._query.add(\"$filter\", filter);\n return this;\n };\n /**\n * Choose which fields to return\n *\n * @param selects One or more fields to return\n */\n SharePointQueryableCollection.prototype.select = function () {\n var selects = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n selects[_i] = arguments[_i];\n }\n if (selects.length > 0) {\n this._query.add(\"$select\", selects.join(\",\"));\n }\n return this;\n };\n /**\n * Expands fields such as lookups to get additional data\n *\n * @param expands The Fields for which to expand the values\n */\n SharePointQueryableCollection.prototype.expand = function () {\n var expands = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n expands[_i] = arguments[_i];\n }\n if (expands.length > 0) {\n this._query.add(\"$expand\", expands.join(\",\"));\n }\n return this;\n };\n /**\n * Orders based on the supplied fields ascending\n *\n * @param orderby The name of the field to sort on\n * @param ascending If false DESC is appended, otherwise ASC (default)\n */\n SharePointQueryableCollection.prototype.orderBy = function (orderBy, ascending) {\n if (ascending === void 0) { ascending = true; }\n var keys = this._query.getKeys();\n var query = [];\n var asc = ascending ? \" asc\" : \" desc\";\n for (var i = 0; i < keys.length; i++) {\n if (keys[i] === \"$orderby\") {\n query.push(this._query.get(\"$orderby\"));\n break;\n }\n }\n query.push(\"\" + orderBy + asc);\n this._query.add(\"$orderby\", query.join(\",\"));\n return this;\n };\n /**\n * Skips the specified number of items\n *\n * @param skip The number of items to skip\n */\n SharePointQueryableCollection.prototype.skip = function (skip) {\n this._query.add(\"$skip\", skip.toString());\n return this;\n };\n /**\n * Limits the query to only return the specified number of items\n *\n * @param top The query row limit\n */\n SharePointQueryableCollection.prototype.top = function (top) {\n this._query.add(\"$top\", top.toString());\n return this;\n };\n return SharePointQueryableCollection;\n}(SharePointQueryable));\nexports.SharePointQueryableCollection = SharePointQueryableCollection;\n/**\n * Represents an instance that can be selected\n *\n */\nvar SharePointQueryableInstance = /** @class */ (function (_super) {\n __extends(SharePointQueryableInstance, _super);\n function SharePointQueryableInstance() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n /**\n * Choose which fields to return\n *\n * @param selects One or more fields to return\n */\n SharePointQueryableInstance.prototype.select = function () {\n var selects = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n selects[_i] = arguments[_i];\n }\n if (selects.length > 0) {\n this._query.add(\"$select\", selects.join(\",\"));\n }\n return this;\n };\n /**\n * Expands fields such as lookups to get additional data\n *\n * @param expands The Fields for which to expand the values\n */\n SharePointQueryableInstance.prototype.expand = function () {\n var expands = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n expands[_i] = arguments[_i];\n }\n if (expands.length > 0) {\n this._query.add(\"$expand\", expands.join(\",\"));\n }\n return this;\n };\n return SharePointQueryableInstance;\n}(SharePointQueryable));\nexports.SharePointQueryableInstance = SharePointQueryableInstance;\n\n\n/***/ }),\n/* 2 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar fetchclient_1 = __webpack_require__(33);\nvar RuntimeConfigImpl = /** @class */ (function () {\n function RuntimeConfigImpl() {\n // these are our default values for the library\n this._defaultCachingStore = \"session\";\n this._defaultCachingTimeoutSeconds = 60;\n this._globalCacheDisable = false;\n this._enableCacheExpiration = false;\n this._cacheExpirationIntervalMilliseconds = 750;\n this._spfxContext = null;\n // sharepoint settings\n this._spFetchClientFactory = function () { return new fetchclient_1.FetchClient(); };\n this._spBaseUrl = null;\n this._spHeaders = null;\n // ms graph settings\n this._graphHeaders = null;\n this._graphFetchClientFactory = function () { return null; };\n }\n RuntimeConfigImpl.prototype.set = function (config) {\n var _this = this;\n if (config.hasOwnProperty(\"globalCacheDisable\")) {\n this._globalCacheDisable = config.globalCacheDisable;\n }\n if (config.hasOwnProperty(\"defaultCachingStore\")) {\n this._defaultCachingStore = config.defaultCachingStore;\n }\n if (config.hasOwnProperty(\"defaultCachingTimeoutSeconds\")) {\n this._defaultCachingTimeoutSeconds = config.defaultCachingTimeoutSeconds;\n }\n if (config.hasOwnProperty(\"sp\")) {\n if (config.sp.hasOwnProperty(\"fetchClientFactory\")) {\n this._spFetchClientFactory = config.sp.fetchClientFactory;\n }\n if (config.sp.hasOwnProperty(\"baseUrl\")) {\n this._spBaseUrl = config.sp.baseUrl;\n }\n if (config.sp.hasOwnProperty(\"headers\")) {\n this._spHeaders = config.sp.headers;\n }\n }\n if (config.hasOwnProperty(\"spfxContext\")) {\n this._spfxContext = config.spfxContext;\n if (typeof this._spfxContext.graphHttpClient !== \"undefined\") {\n this._graphFetchClientFactory = function () { return _this._spfxContext.graphHttpClient; };\n }\n }\n if (config.hasOwnProperty(\"graph\")) {\n if (config.graph.hasOwnProperty(\"headers\")) {\n this._graphHeaders = config.graph.headers;\n }\n // this comes after the default setting of the _graphFetchClientFactory client so it can be overwritten\n if (config.graph.hasOwnProperty(\"fetchClientFactory\")) {\n this._graphFetchClientFactory = config.graph.fetchClientFactory;\n }\n }\n if (config.hasOwnProperty(\"enableCacheExpiration\")) {\n this._enableCacheExpiration = config.enableCacheExpiration;\n }\n if (config.hasOwnProperty(\"cacheExpirationIntervalMilliseconds\")) {\n // we don't let the interval be less than 300 milliseconds\n var interval = config.cacheExpirationIntervalMilliseconds < 300 ? 300 : config.cacheExpirationIntervalMilliseconds;\n this._cacheExpirationIntervalMilliseconds = interval;\n }\n };\n Object.defineProperty(RuntimeConfigImpl.prototype, \"defaultCachingStore\", {\n get: function () {\n return this._defaultCachingStore;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(RuntimeConfigImpl.prototype, \"defaultCachingTimeoutSeconds\", {\n get: function () {\n return this._defaultCachingTimeoutSeconds;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(RuntimeConfigImpl.prototype, \"globalCacheDisable\", {\n get: function () {\n return this._globalCacheDisable;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(RuntimeConfigImpl.prototype, \"spFetchClientFactory\", {\n get: function () {\n return this._spFetchClientFactory;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(RuntimeConfigImpl.prototype, \"spBaseUrl\", {\n get: function () {\n if (this._spBaseUrl !== null) {\n return this._spBaseUrl;\n }\n else if (this._spfxContext !== null) {\n return this._spfxContext.pageContext.web.absoluteUrl;\n }\n return null;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(RuntimeConfigImpl.prototype, \"spHeaders\", {\n get: function () {\n return this._spHeaders;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(RuntimeConfigImpl.prototype, \"enableCacheExpiration\", {\n get: function () {\n return this._enableCacheExpiration;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(RuntimeConfigImpl.prototype, \"cacheExpirationIntervalMilliseconds\", {\n get: function () {\n return this._cacheExpirationIntervalMilliseconds;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(RuntimeConfigImpl.prototype, \"spfxContext\", {\n get: function () {\n return this._spfxContext;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(RuntimeConfigImpl.prototype, \"graphFetchClientFactory\", {\n get: function () {\n return this._graphFetchClientFactory;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(RuntimeConfigImpl.prototype, \"graphHeaders\", {\n get: function () {\n return this._graphHeaders;\n },\n enumerable: true,\n configurable: true\n });\n return RuntimeConfigImpl;\n}());\nexports.RuntimeConfigImpl = RuntimeConfigImpl;\nvar _runtimeConfig = new RuntimeConfigImpl();\nexports.RuntimeConfig = _runtimeConfig;\nfunction setRuntimeConfig(config) {\n _runtimeConfig.set(config);\n}\nexports.setRuntimeConfig = setRuntimeConfig;\n\n\n/***/ }),\n/* 3 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\n/**\n * A set of logging levels\n *\n */\nvar LogLevel;\n(function (LogLevel) {\n LogLevel[LogLevel[\"Verbose\"] = 0] = \"Verbose\";\n LogLevel[LogLevel[\"Info\"] = 1] = \"Info\";\n LogLevel[LogLevel[\"Warning\"] = 2] = \"Warning\";\n LogLevel[LogLevel[\"Error\"] = 3] = \"Error\";\n LogLevel[LogLevel[\"Off\"] = 99] = \"Off\";\n})(LogLevel = exports.LogLevel || (exports.LogLevel = {}));\n/**\n * Class used to subscribe ILogListener and log messages throughout an application\n *\n */\nvar Logger = /** @class */ (function () {\n function Logger() {\n }\n Object.defineProperty(Logger, \"activeLogLevel\", {\n get: function () {\n return Logger.instance.activeLogLevel;\n },\n set: function (value) {\n Logger.instance.activeLogLevel = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Logger, \"instance\", {\n get: function () {\n if (typeof Logger._instance === \"undefined\" || Logger._instance === null) {\n Logger._instance = new LoggerImpl();\n }\n return Logger._instance;\n },\n enumerable: true,\n configurable: true\n });\n /**\n * Adds ILogListener instances to the set of subscribed listeners\n *\n * @param listeners One or more listeners to subscribe to this log\n */\n Logger.subscribe = function () {\n var listeners = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n listeners[_i] = arguments[_i];\n }\n listeners.map(function (listener) { return Logger.instance.subscribe(listener); });\n };\n /**\n * Clears the subscribers collection, returning the collection before modifiction\n */\n Logger.clearSubscribers = function () {\n return Logger.instance.clearSubscribers();\n };\n Object.defineProperty(Logger, \"count\", {\n /**\n * Gets the current subscriber count\n */\n get: function () {\n return Logger.instance.count;\n },\n enumerable: true,\n configurable: true\n });\n /**\n * Writes the supplied string to the subscribed listeners\n *\n * @param message The message to write\n * @param level [Optional] if supplied will be used as the level of the entry (Default: LogLevel.Verbose)\n */\n Logger.write = function (message, level) {\n if (level === void 0) { level = LogLevel.Verbose; }\n Logger.instance.log({ level: level, message: message });\n };\n /**\n * Writes the supplied string to the subscribed listeners\n *\n * @param json The json object to stringify and write\n * @param level [Optional] if supplied will be used as the level of the entry (Default: LogLevel.Verbose)\n */\n Logger.writeJSON = function (json, level) {\n if (level === void 0) { level = LogLevel.Verbose; }\n Logger.instance.log({ level: level, message: JSON.stringify(json) });\n };\n /**\n * Logs the supplied entry to the subscribed listeners\n *\n * @param entry The message to log\n */\n Logger.log = function (entry) {\n Logger.instance.log(entry);\n };\n /**\n * Logs performance tracking data for the the execution duration of the supplied function using console.profile\n *\n * @param name The name of this profile boundary\n * @param f The function to execute and track within this performance boundary\n */\n Logger.measure = function (name, f) {\n return Logger.instance.measure(name, f);\n };\n return Logger;\n}());\nexports.Logger = Logger;\nvar LoggerImpl = /** @class */ (function () {\n function LoggerImpl(activeLogLevel, subscribers) {\n if (activeLogLevel === void 0) { activeLogLevel = LogLevel.Warning; }\n if (subscribers === void 0) { subscribers = []; }\n this.activeLogLevel = activeLogLevel;\n this.subscribers = subscribers;\n }\n LoggerImpl.prototype.subscribe = function (listener) {\n this.subscribers.push(listener);\n };\n LoggerImpl.prototype.clearSubscribers = function () {\n var s = this.subscribers.slice(0);\n this.subscribers.length = 0;\n return s;\n };\n Object.defineProperty(LoggerImpl.prototype, \"count\", {\n get: function () {\n return this.subscribers.length;\n },\n enumerable: true,\n configurable: true\n });\n LoggerImpl.prototype.write = function (message, level) {\n if (level === void 0) { level = LogLevel.Verbose; }\n this.log({ level: level, message: message });\n };\n LoggerImpl.prototype.log = function (entry) {\n if (typeof entry === \"undefined\" || entry.level < this.activeLogLevel) {\n return;\n }\n this.subscribers.map(function (subscriber) { return subscriber.log(entry); });\n };\n LoggerImpl.prototype.measure = function (name, f) {\n console.profile(name);\n try {\n return f();\n }\n finally {\n console.profileEnd();\n }\n };\n return LoggerImpl;\n}());\n/**\n * Implementation of ILogListener which logs to the browser console\n *\n */\nvar ConsoleListener = /** @class */ (function () {\n function ConsoleListener() {\n }\n /**\n * Any associated data that a given logging listener may choose to log or ignore\n *\n * @param entry The information to be logged\n */\n ConsoleListener.prototype.log = function (entry) {\n var msg = this.format(entry);\n switch (entry.level) {\n case LogLevel.Verbose:\n case LogLevel.Info:\n console.log(msg);\n break;\n case LogLevel.Warning:\n console.warn(msg);\n break;\n case LogLevel.Error:\n console.error(msg);\n break;\n }\n };\n /**\n * Formats the message\n *\n * @param entry The information to format into a string\n */\n ConsoleListener.prototype.format = function (entry) {\n var msg = [];\n msg.push(\"Message: \" + entry.message);\n if (typeof entry.data !== \"undefined\") {\n msg.push(\" Data: \" + JSON.stringify(entry.data));\n }\n return msg.join(\"\");\n };\n return ConsoleListener;\n}());\nexports.ConsoleListener = ConsoleListener;\n/**\n * Implementation of ILogListener which logs to the supplied function\n *\n */\nvar FunctionListener = /** @class */ (function () {\n /**\n * Creates a new instance of the FunctionListener class\n *\n * @constructor\n * @param method The method to which any logging data will be passed\n */\n function FunctionListener(method) {\n this.method = method;\n }\n /**\n * Any associated data that a given logging listener may choose to log or ignore\n *\n * @param entry The information to be logged\n */\n FunctionListener.prototype.log = function (entry) {\n this.method(entry);\n };\n return FunctionListener;\n}());\nexports.FunctionListener = FunctionListener;\n\n\n/***/ }),\n/* 4 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar logging_1 = __webpack_require__(3);\nfunction defaultLog(error) {\n logging_1.Logger.log({ data: {}, level: logging_1.LogLevel.Error, message: \"[\" + error.name + \"]::\" + error.message });\n}\n/**\n * Represents an exception with an HttpClient request\n *\n */\nvar ProcessHttpClientResponseException = /** @class */ (function (_super) {\n __extends(ProcessHttpClientResponseException, _super);\n function ProcessHttpClientResponseException(status, statusText, data) {\n var _this = _super.call(this, \"Error making HttpClient request in queryable: [\" + status + \"] \" + statusText) || this;\n _this.status = status;\n _this.statusText = statusText;\n _this.data = data;\n _this.name = \"ProcessHttpClientResponseException\";\n logging_1.Logger.log({ data: _this.data, level: logging_1.LogLevel.Error, message: _this.message });\n return _this;\n }\n return ProcessHttpClientResponseException;\n}(Error));\nexports.ProcessHttpClientResponseException = ProcessHttpClientResponseException;\nvar NoCacheAvailableException = /** @class */ (function (_super) {\n __extends(NoCacheAvailableException, _super);\n function NoCacheAvailableException(msg) {\n if (msg === void 0) { msg = \"Cannot create a caching configuration provider since cache is not available.\"; }\n var _this = _super.call(this, msg) || this;\n _this.name = \"NoCacheAvailableException\";\n defaultLog(_this);\n return _this;\n }\n return NoCacheAvailableException;\n}(Error));\nexports.NoCacheAvailableException = NoCacheAvailableException;\nvar APIUrlException = /** @class */ (function (_super) {\n __extends(APIUrlException, _super);\n function APIUrlException(msg) {\n if (msg === void 0) { msg = \"Unable to determine API url.\"; }\n var _this = _super.call(this, msg) || this;\n _this.name = \"APIUrlException\";\n defaultLog(_this);\n return _this;\n }\n return APIUrlException;\n}(Error));\nexports.APIUrlException = APIUrlException;\nvar AuthUrlException = /** @class */ (function (_super) {\n __extends(AuthUrlException, _super);\n function AuthUrlException(data, msg) {\n if (msg === void 0) { msg = \"Auth URL Endpoint could not be determined from data. Data logged.\"; }\n var _this = _super.call(this, msg) || this;\n _this.name = \"APIUrlException\";\n logging_1.Logger.log({ data: data, level: logging_1.LogLevel.Error, message: _this.message });\n return _this;\n }\n return AuthUrlException;\n}(Error));\nexports.AuthUrlException = AuthUrlException;\nvar NodeFetchClientUnsupportedException = /** @class */ (function (_super) {\n __extends(NodeFetchClientUnsupportedException, _super);\n function NodeFetchClientUnsupportedException(msg) {\n if (msg === void 0) { msg = \"Using NodeFetchClient in the browser is not supported.\"; }\n var _this = _super.call(this, msg) || this;\n _this.name = \"NodeFetchClientUnsupportedException\";\n defaultLog(_this);\n return _this;\n }\n return NodeFetchClientUnsupportedException;\n}(Error));\nexports.NodeFetchClientUnsupportedException = NodeFetchClientUnsupportedException;\nvar SPRequestExecutorUndefinedException = /** @class */ (function (_super) {\n __extends(SPRequestExecutorUndefinedException, _super);\n function SPRequestExecutorUndefinedException() {\n var _this = this;\n var msg = [\n \"SP.RequestExecutor is undefined. \",\n \"Load the SP.RequestExecutor.js library (/_layouts/15/SP.RequestExecutor.js) before loading the PnP JS Core library.\",\n ].join(\" \");\n _this = _super.call(this, msg) || this;\n _this.name = \"SPRequestExecutorUndefinedException\";\n defaultLog(_this);\n return _this;\n }\n return SPRequestExecutorUndefinedException;\n}(Error));\nexports.SPRequestExecutorUndefinedException = SPRequestExecutorUndefinedException;\nvar MaxCommentLengthException = /** @class */ (function (_super) {\n __extends(MaxCommentLengthException, _super);\n function MaxCommentLengthException(msg) {\n if (msg === void 0) { msg = \"The maximum comment length is 1023 characters.\"; }\n var _this = _super.call(this, msg) || this;\n _this.name = \"MaxCommentLengthException\";\n defaultLog(_this);\n return _this;\n }\n return MaxCommentLengthException;\n}(Error));\nexports.MaxCommentLengthException = MaxCommentLengthException;\nvar NotSupportedInBatchException = /** @class */ (function (_super) {\n __extends(NotSupportedInBatchException, _super);\n function NotSupportedInBatchException(operation) {\n if (operation === void 0) { operation = \"This operation\"; }\n var _this = _super.call(this, operation + \" is not supported as part of a batch.\") || this;\n _this.name = \"NotSupportedInBatchException\";\n defaultLog(_this);\n return _this;\n }\n return NotSupportedInBatchException;\n}(Error));\nexports.NotSupportedInBatchException = NotSupportedInBatchException;\nvar ODataIdException = /** @class */ (function (_super) {\n __extends(ODataIdException, _super);\n function ODataIdException(data, msg) {\n if (msg === void 0) { msg = \"Could not extract odata id in object, you may be using nometadata. Object data logged to logger.\"; }\n var _this = _super.call(this, msg) || this;\n _this.name = \"ODataIdException\";\n logging_1.Logger.log({ data: data, level: logging_1.LogLevel.Error, message: _this.message });\n return _this;\n }\n return ODataIdException;\n}(Error));\nexports.ODataIdException = ODataIdException;\nvar BatchParseException = /** @class */ (function (_super) {\n __extends(BatchParseException, _super);\n function BatchParseException(msg) {\n var _this = _super.call(this, msg) || this;\n _this.name = \"BatchParseException\";\n defaultLog(_this);\n return _this;\n }\n return BatchParseException;\n}(Error));\nexports.BatchParseException = BatchParseException;\nvar AlreadyInBatchException = /** @class */ (function (_super) {\n __extends(AlreadyInBatchException, _super);\n function AlreadyInBatchException(msg) {\n if (msg === void 0) { msg = \"This query is already part of a batch.\"; }\n var _this = _super.call(this, msg) || this;\n _this.name = \"AlreadyInBatchException\";\n defaultLog(_this);\n return _this;\n }\n return AlreadyInBatchException;\n}(Error));\nexports.AlreadyInBatchException = AlreadyInBatchException;\nvar FunctionExpectedException = /** @class */ (function (_super) {\n __extends(FunctionExpectedException, _super);\n function FunctionExpectedException(msg) {\n if (msg === void 0) { msg = \"This query is already part of a batch.\"; }\n var _this = _super.call(this, msg) || this;\n _this.name = \"FunctionExpectedException\";\n defaultLog(_this);\n return _this;\n }\n return FunctionExpectedException;\n}(Error));\nexports.FunctionExpectedException = FunctionExpectedException;\nvar UrlException = /** @class */ (function (_super) {\n __extends(UrlException, _super);\n function UrlException(msg) {\n var _this = _super.call(this, msg) || this;\n _this.name = \"UrlException\";\n defaultLog(_this);\n return _this;\n }\n return UrlException;\n}(Error));\nexports.UrlException = UrlException;\n\n\n/***/ }),\n/* 5 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar util_1 = __webpack_require__(0);\nvar collections_1 = __webpack_require__(8);\nvar graphclient_1 = __webpack_require__(53);\nvar queryable_1 = __webpack_require__(24);\nvar pipeline_1 = __webpack_require__(14);\n/**\n * Queryable Base Class\n *\n */\nvar GraphQueryable = /** @class */ (function (_super) {\n __extends(GraphQueryable, _super);\n /**\n * Creates a new instance of the Queryable class\n *\n * @constructor\n * @param baseUrl A string or Queryable that should form the base part of the url\n *\n */\n function GraphQueryable(baseUrl, path) {\n var _this = _super.call(this) || this;\n _this._query = new collections_1.Dictionary();\n if (typeof baseUrl === \"string\") {\n var urlStr = baseUrl;\n _this._parentUrl = urlStr;\n _this._url = util_1.Util.combinePaths(urlStr, path);\n }\n else {\n var q = baseUrl;\n _this._parentUrl = q._url;\n _this._url = util_1.Util.combinePaths(_this._parentUrl, path);\n }\n return _this;\n }\n /**\n * Creates a new instance of the supplied factory and extends this into that new instance\n *\n * @param factory constructor for the new queryable\n */\n GraphQueryable.prototype.as = function (factory) {\n var o = new factory(this._url, null);\n return util_1.Util.extend(o, this, true);\n };\n /**\n * Gets the full url with query information\n *\n */\n GraphQueryable.prototype.toUrlAndQuery = function () {\n var _this = this;\n return this.toUrl() + (\"?\" + this._query.getKeys().map(function (key) { return key + \"=\" + _this._query.get(key); }).join(\"&\"));\n };\n /**\n * Gets a parent for this instance as specified\n *\n * @param factory The contructor for the class to create\n */\n GraphQueryable.prototype.getParent = function (factory, baseUrl, path) {\n if (baseUrl === void 0) { baseUrl = this.parentUrl; }\n return new factory(baseUrl, path);\n };\n /**\n * Clones this queryable into a new queryable instance of T\n * @param factory Constructor used to create the new instance\n * @param additionalPath Any additional path to include in the clone\n * @param includeBatch If true this instance's batch will be added to the cloned instance\n */\n GraphQueryable.prototype.clone = function (factory, additionalPath, includeBatch) {\n if (includeBatch === void 0) { includeBatch = true; }\n // TODO:: include batching info in clone\n if (includeBatch) {\n return new factory(this, additionalPath);\n }\n return new factory(this, additionalPath);\n };\n /**\n * Converts the current instance to a request context\n *\n * @param verb The request verb\n * @param options The set of supplied request options\n * @param parser The supplied ODataParser instance\n * @param pipeline Optional request processing pipeline\n */\n GraphQueryable.prototype.toRequestContext = function (verb, options, parser, pipeline) {\n if (options === void 0) { options = {}; }\n if (pipeline === void 0) { pipeline = pipeline_1.PipelineMethods.default; }\n // TODO:: add batch support\n return Promise.resolve({\n batch: null,\n batchDependency: function () { return void (0); },\n cachingOptions: this._cachingOptions,\n clientFactory: function () { return new graphclient_1.GraphHttpClient(); },\n isBatched: false,\n isCached: this._useCaching,\n options: options,\n parser: parser,\n pipeline: pipeline,\n requestAbsoluteUrl: this.toUrlAndQuery(),\n requestId: util_1.Util.getGUID(),\n verb: verb,\n });\n };\n return GraphQueryable;\n}(queryable_1.ODataQueryable));\nexports.GraphQueryable = GraphQueryable;\n/**\n * Represents a REST collection which can be filtered, paged, and selected\n *\n */\nvar GraphQueryableCollection = /** @class */ (function (_super) {\n __extends(GraphQueryableCollection, _super);\n function GraphQueryableCollection() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n /**\n *\n * @param filter The string representing the filter query\n */\n GraphQueryableCollection.prototype.filter = function (filter) {\n this._query.add(\"$filter\", filter);\n return this;\n };\n /**\n * Choose which fields to return\n *\n * @param selects One or more fields to return\n */\n GraphQueryableCollection.prototype.select = function () {\n var selects = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n selects[_i] = arguments[_i];\n }\n if (selects.length > 0) {\n this._query.add(\"$select\", selects.join(\",\"));\n }\n return this;\n };\n /**\n * Expands fields such as lookups to get additional data\n *\n * @param expands The Fields for which to expand the values\n */\n GraphQueryableCollection.prototype.expand = function () {\n var expands = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n expands[_i] = arguments[_i];\n }\n if (expands.length > 0) {\n this._query.add(\"$expand\", expands.join(\",\"));\n }\n return this;\n };\n /**\n * Orders based on the supplied fields ascending\n *\n * @param orderby The name of the field to sort on\n * @param ascending If false DESC is appended, otherwise ASC (default)\n */\n GraphQueryableCollection.prototype.orderBy = function (orderBy, ascending) {\n if (ascending === void 0) { ascending = true; }\n var keys = this._query.getKeys();\n var query = [];\n var asc = ascending ? \" asc\" : \" desc\";\n for (var i = 0; i < keys.length; i++) {\n if (keys[i] === \"$orderby\") {\n query.push(this._query.get(\"$orderby\"));\n break;\n }\n }\n query.push(\"\" + orderBy + asc);\n this._query.add(\"$orderby\", query.join(\",\"));\n return this;\n };\n /**\n * Limits the query to only return the specified number of items\n *\n * @param top The query row limit\n */\n GraphQueryableCollection.prototype.top = function (top) {\n this._query.add(\"$top\", top.toString());\n return this;\n };\n /**\n * Skips a set number of items in the return set\n *\n * @param num Number of items to skip\n */\n GraphQueryableCollection.prototype.skip = function (num) {\n this._query.add(\"$top\", num.toString());\n return this;\n };\n /**\n * \tTo request second and subsequent pages of Graph data\n */\n GraphQueryableCollection.prototype.skipToken = function (token) {\n this._query.add(\"$skiptoken\", token);\n return this;\n };\n Object.defineProperty(GraphQueryableCollection.prototype, \"count\", {\n /**\n * \tRetrieves the total count of matching resources\n */\n get: function () {\n this._query.add(\"$count\", \"true\");\n return this;\n },\n enumerable: true,\n configurable: true\n });\n return GraphQueryableCollection;\n}(GraphQueryable));\nexports.GraphQueryableCollection = GraphQueryableCollection;\nvar GraphQueryableSearchableCollection = /** @class */ (function (_super) {\n __extends(GraphQueryableSearchableCollection, _super);\n function GraphQueryableSearchableCollection() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n /**\n * \tTo request second and subsequent pages of Graph data\n */\n GraphQueryableSearchableCollection.prototype.search = function (query) {\n this._query.add(\"$search\", query);\n return this;\n };\n return GraphQueryableSearchableCollection;\n}(GraphQueryableCollection));\nexports.GraphQueryableSearchableCollection = GraphQueryableSearchableCollection;\n/**\n * Represents an instance that can be selected\n *\n */\nvar GraphQueryableInstance = /** @class */ (function (_super) {\n __extends(GraphQueryableInstance, _super);\n function GraphQueryableInstance() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n /**\n * Choose which fields to return\n *\n * @param selects One or more fields to return\n */\n GraphQueryableInstance.prototype.select = function () {\n var selects = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n selects[_i] = arguments[_i];\n }\n if (selects.length > 0) {\n this._query.add(\"$select\", selects.join(\",\"));\n }\n return this;\n };\n /**\n * Expands fields such as lookups to get additional data\n *\n * @param expands The Fields for which to expand the values\n */\n GraphQueryableInstance.prototype.expand = function () {\n var expands = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n expands[_i] = arguments[_i];\n }\n if (expands.length > 0) {\n this._query.add(\"$expand\", expands.join(\",\"));\n }\n return this;\n };\n return GraphQueryableInstance;\n}(GraphQueryable));\nexports.GraphQueryableInstance = GraphQueryableInstance;\n\n\n/***/ }),\n/* 6 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar util_1 = __webpack_require__(0);\nvar logging_1 = __webpack_require__(3);\nvar exceptions_1 = __webpack_require__(4);\nvar core_1 = __webpack_require__(13);\nfunction spExtractODataId(candidate) {\n if (candidate.hasOwnProperty(\"odata.id\")) {\n return candidate[\"odata.id\"];\n }\n else if (candidate.hasOwnProperty(\"__metadata\") && candidate.__metadata.hasOwnProperty(\"id\")) {\n return candidate.__metadata.id;\n }\n else {\n throw new exceptions_1.ODataIdException(candidate);\n }\n}\nexports.spExtractODataId = spExtractODataId;\nvar SPODataEntityParserImpl = /** @class */ (function (_super) {\n __extends(SPODataEntityParserImpl, _super);\n function SPODataEntityParserImpl(factory) {\n var _this = _super.call(this) || this;\n _this.factory = factory;\n return _this;\n }\n SPODataEntityParserImpl.prototype.parse = function (r) {\n var _this = this;\n return _super.prototype.parse.call(this, r).then(function (d) {\n var o = new _this.factory(spGetEntityUrl(d), null);\n return util_1.Util.extend(o, d);\n });\n };\n return SPODataEntityParserImpl;\n}(core_1.ODataParserBase));\nvar SPODataEntityArrayParserImpl = /** @class */ (function (_super) {\n __extends(SPODataEntityArrayParserImpl, _super);\n function SPODataEntityArrayParserImpl(factory) {\n var _this = _super.call(this) || this;\n _this.factory = factory;\n return _this;\n }\n SPODataEntityArrayParserImpl.prototype.parse = function (r) {\n var _this = this;\n return _super.prototype.parse.call(this, r).then(function (d) {\n return d.map(function (v) {\n var o = new _this.factory(spGetEntityUrl(v), null);\n return util_1.Util.extend(o, v);\n });\n });\n };\n return SPODataEntityArrayParserImpl;\n}(core_1.ODataParserBase));\nfunction spGetEntityUrl(entity) {\n if (entity.hasOwnProperty(\"odata.metadata\") && entity.hasOwnProperty(\"odata.editLink\")) {\n // we are dealign with minimal metadata (default)\n return util_1.Util.combinePaths(util_1.extractWebUrl(entity[\"odata.metadata\"]), \"_api\", entity[\"odata.editLink\"]);\n }\n else if (entity.hasOwnProperty(\"__metadata\")) {\n // we are dealing with verbose, which has an absolute uri\n return entity.__metadata.uri;\n }\n else {\n // we are likely dealing with nometadata, so don't error but we won't be able to\n // chain off these objects\n logging_1.Logger.write(\"No uri information found in ODataEntity parsing, chaining will fail for this object.\", logging_1.LogLevel.Warning);\n return \"\";\n }\n}\nexports.spGetEntityUrl = spGetEntityUrl;\nfunction spODataEntity(factory) {\n return new SPODataEntityParserImpl(factory);\n}\nexports.spODataEntity = spODataEntity;\nfunction spODataEntityArray(factory) {\n return new SPODataEntityArrayParserImpl(factory);\n}\nexports.spODataEntityArray = spODataEntityArray;\n\n\n/***/ }),\n/* 7 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar core_1 = __webpack_require__(13);\nvar util_1 = __webpack_require__(0);\nvar ODataDefaultParser = /** @class */ (function (_super) {\n __extends(ODataDefaultParser, _super);\n function ODataDefaultParser() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n return ODataDefaultParser;\n}(core_1.ODataParserBase));\nexports.ODataDefaultParser = ODataDefaultParser;\nvar ODataValueParserImpl = /** @class */ (function (_super) {\n __extends(ODataValueParserImpl, _super);\n function ODataValueParserImpl() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n ODataValueParserImpl.prototype.parse = function (r) {\n return _super.prototype.parse.call(this, r).then(function (d) { return d; });\n };\n return ODataValueParserImpl;\n}(core_1.ODataParserBase));\nfunction ODataValue() {\n return new ODataValueParserImpl();\n}\nexports.ODataValue = ODataValue;\nvar ODataRawParserImpl = /** @class */ (function () {\n function ODataRawParserImpl() {\n }\n ODataRawParserImpl.prototype.parse = function (r) {\n return r.json();\n };\n return ODataRawParserImpl;\n}());\nexports.ODataRawParserImpl = ODataRawParserImpl;\nexports.ODataRaw = new ODataRawParserImpl();\nvar TextFileParser = /** @class */ (function () {\n function TextFileParser() {\n }\n TextFileParser.prototype.parse = function (r) {\n return r.text();\n };\n return TextFileParser;\n}());\nexports.TextFileParser = TextFileParser;\nvar BlobFileParser = /** @class */ (function () {\n function BlobFileParser() {\n }\n BlobFileParser.prototype.parse = function (r) {\n return r.blob();\n };\n return BlobFileParser;\n}());\nexports.BlobFileParser = BlobFileParser;\nvar JSONFileParser = /** @class */ (function () {\n function JSONFileParser() {\n }\n JSONFileParser.prototype.parse = function (r) {\n return r.json();\n };\n return JSONFileParser;\n}());\nexports.JSONFileParser = JSONFileParser;\nvar BufferFileParser = /** @class */ (function () {\n function BufferFileParser() {\n }\n BufferFileParser.prototype.parse = function (r) {\n if (util_1.Util.isFunction(r.arrayBuffer)) {\n return r.arrayBuffer();\n }\n return r.buffer();\n };\n return BufferFileParser;\n}());\nexports.BufferFileParser = BufferFileParser;\n\n\n/***/ }),\n/* 8 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\n/**\n * Generic dictionary\n */\nvar Dictionary = /** @class */ (function () {\n /**\n * Creates a new instance of the Dictionary class\n *\n * @constructor\n */\n function Dictionary(keys, values) {\n if (keys === void 0) { keys = []; }\n if (values === void 0) { values = []; }\n this.keys = keys;\n this.values = values;\n }\n /**\n * Gets a value from the collection using the specified key\n *\n * @param key The key whose value we want to return, returns null if the key does not exist\n */\n Dictionary.prototype.get = function (key) {\n var index = this.keys.indexOf(key);\n if (index < 0) {\n return null;\n }\n return this.values[index];\n };\n /**\n * Adds the supplied key and value to the dictionary\n *\n * @param key The key to add\n * @param o The value to add\n */\n Dictionary.prototype.add = function (key, o) {\n var index = this.keys.indexOf(key);\n if (index > -1) {\n this.values[index] = o;\n }\n else {\n this.keys.push(key);\n this.values.push(o);\n }\n };\n /**\n * Merges the supplied typed hash into this dictionary instance. Existing values are updated and new ones are created as appropriate.\n */\n Dictionary.prototype.merge = function (source) {\n var _this = this;\n if (\"getKeys\" in source) {\n var sourceAsDictionary_1 = source;\n sourceAsDictionary_1.getKeys().map(function (key) {\n _this.add(key, sourceAsDictionary_1.get(key));\n });\n }\n else {\n var sourceAsHash = source;\n for (var key in sourceAsHash) {\n if (sourceAsHash.hasOwnProperty(key)) {\n this.add(key, sourceAsHash[key]);\n }\n }\n }\n };\n /**\n * Removes a value from the dictionary\n *\n * @param key The key of the key/value pair to remove. Returns null if the key was not found.\n */\n Dictionary.prototype.remove = function (key) {\n var index = this.keys.indexOf(key);\n if (index < 0) {\n return null;\n }\n var val = this.values[index];\n this.keys.splice(index, 1);\n this.values.splice(index, 1);\n return val;\n };\n /**\n * Returns all the keys currently in the dictionary as an array\n */\n Dictionary.prototype.getKeys = function () {\n return this.keys;\n };\n /**\n * Returns all the values currently in the dictionary as an array\n */\n Dictionary.prototype.getValues = function () {\n return this.values;\n };\n /**\n * Clears the current dictionary\n */\n Dictionary.prototype.clear = function () {\n this.keys = [];\n this.values = [];\n };\n /**\n * Gets a count of the items currently in the dictionary\n */\n Dictionary.prototype.count = function () {\n return this.keys.length;\n };\n return Dictionary;\n}());\nexports.Dictionary = Dictionary;\n\n\n/***/ }),\n/* 9 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar util_1 = __webpack_require__(0);\nfunction mergeOptions(target, source) {\n target.headers = target.headers || {};\n var headers = util_1.Util.extend(target.headers, source.headers);\n target = util_1.Util.extend(target, source);\n target.headers = headers;\n}\nexports.mergeOptions = mergeOptions;\nfunction mergeHeaders(target, source) {\n if (typeof source !== \"undefined\" && source !== null) {\n var temp = new Request(\"\", { headers: source });\n temp.headers.forEach(function (value, name) {\n target.append(name, value);\n });\n }\n}\nexports.mergeHeaders = mergeHeaders;\n\n\n/***/ }),\n/* 10 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar sharepointqueryable_1 = __webpack_require__(1);\nvar lists_1 = __webpack_require__(15);\nvar fields_1 = __webpack_require__(29);\nvar navigation_1 = __webpack_require__(46);\nvar sitegroups_1 = __webpack_require__(17);\nvar contenttypes_1 = __webpack_require__(20);\nvar folders_1 = __webpack_require__(19);\nvar roles_1 = __webpack_require__(27);\nvar files_1 = __webpack_require__(12);\nvar util_1 = __webpack_require__(0);\nvar lists_2 = __webpack_require__(15);\nvar siteusers_1 = __webpack_require__(28);\nvar usercustomactions_1 = __webpack_require__(21);\nvar odata_1 = __webpack_require__(6);\nvar batch_1 = __webpack_require__(30);\nvar features_1 = __webpack_require__(31);\nvar sharepointqueryableshareable_1 = __webpack_require__(11);\nvar relateditems_1 = __webpack_require__(47);\n/**\n * Describes a collection of webs\n *\n */\nvar Webs = /** @class */ (function (_super) {\n __extends(Webs, _super);\n /**\n * Creates a new instance of the Webs class\n *\n * @param baseUrl The url or SharePointQueryable which forms the parent of this web collection\n */\n function Webs(baseUrl, webPath) {\n if (webPath === void 0) { webPath = \"webs\"; }\n return _super.call(this, baseUrl, webPath) || this;\n }\n /**\n * Adds a new web to the collection\n *\n * @param title The new web's title\n * @param url The new web's relative url\n * @param description The new web's description\n * @param template The new web's template internal name (default = STS)\n * @param language The locale id that specifies the new web's language (default = 1033 [English, US])\n * @param inheritPermissions When true, permissions will be inherited from the new web's parent (default = true)\n */\n Webs.prototype.add = function (title, url, description, template, language, inheritPermissions) {\n if (description === void 0) { description = \"\"; }\n if (template === void 0) { template = \"STS\"; }\n if (language === void 0) { language = 1033; }\n if (inheritPermissions === void 0) { inheritPermissions = true; }\n var props = {\n Description: description,\n Language: language,\n Title: title,\n Url: url,\n UseSamePermissionsAsParentSite: inheritPermissions,\n WebTemplate: template,\n };\n var postBody = JSON.stringify({\n \"parameters\": util_1.Util.extend({\n \"__metadata\": { \"type\": \"SP.WebCreationInformation\" },\n }, props),\n });\n return this.clone(Webs, \"add\").postCore({ body: postBody }).then(function (data) {\n return {\n data: data,\n web: new Web(odata_1.spExtractODataId(data).replace(/_api\\/web\\/?/i, \"\")),\n };\n });\n };\n return Webs;\n}(sharepointqueryable_1.SharePointQueryableCollection));\nexports.Webs = Webs;\n/**\n * Describes a collection of web infos\n *\n */\nvar WebInfos = /** @class */ (function (_super) {\n __extends(WebInfos, _super);\n /**\n * Creates a new instance of the WebInfos class\n *\n * @param baseUrl The url or SharePointQueryable which forms the parent of this web infos collection\n */\n function WebInfos(baseUrl, webPath) {\n if (webPath === void 0) { webPath = \"webinfos\"; }\n return _super.call(this, baseUrl, webPath) || this;\n }\n return WebInfos;\n}(sharepointqueryable_1.SharePointQueryableCollection));\nexports.WebInfos = WebInfos;\n/**\n * Describes a web\n *\n */\nvar Web = /** @class */ (function (_super) {\n __extends(Web, _super);\n /**\n * Creates a new instance of the Web class\n *\n * @param baseUrl The url or SharePointQueryable which forms the parent of this web\n */\n function Web(baseUrl, path) {\n if (path === void 0) { path = \"_api/web\"; }\n return _super.call(this, baseUrl, path) || this;\n }\n /**\n * Creates a new web instance from the given url by indexing the location of the /_api/\n * segment. If this is not found the method creates a new web with the entire string as\n * supplied.\n *\n * @param url\n */\n Web.fromUrl = function (url, path) {\n return new Web(util_1.extractWebUrl(url), path);\n };\n Object.defineProperty(Web.prototype, \"webs\", {\n /**\n * Gets this web's subwebs\n *\n */\n get: function () {\n return new Webs(this);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Web.prototype, \"webinfos\", {\n /**\n * Gets a collection of WebInfos for this web's subwebs\n *\n */\n get: function () {\n return new WebInfos(this);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Web.prototype, \"contentTypes\", {\n /**\n * Gets the content types available in this web\n *\n */\n get: function () {\n return new contenttypes_1.ContentTypes(this);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Web.prototype, \"lists\", {\n /**\n * Gets the lists in this web\n *\n */\n get: function () {\n return new lists_1.Lists(this);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Web.prototype, \"fields\", {\n /**\n * Gets the fields in this web\n *\n */\n get: function () {\n return new fields_1.Fields(this);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Web.prototype, \"features\", {\n /**\n * Gets the active features for this web\n *\n */\n get: function () {\n return new features_1.Features(this);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Web.prototype, \"availablefields\", {\n /**\n * Gets the available fields in this web\n *\n */\n get: function () {\n return new fields_1.Fields(this, \"availablefields\");\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Web.prototype, \"navigation\", {\n /**\n * Gets the navigation options in this web\n *\n */\n get: function () {\n return new navigation_1.Navigation(this);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Web.prototype, \"siteUsers\", {\n /**\n * Gets the site users\n *\n */\n get: function () {\n return new siteusers_1.SiteUsers(this);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Web.prototype, \"siteGroups\", {\n /**\n * Gets the site groups\n *\n */\n get: function () {\n return new sitegroups_1.SiteGroups(this);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Web.prototype, \"currentUser\", {\n /**\n * Gets the current user\n */\n get: function () {\n return new siteusers_1.CurrentUser(this);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Web.prototype, \"folders\", {\n /**\n * Gets the top-level folders in this web\n *\n */\n get: function () {\n return new folders_1.Folders(this);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Web.prototype, \"userCustomActions\", {\n /**\n * Gets all user custom actions for this web\n *\n */\n get: function () {\n return new usercustomactions_1.UserCustomActions(this);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Web.prototype, \"roleDefinitions\", {\n /**\n * Gets the collection of RoleDefinition resources\n *\n */\n get: function () {\n return new roles_1.RoleDefinitions(this);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Web.prototype, \"relatedItems\", {\n /**\n * Provides an interface to manage related items\n *\n */\n get: function () {\n return relateditems_1.RelatedItemManagerImpl.FromUrl(this.toUrl());\n },\n enumerable: true,\n configurable: true\n });\n /**\n * Creates a new batch for requests within the context of this web\n *\n */\n Web.prototype.createBatch = function () {\n return new batch_1.ODataBatch(this.parentUrl);\n };\n Object.defineProperty(Web.prototype, \"rootFolder\", {\n /**\n * Gets the root folder of this web\n *\n */\n get: function () {\n return new folders_1.Folder(this, \"rootFolder\");\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Web.prototype, \"associatedOwnerGroup\", {\n /**\n * Gets the associated owner group for this web\n *\n */\n get: function () {\n return new sitegroups_1.SiteGroup(this, \"associatedownergroup\");\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Web.prototype, \"associatedMemberGroup\", {\n /**\n * Gets the associated member group for this web\n *\n */\n get: function () {\n return new sitegroups_1.SiteGroup(this, \"associatedmembergroup\");\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Web.prototype, \"associatedVisitorGroup\", {\n /**\n * Gets the associated visitor group for this web\n *\n */\n get: function () {\n return new sitegroups_1.SiteGroup(this, \"associatedvisitorgroup\");\n },\n enumerable: true,\n configurable: true\n });\n /**\n * Gets a folder by server relative url\n *\n * @param folderRelativeUrl The server relative path to the folder (including /sites/ if applicable)\n */\n Web.prototype.getFolderByServerRelativeUrl = function (folderRelativeUrl) {\n return new folders_1.Folder(this, \"getFolderByServerRelativeUrl('\" + folderRelativeUrl + \"')\");\n };\n /**\n * Gets a file by server relative url\n *\n * @param fileRelativeUrl The server relative path to the file (including /sites/ if applicable)\n */\n Web.prototype.getFileByServerRelativeUrl = function (fileRelativeUrl) {\n return new files_1.File(this, \"getFileByServerRelativeUrl('\" + fileRelativeUrl + \"')\");\n };\n /**\n * Gets a list by server relative url (list's root folder)\n *\n * @param listRelativeUrl The server relative path to the list's root folder (including /sites/ if applicable)\n */\n Web.prototype.getList = function (listRelativeUrl) {\n return new lists_2.List(this, \"getList('\" + listRelativeUrl + \"')\");\n };\n /**\n * Updates this web instance with the supplied properties\n *\n * @param properties A plain object hash of values to update for the web\n */\n Web.prototype.update = function (properties) {\n var _this = this;\n var postBody = JSON.stringify(util_1.Util.extend({\n \"__metadata\": { \"type\": \"SP.Web\" },\n }, properties));\n return this.postCore({\n body: postBody,\n headers: {\n \"X-HTTP-Method\": \"MERGE\",\n },\n }).then(function (data) {\n return {\n data: data,\n web: _this,\n };\n });\n };\n /**\n * Deletes this web\n *\n */\n Web.prototype.delete = function () {\n return _super.prototype.deleteCore.call(this);\n };\n /**\n * Applies the theme specified by the contents of each of the files specified in the arguments to the site\n *\n * @param colorPaletteUrl The server-relative URL of the color palette file\n * @param fontSchemeUrl The server-relative URL of the font scheme\n * @param backgroundImageUrl The server-relative URL of the background image\n * @param shareGenerated When true, the generated theme files are stored in the root site. When false, they are stored in this web\n */\n Web.prototype.applyTheme = function (colorPaletteUrl, fontSchemeUrl, backgroundImageUrl, shareGenerated) {\n var postBody = JSON.stringify({\n backgroundImageUrl: backgroundImageUrl,\n colorPaletteUrl: colorPaletteUrl,\n fontSchemeUrl: fontSchemeUrl,\n shareGenerated: shareGenerated,\n });\n return this.clone(Web, \"applytheme\").postCore({ body: postBody });\n };\n /**\n * Applies the specified site definition or site template to the Web site that has no template applied to it\n *\n * @param template Name of the site definition or the name of the site template\n */\n Web.prototype.applyWebTemplate = function (template) {\n var q = this.clone(Web, \"applywebtemplate\");\n q.concat(\"(@t)\");\n q.query.add(\"@t\", template);\n return q.postCore();\n };\n /**\n * Checks whether the specified login name belongs to a valid user in the web. If the user doesn't exist, adds the user to the web.\n *\n * @param loginName The login name of the user (ex: i:0#.f|membership|user@domain.onmicrosoft.com)\n */\n Web.prototype.ensureUser = function (loginName) {\n var postBody = JSON.stringify({\n logonName: loginName,\n });\n return this.clone(Web, \"ensureuser\").postCore({ body: postBody }).then(function (data) {\n return {\n data: data,\n user: new siteusers_1.SiteUser(odata_1.spExtractODataId(data)),\n };\n });\n };\n /**\n * Returns a collection of site templates available for the site\n *\n * @param language The locale id of the site templates to retrieve (default = 1033 [English, US])\n * @param includeCrossLanguage When true, includes language-neutral site templates; otherwise false (default = true)\n */\n Web.prototype.availableWebTemplates = function (language, includeCrossLanugage) {\n if (language === void 0) { language = 1033; }\n if (includeCrossLanugage === void 0) { includeCrossLanugage = true; }\n return new sharepointqueryable_1.SharePointQueryableCollection(this, \"getavailablewebtemplates(lcid=\" + language + \", doincludecrosslanguage=\" + includeCrossLanugage + \")\");\n };\n /**\n * Returns the list gallery on the site\n *\n * @param type The gallery type - WebTemplateCatalog = 111, WebPartCatalog = 113 ListTemplateCatalog = 114,\n * MasterPageCatalog = 116, SolutionCatalog = 121, ThemeCatalog = 123, DesignCatalog = 124, AppDataCatalog = 125\n */\n Web.prototype.getCatalog = function (type) {\n return this.clone(Web, \"getcatalog(\" + type + \")\").select(\"Id\").get().then(function (data) {\n return new lists_2.List(odata_1.spExtractODataId(data));\n });\n };\n /**\n * Returns the collection of changes from the change log that have occurred within the list, based on the specified query\n *\n * @param query The change query\n */\n Web.prototype.getChanges = function (query) {\n var postBody = JSON.stringify({ \"query\": util_1.Util.extend({ \"__metadata\": { \"type\": \"SP.ChangeQuery\" } }, query) });\n return this.clone(Web, \"getchanges\").postCore({ body: postBody });\n };\n Object.defineProperty(Web.prototype, \"customListTemplate\", {\n /**\n * Gets the custom list templates for the site\n *\n */\n get: function () {\n return new sharepointqueryable_1.SharePointQueryableCollection(this, \"getcustomlisttemplates\");\n },\n enumerable: true,\n configurable: true\n });\n /**\n * Returns the user corresponding to the specified member identifier for the current site\n *\n * @param id The id of the user\n */\n Web.prototype.getUserById = function (id) {\n return new siteusers_1.SiteUser(this, \"getUserById(\" + id + \")\");\n };\n /**\n * Returns the name of the image file for the icon that is used to represent the specified file\n *\n * @param filename The file name. If this parameter is empty, the server returns an empty string\n * @param size The size of the icon: 16x16 pixels = 0, 32x32 pixels = 1 (default = 0)\n * @param progId The ProgID of the application that was used to create the file, in the form OLEServerName.ObjectName\n */\n Web.prototype.mapToIcon = function (filename, size, progId) {\n if (size === void 0) { size = 0; }\n if (progId === void 0) { progId = \"\"; }\n return this.clone(Web, \"maptoicon(filename='\" + filename + \"', progid='\" + progId + \"', size=\" + size + \")\").get();\n };\n return Web;\n}(sharepointqueryableshareable_1.SharePointQueryableShareableWeb));\nexports.Web = Web;\n\n\n/***/ }),\n/* 11 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar util_1 = __webpack_require__(0);\nvar webs_1 = __webpack_require__(10);\nvar odata_1 = __webpack_require__(6);\nvar sharepointqueryable_1 = __webpack_require__(1);\nvar sharepointqueryablesecurable_1 = __webpack_require__(26);\nvar types_1 = __webpack_require__(18);\n/**\n * Internal helper class used to augment classes to include sharing functionality\n */\nvar SharePointQueryableShareable = /** @class */ (function (_super) {\n __extends(SharePointQueryableShareable, _super);\n function SharePointQueryableShareable() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n /**\n * Gets a sharing link for the supplied\n *\n * @param kind The kind of link to share\n * @param expiration The optional expiration for this link\n */\n SharePointQueryableShareable.prototype.getShareLink = function (kind, expiration) {\n if (expiration === void 0) { expiration = null; }\n // date needs to be an ISO string or null\n var expString = expiration !== null ? expiration.toISOString() : null;\n // clone using the factory and send the request\n return this.clone(SharePointQueryableShareable, \"shareLink\").postAsCore({\n body: JSON.stringify({\n request: {\n createLink: true,\n emailData: null,\n settings: {\n expiration: expString,\n linkKind: kind,\n },\n },\n }),\n });\n };\n /**\n * Shares this instance with the supplied users\n *\n * @param loginNames Resolved login names to share\n * @param role The role\n * @param requireSignin True to require the user is authenticated, otherwise false\n * @param propagateAcl True to apply this share to all children\n * @param emailData If supplied an email will be sent with the indicated properties\n */\n SharePointQueryableShareable.prototype.shareWith = function (loginNames, role, requireSignin, propagateAcl, emailData) {\n var _this = this;\n if (requireSignin === void 0) { requireSignin = false; }\n if (propagateAcl === void 0) { propagateAcl = false; }\n // handle the multiple input types\n if (!Array.isArray(loginNames)) {\n loginNames = [loginNames];\n }\n var userStr = JSON.stringify(loginNames.map(function (login) { return { Key: login }; }));\n var roleFilter = role === types_1.SharingRole.Edit ? types_1.RoleType.Contributor : types_1.RoleType.Reader;\n // start by looking up the role definition id we need to set the roleValue\n return webs_1.Web.fromUrl(this.toUrl()).roleDefinitions.select(\"Id\").filter(\"RoleTypeKind eq \" + roleFilter).get().then(function (def) {\n if (!Array.isArray(def) || def.length < 1) {\n throw new Error(\"Could not locate a role defintion with RoleTypeKind \" + roleFilter);\n }\n var postBody = {\n includeAnonymousLinkInEmail: requireSignin,\n peoplePickerInput: userStr,\n propagateAcl: propagateAcl,\n roleValue: \"role:\" + def[0].Id,\n useSimplifiedRoles: true,\n };\n if (typeof emailData !== \"undefined\") {\n postBody = util_1.Util.extend(postBody, {\n emailBody: emailData.body,\n emailSubject: typeof emailData.subject !== \"undefined\" ? emailData.subject : \"\",\n sendEmail: true,\n });\n }\n return _this.clone(SharePointQueryableShareable, \"shareObject\").postAsCore({\n body: JSON.stringify(postBody),\n });\n });\n };\n /**\n * Shares an object based on the supplied options\n *\n * @param options The set of options to send to the ShareObject method\n * @param bypass If true any processing is skipped and the options are sent directly to the ShareObject method\n */\n SharePointQueryableShareable.prototype.shareObject = function (options, bypass) {\n var _this = this;\n if (bypass === void 0) { bypass = false; }\n if (bypass) {\n // if the bypass flag is set send the supplied parameters directly to the service\n return this.sendShareObjectRequest(options);\n }\n // extend our options with some defaults\n options = util_1.Util.extend(options, {\n group: null,\n includeAnonymousLinkInEmail: false,\n propagateAcl: false,\n useSimplifiedRoles: true,\n }, true);\n return this.getRoleValue(options.role, options.group).then(function (roleValue) {\n // handle the multiple input types\n if (!Array.isArray(options.loginNames)) {\n options.loginNames = [options.loginNames];\n }\n var userStr = JSON.stringify(options.loginNames.map(function (login) { return { Key: login }; }));\n var postBody = {\n peoplePickerInput: userStr,\n roleValue: roleValue,\n url: options.url,\n };\n if (typeof options.emailData !== \"undefined\" && options.emailData !== null) {\n postBody = util_1.Util.extend(postBody, {\n emailBody: options.emailData.body,\n emailSubject: typeof options.emailData.subject !== \"undefined\" ? options.emailData.subject : \"Shared with you.\",\n sendEmail: true,\n });\n }\n return _this.sendShareObjectRequest(postBody);\n });\n };\n /**\n * Calls the web's UnshareObject method\n *\n * @param url The url of the object to unshare\n */\n SharePointQueryableShareable.prototype.unshareObjectWeb = function (url) {\n return this.clone(SharePointQueryableShareable, \"unshareObject\").postAsCore({\n body: JSON.stringify({\n url: url,\n }),\n });\n };\n /**\n * Checks Permissions on the list of Users and returns back role the users have on the Item.\n *\n * @param recipients The array of Entities for which Permissions need to be checked.\n */\n SharePointQueryableShareable.prototype.checkPermissions = function (recipients) {\n return this.clone(SharePointQueryableShareable, \"checkPermissions\").postAsCore({\n body: JSON.stringify({\n recipients: recipients,\n }),\n });\n };\n /**\n * Get Sharing Information.\n *\n * @param request The SharingInformationRequest Object.\n */\n SharePointQueryableShareable.prototype.getSharingInformation = function (request) {\n if (request === void 0) { request = null; }\n return this.clone(SharePointQueryableShareable, \"getSharingInformation\").postAsCore({\n body: JSON.stringify({\n request: request,\n }),\n });\n };\n /**\n * Gets the sharing settings of an item.\n *\n * @param useSimplifiedRoles Determines whether to use simplified roles.\n */\n SharePointQueryableShareable.prototype.getObjectSharingSettings = function (useSimplifiedRoles) {\n if (useSimplifiedRoles === void 0) { useSimplifiedRoles = true; }\n return this.clone(SharePointQueryableShareable, \"getObjectSharingSettings\").postAsCore({\n body: JSON.stringify({\n useSimplifiedRoles: useSimplifiedRoles,\n }),\n });\n };\n /**\n * Unshares this object\n */\n SharePointQueryableShareable.prototype.unshareObject = function () {\n return this.clone(SharePointQueryableShareable, \"unshareObject\").postAsCore();\n };\n /**\n * Deletes a link by type\n *\n * @param kind Deletes a sharing link by the kind of link\n */\n SharePointQueryableShareable.prototype.deleteLinkByKind = function (kind) {\n return this.clone(SharePointQueryableShareable, \"deleteLinkByKind\").postCore({\n body: JSON.stringify({ linkKind: kind }),\n });\n };\n /**\n * Removes the specified link to the item.\n *\n * @param kind The kind of link to be deleted.\n * @param shareId\n */\n SharePointQueryableShareable.prototype.unshareLink = function (kind, shareId) {\n if (shareId === void 0) { shareId = \"00000000-0000-0000-0000-000000000000\"; }\n return this.clone(SharePointQueryableShareable, \"unshareLink\").postCore({\n body: JSON.stringify({ linkKind: kind, shareId: shareId }),\n });\n };\n /**\n * Calculates the roleValue string used in the sharing query\n *\n * @param role The Sharing Role\n * @param group The Group type\n */\n SharePointQueryableShareable.prototype.getRoleValue = function (role, group) {\n // we will give group precedence, because we had to make a choice\n if (typeof group !== \"undefined\" && group !== null) {\n switch (group) {\n case types_1.RoleType.Contributor:\n return webs_1.Web.fromUrl(this.toUrl()).associatedMemberGroup.select(\"Id\").getAs().then(function (g) { return \"group: \" + g.Id; });\n case types_1.RoleType.Reader:\n case types_1.RoleType.Guest:\n return webs_1.Web.fromUrl(this.toUrl()).associatedVisitorGroup.select(\"Id\").getAs().then(function (g) { return \"group: \" + g.Id; });\n default:\n throw new Error(\"Could not determine role value for supplied value. Contributor, Reader, and Guest are supported\");\n }\n }\n else {\n var roleFilter = role === types_1.SharingRole.Edit ? types_1.RoleType.Contributor : types_1.RoleType.Reader;\n return webs_1.Web.fromUrl(this.toUrl()).roleDefinitions.select(\"Id\").top(1).filter(\"RoleTypeKind eq \" + roleFilter).getAs().then(function (def) {\n if (def.length < 1) {\n throw new Error(\"Could not locate associated role definition for supplied role. Edit and View are supported\");\n }\n return \"role: \" + def[0].Id;\n });\n }\n };\n SharePointQueryableShareable.prototype.getShareObjectWeb = function (candidate) {\n return Promise.resolve(webs_1.Web.fromUrl(candidate, \"/_api/SP.Web.ShareObject\"));\n };\n SharePointQueryableShareable.prototype.sendShareObjectRequest = function (options) {\n return this.getShareObjectWeb(this.toUrl()).then(function (web) {\n return web.expand(\"UsersWithAccessRequests\", \"GroupsSharedWith\").as(SharePointQueryableShareable).postCore({\n body: JSON.stringify(options),\n });\n });\n };\n return SharePointQueryableShareable;\n}(sharepointqueryable_1.SharePointQueryable));\nexports.SharePointQueryableShareable = SharePointQueryableShareable;\nvar SharePointQueryableShareableWeb = /** @class */ (function (_super) {\n __extends(SharePointQueryableShareableWeb, _super);\n function SharePointQueryableShareableWeb() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n /**\n * Shares this web with the supplied users\n * @param loginNames The resolved login names to share\n * @param role The role to share this web\n * @param emailData Optional email data\n */\n SharePointQueryableShareableWeb.prototype.shareWith = function (loginNames, role, emailData) {\n var _this = this;\n if (role === void 0) { role = types_1.SharingRole.View; }\n var dependency = this.addBatchDependency();\n return webs_1.Web.fromUrl(this.toUrl(), \"/_api/web/url\").get().then(function (url) {\n dependency();\n return _this.shareObject(util_1.Util.combinePaths(url, \"/_layouts/15/aclinv.aspx?forSharing=1&mbypass=1\"), loginNames, role, emailData);\n });\n };\n /**\n * Provides direct access to the static web.ShareObject method\n *\n * @param url The url to share\n * @param loginNames Resolved loginnames string[] of a single login name string\n * @param roleValue Role value\n * @param emailData Optional email data\n * @param groupId Optional group id\n * @param propagateAcl\n * @param includeAnonymousLinkInEmail\n * @param useSimplifiedRoles\n */\n SharePointQueryableShareableWeb.prototype.shareObject = function (url, loginNames, role, emailData, group, propagateAcl, includeAnonymousLinkInEmail, useSimplifiedRoles) {\n if (propagateAcl === void 0) { propagateAcl = false; }\n if (includeAnonymousLinkInEmail === void 0) { includeAnonymousLinkInEmail = false; }\n if (useSimplifiedRoles === void 0) { useSimplifiedRoles = true; }\n return this.clone(SharePointQueryableShareable, null).shareObject({\n emailData: emailData,\n group: group,\n includeAnonymousLinkInEmail: includeAnonymousLinkInEmail,\n loginNames: loginNames,\n propagateAcl: propagateAcl,\n role: role,\n url: url,\n useSimplifiedRoles: useSimplifiedRoles,\n });\n };\n /**\n * Supplies a method to pass any set of arguments to ShareObject\n *\n * @param options The set of options to send to ShareObject\n */\n SharePointQueryableShareableWeb.prototype.shareObjectRaw = function (options) {\n return this.clone(SharePointQueryableShareable, null).shareObject(options, true);\n };\n /**\n * Unshares the object\n *\n * @param url The url of the object to stop sharing\n */\n SharePointQueryableShareableWeb.prototype.unshareObject = function (url) {\n return this.clone(SharePointQueryableShareable, null).unshareObjectWeb(url);\n };\n return SharePointQueryableShareableWeb;\n}(sharepointqueryablesecurable_1.SharePointQueryableSecurable));\nexports.SharePointQueryableShareableWeb = SharePointQueryableShareableWeb;\nvar SharePointQueryableShareableItem = /** @class */ (function (_super) {\n __extends(SharePointQueryableShareableItem, _super);\n function SharePointQueryableShareableItem() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n /**\n * Gets a link suitable for sharing for this item\n *\n * @param kind The type of link to share\n * @param expiration The optional expiration date\n */\n SharePointQueryableShareableItem.prototype.getShareLink = function (kind, expiration) {\n if (kind === void 0) { kind = types_1.SharingLinkKind.OrganizationView; }\n if (expiration === void 0) { expiration = null; }\n return this.clone(SharePointQueryableShareable, null).getShareLink(kind, expiration);\n };\n /**\n * Shares this item with one or more users\n *\n * @param loginNames string or string[] of resolved login names to which this item will be shared\n * @param role The role (View | Edit) applied to the share\n * @param emailData Optional, if inlucded an email will be sent. Note subject currently has no effect.\n */\n SharePointQueryableShareableItem.prototype.shareWith = function (loginNames, role, requireSignin, emailData) {\n if (role === void 0) { role = types_1.SharingRole.View; }\n if (requireSignin === void 0) { requireSignin = false; }\n return this.clone(SharePointQueryableShareable, null).shareWith(loginNames, role, requireSignin, false, emailData);\n };\n /**\n * Checks Permissions on the list of Users and returns back role the users have on the Item.\n *\n * @param recipients The array of Entities for which Permissions need to be checked.\n */\n SharePointQueryableShareableItem.prototype.checkSharingPermissions = function (recipients) {\n return this.clone(SharePointQueryableShareable, null).checkPermissions(recipients);\n };\n /**\n * Get Sharing Information.\n *\n * @param request The SharingInformationRequest Object.\n */\n SharePointQueryableShareableItem.prototype.getSharingInformation = function (request) {\n if (request === void 0) { request = null; }\n return this.clone(SharePointQueryableShareable, null).getSharingInformation(request);\n };\n /**\n * Gets the sharing settings of an item.\n *\n * @param useSimplifiedRoles Determines whether to use simplified roles.\n */\n SharePointQueryableShareableItem.prototype.getObjectSharingSettings = function (useSimplifiedRoles) {\n if (useSimplifiedRoles === void 0) { useSimplifiedRoles = true; }\n return this.clone(SharePointQueryableShareable, null).getObjectSharingSettings(useSimplifiedRoles);\n };\n /**\n * Unshare this item\n */\n SharePointQueryableShareableItem.prototype.unshare = function () {\n return this.clone(SharePointQueryableShareable, null).unshareObject();\n };\n /**\n * Deletes a sharing link by kind\n *\n * @param kind Deletes a sharing link by the kind of link\n */\n SharePointQueryableShareableItem.prototype.deleteSharingLinkByKind = function (kind) {\n return this.clone(SharePointQueryableShareable, null).deleteLinkByKind(kind);\n };\n /**\n * Removes the specified link to the item.\n *\n * @param kind The kind of link to be deleted.\n * @param shareId\n */\n SharePointQueryableShareableItem.prototype.unshareLink = function (kind, shareId) {\n return this.clone(SharePointQueryableShareable, null).unshareLink(kind, shareId);\n };\n return SharePointQueryableShareableItem;\n}(sharepointqueryablesecurable_1.SharePointQueryableSecurable));\nexports.SharePointQueryableShareableItem = SharePointQueryableShareableItem;\nvar FileFolderShared = /** @class */ (function (_super) {\n __extends(FileFolderShared, _super);\n function FileFolderShared() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n /**\n * Gets a link suitable for sharing\n *\n * @param kind The kind of link to get\n * @param expiration Optional, an expiration for this link\n */\n FileFolderShared.prototype.getShareLink = function (kind, expiration) {\n if (kind === void 0) { kind = types_1.SharingLinkKind.OrganizationView; }\n if (expiration === void 0) { expiration = null; }\n var dependency = this.addBatchDependency();\n return this.getShareable().then(function (shareable) {\n dependency();\n return shareable.getShareLink(kind, expiration);\n });\n };\n /**\n * Checks Permissions on the list of Users and returns back role the users have on the Item.\n *\n * @param recipients The array of Entities for which Permissions need to be checked.\n */\n FileFolderShared.prototype.checkSharingPermissions = function (recipients) {\n var dependency = this.addBatchDependency();\n return this.getShareable().then(function (shareable) {\n dependency();\n return shareable.checkPermissions(recipients);\n });\n };\n /**\n * Get Sharing Information.\n *\n * @param request The SharingInformationRequest Object.\n */\n FileFolderShared.prototype.getSharingInformation = function (request) {\n if (request === void 0) { request = null; }\n var dependency = this.addBatchDependency();\n return this.getShareable().then(function (shareable) {\n dependency();\n return shareable.getSharingInformation(request);\n });\n };\n /**\n * Gets the sharing settings of an item.\n *\n * @param useSimplifiedRoles Determines whether to use simplified roles.\n */\n FileFolderShared.prototype.getObjectSharingSettings = function (useSimplifiedRoles) {\n if (useSimplifiedRoles === void 0) { useSimplifiedRoles = true; }\n var dependency = this.addBatchDependency();\n return this.getShareable().then(function (shareable) {\n dependency();\n return shareable.getObjectSharingSettings(useSimplifiedRoles);\n });\n };\n /**\n * Unshare this item\n */\n FileFolderShared.prototype.unshare = function () {\n var dependency = this.addBatchDependency();\n return this.getShareable().then(function (shareable) {\n dependency();\n return shareable.unshareObject();\n });\n };\n /**\n * Deletes a sharing link by the kind of link\n *\n * @param kind The kind of link to be deleted.\n */\n FileFolderShared.prototype.deleteSharingLinkByKind = function (kind) {\n var dependency = this.addBatchDependency();\n return this.getShareable().then(function (shareable) {\n dependency();\n return shareable.deleteLinkByKind(kind);\n });\n };\n /**\n * Removes the specified link to the item.\n *\n * @param kind The kind of link to be deleted.\n * @param shareId The share id to delete\n */\n FileFolderShared.prototype.unshareLink = function (kind, shareId) {\n var dependency = this.addBatchDependency();\n return this.getShareable().then(function (shareable) {\n dependency();\n return shareable.unshareLink(kind, shareId);\n });\n };\n /**\n * For files and folders we need to use the associated item end point\n */\n FileFolderShared.prototype.getShareable = function () {\n var _this = this;\n // sharing only works on the item end point, not the file one - so we create a folder instance with the item url internally\n return this.clone(SharePointQueryableShareableFile, \"listItemAllFields\", false).select(\"odata.editlink\").get().then(function (d) {\n var shareable = new SharePointQueryableShareable(odata_1.spGetEntityUrl(d));\n // we need to handle batching\n if (_this.hasBatch) {\n shareable = shareable.inBatch(_this.batch);\n }\n return shareable;\n });\n };\n return FileFolderShared;\n}(sharepointqueryable_1.SharePointQueryableInstance));\nexports.FileFolderShared = FileFolderShared;\nvar SharePointQueryableShareableFile = /** @class */ (function (_super) {\n __extends(SharePointQueryableShareableFile, _super);\n function SharePointQueryableShareableFile() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n /**\n * Shares this item with one or more users\n *\n * @param loginNames string or string[] of resolved login names to which this item will be shared\n * @param role The role (View | Edit) applied to the share\n * @param shareEverything Share everything in this folder, even items with unique permissions.\n * @param requireSignin If true the user must signin to view link, otherwise anyone with the link can access the resource\n * @param emailData Optional, if inlucded an email will be sent. Note subject currently has no effect.\n */\n SharePointQueryableShareableFile.prototype.shareWith = function (loginNames, role, requireSignin, emailData) {\n if (role === void 0) { role = types_1.SharingRole.View; }\n if (requireSignin === void 0) { requireSignin = false; }\n var dependency = this.addBatchDependency();\n return this.getShareable().then(function (shareable) {\n dependency();\n return shareable.shareWith(loginNames, role, requireSignin, false, emailData);\n });\n };\n return SharePointQueryableShareableFile;\n}(FileFolderShared));\nexports.SharePointQueryableShareableFile = SharePointQueryableShareableFile;\nvar SharePointQueryableShareableFolder = /** @class */ (function (_super) {\n __extends(SharePointQueryableShareableFolder, _super);\n function SharePointQueryableShareableFolder() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n /**\n * Shares this item with one or more users\n *\n * @param loginNames string or string[] of resolved login names to which this item will be shared\n * @param role The role (View | Edit) applied to the share\n * @param shareEverything Share everything in this folder, even items with unique permissions.\n * @param requireSignin If true the user must signin to view link, otherwise anyone with the link can access the resource\n * @param emailData Optional, if inlucded an email will be sent. Note subject currently has no effect.\n */\n SharePointQueryableShareableFolder.prototype.shareWith = function (loginNames, role, requireSignin, shareEverything, emailData) {\n if (role === void 0) { role = types_1.SharingRole.View; }\n if (requireSignin === void 0) { requireSignin = false; }\n if (shareEverything === void 0) { shareEverything = false; }\n var dependency = this.addBatchDependency();\n return this.getShareable().then(function (shareable) {\n dependency();\n return shareable.shareWith(loginNames, role, requireSignin, shareEverything, emailData);\n });\n };\n return SharePointQueryableShareableFolder;\n}(FileFolderShared));\nexports.SharePointQueryableShareableFolder = SharePointQueryableShareableFolder;\n\n\n/***/ }),\n/* 12 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar sharepointqueryable_1 = __webpack_require__(1);\nvar parsers_1 = __webpack_require__(7);\nvar util_1 = __webpack_require__(0);\nvar exceptions_1 = __webpack_require__(4);\nvar webparts_1 = __webpack_require__(41);\nvar items_1 = __webpack_require__(16);\nvar sharepointqueryableshareable_1 = __webpack_require__(11);\nvar odata_1 = __webpack_require__(6);\n/**\n * Describes a collection of File objects\n *\n */\nvar Files = /** @class */ (function (_super) {\n __extends(Files, _super);\n /**\n * Creates a new instance of the Files class\n *\n * @param baseUrl The url or SharePointQueryable which forms the parent of this fields collection\n */\n function Files(baseUrl, path) {\n if (path === void 0) { path = \"files\"; }\n return _super.call(this, baseUrl, path) || this;\n }\n /**\n * Gets a File by filename\n *\n * @param name The name of the file, including extension.\n */\n Files.prototype.getByName = function (name) {\n var f = new File(this);\n f.concat(\"('\" + name + \"')\");\n return f;\n };\n /**\n * Uploads a file. Not supported for batching\n *\n * @param url The folder-relative url of the file.\n * @param content The file contents blob.\n * @param shouldOverWrite Should a file with the same name in the same location be overwritten? (default: true)\n * @returns The new File and the raw response.\n */\n Files.prototype.add = function (url, content, shouldOverWrite) {\n var _this = this;\n if (shouldOverWrite === void 0) { shouldOverWrite = true; }\n return new Files(this, \"add(overwrite=\" + shouldOverWrite + \",url='\" + url + \"')\")\n .postCore({\n body: content,\n }).then(function (response) {\n return {\n data: response,\n file: _this.getByName(url),\n };\n });\n };\n /**\n * Uploads a file. Not supported for batching\n *\n * @param url The folder-relative url of the file.\n * @param content The Blob file content to add\n * @param progress A callback function which can be used to track the progress of the upload\n * @param shouldOverWrite Should a file with the same name in the same location be overwritten? (default: true)\n * @param chunkSize The size of each file slice, in bytes (default: 10485760)\n * @returns The new File and the raw response.\n */\n Files.prototype.addChunked = function (url, content, progress, shouldOverWrite, chunkSize) {\n var _this = this;\n if (shouldOverWrite === void 0) { shouldOverWrite = true; }\n if (chunkSize === void 0) { chunkSize = 10485760; }\n var adder = this.clone(Files, \"add(overwrite=\" + shouldOverWrite + \",url='\" + url + \"')\", false);\n return adder.postCore().then(function () { return _this.getByName(url); }).then(function (file) { return file.setContentChunked(content, progress, chunkSize); }).then(function (response) {\n return {\n data: response,\n file: _this.getByName(url),\n };\n });\n };\n /**\n * Adds a ghosted file to an existing list or document library. Not supported for batching.\n *\n * @param fileUrl The server-relative url where you want to save the file.\n * @param templateFileType The type of use to create the file.\n * @returns The template file that was added and the raw response.\n */\n Files.prototype.addTemplateFile = function (fileUrl, templateFileType) {\n var _this = this;\n return this.clone(Files, \"addTemplateFile(urloffile='\" + fileUrl + \"',templatefiletype=\" + templateFileType + \")\", false)\n .postCore().then(function (response) {\n return {\n data: response,\n file: _this.getByName(fileUrl),\n };\n });\n };\n return Files;\n}(sharepointqueryable_1.SharePointQueryableCollection));\nexports.Files = Files;\n/**\n * Describes a single File instance\n *\n */\nvar File = /** @class */ (function (_super) {\n __extends(File, _super);\n function File() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n Object.defineProperty(File.prototype, \"listItemAllFields\", {\n /**\n * Gets a value that specifies the list item field values for the list item corresponding to the file.\n *\n */\n get: function () {\n return new sharepointqueryable_1.SharePointQueryableCollection(this, \"listItemAllFields\");\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(File.prototype, \"versions\", {\n /**\n * Gets a collection of versions\n *\n */\n get: function () {\n return new Versions(this);\n },\n enumerable: true,\n configurable: true\n });\n /**\n * Approves the file submitted for content approval with the specified comment.\n * Only documents in lists that are enabled for content approval can be approved.\n *\n * @param comment The comment for the approval.\n */\n File.prototype.approve = function (comment) {\n if (comment === void 0) { comment = \"\"; }\n return this.clone(File, \"approve(comment='\" + comment + \"')\").postCore();\n };\n /**\n * Stops the chunk upload session without saving the uploaded data. Does not support batching.\n * If the file doesn’t already exist in the library, the partially uploaded file will be deleted.\n * Use this in response to user action (as in a request to cancel an upload) or an error or exception.\n * Use the uploadId value that was passed to the StartUpload method that started the upload session.\n * This method is currently available only on Office 365.\n *\n * @param uploadId The unique identifier of the upload session.\n */\n File.prototype.cancelUpload = function (uploadId) {\n return this.clone(File, \"cancelUpload(uploadId=guid'\" + uploadId + \"')\", false).postCore();\n };\n /**\n * Checks the file in to a document library based on the check-in type.\n *\n * @param comment A comment for the check-in. Its length must be <= 1023.\n * @param checkinType The check-in type for the file.\n */\n File.prototype.checkin = function (comment, checkinType) {\n if (comment === void 0) { comment = \"\"; }\n if (checkinType === void 0) { checkinType = CheckinType.Major; }\n if (comment.length > 1023) {\n throw new exceptions_1.MaxCommentLengthException();\n }\n return this.clone(File, \"checkin(comment='\" + comment + \"',checkintype=\" + checkinType + \")\").postCore();\n };\n /**\n * Checks out the file from a document library.\n */\n File.prototype.checkout = function () {\n return this.clone(File, \"checkout\").postCore();\n };\n /**\n * Copies the file to the destination url.\n *\n * @param url The absolute url or server relative url of the destination file path to copy to.\n * @param shouldOverWrite Should a file with the same name in the same location be overwritten?\n */\n File.prototype.copyTo = function (url, shouldOverWrite) {\n if (shouldOverWrite === void 0) { shouldOverWrite = true; }\n return this.clone(File, \"copyTo(strnewurl='\" + url + \"',boverwrite=\" + shouldOverWrite + \")\").postCore();\n };\n /**\n * Delete this file.\n *\n * @param eTag Value used in the IF-Match header, by default \"*\"\n */\n File.prototype.delete = function (eTag) {\n if (eTag === void 0) { eTag = \"*\"; }\n return this.clone(File, null).postCore({\n headers: {\n \"IF-Match\": eTag,\n \"X-HTTP-Method\": \"DELETE\",\n },\n });\n };\n /**\n * Denies approval for a file that was submitted for content approval.\n * Only documents in lists that are enabled for content approval can be denied.\n *\n * @param comment The comment for the denial.\n */\n File.prototype.deny = function (comment) {\n if (comment === void 0) { comment = \"\"; }\n if (comment.length > 1023) {\n throw new exceptions_1.MaxCommentLengthException();\n }\n return this.clone(File, \"deny(comment='\" + comment + \"')\").postCore();\n };\n /**\n * Specifies the control set used to access, modify, or add Web Parts associated with this Web Part Page and view.\n * An exception is thrown if the file is not an ASPX page.\n *\n * @param scope The WebPartsPersonalizationScope view on the Web Parts page.\n */\n File.prototype.getLimitedWebPartManager = function (scope) {\n if (scope === void 0) { scope = WebPartsPersonalizationScope.Shared; }\n return new webparts_1.LimitedWebPartManager(this, \"getLimitedWebPartManager(scope=\" + scope + \")\");\n };\n /**\n * Moves the file to the specified destination url.\n *\n * @param url The absolute url or server relative url of the destination file path to move to.\n * @param moveOperations The bitwise MoveOperations value for how to move the file.\n */\n File.prototype.moveTo = function (url, moveOperations) {\n if (moveOperations === void 0) { moveOperations = MoveOperations.Overwrite; }\n return this.clone(File, \"moveTo(newurl='\" + url + \"',flags=\" + moveOperations + \")\").postCore();\n };\n /**\n * Submits the file for content approval with the specified comment.\n *\n * @param comment The comment for the published file. Its length must be <= 1023.\n */\n File.prototype.publish = function (comment) {\n if (comment === void 0) { comment = \"\"; }\n if (comment.length > 1023) {\n throw new exceptions_1.MaxCommentLengthException();\n }\n return this.clone(File, \"publish(comment='\" + comment + \"')\").postCore();\n };\n /**\n * Moves the file to the Recycle Bin and returns the identifier of the new Recycle Bin item.\n *\n * @returns The GUID of the recycled file.\n */\n File.prototype.recycle = function () {\n return this.clone(File, \"recycle\").postCore();\n };\n /**\n * Reverts an existing checkout for the file.\n *\n */\n File.prototype.undoCheckout = function () {\n return this.clone(File, \"undoCheckout\").postCore();\n };\n /**\n * Removes the file from content approval or unpublish a major version.\n *\n * @param comment The comment for the unpublish operation. Its length must be <= 1023.\n */\n File.prototype.unpublish = function (comment) {\n if (comment === void 0) { comment = \"\"; }\n if (comment.length > 1023) {\n throw new exceptions_1.MaxCommentLengthException();\n }\n return this.clone(File, \"unpublish(comment='\" + comment + \"')\").postCore();\n };\n /**\n * Gets the contents of the file as text. Not supported in batching.\n *\n */\n File.prototype.getText = function () {\n return this.clone(File, \"$value\", false).get(new parsers_1.TextFileParser(), { headers: { \"binaryStringResponseBody\": \"true\" } });\n };\n /**\n * Gets the contents of the file as a blob, does not work in Node.js. Not supported in batching.\n *\n */\n File.prototype.getBlob = function () {\n return this.clone(File, \"$value\", false).get(new parsers_1.BlobFileParser(), { headers: { \"binaryStringResponseBody\": \"true\" } });\n };\n /**\n * Gets the contents of a file as an ArrayBuffer, works in Node.js. Not supported in batching.\n */\n File.prototype.getBuffer = function () {\n return this.clone(File, \"$value\", false).get(new parsers_1.BufferFileParser(), { headers: { \"binaryStringResponseBody\": \"true\" } });\n };\n /**\n * Gets the contents of a file as an ArrayBuffer, works in Node.js. Not supported in batching.\n */\n File.prototype.getJSON = function () {\n return this.clone(File, \"$value\", false).get(new parsers_1.JSONFileParser(), { headers: { \"binaryStringResponseBody\": \"true\" } });\n };\n /**\n * Sets the content of a file, for large files use setContentChunked. Not supported in batching.\n *\n * @param content The file content\n *\n */\n File.prototype.setContent = function (content) {\n var _this = this;\n return this.clone(File, \"$value\", false).postCore({\n body: content,\n headers: {\n \"X-HTTP-Method\": \"PUT\",\n },\n }).then(function (_) { return new File(_this); });\n };\n /**\n * Gets the associated list item for this folder, loading the default properties\n */\n File.prototype.getItem = function () {\n var selects = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n selects[_i] = arguments[_i];\n }\n var q = this.listItemAllFields;\n return q.select.apply(q, selects).get().then(function (d) {\n return util_1.Util.extend(new items_1.Item(odata_1.spGetEntityUrl(d)), d);\n });\n };\n /**\n * Sets the contents of a file using a chunked upload approach. Not supported in batching.\n *\n * @param file The file to upload\n * @param progress A callback function which can be used to track the progress of the upload\n * @param chunkSize The size of each file slice, in bytes (default: 10485760)\n */\n File.prototype.setContentChunked = function (file, progress, chunkSize) {\n if (chunkSize === void 0) { chunkSize = 10485760; }\n if (typeof progress === \"undefined\") {\n progress = function () { return null; };\n }\n var self = this;\n var fileSize = file.size;\n var blockCount = parseInt((file.size / chunkSize).toString(), 10) + ((file.size % chunkSize === 0) ? 1 : 0);\n var uploadId = util_1.Util.getGUID();\n // start the chain with the first fragment\n progress({ blockNumber: 1, chunkSize: chunkSize, currentPointer: 0, fileSize: fileSize, stage: \"starting\", totalBlocks: blockCount });\n var chain = self.startUpload(uploadId, file.slice(0, chunkSize));\n var _loop_1 = function (i) {\n chain = chain.then(function (pointer) {\n progress({ blockNumber: i, chunkSize: chunkSize, currentPointer: pointer, fileSize: fileSize, stage: \"continue\", totalBlocks: blockCount });\n return self.continueUpload(uploadId, pointer, file.slice(pointer, pointer + chunkSize));\n });\n };\n // skip the first and last blocks\n for (var i = 2; i < blockCount; i++) {\n _loop_1(i);\n }\n return chain.then(function (pointer) {\n progress({ blockNumber: blockCount, chunkSize: chunkSize, currentPointer: pointer, fileSize: fileSize, stage: \"finishing\", totalBlocks: blockCount });\n return self.finishUpload(uploadId, pointer, file.slice(pointer));\n }).then(function (_) {\n return self;\n });\n };\n /**\n * Starts a new chunk upload session and uploads the first fragment.\n * The current file content is not changed when this method completes.\n * The method is idempotent (and therefore does not change the result) as long as you use the same values for uploadId and stream.\n * The upload session ends either when you use the CancelUpload method or when you successfully\n * complete the upload session by passing the rest of the file contents through the ContinueUpload and FinishUpload methods.\n * The StartUpload and ContinueUpload methods return the size of the running total of uploaded data in bytes,\n * so you can pass those return values to subsequent uses of ContinueUpload and FinishUpload.\n * This method is currently available only on Office 365.\n *\n * @param uploadId The unique identifier of the upload session.\n * @param fragment The file contents.\n * @returns The size of the total uploaded data in bytes.\n */\n File.prototype.startUpload = function (uploadId, fragment) {\n return this.clone(File, \"startUpload(uploadId=guid'\" + uploadId + \"')\", false).postAsCore({ body: fragment }).then(function (n) { return parseFloat(n); });\n };\n /**\n * Continues the chunk upload session with an additional fragment.\n * The current file content is not changed.\n * Use the uploadId value that was passed to the StartUpload method that started the upload session.\n * This method is currently available only on Office 365.\n *\n * @param uploadId The unique identifier of the upload session.\n * @param fileOffset The size of the offset into the file where the fragment starts.\n * @param fragment The file contents.\n * @returns The size of the total uploaded data in bytes.\n */\n File.prototype.continueUpload = function (uploadId, fileOffset, fragment) {\n return this.clone(File, \"continueUpload(uploadId=guid'\" + uploadId + \"',fileOffset=\" + fileOffset + \")\", false).postAsCore({ body: fragment }).then(function (n) { return parseFloat(n); });\n };\n /**\n * Uploads the last file fragment and commits the file. The current file content is changed when this method completes.\n * Use the uploadId value that was passed to the StartUpload method that started the upload session.\n * This method is currently available only on Office 365.\n *\n * @param uploadId The unique identifier of the upload session.\n * @param fileOffset The size of the offset into the file where the fragment starts.\n * @param fragment The file contents.\n * @returns The newly uploaded file.\n */\n File.prototype.finishUpload = function (uploadId, fileOffset, fragment) {\n return this.clone(File, \"finishUpload(uploadId=guid'\" + uploadId + \"',fileOffset=\" + fileOffset + \")\", false)\n .postAsCore({ body: fragment }).then(function (response) {\n return {\n data: response,\n file: new File(response.ServerRelativeUrl),\n };\n });\n };\n return File;\n}(sharepointqueryableshareable_1.SharePointQueryableShareableFile));\nexports.File = File;\n/**\n * Describes a collection of Version objects\n *\n */\nvar Versions = /** @class */ (function (_super) {\n __extends(Versions, _super);\n /**\n * Creates a new instance of the File class\n *\n * @param baseUrl The url or SharePointQueryable which forms the parent of this fields collection\n */\n function Versions(baseUrl, path) {\n if (path === void 0) { path = \"versions\"; }\n return _super.call(this, baseUrl, path) || this;\n }\n /**\n * Gets a version by id\n *\n * @param versionId The id of the version to retrieve\n */\n Versions.prototype.getById = function (versionId) {\n var v = new Version(this);\n v.concat(\"(\" + versionId + \")\");\n return v;\n };\n /**\n * Deletes all the file version objects in the collection.\n *\n */\n Versions.prototype.deleteAll = function () {\n return new Versions(this, \"deleteAll\").postCore();\n };\n /**\n * Deletes the specified version of the file.\n *\n * @param versionId The ID of the file version to delete.\n */\n Versions.prototype.deleteById = function (versionId) {\n return this.clone(Versions, \"deleteById(vid=\" + versionId + \")\").postCore();\n };\n /**\n * Deletes the file version object with the specified version label.\n *\n * @param label The version label of the file version to delete, for example: 1.2\n */\n Versions.prototype.deleteByLabel = function (label) {\n return this.clone(Versions, \"deleteByLabel(versionlabel='\" + label + \"')\").postCore();\n };\n /**\n * Creates a new file version from the file specified by the version label.\n *\n * @param label The version label of the file version to restore, for example: 1.2\n */\n Versions.prototype.restoreByLabel = function (label) {\n return this.clone(Versions, \"restoreByLabel(versionlabel='\" + label + \"')\").postCore();\n };\n return Versions;\n}(sharepointqueryable_1.SharePointQueryableCollection));\nexports.Versions = Versions;\n/**\n * Describes a single Version instance\n *\n */\nvar Version = /** @class */ (function (_super) {\n __extends(Version, _super);\n function Version() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n /**\n * Delete a specific version of a file.\n *\n * @param eTag Value used in the IF-Match header, by default \"*\"\n */\n Version.prototype.delete = function (eTag) {\n if (eTag === void 0) { eTag = \"*\"; }\n return this.postCore({\n headers: {\n \"IF-Match\": eTag,\n \"X-HTTP-Method\": \"DELETE\",\n },\n });\n };\n return Version;\n}(sharepointqueryable_1.SharePointQueryableInstance));\nexports.Version = Version;\nvar CheckinType;\n(function (CheckinType) {\n CheckinType[CheckinType[\"Minor\"] = 0] = \"Minor\";\n CheckinType[CheckinType[\"Major\"] = 1] = \"Major\";\n CheckinType[CheckinType[\"Overwrite\"] = 2] = \"Overwrite\";\n})(CheckinType = exports.CheckinType || (exports.CheckinType = {}));\nvar WebPartsPersonalizationScope;\n(function (WebPartsPersonalizationScope) {\n WebPartsPersonalizationScope[WebPartsPersonalizationScope[\"User\"] = 0] = \"User\";\n WebPartsPersonalizationScope[WebPartsPersonalizationScope[\"Shared\"] = 1] = \"Shared\";\n})(WebPartsPersonalizationScope = exports.WebPartsPersonalizationScope || (exports.WebPartsPersonalizationScope = {}));\nvar MoveOperations;\n(function (MoveOperations) {\n MoveOperations[MoveOperations[\"Overwrite\"] = 1] = \"Overwrite\";\n MoveOperations[MoveOperations[\"AllowBrokenThickets\"] = 8] = \"AllowBrokenThickets\";\n})(MoveOperations = exports.MoveOperations || (exports.MoveOperations = {}));\nvar TemplateFileType;\n(function (TemplateFileType) {\n TemplateFileType[TemplateFileType[\"StandardPage\"] = 0] = \"StandardPage\";\n TemplateFileType[TemplateFileType[\"WikiPage\"] = 1] = \"WikiPage\";\n TemplateFileType[TemplateFileType[\"FormPage\"] = 2] = \"FormPage\";\n})(TemplateFileType = exports.TemplateFileType || (exports.TemplateFileType = {}));\n\n\n/***/ }),\n/* 13 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar exceptions_1 = __webpack_require__(4);\nvar logging_1 = __webpack_require__(3);\nvar ODataParserBase = /** @class */ (function () {\n function ODataParserBase() {\n }\n ODataParserBase.prototype.parse = function (r) {\n var _this = this;\n return new Promise(function (resolve, reject) {\n if (_this.handleError(r, reject)) {\n if ((r.headers.has(\"Content-Length\") && parseFloat(r.headers.get(\"Content-Length\")) === 0) || r.status === 204) {\n resolve({});\n }\n else {\n // patch to handle cases of 200 response with no or whitespace only bodies (#487 & #545)\n r.text()\n .then(function (txt) { return txt.replace(/\\s/ig, \"\").length > 0 ? JSON.parse(txt) : {}; })\n .then(function (json) { return resolve(_this.parseODataJSON(json)); })\n .catch(function (e) { return reject(e); });\n }\n }\n });\n };\n ODataParserBase.prototype.handleError = function (r, reject) {\n if (!r.ok) {\n r.json().then(function (json) {\n // include the headers as they contain diagnostic information\n var data = {\n responseBody: json,\n responseHeaders: r.headers,\n };\n reject(new exceptions_1.ProcessHttpClientResponseException(r.status, r.statusText, data));\n }).catch(function (e) {\n // we failed to read the body - possibly it is empty. Let's report the original status that caused\n // the request to fail and log the error with parsing the body if anyone needs it for debugging\n logging_1.Logger.log({\n data: e,\n level: logging_1.LogLevel.Warning,\n message: \"There was an error parsing the error response body. See data for details.\",\n });\n // include the headers as they contain diagnostic information\n var data = {\n responseBody: \"[[body not available]]\",\n responseHeaders: r.headers,\n };\n reject(new exceptions_1.ProcessHttpClientResponseException(r.status, r.statusText, data));\n });\n }\n return r.ok;\n };\n ODataParserBase.prototype.parseODataJSON = function (json) {\n var result = json;\n if (json.hasOwnProperty(\"d\")) {\n if (json.d.hasOwnProperty(\"results\")) {\n result = json.d.results;\n }\n else {\n result = json.d;\n }\n }\n else if (json.hasOwnProperty(\"value\")) {\n result = json.value;\n }\n return result;\n };\n return ODataParserBase;\n}());\nexports.ODataParserBase = ODataParserBase;\n\n\n/***/ }),\n/* 14 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar caching_1 = __webpack_require__(37);\nvar logging_1 = __webpack_require__(3);\nvar util_1 = __webpack_require__(0);\n/**\n * Resolves the context's result value\n *\n * @param context The current context\n */\nfunction returnResult(context) {\n logging_1.Logger.log({\n data: context.result,\n level: logging_1.LogLevel.Verbose,\n message: \"[\" + context.requestId + \"] (\" + (new Date()).getTime() + \") Returning result, see data property for value.\",\n });\n return Promise.resolve(context.result);\n}\n/**\n * Sets the result on the context\n */\nfunction setResult(context, value) {\n return new Promise(function (resolve) {\n context.result = value;\n context.hasResult = true;\n resolve(context);\n });\n}\nexports.setResult = setResult;\n/**\n * Invokes the next method in the provided context's pipeline\n *\n * @param c The current request context\n */\nfunction next(c) {\n if (c.pipeline.length < 1) {\n return Promise.resolve(c);\n }\n return c.pipeline.shift()(c);\n}\n/**\n * Executes the current request context's pipeline\n *\n * @param context Current context\n */\nfunction pipe(context) {\n return next(context)\n .then(function (ctx) { return returnResult(ctx); })\n .catch(function (e) {\n logging_1.Logger.log({\n data: e,\n level: logging_1.LogLevel.Error,\n message: \"Error in request pipeline: \" + e.message,\n });\n throw e;\n });\n}\nexports.pipe = pipe;\n/**\n * decorator factory applied to methods in the pipeline to control behavior\n */\nfunction requestPipelineMethod(alwaysRun) {\n if (alwaysRun === void 0) { alwaysRun = false; }\n return function (target, propertyKey, descriptor) {\n var method = descriptor.value;\n descriptor.value = function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n // if we have a result already in the pipeline, pass it along and don't call the tagged method\n if (!alwaysRun && args.length > 0 && args[0].hasOwnProperty(\"hasResult\") && args[0].hasResult) {\n logging_1.Logger.write(\"[\" + args[0].requestId + \"] (\" + (new Date()).getTime() + \") Skipping request pipeline method \" + propertyKey + \", existing result in pipeline.\", logging_1.LogLevel.Verbose);\n return Promise.resolve(args[0]);\n }\n // apply the tagged method\n logging_1.Logger.write(\"[\" + args[0].requestId + \"] (\" + (new Date()).getTime() + \") Calling request pipeline method \" + propertyKey + \".\", logging_1.LogLevel.Verbose);\n // then chain the next method in the context's pipeline - allows for dynamic pipeline\n return method.apply(target, args).then(function (ctx) { return next(ctx); });\n };\n };\n}\nexports.requestPipelineMethod = requestPipelineMethod;\n/**\n * Contains the methods used within the request pipeline\n */\nvar PipelineMethods = /** @class */ (function () {\n function PipelineMethods() {\n }\n /**\n * Logs the start of the request\n */\n PipelineMethods.logStart = function (context) {\n return new Promise(function (resolve) {\n logging_1.Logger.log({\n data: logging_1.Logger.activeLogLevel === logging_1.LogLevel.Info ? {} : context,\n level: logging_1.LogLevel.Info,\n message: \"[\" + context.requestId + \"] (\" + (new Date()).getTime() + \") Beginning \" + context.verb + \" request (\" + context.requestAbsoluteUrl + \")\",\n });\n resolve(context);\n });\n };\n /**\n * Handles caching of the request\n */\n PipelineMethods.caching = function (context) {\n return new Promise(function (resolve) {\n // handle caching, if applicable\n if (context.verb === \"GET\" && context.isCached) {\n logging_1.Logger.write(\"[\" + context.requestId + \"] (\" + (new Date()).getTime() + \") Caching is enabled for request, checking cache...\", logging_1.LogLevel.Info);\n var cacheOptions = new caching_1.CachingOptions(context.requestAbsoluteUrl.toLowerCase());\n if (typeof context.cachingOptions !== \"undefined\") {\n cacheOptions = util_1.Util.extend(cacheOptions, context.cachingOptions);\n }\n // we may not have a valid store\n if (cacheOptions.store !== null) {\n // check if we have the data in cache and if so resolve the promise and return\n var data = cacheOptions.store.get(cacheOptions.key);\n if (data !== null) {\n // ensure we clear any help batch dependency we are resolving from the cache\n logging_1.Logger.log({\n data: logging_1.Logger.activeLogLevel === logging_1.LogLevel.Info ? {} : data,\n level: logging_1.LogLevel.Info,\n message: \"[\" + context.requestId + \"] (\" + (new Date()).getTime() + \") Value returned from cache.\",\n });\n context.batchDependency();\n return setResult(context, data).then(function (ctx) { return resolve(ctx); });\n }\n }\n logging_1.Logger.write(\"[\" + context.requestId + \"] (\" + (new Date()).getTime() + \") Value not found in cache.\", logging_1.LogLevel.Info);\n // if we don't then wrap the supplied parser in the caching parser wrapper\n // and send things on their way\n context.parser = new caching_1.CachingParserWrapper(context.parser, cacheOptions);\n }\n return resolve(context);\n });\n };\n /**\n * Sends the request\n */\n PipelineMethods.send = function (context) {\n return new Promise(function (resolve, reject) {\n // send or batch the request\n if (context.isBatched) {\n // we are in a batch, so add to batch, remove dependency, and resolve with the batch's promise\n var p = context.batch.add(context.requestAbsoluteUrl, context.verb, context.options, context.parser);\n // we release the dependency here to ensure the batch does not execute until the request is added to the batch\n context.batchDependency();\n logging_1.Logger.write(\"[\" + context.requestId + \"] (\" + (new Date()).getTime() + \") Batching request in batch \" + context.batch.batchId + \".\", logging_1.LogLevel.Info);\n // we set the result as the promise which will be resolved by the batch's execution\n resolve(setResult(context, p));\n }\n else {\n logging_1.Logger.write(\"[\" + context.requestId + \"] (\" + (new Date()).getTime() + \") Sending request.\", logging_1.LogLevel.Info);\n // we are not part of a batch, so proceed as normal\n var client = context.clientFactory();\n var opts = util_1.Util.extend(context.options || {}, { method: context.verb });\n client.fetch(context.requestAbsoluteUrl, opts)\n .then(function (response) { return context.parser.parse(response); })\n .then(function (result) { return setResult(context, result); })\n .then(function (ctx) { return resolve(ctx); })\n .catch(function (e) { return reject(e); });\n }\n });\n };\n /**\n * Logs the end of the request\n */\n PipelineMethods.logEnd = function (context) {\n return new Promise(function (resolve) {\n if (context.isBatched) {\n logging_1.Logger.log({\n data: logging_1.Logger.activeLogLevel === logging_1.LogLevel.Info ? {} : context,\n level: logging_1.LogLevel.Info,\n message: \"[\" + context.requestId + \"] (\" + (new Date()).getTime() + \") \" + context.verb + \" request will complete in batch \" + context.batch.batchId + \".\",\n });\n }\n else {\n logging_1.Logger.log({\n data: logging_1.Logger.activeLogLevel === logging_1.LogLevel.Info ? {} : context,\n level: logging_1.LogLevel.Info,\n message: \"[\" + context.requestId + \"] (\" + (new Date()).getTime() + \") Completing \" + context.verb + \" request.\",\n });\n }\n resolve(context);\n });\n };\n Object.defineProperty(PipelineMethods, \"default\", {\n get: function () {\n return [\n PipelineMethods.logStart,\n PipelineMethods.caching,\n PipelineMethods.send,\n PipelineMethods.logEnd,\n ];\n },\n enumerable: true,\n configurable: true\n });\n __decorate([\n requestPipelineMethod(true)\n ], PipelineMethods, \"logStart\", null);\n __decorate([\n requestPipelineMethod()\n ], PipelineMethods, \"caching\", null);\n __decorate([\n requestPipelineMethod()\n ], PipelineMethods, \"send\", null);\n __decorate([\n requestPipelineMethod(true)\n ], PipelineMethods, \"logEnd\", null);\n return PipelineMethods;\n}());\nexports.PipelineMethods = PipelineMethods;\n\n\n/***/ }),\n/* 15 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar items_1 = __webpack_require__(16);\nvar views_1 = __webpack_require__(43);\nvar contenttypes_1 = __webpack_require__(20);\nvar fields_1 = __webpack_require__(29);\nvar forms_1 = __webpack_require__(44);\nvar subscriptions_1 = __webpack_require__(45);\nvar sharepointqueryable_1 = __webpack_require__(1);\nvar sharepointqueryablesecurable_1 = __webpack_require__(26);\nvar util_1 = __webpack_require__(0);\nvar usercustomactions_1 = __webpack_require__(21);\nvar odata_1 = __webpack_require__(6);\nvar exceptions_1 = __webpack_require__(4);\nvar folders_1 = __webpack_require__(19);\n/**\n * Describes a collection of List objects\n *\n */\nvar Lists = /** @class */ (function (_super) {\n __extends(Lists, _super);\n /**\n * Creates a new instance of the Lists class\n *\n * @param baseUrl The url or SharePointQueryable which forms the parent of this fields collection\n */\n function Lists(baseUrl, path) {\n if (path === void 0) { path = \"lists\"; }\n return _super.call(this, baseUrl, path) || this;\n }\n /**\n * Gets a list from the collection by title\n *\n * @param title The title of the list\n */\n Lists.prototype.getByTitle = function (title) {\n return new List(this, \"getByTitle('\" + title + \"')\");\n };\n /**\n * Gets a list from the collection by guid id\n *\n * @param id The Id of the list (GUID)\n */\n Lists.prototype.getById = function (id) {\n var list = new List(this);\n list.concat(\"('\" + id + \"')\");\n return list;\n };\n /**\n * Adds a new list to the collection\n *\n * @param title The new list's title\n * @param description The new list's description\n * @param template The list template value\n * @param enableContentTypes If true content types will be allowed and enabled, otherwise they will be disallowed and not enabled\n * @param additionalSettings Will be passed as part of the list creation body\n */\n Lists.prototype.add = function (title, description, template, enableContentTypes, additionalSettings) {\n var _this = this;\n if (description === void 0) { description = \"\"; }\n if (template === void 0) { template = 100; }\n if (enableContentTypes === void 0) { enableContentTypes = false; }\n if (additionalSettings === void 0) { additionalSettings = {}; }\n var addSettings = util_1.Util.extend({\n \"AllowContentTypes\": enableContentTypes,\n \"BaseTemplate\": template,\n \"ContentTypesEnabled\": enableContentTypes,\n \"Description\": description,\n \"Title\": title,\n \"__metadata\": { \"type\": \"SP.List\" },\n }, additionalSettings);\n return this.postCore({ body: JSON.stringify(addSettings) }).then(function (data) {\n return { data: data, list: _this.getByTitle(addSettings.Title) };\n });\n };\n /**\n * Ensures that the specified list exists in the collection (note: this method not supported for batching)\n *\n * @param title The new list's title\n * @param description The new list's description\n * @param template The list template value\n * @param enableContentTypes If true content types will be allowed and enabled, otherwise they will be disallowed and not enabled\n * @param additionalSettings Will be passed as part of the list creation body or used to update an existing list\n */\n Lists.prototype.ensure = function (title, description, template, enableContentTypes, additionalSettings) {\n var _this = this;\n if (description === void 0) { description = \"\"; }\n if (template === void 0) { template = 100; }\n if (enableContentTypes === void 0) { enableContentTypes = false; }\n if (additionalSettings === void 0) { additionalSettings = {}; }\n if (this.hasBatch) {\n throw new exceptions_1.NotSupportedInBatchException(\"The ensure list method\");\n }\n return new Promise(function (resolve, reject) {\n var addOrUpdateSettings = util_1.Util.extend(additionalSettings, { Title: title, Description: description, ContentTypesEnabled: enableContentTypes }, true);\n var list = _this.getByTitle(addOrUpdateSettings.Title);\n list.get().then(function (_) {\n list.update(addOrUpdateSettings).then(function (d) {\n resolve({ created: false, data: d, list: _this.getByTitle(addOrUpdateSettings.Title) });\n }).catch(function (e) { return reject(e); });\n }).catch(function (_) {\n _this.add(title, description, template, enableContentTypes, addOrUpdateSettings).then(function (r) {\n resolve({ created: true, data: r.data, list: _this.getByTitle(addOrUpdateSettings.Title) });\n }).catch(function (e) { return reject(e); });\n });\n });\n };\n /**\n * Gets a list that is the default asset location for images or other files, which the users upload to their wiki pages.\n */\n Lists.prototype.ensureSiteAssetsLibrary = function () {\n return this.clone(Lists, \"ensuresiteassetslibrary\").postCore().then(function (json) {\n return new List(odata_1.spExtractODataId(json));\n });\n };\n /**\n * Gets a list that is the default location for wiki pages.\n */\n Lists.prototype.ensureSitePagesLibrary = function () {\n return this.clone(Lists, \"ensuresitepageslibrary\").postCore().then(function (json) {\n return new List(odata_1.spExtractODataId(json));\n });\n };\n return Lists;\n}(sharepointqueryable_1.SharePointQueryableCollection));\nexports.Lists = Lists;\n/**\n * Describes a single List instance\n *\n */\nvar List = /** @class */ (function (_super) {\n __extends(List, _super);\n function List() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n Object.defineProperty(List.prototype, \"contentTypes\", {\n /**\n * Gets the content types in this list\n *\n */\n get: function () {\n return new contenttypes_1.ContentTypes(this);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(List.prototype, \"items\", {\n /**\n * Gets the items in this list\n *\n */\n get: function () {\n return new items_1.Items(this);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(List.prototype, \"views\", {\n /**\n * Gets the views in this list\n *\n */\n get: function () {\n return new views_1.Views(this);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(List.prototype, \"fields\", {\n /**\n * Gets the fields in this list\n *\n */\n get: function () {\n return new fields_1.Fields(this);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(List.prototype, \"forms\", {\n /**\n * Gets the forms in this list\n *\n */\n get: function () {\n return new forms_1.Forms(this);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(List.prototype, \"defaultView\", {\n /**\n * Gets the default view of this list\n *\n */\n get: function () {\n return new sharepointqueryable_1.SharePointQueryableInstance(this, \"DefaultView\");\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(List.prototype, \"userCustomActions\", {\n /**\n * Get all custom actions on a site collection\n *\n */\n get: function () {\n return new usercustomactions_1.UserCustomActions(this);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(List.prototype, \"effectiveBasePermissions\", {\n /**\n * Gets the effective base permissions of this list\n *\n */\n get: function () {\n return new sharepointqueryable_1.SharePointQueryable(this, \"EffectiveBasePermissions\");\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(List.prototype, \"eventReceivers\", {\n /**\n * Gets the event receivers attached to this list\n *\n */\n get: function () {\n return new sharepointqueryable_1.SharePointQueryableCollection(this, \"EventReceivers\");\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(List.prototype, \"relatedFields\", {\n /**\n * Gets the related fields of this list\n *\n */\n get: function () {\n return new sharepointqueryable_1.SharePointQueryable(this, \"getRelatedFields\");\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(List.prototype, \"informationRightsManagementSettings\", {\n /**\n * Gets the IRM settings for this list\n *\n */\n get: function () {\n return new sharepointqueryable_1.SharePointQueryable(this, \"InformationRightsManagementSettings\");\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(List.prototype, \"subscriptions\", {\n /**\n * Gets the webhook subscriptions of this list\n *\n */\n get: function () {\n return new subscriptions_1.Subscriptions(this);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(List.prototype, \"rootFolder\", {\n /**\n * The root folder of the list\n */\n get: function () {\n return new folders_1.Folder(this, \"rootFolder\");\n },\n enumerable: true,\n configurable: true\n });\n /**\n * Gets a view by view guid id\n *\n */\n List.prototype.getView = function (viewId) {\n return new views_1.View(this, \"getView('\" + viewId + \"')\");\n };\n /**\n * Updates this list intance with the supplied properties\n *\n * @param properties A plain object hash of values to update for the list\n * @param eTag Value used in the IF-Match header, by default \"*\"\n */\n /* tslint:disable no-string-literal */\n List.prototype.update = function (properties, eTag) {\n var _this = this;\n if (eTag === void 0) { eTag = \"*\"; }\n var postBody = JSON.stringify(util_1.Util.extend({\n \"__metadata\": { \"type\": \"SP.List\" },\n }, properties));\n return this.postCore({\n body: postBody,\n headers: {\n \"IF-Match\": eTag,\n \"X-HTTP-Method\": \"MERGE\",\n },\n }).then(function (data) {\n var retList = _this;\n if (properties.hasOwnProperty(\"Title\")) {\n retList = _this.getParent(List, _this.parentUrl, \"getByTitle('\" + properties[\"Title\"] + \"')\");\n }\n return {\n data: data,\n list: retList,\n };\n });\n };\n /* tslint:enable */\n /**\n * Delete this list\n *\n * @param eTag Value used in the IF-Match header, by default \"*\"\n */\n List.prototype.delete = function (eTag) {\n if (eTag === void 0) { eTag = \"*\"; }\n return this.postCore({\n headers: {\n \"IF-Match\": eTag,\n \"X-HTTP-Method\": \"DELETE\",\n },\n });\n };\n /**\n * Returns the collection of changes from the change log that have occurred within the list, based on the specified query.\n */\n List.prototype.getChanges = function (query) {\n return this.clone(List, \"getchanges\").postCore({\n body: JSON.stringify({ \"query\": util_1.Util.extend({ \"__metadata\": { \"type\": \"SP.ChangeQuery\" } }, query) }),\n });\n };\n /**\n * Returns a collection of items from the list based on the specified query.\n *\n * @param CamlQuery The Query schema of Collaborative Application Markup\n * Language (CAML) is used in various ways within the context of Microsoft SharePoint Foundation\n * to define queries against list data.\n * see:\n *\n * https://msdn.microsoft.com/en-us/library/office/ms467521.aspx\n *\n * @param expands A URI with a $expand System Query Option indicates that Entries associated with\n * the Entry or Collection of Entries identified by the Resource Path\n * section of the URI must be represented inline (i.e. eagerly loaded).\n * see:\n *\n * https://msdn.microsoft.com/en-us/library/office/fp142385.aspx\n *\n * http://www.odata.org/documentation/odata-version-2-0/uri-conventions/#ExpandSystemQueryOption\n */\n List.prototype.getItemsByCAMLQuery = function (query) {\n var expands = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n expands[_i - 1] = arguments[_i];\n }\n var q = this.clone(List, \"getitems\");\n return q.expand.apply(q, expands).postCore({\n body: JSON.stringify({ \"query\": util_1.Util.extend({ \"__metadata\": { \"type\": \"SP.CamlQuery\" } }, query) }),\n });\n };\n /**\n * See: https://msdn.microsoft.com/en-us/library/office/dn292554.aspx\n */\n List.prototype.getListItemChangesSinceToken = function (query) {\n return this.clone(List, \"getlistitemchangessincetoken\").postCore({\n body: JSON.stringify({ \"query\": util_1.Util.extend({ \"__metadata\": { \"type\": \"SP.ChangeLogItemQuery\" } }, query) }),\n }, { parse: function (r) { return r.text(); } });\n };\n /**\n * Moves the list to the Recycle Bin and returns the identifier of the new Recycle Bin item.\n */\n List.prototype.recycle = function () {\n return this.clone(List, \"recycle\").postCore().then(function (data) {\n if (data.hasOwnProperty(\"Recycle\")) {\n return data.Recycle;\n }\n else {\n return data;\n }\n });\n };\n /**\n * Renders list data based on the view xml provided\n */\n List.prototype.renderListData = function (viewXml) {\n var q = this.clone(List, \"renderlistdata(@viewXml)\");\n q.query.add(\"@viewXml\", \"'\" + viewXml + \"'\");\n return q.postCore().then(function (data) {\n // data will be a string, so we parse it again\n data = JSON.parse(data);\n if (data.hasOwnProperty(\"RenderListData\")) {\n return data.RenderListData;\n }\n else {\n return data;\n }\n });\n };\n /**\n * Returns the data for the specified query view\n *\n * @param parameters The parameters to be used to render list data as JSON string.\n * @param overrideParameters The parameters that are used to override and extend the regular SPRenderListDataParameters.\n */\n List.prototype.renderListDataAsStream = function (parameters, overrideParameters) {\n if (overrideParameters === void 0) { overrideParameters = null; }\n var postBody = {\n overrideParameters: util_1.Util.extend({\n \"__metadata\": { \"type\": \"SP.RenderListDataOverrideParameters\" },\n }, overrideParameters),\n parameters: util_1.Util.extend({\n \"__metadata\": { \"type\": \"SP.RenderListDataParameters\" },\n }, parameters),\n };\n return this.clone(List, \"RenderListDataAsStream\", true).postCore({\n body: JSON.stringify(postBody),\n });\n };\n /**\n * Gets the field values and field schema attributes for a list item.\n */\n List.prototype.renderListFormData = function (itemId, formId, mode) {\n return this.clone(List, \"renderlistformdata(itemid=\" + itemId + \", formid='\" + formId + \"', mode='\" + mode + \"')\").postCore().then(function (data) {\n // data will be a string, so we parse it again\n data = JSON.parse(data);\n if (data.hasOwnProperty(\"ListData\")) {\n return data.ListData;\n }\n else {\n return data;\n }\n });\n };\n /**\n * Reserves a list item ID for idempotent list item creation.\n */\n List.prototype.reserveListItemId = function () {\n return this.clone(List, \"reservelistitemid\").postCore().then(function (data) {\n if (data.hasOwnProperty(\"ReserveListItemId\")) {\n return data.ReserveListItemId;\n }\n else {\n return data;\n }\n });\n };\n /**\n * Returns the ListItemEntityTypeFullName for this list, used when adding/updating list items. Does not support batching.\n *\n */\n List.prototype.getListItemEntityTypeFullName = function () {\n return this.clone(List, null, false).select(\"ListItemEntityTypeFullName\").getAs().then(function (o) { return o.ListItemEntityTypeFullName; });\n };\n return List;\n}(sharepointqueryablesecurable_1.SharePointQueryableSecurable));\nexports.List = List;\n\n\n/***/ }),\n/* 16 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar sharepointqueryable_1 = __webpack_require__(1);\nvar sharepointqueryableshareable_1 = __webpack_require__(11);\nvar folders_1 = __webpack_require__(19);\nvar files_1 = __webpack_require__(12);\nvar contenttypes_1 = __webpack_require__(20);\nvar util_1 = __webpack_require__(0);\nvar core_1 = __webpack_require__(13);\nvar attachmentfiles_1 = __webpack_require__(42);\nvar lists_1 = __webpack_require__(15);\n/**\n * Describes a collection of Item objects\n *\n */\nvar Items = /** @class */ (function (_super) {\n __extends(Items, _super);\n /**\n * Creates a new instance of the Items class\n *\n * @param baseUrl The url or SharePointQueryable which forms the parent of this fields collection\n */\n function Items(baseUrl, path) {\n if (path === void 0) { path = \"items\"; }\n return _super.call(this, baseUrl, path) || this;\n }\n /**\n * Gets an Item by id\n *\n * @param id The integer id of the item to retrieve\n */\n Items.prototype.getById = function (id) {\n var i = new Item(this);\n i.concat(\"(\" + id + \")\");\n return i;\n };\n /**\n * Skips the specified number of items (https://msdn.microsoft.com/en-us/library/office/fp142385.aspx#sectionSection6)\n *\n * @param skip The starting id where the page should start, use with top to specify pages\n */\n Items.prototype.skip = function (skip) {\n this._query.add(\"$skiptoken\", encodeURIComponent(\"Paged=TRUE&p_ID=\" + skip));\n return this;\n };\n /**\n * Gets a collection designed to aid in paging through data\n *\n */\n Items.prototype.getPaged = function () {\n return this.getAs(new PagedItemCollectionParser());\n };\n //\n /**\n * Adds a new item to the collection\n *\n * @param properties The new items's properties\n */\n Items.prototype.add = function (properties, listItemEntityTypeFullName) {\n var _this = this;\n if (properties === void 0) { properties = {}; }\n if (listItemEntityTypeFullName === void 0) { listItemEntityTypeFullName = null; }\n var removeDependency = this.addBatchDependency();\n return this.ensureListItemEntityTypeName(listItemEntityTypeFullName).then(function (listItemEntityType) {\n var postBody = JSON.stringify(util_1.Util.extend({\n \"__metadata\": { \"type\": listItemEntityType },\n }, properties));\n var promise = _this.clone(Items, null).postAsCore({ body: postBody }).then(function (data) {\n return {\n data: data,\n item: _this.getById(data.Id),\n };\n });\n removeDependency();\n return promise;\n });\n };\n /**\n * Ensures we have the proper list item entity type name, either from the value provided or from the list\n *\n * @param candidatelistItemEntityTypeFullName The potential type name\n */\n Items.prototype.ensureListItemEntityTypeName = function (candidatelistItemEntityTypeFullName) {\n return candidatelistItemEntityTypeFullName ?\n Promise.resolve(candidatelistItemEntityTypeFullName) :\n this.getParent(lists_1.List).getListItemEntityTypeFullName();\n };\n return Items;\n}(sharepointqueryable_1.SharePointQueryableCollection));\nexports.Items = Items;\n/**\n * Descrines a single Item instance\n *\n */\nvar Item = /** @class */ (function (_super) {\n __extends(Item, _super);\n function Item() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n Object.defineProperty(Item.prototype, \"attachmentFiles\", {\n /**\n * Gets the set of attachments for this item\n *\n */\n get: function () {\n return new attachmentfiles_1.AttachmentFiles(this);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Item.prototype, \"contentType\", {\n /**\n * Gets the content type for this item\n *\n */\n get: function () {\n return new contenttypes_1.ContentType(this, \"ContentType\");\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Item.prototype, \"effectiveBasePermissions\", {\n /**\n * Gets the effective base permissions for the item\n *\n */\n get: function () {\n return new sharepointqueryable_1.SharePointQueryable(this, \"EffectiveBasePermissions\");\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Item.prototype, \"effectiveBasePermissionsForUI\", {\n /**\n * Gets the effective base permissions for the item in a UI context\n *\n */\n get: function () {\n return new sharepointqueryable_1.SharePointQueryable(this, \"EffectiveBasePermissionsForUI\");\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Item.prototype, \"fieldValuesAsHTML\", {\n /**\n * Gets the field values for this list item in their HTML representation\n *\n */\n get: function () {\n return new sharepointqueryable_1.SharePointQueryableInstance(this, \"FieldValuesAsHTML\");\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Item.prototype, \"fieldValuesAsText\", {\n /**\n * Gets the field values for this list item in their text representation\n *\n */\n get: function () {\n return new sharepointqueryable_1.SharePointQueryableInstance(this, \"FieldValuesAsText\");\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Item.prototype, \"fieldValuesForEdit\", {\n /**\n * Gets the field values for this list item for use in editing controls\n *\n */\n get: function () {\n return new sharepointqueryable_1.SharePointQueryableInstance(this, \"FieldValuesForEdit\");\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Item.prototype, \"folder\", {\n /**\n * Gets the folder associated with this list item (if this item represents a folder)\n *\n */\n get: function () {\n return new folders_1.Folder(this, \"folder\");\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Item.prototype, \"file\", {\n /**\n * Gets the folder associated with this list item (if this item represents a folder)\n *\n */\n get: function () {\n return new files_1.File(this, \"file\");\n },\n enumerable: true,\n configurable: true\n });\n /**\n * Updates this list intance with the supplied properties\n *\n * @param properties A plain object hash of values to update for the list\n * @param eTag Value used in the IF-Match header, by default \"*\"\n */\n Item.prototype.update = function (properties, eTag, listItemEntityTypeFullName) {\n var _this = this;\n if (eTag === void 0) { eTag = \"*\"; }\n if (listItemEntityTypeFullName === void 0) { listItemEntityTypeFullName = null; }\n return new Promise(function (resolve, reject) {\n var removeDependency = _this.addBatchDependency();\n return _this.ensureListItemEntityTypeName(listItemEntityTypeFullName).then(function (listItemEntityType) {\n var postBody = JSON.stringify(util_1.Util.extend({\n \"__metadata\": { \"type\": listItemEntityType },\n }, properties));\n removeDependency();\n return _this.postCore({\n body: postBody,\n headers: {\n \"IF-Match\": eTag,\n \"X-HTTP-Method\": \"MERGE\",\n },\n }, new ItemUpdatedParser()).then(function (data) {\n resolve({\n data: data,\n item: _this,\n });\n });\n }).catch(function (e) { return reject(e); });\n });\n };\n /**\n * Delete this item\n *\n * @param eTag Value used in the IF-Match header, by default \"*\"\n */\n Item.prototype.delete = function (eTag) {\n if (eTag === void 0) { eTag = \"*\"; }\n return this.postCore({\n headers: {\n \"IF-Match\": eTag,\n \"X-HTTP-Method\": \"DELETE\",\n },\n });\n };\n /**\n * Moves the list item to the Recycle Bin and returns the identifier of the new Recycle Bin item.\n */\n Item.prototype.recycle = function () {\n return this.clone(Item, \"recycle\").postCore();\n };\n /**\n * Gets a string representation of the full URL to the WOPI frame.\n * If there is no associated WOPI application, or no associated action, an empty string is returned.\n *\n * @param action Display mode: 0: view, 1: edit, 2: mobileView, 3: interactivePreview\n */\n Item.prototype.getWopiFrameUrl = function (action) {\n if (action === void 0) { action = 0; }\n var i = this.clone(Item, \"getWOPIFrameUrl(@action)\");\n i._query.add(\"@action\", action);\n return i.postCore().then(function (data) {\n // handle verbose mode\n if (data.hasOwnProperty(\"GetWOPIFrameUrl\")) {\n return data.GetWOPIFrameUrl;\n }\n return data;\n });\n };\n /**\n * Validates and sets the values of the specified collection of fields for the list item.\n *\n * @param formValues The fields to change and their new values.\n * @param newDocumentUpdate true if the list item is a document being updated after upload; otherwise false.\n */\n Item.prototype.validateUpdateListItem = function (formValues, newDocumentUpdate) {\n if (newDocumentUpdate === void 0) { newDocumentUpdate = false; }\n return this.clone(Item, \"validateupdatelistitem\").postCore({\n body: JSON.stringify({ \"formValues\": formValues, bNewDocumentUpdate: newDocumentUpdate }),\n });\n };\n /**\n * Ensures we have the proper list item entity type name, either from the value provided or from the list\n *\n * @param candidatelistItemEntityTypeFullName The potential type name\n */\n Item.prototype.ensureListItemEntityTypeName = function (candidatelistItemEntityTypeFullName) {\n return candidatelistItemEntityTypeFullName ?\n Promise.resolve(candidatelistItemEntityTypeFullName) :\n this.getParent(lists_1.List, this.parentUrl.substr(0, this.parentUrl.lastIndexOf(\"/\"))).getListItemEntityTypeFullName();\n };\n return Item;\n}(sharepointqueryableshareable_1.SharePointQueryableShareableItem));\nexports.Item = Item;\n/**\n * Provides paging functionality for list items\n */\nvar PagedItemCollection = /** @class */ (function () {\n function PagedItemCollection(nextUrl, results) {\n this.nextUrl = nextUrl;\n this.results = results;\n }\n Object.defineProperty(PagedItemCollection.prototype, \"hasNext\", {\n /**\n * If true there are more results available in the set, otherwise there are not\n */\n get: function () {\n return typeof this.nextUrl === \"string\" && this.nextUrl.length > 0;\n },\n enumerable: true,\n configurable: true\n });\n /**\n * Gets the next set of results, or resolves to null if no results are available\n */\n PagedItemCollection.prototype.getNext = function () {\n if (this.hasNext) {\n var items = new Items(this.nextUrl, null);\n return items.getPaged();\n }\n return new Promise(function (r) { return r(null); });\n };\n return PagedItemCollection;\n}());\nexports.PagedItemCollection = PagedItemCollection;\nvar PagedItemCollectionParser = /** @class */ (function (_super) {\n __extends(PagedItemCollectionParser, _super);\n function PagedItemCollectionParser() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n PagedItemCollectionParser.prototype.parse = function (r) {\n var _this = this;\n return new Promise(function (resolve, reject) {\n if (_this.handleError(r, reject)) {\n r.json().then(function (json) {\n var nextUrl = json.hasOwnProperty(\"d\") && json.d.hasOwnProperty(\"__next\") ? json.d.__next : json[\"odata.nextLink\"];\n resolve(new PagedItemCollection(nextUrl, _this.parseODataJSON(json)));\n });\n }\n });\n };\n return PagedItemCollectionParser;\n}(core_1.ODataParserBase));\nvar ItemUpdatedParser = /** @class */ (function (_super) {\n __extends(ItemUpdatedParser, _super);\n function ItemUpdatedParser() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n ItemUpdatedParser.prototype.parse = function (r) {\n var _this = this;\n return new Promise(function (resolve, reject) {\n if (_this.handleError(r, reject)) {\n resolve({\n \"odata.etag\": r.headers.get(\"etag\"),\n });\n }\n });\n };\n return ItemUpdatedParser;\n}(core_1.ODataParserBase));\n\n\n/***/ }),\n/* 17 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar sharepointqueryable_1 = __webpack_require__(1);\nvar siteusers_1 = __webpack_require__(28);\nvar util_1 = __webpack_require__(0);\n/**\n * Principal Type enum\n *\n */\nvar PrincipalType;\n(function (PrincipalType) {\n PrincipalType[PrincipalType[\"None\"] = 0] = \"None\";\n PrincipalType[PrincipalType[\"User\"] = 1] = \"User\";\n PrincipalType[PrincipalType[\"DistributionList\"] = 2] = \"DistributionList\";\n PrincipalType[PrincipalType[\"SecurityGroup\"] = 4] = \"SecurityGroup\";\n PrincipalType[PrincipalType[\"SharePointGroup\"] = 8] = \"SharePointGroup\";\n PrincipalType[PrincipalType[\"All\"] = 15] = \"All\";\n})(PrincipalType = exports.PrincipalType || (exports.PrincipalType = {}));\n/**\n * Describes a collection of site groups\n *\n */\nvar SiteGroups = /** @class */ (function (_super) {\n __extends(SiteGroups, _super);\n /**\n * Creates a new instance of the SiteGroups class\n *\n * @param baseUrl The url or SharePointQueryable which forms the parent of this group collection\n */\n function SiteGroups(baseUrl, path) {\n if (path === void 0) { path = \"sitegroups\"; }\n return _super.call(this, baseUrl, path) || this;\n }\n /**\n * Adds a new group to the site collection\n *\n * @param props The group properties object of property names and values to be set for the group\n */\n SiteGroups.prototype.add = function (properties) {\n var _this = this;\n var postBody = JSON.stringify(util_1.Util.extend({ \"__metadata\": { \"type\": \"SP.Group\" } }, properties));\n return this.postCore({ body: postBody }).then(function (data) {\n return {\n data: data,\n group: _this.getById(data.Id),\n };\n });\n };\n /**\n * Gets a group from the collection by name\n *\n * @param groupName The name of the group to retrieve\n */\n SiteGroups.prototype.getByName = function (groupName) {\n return new SiteGroup(this, \"getByName('\" + groupName + \"')\");\n };\n /**\n * Gets a group from the collection by id\n *\n * @param id The id of the group to retrieve\n */\n SiteGroups.prototype.getById = function (id) {\n var sg = new SiteGroup(this);\n sg.concat(\"(\" + id + \")\");\n return sg;\n };\n /**\n * Removes the group with the specified member id from the collection\n *\n * @param id The id of the group to remove\n */\n SiteGroups.prototype.removeById = function (id) {\n return this.clone(SiteGroups, \"removeById('\" + id + \"')\").postCore();\n };\n /**\n * Removes the cross-site group with the specified name from the collection\n *\n * @param loginName The name of the group to remove\n */\n SiteGroups.prototype.removeByLoginName = function (loginName) {\n return this.clone(SiteGroups, \"removeByLoginName('\" + loginName + \"')\").postCore();\n };\n return SiteGroups;\n}(sharepointqueryable_1.SharePointQueryableCollection));\nexports.SiteGroups = SiteGroups;\n/**\n * Describes a single group\n *\n */\nvar SiteGroup = /** @class */ (function (_super) {\n __extends(SiteGroup, _super);\n function SiteGroup() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n Object.defineProperty(SiteGroup.prototype, \"users\", {\n /**\n * Gets the users for this group\n *\n */\n get: function () {\n return new siteusers_1.SiteUsers(this, \"users\");\n },\n enumerable: true,\n configurable: true\n });\n /**\n * Updates this group instance with the supplied properties\n *\n * @param properties A GroupWriteableProperties object of property names and values to update for the group\n */\n /* tslint:disable no-string-literal */\n SiteGroup.prototype.update = function (properties) {\n var _this = this;\n var postBody = util_1.Util.extend({ \"__metadata\": { \"type\": \"SP.Group\" } }, properties);\n return this.postCore({\n body: JSON.stringify(postBody),\n headers: {\n \"X-HTTP-Method\": \"MERGE\",\n },\n }).then(function (data) {\n var retGroup = _this;\n if (properties.hasOwnProperty(\"Title\")) {\n retGroup = _this.getParent(SiteGroup, _this.parentUrl, \"getByName('\" + properties[\"Title\"] + \"')\");\n }\n return {\n data: data,\n group: retGroup,\n };\n });\n };\n return SiteGroup;\n}(sharepointqueryable_1.SharePointQueryableInstance));\nexports.SiteGroup = SiteGroup;\n\n\n/***/ }),\n/* 18 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\n/**\n * Determines the display mode of the given control or view\n */\nvar ControlMode;\n(function (ControlMode) {\n ControlMode[ControlMode[\"Display\"] = 1] = \"Display\";\n ControlMode[ControlMode[\"Edit\"] = 2] = \"Edit\";\n ControlMode[ControlMode[\"New\"] = 3] = \"New\";\n})(ControlMode = exports.ControlMode || (exports.ControlMode = {}));\n/**\n * Specifies the type of the field.\n */\nvar FieldTypes;\n(function (FieldTypes) {\n FieldTypes[FieldTypes[\"Invalid\"] = 0] = \"Invalid\";\n FieldTypes[FieldTypes[\"Integer\"] = 1] = \"Integer\";\n FieldTypes[FieldTypes[\"Text\"] = 2] = \"Text\";\n FieldTypes[FieldTypes[\"Note\"] = 3] = \"Note\";\n FieldTypes[FieldTypes[\"DateTime\"] = 4] = \"DateTime\";\n FieldTypes[FieldTypes[\"Counter\"] = 5] = \"Counter\";\n FieldTypes[FieldTypes[\"Choice\"] = 6] = \"Choice\";\n FieldTypes[FieldTypes[\"Lookup\"] = 7] = \"Lookup\";\n FieldTypes[FieldTypes[\"Boolean\"] = 8] = \"Boolean\";\n FieldTypes[FieldTypes[\"Number\"] = 9] = \"Number\";\n FieldTypes[FieldTypes[\"Currency\"] = 10] = \"Currency\";\n FieldTypes[FieldTypes[\"URL\"] = 11] = \"URL\";\n FieldTypes[FieldTypes[\"Computed\"] = 12] = \"Computed\";\n FieldTypes[FieldTypes[\"Threading\"] = 13] = \"Threading\";\n FieldTypes[FieldTypes[\"Guid\"] = 14] = \"Guid\";\n FieldTypes[FieldTypes[\"MultiChoice\"] = 15] = \"MultiChoice\";\n FieldTypes[FieldTypes[\"GridChoice\"] = 16] = \"GridChoice\";\n FieldTypes[FieldTypes[\"Calculated\"] = 17] = \"Calculated\";\n FieldTypes[FieldTypes[\"File\"] = 18] = \"File\";\n FieldTypes[FieldTypes[\"Attachments\"] = 19] = \"Attachments\";\n FieldTypes[FieldTypes[\"User\"] = 20] = \"User\";\n FieldTypes[FieldTypes[\"Recurrence\"] = 21] = \"Recurrence\";\n FieldTypes[FieldTypes[\"CrossProjectLink\"] = 22] = \"CrossProjectLink\";\n FieldTypes[FieldTypes[\"ModStat\"] = 23] = \"ModStat\";\n FieldTypes[FieldTypes[\"Error\"] = 24] = \"Error\";\n FieldTypes[FieldTypes[\"ContentTypeId\"] = 25] = \"ContentTypeId\";\n FieldTypes[FieldTypes[\"PageSeparator\"] = 26] = \"PageSeparator\";\n FieldTypes[FieldTypes[\"ThreadIndex\"] = 27] = \"ThreadIndex\";\n FieldTypes[FieldTypes[\"WorkflowStatus\"] = 28] = \"WorkflowStatus\";\n FieldTypes[FieldTypes[\"AllDayEvent\"] = 29] = \"AllDayEvent\";\n FieldTypes[FieldTypes[\"WorkflowEventType\"] = 30] = \"WorkflowEventType\";\n})(FieldTypes = exports.FieldTypes || (exports.FieldTypes = {}));\nvar DateTimeFieldFormatType;\n(function (DateTimeFieldFormatType) {\n DateTimeFieldFormatType[DateTimeFieldFormatType[\"DateOnly\"] = 0] = \"DateOnly\";\n DateTimeFieldFormatType[DateTimeFieldFormatType[\"DateTime\"] = 1] = \"DateTime\";\n})(DateTimeFieldFormatType = exports.DateTimeFieldFormatType || (exports.DateTimeFieldFormatType = {}));\n/**\n * Specifies the control settings while adding a field.\n */\nvar AddFieldOptions;\n(function (AddFieldOptions) {\n /**\n * Specify that a new field added to the list must also be added to the default content type in the site collection\n */\n AddFieldOptions[AddFieldOptions[\"DefaultValue\"] = 0] = \"DefaultValue\";\n /**\n * Specify that a new field added to the list must also be added to the default content type in the site collection.\n */\n AddFieldOptions[AddFieldOptions[\"AddToDefaultContentType\"] = 1] = \"AddToDefaultContentType\";\n /**\n * Specify that a new field must not be added to any other content type\n */\n AddFieldOptions[AddFieldOptions[\"AddToNoContentType\"] = 2] = \"AddToNoContentType\";\n /**\n * Specify that a new field that is added to the specified list must also be added to all content types in the site collection\n */\n AddFieldOptions[AddFieldOptions[\"AddToAllContentTypes\"] = 4] = \"AddToAllContentTypes\";\n /**\n * Specify adding an internal field name hint for the purpose of avoiding possible database locking or field renaming operations\n */\n AddFieldOptions[AddFieldOptions[\"AddFieldInternalNameHint\"] = 8] = \"AddFieldInternalNameHint\";\n /**\n * Specify that a new field that is added to the specified list must also be added to the default list view\n */\n AddFieldOptions[AddFieldOptions[\"AddFieldToDefaultView\"] = 16] = \"AddFieldToDefaultView\";\n /**\n * Specify to confirm that no other field has the same display name\n */\n AddFieldOptions[AddFieldOptions[\"AddFieldCheckDisplayName\"] = 32] = \"AddFieldCheckDisplayName\";\n})(AddFieldOptions = exports.AddFieldOptions || (exports.AddFieldOptions = {}));\nvar CalendarType;\n(function (CalendarType) {\n CalendarType[CalendarType[\"Gregorian\"] = 1] = \"Gregorian\";\n CalendarType[CalendarType[\"Japan\"] = 3] = \"Japan\";\n CalendarType[CalendarType[\"Taiwan\"] = 4] = \"Taiwan\";\n CalendarType[CalendarType[\"Korea\"] = 5] = \"Korea\";\n CalendarType[CalendarType[\"Hijri\"] = 6] = \"Hijri\";\n CalendarType[CalendarType[\"Thai\"] = 7] = \"Thai\";\n CalendarType[CalendarType[\"Hebrew\"] = 8] = \"Hebrew\";\n CalendarType[CalendarType[\"GregorianMEFrench\"] = 9] = \"GregorianMEFrench\";\n CalendarType[CalendarType[\"GregorianArabic\"] = 10] = \"GregorianArabic\";\n CalendarType[CalendarType[\"GregorianXLITEnglish\"] = 11] = \"GregorianXLITEnglish\";\n CalendarType[CalendarType[\"GregorianXLITFrench\"] = 12] = \"GregorianXLITFrench\";\n CalendarType[CalendarType[\"KoreaJapanLunar\"] = 14] = \"KoreaJapanLunar\";\n CalendarType[CalendarType[\"ChineseLunar\"] = 15] = \"ChineseLunar\";\n CalendarType[CalendarType[\"SakaEra\"] = 16] = \"SakaEra\";\n CalendarType[CalendarType[\"UmAlQura\"] = 23] = \"UmAlQura\";\n})(CalendarType = exports.CalendarType || (exports.CalendarType = {}));\nvar UrlFieldFormatType;\n(function (UrlFieldFormatType) {\n UrlFieldFormatType[UrlFieldFormatType[\"Hyperlink\"] = 0] = \"Hyperlink\";\n UrlFieldFormatType[UrlFieldFormatType[\"Image\"] = 1] = \"Image\";\n})(UrlFieldFormatType = exports.UrlFieldFormatType || (exports.UrlFieldFormatType = {}));\nvar PermissionKind;\n(function (PermissionKind) {\n /**\n * Has no permissions on the Site. Not available through the user interface.\n */\n PermissionKind[PermissionKind[\"EmptyMask\"] = 0] = \"EmptyMask\";\n /**\n * View items in lists, documents in document libraries, and Web discussion comments.\n */\n PermissionKind[PermissionKind[\"ViewListItems\"] = 1] = \"ViewListItems\";\n /**\n * Add items to lists, documents to document libraries, and Web discussion comments.\n */\n PermissionKind[PermissionKind[\"AddListItems\"] = 2] = \"AddListItems\";\n /**\n * Edit items in lists, edit documents in document libraries, edit Web discussion comments\n * in documents, and customize Web Part Pages in document libraries.\n */\n PermissionKind[PermissionKind[\"EditListItems\"] = 3] = \"EditListItems\";\n /**\n * Delete items from a list, documents from a document library, and Web discussion\n * comments in documents.\n */\n PermissionKind[PermissionKind[\"DeleteListItems\"] = 4] = \"DeleteListItems\";\n /**\n * Approve a minor version of a list item or document.\n */\n PermissionKind[PermissionKind[\"ApproveItems\"] = 5] = \"ApproveItems\";\n /**\n * View the source of documents with server-side file handlers.\n */\n PermissionKind[PermissionKind[\"OpenItems\"] = 6] = \"OpenItems\";\n /**\n * View past versions of a list item or document.\n */\n PermissionKind[PermissionKind[\"ViewVersions\"] = 7] = \"ViewVersions\";\n /**\n * Delete past versions of a list item or document.\n */\n PermissionKind[PermissionKind[\"DeleteVersions\"] = 8] = \"DeleteVersions\";\n /**\n * Discard or check in a document which is checked out to another user.\n */\n PermissionKind[PermissionKind[\"CancelCheckout\"] = 9] = \"CancelCheckout\";\n /**\n * Create, change, and delete personal views of lists.\n */\n PermissionKind[PermissionKind[\"ManagePersonalViews\"] = 10] = \"ManagePersonalViews\";\n /**\n * Create and delete lists, add or remove columns in a list, and add or remove public views of a list.\n */\n PermissionKind[PermissionKind[\"ManageLists\"] = 12] = \"ManageLists\";\n /**\n * View forms, views, and application pages, and enumerate lists.\n */\n PermissionKind[PermissionKind[\"ViewFormPages\"] = 13] = \"ViewFormPages\";\n /**\n * Make content of a list or document library retrieveable for anonymous users through SharePoint search.\n * The list permissions in the site do not change.\n */\n PermissionKind[PermissionKind[\"AnonymousSearchAccessList\"] = 14] = \"AnonymousSearchAccessList\";\n /**\n * Allow users to open a Site, list, or folder to access items inside that container.\n */\n PermissionKind[PermissionKind[\"Open\"] = 17] = \"Open\";\n /**\n * View pages in a Site.\n */\n PermissionKind[PermissionKind[\"ViewPages\"] = 18] = \"ViewPages\";\n /**\n * Add, change, or delete HTML pages or Web Part Pages, and edit the Site using\n * a Windows SharePoint Services compatible editor.\n */\n PermissionKind[PermissionKind[\"AddAndCustomizePages\"] = 19] = \"AddAndCustomizePages\";\n /**\n * Apply a theme or borders to the entire Site.\n */\n PermissionKind[PermissionKind[\"ApplyThemeAndBorder\"] = 20] = \"ApplyThemeAndBorder\";\n /**\n * Apply a style sheet (.css file) to the Site.\n */\n PermissionKind[PermissionKind[\"ApplyStyleSheets\"] = 21] = \"ApplyStyleSheets\";\n /**\n * View reports on Site usage.\n */\n PermissionKind[PermissionKind[\"ViewUsageData\"] = 22] = \"ViewUsageData\";\n /**\n * Create a Site using Self-Service Site Creation.\n */\n PermissionKind[PermissionKind[\"CreateSSCSite\"] = 23] = \"CreateSSCSite\";\n /**\n * Create subsites such as team sites, Meeting Workspace sites, and Document Workspace sites.\n */\n PermissionKind[PermissionKind[\"ManageSubwebs\"] = 24] = \"ManageSubwebs\";\n /**\n * Create a group of users that can be used anywhere within the site collection.\n */\n PermissionKind[PermissionKind[\"CreateGroups\"] = 25] = \"CreateGroups\";\n /**\n * Create and change permission levels on the Site and assign permissions to users\n * and groups.\n */\n PermissionKind[PermissionKind[\"ManagePermissions\"] = 26] = \"ManagePermissions\";\n /**\n * Enumerate files and folders in a Site using Microsoft Office SharePoint Designer\n * and WebDAV interfaces.\n */\n PermissionKind[PermissionKind[\"BrowseDirectories\"] = 27] = \"BrowseDirectories\";\n /**\n * View information about users of the Site.\n */\n PermissionKind[PermissionKind[\"BrowseUserInfo\"] = 28] = \"BrowseUserInfo\";\n /**\n * Add or remove personal Web Parts on a Web Part Page.\n */\n PermissionKind[PermissionKind[\"AddDelPrivateWebParts\"] = 29] = \"AddDelPrivateWebParts\";\n /**\n * Update Web Parts to display personalized information.\n */\n PermissionKind[PermissionKind[\"UpdatePersonalWebParts\"] = 30] = \"UpdatePersonalWebParts\";\n /**\n * Grant the ability to perform all administration tasks for the Site as well as\n * manage content, activate, deactivate, or edit properties of Site scoped Features\n * through the object model or through the user interface (UI). When granted on the\n * root Site of a Site Collection, activate, deactivate, or edit properties of\n * site collection scoped Features through the object model. To browse to the Site\n * Collection Features page and activate or deactivate Site Collection scoped Features\n * through the UI, you must be a Site Collection administrator.\n */\n PermissionKind[PermissionKind[\"ManageWeb\"] = 31] = \"ManageWeb\";\n /**\n * Content of lists and document libraries in the Web site will be retrieveable for anonymous users through\n * SharePoint search if the list or document library has AnonymousSearchAccessList set.\n */\n PermissionKind[PermissionKind[\"AnonymousSearchAccessWebLists\"] = 32] = \"AnonymousSearchAccessWebLists\";\n /**\n * Use features that launch client applications. Otherwise, users must work on documents\n * locally and upload changes.\n */\n PermissionKind[PermissionKind[\"UseClientIntegration\"] = 37] = \"UseClientIntegration\";\n /**\n * Use SOAP, WebDAV, or Microsoft Office SharePoint Designer interfaces to access the Site.\n */\n PermissionKind[PermissionKind[\"UseRemoteAPIs\"] = 38] = \"UseRemoteAPIs\";\n /**\n * Manage alerts for all users of the Site.\n */\n PermissionKind[PermissionKind[\"ManageAlerts\"] = 39] = \"ManageAlerts\";\n /**\n * Create e-mail alerts.\n */\n PermissionKind[PermissionKind[\"CreateAlerts\"] = 40] = \"CreateAlerts\";\n /**\n * Allows a user to change his or her user information, such as adding a picture.\n */\n PermissionKind[PermissionKind[\"EditMyUserInfo\"] = 41] = \"EditMyUserInfo\";\n /**\n * Enumerate permissions on Site, list, folder, document, or list item.\n */\n PermissionKind[PermissionKind[\"EnumeratePermissions\"] = 63] = \"EnumeratePermissions\";\n /**\n * Has all permissions on the Site. Not available through the user interface.\n */\n PermissionKind[PermissionKind[\"FullMask\"] = 65] = \"FullMask\";\n})(PermissionKind = exports.PermissionKind || (exports.PermissionKind = {}));\nvar PrincipalType;\n(function (PrincipalType) {\n PrincipalType[PrincipalType[\"None\"] = 0] = \"None\";\n PrincipalType[PrincipalType[\"User\"] = 1] = \"User\";\n PrincipalType[PrincipalType[\"DistributionList\"] = 2] = \"DistributionList\";\n PrincipalType[PrincipalType[\"SecurityGroup\"] = 4] = \"SecurityGroup\";\n PrincipalType[PrincipalType[\"SharePointGroup\"] = 8] = \"SharePointGroup\";\n PrincipalType[PrincipalType[\"All\"] = 15] = \"All\";\n})(PrincipalType = exports.PrincipalType || (exports.PrincipalType = {}));\nvar PrincipalSource;\n(function (PrincipalSource) {\n PrincipalSource[PrincipalSource[\"None\"] = 0] = \"None\";\n PrincipalSource[PrincipalSource[\"UserInfoList\"] = 1] = \"UserInfoList\";\n PrincipalSource[PrincipalSource[\"Windows\"] = 2] = \"Windows\";\n PrincipalSource[PrincipalSource[\"MembershipProvider\"] = 4] = \"MembershipProvider\";\n PrincipalSource[PrincipalSource[\"RoleProvider\"] = 8] = \"RoleProvider\";\n PrincipalSource[PrincipalSource[\"All\"] = 15] = \"All\";\n})(PrincipalSource = exports.PrincipalSource || (exports.PrincipalSource = {}));\nvar RoleType;\n(function (RoleType) {\n RoleType[RoleType[\"None\"] = 0] = \"None\";\n RoleType[RoleType[\"Guest\"] = 1] = \"Guest\";\n RoleType[RoleType[\"Reader\"] = 2] = \"Reader\";\n RoleType[RoleType[\"Contributor\"] = 3] = \"Contributor\";\n RoleType[RoleType[\"WebDesigner\"] = 4] = \"WebDesigner\";\n RoleType[RoleType[\"Administrator\"] = 5] = \"Administrator\";\n})(RoleType = exports.RoleType || (exports.RoleType = {}));\nvar PageType;\n(function (PageType) {\n PageType[PageType[\"Invalid\"] = -1] = \"Invalid\";\n PageType[PageType[\"DefaultView\"] = 0] = \"DefaultView\";\n PageType[PageType[\"NormalView\"] = 1] = \"NormalView\";\n PageType[PageType[\"DialogView\"] = 2] = \"DialogView\";\n PageType[PageType[\"View\"] = 3] = \"View\";\n PageType[PageType[\"DisplayForm\"] = 4] = \"DisplayForm\";\n PageType[PageType[\"DisplayFormDialog\"] = 5] = \"DisplayFormDialog\";\n PageType[PageType[\"EditForm\"] = 6] = \"EditForm\";\n PageType[PageType[\"EditFormDialog\"] = 7] = \"EditFormDialog\";\n PageType[PageType[\"NewForm\"] = 8] = \"NewForm\";\n PageType[PageType[\"NewFormDialog\"] = 9] = \"NewFormDialog\";\n PageType[PageType[\"SolutionForm\"] = 10] = \"SolutionForm\";\n PageType[PageType[\"PAGE_MAXITEMS\"] = 11] = \"PAGE_MAXITEMS\";\n})(PageType = exports.PageType || (exports.PageType = {}));\nvar SharingLinkKind;\n(function (SharingLinkKind) {\n /**\n * Uninitialized link\n */\n SharingLinkKind[SharingLinkKind[\"Uninitialized\"] = 0] = \"Uninitialized\";\n /**\n * Direct link to the object being shared\n */\n SharingLinkKind[SharingLinkKind[\"Direct\"] = 1] = \"Direct\";\n /**\n * Organization-shareable link to the object being shared with view permissions\n */\n SharingLinkKind[SharingLinkKind[\"OrganizationView\"] = 2] = \"OrganizationView\";\n /**\n * Organization-shareable link to the object being shared with edit permissions\n */\n SharingLinkKind[SharingLinkKind[\"OrganizationEdit\"] = 3] = \"OrganizationEdit\";\n /**\n * View only anonymous link\n */\n SharingLinkKind[SharingLinkKind[\"AnonymousView\"] = 4] = \"AnonymousView\";\n /**\n * Read/Write anonymous link\n */\n SharingLinkKind[SharingLinkKind[\"AnonymousEdit\"] = 5] = \"AnonymousEdit\";\n /**\n * Flexible sharing Link where properties can change without affecting link URL\n */\n SharingLinkKind[SharingLinkKind[\"Flexible\"] = 6] = \"Flexible\";\n})(SharingLinkKind = exports.SharingLinkKind || (exports.SharingLinkKind = {}));\n/**\n * Indicates the role of the sharing link\n */\nvar SharingRole;\n(function (SharingRole) {\n SharingRole[SharingRole[\"None\"] = 0] = \"None\";\n SharingRole[SharingRole[\"View\"] = 1] = \"View\";\n SharingRole[SharingRole[\"Edit\"] = 2] = \"Edit\";\n SharingRole[SharingRole[\"Owner\"] = 3] = \"Owner\";\n})(SharingRole = exports.SharingRole || (exports.SharingRole = {}));\nvar SharingOperationStatusCode;\n(function (SharingOperationStatusCode) {\n /**\n * The share operation completed without errors.\n */\n SharingOperationStatusCode[SharingOperationStatusCode[\"CompletedSuccessfully\"] = 0] = \"CompletedSuccessfully\";\n /**\n * The share operation completed and generated requests for access.\n */\n SharingOperationStatusCode[SharingOperationStatusCode[\"AccessRequestsQueued\"] = 1] = \"AccessRequestsQueued\";\n /**\n * The share operation failed as there were no resolved users.\n */\n SharingOperationStatusCode[SharingOperationStatusCode[\"NoResolvedUsers\"] = -1] = \"NoResolvedUsers\";\n /**\n * The share operation failed due to insufficient permissions.\n */\n SharingOperationStatusCode[SharingOperationStatusCode[\"AccessDenied\"] = -2] = \"AccessDenied\";\n /**\n * The share operation failed when attempting a cross site share, which is not supported.\n */\n SharingOperationStatusCode[SharingOperationStatusCode[\"CrossSiteRequestNotSupported\"] = -3] = \"CrossSiteRequestNotSupported\";\n /**\n * The sharing operation failed due to an unknown error.\n */\n SharingOperationStatusCode[SharingOperationStatusCode[\"UnknowError\"] = -4] = \"UnknowError\";\n /**\n * The text you typed is too long. Please shorten it.\n */\n SharingOperationStatusCode[SharingOperationStatusCode[\"EmailBodyTooLong\"] = -5] = \"EmailBodyTooLong\";\n /**\n * The maximum number of unique scopes in the list has been exceeded.\n */\n SharingOperationStatusCode[SharingOperationStatusCode[\"ListUniqueScopesExceeded\"] = -6] = \"ListUniqueScopesExceeded\";\n /**\n * The share operation failed because a sharing capability is disabled in the site.\n */\n SharingOperationStatusCode[SharingOperationStatusCode[\"CapabilityDisabled\"] = -7] = \"CapabilityDisabled\";\n /**\n * The specified object for the share operation is not supported.\n */\n SharingOperationStatusCode[SharingOperationStatusCode[\"ObjectNotSupported\"] = -8] = \"ObjectNotSupported\";\n /**\n * A SharePoint group cannot contain another SharePoint group.\n */\n SharingOperationStatusCode[SharingOperationStatusCode[\"NestedGroupsNotSupported\"] = -9] = \"NestedGroupsNotSupported\";\n})(SharingOperationStatusCode = exports.SharingOperationStatusCode || (exports.SharingOperationStatusCode = {}));\nvar SPSharedObjectType;\n(function (SPSharedObjectType) {\n SPSharedObjectType[SPSharedObjectType[\"Unknown\"] = 0] = \"Unknown\";\n SPSharedObjectType[SPSharedObjectType[\"File\"] = 1] = \"File\";\n SPSharedObjectType[SPSharedObjectType[\"Folder\"] = 2] = \"Folder\";\n SPSharedObjectType[SPSharedObjectType[\"Item\"] = 3] = \"Item\";\n SPSharedObjectType[SPSharedObjectType[\"List\"] = 4] = \"List\";\n SPSharedObjectType[SPSharedObjectType[\"Web\"] = 5] = \"Web\";\n SPSharedObjectType[SPSharedObjectType[\"Max\"] = 6] = \"Max\";\n})(SPSharedObjectType = exports.SPSharedObjectType || (exports.SPSharedObjectType = {}));\nvar SharingDomainRestrictionMode;\n(function (SharingDomainRestrictionMode) {\n SharingDomainRestrictionMode[SharingDomainRestrictionMode[\"None\"] = 0] = \"None\";\n SharingDomainRestrictionMode[SharingDomainRestrictionMode[\"AllowList\"] = 1] = \"AllowList\";\n SharingDomainRestrictionMode[SharingDomainRestrictionMode[\"BlockList\"] = 2] = \"BlockList\";\n})(SharingDomainRestrictionMode = exports.SharingDomainRestrictionMode || (exports.SharingDomainRestrictionMode = {}));\nvar RenderListDataOptions;\n(function (RenderListDataOptions) {\n RenderListDataOptions[RenderListDataOptions[\"None\"] = 0] = \"None\";\n RenderListDataOptions[RenderListDataOptions[\"ContextInfo\"] = 1] = \"ContextInfo\";\n RenderListDataOptions[RenderListDataOptions[\"ListData\"] = 2] = \"ListData\";\n RenderListDataOptions[RenderListDataOptions[\"ListSchema\"] = 4] = \"ListSchema\";\n RenderListDataOptions[RenderListDataOptions[\"MenuView\"] = 8] = \"MenuView\";\n})(RenderListDataOptions = exports.RenderListDataOptions || (exports.RenderListDataOptions = {}));\n\n\n/***/ }),\n/* 19 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar sharepointqueryable_1 = __webpack_require__(1);\nvar sharepointqueryableshareable_1 = __webpack_require__(11);\nvar files_1 = __webpack_require__(12);\nvar util_1 = __webpack_require__(0);\nvar odata_1 = __webpack_require__(6);\nvar items_1 = __webpack_require__(16);\n/**\n * Describes a collection of Folder objects\n *\n */\nvar Folders = /** @class */ (function (_super) {\n __extends(Folders, _super);\n /**\n * Creates a new instance of the Folders class\n *\n * @param baseUrl The url or SharePointQueryable which forms the parent of this fields collection\n */\n function Folders(baseUrl, path) {\n if (path === void 0) { path = \"folders\"; }\n return _super.call(this, baseUrl, path) || this;\n }\n /**\n * Gets a folder by folder name\n *\n */\n Folders.prototype.getByName = function (name) {\n var f = new Folder(this);\n f.concat(\"('\" + name + \"')\");\n return f;\n };\n /**\n * Adds a new folder to the current folder (relative) or any folder (absolute)\n *\n * @param url The relative or absolute url where the new folder will be created. Urls starting with a forward slash are absolute.\n * @returns The new Folder and the raw response.\n */\n Folders.prototype.add = function (url) {\n var _this = this;\n return this.clone(Folders, \"add('\" + url + \"')\").postCore().then(function (response) {\n return {\n data: response,\n folder: _this.getByName(url),\n };\n });\n };\n return Folders;\n}(sharepointqueryable_1.SharePointQueryableCollection));\nexports.Folders = Folders;\n/**\n * Describes a single Folder instance\n *\n */\nvar Folder = /** @class */ (function (_super) {\n __extends(Folder, _super);\n function Folder() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n Object.defineProperty(Folder.prototype, \"contentTypeOrder\", {\n /**\n * Specifies the sequence in which content types are displayed.\n *\n */\n get: function () {\n return new sharepointqueryable_1.SharePointQueryableCollection(this, \"contentTypeOrder\");\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Folder.prototype, \"files\", {\n /**\n * Gets this folder's files\n *\n */\n get: function () {\n return new files_1.Files(this);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Folder.prototype, \"folders\", {\n /**\n * Gets this folder's sub folders\n *\n */\n get: function () {\n return new Folders(this);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Folder.prototype, \"listItemAllFields\", {\n /**\n * Gets this folder's list item field values\n *\n */\n get: function () {\n return new sharepointqueryable_1.SharePointQueryableCollection(this, \"listItemAllFields\");\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Folder.prototype, \"parentFolder\", {\n /**\n * Gets the parent folder, if available\n *\n */\n get: function () {\n return new Folder(this, \"parentFolder\");\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Folder.prototype, \"properties\", {\n /**\n * Gets this folder's properties\n *\n */\n get: function () {\n return new sharepointqueryable_1.SharePointQueryableInstance(this, \"properties\");\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Folder.prototype, \"serverRelativeUrl\", {\n /**\n * Gets this folder's server relative url\n *\n */\n get: function () {\n return new sharepointqueryable_1.SharePointQueryable(this, \"serverRelativeUrl\");\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Folder.prototype, \"uniqueContentTypeOrder\", {\n /**\n * Gets a value that specifies the content type order.\n *\n */\n get: function () {\n return new sharepointqueryable_1.SharePointQueryableCollection(this, \"uniqueContentTypeOrder\");\n },\n enumerable: true,\n configurable: true\n });\n Folder.prototype.update = function (properties) {\n var _this = this;\n var postBody = JSON.stringify(util_1.Util.extend({\n \"__metadata\": { \"type\": \"SP.Folder\" },\n }, properties));\n return this.postCore({\n body: postBody,\n headers: {\n \"X-HTTP-Method\": \"MERGE\",\n },\n }).then(function (data) {\n return {\n data: data,\n folder: _this,\n };\n });\n };\n /**\n * Delete this folder\n *\n * @param eTag Value used in the IF-Match header, by default \"*\"\n */\n Folder.prototype.delete = function (eTag) {\n if (eTag === void 0) { eTag = \"*\"; }\n return this.clone(Folder, null).postCore({\n headers: {\n \"IF-Match\": eTag,\n \"X-HTTP-Method\": \"DELETE\",\n },\n });\n };\n /**\n * Moves the folder to the Recycle Bin and returns the identifier of the new Recycle Bin item.\n */\n Folder.prototype.recycle = function () {\n return this.clone(Folder, \"recycle\").postCore();\n };\n /**\n * Gets the associated list item for this folder, loading the default properties\n */\n Folder.prototype.getItem = function () {\n var selects = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n selects[_i] = arguments[_i];\n }\n var q = this.listItemAllFields;\n return q.select.apply(q, selects).get().then(function (d) {\n return util_1.Util.extend(new items_1.Item(odata_1.spGetEntityUrl(d)), d);\n });\n };\n return Folder;\n}(sharepointqueryableshareable_1.SharePointQueryableShareableFolder));\nexports.Folder = Folder;\n\n\n/***/ }),\n/* 20 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar util_1 = __webpack_require__(0);\nvar sharepointqueryable_1 = __webpack_require__(1);\n/**\n * Describes a collection of content types\n *\n */\nvar ContentTypes = /** @class */ (function (_super) {\n __extends(ContentTypes, _super);\n /**\n * Creates a new instance of the ContentTypes class\n *\n * @param baseUrl The url or SharePointQueryable which forms the parent of this content types collection\n */\n function ContentTypes(baseUrl, path) {\n if (path === void 0) { path = \"contenttypes\"; }\n return _super.call(this, baseUrl, path) || this;\n }\n /**\n * Gets a ContentType by content type id\n */\n ContentTypes.prototype.getById = function (id) {\n var ct = new ContentType(this);\n ct.concat(\"('\" + id + \"')\");\n return ct;\n };\n /**\n * Adds an existing contenttype to a content type collection\n *\n * @param contentTypeId in the following format, for example: 0x010102\n */\n ContentTypes.prototype.addAvailableContentType = function (contentTypeId) {\n var _this = this;\n var postBody = JSON.stringify({\n \"contentTypeId\": contentTypeId,\n });\n return this.clone(ContentTypes, \"addAvailableContentType\").postAsCore({ body: postBody }).then(function (data) {\n return {\n contentType: _this.getById(data.id),\n data: data,\n };\n });\n };\n /**\n * Adds a new content type to the collection\n *\n * @param id The desired content type id for the new content type (also determines the parent content type)\n * @param name The name of the content type\n * @param description The description of the content type\n * @param group The group in which to add the content type\n * @param additionalSettings Any additional settings to provide when creating the content type\n *\n */\n ContentTypes.prototype.add = function (id, name, description, group, additionalSettings) {\n var _this = this;\n if (description === void 0) { description = \"\"; }\n if (group === void 0) { group = \"Custom Content Types\"; }\n if (additionalSettings === void 0) { additionalSettings = {}; }\n var postBody = JSON.stringify(util_1.Util.extend({\n \"Description\": description,\n \"Group\": group,\n \"Id\": { \"StringValue\": id },\n \"Name\": name,\n \"__metadata\": { \"type\": \"SP.ContentType\" },\n }, additionalSettings));\n return this.postCore({ body: postBody }).then(function (data) {\n return { contentType: _this.getById(data.id), data: data };\n });\n };\n return ContentTypes;\n}(sharepointqueryable_1.SharePointQueryableCollection));\nexports.ContentTypes = ContentTypes;\n/**\n * Describes a single ContentType instance\n *\n */\nvar ContentType = /** @class */ (function (_super) {\n __extends(ContentType, _super);\n function ContentType() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n Object.defineProperty(ContentType.prototype, \"fieldLinks\", {\n /**\n * Gets the column (also known as field) references in the content type.\n */\n get: function () {\n return new FieldLinks(this);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(ContentType.prototype, \"fields\", {\n /**\n * Gets a value that specifies the collection of fields for the content type.\n */\n get: function () {\n return new sharepointqueryable_1.SharePointQueryableCollection(this, \"fields\");\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(ContentType.prototype, \"parent\", {\n /**\n * Gets the parent content type of the content type.\n */\n get: function () {\n return new ContentType(this, \"parent\");\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(ContentType.prototype, \"workflowAssociations\", {\n /**\n * Gets a value that specifies the collection of workflow associations for the content type.\n */\n get: function () {\n return new sharepointqueryable_1.SharePointQueryableCollection(this, \"workflowAssociations\");\n },\n enumerable: true,\n configurable: true\n });\n /**\n * Delete this content type\n */\n ContentType.prototype.delete = function () {\n return this.postCore({\n headers: {\n \"X-HTTP-Method\": \"DELETE\",\n },\n });\n };\n return ContentType;\n}(sharepointqueryable_1.SharePointQueryableInstance));\nexports.ContentType = ContentType;\n/**\n * Represents a collection of field link instances\n */\nvar FieldLinks = /** @class */ (function (_super) {\n __extends(FieldLinks, _super);\n /**\n * Creates a new instance of the ContentType class\n *\n * @param baseUrl The url or SharePointQueryable which forms the parent of this content type instance\n */\n function FieldLinks(baseUrl, path) {\n if (path === void 0) { path = \"fieldlinks\"; }\n return _super.call(this, baseUrl, path) || this;\n }\n /**\n * Gets a FieldLink by GUID id\n *\n * @param id The GUID id of the field link\n */\n FieldLinks.prototype.getById = function (id) {\n var fl = new FieldLink(this);\n fl.concat(\"(guid'\" + id + \"')\");\n return fl;\n };\n return FieldLinks;\n}(sharepointqueryable_1.SharePointQueryableCollection));\nexports.FieldLinks = FieldLinks;\n/**\n * Represents a field link instance\n */\nvar FieldLink = /** @class */ (function (_super) {\n __extends(FieldLink, _super);\n function FieldLink() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n return FieldLink;\n}(sharepointqueryable_1.SharePointQueryableInstance));\nexports.FieldLink = FieldLink;\n\n\n/***/ }),\n/* 21 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar sharepointqueryable_1 = __webpack_require__(1);\nvar util_1 = __webpack_require__(0);\n/**\n * Describes a collection of user custom actions\n *\n */\nvar UserCustomActions = /** @class */ (function (_super) {\n __extends(UserCustomActions, _super);\n /**\n * Creates a new instance of the UserCustomActions class\n *\n * @param baseUrl The url or SharePointQueryable which forms the parent of this user custom actions collection\n */\n function UserCustomActions(baseUrl, path) {\n if (path === void 0) { path = \"usercustomactions\"; }\n return _super.call(this, baseUrl, path) || this;\n }\n /**\n * Returns the user custom action with the specified id\n *\n * @param id The GUID id of the user custom action to retrieve\n */\n UserCustomActions.prototype.getById = function (id) {\n var uca = new UserCustomAction(this);\n uca.concat(\"('\" + id + \"')\");\n return uca;\n };\n /**\n * Creates a user custom action\n *\n * @param properties The information object of property names and values which define the new user custom action\n *\n */\n UserCustomActions.prototype.add = function (properties) {\n var _this = this;\n var postBody = JSON.stringify(util_1.Util.extend({ __metadata: { \"type\": \"SP.UserCustomAction\" } }, properties));\n return this.postCore({ body: postBody }).then(function (data) {\n return {\n action: _this.getById(data.Id),\n data: data,\n };\n });\n };\n /**\n * Deletes all user custom actions in the collection\n *\n */\n UserCustomActions.prototype.clear = function () {\n return this.clone(UserCustomActions, \"clear\").postCore();\n };\n return UserCustomActions;\n}(sharepointqueryable_1.SharePointQueryableCollection));\nexports.UserCustomActions = UserCustomActions;\n/**\n * Describes a single user custom action\n *\n */\nvar UserCustomAction = /** @class */ (function (_super) {\n __extends(UserCustomAction, _super);\n function UserCustomAction() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n /**\n * Updates this user custom action with the supplied properties\n *\n * @param properties An information object of property names and values to update for this user custom action\n */\n UserCustomAction.prototype.update = function (properties) {\n var _this = this;\n var postBody = JSON.stringify(util_1.Util.extend({\n \"__metadata\": { \"type\": \"SP.UserCustomAction\" },\n }, properties));\n return this.postCore({\n body: postBody,\n headers: {\n \"X-HTTP-Method\": \"MERGE\",\n },\n }).then(function (data) {\n return {\n action: _this,\n data: data,\n };\n });\n };\n /**\n * Removes this user custom action\n *\n */\n UserCustomAction.prototype.delete = function () {\n return _super.prototype.deleteCore.call(this);\n };\n return UserCustomAction;\n}(sharepointqueryable_1.SharePointQueryableInstance));\nexports.UserCustomAction = UserCustomAction;\n\n\n/***/ }),\n/* 22 */\n/***/ (function(module, exports) {\n\nvar g;\r\n\r\n// This works in non-strict mode\r\ng = (function() {\r\n\treturn this;\r\n})();\r\n\r\ntry {\r\n\t// This works if eval is allowed (see CSP)\r\n\tg = g || Function(\"return this\")() || (1,eval)(\"this\");\r\n} catch(e) {\r\n\t// This works if the window reference is available\r\n\tif(typeof window === \"object\")\r\n\t\tg = window;\r\n}\r\n\r\n// g can still be undefined, but nothing to do about it...\r\n// We return undefined, instead of nothing here, so it's\r\n// easier to handle this case. if(!global) { ...}\r\n\r\nmodule.exports = g;\r\n\n\n/***/ }),\n/* 23 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar util_1 = __webpack_require__(0);\nvar collections_1 = __webpack_require__(8);\nvar pnplibconfig_1 = __webpack_require__(2);\nvar logging_1 = __webpack_require__(3);\n/**\n * A wrapper class to provide a consistent interface to browser based storage\n *\n */\nvar PnPClientStorageWrapper = /** @class */ (function () {\n /**\n * Creates a new instance of the PnPClientStorageWrapper class\n *\n * @constructor\n */\n function PnPClientStorageWrapper(store, defaultTimeoutMinutes) {\n this.store = store;\n this.defaultTimeoutMinutes = defaultTimeoutMinutes;\n this.defaultTimeoutMinutes = (defaultTimeoutMinutes === void 0) ? -1 : defaultTimeoutMinutes;\n this.enabled = this.test();\n // if the cache timeout is enabled call the handler\n // this will clear any expired items and set the timeout function\n if (pnplibconfig_1.RuntimeConfig.enableCacheExpiration) {\n logging_1.Logger.write(\"Enabling cache expiration.\", logging_1.LogLevel.Info);\n this.cacheExpirationHandler();\n }\n }\n /**\n * Get a value from storage, or null if that value does not exist\n *\n * @param key The key whose value we want to retrieve\n */\n PnPClientStorageWrapper.prototype.get = function (key) {\n if (!this.enabled) {\n return null;\n }\n var o = this.store.getItem(key);\n if (o == null) {\n return null;\n }\n var persistable = JSON.parse(o);\n if (new Date(persistable.expiration) <= new Date()) {\n logging_1.Logger.write(\"Removing item with key '\" + key + \"' from cache due to expiration.\", logging_1.LogLevel.Info);\n this.delete(key);\n return null;\n }\n else {\n return persistable.value;\n }\n };\n /**\n * Adds a value to the underlying storage\n *\n * @param key The key to use when storing the provided value\n * @param o The value to store\n * @param expire Optional, if provided the expiration of the item, otherwise the default is used\n */\n PnPClientStorageWrapper.prototype.put = function (key, o, expire) {\n if (this.enabled) {\n this.store.setItem(key, this.createPersistable(o, expire));\n }\n };\n /**\n * Deletes a value from the underlying storage\n *\n * @param key The key of the pair we want to remove from storage\n */\n PnPClientStorageWrapper.prototype.delete = function (key) {\n if (this.enabled) {\n this.store.removeItem(key);\n }\n };\n /**\n * Gets an item from the underlying storage, or adds it if it does not exist using the supplied getter function\n *\n * @param key The key to use when storing the provided value\n * @param getter A function which will upon execution provide the desired value\n * @param expire Optional, if provided the expiration of the item, otherwise the default is used\n */\n PnPClientStorageWrapper.prototype.getOrPut = function (key, getter, expire) {\n var _this = this;\n if (!this.enabled) {\n return getter();\n }\n return new Promise(function (resolve) {\n var o = _this.get(key);\n if (o == null) {\n getter().then(function (d) {\n _this.put(key, d, expire);\n resolve(d);\n });\n }\n else {\n resolve(o);\n }\n });\n };\n /**\n * Deletes any expired items placed in the store by the pnp library, leaves other items untouched\n */\n PnPClientStorageWrapper.prototype.deleteExpired = function () {\n var _this = this;\n return new Promise(function (resolve, reject) {\n if (!_this.enabled) {\n resolve();\n }\n try {\n for (var i = 0; i < _this.store.length; i++) {\n var key = _this.store.key(i);\n // test the stored item to see if we stored it\n if (/[\"|']?pnp[\"|']? ?: ?1/i.test(_this.store.getItem(key))) {\n // get those items as get will delete from cache if they are expired\n _this.get(key);\n }\n }\n resolve();\n }\n catch (e) {\n reject(e);\n }\n });\n };\n /**\n * Used to determine if the wrapped storage is available currently\n */\n PnPClientStorageWrapper.prototype.test = function () {\n var str = \"test\";\n try {\n this.store.setItem(str, str);\n this.store.removeItem(str);\n return true;\n }\n catch (e) {\n return false;\n }\n };\n /**\n * Creates the persistable to store\n */\n PnPClientStorageWrapper.prototype.createPersistable = function (o, expire) {\n if (typeof expire === \"undefined\") {\n // ensure we are by default inline with the global library setting\n var defaultTimeout = pnplibconfig_1.RuntimeConfig.defaultCachingTimeoutSeconds;\n if (this.defaultTimeoutMinutes > 0) {\n defaultTimeout = this.defaultTimeoutMinutes * 60;\n }\n expire = util_1.Util.dateAdd(new Date(), \"second\", defaultTimeout);\n }\n return JSON.stringify({ pnp: 1, expiration: expire, value: o });\n };\n /**\n * Deletes expired items added by this library in this.store and sets a timeout to call itself\n */\n PnPClientStorageWrapper.prototype.cacheExpirationHandler = function () {\n var _this = this;\n logging_1.Logger.write(\"Called cache expiration handler.\", logging_1.LogLevel.Verbose);\n this.deleteExpired().then(function (_) {\n // call ourself in the future\n setTimeout(util_1.Util.getCtxCallback(_this, _this.cacheExpirationHandler), pnplibconfig_1.RuntimeConfig.cacheExpirationIntervalMilliseconds);\n }).catch(function (e) {\n // we've got some error - so just stop the loop and report the error\n logging_1.Logger.log({\n data: e,\n level: logging_1.LogLevel.Error,\n message: \"Error deleting expired cache entries, see data for details. Timeout not reset.\",\n });\n });\n };\n return PnPClientStorageWrapper;\n}());\nexports.PnPClientStorageWrapper = PnPClientStorageWrapper;\n/**\n * A thin implementation of in-memory storage for use in nodejs\n */\nvar MemoryStorage = /** @class */ (function () {\n function MemoryStorage(_store) {\n if (_store === void 0) { _store = new collections_1.Dictionary(); }\n this._store = _store;\n }\n Object.defineProperty(MemoryStorage.prototype, \"length\", {\n get: function () {\n return this._store.count();\n },\n enumerable: true,\n configurable: true\n });\n MemoryStorage.prototype.clear = function () {\n this._store.clear();\n };\n MemoryStorage.prototype.getItem = function (key) {\n return this._store.get(key);\n };\n MemoryStorage.prototype.key = function (index) {\n return this._store.getKeys()[index];\n };\n MemoryStorage.prototype.removeItem = function (key) {\n this._store.remove(key);\n };\n MemoryStorage.prototype.setItem = function (key, data) {\n this._store.add(key, data);\n };\n return MemoryStorage;\n}());\n/**\n * A class that will establish wrappers for both local and session storage\n */\nvar PnPClientStorage = /** @class */ (function () {\n /**\n * Creates a new instance of the PnPClientStorage class\n *\n * @constructor\n */\n function PnPClientStorage(_local, _session) {\n if (_local === void 0) { _local = null; }\n if (_session === void 0) { _session = null; }\n this._local = _local;\n this._session = _session;\n }\n Object.defineProperty(PnPClientStorage.prototype, \"local\", {\n /**\n * Provides access to the local storage of the browser\n */\n get: function () {\n if (this._local === null) {\n this._local = typeof localStorage !== \"undefined\" ? new PnPClientStorageWrapper(localStorage) : new PnPClientStorageWrapper(new MemoryStorage());\n }\n return this._local;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PnPClientStorage.prototype, \"session\", {\n /**\n * Provides access to the session storage of the browser\n */\n get: function () {\n if (this._session === null) {\n this._session = typeof sessionStorage !== \"undefined\" ? new PnPClientStorageWrapper(sessionStorage) : new PnPClientStorageWrapper(new MemoryStorage());\n }\n return this._session;\n },\n enumerable: true,\n configurable: true\n });\n return PnPClientStorage;\n}());\nexports.PnPClientStorage = PnPClientStorage;\n\n\n/***/ }),\n/* 24 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar util_1 = __webpack_require__(0);\nvar utils_1 = __webpack_require__(9);\nvar parsers_1 = __webpack_require__(7);\nvar pnplibconfig_1 = __webpack_require__(2);\nvar pipeline_1 = __webpack_require__(14);\nvar ODataQueryable = /** @class */ (function () {\n function ODataQueryable() {\n }\n /**\n * Directly concatonates the supplied string to the current url, not normalizing \"/\" chars\n *\n * @param pathPart The string to concatonate to the url\n */\n ODataQueryable.prototype.concat = function (pathPart) {\n this._url += pathPart;\n return this;\n };\n /**\n * Appends the given string and normalizes \"/\" chars\n *\n * @param pathPart The string to append\n */\n ODataQueryable.prototype.append = function (pathPart) {\n this._url = util_1.Util.combinePaths(this._url, pathPart);\n };\n Object.defineProperty(ODataQueryable.prototype, \"parentUrl\", {\n /**\n * Gets the parent url used when creating this instance\n *\n */\n get: function () {\n return this._parentUrl;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(ODataQueryable.prototype, \"query\", {\n /**\n * Provides access to the query builder for this url\n *\n */\n get: function () {\n return this._query;\n },\n enumerable: true,\n configurable: true\n });\n /**\n * Sets custom options for current object and all derived objects accessible via chaining\n *\n * @param options custom options\n */\n ODataQueryable.prototype.configure = function (options) {\n utils_1.mergeOptions(this._options, options);\n return this;\n };\n /**\n * Enables caching for this request\n *\n * @param options Defines the options used when caching this request\n */\n ODataQueryable.prototype.usingCaching = function (options) {\n if (!pnplibconfig_1.RuntimeConfig.globalCacheDisable) {\n this._useCaching = true;\n this._cachingOptions = options;\n }\n return this;\n };\n /**\n * Gets the currentl url, made absolute based on the availability of the _spPageContextInfo object\n *\n */\n ODataQueryable.prototype.toUrl = function () {\n return this._url;\n };\n /**\n * Executes the currently built request\n *\n * @param parser Allows you to specify a parser to handle the result\n * @param getOptions The options used for this request\n */\n ODataQueryable.prototype.get = function (parser, options) {\n if (parser === void 0) { parser = new parsers_1.ODataDefaultParser(); }\n if (options === void 0) { options = {}; }\n return this.toRequestContext(\"GET\", options, parser, pipeline_1.PipelineMethods.default).then(function (context) { return pipeline_1.pipe(context); });\n };\n ODataQueryable.prototype.getAs = function (parser, options) {\n if (parser === void 0) { parser = new parsers_1.ODataDefaultParser(); }\n if (options === void 0) { options = {}; }\n return this.toRequestContext(\"GET\", options, parser, pipeline_1.PipelineMethods.default).then(function (context) { return pipeline_1.pipe(context); });\n };\n ODataQueryable.prototype.postCore = function (options, parser) {\n if (options === void 0) { options = {}; }\n if (parser === void 0) { parser = new parsers_1.ODataDefaultParser(); }\n return this.toRequestContext(\"POST\", options, parser, pipeline_1.PipelineMethods.default).then(function (context) { return pipeline_1.pipe(context); });\n };\n ODataQueryable.prototype.postAsCore = function (options, parser) {\n if (options === void 0) { options = {}; }\n if (parser === void 0) { parser = new parsers_1.ODataDefaultParser(); }\n return this.toRequestContext(\"POST\", options, parser, pipeline_1.PipelineMethods.default).then(function (context) { return pipeline_1.pipe(context); });\n };\n ODataQueryable.prototype.patchCore = function (options, parser) {\n if (options === void 0) { options = {}; }\n if (parser === void 0) { parser = new parsers_1.ODataDefaultParser(); }\n return this.toRequestContext(\"PATCH\", options, parser, pipeline_1.PipelineMethods.default).then(function (context) { return pipeline_1.pipe(context); });\n };\n ODataQueryable.prototype.deleteCore = function (options, parser) {\n if (options === void 0) { options = {}; }\n if (parser === void 0) { parser = new parsers_1.ODataDefaultParser(); }\n return this.toRequestContext(\"DELETE\", options, parser, pipeline_1.PipelineMethods.default).then(function (context) { return pipeline_1.pipe(context); });\n };\n return ODataQueryable;\n}());\nexports.ODataQueryable = ODataQueryable;\n\n\n/***/ }),\n/* 25 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar digestcache_1 = __webpack_require__(38);\nvar util_1 = __webpack_require__(0);\nvar pnplibconfig_1 = __webpack_require__(2);\nvar exceptions_1 = __webpack_require__(4);\nvar utils_1 = __webpack_require__(9);\nvar HttpClient = /** @class */ (function () {\n function HttpClient() {\n this._impl = pnplibconfig_1.RuntimeConfig.spFetchClientFactory();\n this._digestCache = new digestcache_1.DigestCache(this);\n }\n HttpClient.prototype.fetch = function (url, options) {\n var _this = this;\n if (options === void 0) { options = {}; }\n var opts = util_1.Util.extend(options, { cache: \"no-cache\", credentials: \"same-origin\" }, true);\n var headers = new Headers();\n // first we add the global headers so they can be overwritten by any passed in locally to this call\n utils_1.mergeHeaders(headers, pnplibconfig_1.RuntimeConfig.spHeaders);\n // second we add the local options so we can overwrite the globals\n utils_1.mergeHeaders(headers, options.headers);\n // lastly we apply any default headers we need that may not exist\n if (!headers.has(\"Accept\")) {\n headers.append(\"Accept\", \"application/json\");\n }\n if (!headers.has(\"Content-Type\")) {\n headers.append(\"Content-Type\", \"application/json;odata=verbose;charset=utf-8\");\n }\n if (!headers.has(\"X-ClientService-ClientTag\")) {\n headers.append(\"X-ClientService-ClientTag\", \"PnPCoreJS:3.0.0\");\n }\n opts = util_1.Util.extend(opts, { headers: headers });\n if (opts.method && opts.method.toUpperCase() !== \"GET\") {\n // if we have either a request digest or an authorization header we don't need a digest\n if (!headers.has(\"X-RequestDigest\") && !headers.has(\"Authorization\")) {\n var index = url.indexOf(\"_api/\");\n if (index < 0) {\n throw new exceptions_1.APIUrlException();\n }\n var webUrl = url.substr(0, index);\n return this._digestCache.getDigest(webUrl)\n .then(function (digest) {\n headers.append(\"X-RequestDigest\", digest);\n return _this.fetchRaw(url, opts);\n });\n }\n }\n return this.fetchRaw(url, opts);\n };\n HttpClient.prototype.fetchRaw = function (url, options) {\n var _this = this;\n if (options === void 0) { options = {}; }\n // here we need to normalize the headers\n var rawHeaders = new Headers();\n utils_1.mergeHeaders(rawHeaders, options.headers);\n options = util_1.Util.extend(options, { headers: rawHeaders });\n var retry = function (ctx) {\n _this._impl.fetch(url, options).then(function (response) { return ctx.resolve(response); }).catch(function (response) {\n // Check if request was throttled - http status code 429\n // Check if request failed due to server unavailable - http status code 503\n if (response.status !== 429 && response.status !== 503) {\n ctx.reject(response);\n }\n // grab our current delay\n var delay = ctx.delay;\n // Increment our counters.\n ctx.delay *= 2;\n ctx.attempts++;\n // If we have exceeded the retry count, reject.\n if (ctx.retryCount <= ctx.attempts) {\n ctx.reject(response);\n }\n // Set our retry timeout for {delay} milliseconds.\n setTimeout(util_1.Util.getCtxCallback(_this, retry, ctx), delay);\n });\n };\n return new Promise(function (resolve, reject) {\n var retryContext = {\n attempts: 0,\n delay: 100,\n reject: reject,\n resolve: resolve,\n retryCount: 7,\n };\n retry.call(_this, retryContext);\n });\n };\n HttpClient.prototype.get = function (url, options) {\n if (options === void 0) { options = {}; }\n var opts = util_1.Util.extend(options, { method: \"GET\" });\n return this.fetch(url, opts);\n };\n HttpClient.prototype.post = function (url, options) {\n if (options === void 0) { options = {}; }\n var opts = util_1.Util.extend(options, { method: \"POST\" });\n return this.fetch(url, opts);\n };\n HttpClient.prototype.patch = function (url, options) {\n if (options === void 0) { options = {}; }\n var opts = util_1.Util.extend(options, { method: \"PATCH\" });\n return this.fetch(url, opts);\n };\n HttpClient.prototype.delete = function (url, options) {\n if (options === void 0) { options = {}; }\n var opts = util_1.Util.extend(options, { method: \"DELETE\" });\n return this.fetch(url, opts);\n };\n return HttpClient;\n}());\nexports.HttpClient = HttpClient;\n\n\n/***/ }),\n/* 26 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar webs_1 = __webpack_require__(10);\nvar roles_1 = __webpack_require__(27);\nvar types_1 = __webpack_require__(18);\nvar sharepointqueryable_1 = __webpack_require__(1);\nvar SharePointQueryableSecurable = /** @class */ (function (_super) {\n __extends(SharePointQueryableSecurable, _super);\n function SharePointQueryableSecurable() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n Object.defineProperty(SharePointQueryableSecurable.prototype, \"roleAssignments\", {\n /**\n * Gets the set of role assignments for this item\n *\n */\n get: function () {\n return new roles_1.RoleAssignments(this);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(SharePointQueryableSecurable.prototype, \"firstUniqueAncestorSecurableObject\", {\n /**\n * Gets the closest securable up the security hierarchy whose permissions are applied to this list item\n *\n */\n get: function () {\n return new sharepointqueryable_1.SharePointQueryableInstance(this, \"FirstUniqueAncestorSecurableObject\");\n },\n enumerable: true,\n configurable: true\n });\n /**\n * Gets the effective permissions for the user supplied\n *\n * @param loginName The claims username for the user (ex: i:0#.f|membership|user@domain.com)\n */\n SharePointQueryableSecurable.prototype.getUserEffectivePermissions = function (loginName) {\n var q = this.clone(sharepointqueryable_1.SharePointQueryable, \"getUserEffectivePermissions(@user)\");\n q.query.add(\"@user\", \"'\" + encodeURIComponent(loginName) + \"'\");\n return q.get().then(function (r) {\n // handle verbose mode\n return r.hasOwnProperty(\"GetUserEffectivePermissions\") ? r.GetUserEffectivePermissions : r;\n });\n };\n /**\n * Gets the effective permissions for the current user\n */\n SharePointQueryableSecurable.prototype.getCurrentUserEffectivePermissions = function () {\n var _this = this;\n var w = webs_1.Web.fromUrl(this.toUrl());\n return w.currentUser.select(\"LoginName\").getAs().then(function (user) {\n return _this.getUserEffectivePermissions(user.LoginName);\n });\n };\n /**\n * Breaks the security inheritance at this level optinally copying permissions and clearing subscopes\n *\n * @param copyRoleAssignments If true the permissions are copied from the current parent scope\n * @param clearSubscopes Optional. true to make all child securable objects inherit role assignments from the current object\n */\n SharePointQueryableSecurable.prototype.breakRoleInheritance = function (copyRoleAssignments, clearSubscopes) {\n if (copyRoleAssignments === void 0) { copyRoleAssignments = false; }\n if (clearSubscopes === void 0) { clearSubscopes = false; }\n return this.clone(SharePointQueryableSecurable, \"breakroleinheritance(copyroleassignments=\" + copyRoleAssignments + \", clearsubscopes=\" + clearSubscopes + \")\").postCore();\n };\n /**\n * Removes the local role assignments so that it re-inherit role assignments from the parent object.\n *\n */\n SharePointQueryableSecurable.prototype.resetRoleInheritance = function () {\n return this.clone(SharePointQueryableSecurable, \"resetroleinheritance\").postCore();\n };\n /**\n * Determines if a given user has the appropriate permissions\n *\n * @param loginName The user to check\n * @param permission The permission being checked\n */\n SharePointQueryableSecurable.prototype.userHasPermissions = function (loginName, permission) {\n var _this = this;\n return this.getUserEffectivePermissions(loginName).then(function (perms) {\n return _this.hasPermissions(perms, permission);\n });\n };\n /**\n * Determines if the current user has the requested permissions\n *\n * @param permission The permission we wish to check\n */\n SharePointQueryableSecurable.prototype.currentUserHasPermissions = function (permission) {\n var _this = this;\n return this.getCurrentUserEffectivePermissions().then(function (perms) {\n return _this.hasPermissions(perms, permission);\n });\n };\n /**\n * Taken from sp.js, checks the supplied permissions against the mask\n *\n * @param value The security principal's permissions on the given object\n * @param perm The permission checked against the value\n */\n /* tslint:disable:no-bitwise */\n SharePointQueryableSecurable.prototype.hasPermissions = function (value, perm) {\n if (!perm) {\n return true;\n }\n if (perm === types_1.PermissionKind.FullMask) {\n return (value.High & 32767) === 32767 && value.Low === 65535;\n }\n perm = perm - 1;\n var num = 1;\n if (perm >= 0 && perm < 32) {\n num = num << perm;\n return 0 !== (value.Low & num);\n }\n else if (perm >= 32 && perm < 64) {\n num = num << perm - 32;\n return 0 !== (value.High & num);\n }\n return false;\n };\n return SharePointQueryableSecurable;\n}(sharepointqueryable_1.SharePointQueryableInstance));\nexports.SharePointQueryableSecurable = SharePointQueryableSecurable;\n\n\n/***/ }),\n/* 27 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar sharepointqueryable_1 = __webpack_require__(1);\nvar sitegroups_1 = __webpack_require__(17);\nvar util_1 = __webpack_require__(0);\n/**\n * Describes a set of role assignments for the current scope\n *\n */\nvar RoleAssignments = /** @class */ (function (_super) {\n __extends(RoleAssignments, _super);\n /**\n * Creates a new instance of the RoleAssignments class\n *\n * @param baseUrl The url or SharePointQueryable which forms the parent of this role assignments collection\n */\n function RoleAssignments(baseUrl, path) {\n if (path === void 0) { path = \"roleassignments\"; }\n return _super.call(this, baseUrl, path) || this;\n }\n /**\n * Adds a new role assignment with the specified principal and role definitions to the collection\n *\n * @param principalId The id of the user or group to assign permissions to\n * @param roleDefId The id of the role definition that defines the permissions to assign\n *\n */\n RoleAssignments.prototype.add = function (principalId, roleDefId) {\n return this.clone(RoleAssignments, \"addroleassignment(principalid=\" + principalId + \", roledefid=\" + roleDefId + \")\").postCore();\n };\n /**\n * Removes the role assignment with the specified principal and role definition from the collection\n *\n * @param principalId The id of the user or group in the role assignment\n * @param roleDefId The id of the role definition in the role assignment\n *\n */\n RoleAssignments.prototype.remove = function (principalId, roleDefId) {\n return this.clone(RoleAssignments, \"removeroleassignment(principalid=\" + principalId + \", roledefid=\" + roleDefId + \")\").postCore();\n };\n /**\n * Gets the role assignment associated with the specified principal id from the collection.\n *\n * @param id The id of the role assignment\n */\n RoleAssignments.prototype.getById = function (id) {\n var ra = new RoleAssignment(this);\n ra.concat(\"(\" + id + \")\");\n return ra;\n };\n return RoleAssignments;\n}(sharepointqueryable_1.SharePointQueryableCollection));\nexports.RoleAssignments = RoleAssignments;\n/**\n * Describes a role assignment\n *\n */\nvar RoleAssignment = /** @class */ (function (_super) {\n __extends(RoleAssignment, _super);\n function RoleAssignment() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n Object.defineProperty(RoleAssignment.prototype, \"groups\", {\n /**\n * Gets the groups that directly belong to the access control list (ACL) for this securable object\n *\n */\n get: function () {\n return new sitegroups_1.SiteGroups(this, \"groups\");\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(RoleAssignment.prototype, \"bindings\", {\n /**\n * Gets the role definition bindings for this role assignment\n *\n */\n get: function () {\n return new RoleDefinitionBindings(this);\n },\n enumerable: true,\n configurable: true\n });\n /**\n * Deletes this role assignment\n *\n */\n RoleAssignment.prototype.delete = function () {\n return this.postCore({\n headers: {\n \"X-HTTP-Method\": \"DELETE\",\n },\n });\n };\n return RoleAssignment;\n}(sharepointqueryable_1.SharePointQueryableInstance));\nexports.RoleAssignment = RoleAssignment;\n/**\n * Describes a collection of role definitions\n *\n */\nvar RoleDefinitions = /** @class */ (function (_super) {\n __extends(RoleDefinitions, _super);\n /**\n * Creates a new instance of the RoleDefinitions class\n *\n * @param baseUrl The url or SharePointQueryable which forms the parent of this role definitions collection\n *\n */\n function RoleDefinitions(baseUrl, path) {\n if (path === void 0) { path = \"roledefinitions\"; }\n return _super.call(this, baseUrl, path) || this;\n }\n /**\n * Gets the role definition with the specified id from the collection\n *\n * @param id The id of the role definition\n *\n */\n RoleDefinitions.prototype.getById = function (id) {\n return new RoleDefinition(this, \"getById(\" + id + \")\");\n };\n /**\n * Gets the role definition with the specified name\n *\n * @param name The name of the role definition\n *\n */\n RoleDefinitions.prototype.getByName = function (name) {\n return new RoleDefinition(this, \"getbyname('\" + name + \"')\");\n };\n /**\n * Gets the role definition with the specified role type\n *\n * @param roleTypeKind The roletypekind of the role definition (None=0, Guest=1, Reader=2, Contributor=3, WebDesigner=4, Administrator=5, Editor=6, System=7)\n *\n */\n RoleDefinitions.prototype.getByType = function (roleTypeKind) {\n return new RoleDefinition(this, \"getbytype(\" + roleTypeKind + \")\");\n };\n /**\n * Creates a role definition\n *\n * @param name The new role definition's name\n * @param description The new role definition's description\n * @param order The order in which the role definition appears\n * @param basePermissions The permissions mask for this role definition\n *\n */\n RoleDefinitions.prototype.add = function (name, description, order, basePermissions) {\n var _this = this;\n var postBody = JSON.stringify({\n BasePermissions: util_1.Util.extend({ __metadata: { type: \"SP.BasePermissions\" } }, basePermissions),\n Description: description,\n Name: name,\n Order: order,\n __metadata: { \"type\": \"SP.RoleDefinition\" },\n });\n return this.postCore({ body: postBody }).then(function (data) {\n return {\n data: data,\n definition: _this.getById(data.Id),\n };\n });\n };\n return RoleDefinitions;\n}(sharepointqueryable_1.SharePointQueryableCollection));\nexports.RoleDefinitions = RoleDefinitions;\n/**\n * Describes a role definition\n *\n */\nvar RoleDefinition = /** @class */ (function (_super) {\n __extends(RoleDefinition, _super);\n function RoleDefinition() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n /**\n * Updates this role definition with the supplied properties\n *\n * @param properties A plain object hash of values to update for the role definition\n */\n /* tslint:disable no-string-literal */\n RoleDefinition.prototype.update = function (properties) {\n var _this = this;\n if (typeof properties.hasOwnProperty(\"BasePermissions\") !== \"undefined\") {\n properties[\"BasePermissions\"] = util_1.Util.extend({ __metadata: { type: \"SP.BasePermissions\" } }, properties[\"BasePermissions\"]);\n }\n var postBody = JSON.stringify(util_1.Util.extend({\n \"__metadata\": { \"type\": \"SP.RoleDefinition\" },\n }, properties));\n return this.postCore({\n body: postBody,\n headers: {\n \"X-HTTP-Method\": \"MERGE\",\n },\n }).then(function (data) {\n var retDef = _this;\n if (properties.hasOwnProperty(\"Name\")) {\n var parent_1 = _this.getParent(RoleDefinitions, _this.parentUrl, \"\");\n retDef = parent_1.getByName(properties[\"Name\"]);\n }\n return {\n data: data,\n definition: retDef,\n };\n });\n };\n /* tslint:enable */\n /**\n * Deletes this role definition\n *\n */\n RoleDefinition.prototype.delete = function () {\n return this.postCore({\n headers: {\n \"X-HTTP-Method\": \"DELETE\",\n },\n });\n };\n return RoleDefinition;\n}(sharepointqueryable_1.SharePointQueryableInstance));\nexports.RoleDefinition = RoleDefinition;\n/**\n * Describes the role definitons bound to a role assignment object\n *\n */\nvar RoleDefinitionBindings = /** @class */ (function (_super) {\n __extends(RoleDefinitionBindings, _super);\n /**\n * Creates a new instance of the RoleDefinitionBindings class\n *\n * @param baseUrl The url or SharePointQueryable which forms the parent of this role definition bindings collection\n */\n function RoleDefinitionBindings(baseUrl, path) {\n if (path === void 0) { path = \"roledefinitionbindings\"; }\n return _super.call(this, baseUrl, path) || this;\n }\n return RoleDefinitionBindings;\n}(sharepointqueryable_1.SharePointQueryableCollection));\nexports.RoleDefinitionBindings = RoleDefinitionBindings;\n\n\n/***/ }),\n/* 28 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar sharepointqueryable_1 = __webpack_require__(1);\nvar sitegroups_1 = __webpack_require__(17);\nvar util_1 = __webpack_require__(0);\n/**\n * Describes a collection of all site collection users\n *\n */\nvar SiteUsers = /** @class */ (function (_super) {\n __extends(SiteUsers, _super);\n /**\n * Creates a new instance of the SiteUsers class\n *\n * @param baseUrl The url or SharePointQueryable which forms the parent of this user collection\n */\n function SiteUsers(baseUrl, path) {\n if (path === void 0) { path = \"siteusers\"; }\n return _super.call(this, baseUrl, path) || this;\n }\n /**\n * Gets a user from the collection by email\n *\n * @param email The email address of the user to retrieve\n */\n SiteUsers.prototype.getByEmail = function (email) {\n return new SiteUser(this, \"getByEmail('\" + email + \"')\");\n };\n /**\n * Gets a user from the collection by id\n *\n * @param id The id of the user to retrieve\n */\n SiteUsers.prototype.getById = function (id) {\n return new SiteUser(this, \"getById(\" + id + \")\");\n };\n /**\n * Gets a user from the collection by login name\n *\n * @param loginName The login name of the user to retrieve\n */\n SiteUsers.prototype.getByLoginName = function (loginName) {\n var su = new SiteUser(this);\n su.concat(\"('!@v::\" + encodeURIComponent(loginName) + \"')\");\n return su;\n };\n /**\n * Removes a user from the collection by id\n *\n * @param id The id of the user to remove\n */\n SiteUsers.prototype.removeById = function (id) {\n return this.clone(SiteUsers, \"removeById(\" + id + \")\").postCore();\n };\n /**\n * Removes a user from the collection by login name\n *\n * @param loginName The login name of the user to remove\n */\n SiteUsers.prototype.removeByLoginName = function (loginName) {\n var o = this.clone(SiteUsers, \"removeByLoginName(@v)\");\n o.query.add(\"@v\", \"'\" + encodeURIComponent(loginName) + \"'\");\n return o.postCore();\n };\n /**\n * Adds a user to a group\n *\n * @param loginName The login name of the user to add to the group\n *\n */\n SiteUsers.prototype.add = function (loginName) {\n var _this = this;\n return this.clone(SiteUsers, null).postCore({\n body: JSON.stringify({ \"__metadata\": { \"type\": \"SP.User\" }, LoginName: loginName }),\n }).then(function () { return _this.getByLoginName(loginName); });\n };\n return SiteUsers;\n}(sharepointqueryable_1.SharePointQueryableCollection));\nexports.SiteUsers = SiteUsers;\n/**\n * Describes a single user\n *\n */\nvar SiteUser = /** @class */ (function (_super) {\n __extends(SiteUser, _super);\n function SiteUser() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n Object.defineProperty(SiteUser.prototype, \"groups\", {\n /**\n * Gets the groups for this user\n *\n */\n get: function () {\n return new sitegroups_1.SiteGroups(this, \"groups\");\n },\n enumerable: true,\n configurable: true\n });\n /**\n * Updates this user instance with the supplied properties\n *\n * @param properties A plain object of property names and values to update for the user\n */\n SiteUser.prototype.update = function (properties) {\n var _this = this;\n var postBody = util_1.Util.extend({ \"__metadata\": { \"type\": \"SP.User\" } }, properties);\n return this.postCore({\n body: JSON.stringify(postBody),\n headers: {\n \"X-HTTP-Method\": \"MERGE\",\n },\n }).then(function (data) {\n return {\n data: data,\n user: _this,\n };\n });\n };\n /**\n * Delete this user\n *\n */\n SiteUser.prototype.delete = function () {\n return this.postCore({\n headers: {\n \"X-HTTP-Method\": \"DELETE\",\n },\n });\n };\n return SiteUser;\n}(sharepointqueryable_1.SharePointQueryableInstance));\nexports.SiteUser = SiteUser;\n/**\n * Represents the current user\n */\nvar CurrentUser = /** @class */ (function (_super) {\n __extends(CurrentUser, _super);\n function CurrentUser(baseUrl, path) {\n if (path === void 0) { path = \"currentuser\"; }\n return _super.call(this, baseUrl, path) || this;\n }\n return CurrentUser;\n}(sharepointqueryable_1.SharePointQueryableInstance));\nexports.CurrentUser = CurrentUser;\n\n\n/***/ }),\n/* 29 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar sharepointqueryable_1 = __webpack_require__(1);\nvar util_1 = __webpack_require__(0);\nvar types_1 = __webpack_require__(18);\n/**\n * Describes a collection of Field objects\n *\n */\nvar Fields = /** @class */ (function (_super) {\n __extends(Fields, _super);\n /**\n * Creates a new instance of the Fields class\n *\n * @param baseUrl The url or SharePointQueryable which forms the parent of this fields collection\n */\n function Fields(baseUrl, path) {\n if (path === void 0) { path = \"fields\"; }\n return _super.call(this, baseUrl, path) || this;\n }\n /**\n * Gets a field from the collection by title\n *\n * @param title The case-sensitive title of the field\n */\n Fields.prototype.getByTitle = function (title) {\n return new Field(this, \"getByTitle('\" + title + \"')\");\n };\n /**\n * Gets a field from the collection by using internal name or title\n *\n * @param name The case-sensitive internal name or title of the field\n */\n Fields.prototype.getByInternalNameOrTitle = function (name) {\n return new Field(this, \"getByInternalNameOrTitle('\" + name + \"')\");\n };\n /**\n * Gets a list from the collection by guid id\n *\n * @param title The Id of the list\n */\n Fields.prototype.getById = function (id) {\n var f = new Field(this);\n f.concat(\"('\" + id + \"')\");\n return f;\n };\n /**\n * Creates a field based on the specified schema\n */\n Fields.prototype.createFieldAsXml = function (xml) {\n var _this = this;\n var info;\n if (typeof xml === \"string\") {\n info = { SchemaXml: xml };\n }\n else {\n info = xml;\n }\n var postBody = JSON.stringify({\n \"parameters\": util_1.Util.extend({\n \"__metadata\": {\n \"type\": \"SP.XmlSchemaFieldCreationInformation\",\n },\n }, info),\n });\n return this.clone(Fields, \"createfieldasxml\").postAsCore({ body: postBody }).then(function (data) {\n return {\n data: data,\n field: _this.getById(data.Id),\n };\n });\n };\n /**\n * Adds a new list to the collection\n *\n * @param title The new field's title\n * @param fieldType The new field's type (ex: SP.FieldText)\n * @param properties Differ by type of field being created (see: https://msdn.microsoft.com/en-us/library/office/dn600182.aspx)\n */\n Fields.prototype.add = function (title, fieldType, properties) {\n var _this = this;\n if (properties === void 0) { properties = {}; }\n var postBody = JSON.stringify(util_1.Util.extend({\n \"Title\": title,\n \"__metadata\": { \"type\": fieldType },\n }, properties));\n return this.clone(Fields, null).postAsCore({ body: postBody }).then(function (data) {\n return {\n data: data,\n field: _this.getById(data.Id),\n };\n });\n };\n /**\n * Adds a new SP.FieldText to the collection\n *\n * @param title The field title\n * @param maxLength The maximum number of characters allowed in the value of the field.\n * @param properties Differ by type of field being created (see: https://msdn.microsoft.com/en-us/library/office/dn600182.aspx)\n */\n Fields.prototype.addText = function (title, maxLength, properties) {\n if (maxLength === void 0) { maxLength = 255; }\n var props = {\n FieldTypeKind: 2,\n MaxLength: maxLength,\n };\n return this.add(title, \"SP.FieldText\", util_1.Util.extend(props, properties));\n };\n /**\n * Adds a new SP.FieldCalculated to the collection\n *\n * @param title The field title.\n * @param formula The formula for the field.\n * @param dateFormat The date and time format that is displayed in the field.\n * @param outputType Specifies the output format for the field. Represents a FieldType value.\n * @param properties Differ by type of field being created (see: https://msdn.microsoft.com/en-us/library/office/dn600182.aspx)\n */\n Fields.prototype.addCalculated = function (title, formula, dateFormat, outputType, properties) {\n if (outputType === void 0) { outputType = types_1.FieldTypes.Text; }\n var props = {\n DateFormat: dateFormat,\n FieldTypeKind: 17,\n Formula: formula,\n OutputType: outputType,\n };\n return this.add(title, \"SP.FieldCalculated\", util_1.Util.extend(props, properties));\n };\n /**\n * Adds a new SP.FieldDateTime to the collection\n *\n * @param title The field title\n * @param displayFormat The format of the date and time that is displayed in the field.\n * @param calendarType Specifies the calendar type of the field.\n * @param properties Differ by type of field being created (see: https://msdn.microsoft.com/en-us/library/office/dn600182.aspx)\n */\n Fields.prototype.addDateTime = function (title, displayFormat, calendarType, friendlyDisplayFormat, properties) {\n if (displayFormat === void 0) { displayFormat = types_1.DateTimeFieldFormatType.DateOnly; }\n if (calendarType === void 0) { calendarType = types_1.CalendarType.Gregorian; }\n if (friendlyDisplayFormat === void 0) { friendlyDisplayFormat = 0; }\n var props = {\n DateTimeCalendarType: calendarType,\n DisplayFormat: displayFormat,\n FieldTypeKind: 4,\n FriendlyDisplayFormat: friendlyDisplayFormat,\n };\n return this.add(title, \"SP.FieldDateTime\", util_1.Util.extend(props, properties));\n };\n /**\n * Adds a new SP.FieldNumber to the collection\n *\n * @param title The field title\n * @param minValue The field's minimum value\n * @param maxValue The field's maximum value\n * @param properties Differ by type of field being created (see: https://msdn.microsoft.com/en-us/library/office/dn600182.aspx)\n */\n Fields.prototype.addNumber = function (title, minValue, maxValue, properties) {\n var props = { FieldTypeKind: 9 };\n if (typeof minValue !== \"undefined\") {\n props = util_1.Util.extend({ MinimumValue: minValue }, props);\n }\n if (typeof maxValue !== \"undefined\") {\n props = util_1.Util.extend({ MaximumValue: maxValue }, props);\n }\n return this.add(title, \"SP.FieldNumber\", util_1.Util.extend(props, properties));\n };\n /**\n * Adds a new SP.FieldCurrency to the collection\n *\n * @param title The field title\n * @param minValue The field's minimum value\n * @param maxValue The field's maximum value\n * @param currencyLocalId Specifies the language code identifier (LCID) used to format the value of the field\n * @param properties Differ by type of field being created (see: https://msdn.microsoft.com/en-us/library/office/dn600182.aspx)\n */\n Fields.prototype.addCurrency = function (title, minValue, maxValue, currencyLocalId, properties) {\n if (currencyLocalId === void 0) { currencyLocalId = 1033; }\n var props = {\n CurrencyLocaleId: currencyLocalId,\n FieldTypeKind: 10,\n };\n if (typeof minValue !== \"undefined\") {\n props = util_1.Util.extend({ MinimumValue: minValue }, props);\n }\n if (typeof maxValue !== \"undefined\") {\n props = util_1.Util.extend({ MaximumValue: maxValue }, props);\n }\n return this.add(title, \"SP.FieldCurrency\", util_1.Util.extend(props, properties));\n };\n /**\n * Adds a new SP.FieldMultiLineText to the collection\n *\n * @param title The field title\n * @param numberOfLines Specifies the number of lines of text to display for the field.\n * @param richText Specifies whether the field supports rich formatting.\n * @param restrictedMode Specifies whether the field supports a subset of rich formatting.\n * @param appendOnly Specifies whether all changes to the value of the field are displayed in list forms.\n * @param allowHyperlink Specifies whether a hyperlink is allowed as a value of the field.\n * @param properties Differ by type of field being created (see: https://msdn.microsoft.com/en-us/library/office/dn600182.aspx)\n *\n */\n Fields.prototype.addMultilineText = function (title, numberOfLines, richText, restrictedMode, appendOnly, allowHyperlink, properties) {\n if (numberOfLines === void 0) { numberOfLines = 6; }\n if (richText === void 0) { richText = true; }\n if (restrictedMode === void 0) { restrictedMode = false; }\n if (appendOnly === void 0) { appendOnly = false; }\n if (allowHyperlink === void 0) { allowHyperlink = true; }\n var props = {\n AllowHyperlink: allowHyperlink,\n AppendOnly: appendOnly,\n FieldTypeKind: 3,\n NumberOfLines: numberOfLines,\n RestrictedMode: restrictedMode,\n RichText: richText,\n };\n return this.add(title, \"SP.FieldMultiLineText\", util_1.Util.extend(props, properties));\n };\n /**\n * Adds a new SP.FieldUrl to the collection\n *\n * @param title The field title\n */\n Fields.prototype.addUrl = function (title, displayFormat, properties) {\n if (displayFormat === void 0) { displayFormat = types_1.UrlFieldFormatType.Hyperlink; }\n var props = {\n DisplayFormat: displayFormat,\n FieldTypeKind: 11,\n };\n return this.add(title, \"SP.FieldUrl\", util_1.Util.extend(props, properties));\n };\n return Fields;\n}(sharepointqueryable_1.SharePointQueryableCollection));\nexports.Fields = Fields;\n/**\n * Describes a single of Field instance\n *\n */\nvar Field = /** @class */ (function (_super) {\n __extends(Field, _super);\n function Field() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n /**\n * Updates this field intance with the supplied properties\n *\n * @param properties A plain object hash of values to update for the list\n * @param fieldType The type value, required to update child field type properties\n */\n Field.prototype.update = function (properties, fieldType) {\n var _this = this;\n if (fieldType === void 0) { fieldType = \"SP.Field\"; }\n var postBody = JSON.stringify(util_1.Util.extend({\n \"__metadata\": { \"type\": fieldType },\n }, properties));\n return this.postCore({\n body: postBody,\n headers: {\n \"X-HTTP-Method\": \"MERGE\",\n },\n }).then(function (data) {\n return {\n data: data,\n field: _this,\n };\n });\n };\n /**\n * Delete this fields\n *\n */\n Field.prototype.delete = function () {\n return this.postCore({\n headers: {\n \"X-HTTP-Method\": \"DELETE\",\n },\n });\n };\n /**\n * Sets the value of the ShowInDisplayForm property for this field.\n */\n Field.prototype.setShowInDisplayForm = function (show) {\n return this.clone(Field, \"setshowindisplayform(\" + show + \")\").postCore();\n };\n /**\n * Sets the value of the ShowInEditForm property for this field.\n */\n Field.prototype.setShowInEditForm = function (show) {\n return this.clone(Field, \"setshowineditform(\" + show + \")\").postCore();\n };\n /**\n * Sets the value of the ShowInNewForm property for this field.\n */\n Field.prototype.setShowInNewForm = function (show) {\n return this.clone(Field, \"setshowinnewform(\" + show + \")\").postCore();\n };\n return Field;\n}(sharepointqueryable_1.SharePointQueryableInstance));\nexports.Field = Field;\n\n\n/***/ }),\n/* 30 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar util_1 = __webpack_require__(0);\nvar logging_1 = __webpack_require__(3);\nvar httpclient_1 = __webpack_require__(25);\nvar utils_1 = __webpack_require__(9);\nvar pnplibconfig_1 = __webpack_require__(2);\nvar exceptions_1 = __webpack_require__(4);\n/**\n * Manages a batch of OData operations\n */\nvar ODataBatch = /** @class */ (function () {\n function ODataBatch(baseUrl, _batchId) {\n if (_batchId === void 0) { _batchId = util_1.Util.getGUID(); }\n this.baseUrl = baseUrl;\n this._batchId = _batchId;\n this._requests = [];\n this._dependencies = [];\n }\n Object.defineProperty(ODataBatch.prototype, \"batchId\", {\n get: function () {\n return this._batchId;\n },\n enumerable: true,\n configurable: true\n });\n /**\n * Adds a request to a batch (not designed for public use)\n *\n * @param url The full url of the request\n * @param method The http method GET, POST, etc\n * @param options Any options to include in the request\n * @param parser The parser that will hadle the results of the request\n */\n ODataBatch.prototype.add = function (url, method, options, parser) {\n var info = {\n method: method.toUpperCase(),\n options: options,\n parser: parser,\n reject: null,\n resolve: null,\n url: url,\n };\n var p = new Promise(function (resolve, reject) {\n info.resolve = resolve;\n info.reject = reject;\n });\n this._requests.push(info);\n return p;\n };\n /**\n * Adds a dependency insuring that some set of actions will occur before a batch is processed.\n * MUST be cleared using the returned resolve delegate to allow batches to run\n */\n ODataBatch.prototype.addDependency = function () {\n var resolver;\n var promise = new Promise(function (resolve) {\n resolver = resolve;\n });\n this._dependencies.push(promise);\n return resolver;\n };\n /**\n * Execute the current batch and resolve the associated promises\n *\n * @returns A promise which will be resolved once all of the batch's child promises have resolved\n */\n ODataBatch.prototype.execute = function () {\n var _this = this;\n // we need to check the dependencies twice due to how different engines handle things.\n // We can get a second set of promises added after the first set resolve\n return Promise.all(this._dependencies).then(function () { return Promise.all(_this._dependencies); }).then(function () { return _this.executeImpl(); });\n };\n ODataBatch.prototype.executeImpl = function () {\n var _this = this;\n logging_1.Logger.write(\"[\" + this.batchId + \"] (\" + (new Date()).getTime() + \") Executing batch with \" + this._requests.length + \" requests.\", logging_1.LogLevel.Info);\n // if we don't have any requests, don't bother sending anything\n // this could be due to caching further upstream, or just an empty batch\n if (this._requests.length < 1) {\n logging_1.Logger.write(\"Resolving empty batch.\", logging_1.LogLevel.Info);\n return Promise.resolve();\n }\n // creating the client here allows the url to be populated for nodejs client as well as potentially\n // any other hacks needed for other types of clients. Essentially allows the absoluteRequestUrl\n // below to be correct\n var client = new httpclient_1.HttpClient();\n // due to timing we need to get the absolute url here so we can use it for all the individual requests\n // and for sending the entire batch\n return util_1.Util.toAbsoluteUrl(this.baseUrl).then(function (absoluteRequestUrl) {\n // build all the requests, send them, pipe results in order to parsers\n var batchBody = [];\n var currentChangeSetId = \"\";\n for (var i = 0; i < _this._requests.length; i++) {\n var reqInfo = _this._requests[i];\n if (reqInfo.method === \"GET\") {\n if (currentChangeSetId.length > 0) {\n // end an existing change set\n batchBody.push(\"--changeset_\" + currentChangeSetId + \"--\\n\\n\");\n currentChangeSetId = \"\";\n }\n batchBody.push(\"--batch_\" + _this._batchId + \"\\n\");\n }\n else {\n if (currentChangeSetId.length < 1) {\n // start new change set\n currentChangeSetId = util_1.Util.getGUID();\n batchBody.push(\"--batch_\" + _this._batchId + \"\\n\");\n batchBody.push(\"Content-Type: multipart/mixed; boundary=\\\"changeset_\" + currentChangeSetId + \"\\\"\\n\\n\");\n }\n batchBody.push(\"--changeset_\" + currentChangeSetId + \"\\n\");\n }\n // common batch part prefix\n batchBody.push(\"Content-Type: application/http\\n\");\n batchBody.push(\"Content-Transfer-Encoding: binary\\n\\n\");\n var headers = new Headers();\n // this is the url of the individual request within the batch\n var url = util_1.Util.isUrlAbsolute(reqInfo.url) ? reqInfo.url : util_1.Util.combinePaths(absoluteRequestUrl, reqInfo.url);\n logging_1.Logger.write(\"[\" + _this.batchId + \"] (\" + (new Date()).getTime() + \") Adding request \" + reqInfo.method + \" \" + url + \" to batch.\", logging_1.LogLevel.Verbose);\n if (reqInfo.method !== \"GET\") {\n var method = reqInfo.method;\n if (reqInfo.hasOwnProperty(\"options\") && reqInfo.options.hasOwnProperty(\"headers\") && typeof reqInfo.options.headers[\"X-HTTP-Method\"] !== \"undefined\") {\n method = reqInfo.options.headers[\"X-HTTP-Method\"];\n delete reqInfo.options.headers[\"X-HTTP-Method\"];\n }\n batchBody.push(method + \" \" + url + \" HTTP/1.1\\n\");\n headers.set(\"Content-Type\", \"application/json;odata=verbose;charset=utf-8\");\n }\n else {\n batchBody.push(reqInfo.method + \" \" + url + \" HTTP/1.1\\n\");\n }\n // merge global config headers\n utils_1.mergeHeaders(headers, pnplibconfig_1.RuntimeConfig.spHeaders);\n // merge per-request headers\n if (reqInfo.options) {\n utils_1.mergeHeaders(headers, reqInfo.options.headers);\n }\n // lastly we apply any default headers we need that may not exist\n if (!headers.has(\"Accept\")) {\n headers.append(\"Accept\", \"application/json\");\n }\n if (!headers.has(\"Content-Type\")) {\n headers.append(\"Content-Type\", \"application/json;odata=verbose;charset=utf-8\");\n }\n if (!headers.has(\"X-ClientService-ClientTag\")) {\n headers.append(\"X-ClientService-ClientTag\", \"PnPCoreJS:3.0.0\");\n }\n // write headers into batch body\n headers.forEach(function (value, name) {\n batchBody.push(name + \": \" + value + \"\\n\");\n });\n batchBody.push(\"\\n\");\n if (reqInfo.options.body) {\n batchBody.push(reqInfo.options.body + \"\\n\\n\");\n }\n }\n if (currentChangeSetId.length > 0) {\n // Close the changeset\n batchBody.push(\"--changeset_\" + currentChangeSetId + \"--\\n\\n\");\n currentChangeSetId = \"\";\n }\n batchBody.push(\"--batch_\" + _this._batchId + \"--\\n\");\n var batchHeaders = {\n \"Content-Type\": \"multipart/mixed; boundary=batch_\" + _this._batchId,\n };\n var batchOptions = {\n \"body\": batchBody.join(\"\"),\n \"headers\": batchHeaders,\n \"method\": \"POST\",\n };\n logging_1.Logger.write(\"[\" + _this.batchId + \"] (\" + (new Date()).getTime() + \") Sending batch request.\", logging_1.LogLevel.Info);\n return client.fetch(util_1.Util.combinePaths(absoluteRequestUrl, \"/_api/$batch\"), batchOptions)\n .then(function (r) { return r.text(); })\n .then(_this._parseResponse)\n .then(function (responses) {\n if (responses.length !== _this._requests.length) {\n throw new exceptions_1.BatchParseException(\"Could not properly parse responses to match requests in batch.\");\n }\n logging_1.Logger.write(\"[\" + _this.batchId + \"] (\" + (new Date()).getTime() + \") Resolving batched requests.\", logging_1.LogLevel.Info);\n return responses.reduce(function (chain, response, index) {\n var request = _this._requests[index];\n logging_1.Logger.write(\"[\" + _this.batchId + \"] (\" + (new Date()).getTime() + \") Resolving batched request \" + request.method + \" \" + request.url + \".\", logging_1.LogLevel.Verbose);\n return chain.then(function (_) { return request.parser.parse(response).then(request.resolve).catch(request.reject); });\n }, Promise.resolve());\n });\n });\n };\n /**\n * Parses the response from a batch request into an array of Response instances\n *\n * @param body Text body of the response from the batch request\n */\n ODataBatch.prototype._parseResponse = function (body) {\n return new Promise(function (resolve, reject) {\n var responses = [];\n var header = \"--batchresponse_\";\n // Ex. \"HTTP/1.1 500 Internal Server Error\"\n var statusRegExp = new RegExp(\"^HTTP/[0-9.]+ +([0-9]+) +(.*)\", \"i\");\n var lines = body.split(\"\\n\");\n var state = \"batch\";\n var status;\n var statusText;\n for (var i = 0; i < lines.length; ++i) {\n var line = lines[i];\n switch (state) {\n case \"batch\":\n if (line.substr(0, header.length) === header) {\n state = \"batchHeaders\";\n }\n else {\n if (line.trim() !== \"\") {\n throw new exceptions_1.BatchParseException(\"Invalid response, line \" + i);\n }\n }\n break;\n case \"batchHeaders\":\n if (line.trim() === \"\") {\n state = \"status\";\n }\n break;\n case \"status\":\n var parts = statusRegExp.exec(line);\n if (parts.length !== 3) {\n throw new exceptions_1.BatchParseException(\"Invalid status, line \" + i);\n }\n status = parseInt(parts[1], 10);\n statusText = parts[2];\n state = \"statusHeaders\";\n break;\n case \"statusHeaders\":\n if (line.trim() === \"\") {\n state = \"body\";\n }\n break;\n case \"body\":\n responses.push((status === 204) ? new Response() : new Response(line, { status: status, statusText: statusText }));\n state = \"batch\";\n break;\n }\n }\n if (state !== \"status\") {\n reject(new exceptions_1.BatchParseException(\"Unexpected end of input\"));\n }\n resolve(responses);\n });\n };\n return ODataBatch;\n}());\nexports.ODataBatch = ODataBatch;\n\n\n/***/ }),\n/* 31 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar sharepointqueryable_1 = __webpack_require__(1);\n/**\n * Describes a collection of List objects\n *\n */\nvar Features = /** @class */ (function (_super) {\n __extends(Features, _super);\n /**\n * Creates a new instance of the Lists class\n *\n * @param baseUrl The url or SharePointQueryable which forms the parent of this fields collection\n */\n function Features(baseUrl, path) {\n if (path === void 0) { path = \"features\"; }\n return _super.call(this, baseUrl, path) || this;\n }\n /**\n * Gets a list from the collection by guid id\n *\n * @param id The Id of the feature (GUID)\n */\n Features.prototype.getById = function (id) {\n var feature = new Feature(this);\n feature.concat(\"('\" + id + \"')\");\n return feature;\n };\n /**\n * Adds a new list to the collection\n *\n * @param id The Id of the feature (GUID)\n * @param force If true the feature activation will be forced\n */\n Features.prototype.add = function (id, force) {\n var _this = this;\n if (force === void 0) { force = false; }\n return this.clone(Features, \"add\").postCore({\n body: JSON.stringify({\n featdefScope: 0,\n featureId: id,\n force: force,\n }),\n }).then(function (data) {\n return {\n data: data,\n feature: _this.getById(id),\n };\n });\n };\n /**\n * Removes (deactivates) a feature from the collection\n *\n * @param id The Id of the feature (GUID)\n * @param force If true the feature deactivation will be forced\n */\n Features.prototype.remove = function (id, force) {\n if (force === void 0) { force = false; }\n return this.clone(Features, \"remove\").postCore({\n body: JSON.stringify({\n featureId: id,\n force: force,\n }),\n });\n };\n return Features;\n}(sharepointqueryable_1.SharePointQueryableCollection));\nexports.Features = Features;\nvar Feature = /** @class */ (function (_super) {\n __extends(Feature, _super);\n function Feature() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n /**\n * Removes (deactivates) a feature from the collection\n *\n * @param force If true the feature deactivation will be forced\n */\n Feature.prototype.deactivate = function (force) {\n var _this = this;\n if (force === void 0) { force = false; }\n var removeDependency = this.addBatchDependency();\n var idGet = new Feature(this).select(\"DefinitionId\");\n return idGet.getAs().then(function (feature) {\n var promise = _this.getParent(Features, _this.parentUrl, \"\", _this.batch).remove(feature.DefinitionId, force);\n removeDependency();\n return promise;\n });\n };\n return Feature;\n}(sharepointqueryable_1.SharePointQueryableInstance));\nexports.Feature = Feature;\n\n\n/***/ }),\n/* 32 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar util_1 = __webpack_require__(0);\nvar storage_1 = __webpack_require__(23);\nvar configuration_1 = __webpack_require__(34);\nvar logging_1 = __webpack_require__(3);\nvar rest_1 = __webpack_require__(35);\nvar pnplibconfig_1 = __webpack_require__(2);\nvar rest_2 = __webpack_require__(51);\n/**\n * Root class of the Patterns and Practices namespace, provides an entry point to the library\n */\n/**\n * Utility methods\n */\nexports.util = util_1.Util;\n/**\n * Provides access to the SharePoint REST interface\n */\nexports.sp = new rest_1.SPRest();\n/**\n * Provides access to the Microsoft Graph REST interface\n */\nexports.graph = new rest_2.GraphRest();\n/**\n * Provides access to local and session storage\n */\nexports.storage = new storage_1.PnPClientStorage();\n/**\n * Global configuration instance to which providers can be added\n */\nexports.config = new configuration_1.Settings();\n/**\n * Global logging instance to which subscribers can be registered and messages written\n */\nexports.log = logging_1.Logger;\n/**\n * Allows for the configuration of the library\n */\nexports.setup = pnplibconfig_1.setRuntimeConfig;\n// /**\n// * Expose a subset of classes from the library for public consumption\n// */\n// creating this class instead of directly assigning to default fixes issue #116\nvar Def = {\n /**\n * Global configuration instance to which providers can be added\n */\n config: exports.config,\n /**\n * Provides access to the Microsoft Graph REST interface\n */\n graph: exports.graph,\n /**\n * Global logging instance to which subscribers can be registered and messages written\n */\n log: exports.log,\n /**\n * Provides access to local and session storage\n */\n setup: exports.setup,\n /**\n * Provides access to the REST interface\n */\n sp: exports.sp,\n /**\n * Provides access to local and session storage\n */\n storage: exports.storage,\n /**\n * Utility methods\n */\n util: exports.util,\n};\n/**\n * Enables use of the import pnp from syntax\n */\nexports.default = Def;\n\n\n/***/ }),\n/* 33 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/* WEBPACK VAR INJECTION */(function(global) {\nObject.defineProperty(exports, \"__esModule\", { value: true });\n/**\n * Makes requests using the fetch API\n */\nvar FetchClient = /** @class */ (function () {\n function FetchClient() {\n }\n FetchClient.prototype.fetch = function (url, options) {\n return global.fetch(url, options);\n };\n return FetchClient;\n}());\nexports.FetchClient = FetchClient;\n\n/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(22)))\n\n/***/ }),\n/* 34 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar collections_1 = __webpack_require__(8);\n/**\n * Class used to manage the current application settings\n *\n */\nvar Settings = /** @class */ (function () {\n /**\n * Creates a new instance of the settings class\n *\n * @constructor\n */\n function Settings() {\n this._settings = new collections_1.Dictionary();\n }\n /**\n * Adds a new single setting, or overwrites a previous setting with the same key\n *\n * @param {string} key The key used to store this setting\n * @param {string} value The setting value to store\n */\n Settings.prototype.add = function (key, value) {\n this._settings.add(key, value);\n };\n /**\n * Adds a JSON value to the collection as a string, you must use getJSON to rehydrate the object when read\n *\n * @param {string} key The key used to store this setting\n * @param {any} value The setting value to store\n */\n Settings.prototype.addJSON = function (key, value) {\n this._settings.add(key, JSON.stringify(value));\n };\n /**\n * Applies the supplied hash to the setting collection overwriting any existing value, or created new values\n *\n * @param {TypedHash} hash The set of values to add\n */\n Settings.prototype.apply = function (hash) {\n var _this = this;\n return new Promise(function (resolve, reject) {\n try {\n _this._settings.merge(hash);\n resolve();\n }\n catch (e) {\n reject(e);\n }\n });\n };\n /**\n * Loads configuration settings into the collection from the supplied provider and returns a Promise\n *\n * @param {IConfigurationProvider} provider The provider from which we will load the settings\n */\n Settings.prototype.load = function (provider) {\n var _this = this;\n return new Promise(function (resolve, reject) {\n provider.getConfiguration().then(function (value) {\n _this._settings.merge(value);\n resolve();\n }).catch(function (reason) {\n reject(reason);\n });\n });\n };\n /**\n * Gets a value from the configuration\n *\n * @param {string} key The key whose value we want to return. Returns null if the key does not exist\n * @return {string} string value from the configuration\n */\n Settings.prototype.get = function (key) {\n return this._settings.get(key);\n };\n /**\n * Gets a JSON value, rehydrating the stored string to the original object\n *\n * @param {string} key The key whose value we want to return. Returns null if the key does not exist\n * @return {any} object from the configuration\n */\n Settings.prototype.getJSON = function (key) {\n var o = this.get(key);\n if (typeof o === \"undefined\" || o === null) {\n return o;\n }\n return JSON.parse(o);\n };\n return Settings;\n}());\nexports.Settings = Settings;\n\n\n/***/ }),\n/* 35 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar search_1 = __webpack_require__(36);\nvar searchsuggest_1 = __webpack_require__(39);\nvar site_1 = __webpack_require__(40);\nvar webs_1 = __webpack_require__(10);\nvar util_1 = __webpack_require__(0);\nvar userprofiles_1 = __webpack_require__(48);\nvar exceptions_1 = __webpack_require__(4);\nvar utilities_1 = __webpack_require__(50);\n/**\n * Root of the SharePoint REST module\n */\nvar SPRest = /** @class */ (function () {\n /**\n * Creates a new instance of the SPRest class\n *\n * @param options Additional options\n * @param baseUrl A string that should form the base part of the url\n */\n function SPRest(options, baseUrl) {\n if (options === void 0) { options = {}; }\n if (baseUrl === void 0) { baseUrl = \"\"; }\n this._options = options;\n this._baseUrl = baseUrl;\n }\n /**\n * Configures instance with additional options and baseUrl.\n * Provided configuration used by other objects in a chain\n *\n * @param options Additional options\n * @param baseUrl A string that should form the base part of the url\n */\n SPRest.prototype.configure = function (options, baseUrl) {\n if (baseUrl === void 0) { baseUrl = \"\"; }\n return new SPRest(options, baseUrl);\n };\n /**\n * Executes a search against this web context\n *\n * @param query The SearchQuery definition\n */\n SPRest.prototype.searchSuggest = function (query) {\n var finalQuery;\n if (typeof query === \"string\") {\n finalQuery = { querytext: query };\n }\n else {\n finalQuery = query;\n }\n return new searchsuggest_1.SearchSuggest(this._baseUrl).configure(this._options).execute(finalQuery);\n };\n /**\n * Executes a search against this web context\n *\n * @param query The SearchQuery definition\n */\n SPRest.prototype.search = function (query) {\n var finalQuery;\n if (typeof query === \"string\") {\n finalQuery = { Querytext: query };\n }\n else if (query instanceof search_1.SearchQueryBuilder) {\n finalQuery = query.toSearchQuery();\n }\n else {\n finalQuery = query;\n }\n return new search_1.Search(this._baseUrl).configure(this._options).execute(finalQuery);\n };\n Object.defineProperty(SPRest.prototype, \"site\", {\n /**\n * Begins a site collection scoped REST request\n *\n */\n get: function () {\n return new site_1.Site(this._baseUrl).configure(this._options);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(SPRest.prototype, \"web\", {\n /**\n * Begins a web scoped REST request\n *\n */\n get: function () {\n return new webs_1.Web(this._baseUrl).configure(this._options);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(SPRest.prototype, \"profiles\", {\n /**\n * Access to user profile methods\n *\n */\n get: function () {\n return new userprofiles_1.UserProfileQuery(this._baseUrl).configure(this._options);\n },\n enumerable: true,\n configurable: true\n });\n /**\n * Creates a new batch object for use with the SharePointQueryable.addToBatch method\n *\n */\n SPRest.prototype.createBatch = function () {\n return this.web.createBatch();\n };\n Object.defineProperty(SPRest.prototype, \"utility\", {\n /**\n * Static utilities methods from SP.Utilities.Utility\n */\n get: function () {\n return new utilities_1.UtilityMethod(this._baseUrl, \"\").configure(this._options);\n },\n enumerable: true,\n configurable: true\n });\n /**\n * Begins a cross-domain, host site scoped REST request, for use in add-in webs\n *\n * @param addInWebUrl The absolute url of the add-in web\n * @param hostWebUrl The absolute url of the host web\n */\n SPRest.prototype.crossDomainSite = function (addInWebUrl, hostWebUrl) {\n return this._cdImpl(site_1.Site, addInWebUrl, hostWebUrl, \"site\");\n };\n /**\n * Begins a cross-domain, host web scoped REST request, for use in add-in webs\n *\n * @param addInWebUrl The absolute url of the add-in web\n * @param hostWebUrl The absolute url of the host web\n */\n SPRest.prototype.crossDomainWeb = function (addInWebUrl, hostWebUrl) {\n return this._cdImpl(webs_1.Web, addInWebUrl, hostWebUrl, \"web\");\n };\n /**\n * Implements the creation of cross domain REST urls\n *\n * @param factory The constructor of the object to create Site | Web\n * @param addInWebUrl The absolute url of the add-in web\n * @param hostWebUrl The absolute url of the host web\n * @param urlPart String part to append to the url \"site\" | \"web\"\n */\n SPRest.prototype._cdImpl = function (factory, addInWebUrl, hostWebUrl, urlPart) {\n if (!util_1.Util.isUrlAbsolute(addInWebUrl)) {\n throw new exceptions_1.UrlException(\"The addInWebUrl parameter must be an absolute url.\");\n }\n if (!util_1.Util.isUrlAbsolute(hostWebUrl)) {\n throw new exceptions_1.UrlException(\"The hostWebUrl parameter must be an absolute url.\");\n }\n var url = util_1.Util.combinePaths(addInWebUrl, \"_api/SP.AppContextSite(@target)\");\n var instance = new factory(url, urlPart);\n instance.query.add(\"@target\", \"'\" + encodeURIComponent(hostWebUrl) + \"'\");\n return instance.configure(this._options);\n };\n return SPRest;\n}());\nexports.SPRest = SPRest;\n\n\n/***/ }),\n/* 36 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar sharepointqueryable_1 = __webpack_require__(1);\nvar util_1 = __webpack_require__(0);\n/**\n * Allows for the fluent construction of search queries\n */\nvar SearchQueryBuilder = /** @class */ (function () {\n function SearchQueryBuilder(queryText, _query) {\n if (queryText === void 0) { queryText = \"\"; }\n if (_query === void 0) { _query = {}; }\n this._query = _query;\n if (typeof queryText === \"string\" && queryText.length > 0) {\n this.extendQuery({ Querytext: queryText });\n }\n }\n SearchQueryBuilder.create = function (queryText, queryTemplate) {\n if (queryText === void 0) { queryText = \"\"; }\n if (queryTemplate === void 0) { queryTemplate = {}; }\n return new SearchQueryBuilder(queryText, queryTemplate);\n };\n SearchQueryBuilder.prototype.text = function (queryText) {\n return this.extendQuery({ Querytext: queryText });\n };\n SearchQueryBuilder.prototype.template = function (template) {\n return this.extendQuery({ QueryTemplate: template });\n };\n SearchQueryBuilder.prototype.sourceId = function (id) {\n return this.extendQuery({ SourceId: id });\n };\n Object.defineProperty(SearchQueryBuilder.prototype, \"enableInterleaving\", {\n get: function () {\n return this.extendQuery({ EnableInterleaving: true });\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(SearchQueryBuilder.prototype, \"enableStemming\", {\n get: function () {\n return this.extendQuery({ EnableStemming: true });\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(SearchQueryBuilder.prototype, \"trimDuplicates\", {\n get: function () {\n return this.extendQuery({ TrimDuplicates: true });\n },\n enumerable: true,\n configurable: true\n });\n SearchQueryBuilder.prototype.trimDuplicatesIncludeId = function (n) {\n return this.extendQuery({ TrimDuplicatesIncludeId: n });\n };\n Object.defineProperty(SearchQueryBuilder.prototype, \"enableNicknames\", {\n get: function () {\n return this.extendQuery({ EnableNicknames: true });\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(SearchQueryBuilder.prototype, \"enableFql\", {\n get: function () {\n return this.extendQuery({ EnableFQL: true });\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(SearchQueryBuilder.prototype, \"enablePhonetic\", {\n get: function () {\n return this.extendQuery({ EnablePhonetic: true });\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(SearchQueryBuilder.prototype, \"bypassResultTypes\", {\n get: function () {\n return this.extendQuery({ BypassResultTypes: true });\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(SearchQueryBuilder.prototype, \"processBestBets\", {\n get: function () {\n return this.extendQuery({ ProcessBestBets: true });\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(SearchQueryBuilder.prototype, \"enableQueryRules\", {\n get: function () {\n return this.extendQuery({ EnableQueryRules: true });\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(SearchQueryBuilder.prototype, \"enableSorting\", {\n get: function () {\n return this.extendQuery({ EnableSorting: true });\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(SearchQueryBuilder.prototype, \"generateBlockRankLog\", {\n get: function () {\n return this.extendQuery({ GenerateBlockRankLog: true });\n },\n enumerable: true,\n configurable: true\n });\n SearchQueryBuilder.prototype.rankingModelId = function (id) {\n return this.extendQuery({ RankingModelId: id });\n };\n SearchQueryBuilder.prototype.startRow = function (n) {\n return this.extendQuery({ StartRow: n });\n };\n SearchQueryBuilder.prototype.rowLimit = function (n) {\n return this.extendQuery({ RowLimit: n });\n };\n SearchQueryBuilder.prototype.rowsPerPage = function (n) {\n return this.extendQuery({ RowsPerPage: n });\n };\n SearchQueryBuilder.prototype.selectProperties = function () {\n var properties = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n properties[_i] = arguments[_i];\n }\n return this.extendQuery({ SelectProperties: properties });\n };\n SearchQueryBuilder.prototype.culture = function (culture) {\n return this.extendQuery({ Culture: culture });\n };\n SearchQueryBuilder.prototype.timeZoneId = function (id) {\n return this.extendQuery({ TimeZoneId: id });\n };\n SearchQueryBuilder.prototype.refinementFilters = function () {\n var filters = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n filters[_i] = arguments[_i];\n }\n return this.extendQuery({ RefinementFilters: filters });\n };\n SearchQueryBuilder.prototype.refiners = function (refiners) {\n return this.extendQuery({ Refiners: refiners });\n };\n SearchQueryBuilder.prototype.hiddenConstraints = function (constraints) {\n return this.extendQuery({ HiddenConstraints: constraints });\n };\n SearchQueryBuilder.prototype.sortList = function () {\n var sorts = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n sorts[_i] = arguments[_i];\n }\n return this.extendQuery({ SortList: sorts });\n };\n SearchQueryBuilder.prototype.timeout = function (milliseconds) {\n return this.extendQuery({ Timeout: milliseconds });\n };\n SearchQueryBuilder.prototype.hithighlightedProperties = function () {\n var properties = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n properties[_i] = arguments[_i];\n }\n return this.extendQuery({ HitHighlightedProperties: properties });\n };\n SearchQueryBuilder.prototype.clientType = function (clientType) {\n return this.extendQuery({ ClientType: clientType });\n };\n SearchQueryBuilder.prototype.personalizationData = function (data) {\n return this.extendQuery({ PersonalizationData: data });\n };\n SearchQueryBuilder.prototype.resultsURL = function (url) {\n return this.extendQuery({ ResultsUrl: url });\n };\n SearchQueryBuilder.prototype.queryTag = function () {\n var tags = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n tags[_i] = arguments[_i];\n }\n return this.extendQuery({ QueryTag: tags });\n };\n SearchQueryBuilder.prototype.properties = function () {\n var properties = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n properties[_i] = arguments[_i];\n }\n return this.extendQuery({ Properties: properties });\n };\n Object.defineProperty(SearchQueryBuilder.prototype, \"processPersonalFavorites\", {\n get: function () {\n return this.extendQuery({ ProcessPersonalFavorites: true });\n },\n enumerable: true,\n configurable: true\n });\n SearchQueryBuilder.prototype.queryTemplatePropertiesUrl = function (url) {\n return this.extendQuery({ QueryTemplatePropertiesUrl: url });\n };\n SearchQueryBuilder.prototype.reorderingRules = function () {\n var rules = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n rules[_i] = arguments[_i];\n }\n return this.extendQuery({ ReorderingRules: rules });\n };\n SearchQueryBuilder.prototype.hitHighlightedMultivaluePropertyLimit = function (limit) {\n return this.extendQuery({ HitHighlightedMultivaluePropertyLimit: limit });\n };\n Object.defineProperty(SearchQueryBuilder.prototype, \"enableOrderingHitHighlightedProperty\", {\n get: function () {\n return this.extendQuery({ EnableOrderingHitHighlightedProperty: true });\n },\n enumerable: true,\n configurable: true\n });\n SearchQueryBuilder.prototype.collapseSpecification = function (spec) {\n return this.extendQuery({ CollapseSpecification: spec });\n };\n SearchQueryBuilder.prototype.uiLanguage = function (lang) {\n return this.extendQuery({ UILanguage: lang });\n };\n SearchQueryBuilder.prototype.desiredSnippetLength = function (len) {\n return this.extendQuery({ DesiredSnippetLength: len });\n };\n SearchQueryBuilder.prototype.maxSnippetLength = function (len) {\n return this.extendQuery({ MaxSnippetLength: len });\n };\n SearchQueryBuilder.prototype.summaryLength = function (len) {\n return this.extendQuery({ SummaryLength: len });\n };\n SearchQueryBuilder.prototype.toSearchQuery = function () {\n return this._query;\n };\n SearchQueryBuilder.prototype.extendQuery = function (part) {\n this._query = util_1.Util.extend(this._query, part);\n return this;\n };\n return SearchQueryBuilder;\n}());\nexports.SearchQueryBuilder = SearchQueryBuilder;\n/**\n * Describes the search API\n *\n */\nvar Search = /** @class */ (function (_super) {\n __extends(Search, _super);\n /**\n * Creates a new instance of the Search class\n *\n * @param baseUrl The url for the search context\n * @param query The SearchQuery object to execute\n */\n function Search(baseUrl, path) {\n if (path === void 0) { path = \"_api/search/postquery\"; }\n return _super.call(this, baseUrl, path) || this;\n }\n /**\n * .......\n * @returns Promise\n */\n Search.prototype.execute = function (query) {\n var _this = this;\n var formattedBody;\n formattedBody = query;\n if (formattedBody.SelectProperties) {\n formattedBody.SelectProperties = this.fixupProp(query.SelectProperties);\n }\n if (formattedBody.RefinementFilters) {\n formattedBody.RefinementFilters = this.fixupProp(query.RefinementFilters);\n }\n if (formattedBody.SortList) {\n formattedBody.SortList = this.fixupProp(query.SortList);\n }\n if (formattedBody.HithighlightedProperties) {\n formattedBody.HithighlightedProperties = this.fixupProp(query.HitHighlightedProperties);\n }\n if (formattedBody.ReorderingRules) {\n formattedBody.ReorderingRules = this.fixupProp(query.ReorderingRules);\n }\n if (formattedBody.Properties) {\n formattedBody.Properties = this.fixupProp(query.Properties);\n }\n var postBody = JSON.stringify({\n request: util_1.Util.extend({\n \"__metadata\": { \"type\": \"Microsoft.Office.Server.Search.REST.SearchRequest\" },\n }, formattedBody),\n });\n return this.postCore({ body: postBody }).then(function (data) { return new SearchResults(data, _this.toUrl(), query); });\n };\n /**\n * Fixes up properties that expect to consist of a \"results\" collection when needed\n *\n * @param prop property to fixup for container struct\n */\n Search.prototype.fixupProp = function (prop) {\n if (prop.hasOwnProperty(\"results\")) {\n return prop;\n }\n return { results: prop };\n };\n return Search;\n}(sharepointqueryable_1.SharePointQueryableInstance));\nexports.Search = Search;\n/**\n * Describes the SearchResults class, which returns the formatted and raw version of the query response\n */\nvar SearchResults = /** @class */ (function () {\n /**\n * Creates a new instance of the SearchResult class\n *\n */\n function SearchResults(rawResponse, _url, _query, _raw, _primary) {\n if (_raw === void 0) { _raw = null; }\n if (_primary === void 0) { _primary = null; }\n this._url = _url;\n this._query = _query;\n this._raw = _raw;\n this._primary = _primary;\n this._raw = rawResponse.postquery ? rawResponse.postquery : rawResponse;\n }\n Object.defineProperty(SearchResults.prototype, \"ElapsedTime\", {\n get: function () {\n return this.RawSearchResults.ElapsedTime;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(SearchResults.prototype, \"RowCount\", {\n get: function () {\n return this.RawSearchResults.PrimaryQueryResult.RelevantResults.RowCount;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(SearchResults.prototype, \"TotalRows\", {\n get: function () {\n return this.RawSearchResults.PrimaryQueryResult.RelevantResults.TotalRows;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(SearchResults.prototype, \"TotalRowsIncludingDuplicates\", {\n get: function () {\n return this.RawSearchResults.PrimaryQueryResult.RelevantResults.TotalRowsIncludingDuplicates;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(SearchResults.prototype, \"RawSearchResults\", {\n get: function () {\n return this._raw;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(SearchResults.prototype, \"PrimarySearchResults\", {\n get: function () {\n if (this._primary === null) {\n this._primary = this.formatSearchResults(this._raw.PrimaryQueryResult.RelevantResults.Table.Rows);\n }\n return this._primary;\n },\n enumerable: true,\n configurable: true\n });\n /**\n * Gets a page of results\n *\n * @param pageNumber Index of the page to return. Used to determine StartRow\n * @param pageSize Optional, items per page (default = 10)\n */\n SearchResults.prototype.getPage = function (pageNumber, pageSize) {\n // if we got all the available rows we don't have another page\n if (this.TotalRows < this.RowCount) {\n return Promise.resolve(null);\n }\n // if pageSize is supplied, then we use that regardless of any previous values\n // otherwise get the previous RowLimit or default to 10\n var rows = typeof pageSize !== \"undefined\" ? pageSize : this._query.hasOwnProperty(\"RowLimit\") ? this._query.RowLimit : 10;\n var query = util_1.Util.extend(this._query, {\n RowLimit: rows,\n StartRow: rows * (pageNumber - 1),\n });\n // we have reached the end\n if (query.StartRow > this.TotalRows) {\n return Promise.resolve(null);\n }\n var search = new Search(this._url, null);\n return search.execute(query);\n };\n /**\n * Formats a search results array\n *\n * @param rawResults The array to process\n */\n SearchResults.prototype.formatSearchResults = function (rawResults) {\n var results = new Array();\n var tempResults = rawResults.results ? rawResults.results : rawResults;\n for (var _i = 0, tempResults_1 = tempResults; _i < tempResults_1.length; _i++) {\n var tempResult = tempResults_1[_i];\n var cells = tempResult.Cells.results ? tempResult.Cells.results : tempResult.Cells;\n results.push(cells.reduce(function (res, cell) {\n Object.defineProperty(res, cell.Key, {\n configurable: false,\n enumerable: false,\n value: cell.Value,\n writable: false,\n });\n return res;\n }, {}));\n }\n return results;\n };\n return SearchResults;\n}());\nexports.SearchResults = SearchResults;\n/**\n * defines the SortDirection enum\n */\nvar SortDirection;\n(function (SortDirection) {\n SortDirection[SortDirection[\"Ascending\"] = 0] = \"Ascending\";\n SortDirection[SortDirection[\"Descending\"] = 1] = \"Descending\";\n SortDirection[SortDirection[\"FQLFormula\"] = 2] = \"FQLFormula\";\n})(SortDirection = exports.SortDirection || (exports.SortDirection = {}));\n/**\n * defines the ReorderingRuleMatchType enum\n */\nvar ReorderingRuleMatchType;\n(function (ReorderingRuleMatchType) {\n ReorderingRuleMatchType[ReorderingRuleMatchType[\"ResultContainsKeyword\"] = 0] = \"ResultContainsKeyword\";\n ReorderingRuleMatchType[ReorderingRuleMatchType[\"TitleContainsKeyword\"] = 1] = \"TitleContainsKeyword\";\n ReorderingRuleMatchType[ReorderingRuleMatchType[\"TitleMatchesKeyword\"] = 2] = \"TitleMatchesKeyword\";\n ReorderingRuleMatchType[ReorderingRuleMatchType[\"UrlStartsWith\"] = 3] = \"UrlStartsWith\";\n ReorderingRuleMatchType[ReorderingRuleMatchType[\"UrlExactlyMatches\"] = 4] = \"UrlExactlyMatches\";\n ReorderingRuleMatchType[ReorderingRuleMatchType[\"ContentTypeIs\"] = 5] = \"ContentTypeIs\";\n ReorderingRuleMatchType[ReorderingRuleMatchType[\"FileExtensionMatches\"] = 6] = \"FileExtensionMatches\";\n ReorderingRuleMatchType[ReorderingRuleMatchType[\"ResultHasTag\"] = 7] = \"ResultHasTag\";\n ReorderingRuleMatchType[ReorderingRuleMatchType[\"ManualCondition\"] = 8] = \"ManualCondition\";\n})(ReorderingRuleMatchType = exports.ReorderingRuleMatchType || (exports.ReorderingRuleMatchType = {}));\n/**\n * Specifies the type value for the property\n */\nvar QueryPropertyValueType;\n(function (QueryPropertyValueType) {\n QueryPropertyValueType[QueryPropertyValueType[\"None\"] = 0] = \"None\";\n QueryPropertyValueType[QueryPropertyValueType[\"StringType\"] = 1] = \"StringType\";\n QueryPropertyValueType[QueryPropertyValueType[\"Int32TYpe\"] = 2] = \"Int32TYpe\";\n QueryPropertyValueType[QueryPropertyValueType[\"BooleanType\"] = 3] = \"BooleanType\";\n QueryPropertyValueType[QueryPropertyValueType[\"StringArrayType\"] = 4] = \"StringArrayType\";\n QueryPropertyValueType[QueryPropertyValueType[\"UnSupportedType\"] = 5] = \"UnSupportedType\";\n})(QueryPropertyValueType = exports.QueryPropertyValueType || (exports.QueryPropertyValueType = {}));\nvar SearchBuiltInSourceId = /** @class */ (function () {\n function SearchBuiltInSourceId() {\n }\n SearchBuiltInSourceId.Documents = \"e7ec8cee-ded8-43c9-beb5-436b54b31e84\";\n SearchBuiltInSourceId.ItemsMatchingContentType = \"5dc9f503-801e-4ced-8a2c-5d1237132419\";\n SearchBuiltInSourceId.ItemsMatchingTag = \"e1327b9c-2b8c-4b23-99c9-3730cb29c3f7\";\n SearchBuiltInSourceId.ItemsRelatedToCurrentUser = \"48fec42e-4a92-48ce-8363-c2703a40e67d\";\n SearchBuiltInSourceId.ItemsWithSameKeywordAsThisItem = \"5c069288-1d17-454a-8ac6-9c642a065f48\";\n SearchBuiltInSourceId.LocalPeopleResults = \"b09a7990-05ea-4af9-81ef-edfab16c4e31\";\n SearchBuiltInSourceId.LocalReportsAndDataResults = \"203fba36-2763-4060-9931-911ac8c0583b\";\n SearchBuiltInSourceId.LocalSharePointResults = \"8413cd39-2156-4e00-b54d-11efd9abdb89\";\n SearchBuiltInSourceId.LocalVideoResults = \"78b793ce-7956-4669-aa3b-451fc5defebf\";\n SearchBuiltInSourceId.Pages = \"5e34578e-4d08-4edc-8bf3-002acf3cdbcc\";\n SearchBuiltInSourceId.Pictures = \"38403c8c-3975-41a8-826e-717f2d41568a\";\n SearchBuiltInSourceId.Popular = \"97c71db1-58ce-4891-8b64-585bc2326c12\";\n SearchBuiltInSourceId.RecentlyChangedItems = \"ba63bbae-fa9c-42c0-b027-9a878f16557c\";\n SearchBuiltInSourceId.RecommendedItems = \"ec675252-14fa-4fbe-84dd-8d098ed74181\";\n SearchBuiltInSourceId.Wiki = \"9479bf85-e257-4318-b5a8-81a180f5faa1\";\n return SearchBuiltInSourceId;\n}());\nexports.SearchBuiltInSourceId = SearchBuiltInSourceId;\n\n\n/***/ }),\n/* 37 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar storage_1 = __webpack_require__(23);\nvar util_1 = __webpack_require__(0);\nvar pnplibconfig_1 = __webpack_require__(2);\nvar CachingOptions = /** @class */ (function () {\n function CachingOptions(key) {\n this.key = key;\n this.expiration = util_1.Util.dateAdd(new Date(), \"second\", pnplibconfig_1.RuntimeConfig.defaultCachingTimeoutSeconds);\n this.storeName = pnplibconfig_1.RuntimeConfig.defaultCachingStore;\n }\n Object.defineProperty(CachingOptions.prototype, \"store\", {\n get: function () {\n if (this.storeName === \"local\") {\n return CachingOptions.storage.local;\n }\n else {\n return CachingOptions.storage.session;\n }\n },\n enumerable: true,\n configurable: true\n });\n CachingOptions.storage = new storage_1.PnPClientStorage();\n return CachingOptions;\n}());\nexports.CachingOptions = CachingOptions;\nvar CachingParserWrapper = /** @class */ (function () {\n function CachingParserWrapper(_parser, _cacheOptions) {\n this._parser = _parser;\n this._cacheOptions = _cacheOptions;\n }\n CachingParserWrapper.prototype.parse = function (response) {\n var _this = this;\n // add this to the cache based on the options\n return this._parser.parse(response).then(function (data) {\n if (_this._cacheOptions.store !== null) {\n _this._cacheOptions.store.put(_this._cacheOptions.key, data, _this._cacheOptions.expiration);\n }\n return data;\n });\n };\n return CachingParserWrapper;\n}());\nexports.CachingParserWrapper = CachingParserWrapper;\n\n\n/***/ }),\n/* 38 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar collections_1 = __webpack_require__(8);\nvar util_1 = __webpack_require__(0);\nvar parsers_1 = __webpack_require__(7);\nvar pnplibconfig_1 = __webpack_require__(2);\nvar CachedDigest = /** @class */ (function () {\n function CachedDigest() {\n }\n return CachedDigest;\n}());\nexports.CachedDigest = CachedDigest;\n// allows for the caching of digests across all HttpClient's which each have their own DigestCache wrapper.\nvar digests = new collections_1.Dictionary();\nvar DigestCache = /** @class */ (function () {\n function DigestCache(_httpClient, _digests) {\n if (_digests === void 0) { _digests = digests; }\n this._httpClient = _httpClient;\n this._digests = _digests;\n }\n DigestCache.prototype.getDigest = function (webUrl) {\n var _this = this;\n var cachedDigest = this._digests.get(webUrl);\n if (cachedDigest !== null) {\n var now = new Date();\n if (now < cachedDigest.expiration) {\n return Promise.resolve(cachedDigest.value);\n }\n }\n var url = util_1.Util.combinePaths(webUrl, \"/_api/contextinfo\");\n var headers = {\n \"Accept\": \"application/json;odata=verbose\",\n \"Content-Type\": \"application/json;odata=verbose;charset=utf-8\",\n };\n return this._httpClient.fetchRaw(url, {\n cache: \"no-cache\",\n credentials: \"same-origin\",\n headers: util_1.Util.extend(headers, pnplibconfig_1.RuntimeConfig.spHeaders, true),\n method: \"POST\",\n }).then(function (response) {\n var parser = new parsers_1.ODataDefaultParser();\n return parser.parse(response).then(function (d) { return d.GetContextWebInformation; });\n }).then(function (data) {\n var newCachedDigest = new CachedDigest();\n newCachedDigest.value = data.FormDigestValue;\n var seconds = data.FormDigestTimeoutSeconds;\n var expiration = new Date();\n expiration.setTime(expiration.getTime() + 1000 * seconds);\n newCachedDigest.expiration = expiration;\n _this._digests.add(webUrl, newCachedDigest);\n return newCachedDigest.value;\n });\n };\n DigestCache.prototype.clear = function () {\n this._digests.clear();\n };\n return DigestCache;\n}());\nexports.DigestCache = DigestCache;\n\n\n/***/ }),\n/* 39 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar sharepointqueryable_1 = __webpack_require__(1);\nvar SearchSuggest = /** @class */ (function (_super) {\n __extends(SearchSuggest, _super);\n function SearchSuggest(baseUrl, path) {\n if (path === void 0) { path = \"_api/search/suggest\"; }\n return _super.call(this, baseUrl, path) || this;\n }\n SearchSuggest.prototype.execute = function (query) {\n this.mapQueryToQueryString(query);\n return this.get().then(function (response) { return new SearchSuggestResult(response); });\n };\n SearchSuggest.prototype.mapQueryToQueryString = function (query) {\n this.query.add(\"querytext\", \"'\" + query.querytext + \"'\");\n if (query.hasOwnProperty(\"count\")) {\n this.query.add(\"inumberofquerysuggestions\", query.count.toString());\n }\n if (query.hasOwnProperty(\"personalCount\")) {\n this.query.add(\"inumberofresultsuggestions\", query.personalCount.toString());\n }\n if (query.hasOwnProperty(\"preQuery\")) {\n this.query.add(\"fprequerysuggestions\", query.preQuery.toString());\n }\n if (query.hasOwnProperty(\"hitHighlighting\")) {\n this.query.add(\"fhithighlighting\", query.hitHighlighting.toString());\n }\n if (query.hasOwnProperty(\"capitalize\")) {\n this.query.add(\"fcapitalizefirstletters\", query.capitalize.toString());\n }\n if (query.hasOwnProperty(\"culture\")) {\n this.query.add(\"culture\", query.culture.toString());\n }\n if (query.hasOwnProperty(\"stemming\")) {\n this.query.add(\"enablestemming\", query.stemming.toString());\n }\n if (query.hasOwnProperty(\"includePeople\")) {\n this.query.add(\"showpeoplenamesuggestions\", query.includePeople.toString());\n }\n if (query.hasOwnProperty(\"queryRules\")) {\n this.query.add(\"enablequeryrules\", query.queryRules.toString());\n }\n if (query.hasOwnProperty(\"prefixMatch\")) {\n this.query.add(\"fprefixmatchallterms\", query.prefixMatch.toString());\n }\n };\n return SearchSuggest;\n}(sharepointqueryable_1.SharePointQueryableInstance));\nexports.SearchSuggest = SearchSuggest;\nvar SearchSuggestResult = /** @class */ (function () {\n function SearchSuggestResult(json) {\n if (json.hasOwnProperty(\"suggest\")) {\n // verbose\n this.PeopleNames = json.suggest.PeopleNames.results;\n this.PersonalResults = json.suggest.PersonalResults.results;\n this.Queries = json.suggest.Queries.results;\n }\n else {\n this.PeopleNames = json.PeopleNames;\n this.PersonalResults = json.PersonalResults;\n this.Queries = json.Queries;\n }\n }\n return SearchSuggestResult;\n}());\nexports.SearchSuggestResult = SearchSuggestResult;\n\n\n/***/ }),\n/* 40 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar sharepointqueryable_1 = __webpack_require__(1);\nvar webs_1 = __webpack_require__(10);\nvar usercustomactions_1 = __webpack_require__(21);\nvar odata_1 = __webpack_require__(6);\nvar batch_1 = __webpack_require__(30);\nvar features_1 = __webpack_require__(31);\n/**\n * Describes a site collection\n *\n */\nvar Site = /** @class */ (function (_super) {\n __extends(Site, _super);\n /**\n * Creates a new instance of the Site class\n *\n * @param baseUrl The url or SharePointQueryable which forms the parent of this site collection\n */\n function Site(baseUrl, path) {\n if (path === void 0) { path = \"_api/site\"; }\n return _super.call(this, baseUrl, path) || this;\n }\n Object.defineProperty(Site.prototype, \"rootWeb\", {\n /**\n * Gets the root web of the site collection\n *\n */\n get: function () {\n return new webs_1.Web(this, \"rootweb\");\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Site.prototype, \"features\", {\n /**\n * Gets the active features for this site collection\n *\n */\n get: function () {\n return new features_1.Features(this);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Site.prototype, \"userCustomActions\", {\n /**\n * Gets all custom actions for this site collection\n *\n */\n get: function () {\n return new usercustomactions_1.UserCustomActions(this);\n },\n enumerable: true,\n configurable: true\n });\n /**\n * Gets the context information for this site collection\n */\n Site.prototype.getContextInfo = function () {\n var q = new Site(this.parentUrl, \"_api/contextinfo\");\n return q.postCore().then(function (data) {\n if (data.hasOwnProperty(\"GetContextWebInformation\")) {\n var info = data.GetContextWebInformation;\n info.SupportedSchemaVersions = info.SupportedSchemaVersions.results;\n return info;\n }\n else {\n return data;\n }\n });\n };\n /**\n * Gets the document libraries on a site. Static method. (SharePoint Online only)\n *\n * @param absoluteWebUrl The absolute url of the web whose document libraries should be returned\n */\n Site.prototype.getDocumentLibraries = function (absoluteWebUrl) {\n var q = new sharepointqueryable_1.SharePointQueryable(\"\", \"_api/sp.web.getdocumentlibraries(@v)\");\n q.query.add(\"@v\", \"'\" + absoluteWebUrl + \"'\");\n return q.get().then(function (data) {\n if (data.hasOwnProperty(\"GetDocumentLibraries\")) {\n return data.GetDocumentLibraries;\n }\n else {\n return data;\n }\n });\n };\n /**\n * Gets the site url from a page url\n *\n * @param absolutePageUrl The absolute url of the page\n */\n Site.prototype.getWebUrlFromPageUrl = function (absolutePageUrl) {\n var q = new sharepointqueryable_1.SharePointQueryable(\"\", \"_api/sp.web.getweburlfrompageurl(@v)\");\n q.query.add(\"@v\", \"'\" + absolutePageUrl + \"'\");\n return q.get().then(function (data) {\n if (data.hasOwnProperty(\"GetWebUrlFromPageUrl\")) {\n return data.GetWebUrlFromPageUrl;\n }\n else {\n return data;\n }\n });\n };\n /**\n * Creates a new batch for requests within the context of this site collection\n *\n */\n Site.prototype.createBatch = function () {\n return new batch_1.ODataBatch(this.parentUrl);\n };\n /**\n * Opens a web by id (using POST)\n *\n * @param webId The GUID id of the web to open\n */\n Site.prototype.openWebById = function (webId) {\n return this.clone(Site, \"openWebById('\" + webId + \"')\").postCore().then(function (d) {\n return {\n data: d,\n web: webs_1.Web.fromUrl(odata_1.spExtractODataId(d)),\n };\n });\n };\n return Site;\n}(sharepointqueryable_1.SharePointQueryableInstance));\nexports.Site = Site;\n\n\n/***/ }),\n/* 41 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar sharepointqueryable_1 = __webpack_require__(1);\nvar LimitedWebPartManager = /** @class */ (function (_super) {\n __extends(LimitedWebPartManager, _super);\n function LimitedWebPartManager() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n Object.defineProperty(LimitedWebPartManager.prototype, \"webparts\", {\n /**\n * Gets the set of web part definitions contained by this web part manager\n *\n */\n get: function () {\n return new WebPartDefinitions(this, \"webparts\");\n },\n enumerable: true,\n configurable: true\n });\n /**\n * Exports a webpart definition\n *\n * @param id the GUID id of the definition to export\n */\n LimitedWebPartManager.prototype.export = function (id) {\n return this.clone(LimitedWebPartManager, \"ExportWebPart\").postCore({\n body: JSON.stringify({ webPartId: id }),\n });\n };\n /**\n * Imports a webpart\n *\n * @param xml webpart definition which must be valid XML in the .dwp or .webpart format\n */\n LimitedWebPartManager.prototype.import = function (xml) {\n return this.clone(LimitedWebPartManager, \"ImportWebPart\").postCore({\n body: JSON.stringify({ webPartXml: xml }),\n });\n };\n return LimitedWebPartManager;\n}(sharepointqueryable_1.SharePointQueryable));\nexports.LimitedWebPartManager = LimitedWebPartManager;\nvar WebPartDefinitions = /** @class */ (function (_super) {\n __extends(WebPartDefinitions, _super);\n function WebPartDefinitions() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n /**\n * Gets a web part definition from the collection by id\n *\n * @param id The storage ID of the SPWebPartDefinition to retrieve\n */\n WebPartDefinitions.prototype.getById = function (id) {\n return new WebPartDefinition(this, \"getbyid('\" + id + \"')\");\n };\n /**\n * Gets a web part definition from the collection by storage id\n *\n * @param id The WebPart.ID of the SPWebPartDefinition to retrieve\n */\n WebPartDefinitions.prototype.getByControlId = function (id) {\n return new WebPartDefinition(this, \"getByControlId('\" + id + \"')\");\n };\n return WebPartDefinitions;\n}(sharepointqueryable_1.SharePointQueryableCollection));\nexports.WebPartDefinitions = WebPartDefinitions;\nvar WebPartDefinition = /** @class */ (function (_super) {\n __extends(WebPartDefinition, _super);\n function WebPartDefinition() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n Object.defineProperty(WebPartDefinition.prototype, \"webpart\", {\n /**\n * Gets the webpart information associated with this definition\n */\n get: function () {\n return new WebPart(this);\n },\n enumerable: true,\n configurable: true\n });\n /**\n * Saves changes to the Web Part made using other properties and methods on the SPWebPartDefinition object\n */\n WebPartDefinition.prototype.saveChanges = function () {\n return this.clone(WebPartDefinition, \"SaveWebPartChanges\").postCore();\n };\n /**\n * Moves the Web Part to a different location on a Web Part Page\n *\n * @param zoneId The ID of the Web Part Zone to which to move the Web Part\n * @param zoneIndex A Web Part zone index that specifies the position at which the Web Part is to be moved within the destination Web Part zone\n */\n WebPartDefinition.prototype.moveTo = function (zoneId, zoneIndex) {\n return this.clone(WebPartDefinition, \"MoveWebPartTo(zoneID='\" + zoneId + \"', zoneIndex=\" + zoneIndex + \")\").postCore();\n };\n /**\n * Closes the Web Part. If the Web Part is already closed, this method does nothing\n */\n WebPartDefinition.prototype.close = function () {\n return this.clone(WebPartDefinition, \"CloseWebPart\").postCore();\n };\n /**\n * Opens the Web Part. If the Web Part is already closed, this method does nothing\n */\n WebPartDefinition.prototype.open = function () {\n return this.clone(WebPartDefinition, \"OpenWebPart\").postCore();\n };\n /**\n * Removes a webpart from a page, all settings will be lost\n */\n WebPartDefinition.prototype.delete = function () {\n return this.clone(WebPartDefinition, \"DeleteWebPart\").postCore();\n };\n return WebPartDefinition;\n}(sharepointqueryable_1.SharePointQueryableInstance));\nexports.WebPartDefinition = WebPartDefinition;\nvar WebPart = /** @class */ (function (_super) {\n __extends(WebPart, _super);\n /**\n * Creates a new instance of the WebPart class\n *\n * @param baseUrl The url or SharePointQueryable which forms the parent of this fields collection\n * @param path Optional, if supplied will be appended to the supplied baseUrl\n */\n function WebPart(baseUrl, path) {\n if (path === void 0) { path = \"webpart\"; }\n return _super.call(this, baseUrl, path) || this;\n }\n return WebPart;\n}(sharepointqueryable_1.SharePointQueryableInstance));\nexports.WebPart = WebPart;\n\n\n/***/ }),\n/* 42 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar sharepointqueryable_1 = __webpack_require__(1);\nvar parsers_1 = __webpack_require__(7);\n/**\n * Describes a collection of Item objects\n *\n */\nvar AttachmentFiles = /** @class */ (function (_super) {\n __extends(AttachmentFiles, _super);\n /**\n * Creates a new instance of the AttachmentFiles class\n *\n * @param baseUrl The url or SharePointQueryable which forms the parent of this attachments collection\n */\n function AttachmentFiles(baseUrl, path) {\n if (path === void 0) { path = \"AttachmentFiles\"; }\n return _super.call(this, baseUrl, path) || this;\n }\n /**\n * Gets a Attachment File by filename\n *\n * @param name The name of the file, including extension.\n */\n AttachmentFiles.prototype.getByName = function (name) {\n var f = new AttachmentFile(this);\n f.concat(\"('\" + name + \"')\");\n return f;\n };\n /**\n * Adds a new attachment to the collection. Not supported for batching.\n *\n * @param name The name of the file, including extension.\n * @param content The Base64 file content.\n */\n AttachmentFiles.prototype.add = function (name, content) {\n var _this = this;\n return this.clone(AttachmentFiles, \"add(FileName='\" + name + \"')\", false).postCore({\n body: content,\n }).then(function (response) {\n return {\n data: response,\n file: _this.getByName(name),\n };\n });\n };\n /**\n * Adds mjultiple new attachment to the collection. Not supported for batching.\n *\n * @files name The collection of files to add\n */\n AttachmentFiles.prototype.addMultiple = function (files) {\n var _this = this;\n // add the files in series so we don't get update conflicts\n return files.reduce(function (chain, file) { return chain.then(function () { return _this.clone(AttachmentFiles, \"add(FileName='\" + file.name + \"')\", false).postCore({\n body: file.content,\n }); }); }, Promise.resolve());\n };\n return AttachmentFiles;\n}(sharepointqueryable_1.SharePointQueryableCollection));\nexports.AttachmentFiles = AttachmentFiles;\n/**\n * Describes a single attachment file instance\n *\n */\nvar AttachmentFile = /** @class */ (function (_super) {\n __extends(AttachmentFile, _super);\n function AttachmentFile() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n /**\n * Gets the contents of the file as text\n *\n */\n AttachmentFile.prototype.getText = function () {\n return this.clone(AttachmentFile, \"$value\", false).get(new parsers_1.TextFileParser());\n };\n /**\n * Gets the contents of the file as a blob, does not work in Node.js\n *\n */\n AttachmentFile.prototype.getBlob = function () {\n return this.clone(AttachmentFile, \"$value\", false).get(new parsers_1.BlobFileParser());\n };\n /**\n * Gets the contents of a file as an ArrayBuffer, works in Node.js\n */\n AttachmentFile.prototype.getBuffer = function () {\n return this.clone(AttachmentFile, \"$value\", false).get(new parsers_1.BufferFileParser());\n };\n /**\n * Gets the contents of a file as an ArrayBuffer, works in Node.js\n */\n AttachmentFile.prototype.getJSON = function () {\n return this.clone(AttachmentFile, \"$value\", false).get(new parsers_1.JSONFileParser());\n };\n /**\n * Sets the content of a file. Not supported for batching\n *\n * @param content The value to set for the file contents\n */\n AttachmentFile.prototype.setContent = function (content) {\n var _this = this;\n return this.clone(AttachmentFile, \"$value\", false).postCore({\n body: content,\n headers: {\n \"X-HTTP-Method\": \"PUT\",\n },\n }).then(function (_) { return new AttachmentFile(_this); });\n };\n /**\n * Delete this attachment file\n *\n * @param eTag Value used in the IF-Match header, by default \"*\"\n */\n AttachmentFile.prototype.delete = function (eTag) {\n if (eTag === void 0) { eTag = \"*\"; }\n return this.postCore({\n headers: {\n \"IF-Match\": eTag,\n \"X-HTTP-Method\": \"DELETE\",\n },\n });\n };\n return AttachmentFile;\n}(sharepointqueryable_1.SharePointQueryableInstance));\nexports.AttachmentFile = AttachmentFile;\n\n\n/***/ }),\n/* 43 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar sharepointqueryable_1 = __webpack_require__(1);\nvar util_1 = __webpack_require__(0);\n/**\n * Describes the views available in the current context\n *\n */\nvar Views = /** @class */ (function (_super) {\n __extends(Views, _super);\n /**\n * Creates a new instance of the Views class\n *\n * @param baseUrl The url or SharePointQueryable which forms the parent of this fields collection\n */\n function Views(baseUrl, path) {\n if (path === void 0) { path = \"views\"; }\n return _super.call(this, baseUrl, path) || this;\n }\n /**\n * Gets a view by guid id\n *\n * @param id The GUID id of the view\n */\n Views.prototype.getById = function (id) {\n var v = new View(this);\n v.concat(\"('\" + id + \"')\");\n return v;\n };\n /**\n * Gets a view by title (case-sensitive)\n *\n * @param title The case-sensitive title of the view\n */\n Views.prototype.getByTitle = function (title) {\n return new View(this, \"getByTitle('\" + title + \"')\");\n };\n /**\n * Adds a new view to the collection\n *\n * @param title The new views's title\n * @param personalView True if this is a personal view, otherwise false, default = false\n * @param additionalSettings Will be passed as part of the view creation body\n */\n Views.prototype.add = function (title, personalView, additionalSettings) {\n var _this = this;\n if (personalView === void 0) { personalView = false; }\n if (additionalSettings === void 0) { additionalSettings = {}; }\n var postBody = JSON.stringify(util_1.Util.extend({\n \"PersonalView\": personalView,\n \"Title\": title,\n \"__metadata\": { \"type\": \"SP.View\" },\n }, additionalSettings));\n return this.clone(Views, null).postAsCore({ body: postBody }).then(function (data) {\n return {\n data: data,\n view: _this.getById(data.Id),\n };\n });\n };\n return Views;\n}(sharepointqueryable_1.SharePointQueryableCollection));\nexports.Views = Views;\n/**\n * Describes a single View instance\n *\n */\nvar View = /** @class */ (function (_super) {\n __extends(View, _super);\n function View() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n Object.defineProperty(View.prototype, \"fields\", {\n get: function () {\n return new ViewFields(this);\n },\n enumerable: true,\n configurable: true\n });\n /**\n * Updates this view intance with the supplied properties\n *\n * @param properties A plain object hash of values to update for the view\n */\n View.prototype.update = function (properties) {\n var _this = this;\n var postBody = JSON.stringify(util_1.Util.extend({\n \"__metadata\": { \"type\": \"SP.View\" },\n }, properties));\n return this.postCore({\n body: postBody,\n headers: {\n \"X-HTTP-Method\": \"MERGE\",\n },\n }).then(function (data) {\n return {\n data: data,\n view: _this,\n };\n });\n };\n /**\n * Delete this view\n *\n */\n View.prototype.delete = function () {\n return this.postCore({\n headers: {\n \"X-HTTP-Method\": \"DELETE\",\n },\n });\n };\n /**\n * Returns the list view as HTML.\n *\n */\n View.prototype.renderAsHtml = function () {\n return this.clone(sharepointqueryable_1.SharePointQueryable, \"renderashtml\").get();\n };\n return View;\n}(sharepointqueryable_1.SharePointQueryableInstance));\nexports.View = View;\nvar ViewFields = /** @class */ (function (_super) {\n __extends(ViewFields, _super);\n function ViewFields(baseUrl, path) {\n if (path === void 0) { path = \"viewfields\"; }\n return _super.call(this, baseUrl, path) || this;\n }\n /**\n * Gets a value that specifies the XML schema that represents the collection.\n */\n ViewFields.prototype.getSchemaXml = function () {\n return this.clone(sharepointqueryable_1.SharePointQueryable, \"schemaxml\").get();\n };\n /**\n * Adds the field with the specified field internal name or display name to the collection.\n *\n * @param fieldTitleOrInternalName The case-sensitive internal name or display name of the field to add.\n */\n ViewFields.prototype.add = function (fieldTitleOrInternalName) {\n return this.clone(ViewFields, \"addviewfield('\" + fieldTitleOrInternalName + \"')\").postCore();\n };\n /**\n * Moves the field with the specified field internal name to the specified position in the collection.\n *\n * @param fieldInternalName The case-sensitive internal name of the field to move.\n * @param index The zero-based index of the new position for the field.\n */\n ViewFields.prototype.move = function (fieldInternalName, index) {\n return this.clone(ViewFields, \"moveviewfieldto\").postCore({\n body: JSON.stringify({ \"field\": fieldInternalName, \"index\": index }),\n });\n };\n /**\n * Removes all the fields from the collection.\n */\n ViewFields.prototype.removeAll = function () {\n return this.clone(ViewFields, \"removeallviewfields\").postCore();\n };\n /**\n * Removes the field with the specified field internal name from the collection.\n *\n * @param fieldInternalName The case-sensitive internal name of the field to remove from the view.\n */\n ViewFields.prototype.remove = function (fieldInternalName) {\n return this.clone(ViewFields, \"removeviewfield('\" + fieldInternalName + \"')\").postCore();\n };\n return ViewFields;\n}(sharepointqueryable_1.SharePointQueryableCollection));\nexports.ViewFields = ViewFields;\n\n\n/***/ }),\n/* 44 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar sharepointqueryable_1 = __webpack_require__(1);\n/**\n * Describes a collection of Field objects\n *\n */\nvar Forms = /** @class */ (function (_super) {\n __extends(Forms, _super);\n /**\n * Creates a new instance of the Fields class\n *\n * @param baseUrl The url or SharePointQueryable which forms the parent of this fields collection\n */\n function Forms(baseUrl, path) {\n if (path === void 0) { path = \"forms\"; }\n return _super.call(this, baseUrl, path) || this;\n }\n /**\n * Gets a form by id\n *\n * @param id The guid id of the item to retrieve\n */\n Forms.prototype.getById = function (id) {\n var i = new Form(this);\n i.concat(\"('\" + id + \"')\");\n return i;\n };\n return Forms;\n}(sharepointqueryable_1.SharePointQueryableCollection));\nexports.Forms = Forms;\n/**\n * Describes a single of Form instance\n *\n */\nvar Form = /** @class */ (function (_super) {\n __extends(Form, _super);\n function Form() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n return Form;\n}(sharepointqueryable_1.SharePointQueryableInstance));\nexports.Form = Form;\n\n\n/***/ }),\n/* 45 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar sharepointqueryable_1 = __webpack_require__(1);\n/**\n * Describes a collection of webhook subscriptions\n *\n */\nvar Subscriptions = /** @class */ (function (_super) {\n __extends(Subscriptions, _super);\n /**\n * Creates a new instance of the Subscriptions class\n *\n * @param baseUrl - The url or SharePointQueryable which forms the parent of this webhook subscriptions collection\n */\n function Subscriptions(baseUrl, path) {\n if (path === void 0) { path = \"subscriptions\"; }\n return _super.call(this, baseUrl, path) || this;\n }\n /**\n * Returns all the webhook subscriptions or the specified webhook subscription\n *\n * @param subscriptionId The id of a specific webhook subscription to retrieve, omit to retrieve all the webhook subscriptions\n */\n Subscriptions.prototype.getById = function (subscriptionId) {\n var subscription = new Subscription(this);\n subscription.concat(\"('\" + subscriptionId + \"')\");\n return subscription;\n };\n /**\n * Creates a new webhook subscription\n *\n * @param notificationUrl The url to receive the notifications\n * @param expirationDate The date and time to expire the subscription in the form YYYY-MM-ddTHH:mm:ss+00:00 (maximum of 6 months)\n * @param clientState A client specific string (defaults to pnp-js-core-subscription when omitted)\n */\n Subscriptions.prototype.add = function (notificationUrl, expirationDate, clientState) {\n var _this = this;\n var postBody = JSON.stringify({\n \"clientState\": clientState || \"pnp-js-core-subscription\",\n \"expirationDateTime\": expirationDate,\n \"notificationUrl\": notificationUrl,\n \"resource\": this.toUrl(),\n });\n return this.postCore({ body: postBody, headers: { \"Content-Type\": \"application/json\" } }).then(function (result) {\n return { data: result, subscription: _this.getById(result.id) };\n });\n };\n return Subscriptions;\n}(sharepointqueryable_1.SharePointQueryableCollection));\nexports.Subscriptions = Subscriptions;\n/**\n * Describes a single webhook subscription instance\n *\n */\nvar Subscription = /** @class */ (function (_super) {\n __extends(Subscription, _super);\n function Subscription() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n /**\n * Renews this webhook subscription\n *\n * @param expirationDate The date and time to expire the subscription in the form YYYY-MM-ddTHH:mm:ss+00:00 (maximum of 6 months)\n */\n Subscription.prototype.update = function (expirationDate) {\n var _this = this;\n var postBody = JSON.stringify({\n \"expirationDateTime\": expirationDate,\n });\n return this.patchCore({ body: postBody, headers: { \"Content-Type\": \"application/json\" } }).then(function (data) {\n return { data: data, subscription: _this };\n });\n };\n /**\n * Removes this webhook subscription\n *\n */\n Subscription.prototype.delete = function () {\n return _super.prototype.deleteCore.call(this);\n };\n return Subscription;\n}(sharepointqueryable_1.SharePointQueryableInstance));\nexports.Subscription = Subscription;\n\n\n/***/ }),\n/* 46 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar util_1 = __webpack_require__(0);\nvar sharepointqueryable_1 = __webpack_require__(1);\n/**\n * Represents a collection of navigation nodes\n *\n */\nvar NavigationNodes = /** @class */ (function (_super) {\n __extends(NavigationNodes, _super);\n function NavigationNodes() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n /**\n * Gets a navigation node by id\n *\n * @param id The id of the node\n */\n NavigationNodes.prototype.getById = function (id) {\n var node = new NavigationNode(this);\n node.concat(\"(\" + id + \")\");\n return node;\n };\n /**\n * Adds a new node to the collection\n *\n * @param title Display name of the node\n * @param url The url of the node\n * @param visible If true the node is visible, otherwise it is hidden (default: true)\n */\n NavigationNodes.prototype.add = function (title, url, visible) {\n var _this = this;\n if (visible === void 0) { visible = true; }\n var postBody = JSON.stringify({\n IsVisible: visible,\n Title: title,\n Url: url,\n \"__metadata\": { \"type\": \"SP.NavigationNode\" },\n });\n return this.clone(NavigationNodes, null).postCore({ body: postBody }).then(function (data) {\n return {\n data: data,\n node: _this.getById(data.Id),\n };\n });\n };\n /**\n * Moves a node to be after another node in the navigation\n *\n * @param nodeId Id of the node to move\n * @param previousNodeId Id of the node after which we move the node specified by nodeId\n */\n NavigationNodes.prototype.moveAfter = function (nodeId, previousNodeId) {\n var postBody = JSON.stringify({\n nodeId: nodeId,\n previousNodeId: previousNodeId,\n });\n return this.clone(NavigationNodes, \"MoveAfter\").postCore({ body: postBody });\n };\n return NavigationNodes;\n}(sharepointqueryable_1.SharePointQueryableCollection));\nexports.NavigationNodes = NavigationNodes;\n/**\n * Represents an instance of a navigation node\n *\n */\nvar NavigationNode = /** @class */ (function (_super) {\n __extends(NavigationNode, _super);\n function NavigationNode() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n Object.defineProperty(NavigationNode.prototype, \"children\", {\n /**\n * Represents the child nodes of this node\n */\n get: function () {\n return new NavigationNodes(this, \"Children\");\n },\n enumerable: true,\n configurable: true\n });\n /**\n * Updates this node based on the supplied properties\n *\n * @param properties The hash of key/value pairs to update\n */\n NavigationNode.prototype.update = function (properties) {\n var _this = this;\n var postBody = JSON.stringify(util_1.Util.extend({\n \"__metadata\": { \"type\": \"SP.NavigationNode\" },\n }, properties));\n return this.postCore({\n body: postBody,\n headers: {\n \"X-HTTP-Method\": \"MERGE\",\n },\n }).then(function (data) {\n return {\n data: data,\n node: _this,\n };\n });\n };\n /**\n * Deletes this node and any child nodes\n */\n NavigationNode.prototype.delete = function () {\n return _super.prototype.deleteCore.call(this);\n };\n return NavigationNode;\n}(sharepointqueryable_1.SharePointQueryableInstance));\nexports.NavigationNode = NavigationNode;\n/**\n * Exposes the navigation components\n *\n */\nvar Navigation = /** @class */ (function (_super) {\n __extends(Navigation, _super);\n /**\n * Creates a new instance of the Navigation class\n *\n * @param baseUrl The url or SharePointQueryable which forms the parent of these navigation components\n */\n function Navigation(baseUrl, path) {\n if (path === void 0) { path = \"navigation\"; }\n return _super.call(this, baseUrl, path) || this;\n }\n Object.defineProperty(Navigation.prototype, \"quicklaunch\", {\n /**\n * Gets the quicklaunch navigation nodes for the current context\n *\n */\n get: function () {\n return new NavigationNodes(this, \"quicklaunch\");\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Navigation.prototype, \"topNavigationBar\", {\n /**\n * Gets the top bar navigation nodes for the current context\n *\n */\n get: function () {\n return new NavigationNodes(this, \"topnavigationbar\");\n },\n enumerable: true,\n configurable: true\n });\n return Navigation;\n}(sharepointqueryable_1.SharePointQueryable));\nexports.Navigation = Navigation;\n\n\n/***/ }),\n/* 47 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar sharepointqueryable_1 = __webpack_require__(1);\nvar RelatedItemManagerImpl = /** @class */ (function (_super) {\n __extends(RelatedItemManagerImpl, _super);\n function RelatedItemManagerImpl(baseUrl, path) {\n if (path === void 0) { path = \"_api/SP.RelatedItemManager\"; }\n return _super.call(this, baseUrl, path) || this;\n }\n RelatedItemManagerImpl.FromUrl = function (url) {\n if (url === null) {\n return new RelatedItemManagerImpl(\"\");\n }\n var index = url.indexOf(\"_api/\");\n if (index > -1) {\n return new RelatedItemManagerImpl(url.substr(0, index));\n }\n return new RelatedItemManagerImpl(url);\n };\n RelatedItemManagerImpl.prototype.getRelatedItems = function (sourceListName, sourceItemId) {\n var query = this.clone(RelatedItemManagerImpl, null);\n query.concat(\".GetRelatedItems\");\n return query.postCore({\n body: JSON.stringify({\n SourceItemID: sourceItemId,\n SourceListName: sourceListName,\n }),\n });\n };\n RelatedItemManagerImpl.prototype.getPageOneRelatedItems = function (sourceListName, sourceItemId) {\n var query = this.clone(RelatedItemManagerImpl, null);\n query.concat(\".GetPageOneRelatedItems\");\n return query.postCore({\n body: JSON.stringify({\n SourceItemID: sourceItemId,\n SourceListName: sourceListName,\n }),\n });\n };\n RelatedItemManagerImpl.prototype.addSingleLink = function (sourceListName, sourceItemId, sourceWebUrl, targetListName, targetItemID, targetWebUrl, tryAddReverseLink) {\n if (tryAddReverseLink === void 0) { tryAddReverseLink = false; }\n var query = this.clone(RelatedItemManagerImpl, null);\n query.concat(\".AddSingleLink\");\n return query.postCore({\n body: JSON.stringify({\n SourceItemID: sourceItemId,\n SourceListName: sourceListName,\n SourceWebUrl: sourceWebUrl,\n TargetItemID: targetItemID,\n TargetListName: targetListName,\n TargetWebUrl: targetWebUrl,\n TryAddReverseLink: tryAddReverseLink,\n }),\n });\n };\n /**\n * Adds a related item link from an item specified by list name and item id, to an item specified by url\n *\n * @param sourceListName The source list name or list id\n * @param sourceItemId The source item id\n * @param targetItemUrl The target item url\n * @param tryAddReverseLink If set to true try to add the reverse link (will not return error if it fails)\n */\n RelatedItemManagerImpl.prototype.addSingleLinkToUrl = function (sourceListName, sourceItemId, targetItemUrl, tryAddReverseLink) {\n if (tryAddReverseLink === void 0) { tryAddReverseLink = false; }\n var query = this.clone(RelatedItemManagerImpl, null);\n query.concat(\".AddSingleLinkToUrl\");\n return query.postCore({\n body: JSON.stringify({\n SourceItemID: sourceItemId,\n SourceListName: sourceListName,\n TargetItemUrl: targetItemUrl,\n TryAddReverseLink: tryAddReverseLink,\n }),\n });\n };\n /**\n * Adds a related item link from an item specified by url, to an item specified by list name and item id\n *\n * @param sourceItemUrl The source item url\n * @param targetListName The target list name or list id\n * @param targetItemId The target item id\n * @param tryAddReverseLink If set to true try to add the reverse link (will not return error if it fails)\n */\n RelatedItemManagerImpl.prototype.addSingleLinkFromUrl = function (sourceItemUrl, targetListName, targetItemId, tryAddReverseLink) {\n if (tryAddReverseLink === void 0) { tryAddReverseLink = false; }\n var query = this.clone(RelatedItemManagerImpl, null);\n query.concat(\".AddSingleLinkFromUrl\");\n return query.postCore({\n body: JSON.stringify({\n SourceItemUrl: sourceItemUrl,\n TargetItemID: targetItemId,\n TargetListName: targetListName,\n TryAddReverseLink: tryAddReverseLink,\n }),\n });\n };\n RelatedItemManagerImpl.prototype.deleteSingleLink = function (sourceListName, sourceItemId, sourceWebUrl, targetListName, targetItemId, targetWebUrl, tryDeleteReverseLink) {\n if (tryDeleteReverseLink === void 0) { tryDeleteReverseLink = false; }\n var query = this.clone(RelatedItemManagerImpl, null);\n query.concat(\".DeleteSingleLink\");\n return query.postCore({\n body: JSON.stringify({\n SourceItemID: sourceItemId,\n SourceListName: sourceListName,\n SourceWebUrl: sourceWebUrl,\n TargetItemID: targetItemId,\n TargetListName: targetListName,\n TargetWebUrl: targetWebUrl,\n TryDeleteReverseLink: tryDeleteReverseLink,\n }),\n });\n };\n return RelatedItemManagerImpl;\n}(sharepointqueryable_1.SharePointQueryable));\nexports.RelatedItemManagerImpl = RelatedItemManagerImpl;\n\n\n/***/ }),\n/* 48 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar sharepointqueryable_1 = __webpack_require__(1);\nvar files_1 = __webpack_require__(49);\nvar parsers_1 = __webpack_require__(7);\nvar UserProfileQuery = /** @class */ (function (_super) {\n __extends(UserProfileQuery, _super);\n /**\n * Creates a new instance of the UserProfileQuery class\n *\n * @param baseUrl The url or SharePointQueryable which forms the parent of this user profile query\n */\n function UserProfileQuery(baseUrl, path) {\n if (path === void 0) { path = \"_api/sp.userprofiles.peoplemanager\"; }\n var _this = _super.call(this, baseUrl, path) || this;\n _this.profileLoader = new ProfileLoader(baseUrl);\n return _this;\n }\n Object.defineProperty(UserProfileQuery.prototype, \"editProfileLink\", {\n /**\n * The url of the edit profile page for the current user\n */\n get: function () {\n return this.clone(UserProfileQuery, \"EditProfileLink\").getAs(parsers_1.ODataValue());\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(UserProfileQuery.prototype, \"isMyPeopleListPublic\", {\n /**\n * A boolean value that indicates whether the current user's \"People I'm Following\" list is public\n */\n get: function () {\n return this.clone(UserProfileQuery, \"IsMyPeopleListPublic\").getAs(parsers_1.ODataValue());\n },\n enumerable: true,\n configurable: true\n });\n /**\n * A boolean value that indicates whether the current user is being followed by the specified user\n *\n * @param loginName The account name of the user\n */\n UserProfileQuery.prototype.amIFollowedBy = function (loginName) {\n var q = this.clone(UserProfileQuery, \"amifollowedby(@v)\");\n q.query.add(\"@v\", \"'\" + encodeURIComponent(loginName) + \"'\");\n return q.get();\n };\n /**\n * A boolean value that indicates whether the current user is following the specified user\n *\n * @param loginName The account name of the user\n */\n UserProfileQuery.prototype.amIFollowing = function (loginName) {\n var q = this.clone(UserProfileQuery, \"amifollowing(@v)\");\n q.query.add(\"@v\", \"'\" + encodeURIComponent(loginName) + \"'\");\n return q.get();\n };\n /**\n * Gets tags that the current user is following\n *\n * @param maxCount The maximum number of tags to retrieve (default is 20)\n */\n UserProfileQuery.prototype.getFollowedTags = function (maxCount) {\n if (maxCount === void 0) { maxCount = 20; }\n return this.clone(UserProfileQuery, \"getfollowedtags(\" + maxCount + \")\").get();\n };\n /**\n * Gets the people who are following the specified user\n *\n * @param loginName The account name of the user\n */\n UserProfileQuery.prototype.getFollowersFor = function (loginName) {\n var q = this.clone(UserProfileQuery, \"getfollowersfor(@v)\");\n q.query.add(\"@v\", \"'\" + encodeURIComponent(loginName) + \"'\");\n return q.get();\n };\n Object.defineProperty(UserProfileQuery.prototype, \"myFollowers\", {\n /**\n * Gets the people who are following the current user\n *\n */\n get: function () {\n return new sharepointqueryable_1.SharePointQueryableCollection(this, \"getmyfollowers\");\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(UserProfileQuery.prototype, \"myProperties\", {\n /**\n * Gets user properties for the current user\n *\n */\n get: function () {\n return new UserProfileQuery(this, \"getmyproperties\");\n },\n enumerable: true,\n configurable: true\n });\n /**\n * Gets the people who the specified user is following\n *\n * @param loginName The account name of the user.\n */\n UserProfileQuery.prototype.getPeopleFollowedBy = function (loginName) {\n var q = this.clone(UserProfileQuery, \"getpeoplefollowedby(@v)\");\n q.query.add(\"@v\", \"'\" + encodeURIComponent(loginName) + \"'\");\n return q.get();\n };\n /**\n * Gets user properties for the specified user.\n *\n * @param loginName The account name of the user.\n */\n UserProfileQuery.prototype.getPropertiesFor = function (loginName) {\n var q = this.clone(UserProfileQuery, \"getpropertiesfor(@v)\");\n q.query.add(\"@v\", \"'\" + encodeURIComponent(loginName) + \"'\");\n return q.get();\n };\n Object.defineProperty(UserProfileQuery.prototype, \"trendingTags\", {\n /**\n * Gets the 20 most popular hash tags over the past week, sorted so that the most popular tag appears first\n *\n */\n get: function () {\n var q = this.clone(UserProfileQuery, null);\n q.concat(\".gettrendingtags\");\n return q.get();\n },\n enumerable: true,\n configurable: true\n });\n /**\n * Gets the specified user profile property for the specified user\n *\n * @param loginName The account name of the user\n * @param propertyName The case-sensitive name of the property to get\n */\n UserProfileQuery.prototype.getUserProfilePropertyFor = function (loginName, propertyName) {\n var q = this.clone(UserProfileQuery, \"getuserprofilepropertyfor(accountname=@v, propertyname='\" + propertyName + \"')\");\n q.query.add(\"@v\", \"'\" + encodeURIComponent(loginName) + \"'\");\n return q.get();\n };\n /**\n * Removes the specified user from the user's list of suggested people to follow\n *\n * @param loginName The account name of the user\n */\n UserProfileQuery.prototype.hideSuggestion = function (loginName) {\n var q = this.clone(UserProfileQuery, \"hidesuggestion(@v)\");\n q.query.add(\"@v\", \"'\" + encodeURIComponent(loginName) + \"'\");\n return q.postCore();\n };\n /**\n * A boolean values that indicates whether the first user is following the second user\n *\n * @param follower The account name of the user who might be following the followee\n * @param followee The account name of the user who might be followed by the follower\n */\n UserProfileQuery.prototype.isFollowing = function (follower, followee) {\n var q = this.clone(UserProfileQuery, null);\n q.concat(\".isfollowing(possiblefolloweraccountname=@v, possiblefolloweeaccountname=@y)\");\n q.query.add(\"@v\", \"'\" + encodeURIComponent(follower) + \"'\");\n q.query.add(\"@y\", \"'\" + encodeURIComponent(followee) + \"'\");\n return q.get();\n };\n /**\n * Uploads and sets the user profile picture (Users can upload a picture to their own profile only). Not supported for batching.\n *\n * @param profilePicSource Blob data representing the user's picture in BMP, JPEG, or PNG format of up to 4.76MB\n */\n UserProfileQuery.prototype.setMyProfilePic = function (profilePicSource) {\n var _this = this;\n return new Promise(function (resolve, reject) {\n files_1.readBlobAsArrayBuffer(profilePicSource).then(function (buffer) {\n var request = new UserProfileQuery(_this, \"setmyprofilepicture\");\n request.postCore({\n body: String.fromCharCode.apply(null, new Uint16Array(buffer)),\n }).then(function (_) { return resolve(); });\n }).catch(function (e) { return reject(e); });\n });\n };\n /**\n * Provisions one or more users' personal sites. (My Site administrator on SharePoint Online only)\n *\n * @param emails The email addresses of the users to provision sites for\n */\n UserProfileQuery.prototype.createPersonalSiteEnqueueBulk = function () {\n var emails = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n emails[_i] = arguments[_i];\n }\n return this.profileLoader.createPersonalSiteEnqueueBulk(emails);\n };\n Object.defineProperty(UserProfileQuery.prototype, \"ownerUserProfile\", {\n /**\n * Gets the user profile of the site owner\n *\n */\n get: function () {\n return this.profileLoader.ownerUserProfile;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(UserProfileQuery.prototype, \"userProfile\", {\n /**\n * Gets the user profile for the current user\n */\n get: function () {\n return this.profileLoader.userProfile;\n },\n enumerable: true,\n configurable: true\n });\n /**\n * Enqueues creating a personal site for this user, which can be used to share documents, web pages, and other files\n *\n * @param interactiveRequest true if interactively (web) initiated request, or false (default) if non-interactively (client) initiated request\n */\n UserProfileQuery.prototype.createPersonalSite = function (interactiveRequest) {\n if (interactiveRequest === void 0) { interactiveRequest = false; }\n return this.profileLoader.createPersonalSite(interactiveRequest);\n };\n /**\n * Sets the privacy settings for this profile\n *\n * @param share true to make all social data public; false to make all social data private\n */\n UserProfileQuery.prototype.shareAllSocialData = function (share) {\n return this.profileLoader.shareAllSocialData(share);\n };\n return UserProfileQuery;\n}(sharepointqueryable_1.SharePointQueryableInstance));\nexports.UserProfileQuery = UserProfileQuery;\nvar ProfileLoader = /** @class */ (function (_super) {\n __extends(ProfileLoader, _super);\n /**\n * Creates a new instance of the ProfileLoader class\n *\n * @param baseUrl The url or SharePointQueryable which forms the parent of this profile loader\n */\n function ProfileLoader(baseUrl, path) {\n if (path === void 0) { path = \"_api/sp.userprofiles.profileloader.getprofileloader\"; }\n return _super.call(this, baseUrl, path) || this;\n }\n /**\n * Provisions one or more users' personal sites. (My Site administrator on SharePoint Online only) Doesn't support batching\n *\n * @param emails The email addresses of the users to provision sites for\n */\n ProfileLoader.prototype.createPersonalSiteEnqueueBulk = function (emails) {\n return this.clone(ProfileLoader, \"createpersonalsiteenqueuebulk\", false).postCore({\n body: JSON.stringify({ \"emailIDs\": emails }),\n });\n };\n Object.defineProperty(ProfileLoader.prototype, \"ownerUserProfile\", {\n /**\n * Gets the user profile of the site owner.\n *\n */\n get: function () {\n var q = this.getParent(ProfileLoader, this.parentUrl, \"_api/sp.userprofiles.profileloader.getowneruserprofile\");\n if (this.hasBatch) {\n q = q.inBatch(this.batch);\n }\n return q.postAsCore();\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(ProfileLoader.prototype, \"userProfile\", {\n /**\n * Gets the user profile of the current user.\n *\n */\n get: function () {\n return this.clone(ProfileLoader, \"getuserprofile\").postAsCore();\n },\n enumerable: true,\n configurable: true\n });\n /**\n * Enqueues creating a personal site for this user, which can be used to share documents, web pages, and other files.\n *\n * @param interactiveRequest true if interactively (web) initiated request, or false (default) if non-interactively (client) initiated request\n */\n ProfileLoader.prototype.createPersonalSite = function (interactiveRequest) {\n if (interactiveRequest === void 0) { interactiveRequest = false; }\n return this.clone(ProfileLoader, \"getuserprofile/createpersonalsiteenque(\" + interactiveRequest + \")\").postCore();\n };\n /**\n * Sets the privacy settings for this profile\n *\n * @param share true to make all social data public; false to make all social data private.\n */\n ProfileLoader.prototype.shareAllSocialData = function (share) {\n return this.clone(ProfileLoader, \"getuserprofile/shareallsocialdata(\" + share + \")\").postCore();\n };\n return ProfileLoader;\n}(sharepointqueryable_1.SharePointQueryable));\n\n\n/***/ }),\n/* 49 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\n/**\n * Reads a blob as text\n *\n * @param blob The data to read\n */\nfunction readBlobAsText(blob) {\n return readBlobAs(blob, \"string\");\n}\nexports.readBlobAsText = readBlobAsText;\n/**\n * Reads a blob into an array buffer\n *\n * @param blob The data to read\n */\nfunction readBlobAsArrayBuffer(blob) {\n return readBlobAs(blob, \"buffer\");\n}\nexports.readBlobAsArrayBuffer = readBlobAsArrayBuffer;\n/**\n * Generic method to read blob's content\n *\n * @param blob The data to read\n * @param mode The read mode\n */\nfunction readBlobAs(blob, mode) {\n return new Promise(function (resolve, reject) {\n try {\n var reader = new FileReader();\n reader.onload = function (e) {\n resolve(e.target.result);\n };\n switch (mode) {\n case \"string\":\n reader.readAsText(blob);\n break;\n case \"buffer\":\n reader.readAsArrayBuffer(blob);\n break;\n }\n }\n catch (e) {\n reject(e);\n }\n });\n}\n\n\n/***/ }),\n/* 50 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar sharepointqueryable_1 = __webpack_require__(1);\nvar util_1 = __webpack_require__(0);\nvar files_1 = __webpack_require__(12);\nvar odata_1 = __webpack_require__(6);\n/**\n * Allows for calling of the static SP.Utilities.Utility methods by supplying the method name\n */\nvar UtilityMethod = /** @class */ (function (_super) {\n __extends(UtilityMethod, _super);\n /**\n * Creates a new instance of the Utility method class\n *\n * @param baseUrl The parent url provider\n * @param methodName The static method name to call on the utility class\n */\n function UtilityMethod(baseUrl, methodName) {\n return _super.call(this, UtilityMethod.getBaseUrl(baseUrl), \"_api/SP.Utilities.Utility.\" + methodName) || this;\n }\n UtilityMethod.getBaseUrl = function (candidate) {\n if (typeof candidate === \"string\") {\n return candidate;\n }\n var c = candidate;\n var url = c.toUrl();\n var index = url.indexOf(\"_api/\");\n if (index < 0) {\n return url;\n }\n return url.substr(0, index);\n };\n UtilityMethod.prototype.excute = function (props) {\n return this.postAsCore({\n body: JSON.stringify(props),\n });\n };\n /**\n * Clones this SharePointQueryable into a new SharePointQueryable instance of T\n * @param factory Constructor used to create the new instance\n * @param additionalPath Any additional path to include in the clone\n * @param includeBatch If true this instance's batch will be added to the cloned instance\n */\n UtilityMethod.prototype.create = function (methodName, includeBatch) {\n var clone = new UtilityMethod(this.parentUrl, methodName);\n var target = this.query.get(\"@target\");\n if (target !== null) {\n clone.query.add(\"@target\", target);\n }\n if (includeBatch && this.hasBatch) {\n clone = clone.inBatch(this.batch);\n }\n return clone;\n };\n /**\n * Sends an email based on the supplied properties\n *\n * @param props The properties of the email to send\n */\n UtilityMethod.prototype.sendEmail = function (props) {\n var params = {\n properties: {\n Body: props.Body,\n From: props.From,\n Subject: props.Subject,\n \"__metadata\": { \"type\": \"SP.Utilities.EmailProperties\" },\n },\n };\n if (props.To && props.To.length > 0) {\n params.properties = util_1.Util.extend(params.properties, {\n To: { results: props.To },\n });\n }\n if (props.CC && props.CC.length > 0) {\n params.properties = util_1.Util.extend(params.properties, {\n CC: { results: props.CC },\n });\n }\n if (props.BCC && props.BCC.length > 0) {\n params.properties = util_1.Util.extend(params.properties, {\n BCC: { results: props.BCC },\n });\n }\n if (props.AdditionalHeaders) {\n params.properties = util_1.Util.extend(params.properties, {\n AdditionalHeaders: props.AdditionalHeaders,\n });\n }\n return this.create(\"SendEmail\", true).excute(params);\n };\n UtilityMethod.prototype.getCurrentUserEmailAddresses = function () {\n return this.create(\"GetCurrentUserEmailAddresses\", true).excute({});\n };\n UtilityMethod.prototype.resolvePrincipal = function (input, scopes, sources, inputIsEmailOnly, addToUserInfoList, matchUserInfoList) {\n if (matchUserInfoList === void 0) { matchUserInfoList = false; }\n var params = {\n addToUserInfoList: addToUserInfoList,\n input: input,\n inputIsEmailOnly: inputIsEmailOnly,\n matchUserInfoList: matchUserInfoList,\n scopes: scopes,\n sources: sources,\n };\n return this.create(\"ResolvePrincipalInCurrentContext\", true).excute(params);\n };\n UtilityMethod.prototype.searchPrincipals = function (input, scopes, sources, groupName, maxCount) {\n var params = {\n groupName: groupName,\n input: input,\n maxCount: maxCount,\n scopes: scopes,\n sources: sources,\n };\n return this.create(\"SearchPrincipalsUsingContextWeb\", true).excute(params);\n };\n UtilityMethod.prototype.createEmailBodyForInvitation = function (pageAddress) {\n var params = {\n pageAddress: pageAddress,\n };\n return this.create(\"CreateEmailBodyForInvitation\", true).excute(params);\n };\n UtilityMethod.prototype.expandGroupsToPrincipals = function (inputs, maxCount) {\n if (maxCount === void 0) { maxCount = 30; }\n var params = {\n inputs: inputs,\n maxCount: maxCount,\n };\n return this.create(\"ExpandGroupsToPrincipals\", true).excute(params);\n };\n UtilityMethod.prototype.createWikiPage = function (info) {\n return this.create(\"CreateWikiPageInContextWeb\", true).excute({\n parameters: info,\n }).then(function (r) {\n return {\n data: r,\n file: new files_1.File(odata_1.spExtractODataId(r)),\n };\n });\n };\n return UtilityMethod;\n}(sharepointqueryable_1.SharePointQueryable));\nexports.UtilityMethod = UtilityMethod;\n\n\n/***/ }),\n/* 51 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar v1_1 = __webpack_require__(52);\nvar GraphRest = /** @class */ (function () {\n function GraphRest() {\n }\n Object.defineProperty(GraphRest.prototype, \"v1\", {\n get: function () {\n return new v1_1.V1(\"\");\n },\n enumerable: true,\n configurable: true\n });\n return GraphRest;\n}());\nexports.GraphRest = GraphRest;\n\n\n/***/ }),\n/* 52 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar graphqueryable_1 = __webpack_require__(5);\nvar groups_1 = __webpack_require__(54);\n// import { Me } from \"./me\";\n/**\n * Root object wrapping v1 functionality for MS Graph\n *\n */\nvar V1 = /** @class */ (function (_super) {\n __extends(V1, _super);\n /**\n * Creates a new instance of the V1 class\n *\n * @param baseUrl The url or Queryable which forms the parent of this fields collection\n * @param path Optional additional path\n */\n function V1(baseUrl, path) {\n if (path === void 0) { path = \"v1.0\"; }\n return _super.call(this, baseUrl, path) || this;\n }\n Object.defineProperty(V1.prototype, \"groups\", {\n get: function () {\n return new groups_1.Groups(this);\n },\n enumerable: true,\n configurable: true\n });\n return V1;\n}(graphqueryable_1.GraphQueryable));\nexports.V1 = V1;\n\n\n/***/ }),\n/* 53 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar util_1 = __webpack_require__(0);\nvar pnplibconfig_1 = __webpack_require__(2);\nvar utils_1 = __webpack_require__(9);\n// import { APIUrlException } from \"../utils/exceptions\";\nvar GraphHttpClient = /** @class */ (function () {\n function GraphHttpClient() {\n this._impl = pnplibconfig_1.RuntimeConfig.graphFetchClientFactory();\n }\n GraphHttpClient.prototype.fetch = function (url, options) {\n if (options === void 0) { options = {}; }\n var headers = new Headers();\n // first we add the global headers so they can be overwritten by any passed in locally to this call\n utils_1.mergeHeaders(headers, pnplibconfig_1.RuntimeConfig.graphHeaders);\n // second we add the local options so we can overwrite the globals\n utils_1.mergeHeaders(headers, options.headers);\n var opts = util_1.Util.extend(options, { headers: headers });\n // TODO: we could process auth here\n return this.fetchRaw(url, opts);\n };\n GraphHttpClient.prototype.fetchRaw = function (url, options) {\n var _this = this;\n if (options === void 0) { options = {}; }\n // here we need to normalize the headers\n var rawHeaders = new Headers();\n utils_1.mergeHeaders(rawHeaders, options.headers);\n options = util_1.Util.extend(options, { headers: rawHeaders });\n var retry = function (ctx) {\n _this._impl.fetch(url, {}, options).then(function (response) { return ctx.resolve(response); }).catch(function (response) {\n // Check if request was throttled - http status code 429\n // Check if request failed due to server unavailable - http status code 503\n if (response.status !== 429 && response.status !== 503) {\n ctx.reject(response);\n }\n // grab our current delay\n var delay = ctx.delay;\n // Increment our counters.\n ctx.delay *= 2;\n ctx.attempts++;\n // If we have exceeded the retry count, reject.\n if (ctx.retryCount <= ctx.attempts) {\n ctx.reject(response);\n }\n // Set our retry timeout for {delay} milliseconds.\n setTimeout(util_1.Util.getCtxCallback(_this, retry, ctx), delay);\n });\n };\n return new Promise(function (resolve, reject) {\n var retryContext = {\n attempts: 0,\n delay: 100,\n reject: reject,\n resolve: resolve,\n retryCount: 7,\n };\n retry.call(_this, retryContext);\n });\n };\n GraphHttpClient.prototype.get = function (url, options) {\n if (options === void 0) { options = {}; }\n var opts = util_1.Util.extend(options, { method: \"GET\" });\n return this.fetch(url, opts);\n };\n GraphHttpClient.prototype.post = function (url, options) {\n if (options === void 0) { options = {}; }\n var opts = util_1.Util.extend(options, { method: \"POST\" });\n return this.fetch(url, opts);\n };\n GraphHttpClient.prototype.patch = function (url, options) {\n if (options === void 0) { options = {}; }\n var opts = util_1.Util.extend(options, { method: \"PATCH\" });\n return this.fetch(url, opts);\n };\n GraphHttpClient.prototype.delete = function (url, options) {\n if (options === void 0) { options = {}; }\n var opts = util_1.Util.extend(options, { method: \"DELETE\" });\n return this.fetch(url, opts);\n };\n return GraphHttpClient;\n}());\nexports.GraphHttpClient = GraphHttpClient;\n\n\n/***/ }),\n/* 54 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar graphqueryable_1 = __webpack_require__(5);\nvar members_1 = __webpack_require__(55);\nvar util_1 = __webpack_require__(0);\nvar calendars_1 = __webpack_require__(56);\nvar conversations_1 = __webpack_require__(57);\nvar plans_1 = __webpack_require__(59);\nvar photos_1 = __webpack_require__(60);\nvar GroupType;\n(function (GroupType) {\n /**\n * Office 365 (aka unified group)\n */\n GroupType[GroupType[\"Office365\"] = 0] = \"Office365\";\n /**\n * Dynamic membership\n */\n GroupType[GroupType[\"Dynamic\"] = 1] = \"Dynamic\";\n /**\n * Security\n */\n GroupType[GroupType[\"Security\"] = 2] = \"Security\";\n})(GroupType = exports.GroupType || (exports.GroupType = {}));\n/**\n * Describes a collection of Field objects\n *\n */\nvar Groups = /** @class */ (function (_super) {\n __extends(Groups, _super);\n function Groups(baseUrl, path) {\n if (path === void 0) { path = \"groups\"; }\n return _super.call(this, baseUrl, path) || this;\n }\n /**\n * Gets a group from the collection using the specified id\n *\n * @param id Id of the group to get from this collection\n */\n Groups.prototype.getById = function (id) {\n return new Group(this, id);\n };\n /**\n * Create a new group as specified in the request body.\n *\n * @param name Name to display in the address book for the group\n * @param mailNickname Mail alias for the group\n * @param groupType Type of group being created\n * @param additionalProperties A plain object collection of additional properties you want to set on the new group\n */\n Groups.prototype.add = function (name, mailNickname, groupType, additionalProperties) {\n var _this = this;\n if (additionalProperties === void 0) { additionalProperties = {}; }\n var postBody = util_1.Util.extend({\n displayName: name,\n mailEnabled: groupType === GroupType.Office365,\n mailNickname: mailNickname,\n securityEnabled: groupType !== GroupType.Office365,\n }, additionalProperties);\n // include a group type if required\n if (groupType !== GroupType.Security) {\n postBody = util_1.Util.extend(postBody, {\n groupTypes: [groupType === GroupType.Office365 ? \"Unified\" : \"DynamicMembership\"],\n });\n }\n return this.postCore({\n body: JSON.stringify(postBody),\n }).then(function (r) {\n return {\n data: r,\n group: _this.getById(r.id),\n };\n });\n };\n return Groups;\n}(graphqueryable_1.GraphQueryableCollection));\nexports.Groups = Groups;\n/**\n * Represents a group entity\n */\nvar Group = /** @class */ (function (_super) {\n __extends(Group, _super);\n function Group() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n Object.defineProperty(Group.prototype, \"caldendar\", {\n /**\n * The calendar associated with this group\n */\n get: function () {\n return new calendars_1.Calendar(this, \"calendar\");\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Group.prototype, \"events\", {\n /**\n * Retrieve a list of event objects\n */\n get: function () {\n return new calendars_1.Events(this);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Group.prototype, \"owners\", {\n /**\n * Gets the collection of owners for this group\n */\n get: function () {\n return new members_1.Owners(this);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Group.prototype, \"plans\", {\n /**\n * The collection of plans for this group\n */\n get: function () {\n return new plans_1.Plans(this);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Group.prototype, \"members\", {\n /**\n * Gets the collection of members for this group\n */\n get: function () {\n return new members_1.Members(this);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Group.prototype, \"conversations\", {\n /**\n * Gets the conversations collection for this group\n */\n get: function () {\n return new conversations_1.Conversations(this);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Group.prototype, \"acceptedSenders\", {\n /**\n * Gets the collection of accepted senders for this group\n */\n get: function () {\n return new conversations_1.Senders(this, \"acceptedsenders\");\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Group.prototype, \"rejectedSenders\", {\n /**\n * Gets the collection of rejected senders for this group\n */\n get: function () {\n return new conversations_1.Senders(this, \"rejectedsenders\");\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Group.prototype, \"photo\", {\n /**\n * The photo associated with the group\n */\n get: function () {\n return new photos_1.Photo(this);\n },\n enumerable: true,\n configurable: true\n });\n /**\n * Add the group to the list of the current user's favorite groups. Supported for only Office 365 groups\n */\n Group.prototype.addFavorite = function () {\n return this.clone(Group, \"addFavorite\").postCore();\n };\n /**\n * Return all the groups that the specified group is a member of. The check is transitive\n *\n * @param securityEnabledOnly\n */\n Group.prototype.getMemberGroups = function (securityEnabledOnly) {\n if (securityEnabledOnly === void 0) { securityEnabledOnly = false; }\n return this.clone(Group, \"getMemberGroups\").postCore({\n body: JSON.stringify({\n securityEnabledOnly: securityEnabledOnly,\n }),\n });\n };\n /**\n * Deletes this group\n */\n Group.prototype.delete = function () {\n return this.deleteCore();\n };\n /**\n * Update the properties of a group object\n *\n * @param properties Set of properties of this group to update\n */\n Group.prototype.update = function (properties) {\n return this.patchCore({\n body: JSON.stringify(properties),\n });\n };\n /**\n * Remove the group from the list of the current user's favorite groups. Supported for only Office 365 groups\n */\n Group.prototype.removeFavorite = function () {\n return this.clone(Group, \"removeFavorite\").postCore();\n };\n /**\n * Reset the unseenCount of all the posts that the current user has not seen since their last visit\n */\n Group.prototype.resetUnseenCount = function () {\n return this.clone(Group, \"resetUnseenCount\").postCore();\n };\n /**\n * Calling this method will enable the current user to receive email notifications for this group,\n * about new posts, events, and files in that group. Supported for only Office 365 groups\n */\n Group.prototype.subscribeByMail = function () {\n return this.clone(Group, \"subscribeByMail\").postCore();\n };\n /**\n * Calling this method will prevent the current user from receiving email notifications for this group\n * about new posts, events, and files in that group. Supported for only Office 365 groups\n */\n Group.prototype.unsubscribeByMail = function () {\n return this.clone(Group, \"unsubscribeByMail\").postCore();\n };\n /**\n * Get the occurrences, exceptions, and single instances of events in a calendar view defined by a time range, from the default calendar of a group\n *\n * @param start Start date and time of the time range\n * @param end End date and time of the time range\n */\n Group.prototype.getCalendarView = function (start, end) {\n var view = this.clone(Group, \"calendarView\");\n view.query.add(\"startDateTime\", start.toISOString());\n view.query.add(\"endDateTime\", end.toISOString());\n return view.get();\n };\n return Group;\n}(graphqueryable_1.GraphQueryableInstance));\nexports.Group = Group;\n\n\n/***/ }),\n/* 55 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar graphqueryable_1 = __webpack_require__(5);\nvar Members = /** @class */ (function (_super) {\n __extends(Members, _super);\n function Members(baseUrl, path) {\n if (path === void 0) { path = \"members\"; }\n return _super.call(this, baseUrl, path) || this;\n }\n /**\n * Use this API to add a member to an Office 365 group, a security group or a mail-enabled security group through\n * the members navigation property. You can add users or other groups.\n * Important: You can add only users to Office 365 groups.\n *\n * @param id Full @odata.id of the directoryObject, user, or group object you want to add (ex: https://graph.microsoft.com/v1.0/directoryObjects/${id})\n */\n Members.prototype.add = function (id) {\n return this.clone(Members, \"$ref\").postCore({\n body: JSON.stringify({\n \"@odata.id\": id,\n }),\n });\n };\n /**\n * Gets a member of the group by id\n *\n * @param id Group member's id\n */\n Members.prototype.getById = function (id) {\n return new Member(this, id);\n };\n return Members;\n}(graphqueryable_1.GraphQueryableCollection));\nexports.Members = Members;\nvar Member = /** @class */ (function (_super) {\n __extends(Member, _super);\n function Member() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n return Member;\n}(graphqueryable_1.GraphQueryableInstance));\nexports.Member = Member;\nvar Owners = /** @class */ (function (_super) {\n __extends(Owners, _super);\n function Owners(baseUrl, path) {\n if (path === void 0) { path = \"owners\"; }\n return _super.call(this, baseUrl, path) || this;\n }\n return Owners;\n}(Members));\nexports.Owners = Owners;\n\n\n/***/ }),\n/* 56 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar graphqueryable_1 = __webpack_require__(5);\n// import { Attachments } from \"./attachments\";\nvar Calendars = /** @class */ (function (_super) {\n __extends(Calendars, _super);\n function Calendars(baseUrl, path) {\n if (path === void 0) { path = \"calendars\"; }\n return _super.call(this, baseUrl, path) || this;\n }\n return Calendars;\n}(graphqueryable_1.GraphQueryableCollection));\nexports.Calendars = Calendars;\nvar Calendar = /** @class */ (function (_super) {\n __extends(Calendar, _super);\n function Calendar() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n Object.defineProperty(Calendar.prototype, \"events\", {\n get: function () {\n return new Events(this);\n },\n enumerable: true,\n configurable: true\n });\n return Calendar;\n}(graphqueryable_1.GraphQueryableInstance));\nexports.Calendar = Calendar;\nvar Events = /** @class */ (function (_super) {\n __extends(Events, _super);\n function Events(baseUrl, path) {\n if (path === void 0) { path = \"events\"; }\n return _super.call(this, baseUrl, path) || this;\n }\n Events.prototype.getById = function (id) {\n return new Event(this, id);\n };\n /**\n * Adds a new event to the collection\n *\n * @param properties The set of properties used to create the event\n */\n Events.prototype.add = function (properties) {\n var _this = this;\n return this.postCore({\n body: JSON.stringify(properties),\n }).then(function (r) {\n return {\n data: r,\n event: _this.getById(r.id),\n };\n });\n };\n return Events;\n}(graphqueryable_1.GraphQueryableCollection));\nexports.Events = Events;\nvar Event = /** @class */ (function (_super) {\n __extends(Event, _super);\n function Event() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n // TODO:: when supported\n // /**\n // * Gets the collection of attachments for this event\n // */\n // public get attachments(): Attachments {\n // return new Attachments(this);\n // }\n /**\n * Update the properties of an event object\n *\n * @param properties Set of properties of this event to update\n */\n Event.prototype.update = function (properties) {\n return this.patchCore({\n body: JSON.stringify(properties),\n });\n };\n /**\n * Deletes this event\n */\n Event.prototype.delete = function () {\n return this.deleteCore();\n };\n return Event;\n}(graphqueryable_1.GraphQueryableInstance));\nexports.Event = Event;\n\n\n/***/ }),\n/* 57 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar graphqueryable_1 = __webpack_require__(5);\nvar attachments_1 = __webpack_require__(58);\nvar Conversations = /** @class */ (function (_super) {\n __extends(Conversations, _super);\n function Conversations(baseUrl, path) {\n if (path === void 0) { path = \"conversations\"; }\n return _super.call(this, baseUrl, path) || this;\n }\n /**\n * Create a new conversation by including a thread and a post.\n *\n * @param properties Properties used to create the new conversation\n */\n Conversations.prototype.add = function (properties) {\n return this.postCore({\n body: JSON.stringify(properties),\n });\n };\n /**\n * Gets a conversation from this collection by id\n *\n * @param id Group member's id\n */\n Conversations.prototype.getById = function (id) {\n return new Conversation(this, id);\n };\n return Conversations;\n}(graphqueryable_1.GraphQueryableCollection));\nexports.Conversations = Conversations;\nvar Threads = /** @class */ (function (_super) {\n __extends(Threads, _super);\n function Threads(baseUrl, path) {\n if (path === void 0) { path = \"threads\"; }\n return _super.call(this, baseUrl, path) || this;\n }\n /**\n * Gets a thread from this collection by id\n *\n * @param id Group member's id\n */\n Threads.prototype.getById = function (id) {\n return new Thread(this, id);\n };\n /**\n * Adds a new thread to this collection\n *\n * @param properties properties used to create the new thread\n * @returns Id of the new thread\n */\n Threads.prototype.add = function (properties) {\n return this.postCore({\n body: JSON.stringify(properties),\n });\n };\n return Threads;\n}(graphqueryable_1.GraphQueryableCollection));\nexports.Threads = Threads;\nvar Posts = /** @class */ (function (_super) {\n __extends(Posts, _super);\n function Posts(baseUrl, path) {\n if (path === void 0) { path = \"posts\"; }\n return _super.call(this, baseUrl, path) || this;\n }\n /**\n * Gets a thread from this collection by id\n *\n * @param id Group member's id\n */\n Posts.prototype.getById = function (id) {\n return new Post(this, id);\n };\n /**\n * Adds a new thread to this collection\n *\n * @param properties properties used to create the new thread\n * @returns Id of the new thread\n */\n Posts.prototype.add = function (properties) {\n return this.postCore({\n body: JSON.stringify(properties),\n });\n };\n return Posts;\n}(graphqueryable_1.GraphQueryableCollection));\nexports.Posts = Posts;\nvar Conversation = /** @class */ (function (_super) {\n __extends(Conversation, _super);\n function Conversation() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n Object.defineProperty(Conversation.prototype, \"threads\", {\n /**\n * Get all the threads in a group conversation.\n */\n get: function () {\n return new Threads(this);\n },\n enumerable: true,\n configurable: true\n });\n /**\n * Updates this conversation\n */\n Conversation.prototype.update = function (properties) {\n return this.patchCore({\n body: JSON.stringify(properties),\n });\n };\n /**\n * Deletes this member from the group\n */\n Conversation.prototype.delete = function () {\n return this.deleteCore();\n };\n return Conversation;\n}(graphqueryable_1.GraphQueryableInstance));\nexports.Conversation = Conversation;\nvar Thread = /** @class */ (function (_super) {\n __extends(Thread, _super);\n function Thread() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n Object.defineProperty(Thread.prototype, \"posts\", {\n /**\n * Get all the threads in a group conversation.\n */\n get: function () {\n return new Posts(this);\n },\n enumerable: true,\n configurable: true\n });\n /**\n * Reply to a thread in a group conversation and add a new post to it\n *\n * @param post Contents of the post\n */\n Thread.prototype.reply = function (post) {\n return this.clone(Thread, \"reply\").postCore({\n body: JSON.stringify({\n post: post,\n }),\n });\n };\n /**\n * Deletes this member from the group\n */\n Thread.prototype.delete = function () {\n return this.deleteCore();\n };\n return Thread;\n}(graphqueryable_1.GraphQueryableInstance));\nexports.Thread = Thread;\nvar Post = /** @class */ (function (_super) {\n __extends(Post, _super);\n function Post() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n Object.defineProperty(Post.prototype, \"attachments\", {\n get: function () {\n return new attachments_1.Attachments(this);\n },\n enumerable: true,\n configurable: true\n });\n /**\n * Deletes this post\n */\n Post.prototype.delete = function () {\n return this.deleteCore();\n };\n /**\n * Forward a post to a recipient\n */\n Post.prototype.forward = function (info) {\n return this.clone(Post, \"forward\").postCore({\n body: JSON.stringify(info),\n });\n };\n /**\n * Reply to a thread in a group conversation and add a new post to it\n *\n * @param post Contents of the post\n */\n Post.prototype.reply = function (post) {\n return this.clone(Post, \"reply\").postCore({\n body: JSON.stringify({\n post: post,\n }),\n });\n };\n return Post;\n}(graphqueryable_1.GraphQueryableInstance));\nexports.Post = Post;\nvar Senders = /** @class */ (function (_super) {\n __extends(Senders, _super);\n function Senders(baseUrl, path) {\n return _super.call(this, baseUrl, path) || this;\n }\n /**\n * Add a new user or group to this senders collection\n * @param id The full @odata.id value to add (ex: https://graph.microsoft.com/v1.0/users/user@contoso.com)\n */\n Senders.prototype.add = function (id) {\n return this.clone(Senders, \"$ref\").postCore({\n body: JSON.stringify({\n \"@odata.id\": id,\n }),\n });\n };\n /**\n * Removes the entity from the collection\n *\n * @param id The full @odata.id value to remove (ex: https://graph.microsoft.com/v1.0/users/user@contoso.com)\n */\n Senders.prototype.remove = function (id) {\n var remover = this.clone(Senders, \"$ref\");\n remover.query.add(\"$id\", id);\n return remover.deleteCore();\n };\n return Senders;\n}(graphqueryable_1.GraphQueryableCollection));\nexports.Senders = Senders;\n\n\n/***/ }),\n/* 58 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar graphqueryable_1 = __webpack_require__(5);\nvar Attachments = /** @class */ (function (_super) {\n __extends(Attachments, _super);\n function Attachments(baseUrl, path) {\n if (path === void 0) { path = \"attachments\"; }\n return _super.call(this, baseUrl, path) || this;\n }\n /**\n * Gets a member of the group by id\n *\n * @param id Attachment id\n */\n Attachments.prototype.getById = function (id) {\n return new Attachment(this, id);\n };\n /**\n * Add attachment to this collection\n *\n * @param name Name given to the attachment file\n * @param bytes File content\n */\n Attachments.prototype.addFile = function (name, bytes) {\n return this.postCore({\n body: JSON.stringify({\n \"@odata.type\": \"#microsoft.graph.fileAttachment\",\n contentBytes: bytes,\n name: name,\n }),\n });\n };\n return Attachments;\n}(graphqueryable_1.GraphQueryableCollection));\nexports.Attachments = Attachments;\nvar Attachment = /** @class */ (function (_super) {\n __extends(Attachment, _super);\n function Attachment() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n return Attachment;\n}(graphqueryable_1.GraphQueryableInstance));\nexports.Attachment = Attachment;\n\n\n/***/ }),\n/* 59 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar graphqueryable_1 = __webpack_require__(5);\nvar Plans = /** @class */ (function (_super) {\n __extends(Plans, _super);\n function Plans(baseUrl, path) {\n if (path === void 0) { path = \"planner/plans\"; }\n return _super.call(this, baseUrl, path) || this;\n }\n /**\n * Gets a plan from this collection by id\n *\n * @param id Plan's id\n */\n Plans.prototype.getById = function (id) {\n return new Plan(this, id);\n };\n return Plans;\n}(graphqueryable_1.GraphQueryableCollection));\nexports.Plans = Plans;\nvar Plan = /** @class */ (function (_super) {\n __extends(Plan, _super);\n function Plan() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n return Plan;\n}(graphqueryable_1.GraphQueryableInstance));\nexports.Plan = Plan;\n\n\n/***/ }),\n/* 60 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar graphqueryable_1 = __webpack_require__(5);\nvar parsers_1 = __webpack_require__(7);\nvar Photo = /** @class */ (function (_super) {\n __extends(Photo, _super);\n function Photo(baseUrl, path) {\n if (path === void 0) { path = \"photo\"; }\n return _super.call(this, baseUrl, path) || this;\n }\n /**\n * Gets the image bytes as a blob (browser)\n */\n Photo.prototype.getBlob = function () {\n return this.clone(Photo, \"$value\", false).get(new parsers_1.BlobFileParser());\n };\n /**\n * Gets the image file byets as a Buffer (node.js)\n */\n Photo.prototype.getBuffer = function () {\n return this.clone(Photo, \"$value\", false).get(new parsers_1.BufferFileParser());\n };\n /**\n * Sets the file bytes\n *\n * @param content Image file contents, max 4 MB\n */\n Photo.prototype.setContent = function (content) {\n return this.clone(Photo, \"$value\", false).patchCore({\n body: content,\n });\n };\n return Photo;\n}(graphqueryable_1.GraphQueryableInstance));\nexports.Photo = Photo;\n\n\n/***/ })\n/******/ ]);\n});\n\n\n// WEBPACK FOOTER //\n// pnp.min.js"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"/assets/\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 32);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 000deb434d48a44d90ec","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar pnplibconfig_1 = require(\"../configuration/pnplibconfig\");\nfunction extractWebUrl(candidateUrl) {\n if (candidateUrl === null) {\n return \"\";\n }\n var index = candidateUrl.indexOf(\"_api/\");\n if (index > -1) {\n return candidateUrl.substr(0, index);\n }\n // if all else fails just give them what they gave us back\n return candidateUrl;\n}\nexports.extractWebUrl = extractWebUrl;\nvar Util = /** @class */ (function () {\n function Util() {\n }\n /**\n * Gets a callback function which will maintain context across async calls.\n * Allows for the calling pattern getCtxCallback(thisobj, method, methodarg1, methodarg2, ...)\n *\n * @param context The object that will be the 'this' value in the callback\n * @param method The method to which we will apply the context and parameters\n * @param params Optional, additional arguments to supply to the wrapped method when it is invoked\n */\n Util.getCtxCallback = function (context, method) {\n var params = [];\n for (var _i = 2; _i < arguments.length; _i++) {\n params[_i - 2] = arguments[_i];\n }\n return function () {\n method.apply(context, params);\n };\n };\n /**\n * Tests if a url param exists\n *\n * @param name The name of the url paramter to check\n */\n Util.urlParamExists = function (name) {\n name = name.replace(/[\\[]/, \"\\\\[\").replace(/[\\]]/, \"\\\\]\");\n var regex = new RegExp(\"[\\\\?&]\" + name + \"=([^&#]*)\");\n return regex.test(location.search);\n };\n /**\n * Gets a url param value by name\n *\n * @param name The name of the paramter for which we want the value\n */\n Util.getUrlParamByName = function (name) {\n name = name.replace(/[\\[]/, \"\\\\[\").replace(/[\\]]/, \"\\\\]\");\n var regex = new RegExp(\"[\\\\?&]\" + name + \"=([^&#]*)\");\n var results = regex.exec(location.search);\n return results == null ? \"\" : decodeURIComponent(results[1].replace(/\\+/g, \" \"));\n };\n /**\n * Gets a url param by name and attempts to parse a bool value\n *\n * @param name The name of the paramter for which we want the boolean value\n */\n Util.getUrlParamBoolByName = function (name) {\n var p = this.getUrlParamByName(name);\n var isFalse = (p === \"\" || /false|0/i.test(p));\n return !isFalse;\n };\n /**\n * Inserts the string s into the string target as the index specified by index\n *\n * @param target The string into which we will insert s\n * @param index The location in target to insert s (zero based)\n * @param s The string to insert into target at position index\n */\n Util.stringInsert = function (target, index, s) {\n if (index > 0) {\n return target.substring(0, index) + s + target.substring(index, target.length);\n }\n return s + target;\n };\n /**\n * Adds a value to a date\n *\n * @param date The date to which we will add units, done in local time\n * @param interval The name of the interval to add, one of: ['year', 'quarter', 'month', 'week', 'day', 'hour', 'minute', 'second']\n * @param units The amount to add to date of the given interval\n *\n * http://stackoverflow.com/questions/1197928/how-to-add-30-minutes-to-a-javascript-date-object\n */\n Util.dateAdd = function (date, interval, units) {\n var ret = new Date(date); // don't change original date\n switch (interval.toLowerCase()) {\n case \"year\":\n ret.setFullYear(ret.getFullYear() + units);\n break;\n case \"quarter\":\n ret.setMonth(ret.getMonth() + 3 * units);\n break;\n case \"month\":\n ret.setMonth(ret.getMonth() + units);\n break;\n case \"week\":\n ret.setDate(ret.getDate() + 7 * units);\n break;\n case \"day\":\n ret.setDate(ret.getDate() + units);\n break;\n case \"hour\":\n ret.setTime(ret.getTime() + units * 3600000);\n break;\n case \"minute\":\n ret.setTime(ret.getTime() + units * 60000);\n break;\n case \"second\":\n ret.setTime(ret.getTime() + units * 1000);\n break;\n default:\n ret = undefined;\n break;\n }\n return ret;\n };\n /**\n * Loads a stylesheet into the current page\n *\n * @param path The url to the stylesheet\n * @param avoidCache If true a value will be appended as a query string to avoid browser caching issues\n */\n Util.loadStylesheet = function (path, avoidCache) {\n if (avoidCache) {\n path += \"?\" + encodeURIComponent((new Date()).getTime().toString());\n }\n var head = document.getElementsByTagName(\"head\");\n if (head.length > 0) {\n var e = document.createElement(\"link\");\n head[0].appendChild(e);\n e.setAttribute(\"type\", \"text/css\");\n e.setAttribute(\"rel\", \"stylesheet\");\n e.setAttribute(\"href\", path);\n }\n };\n /**\n * Combines an arbitrary set of paths ensuring that the slashes are normalized\n *\n * @param paths 0 to n path parts to combine\n */\n Util.combinePaths = function () {\n var paths = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n paths[_i] = arguments[_i];\n }\n return paths\n .filter(function (path) { return !Util.stringIsNullOrEmpty(path); })\n .map(function (path) { return path.replace(/^[\\\\|\\/]/, \"\").replace(/[\\\\|\\/]$/, \"\"); })\n .join(\"/\")\n .replace(/\\\\/g, \"/\");\n };\n /**\n * Gets a random string of chars length\n *\n * @param chars The length of the random string to generate\n */\n Util.getRandomString = function (chars) {\n var text = new Array(chars);\n var possible = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789\";\n for (var i = 0; i < chars; i++) {\n text[i] = possible.charAt(Math.floor(Math.random() * possible.length));\n }\n return text.join(\"\");\n };\n /**\n * Gets a random GUID value\n *\n * http://stackoverflow.com/questions/105034/create-guid-uuid-in-javascript\n */\n /* tslint:disable no-bitwise */\n Util.getGUID = function () {\n var d = new Date().getTime();\n var guid = \"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx\".replace(/[xy]/g, function (c) {\n var r = (d + Math.random() * 16) % 16 | 0;\n d = Math.floor(d / 16);\n return (c === \"x\" ? r : (r & 0x3 | 0x8)).toString(16);\n });\n return guid;\n };\n /* tslint:enable */\n /**\n * Determines if a given value is a function\n *\n * @param candidateFunction The thing to test for being a function\n */\n Util.isFunction = function (candidateFunction) {\n return typeof candidateFunction === \"function\";\n };\n /**\n * @returns whether the provided parameter is a JavaScript Array or not.\n */\n Util.isArray = function (array) {\n if (Array.isArray) {\n return Array.isArray(array);\n }\n return array && typeof array.length === \"number\" && array.constructor === Array;\n };\n /**\n * Determines if a string is null or empty or undefined\n *\n * @param s The string to test\n */\n Util.stringIsNullOrEmpty = function (s) {\n return typeof s === \"undefined\" || s === null || s.length < 1;\n };\n /**\n * Provides functionality to extend the given object by doing a shallow copy\n *\n * @param target The object to which properties will be copied\n * @param source The source object from which properties will be copied\n * @param noOverwrite If true existing properties on the target are not overwritten from the source\n *\n */\n Util.extend = function (target, source, noOverwrite) {\n if (noOverwrite === void 0) { noOverwrite = false; }\n if (source === null || typeof source === \"undefined\") {\n return target;\n }\n // ensure we don't overwrite things we don't want overwritten\n var check = noOverwrite ? function (o, i) { return !(i in o); } : function () { return true; };\n return Object.getOwnPropertyNames(source)\n .filter(function (v) { return check(target, v); })\n .reduce(function (t, v) {\n t[v] = source[v];\n return t;\n }, target);\n };\n /**\n * Determines if a given url is absolute\n *\n * @param url The url to check to see if it is absolute\n */\n Util.isUrlAbsolute = function (url) {\n return /^https?:\\/\\/|^\\/\\//i.test(url);\n };\n /**\n * Ensures that a given url is absolute for the current web based on context\n *\n * @param candidateUrl The url to make absolute\n *\n */\n Util.toAbsoluteUrl = function (candidateUrl) {\n return new Promise(function (resolve) {\n if (Util.isUrlAbsolute(candidateUrl)) {\n // if we are already absolute, then just return the url\n return resolve(candidateUrl);\n }\n if (pnplibconfig_1.RuntimeConfig.spBaseUrl !== null) {\n // base url specified either with baseUrl of spfxContext config property\n return resolve(Util.combinePaths(pnplibconfig_1.RuntimeConfig.spBaseUrl, candidateUrl));\n }\n if (typeof global._spPageContextInfo !== \"undefined\") {\n // operating in classic pages\n if (global._spPageContextInfo.hasOwnProperty(\"webAbsoluteUrl\")) {\n return resolve(Util.combinePaths(global._spPageContextInfo.webAbsoluteUrl, candidateUrl));\n }\n else if (global._spPageContextInfo.hasOwnProperty(\"webServerRelativeUrl\")) {\n return resolve(Util.combinePaths(global._spPageContextInfo.webServerRelativeUrl, candidateUrl));\n }\n }\n // does window.location exist and have a certain path part in it?\n if (typeof global.location !== \"undefined\") {\n var baseUrl_1 = global.location.toString().toLowerCase();\n [\"/_layouts/\", \"/siteassets/\"].forEach(function (s) {\n var index = baseUrl_1.indexOf(s);\n if (index > 0) {\n return resolve(Util.combinePaths(baseUrl_1.substr(0, index), candidateUrl));\n }\n });\n }\n return resolve(candidateUrl);\n });\n };\n return Util;\n}());\nexports.Util = Util;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/utils/util.js\n// module id = 0\n// module chunks = 0","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar util_1 = require(\"../utils/util\");\nvar collections_1 = require(\"../collections/collections\");\nvar utils_1 = require(\"../net/utils\");\nvar exceptions_1 = require(\"../utils/exceptions\");\nvar logging_1 = require(\"../utils/logging\");\nvar queryable_1 = require(\"../odata/queryable\");\nvar pipeline_1 = require(\"../request/pipeline\");\nvar httpclient_1 = require(\"../net/httpclient\");\n/**\n * SharePointQueryable Base Class\n *\n */\nvar SharePointQueryable = /** @class */ (function (_super) {\n __extends(SharePointQueryable, _super);\n /**\n * Creates a new instance of the SharePointQueryable class\n *\n * @constructor\n * @param baseUrl A string or SharePointQueryable that should form the base part of the url\n *\n */\n function SharePointQueryable(baseUrl, path) {\n var _this = _super.call(this) || this;\n _this._options = {};\n _this._query = new collections_1.Dictionary();\n _this._batch = null;\n if (typeof baseUrl === \"string\") {\n // we need to do some extra parsing to get the parent url correct if we are\n // being created from just a string.\n var urlStr = baseUrl;\n if (util_1.Util.isUrlAbsolute(urlStr) || urlStr.lastIndexOf(\"/\") < 0) {\n _this._parentUrl = urlStr;\n _this._url = util_1.Util.combinePaths(urlStr, path);\n }\n else if (urlStr.lastIndexOf(\"/\") > urlStr.lastIndexOf(\"(\")) {\n // .../items(19)/fields\n var index = urlStr.lastIndexOf(\"/\");\n _this._parentUrl = urlStr.slice(0, index);\n path = util_1.Util.combinePaths(urlStr.slice(index), path);\n _this._url = util_1.Util.combinePaths(_this._parentUrl, path);\n }\n else {\n // .../items(19)\n var index = urlStr.lastIndexOf(\"(\");\n _this._parentUrl = urlStr.slice(0, index);\n _this._url = util_1.Util.combinePaths(urlStr, path);\n }\n }\n else {\n var q = baseUrl;\n _this._parentUrl = q._url;\n _this._options = q._options;\n var target = q._query.get(\"@target\");\n if (target !== null) {\n _this._query.add(\"@target\", target);\n }\n _this._url = util_1.Util.combinePaths(_this._parentUrl, path);\n }\n return _this;\n }\n /**\n * Blocks a batch call from occuring, MUST be cleared by calling the returned function\n */\n SharePointQueryable.prototype.addBatchDependency = function () {\n if (this.hasBatch) {\n return this._batch.addDependency();\n }\n return function () { return null; };\n };\n Object.defineProperty(SharePointQueryable.prototype, \"hasBatch\", {\n /**\n * Indicates if the current query has a batch associated\n *\n */\n get: function () {\n return this._batch !== null;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(SharePointQueryable.prototype, \"batch\", {\n /**\n * The batch currently associated with this query or null\n *\n */\n get: function () {\n return this.hasBatch ? this._batch : null;\n },\n enumerable: true,\n configurable: true\n });\n /**\n * Creates a new instance of the supplied factory and extends this into that new instance\n *\n * @param factory constructor for the new SharePointQueryable\n */\n SharePointQueryable.prototype.as = function (factory) {\n var o = new factory(this._url, null);\n return util_1.Util.extend(o, this, true);\n };\n /**\n * Adds this query to the supplied batch\n *\n * @example\n * ```\n *\n * let b = pnp.sp.createBatch();\n * pnp.sp.web.inBatch(b).get().then(...);\n * b.execute().then(...)\n * ```\n */\n SharePointQueryable.prototype.inBatch = function (batch) {\n if (this._batch !== null) {\n throw new exceptions_1.AlreadyInBatchException();\n }\n this._batch = batch;\n return this;\n };\n /**\n * Gets the full url with query information\n *\n */\n SharePointQueryable.prototype.toUrlAndQuery = function () {\n var aliasedParams = new collections_1.Dictionary();\n var url = this.toUrl().replace(/'!(@.*?)::(.*?)'/ig, function (match, labelName, value) {\n logging_1.Logger.write(\"Rewriting aliased parameter from match \" + match + \" to label: \" + labelName + \" value: \" + value, logging_1.LogLevel.Verbose);\n aliasedParams.add(labelName, \"'\" + value + \"'\");\n return labelName;\n });\n // inlude our explicitly set query string params\n aliasedParams.merge(this._query);\n if (aliasedParams.count() > 0) {\n url += \"?\" + aliasedParams.getKeys().map(function (key) { return key + \"=\" + aliasedParams.get(key); }).join(\"&\");\n }\n return url;\n };\n /**\n * Gets a parent for this instance as specified\n *\n * @param factory The contructor for the class to create\n */\n SharePointQueryable.prototype.getParent = function (factory, baseUrl, path, batch) {\n if (baseUrl === void 0) { baseUrl = this.parentUrl; }\n var parent = new factory(baseUrl, path);\n parent.configure(this._options);\n var target = this.query.get(\"@target\");\n if (target !== null) {\n parent.query.add(\"@target\", target);\n }\n if (typeof batch !== \"undefined\") {\n parent = parent.inBatch(batch);\n }\n return parent;\n };\n /**\n * Clones this SharePointQueryable into a new SharePointQueryable instance of T\n * @param factory Constructor used to create the new instance\n * @param additionalPath Any additional path to include in the clone\n * @param includeBatch If true this instance's batch will be added to the cloned instance\n */\n SharePointQueryable.prototype.clone = function (factory, additionalPath, includeBatch) {\n if (includeBatch === void 0) { includeBatch = true; }\n var clone = new factory(this, additionalPath);\n var target = this.query.get(\"@target\");\n if (target !== null) {\n clone.query.add(\"@target\", target);\n }\n if (includeBatch && this.hasBatch) {\n clone = clone.inBatch(this.batch);\n }\n return clone;\n };\n /**\n * Converts the current instance to a request context\n *\n * @param verb The request verb\n * @param options The set of supplied request options\n * @param parser The supplied ODataParser instance\n * @param pipeline Optional request processing pipeline\n */\n SharePointQueryable.prototype.toRequestContext = function (verb, options, parser, pipeline) {\n var _this = this;\n if (options === void 0) { options = {}; }\n if (pipeline === void 0) { pipeline = pipeline_1.PipelineMethods.default; }\n var dependencyDispose = this.hasBatch ? this.addBatchDependency() : function () { return; };\n return util_1.Util.toAbsoluteUrl(this.toUrlAndQuery()).then(function (url) {\n utils_1.mergeOptions(options, _this._options);\n // build our request context\n var context = {\n batch: _this._batch,\n batchDependency: dependencyDispose,\n cachingOptions: _this._cachingOptions,\n clientFactory: function () { return new httpclient_1.HttpClient(); },\n isBatched: _this.hasBatch,\n isCached: _this._useCaching,\n options: options,\n parser: parser,\n pipeline: pipeline,\n requestAbsoluteUrl: url,\n requestId: util_1.Util.getGUID(),\n verb: verb,\n };\n return context;\n });\n };\n return SharePointQueryable;\n}(queryable_1.ODataQueryable));\nexports.SharePointQueryable = SharePointQueryable;\n/**\n * Represents a REST collection which can be filtered, paged, and selected\n *\n */\nvar SharePointQueryableCollection = /** @class */ (function (_super) {\n __extends(SharePointQueryableCollection, _super);\n function SharePointQueryableCollection() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n /**\n * Filters the returned collection (https://msdn.microsoft.com/en-us/library/office/fp142385.aspx#bk_supported)\n *\n * @param filter The string representing the filter query\n */\n SharePointQueryableCollection.prototype.filter = function (filter) {\n this._query.add(\"$filter\", filter);\n return this;\n };\n /**\n * Choose which fields to return\n *\n * @param selects One or more fields to return\n */\n SharePointQueryableCollection.prototype.select = function () {\n var selects = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n selects[_i] = arguments[_i];\n }\n if (selects.length > 0) {\n this._query.add(\"$select\", selects.join(\",\"));\n }\n return this;\n };\n /**\n * Expands fields such as lookups to get additional data\n *\n * @param expands The Fields for which to expand the values\n */\n SharePointQueryableCollection.prototype.expand = function () {\n var expands = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n expands[_i] = arguments[_i];\n }\n if (expands.length > 0) {\n this._query.add(\"$expand\", expands.join(\",\"));\n }\n return this;\n };\n /**\n * Orders based on the supplied fields ascending\n *\n * @param orderby The name of the field to sort on\n * @param ascending If false DESC is appended, otherwise ASC (default)\n */\n SharePointQueryableCollection.prototype.orderBy = function (orderBy, ascending) {\n if (ascending === void 0) { ascending = true; }\n var keys = this._query.getKeys();\n var query = [];\n var asc = ascending ? \" asc\" : \" desc\";\n for (var i = 0; i < keys.length; i++) {\n if (keys[i] === \"$orderby\") {\n query.push(this._query.get(\"$orderby\"));\n break;\n }\n }\n query.push(\"\" + orderBy + asc);\n this._query.add(\"$orderby\", query.join(\",\"));\n return this;\n };\n /**\n * Skips the specified number of items\n *\n * @param skip The number of items to skip\n */\n SharePointQueryableCollection.prototype.skip = function (skip) {\n this._query.add(\"$skip\", skip.toString());\n return this;\n };\n /**\n * Limits the query to only return the specified number of items\n *\n * @param top The query row limit\n */\n SharePointQueryableCollection.prototype.top = function (top) {\n this._query.add(\"$top\", top.toString());\n return this;\n };\n return SharePointQueryableCollection;\n}(SharePointQueryable));\nexports.SharePointQueryableCollection = SharePointQueryableCollection;\n/**\n * Represents an instance that can be selected\n *\n */\nvar SharePointQueryableInstance = /** @class */ (function (_super) {\n __extends(SharePointQueryableInstance, _super);\n function SharePointQueryableInstance() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n /**\n * Choose which fields to return\n *\n * @param selects One or more fields to return\n */\n SharePointQueryableInstance.prototype.select = function () {\n var selects = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n selects[_i] = arguments[_i];\n }\n if (selects.length > 0) {\n this._query.add(\"$select\", selects.join(\",\"));\n }\n return this;\n };\n /**\n * Expands fields such as lookups to get additional data\n *\n * @param expands The Fields for which to expand the values\n */\n SharePointQueryableInstance.prototype.expand = function () {\n var expands = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n expands[_i] = arguments[_i];\n }\n if (expands.length > 0) {\n this._query.add(\"$expand\", expands.join(\",\"));\n }\n return this;\n };\n return SharePointQueryableInstance;\n}(SharePointQueryable));\nexports.SharePointQueryableInstance = SharePointQueryableInstance;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/sharepoint/sharepointqueryable.js\n// module id = 1\n// module chunks = 0","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar fetchclient_1 = require(\"../net/fetchclient\");\nvar RuntimeConfigImpl = /** @class */ (function () {\n function RuntimeConfigImpl() {\n // these are our default values for the library\n this._defaultCachingStore = \"session\";\n this._defaultCachingTimeoutSeconds = 60;\n this._globalCacheDisable = false;\n this._enableCacheExpiration = false;\n this._cacheExpirationIntervalMilliseconds = 750;\n this._spfxContext = null;\n // sharepoint settings\n this._spFetchClientFactory = function () { return new fetchclient_1.FetchClient(); };\n this._spBaseUrl = null;\n this._spHeaders = null;\n // ms graph settings\n this._graphHeaders = null;\n this._graphFetchClientFactory = function () { return null; };\n }\n RuntimeConfigImpl.prototype.set = function (config) {\n var _this = this;\n if (config.hasOwnProperty(\"globalCacheDisable\")) {\n this._globalCacheDisable = config.globalCacheDisable;\n }\n if (config.hasOwnProperty(\"defaultCachingStore\")) {\n this._defaultCachingStore = config.defaultCachingStore;\n }\n if (config.hasOwnProperty(\"defaultCachingTimeoutSeconds\")) {\n this._defaultCachingTimeoutSeconds = config.defaultCachingTimeoutSeconds;\n }\n if (config.hasOwnProperty(\"sp\")) {\n if (config.sp.hasOwnProperty(\"fetchClientFactory\")) {\n this._spFetchClientFactory = config.sp.fetchClientFactory;\n }\n if (config.sp.hasOwnProperty(\"baseUrl\")) {\n this._spBaseUrl = config.sp.baseUrl;\n }\n if (config.sp.hasOwnProperty(\"headers\")) {\n this._spHeaders = config.sp.headers;\n }\n }\n if (config.hasOwnProperty(\"spfxContext\")) {\n this._spfxContext = config.spfxContext;\n if (typeof this._spfxContext.graphHttpClient !== \"undefined\") {\n this._graphFetchClientFactory = function () { return _this._spfxContext.graphHttpClient; };\n }\n }\n if (config.hasOwnProperty(\"graph\")) {\n if (config.graph.hasOwnProperty(\"headers\")) {\n this._graphHeaders = config.graph.headers;\n }\n // this comes after the default setting of the _graphFetchClientFactory client so it can be overwritten\n if (config.graph.hasOwnProperty(\"fetchClientFactory\")) {\n this._graphFetchClientFactory = config.graph.fetchClientFactory;\n }\n }\n if (config.hasOwnProperty(\"enableCacheExpiration\")) {\n this._enableCacheExpiration = config.enableCacheExpiration;\n }\n if (config.hasOwnProperty(\"cacheExpirationIntervalMilliseconds\")) {\n // we don't let the interval be less than 300 milliseconds\n var interval = config.cacheExpirationIntervalMilliseconds < 300 ? 300 : config.cacheExpirationIntervalMilliseconds;\n this._cacheExpirationIntervalMilliseconds = interval;\n }\n };\n Object.defineProperty(RuntimeConfigImpl.prototype, \"defaultCachingStore\", {\n get: function () {\n return this._defaultCachingStore;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(RuntimeConfigImpl.prototype, \"defaultCachingTimeoutSeconds\", {\n get: function () {\n return this._defaultCachingTimeoutSeconds;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(RuntimeConfigImpl.prototype, \"globalCacheDisable\", {\n get: function () {\n return this._globalCacheDisable;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(RuntimeConfigImpl.prototype, \"spFetchClientFactory\", {\n get: function () {\n return this._spFetchClientFactory;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(RuntimeConfigImpl.prototype, \"spBaseUrl\", {\n get: function () {\n if (this._spBaseUrl !== null) {\n return this._spBaseUrl;\n }\n else if (this._spfxContext !== null) {\n return this._spfxContext.pageContext.web.absoluteUrl;\n }\n return null;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(RuntimeConfigImpl.prototype, \"spHeaders\", {\n get: function () {\n return this._spHeaders;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(RuntimeConfigImpl.prototype, \"enableCacheExpiration\", {\n get: function () {\n return this._enableCacheExpiration;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(RuntimeConfigImpl.prototype, \"cacheExpirationIntervalMilliseconds\", {\n get: function () {\n return this._cacheExpirationIntervalMilliseconds;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(RuntimeConfigImpl.prototype, \"spfxContext\", {\n get: function () {\n return this._spfxContext;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(RuntimeConfigImpl.prototype, \"graphFetchClientFactory\", {\n get: function () {\n return this._graphFetchClientFactory;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(RuntimeConfigImpl.prototype, \"graphHeaders\", {\n get: function () {\n return this._graphHeaders;\n },\n enumerable: true,\n configurable: true\n });\n return RuntimeConfigImpl;\n}());\nexports.RuntimeConfigImpl = RuntimeConfigImpl;\nvar _runtimeConfig = new RuntimeConfigImpl();\nexports.RuntimeConfig = _runtimeConfig;\nfunction setRuntimeConfig(config) {\n _runtimeConfig.set(config);\n}\nexports.setRuntimeConfig = setRuntimeConfig;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/configuration/pnplibconfig.js\n// module id = 2\n// module chunks = 0","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\n/**\n * A set of logging levels\n *\n */\nvar LogLevel;\n(function (LogLevel) {\n LogLevel[LogLevel[\"Verbose\"] = 0] = \"Verbose\";\n LogLevel[LogLevel[\"Info\"] = 1] = \"Info\";\n LogLevel[LogLevel[\"Warning\"] = 2] = \"Warning\";\n LogLevel[LogLevel[\"Error\"] = 3] = \"Error\";\n LogLevel[LogLevel[\"Off\"] = 99] = \"Off\";\n})(LogLevel = exports.LogLevel || (exports.LogLevel = {}));\n/**\n * Class used to subscribe ILogListener and log messages throughout an application\n *\n */\nvar Logger = /** @class */ (function () {\n function Logger() {\n }\n Object.defineProperty(Logger, \"activeLogLevel\", {\n get: function () {\n return Logger.instance.activeLogLevel;\n },\n set: function (value) {\n Logger.instance.activeLogLevel = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Logger, \"instance\", {\n get: function () {\n if (typeof Logger._instance === \"undefined\" || Logger._instance === null) {\n Logger._instance = new LoggerImpl();\n }\n return Logger._instance;\n },\n enumerable: true,\n configurable: true\n });\n /**\n * Adds ILogListener instances to the set of subscribed listeners\n *\n * @param listeners One or more listeners to subscribe to this log\n */\n Logger.subscribe = function () {\n var listeners = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n listeners[_i] = arguments[_i];\n }\n listeners.map(function (listener) { return Logger.instance.subscribe(listener); });\n };\n /**\n * Clears the subscribers collection, returning the collection before modifiction\n */\n Logger.clearSubscribers = function () {\n return Logger.instance.clearSubscribers();\n };\n Object.defineProperty(Logger, \"count\", {\n /**\n * Gets the current subscriber count\n */\n get: function () {\n return Logger.instance.count;\n },\n enumerable: true,\n configurable: true\n });\n /**\n * Writes the supplied string to the subscribed listeners\n *\n * @param message The message to write\n * @param level [Optional] if supplied will be used as the level of the entry (Default: LogLevel.Verbose)\n */\n Logger.write = function (message, level) {\n if (level === void 0) { level = LogLevel.Verbose; }\n Logger.instance.log({ level: level, message: message });\n };\n /**\n * Writes the supplied string to the subscribed listeners\n *\n * @param json The json object to stringify and write\n * @param level [Optional] if supplied will be used as the level of the entry (Default: LogLevel.Verbose)\n */\n Logger.writeJSON = function (json, level) {\n if (level === void 0) { level = LogLevel.Verbose; }\n Logger.instance.log({ level: level, message: JSON.stringify(json) });\n };\n /**\n * Logs the supplied entry to the subscribed listeners\n *\n * @param entry The message to log\n */\n Logger.log = function (entry) {\n Logger.instance.log(entry);\n };\n /**\n * Logs performance tracking data for the the execution duration of the supplied function using console.profile\n *\n * @param name The name of this profile boundary\n * @param f The function to execute and track within this performance boundary\n */\n Logger.measure = function (name, f) {\n return Logger.instance.measure(name, f);\n };\n return Logger;\n}());\nexports.Logger = Logger;\nvar LoggerImpl = /** @class */ (function () {\n function LoggerImpl(activeLogLevel, subscribers) {\n if (activeLogLevel === void 0) { activeLogLevel = LogLevel.Warning; }\n if (subscribers === void 0) { subscribers = []; }\n this.activeLogLevel = activeLogLevel;\n this.subscribers = subscribers;\n }\n LoggerImpl.prototype.subscribe = function (listener) {\n this.subscribers.push(listener);\n };\n LoggerImpl.prototype.clearSubscribers = function () {\n var s = this.subscribers.slice(0);\n this.subscribers.length = 0;\n return s;\n };\n Object.defineProperty(LoggerImpl.prototype, \"count\", {\n get: function () {\n return this.subscribers.length;\n },\n enumerable: true,\n configurable: true\n });\n LoggerImpl.prototype.write = function (message, level) {\n if (level === void 0) { level = LogLevel.Verbose; }\n this.log({ level: level, message: message });\n };\n LoggerImpl.prototype.log = function (entry) {\n if (typeof entry === \"undefined\" || entry.level < this.activeLogLevel) {\n return;\n }\n this.subscribers.map(function (subscriber) { return subscriber.log(entry); });\n };\n LoggerImpl.prototype.measure = function (name, f) {\n console.profile(name);\n try {\n return f();\n }\n finally {\n console.profileEnd();\n }\n };\n return LoggerImpl;\n}());\n/**\n * Implementation of ILogListener which logs to the browser console\n *\n */\nvar ConsoleListener = /** @class */ (function () {\n function ConsoleListener() {\n }\n /**\n * Any associated data that a given logging listener may choose to log or ignore\n *\n * @param entry The information to be logged\n */\n ConsoleListener.prototype.log = function (entry) {\n var msg = this.format(entry);\n switch (entry.level) {\n case LogLevel.Verbose:\n case LogLevel.Info:\n console.log(msg);\n break;\n case LogLevel.Warning:\n console.warn(msg);\n break;\n case LogLevel.Error:\n console.error(msg);\n break;\n }\n };\n /**\n * Formats the message\n *\n * @param entry The information to format into a string\n */\n ConsoleListener.prototype.format = function (entry) {\n var msg = [];\n msg.push(\"Message: \" + entry.message);\n if (typeof entry.data !== \"undefined\") {\n msg.push(\" Data: \" + JSON.stringify(entry.data));\n }\n return msg.join(\"\");\n };\n return ConsoleListener;\n}());\nexports.ConsoleListener = ConsoleListener;\n/**\n * Implementation of ILogListener which logs to the supplied function\n *\n */\nvar FunctionListener = /** @class */ (function () {\n /**\n * Creates a new instance of the FunctionListener class\n *\n * @constructor\n * @param method The method to which any logging data will be passed\n */\n function FunctionListener(method) {\n this.method = method;\n }\n /**\n * Any associated data that a given logging listener may choose to log or ignore\n *\n * @param entry The information to be logged\n */\n FunctionListener.prototype.log = function (entry) {\n this.method(entry);\n };\n return FunctionListener;\n}());\nexports.FunctionListener = FunctionListener;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/utils/logging.js\n// module id = 3\n// module chunks = 0","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar logging_1 = require(\"../utils/logging\");\nfunction defaultLog(error) {\n logging_1.Logger.log({ data: {}, level: logging_1.LogLevel.Error, message: \"[\" + error.name + \"]::\" + error.message });\n}\n/**\n * Represents an exception with an HttpClient request\n *\n */\nvar ProcessHttpClientResponseException = /** @class */ (function (_super) {\n __extends(ProcessHttpClientResponseException, _super);\n function ProcessHttpClientResponseException(status, statusText, data) {\n var _this = _super.call(this, \"Error making HttpClient request in queryable: [\" + status + \"] \" + statusText) || this;\n _this.status = status;\n _this.statusText = statusText;\n _this.data = data;\n _this.name = \"ProcessHttpClientResponseException\";\n logging_1.Logger.log({ data: _this.data, level: logging_1.LogLevel.Error, message: _this.message });\n return _this;\n }\n return ProcessHttpClientResponseException;\n}(Error));\nexports.ProcessHttpClientResponseException = ProcessHttpClientResponseException;\nvar NoCacheAvailableException = /** @class */ (function (_super) {\n __extends(NoCacheAvailableException, _super);\n function NoCacheAvailableException(msg) {\n if (msg === void 0) { msg = \"Cannot create a caching configuration provider since cache is not available.\"; }\n var _this = _super.call(this, msg) || this;\n _this.name = \"NoCacheAvailableException\";\n defaultLog(_this);\n return _this;\n }\n return NoCacheAvailableException;\n}(Error));\nexports.NoCacheAvailableException = NoCacheAvailableException;\nvar APIUrlException = /** @class */ (function (_super) {\n __extends(APIUrlException, _super);\n function APIUrlException(msg) {\n if (msg === void 0) { msg = \"Unable to determine API url.\"; }\n var _this = _super.call(this, msg) || this;\n _this.name = \"APIUrlException\";\n defaultLog(_this);\n return _this;\n }\n return APIUrlException;\n}(Error));\nexports.APIUrlException = APIUrlException;\nvar AuthUrlException = /** @class */ (function (_super) {\n __extends(AuthUrlException, _super);\n function AuthUrlException(data, msg) {\n if (msg === void 0) { msg = \"Auth URL Endpoint could not be determined from data. Data logged.\"; }\n var _this = _super.call(this, msg) || this;\n _this.name = \"APIUrlException\";\n logging_1.Logger.log({ data: data, level: logging_1.LogLevel.Error, message: _this.message });\n return _this;\n }\n return AuthUrlException;\n}(Error));\nexports.AuthUrlException = AuthUrlException;\nvar NodeFetchClientUnsupportedException = /** @class */ (function (_super) {\n __extends(NodeFetchClientUnsupportedException, _super);\n function NodeFetchClientUnsupportedException(msg) {\n if (msg === void 0) { msg = \"Using NodeFetchClient in the browser is not supported.\"; }\n var _this = _super.call(this, msg) || this;\n _this.name = \"NodeFetchClientUnsupportedException\";\n defaultLog(_this);\n return _this;\n }\n return NodeFetchClientUnsupportedException;\n}(Error));\nexports.NodeFetchClientUnsupportedException = NodeFetchClientUnsupportedException;\nvar SPRequestExecutorUndefinedException = /** @class */ (function (_super) {\n __extends(SPRequestExecutorUndefinedException, _super);\n function SPRequestExecutorUndefinedException() {\n var _this = this;\n var msg = [\n \"SP.RequestExecutor is undefined. \",\n \"Load the SP.RequestExecutor.js library (/_layouts/15/SP.RequestExecutor.js) before loading the PnP JS Core library.\",\n ].join(\" \");\n _this = _super.call(this, msg) || this;\n _this.name = \"SPRequestExecutorUndefinedException\";\n defaultLog(_this);\n return _this;\n }\n return SPRequestExecutorUndefinedException;\n}(Error));\nexports.SPRequestExecutorUndefinedException = SPRequestExecutorUndefinedException;\nvar MaxCommentLengthException = /** @class */ (function (_super) {\n __extends(MaxCommentLengthException, _super);\n function MaxCommentLengthException(msg) {\n if (msg === void 0) { msg = \"The maximum comment length is 1023 characters.\"; }\n var _this = _super.call(this, msg) || this;\n _this.name = \"MaxCommentLengthException\";\n defaultLog(_this);\n return _this;\n }\n return MaxCommentLengthException;\n}(Error));\nexports.MaxCommentLengthException = MaxCommentLengthException;\nvar NotSupportedInBatchException = /** @class */ (function (_super) {\n __extends(NotSupportedInBatchException, _super);\n function NotSupportedInBatchException(operation) {\n if (operation === void 0) { operation = \"This operation\"; }\n var _this = _super.call(this, operation + \" is not supported as part of a batch.\") || this;\n _this.name = \"NotSupportedInBatchException\";\n defaultLog(_this);\n return _this;\n }\n return NotSupportedInBatchException;\n}(Error));\nexports.NotSupportedInBatchException = NotSupportedInBatchException;\nvar ODataIdException = /** @class */ (function (_super) {\n __extends(ODataIdException, _super);\n function ODataIdException(data, msg) {\n if (msg === void 0) { msg = \"Could not extract odata id in object, you may be using nometadata. Object data logged to logger.\"; }\n var _this = _super.call(this, msg) || this;\n _this.name = \"ODataIdException\";\n logging_1.Logger.log({ data: data, level: logging_1.LogLevel.Error, message: _this.message });\n return _this;\n }\n return ODataIdException;\n}(Error));\nexports.ODataIdException = ODataIdException;\nvar BatchParseException = /** @class */ (function (_super) {\n __extends(BatchParseException, _super);\n function BatchParseException(msg) {\n var _this = _super.call(this, msg) || this;\n _this.name = \"BatchParseException\";\n defaultLog(_this);\n return _this;\n }\n return BatchParseException;\n}(Error));\nexports.BatchParseException = BatchParseException;\nvar AlreadyInBatchException = /** @class */ (function (_super) {\n __extends(AlreadyInBatchException, _super);\n function AlreadyInBatchException(msg) {\n if (msg === void 0) { msg = \"This query is already part of a batch.\"; }\n var _this = _super.call(this, msg) || this;\n _this.name = \"AlreadyInBatchException\";\n defaultLog(_this);\n return _this;\n }\n return AlreadyInBatchException;\n}(Error));\nexports.AlreadyInBatchException = AlreadyInBatchException;\nvar FunctionExpectedException = /** @class */ (function (_super) {\n __extends(FunctionExpectedException, _super);\n function FunctionExpectedException(msg) {\n if (msg === void 0) { msg = \"This query is already part of a batch.\"; }\n var _this = _super.call(this, msg) || this;\n _this.name = \"FunctionExpectedException\";\n defaultLog(_this);\n return _this;\n }\n return FunctionExpectedException;\n}(Error));\nexports.FunctionExpectedException = FunctionExpectedException;\nvar UrlException = /** @class */ (function (_super) {\n __extends(UrlException, _super);\n function UrlException(msg) {\n var _this = _super.call(this, msg) || this;\n _this.name = \"UrlException\";\n defaultLog(_this);\n return _this;\n }\n return UrlException;\n}(Error));\nexports.UrlException = UrlException;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/utils/exceptions.js\n// module id = 4\n// module chunks = 0","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar util_1 = require(\"../utils/util\");\nvar collections_1 = require(\"../collections/collections\");\nvar graphclient_1 = require(\"../net/graphclient\");\nvar queryable_1 = require(\"../odata/queryable\");\nvar pipeline_1 = require(\"../request/pipeline\");\n/**\n * Queryable Base Class\n *\n */\nvar GraphQueryable = /** @class */ (function (_super) {\n __extends(GraphQueryable, _super);\n /**\n * Creates a new instance of the Queryable class\n *\n * @constructor\n * @param baseUrl A string or Queryable that should form the base part of the url\n *\n */\n function GraphQueryable(baseUrl, path) {\n var _this = _super.call(this) || this;\n _this._query = new collections_1.Dictionary();\n if (typeof baseUrl === \"string\") {\n var urlStr = baseUrl;\n _this._parentUrl = urlStr;\n _this._url = util_1.Util.combinePaths(urlStr, path);\n }\n else {\n var q = baseUrl;\n _this._parentUrl = q._url;\n _this._url = util_1.Util.combinePaths(_this._parentUrl, path);\n }\n return _this;\n }\n /**\n * Creates a new instance of the supplied factory and extends this into that new instance\n *\n * @param factory constructor for the new queryable\n */\n GraphQueryable.prototype.as = function (factory) {\n var o = new factory(this._url, null);\n return util_1.Util.extend(o, this, true);\n };\n /**\n * Gets the full url with query information\n *\n */\n GraphQueryable.prototype.toUrlAndQuery = function () {\n var _this = this;\n return this.toUrl() + (\"?\" + this._query.getKeys().map(function (key) { return key + \"=\" + _this._query.get(key); }).join(\"&\"));\n };\n /**\n * Gets a parent for this instance as specified\n *\n * @param factory The contructor for the class to create\n */\n GraphQueryable.prototype.getParent = function (factory, baseUrl, path) {\n if (baseUrl === void 0) { baseUrl = this.parentUrl; }\n return new factory(baseUrl, path);\n };\n /**\n * Clones this queryable into a new queryable instance of T\n * @param factory Constructor used to create the new instance\n * @param additionalPath Any additional path to include in the clone\n * @param includeBatch If true this instance's batch will be added to the cloned instance\n */\n GraphQueryable.prototype.clone = function (factory, additionalPath, includeBatch) {\n if (includeBatch === void 0) { includeBatch = true; }\n // TODO:: include batching info in clone\n if (includeBatch) {\n return new factory(this, additionalPath);\n }\n return new factory(this, additionalPath);\n };\n /**\n * Converts the current instance to a request context\n *\n * @param verb The request verb\n * @param options The set of supplied request options\n * @param parser The supplied ODataParser instance\n * @param pipeline Optional request processing pipeline\n */\n GraphQueryable.prototype.toRequestContext = function (verb, options, parser, pipeline) {\n if (options === void 0) { options = {}; }\n if (pipeline === void 0) { pipeline = pipeline_1.PipelineMethods.default; }\n // TODO:: add batch support\n return Promise.resolve({\n batch: null,\n batchDependency: function () { return void (0); },\n cachingOptions: this._cachingOptions,\n clientFactory: function () { return new graphclient_1.GraphHttpClient(); },\n isBatched: false,\n isCached: this._useCaching,\n options: options,\n parser: parser,\n pipeline: pipeline,\n requestAbsoluteUrl: this.toUrlAndQuery(),\n requestId: util_1.Util.getGUID(),\n verb: verb,\n });\n };\n return GraphQueryable;\n}(queryable_1.ODataQueryable));\nexports.GraphQueryable = GraphQueryable;\n/**\n * Represents a REST collection which can be filtered, paged, and selected\n *\n */\nvar GraphQueryableCollection = /** @class */ (function (_super) {\n __extends(GraphQueryableCollection, _super);\n function GraphQueryableCollection() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n /**\n *\n * @param filter The string representing the filter query\n */\n GraphQueryableCollection.prototype.filter = function (filter) {\n this._query.add(\"$filter\", filter);\n return this;\n };\n /**\n * Choose which fields to return\n *\n * @param selects One or more fields to return\n */\n GraphQueryableCollection.prototype.select = function () {\n var selects = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n selects[_i] = arguments[_i];\n }\n if (selects.length > 0) {\n this._query.add(\"$select\", selects.join(\",\"));\n }\n return this;\n };\n /**\n * Expands fields such as lookups to get additional data\n *\n * @param expands The Fields for which to expand the values\n */\n GraphQueryableCollection.prototype.expand = function () {\n var expands = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n expands[_i] = arguments[_i];\n }\n if (expands.length > 0) {\n this._query.add(\"$expand\", expands.join(\",\"));\n }\n return this;\n };\n /**\n * Orders based on the supplied fields ascending\n *\n * @param orderby The name of the field to sort on\n * @param ascending If false DESC is appended, otherwise ASC (default)\n */\n GraphQueryableCollection.prototype.orderBy = function (orderBy, ascending) {\n if (ascending === void 0) { ascending = true; }\n var keys = this._query.getKeys();\n var query = [];\n var asc = ascending ? \" asc\" : \" desc\";\n for (var i = 0; i < keys.length; i++) {\n if (keys[i] === \"$orderby\") {\n query.push(this._query.get(\"$orderby\"));\n break;\n }\n }\n query.push(\"\" + orderBy + asc);\n this._query.add(\"$orderby\", query.join(\",\"));\n return this;\n };\n /**\n * Limits the query to only return the specified number of items\n *\n * @param top The query row limit\n */\n GraphQueryableCollection.prototype.top = function (top) {\n this._query.add(\"$top\", top.toString());\n return this;\n };\n /**\n * Skips a set number of items in the return set\n *\n * @param num Number of items to skip\n */\n GraphQueryableCollection.prototype.skip = function (num) {\n this._query.add(\"$top\", num.toString());\n return this;\n };\n /**\n * \tTo request second and subsequent pages of Graph data\n */\n GraphQueryableCollection.prototype.skipToken = function (token) {\n this._query.add(\"$skiptoken\", token);\n return this;\n };\n Object.defineProperty(GraphQueryableCollection.prototype, \"count\", {\n /**\n * \tRetrieves the total count of matching resources\n */\n get: function () {\n this._query.add(\"$count\", \"true\");\n return this;\n },\n enumerable: true,\n configurable: true\n });\n return GraphQueryableCollection;\n}(GraphQueryable));\nexports.GraphQueryableCollection = GraphQueryableCollection;\nvar GraphQueryableSearchableCollection = /** @class */ (function (_super) {\n __extends(GraphQueryableSearchableCollection, _super);\n function GraphQueryableSearchableCollection() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n /**\n * \tTo request second and subsequent pages of Graph data\n */\n GraphQueryableSearchableCollection.prototype.search = function (query) {\n this._query.add(\"$search\", query);\n return this;\n };\n return GraphQueryableSearchableCollection;\n}(GraphQueryableCollection));\nexports.GraphQueryableSearchableCollection = GraphQueryableSearchableCollection;\n/**\n * Represents an instance that can be selected\n *\n */\nvar GraphQueryableInstance = /** @class */ (function (_super) {\n __extends(GraphQueryableInstance, _super);\n function GraphQueryableInstance() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n /**\n * Choose which fields to return\n *\n * @param selects One or more fields to return\n */\n GraphQueryableInstance.prototype.select = function () {\n var selects = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n selects[_i] = arguments[_i];\n }\n if (selects.length > 0) {\n this._query.add(\"$select\", selects.join(\",\"));\n }\n return this;\n };\n /**\n * Expands fields such as lookups to get additional data\n *\n * @param expands The Fields for which to expand the values\n */\n GraphQueryableInstance.prototype.expand = function () {\n var expands = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n expands[_i] = arguments[_i];\n }\n if (expands.length > 0) {\n this._query.add(\"$expand\", expands.join(\",\"));\n }\n return this;\n };\n return GraphQueryableInstance;\n}(GraphQueryable));\nexports.GraphQueryableInstance = GraphQueryableInstance;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/graph/graphqueryable.js\n// module id = 5\n// module chunks = 0","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar util_1 = require(\"../utils/util\");\nvar logging_1 = require(\"../utils/logging\");\nvar exceptions_1 = require(\"../utils/exceptions\");\nvar core_1 = require(\"../odata/core\");\nfunction spExtractODataId(candidate) {\n if (candidate.hasOwnProperty(\"odata.id\")) {\n return candidate[\"odata.id\"];\n }\n else if (candidate.hasOwnProperty(\"__metadata\") && candidate.__metadata.hasOwnProperty(\"id\")) {\n return candidate.__metadata.id;\n }\n else {\n throw new exceptions_1.ODataIdException(candidate);\n }\n}\nexports.spExtractODataId = spExtractODataId;\nvar SPODataEntityParserImpl = /** @class */ (function (_super) {\n __extends(SPODataEntityParserImpl, _super);\n function SPODataEntityParserImpl(factory) {\n var _this = _super.call(this) || this;\n _this.factory = factory;\n return _this;\n }\n SPODataEntityParserImpl.prototype.parse = function (r) {\n var _this = this;\n return _super.prototype.parse.call(this, r).then(function (d) {\n var o = new _this.factory(spGetEntityUrl(d), null);\n return util_1.Util.extend(o, d);\n });\n };\n return SPODataEntityParserImpl;\n}(core_1.ODataParserBase));\nvar SPODataEntityArrayParserImpl = /** @class */ (function (_super) {\n __extends(SPODataEntityArrayParserImpl, _super);\n function SPODataEntityArrayParserImpl(factory) {\n var _this = _super.call(this) || this;\n _this.factory = factory;\n return _this;\n }\n SPODataEntityArrayParserImpl.prototype.parse = function (r) {\n var _this = this;\n return _super.prototype.parse.call(this, r).then(function (d) {\n return d.map(function (v) {\n var o = new _this.factory(spGetEntityUrl(v), null);\n return util_1.Util.extend(o, v);\n });\n });\n };\n return SPODataEntityArrayParserImpl;\n}(core_1.ODataParserBase));\nfunction spGetEntityUrl(entity) {\n if (entity.hasOwnProperty(\"odata.metadata\") && entity.hasOwnProperty(\"odata.editLink\")) {\n // we are dealign with minimal metadata (default)\n return util_1.Util.combinePaths(util_1.extractWebUrl(entity[\"odata.metadata\"]), \"_api\", entity[\"odata.editLink\"]);\n }\n else if (entity.hasOwnProperty(\"__metadata\")) {\n // we are dealing with verbose, which has an absolute uri\n return entity.__metadata.uri;\n }\n else {\n // we are likely dealing with nometadata, so don't error but we won't be able to\n // chain off these objects\n logging_1.Logger.write(\"No uri information found in ODataEntity parsing, chaining will fail for this object.\", logging_1.LogLevel.Warning);\n return \"\";\n }\n}\nexports.spGetEntityUrl = spGetEntityUrl;\nfunction spODataEntity(factory) {\n return new SPODataEntityParserImpl(factory);\n}\nexports.spODataEntity = spODataEntity;\nfunction spODataEntityArray(factory) {\n return new SPODataEntityArrayParserImpl(factory);\n}\nexports.spODataEntityArray = spODataEntityArray;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/sharepoint/odata.js\n// module id = 6\n// module chunks = 0","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar core_1 = require(\"./core\");\nvar util_1 = require(\"../utils/util\");\nvar ODataDefaultParser = /** @class */ (function (_super) {\n __extends(ODataDefaultParser, _super);\n function ODataDefaultParser() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n return ODataDefaultParser;\n}(core_1.ODataParserBase));\nexports.ODataDefaultParser = ODataDefaultParser;\nvar ODataValueParserImpl = /** @class */ (function (_super) {\n __extends(ODataValueParserImpl, _super);\n function ODataValueParserImpl() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n ODataValueParserImpl.prototype.parse = function (r) {\n return _super.prototype.parse.call(this, r).then(function (d) { return d; });\n };\n return ODataValueParserImpl;\n}(core_1.ODataParserBase));\nfunction ODataValue() {\n return new ODataValueParserImpl();\n}\nexports.ODataValue = ODataValue;\nvar ODataRawParserImpl = /** @class */ (function () {\n function ODataRawParserImpl() {\n }\n ODataRawParserImpl.prototype.parse = function (r) {\n return r.json();\n };\n return ODataRawParserImpl;\n}());\nexports.ODataRawParserImpl = ODataRawParserImpl;\nexports.ODataRaw = new ODataRawParserImpl();\nvar TextFileParser = /** @class */ (function () {\n function TextFileParser() {\n }\n TextFileParser.prototype.parse = function (r) {\n return r.text();\n };\n return TextFileParser;\n}());\nexports.TextFileParser = TextFileParser;\nvar BlobFileParser = /** @class */ (function () {\n function BlobFileParser() {\n }\n BlobFileParser.prototype.parse = function (r) {\n return r.blob();\n };\n return BlobFileParser;\n}());\nexports.BlobFileParser = BlobFileParser;\nvar JSONFileParser = /** @class */ (function () {\n function JSONFileParser() {\n }\n JSONFileParser.prototype.parse = function (r) {\n return r.json();\n };\n return JSONFileParser;\n}());\nexports.JSONFileParser = JSONFileParser;\nvar BufferFileParser = /** @class */ (function () {\n function BufferFileParser() {\n }\n BufferFileParser.prototype.parse = function (r) {\n if (util_1.Util.isFunction(r.arrayBuffer)) {\n return r.arrayBuffer();\n }\n return r.buffer();\n };\n return BufferFileParser;\n}());\nexports.BufferFileParser = BufferFileParser;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/odata/parsers.js\n// module id = 7\n// module chunks = 0","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\n/**\n * Generic dictionary\n */\nvar Dictionary = /** @class */ (function () {\n /**\n * Creates a new instance of the Dictionary class\n *\n * @constructor\n */\n function Dictionary(keys, values) {\n if (keys === void 0) { keys = []; }\n if (values === void 0) { values = []; }\n this.keys = keys;\n this.values = values;\n }\n /**\n * Gets a value from the collection using the specified key\n *\n * @param key The key whose value we want to return, returns null if the key does not exist\n */\n Dictionary.prototype.get = function (key) {\n var index = this.keys.indexOf(key);\n if (index < 0) {\n return null;\n }\n return this.values[index];\n };\n /**\n * Adds the supplied key and value to the dictionary\n *\n * @param key The key to add\n * @param o The value to add\n */\n Dictionary.prototype.add = function (key, o) {\n var index = this.keys.indexOf(key);\n if (index > -1) {\n this.values[index] = o;\n }\n else {\n this.keys.push(key);\n this.values.push(o);\n }\n };\n /**\n * Merges the supplied typed hash into this dictionary instance. Existing values are updated and new ones are created as appropriate.\n */\n Dictionary.prototype.merge = function (source) {\n var _this = this;\n if (\"getKeys\" in source) {\n var sourceAsDictionary_1 = source;\n sourceAsDictionary_1.getKeys().map(function (key) {\n _this.add(key, sourceAsDictionary_1.get(key));\n });\n }\n else {\n var sourceAsHash = source;\n for (var key in sourceAsHash) {\n if (sourceAsHash.hasOwnProperty(key)) {\n this.add(key, sourceAsHash[key]);\n }\n }\n }\n };\n /**\n * Removes a value from the dictionary\n *\n * @param key The key of the key/value pair to remove. Returns null if the key was not found.\n */\n Dictionary.prototype.remove = function (key) {\n var index = this.keys.indexOf(key);\n if (index < 0) {\n return null;\n }\n var val = this.values[index];\n this.keys.splice(index, 1);\n this.values.splice(index, 1);\n return val;\n };\n /**\n * Returns all the keys currently in the dictionary as an array\n */\n Dictionary.prototype.getKeys = function () {\n return this.keys;\n };\n /**\n * Returns all the values currently in the dictionary as an array\n */\n Dictionary.prototype.getValues = function () {\n return this.values;\n };\n /**\n * Clears the current dictionary\n */\n Dictionary.prototype.clear = function () {\n this.keys = [];\n this.values = [];\n };\n /**\n * Gets a count of the items currently in the dictionary\n */\n Dictionary.prototype.count = function () {\n return this.keys.length;\n };\n return Dictionary;\n}());\nexports.Dictionary = Dictionary;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/collections/collections.js\n// module id = 8\n// module chunks = 0","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar util_1 = require(\"../utils/util\");\nfunction mergeOptions(target, source) {\n target.headers = target.headers || {};\n var headers = util_1.Util.extend(target.headers, source.headers);\n target = util_1.Util.extend(target, source);\n target.headers = headers;\n}\nexports.mergeOptions = mergeOptions;\nfunction mergeHeaders(target, source) {\n if (typeof source !== \"undefined\" && source !== null) {\n var temp = new Request(\"\", { headers: source });\n temp.headers.forEach(function (value, name) {\n target.append(name, value);\n });\n }\n}\nexports.mergeHeaders = mergeHeaders;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/net/utils.js\n// module id = 9\n// module chunks = 0","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar sharepointqueryable_1 = require(\"./sharepointqueryable\");\nvar lists_1 = require(\"./lists\");\nvar fields_1 = require(\"./fields\");\nvar navigation_1 = require(\"./navigation\");\nvar sitegroups_1 = require(\"./sitegroups\");\nvar contenttypes_1 = require(\"./contenttypes\");\nvar folders_1 = require(\"./folders\");\nvar roles_1 = require(\"./roles\");\nvar files_1 = require(\"./files\");\nvar util_1 = require(\"../utils/util\");\nvar lists_2 = require(\"./lists\");\nvar siteusers_1 = require(\"./siteusers\");\nvar usercustomactions_1 = require(\"./usercustomactions\");\nvar odata_1 = require(\"./odata\");\nvar batch_1 = require(\"./batch\");\nvar features_1 = require(\"./features\");\nvar sharepointqueryableshareable_1 = require(\"./sharepointqueryableshareable\");\nvar relateditems_1 = require(\"./relateditems\");\n/**\n * Describes a collection of webs\n *\n */\nvar Webs = /** @class */ (function (_super) {\n __extends(Webs, _super);\n /**\n * Creates a new instance of the Webs class\n *\n * @param baseUrl The url or SharePointQueryable which forms the parent of this web collection\n */\n function Webs(baseUrl, webPath) {\n if (webPath === void 0) { webPath = \"webs\"; }\n return _super.call(this, baseUrl, webPath) || this;\n }\n /**\n * Adds a new web to the collection\n *\n * @param title The new web's title\n * @param url The new web's relative url\n * @param description The new web's description\n * @param template The new web's template internal name (default = STS)\n * @param language The locale id that specifies the new web's language (default = 1033 [English, US])\n * @param inheritPermissions When true, permissions will be inherited from the new web's parent (default = true)\n */\n Webs.prototype.add = function (title, url, description, template, language, inheritPermissions) {\n if (description === void 0) { description = \"\"; }\n if (template === void 0) { template = \"STS\"; }\n if (language === void 0) { language = 1033; }\n if (inheritPermissions === void 0) { inheritPermissions = true; }\n var props = {\n Description: description,\n Language: language,\n Title: title,\n Url: url,\n UseSamePermissionsAsParentSite: inheritPermissions,\n WebTemplate: template,\n };\n var postBody = JSON.stringify({\n \"parameters\": util_1.Util.extend({\n \"__metadata\": { \"type\": \"SP.WebCreationInformation\" },\n }, props),\n });\n return this.clone(Webs, \"add\").postCore({ body: postBody }).then(function (data) {\n return {\n data: data,\n web: new Web(odata_1.spExtractODataId(data).replace(/_api\\/web\\/?/i, \"\")),\n };\n });\n };\n return Webs;\n}(sharepointqueryable_1.SharePointQueryableCollection));\nexports.Webs = Webs;\n/**\n * Describes a collection of web infos\n *\n */\nvar WebInfos = /** @class */ (function (_super) {\n __extends(WebInfos, _super);\n /**\n * Creates a new instance of the WebInfos class\n *\n * @param baseUrl The url or SharePointQueryable which forms the parent of this web infos collection\n */\n function WebInfos(baseUrl, webPath) {\n if (webPath === void 0) { webPath = \"webinfos\"; }\n return _super.call(this, baseUrl, webPath) || this;\n }\n return WebInfos;\n}(sharepointqueryable_1.SharePointQueryableCollection));\nexports.WebInfos = WebInfos;\n/**\n * Describes a web\n *\n */\nvar Web = /** @class */ (function (_super) {\n __extends(Web, _super);\n /**\n * Creates a new instance of the Web class\n *\n * @param baseUrl The url or SharePointQueryable which forms the parent of this web\n */\n function Web(baseUrl, path) {\n if (path === void 0) { path = \"_api/web\"; }\n return _super.call(this, baseUrl, path) || this;\n }\n /**\n * Creates a new web instance from the given url by indexing the location of the /_api/\n * segment. If this is not found the method creates a new web with the entire string as\n * supplied.\n *\n * @param url\n */\n Web.fromUrl = function (url, path) {\n return new Web(util_1.extractWebUrl(url), path);\n };\n Object.defineProperty(Web.prototype, \"webs\", {\n /**\n * Gets this web's subwebs\n *\n */\n get: function () {\n return new Webs(this);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Web.prototype, \"webinfos\", {\n /**\n * Gets a collection of WebInfos for this web's subwebs\n *\n */\n get: function () {\n return new WebInfos(this);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Web.prototype, \"contentTypes\", {\n /**\n * Gets the content types available in this web\n *\n */\n get: function () {\n return new contenttypes_1.ContentTypes(this);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Web.prototype, \"lists\", {\n /**\n * Gets the lists in this web\n *\n */\n get: function () {\n return new lists_1.Lists(this);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Web.prototype, \"fields\", {\n /**\n * Gets the fields in this web\n *\n */\n get: function () {\n return new fields_1.Fields(this);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Web.prototype, \"features\", {\n /**\n * Gets the active features for this web\n *\n */\n get: function () {\n return new features_1.Features(this);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Web.prototype, \"availablefields\", {\n /**\n * Gets the available fields in this web\n *\n */\n get: function () {\n return new fields_1.Fields(this, \"availablefields\");\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Web.prototype, \"navigation\", {\n /**\n * Gets the navigation options in this web\n *\n */\n get: function () {\n return new navigation_1.Navigation(this);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Web.prototype, \"siteUsers\", {\n /**\n * Gets the site users\n *\n */\n get: function () {\n return new siteusers_1.SiteUsers(this);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Web.prototype, \"siteGroups\", {\n /**\n * Gets the site groups\n *\n */\n get: function () {\n return new sitegroups_1.SiteGroups(this);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Web.prototype, \"currentUser\", {\n /**\n * Gets the current user\n */\n get: function () {\n return new siteusers_1.CurrentUser(this);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Web.prototype, \"folders\", {\n /**\n * Gets the top-level folders in this web\n *\n */\n get: function () {\n return new folders_1.Folders(this);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Web.prototype, \"userCustomActions\", {\n /**\n * Gets all user custom actions for this web\n *\n */\n get: function () {\n return new usercustomactions_1.UserCustomActions(this);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Web.prototype, \"roleDefinitions\", {\n /**\n * Gets the collection of RoleDefinition resources\n *\n */\n get: function () {\n return new roles_1.RoleDefinitions(this);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Web.prototype, \"relatedItems\", {\n /**\n * Provides an interface to manage related items\n *\n */\n get: function () {\n return relateditems_1.RelatedItemManagerImpl.FromUrl(this.toUrl());\n },\n enumerable: true,\n configurable: true\n });\n /**\n * Creates a new batch for requests within the context of this web\n *\n */\n Web.prototype.createBatch = function () {\n return new batch_1.ODataBatch(this.parentUrl);\n };\n Object.defineProperty(Web.prototype, \"rootFolder\", {\n /**\n * Gets the root folder of this web\n *\n */\n get: function () {\n return new folders_1.Folder(this, \"rootFolder\");\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Web.prototype, \"associatedOwnerGroup\", {\n /**\n * Gets the associated owner group for this web\n *\n */\n get: function () {\n return new sitegroups_1.SiteGroup(this, \"associatedownergroup\");\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Web.prototype, \"associatedMemberGroup\", {\n /**\n * Gets the associated member group for this web\n *\n */\n get: function () {\n return new sitegroups_1.SiteGroup(this, \"associatedmembergroup\");\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Web.prototype, \"associatedVisitorGroup\", {\n /**\n * Gets the associated visitor group for this web\n *\n */\n get: function () {\n return new sitegroups_1.SiteGroup(this, \"associatedvisitorgroup\");\n },\n enumerable: true,\n configurable: true\n });\n /**\n * Gets a folder by server relative url\n *\n * @param folderRelativeUrl The server relative path to the folder (including /sites/ if applicable)\n */\n Web.prototype.getFolderByServerRelativeUrl = function (folderRelativeUrl) {\n return new folders_1.Folder(this, \"getFolderByServerRelativeUrl('\" + folderRelativeUrl + \"')\");\n };\n /**\n * Gets a file by server relative url\n *\n * @param fileRelativeUrl The server relative path to the file (including /sites/ if applicable)\n */\n Web.prototype.getFileByServerRelativeUrl = function (fileRelativeUrl) {\n return new files_1.File(this, \"getFileByServerRelativeUrl('\" + fileRelativeUrl + \"')\");\n };\n /**\n * Gets a list by server relative url (list's root folder)\n *\n * @param listRelativeUrl The server relative path to the list's root folder (including /sites/ if applicable)\n */\n Web.prototype.getList = function (listRelativeUrl) {\n return new lists_2.List(this, \"getList('\" + listRelativeUrl + \"')\");\n };\n /**\n * Updates this web instance with the supplied properties\n *\n * @param properties A plain object hash of values to update for the web\n */\n Web.prototype.update = function (properties) {\n var _this = this;\n var postBody = JSON.stringify(util_1.Util.extend({\n \"__metadata\": { \"type\": \"SP.Web\" },\n }, properties));\n return this.postCore({\n body: postBody,\n headers: {\n \"X-HTTP-Method\": \"MERGE\",\n },\n }).then(function (data) {\n return {\n data: data,\n web: _this,\n };\n });\n };\n /**\n * Deletes this web\n *\n */\n Web.prototype.delete = function () {\n return _super.prototype.deleteCore.call(this);\n };\n /**\n * Applies the theme specified by the contents of each of the files specified in the arguments to the site\n *\n * @param colorPaletteUrl The server-relative URL of the color palette file\n * @param fontSchemeUrl The server-relative URL of the font scheme\n * @param backgroundImageUrl The server-relative URL of the background image\n * @param shareGenerated When true, the generated theme files are stored in the root site. When false, they are stored in this web\n */\n Web.prototype.applyTheme = function (colorPaletteUrl, fontSchemeUrl, backgroundImageUrl, shareGenerated) {\n var postBody = JSON.stringify({\n backgroundImageUrl: backgroundImageUrl,\n colorPaletteUrl: colorPaletteUrl,\n fontSchemeUrl: fontSchemeUrl,\n shareGenerated: shareGenerated,\n });\n return this.clone(Web, \"applytheme\").postCore({ body: postBody });\n };\n /**\n * Applies the specified site definition or site template to the Web site that has no template applied to it\n *\n * @param template Name of the site definition or the name of the site template\n */\n Web.prototype.applyWebTemplate = function (template) {\n var q = this.clone(Web, \"applywebtemplate\");\n q.concat(\"(@t)\");\n q.query.add(\"@t\", template);\n return q.postCore();\n };\n /**\n * Checks whether the specified login name belongs to a valid user in the web. If the user doesn't exist, adds the user to the web.\n *\n * @param loginName The login name of the user (ex: i:0#.f|membership|user@domain.onmicrosoft.com)\n */\n Web.prototype.ensureUser = function (loginName) {\n var postBody = JSON.stringify({\n logonName: loginName,\n });\n return this.clone(Web, \"ensureuser\").postCore({ body: postBody }).then(function (data) {\n return {\n data: data,\n user: new siteusers_1.SiteUser(odata_1.spExtractODataId(data)),\n };\n });\n };\n /**\n * Returns a collection of site templates available for the site\n *\n * @param language The locale id of the site templates to retrieve (default = 1033 [English, US])\n * @param includeCrossLanguage When true, includes language-neutral site templates; otherwise false (default = true)\n */\n Web.prototype.availableWebTemplates = function (language, includeCrossLanugage) {\n if (language === void 0) { language = 1033; }\n if (includeCrossLanugage === void 0) { includeCrossLanugage = true; }\n return new sharepointqueryable_1.SharePointQueryableCollection(this, \"getavailablewebtemplates(lcid=\" + language + \", doincludecrosslanguage=\" + includeCrossLanugage + \")\");\n };\n /**\n * Returns the list gallery on the site\n *\n * @param type The gallery type - WebTemplateCatalog = 111, WebPartCatalog = 113 ListTemplateCatalog = 114,\n * MasterPageCatalog = 116, SolutionCatalog = 121, ThemeCatalog = 123, DesignCatalog = 124, AppDataCatalog = 125\n */\n Web.prototype.getCatalog = function (type) {\n return this.clone(Web, \"getcatalog(\" + type + \")\").select(\"Id\").get().then(function (data) {\n return new lists_2.List(odata_1.spExtractODataId(data));\n });\n };\n /**\n * Returns the collection of changes from the change log that have occurred within the list, based on the specified query\n *\n * @param query The change query\n */\n Web.prototype.getChanges = function (query) {\n var postBody = JSON.stringify({ \"query\": util_1.Util.extend({ \"__metadata\": { \"type\": \"SP.ChangeQuery\" } }, query) });\n return this.clone(Web, \"getchanges\").postCore({ body: postBody });\n };\n Object.defineProperty(Web.prototype, \"customListTemplate\", {\n /**\n * Gets the custom list templates for the site\n *\n */\n get: function () {\n return new sharepointqueryable_1.SharePointQueryableCollection(this, \"getcustomlisttemplates\");\n },\n enumerable: true,\n configurable: true\n });\n /**\n * Returns the user corresponding to the specified member identifier for the current site\n *\n * @param id The id of the user\n */\n Web.prototype.getUserById = function (id) {\n return new siteusers_1.SiteUser(this, \"getUserById(\" + id + \")\");\n };\n /**\n * Returns the name of the image file for the icon that is used to represent the specified file\n *\n * @param filename The file name. If this parameter is empty, the server returns an empty string\n * @param size The size of the icon: 16x16 pixels = 0, 32x32 pixels = 1 (default = 0)\n * @param progId The ProgID of the application that was used to create the file, in the form OLEServerName.ObjectName\n */\n Web.prototype.mapToIcon = function (filename, size, progId) {\n if (size === void 0) { size = 0; }\n if (progId === void 0) { progId = \"\"; }\n return this.clone(Web, \"maptoicon(filename='\" + filename + \"', progid='\" + progId + \"', size=\" + size + \")\").get();\n };\n return Web;\n}(sharepointqueryableshareable_1.SharePointQueryableShareableWeb));\nexports.Web = Web;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/sharepoint/webs.js\n// module id = 10\n// module chunks = 0","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar util_1 = require(\"../utils/util\");\nvar webs_1 = require(\"./webs\");\nvar odata_1 = require(\"./odata\");\nvar sharepointqueryable_1 = require(\"./sharepointqueryable\");\nvar sharepointqueryablesecurable_1 = require(\"./sharepointqueryablesecurable\");\nvar types_1 = require(\"./types\");\n/**\n * Internal helper class used to augment classes to include sharing functionality\n */\nvar SharePointQueryableShareable = /** @class */ (function (_super) {\n __extends(SharePointQueryableShareable, _super);\n function SharePointQueryableShareable() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n /**\n * Gets a sharing link for the supplied\n *\n * @param kind The kind of link to share\n * @param expiration The optional expiration for this link\n */\n SharePointQueryableShareable.prototype.getShareLink = function (kind, expiration) {\n if (expiration === void 0) { expiration = null; }\n // date needs to be an ISO string or null\n var expString = expiration !== null ? expiration.toISOString() : null;\n // clone using the factory and send the request\n return this.clone(SharePointQueryableShareable, \"shareLink\").postAsCore({\n body: JSON.stringify({\n request: {\n createLink: true,\n emailData: null,\n settings: {\n expiration: expString,\n linkKind: kind,\n },\n },\n }),\n });\n };\n /**\n * Shares this instance with the supplied users\n *\n * @param loginNames Resolved login names to share\n * @param role The role\n * @param requireSignin True to require the user is authenticated, otherwise false\n * @param propagateAcl True to apply this share to all children\n * @param emailData If supplied an email will be sent with the indicated properties\n */\n SharePointQueryableShareable.prototype.shareWith = function (loginNames, role, requireSignin, propagateAcl, emailData) {\n var _this = this;\n if (requireSignin === void 0) { requireSignin = false; }\n if (propagateAcl === void 0) { propagateAcl = false; }\n // handle the multiple input types\n if (!Array.isArray(loginNames)) {\n loginNames = [loginNames];\n }\n var userStr = JSON.stringify(loginNames.map(function (login) { return { Key: login }; }));\n var roleFilter = role === types_1.SharingRole.Edit ? types_1.RoleType.Contributor : types_1.RoleType.Reader;\n // start by looking up the role definition id we need to set the roleValue\n return webs_1.Web.fromUrl(this.toUrl()).roleDefinitions.select(\"Id\").filter(\"RoleTypeKind eq \" + roleFilter).get().then(function (def) {\n if (!Array.isArray(def) || def.length < 1) {\n throw new Error(\"Could not locate a role defintion with RoleTypeKind \" + roleFilter);\n }\n var postBody = {\n includeAnonymousLinkInEmail: requireSignin,\n peoplePickerInput: userStr,\n propagateAcl: propagateAcl,\n roleValue: \"role:\" + def[0].Id,\n useSimplifiedRoles: true,\n };\n if (typeof emailData !== \"undefined\") {\n postBody = util_1.Util.extend(postBody, {\n emailBody: emailData.body,\n emailSubject: typeof emailData.subject !== \"undefined\" ? emailData.subject : \"\",\n sendEmail: true,\n });\n }\n return _this.clone(SharePointQueryableShareable, \"shareObject\").postAsCore({\n body: JSON.stringify(postBody),\n });\n });\n };\n /**\n * Shares an object based on the supplied options\n *\n * @param options The set of options to send to the ShareObject method\n * @param bypass If true any processing is skipped and the options are sent directly to the ShareObject method\n */\n SharePointQueryableShareable.prototype.shareObject = function (options, bypass) {\n var _this = this;\n if (bypass === void 0) { bypass = false; }\n if (bypass) {\n // if the bypass flag is set send the supplied parameters directly to the service\n return this.sendShareObjectRequest(options);\n }\n // extend our options with some defaults\n options = util_1.Util.extend(options, {\n group: null,\n includeAnonymousLinkInEmail: false,\n propagateAcl: false,\n useSimplifiedRoles: true,\n }, true);\n return this.getRoleValue(options.role, options.group).then(function (roleValue) {\n // handle the multiple input types\n if (!Array.isArray(options.loginNames)) {\n options.loginNames = [options.loginNames];\n }\n var userStr = JSON.stringify(options.loginNames.map(function (login) { return { Key: login }; }));\n var postBody = {\n peoplePickerInput: userStr,\n roleValue: roleValue,\n url: options.url,\n };\n if (typeof options.emailData !== \"undefined\" && options.emailData !== null) {\n postBody = util_1.Util.extend(postBody, {\n emailBody: options.emailData.body,\n emailSubject: typeof options.emailData.subject !== \"undefined\" ? options.emailData.subject : \"Shared with you.\",\n sendEmail: true,\n });\n }\n return _this.sendShareObjectRequest(postBody);\n });\n };\n /**\n * Calls the web's UnshareObject method\n *\n * @param url The url of the object to unshare\n */\n SharePointQueryableShareable.prototype.unshareObjectWeb = function (url) {\n return this.clone(SharePointQueryableShareable, \"unshareObject\").postAsCore({\n body: JSON.stringify({\n url: url,\n }),\n });\n };\n /**\n * Checks Permissions on the list of Users and returns back role the users have on the Item.\n *\n * @param recipients The array of Entities for which Permissions need to be checked.\n */\n SharePointQueryableShareable.prototype.checkPermissions = function (recipients) {\n return this.clone(SharePointQueryableShareable, \"checkPermissions\").postAsCore({\n body: JSON.stringify({\n recipients: recipients,\n }),\n });\n };\n /**\n * Get Sharing Information.\n *\n * @param request The SharingInformationRequest Object.\n */\n SharePointQueryableShareable.prototype.getSharingInformation = function (request) {\n if (request === void 0) { request = null; }\n return this.clone(SharePointQueryableShareable, \"getSharingInformation\").postAsCore({\n body: JSON.stringify({\n request: request,\n }),\n });\n };\n /**\n * Gets the sharing settings of an item.\n *\n * @param useSimplifiedRoles Determines whether to use simplified roles.\n */\n SharePointQueryableShareable.prototype.getObjectSharingSettings = function (useSimplifiedRoles) {\n if (useSimplifiedRoles === void 0) { useSimplifiedRoles = true; }\n return this.clone(SharePointQueryableShareable, \"getObjectSharingSettings\").postAsCore({\n body: JSON.stringify({\n useSimplifiedRoles: useSimplifiedRoles,\n }),\n });\n };\n /**\n * Unshares this object\n */\n SharePointQueryableShareable.prototype.unshareObject = function () {\n return this.clone(SharePointQueryableShareable, \"unshareObject\").postAsCore();\n };\n /**\n * Deletes a link by type\n *\n * @param kind Deletes a sharing link by the kind of link\n */\n SharePointQueryableShareable.prototype.deleteLinkByKind = function (kind) {\n return this.clone(SharePointQueryableShareable, \"deleteLinkByKind\").postCore({\n body: JSON.stringify({ linkKind: kind }),\n });\n };\n /**\n * Removes the specified link to the item.\n *\n * @param kind The kind of link to be deleted.\n * @param shareId\n */\n SharePointQueryableShareable.prototype.unshareLink = function (kind, shareId) {\n if (shareId === void 0) { shareId = \"00000000-0000-0000-0000-000000000000\"; }\n return this.clone(SharePointQueryableShareable, \"unshareLink\").postCore({\n body: JSON.stringify({ linkKind: kind, shareId: shareId }),\n });\n };\n /**\n * Calculates the roleValue string used in the sharing query\n *\n * @param role The Sharing Role\n * @param group The Group type\n */\n SharePointQueryableShareable.prototype.getRoleValue = function (role, group) {\n // we will give group precedence, because we had to make a choice\n if (typeof group !== \"undefined\" && group !== null) {\n switch (group) {\n case types_1.RoleType.Contributor:\n return webs_1.Web.fromUrl(this.toUrl()).associatedMemberGroup.select(\"Id\").getAs().then(function (g) { return \"group: \" + g.Id; });\n case types_1.RoleType.Reader:\n case types_1.RoleType.Guest:\n return webs_1.Web.fromUrl(this.toUrl()).associatedVisitorGroup.select(\"Id\").getAs().then(function (g) { return \"group: \" + g.Id; });\n default:\n throw new Error(\"Could not determine role value for supplied value. Contributor, Reader, and Guest are supported\");\n }\n }\n else {\n var roleFilter = role === types_1.SharingRole.Edit ? types_1.RoleType.Contributor : types_1.RoleType.Reader;\n return webs_1.Web.fromUrl(this.toUrl()).roleDefinitions.select(\"Id\").top(1).filter(\"RoleTypeKind eq \" + roleFilter).getAs().then(function (def) {\n if (def.length < 1) {\n throw new Error(\"Could not locate associated role definition for supplied role. Edit and View are supported\");\n }\n return \"role: \" + def[0].Id;\n });\n }\n };\n SharePointQueryableShareable.prototype.getShareObjectWeb = function (candidate) {\n return Promise.resolve(webs_1.Web.fromUrl(candidate, \"/_api/SP.Web.ShareObject\"));\n };\n SharePointQueryableShareable.prototype.sendShareObjectRequest = function (options) {\n return this.getShareObjectWeb(this.toUrl()).then(function (web) {\n return web.expand(\"UsersWithAccessRequests\", \"GroupsSharedWith\").as(SharePointQueryableShareable).postCore({\n body: JSON.stringify(options),\n });\n });\n };\n return SharePointQueryableShareable;\n}(sharepointqueryable_1.SharePointQueryable));\nexports.SharePointQueryableShareable = SharePointQueryableShareable;\nvar SharePointQueryableShareableWeb = /** @class */ (function (_super) {\n __extends(SharePointQueryableShareableWeb, _super);\n function SharePointQueryableShareableWeb() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n /**\n * Shares this web with the supplied users\n * @param loginNames The resolved login names to share\n * @param role The role to share this web\n * @param emailData Optional email data\n */\n SharePointQueryableShareableWeb.prototype.shareWith = function (loginNames, role, emailData) {\n var _this = this;\n if (role === void 0) { role = types_1.SharingRole.View; }\n var dependency = this.addBatchDependency();\n return webs_1.Web.fromUrl(this.toUrl(), \"/_api/web/url\").get().then(function (url) {\n dependency();\n return _this.shareObject(util_1.Util.combinePaths(url, \"/_layouts/15/aclinv.aspx?forSharing=1&mbypass=1\"), loginNames, role, emailData);\n });\n };\n /**\n * Provides direct access to the static web.ShareObject method\n *\n * @param url The url to share\n * @param loginNames Resolved loginnames string[] of a single login name string\n * @param roleValue Role value\n * @param emailData Optional email data\n * @param groupId Optional group id\n * @param propagateAcl\n * @param includeAnonymousLinkInEmail\n * @param useSimplifiedRoles\n */\n SharePointQueryableShareableWeb.prototype.shareObject = function (url, loginNames, role, emailData, group, propagateAcl, includeAnonymousLinkInEmail, useSimplifiedRoles) {\n if (propagateAcl === void 0) { propagateAcl = false; }\n if (includeAnonymousLinkInEmail === void 0) { includeAnonymousLinkInEmail = false; }\n if (useSimplifiedRoles === void 0) { useSimplifiedRoles = true; }\n return this.clone(SharePointQueryableShareable, null).shareObject({\n emailData: emailData,\n group: group,\n includeAnonymousLinkInEmail: includeAnonymousLinkInEmail,\n loginNames: loginNames,\n propagateAcl: propagateAcl,\n role: role,\n url: url,\n useSimplifiedRoles: useSimplifiedRoles,\n });\n };\n /**\n * Supplies a method to pass any set of arguments to ShareObject\n *\n * @param options The set of options to send to ShareObject\n */\n SharePointQueryableShareableWeb.prototype.shareObjectRaw = function (options) {\n return this.clone(SharePointQueryableShareable, null).shareObject(options, true);\n };\n /**\n * Unshares the object\n *\n * @param url The url of the object to stop sharing\n */\n SharePointQueryableShareableWeb.prototype.unshareObject = function (url) {\n return this.clone(SharePointQueryableShareable, null).unshareObjectWeb(url);\n };\n return SharePointQueryableShareableWeb;\n}(sharepointqueryablesecurable_1.SharePointQueryableSecurable));\nexports.SharePointQueryableShareableWeb = SharePointQueryableShareableWeb;\nvar SharePointQueryableShareableItem = /** @class */ (function (_super) {\n __extends(SharePointQueryableShareableItem, _super);\n function SharePointQueryableShareableItem() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n /**\n * Gets a link suitable for sharing for this item\n *\n * @param kind The type of link to share\n * @param expiration The optional expiration date\n */\n SharePointQueryableShareableItem.prototype.getShareLink = function (kind, expiration) {\n if (kind === void 0) { kind = types_1.SharingLinkKind.OrganizationView; }\n if (expiration === void 0) { expiration = null; }\n return this.clone(SharePointQueryableShareable, null).getShareLink(kind, expiration);\n };\n /**\n * Shares this item with one or more users\n *\n * @param loginNames string or string[] of resolved login names to which this item will be shared\n * @param role The role (View | Edit) applied to the share\n * @param emailData Optional, if inlucded an email will be sent. Note subject currently has no effect.\n */\n SharePointQueryableShareableItem.prototype.shareWith = function (loginNames, role, requireSignin, emailData) {\n if (role === void 0) { role = types_1.SharingRole.View; }\n if (requireSignin === void 0) { requireSignin = false; }\n return this.clone(SharePointQueryableShareable, null).shareWith(loginNames, role, requireSignin, false, emailData);\n };\n /**\n * Checks Permissions on the list of Users and returns back role the users have on the Item.\n *\n * @param recipients The array of Entities for which Permissions need to be checked.\n */\n SharePointQueryableShareableItem.prototype.checkSharingPermissions = function (recipients) {\n return this.clone(SharePointQueryableShareable, null).checkPermissions(recipients);\n };\n /**\n * Get Sharing Information.\n *\n * @param request The SharingInformationRequest Object.\n */\n SharePointQueryableShareableItem.prototype.getSharingInformation = function (request) {\n if (request === void 0) { request = null; }\n return this.clone(SharePointQueryableShareable, null).getSharingInformation(request);\n };\n /**\n * Gets the sharing settings of an item.\n *\n * @param useSimplifiedRoles Determines whether to use simplified roles.\n */\n SharePointQueryableShareableItem.prototype.getObjectSharingSettings = function (useSimplifiedRoles) {\n if (useSimplifiedRoles === void 0) { useSimplifiedRoles = true; }\n return this.clone(SharePointQueryableShareable, null).getObjectSharingSettings(useSimplifiedRoles);\n };\n /**\n * Unshare this item\n */\n SharePointQueryableShareableItem.prototype.unshare = function () {\n return this.clone(SharePointQueryableShareable, null).unshareObject();\n };\n /**\n * Deletes a sharing link by kind\n *\n * @param kind Deletes a sharing link by the kind of link\n */\n SharePointQueryableShareableItem.prototype.deleteSharingLinkByKind = function (kind) {\n return this.clone(SharePointQueryableShareable, null).deleteLinkByKind(kind);\n };\n /**\n * Removes the specified link to the item.\n *\n * @param kind The kind of link to be deleted.\n * @param shareId\n */\n SharePointQueryableShareableItem.prototype.unshareLink = function (kind, shareId) {\n return this.clone(SharePointQueryableShareable, null).unshareLink(kind, shareId);\n };\n return SharePointQueryableShareableItem;\n}(sharepointqueryablesecurable_1.SharePointQueryableSecurable));\nexports.SharePointQueryableShareableItem = SharePointQueryableShareableItem;\nvar FileFolderShared = /** @class */ (function (_super) {\n __extends(FileFolderShared, _super);\n function FileFolderShared() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n /**\n * Gets a link suitable for sharing\n *\n * @param kind The kind of link to get\n * @param expiration Optional, an expiration for this link\n */\n FileFolderShared.prototype.getShareLink = function (kind, expiration) {\n if (kind === void 0) { kind = types_1.SharingLinkKind.OrganizationView; }\n if (expiration === void 0) { expiration = null; }\n var dependency = this.addBatchDependency();\n return this.getShareable().then(function (shareable) {\n dependency();\n return shareable.getShareLink(kind, expiration);\n });\n };\n /**\n * Checks Permissions on the list of Users and returns back role the users have on the Item.\n *\n * @param recipients The array of Entities for which Permissions need to be checked.\n */\n FileFolderShared.prototype.checkSharingPermissions = function (recipients) {\n var dependency = this.addBatchDependency();\n return this.getShareable().then(function (shareable) {\n dependency();\n return shareable.checkPermissions(recipients);\n });\n };\n /**\n * Get Sharing Information.\n *\n * @param request The SharingInformationRequest Object.\n */\n FileFolderShared.prototype.getSharingInformation = function (request) {\n if (request === void 0) { request = null; }\n var dependency = this.addBatchDependency();\n return this.getShareable().then(function (shareable) {\n dependency();\n return shareable.getSharingInformation(request);\n });\n };\n /**\n * Gets the sharing settings of an item.\n *\n * @param useSimplifiedRoles Determines whether to use simplified roles.\n */\n FileFolderShared.prototype.getObjectSharingSettings = function (useSimplifiedRoles) {\n if (useSimplifiedRoles === void 0) { useSimplifiedRoles = true; }\n var dependency = this.addBatchDependency();\n return this.getShareable().then(function (shareable) {\n dependency();\n return shareable.getObjectSharingSettings(useSimplifiedRoles);\n });\n };\n /**\n * Unshare this item\n */\n FileFolderShared.prototype.unshare = function () {\n var dependency = this.addBatchDependency();\n return this.getShareable().then(function (shareable) {\n dependency();\n return shareable.unshareObject();\n });\n };\n /**\n * Deletes a sharing link by the kind of link\n *\n * @param kind The kind of link to be deleted.\n */\n FileFolderShared.prototype.deleteSharingLinkByKind = function (kind) {\n var dependency = this.addBatchDependency();\n return this.getShareable().then(function (shareable) {\n dependency();\n return shareable.deleteLinkByKind(kind);\n });\n };\n /**\n * Removes the specified link to the item.\n *\n * @param kind The kind of link to be deleted.\n * @param shareId The share id to delete\n */\n FileFolderShared.prototype.unshareLink = function (kind, shareId) {\n var dependency = this.addBatchDependency();\n return this.getShareable().then(function (shareable) {\n dependency();\n return shareable.unshareLink(kind, shareId);\n });\n };\n /**\n * For files and folders we need to use the associated item end point\n */\n FileFolderShared.prototype.getShareable = function () {\n var _this = this;\n // sharing only works on the item end point, not the file one - so we create a folder instance with the item url internally\n return this.clone(SharePointQueryableShareableFile, \"listItemAllFields\", false).select(\"odata.editlink\").get().then(function (d) {\n var shareable = new SharePointQueryableShareable(odata_1.spGetEntityUrl(d));\n // we need to handle batching\n if (_this.hasBatch) {\n shareable = shareable.inBatch(_this.batch);\n }\n return shareable;\n });\n };\n return FileFolderShared;\n}(sharepointqueryable_1.SharePointQueryableInstance));\nexports.FileFolderShared = FileFolderShared;\nvar SharePointQueryableShareableFile = /** @class */ (function (_super) {\n __extends(SharePointQueryableShareableFile, _super);\n function SharePointQueryableShareableFile() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n /**\n * Shares this item with one or more users\n *\n * @param loginNames string or string[] of resolved login names to which this item will be shared\n * @param role The role (View | Edit) applied to the share\n * @param shareEverything Share everything in this folder, even items with unique permissions.\n * @param requireSignin If true the user must signin to view link, otherwise anyone with the link can access the resource\n * @param emailData Optional, if inlucded an email will be sent. Note subject currently has no effect.\n */\n SharePointQueryableShareableFile.prototype.shareWith = function (loginNames, role, requireSignin, emailData) {\n if (role === void 0) { role = types_1.SharingRole.View; }\n if (requireSignin === void 0) { requireSignin = false; }\n var dependency = this.addBatchDependency();\n return this.getShareable().then(function (shareable) {\n dependency();\n return shareable.shareWith(loginNames, role, requireSignin, false, emailData);\n });\n };\n return SharePointQueryableShareableFile;\n}(FileFolderShared));\nexports.SharePointQueryableShareableFile = SharePointQueryableShareableFile;\nvar SharePointQueryableShareableFolder = /** @class */ (function (_super) {\n __extends(SharePointQueryableShareableFolder, _super);\n function SharePointQueryableShareableFolder() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n /**\n * Shares this item with one or more users\n *\n * @param loginNames string or string[] of resolved login names to which this item will be shared\n * @param role The role (View | Edit) applied to the share\n * @param shareEverything Share everything in this folder, even items with unique permissions.\n * @param requireSignin If true the user must signin to view link, otherwise anyone with the link can access the resource\n * @param emailData Optional, if inlucded an email will be sent. Note subject currently has no effect.\n */\n SharePointQueryableShareableFolder.prototype.shareWith = function (loginNames, role, requireSignin, shareEverything, emailData) {\n if (role === void 0) { role = types_1.SharingRole.View; }\n if (requireSignin === void 0) { requireSignin = false; }\n if (shareEverything === void 0) { shareEverything = false; }\n var dependency = this.addBatchDependency();\n return this.getShareable().then(function (shareable) {\n dependency();\n return shareable.shareWith(loginNames, role, requireSignin, shareEverything, emailData);\n });\n };\n return SharePointQueryableShareableFolder;\n}(FileFolderShared));\nexports.SharePointQueryableShareableFolder = SharePointQueryableShareableFolder;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/sharepoint/sharepointqueryableshareable.js\n// module id = 11\n// module chunks = 0","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar sharepointqueryable_1 = require(\"./sharepointqueryable\");\nvar parsers_1 = require(\"../odata/parsers\");\nvar util_1 = require(\"../utils/util\");\nvar exceptions_1 = require(\"../utils/exceptions\");\nvar webparts_1 = require(\"./webparts\");\nvar items_1 = require(\"./items\");\nvar sharepointqueryableshareable_1 = require(\"./sharepointqueryableshareable\");\nvar odata_1 = require(\"./odata\");\n/**\n * Describes a collection of File objects\n *\n */\nvar Files = /** @class */ (function (_super) {\n __extends(Files, _super);\n /**\n * Creates a new instance of the Files class\n *\n * @param baseUrl The url or SharePointQueryable which forms the parent of this fields collection\n */\n function Files(baseUrl, path) {\n if (path === void 0) { path = \"files\"; }\n return _super.call(this, baseUrl, path) || this;\n }\n /**\n * Gets a File by filename\n *\n * @param name The name of the file, including extension.\n */\n Files.prototype.getByName = function (name) {\n var f = new File(this);\n f.concat(\"('\" + name + \"')\");\n return f;\n };\n /**\n * Uploads a file. Not supported for batching\n *\n * @param url The folder-relative url of the file.\n * @param content The file contents blob.\n * @param shouldOverWrite Should a file with the same name in the same location be overwritten? (default: true)\n * @returns The new File and the raw response.\n */\n Files.prototype.add = function (url, content, shouldOverWrite) {\n var _this = this;\n if (shouldOverWrite === void 0) { shouldOverWrite = true; }\n return new Files(this, \"add(overwrite=\" + shouldOverWrite + \",url='\" + url + \"')\")\n .postCore({\n body: content,\n }).then(function (response) {\n return {\n data: response,\n file: _this.getByName(url),\n };\n });\n };\n /**\n * Uploads a file. Not supported for batching\n *\n * @param url The folder-relative url of the file.\n * @param content The Blob file content to add\n * @param progress A callback function which can be used to track the progress of the upload\n * @param shouldOverWrite Should a file with the same name in the same location be overwritten? (default: true)\n * @param chunkSize The size of each file slice, in bytes (default: 10485760)\n * @returns The new File and the raw response.\n */\n Files.prototype.addChunked = function (url, content, progress, shouldOverWrite, chunkSize) {\n var _this = this;\n if (shouldOverWrite === void 0) { shouldOverWrite = true; }\n if (chunkSize === void 0) { chunkSize = 10485760; }\n var adder = this.clone(Files, \"add(overwrite=\" + shouldOverWrite + \",url='\" + url + \"')\", false);\n return adder.postCore().then(function () { return _this.getByName(url); }).then(function (file) { return file.setContentChunked(content, progress, chunkSize); }).then(function (response) {\n return {\n data: response,\n file: _this.getByName(url),\n };\n });\n };\n /**\n * Adds a ghosted file to an existing list or document library. Not supported for batching.\n *\n * @param fileUrl The server-relative url where you want to save the file.\n * @param templateFileType The type of use to create the file.\n * @returns The template file that was added and the raw response.\n */\n Files.prototype.addTemplateFile = function (fileUrl, templateFileType) {\n var _this = this;\n return this.clone(Files, \"addTemplateFile(urloffile='\" + fileUrl + \"',templatefiletype=\" + templateFileType + \")\", false)\n .postCore().then(function (response) {\n return {\n data: response,\n file: _this.getByName(fileUrl),\n };\n });\n };\n return Files;\n}(sharepointqueryable_1.SharePointQueryableCollection));\nexports.Files = Files;\n/**\n * Describes a single File instance\n *\n */\nvar File = /** @class */ (function (_super) {\n __extends(File, _super);\n function File() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n Object.defineProperty(File.prototype, \"listItemAllFields\", {\n /**\n * Gets a value that specifies the list item field values for the list item corresponding to the file.\n *\n */\n get: function () {\n return new sharepointqueryable_1.SharePointQueryableCollection(this, \"listItemAllFields\");\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(File.prototype, \"versions\", {\n /**\n * Gets a collection of versions\n *\n */\n get: function () {\n return new Versions(this);\n },\n enumerable: true,\n configurable: true\n });\n /**\n * Approves the file submitted for content approval with the specified comment.\n * Only documents in lists that are enabled for content approval can be approved.\n *\n * @param comment The comment for the approval.\n */\n File.prototype.approve = function (comment) {\n if (comment === void 0) { comment = \"\"; }\n return this.clone(File, \"approve(comment='\" + comment + \"')\").postCore();\n };\n /**\n * Stops the chunk upload session without saving the uploaded data. Does not support batching.\n * If the file doesn’t already exist in the library, the partially uploaded file will be deleted.\n * Use this in response to user action (as in a request to cancel an upload) or an error or exception.\n * Use the uploadId value that was passed to the StartUpload method that started the upload session.\n * This method is currently available only on Office 365.\n *\n * @param uploadId The unique identifier of the upload session.\n */\n File.prototype.cancelUpload = function (uploadId) {\n return this.clone(File, \"cancelUpload(uploadId=guid'\" + uploadId + \"')\", false).postCore();\n };\n /**\n * Checks the file in to a document library based on the check-in type.\n *\n * @param comment A comment for the check-in. Its length must be <= 1023.\n * @param checkinType The check-in type for the file.\n */\n File.prototype.checkin = function (comment, checkinType) {\n if (comment === void 0) { comment = \"\"; }\n if (checkinType === void 0) { checkinType = CheckinType.Major; }\n if (comment.length > 1023) {\n throw new exceptions_1.MaxCommentLengthException();\n }\n return this.clone(File, \"checkin(comment='\" + comment + \"',checkintype=\" + checkinType + \")\").postCore();\n };\n /**\n * Checks out the file from a document library.\n */\n File.prototype.checkout = function () {\n return this.clone(File, \"checkout\").postCore();\n };\n /**\n * Copies the file to the destination url.\n *\n * @param url The absolute url or server relative url of the destination file path to copy to.\n * @param shouldOverWrite Should a file with the same name in the same location be overwritten?\n */\n File.prototype.copyTo = function (url, shouldOverWrite) {\n if (shouldOverWrite === void 0) { shouldOverWrite = true; }\n return this.clone(File, \"copyTo(strnewurl='\" + url + \"',boverwrite=\" + shouldOverWrite + \")\").postCore();\n };\n /**\n * Delete this file.\n *\n * @param eTag Value used in the IF-Match header, by default \"*\"\n */\n File.prototype.delete = function (eTag) {\n if (eTag === void 0) { eTag = \"*\"; }\n return this.clone(File, null).postCore({\n headers: {\n \"IF-Match\": eTag,\n \"X-HTTP-Method\": \"DELETE\",\n },\n });\n };\n /**\n * Denies approval for a file that was submitted for content approval.\n * Only documents in lists that are enabled for content approval can be denied.\n *\n * @param comment The comment for the denial.\n */\n File.prototype.deny = function (comment) {\n if (comment === void 0) { comment = \"\"; }\n if (comment.length > 1023) {\n throw new exceptions_1.MaxCommentLengthException();\n }\n return this.clone(File, \"deny(comment='\" + comment + \"')\").postCore();\n };\n /**\n * Specifies the control set used to access, modify, or add Web Parts associated with this Web Part Page and view.\n * An exception is thrown if the file is not an ASPX page.\n *\n * @param scope The WebPartsPersonalizationScope view on the Web Parts page.\n */\n File.prototype.getLimitedWebPartManager = function (scope) {\n if (scope === void 0) { scope = WebPartsPersonalizationScope.Shared; }\n return new webparts_1.LimitedWebPartManager(this, \"getLimitedWebPartManager(scope=\" + scope + \")\");\n };\n /**\n * Moves the file to the specified destination url.\n *\n * @param url The absolute url or server relative url of the destination file path to move to.\n * @param moveOperations The bitwise MoveOperations value for how to move the file.\n */\n File.prototype.moveTo = function (url, moveOperations) {\n if (moveOperations === void 0) { moveOperations = MoveOperations.Overwrite; }\n return this.clone(File, \"moveTo(newurl='\" + url + \"',flags=\" + moveOperations + \")\").postCore();\n };\n /**\n * Submits the file for content approval with the specified comment.\n *\n * @param comment The comment for the published file. Its length must be <= 1023.\n */\n File.prototype.publish = function (comment) {\n if (comment === void 0) { comment = \"\"; }\n if (comment.length > 1023) {\n throw new exceptions_1.MaxCommentLengthException();\n }\n return this.clone(File, \"publish(comment='\" + comment + \"')\").postCore();\n };\n /**\n * Moves the file to the Recycle Bin and returns the identifier of the new Recycle Bin item.\n *\n * @returns The GUID of the recycled file.\n */\n File.prototype.recycle = function () {\n return this.clone(File, \"recycle\").postCore();\n };\n /**\n * Reverts an existing checkout for the file.\n *\n */\n File.prototype.undoCheckout = function () {\n return this.clone(File, \"undoCheckout\").postCore();\n };\n /**\n * Removes the file from content approval or unpublish a major version.\n *\n * @param comment The comment for the unpublish operation. Its length must be <= 1023.\n */\n File.prototype.unpublish = function (comment) {\n if (comment === void 0) { comment = \"\"; }\n if (comment.length > 1023) {\n throw new exceptions_1.MaxCommentLengthException();\n }\n return this.clone(File, \"unpublish(comment='\" + comment + \"')\").postCore();\n };\n /**\n * Gets the contents of the file as text. Not supported in batching.\n *\n */\n File.prototype.getText = function () {\n return this.clone(File, \"$value\", false).get(new parsers_1.TextFileParser(), { headers: { \"binaryStringResponseBody\": \"true\" } });\n };\n /**\n * Gets the contents of the file as a blob, does not work in Node.js. Not supported in batching.\n *\n */\n File.prototype.getBlob = function () {\n return this.clone(File, \"$value\", false).get(new parsers_1.BlobFileParser(), { headers: { \"binaryStringResponseBody\": \"true\" } });\n };\n /**\n * Gets the contents of a file as an ArrayBuffer, works in Node.js. Not supported in batching.\n */\n File.prototype.getBuffer = function () {\n return this.clone(File, \"$value\", false).get(new parsers_1.BufferFileParser(), { headers: { \"binaryStringResponseBody\": \"true\" } });\n };\n /**\n * Gets the contents of a file as an ArrayBuffer, works in Node.js. Not supported in batching.\n */\n File.prototype.getJSON = function () {\n return this.clone(File, \"$value\", false).get(new parsers_1.JSONFileParser(), { headers: { \"binaryStringResponseBody\": \"true\" } });\n };\n /**\n * Sets the content of a file, for large files use setContentChunked. Not supported in batching.\n *\n * @param content The file content\n *\n */\n File.prototype.setContent = function (content) {\n var _this = this;\n return this.clone(File, \"$value\", false).postCore({\n body: content,\n headers: {\n \"X-HTTP-Method\": \"PUT\",\n },\n }).then(function (_) { return new File(_this); });\n };\n /**\n * Gets the associated list item for this folder, loading the default properties\n */\n File.prototype.getItem = function () {\n var selects = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n selects[_i] = arguments[_i];\n }\n var q = this.listItemAllFields;\n return q.select.apply(q, selects).get().then(function (d) {\n return util_1.Util.extend(new items_1.Item(odata_1.spGetEntityUrl(d)), d);\n });\n };\n /**\n * Sets the contents of a file using a chunked upload approach. Not supported in batching.\n *\n * @param file The file to upload\n * @param progress A callback function which can be used to track the progress of the upload\n * @param chunkSize The size of each file slice, in bytes (default: 10485760)\n */\n File.prototype.setContentChunked = function (file, progress, chunkSize) {\n if (chunkSize === void 0) { chunkSize = 10485760; }\n if (typeof progress === \"undefined\") {\n progress = function () { return null; };\n }\n var self = this;\n var fileSize = file.size;\n var blockCount = parseInt((file.size / chunkSize).toString(), 10) + ((file.size % chunkSize === 0) ? 1 : 0);\n var uploadId = util_1.Util.getGUID();\n // start the chain with the first fragment\n progress({ blockNumber: 1, chunkSize: chunkSize, currentPointer: 0, fileSize: fileSize, stage: \"starting\", totalBlocks: blockCount });\n var chain = self.startUpload(uploadId, file.slice(0, chunkSize));\n var _loop_1 = function (i) {\n chain = chain.then(function (pointer) {\n progress({ blockNumber: i, chunkSize: chunkSize, currentPointer: pointer, fileSize: fileSize, stage: \"continue\", totalBlocks: blockCount });\n return self.continueUpload(uploadId, pointer, file.slice(pointer, pointer + chunkSize));\n });\n };\n // skip the first and last blocks\n for (var i = 2; i < blockCount; i++) {\n _loop_1(i);\n }\n return chain.then(function (pointer) {\n progress({ blockNumber: blockCount, chunkSize: chunkSize, currentPointer: pointer, fileSize: fileSize, stage: \"finishing\", totalBlocks: blockCount });\n return self.finishUpload(uploadId, pointer, file.slice(pointer));\n }).then(function (_) {\n return self;\n });\n };\n /**\n * Starts a new chunk upload session and uploads the first fragment.\n * The current file content is not changed when this method completes.\n * The method is idempotent (and therefore does not change the result) as long as you use the same values for uploadId and stream.\n * The upload session ends either when you use the CancelUpload method or when you successfully\n * complete the upload session by passing the rest of the file contents through the ContinueUpload and FinishUpload methods.\n * The StartUpload and ContinueUpload methods return the size of the running total of uploaded data in bytes,\n * so you can pass those return values to subsequent uses of ContinueUpload and FinishUpload.\n * This method is currently available only on Office 365.\n *\n * @param uploadId The unique identifier of the upload session.\n * @param fragment The file contents.\n * @returns The size of the total uploaded data in bytes.\n */\n File.prototype.startUpload = function (uploadId, fragment) {\n return this.clone(File, \"startUpload(uploadId=guid'\" + uploadId + \"')\", false).postAsCore({ body: fragment }).then(function (n) { return parseFloat(n); });\n };\n /**\n * Continues the chunk upload session with an additional fragment.\n * The current file content is not changed.\n * Use the uploadId value that was passed to the StartUpload method that started the upload session.\n * This method is currently available only on Office 365.\n *\n * @param uploadId The unique identifier of the upload session.\n * @param fileOffset The size of the offset into the file where the fragment starts.\n * @param fragment The file contents.\n * @returns The size of the total uploaded data in bytes.\n */\n File.prototype.continueUpload = function (uploadId, fileOffset, fragment) {\n return this.clone(File, \"continueUpload(uploadId=guid'\" + uploadId + \"',fileOffset=\" + fileOffset + \")\", false).postAsCore({ body: fragment }).then(function (n) { return parseFloat(n); });\n };\n /**\n * Uploads the last file fragment and commits the file. The current file content is changed when this method completes.\n * Use the uploadId value that was passed to the StartUpload method that started the upload session.\n * This method is currently available only on Office 365.\n *\n * @param uploadId The unique identifier of the upload session.\n * @param fileOffset The size of the offset into the file where the fragment starts.\n * @param fragment The file contents.\n * @returns The newly uploaded file.\n */\n File.prototype.finishUpload = function (uploadId, fileOffset, fragment) {\n return this.clone(File, \"finishUpload(uploadId=guid'\" + uploadId + \"',fileOffset=\" + fileOffset + \")\", false)\n .postAsCore({ body: fragment }).then(function (response) {\n return {\n data: response,\n file: new File(response.ServerRelativeUrl),\n };\n });\n };\n return File;\n}(sharepointqueryableshareable_1.SharePointQueryableShareableFile));\nexports.File = File;\n/**\n * Describes a collection of Version objects\n *\n */\nvar Versions = /** @class */ (function (_super) {\n __extends(Versions, _super);\n /**\n * Creates a new instance of the File class\n *\n * @param baseUrl The url or SharePointQueryable which forms the parent of this fields collection\n */\n function Versions(baseUrl, path) {\n if (path === void 0) { path = \"versions\"; }\n return _super.call(this, baseUrl, path) || this;\n }\n /**\n * Gets a version by id\n *\n * @param versionId The id of the version to retrieve\n */\n Versions.prototype.getById = function (versionId) {\n var v = new Version(this);\n v.concat(\"(\" + versionId + \")\");\n return v;\n };\n /**\n * Deletes all the file version objects in the collection.\n *\n */\n Versions.prototype.deleteAll = function () {\n return new Versions(this, \"deleteAll\").postCore();\n };\n /**\n * Deletes the specified version of the file.\n *\n * @param versionId The ID of the file version to delete.\n */\n Versions.prototype.deleteById = function (versionId) {\n return this.clone(Versions, \"deleteById(vid=\" + versionId + \")\").postCore();\n };\n /**\n * Deletes the file version object with the specified version label.\n *\n * @param label The version label of the file version to delete, for example: 1.2\n */\n Versions.prototype.deleteByLabel = function (label) {\n return this.clone(Versions, \"deleteByLabel(versionlabel='\" + label + \"')\").postCore();\n };\n /**\n * Creates a new file version from the file specified by the version label.\n *\n * @param label The version label of the file version to restore, for example: 1.2\n */\n Versions.prototype.restoreByLabel = function (label) {\n return this.clone(Versions, \"restoreByLabel(versionlabel='\" + label + \"')\").postCore();\n };\n return Versions;\n}(sharepointqueryable_1.SharePointQueryableCollection));\nexports.Versions = Versions;\n/**\n * Describes a single Version instance\n *\n */\nvar Version = /** @class */ (function (_super) {\n __extends(Version, _super);\n function Version() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n /**\n * Delete a specific version of a file.\n *\n * @param eTag Value used in the IF-Match header, by default \"*\"\n */\n Version.prototype.delete = function (eTag) {\n if (eTag === void 0) { eTag = \"*\"; }\n return this.postCore({\n headers: {\n \"IF-Match\": eTag,\n \"X-HTTP-Method\": \"DELETE\",\n },\n });\n };\n return Version;\n}(sharepointqueryable_1.SharePointQueryableInstance));\nexports.Version = Version;\nvar CheckinType;\n(function (CheckinType) {\n CheckinType[CheckinType[\"Minor\"] = 0] = \"Minor\";\n CheckinType[CheckinType[\"Major\"] = 1] = \"Major\";\n CheckinType[CheckinType[\"Overwrite\"] = 2] = \"Overwrite\";\n})(CheckinType = exports.CheckinType || (exports.CheckinType = {}));\nvar WebPartsPersonalizationScope;\n(function (WebPartsPersonalizationScope) {\n WebPartsPersonalizationScope[WebPartsPersonalizationScope[\"User\"] = 0] = \"User\";\n WebPartsPersonalizationScope[WebPartsPersonalizationScope[\"Shared\"] = 1] = \"Shared\";\n})(WebPartsPersonalizationScope = exports.WebPartsPersonalizationScope || (exports.WebPartsPersonalizationScope = {}));\nvar MoveOperations;\n(function (MoveOperations) {\n MoveOperations[MoveOperations[\"Overwrite\"] = 1] = \"Overwrite\";\n MoveOperations[MoveOperations[\"AllowBrokenThickets\"] = 8] = \"AllowBrokenThickets\";\n})(MoveOperations = exports.MoveOperations || (exports.MoveOperations = {}));\nvar TemplateFileType;\n(function (TemplateFileType) {\n TemplateFileType[TemplateFileType[\"StandardPage\"] = 0] = \"StandardPage\";\n TemplateFileType[TemplateFileType[\"WikiPage\"] = 1] = \"WikiPage\";\n TemplateFileType[TemplateFileType[\"FormPage\"] = 2] = \"FormPage\";\n})(TemplateFileType = exports.TemplateFileType || (exports.TemplateFileType = {}));\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/sharepoint/files.js\n// module id = 12\n// module chunks = 0","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar exceptions_1 = require(\"../utils/exceptions\");\nvar logging_1 = require(\"../utils/logging\");\nvar ODataParserBase = /** @class */ (function () {\n function ODataParserBase() {\n }\n ODataParserBase.prototype.parse = function (r) {\n var _this = this;\n return new Promise(function (resolve, reject) {\n if (_this.handleError(r, reject)) {\n if ((r.headers.has(\"Content-Length\") && parseFloat(r.headers.get(\"Content-Length\")) === 0) || r.status === 204) {\n resolve({});\n }\n else {\n // patch to handle cases of 200 response with no or whitespace only bodies (#487 & #545)\n r.text()\n .then(function (txt) { return txt.replace(/\\s/ig, \"\").length > 0 ? JSON.parse(txt) : {}; })\n .then(function (json) { return resolve(_this.parseODataJSON(json)); })\n .catch(function (e) { return reject(e); });\n }\n }\n });\n };\n ODataParserBase.prototype.handleError = function (r, reject) {\n if (!r.ok) {\n r.json().then(function (json) {\n // include the headers as they contain diagnostic information\n var data = {\n responseBody: json,\n responseHeaders: r.headers,\n };\n reject(new exceptions_1.ProcessHttpClientResponseException(r.status, r.statusText, data));\n }).catch(function (e) {\n // we failed to read the body - possibly it is empty. Let's report the original status that caused\n // the request to fail and log the error with parsing the body if anyone needs it for debugging\n logging_1.Logger.log({\n data: e,\n level: logging_1.LogLevel.Warning,\n message: \"There was an error parsing the error response body. See data for details.\",\n });\n // include the headers as they contain diagnostic information\n var data = {\n responseBody: \"[[body not available]]\",\n responseHeaders: r.headers,\n };\n reject(new exceptions_1.ProcessHttpClientResponseException(r.status, r.statusText, data));\n });\n }\n return r.ok;\n };\n ODataParserBase.prototype.parseODataJSON = function (json) {\n var result = json;\n if (json.hasOwnProperty(\"d\")) {\n if (json.d.hasOwnProperty(\"results\")) {\n result = json.d.results;\n }\n else {\n result = json.d;\n }\n }\n else if (json.hasOwnProperty(\"value\")) {\n result = json.value;\n }\n return result;\n };\n return ODataParserBase;\n}());\nexports.ODataParserBase = ODataParserBase;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/odata/core.js\n// module id = 13\n// module chunks = 0","\"use strict\";\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar caching_1 = require(\"../odata/caching\");\nvar logging_1 = require(\"../utils/logging\");\nvar util_1 = require(\"../utils/util\");\n/**\n * Resolves the context's result value\n *\n * @param context The current context\n */\nfunction returnResult(context) {\n logging_1.Logger.log({\n data: context.result,\n level: logging_1.LogLevel.Verbose,\n message: \"[\" + context.requestId + \"] (\" + (new Date()).getTime() + \") Returning result, see data property for value.\",\n });\n return Promise.resolve(context.result);\n}\n/**\n * Sets the result on the context\n */\nfunction setResult(context, value) {\n return new Promise(function (resolve) {\n context.result = value;\n context.hasResult = true;\n resolve(context);\n });\n}\nexports.setResult = setResult;\n/**\n * Invokes the next method in the provided context's pipeline\n *\n * @param c The current request context\n */\nfunction next(c) {\n if (c.pipeline.length < 1) {\n return Promise.resolve(c);\n }\n return c.pipeline.shift()(c);\n}\n/**\n * Executes the current request context's pipeline\n *\n * @param context Current context\n */\nfunction pipe(context) {\n return next(context)\n .then(function (ctx) { return returnResult(ctx); })\n .catch(function (e) {\n logging_1.Logger.log({\n data: e,\n level: logging_1.LogLevel.Error,\n message: \"Error in request pipeline: \" + e.message,\n });\n throw e;\n });\n}\nexports.pipe = pipe;\n/**\n * decorator factory applied to methods in the pipeline to control behavior\n */\nfunction requestPipelineMethod(alwaysRun) {\n if (alwaysRun === void 0) { alwaysRun = false; }\n return function (target, propertyKey, descriptor) {\n var method = descriptor.value;\n descriptor.value = function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n // if we have a result already in the pipeline, pass it along and don't call the tagged method\n if (!alwaysRun && args.length > 0 && args[0].hasOwnProperty(\"hasResult\") && args[0].hasResult) {\n logging_1.Logger.write(\"[\" + args[0].requestId + \"] (\" + (new Date()).getTime() + \") Skipping request pipeline method \" + propertyKey + \", existing result in pipeline.\", logging_1.LogLevel.Verbose);\n return Promise.resolve(args[0]);\n }\n // apply the tagged method\n logging_1.Logger.write(\"[\" + args[0].requestId + \"] (\" + (new Date()).getTime() + \") Calling request pipeline method \" + propertyKey + \".\", logging_1.LogLevel.Verbose);\n // then chain the next method in the context's pipeline - allows for dynamic pipeline\n return method.apply(target, args).then(function (ctx) { return next(ctx); });\n };\n };\n}\nexports.requestPipelineMethod = requestPipelineMethod;\n/**\n * Contains the methods used within the request pipeline\n */\nvar PipelineMethods = /** @class */ (function () {\n function PipelineMethods() {\n }\n /**\n * Logs the start of the request\n */\n PipelineMethods.logStart = function (context) {\n return new Promise(function (resolve) {\n logging_1.Logger.log({\n data: logging_1.Logger.activeLogLevel === logging_1.LogLevel.Info ? {} : context,\n level: logging_1.LogLevel.Info,\n message: \"[\" + context.requestId + \"] (\" + (new Date()).getTime() + \") Beginning \" + context.verb + \" request (\" + context.requestAbsoluteUrl + \")\",\n });\n resolve(context);\n });\n };\n /**\n * Handles caching of the request\n */\n PipelineMethods.caching = function (context) {\n return new Promise(function (resolve) {\n // handle caching, if applicable\n if (context.verb === \"GET\" && context.isCached) {\n logging_1.Logger.write(\"[\" + context.requestId + \"] (\" + (new Date()).getTime() + \") Caching is enabled for request, checking cache...\", logging_1.LogLevel.Info);\n var cacheOptions = new caching_1.CachingOptions(context.requestAbsoluteUrl.toLowerCase());\n if (typeof context.cachingOptions !== \"undefined\") {\n cacheOptions = util_1.Util.extend(cacheOptions, context.cachingOptions);\n }\n // we may not have a valid store\n if (cacheOptions.store !== null) {\n // check if we have the data in cache and if so resolve the promise and return\n var data = cacheOptions.store.get(cacheOptions.key);\n if (data !== null) {\n // ensure we clear any help batch dependency we are resolving from the cache\n logging_1.Logger.log({\n data: logging_1.Logger.activeLogLevel === logging_1.LogLevel.Info ? {} : data,\n level: logging_1.LogLevel.Info,\n message: \"[\" + context.requestId + \"] (\" + (new Date()).getTime() + \") Value returned from cache.\",\n });\n context.batchDependency();\n return setResult(context, data).then(function (ctx) { return resolve(ctx); });\n }\n }\n logging_1.Logger.write(\"[\" + context.requestId + \"] (\" + (new Date()).getTime() + \") Value not found in cache.\", logging_1.LogLevel.Info);\n // if we don't then wrap the supplied parser in the caching parser wrapper\n // and send things on their way\n context.parser = new caching_1.CachingParserWrapper(context.parser, cacheOptions);\n }\n return resolve(context);\n });\n };\n /**\n * Sends the request\n */\n PipelineMethods.send = function (context) {\n return new Promise(function (resolve, reject) {\n // send or batch the request\n if (context.isBatched) {\n // we are in a batch, so add to batch, remove dependency, and resolve with the batch's promise\n var p = context.batch.add(context.requestAbsoluteUrl, context.verb, context.options, context.parser);\n // we release the dependency here to ensure the batch does not execute until the request is added to the batch\n context.batchDependency();\n logging_1.Logger.write(\"[\" + context.requestId + \"] (\" + (new Date()).getTime() + \") Batching request in batch \" + context.batch.batchId + \".\", logging_1.LogLevel.Info);\n // we set the result as the promise which will be resolved by the batch's execution\n resolve(setResult(context, p));\n }\n else {\n logging_1.Logger.write(\"[\" + context.requestId + \"] (\" + (new Date()).getTime() + \") Sending request.\", logging_1.LogLevel.Info);\n // we are not part of a batch, so proceed as normal\n var client = context.clientFactory();\n var opts = util_1.Util.extend(context.options || {}, { method: context.verb });\n client.fetch(context.requestAbsoluteUrl, opts)\n .then(function (response) { return context.parser.parse(response); })\n .then(function (result) { return setResult(context, result); })\n .then(function (ctx) { return resolve(ctx); })\n .catch(function (e) { return reject(e); });\n }\n });\n };\n /**\n * Logs the end of the request\n */\n PipelineMethods.logEnd = function (context) {\n return new Promise(function (resolve) {\n if (context.isBatched) {\n logging_1.Logger.log({\n data: logging_1.Logger.activeLogLevel === logging_1.LogLevel.Info ? {} : context,\n level: logging_1.LogLevel.Info,\n message: \"[\" + context.requestId + \"] (\" + (new Date()).getTime() + \") \" + context.verb + \" request will complete in batch \" + context.batch.batchId + \".\",\n });\n }\n else {\n logging_1.Logger.log({\n data: logging_1.Logger.activeLogLevel === logging_1.LogLevel.Info ? {} : context,\n level: logging_1.LogLevel.Info,\n message: \"[\" + context.requestId + \"] (\" + (new Date()).getTime() + \") Completing \" + context.verb + \" request.\",\n });\n }\n resolve(context);\n });\n };\n Object.defineProperty(PipelineMethods, \"default\", {\n get: function () {\n return [\n PipelineMethods.logStart,\n PipelineMethods.caching,\n PipelineMethods.send,\n PipelineMethods.logEnd,\n ];\n },\n enumerable: true,\n configurable: true\n });\n __decorate([\n requestPipelineMethod(true)\n ], PipelineMethods, \"logStart\", null);\n __decorate([\n requestPipelineMethod()\n ], PipelineMethods, \"caching\", null);\n __decorate([\n requestPipelineMethod()\n ], PipelineMethods, \"send\", null);\n __decorate([\n requestPipelineMethod(true)\n ], PipelineMethods, \"logEnd\", null);\n return PipelineMethods;\n}());\nexports.PipelineMethods = PipelineMethods;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/request/pipeline.js\n// module id = 14\n// module chunks = 0","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar items_1 = require(\"./items\");\nvar views_1 = require(\"./views\");\nvar contenttypes_1 = require(\"./contenttypes\");\nvar fields_1 = require(\"./fields\");\nvar forms_1 = require(\"./forms\");\nvar subscriptions_1 = require(\"./subscriptions\");\nvar sharepointqueryable_1 = require(\"./sharepointqueryable\");\nvar sharepointqueryablesecurable_1 = require(\"./sharepointqueryablesecurable\");\nvar util_1 = require(\"../utils/util\");\nvar usercustomactions_1 = require(\"./usercustomactions\");\nvar odata_1 = require(\"./odata\");\nvar exceptions_1 = require(\"../utils/exceptions\");\nvar folders_1 = require(\"./folders\");\n/**\n * Describes a collection of List objects\n *\n */\nvar Lists = /** @class */ (function (_super) {\n __extends(Lists, _super);\n /**\n * Creates a new instance of the Lists class\n *\n * @param baseUrl The url or SharePointQueryable which forms the parent of this fields collection\n */\n function Lists(baseUrl, path) {\n if (path === void 0) { path = \"lists\"; }\n return _super.call(this, baseUrl, path) || this;\n }\n /**\n * Gets a list from the collection by title\n *\n * @param title The title of the list\n */\n Lists.prototype.getByTitle = function (title) {\n return new List(this, \"getByTitle('\" + title + \"')\");\n };\n /**\n * Gets a list from the collection by guid id\n *\n * @param id The Id of the list (GUID)\n */\n Lists.prototype.getById = function (id) {\n var list = new List(this);\n list.concat(\"('\" + id + \"')\");\n return list;\n };\n /**\n * Adds a new list to the collection\n *\n * @param title The new list's title\n * @param description The new list's description\n * @param template The list template value\n * @param enableContentTypes If true content types will be allowed and enabled, otherwise they will be disallowed and not enabled\n * @param additionalSettings Will be passed as part of the list creation body\n */\n Lists.prototype.add = function (title, description, template, enableContentTypes, additionalSettings) {\n var _this = this;\n if (description === void 0) { description = \"\"; }\n if (template === void 0) { template = 100; }\n if (enableContentTypes === void 0) { enableContentTypes = false; }\n if (additionalSettings === void 0) { additionalSettings = {}; }\n var addSettings = util_1.Util.extend({\n \"AllowContentTypes\": enableContentTypes,\n \"BaseTemplate\": template,\n \"ContentTypesEnabled\": enableContentTypes,\n \"Description\": description,\n \"Title\": title,\n \"__metadata\": { \"type\": \"SP.List\" },\n }, additionalSettings);\n return this.postCore({ body: JSON.stringify(addSettings) }).then(function (data) {\n return { data: data, list: _this.getByTitle(addSettings.Title) };\n });\n };\n /**\n * Ensures that the specified list exists in the collection (note: this method not supported for batching)\n *\n * @param title The new list's title\n * @param description The new list's description\n * @param template The list template value\n * @param enableContentTypes If true content types will be allowed and enabled, otherwise they will be disallowed and not enabled\n * @param additionalSettings Will be passed as part of the list creation body or used to update an existing list\n */\n Lists.prototype.ensure = function (title, description, template, enableContentTypes, additionalSettings) {\n var _this = this;\n if (description === void 0) { description = \"\"; }\n if (template === void 0) { template = 100; }\n if (enableContentTypes === void 0) { enableContentTypes = false; }\n if (additionalSettings === void 0) { additionalSettings = {}; }\n if (this.hasBatch) {\n throw new exceptions_1.NotSupportedInBatchException(\"The ensure list method\");\n }\n return new Promise(function (resolve, reject) {\n var addOrUpdateSettings = util_1.Util.extend(additionalSettings, { Title: title, Description: description, ContentTypesEnabled: enableContentTypes }, true);\n var list = _this.getByTitle(addOrUpdateSettings.Title);\n list.get().then(function (_) {\n list.update(addOrUpdateSettings).then(function (d) {\n resolve({ created: false, data: d, list: _this.getByTitle(addOrUpdateSettings.Title) });\n }).catch(function (e) { return reject(e); });\n }).catch(function (_) {\n _this.add(title, description, template, enableContentTypes, addOrUpdateSettings).then(function (r) {\n resolve({ created: true, data: r.data, list: _this.getByTitle(addOrUpdateSettings.Title) });\n }).catch(function (e) { return reject(e); });\n });\n });\n };\n /**\n * Gets a list that is the default asset location for images or other files, which the users upload to their wiki pages.\n */\n Lists.prototype.ensureSiteAssetsLibrary = function () {\n return this.clone(Lists, \"ensuresiteassetslibrary\").postCore().then(function (json) {\n return new List(odata_1.spExtractODataId(json));\n });\n };\n /**\n * Gets a list that is the default location for wiki pages.\n */\n Lists.prototype.ensureSitePagesLibrary = function () {\n return this.clone(Lists, \"ensuresitepageslibrary\").postCore().then(function (json) {\n return new List(odata_1.spExtractODataId(json));\n });\n };\n return Lists;\n}(sharepointqueryable_1.SharePointQueryableCollection));\nexports.Lists = Lists;\n/**\n * Describes a single List instance\n *\n */\nvar List = /** @class */ (function (_super) {\n __extends(List, _super);\n function List() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n Object.defineProperty(List.prototype, \"contentTypes\", {\n /**\n * Gets the content types in this list\n *\n */\n get: function () {\n return new contenttypes_1.ContentTypes(this);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(List.prototype, \"items\", {\n /**\n * Gets the items in this list\n *\n */\n get: function () {\n return new items_1.Items(this);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(List.prototype, \"views\", {\n /**\n * Gets the views in this list\n *\n */\n get: function () {\n return new views_1.Views(this);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(List.prototype, \"fields\", {\n /**\n * Gets the fields in this list\n *\n */\n get: function () {\n return new fields_1.Fields(this);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(List.prototype, \"forms\", {\n /**\n * Gets the forms in this list\n *\n */\n get: function () {\n return new forms_1.Forms(this);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(List.prototype, \"defaultView\", {\n /**\n * Gets the default view of this list\n *\n */\n get: function () {\n return new sharepointqueryable_1.SharePointQueryableInstance(this, \"DefaultView\");\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(List.prototype, \"userCustomActions\", {\n /**\n * Get all custom actions on a site collection\n *\n */\n get: function () {\n return new usercustomactions_1.UserCustomActions(this);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(List.prototype, \"effectiveBasePermissions\", {\n /**\n * Gets the effective base permissions of this list\n *\n */\n get: function () {\n return new sharepointqueryable_1.SharePointQueryable(this, \"EffectiveBasePermissions\");\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(List.prototype, \"eventReceivers\", {\n /**\n * Gets the event receivers attached to this list\n *\n */\n get: function () {\n return new sharepointqueryable_1.SharePointQueryableCollection(this, \"EventReceivers\");\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(List.prototype, \"relatedFields\", {\n /**\n * Gets the related fields of this list\n *\n */\n get: function () {\n return new sharepointqueryable_1.SharePointQueryable(this, \"getRelatedFields\");\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(List.prototype, \"informationRightsManagementSettings\", {\n /**\n * Gets the IRM settings for this list\n *\n */\n get: function () {\n return new sharepointqueryable_1.SharePointQueryable(this, \"InformationRightsManagementSettings\");\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(List.prototype, \"subscriptions\", {\n /**\n * Gets the webhook subscriptions of this list\n *\n */\n get: function () {\n return new subscriptions_1.Subscriptions(this);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(List.prototype, \"rootFolder\", {\n /**\n * The root folder of the list\n */\n get: function () {\n return new folders_1.Folder(this, \"rootFolder\");\n },\n enumerable: true,\n configurable: true\n });\n /**\n * Gets a view by view guid id\n *\n */\n List.prototype.getView = function (viewId) {\n return new views_1.View(this, \"getView('\" + viewId + \"')\");\n };\n /**\n * Updates this list intance with the supplied properties\n *\n * @param properties A plain object hash of values to update for the list\n * @param eTag Value used in the IF-Match header, by default \"*\"\n */\n /* tslint:disable no-string-literal */\n List.prototype.update = function (properties, eTag) {\n var _this = this;\n if (eTag === void 0) { eTag = \"*\"; }\n var postBody = JSON.stringify(util_1.Util.extend({\n \"__metadata\": { \"type\": \"SP.List\" },\n }, properties));\n return this.postCore({\n body: postBody,\n headers: {\n \"IF-Match\": eTag,\n \"X-HTTP-Method\": \"MERGE\",\n },\n }).then(function (data) {\n var retList = _this;\n if (properties.hasOwnProperty(\"Title\")) {\n retList = _this.getParent(List, _this.parentUrl, \"getByTitle('\" + properties[\"Title\"] + \"')\");\n }\n return {\n data: data,\n list: retList,\n };\n });\n };\n /* tslint:enable */\n /**\n * Delete this list\n *\n * @param eTag Value used in the IF-Match header, by default \"*\"\n */\n List.prototype.delete = function (eTag) {\n if (eTag === void 0) { eTag = \"*\"; }\n return this.postCore({\n headers: {\n \"IF-Match\": eTag,\n \"X-HTTP-Method\": \"DELETE\",\n },\n });\n };\n /**\n * Returns the collection of changes from the change log that have occurred within the list, based on the specified query.\n */\n List.prototype.getChanges = function (query) {\n return this.clone(List, \"getchanges\").postCore({\n body: JSON.stringify({ \"query\": util_1.Util.extend({ \"__metadata\": { \"type\": \"SP.ChangeQuery\" } }, query) }),\n });\n };\n /**\n * Returns a collection of items from the list based on the specified query.\n *\n * @param CamlQuery The Query schema of Collaborative Application Markup\n * Language (CAML) is used in various ways within the context of Microsoft SharePoint Foundation\n * to define queries against list data.\n * see:\n *\n * https://msdn.microsoft.com/en-us/library/office/ms467521.aspx\n *\n * @param expands A URI with a $expand System Query Option indicates that Entries associated with\n * the Entry or Collection of Entries identified by the Resource Path\n * section of the URI must be represented inline (i.e. eagerly loaded).\n * see:\n *\n * https://msdn.microsoft.com/en-us/library/office/fp142385.aspx\n *\n * http://www.odata.org/documentation/odata-version-2-0/uri-conventions/#ExpandSystemQueryOption\n */\n List.prototype.getItemsByCAMLQuery = function (query) {\n var expands = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n expands[_i - 1] = arguments[_i];\n }\n var q = this.clone(List, \"getitems\");\n return q.expand.apply(q, expands).postCore({\n body: JSON.stringify({ \"query\": util_1.Util.extend({ \"__metadata\": { \"type\": \"SP.CamlQuery\" } }, query) }),\n });\n };\n /**\n * See: https://msdn.microsoft.com/en-us/library/office/dn292554.aspx\n */\n List.prototype.getListItemChangesSinceToken = function (query) {\n return this.clone(List, \"getlistitemchangessincetoken\").postCore({\n body: JSON.stringify({ \"query\": util_1.Util.extend({ \"__metadata\": { \"type\": \"SP.ChangeLogItemQuery\" } }, query) }),\n }, { parse: function (r) { return r.text(); } });\n };\n /**\n * Moves the list to the Recycle Bin and returns the identifier of the new Recycle Bin item.\n */\n List.prototype.recycle = function () {\n return this.clone(List, \"recycle\").postCore().then(function (data) {\n if (data.hasOwnProperty(\"Recycle\")) {\n return data.Recycle;\n }\n else {\n return data;\n }\n });\n };\n /**\n * Renders list data based on the view xml provided\n */\n List.prototype.renderListData = function (viewXml) {\n var q = this.clone(List, \"renderlistdata(@viewXml)\");\n q.query.add(\"@viewXml\", \"'\" + viewXml + \"'\");\n return q.postCore().then(function (data) {\n // data will be a string, so we parse it again\n data = JSON.parse(data);\n if (data.hasOwnProperty(\"RenderListData\")) {\n return data.RenderListData;\n }\n else {\n return data;\n }\n });\n };\n /**\n * Returns the data for the specified query view\n *\n * @param parameters The parameters to be used to render list data as JSON string.\n * @param overrideParameters The parameters that are used to override and extend the regular SPRenderListDataParameters.\n */\n List.prototype.renderListDataAsStream = function (parameters, overrideParameters) {\n if (overrideParameters === void 0) { overrideParameters = null; }\n var postBody = {\n overrideParameters: util_1.Util.extend({\n \"__metadata\": { \"type\": \"SP.RenderListDataOverrideParameters\" },\n }, overrideParameters),\n parameters: util_1.Util.extend({\n \"__metadata\": { \"type\": \"SP.RenderListDataParameters\" },\n }, parameters),\n };\n return this.clone(List, \"RenderListDataAsStream\", true).postCore({\n body: JSON.stringify(postBody),\n });\n };\n /**\n * Gets the field values and field schema attributes for a list item.\n */\n List.prototype.renderListFormData = function (itemId, formId, mode) {\n return this.clone(List, \"renderlistformdata(itemid=\" + itemId + \", formid='\" + formId + \"', mode='\" + mode + \"')\").postCore().then(function (data) {\n // data will be a string, so we parse it again\n data = JSON.parse(data);\n if (data.hasOwnProperty(\"ListData\")) {\n return data.ListData;\n }\n else {\n return data;\n }\n });\n };\n /**\n * Reserves a list item ID for idempotent list item creation.\n */\n List.prototype.reserveListItemId = function () {\n return this.clone(List, \"reservelistitemid\").postCore().then(function (data) {\n if (data.hasOwnProperty(\"ReserveListItemId\")) {\n return data.ReserveListItemId;\n }\n else {\n return data;\n }\n });\n };\n /**\n * Returns the ListItemEntityTypeFullName for this list, used when adding/updating list items. Does not support batching.\n *\n */\n List.prototype.getListItemEntityTypeFullName = function () {\n return this.clone(List, null, false).select(\"ListItemEntityTypeFullName\").getAs().then(function (o) { return o.ListItemEntityTypeFullName; });\n };\n return List;\n}(sharepointqueryablesecurable_1.SharePointQueryableSecurable));\nexports.List = List;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/sharepoint/lists.js\n// module id = 15\n// module chunks = 0","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar sharepointqueryable_1 = require(\"./sharepointqueryable\");\nvar sharepointqueryableshareable_1 = require(\"./sharepointqueryableshareable\");\nvar folders_1 = require(\"./folders\");\nvar files_1 = require(\"./files\");\nvar contenttypes_1 = require(\"./contenttypes\");\nvar util_1 = require(\"../utils/util\");\nvar core_1 = require(\"../odata/core\");\nvar attachmentfiles_1 = require(\"./attachmentfiles\");\nvar lists_1 = require(\"./lists\");\n/**\n * Describes a collection of Item objects\n *\n */\nvar Items = /** @class */ (function (_super) {\n __extends(Items, _super);\n /**\n * Creates a new instance of the Items class\n *\n * @param baseUrl The url or SharePointQueryable which forms the parent of this fields collection\n */\n function Items(baseUrl, path) {\n if (path === void 0) { path = \"items\"; }\n return _super.call(this, baseUrl, path) || this;\n }\n /**\n * Gets an Item by id\n *\n * @param id The integer id of the item to retrieve\n */\n Items.prototype.getById = function (id) {\n var i = new Item(this);\n i.concat(\"(\" + id + \")\");\n return i;\n };\n /**\n * Skips the specified number of items (https://msdn.microsoft.com/en-us/library/office/fp142385.aspx#sectionSection6)\n *\n * @param skip The starting id where the page should start, use with top to specify pages\n */\n Items.prototype.skip = function (skip) {\n this._query.add(\"$skiptoken\", encodeURIComponent(\"Paged=TRUE&p_ID=\" + skip));\n return this;\n };\n /**\n * Gets a collection designed to aid in paging through data\n *\n */\n Items.prototype.getPaged = function () {\n return this.getAs(new PagedItemCollectionParser());\n };\n //\n /**\n * Adds a new item to the collection\n *\n * @param properties The new items's properties\n */\n Items.prototype.add = function (properties, listItemEntityTypeFullName) {\n var _this = this;\n if (properties === void 0) { properties = {}; }\n if (listItemEntityTypeFullName === void 0) { listItemEntityTypeFullName = null; }\n var removeDependency = this.addBatchDependency();\n return this.ensureListItemEntityTypeName(listItemEntityTypeFullName).then(function (listItemEntityType) {\n var postBody = JSON.stringify(util_1.Util.extend({\n \"__metadata\": { \"type\": listItemEntityType },\n }, properties));\n var promise = _this.clone(Items, null).postAsCore({ body: postBody }).then(function (data) {\n return {\n data: data,\n item: _this.getById(data.Id),\n };\n });\n removeDependency();\n return promise;\n });\n };\n /**\n * Ensures we have the proper list item entity type name, either from the value provided or from the list\n *\n * @param candidatelistItemEntityTypeFullName The potential type name\n */\n Items.prototype.ensureListItemEntityTypeName = function (candidatelistItemEntityTypeFullName) {\n return candidatelistItemEntityTypeFullName ?\n Promise.resolve(candidatelistItemEntityTypeFullName) :\n this.getParent(lists_1.List).getListItemEntityTypeFullName();\n };\n return Items;\n}(sharepointqueryable_1.SharePointQueryableCollection));\nexports.Items = Items;\n/**\n * Descrines a single Item instance\n *\n */\nvar Item = /** @class */ (function (_super) {\n __extends(Item, _super);\n function Item() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n Object.defineProperty(Item.prototype, \"attachmentFiles\", {\n /**\n * Gets the set of attachments for this item\n *\n */\n get: function () {\n return new attachmentfiles_1.AttachmentFiles(this);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Item.prototype, \"contentType\", {\n /**\n * Gets the content type for this item\n *\n */\n get: function () {\n return new contenttypes_1.ContentType(this, \"ContentType\");\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Item.prototype, \"effectiveBasePermissions\", {\n /**\n * Gets the effective base permissions for the item\n *\n */\n get: function () {\n return new sharepointqueryable_1.SharePointQueryable(this, \"EffectiveBasePermissions\");\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Item.prototype, \"effectiveBasePermissionsForUI\", {\n /**\n * Gets the effective base permissions for the item in a UI context\n *\n */\n get: function () {\n return new sharepointqueryable_1.SharePointQueryable(this, \"EffectiveBasePermissionsForUI\");\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Item.prototype, \"fieldValuesAsHTML\", {\n /**\n * Gets the field values for this list item in their HTML representation\n *\n */\n get: function () {\n return new sharepointqueryable_1.SharePointQueryableInstance(this, \"FieldValuesAsHTML\");\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Item.prototype, \"fieldValuesAsText\", {\n /**\n * Gets the field values for this list item in their text representation\n *\n */\n get: function () {\n return new sharepointqueryable_1.SharePointQueryableInstance(this, \"FieldValuesAsText\");\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Item.prototype, \"fieldValuesForEdit\", {\n /**\n * Gets the field values for this list item for use in editing controls\n *\n */\n get: function () {\n return new sharepointqueryable_1.SharePointQueryableInstance(this, \"FieldValuesForEdit\");\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Item.prototype, \"folder\", {\n /**\n * Gets the folder associated with this list item (if this item represents a folder)\n *\n */\n get: function () {\n return new folders_1.Folder(this, \"folder\");\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Item.prototype, \"file\", {\n /**\n * Gets the folder associated with this list item (if this item represents a folder)\n *\n */\n get: function () {\n return new files_1.File(this, \"file\");\n },\n enumerable: true,\n configurable: true\n });\n /**\n * Updates this list intance with the supplied properties\n *\n * @param properties A plain object hash of values to update for the list\n * @param eTag Value used in the IF-Match header, by default \"*\"\n */\n Item.prototype.update = function (properties, eTag, listItemEntityTypeFullName) {\n var _this = this;\n if (eTag === void 0) { eTag = \"*\"; }\n if (listItemEntityTypeFullName === void 0) { listItemEntityTypeFullName = null; }\n return new Promise(function (resolve, reject) {\n var removeDependency = _this.addBatchDependency();\n return _this.ensureListItemEntityTypeName(listItemEntityTypeFullName).then(function (listItemEntityType) {\n var postBody = JSON.stringify(util_1.Util.extend({\n \"__metadata\": { \"type\": listItemEntityType },\n }, properties));\n removeDependency();\n return _this.postCore({\n body: postBody,\n headers: {\n \"IF-Match\": eTag,\n \"X-HTTP-Method\": \"MERGE\",\n },\n }, new ItemUpdatedParser()).then(function (data) {\n resolve({\n data: data,\n item: _this,\n });\n });\n }).catch(function (e) { return reject(e); });\n });\n };\n /**\n * Delete this item\n *\n * @param eTag Value used in the IF-Match header, by default \"*\"\n */\n Item.prototype.delete = function (eTag) {\n if (eTag === void 0) { eTag = \"*\"; }\n return this.postCore({\n headers: {\n \"IF-Match\": eTag,\n \"X-HTTP-Method\": \"DELETE\",\n },\n });\n };\n /**\n * Moves the list item to the Recycle Bin and returns the identifier of the new Recycle Bin item.\n */\n Item.prototype.recycle = function () {\n return this.clone(Item, \"recycle\").postCore();\n };\n /**\n * Gets a string representation of the full URL to the WOPI frame.\n * If there is no associated WOPI application, or no associated action, an empty string is returned.\n *\n * @param action Display mode: 0: view, 1: edit, 2: mobileView, 3: interactivePreview\n */\n Item.prototype.getWopiFrameUrl = function (action) {\n if (action === void 0) { action = 0; }\n var i = this.clone(Item, \"getWOPIFrameUrl(@action)\");\n i._query.add(\"@action\", action);\n return i.postCore().then(function (data) {\n // handle verbose mode\n if (data.hasOwnProperty(\"GetWOPIFrameUrl\")) {\n return data.GetWOPIFrameUrl;\n }\n return data;\n });\n };\n /**\n * Validates and sets the values of the specified collection of fields for the list item.\n *\n * @param formValues The fields to change and their new values.\n * @param newDocumentUpdate true if the list item is a document being updated after upload; otherwise false.\n */\n Item.prototype.validateUpdateListItem = function (formValues, newDocumentUpdate) {\n if (newDocumentUpdate === void 0) { newDocumentUpdate = false; }\n return this.clone(Item, \"validateupdatelistitem\").postCore({\n body: JSON.stringify({ \"formValues\": formValues, bNewDocumentUpdate: newDocumentUpdate }),\n });\n };\n /**\n * Ensures we have the proper list item entity type name, either from the value provided or from the list\n *\n * @param candidatelistItemEntityTypeFullName The potential type name\n */\n Item.prototype.ensureListItemEntityTypeName = function (candidatelistItemEntityTypeFullName) {\n return candidatelistItemEntityTypeFullName ?\n Promise.resolve(candidatelistItemEntityTypeFullName) :\n this.getParent(lists_1.List, this.parentUrl.substr(0, this.parentUrl.lastIndexOf(\"/\"))).getListItemEntityTypeFullName();\n };\n return Item;\n}(sharepointqueryableshareable_1.SharePointQueryableShareableItem));\nexports.Item = Item;\n/**\n * Provides paging functionality for list items\n */\nvar PagedItemCollection = /** @class */ (function () {\n function PagedItemCollection(nextUrl, results) {\n this.nextUrl = nextUrl;\n this.results = results;\n }\n Object.defineProperty(PagedItemCollection.prototype, \"hasNext\", {\n /**\n * If true there are more results available in the set, otherwise there are not\n */\n get: function () {\n return typeof this.nextUrl === \"string\" && this.nextUrl.length > 0;\n },\n enumerable: true,\n configurable: true\n });\n /**\n * Gets the next set of results, or resolves to null if no results are available\n */\n PagedItemCollection.prototype.getNext = function () {\n if (this.hasNext) {\n var items = new Items(this.nextUrl, null);\n return items.getPaged();\n }\n return new Promise(function (r) { return r(null); });\n };\n return PagedItemCollection;\n}());\nexports.PagedItemCollection = PagedItemCollection;\nvar PagedItemCollectionParser = /** @class */ (function (_super) {\n __extends(PagedItemCollectionParser, _super);\n function PagedItemCollectionParser() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n PagedItemCollectionParser.prototype.parse = function (r) {\n var _this = this;\n return new Promise(function (resolve, reject) {\n if (_this.handleError(r, reject)) {\n r.json().then(function (json) {\n var nextUrl = json.hasOwnProperty(\"d\") && json.d.hasOwnProperty(\"__next\") ? json.d.__next : json[\"odata.nextLink\"];\n resolve(new PagedItemCollection(nextUrl, _this.parseODataJSON(json)));\n });\n }\n });\n };\n return PagedItemCollectionParser;\n}(core_1.ODataParserBase));\nvar ItemUpdatedParser = /** @class */ (function (_super) {\n __extends(ItemUpdatedParser, _super);\n function ItemUpdatedParser() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n ItemUpdatedParser.prototype.parse = function (r) {\n var _this = this;\n return new Promise(function (resolve, reject) {\n if (_this.handleError(r, reject)) {\n resolve({\n \"odata.etag\": r.headers.get(\"etag\"),\n });\n }\n });\n };\n return ItemUpdatedParser;\n}(core_1.ODataParserBase));\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/sharepoint/items.js\n// module id = 16\n// module chunks = 0","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar sharepointqueryable_1 = require(\"./sharepointqueryable\");\nvar siteusers_1 = require(\"./siteusers\");\nvar util_1 = require(\"../utils/util\");\n/**\n * Principal Type enum\n *\n */\nvar PrincipalType;\n(function (PrincipalType) {\n PrincipalType[PrincipalType[\"None\"] = 0] = \"None\";\n PrincipalType[PrincipalType[\"User\"] = 1] = \"User\";\n PrincipalType[PrincipalType[\"DistributionList\"] = 2] = \"DistributionList\";\n PrincipalType[PrincipalType[\"SecurityGroup\"] = 4] = \"SecurityGroup\";\n PrincipalType[PrincipalType[\"SharePointGroup\"] = 8] = \"SharePointGroup\";\n PrincipalType[PrincipalType[\"All\"] = 15] = \"All\";\n})(PrincipalType = exports.PrincipalType || (exports.PrincipalType = {}));\n/**\n * Describes a collection of site groups\n *\n */\nvar SiteGroups = /** @class */ (function (_super) {\n __extends(SiteGroups, _super);\n /**\n * Creates a new instance of the SiteGroups class\n *\n * @param baseUrl The url or SharePointQueryable which forms the parent of this group collection\n */\n function SiteGroups(baseUrl, path) {\n if (path === void 0) { path = \"sitegroups\"; }\n return _super.call(this, baseUrl, path) || this;\n }\n /**\n * Adds a new group to the site collection\n *\n * @param props The group properties object of property names and values to be set for the group\n */\n SiteGroups.prototype.add = function (properties) {\n var _this = this;\n var postBody = JSON.stringify(util_1.Util.extend({ \"__metadata\": { \"type\": \"SP.Group\" } }, properties));\n return this.postCore({ body: postBody }).then(function (data) {\n return {\n data: data,\n group: _this.getById(data.Id),\n };\n });\n };\n /**\n * Gets a group from the collection by name\n *\n * @param groupName The name of the group to retrieve\n */\n SiteGroups.prototype.getByName = function (groupName) {\n return new SiteGroup(this, \"getByName('\" + groupName + \"')\");\n };\n /**\n * Gets a group from the collection by id\n *\n * @param id The id of the group to retrieve\n */\n SiteGroups.prototype.getById = function (id) {\n var sg = new SiteGroup(this);\n sg.concat(\"(\" + id + \")\");\n return sg;\n };\n /**\n * Removes the group with the specified member id from the collection\n *\n * @param id The id of the group to remove\n */\n SiteGroups.prototype.removeById = function (id) {\n return this.clone(SiteGroups, \"removeById('\" + id + \"')\").postCore();\n };\n /**\n * Removes the cross-site group with the specified name from the collection\n *\n * @param loginName The name of the group to remove\n */\n SiteGroups.prototype.removeByLoginName = function (loginName) {\n return this.clone(SiteGroups, \"removeByLoginName('\" + loginName + \"')\").postCore();\n };\n return SiteGroups;\n}(sharepointqueryable_1.SharePointQueryableCollection));\nexports.SiteGroups = SiteGroups;\n/**\n * Describes a single group\n *\n */\nvar SiteGroup = /** @class */ (function (_super) {\n __extends(SiteGroup, _super);\n function SiteGroup() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n Object.defineProperty(SiteGroup.prototype, \"users\", {\n /**\n * Gets the users for this group\n *\n */\n get: function () {\n return new siteusers_1.SiteUsers(this, \"users\");\n },\n enumerable: true,\n configurable: true\n });\n /**\n * Updates this group instance with the supplied properties\n *\n * @param properties A GroupWriteableProperties object of property names and values to update for the group\n */\n /* tslint:disable no-string-literal */\n SiteGroup.prototype.update = function (properties) {\n var _this = this;\n var postBody = util_1.Util.extend({ \"__metadata\": { \"type\": \"SP.Group\" } }, properties);\n return this.postCore({\n body: JSON.stringify(postBody),\n headers: {\n \"X-HTTP-Method\": \"MERGE\",\n },\n }).then(function (data) {\n var retGroup = _this;\n if (properties.hasOwnProperty(\"Title\")) {\n retGroup = _this.getParent(SiteGroup, _this.parentUrl, \"getByName('\" + properties[\"Title\"] + \"')\");\n }\n return {\n data: data,\n group: retGroup,\n };\n });\n };\n return SiteGroup;\n}(sharepointqueryable_1.SharePointQueryableInstance));\nexports.SiteGroup = SiteGroup;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/sharepoint/sitegroups.js\n// module id = 17\n// module chunks = 0","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\n/**\n * Determines the display mode of the given control or view\n */\nvar ControlMode;\n(function (ControlMode) {\n ControlMode[ControlMode[\"Display\"] = 1] = \"Display\";\n ControlMode[ControlMode[\"Edit\"] = 2] = \"Edit\";\n ControlMode[ControlMode[\"New\"] = 3] = \"New\";\n})(ControlMode = exports.ControlMode || (exports.ControlMode = {}));\n/**\n * Specifies the type of the field.\n */\nvar FieldTypes;\n(function (FieldTypes) {\n FieldTypes[FieldTypes[\"Invalid\"] = 0] = \"Invalid\";\n FieldTypes[FieldTypes[\"Integer\"] = 1] = \"Integer\";\n FieldTypes[FieldTypes[\"Text\"] = 2] = \"Text\";\n FieldTypes[FieldTypes[\"Note\"] = 3] = \"Note\";\n FieldTypes[FieldTypes[\"DateTime\"] = 4] = \"DateTime\";\n FieldTypes[FieldTypes[\"Counter\"] = 5] = \"Counter\";\n FieldTypes[FieldTypes[\"Choice\"] = 6] = \"Choice\";\n FieldTypes[FieldTypes[\"Lookup\"] = 7] = \"Lookup\";\n FieldTypes[FieldTypes[\"Boolean\"] = 8] = \"Boolean\";\n FieldTypes[FieldTypes[\"Number\"] = 9] = \"Number\";\n FieldTypes[FieldTypes[\"Currency\"] = 10] = \"Currency\";\n FieldTypes[FieldTypes[\"URL\"] = 11] = \"URL\";\n FieldTypes[FieldTypes[\"Computed\"] = 12] = \"Computed\";\n FieldTypes[FieldTypes[\"Threading\"] = 13] = \"Threading\";\n FieldTypes[FieldTypes[\"Guid\"] = 14] = \"Guid\";\n FieldTypes[FieldTypes[\"MultiChoice\"] = 15] = \"MultiChoice\";\n FieldTypes[FieldTypes[\"GridChoice\"] = 16] = \"GridChoice\";\n FieldTypes[FieldTypes[\"Calculated\"] = 17] = \"Calculated\";\n FieldTypes[FieldTypes[\"File\"] = 18] = \"File\";\n FieldTypes[FieldTypes[\"Attachments\"] = 19] = \"Attachments\";\n FieldTypes[FieldTypes[\"User\"] = 20] = \"User\";\n FieldTypes[FieldTypes[\"Recurrence\"] = 21] = \"Recurrence\";\n FieldTypes[FieldTypes[\"CrossProjectLink\"] = 22] = \"CrossProjectLink\";\n FieldTypes[FieldTypes[\"ModStat\"] = 23] = \"ModStat\";\n FieldTypes[FieldTypes[\"Error\"] = 24] = \"Error\";\n FieldTypes[FieldTypes[\"ContentTypeId\"] = 25] = \"ContentTypeId\";\n FieldTypes[FieldTypes[\"PageSeparator\"] = 26] = \"PageSeparator\";\n FieldTypes[FieldTypes[\"ThreadIndex\"] = 27] = \"ThreadIndex\";\n FieldTypes[FieldTypes[\"WorkflowStatus\"] = 28] = \"WorkflowStatus\";\n FieldTypes[FieldTypes[\"AllDayEvent\"] = 29] = \"AllDayEvent\";\n FieldTypes[FieldTypes[\"WorkflowEventType\"] = 30] = \"WorkflowEventType\";\n})(FieldTypes = exports.FieldTypes || (exports.FieldTypes = {}));\nvar DateTimeFieldFormatType;\n(function (DateTimeFieldFormatType) {\n DateTimeFieldFormatType[DateTimeFieldFormatType[\"DateOnly\"] = 0] = \"DateOnly\";\n DateTimeFieldFormatType[DateTimeFieldFormatType[\"DateTime\"] = 1] = \"DateTime\";\n})(DateTimeFieldFormatType = exports.DateTimeFieldFormatType || (exports.DateTimeFieldFormatType = {}));\n/**\n * Specifies the control settings while adding a field.\n */\nvar AddFieldOptions;\n(function (AddFieldOptions) {\n /**\n * Specify that a new field added to the list must also be added to the default content type in the site collection\n */\n AddFieldOptions[AddFieldOptions[\"DefaultValue\"] = 0] = \"DefaultValue\";\n /**\n * Specify that a new field added to the list must also be added to the default content type in the site collection.\n */\n AddFieldOptions[AddFieldOptions[\"AddToDefaultContentType\"] = 1] = \"AddToDefaultContentType\";\n /**\n * Specify that a new field must not be added to any other content type\n */\n AddFieldOptions[AddFieldOptions[\"AddToNoContentType\"] = 2] = \"AddToNoContentType\";\n /**\n * Specify that a new field that is added to the specified list must also be added to all content types in the site collection\n */\n AddFieldOptions[AddFieldOptions[\"AddToAllContentTypes\"] = 4] = \"AddToAllContentTypes\";\n /**\n * Specify adding an internal field name hint for the purpose of avoiding possible database locking or field renaming operations\n */\n AddFieldOptions[AddFieldOptions[\"AddFieldInternalNameHint\"] = 8] = \"AddFieldInternalNameHint\";\n /**\n * Specify that a new field that is added to the specified list must also be added to the default list view\n */\n AddFieldOptions[AddFieldOptions[\"AddFieldToDefaultView\"] = 16] = \"AddFieldToDefaultView\";\n /**\n * Specify to confirm that no other field has the same display name\n */\n AddFieldOptions[AddFieldOptions[\"AddFieldCheckDisplayName\"] = 32] = \"AddFieldCheckDisplayName\";\n})(AddFieldOptions = exports.AddFieldOptions || (exports.AddFieldOptions = {}));\nvar CalendarType;\n(function (CalendarType) {\n CalendarType[CalendarType[\"Gregorian\"] = 1] = \"Gregorian\";\n CalendarType[CalendarType[\"Japan\"] = 3] = \"Japan\";\n CalendarType[CalendarType[\"Taiwan\"] = 4] = \"Taiwan\";\n CalendarType[CalendarType[\"Korea\"] = 5] = \"Korea\";\n CalendarType[CalendarType[\"Hijri\"] = 6] = \"Hijri\";\n CalendarType[CalendarType[\"Thai\"] = 7] = \"Thai\";\n CalendarType[CalendarType[\"Hebrew\"] = 8] = \"Hebrew\";\n CalendarType[CalendarType[\"GregorianMEFrench\"] = 9] = \"GregorianMEFrench\";\n CalendarType[CalendarType[\"GregorianArabic\"] = 10] = \"GregorianArabic\";\n CalendarType[CalendarType[\"GregorianXLITEnglish\"] = 11] = \"GregorianXLITEnglish\";\n CalendarType[CalendarType[\"GregorianXLITFrench\"] = 12] = \"GregorianXLITFrench\";\n CalendarType[CalendarType[\"KoreaJapanLunar\"] = 14] = \"KoreaJapanLunar\";\n CalendarType[CalendarType[\"ChineseLunar\"] = 15] = \"ChineseLunar\";\n CalendarType[CalendarType[\"SakaEra\"] = 16] = \"SakaEra\";\n CalendarType[CalendarType[\"UmAlQura\"] = 23] = \"UmAlQura\";\n})(CalendarType = exports.CalendarType || (exports.CalendarType = {}));\nvar UrlFieldFormatType;\n(function (UrlFieldFormatType) {\n UrlFieldFormatType[UrlFieldFormatType[\"Hyperlink\"] = 0] = \"Hyperlink\";\n UrlFieldFormatType[UrlFieldFormatType[\"Image\"] = 1] = \"Image\";\n})(UrlFieldFormatType = exports.UrlFieldFormatType || (exports.UrlFieldFormatType = {}));\nvar PermissionKind;\n(function (PermissionKind) {\n /**\n * Has no permissions on the Site. Not available through the user interface.\n */\n PermissionKind[PermissionKind[\"EmptyMask\"] = 0] = \"EmptyMask\";\n /**\n * View items in lists, documents in document libraries, and Web discussion comments.\n */\n PermissionKind[PermissionKind[\"ViewListItems\"] = 1] = \"ViewListItems\";\n /**\n * Add items to lists, documents to document libraries, and Web discussion comments.\n */\n PermissionKind[PermissionKind[\"AddListItems\"] = 2] = \"AddListItems\";\n /**\n * Edit items in lists, edit documents in document libraries, edit Web discussion comments\n * in documents, and customize Web Part Pages in document libraries.\n */\n PermissionKind[PermissionKind[\"EditListItems\"] = 3] = \"EditListItems\";\n /**\n * Delete items from a list, documents from a document library, and Web discussion\n * comments in documents.\n */\n PermissionKind[PermissionKind[\"DeleteListItems\"] = 4] = \"DeleteListItems\";\n /**\n * Approve a minor version of a list item or document.\n */\n PermissionKind[PermissionKind[\"ApproveItems\"] = 5] = \"ApproveItems\";\n /**\n * View the source of documents with server-side file handlers.\n */\n PermissionKind[PermissionKind[\"OpenItems\"] = 6] = \"OpenItems\";\n /**\n * View past versions of a list item or document.\n */\n PermissionKind[PermissionKind[\"ViewVersions\"] = 7] = \"ViewVersions\";\n /**\n * Delete past versions of a list item or document.\n */\n PermissionKind[PermissionKind[\"DeleteVersions\"] = 8] = \"DeleteVersions\";\n /**\n * Discard or check in a document which is checked out to another user.\n */\n PermissionKind[PermissionKind[\"CancelCheckout\"] = 9] = \"CancelCheckout\";\n /**\n * Create, change, and delete personal views of lists.\n */\n PermissionKind[PermissionKind[\"ManagePersonalViews\"] = 10] = \"ManagePersonalViews\";\n /**\n * Create and delete lists, add or remove columns in a list, and add or remove public views of a list.\n */\n PermissionKind[PermissionKind[\"ManageLists\"] = 12] = \"ManageLists\";\n /**\n * View forms, views, and application pages, and enumerate lists.\n */\n PermissionKind[PermissionKind[\"ViewFormPages\"] = 13] = \"ViewFormPages\";\n /**\n * Make content of a list or document library retrieveable for anonymous users through SharePoint search.\n * The list permissions in the site do not change.\n */\n PermissionKind[PermissionKind[\"AnonymousSearchAccessList\"] = 14] = \"AnonymousSearchAccessList\";\n /**\n * Allow users to open a Site, list, or folder to access items inside that container.\n */\n PermissionKind[PermissionKind[\"Open\"] = 17] = \"Open\";\n /**\n * View pages in a Site.\n */\n PermissionKind[PermissionKind[\"ViewPages\"] = 18] = \"ViewPages\";\n /**\n * Add, change, or delete HTML pages or Web Part Pages, and edit the Site using\n * a Windows SharePoint Services compatible editor.\n */\n PermissionKind[PermissionKind[\"AddAndCustomizePages\"] = 19] = \"AddAndCustomizePages\";\n /**\n * Apply a theme or borders to the entire Site.\n */\n PermissionKind[PermissionKind[\"ApplyThemeAndBorder\"] = 20] = \"ApplyThemeAndBorder\";\n /**\n * Apply a style sheet (.css file) to the Site.\n */\n PermissionKind[PermissionKind[\"ApplyStyleSheets\"] = 21] = \"ApplyStyleSheets\";\n /**\n * View reports on Site usage.\n */\n PermissionKind[PermissionKind[\"ViewUsageData\"] = 22] = \"ViewUsageData\";\n /**\n * Create a Site using Self-Service Site Creation.\n */\n PermissionKind[PermissionKind[\"CreateSSCSite\"] = 23] = \"CreateSSCSite\";\n /**\n * Create subsites such as team sites, Meeting Workspace sites, and Document Workspace sites.\n */\n PermissionKind[PermissionKind[\"ManageSubwebs\"] = 24] = \"ManageSubwebs\";\n /**\n * Create a group of users that can be used anywhere within the site collection.\n */\n PermissionKind[PermissionKind[\"CreateGroups\"] = 25] = \"CreateGroups\";\n /**\n * Create and change permission levels on the Site and assign permissions to users\n * and groups.\n */\n PermissionKind[PermissionKind[\"ManagePermissions\"] = 26] = \"ManagePermissions\";\n /**\n * Enumerate files and folders in a Site using Microsoft Office SharePoint Designer\n * and WebDAV interfaces.\n */\n PermissionKind[PermissionKind[\"BrowseDirectories\"] = 27] = \"BrowseDirectories\";\n /**\n * View information about users of the Site.\n */\n PermissionKind[PermissionKind[\"BrowseUserInfo\"] = 28] = \"BrowseUserInfo\";\n /**\n * Add or remove personal Web Parts on a Web Part Page.\n */\n PermissionKind[PermissionKind[\"AddDelPrivateWebParts\"] = 29] = \"AddDelPrivateWebParts\";\n /**\n * Update Web Parts to display personalized information.\n */\n PermissionKind[PermissionKind[\"UpdatePersonalWebParts\"] = 30] = \"UpdatePersonalWebParts\";\n /**\n * Grant the ability to perform all administration tasks for the Site as well as\n * manage content, activate, deactivate, or edit properties of Site scoped Features\n * through the object model or through the user interface (UI). When granted on the\n * root Site of a Site Collection, activate, deactivate, or edit properties of\n * site collection scoped Features through the object model. To browse to the Site\n * Collection Features page and activate or deactivate Site Collection scoped Features\n * through the UI, you must be a Site Collection administrator.\n */\n PermissionKind[PermissionKind[\"ManageWeb\"] = 31] = \"ManageWeb\";\n /**\n * Content of lists and document libraries in the Web site will be retrieveable for anonymous users through\n * SharePoint search if the list or document library has AnonymousSearchAccessList set.\n */\n PermissionKind[PermissionKind[\"AnonymousSearchAccessWebLists\"] = 32] = \"AnonymousSearchAccessWebLists\";\n /**\n * Use features that launch client applications. Otherwise, users must work on documents\n * locally and upload changes.\n */\n PermissionKind[PermissionKind[\"UseClientIntegration\"] = 37] = \"UseClientIntegration\";\n /**\n * Use SOAP, WebDAV, or Microsoft Office SharePoint Designer interfaces to access the Site.\n */\n PermissionKind[PermissionKind[\"UseRemoteAPIs\"] = 38] = \"UseRemoteAPIs\";\n /**\n * Manage alerts for all users of the Site.\n */\n PermissionKind[PermissionKind[\"ManageAlerts\"] = 39] = \"ManageAlerts\";\n /**\n * Create e-mail alerts.\n */\n PermissionKind[PermissionKind[\"CreateAlerts\"] = 40] = \"CreateAlerts\";\n /**\n * Allows a user to change his or her user information, such as adding a picture.\n */\n PermissionKind[PermissionKind[\"EditMyUserInfo\"] = 41] = \"EditMyUserInfo\";\n /**\n * Enumerate permissions on Site, list, folder, document, or list item.\n */\n PermissionKind[PermissionKind[\"EnumeratePermissions\"] = 63] = \"EnumeratePermissions\";\n /**\n * Has all permissions on the Site. Not available through the user interface.\n */\n PermissionKind[PermissionKind[\"FullMask\"] = 65] = \"FullMask\";\n})(PermissionKind = exports.PermissionKind || (exports.PermissionKind = {}));\nvar PrincipalType;\n(function (PrincipalType) {\n PrincipalType[PrincipalType[\"None\"] = 0] = \"None\";\n PrincipalType[PrincipalType[\"User\"] = 1] = \"User\";\n PrincipalType[PrincipalType[\"DistributionList\"] = 2] = \"DistributionList\";\n PrincipalType[PrincipalType[\"SecurityGroup\"] = 4] = \"SecurityGroup\";\n PrincipalType[PrincipalType[\"SharePointGroup\"] = 8] = \"SharePointGroup\";\n PrincipalType[PrincipalType[\"All\"] = 15] = \"All\";\n})(PrincipalType = exports.PrincipalType || (exports.PrincipalType = {}));\nvar PrincipalSource;\n(function (PrincipalSource) {\n PrincipalSource[PrincipalSource[\"None\"] = 0] = \"None\";\n PrincipalSource[PrincipalSource[\"UserInfoList\"] = 1] = \"UserInfoList\";\n PrincipalSource[PrincipalSource[\"Windows\"] = 2] = \"Windows\";\n PrincipalSource[PrincipalSource[\"MembershipProvider\"] = 4] = \"MembershipProvider\";\n PrincipalSource[PrincipalSource[\"RoleProvider\"] = 8] = \"RoleProvider\";\n PrincipalSource[PrincipalSource[\"All\"] = 15] = \"All\";\n})(PrincipalSource = exports.PrincipalSource || (exports.PrincipalSource = {}));\nvar RoleType;\n(function (RoleType) {\n RoleType[RoleType[\"None\"] = 0] = \"None\";\n RoleType[RoleType[\"Guest\"] = 1] = \"Guest\";\n RoleType[RoleType[\"Reader\"] = 2] = \"Reader\";\n RoleType[RoleType[\"Contributor\"] = 3] = \"Contributor\";\n RoleType[RoleType[\"WebDesigner\"] = 4] = \"WebDesigner\";\n RoleType[RoleType[\"Administrator\"] = 5] = \"Administrator\";\n})(RoleType = exports.RoleType || (exports.RoleType = {}));\nvar PageType;\n(function (PageType) {\n PageType[PageType[\"Invalid\"] = -1] = \"Invalid\";\n PageType[PageType[\"DefaultView\"] = 0] = \"DefaultView\";\n PageType[PageType[\"NormalView\"] = 1] = \"NormalView\";\n PageType[PageType[\"DialogView\"] = 2] = \"DialogView\";\n PageType[PageType[\"View\"] = 3] = \"View\";\n PageType[PageType[\"DisplayForm\"] = 4] = \"DisplayForm\";\n PageType[PageType[\"DisplayFormDialog\"] = 5] = \"DisplayFormDialog\";\n PageType[PageType[\"EditForm\"] = 6] = \"EditForm\";\n PageType[PageType[\"EditFormDialog\"] = 7] = \"EditFormDialog\";\n PageType[PageType[\"NewForm\"] = 8] = \"NewForm\";\n PageType[PageType[\"NewFormDialog\"] = 9] = \"NewFormDialog\";\n PageType[PageType[\"SolutionForm\"] = 10] = \"SolutionForm\";\n PageType[PageType[\"PAGE_MAXITEMS\"] = 11] = \"PAGE_MAXITEMS\";\n})(PageType = exports.PageType || (exports.PageType = {}));\nvar SharingLinkKind;\n(function (SharingLinkKind) {\n /**\n * Uninitialized link\n */\n SharingLinkKind[SharingLinkKind[\"Uninitialized\"] = 0] = \"Uninitialized\";\n /**\n * Direct link to the object being shared\n */\n SharingLinkKind[SharingLinkKind[\"Direct\"] = 1] = \"Direct\";\n /**\n * Organization-shareable link to the object being shared with view permissions\n */\n SharingLinkKind[SharingLinkKind[\"OrganizationView\"] = 2] = \"OrganizationView\";\n /**\n * Organization-shareable link to the object being shared with edit permissions\n */\n SharingLinkKind[SharingLinkKind[\"OrganizationEdit\"] = 3] = \"OrganizationEdit\";\n /**\n * View only anonymous link\n */\n SharingLinkKind[SharingLinkKind[\"AnonymousView\"] = 4] = \"AnonymousView\";\n /**\n * Read/Write anonymous link\n */\n SharingLinkKind[SharingLinkKind[\"AnonymousEdit\"] = 5] = \"AnonymousEdit\";\n /**\n * Flexible sharing Link where properties can change without affecting link URL\n */\n SharingLinkKind[SharingLinkKind[\"Flexible\"] = 6] = \"Flexible\";\n})(SharingLinkKind = exports.SharingLinkKind || (exports.SharingLinkKind = {}));\n/**\n * Indicates the role of the sharing link\n */\nvar SharingRole;\n(function (SharingRole) {\n SharingRole[SharingRole[\"None\"] = 0] = \"None\";\n SharingRole[SharingRole[\"View\"] = 1] = \"View\";\n SharingRole[SharingRole[\"Edit\"] = 2] = \"Edit\";\n SharingRole[SharingRole[\"Owner\"] = 3] = \"Owner\";\n})(SharingRole = exports.SharingRole || (exports.SharingRole = {}));\nvar SharingOperationStatusCode;\n(function (SharingOperationStatusCode) {\n /**\n * The share operation completed without errors.\n */\n SharingOperationStatusCode[SharingOperationStatusCode[\"CompletedSuccessfully\"] = 0] = \"CompletedSuccessfully\";\n /**\n * The share operation completed and generated requests for access.\n */\n SharingOperationStatusCode[SharingOperationStatusCode[\"AccessRequestsQueued\"] = 1] = \"AccessRequestsQueued\";\n /**\n * The share operation failed as there were no resolved users.\n */\n SharingOperationStatusCode[SharingOperationStatusCode[\"NoResolvedUsers\"] = -1] = \"NoResolvedUsers\";\n /**\n * The share operation failed due to insufficient permissions.\n */\n SharingOperationStatusCode[SharingOperationStatusCode[\"AccessDenied\"] = -2] = \"AccessDenied\";\n /**\n * The share operation failed when attempting a cross site share, which is not supported.\n */\n SharingOperationStatusCode[SharingOperationStatusCode[\"CrossSiteRequestNotSupported\"] = -3] = \"CrossSiteRequestNotSupported\";\n /**\n * The sharing operation failed due to an unknown error.\n */\n SharingOperationStatusCode[SharingOperationStatusCode[\"UnknowError\"] = -4] = \"UnknowError\";\n /**\n * The text you typed is too long. Please shorten it.\n */\n SharingOperationStatusCode[SharingOperationStatusCode[\"EmailBodyTooLong\"] = -5] = \"EmailBodyTooLong\";\n /**\n * The maximum number of unique scopes in the list has been exceeded.\n */\n SharingOperationStatusCode[SharingOperationStatusCode[\"ListUniqueScopesExceeded\"] = -6] = \"ListUniqueScopesExceeded\";\n /**\n * The share operation failed because a sharing capability is disabled in the site.\n */\n SharingOperationStatusCode[SharingOperationStatusCode[\"CapabilityDisabled\"] = -7] = \"CapabilityDisabled\";\n /**\n * The specified object for the share operation is not supported.\n */\n SharingOperationStatusCode[SharingOperationStatusCode[\"ObjectNotSupported\"] = -8] = \"ObjectNotSupported\";\n /**\n * A SharePoint group cannot contain another SharePoint group.\n */\n SharingOperationStatusCode[SharingOperationStatusCode[\"NestedGroupsNotSupported\"] = -9] = \"NestedGroupsNotSupported\";\n})(SharingOperationStatusCode = exports.SharingOperationStatusCode || (exports.SharingOperationStatusCode = {}));\nvar SPSharedObjectType;\n(function (SPSharedObjectType) {\n SPSharedObjectType[SPSharedObjectType[\"Unknown\"] = 0] = \"Unknown\";\n SPSharedObjectType[SPSharedObjectType[\"File\"] = 1] = \"File\";\n SPSharedObjectType[SPSharedObjectType[\"Folder\"] = 2] = \"Folder\";\n SPSharedObjectType[SPSharedObjectType[\"Item\"] = 3] = \"Item\";\n SPSharedObjectType[SPSharedObjectType[\"List\"] = 4] = \"List\";\n SPSharedObjectType[SPSharedObjectType[\"Web\"] = 5] = \"Web\";\n SPSharedObjectType[SPSharedObjectType[\"Max\"] = 6] = \"Max\";\n})(SPSharedObjectType = exports.SPSharedObjectType || (exports.SPSharedObjectType = {}));\nvar SharingDomainRestrictionMode;\n(function (SharingDomainRestrictionMode) {\n SharingDomainRestrictionMode[SharingDomainRestrictionMode[\"None\"] = 0] = \"None\";\n SharingDomainRestrictionMode[SharingDomainRestrictionMode[\"AllowList\"] = 1] = \"AllowList\";\n SharingDomainRestrictionMode[SharingDomainRestrictionMode[\"BlockList\"] = 2] = \"BlockList\";\n})(SharingDomainRestrictionMode = exports.SharingDomainRestrictionMode || (exports.SharingDomainRestrictionMode = {}));\nvar RenderListDataOptions;\n(function (RenderListDataOptions) {\n RenderListDataOptions[RenderListDataOptions[\"None\"] = 0] = \"None\";\n RenderListDataOptions[RenderListDataOptions[\"ContextInfo\"] = 1] = \"ContextInfo\";\n RenderListDataOptions[RenderListDataOptions[\"ListData\"] = 2] = \"ListData\";\n RenderListDataOptions[RenderListDataOptions[\"ListSchema\"] = 4] = \"ListSchema\";\n RenderListDataOptions[RenderListDataOptions[\"MenuView\"] = 8] = \"MenuView\";\n})(RenderListDataOptions = exports.RenderListDataOptions || (exports.RenderListDataOptions = {}));\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/sharepoint/types.js\n// module id = 18\n// module chunks = 0","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar sharepointqueryable_1 = require(\"./sharepointqueryable\");\nvar sharepointqueryableshareable_1 = require(\"./sharepointqueryableshareable\");\nvar files_1 = require(\"./files\");\nvar util_1 = require(\"../utils/util\");\nvar odata_1 = require(\"./odata\");\nvar items_1 = require(\"./items\");\n/**\n * Describes a collection of Folder objects\n *\n */\nvar Folders = /** @class */ (function (_super) {\n __extends(Folders, _super);\n /**\n * Creates a new instance of the Folders class\n *\n * @param baseUrl The url or SharePointQueryable which forms the parent of this fields collection\n */\n function Folders(baseUrl, path) {\n if (path === void 0) { path = \"folders\"; }\n return _super.call(this, baseUrl, path) || this;\n }\n /**\n * Gets a folder by folder name\n *\n */\n Folders.prototype.getByName = function (name) {\n var f = new Folder(this);\n f.concat(\"('\" + name + \"')\");\n return f;\n };\n /**\n * Adds a new folder to the current folder (relative) or any folder (absolute)\n *\n * @param url The relative or absolute url where the new folder will be created. Urls starting with a forward slash are absolute.\n * @returns The new Folder and the raw response.\n */\n Folders.prototype.add = function (url) {\n var _this = this;\n return this.clone(Folders, \"add('\" + url + \"')\").postCore().then(function (response) {\n return {\n data: response,\n folder: _this.getByName(url),\n };\n });\n };\n return Folders;\n}(sharepointqueryable_1.SharePointQueryableCollection));\nexports.Folders = Folders;\n/**\n * Describes a single Folder instance\n *\n */\nvar Folder = /** @class */ (function (_super) {\n __extends(Folder, _super);\n function Folder() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n Object.defineProperty(Folder.prototype, \"contentTypeOrder\", {\n /**\n * Specifies the sequence in which content types are displayed.\n *\n */\n get: function () {\n return new sharepointqueryable_1.SharePointQueryableCollection(this, \"contentTypeOrder\");\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Folder.prototype, \"files\", {\n /**\n * Gets this folder's files\n *\n */\n get: function () {\n return new files_1.Files(this);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Folder.prototype, \"folders\", {\n /**\n * Gets this folder's sub folders\n *\n */\n get: function () {\n return new Folders(this);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Folder.prototype, \"listItemAllFields\", {\n /**\n * Gets this folder's list item field values\n *\n */\n get: function () {\n return new sharepointqueryable_1.SharePointQueryableCollection(this, \"listItemAllFields\");\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Folder.prototype, \"parentFolder\", {\n /**\n * Gets the parent folder, if available\n *\n */\n get: function () {\n return new Folder(this, \"parentFolder\");\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Folder.prototype, \"properties\", {\n /**\n * Gets this folder's properties\n *\n */\n get: function () {\n return new sharepointqueryable_1.SharePointQueryableInstance(this, \"properties\");\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Folder.prototype, \"serverRelativeUrl\", {\n /**\n * Gets this folder's server relative url\n *\n */\n get: function () {\n return new sharepointqueryable_1.SharePointQueryable(this, \"serverRelativeUrl\");\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Folder.prototype, \"uniqueContentTypeOrder\", {\n /**\n * Gets a value that specifies the content type order.\n *\n */\n get: function () {\n return new sharepointqueryable_1.SharePointQueryableCollection(this, \"uniqueContentTypeOrder\");\n },\n enumerable: true,\n configurable: true\n });\n Folder.prototype.update = function (properties) {\n var _this = this;\n var postBody = JSON.stringify(util_1.Util.extend({\n \"__metadata\": { \"type\": \"SP.Folder\" },\n }, properties));\n return this.postCore({\n body: postBody,\n headers: {\n \"X-HTTP-Method\": \"MERGE\",\n },\n }).then(function (data) {\n return {\n data: data,\n folder: _this,\n };\n });\n };\n /**\n * Delete this folder\n *\n * @param eTag Value used in the IF-Match header, by default \"*\"\n */\n Folder.prototype.delete = function (eTag) {\n if (eTag === void 0) { eTag = \"*\"; }\n return this.clone(Folder, null).postCore({\n headers: {\n \"IF-Match\": eTag,\n \"X-HTTP-Method\": \"DELETE\",\n },\n });\n };\n /**\n * Moves the folder to the Recycle Bin and returns the identifier of the new Recycle Bin item.\n */\n Folder.prototype.recycle = function () {\n return this.clone(Folder, \"recycle\").postCore();\n };\n /**\n * Gets the associated list item for this folder, loading the default properties\n */\n Folder.prototype.getItem = function () {\n var selects = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n selects[_i] = arguments[_i];\n }\n var q = this.listItemAllFields;\n return q.select.apply(q, selects).get().then(function (d) {\n return util_1.Util.extend(new items_1.Item(odata_1.spGetEntityUrl(d)), d);\n });\n };\n return Folder;\n}(sharepointqueryableshareable_1.SharePointQueryableShareableFolder));\nexports.Folder = Folder;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/sharepoint/folders.js\n// module id = 19\n// module chunks = 0","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar util_1 = require(\"../utils/util\");\nvar sharepointqueryable_1 = require(\"./sharepointqueryable\");\n/**\n * Describes a collection of content types\n *\n */\nvar ContentTypes = /** @class */ (function (_super) {\n __extends(ContentTypes, _super);\n /**\n * Creates a new instance of the ContentTypes class\n *\n * @param baseUrl The url or SharePointQueryable which forms the parent of this content types collection\n */\n function ContentTypes(baseUrl, path) {\n if (path === void 0) { path = \"contenttypes\"; }\n return _super.call(this, baseUrl, path) || this;\n }\n /**\n * Gets a ContentType by content type id\n */\n ContentTypes.prototype.getById = function (id) {\n var ct = new ContentType(this);\n ct.concat(\"('\" + id + \"')\");\n return ct;\n };\n /**\n * Adds an existing contenttype to a content type collection\n *\n * @param contentTypeId in the following format, for example: 0x010102\n */\n ContentTypes.prototype.addAvailableContentType = function (contentTypeId) {\n var _this = this;\n var postBody = JSON.stringify({\n \"contentTypeId\": contentTypeId,\n });\n return this.clone(ContentTypes, \"addAvailableContentType\").postAsCore({ body: postBody }).then(function (data) {\n return {\n contentType: _this.getById(data.id),\n data: data,\n };\n });\n };\n /**\n * Adds a new content type to the collection\n *\n * @param id The desired content type id for the new content type (also determines the parent content type)\n * @param name The name of the content type\n * @param description The description of the content type\n * @param group The group in which to add the content type\n * @param additionalSettings Any additional settings to provide when creating the content type\n *\n */\n ContentTypes.prototype.add = function (id, name, description, group, additionalSettings) {\n var _this = this;\n if (description === void 0) { description = \"\"; }\n if (group === void 0) { group = \"Custom Content Types\"; }\n if (additionalSettings === void 0) { additionalSettings = {}; }\n var postBody = JSON.stringify(util_1.Util.extend({\n \"Description\": description,\n \"Group\": group,\n \"Id\": { \"StringValue\": id },\n \"Name\": name,\n \"__metadata\": { \"type\": \"SP.ContentType\" },\n }, additionalSettings));\n return this.postCore({ body: postBody }).then(function (data) {\n return { contentType: _this.getById(data.id), data: data };\n });\n };\n return ContentTypes;\n}(sharepointqueryable_1.SharePointQueryableCollection));\nexports.ContentTypes = ContentTypes;\n/**\n * Describes a single ContentType instance\n *\n */\nvar ContentType = /** @class */ (function (_super) {\n __extends(ContentType, _super);\n function ContentType() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n Object.defineProperty(ContentType.prototype, \"fieldLinks\", {\n /**\n * Gets the column (also known as field) references in the content type.\n */\n get: function () {\n return new FieldLinks(this);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(ContentType.prototype, \"fields\", {\n /**\n * Gets a value that specifies the collection of fields for the content type.\n */\n get: function () {\n return new sharepointqueryable_1.SharePointQueryableCollection(this, \"fields\");\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(ContentType.prototype, \"parent\", {\n /**\n * Gets the parent content type of the content type.\n */\n get: function () {\n return new ContentType(this, \"parent\");\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(ContentType.prototype, \"workflowAssociations\", {\n /**\n * Gets a value that specifies the collection of workflow associations for the content type.\n */\n get: function () {\n return new sharepointqueryable_1.SharePointQueryableCollection(this, \"workflowAssociations\");\n },\n enumerable: true,\n configurable: true\n });\n /**\n * Delete this content type\n */\n ContentType.prototype.delete = function () {\n return this.postCore({\n headers: {\n \"X-HTTP-Method\": \"DELETE\",\n },\n });\n };\n return ContentType;\n}(sharepointqueryable_1.SharePointQueryableInstance));\nexports.ContentType = ContentType;\n/**\n * Represents a collection of field link instances\n */\nvar FieldLinks = /** @class */ (function (_super) {\n __extends(FieldLinks, _super);\n /**\n * Creates a new instance of the ContentType class\n *\n * @param baseUrl The url or SharePointQueryable which forms the parent of this content type instance\n */\n function FieldLinks(baseUrl, path) {\n if (path === void 0) { path = \"fieldlinks\"; }\n return _super.call(this, baseUrl, path) || this;\n }\n /**\n * Gets a FieldLink by GUID id\n *\n * @param id The GUID id of the field link\n */\n FieldLinks.prototype.getById = function (id) {\n var fl = new FieldLink(this);\n fl.concat(\"(guid'\" + id + \"')\");\n return fl;\n };\n return FieldLinks;\n}(sharepointqueryable_1.SharePointQueryableCollection));\nexports.FieldLinks = FieldLinks;\n/**\n * Represents a field link instance\n */\nvar FieldLink = /** @class */ (function (_super) {\n __extends(FieldLink, _super);\n function FieldLink() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n return FieldLink;\n}(sharepointqueryable_1.SharePointQueryableInstance));\nexports.FieldLink = FieldLink;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/sharepoint/contenttypes.js\n// module id = 20\n// module chunks = 0","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar sharepointqueryable_1 = require(\"./sharepointqueryable\");\nvar util_1 = require(\"../utils/util\");\n/**\n * Describes a collection of user custom actions\n *\n */\nvar UserCustomActions = /** @class */ (function (_super) {\n __extends(UserCustomActions, _super);\n /**\n * Creates a new instance of the UserCustomActions class\n *\n * @param baseUrl The url or SharePointQueryable which forms the parent of this user custom actions collection\n */\n function UserCustomActions(baseUrl, path) {\n if (path === void 0) { path = \"usercustomactions\"; }\n return _super.call(this, baseUrl, path) || this;\n }\n /**\n * Returns the user custom action with the specified id\n *\n * @param id The GUID id of the user custom action to retrieve\n */\n UserCustomActions.prototype.getById = function (id) {\n var uca = new UserCustomAction(this);\n uca.concat(\"('\" + id + \"')\");\n return uca;\n };\n /**\n * Creates a user custom action\n *\n * @param properties The information object of property names and values which define the new user custom action\n *\n */\n UserCustomActions.prototype.add = function (properties) {\n var _this = this;\n var postBody = JSON.stringify(util_1.Util.extend({ __metadata: { \"type\": \"SP.UserCustomAction\" } }, properties));\n return this.postCore({ body: postBody }).then(function (data) {\n return {\n action: _this.getById(data.Id),\n data: data,\n };\n });\n };\n /**\n * Deletes all user custom actions in the collection\n *\n */\n UserCustomActions.prototype.clear = function () {\n return this.clone(UserCustomActions, \"clear\").postCore();\n };\n return UserCustomActions;\n}(sharepointqueryable_1.SharePointQueryableCollection));\nexports.UserCustomActions = UserCustomActions;\n/**\n * Describes a single user custom action\n *\n */\nvar UserCustomAction = /** @class */ (function (_super) {\n __extends(UserCustomAction, _super);\n function UserCustomAction() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n /**\n * Updates this user custom action with the supplied properties\n *\n * @param properties An information object of property names and values to update for this user custom action\n */\n UserCustomAction.prototype.update = function (properties) {\n var _this = this;\n var postBody = JSON.stringify(util_1.Util.extend({\n \"__metadata\": { \"type\": \"SP.UserCustomAction\" },\n }, properties));\n return this.postCore({\n body: postBody,\n headers: {\n \"X-HTTP-Method\": \"MERGE\",\n },\n }).then(function (data) {\n return {\n action: _this,\n data: data,\n };\n });\n };\n /**\n * Removes this user custom action\n *\n */\n UserCustomAction.prototype.delete = function () {\n return _super.prototype.deleteCore.call(this);\n };\n return UserCustomAction;\n}(sharepointqueryable_1.SharePointQueryableInstance));\nexports.UserCustomAction = UserCustomAction;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/sharepoint/usercustomactions.js\n// module id = 21\n// module chunks = 0","var g;\r\n\r\n// This works in non-strict mode\r\ng = (function() {\r\n\treturn this;\r\n})();\r\n\r\ntry {\r\n\t// This works if eval is allowed (see CSP)\r\n\tg = g || Function(\"return this\")() || (1,eval)(\"this\");\r\n} catch(e) {\r\n\t// This works if the window reference is available\r\n\tif(typeof window === \"object\")\r\n\t\tg = window;\r\n}\r\n\r\n// g can still be undefined, but nothing to do about it...\r\n// We return undefined, instead of nothing here, so it's\r\n// easier to handle this case. if(!global) { ...}\r\n\r\nmodule.exports = g;\r\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// (webpack)/buildin/global.js\n// module id = 22\n// module chunks = 0","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar util_1 = require(\"./util\");\nvar collections_1 = require(\"../collections/collections\");\nvar pnplibconfig_1 = require(\"../configuration/pnplibconfig\");\nvar logging_1 = require(\"./logging\");\n/**\n * A wrapper class to provide a consistent interface to browser based storage\n *\n */\nvar PnPClientStorageWrapper = /** @class */ (function () {\n /**\n * Creates a new instance of the PnPClientStorageWrapper class\n *\n * @constructor\n */\n function PnPClientStorageWrapper(store, defaultTimeoutMinutes) {\n this.store = store;\n this.defaultTimeoutMinutes = defaultTimeoutMinutes;\n this.defaultTimeoutMinutes = (defaultTimeoutMinutes === void 0) ? -1 : defaultTimeoutMinutes;\n this.enabled = this.test();\n // if the cache timeout is enabled call the handler\n // this will clear any expired items and set the timeout function\n if (pnplibconfig_1.RuntimeConfig.enableCacheExpiration) {\n logging_1.Logger.write(\"Enabling cache expiration.\", logging_1.LogLevel.Info);\n this.cacheExpirationHandler();\n }\n }\n /**\n * Get a value from storage, or null if that value does not exist\n *\n * @param key The key whose value we want to retrieve\n */\n PnPClientStorageWrapper.prototype.get = function (key) {\n if (!this.enabled) {\n return null;\n }\n var o = this.store.getItem(key);\n if (o == null) {\n return null;\n }\n var persistable = JSON.parse(o);\n if (new Date(persistable.expiration) <= new Date()) {\n logging_1.Logger.write(\"Removing item with key '\" + key + \"' from cache due to expiration.\", logging_1.LogLevel.Info);\n this.delete(key);\n return null;\n }\n else {\n return persistable.value;\n }\n };\n /**\n * Adds a value to the underlying storage\n *\n * @param key The key to use when storing the provided value\n * @param o The value to store\n * @param expire Optional, if provided the expiration of the item, otherwise the default is used\n */\n PnPClientStorageWrapper.prototype.put = function (key, o, expire) {\n if (this.enabled) {\n this.store.setItem(key, this.createPersistable(o, expire));\n }\n };\n /**\n * Deletes a value from the underlying storage\n *\n * @param key The key of the pair we want to remove from storage\n */\n PnPClientStorageWrapper.prototype.delete = function (key) {\n if (this.enabled) {\n this.store.removeItem(key);\n }\n };\n /**\n * Gets an item from the underlying storage, or adds it if it does not exist using the supplied getter function\n *\n * @param key The key to use when storing the provided value\n * @param getter A function which will upon execution provide the desired value\n * @param expire Optional, if provided the expiration of the item, otherwise the default is used\n */\n PnPClientStorageWrapper.prototype.getOrPut = function (key, getter, expire) {\n var _this = this;\n if (!this.enabled) {\n return getter();\n }\n return new Promise(function (resolve) {\n var o = _this.get(key);\n if (o == null) {\n getter().then(function (d) {\n _this.put(key, d, expire);\n resolve(d);\n });\n }\n else {\n resolve(o);\n }\n });\n };\n /**\n * Deletes any expired items placed in the store by the pnp library, leaves other items untouched\n */\n PnPClientStorageWrapper.prototype.deleteExpired = function () {\n var _this = this;\n return new Promise(function (resolve, reject) {\n if (!_this.enabled) {\n resolve();\n }\n try {\n for (var i = 0; i < _this.store.length; i++) {\n var key = _this.store.key(i);\n // test the stored item to see if we stored it\n if (/[\"|']?pnp[\"|']? ?: ?1/i.test(_this.store.getItem(key))) {\n // get those items as get will delete from cache if they are expired\n _this.get(key);\n }\n }\n resolve();\n }\n catch (e) {\n reject(e);\n }\n });\n };\n /**\n * Used to determine if the wrapped storage is available currently\n */\n PnPClientStorageWrapper.prototype.test = function () {\n var str = \"test\";\n try {\n this.store.setItem(str, str);\n this.store.removeItem(str);\n return true;\n }\n catch (e) {\n return false;\n }\n };\n /**\n * Creates the persistable to store\n */\n PnPClientStorageWrapper.prototype.createPersistable = function (o, expire) {\n if (typeof expire === \"undefined\") {\n // ensure we are by default inline with the global library setting\n var defaultTimeout = pnplibconfig_1.RuntimeConfig.defaultCachingTimeoutSeconds;\n if (this.defaultTimeoutMinutes > 0) {\n defaultTimeout = this.defaultTimeoutMinutes * 60;\n }\n expire = util_1.Util.dateAdd(new Date(), \"second\", defaultTimeout);\n }\n return JSON.stringify({ pnp: 1, expiration: expire, value: o });\n };\n /**\n * Deletes expired items added by this library in this.store and sets a timeout to call itself\n */\n PnPClientStorageWrapper.prototype.cacheExpirationHandler = function () {\n var _this = this;\n logging_1.Logger.write(\"Called cache expiration handler.\", logging_1.LogLevel.Verbose);\n this.deleteExpired().then(function (_) {\n // call ourself in the future\n setTimeout(util_1.Util.getCtxCallback(_this, _this.cacheExpirationHandler), pnplibconfig_1.RuntimeConfig.cacheExpirationIntervalMilliseconds);\n }).catch(function (e) {\n // we've got some error - so just stop the loop and report the error\n logging_1.Logger.log({\n data: e,\n level: logging_1.LogLevel.Error,\n message: \"Error deleting expired cache entries, see data for details. Timeout not reset.\",\n });\n });\n };\n return PnPClientStorageWrapper;\n}());\nexports.PnPClientStorageWrapper = PnPClientStorageWrapper;\n/**\n * A thin implementation of in-memory storage for use in nodejs\n */\nvar MemoryStorage = /** @class */ (function () {\n function MemoryStorage(_store) {\n if (_store === void 0) { _store = new collections_1.Dictionary(); }\n this._store = _store;\n }\n Object.defineProperty(MemoryStorage.prototype, \"length\", {\n get: function () {\n return this._store.count();\n },\n enumerable: true,\n configurable: true\n });\n MemoryStorage.prototype.clear = function () {\n this._store.clear();\n };\n MemoryStorage.prototype.getItem = function (key) {\n return this._store.get(key);\n };\n MemoryStorage.prototype.key = function (index) {\n return this._store.getKeys()[index];\n };\n MemoryStorage.prototype.removeItem = function (key) {\n this._store.remove(key);\n };\n MemoryStorage.prototype.setItem = function (key, data) {\n this._store.add(key, data);\n };\n return MemoryStorage;\n}());\n/**\n * A class that will establish wrappers for both local and session storage\n */\nvar PnPClientStorage = /** @class */ (function () {\n /**\n * Creates a new instance of the PnPClientStorage class\n *\n * @constructor\n */\n function PnPClientStorage(_local, _session) {\n if (_local === void 0) { _local = null; }\n if (_session === void 0) { _session = null; }\n this._local = _local;\n this._session = _session;\n }\n Object.defineProperty(PnPClientStorage.prototype, \"local\", {\n /**\n * Provides access to the local storage of the browser\n */\n get: function () {\n if (this._local === null) {\n this._local = typeof localStorage !== \"undefined\" ? new PnPClientStorageWrapper(localStorage) : new PnPClientStorageWrapper(new MemoryStorage());\n }\n return this._local;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(PnPClientStorage.prototype, \"session\", {\n /**\n * Provides access to the session storage of the browser\n */\n get: function () {\n if (this._session === null) {\n this._session = typeof sessionStorage !== \"undefined\" ? new PnPClientStorageWrapper(sessionStorage) : new PnPClientStorageWrapper(new MemoryStorage());\n }\n return this._session;\n },\n enumerable: true,\n configurable: true\n });\n return PnPClientStorage;\n}());\nexports.PnPClientStorage = PnPClientStorage;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/utils/storage.js\n// module id = 23\n// module chunks = 0","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar util_1 = require(\"../utils/util\");\nvar utils_1 = require(\"../net/utils\");\nvar parsers_1 = require(\"../odata/parsers\");\nvar pnplibconfig_1 = require(\"../configuration/pnplibconfig\");\nvar pipeline_1 = require(\"../request/pipeline\");\nvar ODataQueryable = /** @class */ (function () {\n function ODataQueryable() {\n }\n /**\n * Directly concatonates the supplied string to the current url, not normalizing \"/\" chars\n *\n * @param pathPart The string to concatonate to the url\n */\n ODataQueryable.prototype.concat = function (pathPart) {\n this._url += pathPart;\n return this;\n };\n /**\n * Appends the given string and normalizes \"/\" chars\n *\n * @param pathPart The string to append\n */\n ODataQueryable.prototype.append = function (pathPart) {\n this._url = util_1.Util.combinePaths(this._url, pathPart);\n };\n Object.defineProperty(ODataQueryable.prototype, \"parentUrl\", {\n /**\n * Gets the parent url used when creating this instance\n *\n */\n get: function () {\n return this._parentUrl;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(ODataQueryable.prototype, \"query\", {\n /**\n * Provides access to the query builder for this url\n *\n */\n get: function () {\n return this._query;\n },\n enumerable: true,\n configurable: true\n });\n /**\n * Sets custom options for current object and all derived objects accessible via chaining\n *\n * @param options custom options\n */\n ODataQueryable.prototype.configure = function (options) {\n utils_1.mergeOptions(this._options, options);\n return this;\n };\n /**\n * Enables caching for this request\n *\n * @param options Defines the options used when caching this request\n */\n ODataQueryable.prototype.usingCaching = function (options) {\n if (!pnplibconfig_1.RuntimeConfig.globalCacheDisable) {\n this._useCaching = true;\n this._cachingOptions = options;\n }\n return this;\n };\n /**\n * Gets the currentl url, made absolute based on the availability of the _spPageContextInfo object\n *\n */\n ODataQueryable.prototype.toUrl = function () {\n return this._url;\n };\n /**\n * Executes the currently built request\n *\n * @param parser Allows you to specify a parser to handle the result\n * @param getOptions The options used for this request\n */\n ODataQueryable.prototype.get = function (parser, options) {\n if (parser === void 0) { parser = new parsers_1.ODataDefaultParser(); }\n if (options === void 0) { options = {}; }\n return this.toRequestContext(\"GET\", options, parser, pipeline_1.PipelineMethods.default).then(function (context) { return pipeline_1.pipe(context); });\n };\n ODataQueryable.prototype.getAs = function (parser, options) {\n if (parser === void 0) { parser = new parsers_1.ODataDefaultParser(); }\n if (options === void 0) { options = {}; }\n return this.toRequestContext(\"GET\", options, parser, pipeline_1.PipelineMethods.default).then(function (context) { return pipeline_1.pipe(context); });\n };\n ODataQueryable.prototype.postCore = function (options, parser) {\n if (options === void 0) { options = {}; }\n if (parser === void 0) { parser = new parsers_1.ODataDefaultParser(); }\n return this.toRequestContext(\"POST\", options, parser, pipeline_1.PipelineMethods.default).then(function (context) { return pipeline_1.pipe(context); });\n };\n ODataQueryable.prototype.postAsCore = function (options, parser) {\n if (options === void 0) { options = {}; }\n if (parser === void 0) { parser = new parsers_1.ODataDefaultParser(); }\n return this.toRequestContext(\"POST\", options, parser, pipeline_1.PipelineMethods.default).then(function (context) { return pipeline_1.pipe(context); });\n };\n ODataQueryable.prototype.patchCore = function (options, parser) {\n if (options === void 0) { options = {}; }\n if (parser === void 0) { parser = new parsers_1.ODataDefaultParser(); }\n return this.toRequestContext(\"PATCH\", options, parser, pipeline_1.PipelineMethods.default).then(function (context) { return pipeline_1.pipe(context); });\n };\n ODataQueryable.prototype.deleteCore = function (options, parser) {\n if (options === void 0) { options = {}; }\n if (parser === void 0) { parser = new parsers_1.ODataDefaultParser(); }\n return this.toRequestContext(\"DELETE\", options, parser, pipeline_1.PipelineMethods.default).then(function (context) { return pipeline_1.pipe(context); });\n };\n return ODataQueryable;\n}());\nexports.ODataQueryable = ODataQueryable;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/odata/queryable.js\n// module id = 24\n// module chunks = 0","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar digestcache_1 = require(\"./digestcache\");\nvar util_1 = require(\"../utils/util\");\nvar pnplibconfig_1 = require(\"../configuration/pnplibconfig\");\nvar exceptions_1 = require(\"../utils/exceptions\");\nvar utils_1 = require(\"./utils\");\nvar HttpClient = /** @class */ (function () {\n function HttpClient() {\n this._impl = pnplibconfig_1.RuntimeConfig.spFetchClientFactory();\n this._digestCache = new digestcache_1.DigestCache(this);\n }\n HttpClient.prototype.fetch = function (url, options) {\n var _this = this;\n if (options === void 0) { options = {}; }\n var opts = util_1.Util.extend(options, { cache: \"no-cache\", credentials: \"same-origin\" }, true);\n var headers = new Headers();\n // first we add the global headers so they can be overwritten by any passed in locally to this call\n utils_1.mergeHeaders(headers, pnplibconfig_1.RuntimeConfig.spHeaders);\n // second we add the local options so we can overwrite the globals\n utils_1.mergeHeaders(headers, options.headers);\n // lastly we apply any default headers we need that may not exist\n if (!headers.has(\"Accept\")) {\n headers.append(\"Accept\", \"application/json\");\n }\n if (!headers.has(\"Content-Type\")) {\n headers.append(\"Content-Type\", \"application/json;odata=verbose;charset=utf-8\");\n }\n if (!headers.has(\"X-ClientService-ClientTag\")) {\n headers.append(\"X-ClientService-ClientTag\", \"PnPCoreJS:3.0.0\");\n }\n opts = util_1.Util.extend(opts, { headers: headers });\n if (opts.method && opts.method.toUpperCase() !== \"GET\") {\n // if we have either a request digest or an authorization header we don't need a digest\n if (!headers.has(\"X-RequestDigest\") && !headers.has(\"Authorization\")) {\n var index = url.indexOf(\"_api/\");\n if (index < 0) {\n throw new exceptions_1.APIUrlException();\n }\n var webUrl = url.substr(0, index);\n return this._digestCache.getDigest(webUrl)\n .then(function (digest) {\n headers.append(\"X-RequestDigest\", digest);\n return _this.fetchRaw(url, opts);\n });\n }\n }\n return this.fetchRaw(url, opts);\n };\n HttpClient.prototype.fetchRaw = function (url, options) {\n var _this = this;\n if (options === void 0) { options = {}; }\n // here we need to normalize the headers\n var rawHeaders = new Headers();\n utils_1.mergeHeaders(rawHeaders, options.headers);\n options = util_1.Util.extend(options, { headers: rawHeaders });\n var retry = function (ctx) {\n _this._impl.fetch(url, options).then(function (response) { return ctx.resolve(response); }).catch(function (response) {\n // Check if request was throttled - http status code 429\n // Check if request failed due to server unavailable - http status code 503\n if (response.status !== 429 && response.status !== 503) {\n ctx.reject(response);\n }\n // grab our current delay\n var delay = ctx.delay;\n // Increment our counters.\n ctx.delay *= 2;\n ctx.attempts++;\n // If we have exceeded the retry count, reject.\n if (ctx.retryCount <= ctx.attempts) {\n ctx.reject(response);\n }\n // Set our retry timeout for {delay} milliseconds.\n setTimeout(util_1.Util.getCtxCallback(_this, retry, ctx), delay);\n });\n };\n return new Promise(function (resolve, reject) {\n var retryContext = {\n attempts: 0,\n delay: 100,\n reject: reject,\n resolve: resolve,\n retryCount: 7,\n };\n retry.call(_this, retryContext);\n });\n };\n HttpClient.prototype.get = function (url, options) {\n if (options === void 0) { options = {}; }\n var opts = util_1.Util.extend(options, { method: \"GET\" });\n return this.fetch(url, opts);\n };\n HttpClient.prototype.post = function (url, options) {\n if (options === void 0) { options = {}; }\n var opts = util_1.Util.extend(options, { method: \"POST\" });\n return this.fetch(url, opts);\n };\n HttpClient.prototype.patch = function (url, options) {\n if (options === void 0) { options = {}; }\n var opts = util_1.Util.extend(options, { method: \"PATCH\" });\n return this.fetch(url, opts);\n };\n HttpClient.prototype.delete = function (url, options) {\n if (options === void 0) { options = {}; }\n var opts = util_1.Util.extend(options, { method: \"DELETE\" });\n return this.fetch(url, opts);\n };\n return HttpClient;\n}());\nexports.HttpClient = HttpClient;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/net/httpclient.js\n// module id = 25\n// module chunks = 0","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar webs_1 = require(\"./webs\");\nvar roles_1 = require(\"./roles\");\nvar types_1 = require(\"./types\");\nvar sharepointqueryable_1 = require(\"./sharepointqueryable\");\nvar SharePointQueryableSecurable = /** @class */ (function (_super) {\n __extends(SharePointQueryableSecurable, _super);\n function SharePointQueryableSecurable() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n Object.defineProperty(SharePointQueryableSecurable.prototype, \"roleAssignments\", {\n /**\n * Gets the set of role assignments for this item\n *\n */\n get: function () {\n return new roles_1.RoleAssignments(this);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(SharePointQueryableSecurable.prototype, \"firstUniqueAncestorSecurableObject\", {\n /**\n * Gets the closest securable up the security hierarchy whose permissions are applied to this list item\n *\n */\n get: function () {\n return new sharepointqueryable_1.SharePointQueryableInstance(this, \"FirstUniqueAncestorSecurableObject\");\n },\n enumerable: true,\n configurable: true\n });\n /**\n * Gets the effective permissions for the user supplied\n *\n * @param loginName The claims username for the user (ex: i:0#.f|membership|user@domain.com)\n */\n SharePointQueryableSecurable.prototype.getUserEffectivePermissions = function (loginName) {\n var q = this.clone(sharepointqueryable_1.SharePointQueryable, \"getUserEffectivePermissions(@user)\");\n q.query.add(\"@user\", \"'\" + encodeURIComponent(loginName) + \"'\");\n return q.get().then(function (r) {\n // handle verbose mode\n return r.hasOwnProperty(\"GetUserEffectivePermissions\") ? r.GetUserEffectivePermissions : r;\n });\n };\n /**\n * Gets the effective permissions for the current user\n */\n SharePointQueryableSecurable.prototype.getCurrentUserEffectivePermissions = function () {\n var _this = this;\n var w = webs_1.Web.fromUrl(this.toUrl());\n return w.currentUser.select(\"LoginName\").getAs().then(function (user) {\n return _this.getUserEffectivePermissions(user.LoginName);\n });\n };\n /**\n * Breaks the security inheritance at this level optinally copying permissions and clearing subscopes\n *\n * @param copyRoleAssignments If true the permissions are copied from the current parent scope\n * @param clearSubscopes Optional. true to make all child securable objects inherit role assignments from the current object\n */\n SharePointQueryableSecurable.prototype.breakRoleInheritance = function (copyRoleAssignments, clearSubscopes) {\n if (copyRoleAssignments === void 0) { copyRoleAssignments = false; }\n if (clearSubscopes === void 0) { clearSubscopes = false; }\n return this.clone(SharePointQueryableSecurable, \"breakroleinheritance(copyroleassignments=\" + copyRoleAssignments + \", clearsubscopes=\" + clearSubscopes + \")\").postCore();\n };\n /**\n * Removes the local role assignments so that it re-inherit role assignments from the parent object.\n *\n */\n SharePointQueryableSecurable.prototype.resetRoleInheritance = function () {\n return this.clone(SharePointQueryableSecurable, \"resetroleinheritance\").postCore();\n };\n /**\n * Determines if a given user has the appropriate permissions\n *\n * @param loginName The user to check\n * @param permission The permission being checked\n */\n SharePointQueryableSecurable.prototype.userHasPermissions = function (loginName, permission) {\n var _this = this;\n return this.getUserEffectivePermissions(loginName).then(function (perms) {\n return _this.hasPermissions(perms, permission);\n });\n };\n /**\n * Determines if the current user has the requested permissions\n *\n * @param permission The permission we wish to check\n */\n SharePointQueryableSecurable.prototype.currentUserHasPermissions = function (permission) {\n var _this = this;\n return this.getCurrentUserEffectivePermissions().then(function (perms) {\n return _this.hasPermissions(perms, permission);\n });\n };\n /**\n * Taken from sp.js, checks the supplied permissions against the mask\n *\n * @param value The security principal's permissions on the given object\n * @param perm The permission checked against the value\n */\n /* tslint:disable:no-bitwise */\n SharePointQueryableSecurable.prototype.hasPermissions = function (value, perm) {\n if (!perm) {\n return true;\n }\n if (perm === types_1.PermissionKind.FullMask) {\n return (value.High & 32767) === 32767 && value.Low === 65535;\n }\n perm = perm - 1;\n var num = 1;\n if (perm >= 0 && perm < 32) {\n num = num << perm;\n return 0 !== (value.Low & num);\n }\n else if (perm >= 32 && perm < 64) {\n num = num << perm - 32;\n return 0 !== (value.High & num);\n }\n return false;\n };\n return SharePointQueryableSecurable;\n}(sharepointqueryable_1.SharePointQueryableInstance));\nexports.SharePointQueryableSecurable = SharePointQueryableSecurable;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/sharepoint/sharepointqueryablesecurable.js\n// module id = 26\n// module chunks = 0","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar sharepointqueryable_1 = require(\"./sharepointqueryable\");\nvar sitegroups_1 = require(\"./sitegroups\");\nvar util_1 = require(\"../utils/util\");\n/**\n * Describes a set of role assignments for the current scope\n *\n */\nvar RoleAssignments = /** @class */ (function (_super) {\n __extends(RoleAssignments, _super);\n /**\n * Creates a new instance of the RoleAssignments class\n *\n * @param baseUrl The url or SharePointQueryable which forms the parent of this role assignments collection\n */\n function RoleAssignments(baseUrl, path) {\n if (path === void 0) { path = \"roleassignments\"; }\n return _super.call(this, baseUrl, path) || this;\n }\n /**\n * Adds a new role assignment with the specified principal and role definitions to the collection\n *\n * @param principalId The id of the user or group to assign permissions to\n * @param roleDefId The id of the role definition that defines the permissions to assign\n *\n */\n RoleAssignments.prototype.add = function (principalId, roleDefId) {\n return this.clone(RoleAssignments, \"addroleassignment(principalid=\" + principalId + \", roledefid=\" + roleDefId + \")\").postCore();\n };\n /**\n * Removes the role assignment with the specified principal and role definition from the collection\n *\n * @param principalId The id of the user or group in the role assignment\n * @param roleDefId The id of the role definition in the role assignment\n *\n */\n RoleAssignments.prototype.remove = function (principalId, roleDefId) {\n return this.clone(RoleAssignments, \"removeroleassignment(principalid=\" + principalId + \", roledefid=\" + roleDefId + \")\").postCore();\n };\n /**\n * Gets the role assignment associated with the specified principal id from the collection.\n *\n * @param id The id of the role assignment\n */\n RoleAssignments.prototype.getById = function (id) {\n var ra = new RoleAssignment(this);\n ra.concat(\"(\" + id + \")\");\n return ra;\n };\n return RoleAssignments;\n}(sharepointqueryable_1.SharePointQueryableCollection));\nexports.RoleAssignments = RoleAssignments;\n/**\n * Describes a role assignment\n *\n */\nvar RoleAssignment = /** @class */ (function (_super) {\n __extends(RoleAssignment, _super);\n function RoleAssignment() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n Object.defineProperty(RoleAssignment.prototype, \"groups\", {\n /**\n * Gets the groups that directly belong to the access control list (ACL) for this securable object\n *\n */\n get: function () {\n return new sitegroups_1.SiteGroups(this, \"groups\");\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(RoleAssignment.prototype, \"bindings\", {\n /**\n * Gets the role definition bindings for this role assignment\n *\n */\n get: function () {\n return new RoleDefinitionBindings(this);\n },\n enumerable: true,\n configurable: true\n });\n /**\n * Deletes this role assignment\n *\n */\n RoleAssignment.prototype.delete = function () {\n return this.postCore({\n headers: {\n \"X-HTTP-Method\": \"DELETE\",\n },\n });\n };\n return RoleAssignment;\n}(sharepointqueryable_1.SharePointQueryableInstance));\nexports.RoleAssignment = RoleAssignment;\n/**\n * Describes a collection of role definitions\n *\n */\nvar RoleDefinitions = /** @class */ (function (_super) {\n __extends(RoleDefinitions, _super);\n /**\n * Creates a new instance of the RoleDefinitions class\n *\n * @param baseUrl The url or SharePointQueryable which forms the parent of this role definitions collection\n *\n */\n function RoleDefinitions(baseUrl, path) {\n if (path === void 0) { path = \"roledefinitions\"; }\n return _super.call(this, baseUrl, path) || this;\n }\n /**\n * Gets the role definition with the specified id from the collection\n *\n * @param id The id of the role definition\n *\n */\n RoleDefinitions.prototype.getById = function (id) {\n return new RoleDefinition(this, \"getById(\" + id + \")\");\n };\n /**\n * Gets the role definition with the specified name\n *\n * @param name The name of the role definition\n *\n */\n RoleDefinitions.prototype.getByName = function (name) {\n return new RoleDefinition(this, \"getbyname('\" + name + \"')\");\n };\n /**\n * Gets the role definition with the specified role type\n *\n * @param roleTypeKind The roletypekind of the role definition (None=0, Guest=1, Reader=2, Contributor=3, WebDesigner=4, Administrator=5, Editor=6, System=7)\n *\n */\n RoleDefinitions.prototype.getByType = function (roleTypeKind) {\n return new RoleDefinition(this, \"getbytype(\" + roleTypeKind + \")\");\n };\n /**\n * Creates a role definition\n *\n * @param name The new role definition's name\n * @param description The new role definition's description\n * @param order The order in which the role definition appears\n * @param basePermissions The permissions mask for this role definition\n *\n */\n RoleDefinitions.prototype.add = function (name, description, order, basePermissions) {\n var _this = this;\n var postBody = JSON.stringify({\n BasePermissions: util_1.Util.extend({ __metadata: { type: \"SP.BasePermissions\" } }, basePermissions),\n Description: description,\n Name: name,\n Order: order,\n __metadata: { \"type\": \"SP.RoleDefinition\" },\n });\n return this.postCore({ body: postBody }).then(function (data) {\n return {\n data: data,\n definition: _this.getById(data.Id),\n };\n });\n };\n return RoleDefinitions;\n}(sharepointqueryable_1.SharePointQueryableCollection));\nexports.RoleDefinitions = RoleDefinitions;\n/**\n * Describes a role definition\n *\n */\nvar RoleDefinition = /** @class */ (function (_super) {\n __extends(RoleDefinition, _super);\n function RoleDefinition() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n /**\n * Updates this role definition with the supplied properties\n *\n * @param properties A plain object hash of values to update for the role definition\n */\n /* tslint:disable no-string-literal */\n RoleDefinition.prototype.update = function (properties) {\n var _this = this;\n if (typeof properties.hasOwnProperty(\"BasePermissions\") !== \"undefined\") {\n properties[\"BasePermissions\"] = util_1.Util.extend({ __metadata: { type: \"SP.BasePermissions\" } }, properties[\"BasePermissions\"]);\n }\n var postBody = JSON.stringify(util_1.Util.extend({\n \"__metadata\": { \"type\": \"SP.RoleDefinition\" },\n }, properties));\n return this.postCore({\n body: postBody,\n headers: {\n \"X-HTTP-Method\": \"MERGE\",\n },\n }).then(function (data) {\n var retDef = _this;\n if (properties.hasOwnProperty(\"Name\")) {\n var parent_1 = _this.getParent(RoleDefinitions, _this.parentUrl, \"\");\n retDef = parent_1.getByName(properties[\"Name\"]);\n }\n return {\n data: data,\n definition: retDef,\n };\n });\n };\n /* tslint:enable */\n /**\n * Deletes this role definition\n *\n */\n RoleDefinition.prototype.delete = function () {\n return this.postCore({\n headers: {\n \"X-HTTP-Method\": \"DELETE\",\n },\n });\n };\n return RoleDefinition;\n}(sharepointqueryable_1.SharePointQueryableInstance));\nexports.RoleDefinition = RoleDefinition;\n/**\n * Describes the role definitons bound to a role assignment object\n *\n */\nvar RoleDefinitionBindings = /** @class */ (function (_super) {\n __extends(RoleDefinitionBindings, _super);\n /**\n * Creates a new instance of the RoleDefinitionBindings class\n *\n * @param baseUrl The url or SharePointQueryable which forms the parent of this role definition bindings collection\n */\n function RoleDefinitionBindings(baseUrl, path) {\n if (path === void 0) { path = \"roledefinitionbindings\"; }\n return _super.call(this, baseUrl, path) || this;\n }\n return RoleDefinitionBindings;\n}(sharepointqueryable_1.SharePointQueryableCollection));\nexports.RoleDefinitionBindings = RoleDefinitionBindings;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/sharepoint/roles.js\n// module id = 27\n// module chunks = 0","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar sharepointqueryable_1 = require(\"./sharepointqueryable\");\nvar sitegroups_1 = require(\"./sitegroups\");\nvar util_1 = require(\"../utils/util\");\n/**\n * Describes a collection of all site collection users\n *\n */\nvar SiteUsers = /** @class */ (function (_super) {\n __extends(SiteUsers, _super);\n /**\n * Creates a new instance of the SiteUsers class\n *\n * @param baseUrl The url or SharePointQueryable which forms the parent of this user collection\n */\n function SiteUsers(baseUrl, path) {\n if (path === void 0) { path = \"siteusers\"; }\n return _super.call(this, baseUrl, path) || this;\n }\n /**\n * Gets a user from the collection by email\n *\n * @param email The email address of the user to retrieve\n */\n SiteUsers.prototype.getByEmail = function (email) {\n return new SiteUser(this, \"getByEmail('\" + email + \"')\");\n };\n /**\n * Gets a user from the collection by id\n *\n * @param id The id of the user to retrieve\n */\n SiteUsers.prototype.getById = function (id) {\n return new SiteUser(this, \"getById(\" + id + \")\");\n };\n /**\n * Gets a user from the collection by login name\n *\n * @param loginName The login name of the user to retrieve\n */\n SiteUsers.prototype.getByLoginName = function (loginName) {\n var su = new SiteUser(this);\n su.concat(\"('!@v::\" + encodeURIComponent(loginName) + \"')\");\n return su;\n };\n /**\n * Removes a user from the collection by id\n *\n * @param id The id of the user to remove\n */\n SiteUsers.prototype.removeById = function (id) {\n return this.clone(SiteUsers, \"removeById(\" + id + \")\").postCore();\n };\n /**\n * Removes a user from the collection by login name\n *\n * @param loginName The login name of the user to remove\n */\n SiteUsers.prototype.removeByLoginName = function (loginName) {\n var o = this.clone(SiteUsers, \"removeByLoginName(@v)\");\n o.query.add(\"@v\", \"'\" + encodeURIComponent(loginName) + \"'\");\n return o.postCore();\n };\n /**\n * Adds a user to a group\n *\n * @param loginName The login name of the user to add to the group\n *\n */\n SiteUsers.prototype.add = function (loginName) {\n var _this = this;\n return this.clone(SiteUsers, null).postCore({\n body: JSON.stringify({ \"__metadata\": { \"type\": \"SP.User\" }, LoginName: loginName }),\n }).then(function () { return _this.getByLoginName(loginName); });\n };\n return SiteUsers;\n}(sharepointqueryable_1.SharePointQueryableCollection));\nexports.SiteUsers = SiteUsers;\n/**\n * Describes a single user\n *\n */\nvar SiteUser = /** @class */ (function (_super) {\n __extends(SiteUser, _super);\n function SiteUser() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n Object.defineProperty(SiteUser.prototype, \"groups\", {\n /**\n * Gets the groups for this user\n *\n */\n get: function () {\n return new sitegroups_1.SiteGroups(this, \"groups\");\n },\n enumerable: true,\n configurable: true\n });\n /**\n * Updates this user instance with the supplied properties\n *\n * @param properties A plain object of property names and values to update for the user\n */\n SiteUser.prototype.update = function (properties) {\n var _this = this;\n var postBody = util_1.Util.extend({ \"__metadata\": { \"type\": \"SP.User\" } }, properties);\n return this.postCore({\n body: JSON.stringify(postBody),\n headers: {\n \"X-HTTP-Method\": \"MERGE\",\n },\n }).then(function (data) {\n return {\n data: data,\n user: _this,\n };\n });\n };\n /**\n * Delete this user\n *\n */\n SiteUser.prototype.delete = function () {\n return this.postCore({\n headers: {\n \"X-HTTP-Method\": \"DELETE\",\n },\n });\n };\n return SiteUser;\n}(sharepointqueryable_1.SharePointQueryableInstance));\nexports.SiteUser = SiteUser;\n/**\n * Represents the current user\n */\nvar CurrentUser = /** @class */ (function (_super) {\n __extends(CurrentUser, _super);\n function CurrentUser(baseUrl, path) {\n if (path === void 0) { path = \"currentuser\"; }\n return _super.call(this, baseUrl, path) || this;\n }\n return CurrentUser;\n}(sharepointqueryable_1.SharePointQueryableInstance));\nexports.CurrentUser = CurrentUser;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/sharepoint/siteusers.js\n// module id = 28\n// module chunks = 0","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar sharepointqueryable_1 = require(\"./sharepointqueryable\");\nvar util_1 = require(\"../utils/util\");\nvar types_1 = require(\"./types\");\n/**\n * Describes a collection of Field objects\n *\n */\nvar Fields = /** @class */ (function (_super) {\n __extends(Fields, _super);\n /**\n * Creates a new instance of the Fields class\n *\n * @param baseUrl The url or SharePointQueryable which forms the parent of this fields collection\n */\n function Fields(baseUrl, path) {\n if (path === void 0) { path = \"fields\"; }\n return _super.call(this, baseUrl, path) || this;\n }\n /**\n * Gets a field from the collection by title\n *\n * @param title The case-sensitive title of the field\n */\n Fields.prototype.getByTitle = function (title) {\n return new Field(this, \"getByTitle('\" + title + \"')\");\n };\n /**\n * Gets a field from the collection by using internal name or title\n *\n * @param name The case-sensitive internal name or title of the field\n */\n Fields.prototype.getByInternalNameOrTitle = function (name) {\n return new Field(this, \"getByInternalNameOrTitle('\" + name + \"')\");\n };\n /**\n * Gets a list from the collection by guid id\n *\n * @param title The Id of the list\n */\n Fields.prototype.getById = function (id) {\n var f = new Field(this);\n f.concat(\"('\" + id + \"')\");\n return f;\n };\n /**\n * Creates a field based on the specified schema\n */\n Fields.prototype.createFieldAsXml = function (xml) {\n var _this = this;\n var info;\n if (typeof xml === \"string\") {\n info = { SchemaXml: xml };\n }\n else {\n info = xml;\n }\n var postBody = JSON.stringify({\n \"parameters\": util_1.Util.extend({\n \"__metadata\": {\n \"type\": \"SP.XmlSchemaFieldCreationInformation\",\n },\n }, info),\n });\n return this.clone(Fields, \"createfieldasxml\").postAsCore({ body: postBody }).then(function (data) {\n return {\n data: data,\n field: _this.getById(data.Id),\n };\n });\n };\n /**\n * Adds a new list to the collection\n *\n * @param title The new field's title\n * @param fieldType The new field's type (ex: SP.FieldText)\n * @param properties Differ by type of field being created (see: https://msdn.microsoft.com/en-us/library/office/dn600182.aspx)\n */\n Fields.prototype.add = function (title, fieldType, properties) {\n var _this = this;\n if (properties === void 0) { properties = {}; }\n var postBody = JSON.stringify(util_1.Util.extend({\n \"Title\": title,\n \"__metadata\": { \"type\": fieldType },\n }, properties));\n return this.clone(Fields, null).postAsCore({ body: postBody }).then(function (data) {\n return {\n data: data,\n field: _this.getById(data.Id),\n };\n });\n };\n /**\n * Adds a new SP.FieldText to the collection\n *\n * @param title The field title\n * @param maxLength The maximum number of characters allowed in the value of the field.\n * @param properties Differ by type of field being created (see: https://msdn.microsoft.com/en-us/library/office/dn600182.aspx)\n */\n Fields.prototype.addText = function (title, maxLength, properties) {\n if (maxLength === void 0) { maxLength = 255; }\n var props = {\n FieldTypeKind: 2,\n MaxLength: maxLength,\n };\n return this.add(title, \"SP.FieldText\", util_1.Util.extend(props, properties));\n };\n /**\n * Adds a new SP.FieldCalculated to the collection\n *\n * @param title The field title.\n * @param formula The formula for the field.\n * @param dateFormat The date and time format that is displayed in the field.\n * @param outputType Specifies the output format for the field. Represents a FieldType value.\n * @param properties Differ by type of field being created (see: https://msdn.microsoft.com/en-us/library/office/dn600182.aspx)\n */\n Fields.prototype.addCalculated = function (title, formula, dateFormat, outputType, properties) {\n if (outputType === void 0) { outputType = types_1.FieldTypes.Text; }\n var props = {\n DateFormat: dateFormat,\n FieldTypeKind: 17,\n Formula: formula,\n OutputType: outputType,\n };\n return this.add(title, \"SP.FieldCalculated\", util_1.Util.extend(props, properties));\n };\n /**\n * Adds a new SP.FieldDateTime to the collection\n *\n * @param title The field title\n * @param displayFormat The format of the date and time that is displayed in the field.\n * @param calendarType Specifies the calendar type of the field.\n * @param properties Differ by type of field being created (see: https://msdn.microsoft.com/en-us/library/office/dn600182.aspx)\n */\n Fields.prototype.addDateTime = function (title, displayFormat, calendarType, friendlyDisplayFormat, properties) {\n if (displayFormat === void 0) { displayFormat = types_1.DateTimeFieldFormatType.DateOnly; }\n if (calendarType === void 0) { calendarType = types_1.CalendarType.Gregorian; }\n if (friendlyDisplayFormat === void 0) { friendlyDisplayFormat = 0; }\n var props = {\n DateTimeCalendarType: calendarType,\n DisplayFormat: displayFormat,\n FieldTypeKind: 4,\n FriendlyDisplayFormat: friendlyDisplayFormat,\n };\n return this.add(title, \"SP.FieldDateTime\", util_1.Util.extend(props, properties));\n };\n /**\n * Adds a new SP.FieldNumber to the collection\n *\n * @param title The field title\n * @param minValue The field's minimum value\n * @param maxValue The field's maximum value\n * @param properties Differ by type of field being created (see: https://msdn.microsoft.com/en-us/library/office/dn600182.aspx)\n */\n Fields.prototype.addNumber = function (title, minValue, maxValue, properties) {\n var props = { FieldTypeKind: 9 };\n if (typeof minValue !== \"undefined\") {\n props = util_1.Util.extend({ MinimumValue: minValue }, props);\n }\n if (typeof maxValue !== \"undefined\") {\n props = util_1.Util.extend({ MaximumValue: maxValue }, props);\n }\n return this.add(title, \"SP.FieldNumber\", util_1.Util.extend(props, properties));\n };\n /**\n * Adds a new SP.FieldCurrency to the collection\n *\n * @param title The field title\n * @param minValue The field's minimum value\n * @param maxValue The field's maximum value\n * @param currencyLocalId Specifies the language code identifier (LCID) used to format the value of the field\n * @param properties Differ by type of field being created (see: https://msdn.microsoft.com/en-us/library/office/dn600182.aspx)\n */\n Fields.prototype.addCurrency = function (title, minValue, maxValue, currencyLocalId, properties) {\n if (currencyLocalId === void 0) { currencyLocalId = 1033; }\n var props = {\n CurrencyLocaleId: currencyLocalId,\n FieldTypeKind: 10,\n };\n if (typeof minValue !== \"undefined\") {\n props = util_1.Util.extend({ MinimumValue: minValue }, props);\n }\n if (typeof maxValue !== \"undefined\") {\n props = util_1.Util.extend({ MaximumValue: maxValue }, props);\n }\n return this.add(title, \"SP.FieldCurrency\", util_1.Util.extend(props, properties));\n };\n /**\n * Adds a new SP.FieldMultiLineText to the collection\n *\n * @param title The field title\n * @param numberOfLines Specifies the number of lines of text to display for the field.\n * @param richText Specifies whether the field supports rich formatting.\n * @param restrictedMode Specifies whether the field supports a subset of rich formatting.\n * @param appendOnly Specifies whether all changes to the value of the field are displayed in list forms.\n * @param allowHyperlink Specifies whether a hyperlink is allowed as a value of the field.\n * @param properties Differ by type of field being created (see: https://msdn.microsoft.com/en-us/library/office/dn600182.aspx)\n *\n */\n Fields.prototype.addMultilineText = function (title, numberOfLines, richText, restrictedMode, appendOnly, allowHyperlink, properties) {\n if (numberOfLines === void 0) { numberOfLines = 6; }\n if (richText === void 0) { richText = true; }\n if (restrictedMode === void 0) { restrictedMode = false; }\n if (appendOnly === void 0) { appendOnly = false; }\n if (allowHyperlink === void 0) { allowHyperlink = true; }\n var props = {\n AllowHyperlink: allowHyperlink,\n AppendOnly: appendOnly,\n FieldTypeKind: 3,\n NumberOfLines: numberOfLines,\n RestrictedMode: restrictedMode,\n RichText: richText,\n };\n return this.add(title, \"SP.FieldMultiLineText\", util_1.Util.extend(props, properties));\n };\n /**\n * Adds a new SP.FieldUrl to the collection\n *\n * @param title The field title\n */\n Fields.prototype.addUrl = function (title, displayFormat, properties) {\n if (displayFormat === void 0) { displayFormat = types_1.UrlFieldFormatType.Hyperlink; }\n var props = {\n DisplayFormat: displayFormat,\n FieldTypeKind: 11,\n };\n return this.add(title, \"SP.FieldUrl\", util_1.Util.extend(props, properties));\n };\n return Fields;\n}(sharepointqueryable_1.SharePointQueryableCollection));\nexports.Fields = Fields;\n/**\n * Describes a single of Field instance\n *\n */\nvar Field = /** @class */ (function (_super) {\n __extends(Field, _super);\n function Field() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n /**\n * Updates this field intance with the supplied properties\n *\n * @param properties A plain object hash of values to update for the list\n * @param fieldType The type value, required to update child field type properties\n */\n Field.prototype.update = function (properties, fieldType) {\n var _this = this;\n if (fieldType === void 0) { fieldType = \"SP.Field\"; }\n var postBody = JSON.stringify(util_1.Util.extend({\n \"__metadata\": { \"type\": fieldType },\n }, properties));\n return this.postCore({\n body: postBody,\n headers: {\n \"X-HTTP-Method\": \"MERGE\",\n },\n }).then(function (data) {\n return {\n data: data,\n field: _this,\n };\n });\n };\n /**\n * Delete this fields\n *\n */\n Field.prototype.delete = function () {\n return this.postCore({\n headers: {\n \"X-HTTP-Method\": \"DELETE\",\n },\n });\n };\n /**\n * Sets the value of the ShowInDisplayForm property for this field.\n */\n Field.prototype.setShowInDisplayForm = function (show) {\n return this.clone(Field, \"setshowindisplayform(\" + show + \")\").postCore();\n };\n /**\n * Sets the value of the ShowInEditForm property for this field.\n */\n Field.prototype.setShowInEditForm = function (show) {\n return this.clone(Field, \"setshowineditform(\" + show + \")\").postCore();\n };\n /**\n * Sets the value of the ShowInNewForm property for this field.\n */\n Field.prototype.setShowInNewForm = function (show) {\n return this.clone(Field, \"setshowinnewform(\" + show + \")\").postCore();\n };\n return Field;\n}(sharepointqueryable_1.SharePointQueryableInstance));\nexports.Field = Field;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/sharepoint/fields.js\n// module id = 29\n// module chunks = 0","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar util_1 = require(\"../utils/util\");\nvar logging_1 = require(\"../utils/logging\");\nvar httpclient_1 = require(\"../net/httpclient\");\nvar utils_1 = require(\"../net/utils\");\nvar pnplibconfig_1 = require(\"../configuration/pnplibconfig\");\nvar exceptions_1 = require(\"../utils/exceptions\");\n/**\n * Manages a batch of OData operations\n */\nvar ODataBatch = /** @class */ (function () {\n function ODataBatch(baseUrl, _batchId) {\n if (_batchId === void 0) { _batchId = util_1.Util.getGUID(); }\n this.baseUrl = baseUrl;\n this._batchId = _batchId;\n this._requests = [];\n this._dependencies = [];\n }\n Object.defineProperty(ODataBatch.prototype, \"batchId\", {\n get: function () {\n return this._batchId;\n },\n enumerable: true,\n configurable: true\n });\n /**\n * Adds a request to a batch (not designed for public use)\n *\n * @param url The full url of the request\n * @param method The http method GET, POST, etc\n * @param options Any options to include in the request\n * @param parser The parser that will hadle the results of the request\n */\n ODataBatch.prototype.add = function (url, method, options, parser) {\n var info = {\n method: method.toUpperCase(),\n options: options,\n parser: parser,\n reject: null,\n resolve: null,\n url: url,\n };\n var p = new Promise(function (resolve, reject) {\n info.resolve = resolve;\n info.reject = reject;\n });\n this._requests.push(info);\n return p;\n };\n /**\n * Adds a dependency insuring that some set of actions will occur before a batch is processed.\n * MUST be cleared using the returned resolve delegate to allow batches to run\n */\n ODataBatch.prototype.addDependency = function () {\n var resolver;\n var promise = new Promise(function (resolve) {\n resolver = resolve;\n });\n this._dependencies.push(promise);\n return resolver;\n };\n /**\n * Execute the current batch and resolve the associated promises\n *\n * @returns A promise which will be resolved once all of the batch's child promises have resolved\n */\n ODataBatch.prototype.execute = function () {\n var _this = this;\n // we need to check the dependencies twice due to how different engines handle things.\n // We can get a second set of promises added after the first set resolve\n return Promise.all(this._dependencies).then(function () { return Promise.all(_this._dependencies); }).then(function () { return _this.executeImpl(); });\n };\n ODataBatch.prototype.executeImpl = function () {\n var _this = this;\n logging_1.Logger.write(\"[\" + this.batchId + \"] (\" + (new Date()).getTime() + \") Executing batch with \" + this._requests.length + \" requests.\", logging_1.LogLevel.Info);\n // if we don't have any requests, don't bother sending anything\n // this could be due to caching further upstream, or just an empty batch\n if (this._requests.length < 1) {\n logging_1.Logger.write(\"Resolving empty batch.\", logging_1.LogLevel.Info);\n return Promise.resolve();\n }\n // creating the client here allows the url to be populated for nodejs client as well as potentially\n // any other hacks needed for other types of clients. Essentially allows the absoluteRequestUrl\n // below to be correct\n var client = new httpclient_1.HttpClient();\n // due to timing we need to get the absolute url here so we can use it for all the individual requests\n // and for sending the entire batch\n return util_1.Util.toAbsoluteUrl(this.baseUrl).then(function (absoluteRequestUrl) {\n // build all the requests, send them, pipe results in order to parsers\n var batchBody = [];\n var currentChangeSetId = \"\";\n for (var i = 0; i < _this._requests.length; i++) {\n var reqInfo = _this._requests[i];\n if (reqInfo.method === \"GET\") {\n if (currentChangeSetId.length > 0) {\n // end an existing change set\n batchBody.push(\"--changeset_\" + currentChangeSetId + \"--\\n\\n\");\n currentChangeSetId = \"\";\n }\n batchBody.push(\"--batch_\" + _this._batchId + \"\\n\");\n }\n else {\n if (currentChangeSetId.length < 1) {\n // start new change set\n currentChangeSetId = util_1.Util.getGUID();\n batchBody.push(\"--batch_\" + _this._batchId + \"\\n\");\n batchBody.push(\"Content-Type: multipart/mixed; boundary=\\\"changeset_\" + currentChangeSetId + \"\\\"\\n\\n\");\n }\n batchBody.push(\"--changeset_\" + currentChangeSetId + \"\\n\");\n }\n // common batch part prefix\n batchBody.push(\"Content-Type: application/http\\n\");\n batchBody.push(\"Content-Transfer-Encoding: binary\\n\\n\");\n var headers = new Headers();\n // this is the url of the individual request within the batch\n var url = util_1.Util.isUrlAbsolute(reqInfo.url) ? reqInfo.url : util_1.Util.combinePaths(absoluteRequestUrl, reqInfo.url);\n logging_1.Logger.write(\"[\" + _this.batchId + \"] (\" + (new Date()).getTime() + \") Adding request \" + reqInfo.method + \" \" + url + \" to batch.\", logging_1.LogLevel.Verbose);\n if (reqInfo.method !== \"GET\") {\n var method = reqInfo.method;\n if (reqInfo.hasOwnProperty(\"options\") && reqInfo.options.hasOwnProperty(\"headers\") && typeof reqInfo.options.headers[\"X-HTTP-Method\"] !== \"undefined\") {\n method = reqInfo.options.headers[\"X-HTTP-Method\"];\n delete reqInfo.options.headers[\"X-HTTP-Method\"];\n }\n batchBody.push(method + \" \" + url + \" HTTP/1.1\\n\");\n headers.set(\"Content-Type\", \"application/json;odata=verbose;charset=utf-8\");\n }\n else {\n batchBody.push(reqInfo.method + \" \" + url + \" HTTP/1.1\\n\");\n }\n // merge global config headers\n utils_1.mergeHeaders(headers, pnplibconfig_1.RuntimeConfig.spHeaders);\n // merge per-request headers\n if (reqInfo.options) {\n utils_1.mergeHeaders(headers, reqInfo.options.headers);\n }\n // lastly we apply any default headers we need that may not exist\n if (!headers.has(\"Accept\")) {\n headers.append(\"Accept\", \"application/json\");\n }\n if (!headers.has(\"Content-Type\")) {\n headers.append(\"Content-Type\", \"application/json;odata=verbose;charset=utf-8\");\n }\n if (!headers.has(\"X-ClientService-ClientTag\")) {\n headers.append(\"X-ClientService-ClientTag\", \"PnPCoreJS:3.0.0\");\n }\n // write headers into batch body\n headers.forEach(function (value, name) {\n batchBody.push(name + \": \" + value + \"\\n\");\n });\n batchBody.push(\"\\n\");\n if (reqInfo.options.body) {\n batchBody.push(reqInfo.options.body + \"\\n\\n\");\n }\n }\n if (currentChangeSetId.length > 0) {\n // Close the changeset\n batchBody.push(\"--changeset_\" + currentChangeSetId + \"--\\n\\n\");\n currentChangeSetId = \"\";\n }\n batchBody.push(\"--batch_\" + _this._batchId + \"--\\n\");\n var batchHeaders = {\n \"Content-Type\": \"multipart/mixed; boundary=batch_\" + _this._batchId,\n };\n var batchOptions = {\n \"body\": batchBody.join(\"\"),\n \"headers\": batchHeaders,\n \"method\": \"POST\",\n };\n logging_1.Logger.write(\"[\" + _this.batchId + \"] (\" + (new Date()).getTime() + \") Sending batch request.\", logging_1.LogLevel.Info);\n return client.fetch(util_1.Util.combinePaths(absoluteRequestUrl, \"/_api/$batch\"), batchOptions)\n .then(function (r) { return r.text(); })\n .then(_this._parseResponse)\n .then(function (responses) {\n if (responses.length !== _this._requests.length) {\n throw new exceptions_1.BatchParseException(\"Could not properly parse responses to match requests in batch.\");\n }\n logging_1.Logger.write(\"[\" + _this.batchId + \"] (\" + (new Date()).getTime() + \") Resolving batched requests.\", logging_1.LogLevel.Info);\n return responses.reduce(function (chain, response, index) {\n var request = _this._requests[index];\n logging_1.Logger.write(\"[\" + _this.batchId + \"] (\" + (new Date()).getTime() + \") Resolving batched request \" + request.method + \" \" + request.url + \".\", logging_1.LogLevel.Verbose);\n return chain.then(function (_) { return request.parser.parse(response).then(request.resolve).catch(request.reject); });\n }, Promise.resolve());\n });\n });\n };\n /**\n * Parses the response from a batch request into an array of Response instances\n *\n * @param body Text body of the response from the batch request\n */\n ODataBatch.prototype._parseResponse = function (body) {\n return new Promise(function (resolve, reject) {\n var responses = [];\n var header = \"--batchresponse_\";\n // Ex. \"HTTP/1.1 500 Internal Server Error\"\n var statusRegExp = new RegExp(\"^HTTP/[0-9.]+ +([0-9]+) +(.*)\", \"i\");\n var lines = body.split(\"\\n\");\n var state = \"batch\";\n var status;\n var statusText;\n for (var i = 0; i < lines.length; ++i) {\n var line = lines[i];\n switch (state) {\n case \"batch\":\n if (line.substr(0, header.length) === header) {\n state = \"batchHeaders\";\n }\n else {\n if (line.trim() !== \"\") {\n throw new exceptions_1.BatchParseException(\"Invalid response, line \" + i);\n }\n }\n break;\n case \"batchHeaders\":\n if (line.trim() === \"\") {\n state = \"status\";\n }\n break;\n case \"status\":\n var parts = statusRegExp.exec(line);\n if (parts.length !== 3) {\n throw new exceptions_1.BatchParseException(\"Invalid status, line \" + i);\n }\n status = parseInt(parts[1], 10);\n statusText = parts[2];\n state = \"statusHeaders\";\n break;\n case \"statusHeaders\":\n if (line.trim() === \"\") {\n state = \"body\";\n }\n break;\n case \"body\":\n responses.push((status === 204) ? new Response() : new Response(line, { status: status, statusText: statusText }));\n state = \"batch\";\n break;\n }\n }\n if (state !== \"status\") {\n reject(new exceptions_1.BatchParseException(\"Unexpected end of input\"));\n }\n resolve(responses);\n });\n };\n return ODataBatch;\n}());\nexports.ODataBatch = ODataBatch;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/sharepoint/batch.js\n// module id = 30\n// module chunks = 0","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar sharepointqueryable_1 = require(\"./sharepointqueryable\");\n/**\n * Describes a collection of List objects\n *\n */\nvar Features = /** @class */ (function (_super) {\n __extends(Features, _super);\n /**\n * Creates a new instance of the Lists class\n *\n * @param baseUrl The url or SharePointQueryable which forms the parent of this fields collection\n */\n function Features(baseUrl, path) {\n if (path === void 0) { path = \"features\"; }\n return _super.call(this, baseUrl, path) || this;\n }\n /**\n * Gets a list from the collection by guid id\n *\n * @param id The Id of the feature (GUID)\n */\n Features.prototype.getById = function (id) {\n var feature = new Feature(this);\n feature.concat(\"('\" + id + \"')\");\n return feature;\n };\n /**\n * Adds a new list to the collection\n *\n * @param id The Id of the feature (GUID)\n * @param force If true the feature activation will be forced\n */\n Features.prototype.add = function (id, force) {\n var _this = this;\n if (force === void 0) { force = false; }\n return this.clone(Features, \"add\").postCore({\n body: JSON.stringify({\n featdefScope: 0,\n featureId: id,\n force: force,\n }),\n }).then(function (data) {\n return {\n data: data,\n feature: _this.getById(id),\n };\n });\n };\n /**\n * Removes (deactivates) a feature from the collection\n *\n * @param id The Id of the feature (GUID)\n * @param force If true the feature deactivation will be forced\n */\n Features.prototype.remove = function (id, force) {\n if (force === void 0) { force = false; }\n return this.clone(Features, \"remove\").postCore({\n body: JSON.stringify({\n featureId: id,\n force: force,\n }),\n });\n };\n return Features;\n}(sharepointqueryable_1.SharePointQueryableCollection));\nexports.Features = Features;\nvar Feature = /** @class */ (function (_super) {\n __extends(Feature, _super);\n function Feature() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n /**\n * Removes (deactivates) a feature from the collection\n *\n * @param force If true the feature deactivation will be forced\n */\n Feature.prototype.deactivate = function (force) {\n var _this = this;\n if (force === void 0) { force = false; }\n var removeDependency = this.addBatchDependency();\n var idGet = new Feature(this).select(\"DefinitionId\");\n return idGet.getAs().then(function (feature) {\n var promise = _this.getParent(Features, _this.parentUrl, \"\", _this.batch).remove(feature.DefinitionId, force);\n removeDependency();\n return promise;\n });\n };\n return Feature;\n}(sharepointqueryable_1.SharePointQueryableInstance));\nexports.Feature = Feature;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/sharepoint/features.js\n// module id = 31\n// module chunks = 0","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar util_1 = require(\"./utils/util\");\nvar storage_1 = require(\"./utils/storage\");\nvar configuration_1 = require(\"./configuration/configuration\");\nvar logging_1 = require(\"./utils/logging\");\nvar rest_1 = require(\"./sharepoint/rest\");\nvar pnplibconfig_1 = require(\"./configuration/pnplibconfig\");\nvar rest_2 = require(\"./graph/rest\");\n/**\n * Root class of the Patterns and Practices namespace, provides an entry point to the library\n */\n/**\n * Utility methods\n */\nexports.util = util_1.Util;\n/**\n * Provides access to the SharePoint REST interface\n */\nexports.sp = new rest_1.SPRest();\n/**\n * Provides access to the Microsoft Graph REST interface\n */\nexports.graph = new rest_2.GraphRest();\n/**\n * Provides access to local and session storage\n */\nexports.storage = new storage_1.PnPClientStorage();\n/**\n * Global configuration instance to which providers can be added\n */\nexports.config = new configuration_1.Settings();\n/**\n * Global logging instance to which subscribers can be registered and messages written\n */\nexports.log = logging_1.Logger;\n/**\n * Allows for the configuration of the library\n */\nexports.setup = pnplibconfig_1.setRuntimeConfig;\n// /**\n// * Expose a subset of classes from the library for public consumption\n// */\n// creating this class instead of directly assigning to default fixes issue #116\nvar Def = {\n /**\n * Global configuration instance to which providers can be added\n */\n config: exports.config,\n /**\n * Provides access to the Microsoft Graph REST interface\n */\n graph: exports.graph,\n /**\n * Global logging instance to which subscribers can be registered and messages written\n */\n log: exports.log,\n /**\n * Provides access to local and session storage\n */\n setup: exports.setup,\n /**\n * Provides access to the REST interface\n */\n sp: exports.sp,\n /**\n * Provides access to local and session storage\n */\n storage: exports.storage,\n /**\n * Utility methods\n */\n util: exports.util,\n};\n/**\n * Enables use of the import pnp from syntax\n */\nexports.default = Def;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/pnp.js\n// module id = 32\n// module chunks = 0","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\n/**\n * Makes requests using the fetch API\n */\nvar FetchClient = /** @class */ (function () {\n function FetchClient() {\n }\n FetchClient.prototype.fetch = function (url, options) {\n return global.fetch(url, options);\n };\n return FetchClient;\n}());\nexports.FetchClient = FetchClient;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/net/fetchclient.js\n// module id = 33\n// module chunks = 0","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar collections_1 = require(\"../collections/collections\");\n/**\n * Class used to manage the current application settings\n *\n */\nvar Settings = /** @class */ (function () {\n /**\n * Creates a new instance of the settings class\n *\n * @constructor\n */\n function Settings() {\n this._settings = new collections_1.Dictionary();\n }\n /**\n * Adds a new single setting, or overwrites a previous setting with the same key\n *\n * @param {string} key The key used to store this setting\n * @param {string} value The setting value to store\n */\n Settings.prototype.add = function (key, value) {\n this._settings.add(key, value);\n };\n /**\n * Adds a JSON value to the collection as a string, you must use getJSON to rehydrate the object when read\n *\n * @param {string} key The key used to store this setting\n * @param {any} value The setting value to store\n */\n Settings.prototype.addJSON = function (key, value) {\n this._settings.add(key, JSON.stringify(value));\n };\n /**\n * Applies the supplied hash to the setting collection overwriting any existing value, or created new values\n *\n * @param {TypedHash} hash The set of values to add\n */\n Settings.prototype.apply = function (hash) {\n var _this = this;\n return new Promise(function (resolve, reject) {\n try {\n _this._settings.merge(hash);\n resolve();\n }\n catch (e) {\n reject(e);\n }\n });\n };\n /**\n * Loads configuration settings into the collection from the supplied provider and returns a Promise\n *\n * @param {IConfigurationProvider} provider The provider from which we will load the settings\n */\n Settings.prototype.load = function (provider) {\n var _this = this;\n return new Promise(function (resolve, reject) {\n provider.getConfiguration().then(function (value) {\n _this._settings.merge(value);\n resolve();\n }).catch(function (reason) {\n reject(reason);\n });\n });\n };\n /**\n * Gets a value from the configuration\n *\n * @param {string} key The key whose value we want to return. Returns null if the key does not exist\n * @return {string} string value from the configuration\n */\n Settings.prototype.get = function (key) {\n return this._settings.get(key);\n };\n /**\n * Gets a JSON value, rehydrating the stored string to the original object\n *\n * @param {string} key The key whose value we want to return. Returns null if the key does not exist\n * @return {any} object from the configuration\n */\n Settings.prototype.getJSON = function (key) {\n var o = this.get(key);\n if (typeof o === \"undefined\" || o === null) {\n return o;\n }\n return JSON.parse(o);\n };\n return Settings;\n}());\nexports.Settings = Settings;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/configuration/configuration.js\n// module id = 34\n// module chunks = 0","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar search_1 = require(\"./search\");\nvar searchsuggest_1 = require(\"./searchsuggest\");\nvar site_1 = require(\"./site\");\nvar webs_1 = require(\"./webs\");\nvar util_1 = require(\"../utils/util\");\nvar userprofiles_1 = require(\"./userprofiles\");\nvar exceptions_1 = require(\"../utils/exceptions\");\nvar utilities_1 = require(\"./utilities\");\n/**\n * Root of the SharePoint REST module\n */\nvar SPRest = /** @class */ (function () {\n /**\n * Creates a new instance of the SPRest class\n *\n * @param options Additional options\n * @param baseUrl A string that should form the base part of the url\n */\n function SPRest(options, baseUrl) {\n if (options === void 0) { options = {}; }\n if (baseUrl === void 0) { baseUrl = \"\"; }\n this._options = options;\n this._baseUrl = baseUrl;\n }\n /**\n * Configures instance with additional options and baseUrl.\n * Provided configuration used by other objects in a chain\n *\n * @param options Additional options\n * @param baseUrl A string that should form the base part of the url\n */\n SPRest.prototype.configure = function (options, baseUrl) {\n if (baseUrl === void 0) { baseUrl = \"\"; }\n return new SPRest(options, baseUrl);\n };\n /**\n * Executes a search against this web context\n *\n * @param query The SearchQuery definition\n */\n SPRest.prototype.searchSuggest = function (query) {\n var finalQuery;\n if (typeof query === \"string\") {\n finalQuery = { querytext: query };\n }\n else {\n finalQuery = query;\n }\n return new searchsuggest_1.SearchSuggest(this._baseUrl).configure(this._options).execute(finalQuery);\n };\n /**\n * Executes a search against this web context\n *\n * @param query The SearchQuery definition\n */\n SPRest.prototype.search = function (query) {\n var finalQuery;\n if (typeof query === \"string\") {\n finalQuery = { Querytext: query };\n }\n else if (query instanceof search_1.SearchQueryBuilder) {\n finalQuery = query.toSearchQuery();\n }\n else {\n finalQuery = query;\n }\n return new search_1.Search(this._baseUrl).configure(this._options).execute(finalQuery);\n };\n Object.defineProperty(SPRest.prototype, \"site\", {\n /**\n * Begins a site collection scoped REST request\n *\n */\n get: function () {\n return new site_1.Site(this._baseUrl).configure(this._options);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(SPRest.prototype, \"web\", {\n /**\n * Begins a web scoped REST request\n *\n */\n get: function () {\n return new webs_1.Web(this._baseUrl).configure(this._options);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(SPRest.prototype, \"profiles\", {\n /**\n * Access to user profile methods\n *\n */\n get: function () {\n return new userprofiles_1.UserProfileQuery(this._baseUrl).configure(this._options);\n },\n enumerable: true,\n configurable: true\n });\n /**\n * Creates a new batch object for use with the SharePointQueryable.addToBatch method\n *\n */\n SPRest.prototype.createBatch = function () {\n return this.web.createBatch();\n };\n Object.defineProperty(SPRest.prototype, \"utility\", {\n /**\n * Static utilities methods from SP.Utilities.Utility\n */\n get: function () {\n return new utilities_1.UtilityMethod(this._baseUrl, \"\").configure(this._options);\n },\n enumerable: true,\n configurable: true\n });\n /**\n * Begins a cross-domain, host site scoped REST request, for use in add-in webs\n *\n * @param addInWebUrl The absolute url of the add-in web\n * @param hostWebUrl The absolute url of the host web\n */\n SPRest.prototype.crossDomainSite = function (addInWebUrl, hostWebUrl) {\n return this._cdImpl(site_1.Site, addInWebUrl, hostWebUrl, \"site\");\n };\n /**\n * Begins a cross-domain, host web scoped REST request, for use in add-in webs\n *\n * @param addInWebUrl The absolute url of the add-in web\n * @param hostWebUrl The absolute url of the host web\n */\n SPRest.prototype.crossDomainWeb = function (addInWebUrl, hostWebUrl) {\n return this._cdImpl(webs_1.Web, addInWebUrl, hostWebUrl, \"web\");\n };\n /**\n * Implements the creation of cross domain REST urls\n *\n * @param factory The constructor of the object to create Site | Web\n * @param addInWebUrl The absolute url of the add-in web\n * @param hostWebUrl The absolute url of the host web\n * @param urlPart String part to append to the url \"site\" | \"web\"\n */\n SPRest.prototype._cdImpl = function (factory, addInWebUrl, hostWebUrl, urlPart) {\n if (!util_1.Util.isUrlAbsolute(addInWebUrl)) {\n throw new exceptions_1.UrlException(\"The addInWebUrl parameter must be an absolute url.\");\n }\n if (!util_1.Util.isUrlAbsolute(hostWebUrl)) {\n throw new exceptions_1.UrlException(\"The hostWebUrl parameter must be an absolute url.\");\n }\n var url = util_1.Util.combinePaths(addInWebUrl, \"_api/SP.AppContextSite(@target)\");\n var instance = new factory(url, urlPart);\n instance.query.add(\"@target\", \"'\" + encodeURIComponent(hostWebUrl) + \"'\");\n return instance.configure(this._options);\n };\n return SPRest;\n}());\nexports.SPRest = SPRest;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/sharepoint/rest.js\n// module id = 35\n// module chunks = 0","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar sharepointqueryable_1 = require(\"./sharepointqueryable\");\nvar util_1 = require(\"../utils/util\");\n/**\n * Allows for the fluent construction of search queries\n */\nvar SearchQueryBuilder = /** @class */ (function () {\n function SearchQueryBuilder(queryText, _query) {\n if (queryText === void 0) { queryText = \"\"; }\n if (_query === void 0) { _query = {}; }\n this._query = _query;\n if (typeof queryText === \"string\" && queryText.length > 0) {\n this.extendQuery({ Querytext: queryText });\n }\n }\n SearchQueryBuilder.create = function (queryText, queryTemplate) {\n if (queryText === void 0) { queryText = \"\"; }\n if (queryTemplate === void 0) { queryTemplate = {}; }\n return new SearchQueryBuilder(queryText, queryTemplate);\n };\n SearchQueryBuilder.prototype.text = function (queryText) {\n return this.extendQuery({ Querytext: queryText });\n };\n SearchQueryBuilder.prototype.template = function (template) {\n return this.extendQuery({ QueryTemplate: template });\n };\n SearchQueryBuilder.prototype.sourceId = function (id) {\n return this.extendQuery({ SourceId: id });\n };\n Object.defineProperty(SearchQueryBuilder.prototype, \"enableInterleaving\", {\n get: function () {\n return this.extendQuery({ EnableInterleaving: true });\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(SearchQueryBuilder.prototype, \"enableStemming\", {\n get: function () {\n return this.extendQuery({ EnableStemming: true });\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(SearchQueryBuilder.prototype, \"trimDuplicates\", {\n get: function () {\n return this.extendQuery({ TrimDuplicates: true });\n },\n enumerable: true,\n configurable: true\n });\n SearchQueryBuilder.prototype.trimDuplicatesIncludeId = function (n) {\n return this.extendQuery({ TrimDuplicatesIncludeId: n });\n };\n Object.defineProperty(SearchQueryBuilder.prototype, \"enableNicknames\", {\n get: function () {\n return this.extendQuery({ EnableNicknames: true });\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(SearchQueryBuilder.prototype, \"enableFql\", {\n get: function () {\n return this.extendQuery({ EnableFQL: true });\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(SearchQueryBuilder.prototype, \"enablePhonetic\", {\n get: function () {\n return this.extendQuery({ EnablePhonetic: true });\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(SearchQueryBuilder.prototype, \"bypassResultTypes\", {\n get: function () {\n return this.extendQuery({ BypassResultTypes: true });\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(SearchQueryBuilder.prototype, \"processBestBets\", {\n get: function () {\n return this.extendQuery({ ProcessBestBets: true });\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(SearchQueryBuilder.prototype, \"enableQueryRules\", {\n get: function () {\n return this.extendQuery({ EnableQueryRules: true });\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(SearchQueryBuilder.prototype, \"enableSorting\", {\n get: function () {\n return this.extendQuery({ EnableSorting: true });\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(SearchQueryBuilder.prototype, \"generateBlockRankLog\", {\n get: function () {\n return this.extendQuery({ GenerateBlockRankLog: true });\n },\n enumerable: true,\n configurable: true\n });\n SearchQueryBuilder.prototype.rankingModelId = function (id) {\n return this.extendQuery({ RankingModelId: id });\n };\n SearchQueryBuilder.prototype.startRow = function (n) {\n return this.extendQuery({ StartRow: n });\n };\n SearchQueryBuilder.prototype.rowLimit = function (n) {\n return this.extendQuery({ RowLimit: n });\n };\n SearchQueryBuilder.prototype.rowsPerPage = function (n) {\n return this.extendQuery({ RowsPerPage: n });\n };\n SearchQueryBuilder.prototype.selectProperties = function () {\n var properties = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n properties[_i] = arguments[_i];\n }\n return this.extendQuery({ SelectProperties: properties });\n };\n SearchQueryBuilder.prototype.culture = function (culture) {\n return this.extendQuery({ Culture: culture });\n };\n SearchQueryBuilder.prototype.timeZoneId = function (id) {\n return this.extendQuery({ TimeZoneId: id });\n };\n SearchQueryBuilder.prototype.refinementFilters = function () {\n var filters = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n filters[_i] = arguments[_i];\n }\n return this.extendQuery({ RefinementFilters: filters });\n };\n SearchQueryBuilder.prototype.refiners = function (refiners) {\n return this.extendQuery({ Refiners: refiners });\n };\n SearchQueryBuilder.prototype.hiddenConstraints = function (constraints) {\n return this.extendQuery({ HiddenConstraints: constraints });\n };\n SearchQueryBuilder.prototype.sortList = function () {\n var sorts = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n sorts[_i] = arguments[_i];\n }\n return this.extendQuery({ SortList: sorts });\n };\n SearchQueryBuilder.prototype.timeout = function (milliseconds) {\n return this.extendQuery({ Timeout: milliseconds });\n };\n SearchQueryBuilder.prototype.hithighlightedProperties = function () {\n var properties = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n properties[_i] = arguments[_i];\n }\n return this.extendQuery({ HitHighlightedProperties: properties });\n };\n SearchQueryBuilder.prototype.clientType = function (clientType) {\n return this.extendQuery({ ClientType: clientType });\n };\n SearchQueryBuilder.prototype.personalizationData = function (data) {\n return this.extendQuery({ PersonalizationData: data });\n };\n SearchQueryBuilder.prototype.resultsURL = function (url) {\n return this.extendQuery({ ResultsUrl: url });\n };\n SearchQueryBuilder.prototype.queryTag = function () {\n var tags = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n tags[_i] = arguments[_i];\n }\n return this.extendQuery({ QueryTag: tags });\n };\n SearchQueryBuilder.prototype.properties = function () {\n var properties = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n properties[_i] = arguments[_i];\n }\n return this.extendQuery({ Properties: properties });\n };\n Object.defineProperty(SearchQueryBuilder.prototype, \"processPersonalFavorites\", {\n get: function () {\n return this.extendQuery({ ProcessPersonalFavorites: true });\n },\n enumerable: true,\n configurable: true\n });\n SearchQueryBuilder.prototype.queryTemplatePropertiesUrl = function (url) {\n return this.extendQuery({ QueryTemplatePropertiesUrl: url });\n };\n SearchQueryBuilder.prototype.reorderingRules = function () {\n var rules = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n rules[_i] = arguments[_i];\n }\n return this.extendQuery({ ReorderingRules: rules });\n };\n SearchQueryBuilder.prototype.hitHighlightedMultivaluePropertyLimit = function (limit) {\n return this.extendQuery({ HitHighlightedMultivaluePropertyLimit: limit });\n };\n Object.defineProperty(SearchQueryBuilder.prototype, \"enableOrderingHitHighlightedProperty\", {\n get: function () {\n return this.extendQuery({ EnableOrderingHitHighlightedProperty: true });\n },\n enumerable: true,\n configurable: true\n });\n SearchQueryBuilder.prototype.collapseSpecification = function (spec) {\n return this.extendQuery({ CollapseSpecification: spec });\n };\n SearchQueryBuilder.prototype.uiLanguage = function (lang) {\n return this.extendQuery({ UILanguage: lang });\n };\n SearchQueryBuilder.prototype.desiredSnippetLength = function (len) {\n return this.extendQuery({ DesiredSnippetLength: len });\n };\n SearchQueryBuilder.prototype.maxSnippetLength = function (len) {\n return this.extendQuery({ MaxSnippetLength: len });\n };\n SearchQueryBuilder.prototype.summaryLength = function (len) {\n return this.extendQuery({ SummaryLength: len });\n };\n SearchQueryBuilder.prototype.toSearchQuery = function () {\n return this._query;\n };\n SearchQueryBuilder.prototype.extendQuery = function (part) {\n this._query = util_1.Util.extend(this._query, part);\n return this;\n };\n return SearchQueryBuilder;\n}());\nexports.SearchQueryBuilder = SearchQueryBuilder;\n/**\n * Describes the search API\n *\n */\nvar Search = /** @class */ (function (_super) {\n __extends(Search, _super);\n /**\n * Creates a new instance of the Search class\n *\n * @param baseUrl The url for the search context\n * @param query The SearchQuery object to execute\n */\n function Search(baseUrl, path) {\n if (path === void 0) { path = \"_api/search/postquery\"; }\n return _super.call(this, baseUrl, path) || this;\n }\n /**\n * .......\n * @returns Promise\n */\n Search.prototype.execute = function (query) {\n var _this = this;\n var formattedBody;\n formattedBody = query;\n if (formattedBody.SelectProperties) {\n formattedBody.SelectProperties = this.fixupProp(query.SelectProperties);\n }\n if (formattedBody.RefinementFilters) {\n formattedBody.RefinementFilters = this.fixupProp(query.RefinementFilters);\n }\n if (formattedBody.SortList) {\n formattedBody.SortList = this.fixupProp(query.SortList);\n }\n if (formattedBody.HithighlightedProperties) {\n formattedBody.HithighlightedProperties = this.fixupProp(query.HitHighlightedProperties);\n }\n if (formattedBody.ReorderingRules) {\n formattedBody.ReorderingRules = this.fixupProp(query.ReorderingRules);\n }\n if (formattedBody.Properties) {\n formattedBody.Properties = this.fixupProp(query.Properties);\n }\n var postBody = JSON.stringify({\n request: util_1.Util.extend({\n \"__metadata\": { \"type\": \"Microsoft.Office.Server.Search.REST.SearchRequest\" },\n }, formattedBody),\n });\n return this.postCore({ body: postBody }).then(function (data) { return new SearchResults(data, _this.toUrl(), query); });\n };\n /**\n * Fixes up properties that expect to consist of a \"results\" collection when needed\n *\n * @param prop property to fixup for container struct\n */\n Search.prototype.fixupProp = function (prop) {\n if (prop.hasOwnProperty(\"results\")) {\n return prop;\n }\n return { results: prop };\n };\n return Search;\n}(sharepointqueryable_1.SharePointQueryableInstance));\nexports.Search = Search;\n/**\n * Describes the SearchResults class, which returns the formatted and raw version of the query response\n */\nvar SearchResults = /** @class */ (function () {\n /**\n * Creates a new instance of the SearchResult class\n *\n */\n function SearchResults(rawResponse, _url, _query, _raw, _primary) {\n if (_raw === void 0) { _raw = null; }\n if (_primary === void 0) { _primary = null; }\n this._url = _url;\n this._query = _query;\n this._raw = _raw;\n this._primary = _primary;\n this._raw = rawResponse.postquery ? rawResponse.postquery : rawResponse;\n }\n Object.defineProperty(SearchResults.prototype, \"ElapsedTime\", {\n get: function () {\n return this.RawSearchResults.ElapsedTime;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(SearchResults.prototype, \"RowCount\", {\n get: function () {\n return this.RawSearchResults.PrimaryQueryResult.RelevantResults.RowCount;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(SearchResults.prototype, \"TotalRows\", {\n get: function () {\n return this.RawSearchResults.PrimaryQueryResult.RelevantResults.TotalRows;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(SearchResults.prototype, \"TotalRowsIncludingDuplicates\", {\n get: function () {\n return this.RawSearchResults.PrimaryQueryResult.RelevantResults.TotalRowsIncludingDuplicates;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(SearchResults.prototype, \"RawSearchResults\", {\n get: function () {\n return this._raw;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(SearchResults.prototype, \"PrimarySearchResults\", {\n get: function () {\n if (this._primary === null) {\n this._primary = this.formatSearchResults(this._raw.PrimaryQueryResult.RelevantResults.Table.Rows);\n }\n return this._primary;\n },\n enumerable: true,\n configurable: true\n });\n /**\n * Gets a page of results\n *\n * @param pageNumber Index of the page to return. Used to determine StartRow\n * @param pageSize Optional, items per page (default = 10)\n */\n SearchResults.prototype.getPage = function (pageNumber, pageSize) {\n // if we got all the available rows we don't have another page\n if (this.TotalRows < this.RowCount) {\n return Promise.resolve(null);\n }\n // if pageSize is supplied, then we use that regardless of any previous values\n // otherwise get the previous RowLimit or default to 10\n var rows = typeof pageSize !== \"undefined\" ? pageSize : this._query.hasOwnProperty(\"RowLimit\") ? this._query.RowLimit : 10;\n var query = util_1.Util.extend(this._query, {\n RowLimit: rows,\n StartRow: rows * (pageNumber - 1),\n });\n // we have reached the end\n if (query.StartRow > this.TotalRows) {\n return Promise.resolve(null);\n }\n var search = new Search(this._url, null);\n return search.execute(query);\n };\n /**\n * Formats a search results array\n *\n * @param rawResults The array to process\n */\n SearchResults.prototype.formatSearchResults = function (rawResults) {\n var results = new Array();\n var tempResults = rawResults.results ? rawResults.results : rawResults;\n for (var _i = 0, tempResults_1 = tempResults; _i < tempResults_1.length; _i++) {\n var tempResult = tempResults_1[_i];\n var cells = tempResult.Cells.results ? tempResult.Cells.results : tempResult.Cells;\n results.push(cells.reduce(function (res, cell) {\n Object.defineProperty(res, cell.Key, {\n configurable: false,\n enumerable: false,\n value: cell.Value,\n writable: false,\n });\n return res;\n }, {}));\n }\n return results;\n };\n return SearchResults;\n}());\nexports.SearchResults = SearchResults;\n/**\n * defines the SortDirection enum\n */\nvar SortDirection;\n(function (SortDirection) {\n SortDirection[SortDirection[\"Ascending\"] = 0] = \"Ascending\";\n SortDirection[SortDirection[\"Descending\"] = 1] = \"Descending\";\n SortDirection[SortDirection[\"FQLFormula\"] = 2] = \"FQLFormula\";\n})(SortDirection = exports.SortDirection || (exports.SortDirection = {}));\n/**\n * defines the ReorderingRuleMatchType enum\n */\nvar ReorderingRuleMatchType;\n(function (ReorderingRuleMatchType) {\n ReorderingRuleMatchType[ReorderingRuleMatchType[\"ResultContainsKeyword\"] = 0] = \"ResultContainsKeyword\";\n ReorderingRuleMatchType[ReorderingRuleMatchType[\"TitleContainsKeyword\"] = 1] = \"TitleContainsKeyword\";\n ReorderingRuleMatchType[ReorderingRuleMatchType[\"TitleMatchesKeyword\"] = 2] = \"TitleMatchesKeyword\";\n ReorderingRuleMatchType[ReorderingRuleMatchType[\"UrlStartsWith\"] = 3] = \"UrlStartsWith\";\n ReorderingRuleMatchType[ReorderingRuleMatchType[\"UrlExactlyMatches\"] = 4] = \"UrlExactlyMatches\";\n ReorderingRuleMatchType[ReorderingRuleMatchType[\"ContentTypeIs\"] = 5] = \"ContentTypeIs\";\n ReorderingRuleMatchType[ReorderingRuleMatchType[\"FileExtensionMatches\"] = 6] = \"FileExtensionMatches\";\n ReorderingRuleMatchType[ReorderingRuleMatchType[\"ResultHasTag\"] = 7] = \"ResultHasTag\";\n ReorderingRuleMatchType[ReorderingRuleMatchType[\"ManualCondition\"] = 8] = \"ManualCondition\";\n})(ReorderingRuleMatchType = exports.ReorderingRuleMatchType || (exports.ReorderingRuleMatchType = {}));\n/**\n * Specifies the type value for the property\n */\nvar QueryPropertyValueType;\n(function (QueryPropertyValueType) {\n QueryPropertyValueType[QueryPropertyValueType[\"None\"] = 0] = \"None\";\n QueryPropertyValueType[QueryPropertyValueType[\"StringType\"] = 1] = \"StringType\";\n QueryPropertyValueType[QueryPropertyValueType[\"Int32TYpe\"] = 2] = \"Int32TYpe\";\n QueryPropertyValueType[QueryPropertyValueType[\"BooleanType\"] = 3] = \"BooleanType\";\n QueryPropertyValueType[QueryPropertyValueType[\"StringArrayType\"] = 4] = \"StringArrayType\";\n QueryPropertyValueType[QueryPropertyValueType[\"UnSupportedType\"] = 5] = \"UnSupportedType\";\n})(QueryPropertyValueType = exports.QueryPropertyValueType || (exports.QueryPropertyValueType = {}));\nvar SearchBuiltInSourceId = /** @class */ (function () {\n function SearchBuiltInSourceId() {\n }\n SearchBuiltInSourceId.Documents = \"e7ec8cee-ded8-43c9-beb5-436b54b31e84\";\n SearchBuiltInSourceId.ItemsMatchingContentType = \"5dc9f503-801e-4ced-8a2c-5d1237132419\";\n SearchBuiltInSourceId.ItemsMatchingTag = \"e1327b9c-2b8c-4b23-99c9-3730cb29c3f7\";\n SearchBuiltInSourceId.ItemsRelatedToCurrentUser = \"48fec42e-4a92-48ce-8363-c2703a40e67d\";\n SearchBuiltInSourceId.ItemsWithSameKeywordAsThisItem = \"5c069288-1d17-454a-8ac6-9c642a065f48\";\n SearchBuiltInSourceId.LocalPeopleResults = \"b09a7990-05ea-4af9-81ef-edfab16c4e31\";\n SearchBuiltInSourceId.LocalReportsAndDataResults = \"203fba36-2763-4060-9931-911ac8c0583b\";\n SearchBuiltInSourceId.LocalSharePointResults = \"8413cd39-2156-4e00-b54d-11efd9abdb89\";\n SearchBuiltInSourceId.LocalVideoResults = \"78b793ce-7956-4669-aa3b-451fc5defebf\";\n SearchBuiltInSourceId.Pages = \"5e34578e-4d08-4edc-8bf3-002acf3cdbcc\";\n SearchBuiltInSourceId.Pictures = \"38403c8c-3975-41a8-826e-717f2d41568a\";\n SearchBuiltInSourceId.Popular = \"97c71db1-58ce-4891-8b64-585bc2326c12\";\n SearchBuiltInSourceId.RecentlyChangedItems = \"ba63bbae-fa9c-42c0-b027-9a878f16557c\";\n SearchBuiltInSourceId.RecommendedItems = \"ec675252-14fa-4fbe-84dd-8d098ed74181\";\n SearchBuiltInSourceId.Wiki = \"9479bf85-e257-4318-b5a8-81a180f5faa1\";\n return SearchBuiltInSourceId;\n}());\nexports.SearchBuiltInSourceId = SearchBuiltInSourceId;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/sharepoint/search.js\n// module id = 36\n// module chunks = 0","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar storage_1 = require(\"../utils/storage\");\nvar util_1 = require(\"../utils/util\");\nvar pnplibconfig_1 = require(\"../configuration/pnplibconfig\");\nvar CachingOptions = /** @class */ (function () {\n function CachingOptions(key) {\n this.key = key;\n this.expiration = util_1.Util.dateAdd(new Date(), \"second\", pnplibconfig_1.RuntimeConfig.defaultCachingTimeoutSeconds);\n this.storeName = pnplibconfig_1.RuntimeConfig.defaultCachingStore;\n }\n Object.defineProperty(CachingOptions.prototype, \"store\", {\n get: function () {\n if (this.storeName === \"local\") {\n return CachingOptions.storage.local;\n }\n else {\n return CachingOptions.storage.session;\n }\n },\n enumerable: true,\n configurable: true\n });\n CachingOptions.storage = new storage_1.PnPClientStorage();\n return CachingOptions;\n}());\nexports.CachingOptions = CachingOptions;\nvar CachingParserWrapper = /** @class */ (function () {\n function CachingParserWrapper(_parser, _cacheOptions) {\n this._parser = _parser;\n this._cacheOptions = _cacheOptions;\n }\n CachingParserWrapper.prototype.parse = function (response) {\n var _this = this;\n // add this to the cache based on the options\n return this._parser.parse(response).then(function (data) {\n if (_this._cacheOptions.store !== null) {\n _this._cacheOptions.store.put(_this._cacheOptions.key, data, _this._cacheOptions.expiration);\n }\n return data;\n });\n };\n return CachingParserWrapper;\n}());\nexports.CachingParserWrapper = CachingParserWrapper;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/odata/caching.js\n// module id = 37\n// module chunks = 0","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar collections_1 = require(\"../collections/collections\");\nvar util_1 = require(\"../utils/util\");\nvar parsers_1 = require(\"../odata/parsers\");\nvar pnplibconfig_1 = require(\"../configuration/pnplibconfig\");\nvar CachedDigest = /** @class */ (function () {\n function CachedDigest() {\n }\n return CachedDigest;\n}());\nexports.CachedDigest = CachedDigest;\n// allows for the caching of digests across all HttpClient's which each have their own DigestCache wrapper.\nvar digests = new collections_1.Dictionary();\nvar DigestCache = /** @class */ (function () {\n function DigestCache(_httpClient, _digests) {\n if (_digests === void 0) { _digests = digests; }\n this._httpClient = _httpClient;\n this._digests = _digests;\n }\n DigestCache.prototype.getDigest = function (webUrl) {\n var _this = this;\n var cachedDigest = this._digests.get(webUrl);\n if (cachedDigest !== null) {\n var now = new Date();\n if (now < cachedDigest.expiration) {\n return Promise.resolve(cachedDigest.value);\n }\n }\n var url = util_1.Util.combinePaths(webUrl, \"/_api/contextinfo\");\n var headers = {\n \"Accept\": \"application/json;odata=verbose\",\n \"Content-Type\": \"application/json;odata=verbose;charset=utf-8\",\n };\n return this._httpClient.fetchRaw(url, {\n cache: \"no-cache\",\n credentials: \"same-origin\",\n headers: util_1.Util.extend(headers, pnplibconfig_1.RuntimeConfig.spHeaders, true),\n method: \"POST\",\n }).then(function (response) {\n var parser = new parsers_1.ODataDefaultParser();\n return parser.parse(response).then(function (d) { return d.GetContextWebInformation; });\n }).then(function (data) {\n var newCachedDigest = new CachedDigest();\n newCachedDigest.value = data.FormDigestValue;\n var seconds = data.FormDigestTimeoutSeconds;\n var expiration = new Date();\n expiration.setTime(expiration.getTime() + 1000 * seconds);\n newCachedDigest.expiration = expiration;\n _this._digests.add(webUrl, newCachedDigest);\n return newCachedDigest.value;\n });\n };\n DigestCache.prototype.clear = function () {\n this._digests.clear();\n };\n return DigestCache;\n}());\nexports.DigestCache = DigestCache;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/net/digestcache.js\n// module id = 38\n// module chunks = 0","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar sharepointqueryable_1 = require(\"./sharepointqueryable\");\nvar SearchSuggest = /** @class */ (function (_super) {\n __extends(SearchSuggest, _super);\n function SearchSuggest(baseUrl, path) {\n if (path === void 0) { path = \"_api/search/suggest\"; }\n return _super.call(this, baseUrl, path) || this;\n }\n SearchSuggest.prototype.execute = function (query) {\n this.mapQueryToQueryString(query);\n return this.get().then(function (response) { return new SearchSuggestResult(response); });\n };\n SearchSuggest.prototype.mapQueryToQueryString = function (query) {\n this.query.add(\"querytext\", \"'\" + query.querytext + \"'\");\n if (query.hasOwnProperty(\"count\")) {\n this.query.add(\"inumberofquerysuggestions\", query.count.toString());\n }\n if (query.hasOwnProperty(\"personalCount\")) {\n this.query.add(\"inumberofresultsuggestions\", query.personalCount.toString());\n }\n if (query.hasOwnProperty(\"preQuery\")) {\n this.query.add(\"fprequerysuggestions\", query.preQuery.toString());\n }\n if (query.hasOwnProperty(\"hitHighlighting\")) {\n this.query.add(\"fhithighlighting\", query.hitHighlighting.toString());\n }\n if (query.hasOwnProperty(\"capitalize\")) {\n this.query.add(\"fcapitalizefirstletters\", query.capitalize.toString());\n }\n if (query.hasOwnProperty(\"culture\")) {\n this.query.add(\"culture\", query.culture.toString());\n }\n if (query.hasOwnProperty(\"stemming\")) {\n this.query.add(\"enablestemming\", query.stemming.toString());\n }\n if (query.hasOwnProperty(\"includePeople\")) {\n this.query.add(\"showpeoplenamesuggestions\", query.includePeople.toString());\n }\n if (query.hasOwnProperty(\"queryRules\")) {\n this.query.add(\"enablequeryrules\", query.queryRules.toString());\n }\n if (query.hasOwnProperty(\"prefixMatch\")) {\n this.query.add(\"fprefixmatchallterms\", query.prefixMatch.toString());\n }\n };\n return SearchSuggest;\n}(sharepointqueryable_1.SharePointQueryableInstance));\nexports.SearchSuggest = SearchSuggest;\nvar SearchSuggestResult = /** @class */ (function () {\n function SearchSuggestResult(json) {\n if (json.hasOwnProperty(\"suggest\")) {\n // verbose\n this.PeopleNames = json.suggest.PeopleNames.results;\n this.PersonalResults = json.suggest.PersonalResults.results;\n this.Queries = json.suggest.Queries.results;\n }\n else {\n this.PeopleNames = json.PeopleNames;\n this.PersonalResults = json.PersonalResults;\n this.Queries = json.Queries;\n }\n }\n return SearchSuggestResult;\n}());\nexports.SearchSuggestResult = SearchSuggestResult;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/sharepoint/searchsuggest.js\n// module id = 39\n// module chunks = 0","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar sharepointqueryable_1 = require(\"./sharepointqueryable\");\nvar webs_1 = require(\"./webs\");\nvar usercustomactions_1 = require(\"./usercustomactions\");\nvar odata_1 = require(\"./odata\");\nvar batch_1 = require(\"./batch\");\nvar features_1 = require(\"./features\");\n/**\n * Describes a site collection\n *\n */\nvar Site = /** @class */ (function (_super) {\n __extends(Site, _super);\n /**\n * Creates a new instance of the Site class\n *\n * @param baseUrl The url or SharePointQueryable which forms the parent of this site collection\n */\n function Site(baseUrl, path) {\n if (path === void 0) { path = \"_api/site\"; }\n return _super.call(this, baseUrl, path) || this;\n }\n Object.defineProperty(Site.prototype, \"rootWeb\", {\n /**\n * Gets the root web of the site collection\n *\n */\n get: function () {\n return new webs_1.Web(this, \"rootweb\");\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Site.prototype, \"features\", {\n /**\n * Gets the active features for this site collection\n *\n */\n get: function () {\n return new features_1.Features(this);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Site.prototype, \"userCustomActions\", {\n /**\n * Gets all custom actions for this site collection\n *\n */\n get: function () {\n return new usercustomactions_1.UserCustomActions(this);\n },\n enumerable: true,\n configurable: true\n });\n /**\n * Gets the context information for this site collection\n */\n Site.prototype.getContextInfo = function () {\n var q = new Site(this.parentUrl, \"_api/contextinfo\");\n return q.postCore().then(function (data) {\n if (data.hasOwnProperty(\"GetContextWebInformation\")) {\n var info = data.GetContextWebInformation;\n info.SupportedSchemaVersions = info.SupportedSchemaVersions.results;\n return info;\n }\n else {\n return data;\n }\n });\n };\n /**\n * Gets the document libraries on a site. Static method. (SharePoint Online only)\n *\n * @param absoluteWebUrl The absolute url of the web whose document libraries should be returned\n */\n Site.prototype.getDocumentLibraries = function (absoluteWebUrl) {\n var q = new sharepointqueryable_1.SharePointQueryable(\"\", \"_api/sp.web.getdocumentlibraries(@v)\");\n q.query.add(\"@v\", \"'\" + absoluteWebUrl + \"'\");\n return q.get().then(function (data) {\n if (data.hasOwnProperty(\"GetDocumentLibraries\")) {\n return data.GetDocumentLibraries;\n }\n else {\n return data;\n }\n });\n };\n /**\n * Gets the site url from a page url\n *\n * @param absolutePageUrl The absolute url of the page\n */\n Site.prototype.getWebUrlFromPageUrl = function (absolutePageUrl) {\n var q = new sharepointqueryable_1.SharePointQueryable(\"\", \"_api/sp.web.getweburlfrompageurl(@v)\");\n q.query.add(\"@v\", \"'\" + absolutePageUrl + \"'\");\n return q.get().then(function (data) {\n if (data.hasOwnProperty(\"GetWebUrlFromPageUrl\")) {\n return data.GetWebUrlFromPageUrl;\n }\n else {\n return data;\n }\n });\n };\n /**\n * Creates a new batch for requests within the context of this site collection\n *\n */\n Site.prototype.createBatch = function () {\n return new batch_1.ODataBatch(this.parentUrl);\n };\n /**\n * Opens a web by id (using POST)\n *\n * @param webId The GUID id of the web to open\n */\n Site.prototype.openWebById = function (webId) {\n return this.clone(Site, \"openWebById('\" + webId + \"')\").postCore().then(function (d) {\n return {\n data: d,\n web: webs_1.Web.fromUrl(odata_1.spExtractODataId(d)),\n };\n });\n };\n return Site;\n}(sharepointqueryable_1.SharePointQueryableInstance));\nexports.Site = Site;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/sharepoint/site.js\n// module id = 40\n// module chunks = 0","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar sharepointqueryable_1 = require(\"./sharepointqueryable\");\nvar LimitedWebPartManager = /** @class */ (function (_super) {\n __extends(LimitedWebPartManager, _super);\n function LimitedWebPartManager() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n Object.defineProperty(LimitedWebPartManager.prototype, \"webparts\", {\n /**\n * Gets the set of web part definitions contained by this web part manager\n *\n */\n get: function () {\n return new WebPartDefinitions(this, \"webparts\");\n },\n enumerable: true,\n configurable: true\n });\n /**\n * Exports a webpart definition\n *\n * @param id the GUID id of the definition to export\n */\n LimitedWebPartManager.prototype.export = function (id) {\n return this.clone(LimitedWebPartManager, \"ExportWebPart\").postCore({\n body: JSON.stringify({ webPartId: id }),\n });\n };\n /**\n * Imports a webpart\n *\n * @param xml webpart definition which must be valid XML in the .dwp or .webpart format\n */\n LimitedWebPartManager.prototype.import = function (xml) {\n return this.clone(LimitedWebPartManager, \"ImportWebPart\").postCore({\n body: JSON.stringify({ webPartXml: xml }),\n });\n };\n return LimitedWebPartManager;\n}(sharepointqueryable_1.SharePointQueryable));\nexports.LimitedWebPartManager = LimitedWebPartManager;\nvar WebPartDefinitions = /** @class */ (function (_super) {\n __extends(WebPartDefinitions, _super);\n function WebPartDefinitions() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n /**\n * Gets a web part definition from the collection by id\n *\n * @param id The storage ID of the SPWebPartDefinition to retrieve\n */\n WebPartDefinitions.prototype.getById = function (id) {\n return new WebPartDefinition(this, \"getbyid('\" + id + \"')\");\n };\n /**\n * Gets a web part definition from the collection by storage id\n *\n * @param id The WebPart.ID of the SPWebPartDefinition to retrieve\n */\n WebPartDefinitions.prototype.getByControlId = function (id) {\n return new WebPartDefinition(this, \"getByControlId('\" + id + \"')\");\n };\n return WebPartDefinitions;\n}(sharepointqueryable_1.SharePointQueryableCollection));\nexports.WebPartDefinitions = WebPartDefinitions;\nvar WebPartDefinition = /** @class */ (function (_super) {\n __extends(WebPartDefinition, _super);\n function WebPartDefinition() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n Object.defineProperty(WebPartDefinition.prototype, \"webpart\", {\n /**\n * Gets the webpart information associated with this definition\n */\n get: function () {\n return new WebPart(this);\n },\n enumerable: true,\n configurable: true\n });\n /**\n * Saves changes to the Web Part made using other properties and methods on the SPWebPartDefinition object\n */\n WebPartDefinition.prototype.saveChanges = function () {\n return this.clone(WebPartDefinition, \"SaveWebPartChanges\").postCore();\n };\n /**\n * Moves the Web Part to a different location on a Web Part Page\n *\n * @param zoneId The ID of the Web Part Zone to which to move the Web Part\n * @param zoneIndex A Web Part zone index that specifies the position at which the Web Part is to be moved within the destination Web Part zone\n */\n WebPartDefinition.prototype.moveTo = function (zoneId, zoneIndex) {\n return this.clone(WebPartDefinition, \"MoveWebPartTo(zoneID='\" + zoneId + \"', zoneIndex=\" + zoneIndex + \")\").postCore();\n };\n /**\n * Closes the Web Part. If the Web Part is already closed, this method does nothing\n */\n WebPartDefinition.prototype.close = function () {\n return this.clone(WebPartDefinition, \"CloseWebPart\").postCore();\n };\n /**\n * Opens the Web Part. If the Web Part is already closed, this method does nothing\n */\n WebPartDefinition.prototype.open = function () {\n return this.clone(WebPartDefinition, \"OpenWebPart\").postCore();\n };\n /**\n * Removes a webpart from a page, all settings will be lost\n */\n WebPartDefinition.prototype.delete = function () {\n return this.clone(WebPartDefinition, \"DeleteWebPart\").postCore();\n };\n return WebPartDefinition;\n}(sharepointqueryable_1.SharePointQueryableInstance));\nexports.WebPartDefinition = WebPartDefinition;\nvar WebPart = /** @class */ (function (_super) {\n __extends(WebPart, _super);\n /**\n * Creates a new instance of the WebPart class\n *\n * @param baseUrl The url or SharePointQueryable which forms the parent of this fields collection\n * @param path Optional, if supplied will be appended to the supplied baseUrl\n */\n function WebPart(baseUrl, path) {\n if (path === void 0) { path = \"webpart\"; }\n return _super.call(this, baseUrl, path) || this;\n }\n return WebPart;\n}(sharepointqueryable_1.SharePointQueryableInstance));\nexports.WebPart = WebPart;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/sharepoint/webparts.js\n// module id = 41\n// module chunks = 0","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar sharepointqueryable_1 = require(\"./sharepointqueryable\");\nvar parsers_1 = require(\"../odata/parsers\");\n/**\n * Describes a collection of Item objects\n *\n */\nvar AttachmentFiles = /** @class */ (function (_super) {\n __extends(AttachmentFiles, _super);\n /**\n * Creates a new instance of the AttachmentFiles class\n *\n * @param baseUrl The url or SharePointQueryable which forms the parent of this attachments collection\n */\n function AttachmentFiles(baseUrl, path) {\n if (path === void 0) { path = \"AttachmentFiles\"; }\n return _super.call(this, baseUrl, path) || this;\n }\n /**\n * Gets a Attachment File by filename\n *\n * @param name The name of the file, including extension.\n */\n AttachmentFiles.prototype.getByName = function (name) {\n var f = new AttachmentFile(this);\n f.concat(\"('\" + name + \"')\");\n return f;\n };\n /**\n * Adds a new attachment to the collection. Not supported for batching.\n *\n * @param name The name of the file, including extension.\n * @param content The Base64 file content.\n */\n AttachmentFiles.prototype.add = function (name, content) {\n var _this = this;\n return this.clone(AttachmentFiles, \"add(FileName='\" + name + \"')\", false).postCore({\n body: content,\n }).then(function (response) {\n return {\n data: response,\n file: _this.getByName(name),\n };\n });\n };\n /**\n * Adds mjultiple new attachment to the collection. Not supported for batching.\n *\n * @files name The collection of files to add\n */\n AttachmentFiles.prototype.addMultiple = function (files) {\n var _this = this;\n // add the files in series so we don't get update conflicts\n return files.reduce(function (chain, file) { return chain.then(function () { return _this.clone(AttachmentFiles, \"add(FileName='\" + file.name + \"')\", false).postCore({\n body: file.content,\n }); }); }, Promise.resolve());\n };\n return AttachmentFiles;\n}(sharepointqueryable_1.SharePointQueryableCollection));\nexports.AttachmentFiles = AttachmentFiles;\n/**\n * Describes a single attachment file instance\n *\n */\nvar AttachmentFile = /** @class */ (function (_super) {\n __extends(AttachmentFile, _super);\n function AttachmentFile() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n /**\n * Gets the contents of the file as text\n *\n */\n AttachmentFile.prototype.getText = function () {\n return this.clone(AttachmentFile, \"$value\", false).get(new parsers_1.TextFileParser());\n };\n /**\n * Gets the contents of the file as a blob, does not work in Node.js\n *\n */\n AttachmentFile.prototype.getBlob = function () {\n return this.clone(AttachmentFile, \"$value\", false).get(new parsers_1.BlobFileParser());\n };\n /**\n * Gets the contents of a file as an ArrayBuffer, works in Node.js\n */\n AttachmentFile.prototype.getBuffer = function () {\n return this.clone(AttachmentFile, \"$value\", false).get(new parsers_1.BufferFileParser());\n };\n /**\n * Gets the contents of a file as an ArrayBuffer, works in Node.js\n */\n AttachmentFile.prototype.getJSON = function () {\n return this.clone(AttachmentFile, \"$value\", false).get(new parsers_1.JSONFileParser());\n };\n /**\n * Sets the content of a file. Not supported for batching\n *\n * @param content The value to set for the file contents\n */\n AttachmentFile.prototype.setContent = function (content) {\n var _this = this;\n return this.clone(AttachmentFile, \"$value\", false).postCore({\n body: content,\n headers: {\n \"X-HTTP-Method\": \"PUT\",\n },\n }).then(function (_) { return new AttachmentFile(_this); });\n };\n /**\n * Delete this attachment file\n *\n * @param eTag Value used in the IF-Match header, by default \"*\"\n */\n AttachmentFile.prototype.delete = function (eTag) {\n if (eTag === void 0) { eTag = \"*\"; }\n return this.postCore({\n headers: {\n \"IF-Match\": eTag,\n \"X-HTTP-Method\": \"DELETE\",\n },\n });\n };\n return AttachmentFile;\n}(sharepointqueryable_1.SharePointQueryableInstance));\nexports.AttachmentFile = AttachmentFile;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/sharepoint/attachmentfiles.js\n// module id = 42\n// module chunks = 0","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar sharepointqueryable_1 = require(\"./sharepointqueryable\");\nvar util_1 = require(\"../utils/util\");\n/**\n * Describes the views available in the current context\n *\n */\nvar Views = /** @class */ (function (_super) {\n __extends(Views, _super);\n /**\n * Creates a new instance of the Views class\n *\n * @param baseUrl The url or SharePointQueryable which forms the parent of this fields collection\n */\n function Views(baseUrl, path) {\n if (path === void 0) { path = \"views\"; }\n return _super.call(this, baseUrl, path) || this;\n }\n /**\n * Gets a view by guid id\n *\n * @param id The GUID id of the view\n */\n Views.prototype.getById = function (id) {\n var v = new View(this);\n v.concat(\"('\" + id + \"')\");\n return v;\n };\n /**\n * Gets a view by title (case-sensitive)\n *\n * @param title The case-sensitive title of the view\n */\n Views.prototype.getByTitle = function (title) {\n return new View(this, \"getByTitle('\" + title + \"')\");\n };\n /**\n * Adds a new view to the collection\n *\n * @param title The new views's title\n * @param personalView True if this is a personal view, otherwise false, default = false\n * @param additionalSettings Will be passed as part of the view creation body\n */\n Views.prototype.add = function (title, personalView, additionalSettings) {\n var _this = this;\n if (personalView === void 0) { personalView = false; }\n if (additionalSettings === void 0) { additionalSettings = {}; }\n var postBody = JSON.stringify(util_1.Util.extend({\n \"PersonalView\": personalView,\n \"Title\": title,\n \"__metadata\": { \"type\": \"SP.View\" },\n }, additionalSettings));\n return this.clone(Views, null).postAsCore({ body: postBody }).then(function (data) {\n return {\n data: data,\n view: _this.getById(data.Id),\n };\n });\n };\n return Views;\n}(sharepointqueryable_1.SharePointQueryableCollection));\nexports.Views = Views;\n/**\n * Describes a single View instance\n *\n */\nvar View = /** @class */ (function (_super) {\n __extends(View, _super);\n function View() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n Object.defineProperty(View.prototype, \"fields\", {\n get: function () {\n return new ViewFields(this);\n },\n enumerable: true,\n configurable: true\n });\n /**\n * Updates this view intance with the supplied properties\n *\n * @param properties A plain object hash of values to update for the view\n */\n View.prototype.update = function (properties) {\n var _this = this;\n var postBody = JSON.stringify(util_1.Util.extend({\n \"__metadata\": { \"type\": \"SP.View\" },\n }, properties));\n return this.postCore({\n body: postBody,\n headers: {\n \"X-HTTP-Method\": \"MERGE\",\n },\n }).then(function (data) {\n return {\n data: data,\n view: _this,\n };\n });\n };\n /**\n * Delete this view\n *\n */\n View.prototype.delete = function () {\n return this.postCore({\n headers: {\n \"X-HTTP-Method\": \"DELETE\",\n },\n });\n };\n /**\n * Returns the list view as HTML.\n *\n */\n View.prototype.renderAsHtml = function () {\n return this.clone(sharepointqueryable_1.SharePointQueryable, \"renderashtml\").get();\n };\n return View;\n}(sharepointqueryable_1.SharePointQueryableInstance));\nexports.View = View;\nvar ViewFields = /** @class */ (function (_super) {\n __extends(ViewFields, _super);\n function ViewFields(baseUrl, path) {\n if (path === void 0) { path = \"viewfields\"; }\n return _super.call(this, baseUrl, path) || this;\n }\n /**\n * Gets a value that specifies the XML schema that represents the collection.\n */\n ViewFields.prototype.getSchemaXml = function () {\n return this.clone(sharepointqueryable_1.SharePointQueryable, \"schemaxml\").get();\n };\n /**\n * Adds the field with the specified field internal name or display name to the collection.\n *\n * @param fieldTitleOrInternalName The case-sensitive internal name or display name of the field to add.\n */\n ViewFields.prototype.add = function (fieldTitleOrInternalName) {\n return this.clone(ViewFields, \"addviewfield('\" + fieldTitleOrInternalName + \"')\").postCore();\n };\n /**\n * Moves the field with the specified field internal name to the specified position in the collection.\n *\n * @param fieldInternalName The case-sensitive internal name of the field to move.\n * @param index The zero-based index of the new position for the field.\n */\n ViewFields.prototype.move = function (fieldInternalName, index) {\n return this.clone(ViewFields, \"moveviewfieldto\").postCore({\n body: JSON.stringify({ \"field\": fieldInternalName, \"index\": index }),\n });\n };\n /**\n * Removes all the fields from the collection.\n */\n ViewFields.prototype.removeAll = function () {\n return this.clone(ViewFields, \"removeallviewfields\").postCore();\n };\n /**\n * Removes the field with the specified field internal name from the collection.\n *\n * @param fieldInternalName The case-sensitive internal name of the field to remove from the view.\n */\n ViewFields.prototype.remove = function (fieldInternalName) {\n return this.clone(ViewFields, \"removeviewfield('\" + fieldInternalName + \"')\").postCore();\n };\n return ViewFields;\n}(sharepointqueryable_1.SharePointQueryableCollection));\nexports.ViewFields = ViewFields;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/sharepoint/views.js\n// module id = 43\n// module chunks = 0","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar sharepointqueryable_1 = require(\"./sharepointqueryable\");\n/**\n * Describes a collection of Field objects\n *\n */\nvar Forms = /** @class */ (function (_super) {\n __extends(Forms, _super);\n /**\n * Creates a new instance of the Fields class\n *\n * @param baseUrl The url or SharePointQueryable which forms the parent of this fields collection\n */\n function Forms(baseUrl, path) {\n if (path === void 0) { path = \"forms\"; }\n return _super.call(this, baseUrl, path) || this;\n }\n /**\n * Gets a form by id\n *\n * @param id The guid id of the item to retrieve\n */\n Forms.prototype.getById = function (id) {\n var i = new Form(this);\n i.concat(\"('\" + id + \"')\");\n return i;\n };\n return Forms;\n}(sharepointqueryable_1.SharePointQueryableCollection));\nexports.Forms = Forms;\n/**\n * Describes a single of Form instance\n *\n */\nvar Form = /** @class */ (function (_super) {\n __extends(Form, _super);\n function Form() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n return Form;\n}(sharepointqueryable_1.SharePointQueryableInstance));\nexports.Form = Form;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/sharepoint/forms.js\n// module id = 44\n// module chunks = 0","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar sharepointqueryable_1 = require(\"./sharepointqueryable\");\n/**\n * Describes a collection of webhook subscriptions\n *\n */\nvar Subscriptions = /** @class */ (function (_super) {\n __extends(Subscriptions, _super);\n /**\n * Creates a new instance of the Subscriptions class\n *\n * @param baseUrl - The url or SharePointQueryable which forms the parent of this webhook subscriptions collection\n */\n function Subscriptions(baseUrl, path) {\n if (path === void 0) { path = \"subscriptions\"; }\n return _super.call(this, baseUrl, path) || this;\n }\n /**\n * Returns all the webhook subscriptions or the specified webhook subscription\n *\n * @param subscriptionId The id of a specific webhook subscription to retrieve, omit to retrieve all the webhook subscriptions\n */\n Subscriptions.prototype.getById = function (subscriptionId) {\n var subscription = new Subscription(this);\n subscription.concat(\"('\" + subscriptionId + \"')\");\n return subscription;\n };\n /**\n * Creates a new webhook subscription\n *\n * @param notificationUrl The url to receive the notifications\n * @param expirationDate The date and time to expire the subscription in the form YYYY-MM-ddTHH:mm:ss+00:00 (maximum of 6 months)\n * @param clientState A client specific string (defaults to pnp-js-core-subscription when omitted)\n */\n Subscriptions.prototype.add = function (notificationUrl, expirationDate, clientState) {\n var _this = this;\n var postBody = JSON.stringify({\n \"clientState\": clientState || \"pnp-js-core-subscription\",\n \"expirationDateTime\": expirationDate,\n \"notificationUrl\": notificationUrl,\n \"resource\": this.toUrl(),\n });\n return this.postCore({ body: postBody, headers: { \"Content-Type\": \"application/json\" } }).then(function (result) {\n return { data: result, subscription: _this.getById(result.id) };\n });\n };\n return Subscriptions;\n}(sharepointqueryable_1.SharePointQueryableCollection));\nexports.Subscriptions = Subscriptions;\n/**\n * Describes a single webhook subscription instance\n *\n */\nvar Subscription = /** @class */ (function (_super) {\n __extends(Subscription, _super);\n function Subscription() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n /**\n * Renews this webhook subscription\n *\n * @param expirationDate The date and time to expire the subscription in the form YYYY-MM-ddTHH:mm:ss+00:00 (maximum of 6 months)\n */\n Subscription.prototype.update = function (expirationDate) {\n var _this = this;\n var postBody = JSON.stringify({\n \"expirationDateTime\": expirationDate,\n });\n return this.patchCore({ body: postBody, headers: { \"Content-Type\": \"application/json\" } }).then(function (data) {\n return { data: data, subscription: _this };\n });\n };\n /**\n * Removes this webhook subscription\n *\n */\n Subscription.prototype.delete = function () {\n return _super.prototype.deleteCore.call(this);\n };\n return Subscription;\n}(sharepointqueryable_1.SharePointQueryableInstance));\nexports.Subscription = Subscription;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/sharepoint/subscriptions.js\n// module id = 45\n// module chunks = 0","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar util_1 = require(\"../utils/util\");\nvar sharepointqueryable_1 = require(\"./sharepointqueryable\");\n/**\n * Represents a collection of navigation nodes\n *\n */\nvar NavigationNodes = /** @class */ (function (_super) {\n __extends(NavigationNodes, _super);\n function NavigationNodes() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n /**\n * Gets a navigation node by id\n *\n * @param id The id of the node\n */\n NavigationNodes.prototype.getById = function (id) {\n var node = new NavigationNode(this);\n node.concat(\"(\" + id + \")\");\n return node;\n };\n /**\n * Adds a new node to the collection\n *\n * @param title Display name of the node\n * @param url The url of the node\n * @param visible If true the node is visible, otherwise it is hidden (default: true)\n */\n NavigationNodes.prototype.add = function (title, url, visible) {\n var _this = this;\n if (visible === void 0) { visible = true; }\n var postBody = JSON.stringify({\n IsVisible: visible,\n Title: title,\n Url: url,\n \"__metadata\": { \"type\": \"SP.NavigationNode\" },\n });\n return this.clone(NavigationNodes, null).postCore({ body: postBody }).then(function (data) {\n return {\n data: data,\n node: _this.getById(data.Id),\n };\n });\n };\n /**\n * Moves a node to be after another node in the navigation\n *\n * @param nodeId Id of the node to move\n * @param previousNodeId Id of the node after which we move the node specified by nodeId\n */\n NavigationNodes.prototype.moveAfter = function (nodeId, previousNodeId) {\n var postBody = JSON.stringify({\n nodeId: nodeId,\n previousNodeId: previousNodeId,\n });\n return this.clone(NavigationNodes, \"MoveAfter\").postCore({ body: postBody });\n };\n return NavigationNodes;\n}(sharepointqueryable_1.SharePointQueryableCollection));\nexports.NavigationNodes = NavigationNodes;\n/**\n * Represents an instance of a navigation node\n *\n */\nvar NavigationNode = /** @class */ (function (_super) {\n __extends(NavigationNode, _super);\n function NavigationNode() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n Object.defineProperty(NavigationNode.prototype, \"children\", {\n /**\n * Represents the child nodes of this node\n */\n get: function () {\n return new NavigationNodes(this, \"Children\");\n },\n enumerable: true,\n configurable: true\n });\n /**\n * Updates this node based on the supplied properties\n *\n * @param properties The hash of key/value pairs to update\n */\n NavigationNode.prototype.update = function (properties) {\n var _this = this;\n var postBody = JSON.stringify(util_1.Util.extend({\n \"__metadata\": { \"type\": \"SP.NavigationNode\" },\n }, properties));\n return this.postCore({\n body: postBody,\n headers: {\n \"X-HTTP-Method\": \"MERGE\",\n },\n }).then(function (data) {\n return {\n data: data,\n node: _this,\n };\n });\n };\n /**\n * Deletes this node and any child nodes\n */\n NavigationNode.prototype.delete = function () {\n return _super.prototype.deleteCore.call(this);\n };\n return NavigationNode;\n}(sharepointqueryable_1.SharePointQueryableInstance));\nexports.NavigationNode = NavigationNode;\n/**\n * Exposes the navigation components\n *\n */\nvar Navigation = /** @class */ (function (_super) {\n __extends(Navigation, _super);\n /**\n * Creates a new instance of the Navigation class\n *\n * @param baseUrl The url or SharePointQueryable which forms the parent of these navigation components\n */\n function Navigation(baseUrl, path) {\n if (path === void 0) { path = \"navigation\"; }\n return _super.call(this, baseUrl, path) || this;\n }\n Object.defineProperty(Navigation.prototype, \"quicklaunch\", {\n /**\n * Gets the quicklaunch navigation nodes for the current context\n *\n */\n get: function () {\n return new NavigationNodes(this, \"quicklaunch\");\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Navigation.prototype, \"topNavigationBar\", {\n /**\n * Gets the top bar navigation nodes for the current context\n *\n */\n get: function () {\n return new NavigationNodes(this, \"topnavigationbar\");\n },\n enumerable: true,\n configurable: true\n });\n return Navigation;\n}(sharepointqueryable_1.SharePointQueryable));\nexports.Navigation = Navigation;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/sharepoint/navigation.js\n// module id = 46\n// module chunks = 0","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar sharepointqueryable_1 = require(\"./sharepointqueryable\");\nvar RelatedItemManagerImpl = /** @class */ (function (_super) {\n __extends(RelatedItemManagerImpl, _super);\n function RelatedItemManagerImpl(baseUrl, path) {\n if (path === void 0) { path = \"_api/SP.RelatedItemManager\"; }\n return _super.call(this, baseUrl, path) || this;\n }\n RelatedItemManagerImpl.FromUrl = function (url) {\n if (url === null) {\n return new RelatedItemManagerImpl(\"\");\n }\n var index = url.indexOf(\"_api/\");\n if (index > -1) {\n return new RelatedItemManagerImpl(url.substr(0, index));\n }\n return new RelatedItemManagerImpl(url);\n };\n RelatedItemManagerImpl.prototype.getRelatedItems = function (sourceListName, sourceItemId) {\n var query = this.clone(RelatedItemManagerImpl, null);\n query.concat(\".GetRelatedItems\");\n return query.postCore({\n body: JSON.stringify({\n SourceItemID: sourceItemId,\n SourceListName: sourceListName,\n }),\n });\n };\n RelatedItemManagerImpl.prototype.getPageOneRelatedItems = function (sourceListName, sourceItemId) {\n var query = this.clone(RelatedItemManagerImpl, null);\n query.concat(\".GetPageOneRelatedItems\");\n return query.postCore({\n body: JSON.stringify({\n SourceItemID: sourceItemId,\n SourceListName: sourceListName,\n }),\n });\n };\n RelatedItemManagerImpl.prototype.addSingleLink = function (sourceListName, sourceItemId, sourceWebUrl, targetListName, targetItemID, targetWebUrl, tryAddReverseLink) {\n if (tryAddReverseLink === void 0) { tryAddReverseLink = false; }\n var query = this.clone(RelatedItemManagerImpl, null);\n query.concat(\".AddSingleLink\");\n return query.postCore({\n body: JSON.stringify({\n SourceItemID: sourceItemId,\n SourceListName: sourceListName,\n SourceWebUrl: sourceWebUrl,\n TargetItemID: targetItemID,\n TargetListName: targetListName,\n TargetWebUrl: targetWebUrl,\n TryAddReverseLink: tryAddReverseLink,\n }),\n });\n };\n /**\n * Adds a related item link from an item specified by list name and item id, to an item specified by url\n *\n * @param sourceListName The source list name or list id\n * @param sourceItemId The source item id\n * @param targetItemUrl The target item url\n * @param tryAddReverseLink If set to true try to add the reverse link (will not return error if it fails)\n */\n RelatedItemManagerImpl.prototype.addSingleLinkToUrl = function (sourceListName, sourceItemId, targetItemUrl, tryAddReverseLink) {\n if (tryAddReverseLink === void 0) { tryAddReverseLink = false; }\n var query = this.clone(RelatedItemManagerImpl, null);\n query.concat(\".AddSingleLinkToUrl\");\n return query.postCore({\n body: JSON.stringify({\n SourceItemID: sourceItemId,\n SourceListName: sourceListName,\n TargetItemUrl: targetItemUrl,\n TryAddReverseLink: tryAddReverseLink,\n }),\n });\n };\n /**\n * Adds a related item link from an item specified by url, to an item specified by list name and item id\n *\n * @param sourceItemUrl The source item url\n * @param targetListName The target list name or list id\n * @param targetItemId The target item id\n * @param tryAddReverseLink If set to true try to add the reverse link (will not return error if it fails)\n */\n RelatedItemManagerImpl.prototype.addSingleLinkFromUrl = function (sourceItemUrl, targetListName, targetItemId, tryAddReverseLink) {\n if (tryAddReverseLink === void 0) { tryAddReverseLink = false; }\n var query = this.clone(RelatedItemManagerImpl, null);\n query.concat(\".AddSingleLinkFromUrl\");\n return query.postCore({\n body: JSON.stringify({\n SourceItemUrl: sourceItemUrl,\n TargetItemID: targetItemId,\n TargetListName: targetListName,\n TryAddReverseLink: tryAddReverseLink,\n }),\n });\n };\n RelatedItemManagerImpl.prototype.deleteSingleLink = function (sourceListName, sourceItemId, sourceWebUrl, targetListName, targetItemId, targetWebUrl, tryDeleteReverseLink) {\n if (tryDeleteReverseLink === void 0) { tryDeleteReverseLink = false; }\n var query = this.clone(RelatedItemManagerImpl, null);\n query.concat(\".DeleteSingleLink\");\n return query.postCore({\n body: JSON.stringify({\n SourceItemID: sourceItemId,\n SourceListName: sourceListName,\n SourceWebUrl: sourceWebUrl,\n TargetItemID: targetItemId,\n TargetListName: targetListName,\n TargetWebUrl: targetWebUrl,\n TryDeleteReverseLink: tryDeleteReverseLink,\n }),\n });\n };\n return RelatedItemManagerImpl;\n}(sharepointqueryable_1.SharePointQueryable));\nexports.RelatedItemManagerImpl = RelatedItemManagerImpl;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/sharepoint/relateditems.js\n// module id = 47\n// module chunks = 0","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar sharepointqueryable_1 = require(\"./sharepointqueryable\");\nvar files_1 = require(\"../utils/files\");\nvar parsers_1 = require(\"../odata/parsers\");\nvar UserProfileQuery = /** @class */ (function (_super) {\n __extends(UserProfileQuery, _super);\n /**\n * Creates a new instance of the UserProfileQuery class\n *\n * @param baseUrl The url or SharePointQueryable which forms the parent of this user profile query\n */\n function UserProfileQuery(baseUrl, path) {\n if (path === void 0) { path = \"_api/sp.userprofiles.peoplemanager\"; }\n var _this = _super.call(this, baseUrl, path) || this;\n _this.profileLoader = new ProfileLoader(baseUrl);\n return _this;\n }\n Object.defineProperty(UserProfileQuery.prototype, \"editProfileLink\", {\n /**\n * The url of the edit profile page for the current user\n */\n get: function () {\n return this.clone(UserProfileQuery, \"EditProfileLink\").getAs(parsers_1.ODataValue());\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(UserProfileQuery.prototype, \"isMyPeopleListPublic\", {\n /**\n * A boolean value that indicates whether the current user's \"People I'm Following\" list is public\n */\n get: function () {\n return this.clone(UserProfileQuery, \"IsMyPeopleListPublic\").getAs(parsers_1.ODataValue());\n },\n enumerable: true,\n configurable: true\n });\n /**\n * A boolean value that indicates whether the current user is being followed by the specified user\n *\n * @param loginName The account name of the user\n */\n UserProfileQuery.prototype.amIFollowedBy = function (loginName) {\n var q = this.clone(UserProfileQuery, \"amifollowedby(@v)\");\n q.query.add(\"@v\", \"'\" + encodeURIComponent(loginName) + \"'\");\n return q.get();\n };\n /**\n * A boolean value that indicates whether the current user is following the specified user\n *\n * @param loginName The account name of the user\n */\n UserProfileQuery.prototype.amIFollowing = function (loginName) {\n var q = this.clone(UserProfileQuery, \"amifollowing(@v)\");\n q.query.add(\"@v\", \"'\" + encodeURIComponent(loginName) + \"'\");\n return q.get();\n };\n /**\n * Gets tags that the current user is following\n *\n * @param maxCount The maximum number of tags to retrieve (default is 20)\n */\n UserProfileQuery.prototype.getFollowedTags = function (maxCount) {\n if (maxCount === void 0) { maxCount = 20; }\n return this.clone(UserProfileQuery, \"getfollowedtags(\" + maxCount + \")\").get();\n };\n /**\n * Gets the people who are following the specified user\n *\n * @param loginName The account name of the user\n */\n UserProfileQuery.prototype.getFollowersFor = function (loginName) {\n var q = this.clone(UserProfileQuery, \"getfollowersfor(@v)\");\n q.query.add(\"@v\", \"'\" + encodeURIComponent(loginName) + \"'\");\n return q.get();\n };\n Object.defineProperty(UserProfileQuery.prototype, \"myFollowers\", {\n /**\n * Gets the people who are following the current user\n *\n */\n get: function () {\n return new sharepointqueryable_1.SharePointQueryableCollection(this, \"getmyfollowers\");\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(UserProfileQuery.prototype, \"myProperties\", {\n /**\n * Gets user properties for the current user\n *\n */\n get: function () {\n return new UserProfileQuery(this, \"getmyproperties\");\n },\n enumerable: true,\n configurable: true\n });\n /**\n * Gets the people who the specified user is following\n *\n * @param loginName The account name of the user.\n */\n UserProfileQuery.prototype.getPeopleFollowedBy = function (loginName) {\n var q = this.clone(UserProfileQuery, \"getpeoplefollowedby(@v)\");\n q.query.add(\"@v\", \"'\" + encodeURIComponent(loginName) + \"'\");\n return q.get();\n };\n /**\n * Gets user properties for the specified user.\n *\n * @param loginName The account name of the user.\n */\n UserProfileQuery.prototype.getPropertiesFor = function (loginName) {\n var q = this.clone(UserProfileQuery, \"getpropertiesfor(@v)\");\n q.query.add(\"@v\", \"'\" + encodeURIComponent(loginName) + \"'\");\n return q.get();\n };\n Object.defineProperty(UserProfileQuery.prototype, \"trendingTags\", {\n /**\n * Gets the 20 most popular hash tags over the past week, sorted so that the most popular tag appears first\n *\n */\n get: function () {\n var q = this.clone(UserProfileQuery, null);\n q.concat(\".gettrendingtags\");\n return q.get();\n },\n enumerable: true,\n configurable: true\n });\n /**\n * Gets the specified user profile property for the specified user\n *\n * @param loginName The account name of the user\n * @param propertyName The case-sensitive name of the property to get\n */\n UserProfileQuery.prototype.getUserProfilePropertyFor = function (loginName, propertyName) {\n var q = this.clone(UserProfileQuery, \"getuserprofilepropertyfor(accountname=@v, propertyname='\" + propertyName + \"')\");\n q.query.add(\"@v\", \"'\" + encodeURIComponent(loginName) + \"'\");\n return q.get();\n };\n /**\n * Removes the specified user from the user's list of suggested people to follow\n *\n * @param loginName The account name of the user\n */\n UserProfileQuery.prototype.hideSuggestion = function (loginName) {\n var q = this.clone(UserProfileQuery, \"hidesuggestion(@v)\");\n q.query.add(\"@v\", \"'\" + encodeURIComponent(loginName) + \"'\");\n return q.postCore();\n };\n /**\n * A boolean values that indicates whether the first user is following the second user\n *\n * @param follower The account name of the user who might be following the followee\n * @param followee The account name of the user who might be followed by the follower\n */\n UserProfileQuery.prototype.isFollowing = function (follower, followee) {\n var q = this.clone(UserProfileQuery, null);\n q.concat(\".isfollowing(possiblefolloweraccountname=@v, possiblefolloweeaccountname=@y)\");\n q.query.add(\"@v\", \"'\" + encodeURIComponent(follower) + \"'\");\n q.query.add(\"@y\", \"'\" + encodeURIComponent(followee) + \"'\");\n return q.get();\n };\n /**\n * Uploads and sets the user profile picture (Users can upload a picture to their own profile only). Not supported for batching.\n *\n * @param profilePicSource Blob data representing the user's picture in BMP, JPEG, or PNG format of up to 4.76MB\n */\n UserProfileQuery.prototype.setMyProfilePic = function (profilePicSource) {\n var _this = this;\n return new Promise(function (resolve, reject) {\n files_1.readBlobAsArrayBuffer(profilePicSource).then(function (buffer) {\n var request = new UserProfileQuery(_this, \"setmyprofilepicture\");\n request.postCore({\n body: String.fromCharCode.apply(null, new Uint16Array(buffer)),\n }).then(function (_) { return resolve(); });\n }).catch(function (e) { return reject(e); });\n });\n };\n /**\n * Provisions one or more users' personal sites. (My Site administrator on SharePoint Online only)\n *\n * @param emails The email addresses of the users to provision sites for\n */\n UserProfileQuery.prototype.createPersonalSiteEnqueueBulk = function () {\n var emails = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n emails[_i] = arguments[_i];\n }\n return this.profileLoader.createPersonalSiteEnqueueBulk(emails);\n };\n Object.defineProperty(UserProfileQuery.prototype, \"ownerUserProfile\", {\n /**\n * Gets the user profile of the site owner\n *\n */\n get: function () {\n return this.profileLoader.ownerUserProfile;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(UserProfileQuery.prototype, \"userProfile\", {\n /**\n * Gets the user profile for the current user\n */\n get: function () {\n return this.profileLoader.userProfile;\n },\n enumerable: true,\n configurable: true\n });\n /**\n * Enqueues creating a personal site for this user, which can be used to share documents, web pages, and other files\n *\n * @param interactiveRequest true if interactively (web) initiated request, or false (default) if non-interactively (client) initiated request\n */\n UserProfileQuery.prototype.createPersonalSite = function (interactiveRequest) {\n if (interactiveRequest === void 0) { interactiveRequest = false; }\n return this.profileLoader.createPersonalSite(interactiveRequest);\n };\n /**\n * Sets the privacy settings for this profile\n *\n * @param share true to make all social data public; false to make all social data private\n */\n UserProfileQuery.prototype.shareAllSocialData = function (share) {\n return this.profileLoader.shareAllSocialData(share);\n };\n return UserProfileQuery;\n}(sharepointqueryable_1.SharePointQueryableInstance));\nexports.UserProfileQuery = UserProfileQuery;\nvar ProfileLoader = /** @class */ (function (_super) {\n __extends(ProfileLoader, _super);\n /**\n * Creates a new instance of the ProfileLoader class\n *\n * @param baseUrl The url or SharePointQueryable which forms the parent of this profile loader\n */\n function ProfileLoader(baseUrl, path) {\n if (path === void 0) { path = \"_api/sp.userprofiles.profileloader.getprofileloader\"; }\n return _super.call(this, baseUrl, path) || this;\n }\n /**\n * Provisions one or more users' personal sites. (My Site administrator on SharePoint Online only) Doesn't support batching\n *\n * @param emails The email addresses of the users to provision sites for\n */\n ProfileLoader.prototype.createPersonalSiteEnqueueBulk = function (emails) {\n return this.clone(ProfileLoader, \"createpersonalsiteenqueuebulk\", false).postCore({\n body: JSON.stringify({ \"emailIDs\": emails }),\n });\n };\n Object.defineProperty(ProfileLoader.prototype, \"ownerUserProfile\", {\n /**\n * Gets the user profile of the site owner.\n *\n */\n get: function () {\n var q = this.getParent(ProfileLoader, this.parentUrl, \"_api/sp.userprofiles.profileloader.getowneruserprofile\");\n if (this.hasBatch) {\n q = q.inBatch(this.batch);\n }\n return q.postAsCore();\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(ProfileLoader.prototype, \"userProfile\", {\n /**\n * Gets the user profile of the current user.\n *\n */\n get: function () {\n return this.clone(ProfileLoader, \"getuserprofile\").postAsCore();\n },\n enumerable: true,\n configurable: true\n });\n /**\n * Enqueues creating a personal site for this user, which can be used to share documents, web pages, and other files.\n *\n * @param interactiveRequest true if interactively (web) initiated request, or false (default) if non-interactively (client) initiated request\n */\n ProfileLoader.prototype.createPersonalSite = function (interactiveRequest) {\n if (interactiveRequest === void 0) { interactiveRequest = false; }\n return this.clone(ProfileLoader, \"getuserprofile/createpersonalsiteenque(\" + interactiveRequest + \")\").postCore();\n };\n /**\n * Sets the privacy settings for this profile\n *\n * @param share true to make all social data public; false to make all social data private.\n */\n ProfileLoader.prototype.shareAllSocialData = function (share) {\n return this.clone(ProfileLoader, \"getuserprofile/shareallsocialdata(\" + share + \")\").postCore();\n };\n return ProfileLoader;\n}(sharepointqueryable_1.SharePointQueryable));\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/sharepoint/userprofiles.js\n// module id = 48\n// module chunks = 0","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\n/**\n * Reads a blob as text\n *\n * @param blob The data to read\n */\nfunction readBlobAsText(blob) {\n return readBlobAs(blob, \"string\");\n}\nexports.readBlobAsText = readBlobAsText;\n/**\n * Reads a blob into an array buffer\n *\n * @param blob The data to read\n */\nfunction readBlobAsArrayBuffer(blob) {\n return readBlobAs(blob, \"buffer\");\n}\nexports.readBlobAsArrayBuffer = readBlobAsArrayBuffer;\n/**\n * Generic method to read blob's content\n *\n * @param blob The data to read\n * @param mode The read mode\n */\nfunction readBlobAs(blob, mode) {\n return new Promise(function (resolve, reject) {\n try {\n var reader = new FileReader();\n reader.onload = function (e) {\n resolve(e.target.result);\n };\n switch (mode) {\n case \"string\":\n reader.readAsText(blob);\n break;\n case \"buffer\":\n reader.readAsArrayBuffer(blob);\n break;\n }\n }\n catch (e) {\n reject(e);\n }\n });\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/utils/files.js\n// module id = 49\n// module chunks = 0","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar sharepointqueryable_1 = require(\"./sharepointqueryable\");\nvar util_1 = require(\"../utils/util\");\nvar files_1 = require(\"./files\");\nvar odata_1 = require(\"./odata\");\n/**\n * Allows for calling of the static SP.Utilities.Utility methods by supplying the method name\n */\nvar UtilityMethod = /** @class */ (function (_super) {\n __extends(UtilityMethod, _super);\n /**\n * Creates a new instance of the Utility method class\n *\n * @param baseUrl The parent url provider\n * @param methodName The static method name to call on the utility class\n */\n function UtilityMethod(baseUrl, methodName) {\n return _super.call(this, UtilityMethod.getBaseUrl(baseUrl), \"_api/SP.Utilities.Utility.\" + methodName) || this;\n }\n UtilityMethod.getBaseUrl = function (candidate) {\n if (typeof candidate === \"string\") {\n return candidate;\n }\n var c = candidate;\n var url = c.toUrl();\n var index = url.indexOf(\"_api/\");\n if (index < 0) {\n return url;\n }\n return url.substr(0, index);\n };\n UtilityMethod.prototype.excute = function (props) {\n return this.postAsCore({\n body: JSON.stringify(props),\n });\n };\n /**\n * Clones this SharePointQueryable into a new SharePointQueryable instance of T\n * @param factory Constructor used to create the new instance\n * @param additionalPath Any additional path to include in the clone\n * @param includeBatch If true this instance's batch will be added to the cloned instance\n */\n UtilityMethod.prototype.create = function (methodName, includeBatch) {\n var clone = new UtilityMethod(this.parentUrl, methodName);\n var target = this.query.get(\"@target\");\n if (target !== null) {\n clone.query.add(\"@target\", target);\n }\n if (includeBatch && this.hasBatch) {\n clone = clone.inBatch(this.batch);\n }\n return clone;\n };\n /**\n * Sends an email based on the supplied properties\n *\n * @param props The properties of the email to send\n */\n UtilityMethod.prototype.sendEmail = function (props) {\n var params = {\n properties: {\n Body: props.Body,\n From: props.From,\n Subject: props.Subject,\n \"__metadata\": { \"type\": \"SP.Utilities.EmailProperties\" },\n },\n };\n if (props.To && props.To.length > 0) {\n params.properties = util_1.Util.extend(params.properties, {\n To: { results: props.To },\n });\n }\n if (props.CC && props.CC.length > 0) {\n params.properties = util_1.Util.extend(params.properties, {\n CC: { results: props.CC },\n });\n }\n if (props.BCC && props.BCC.length > 0) {\n params.properties = util_1.Util.extend(params.properties, {\n BCC: { results: props.BCC },\n });\n }\n if (props.AdditionalHeaders) {\n params.properties = util_1.Util.extend(params.properties, {\n AdditionalHeaders: props.AdditionalHeaders,\n });\n }\n return this.create(\"SendEmail\", true).excute(params);\n };\n UtilityMethod.prototype.getCurrentUserEmailAddresses = function () {\n return this.create(\"GetCurrentUserEmailAddresses\", true).excute({});\n };\n UtilityMethod.prototype.resolvePrincipal = function (input, scopes, sources, inputIsEmailOnly, addToUserInfoList, matchUserInfoList) {\n if (matchUserInfoList === void 0) { matchUserInfoList = false; }\n var params = {\n addToUserInfoList: addToUserInfoList,\n input: input,\n inputIsEmailOnly: inputIsEmailOnly,\n matchUserInfoList: matchUserInfoList,\n scopes: scopes,\n sources: sources,\n };\n return this.create(\"ResolvePrincipalInCurrentContext\", true).excute(params);\n };\n UtilityMethod.prototype.searchPrincipals = function (input, scopes, sources, groupName, maxCount) {\n var params = {\n groupName: groupName,\n input: input,\n maxCount: maxCount,\n scopes: scopes,\n sources: sources,\n };\n return this.create(\"SearchPrincipalsUsingContextWeb\", true).excute(params);\n };\n UtilityMethod.prototype.createEmailBodyForInvitation = function (pageAddress) {\n var params = {\n pageAddress: pageAddress,\n };\n return this.create(\"CreateEmailBodyForInvitation\", true).excute(params);\n };\n UtilityMethod.prototype.expandGroupsToPrincipals = function (inputs, maxCount) {\n if (maxCount === void 0) { maxCount = 30; }\n var params = {\n inputs: inputs,\n maxCount: maxCount,\n };\n return this.create(\"ExpandGroupsToPrincipals\", true).excute(params);\n };\n UtilityMethod.prototype.createWikiPage = function (info) {\n return this.create(\"CreateWikiPageInContextWeb\", true).excute({\n parameters: info,\n }).then(function (r) {\n return {\n data: r,\n file: new files_1.File(odata_1.spExtractODataId(r)),\n };\n });\n };\n return UtilityMethod;\n}(sharepointqueryable_1.SharePointQueryable));\nexports.UtilityMethod = UtilityMethod;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/sharepoint/utilities.js\n// module id = 50\n// module chunks = 0","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar v1_1 = require(\"./v1\");\nvar GraphRest = /** @class */ (function () {\n function GraphRest() {\n }\n Object.defineProperty(GraphRest.prototype, \"v1\", {\n get: function () {\n return new v1_1.V1(\"\");\n },\n enumerable: true,\n configurable: true\n });\n return GraphRest;\n}());\nexports.GraphRest = GraphRest;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/graph/rest.js\n// module id = 51\n// module chunks = 0","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar graphqueryable_1 = require(\"./graphqueryable\");\nvar groups_1 = require(\"./groups\");\n// import { Me } from \"./me\";\n/**\n * Root object wrapping v1 functionality for MS Graph\n *\n */\nvar V1 = /** @class */ (function (_super) {\n __extends(V1, _super);\n /**\n * Creates a new instance of the V1 class\n *\n * @param baseUrl The url or Queryable which forms the parent of this fields collection\n * @param path Optional additional path\n */\n function V1(baseUrl, path) {\n if (path === void 0) { path = \"v1.0\"; }\n return _super.call(this, baseUrl, path) || this;\n }\n Object.defineProperty(V1.prototype, \"groups\", {\n get: function () {\n return new groups_1.Groups(this);\n },\n enumerable: true,\n configurable: true\n });\n return V1;\n}(graphqueryable_1.GraphQueryable));\nexports.V1 = V1;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/graph/v1.js\n// module id = 52\n// module chunks = 0","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar util_1 = require(\"../utils/util\");\nvar pnplibconfig_1 = require(\"../configuration/pnplibconfig\");\nvar utils_1 = require(\"./utils\");\n// import { APIUrlException } from \"../utils/exceptions\";\nvar GraphHttpClient = /** @class */ (function () {\n function GraphHttpClient() {\n this._impl = pnplibconfig_1.RuntimeConfig.graphFetchClientFactory();\n }\n GraphHttpClient.prototype.fetch = function (url, options) {\n if (options === void 0) { options = {}; }\n var headers = new Headers();\n // first we add the global headers so they can be overwritten by any passed in locally to this call\n utils_1.mergeHeaders(headers, pnplibconfig_1.RuntimeConfig.graphHeaders);\n // second we add the local options so we can overwrite the globals\n utils_1.mergeHeaders(headers, options.headers);\n var opts = util_1.Util.extend(options, { headers: headers });\n // TODO: we could process auth here\n return this.fetchRaw(url, opts);\n };\n GraphHttpClient.prototype.fetchRaw = function (url, options) {\n var _this = this;\n if (options === void 0) { options = {}; }\n // here we need to normalize the headers\n var rawHeaders = new Headers();\n utils_1.mergeHeaders(rawHeaders, options.headers);\n options = util_1.Util.extend(options, { headers: rawHeaders });\n var retry = function (ctx) {\n _this._impl.fetch(url, {}, options).then(function (response) { return ctx.resolve(response); }).catch(function (response) {\n // Check if request was throttled - http status code 429\n // Check if request failed due to server unavailable - http status code 503\n if (response.status !== 429 && response.status !== 503) {\n ctx.reject(response);\n }\n // grab our current delay\n var delay = ctx.delay;\n // Increment our counters.\n ctx.delay *= 2;\n ctx.attempts++;\n // If we have exceeded the retry count, reject.\n if (ctx.retryCount <= ctx.attempts) {\n ctx.reject(response);\n }\n // Set our retry timeout for {delay} milliseconds.\n setTimeout(util_1.Util.getCtxCallback(_this, retry, ctx), delay);\n });\n };\n return new Promise(function (resolve, reject) {\n var retryContext = {\n attempts: 0,\n delay: 100,\n reject: reject,\n resolve: resolve,\n retryCount: 7,\n };\n retry.call(_this, retryContext);\n });\n };\n GraphHttpClient.prototype.get = function (url, options) {\n if (options === void 0) { options = {}; }\n var opts = util_1.Util.extend(options, { method: \"GET\" });\n return this.fetch(url, opts);\n };\n GraphHttpClient.prototype.post = function (url, options) {\n if (options === void 0) { options = {}; }\n var opts = util_1.Util.extend(options, { method: \"POST\" });\n return this.fetch(url, opts);\n };\n GraphHttpClient.prototype.patch = function (url, options) {\n if (options === void 0) { options = {}; }\n var opts = util_1.Util.extend(options, { method: \"PATCH\" });\n return this.fetch(url, opts);\n };\n GraphHttpClient.prototype.delete = function (url, options) {\n if (options === void 0) { options = {}; }\n var opts = util_1.Util.extend(options, { method: \"DELETE\" });\n return this.fetch(url, opts);\n };\n return GraphHttpClient;\n}());\nexports.GraphHttpClient = GraphHttpClient;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/net/graphclient.js\n// module id = 53\n// module chunks = 0","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar graphqueryable_1 = require(\"./graphqueryable\");\nvar members_1 = require(\"./members\");\nvar util_1 = require(\"../utils/util\");\nvar calendars_1 = require(\"./calendars\");\nvar conversations_1 = require(\"./conversations\");\nvar plans_1 = require(\"./plans\");\nvar photos_1 = require(\"./photos\");\nvar GroupType;\n(function (GroupType) {\n /**\n * Office 365 (aka unified group)\n */\n GroupType[GroupType[\"Office365\"] = 0] = \"Office365\";\n /**\n * Dynamic membership\n */\n GroupType[GroupType[\"Dynamic\"] = 1] = \"Dynamic\";\n /**\n * Security\n */\n GroupType[GroupType[\"Security\"] = 2] = \"Security\";\n})(GroupType = exports.GroupType || (exports.GroupType = {}));\n/**\n * Describes a collection of Field objects\n *\n */\nvar Groups = /** @class */ (function (_super) {\n __extends(Groups, _super);\n function Groups(baseUrl, path) {\n if (path === void 0) { path = \"groups\"; }\n return _super.call(this, baseUrl, path) || this;\n }\n /**\n * Gets a group from the collection using the specified id\n *\n * @param id Id of the group to get from this collection\n */\n Groups.prototype.getById = function (id) {\n return new Group(this, id);\n };\n /**\n * Create a new group as specified in the request body.\n *\n * @param name Name to display in the address book for the group\n * @param mailNickname Mail alias for the group\n * @param groupType Type of group being created\n * @param additionalProperties A plain object collection of additional properties you want to set on the new group\n */\n Groups.prototype.add = function (name, mailNickname, groupType, additionalProperties) {\n var _this = this;\n if (additionalProperties === void 0) { additionalProperties = {}; }\n var postBody = util_1.Util.extend({\n displayName: name,\n mailEnabled: groupType === GroupType.Office365,\n mailNickname: mailNickname,\n securityEnabled: groupType !== GroupType.Office365,\n }, additionalProperties);\n // include a group type if required\n if (groupType !== GroupType.Security) {\n postBody = util_1.Util.extend(postBody, {\n groupTypes: [groupType === GroupType.Office365 ? \"Unified\" : \"DynamicMembership\"],\n });\n }\n return this.postCore({\n body: JSON.stringify(postBody),\n }).then(function (r) {\n return {\n data: r,\n group: _this.getById(r.id),\n };\n });\n };\n return Groups;\n}(graphqueryable_1.GraphQueryableCollection));\nexports.Groups = Groups;\n/**\n * Represents a group entity\n */\nvar Group = /** @class */ (function (_super) {\n __extends(Group, _super);\n function Group() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n Object.defineProperty(Group.prototype, \"caldendar\", {\n /**\n * The calendar associated with this group\n */\n get: function () {\n return new calendars_1.Calendar(this, \"calendar\");\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Group.prototype, \"events\", {\n /**\n * Retrieve a list of event objects\n */\n get: function () {\n return new calendars_1.Events(this);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Group.prototype, \"owners\", {\n /**\n * Gets the collection of owners for this group\n */\n get: function () {\n return new members_1.Owners(this);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Group.prototype, \"plans\", {\n /**\n * The collection of plans for this group\n */\n get: function () {\n return new plans_1.Plans(this);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Group.prototype, \"members\", {\n /**\n * Gets the collection of members for this group\n */\n get: function () {\n return new members_1.Members(this);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Group.prototype, \"conversations\", {\n /**\n * Gets the conversations collection for this group\n */\n get: function () {\n return new conversations_1.Conversations(this);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Group.prototype, \"acceptedSenders\", {\n /**\n * Gets the collection of accepted senders for this group\n */\n get: function () {\n return new conversations_1.Senders(this, \"acceptedsenders\");\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Group.prototype, \"rejectedSenders\", {\n /**\n * Gets the collection of rejected senders for this group\n */\n get: function () {\n return new conversations_1.Senders(this, \"rejectedsenders\");\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Group.prototype, \"photo\", {\n /**\n * The photo associated with the group\n */\n get: function () {\n return new photos_1.Photo(this);\n },\n enumerable: true,\n configurable: true\n });\n /**\n * Add the group to the list of the current user's favorite groups. Supported for only Office 365 groups\n */\n Group.prototype.addFavorite = function () {\n return this.clone(Group, \"addFavorite\").postCore();\n };\n /**\n * Return all the groups that the specified group is a member of. The check is transitive\n *\n * @param securityEnabledOnly\n */\n Group.prototype.getMemberGroups = function (securityEnabledOnly) {\n if (securityEnabledOnly === void 0) { securityEnabledOnly = false; }\n return this.clone(Group, \"getMemberGroups\").postCore({\n body: JSON.stringify({\n securityEnabledOnly: securityEnabledOnly,\n }),\n });\n };\n /**\n * Deletes this group\n */\n Group.prototype.delete = function () {\n return this.deleteCore();\n };\n /**\n * Update the properties of a group object\n *\n * @param properties Set of properties of this group to update\n */\n Group.prototype.update = function (properties) {\n return this.patchCore({\n body: JSON.stringify(properties),\n });\n };\n /**\n * Remove the group from the list of the current user's favorite groups. Supported for only Office 365 groups\n */\n Group.prototype.removeFavorite = function () {\n return this.clone(Group, \"removeFavorite\").postCore();\n };\n /**\n * Reset the unseenCount of all the posts that the current user has not seen since their last visit\n */\n Group.prototype.resetUnseenCount = function () {\n return this.clone(Group, \"resetUnseenCount\").postCore();\n };\n /**\n * Calling this method will enable the current user to receive email notifications for this group,\n * about new posts, events, and files in that group. Supported for only Office 365 groups\n */\n Group.prototype.subscribeByMail = function () {\n return this.clone(Group, \"subscribeByMail\").postCore();\n };\n /**\n * Calling this method will prevent the current user from receiving email notifications for this group\n * about new posts, events, and files in that group. Supported for only Office 365 groups\n */\n Group.prototype.unsubscribeByMail = function () {\n return this.clone(Group, \"unsubscribeByMail\").postCore();\n };\n /**\n * Get the occurrences, exceptions, and single instances of events in a calendar view defined by a time range, from the default calendar of a group\n *\n * @param start Start date and time of the time range\n * @param end End date and time of the time range\n */\n Group.prototype.getCalendarView = function (start, end) {\n var view = this.clone(Group, \"calendarView\");\n view.query.add(\"startDateTime\", start.toISOString());\n view.query.add(\"endDateTime\", end.toISOString());\n return view.get();\n };\n return Group;\n}(graphqueryable_1.GraphQueryableInstance));\nexports.Group = Group;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/graph/groups.js\n// module id = 54\n// module chunks = 0","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar graphqueryable_1 = require(\"./graphqueryable\");\nvar Members = /** @class */ (function (_super) {\n __extends(Members, _super);\n function Members(baseUrl, path) {\n if (path === void 0) { path = \"members\"; }\n return _super.call(this, baseUrl, path) || this;\n }\n /**\n * Use this API to add a member to an Office 365 group, a security group or a mail-enabled security group through\n * the members navigation property. You can add users or other groups.\n * Important: You can add only users to Office 365 groups.\n *\n * @param id Full @odata.id of the directoryObject, user, or group object you want to add (ex: https://graph.microsoft.com/v1.0/directoryObjects/${id})\n */\n Members.prototype.add = function (id) {\n return this.clone(Members, \"$ref\").postCore({\n body: JSON.stringify({\n \"@odata.id\": id,\n }),\n });\n };\n /**\n * Gets a member of the group by id\n *\n * @param id Group member's id\n */\n Members.prototype.getById = function (id) {\n return new Member(this, id);\n };\n return Members;\n}(graphqueryable_1.GraphQueryableCollection));\nexports.Members = Members;\nvar Member = /** @class */ (function (_super) {\n __extends(Member, _super);\n function Member() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n return Member;\n}(graphqueryable_1.GraphQueryableInstance));\nexports.Member = Member;\nvar Owners = /** @class */ (function (_super) {\n __extends(Owners, _super);\n function Owners(baseUrl, path) {\n if (path === void 0) { path = \"owners\"; }\n return _super.call(this, baseUrl, path) || this;\n }\n return Owners;\n}(Members));\nexports.Owners = Owners;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/graph/members.js\n// module id = 55\n// module chunks = 0","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar graphqueryable_1 = require(\"./graphqueryable\");\n// import { Attachments } from \"./attachments\";\nvar Calendars = /** @class */ (function (_super) {\n __extends(Calendars, _super);\n function Calendars(baseUrl, path) {\n if (path === void 0) { path = \"calendars\"; }\n return _super.call(this, baseUrl, path) || this;\n }\n return Calendars;\n}(graphqueryable_1.GraphQueryableCollection));\nexports.Calendars = Calendars;\nvar Calendar = /** @class */ (function (_super) {\n __extends(Calendar, _super);\n function Calendar() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n Object.defineProperty(Calendar.prototype, \"events\", {\n get: function () {\n return new Events(this);\n },\n enumerable: true,\n configurable: true\n });\n return Calendar;\n}(graphqueryable_1.GraphQueryableInstance));\nexports.Calendar = Calendar;\nvar Events = /** @class */ (function (_super) {\n __extends(Events, _super);\n function Events(baseUrl, path) {\n if (path === void 0) { path = \"events\"; }\n return _super.call(this, baseUrl, path) || this;\n }\n Events.prototype.getById = function (id) {\n return new Event(this, id);\n };\n /**\n * Adds a new event to the collection\n *\n * @param properties The set of properties used to create the event\n */\n Events.prototype.add = function (properties) {\n var _this = this;\n return this.postCore({\n body: JSON.stringify(properties),\n }).then(function (r) {\n return {\n data: r,\n event: _this.getById(r.id),\n };\n });\n };\n return Events;\n}(graphqueryable_1.GraphQueryableCollection));\nexports.Events = Events;\nvar Event = /** @class */ (function (_super) {\n __extends(Event, _super);\n function Event() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n // TODO:: when supported\n // /**\n // * Gets the collection of attachments for this event\n // */\n // public get attachments(): Attachments {\n // return new Attachments(this);\n // }\n /**\n * Update the properties of an event object\n *\n * @param properties Set of properties of this event to update\n */\n Event.prototype.update = function (properties) {\n return this.patchCore({\n body: JSON.stringify(properties),\n });\n };\n /**\n * Deletes this event\n */\n Event.prototype.delete = function () {\n return this.deleteCore();\n };\n return Event;\n}(graphqueryable_1.GraphQueryableInstance));\nexports.Event = Event;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/graph/calendars.js\n// module id = 56\n// module chunks = 0","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar graphqueryable_1 = require(\"./graphqueryable\");\nvar attachments_1 = require(\"./attachments\");\nvar Conversations = /** @class */ (function (_super) {\n __extends(Conversations, _super);\n function Conversations(baseUrl, path) {\n if (path === void 0) { path = \"conversations\"; }\n return _super.call(this, baseUrl, path) || this;\n }\n /**\n * Create a new conversation by including a thread and a post.\n *\n * @param properties Properties used to create the new conversation\n */\n Conversations.prototype.add = function (properties) {\n return this.postCore({\n body: JSON.stringify(properties),\n });\n };\n /**\n * Gets a conversation from this collection by id\n *\n * @param id Group member's id\n */\n Conversations.prototype.getById = function (id) {\n return new Conversation(this, id);\n };\n return Conversations;\n}(graphqueryable_1.GraphQueryableCollection));\nexports.Conversations = Conversations;\nvar Threads = /** @class */ (function (_super) {\n __extends(Threads, _super);\n function Threads(baseUrl, path) {\n if (path === void 0) { path = \"threads\"; }\n return _super.call(this, baseUrl, path) || this;\n }\n /**\n * Gets a thread from this collection by id\n *\n * @param id Group member's id\n */\n Threads.prototype.getById = function (id) {\n return new Thread(this, id);\n };\n /**\n * Adds a new thread to this collection\n *\n * @param properties properties used to create the new thread\n * @returns Id of the new thread\n */\n Threads.prototype.add = function (properties) {\n return this.postCore({\n body: JSON.stringify(properties),\n });\n };\n return Threads;\n}(graphqueryable_1.GraphQueryableCollection));\nexports.Threads = Threads;\nvar Posts = /** @class */ (function (_super) {\n __extends(Posts, _super);\n function Posts(baseUrl, path) {\n if (path === void 0) { path = \"posts\"; }\n return _super.call(this, baseUrl, path) || this;\n }\n /**\n * Gets a thread from this collection by id\n *\n * @param id Group member's id\n */\n Posts.prototype.getById = function (id) {\n return new Post(this, id);\n };\n /**\n * Adds a new thread to this collection\n *\n * @param properties properties used to create the new thread\n * @returns Id of the new thread\n */\n Posts.prototype.add = function (properties) {\n return this.postCore({\n body: JSON.stringify(properties),\n });\n };\n return Posts;\n}(graphqueryable_1.GraphQueryableCollection));\nexports.Posts = Posts;\nvar Conversation = /** @class */ (function (_super) {\n __extends(Conversation, _super);\n function Conversation() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n Object.defineProperty(Conversation.prototype, \"threads\", {\n /**\n * Get all the threads in a group conversation.\n */\n get: function () {\n return new Threads(this);\n },\n enumerable: true,\n configurable: true\n });\n /**\n * Updates this conversation\n */\n Conversation.prototype.update = function (properties) {\n return this.patchCore({\n body: JSON.stringify(properties),\n });\n };\n /**\n * Deletes this member from the group\n */\n Conversation.prototype.delete = function () {\n return this.deleteCore();\n };\n return Conversation;\n}(graphqueryable_1.GraphQueryableInstance));\nexports.Conversation = Conversation;\nvar Thread = /** @class */ (function (_super) {\n __extends(Thread, _super);\n function Thread() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n Object.defineProperty(Thread.prototype, \"posts\", {\n /**\n * Get all the threads in a group conversation.\n */\n get: function () {\n return new Posts(this);\n },\n enumerable: true,\n configurable: true\n });\n /**\n * Reply to a thread in a group conversation and add a new post to it\n *\n * @param post Contents of the post\n */\n Thread.prototype.reply = function (post) {\n return this.clone(Thread, \"reply\").postCore({\n body: JSON.stringify({\n post: post,\n }),\n });\n };\n /**\n * Deletes this member from the group\n */\n Thread.prototype.delete = function () {\n return this.deleteCore();\n };\n return Thread;\n}(graphqueryable_1.GraphQueryableInstance));\nexports.Thread = Thread;\nvar Post = /** @class */ (function (_super) {\n __extends(Post, _super);\n function Post() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n Object.defineProperty(Post.prototype, \"attachments\", {\n get: function () {\n return new attachments_1.Attachments(this);\n },\n enumerable: true,\n configurable: true\n });\n /**\n * Deletes this post\n */\n Post.prototype.delete = function () {\n return this.deleteCore();\n };\n /**\n * Forward a post to a recipient\n */\n Post.prototype.forward = function (info) {\n return this.clone(Post, \"forward\").postCore({\n body: JSON.stringify(info),\n });\n };\n /**\n * Reply to a thread in a group conversation and add a new post to it\n *\n * @param post Contents of the post\n */\n Post.prototype.reply = function (post) {\n return this.clone(Post, \"reply\").postCore({\n body: JSON.stringify({\n post: post,\n }),\n });\n };\n return Post;\n}(graphqueryable_1.GraphQueryableInstance));\nexports.Post = Post;\nvar Senders = /** @class */ (function (_super) {\n __extends(Senders, _super);\n function Senders(baseUrl, path) {\n return _super.call(this, baseUrl, path) || this;\n }\n /**\n * Add a new user or group to this senders collection\n * @param id The full @odata.id value to add (ex: https://graph.microsoft.com/v1.0/users/user@contoso.com)\n */\n Senders.prototype.add = function (id) {\n return this.clone(Senders, \"$ref\").postCore({\n body: JSON.stringify({\n \"@odata.id\": id,\n }),\n });\n };\n /**\n * Removes the entity from the collection\n *\n * @param id The full @odata.id value to remove (ex: https://graph.microsoft.com/v1.0/users/user@contoso.com)\n */\n Senders.prototype.remove = function (id) {\n var remover = this.clone(Senders, \"$ref\");\n remover.query.add(\"$id\", id);\n return remover.deleteCore();\n };\n return Senders;\n}(graphqueryable_1.GraphQueryableCollection));\nexports.Senders = Senders;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/graph/conversations.js\n// module id = 57\n// module chunks = 0","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar graphqueryable_1 = require(\"./graphqueryable\");\nvar Attachments = /** @class */ (function (_super) {\n __extends(Attachments, _super);\n function Attachments(baseUrl, path) {\n if (path === void 0) { path = \"attachments\"; }\n return _super.call(this, baseUrl, path) || this;\n }\n /**\n * Gets a member of the group by id\n *\n * @param id Attachment id\n */\n Attachments.prototype.getById = function (id) {\n return new Attachment(this, id);\n };\n /**\n * Add attachment to this collection\n *\n * @param name Name given to the attachment file\n * @param bytes File content\n */\n Attachments.prototype.addFile = function (name, bytes) {\n return this.postCore({\n body: JSON.stringify({\n \"@odata.type\": \"#microsoft.graph.fileAttachment\",\n contentBytes: bytes,\n name: name,\n }),\n });\n };\n return Attachments;\n}(graphqueryable_1.GraphQueryableCollection));\nexports.Attachments = Attachments;\nvar Attachment = /** @class */ (function (_super) {\n __extends(Attachment, _super);\n function Attachment() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n return Attachment;\n}(graphqueryable_1.GraphQueryableInstance));\nexports.Attachment = Attachment;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/graph/attachments.js\n// module id = 58\n// module chunks = 0","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar graphqueryable_1 = require(\"./graphqueryable\");\nvar Plans = /** @class */ (function (_super) {\n __extends(Plans, _super);\n function Plans(baseUrl, path) {\n if (path === void 0) { path = \"planner/plans\"; }\n return _super.call(this, baseUrl, path) || this;\n }\n /**\n * Gets a plan from this collection by id\n *\n * @param id Plan's id\n */\n Plans.prototype.getById = function (id) {\n return new Plan(this, id);\n };\n return Plans;\n}(graphqueryable_1.GraphQueryableCollection));\nexports.Plans = Plans;\nvar Plan = /** @class */ (function (_super) {\n __extends(Plan, _super);\n function Plan() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n return Plan;\n}(graphqueryable_1.GraphQueryableInstance));\nexports.Plan = Plan;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/graph/plans.js\n// module id = 59\n// module chunks = 0","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar graphqueryable_1 = require(\"./graphqueryable\");\nvar parsers_1 = require(\"../odata/parsers\");\nvar Photo = /** @class */ (function (_super) {\n __extends(Photo, _super);\n function Photo(baseUrl, path) {\n if (path === void 0) { path = \"photo\"; }\n return _super.call(this, baseUrl, path) || this;\n }\n /**\n * Gets the image bytes as a blob (browser)\n */\n Photo.prototype.getBlob = function () {\n return this.clone(Photo, \"$value\", false).get(new parsers_1.BlobFileParser());\n };\n /**\n * Gets the image file byets as a Buffer (node.js)\n */\n Photo.prototype.getBuffer = function () {\n return this.clone(Photo, \"$value\", false).get(new parsers_1.BufferFileParser());\n };\n /**\n * Sets the file bytes\n *\n * @param content Image file contents, max 4 MB\n */\n Photo.prototype.setContent = function (content) {\n return this.clone(Photo, \"$value\", false).patchCore({\n body: content,\n });\n };\n return Photo;\n}(graphqueryable_1.GraphQueryableInstance));\nexports.Photo = Photo;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/graph/photos.js\n// module id = 60\n// module chunks = 0"],"sourceRoot":""} \ No newline at end of file