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aC,EAAQT,GAC1B,MAAMpb,EAAS3K,OAAOC,OAAOumB,EAAOnB,OAAOU,GAAQ,CAC/CA,UAGJ,GADAO,EAAeE,EAAQ7b,GACnBqb,EAAarb,GAAS,CACtB,MAAMkZ,EAAoBU,EAAMJ,UAChCI,EAAMP,OAAOH,EAAoB,IAAMlZ,EAAOmE,UAClD,CAEA,OADA0W,EAAkB7nB,IAAIgN,GACfA,CACX,CACA,SAASqb,EAAarb,GAClB,OAAO/F,QAAQ+gB,GAAiBO,EAASvb,EAAOob,QAAUG,EAASP,GACvE,CACA,SAASG,EAAgBW,GACrB,OAAOZ,EAAiBjkB,SAAS6kB,EACrC,C","sources":["webpack://power-app-fe/./node_modules/@azure/core-rest-pipeline/dist/browser/pipeline.js","webpack://power-app-fe/./node_modules/@azure/core-rest-pipeline/dist/browser/log.js","webpack://power-app-fe/./node_modules/@azure/core-rest-pipeline/dist/browser/util/sanitizer.js","webpack://power-app-fe/./node_modules/@azure/core-rest-pipeline/dist/browser/policies/logPolicy.js","webpack://power-app-fe/./node_modules/@azure/core-rest-pipeline/dist/browser/policies/redirectPolicy.js","webpack://power-app-fe/./node_modules/@azure/core-rest-pipeline/dist/browser/constants.js","webpack://power-app-fe/./node_modules/@azure/core-rest-pipeline/dist/browser/util/userAgent.js","webpack://power-app-fe/./node_modules/@azure/core-rest-pipeline/dist/browser/util/userAgentPlatform.js","webpack://power-app-fe/./node_modules/@azure/core-rest-pipeline/dist/browser/policies/userAgentPolicy.js","webpack://power-app-fe/./node_modules/@azure/core-rest-pipeline/dist/browser/util/file.js","webpack://power-app-fe/./node_modules/@azure/core-rest-pipeline/dist/browser/util/typeGuards.js","webpack://power-app-fe/./node_modules/@azure/core-rest-pipeline/dist/browser/util/concat.common.js","webpack://power-app-fe/./node_modules/@azure/core-rest-pipeline/dist/browser/policies/multipartPolicy.js","webpack://power-app-fe/./node_modules/@azure/core-rest-pipeline/dist/browser/policies/decompressResponsePolicy.js","webpack://power-app-fe/./node_modules/@azure/core-rest-pipeline/dist/browser/util/helpers.js","webpack://power-app-fe/./node_modules/@azure/core-rest-pipeline/dist/browser/retryStrategies/throttlingRetryStrategy.js","webpack://power-app-fe/./node_modules/@azure/core-rest-pipeline/dist/browser/retryStrategies/exponentialRetryStrategy.js","webpack://power-app-fe/./node_modules/@azure/core-rest-pipeline/dist/browser/policies/retryPolicy.js","webpack://power-app-fe/./node_modules/@azure/core-rest-pipeline/dist/browser/policies/defaultRetryPolicy.js","webpack://power-app-fe/./node_modules/@azure/core-rest-pipeline/dist/browser/httpHeaders.js","webpack://power-app-fe/./node_modules/@azure/core-rest-pipeline/dist/browser/policies/formDataPolicy.js","webpack://power-app-fe/./node_modules/@azure/core-rest-pipeline/dist/browser/policies/proxyPolicy.common.js","webpack://power-app-fe/./node_modules/@azure/core-rest-pipeline/dist/browser/policies/setClientRequestIdPolicy.js","webpack://power-app-fe/./node_modules/@azure/core-rest-pipeline/dist/browser/policies/tlsPolicy.js","webpack://power-app-fe/./node_modules/@azure/core-rest-pipeline/dist/browser/util/inspect.common.js","webpack://power-app-fe/./node_modules/@azure/core-rest-pipeline/dist/browser/restError.js","webpack://power-app-fe/./node_modules/@azure/core-rest-pipeline/dist/browser/policies/tracingPolicy.js","webpack://power-app-fe/./node_modules/@azure/core-rest-pipeline/dist/browser/createPipelineFromOptions.js","webpack://power-app-fe/./node_modules/@azure/core-rest-pipeline/dist/browser/fetchHttpClient.js","webpack://power-app-fe/./node_modules/@azure/core-rest-pipeline/dist/browser/defaultHttpClient.js","webpack://power-app-fe/./node_modules/@azure/core-rest-pipeline/dist/browser/pipelineRequest.js","webpack://power-app-fe/./node_modules/@azure/core-rest-pipeline/dist/browser/util/tokenCycler.js","webpack://power-app-fe/./node_modules/@azure/core-rest-pipeline/dist/browser/policies/bearerTokenAuthenticationPolicy.js","webpack://power-app-fe/./node_modules/@azure/core-tracing/dist/browser/tracingContext.js","webpack://power-app-fe/./node_modules/@azure/core-tracing/dist/browser/state.js","webpack://power-app-fe/./node_modules/@azure/core-tracing/dist/browser/instrumenter.js","webpack://power-app-fe/./node_modules/@azure/core-tracing/dist/browser/tracingClient.js","webpack://power-app-fe/./node_modules/@azure/core-util/dist/browser/delay.js","webpack://power-app-fe/./node_modules/@azure/core-util/dist/browser/createAbortablePromise.js","webpack://power-app-fe/./node_modules/@azure/core-util/dist/browser/random.js","webpack://power-app-fe/./node_modules/@azure/core-util/dist/browser/object.js","webpack://power-app-fe/./node_modules/@azure/core-util/dist/browser/error.js","webpack://power-app-fe/./node_modules/@azure/core-util/dist/browser/bytesEncoding.common.js","webpack://power-app-fe/./node_modules/@azure/core-util/dist/browser/uuidUtils.common.js","webpack://power-app-fe/./node_modules/@azure/core-util/dist/browser/uuidUtils.js","webpack://power-app-fe/./node_modules/@azure/core-util/dist/browser/checkEnvironment.js","webpack://power-app-fe/./node_modules/@azure/core-xml/dist/browser/xml.common.js","webpack://power-app-fe/./node_modules/@azure/core-xml/dist/browser/xml.js","webpack://power-app-fe/./node_modules/@azure/logger/dist/browser/debug.js","webpack://power-app-fe/./node_modules/@azure/logger/dist/browser/log.common.js","webpack://power-app-fe/./node_modules/@azure/logger/dist/browser/index.js"],"sourcesContent":["// 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.\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 { 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 sanitizeUrl(value) {\n if (typeof value !== \"string\" || value === null || value === \"\") {\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 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}\n//# sourceMappingURL=sanitizer.js.map","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\nimport { logger as coreLogger } from \"../log.js\";\nimport { Sanitizer } from \"../util/sanitizer.js\";\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.\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.18.2\";\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.js\";\nimport { SDK_VERSION } from \"../constants.js\";\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 async function getUserAgentValue(prefix) {\n const runtimeInfo = new Map();\n runtimeInfo.set(\"core-rest-pipeline\", SDK_VERSION);\n await 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 * @internal\n */\nexport function getHeaderName() {\n return \"x-ms-useragent\";\n}\nfunction getBrowserInfo(userAgent) {\n const browserRegexes = [\n { name: \"Firefox\", regex: /Firefox\\/([\\d.]+)/ },\n { name: \"Safari\", regex: /Version\\/([\\d.]+).*Safari/ },\n ];\n for (const browser of browserRegexes) {\n const match = userAgent.match(browser.regex);\n if (match) {\n return { brand: browser.name, version: match[1] };\n }\n }\n return undefined;\n}\nfunction getBrandVersionString(brands) {\n const brandOrder = [\"Google Chrome\", \"Microsoft Edge\", \"Opera\", \"Brave\", \"Chromium\"];\n for (const brand of brandOrder) {\n const foundBrand = brands.find((b) => b.brand === brand);\n if (foundBrand) {\n return foundBrand;\n }\n }\n return undefined;\n}\n/**\n * @internal\n */\nexport async function setPlatformSpecificData(map) {\n const localNavigator = globalThis.navigator;\n let osPlatform = \"unknown\";\n if (localNavigator === null || localNavigator === void 0 ? void 0 : localNavigator.userAgentData) {\n const entropyValues = await localNavigator.userAgentData.getHighEntropyValues([\n \"architecture\",\n \"platformVersion\",\n ]);\n osPlatform = `${entropyValues.architecture}-${entropyValues.platform}-${entropyValues.platformVersion}`;\n // Get the brand and version\n const brand = getBrandVersionString(localNavigator.userAgentData.brands);\n if (brand) {\n map.set(brand.brand, brand.version);\n }\n }\n else if (localNavigator === null || localNavigator === void 0 ? void 0 : localNavigator.platform) {\n osPlatform = localNavigator.platform;\n const brand = getBrowserInfo(localNavigator.userAgent);\n if (brand) {\n map.set(brand.brand, brand.version);\n }\n }\n else if (typeof globalThis.EdgeRuntime === \"string\") {\n map.set(\"EdgeRuntime\", globalThis.EdgeRuntime);\n }\n map.set(\"OS\", osPlatform);\n}\n//# sourceMappingURL=userAgentPlatform-browser.mjs.map","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\nimport { getUserAgentHeaderName, getUserAgentValue } from \"../util/userAgent.js\";\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, await 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 { isNodeLike } from \"@azure/core-util\";\nimport { isNodeReadableStream } from \"./typeGuards.js\";\nconst unimplementedMethods = {\n arrayBuffer: () => {\n throw new Error(\"Not implemented\");\n },\n bytes: () => {\n throw new Error(\"Not implemented\");\n },\n slice: () => {\n throw new Error(\"Not implemented\");\n },\n text: () => {\n throw new Error(\"Not implemented\");\n },\n};\n/**\n * Private symbol used as key on objects created using createFile containing the\n * original source of the file object.\n *\n * This is used in Node to access the original Node stream without using Blob#stream, which\n * returns a web stream. This is done to avoid a couple of bugs to do with Blob#stream and\n * Readable#to/fromWeb in Node versions we support:\n * - https://github.com/nodejs/node/issues/42694 (fixed in Node 18.14)\n * - https://github.com/nodejs/node/issues/48916 (fixed in Node 20.6)\n *\n * Once these versions are no longer supported, we may be able to stop doing this.\n *\n * @internal\n */\nconst rawContent = Symbol(\"rawContent\");\nfunction hasRawContent(x) {\n return typeof x[rawContent] === \"function\";\n}\n/**\n * Extract the raw content from a given blob-like object. If the input was created using createFile\n * or createFileFromStream, the exact content passed into createFile/createFileFromStream will be used.\n * For true instances of Blob and File, returns the blob's content as a Web ReadableStream.\n *\n * @internal\n */\nexport function getRawContent(blob) {\n if (hasRawContent(blob)) {\n return blob[rawContent]();\n }\n else {\n return blob.stream();\n }\n}\n/**\n * Create an object that implements the File interface. This object is intended to be\n * passed into RequestBodyType.formData, and is not guaranteed to work as expected in\n * other situations.\n *\n * Use this function to:\n * - Create a File object for use in RequestBodyType.formData in environments where the\n * global File object is unavailable.\n * - Create a File-like object from a readable stream without reading the stream into memory.\n *\n * @param stream - the content of the file as a callback returning a stream. When a File object made using createFile is\n * passed in a request's form data map, the stream will not be read into memory\n * and instead will be streamed when the request is made. In the event of a retry, the\n * stream needs to be read again, so this callback SHOULD return a fresh stream if possible.\n * @param name - the name of the file.\n * @param options - optional metadata about the file, e.g. file name, file size, MIME type.\n */\nexport function createFileFromStream(stream, name, options = {}) {\n var _a, _b, _c, _d;\n return Object.assign(Object.assign({}, unimplementedMethods), { type: (_a = options.type) !== null && _a !== void 0 ? _a : \"\", lastModified: (_b = options.lastModified) !== null && _b !== void 0 ? _b : new Date().getTime(), webkitRelativePath: (_c = options.webkitRelativePath) !== null && _c !== void 0 ? _c : \"\", size: (_d = options.size) !== null && _d !== void 0 ? _d : -1, name, stream: () => {\n const s = stream();\n if (isNodeReadableStream(s)) {\n throw new Error(\"Not supported: a Node stream was provided as input to createFileFromStream.\");\n }\n return s;\n }, [rawContent]: stream });\n}\n/**\n * Create an object that implements the File interface. This object is intended to be\n * passed into RequestBodyType.formData, and is not guaranteed to work as expected in\n * other situations.\n *\n * Use this function create a File object for use in RequestBodyType.formData in environments where the global File object is unavailable.\n *\n * @param content - the content of the file as a Uint8Array in memory.\n * @param name - the name of the file.\n * @param options - optional metadata about the file, e.g. file name, file size, MIME type.\n */\nexport function createFile(content, name, options = {}) {\n var _a, _b, _c;\n if (isNodeLike) {\n return Object.assign(Object.assign({}, unimplementedMethods), { type: (_a = options.type) !== null && _a !== void 0 ? _a : \"\", lastModified: (_b = options.lastModified) !== null && _b !== void 0 ? _b : new Date().getTime(), webkitRelativePath: (_c = options.webkitRelativePath) !== null && _c !== void 0 ? _c : \"\", size: content.byteLength, name, arrayBuffer: async () => content.buffer, stream: () => new Blob([content]).stream(), [rawContent]: () => content });\n }\n else {\n return new File([content], name, options);\n }\n}\n//# sourceMappingURL=file.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 { getRawContent } from \"./file.js\";\nimport { isNodeReadableStream, isWebReadableStream } from \"./typeGuards.js\";\n/**\n * Drain the content of the given ReadableStream into a Blob.\n * The blob's content may end up in memory or on disk dependent on size.\n */\nfunction drain(stream) {\n return new Response(stream).blob();\n}\nasync function toBlobPart(source) {\n if (source instanceof Blob || source instanceof Uint8Array) {\n return source;\n }\n if (isWebReadableStream(source)) {\n return drain(source);\n }\n // If it's not a true Blob, and it's not a Uint8Array, we can assume the source\n // is a fake File created by createFileFromStream and we can get the original stream\n // using getRawContent.\n const rawContent = getRawContent(source);\n // Shouldn't happen but guard for it anyway\n if (isNodeReadableStream(rawContent)) {\n throw new Error(\"Encountered unexpected type. In the browser, `concat` supports Web ReadableStream, Blob, Uint8Array, and files created using `createFile` only.\");\n }\n return toBlobPart(rawContent);\n}\n/**\n * Utility function that concatenates a set of binary inputs into one combined output.\n *\n * @param sources - array of sources for the concatenation\n * @returns - in Node, a (() =\\> NodeJS.ReadableStream) which, when read, produces a concatenation of all the inputs.\n * In browser, returns a `Blob` representing all the concatenated inputs.\n *\n * @internal\n */\nexport async function concat(sources) {\n const parts = [];\n for (const source of sources) {\n parts.push(await toBlobPart(typeof source === \"function\" ? source() : source));\n }\n return new Blob(parts);\n}\n//# sourceMappingURL=concat.common.js.map","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\nimport { randomUUID, stringToUint8Array } from \"@azure/core-util\";\nimport { concat } from \"../util/concat.js\";\nimport { isBlob } from \"../util/typeGuards.js\";\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}\nasync function 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 = await concat(sources);\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 async 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 await 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.\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.mjs.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 { parseHeaderValueAsNumber } from \"../util/helpers.js\";\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 (_a) {\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 { calculateRetryDelay } from \"@azure/core-util\";\nimport { isThrottlingRetryResponse } from \"./throttlingRetryStrategy.js\";\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 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 return calculateRetryDelay(retryCount, {\n retryDelayInMs: retryInterval,\n maxRetryDelayInMs: maxRetryInterval,\n });\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.\nimport { delay } from \"../util/helpers.js\";\nimport { createClientLogger } from \"@azure/logger\";\nimport { AbortError } from \"@azure/abort-controller\";\nimport { DEFAULT_RETRY_POLICY_COUNT } from \"../constants.js\";\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 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.js\";\nimport { throttlingRetryStrategy } from \"../retryStrategies/throttlingRetryStrategy.js\";\nimport { retryPolicy } from \"./retryPolicy.js\";\nimport { DEFAULT_RETRY_POLICY_COUNT } from \"../constants.js\";\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.\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 { isNodeLike, stringToUint8Array } from \"@azure/core-util\";\nimport { createHttpHeaders } from \"../httpHeaders.js\";\n/**\n * The programmatic identifier of the formDataPolicy.\n */\nexport const formDataPolicyName = \"formDataPolicy\";\nfunction formDataToFormDataMap(formData) {\n var _a;\n const formDataMap = {};\n for (const [key, value] of formData.entries()) {\n (_a = formDataMap[key]) !== null && _a !== void 0 ? _a : (formDataMap[key] = []);\n formDataMap[key].push(value);\n }\n return formDataMap;\n}\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 (isNodeLike && typeof FormData !== \"undefined\" && request.body instanceof FormData) {\n request.formData = formDataToFormDataMap(request.body);\n request.body = undefined;\n }\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 if (value === undefined || value === null || typeof value !== \"object\") {\n throw new Error(`Unexpected value for key ${fieldName}: ${value}. Value should be serialized to string first.`);\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 // again, || is used since an empty value.type means the content type is unset\n headers.set(\"Content-Type\", value.type || \"application/octet-stream\");\n parts.push({\n headers,\n body: value,\n });\n }\n }\n }\n request.multipartBody = { parts };\n}\n//# sourceMappingURL=formDataPolicy.js.map","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\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.common.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.\nexport const custom = {};\n//# sourceMappingURL=inspect.common.js.map","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\nimport { isError } from \"@azure/core-util\";\nimport { custom } from \"./util/inspect.js\";\nimport { Sanitizer } from \"./util/sanitizer.js\";\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 // The request and response may contain sensitive information in the headers or body.\n // To help prevent this sensitive information being accidentally logged, the request and response\n // properties are marked as non-enumerable here. This prevents them showing up in the output of\n // JSON.stringify and console.log.\n Object.defineProperty(this, \"request\", { value: options.request, enumerable: false });\n Object.defineProperty(this, \"response\", { value: options.response, enumerable: false });\n Object.setPrototypeOf(this, RestError.prototype);\n }\n /**\n * Logging method for util.inspect in Node\n */\n [custom]() {\n // Extract non-enumerable properties and add them back. This is OK since in this output the request and\n // response get sanitized.\n return `RestError: ${this.message} \\n ${errorSanitizer.sanitize(Object.assign(Object.assign({}, this), { request: this.request, response: this.response }))}`;\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 { createTracingClient, } from \"@azure/core-tracing\";\nimport { SDK_VERSION } from \"../constants.js\";\nimport { getUserAgentValue } from \"../util/userAgent.js\";\nimport { logger } from \"../log.js\";\nimport { getErrorMessage, isError } from \"@azure/core-util\";\nimport { isRestError } from \"../restError.js\";\nimport { Sanitizer } from \"../util/sanitizer.js\";\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 userAgentPromise = getUserAgentValue(options.userAgentPrefix);\n const sanitizer = new Sanitizer({\n additionalAllowedQueryParameters: options.additionalAllowedQueryParameters,\n });\n const tracingClient = tryCreateTracingClient();\n return {\n name: tracingPolicyName,\n async sendRequest(request, next) {\n var _a;\n if (!tracingClient) {\n return next(request);\n }\n const userAgent = await userAgentPromise;\n const spanAttributes = {\n \"http.url\": sanitizer.sanitizeUrl(request.url),\n \"http.method\": request.method,\n \"http.user_agent\": userAgent,\n requestId: request.requestId,\n };\n if (userAgent) {\n spanAttributes[\"http.user_agent\"] = userAgent;\n }\n const { span, tracingContext } = (_a = tryCreateSpan(tracingClient, request, spanAttributes)) !== null && _a !== void 0 ? _a : {};\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, spanAttributes) {\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 });\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 // 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 // Per semantic conventions, only set the status to error if the status code is 4xx or 5xx.\n // Otherwise, the status MUST remain unset.\n // https://opentelemetry.io/docs/specs/semconv/http/http-spans/#status\n if (response.status >= 400) {\n span.setStatus({\n status: \"error\",\n });\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 { logPolicy } from \"./policies/logPolicy.js\";\nimport { createEmptyPipeline } from \"./pipeline.js\";\nimport { redirectPolicy } from \"./policies/redirectPolicy.js\";\nimport { userAgentPolicy } from \"./policies/userAgentPolicy.js\";\nimport { multipartPolicy, multipartPolicyName } from \"./policies/multipartPolicy.js\";\nimport { decompressResponsePolicy } from \"./policies/decompressResponsePolicy.js\";\nimport { defaultRetryPolicy } from \"./policies/defaultRetryPolicy.js\";\nimport { formDataPolicy } from \"./policies/formDataPolicy.js\";\nimport { isNodeLike } from \"@azure/core-util\";\nimport { proxyPolicy } from \"./policies/proxyPolicy.js\";\nimport { setClientRequestIdPolicy } from \"./policies/setClientRequestIdPolicy.js\";\nimport { tlsPolicy } from \"./policies/tlsPolicy.js\";\nimport { tracingPolicy } from \"./policies/tracingPolicy.js\";\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 (isNodeLike) {\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(), { beforePolicies: [multipartPolicyName] });\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(Object.assign(Object.assign({}, options.userAgentOptions), options.loggingOptions)), {\n afterPhase: \"Retry\",\n });\n if (isNodeLike) {\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.\nimport { AbortError } from \"@azure/abort-controller\";\nimport { RestError } from \"./restError.js\";\nimport { createHttpHeaders } from \"./httpHeaders.js\";\nimport { isNodeReadableStream, isWebReadableStream } from \"./util/typeGuards.js\";\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 */\n// eslint-disable-next-line @azure/azure-sdk/ts-use-interface-parameters\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.js\";\n/**\n * Create the correct HttpClient for the current environment.\n */\nexport function createDefaultHttpClient() {\n return createFetchHttpClient();\n}\n//# sourceMappingURL=defaultHttpClient-browser.mjs.map","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\nimport { createHttpHeaders } from \"./httpHeaders.js\";\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.js\";\n// Default options for the cycler if none are provided\nexport const DEFAULT_CYCLER_OPTIONS = {\n forcedRefreshWindowInMs: 1000, // Force waiting for a refresh 1s before the token expires\n retryIntervalInMs: 3000, // Allow refresh attempts every 3s\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 if (cycler.isRefreshing) {\n return false;\n }\n if ((token === null || token === void 0 ? void 0 : token.refreshAfterTimestamp) && token.refreshAfterTimestamp < Date.now()) {\n return true;\n }\n return ((_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 const hasClaimChallenge = Boolean(tokenOptions.claims);\n const tenantIdChanged = tenantId !== tokenOptions.tenantId;\n if (hasClaimChallenge) {\n // If we've received a claim, we know the existing token isn't valid\n // We want to clear it so that that refresh worker won't use the old expiration time as a timeout\n token = null;\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 = tenantIdChanged || hasClaimChallenge || cycler.mustRefresh;\n if (mustRefresh) {\n return refresh(scopes, tokenOptions);\n }\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.js\";\nimport { logger as coreLogger } from \"../log.js\";\nimport { isRestError } from \"../restError.js\";\n/**\n * The programmatic identifier of the bearerTokenAuthenticationPolicy.\n */\nexport const bearerTokenAuthenticationPolicyName = \"bearerTokenAuthenticationPolicy\";\n/**\n * Try to send the given request.\n *\n * When a response is received, returns a tuple of the response received and, if the response was received\n * inside a thrown RestError, the RestError that was thrown.\n *\n * Otherwise, if an error was thrown while sending the request that did not provide an underlying response, it\n * will be rethrown.\n */\nasync function trySendRequest(request, next) {\n try {\n return [await next(request), undefined];\n }\n catch (e) {\n if (isRestError(e) && e.response) {\n return [e.response, e];\n }\n else {\n throw e;\n }\n }\n}\n/**\n * Default authorize request handler\n */\nasync function defaultAuthorizeRequest(options) {\n const { scopes, getAccessToken, request } = options;\n // Enable CAE true by default\n const getTokenOptions = {\n abortSignal: request.abortSignal,\n tracingOptions: request.tracingOptions,\n enableCae: true,\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 isChallengeResponse(response) {\n return response.status === 401 && response.headers.has(\"WWW-Authenticate\");\n}\n/**\n * Re-authorize the request for CAE challenge.\n * The response containing the challenge is `options.response`.\n * If this method returns true, the underlying request will be sent once again.\n */\nasync function authorizeRequestOnCaeChallenge(onChallengeOptions, caeClaims) {\n var _a;\n const { scopes } = onChallengeOptions;\n const accessToken = await onChallengeOptions.getAccessToken(scopes, {\n enableCae: true,\n claims: caeClaims,\n });\n if (!accessToken) {\n return false;\n }\n onChallengeOptions.request.headers.set(\"Authorization\", `${(_a = accessToken.tokenType) !== null && _a !== void 0 ? _a : \"Bearer\"} ${accessToken.token}`);\n return true;\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, _b, _c;\n const { credential, scopes, challengeCallbacks } = options;\n const logger = options.logger || coreLogger;\n const callbacks = {\n authorizeRequest: (_b = (_a = challengeCallbacks === null || challengeCallbacks === void 0 ? void 0 : challengeCallbacks.authorizeRequest) === null || _a === void 0 ? void 0 : _a.bind(challengeCallbacks)) !== null && _b !== void 0 ? _b : defaultAuthorizeRequest,\n authorizeRequestOnChallenge: (_c = challengeCallbacks === null || challengeCallbacks === void 0 ? void 0 : challengeCallbacks.authorizeRequestOnChallenge) === null || _c === void 0 ? void 0 : _c.bind(challengeCallbacks),\n };\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 let shouldSendRequest;\n [response, error] = await trySendRequest(request, next);\n if (isChallengeResponse(response)) {\n let claims = getCaeChallengeClaims(response.headers.get(\"WWW-Authenticate\"));\n // Handle CAE by default when receive CAE claim\n if (claims) {\n let parsedClaim;\n // Return the response immediately if claims is not a valid base64 encoded string\n try {\n parsedClaim = atob(claims);\n }\n catch (e) {\n logger.warning(`The WWW-Authenticate header contains \"claims\" that cannot be parsed. Unable to perform the Continuous Access Evaluation authentication flow. Unparsable claims: ${claims}`);\n return response;\n }\n shouldSendRequest = await authorizeRequestOnCaeChallenge({\n scopes: Array.isArray(scopes) ? scopes : [scopes],\n response,\n request,\n getAccessToken,\n logger,\n }, parsedClaim);\n // Send updated request and handle response for RestError\n if (shouldSendRequest) {\n [response, error] = await trySendRequest(request, next);\n }\n }\n else if (callbacks.authorizeRequestOnChallenge) {\n // Handle custom challenges when client provides custom callback\n shouldSendRequest = await callbacks.authorizeRequestOnChallenge({\n scopes: Array.isArray(scopes) ? scopes : [scopes],\n request,\n response,\n getAccessToken,\n logger,\n });\n // Send updated request and handle response for RestError\n if (shouldSendRequest) {\n [response, error] = await trySendRequest(request, next);\n }\n // If we get another CAE Claim, we will handle it by default and return whatever value we receive for this\n if (isChallengeResponse(response)) {\n claims = getCaeChallengeClaims(response.headers.get(\"WWW-Authenticate\"));\n if (claims) {\n let parsedClaim;\n try {\n parsedClaim = atob(claims);\n }\n catch (e) {\n logger.warning(`The WWW-Authenticate header contains \"claims\" that cannot be parsed. Unable to perform the Continuous Access Evaluation authentication flow. Unparsable claims: ${claims}`);\n return response;\n }\n shouldSendRequest = await authorizeRequestOnCaeChallenge({\n scopes: Array.isArray(scopes) ? scopes : [scopes],\n response,\n request,\n getAccessToken,\n logger,\n }, parsedClaim);\n // Send updated request and handle response for RestError\n if (shouldSendRequest) {\n [response, error] = await trySendRequest(request, next);\n }\n }\n }\n }\n }\n if (error) {\n throw error;\n }\n else {\n return response;\n }\n },\n };\n}\n/**\n * Converts: `Bearer a=\"b\", c=\"d\", Pop e=\"f\", g=\"h\"`.\n * Into: `[ { scheme: 'Bearer', params: { a: 'b', c: 'd' } }, { scheme: 'Pop', params: { e: 'f', g: 'h' } } ]`.\n *\n * @internal\n */\nexport function parseChallenges(challenges) {\n // Challenge regex seperates the string to individual challenges with different schemes in the format `Scheme a=\"b\", c=d`\n // The challenge regex captures parameteres with either quotes values or unquoted values\n const challengeRegex = /(\\w+)\\s+((?:\\w+=(?:\"[^\"]*\"|[^,]*),?\\s*)+)/g;\n // Parameter regex captures the claims group removed from the scheme in the format `a=\"b\"` and `c=\"d\"`\n // CAE challenge always have quoted parameters. For more reference, https://learn.microsoft.com/entra/identity-platform/claims-challenge\n const paramRegex = /(\\w+)=\"([^\"]*)\"/g;\n const parsedChallenges = [];\n let match;\n // Iterate over each challenge match\n while ((match = challengeRegex.exec(challenges)) !== null) {\n const scheme = match[1];\n const paramsString = match[2];\n const params = {};\n let paramMatch;\n // Iterate over each parameter match\n while ((paramMatch = paramRegex.exec(paramsString)) !== null) {\n params[paramMatch[1]] = paramMatch[2];\n }\n parsedChallenges.push({ scheme, params });\n }\n return parsedChallenges;\n}\n/**\n * Parse a pipeline response and look for a CAE challenge with \"Bearer\" scheme\n * Return the value in the header without parsing the challenge\n * @internal\n */\nfunction getCaeChallengeClaims(challenges) {\n var _a;\n if (!challenges) {\n return;\n }\n // Find all challenges present in the header\n const parsedChallenges = parseChallenges(challenges);\n return (_a = parsedChallenges.find((x) => x.scheme === \"Bearer\" && x.params.claims && x.params.error === \"insufficient_claims\")) === null || _a === void 0 ? void 0 : _a.params.claims;\n}\n//# sourceMappingURL=bearerTokenAuthenticationPolicy.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.\n/**\n * Browser-only implementation of the module's state. The browser esm variant will not load the commonjs state, so we do not need to share state between the two.\n */\nexport const state = {\n instrumenterImplementation: undefined,\n};\n//# sourceMappingURL=state-browser.mjs.map","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\nimport { createTracingContext } from \"./tracingContext.js\";\nimport { state } from \"./state.js\";\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 addEvent: () => {\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/**\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 state.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 (!state.instrumenterImplementation) {\n state.instrumenterImplementation = createDefaultInstrumenter();\n }\n return state.instrumenterImplementation;\n}\n//# sourceMappingURL=instrumenter.js.map","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\nimport { getInstrumenter } from \"./instrumenter.js\";\nimport { knownContextKeys } from \"./tracingContext.js\";\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.\nimport { createAbortablePromise } from \"./createAbortablePromise.js\";\nimport { getRandomIntegerInclusive } from \"./random.js\";\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/**\n * Calculates the delay interval for retry attempts using exponential delay with jitter.\n * @param retryAttempt - The current retry attempt number.\n * @param config - The exponential retry configuration.\n * @returns An object containing the calculated retry delay.\n */\nexport function calculateRetryDelay(retryAttempt, config) {\n // Exponentially increase the delay each time\n const exponentialDelay = config.retryDelayInMs * Math.pow(2, retryAttempt);\n // Don't let the delay exceed the maximum\n const clampedDelay = Math.min(config.maxRetryDelayInMs, 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 const retryAfterInMs = clampedDelay / 2 + getRandomIntegerInclusive(0, clampedDelay / 2);\n return { retryAfterInMs };\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.\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.\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.\nimport { isObject } from \"./object.js\";\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 * 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.common.js.map","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\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.common.js.map","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\nvar _a;\nimport { generateUUID } from \"./uuidUtils.common.js\";\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.mjs.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 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 a Node.js compatible environment.\n */\nexport const isNodeLike = typeof globalThis.process !== \"undefined\" &&\n Boolean(globalThis.process.version) &&\n Boolean((_d = globalThis.process.versions) === null || _d === void 0 ? void 0 : _d.node);\n/**\n * A constant that indicates whether the environment the code is running is a Node.js compatible environment.\n * @deprecated Use `isNodeLike` instead.\n */\nexport const isNode = isNodeLike;\n/**\n * A constant that indicates whether the environment the code is running is Node.JS.\n */\nexport const isNodeRuntime = isNodeLike && !isBun && !isDeno;\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.\n/**\n * Default key used to access the XML attributes.\n */\nexport const XML_ATTRKEY = \"$\";\n/**\n * Default key used to access the XML value content.\n */\nexport const XML_CHARKEY = \"_\";\n//# sourceMappingURL=xml.common.js.map","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n/// \nimport { XML_ATTRKEY, XML_CHARKEY } from \"./xml.common.js\";\nif (!document || !DOMParser || !Node || !XMLSerializer) {\n throw new Error(`This library depends on the following DOM objects: [\"document\", \"DOMParser\", \"Node\", \"XMLSerializer\"] to parse XML, but some of these are undefined. You may provide a polyfill to make these globally available in order to support your environment. For more information, please refer to https://aka.ms/azsdk/js/web-workers. `);\n}\n// Policy to make our code Trusted Types compliant at running time.\n// https://github.com/w3c/webappsec-trusted-types\n// We are calling DOMParser.parseFromString() to parse XML payload from Azure services.\n// The parsed DOM object is not exposed to outside. Scripts are disabled when parsing\n// according to the spec. There are no HTML/XSS security concerns on the usage of\n// parseFromString() here.\nlet ttPolicy;\ntry {\n if (typeof self.trustedTypes !== \"undefined\") {\n ttPolicy = self.trustedTypes.createPolicy(\"@azure/core-xml#xml.browser\", {\n createHTML: (s) => s,\n });\n }\n}\ncatch (e) {\n console.warn('Could not create trusted types policy \"@azure/core-xml#xml.browser\"');\n}\nconst doc = document.implementation.createDocument(null, null, null);\nconst parser = new DOMParser();\nexport function parseXML(str, opts = {}) {\n var _a, _b, _c, _d, _e, _f;\n try {\n const updatedOptions = {\n rootName: (_a = opts.rootName) !== null && _a !== void 0 ? _a : \"\",\n includeRoot: (_b = opts.includeRoot) !== null && _b !== void 0 ? _b : false,\n xmlCharKey: (_c = opts.xmlCharKey) !== null && _c !== void 0 ? _c : XML_CHARKEY,\n cdataPropName: (_d = opts.cdataPropName) !== null && _d !== void 0 ? _d : \"__cdata\",\n stopNodes: (_e = opts.stopNodes) !== null && _e !== void 0 ? _e : [],\n };\n const dom = parser.parseFromString(((_f = ttPolicy === null || ttPolicy === void 0 ? void 0 : ttPolicy.createHTML(str)) !== null && _f !== void 0 ? _f : str), \"application/xml\");\n throwIfError(dom);\n let obj;\n if (updatedOptions.includeRoot) {\n obj = domToObject(dom, updatedOptions);\n }\n else {\n obj = domToObject(dom.childNodes[0], updatedOptions);\n }\n return Promise.resolve(obj);\n }\n catch (err) {\n return Promise.reject(err);\n }\n}\nlet errorNS;\nfunction getErrorNamespace() {\n var _a, _b;\n if (errorNS === undefined) {\n try {\n const invalidXML = ((_a = ttPolicy === null || ttPolicy === void 0 ? void 0 : ttPolicy.createHTML(\"INVALID\")) !== null && _a !== void 0 ? _a : \"INVALID\");\n errorNS =\n (_b = parser.parseFromString(invalidXML, \"text/xml\").getElementsByTagName(\"parsererror\")[0]\n .namespaceURI) !== null && _b !== void 0 ? _b : \"\";\n }\n catch (ignored) {\n // Most browsers will return a document containing , but IE will throw.\n errorNS = \"\";\n }\n }\n return errorNS;\n}\nfunction throwIfError(dom) {\n const parserErrors = dom.getElementsByTagName(\"parsererror\");\n if (parserErrors.length > 0 && getErrorNamespace()) {\n for (let i = 0; i < parserErrors.length; i++) {\n if (parserErrors[i].namespaceURI === errorNS) {\n throw new Error(parserErrors[i].innerHTML);\n }\n }\n }\n}\nfunction isElement(node) {\n return !!node.attributes;\n}\n/**\n * Get the Element-typed version of the provided Node if the provided node is an element with\n * attributes. If it isn't, then undefined is returned.\n */\nfunction asElementWithAttributes(node) {\n return isElement(node) && node.hasAttributes() ? node : undefined;\n}\nfunction domToObject(node, options) {\n var _a;\n let result = {};\n const childNodeCount = node.childNodes.length;\n const firstChildNode = node.childNodes[0];\n const onlyChildTextValue = (firstChildNode &&\n childNodeCount === 1 &&\n firstChildNode.nodeType === Node.TEXT_NODE &&\n firstChildNode.nodeValue) ||\n undefined;\n const elementWithAttributes = asElementWithAttributes(node);\n if (elementWithAttributes) {\n result[XML_ATTRKEY] = {};\n for (let i = 0; i < elementWithAttributes.attributes.length; i++) {\n const attr = elementWithAttributes.attributes[i];\n result[XML_ATTRKEY][attr.nodeName] = attr.nodeValue;\n }\n if (onlyChildTextValue) {\n result[options.xmlCharKey] = onlyChildTextValue;\n }\n }\n else if (childNodeCount === 0) {\n result = \"\";\n }\n else if (onlyChildTextValue) {\n result = onlyChildTextValue;\n }\n if (!onlyChildTextValue) {\n for (let i = 0; i < childNodeCount; i++) {\n const child = node.childNodes[i];\n // Check if CData\n if ((child === null || child === void 0 ? void 0 : child.nodeType) === Node.CDATA_SECTION_NODE) {\n // Already in the CDATA\n result = child.textContent;\n }\n else if (((_a = child === null || child === void 0 ? void 0 : child.firstChild) === null || _a === void 0 ? void 0 : _a.nodeType) === Node.CDATA_SECTION_NODE) {\n // Look if child is CDATA\n result[child.nodeName] = child.textContent;\n }\n else if (child.nodeType !== Node.TEXT_NODE) {\n // Ignore leading/trailing whitespace nodes\n const childObject = domToObject(child, options);\n if (!result[child.nodeName]) {\n result[child.nodeName] = childObject;\n }\n else if (Array.isArray(result[child.nodeName])) {\n result[child.nodeName].push(childObject);\n }\n else {\n result[child.nodeName] = [result[child.nodeName], childObject];\n }\n }\n }\n }\n return result;\n}\nconst serializer = new XMLSerializer();\nexport function stringifyXML(content, opts = {}) {\n var _a, _b, _c, _d, _e;\n const updatedOptions = {\n rootName: (_a = opts.rootName) !== null && _a !== void 0 ? _a : \"root\",\n includeRoot: (_b = opts.includeRoot) !== null && _b !== void 0 ? _b : false,\n xmlCharKey: (_c = opts.xmlCharKey) !== null && _c !== void 0 ? _c : XML_CHARKEY,\n cdataPropName: (_d = opts.cdataPropName) !== null && _d !== void 0 ? _d : \"__cdata\",\n stopNodes: (_e = opts.stopNodes) !== null && _e !== void 0 ? _e : [],\n };\n const dom = buildNode(content, updatedOptions.rootName, updatedOptions)[0];\n return ('' +\n serializer.serializeToString(dom).replace(/ xmlns=\"\"/g, \"\"));\n}\nfunction buildAttributes(attrs) {\n const result = [];\n for (const key of Object.keys(attrs)) {\n const attr = doc.createAttribute(key);\n attr.value = attrs[key].toString();\n result.push(attr);\n }\n return result;\n}\nfunction buildNode(obj, elementName, options) {\n var _a;\n if (obj === undefined ||\n obj === null ||\n typeof obj === \"string\" ||\n typeof obj === \"number\" ||\n typeof obj === \"boolean\") {\n const elem = doc.createElement(elementName);\n elem.textContent = obj === undefined || obj === null ? \"\" : obj.toString();\n return [elem];\n }\n else if (Array.isArray(obj)) {\n const result = [];\n for (const arrayElem of obj) {\n for (const child of buildNode(arrayElem, elementName, options)) {\n result.push(child);\n }\n }\n return result;\n }\n else if (typeof obj === \"object\") {\n let elem;\n if ((_a = obj[XML_ATTRKEY]) === null || _a === void 0 ? void 0 : _a[\"xmlns\"]) {\n elem = doc.createElementNS(obj[XML_ATTRKEY][\"xmlns\"], elementName);\n }\n else {\n elem = doc.createElement(elementName);\n }\n for (const key of Object.keys(obj)) {\n if (key === XML_ATTRKEY) {\n for (const attr of buildAttributes(obj[key])) {\n elem.attributes.setNamedItem(attr);\n }\n }\n else if (key === options.xmlCharKey) {\n elem.textContent = obj[key].toString();\n }\n else if (key === options.cdataPropName) {\n const cdataElement = doc.createCDATASection(obj[key].toString());\n elem.appendChild(cdataElement);\n }\n else {\n for (const child of buildNode(obj[key], key, options)) {\n elem.appendChild(child);\n }\n }\n }\n return [elem];\n }\n else {\n throw new Error(`Illegal value passed to buildObject: ${obj}`);\n }\n}\n//# sourceMappingURL=xml-browser.mjs.map","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { log } from \"./log.js\";\nconst debugEnvVariable = (typeof process !== \"undefined\" && process.env && process.env.DEBUG) || undefined;\nlet enabledString;\nlet enabledNamespaces = [];\nlet skippedNamespaces = [];\nconst debuggers = [];\nif (debugEnvVariable) {\n enable(debugEnvVariable);\n}\nconst debugObj = Object.assign((namespace) => {\n return createDebugger(namespace);\n}, {\n enable,\n enabled,\n disable,\n log,\n});\nfunction enable(namespaces) {\n enabledString = namespaces;\n enabledNamespaces = [];\n skippedNamespaces = [];\n const wildcard = /\\*/g;\n const namespaceList = namespaces.split(\",\").map((ns) => ns.trim().replace(wildcard, \".*?\"));\n for (const ns of namespaceList) {\n if (ns.startsWith(\"-\")) {\n skippedNamespaces.push(new RegExp(`^${ns.substr(1)}$`));\n }\n else {\n enabledNamespaces.push(new RegExp(`^${ns}$`));\n }\n }\n for (const instance of debuggers) {\n instance.enabled = enabled(instance.namespace);\n }\n}\nfunction enabled(namespace) {\n if (namespace.endsWith(\"*\")) {\n return true;\n }\n for (const skipped of skippedNamespaces) {\n if (skipped.test(namespace)) {\n return false;\n }\n }\n for (const enabledNamespace of enabledNamespaces) {\n if (enabledNamespace.test(namespace)) {\n return true;\n }\n }\n return false;\n}\nfunction disable() {\n const result = enabledString || \"\";\n enable(\"\");\n return result;\n}\nfunction createDebugger(namespace) {\n const newDebugger = Object.assign(debug, {\n enabled: enabled(namespace),\n destroy,\n log: debugObj.log,\n namespace,\n extend,\n });\n function debug(...args) {\n if (!newDebugger.enabled) {\n return;\n }\n if (args.length > 0) {\n args[0] = `${namespace} ${args[0]}`;\n }\n newDebugger.log(...args);\n }\n debuggers.push(newDebugger);\n return newDebugger;\n}\nfunction destroy() {\n const index = debuggers.indexOf(this);\n if (index >= 0) {\n debuggers.splice(index, 1);\n return true;\n }\n return false;\n}\nfunction extend(namespace) {\n const newDebugger = createDebugger(`${this.namespace}:${namespace}`);\n newDebugger.log = this.log;\n return newDebugger;\n}\nexport default debugObj;\n//# sourceMappingURL=debug.js.map","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nexport function log(...args) {\n if (args.length > 0) {\n const firstArg = String(args[0]);\n if (firstArg.includes(\":error\")) {\n console.error(...args);\n }\n else if (firstArg.includes(\":warning\")) {\n console.warn(...args);\n }\n else if (firstArg.includes(\":info\")) {\n console.info(...args);\n }\n else if (firstArg.includes(\":verbose\")) {\n console.debug(...args);\n }\n else {\n console.debug(...args);\n }\n }\n}\n//# sourceMappingURL=log.common.js.map","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport debug from \"./debug.js\";\nconst registeredLoggers = new Set();\nconst logLevelFromEnv = (typeof process !== \"undefined\" && process.env && process.env.AZURE_LOG_LEVEL) || undefined;\nlet azureLogLevel;\n/**\n * The AzureLogger provides a mechanism for overriding where logs are output to.\n * By default, logs are sent to stderr.\n * Override the `log` method to redirect logs to another location.\n */\nexport const AzureLogger = debug(\"azure\");\nAzureLogger.log = (...args) => {\n debug.log(...args);\n};\nconst AZURE_LOG_LEVELS = [\"verbose\", \"info\", \"warning\", \"error\"];\nif (logLevelFromEnv) {\n // avoid calling setLogLevel because we don't want a mis-set environment variable to crash\n if (isAzureLogLevel(logLevelFromEnv)) {\n setLogLevel(logLevelFromEnv);\n }\n else {\n console.error(`AZURE_LOG_LEVEL set to unknown log level '${logLevelFromEnv}'; logging is not enabled. Acceptable values: ${AZURE_LOG_LEVELS.join(\", \")}.`);\n }\n}\n/**\n * Immediately enables logging at the specified log level. If no level is specified, logging is disabled.\n * @param level - The log level to enable for logging.\n * Options from most verbose to least verbose are:\n * - verbose\n * - info\n * - warning\n * - error\n */\nexport function setLogLevel(level) {\n if (level && !isAzureLogLevel(level)) {\n throw new Error(`Unknown log level '${level}'. Acceptable values: ${AZURE_LOG_LEVELS.join(\",\")}`);\n }\n azureLogLevel = level;\n const enabledNamespaces = [];\n for (const logger of registeredLoggers) {\n if (shouldEnable(logger)) {\n enabledNamespaces.push(logger.namespace);\n }\n }\n debug.enable(enabledNamespaces.join(\",\"));\n}\n/**\n * Retrieves the currently specified log level.\n */\nexport function getLogLevel() {\n return azureLogLevel;\n}\nconst levelMap = {\n verbose: 400,\n info: 300,\n warning: 200,\n error: 100,\n};\n/**\n * Creates a logger for use by the Azure SDKs that inherits from `AzureLogger`.\n * @param namespace - The name of the SDK package.\n * @hidden\n */\nexport function createClientLogger(namespace) {\n const clientRootLogger = AzureLogger.extend(namespace);\n patchLogMethod(AzureLogger, clientRootLogger);\n return {\n error: createLogger(clientRootLogger, \"error\"),\n warning: createLogger(clientRootLogger, \"warning\"),\n info: createLogger(clientRootLogger, \"info\"),\n verbose: createLogger(clientRootLogger, \"verbose\"),\n };\n}\nfunction patchLogMethod(parent, child) {\n child.log = (...args) => {\n parent.log(...args);\n };\n}\nfunction createLogger(parent, level) {\n const logger = Object.assign(parent.extend(level), {\n level,\n });\n patchLogMethod(parent, logger);\n if (shouldEnable(logger)) {\n const enabledNamespaces = debug.disable();\n debug.enable(enabledNamespaces + \",\" + logger.namespace);\n }\n registeredLoggers.add(logger);\n return logger;\n}\nfunction shouldEnable(logger) {\n return Boolean(azureLogLevel && levelMap[logger.level] <= levelMap[azureLogLevel]);\n}\nfunction isAzureLogLevel(logLevel) {\n return AZURE_LOG_LEVELS.includes(logLevel);\n}\n//# sourceMappingURL=index.js.map"],"names":["ValidPhaseNames","Set","HttpPipeline","constructor","policies","_a","this","_policies","slice","_orderedPolicies","undefined","addPolicy","policy","options","phase","afterPhase","Error","has","push","removePolicy","removedPolicies","filter","policyDescriptor","name","sendRequest","httpClient","request","getOrderedPolicies","reduceRight","next","req","pipeline","orderPolicies","clone","create","result","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","createEmptyPipeline","RedactedString","defaultAllowedHeaderNames","defaultAllowedQueryParameters","Sanitizer","additionalAllowedHeaderNames","allowedHeaderNames","additionalAllowedQueryParameters","allowedQueryParameters","concat","map","n","toLowerCase","p","sanitize","obj","seen","JSON","stringify","key","value","Object","assign","message","sanitizeHeaders","sanitizeUrl","sanitizeQuery","Array","isArray","url","URL","search","searchParams","toString","sanitized","keys","k","logPolicyName","redirectPolicyName","allowedRedirect","redirectPolicy","maxRetries","response","handleRedirect","async","currentRetries","status","headers","locationHeader","includes","method","body","res","SDK_VERSION","getUserAgentValue","prefix","runtimeInfo","localNavigator","globalThis","navigator","osPlatform","userAgentData","entropyValues","getHighEntropyValues","architecture","platform","platformVersion","brand","brands","brandOrder","foundBrand","find","b","getBrandVersionString","version","userAgent","browserRegexes","regex","browser","match","getBrowserInfo","EdgeRuntime","setPlatformSpecificData","defaultAgent","telemetryInfo","parts","token","join","getUserAgentString","UserAgentHeaderName","userAgentPolicyName","rawContent","Symbol","getRawContent","blob","stream","x","Boolean","isWebReadableStream","getReader","tee","toBlobPart","source","Blob","Uint8Array","Response","encodeHeaders","getLength","byteLength","buildRequestBody","boundary","sources","flatMap","part","contentLength","total","partLength","getTotalLength","multipartPolicyName","maxBoundaryLength","validBoundaryCharacters","multipartPolicy","multipartBody","contentTypeHeader","parsedHeader","contentType","parsedBoundary","from","some","assertValidBoundary","decompressResponsePolicyName","StandardAbortMessage","delay","delayInMs","Promise","resolve","reject","timer","onAborted","rejectOnAbort","abortErrorMsg","removeListeners","abortSignal","removeEventListener","clearTimeout","aborted","setTimeout","addEventListener","parseHeaderValueAsNumber","headerName","valueAsNum","Number","isNaN","RetryAfterHeader","AllRetryAfterHeaders","getRetryAfterInMs","header","retryAfterValue","retryAfterHeader","diff","Date","parse","now","isFinite","Math","max","DEFAULT_CLIENT_RETRY_INTERVAL","DEFAULT_CLIENT_MAX_RETRY_INTERVAL","_b","retryInterval","retryDelayInMs","maxRetryInterval","maxRetryDelayInMs","retry","retryCount","responseError","matchedSystemError","err","code","isSystemError","ignoreSystemErrors","isExponential","isExponentialRetryResponse","ignoreExponentialResponse","ignoreHttpStatusCodes","unknownResponse","isThrottlingRetryResponse","skipStrategy","errorToThrow","retryPolicyLogger","retryPolicyName","strategies","logger","retryRequest","info","requestId","e","error","strategiesLoop","strategy","strategyLogger","modifiers","retryAfterInMs","redirectTo","defaultRetryPolicyName","normalizeName","HttpHeadersImpl","rawHeaders","_headersMap","String","trim","toJSON","preserveCase","entry","values","normalizedName","iterator","headerIterator","createHttpHeaders","formDataPolicyName","formDataPolicy","FormData","formData","formDataMap","entries","formDataToFormDataMap","indexOf","urlSearchParams","URLSearchParams","subValue","append","wwwFormUrlEncode","startsWith","fieldName","fileName","type","prepareFormData","errorMessage","getDefaultProxySettings","setClientRequestIdPolicyName","tlsPolicyName","custom","errorSanitizer","RestError","super","statusCode","defineProperty","enumerable","setPrototypeOf","prototype","isRestError","REQUEST_SEND_ERROR","PARSE_ERROR","tracingPolicyName","tracingPolicy","userAgentPromise","userAgentPrefix","sanitizer","tracingClient","namespace","packageName","packageVersion","warning","tryCreateTracingClient","spanAttributes","span","tracingContext","updatedOptions","startSpan","tracingOptions","spanKind","isRecording","end","createRequestHeaders","tryCreateSpan","withContext","setAttribute","serviceRequestId","setStatus","tryProcessResponse","tryProcessError","createPipelineFromOptions","tlsSettings","tlsOptions","proxyPolicy","proxyOptions","decompressResponsePolicy","userAgentValue","userAgentPolicy","userAgentOptions","requestIdHeaderName","setClientRequestIdPolicy","telemetryOptions","clientRequestIdHeaderName","defaultRetryPolicy","retryOptions","loggingOptions","redirectOptions","enabled","logPolicy","FetchHttpClient","protocol","allowInsecureConnection","proxySettings","abortController","abortControllerCleanup","AbortController","abortListener","event","abort","timeout","setupAbortSignal","pipelineHeaders","Headers","buildFetchHeaders","streaming","requestBody","buildBodyStream","onProgress","onUploadProgress","requestInit","signal","Request","credentials","withCredentials","cache","duplex","fetch","loadedBytes","httpResponse","responseHeaders","buildPipelineHeaders","bodyStream","onDownloadProgress","onEnd","streamResponseStatusCodes","POSITIVE_INFINITY","enableBrowserStreams","browserStreamBody","responseStream","blobBody","bodyAsText","text","buildPipelineResponse","makeRequest","getError","readableStream","pipeThrough","self","TransformStream","isTransformStreamSupported","transform","chunk","controller","enqueue","terminate","flush","reader","ReadableStream","pull","done","read","close","releaseLock","cancel","reason","createDefaultHttpClient","PipelineRequestImpl","_c","_d","_e","_f","_g","disableKeepAlive","createPipelineRequest","DEFAULT_CYCLER_OPTIONS","forcedRefreshWindowInMs","retryIntervalInMs","refreshWindowInMs","credential","tokenCyclerOptions","tenantId","refreshWorker","cycler","isRefreshing","shouldRefresh","refreshAfterTimestamp","expiresOnTimestamp","mustRefresh","refresh","scopes","getTokenOptions","getAccessToken","refreshTimeout","tryGetAccessToken","finalToken","beginRefresh","getToken","then","_token","catch","tokenOptions","hasClaimChallenge","claims","tenantIdChanged","bearerTokenAuthenticationPolicyName","trySendRequest","defaultAuthorizeRequest","enableCae","accessToken","isChallengeResponse","authorizeRequestOnCaeChallenge","onChallengeOptions","caeClaims","tokenType","bearerTokenAuthenticationPolicy","challengeCallbacks","callbacks","authorizeRequest","bind","authorizeRequestOnChallenge","shouldSendRequest","getCaeChallengeClaims","parsedClaim","atob","challenges","parsedChallenges","challengeRegex","paramRegex","exec","scheme","paramsString","params","paramMatch","parseChallenges","knownContextKeys","for","createTracingContext","context","TracingContextImpl","parentContext","setValue","initialContext","_contextMap","newContext","getValue","deleteValue","instrumenterImplementation","getInstrumenter","parseTraceparentHeader","_name","spanOptions","recordException","addEvent","_context","callback","callbackArgs","createTracingClient","operationOptions","startSpanResult","withSpan","traceparentHeader","timeInMs","buildPromise","cleanupBeforeAbort","onAbort","createAbortablePromise","calculateRetryDelay","retryAttempt","config","exponentialDelay","pow","clampedDelay","min","ceil","floor","random","isObject","input","RegExp","isError","hasName","hasMessage","getErrorMessage","stringified","format","TextEncoder","encode","utf8StringToUint8Array","base64ToUint8Array","base64String","replace","base64UrlToUint8Array","bytes","i","highNibble","lowNibble","hexDigits","parseInt","hexStringToUint8Array","charCodeAt","generateUUID","uuid","randomNumber","uuidFunction","crypto","randomUUID","window","document","importScripts","Deno","deno","Bun","isNodeLike","process","versions","isNode","product","XML_ATTRKEY","XML_CHARKEY","DOMParser","Node","XMLSerializer","ttPolicy","trustedTypes","createPolicy","createHTML","s","console","warn","doc","implementation","createDocument","parser","parseXML","str","opts","rootName","includeRoot","xmlCharKey","cdataPropName","stopNodes","dom","parseFromString","parserErrors","getElementsByTagName","errorNS","invalidXML","namespaceURI","ignored","getErrorNamespace","innerHTML","throwIfError","domToObject","childNodes","childNodeCount","firstChildNode","onlyChildTextValue","nodeType","TEXT_NODE","nodeValue","elementWithAttributes","attributes","isElement","hasAttributes","asElementWithAttributes","attr","nodeName","child","CDATA_SECTION_NODE","textContent","firstChild","childObject","serializer","stringifyXML","content","buildNode","serializeToString","buildAttributes","attrs","createAttribute","elementName","elem","createElement","arrayElem","createElementNS","setNamedItem","cdataElement","createCDATASection","appendChild","debugEnvVariable","env","DEBUG","enabledString","enabledNamespaces","skippedNamespaces","debuggers","enable","debugObj","createDebugger","disable","log","args","firstArg","debug","namespaces","wildcard","namespaceList","split","ns","substr","instance","endsWith","skipped","test","enabledNamespace","newDebugger","destroy","extend","index","splice","registeredLoggers","logLevelFromEnv","AZURE_LOG_LEVEL","azureLogLevel","AzureLogger","AZURE_LOG_LEVELS","isAzureLogLevel","level","shouldEnable","setLogLevel","levelMap","verbose","createClientLogger","clientRootLogger","patchLogMethod","createLogger","parent","logLevel"],"sourceRoot":""}