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IAAfA,gBAAwB,EAASA,WAAWwc,cAA2B,IAAP3hB,OAAgB,EAASA,EAAG4hB,YAChJzc,WAAWwc,OAAOC,WAAW3jB,KAAKkH,WAAWwc,QAC7CJ,EAMC,SAAS,IACZ,OAAOG,GACX,C","sources":["file:////home/runner/work/platform/platform/common/temp/node_modules/.pnpm/@azure+core-lro@2.5.4/node_modules/@azure/core-lro/dist-esm/src/legacy/poller.js","file:////home/runner/work/platform/platform/common/temp/node_modules/.pnpm/@azure+core-rest-pipeline@1.13.0/node_modules/@azure/core-rest-pipeline/dist-esm/src/policies/logPolicy.js","file:////home/runner/work/platform/platform/common/temp/node_modules/.pnpm/@azure+core-rest-pipeline@1.13.0/node_modules/@azure/core-rest-pipeline/dist-esm/src/pipeline.js","file:////home/runner/work/platform/platform/common/temp/node_modules/.pnpm/@azure+core-rest-pipeline@1.13.0/node_modules/@azure/core-rest-pipeline/dist-esm/src/policies/redirectPolicy.js","file:////home/runner/work/platform/platform/common/temp/node_modules/.pnpm/@azure+core-rest-pipeline@1.13.0/node_modules/@azure/core-rest-pipeline/dist-esm/src/constants.js","file:////home/runner/work/platform/platform/common/temp/node_modules/.pnpm/@azure+core-rest-pipeline@1.13.0/node_modules/@azure/core-rest-pipeline/dist-esm/src/util/userAgent.js","file:////home/runner/work/platform/platform/common/temp/node_modules/.pnpm/@azure+core-rest-pipeline@1.13.0/node_modules/@azure/core-rest-pipeline/dist-esm/src/util/userAgentPlatform.browser.js","file:////home/runner/work/platform/platform/common/temp/node_modules/.pnpm/@azure+core-rest-pipeline@1.13.0/node_modules/@azure/core-rest-pipeline/dist-esm/src/policies/userAgentPolicy.js","file:////home/runner/work/platform/platform/common/temp/node_modules/.pnpm/@azure+core-rest-pipeline@1.13.0/node_modules/@azure/core-rest-pipeline/dist-esm/src/retryStrategies/throttlingRetryStrategy.js","file:////home/runner/work/platform/platform/common/temp/node_modules/.pnpm/@azure+core-rest-pipeline@1.13.0/node_modules/@azure/core-rest-pipeline/dist-esm/src/retryStrategies/exponentialRetryStrategy.js","file:////home/runner/work/platform/platform/common/temp/node_modules/.pnpm/@azure+core-util@1.6.1/node_modules/@azure/core-util/dist-esm/src/random.js","file:////home/runner/work/platform/platform/common/temp/node_modules/.pnpm/@azure+core-rest-pipeline@1.13.0/node_modules/@azure/core-rest-pipeline/dist-esm/src/policies/retryPolicy.js","file:////home/runner/work/platform/platform/common/temp/node_modules/.pnpm/@azure+core-rest-pipeline@1.13.0/node_modules/@azure/core-rest-pipeline/dist-esm/src/policies/defaultRetryPolicy.js","file:////home/runner/work/platform/platform/common/temp/node_modules/.pnpm/@azure+core-util@1.6.1/node_modules/@azure/core-util/dist-esm/src/bytesEncoding.browser.js","file:////home/runner/work/platform/platform/common/temp/node_modules/.pnpm/@azure+core-rest-pipeline@1.13.0/node_modules/@azure/core-rest-pipeline/dist-esm/src/policies/formDataPolicy.js","file:////home/runner/work/platform/platform/common/temp/node_modules/.pnpm/@azure+core-rest-pipeline@1.13.0/node_modules/@azure/core-rest-pipeline/dist-esm/src/policies/proxyPolicy.browser.js","file:////home/runner/work/platform/platform/common/temp/node_modules/.pnpm/@azure+core-rest-pipeline@1.13.0/node_modules/@azure/core-rest-pipeline/dist-esm/src/policies/setClientRequestIdPolicy.js","file:////home/runner/work/platform/platform/common/temp/node_modules/.pnpm/@azure+core-rest-pipeline@1.13.0/node_modules/@azure/core-rest-pipeline/dist-esm/src/policies/tlsPolicy.js","file:////home/runner/work/platform/platform/common/temp/node_modules/.pnpm/@azure+core-rest-pipeline@1.13.0/node_modules/@azure/core-rest-pipeline/dist-esm/src/policies/tracingPolicy.js","file:////home/runner/work/platform/platform/common/temp/node_modules/.pnpm/@azure+core-rest-pipeline@1.13.0/node_modules/@azure/core-rest-pipeline/dist-esm/src/util/stream.browser.js","file:////home/runner/work/platform/platform/common/temp/node_modules/.pnpm/@azure+core-rest-pipeline@1.13.0/node_modules/@azure/core-rest-pipeline/dist-esm/src/policies/multipartPolicy.js","file:////home/runner/work/platform/platform/common/temp/node_modules/.pnpm/@azure+core-rest-pipeline@1.13.0/node_modules/@azure/core-rest-pipeline/dist-esm/src/createPipelineFromOptions.js","file:////home/runner/work/platform/platform/common/temp/node_modules/.pnpm/@azure+core-rest-pipeline@1.13.0/node_modules/@azure/core-rest-pipeline/dist-esm/src/policies/decompressResponsePolicy.browser.js","file:////home/runner/work/platform/platform/common/temp/node_modules/.pnpm/@azure+core-rest-pipeline@1.13.0/node_modules/@azure/core-rest-pipeline/dist-esm/src/fetchHttpClient.js","file:////home/runner/work/platform/platform/common/temp/node_modules/.pnpm/@azure+core-rest-pipeline@1.13.0/node_modules/@azure/core-rest-pipeline/dist-esm/src/defaultHttpClient.browser.js","file:////home/runner/work/platform/platform/common/temp/node_modules/.pnpm/@azure+core-rest-pipeline@1.13.0/node_modules/@azure/core-rest-pipeline/dist-esm/src/httpHeaders.js","file:////home/runner/work/platform/platform/common/temp/node_modules/.pnpm/@azure+core-rest-pipeline@1.13.0/node_modules/@azure/core-rest-pipeline/dist-esm/src/log.js","file:////home/runner/work/platform/platform/common/temp/node_modules/.pnpm/@azure+core-rest-pipeline@1.13.0/node_modules/@azure/core-rest-pipeline/dist-esm/src/pipelineRequest.js","file:////home/runner/work/platform/platform/common/temp/node_modules/.pnpm/@azure+core-rest-pipeline@1.13.0/node_modules/@azure/core-rest-pipeline/dist-esm/src/util/tokenCycler.js","file:////home/runner/work/platform/platform/common/temp/node_modules/.pnpm/@azure+core-rest-pipeline@1.13.0/node_modules/@azure/core-rest-pipeline/dist-esm/src/policies/bearerTokenAuthenticationPolicy.js","file:////home/runner/work/platform/platform/common/temp/node_modules/.pnpm/@azure+core-rest-pipeline@1.13.0/node_modules/@azure/core-rest-pipeline/dist-esm/src/util/inspect.browser.js","file:////home/runner/work/platform/platform/common/temp/node_modules/.pnpm/@azure+core-rest-pipeline@1.13.0/node_modules/@azure/core-rest-pipeline/dist-esm/src/restError.js","file:////home/runner/work/platform/platform/common/temp/node_modules/.pnpm/@azure+core-rest-pipeline@1.13.0/node_modules/@azure/core-rest-pipeline/dist-esm/src/util/helpers.js","file:////home/runner/work/platform/platform/common/temp/node_modules/.pnpm/@azure+core-rest-pipeline@1.13.0/node_modules/@azure/core-rest-pipeline/dist-esm/src/util/sanitizer.js","file:////home/runner/work/platform/platform/common/temp/node_modules/.pnpm/@azure+core-rest-pipeline@1.13.0/node_modules/@azure/core-rest-pipeline/dist-esm/src/util/typeGuards.js","file:////home/runner/work/platform/platform/common/temp/node_modules/.pnpm/@azure+core-tracing@1.0.0-preview.13/node_modules/@azure/core-tracing/dist-esm/src/createSpan.js","file:////home/runner/work/platform/platform/common/temp/node_modules/.pnpm/@azure+core-tracing@1.0.0-preview.13/node_modules/@azure/core-tracing/dist-esm/src/interfaces.js","file:////home/runner/work/platform/platform/common/temp/node_modules/.pnpm/@azure+core-tracing@1.0.0-preview.13/node_modules/@azure/core-tracing/dist-esm/src/utils/traceParentHeader.js","file:////home/runner/work/platform/platform/common/temp/node_modules/.pnpm/@azure+core-tracing@1.0.1/node_modules/@azure/core-tracing/dist-esm/src/tracingContext.js","file:////home/runner/work/platform/platform/common/temp/node_modules/.pnpm/@azure+core-tracing@1.0.1/node_modules/@azure/core-tracing/dist-esm/src/instrumenter.js","file:////home/runner/work/platform/platform/common/temp/node_modules/.pnpm/@azure+core-tracing@1.0.1/node_modules/@azure/core-tracing/dist-esm/src/tracingClient.js","file:////home/runner/work/platform/platform/common/temp/node_modules/.pnpm/@azure+core-util@1.6.1/node_modules/@azure/core-util/dist-esm/src/checkEnvironment.js","file:////home/runner/work/platform/platform/common/temp/node_modules/.pnpm/@azure+core-util@1.6.1/node_modules/@azure/core-util/dist-esm/src/delay.js","file:////home/runner/work/platform/platform/common/temp/node_modules/.pnpm/@azure+core-util@1.6.1/node_modules/@azure/core-util/dist-esm/src/createAbortablePromise.js","file:////home/runner/work/platform/platform/common/temp/node_modules/.pnpm/@azure+core-util@1.6.1/node_modules/@azure/core-util/dist-esm/src/error.js","file:////home/runner/work/platform/platform/common/temp/node_modules/.pnpm/@azure+core-util@1.6.1/node_modules/@azure/core-util/dist-esm/src/object.js","file:////home/runner/work/platform/platform/common/temp/node_modules/.pnpm/@azure+core-util@1.6.1/node_modules/@azure/core-util/dist-esm/src/uuidUtils.native.js","file:////home/runner/work/platform/platform/common/temp/node_modules/.pnpm/@azure+core-util@1.6.1/node_modules/@azure/core-util/dist-esm/src/uuidUtils.browser.js"],"sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n/**\n * When a poller is manually stopped through the `stopPolling` method,\n * the poller will be rejected with an instance of the PollerStoppedError.\n */\nexport class PollerStoppedError extends Error {\n constructor(message) {\n super(message);\n this.name = \"PollerStoppedError\";\n Object.setPrototypeOf(this, PollerStoppedError.prototype);\n }\n}\n/**\n * When the operation is cancelled, the poller will be rejected with an instance\n * of the PollerCancelledError.\n */\nexport class PollerCancelledError extends Error {\n constructor(message) {\n super(message);\n this.name = \"PollerCancelledError\";\n Object.setPrototypeOf(this, PollerCancelledError.prototype);\n }\n}\n/**\n * A class that represents the definition of a program that polls through consecutive requests\n * until it reaches a state of completion.\n *\n * A poller can be executed manually, by polling request by request by calling to the `poll()` method repeatedly, until its operation is completed.\n * It also provides a way to wait until the operation completes, by calling `pollUntilDone()` and waiting until the operation finishes.\n * Pollers can also request the cancellation of the ongoing process to whom is providing the underlying long running operation.\n *\n * ```ts\n * const poller = new MyPoller();\n *\n * // Polling just once:\n * await poller.poll();\n *\n * // We can try to cancel the request here, by calling:\n * //\n * // await poller.cancelOperation();\n * //\n *\n * // Getting the final result:\n * const result = await poller.pollUntilDone();\n * ```\n *\n * The Poller is defined by two types, a type representing the state of the poller, which\n * must include a basic set of properties from `PollOperationState`,\n * and a return type defined by `TResult`, which can be anything.\n *\n * The Poller class implements the `PollerLike` interface, which allows poller implementations to avoid having\n * to export the Poller's class directly, and instead only export the already instantiated poller with the PollerLike type.\n *\n * ```ts\n * class Client {\n * public async makePoller: PollerLike {\n * const poller = new MyPoller({});\n * // It might be preferred to return the poller after the first request is made,\n * // so that some information can be obtained right away.\n * await poller.poll();\n * return poller;\n * }\n * }\n *\n * const poller: PollerLike = myClient.makePoller();\n * ```\n *\n * A poller can be created through its constructor, then it can be polled until it's completed.\n * At any point in time, the state of the poller can be obtained without delay through the getOperationState method.\n * At any point in time, the intermediate forms of the result type can be requested without delay.\n * Once the underlying operation is marked as completed, the poller will stop and the final value will be returned.\n *\n * ```ts\n * const poller = myClient.makePoller();\n * const state: MyOperationState = poller.getOperationState();\n *\n * // The intermediate result can be obtained at any time.\n * const result: MyResult | undefined = poller.getResult();\n *\n * // The final result can only be obtained after the poller finishes.\n * const result: MyResult = await poller.pollUntilDone();\n * ```\n *\n */\n// eslint-disable-next-line no-use-before-define\nexport class Poller {\n /**\n * A poller needs to be initialized by passing in at least the basic properties of the `PollOperation`.\n *\n * When writing an implementation of a Poller, this implementation needs to deal with the initialization\n * of any custom state beyond the basic definition of the poller. The basic poller assumes that the poller's\n * operation has already been defined, at least its basic properties. The code below shows how to approach\n * the definition of the constructor of a new custom poller.\n *\n * ```ts\n * export class MyPoller extends Poller {\n * constructor({\n * // Anything you might need outside of the basics\n * }) {\n * let state: MyOperationState = {\n * privateProperty: private,\n * publicProperty: public,\n * };\n *\n * const operation = {\n * state,\n * update,\n * cancel,\n * toString\n * }\n *\n * // Sending the operation to the parent's constructor.\n * super(operation);\n *\n * // You can assign more local properties here.\n * }\n * }\n * ```\n *\n * Inside of this constructor, a new promise is created. This will be used to\n * tell the user when the poller finishes (see `pollUntilDone()`). The promise's\n * resolve and reject methods are also used internally to control when to resolve\n * or reject anyone waiting for the poller to finish.\n *\n * The constructor of a custom implementation of a poller is where any serialized version of\n * a previous poller's operation should be deserialized into the operation sent to the\n * base constructor. For example:\n *\n * ```ts\n * export class MyPoller extends Poller {\n * constructor(\n * baseOperation: string | undefined\n * ) {\n * let state: MyOperationState = {};\n * if (baseOperation) {\n * state = {\n * ...JSON.parse(baseOperation).state,\n * ...state\n * };\n * }\n * const operation = {\n * state,\n * // ...\n * }\n * super(operation);\n * }\n * }\n * ```\n *\n * @param operation - Must contain the basic properties of `PollOperation`.\n */\n constructor(operation) {\n /** controls whether to throw an error if the operation failed or was canceled. */\n this.resolveOnUnsuccessful = false;\n this.stopped = true;\n this.pollProgressCallbacks = [];\n this.operation = operation;\n this.promise = new Promise((resolve, reject) => {\n this.resolve = resolve;\n this.reject = reject;\n });\n // This prevents the UnhandledPromiseRejectionWarning in node.js from being thrown.\n // The above warning would get thrown if `poller.poll` is called, it returns an error,\n // and pullUntilDone did not have a .catch or await try/catch on it's return value.\n this.promise.catch(() => {\n /* intentionally blank */\n });\n }\n /**\n * Starts a loop that will break only if the poller is done\n * or if the poller is stopped.\n */\n async startPolling(pollOptions = {}) {\n if (this.stopped) {\n this.stopped = false;\n }\n while (!this.isStopped() && !this.isDone()) {\n await this.poll(pollOptions);\n await this.delay();\n }\n }\n /**\n * pollOnce does one polling, by calling to the update method of the underlying\n * poll operation to make any relevant change effective.\n *\n * It only optionally receives an object with an abortSignal property, from \\@azure/abort-controller's AbortSignalLike.\n *\n * @param options - Optional properties passed to the operation's update method.\n */\n async pollOnce(options = {}) {\n if (!this.isDone()) {\n this.operation = await this.operation.update({\n abortSignal: options.abortSignal,\n fireProgress: this.fireProgress.bind(this),\n });\n }\n this.processUpdatedState();\n }\n /**\n * fireProgress calls the functions passed in via onProgress the method of the poller.\n *\n * It loops over all of the callbacks received from onProgress, and executes them, sending them\n * the current operation state.\n *\n * @param state - The current operation state.\n */\n fireProgress(state) {\n for (const callback of this.pollProgressCallbacks) {\n callback(state);\n }\n }\n /**\n * Invokes the underlying operation's cancel method.\n */\n async cancelOnce(options = {}) {\n this.operation = await this.operation.cancel(options);\n }\n /**\n * Returns a promise that will resolve once a single polling request finishes.\n * It does this by calling the update method of the Poller's operation.\n *\n * It only optionally receives an object with an abortSignal property, from \\@azure/abort-controller's AbortSignalLike.\n *\n * @param options - Optional properties passed to the operation's update method.\n */\n poll(options = {}) {\n if (!this.pollOncePromise) {\n this.pollOncePromise = this.pollOnce(options);\n const clearPollOncePromise = () => {\n this.pollOncePromise = undefined;\n };\n this.pollOncePromise.then(clearPollOncePromise, clearPollOncePromise).catch(this.reject);\n }\n return this.pollOncePromise;\n }\n processUpdatedState() {\n if (this.operation.state.error) {\n this.stopped = true;\n if (!this.resolveOnUnsuccessful) {\n this.reject(this.operation.state.error);\n throw this.operation.state.error;\n }\n }\n if (this.operation.state.isCancelled) {\n this.stopped = true;\n if (!this.resolveOnUnsuccessful) {\n const error = new PollerCancelledError(\"Operation was canceled\");\n this.reject(error);\n throw error;\n }\n }\n if (this.isDone() && this.resolve) {\n // If the poller has finished polling, this means we now have a result.\n // However, it can be the case that TResult is instantiated to void, so\n // we are not expecting a result anyway. To assert that we might not\n // have a result eventually after finishing polling, we cast the result\n // to TResult.\n this.resolve(this.getResult());\n }\n }\n /**\n * Returns a promise that will resolve once the underlying operation is completed.\n */\n async pollUntilDone(pollOptions = {}) {\n if (this.stopped) {\n this.startPolling(pollOptions).catch(this.reject);\n }\n // This is needed because the state could have been updated by\n // `cancelOperation`, e.g. the operation is canceled or an error occurred.\n this.processUpdatedState();\n return this.promise;\n }\n /**\n * Invokes the provided callback after each polling is completed,\n * sending the current state of the poller's operation.\n *\n * It returns a method that can be used to stop receiving updates on the given callback function.\n */\n onProgress(callback) {\n this.pollProgressCallbacks.push(callback);\n return () => {\n this.pollProgressCallbacks = this.pollProgressCallbacks.filter((c) => c !== callback);\n };\n }\n /**\n * Returns true if the poller has finished polling.\n */\n isDone() {\n const state = this.operation.state;\n return Boolean(state.isCompleted || state.isCancelled || state.error);\n }\n /**\n * Stops the poller from continuing to poll.\n */\n stopPolling() {\n if (!this.stopped) {\n this.stopped = true;\n if (this.reject) {\n this.reject(new PollerStoppedError(\"This poller is already stopped\"));\n }\n }\n }\n /**\n * Returns true if the poller is stopped.\n */\n isStopped() {\n return this.stopped;\n }\n /**\n * Attempts to cancel the underlying operation.\n *\n * It only optionally receives an object with an abortSignal property, from \\@azure/abort-controller's AbortSignalLike.\n *\n * If it's called again before it finishes, it will throw an error.\n *\n * @param options - Optional properties passed to the operation's update method.\n */\n cancelOperation(options = {}) {\n if (!this.cancelPromise) {\n this.cancelPromise = this.cancelOnce(options);\n }\n else if (options.abortSignal) {\n throw new Error(\"A cancel request is currently pending\");\n }\n return this.cancelPromise;\n }\n /**\n * Returns the state of the operation.\n *\n * Even though TState will be the same type inside any of the methods of any extension of the Poller class,\n * implementations of the pollers can customize what's shared with the public by writing their own\n * version of the `getOperationState` method, and by defining two types, one representing the internal state of the poller\n * and a public type representing a safe to share subset of the properties of the internal state.\n * Their definition of getOperationState can then return their public type.\n *\n * Example:\n *\n * ```ts\n * // Let's say we have our poller's operation state defined as:\n * interface MyOperationState extends PollOperationState {\n * privateProperty?: string;\n * publicProperty?: string;\n * }\n *\n * // To allow us to have a true separation of public and private state, we have to define another interface:\n * interface PublicState extends PollOperationState {\n * publicProperty?: string;\n * }\n *\n * // Then, we define our Poller as follows:\n * export class MyPoller extends Poller {\n * // ... More content is needed here ...\n *\n * public getOperationState(): PublicState {\n * const state: PublicState = this.operation.state;\n * return {\n * // Properties from PollOperationState\n * isStarted: state.isStarted,\n * isCompleted: state.isCompleted,\n * isCancelled: state.isCancelled,\n * error: state.error,\n * result: state.result,\n *\n * // The only other property needed by PublicState.\n * publicProperty: state.publicProperty\n * }\n * }\n * }\n * ```\n *\n * You can see this in the tests of this repository, go to the file:\n * `../test/utils/testPoller.ts`\n * and look for the getOperationState implementation.\n */\n getOperationState() {\n return this.operation.state;\n }\n /**\n * Returns the result value of the operation,\n * regardless of the state of the poller.\n * It can return undefined or an incomplete form of the final TResult value\n * depending on the implementation.\n */\n getResult() {\n const state = this.operation.state;\n return state.result;\n }\n /**\n * Returns a serialized version of the poller's operation\n * by invoking the operation's toString method.\n */\n toString() {\n return this.operation.toString();\n }\n}\n//# sourceMappingURL=poller.js.map","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { logger as coreLogger } from \"../log\";\nimport { Sanitizer } from \"../util/sanitizer\";\n/**\n * The programmatic identifier of the logPolicy.\n */\nexport const logPolicyName = \"logPolicy\";\n/**\n * A policy that logs all requests and responses.\n * @param options - Options to configure logPolicy.\n */\nexport function logPolicy(options = {}) {\n var _a;\n const logger = (_a = options.logger) !== null && _a !== void 0 ? _a : coreLogger.info;\n const sanitizer = new Sanitizer({\n additionalAllowedHeaderNames: options.additionalAllowedHeaderNames,\n additionalAllowedQueryParameters: options.additionalAllowedQueryParameters,\n });\n return {\n name: logPolicyName,\n async sendRequest(request, next) {\n if (!logger.enabled) {\n return next(request);\n }\n logger(`Request: ${sanitizer.sanitize(request)}`);\n const response = await next(request);\n logger(`Response status code: ${response.status}`);\n logger(`Headers: ${sanitizer.sanitize(response.headers)}`);\n return response;\n },\n };\n}\n//# sourceMappingURL=logPolicy.js.map","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nconst ValidPhaseNames = new Set([\"Deserialize\", \"Serialize\", \"Retry\", \"Sign\"]);\n/**\n * A private implementation of Pipeline.\n * Do not export this class from the package.\n * @internal\n */\nclass HttpPipeline {\n constructor(policies) {\n var _a;\n this._policies = [];\n this._policies = (_a = policies === null || policies === void 0 ? void 0 : policies.slice(0)) !== null && _a !== void 0 ? _a : [];\n this._orderedPolicies = undefined;\n }\n addPolicy(policy, options = {}) {\n if (options.phase && options.afterPhase) {\n throw new Error(\"Policies inside a phase cannot specify afterPhase.\");\n }\n if (options.phase && !ValidPhaseNames.has(options.phase)) {\n throw new Error(`Invalid phase name: ${options.phase}`);\n }\n if (options.afterPhase && !ValidPhaseNames.has(options.afterPhase)) {\n throw new Error(`Invalid afterPhase name: ${options.afterPhase}`);\n }\n this._policies.push({\n policy,\n options,\n });\n this._orderedPolicies = undefined;\n }\n removePolicy(options) {\n const removedPolicies = [];\n this._policies = this._policies.filter((policyDescriptor) => {\n if ((options.name && policyDescriptor.policy.name === options.name) ||\n (options.phase && policyDescriptor.options.phase === options.phase)) {\n removedPolicies.push(policyDescriptor.policy);\n return false;\n }\n else {\n return true;\n }\n });\n this._orderedPolicies = undefined;\n return removedPolicies;\n }\n sendRequest(httpClient, request) {\n const policies = this.getOrderedPolicies();\n const pipeline = policies.reduceRight((next, policy) => {\n return (req) => {\n return policy.sendRequest(req, next);\n };\n }, (req) => httpClient.sendRequest(req));\n return pipeline(request);\n }\n getOrderedPolicies() {\n if (!this._orderedPolicies) {\n this._orderedPolicies = this.orderPolicies();\n }\n return this._orderedPolicies;\n }\n clone() {\n return new HttpPipeline(this._policies);\n }\n static create() {\n return new HttpPipeline();\n }\n orderPolicies() {\n /**\n * The goal of this method is to reliably order pipeline policies\n * based on their declared requirements when they were added.\n *\n * Order is first determined by phase:\n *\n * 1. Serialize Phase\n * 2. Policies not in a phase\n * 3. Deserialize Phase\n * 4. Retry Phase\n * 5. Sign Phase\n *\n * Within each phase, policies are executed in the order\n * they were added unless they were specified to execute\n * before/after other policies or after a particular phase.\n *\n * To determine the final order, we will walk the policy list\n * in phase order multiple times until all dependencies are\n * satisfied.\n *\n * `afterPolicies` are the set of policies that must be\n * executed before a given policy. This requirement is\n * considered satisfied when each of the listed policies\n * have been scheduled.\n *\n * `beforePolicies` are the set of policies that must be\n * executed after a given policy. Since this dependency\n * can be expressed by converting it into a equivalent\n * `afterPolicies` declarations, they are normalized\n * into that form for simplicity.\n *\n * An `afterPhase` dependency is considered satisfied when all\n * policies in that phase have scheduled.\n *\n */\n const result = [];\n // Track all policies we know about.\n const policyMap = new Map();\n function createPhase(name) {\n return {\n name,\n policies: new Set(),\n hasRun: false,\n hasAfterPolicies: false,\n };\n }\n // Track policies for each phase.\n const serializePhase = createPhase(\"Serialize\");\n const noPhase = createPhase(\"None\");\n const deserializePhase = createPhase(\"Deserialize\");\n const retryPhase = createPhase(\"Retry\");\n const signPhase = createPhase(\"Sign\");\n // a list of phases in order\n const orderedPhases = [serializePhase, noPhase, deserializePhase, retryPhase, signPhase];\n // Small helper function to map phase name to each Phase\n function getPhase(phase) {\n if (phase === \"Retry\") {\n return retryPhase;\n }\n else if (phase === \"Serialize\") {\n return serializePhase;\n }\n else if (phase === \"Deserialize\") {\n return deserializePhase;\n }\n else if (phase === \"Sign\") {\n return signPhase;\n }\n else {\n return noPhase;\n }\n }\n // First walk each policy and create a node to track metadata.\n for (const descriptor of this._policies) {\n const policy = descriptor.policy;\n const options = descriptor.options;\n const policyName = policy.name;\n if (policyMap.has(policyName)) {\n throw new Error(\"Duplicate policy names not allowed in pipeline\");\n }\n const node = {\n policy,\n dependsOn: new Set(),\n dependants: new Set(),\n };\n if (options.afterPhase) {\n node.afterPhase = getPhase(options.afterPhase);\n node.afterPhase.hasAfterPolicies = true;\n }\n policyMap.set(policyName, node);\n const phase = getPhase(options.phase);\n phase.policies.add(node);\n }\n // Now that each policy has a node, connect dependency references.\n for (const descriptor of this._policies) {\n const { policy, options } = descriptor;\n const policyName = policy.name;\n const node = policyMap.get(policyName);\n if (!node) {\n throw new Error(`Missing node for policy ${policyName}`);\n }\n if (options.afterPolicies) {\n for (const afterPolicyName of options.afterPolicies) {\n const afterNode = policyMap.get(afterPolicyName);\n if (afterNode) {\n // Linking in both directions helps later\n // when we want to notify dependants.\n node.dependsOn.add(afterNode);\n afterNode.dependants.add(node);\n }\n }\n }\n if (options.beforePolicies) {\n for (const beforePolicyName of options.beforePolicies) {\n const beforeNode = policyMap.get(beforePolicyName);\n if (beforeNode) {\n // To execute before another node, make it\n // depend on the current node.\n beforeNode.dependsOn.add(node);\n node.dependants.add(beforeNode);\n }\n }\n }\n }\n function walkPhase(phase) {\n phase.hasRun = true;\n // Sets iterate in insertion order\n for (const node of phase.policies) {\n if (node.afterPhase && (!node.afterPhase.hasRun || node.afterPhase.policies.size)) {\n // If this node is waiting on a phase to complete,\n // we need to skip it for now.\n // Even if the phase is empty, we should wait for it\n // to be walked to avoid re-ordering policies.\n continue;\n }\n if (node.dependsOn.size === 0) {\n // If there's nothing else we're waiting for, we can\n // add this policy to the result list.\n result.push(node.policy);\n // Notify anything that depends on this policy that\n // the policy has been scheduled.\n for (const dependant of node.dependants) {\n dependant.dependsOn.delete(node);\n }\n policyMap.delete(node.policy.name);\n phase.policies.delete(node);\n }\n }\n }\n function walkPhases() {\n for (const phase of orderedPhases) {\n walkPhase(phase);\n // if the phase isn't complete\n if (phase.policies.size > 0 && phase !== noPhase) {\n if (!noPhase.hasRun) {\n // Try running noPhase to see if that unblocks this phase next tick.\n // This can happen if a phase that happens before noPhase\n // is waiting on a noPhase policy to complete.\n walkPhase(noPhase);\n }\n // Don't proceed to the next phase until this phase finishes.\n return;\n }\n if (phase.hasAfterPolicies) {\n // Run any policies unblocked by this phase\n walkPhase(noPhase);\n }\n }\n }\n // Iterate until we've put every node in the result list.\n let iteration = 0;\n while (policyMap.size > 0) {\n iteration++;\n const initialResultLength = result.length;\n // Keep walking each phase in order until we can order every node.\n walkPhases();\n // The result list *should* get at least one larger each time\n // after the first full pass.\n // Otherwise, we're going to loop forever.\n if (result.length <= initialResultLength && iteration > 1) {\n throw new Error(\"Cannot satisfy policy dependencies due to requirements cycle.\");\n }\n }\n return result;\n }\n}\n/**\n * Creates a totally empty pipeline.\n * Useful for testing or creating a custom one.\n */\nexport function createEmptyPipeline() {\n return HttpPipeline.create();\n}\n//# sourceMappingURL=pipeline.js.map","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n/**\n * The programmatic identifier of the redirectPolicy.\n */\nexport const redirectPolicyName = \"redirectPolicy\";\n/**\n * Methods that are allowed to follow redirects 301 and 302\n */\nconst allowedRedirect = [\"GET\", \"HEAD\"];\n/**\n * A policy to follow Location headers from the server in order\n * to support server-side redirection.\n * In the browser, this policy is not used.\n * @param options - Options to control policy behavior.\n */\nexport function redirectPolicy(options = {}) {\n const { maxRetries = 20 } = options;\n return {\n name: redirectPolicyName,\n async sendRequest(request, next) {\n const response = await next(request);\n return handleRedirect(next, response, maxRetries);\n },\n };\n}\nasync function handleRedirect(next, response, maxRetries, currentRetries = 0) {\n const { request, status, headers } = response;\n const locationHeader = headers.get(\"location\");\n if (locationHeader &&\n (status === 300 ||\n (status === 301 && allowedRedirect.includes(request.method)) ||\n (status === 302 && allowedRedirect.includes(request.method)) ||\n (status === 303 && request.method === \"POST\") ||\n status === 307) &&\n currentRetries < maxRetries) {\n const url = new URL(locationHeader, request.url);\n request.url = url.toString();\n // POST request with Status code 303 should be converted into a\n // redirected GET request if the redirect url is present in the location header\n if (status === 303) {\n request.method = \"GET\";\n request.headers.delete(\"Content-Length\");\n delete request.body;\n }\n request.headers.delete(\"Authorization\");\n const res = await next(request);\n return handleRedirect(next, res, maxRetries, currentRetries + 1);\n }\n return response;\n}\n//# sourceMappingURL=redirectPolicy.js.map","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nexport const SDK_VERSION = \"1.12.3\";\nexport const DEFAULT_RETRY_POLICY_COUNT = 3;\n//# sourceMappingURL=constants.js.map","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { getHeaderName, setPlatformSpecificData } from \"./userAgentPlatform\";\nimport { SDK_VERSION } from \"../constants\";\nfunction getUserAgentString(telemetryInfo) {\n const parts = [];\n for (const [key, value] of telemetryInfo) {\n const token = value ? `${key}/${value}` : key;\n parts.push(token);\n }\n return parts.join(\" \");\n}\n/**\n * @internal\n */\nexport function getUserAgentHeaderName() {\n return getHeaderName();\n}\n/**\n * @internal\n */\nexport function getUserAgentValue(prefix) {\n const runtimeInfo = new Map();\n runtimeInfo.set(\"core-rest-pipeline\", SDK_VERSION);\n setPlatformSpecificData(runtimeInfo);\n const defaultAgent = getUserAgentString(runtimeInfo);\n const userAgentValue = prefix ? `${prefix} ${defaultAgent}` : defaultAgent;\n return userAgentValue;\n}\n//# sourceMappingURL=userAgent.js.map","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n/*\n * NOTE: When moving this file, please update \"browser\" section in package.json.\n */\n/**\n * @internal\n */\nexport function getHeaderName() {\n return \"x-ms-useragent\";\n}\n/**\n * @internal\n */\nexport function setPlatformSpecificData(map) {\n var _a, _b, _c;\n const localNavigator = globalThis.navigator;\n map.set(\"OS\", ((_c = (_b = (_a = localNavigator === null || localNavigator === void 0 ? void 0 : localNavigator.userAgentData) === null || _a === void 0 ? void 0 : _a.platform) !== null && _b !== void 0 ? _b : localNavigator === null || localNavigator === void 0 ? void 0 : localNavigator.platform) !== null && _c !== void 0 ? _c : \"unknown\").replace(\" \", \"\"));\n}\n//# sourceMappingURL=userAgentPlatform.browser.js.map","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { getUserAgentHeaderName, getUserAgentValue } from \"../util/userAgent\";\nconst UserAgentHeaderName = getUserAgentHeaderName();\n/**\n * The programmatic identifier of the userAgentPolicy.\n */\nexport const userAgentPolicyName = \"userAgentPolicy\";\n/**\n * A policy that sets the User-Agent header (or equivalent) to reflect\n * the library version.\n * @param options - Options to customize the user agent value.\n */\nexport function userAgentPolicy(options = {}) {\n const userAgentValue = getUserAgentValue(options.userAgentPrefix);\n return {\n name: userAgentPolicyName,\n async sendRequest(request, next) {\n if (!request.headers.has(UserAgentHeaderName)) {\n request.headers.set(UserAgentHeaderName, userAgentValue);\n }\n return next(request);\n },\n };\n}\n//# sourceMappingURL=userAgentPolicy.js.map","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { parseHeaderValueAsNumber } from \"../util/helpers\";\n/**\n * The header that comes back from Azure services representing\n * the amount of time (minimum) to wait to retry (in seconds or timestamp after which we can retry).\n */\nconst RetryAfterHeader = \"Retry-After\";\n/**\n * The headers that come back from Azure services representing\n * the amount of time (minimum) to wait to retry.\n *\n * \"retry-after-ms\", \"x-ms-retry-after-ms\" : milliseconds\n * \"Retry-After\" : seconds or timestamp\n */\nconst AllRetryAfterHeaders = [\"retry-after-ms\", \"x-ms-retry-after-ms\", RetryAfterHeader];\n/**\n * A response is a throttling retry response if it has a throttling status code (429 or 503),\n * as long as one of the [ \"Retry-After\" or \"retry-after-ms\" or \"x-ms-retry-after-ms\" ] headers has a valid value.\n *\n * Returns the `retryAfterInMs` value if the response is a throttling retry response.\n * If not throttling retry response, returns `undefined`.\n *\n * @internal\n */\nfunction getRetryAfterInMs(response) {\n if (!(response && [429, 503].includes(response.status)))\n return undefined;\n try {\n // Headers: \"retry-after-ms\", \"x-ms-retry-after-ms\", \"Retry-After\"\n for (const header of AllRetryAfterHeaders) {\n const retryAfterValue = parseHeaderValueAsNumber(response, header);\n if (retryAfterValue === 0 || retryAfterValue) {\n // \"Retry-After\" header ==> seconds\n // \"retry-after-ms\", \"x-ms-retry-after-ms\" headers ==> milli-seconds\n const multiplyingFactor = header === RetryAfterHeader ? 1000 : 1;\n return retryAfterValue * multiplyingFactor; // in milli-seconds\n }\n }\n // RetryAfterHeader (\"Retry-After\") has a special case where it might be formatted as a date instead of a number of seconds\n const retryAfterHeader = response.headers.get(RetryAfterHeader);\n if (!retryAfterHeader)\n return;\n const date = Date.parse(retryAfterHeader);\n const diff = date - Date.now();\n // negative diff would mean a date in the past, so retry asap with 0 milliseconds\n return Number.isFinite(diff) ? Math.max(0, diff) : undefined;\n }\n catch (e) {\n return undefined;\n }\n}\n/**\n * A response is a retry response if it has a throttling status code (429 or 503),\n * as long as one of the [ \"Retry-After\" or \"retry-after-ms\" or \"x-ms-retry-after-ms\" ] headers has a valid value.\n */\nexport function isThrottlingRetryResponse(response) {\n return Number.isFinite(getRetryAfterInMs(response));\n}\nexport function throttlingRetryStrategy() {\n return {\n name: \"throttlingRetryStrategy\",\n retry({ response }) {\n const retryAfterInMs = getRetryAfterInMs(response);\n if (!Number.isFinite(retryAfterInMs)) {\n return { skipStrategy: true };\n }\n return {\n retryAfterInMs,\n };\n },\n };\n}\n//# sourceMappingURL=throttlingRetryStrategy.js.map","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { getRandomIntegerInclusive } from \"@azure/core-util\";\nimport { isThrottlingRetryResponse } from \"./throttlingRetryStrategy\";\n// intervals are in milliseconds\nconst DEFAULT_CLIENT_RETRY_INTERVAL = 1000;\nconst DEFAULT_CLIENT_MAX_RETRY_INTERVAL = 1000 * 64;\n/**\n * A retry strategy that retries with an exponentially increasing delay in these two cases:\n * - When there are errors in the underlying transport layer (e.g. DNS lookup failures).\n * - Or otherwise if the outgoing request fails (408, greater or equal than 500, except for 501 and 505).\n */\nexport function exponentialRetryStrategy(options = {}) {\n var _a, _b;\n const retryInterval = (_a = options.retryDelayInMs) !== null && _a !== void 0 ? _a : DEFAULT_CLIENT_RETRY_INTERVAL;\n const maxRetryInterval = (_b = options.maxRetryDelayInMs) !== null && _b !== void 0 ? _b : DEFAULT_CLIENT_MAX_RETRY_INTERVAL;\n let retryAfterInMs = retryInterval;\n return {\n name: \"exponentialRetryStrategy\",\n retry({ retryCount, response, responseError }) {\n const matchedSystemError = isSystemError(responseError);\n const ignoreSystemErrors = matchedSystemError && options.ignoreSystemErrors;\n const isExponential = isExponentialRetryResponse(response);\n const ignoreExponentialResponse = isExponential && options.ignoreHttpStatusCodes;\n const unknownResponse = response && (isThrottlingRetryResponse(response) || !isExponential);\n if (unknownResponse || ignoreExponentialResponse || ignoreSystemErrors) {\n return { skipStrategy: true };\n }\n if (responseError && !matchedSystemError && !isExponential) {\n return { errorToThrow: responseError };\n }\n // Exponentially increase the delay each time\n const exponentialDelay = retryAfterInMs * Math.pow(2, retryCount);\n // Don't let the delay exceed the maximum\n const clampedExponentialDelay = Math.min(maxRetryInterval, exponentialDelay);\n // Allow the final value to have some \"jitter\" (within 50% of the delay size) so\n // that retries across multiple clients don't occur simultaneously.\n retryAfterInMs =\n clampedExponentialDelay / 2 + getRandomIntegerInclusive(0, clampedExponentialDelay / 2);\n return { retryAfterInMs };\n },\n };\n}\n/**\n * A response is a retry response if it has status codes:\n * - 408, or\n * - Greater or equal than 500, except for 501 and 505.\n */\nexport function isExponentialRetryResponse(response) {\n return Boolean(response &&\n response.status !== undefined &&\n (response.status >= 500 || response.status === 408) &&\n response.status !== 501 &&\n response.status !== 505);\n}\n/**\n * Determines whether an error from a pipeline response was triggered in the network layer.\n */\nexport function isSystemError(err) {\n if (!err) {\n return false;\n }\n return (err.code === \"ETIMEDOUT\" ||\n err.code === \"ESOCKETTIMEDOUT\" ||\n err.code === \"ECONNREFUSED\" ||\n err.code === \"ECONNRESET\" ||\n err.code === \"ENOENT\" ||\n err.code === \"ENOTFOUND\");\n}\n//# sourceMappingURL=exponentialRetryStrategy.js.map","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n/**\n * Returns a random integer value between a lower and upper bound,\n * inclusive of both bounds.\n * Note that this uses Math.random and isn't secure. If you need to use\n * this for any kind of security purpose, find a better source of random.\n * @param min - The smallest integer value allowed.\n * @param max - The largest integer value allowed.\n */\nexport function getRandomIntegerInclusive(min, max) {\n // Make sure inputs are integers.\n min = Math.ceil(min);\n max = Math.floor(max);\n // Pick a random offset from zero to the size of the range.\n // Since Math.random() can never return 1, we have to make the range one larger\n // in order to be inclusive of the maximum value after we take the floor.\n const offset = Math.floor(Math.random() * (max - min + 1));\n return offset + min;\n}\n//# sourceMappingURL=random.js.map","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { delay } from \"../util/helpers\";\nimport { createClientLogger } from \"@azure/logger\";\nimport { AbortError } from \"@azure/abort-controller\";\nimport { DEFAULT_RETRY_POLICY_COUNT } from \"../constants\";\nconst retryPolicyLogger = createClientLogger(\"core-rest-pipeline retryPolicy\");\n/**\n * The programmatic identifier of the retryPolicy.\n */\nconst retryPolicyName = \"retryPolicy\";\n/**\n * retryPolicy is a generic policy to enable retrying requests when certain conditions are met\n */\nexport function retryPolicy(strategies, options = { maxRetries: DEFAULT_RETRY_POLICY_COUNT }) {\n const logger = options.logger || retryPolicyLogger;\n return {\n name: retryPolicyName,\n async sendRequest(request, next) {\n var _a, _b;\n let response;\n let responseError;\n let retryCount = -1;\n // eslint-disable-next-line no-constant-condition\n retryRequest: while (true) {\n retryCount += 1;\n response = undefined;\n responseError = undefined;\n try {\n logger.info(`Retry ${retryCount}: Attempting to send request`, request.requestId);\n response = await next(request);\n logger.info(`Retry ${retryCount}: Received a response from request`, request.requestId);\n }\n catch (e) {\n logger.error(`Retry ${retryCount}: Received an error from request`, request.requestId);\n // RestErrors are valid targets for the retry strategies.\n // If none of the retry strategies can work with them, they will be thrown later in this policy.\n // If the received error is not a RestError, it is immediately thrown.\n responseError = e;\n if (!e || responseError.name !== \"RestError\") {\n throw e;\n }\n response = responseError.response;\n }\n if ((_a = request.abortSignal) === null || _a === void 0 ? void 0 : _a.aborted) {\n logger.error(`Retry ${retryCount}: Request aborted.`);\n const abortError = new AbortError();\n throw abortError;\n }\n if (retryCount >= ((_b = options.maxRetries) !== null && _b !== void 0 ? _b : DEFAULT_RETRY_POLICY_COUNT)) {\n logger.info(`Retry ${retryCount}: Maximum retries reached. Returning the last received response, or throwing the last received error.`);\n if (responseError) {\n throw responseError;\n }\n else if (response) {\n return response;\n }\n else {\n throw new Error(\"Maximum retries reached with no response or error to throw\");\n }\n }\n logger.info(`Retry ${retryCount}: Processing ${strategies.length} retry strategies.`);\n strategiesLoop: for (const strategy of strategies) {\n const strategyLogger = strategy.logger || retryPolicyLogger;\n strategyLogger.info(`Retry ${retryCount}: Processing retry strategy ${strategy.name}.`);\n const modifiers = strategy.retry({\n retryCount,\n response,\n responseError,\n });\n if (modifiers.skipStrategy) {\n strategyLogger.info(`Retry ${retryCount}: Skipped.`);\n continue strategiesLoop;\n }\n const { errorToThrow, retryAfterInMs, redirectTo } = modifiers;\n if (errorToThrow) {\n strategyLogger.error(`Retry ${retryCount}: Retry strategy ${strategy.name} throws error:`, errorToThrow);\n throw errorToThrow;\n }\n if (retryAfterInMs || retryAfterInMs === 0) {\n strategyLogger.info(`Retry ${retryCount}: Retry strategy ${strategy.name} retries after ${retryAfterInMs}`);\n await delay(retryAfterInMs, undefined, { abortSignal: request.abortSignal });\n continue retryRequest;\n }\n if (redirectTo) {\n strategyLogger.info(`Retry ${retryCount}: Retry strategy ${strategy.name} redirects to ${redirectTo}`);\n request.url = redirectTo;\n continue retryRequest;\n }\n }\n if (responseError) {\n logger.info(`None of the retry strategies could work with the received error. Throwing it.`);\n throw responseError;\n }\n if (response) {\n logger.info(`None of the retry strategies could work with the received response. Returning it.`);\n return response;\n }\n // If all the retries skip and there's no response,\n // we're still in the retry loop, so a new request will be sent\n // until `maxRetries` is reached.\n }\n },\n };\n}\n//# sourceMappingURL=retryPolicy.js.map","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { exponentialRetryStrategy } from \"../retryStrategies/exponentialRetryStrategy\";\nimport { throttlingRetryStrategy } from \"../retryStrategies/throttlingRetryStrategy\";\nimport { retryPolicy } from \"./retryPolicy\";\nimport { DEFAULT_RETRY_POLICY_COUNT } from \"../constants\";\n/**\n * Name of the {@link defaultRetryPolicy}\n */\nexport const defaultRetryPolicyName = \"defaultRetryPolicy\";\n/**\n * A policy that retries according to three strategies:\n * - When the server sends a 429 response with a Retry-After header.\n * - When there are errors in the underlying transport layer (e.g. DNS lookup failures).\n * - Or otherwise if the outgoing request fails, it will retry with an exponentially increasing delay.\n */\nexport function defaultRetryPolicy(options = {}) {\n var _a;\n return {\n name: defaultRetryPolicyName,\n sendRequest: retryPolicy([throttlingRetryStrategy(), exponentialRetryStrategy(options)], {\n maxRetries: (_a = options.maxRetries) !== null && _a !== void 0 ? _a : DEFAULT_RETRY_POLICY_COUNT,\n }).sendRequest,\n };\n}\n//# sourceMappingURL=defaultRetryPolicy.js.map","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n/**\n * The helper that transforms bytes with specific character encoding into string\n * @param bytes - the uint8array bytes\n * @param format - the format we use to encode the byte\n * @returns a string of the encoded string\n */\nexport function uint8ArrayToString(bytes, format) {\n switch (format) {\n case \"utf-8\":\n return uint8ArrayToUtf8String(bytes);\n case \"base64\":\n return uint8ArrayToBase64(bytes);\n case \"base64url\":\n return uint8ArrayToBase64Url(bytes);\n case \"hex\":\n return uint8ArrayToHexString(bytes);\n }\n}\n/**\n * The helper that transforms string to specific character encoded bytes array.\n * @param value - the string to be converted\n * @param format - the format we use to decode the value\n * @returns a uint8array\n */\nexport function stringToUint8Array(value, format) {\n switch (format) {\n case \"utf-8\":\n return utf8StringToUint8Array(value);\n case \"base64\":\n return base64ToUint8Array(value);\n case \"base64url\":\n return base64UrlToUint8Array(value);\n case \"hex\":\n return hexStringToUint8Array(value);\n }\n}\n/**\n * Decodes a Uint8Array into a Base64 string.\n * @internal\n */\nexport function uint8ArrayToBase64(bytes) {\n return btoa([...bytes].map((x) => String.fromCharCode(x)).join(\"\"));\n}\n/**\n * Decodes a Uint8Array into a Base64Url string.\n * @internal\n */\nexport function uint8ArrayToBase64Url(bytes) {\n return uint8ArrayToBase64(bytes).replace(/\\+/g, \"-\").replace(/\\//g, \"_\").replace(/=/g, \"\");\n}\n/**\n * Decodes a Uint8Array into a javascript string.\n * @internal\n */\nexport function uint8ArrayToUtf8String(bytes) {\n const decoder = new TextDecoder();\n const dataString = decoder.decode(bytes);\n return dataString;\n}\n/**\n * Decodes a Uint8Array into a hex string\n * @internal\n */\nexport function uint8ArrayToHexString(bytes) {\n return [...bytes].map((x) => x.toString(16).padStart(2, \"0\")).join(\"\");\n}\n/**\n * Encodes a JavaScript string into a Uint8Array.\n * @internal\n */\nexport function utf8StringToUint8Array(value) {\n return new TextEncoder().encode(value);\n}\n/**\n * Encodes a Base64 string into a Uint8Array.\n * @internal\n */\nexport function base64ToUint8Array(value) {\n return new Uint8Array([...atob(value)].map((x) => x.charCodeAt(0)));\n}\n/**\n * Encodes a Base64Url string into a Uint8Array.\n * @internal\n */\nexport function base64UrlToUint8Array(value) {\n const base64String = value.replace(/-/g, \"+\").replace(/_/g, \"/\");\n return base64ToUint8Array(base64String);\n}\nconst hexDigits = new Set(\"0123456789abcdefABCDEF\");\n/**\n * Encodes a hex string into a Uint8Array\n * @internal\n */\nexport function hexStringToUint8Array(value) {\n // If value has odd length, the last character will be ignored, consistent with NodeJS Buffer behavior\n const bytes = new Uint8Array(value.length / 2);\n for (let i = 0; i < value.length / 2; ++i) {\n const highNibble = value[2 * i];\n const lowNibble = value[2 * i + 1];\n if (!hexDigits.has(highNibble) || !hexDigits.has(lowNibble)) {\n // Replicate Node Buffer behavior by exiting early when we encounter an invalid byte\n return bytes.slice(0, i);\n }\n bytes[i] = parseInt(`${highNibble}${lowNibble}`, 16);\n }\n return bytes;\n}\n//# sourceMappingURL=bytesEncoding.browser.js.map","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { stringToUint8Array } from \"@azure/core-util\";\nimport { createHttpHeaders } from \"../httpHeaders\";\n/**\n * The programmatic identifier of the formDataPolicy.\n */\nexport const formDataPolicyName = \"formDataPolicy\";\n/**\n * A policy that encodes FormData on the request into the body.\n */\nexport function formDataPolicy() {\n return {\n name: formDataPolicyName,\n async sendRequest(request, next) {\n if (request.formData) {\n const contentType = request.headers.get(\"Content-Type\");\n if (contentType && contentType.indexOf(\"application/x-www-form-urlencoded\") !== -1) {\n request.body = wwwFormUrlEncode(request.formData);\n }\n else {\n await prepareFormData(request.formData, request);\n }\n request.formData = undefined;\n }\n return next(request);\n },\n };\n}\nfunction wwwFormUrlEncode(formData) {\n const urlSearchParams = new URLSearchParams();\n for (const [key, value] of Object.entries(formData)) {\n if (Array.isArray(value)) {\n for (const subValue of value) {\n urlSearchParams.append(key, subValue.toString());\n }\n }\n else {\n urlSearchParams.append(key, value.toString());\n }\n }\n return urlSearchParams.toString();\n}\nasync function prepareFormData(formData, request) {\n // validate content type (multipart/form-data)\n const contentType = request.headers.get(\"Content-Type\");\n if (contentType && !contentType.startsWith(\"multipart/form-data\")) {\n // content type is specified and is not multipart/form-data. Exit.\n return;\n }\n request.headers.set(\"Content-Type\", contentType !== null && contentType !== void 0 ? contentType : \"multipart/form-data\");\n // set body to MultipartRequestBody using content from FormDataMap\n const parts = [];\n for (const [fieldName, values] of Object.entries(formData)) {\n for (const value of Array.isArray(values) ? values : [values]) {\n if (typeof value === \"string\") {\n parts.push({\n headers: createHttpHeaders({\n \"Content-Disposition\": `form-data; name=\"${fieldName}\"`,\n }),\n body: stringToUint8Array(value, \"utf-8\"),\n });\n }\n else {\n // using || instead of ?? here since if value.name is empty we should create a file name\n const fileName = value.name || \"blob\";\n const headers = createHttpHeaders();\n headers.set(\"Content-Disposition\", `form-data; name=\"${fieldName}\"; filename=\"${fileName}\"`);\n if (value.type) {\n headers.set(\"Content-Type\", value.type);\n }\n parts.push({\n headers,\n body: value,\n });\n }\n }\n request.multipartBody = { parts };\n }\n}\n//# sourceMappingURL=formDataPolicy.js.map","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n/*\n * NOTE: When moving this file, please update \"browser\" section in package.json\n */\nexport const proxyPolicyName = \"proxyPolicy\";\nconst errorMessage = \"proxyPolicy is not supported in browser environment\";\nexport function getDefaultProxySettings() {\n throw new Error(errorMessage);\n}\n/**\n * proxyPolicy is not supported in the browser and attempting\n * to use it will raise an error.\n */\nexport function proxyPolicy() {\n throw new Error(errorMessage);\n}\n/**\n * A function to reset the cached agents.\n * proxyPolicy is not supported in the browser and attempting\n * to use it will raise an error.\n * @internal\n */\nexport function resetCachedProxyAgents() {\n throw new Error(errorMessage);\n}\n//# sourceMappingURL=proxyPolicy.browser.js.map","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n/**\n * The programmatic identifier of the setClientRequestIdPolicy.\n */\nexport const setClientRequestIdPolicyName = \"setClientRequestIdPolicy\";\n/**\n * Each PipelineRequest gets a unique id upon creation.\n * This policy passes that unique id along via an HTTP header to enable better\n * telemetry and tracing.\n * @param requestIdHeaderName - The name of the header to pass the request ID to.\n */\nexport function setClientRequestIdPolicy(requestIdHeaderName = \"x-ms-client-request-id\") {\n return {\n name: setClientRequestIdPolicyName,\n async sendRequest(request, next) {\n if (!request.headers.has(requestIdHeaderName)) {\n request.headers.set(requestIdHeaderName, request.requestId);\n }\n return next(request);\n },\n };\n}\n//# sourceMappingURL=setClientRequestIdPolicy.js.map","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n/**\n * Name of the TLS Policy\n */\nexport const tlsPolicyName = \"tlsPolicy\";\n/**\n * Gets a pipeline policy that adds the client certificate to the HttpClient agent for authentication.\n */\nexport function tlsPolicy(tlsSettings) {\n return {\n name: tlsPolicyName,\n sendRequest: async (req, next) => {\n // Users may define a request tlsSettings, honor those over the client level one\n if (!req.tlsSettings) {\n req.tlsSettings = tlsSettings;\n }\n return next(req);\n },\n };\n}\n//# sourceMappingURL=tlsPolicy.js.map","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { createTracingClient, } from \"@azure/core-tracing\";\nimport { SDK_VERSION } from \"../constants\";\nimport { getUserAgentValue } from \"../util/userAgent\";\nimport { logger } from \"../log\";\nimport { getErrorMessage, isError } from \"@azure/core-util\";\nimport { isRestError } from \"../restError\";\n/**\n * The programmatic identifier of the tracingPolicy.\n */\nexport const tracingPolicyName = \"tracingPolicy\";\n/**\n * A simple policy to create OpenTelemetry Spans for each request made by the pipeline\n * that has SpanOptions with a parent.\n * Requests made without a parent Span will not be recorded.\n * @param options - Options to configure the telemetry logged by the tracing policy.\n */\nexport function tracingPolicy(options = {}) {\n const userAgent = getUserAgentValue(options.userAgentPrefix);\n const tracingClient = tryCreateTracingClient();\n return {\n name: tracingPolicyName,\n async sendRequest(request, next) {\n var _a, _b;\n if (!tracingClient || !((_a = request.tracingOptions) === null || _a === void 0 ? void 0 : _a.tracingContext)) {\n return next(request);\n }\n const { span, tracingContext } = (_b = tryCreateSpan(tracingClient, request, userAgent)) !== null && _b !== void 0 ? _b : {};\n if (!span || !tracingContext) {\n return next(request);\n }\n try {\n const response = await tracingClient.withContext(tracingContext, next, request);\n tryProcessResponse(span, response);\n return response;\n }\n catch (err) {\n tryProcessError(span, err);\n throw err;\n }\n },\n };\n}\nfunction tryCreateTracingClient() {\n try {\n return createTracingClient({\n namespace: \"\",\n packageName: \"@azure/core-rest-pipeline\",\n packageVersion: SDK_VERSION,\n });\n }\n catch (e) {\n logger.warning(`Error when creating the TracingClient: ${getErrorMessage(e)}`);\n return undefined;\n }\n}\nfunction tryCreateSpan(tracingClient, request, userAgent) {\n try {\n // As per spec, we do not need to differentiate between HTTP and HTTPS in span name.\n const { span, updatedOptions } = tracingClient.startSpan(`HTTP ${request.method}`, { tracingOptions: request.tracingOptions }, {\n spanKind: \"client\",\n spanAttributes: {\n \"http.method\": request.method,\n \"http.url\": request.url,\n requestId: request.requestId,\n },\n });\n // If the span is not recording, don't do any more work.\n if (!span.isRecording()) {\n span.end();\n return undefined;\n }\n if (userAgent) {\n span.setAttribute(\"http.user_agent\", userAgent);\n }\n // set headers\n const headers = tracingClient.createRequestHeaders(updatedOptions.tracingOptions.tracingContext);\n for (const [key, value] of Object.entries(headers)) {\n request.headers.set(key, value);\n }\n return { span, tracingContext: updatedOptions.tracingOptions.tracingContext };\n }\n catch (e) {\n logger.warning(`Skipping creating a tracing span due to an error: ${getErrorMessage(e)}`);\n return undefined;\n }\n}\nfunction tryProcessError(span, error) {\n try {\n span.setStatus({\n status: \"error\",\n error: isError(error) ? error : undefined,\n });\n if (isRestError(error) && error.statusCode) {\n span.setAttribute(\"http.status_code\", error.statusCode);\n }\n span.end();\n }\n catch (e) {\n logger.warning(`Skipping tracing span processing due to an error: ${getErrorMessage(e)}`);\n }\n}\nfunction tryProcessResponse(span, response) {\n try {\n span.setAttribute(\"http.status_code\", response.status);\n const serviceRequestId = response.headers.get(\"x-ms-request-id\");\n if (serviceRequestId) {\n span.setAttribute(\"serviceRequestId\", serviceRequestId);\n }\n span.setStatus({\n status: \"success\",\n });\n span.end();\n }\n catch (e) {\n logger.warning(`Skipping tracing span processing due to an error: ${getErrorMessage(e)}`);\n }\n}\n//# sourceMappingURL=tracingPolicy.js.map","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { isBlob, isWebReadableStream } from \"./typeGuards\";\nexport function toStream(source) {\n if (source instanceof Uint8Array) {\n return new Blob([source]).stream();\n }\n else if (isWebReadableStream(source)) {\n return source;\n }\n else if (isBlob(source)) {\n return source.stream();\n }\n else {\n throw new Error(\"Unsupported type. Only ReadableStream, Uint8Array and Blob are supported in browser\");\n }\n}\nexport function toWebStream(stream) {\n if (isWebReadableStream(stream)) {\n return stream;\n }\n else {\n throw new Error(\"Did not expect a Node stream in browser environment\");\n }\n}\nexport function concatenateStreams(streams) {\n var _a;\n const remainingStreams = Array.from(streams);\n let reader = (_a = remainingStreams.shift()) === null || _a === void 0 ? void 0 : _a.getReader();\n async function doPull(controller) {\n var _a;\n if (!reader) {\n controller.close();\n return;\n }\n let value;\n let done;\n try {\n ({ value, done } = await reader.read());\n }\n catch (e) {\n controller.error(e);\n reader.releaseLock();\n return;\n }\n if (done) {\n reader.releaseLock();\n reader = (_a = remainingStreams.shift()) === null || _a === void 0 ? void 0 : _a.getReader();\n await doPull(controller);\n }\n else {\n controller.enqueue(value);\n }\n }\n return new ReadableStream({\n pull(controller) {\n return doPull(controller);\n },\n cancel(reason) {\n reader === null || reader === void 0 ? void 0 : reader.cancel(reason);\n },\n });\n}\n//# sourceMappingURL=stream.browser.js.map","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { randomUUID, stringToUint8Array } from \"@azure/core-util\";\nimport { toStream, concatenateStreams } from \"../util/stream\";\nimport { isBlob } from \"../util/typeGuards\";\nfunction generateBoundary() {\n return `----AzSDKFormBoundary${randomUUID()}`;\n}\nfunction encodeHeaders(headers) {\n let result = \"\";\n for (const [key, value] of headers) {\n result += `${key}: ${value}\\r\\n`;\n }\n return result;\n}\nfunction getLength(source) {\n if (source instanceof Uint8Array) {\n return source.byteLength;\n }\n else if (isBlob(source)) {\n // if was created using createFile then -1 means we have an unknown size\n return source.size === -1 ? undefined : source.size;\n }\n else {\n return undefined;\n }\n}\nfunction getTotalLength(sources) {\n let total = 0;\n for (const source of sources) {\n const partLength = getLength(source);\n if (partLength === undefined) {\n return undefined;\n }\n else {\n total += partLength;\n }\n }\n return total;\n}\nfunction buildRequestBody(request, parts, boundary) {\n const sources = [\n stringToUint8Array(`--${boundary}`, \"utf-8\"),\n ...parts.flatMap((part) => [\n stringToUint8Array(\"\\r\\n\", \"utf-8\"),\n stringToUint8Array(encodeHeaders(part.headers), \"utf-8\"),\n stringToUint8Array(\"\\r\\n\", \"utf-8\"),\n part.body,\n stringToUint8Array(`\\r\\n--${boundary}`, \"utf-8\"),\n ]),\n stringToUint8Array(\"--\\r\\n\\r\\n\", \"utf-8\"),\n ];\n const contentLength = getTotalLength(sources);\n if (contentLength) {\n request.headers.set(\"Content-Length\", contentLength);\n }\n request.body = (() => concatenateStreams(sources.map((source) => (typeof source === \"function\" ? source() : source)).map(toStream)));\n}\n/**\n * Name of multipart policy\n */\nexport const multipartPolicyName = \"multipartPolicy\";\nconst maxBoundaryLength = 70;\nconst validBoundaryCharacters = new Set(`abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'()+,-./:=?`);\nfunction assertValidBoundary(boundary) {\n if (boundary.length > maxBoundaryLength) {\n throw new Error(`Multipart boundary \"${boundary}\" exceeds maximum length of 70 characters`);\n }\n if (Array.from(boundary).some((x) => !validBoundaryCharacters.has(x))) {\n throw new Error(`Multipart boundary \"${boundary}\" contains invalid characters`);\n }\n}\n/**\n * Pipeline policy for multipart requests\n */\nexport function multipartPolicy() {\n return {\n name: multipartPolicyName,\n sendRequest(request, next) {\n var _a;\n if (!request.multipartBody) {\n return next(request);\n }\n if (request.body) {\n throw new Error(\"multipartBody and regular body cannot be set at the same time\");\n }\n let boundary = request.multipartBody.boundary;\n const contentTypeHeader = (_a = request.headers.get(\"Content-Type\")) !== null && _a !== void 0 ? _a : \"multipart/mixed\";\n const parsedHeader = contentTypeHeader.match(/^(multipart\\/[^ ;]+)(?:; *boundary=(.+))?$/);\n if (!parsedHeader) {\n throw new Error(`Got multipart request body, but content-type header was not multipart: ${contentTypeHeader}`);\n }\n const [, contentType, parsedBoundary] = parsedHeader;\n if (parsedBoundary && boundary && parsedBoundary !== boundary) {\n throw new Error(`Multipart boundary was specified as ${parsedBoundary} in the header, but got ${boundary} in the request body`);\n }\n boundary !== null && boundary !== void 0 ? boundary : (boundary = parsedBoundary);\n if (boundary) {\n assertValidBoundary(boundary);\n }\n else {\n boundary = generateBoundary();\n }\n request.headers.set(\"Content-Type\", `${contentType}; boundary=${boundary}`);\n buildRequestBody(request, request.multipartBody.parts, boundary);\n request.multipartBody = undefined;\n return next(request);\n },\n };\n}\n//# sourceMappingURL=multipartPolicy.js.map","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { logPolicy } from \"./policies/logPolicy\";\nimport { createEmptyPipeline } from \"./pipeline\";\nimport { redirectPolicy } from \"./policies/redirectPolicy\";\nimport { userAgentPolicy } from \"./policies/userAgentPolicy\";\nimport { decompressResponsePolicy } from \"./policies/decompressResponsePolicy\";\nimport { defaultRetryPolicy } from \"./policies/defaultRetryPolicy\";\nimport { formDataPolicy } from \"./policies/formDataPolicy\";\nimport { isNode } from \"@azure/core-util\";\nimport { proxyPolicy } from \"./policies/proxyPolicy\";\nimport { setClientRequestIdPolicy } from \"./policies/setClientRequestIdPolicy\";\nimport { tlsPolicy } from \"./policies/tlsPolicy\";\nimport { tracingPolicy } from \"./policies/tracingPolicy\";\nimport { multipartPolicy } from \"./policies/multipartPolicy\";\n/**\n * Create a new pipeline with a default set of customizable policies.\n * @param options - Options to configure a custom pipeline.\n */\nexport function createPipelineFromOptions(options) {\n var _a;\n const pipeline = createEmptyPipeline();\n if (isNode) {\n if (options.tlsOptions) {\n pipeline.addPolicy(tlsPolicy(options.tlsOptions));\n }\n pipeline.addPolicy(proxyPolicy(options.proxyOptions));\n pipeline.addPolicy(decompressResponsePolicy());\n }\n pipeline.addPolicy(formDataPolicy());\n pipeline.addPolicy(userAgentPolicy(options.userAgentOptions));\n pipeline.addPolicy(setClientRequestIdPolicy((_a = options.telemetryOptions) === null || _a === void 0 ? void 0 : _a.clientRequestIdHeaderName));\n // The multipart policy is added after policies with no phase, so that\n // policies can be added between it and formDataPolicy to modify\n // properties (e.g., making the boundary constant in recorded tests).\n pipeline.addPolicy(multipartPolicy(), { afterPhase: \"Deserialize\" });\n pipeline.addPolicy(defaultRetryPolicy(options.retryOptions), { phase: \"Retry\" });\n pipeline.addPolicy(tracingPolicy(options.userAgentOptions), { afterPhase: \"Retry\" });\n if (isNode) {\n // Both XHR and Fetch expect to handle redirects automatically,\n // so only include this policy when we're in Node.\n pipeline.addPolicy(redirectPolicy(options.redirectOptions), { afterPhase: \"Retry\" });\n }\n pipeline.addPolicy(logPolicy(options.loggingOptions), { afterPhase: \"Sign\" });\n return pipeline;\n}\n//# sourceMappingURL=createPipelineFromOptions.js.map","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n/*\n * NOTE: When moving this file, please update \"browser\" section in package.json\n */\nexport const decompressResponsePolicyName = \"decompressResponsePolicy\";\n/**\n * decompressResponsePolicy is not supported in the browser and attempting\n * to use it will raise an error.\n */\nexport function decompressResponsePolicy() {\n throw new Error(\"decompressResponsePolicy is not supported in browser environment\");\n}\n//# sourceMappingURL=decompressResponsePolicy.browser.js.map","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { AbortError } from \"@azure/abort-controller\";\nimport { RestError } from \"./restError\";\nimport { createHttpHeaders } from \"./httpHeaders\";\nimport { isNodeReadableStream, isWebReadableStream } from \"./util/typeGuards\";\n/**\n * Checks if the body is a Blob or Blob-like\n */\nfunction isBlob(body) {\n // File objects count as a type of Blob, so we want to use instanceof explicitly\n return (typeof Blob === \"function\" || typeof Blob === \"object\") && body instanceof Blob;\n}\n/**\n * A HttpClient implementation that uses window.fetch to send HTTP requests.\n * @internal\n */\nclass FetchHttpClient {\n /**\n * Makes a request over an underlying transport layer and returns the response.\n * @param request - The request to be made.\n */\n async sendRequest(request) {\n const url = new URL(request.url);\n const isInsecure = url.protocol !== \"https:\";\n if (isInsecure && !request.allowInsecureConnection) {\n throw new Error(`Cannot connect to ${request.url} while allowInsecureConnection is false.`);\n }\n if (request.proxySettings) {\n throw new Error(\"HTTP proxy is not supported in browser environment\");\n }\n try {\n return await makeRequest(request);\n }\n catch (e) {\n throw getError(e, request);\n }\n }\n}\n/**\n * Sends a request\n */\nasync function makeRequest(request) {\n const { abortController, abortControllerCleanup } = setupAbortSignal(request);\n try {\n const headers = buildFetchHeaders(request.headers);\n const { streaming, body: requestBody } = buildRequestBody(request);\n const requestInit = Object.assign(Object.assign({ body: requestBody, method: request.method, headers: headers, signal: abortController.signal }, (\"credentials\" in Request.prototype\n ? { credentials: request.withCredentials ? \"include\" : \"same-origin\" }\n : {})), (\"cache\" in Request.prototype ? { cache: \"no-store\" } : {}));\n // According to https://fetch.spec.whatwg.org/#fetch-method,\n // init.duplex must be set when body is a ReadableStream object.\n // currently \"half\" is the only valid value.\n if (streaming) {\n requestInit.duplex = \"half\";\n }\n /**\n * Developers of the future:\n * Do not set redirect: \"manual\" as part\n * of request options.\n * It will not work as you expect.\n */\n const response = await fetch(request.url, requestInit);\n // If we're uploading a blob, we need to fire the progress event manually\n if (isBlob(request.body) && request.onUploadProgress) {\n request.onUploadProgress({ loadedBytes: request.body.size });\n }\n return buildPipelineResponse(response, request, abortControllerCleanup);\n }\n catch (e) {\n abortControllerCleanup === null || abortControllerCleanup === void 0 ? void 0 : abortControllerCleanup();\n throw e;\n }\n}\n/**\n * Creates a pipeline response from a Fetch response;\n */\nasync function buildPipelineResponse(httpResponse, request, abortControllerCleanup) {\n var _a, _b;\n const headers = buildPipelineHeaders(httpResponse);\n const response = {\n request,\n headers,\n status: httpResponse.status,\n };\n const bodyStream = isWebReadableStream(httpResponse.body)\n ? buildBodyStream(httpResponse.body, {\n onProgress: request.onDownloadProgress,\n onEnd: abortControllerCleanup,\n })\n : httpResponse.body;\n if (\n // Value of POSITIVE_INFINITY in streamResponseStatusCodes is considered as any status code\n ((_a = request.streamResponseStatusCodes) === null || _a === void 0 ? void 0 : _a.has(Number.POSITIVE_INFINITY)) ||\n ((_b = request.streamResponseStatusCodes) === null || _b === void 0 ? void 0 : _b.has(response.status))) {\n if (request.enableBrowserStreams) {\n response.browserStreamBody = bodyStream !== null && bodyStream !== void 0 ? bodyStream : undefined;\n }\n else {\n const responseStream = new Response(bodyStream);\n response.blobBody = responseStream.blob();\n abortControllerCleanup === null || abortControllerCleanup === void 0 ? void 0 : abortControllerCleanup();\n }\n }\n else {\n const responseStream = new Response(bodyStream);\n response.bodyAsText = await responseStream.text();\n abortControllerCleanup === null || abortControllerCleanup === void 0 ? void 0 : abortControllerCleanup();\n }\n return response;\n}\nfunction setupAbortSignal(request) {\n const abortController = new AbortController();\n // Cleanup function\n let abortControllerCleanup;\n /**\n * Attach an abort listener to the request\n */\n let abortListener;\n if (request.abortSignal) {\n if (request.abortSignal.aborted) {\n throw new AbortError(\"The operation was aborted.\");\n }\n abortListener = (event) => {\n if (event.type === \"abort\") {\n abortController.abort();\n }\n };\n request.abortSignal.addEventListener(\"abort\", abortListener);\n abortControllerCleanup = () => {\n var _a;\n if (abortListener) {\n (_a = request.abortSignal) === null || _a === void 0 ? void 0 : _a.removeEventListener(\"abort\", abortListener);\n }\n };\n }\n // If a timeout was passed, call the abort signal once the time elapses\n if (request.timeout > 0) {\n setTimeout(() => {\n abortController.abort();\n }, request.timeout);\n }\n return { abortController, abortControllerCleanup };\n}\n/**\n * Gets the specific error\n */\nfunction getError(e, request) {\n var _a;\n if (e && (e === null || e === void 0 ? void 0 : e.name) === \"AbortError\") {\n return e;\n }\n else {\n return new RestError(`Error sending request: ${e.message}`, {\n code: (_a = e === null || e === void 0 ? void 0 : e.code) !== null && _a !== void 0 ? _a : RestError.REQUEST_SEND_ERROR,\n request,\n });\n }\n}\n/**\n * Converts PipelineRequest headers to Fetch headers\n */\nfunction buildFetchHeaders(pipelineHeaders) {\n const headers = new Headers();\n for (const [name, value] of pipelineHeaders) {\n headers.append(name, value);\n }\n return headers;\n}\nfunction buildPipelineHeaders(httpResponse) {\n const responseHeaders = createHttpHeaders();\n for (const [name, value] of httpResponse.headers) {\n responseHeaders.set(name, value);\n }\n return responseHeaders;\n}\nfunction buildRequestBody(request) {\n const body = typeof request.body === \"function\" ? request.body() : request.body;\n if (isNodeReadableStream(body)) {\n throw new Error(\"Node streams are not supported in browser environment.\");\n }\n return isWebReadableStream(body)\n ? { streaming: true, body: buildBodyStream(body, { onProgress: request.onUploadProgress }) }\n : { streaming: false, body };\n}\n/**\n * Reads the request/response original stream and stream it through a new\n * ReadableStream, this is done to be able to report progress in a way that\n * all modern browsers support. TransformStreams would be an alternative,\n * however they are not yet supported by all browsers i.e Firefox\n */\nfunction buildBodyStream(readableStream, options = {}) {\n let loadedBytes = 0;\n const { onProgress, onEnd } = options;\n // If the current browser supports pipeThrough we use a TransformStream\n // to report progress\n if (isTransformStreamSupported(readableStream)) {\n return readableStream.pipeThrough(new TransformStream({\n transform(chunk, controller) {\n if (chunk === null) {\n controller.terminate();\n return;\n }\n controller.enqueue(chunk);\n loadedBytes += chunk.length;\n if (onProgress) {\n onProgress({ loadedBytes });\n }\n },\n flush() {\n onEnd === null || onEnd === void 0 ? void 0 : onEnd();\n },\n }));\n }\n else {\n // If we can't use transform streams, wrap the original stream in a new readable stream\n // and use pull to enqueue each chunk and report progress.\n const reader = readableStream.getReader();\n return new ReadableStream({\n async pull(controller) {\n var _a;\n const { done, value } = await reader.read();\n // When no more data needs to be consumed, break the reading\n if (done || !value) {\n onEnd === null || onEnd === void 0 ? void 0 : onEnd();\n // Close the stream\n controller.close();\n reader.releaseLock();\n return;\n }\n loadedBytes += (_a = value === null || value === void 0 ? void 0 : value.length) !== null && _a !== void 0 ? _a : 0;\n // Enqueue the next data chunk into our target stream\n controller.enqueue(value);\n if (onProgress) {\n onProgress({ loadedBytes });\n }\n },\n cancel(reason) {\n onEnd === null || onEnd === void 0 ? void 0 : onEnd();\n return reader.cancel(reason);\n },\n });\n }\n}\n/**\n * Create a new HttpClient instance for the browser environment.\n * @internal\n */\nexport function createFetchHttpClient() {\n return new FetchHttpClient();\n}\nfunction isTransformStreamSupported(readableStream) {\n return readableStream.pipeThrough !== undefined && self.TransformStream !== undefined;\n}\n//# sourceMappingURL=fetchHttpClient.js.map","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { createFetchHttpClient } from \"./fetchHttpClient\";\n/**\n * Create the correct HttpClient for the current environment.\n */\nexport function createDefaultHttpClient() {\n return createFetchHttpClient();\n}\n//# sourceMappingURL=defaultHttpClient.browser.js.map","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nfunction normalizeName(name) {\n return name.toLowerCase();\n}\nfunction* headerIterator(map) {\n for (const entry of map.values()) {\n yield [entry.name, entry.value];\n }\n}\nclass HttpHeadersImpl {\n constructor(rawHeaders) {\n this._headersMap = new Map();\n if (rawHeaders) {\n for (const headerName of Object.keys(rawHeaders)) {\n this.set(headerName, rawHeaders[headerName]);\n }\n }\n }\n /**\n * Set a header in this collection with the provided name and value. The name is\n * case-insensitive.\n * @param name - The name of the header to set. This value is case-insensitive.\n * @param value - The value of the header to set.\n */\n set(name, value) {\n this._headersMap.set(normalizeName(name), { name, value: String(value).trim() });\n }\n /**\n * Get the header value for the provided header name, or undefined if no header exists in this\n * collection with the provided name.\n * @param name - The name of the header. This value is case-insensitive.\n */\n get(name) {\n var _a;\n return (_a = this._headersMap.get(normalizeName(name))) === null || _a === void 0 ? void 0 : _a.value;\n }\n /**\n * Get whether or not this header collection contains a header entry for the provided header name.\n * @param name - The name of the header to set. This value is case-insensitive.\n */\n has(name) {\n return this._headersMap.has(normalizeName(name));\n }\n /**\n * Remove the header with the provided headerName.\n * @param name - The name of the header to remove.\n */\n delete(name) {\n this._headersMap.delete(normalizeName(name));\n }\n /**\n * Get the JSON object representation of this HTTP header collection.\n */\n toJSON(options = {}) {\n const result = {};\n if (options.preserveCase) {\n for (const entry of this._headersMap.values()) {\n result[entry.name] = entry.value;\n }\n }\n else {\n for (const [normalizedName, entry] of this._headersMap) {\n result[normalizedName] = entry.value;\n }\n }\n return result;\n }\n /**\n * Get the string representation of this HTTP header collection.\n */\n toString() {\n return JSON.stringify(this.toJSON({ preserveCase: true }));\n }\n /**\n * Iterate over tuples of header [name, value] pairs.\n */\n [Symbol.iterator]() {\n return headerIterator(this._headersMap);\n }\n}\n/**\n * Creates an object that satisfies the `HttpHeaders` interface.\n * @param rawHeaders - A simple object representing initial headers\n */\nexport function createHttpHeaders(rawHeaders) {\n return new HttpHeadersImpl(rawHeaders);\n}\n//# sourceMappingURL=httpHeaders.js.map","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { createClientLogger } from \"@azure/logger\";\nexport const logger = createClientLogger(\"core-rest-pipeline\");\n//# sourceMappingURL=log.js.map","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { createHttpHeaders } from \"./httpHeaders\";\nimport { randomUUID } from \"@azure/core-util\";\nclass PipelineRequestImpl {\n constructor(options) {\n var _a, _b, _c, _d, _e, _f, _g;\n this.url = options.url;\n this.body = options.body;\n this.headers = (_a = options.headers) !== null && _a !== void 0 ? _a : createHttpHeaders();\n this.method = (_b = options.method) !== null && _b !== void 0 ? _b : \"GET\";\n this.timeout = (_c = options.timeout) !== null && _c !== void 0 ? _c : 0;\n this.multipartBody = options.multipartBody;\n this.formData = options.formData;\n this.disableKeepAlive = (_d = options.disableKeepAlive) !== null && _d !== void 0 ? _d : false;\n this.proxySettings = options.proxySettings;\n this.streamResponseStatusCodes = options.streamResponseStatusCodes;\n this.withCredentials = (_e = options.withCredentials) !== null && _e !== void 0 ? _e : false;\n this.abortSignal = options.abortSignal;\n this.tracingOptions = options.tracingOptions;\n this.onUploadProgress = options.onUploadProgress;\n this.onDownloadProgress = options.onDownloadProgress;\n this.requestId = options.requestId || randomUUID();\n this.allowInsecureConnection = (_f = options.allowInsecureConnection) !== null && _f !== void 0 ? _f : false;\n this.enableBrowserStreams = (_g = options.enableBrowserStreams) !== null && _g !== void 0 ? _g : false;\n }\n}\n/**\n * Creates a new pipeline request with the given options.\n * This method is to allow for the easy setting of default values and not required.\n * @param options - The options to create the request with.\n */\nexport function createPipelineRequest(options) {\n return new PipelineRequestImpl(options);\n}\n//# sourceMappingURL=pipelineRequest.js.map","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { delay } from \"./helpers\";\n// Default options for the cycler if none are provided\nexport const DEFAULT_CYCLER_OPTIONS = {\n forcedRefreshWindowInMs: 1000,\n retryIntervalInMs: 3000,\n refreshWindowInMs: 1000 * 60 * 2, // Start refreshing 2m before expiry\n};\n/**\n * Converts an an unreliable access token getter (which may resolve with null)\n * into an AccessTokenGetter by retrying the unreliable getter in a regular\n * interval.\n *\n * @param getAccessToken - A function that produces a promise of an access token that may fail by returning null.\n * @param retryIntervalInMs - The time (in milliseconds) to wait between retry attempts.\n * @param refreshTimeout - The timestamp after which the refresh attempt will fail, throwing an exception.\n * @returns - A promise that, if it resolves, will resolve with an access token.\n */\nasync function beginRefresh(getAccessToken, retryIntervalInMs, refreshTimeout) {\n // This wrapper handles exceptions gracefully as long as we haven't exceeded\n // the timeout.\n async function tryGetAccessToken() {\n if (Date.now() < refreshTimeout) {\n try {\n return await getAccessToken();\n }\n catch (_a) {\n return null;\n }\n }\n else {\n const finalToken = await getAccessToken();\n // Timeout is up, so throw if it's still null\n if (finalToken === null) {\n throw new Error(\"Failed to refresh access token.\");\n }\n return finalToken;\n }\n }\n let token = await tryGetAccessToken();\n while (token === null) {\n await delay(retryIntervalInMs);\n token = await tryGetAccessToken();\n }\n return token;\n}\n/**\n * Creates a token cycler from a credential, scopes, and optional settings.\n *\n * A token cycler represents a way to reliably retrieve a valid access token\n * from a TokenCredential. It will handle initializing the token, refreshing it\n * when it nears expiration, and synchronizes refresh attempts to avoid\n * concurrency hazards.\n *\n * @param credential - the underlying TokenCredential that provides the access\n * token\n * @param tokenCyclerOptions - optionally override default settings for the cycler\n *\n * @returns - a function that reliably produces a valid access token\n */\nexport function createTokenCycler(credential, tokenCyclerOptions) {\n let refreshWorker = null;\n let token = null;\n let tenantId;\n const options = Object.assign(Object.assign({}, DEFAULT_CYCLER_OPTIONS), tokenCyclerOptions);\n /**\n * This little holder defines several predicates that we use to construct\n * the rules of refreshing the token.\n */\n const cycler = {\n /**\n * Produces true if a refresh job is currently in progress.\n */\n get isRefreshing() {\n return refreshWorker !== null;\n },\n /**\n * Produces true if the cycler SHOULD refresh (we are within the refresh\n * window and not already refreshing)\n */\n get shouldRefresh() {\n var _a;\n return (!cycler.isRefreshing &&\n ((_a = token === null || token === void 0 ? void 0 : token.expiresOnTimestamp) !== null && _a !== void 0 ? _a : 0) - options.refreshWindowInMs < Date.now());\n },\n /**\n * Produces true if the cycler MUST refresh (null or nearly-expired\n * token).\n */\n get mustRefresh() {\n return (token === null || token.expiresOnTimestamp - options.forcedRefreshWindowInMs < Date.now());\n },\n };\n /**\n * Starts a refresh job or returns the existing job if one is already\n * running.\n */\n function refresh(scopes, getTokenOptions) {\n var _a;\n if (!cycler.isRefreshing) {\n // We bind `scopes` here to avoid passing it around a lot\n const tryGetAccessToken = () => credential.getToken(scopes, getTokenOptions);\n // Take advantage of promise chaining to insert an assignment to `token`\n // before the refresh can be considered done.\n refreshWorker = beginRefresh(tryGetAccessToken, options.retryIntervalInMs, \n // If we don't have a token, then we should timeout immediately\n (_a = token === null || token === void 0 ? void 0 : token.expiresOnTimestamp) !== null && _a !== void 0 ? _a : Date.now())\n .then((_token) => {\n refreshWorker = null;\n token = _token;\n tenantId = getTokenOptions.tenantId;\n return token;\n })\n .catch((reason) => {\n // We also should reset the refresher if we enter a failed state. All\n // existing awaiters will throw, but subsequent requests will start a\n // new retry chain.\n refreshWorker = null;\n token = null;\n tenantId = undefined;\n throw reason;\n });\n }\n return refreshWorker;\n }\n return async (scopes, tokenOptions) => {\n //\n // Simple rules:\n // - If we MUST refresh, then return the refresh task, blocking\n // the pipeline until a token is available.\n // - If we SHOULD refresh, then run refresh but don't return it\n // (we can still use the cached token).\n // - Return the token, since it's fine if we didn't return in\n // step 1.\n //\n // If the tenantId passed in token options is different to the one we have\n // Or if we are in claim challenge and the token was rejected and a new access token need to be issued, we need to\n // refresh the token with the new tenantId or token.\n const mustRefresh = tenantId !== tokenOptions.tenantId || Boolean(tokenOptions.claims) || cycler.mustRefresh;\n if (mustRefresh)\n return refresh(scopes, tokenOptions);\n if (cycler.shouldRefresh) {\n refresh(scopes, tokenOptions);\n }\n return token;\n };\n}\n//# sourceMappingURL=tokenCycler.js.map","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { createTokenCycler } from \"../util/tokenCycler\";\nimport { logger as coreLogger } from \"../log\";\n/**\n * The programmatic identifier of the bearerTokenAuthenticationPolicy.\n */\nexport const bearerTokenAuthenticationPolicyName = \"bearerTokenAuthenticationPolicy\";\n/**\n * Default authorize request handler\n */\nasync function defaultAuthorizeRequest(options) {\n const { scopes, getAccessToken, request } = options;\n const getTokenOptions = {\n abortSignal: request.abortSignal,\n tracingOptions: request.tracingOptions,\n };\n const accessToken = await getAccessToken(scopes, getTokenOptions);\n if (accessToken) {\n options.request.headers.set(\"Authorization\", `Bearer ${accessToken.token}`);\n }\n}\n/**\n * We will retrieve the challenge only if the response status code was 401,\n * and if the response contained the header \"WWW-Authenticate\" with a non-empty value.\n */\nfunction getChallenge(response) {\n const challenge = response.headers.get(\"WWW-Authenticate\");\n if (response.status === 401 && challenge) {\n return challenge;\n }\n return;\n}\n/**\n * A policy that can request a token from a TokenCredential implementation and\n * then apply it to the Authorization header of a request as a Bearer token.\n */\nexport function bearerTokenAuthenticationPolicy(options) {\n var _a;\n const { credential, scopes, challengeCallbacks } = options;\n const logger = options.logger || coreLogger;\n const callbacks = Object.assign({ authorizeRequest: (_a = challengeCallbacks === null || challengeCallbacks === void 0 ? void 0 : challengeCallbacks.authorizeRequest) !== null && _a !== void 0 ? _a : defaultAuthorizeRequest, authorizeRequestOnChallenge: challengeCallbacks === null || challengeCallbacks === void 0 ? void 0 : challengeCallbacks.authorizeRequestOnChallenge }, challengeCallbacks);\n // This function encapsulates the entire process of reliably retrieving the token\n // The options are left out of the public API until there's demand to configure this.\n // Remember to extend `BearerTokenAuthenticationPolicyOptions` with `TokenCyclerOptions`\n // in order to pass through the `options` object.\n const getAccessToken = credential\n ? createTokenCycler(credential /* , options */)\n : () => Promise.resolve(null);\n return {\n name: bearerTokenAuthenticationPolicyName,\n /**\n * If there's no challenge parameter:\n * - It will try to retrieve the token using the cache, or the credential's getToken.\n * - Then it will try the next policy with or without the retrieved token.\n *\n * It uses the challenge parameters to:\n * - Skip a first attempt to get the token from the credential if there's no cached token,\n * since it expects the token to be retrievable only after the challenge.\n * - Prepare the outgoing request if the `prepareRequest` method has been provided.\n * - Send an initial request to receive the challenge if it fails.\n * - Process a challenge if the response contains it.\n * - Retrieve a token with the challenge information, then re-send the request.\n */\n async sendRequest(request, next) {\n if (!request.url.toLowerCase().startsWith(\"https://\")) {\n throw new Error(\"Bearer token authentication is not permitted for non-TLS protected (non-https) URLs.\");\n }\n await callbacks.authorizeRequest({\n scopes: Array.isArray(scopes) ? scopes : [scopes],\n request,\n getAccessToken,\n logger,\n });\n let response;\n let error;\n try {\n response = await next(request);\n }\n catch (err) {\n error = err;\n response = err.response;\n }\n if (callbacks.authorizeRequestOnChallenge &&\n (response === null || response === void 0 ? void 0 : response.status) === 401 &&\n getChallenge(response)) {\n // processes challenge\n const shouldSendRequest = await callbacks.authorizeRequestOnChallenge({\n scopes: Array.isArray(scopes) ? scopes : [scopes],\n request,\n response,\n getAccessToken,\n logger,\n });\n if (shouldSendRequest) {\n return next(request);\n }\n }\n if (error) {\n throw error;\n }\n else {\n return response;\n }\n },\n };\n}\n//# sourceMappingURL=bearerTokenAuthenticationPolicy.js.map","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nexport const custom = {};\n//# sourceMappingURL=inspect.browser.js.map","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { isError } from \"@azure/core-util\";\nimport { custom } from \"./util/inspect\";\nimport { Sanitizer } from \"./util/sanitizer\";\nconst errorSanitizer = new Sanitizer();\n/**\n * A custom error type for failed pipeline requests.\n */\nexport class RestError extends Error {\n constructor(message, options = {}) {\n super(message);\n this.name = \"RestError\";\n this.code = options.code;\n this.statusCode = options.statusCode;\n this.request = options.request;\n this.response = options.response;\n Object.setPrototypeOf(this, RestError.prototype);\n }\n /**\n * Logging method for util.inspect in Node\n */\n [custom]() {\n return `RestError: ${this.message} \\n ${errorSanitizer.sanitize(this)}`;\n }\n}\n/**\n * Something went wrong when making the request.\n * This means the actual request failed for some reason,\n * such as a DNS issue or the connection being lost.\n */\nRestError.REQUEST_SEND_ERROR = \"REQUEST_SEND_ERROR\";\n/**\n * This means that parsing the response from the server failed.\n * It may have been malformed.\n */\nRestError.PARSE_ERROR = \"PARSE_ERROR\";\n/**\n * Typeguard for RestError\n * @param e - Something caught by a catch clause.\n */\nexport function isRestError(e) {\n if (e instanceof RestError) {\n return true;\n }\n return isError(e) && e.name === \"RestError\";\n}\n//# sourceMappingURL=restError.js.map","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { AbortError } from \"@azure/abort-controller\";\nconst StandardAbortMessage = \"The operation was aborted.\";\n/**\n * A wrapper for setTimeout that resolves a promise after delayInMs milliseconds.\n * @param delayInMs - The number of milliseconds to be delayed.\n * @param value - The value to be resolved with after a timeout of t milliseconds.\n * @param options - The options for delay - currently abort options\n * - abortSignal - The abortSignal associated with containing operation.\n * - abortErrorMsg - The abort error message associated with containing operation.\n * @returns Resolved promise\n */\nexport function delay(delayInMs, value, options) {\n return new Promise((resolve, reject) => {\n let timer = undefined;\n let onAborted = undefined;\n const rejectOnAbort = () => {\n return reject(new AbortError((options === null || options === void 0 ? void 0 : options.abortErrorMsg) ? options === null || options === void 0 ? void 0 : options.abortErrorMsg : StandardAbortMessage));\n };\n const removeListeners = () => {\n if ((options === null || options === void 0 ? void 0 : options.abortSignal) && onAborted) {\n options.abortSignal.removeEventListener(\"abort\", onAborted);\n }\n };\n onAborted = () => {\n if (timer) {\n clearTimeout(timer);\n }\n removeListeners();\n return rejectOnAbort();\n };\n if ((options === null || options === void 0 ? void 0 : options.abortSignal) && options.abortSignal.aborted) {\n return rejectOnAbort();\n }\n timer = setTimeout(() => {\n removeListeners();\n resolve(value);\n }, delayInMs);\n if (options === null || options === void 0 ? void 0 : options.abortSignal) {\n options.abortSignal.addEventListener(\"abort\", onAborted);\n }\n });\n}\n/**\n * @internal\n * @returns the parsed value or undefined if the parsed value is invalid.\n */\nexport function parseHeaderValueAsNumber(response, headerName) {\n const value = response.headers.get(headerName);\n if (!value)\n return;\n const valueAsNum = Number(value);\n if (Number.isNaN(valueAsNum))\n return;\n return valueAsNum;\n}\n//# sourceMappingURL=helpers.js.map","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { isObject } from \"@azure/core-util\";\nconst RedactedString = \"REDACTED\";\n// Make sure this list is up-to-date with the one under core/logger/Readme#Keyconcepts\nconst defaultAllowedHeaderNames = [\n \"x-ms-client-request-id\",\n \"x-ms-return-client-request-id\",\n \"x-ms-useragent\",\n \"x-ms-correlation-request-id\",\n \"x-ms-request-id\",\n \"client-request-id\",\n \"ms-cv\",\n \"return-client-request-id\",\n \"traceparent\",\n \"Access-Control-Allow-Credentials\",\n \"Access-Control-Allow-Headers\",\n \"Access-Control-Allow-Methods\",\n \"Access-Control-Allow-Origin\",\n \"Access-Control-Expose-Headers\",\n \"Access-Control-Max-Age\",\n \"Access-Control-Request-Headers\",\n \"Access-Control-Request-Method\",\n \"Origin\",\n \"Accept\",\n \"Accept-Encoding\",\n \"Cache-Control\",\n \"Connection\",\n \"Content-Length\",\n \"Content-Type\",\n \"Date\",\n \"ETag\",\n \"Expires\",\n \"If-Match\",\n \"If-Modified-Since\",\n \"If-None-Match\",\n \"If-Unmodified-Since\",\n \"Last-Modified\",\n \"Pragma\",\n \"Request-Id\",\n \"Retry-After\",\n \"Server\",\n \"Transfer-Encoding\",\n \"User-Agent\",\n \"WWW-Authenticate\",\n];\nconst defaultAllowedQueryParameters = [\"api-version\"];\n/**\n * @internal\n */\nexport class Sanitizer {\n constructor({ additionalAllowedHeaderNames: allowedHeaderNames = [], additionalAllowedQueryParameters: allowedQueryParameters = [], } = {}) {\n allowedHeaderNames = defaultAllowedHeaderNames.concat(allowedHeaderNames);\n allowedQueryParameters = defaultAllowedQueryParameters.concat(allowedQueryParameters);\n this.allowedHeaderNames = new Set(allowedHeaderNames.map((n) => n.toLowerCase()));\n this.allowedQueryParameters = new Set(allowedQueryParameters.map((p) => p.toLowerCase()));\n }\n sanitize(obj) {\n const seen = new Set();\n return JSON.stringify(obj, (key, value) => {\n // Ensure Errors include their interesting non-enumerable members\n if (value instanceof Error) {\n return Object.assign(Object.assign({}, value), { name: value.name, message: value.message });\n }\n if (key === \"headers\") {\n return this.sanitizeHeaders(value);\n }\n else if (key === \"url\") {\n return this.sanitizeUrl(value);\n }\n else if (key === \"query\") {\n return this.sanitizeQuery(value);\n }\n else if (key === \"body\") {\n // Don't log the request body\n return undefined;\n }\n else if (key === \"response\") {\n // Don't log response again\n return undefined;\n }\n else if (key === \"operationSpec\") {\n // When using sendOperationRequest, the request carries a massive\n // field with the autorest spec. No need to log it.\n return undefined;\n }\n else if (Array.isArray(value) || isObject(value)) {\n if (seen.has(value)) {\n return \"[Circular]\";\n }\n seen.add(value);\n }\n return value;\n }, 2);\n }\n sanitizeHeaders(obj) {\n const sanitized = {};\n for (const key of Object.keys(obj)) {\n if (this.allowedHeaderNames.has(key.toLowerCase())) {\n sanitized[key] = obj[key];\n }\n else {\n sanitized[key] = RedactedString;\n }\n }\n return sanitized;\n }\n sanitizeQuery(value) {\n if (typeof value !== \"object\" || value === null) {\n return value;\n }\n const sanitized = {};\n for (const k of Object.keys(value)) {\n if (this.allowedQueryParameters.has(k.toLowerCase())) {\n sanitized[k] = value[k];\n }\n else {\n sanitized[k] = RedactedString;\n }\n }\n return sanitized;\n }\n sanitizeUrl(value) {\n if (typeof value !== \"string\" || value === null) {\n return value;\n }\n const url = new URL(value);\n if (!url.search) {\n return value;\n }\n for (const [key] of url.searchParams) {\n if (!this.allowedQueryParameters.has(key.toLowerCase())) {\n url.searchParams.set(key, RedactedString);\n }\n }\n return url.toString();\n }\n}\n//# sourceMappingURL=sanitizer.js.map","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nexport function isNodeReadableStream(x) {\n return Boolean(x && typeof x[\"pipe\"] === \"function\");\n}\nexport function isWebReadableStream(x) {\n return Boolean(x &&\n typeof x.getReader === \"function\" &&\n typeof x.tee === \"function\");\n}\nexport function isReadableStream(x) {\n return isNodeReadableStream(x) || isWebReadableStream(x);\n}\nexport function isBlob(x) {\n return typeof x.stream === \"function\";\n}\n//# sourceMappingURL=typeGuards.js.map","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { SpanKind, setSpan, context as otContext, getTracer } from \"./interfaces\";\nimport { trace, INVALID_SPAN_CONTEXT } from \"@opentelemetry/api\";\nexport function isTracingDisabled() {\n var _a;\n if (typeof process === \"undefined\") {\n // not supported in browser for now without polyfills\n return false;\n }\n const azureTracingDisabledValue = (_a = process.env.AZURE_TRACING_DISABLED) === null || _a === void 0 ? void 0 : _a.toLowerCase();\n if (azureTracingDisabledValue === \"false\" || azureTracingDisabledValue === \"0\") {\n return false;\n }\n return Boolean(azureTracingDisabledValue);\n}\n/**\n * Creates a function that can be used to create spans using the global tracer.\n *\n * Usage:\n *\n * ```typescript\n * // once\n * const createSpan = createSpanFunction({ packagePrefix: \"Azure.Data.AppConfiguration\", namespace: \"Microsoft.AppConfiguration\" });\n *\n * // in each operation\n * const span = createSpan(\"deleteConfigurationSetting\", operationOptions);\n * // code...\n * span.end();\n * ```\n *\n * @hidden\n * @param args - allows configuration of the prefix for each span as well as the az.namespace field.\n */\nexport function createSpanFunction(args) {\n return function (operationName, operationOptions) {\n const tracer = getTracer();\n const tracingOptions = (operationOptions === null || operationOptions === void 0 ? void 0 : operationOptions.tracingOptions) || {};\n const spanOptions = Object.assign({ kind: SpanKind.INTERNAL }, tracingOptions.spanOptions);\n const spanName = args.packagePrefix ? `${args.packagePrefix}.${operationName}` : operationName;\n let span;\n if (isTracingDisabled()) {\n span = trace.wrapSpanContext(INVALID_SPAN_CONTEXT);\n }\n else {\n span = tracer.startSpan(spanName, spanOptions, tracingOptions.tracingContext);\n }\n if (args.namespace) {\n span.setAttribute(\"az.namespace\", args.namespace);\n }\n let newSpanOptions = tracingOptions.spanOptions || {};\n if (span.isRecording() && args.namespace) {\n newSpanOptions = Object.assign(Object.assign({}, tracingOptions.spanOptions), { attributes: Object.assign(Object.assign({}, spanOptions.attributes), { \"az.namespace\": args.namespace }) });\n }\n const newTracingOptions = Object.assign(Object.assign({}, tracingOptions), { spanOptions: newSpanOptions, tracingContext: setSpan(tracingOptions.tracingContext || otContext.active(), span) });\n const newOperationOptions = Object.assign(Object.assign({}, operationOptions), { tracingOptions: newTracingOptions });\n return {\n span,\n updatedOptions: newOperationOptions\n };\n };\n}\n//# sourceMappingURL=createSpan.js.map","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { context as otContext, trace as otTrace } from \"@opentelemetry/api\";\n/**\n * The kind of span.\n */\nexport var SpanKind;\n(function (SpanKind) {\n /** Default value. Indicates that the span is used internally. */\n SpanKind[SpanKind[\"INTERNAL\"] = 0] = \"INTERNAL\";\n /**\n * Indicates that the span covers server-side handling of an RPC or other\n * remote request.\n */\n SpanKind[SpanKind[\"SERVER\"] = 1] = \"SERVER\";\n /**\n * Indicates that the span covers the client-side wrapper around an RPC or\n * other remote request.\n */\n SpanKind[SpanKind[\"CLIENT\"] = 2] = \"CLIENT\";\n /**\n * Indicates that the span describes producer sending a message to a\n * broker. Unlike client and server, there is no direct critical path latency\n * relationship between producer and consumer spans.\n */\n SpanKind[SpanKind[\"PRODUCER\"] = 3] = \"PRODUCER\";\n /**\n * Indicates that the span describes consumer receiving a message from a\n * broker. Unlike client and server, there is no direct critical path latency\n * relationship between producer and consumer spans.\n */\n SpanKind[SpanKind[\"CONSUMER\"] = 4] = \"CONSUMER\";\n})(SpanKind || (SpanKind = {}));\n/**\n * Return the span if one exists\n *\n * @param context - context to get span from\n */\nexport function getSpan(context) {\n return otTrace.getSpan(context);\n}\n/**\n * Set the span on a context\n *\n * @param context - context to use as parent\n * @param span - span to set active\n */\nexport function setSpan(context, span) {\n return otTrace.setSpan(context, span);\n}\n/**\n * Wrap span context in a NoopSpan and set as span in a new\n * context\n *\n * @param context - context to set active span on\n * @param spanContext - span context to be wrapped\n */\nexport function setSpanContext(context, spanContext) {\n return otTrace.setSpanContext(context, spanContext);\n}\n/**\n * Get the span context of the span if it exists.\n *\n * @param context - context to get values from\n */\nexport function getSpanContext(context) {\n return otTrace.getSpanContext(context);\n}\n/**\n * Returns true of the given {@link SpanContext} is valid.\n * A valid {@link SpanContext} is one which has a valid trace ID and span ID as per the spec.\n *\n * @param context - the {@link SpanContext} to validate.\n *\n * @returns true if the {@link SpanContext} is valid, false otherwise.\n */\nexport function isSpanContextValid(context) {\n return otTrace.isSpanContextValid(context);\n}\nexport function getTracer(name, version) {\n return otTrace.getTracer(name || \"azure/core-tracing\", version);\n}\n/** Entrypoint for context API */\nexport const context = otContext;\n/** SpanStatusCode */\nexport var SpanStatusCode;\n(function (SpanStatusCode) {\n /**\n * The default status.\n */\n SpanStatusCode[SpanStatusCode[\"UNSET\"] = 0] = \"UNSET\";\n /**\n * The operation has been validated by an Application developer or\n * Operator to have completed successfully.\n */\n SpanStatusCode[SpanStatusCode[\"OK\"] = 1] = \"OK\";\n /**\n * The operation contains an error.\n */\n SpanStatusCode[SpanStatusCode[\"ERROR\"] = 2] = \"ERROR\";\n})(SpanStatusCode || (SpanStatusCode = {}));\n//# sourceMappingURL=interfaces.js.map","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nconst VERSION = \"00\";\n/**\n * Generates a `SpanContext` given a `traceparent` header value.\n * @param traceParent - Serialized span context data as a `traceparent` header value.\n * @returns The `SpanContext` generated from the `traceparent` value.\n */\nexport function extractSpanContextFromTraceParentHeader(traceParentHeader) {\n const parts = traceParentHeader.split(\"-\");\n if (parts.length !== 4) {\n return;\n }\n const [version, traceId, spanId, traceOptions] = parts;\n if (version !== VERSION) {\n return;\n }\n const traceFlags = parseInt(traceOptions, 16);\n const spanContext = {\n spanId,\n traceId,\n traceFlags\n };\n return spanContext;\n}\n/**\n * Generates a `traceparent` value given a span context.\n * @param spanContext - Contains context for a specific span.\n * @returns The `spanContext` represented as a `traceparent` value.\n */\nexport function getTraceParentHeader(spanContext) {\n const missingFields = [];\n if (!spanContext.traceId) {\n missingFields.push(\"traceId\");\n }\n if (!spanContext.spanId) {\n missingFields.push(\"spanId\");\n }\n if (missingFields.length) {\n return;\n }\n const flags = spanContext.traceFlags || 0 /* NONE */;\n const hexFlags = flags.toString(16);\n const traceFlags = hexFlags.length === 1 ? `0${hexFlags}` : hexFlags;\n // https://www.w3.org/TR/trace-context/#traceparent-header-field-values\n return `${VERSION}-${spanContext.traceId}-${spanContext.spanId}-${traceFlags}`;\n}\n//# sourceMappingURL=traceParentHeader.js.map","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n/** @internal */\nexport const knownContextKeys = {\n span: Symbol.for(\"@azure/core-tracing span\"),\n namespace: Symbol.for(\"@azure/core-tracing namespace\"),\n};\n/**\n * Creates a new {@link TracingContext} with the given options.\n * @param options - A set of known keys that may be set on the context.\n * @returns A new {@link TracingContext} with the given options.\n *\n * @internal\n */\nexport function createTracingContext(options = {}) {\n let context = new TracingContextImpl(options.parentContext);\n if (options.span) {\n context = context.setValue(knownContextKeys.span, options.span);\n }\n if (options.namespace) {\n context = context.setValue(knownContextKeys.namespace, options.namespace);\n }\n return context;\n}\n/** @internal */\nexport class TracingContextImpl {\n constructor(initialContext) {\n this._contextMap =\n initialContext instanceof TracingContextImpl\n ? new Map(initialContext._contextMap)\n : new Map();\n }\n setValue(key, value) {\n const newContext = new TracingContextImpl(this);\n newContext._contextMap.set(key, value);\n return newContext;\n }\n getValue(key) {\n return this._contextMap.get(key);\n }\n deleteValue(key) {\n const newContext = new TracingContextImpl(this);\n newContext._contextMap.delete(key);\n return newContext;\n }\n}\n//# sourceMappingURL=tracingContext.js.map","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { createTracingContext } from \"./tracingContext\";\nexport function createDefaultTracingSpan() {\n return {\n end: () => {\n // noop\n },\n isRecording: () => false,\n recordException: () => {\n // noop\n },\n setAttribute: () => {\n // noop\n },\n setStatus: () => {\n // noop\n },\n };\n}\nexport function createDefaultInstrumenter() {\n return {\n createRequestHeaders: () => {\n return {};\n },\n parseTraceparentHeader: () => {\n return undefined;\n },\n startSpan: (_name, spanOptions) => {\n return {\n span: createDefaultTracingSpan(),\n tracingContext: createTracingContext({ parentContext: spanOptions.tracingContext }),\n };\n },\n withContext(_context, callback, ...callbackArgs) {\n return callback(...callbackArgs);\n },\n };\n}\n/** @internal */\nlet instrumenterImplementation;\n/**\n * Extends the Azure SDK with support for a given instrumenter implementation.\n *\n * @param instrumenter - The instrumenter implementation to use.\n */\nexport function useInstrumenter(instrumenter) {\n instrumenterImplementation = instrumenter;\n}\n/**\n * Gets the currently set instrumenter, a No-Op instrumenter by default.\n *\n * @returns The currently set instrumenter\n */\nexport function getInstrumenter() {\n if (!instrumenterImplementation) {\n instrumenterImplementation = createDefaultInstrumenter();\n }\n return instrumenterImplementation;\n}\n//# sourceMappingURL=instrumenter.js.map","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { getInstrumenter } from \"./instrumenter\";\nimport { knownContextKeys } from \"./tracingContext\";\n/**\n * Creates a new tracing client.\n *\n * @param options - Options used to configure the tracing client.\n * @returns - An instance of {@link TracingClient}.\n */\nexport function createTracingClient(options) {\n const { namespace, packageName, packageVersion } = options;\n function startSpan(name, operationOptions, spanOptions) {\n var _a;\n const startSpanResult = getInstrumenter().startSpan(name, Object.assign(Object.assign({}, spanOptions), { packageName: packageName, packageVersion: packageVersion, tracingContext: (_a = operationOptions === null || operationOptions === void 0 ? void 0 : operationOptions.tracingOptions) === null || _a === void 0 ? void 0 : _a.tracingContext }));\n let tracingContext = startSpanResult.tracingContext;\n const span = startSpanResult.span;\n if (!tracingContext.getValue(knownContextKeys.namespace)) {\n tracingContext = tracingContext.setValue(knownContextKeys.namespace, namespace);\n }\n span.setAttribute(\"az.namespace\", tracingContext.getValue(knownContextKeys.namespace));\n const updatedOptions = Object.assign({}, operationOptions, {\n tracingOptions: Object.assign(Object.assign({}, operationOptions === null || operationOptions === void 0 ? void 0 : operationOptions.tracingOptions), { tracingContext }),\n });\n return {\n span,\n updatedOptions,\n };\n }\n async function withSpan(name, operationOptions, callback, spanOptions) {\n const { span, updatedOptions } = startSpan(name, operationOptions, spanOptions);\n try {\n const result = await withContext(updatedOptions.tracingOptions.tracingContext, () => Promise.resolve(callback(updatedOptions, span)));\n span.setStatus({ status: \"success\" });\n return result;\n }\n catch (err) {\n span.setStatus({ status: \"error\", error: err });\n throw err;\n }\n finally {\n span.end();\n }\n }\n function withContext(context, callback, ...callbackArgs) {\n return getInstrumenter().withContext(context, callback, ...callbackArgs);\n }\n /**\n * Parses a traceparent header value into a span identifier.\n *\n * @param traceparentHeader - The traceparent header to parse.\n * @returns An implementation-specific identifier for the span.\n */\n function parseTraceparentHeader(traceparentHeader) {\n return getInstrumenter().parseTraceparentHeader(traceparentHeader);\n }\n /**\n * Creates a set of request headers to propagate tracing information to a backend.\n *\n * @param tracingContext - The context containing the span to serialize.\n * @returns The set of headers to add to a request.\n */\n function createRequestHeaders(tracingContext) {\n return getInstrumenter().createRequestHeaders(tracingContext);\n }\n return {\n startSpan,\n withSpan,\n withContext,\n parseTraceparentHeader,\n createRequestHeaders,\n };\n}\n//# sourceMappingURL=tracingClient.js.map","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nvar _a, _b, _c, _d;\n/**\n * A constant that indicates whether the environment the code is running is a Web Browser.\n */\n// eslint-disable-next-line @azure/azure-sdk/ts-no-window\nexport const isBrowser = typeof window !== \"undefined\" && typeof window.document !== \"undefined\";\n/**\n * A constant that indicates whether the environment the code is running is a Web Worker.\n */\nexport const isWebWorker = typeof self === \"object\" &&\n typeof (self === null || self === void 0 ? void 0 : self.importScripts) === \"function\" &&\n (((_a = self.constructor) === null || _a === void 0 ? void 0 : _a.name) === \"DedicatedWorkerGlobalScope\" ||\n ((_b = self.constructor) === null || _b === void 0 ? void 0 : _b.name) === \"ServiceWorkerGlobalScope\" ||\n ((_c = self.constructor) === null || _c === void 0 ? void 0 : _c.name) === \"SharedWorkerGlobalScope\");\n/**\n * A constant that indicates whether the environment the code is running is Deno.\n */\nexport const isDeno = typeof Deno !== \"undefined\" &&\n typeof Deno.version !== \"undefined\" &&\n typeof Deno.version.deno !== \"undefined\";\n/**\n * A constant that indicates whether the environment the code is running is Node.JS.\n */\nexport const isNode = typeof process !== \"undefined\" &&\n Boolean(process.version) &&\n Boolean((_d = process.versions) === null || _d === void 0 ? void 0 : _d.node) &&\n // Deno thought it was a good idea to spoof process.versions.node, see https://deno.land/std@0.177.0/node/process.ts?s=versions\n !isDeno;\n/**\n * A constant that indicates whether the environment the code is running is Bun.sh.\n */\nexport const isBun = typeof Bun !== \"undefined\" && typeof Bun.version !== \"undefined\";\n/**\n * A constant that indicates whether the environment the code is running is in React-Native.\n */\n// https://github.com/facebook/react-native/blob/main/packages/react-native/Libraries/Core/setUpNavigator.js\nexport const isReactNative = typeof navigator !== \"undefined\" && (navigator === null || navigator === void 0 ? void 0 : navigator.product) === \"ReactNative\";\n//# sourceMappingURL=checkEnvironment.js.map","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { createAbortablePromise } from \"./createAbortablePromise\";\nconst StandardAbortMessage = \"The delay was aborted.\";\n/**\n * A wrapper for setTimeout that resolves a promise after timeInMs milliseconds.\n * @param timeInMs - The number of milliseconds to be delayed.\n * @param options - The options for delay - currently abort options\n * @returns Promise that is resolved after timeInMs\n */\nexport function delay(timeInMs, options) {\n let token;\n const { abortSignal, abortErrorMsg } = options !== null && options !== void 0 ? options : {};\n return createAbortablePromise((resolve) => {\n token = setTimeout(resolve, timeInMs);\n }, {\n cleanupBeforeAbort: () => clearTimeout(token),\n abortSignal,\n abortErrorMsg: abortErrorMsg !== null && abortErrorMsg !== void 0 ? abortErrorMsg : StandardAbortMessage,\n });\n}\n//# sourceMappingURL=delay.js.map","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { AbortError } from \"@azure/abort-controller\";\n/**\n * Creates an abortable promise.\n * @param buildPromise - A function that takes the resolve and reject functions as parameters.\n * @param options - The options for the abortable promise.\n * @returns A promise that can be aborted.\n */\nexport function createAbortablePromise(buildPromise, options) {\n const { cleanupBeforeAbort, abortSignal, abortErrorMsg } = options !== null && options !== void 0 ? options : {};\n return new Promise((resolve, reject) => {\n function rejectOnAbort() {\n reject(new AbortError(abortErrorMsg !== null && abortErrorMsg !== void 0 ? abortErrorMsg : \"The operation was aborted.\"));\n }\n function removeListeners() {\n abortSignal === null || abortSignal === void 0 ? void 0 : abortSignal.removeEventListener(\"abort\", onAbort);\n }\n function onAbort() {\n cleanupBeforeAbort === null || cleanupBeforeAbort === void 0 ? void 0 : cleanupBeforeAbort();\n removeListeners();\n rejectOnAbort();\n }\n if (abortSignal === null || abortSignal === void 0 ? void 0 : abortSignal.aborted) {\n return rejectOnAbort();\n }\n try {\n buildPromise((x) => {\n removeListeners();\n resolve(x);\n }, (x) => {\n removeListeners();\n reject(x);\n });\n }\n catch (err) {\n reject(err);\n }\n abortSignal === null || abortSignal === void 0 ? void 0 : abortSignal.addEventListener(\"abort\", onAbort);\n });\n}\n//# sourceMappingURL=createAbortablePromise.js.map","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { isObject } from \"./object\";\n/**\n * Typeguard for an error object shape (has name and message)\n * @param e - Something caught by a catch clause.\n */\nexport function isError(e) {\n if (isObject(e)) {\n const hasName = typeof e.name === \"string\";\n const hasMessage = typeof e.message === \"string\";\n return hasName && hasMessage;\n }\n return false;\n}\n/**\n * Given what is thought to be an error object, return the message if possible.\n * If the message is missing, returns a stringified version of the input.\n * @param e - Something thrown from a try block\n * @returns The error message or a string of the input\n */\nexport function getErrorMessage(e) {\n if (isError(e)) {\n return e.message;\n }\n else {\n let stringified;\n try {\n if (typeof e === \"object\" && e) {\n stringified = JSON.stringify(e);\n }\n else {\n stringified = String(e);\n }\n }\n catch (err) {\n stringified = \"[unable to stringify input]\";\n }\n return `Unknown error ${stringified}`;\n }\n}\n//# sourceMappingURL=error.js.map","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n/**\n * Helper to determine when an input is a generic JS object.\n * @returns true when input is an object type that is not null, Array, RegExp, or Date.\n */\nexport function isObject(input) {\n return (typeof input === \"object\" &&\n input !== null &&\n !Array.isArray(input) &&\n !(input instanceof RegExp) &&\n !(input instanceof Date));\n}\n//# sourceMappingURL=object.js.map","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n/*\n * NOTE: When moving this file, please update \"react-native\" section in package.json.\n */\n/**\n * Generated Universally Unique Identifier\n *\n * @returns RFC4122 v4 UUID.\n */\nexport function generateUUID() {\n let uuid = \"\";\n for (let i = 0; i < 32; i++) {\n // Generate a random number between 0 and 15\n const randomNumber = Math.floor(Math.random() * 16);\n // Set the UUID version to 4 in the 13th position\n if (i === 12) {\n uuid += \"4\";\n }\n else if (i === 16) {\n // Set the UUID variant to \"10\" in the 17th position\n uuid += (randomNumber & 0x3) | 0x8;\n }\n else {\n // Add a random hexadecimal digit to the UUID string\n uuid += randomNumber.toString(16);\n }\n // Add hyphens to the UUID string at the appropriate positions\n if (i === 7 || i === 11 || i === 15 || i === 19) {\n uuid += \"-\";\n }\n }\n return uuid;\n}\n/**\n * Generated Universally Unique Identifier\n *\n * @returns RFC4122 v4 UUID.\n */\nexport function randomUUID() {\n return generateUUID();\n}\n//# sourceMappingURL=uuidUtils.native.js.map","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nvar _a;\nimport { generateUUID } from \"./uuidUtils.native\";\n// NOTE: This could be undefined if not used in a secure context\nconst uuidFunction = typeof ((_a = globalThis === null || globalThis === void 0 ? void 0 : globalThis.crypto) === null || _a === void 0 ? void 0 : _a.randomUUID) === \"function\"\n ? globalThis.crypto.randomUUID.bind(globalThis.crypto)\n : generateUUID;\n/**\n * Generated Universally Unique Identifier\n *\n * @returns RFC4122 v4 UUID.\n */\nexport function randomUUID() {\n return uuidFunction();\n}\n//# sourceMappingURL=uuidUtils.browser.js.map"],"names":["PollerStoppedError","Error","constructor","message","super","this","name","Object","setPrototypeOf","prototype","PollerCancelledError","Poller","operation","resolveOnUnsuccessful","stopped","pollProgressCallbacks","promise","Promise","resolve","reject","catch","startPolling","pollOptions","isStopped","isDone","poll","delay","pollOnce","options","update","abortSignal","fireProgress","bind","processUpdatedState","state","callback","cancelOnce","cancel","pollOncePromise","clearPollOncePromise","undefined","then","error","isCancelled","getResult","pollUntilDone","onProgress","push","filter","c","Boolean","isCompleted","stopPolling","cancelOperation","cancelPromise","getOperationState","result","toString","logPolicyName","ValidPhaseNames","Set","HttpPipeline","policies","_a","_policies","slice","_orderedPolicies","addPolicy","policy","phase","afterPhase","has","removePolicy","removedPolicies","policyDescriptor","sendRequest","httpClient","request","getOrderedPolicies","reduceRight","next","req","pipeline","orderPolicies","clone","create","policyMap","Map","createPhase","hasRun","hasAfterPolicies","serializePhase","noPhase","deserializePhase","retryPhase","signPhase","orderedPhases","getPhase","descriptor","policyName","node","dependsOn","dependants","set","add","get","afterPolicies","afterPolicyName","afterNode","beforePolicies","beforePolicyName","beforeNode","walkPhase","size","dependant","delete","walkPhases","iteration","initialResultLength","length","redirectPolicyName","allowedRedirect","redirectPolicy","maxRetries","response","handleRedirect","async","currentRetries","status","headers","locationHeader","includes","method","url","URL","body","res","SDK_VERSION","DEFAULT_RETRY_POLICY_COUNT","getUserAgentValue","prefix","runtimeInfo","map","_b","_c","localNavigator","globalThis","navigator","userAgentData","platform","replace","setPlatformSpecificData","defaultAgent","telemetryInfo","parts","key","value","token","join","getUserAgentString","UserAgentHeaderName","userAgentPolicyName","RetryAfterHeader","AllRetryAfterHeaders","getRetryAfterInMs","header","retryAfterValue","retryAfterHeader","diff","Date","parse","now","Number","isFinite","Math","max","e","DEFAULT_CLIENT_RETRY_INTERVAL","DEFAULT_CLIENT_MAX_RETRY_INTERVAL","exponentialRetryStrategy","retryInterval","retryDelayInMs","maxRetryInterval","maxRetryDelayInMs","retryAfterInMs","retry","retryCount","responseError","matchedSystemError","err","code","isSystemError","ignoreSystemErrors","isExponential","isExponentialRetryResponse","ignoreExponentialResponse","ignoreHttpStatusCodes","unknownResponse","isThrottlingRetryResponse","skipStrategy","errorToThrow","exponentialDelay","pow","clampedExponentialDelay","min","ceil","floor","random","retryPolicyLogger","createClientLogger","retryPolicyName","retryPolicy","strategies","logger","retryRequest","info","requestId","aborted","strategiesLoop","strategy","strategyLogger","modifiers","redirectTo","defaultRetryPolicyName","stringToUint8Array","format","TextEncoder","encode","utf8StringToUint8Array","base64ToUint8Array","base64String","base64UrlToUint8Array","bytes","Uint8Array","i","highNibble","lowNibble","hexDigits","parseInt","hexStringToUint8Array","atob","x","charCodeAt","formDataPolicyName","formDataPolicy","formData","contentType","indexOf","urlSearchParams","URLSearchParams","entries","Array","isArray","subValue","append","wwwFormUrlEncode","startsWith","fieldName","values","fileName","type","multipartBody","prepareFormData","errorMessage","setClientRequestIdPolicyName","tlsPolicyName","tracingPolicyName","tracingPolicy","userAgent","userAgentPrefix","tracingClient","tryCreateTracingClient","tracingOptions","tracingContext","span","updatedOptions","startSpan","spanKind","spanAttributes","isRecording","end","setAttribute","createRequestHeaders","log","tryCreateSpan","withContext","serviceRequestId","setStatus","tryProcessResponse","statusCode","tryProcessError","namespace","packageName","packageVersion","toStream","source","Blob","stream","concatenateStreams","streams","remainingStreams","from","reader","shift","getReader","doPull","controller","close","done","read","releaseLock","enqueue","ReadableStream","pull","reason","encodeHeaders","getLength","byteLength","buildRequestBody","boundary","sources","flatMap","part","contentLength","total","partLength","getTotalLength","multipartPolicyName","maxBoundaryLength","validBoundaryCharacters","multipartPolicy","contentTypeHeader","parsedHeader","match","parsedBoundary","some","assertValidBoundary","createPipelineFromOptions","tlsSettings","tlsOptions","proxyPolicy","proxyOptions","decompressResponsePolicy","userAgentValue","userAgentPolicy","userAgentOptions","requestIdHeaderName","setClientRequestIdPolicy","telemetryOptions","clientRequestIdHeaderName","defaultRetryPolicy","retryOptions","redirectOptions","sanitizer","additionalAllowedHeaderNames","additionalAllowedQueryParameters","enabled","sanitize","logPolicy","loggingOptions","FetchHttpClient","protocol","allowInsecureConnection","proxySettings","abortController","abortControllerCleanup","AbortController","abortListener","event","abort","addEventListener","removeEventListener","timeout","setTimeout","setupAbortSignal","pipelineHeaders","Headers","buildFetchHeaders","streaming","requestBody","buildBodyStream","onUploadProgress","requestInit","assign","signal","Request","credentials","withCredentials","cache","duplex","fetch","loadedBytes","httpResponse","responseHeaders","buildPipelineHeaders","bodyStream","onDownloadProgress","onEnd","streamResponseStatusCodes","POSITIVE_INFINITY","enableBrowserStreams","browserStreamBody","responseStream","Response","blobBody","blob","bodyAsText","text","buildPipelineResponse","makeRequest","getError","readableStream","pipeThrough","self","TransformStream","isTransformStreamSupported","transform","chunk","terminate","flush","createDefaultHttpClient","normalizeName","toLowerCase","HttpHeadersImpl","rawHeaders","_headersMap","headerName","keys","String","trim","toJSON","preserveCase","entry","normalizedName","JSON","stringify","Symbol","iterator","headerIterator","createHttpHeaders","PipelineRequestImpl","_d","_e","_f","_g","disableKeepAlive","createPipelineRequest","DEFAULT_CYCLER_OPTIONS","forcedRefreshWindowInMs","retryIntervalInMs","refreshWindowInMs","createTokenCycler","credential","tokenCyclerOptions","tenantId","refreshWorker","cycler","isRefreshing","shouldRefresh","expiresOnTimestamp","mustRefresh","refresh","scopes","getTokenOptions","getAccessToken","refreshTimeout","tryGetAccessToken","finalToken","beginRefresh","getToken","_token","tokenOptions","claims","bearerTokenAuthenticationPolicyName","defaultAuthorizeRequest","accessToken","bearerTokenAuthenticationPolicy","challengeCallbacks","callbacks","authorizeRequest","authorizeRequestOnChallenge","challenge","getChallenge","custom","errorSanitizer","RestError","isRestError","REQUEST_SEND_ERROR","PARSE_ERROR","StandardAbortMessage","delayInMs","timer","onAborted","rejectOnAbort","abortErrorMsg","removeListeners","clearTimeout","parseHeaderValueAsNumber","valueAsNum","isNaN","RedactedString","defaultAllowedHeaderNames","defaultAllowedQueryParameters","Sanitizer","allowedHeaderNames","allowedQueryParameters","concat","n","p","obj","seen","sanitizeHeaders","sanitizeUrl","sanitizeQuery","sanitized","k","search","searchParams","isNodeReadableStream","isWebReadableStream","tee","isBlob","createSpanFunction","args","operationName","operationOptions","tracer","spanOptions","kind","spanName","packagePrefix","process","azureTracingDisabledValue","AZURE_TRACING_DISABLED","isTracingDisabled","newSpanOptions","attributes","newTracingOptions","SpanKind","setSpan","context","isSpanContextValid","getTracer","version","SpanStatusCode","VERSION","getTraceParentHeader","spanContext","missingFields","traceId","spanId","hexFlags","traceFlags","knownContextKeys","for","createTracingContext","TracingContextImpl","parentContext","setValue","initialContext","_contextMap","newContext","getValue","deleteValue","instrumenterImplementation","getInstrumenter","parseTraceparentHeader","_name","recordException","_context","callbackArgs","createTracingClient","startSpanResult","withSpan","traceparentHeader","window","document","importScripts","isDeno","Deno","deno","isNode","versions","Bun","product","timeInMs","buildPromise","cleanupBeforeAbort","onAbort","createAbortablePromise","isError","hasName","hasMessage","getErrorMessage","stringified","isObject","input","RegExp","generateUUID","uuid","randomNumber","uuidFunction","crypto","randomUUID"],"sourceRoot":""}