Commit iniziale

This commit is contained in:
Paolo A
2025-02-18 22:59:07 +00:00
commit 4bbf35cefb
6879 changed files with 623784 additions and 0 deletions

View File

@@ -0,0 +1,31 @@
import { AuthError } from "@azure/msal-common/node";
import * as ManagedIdentityErrorCodes from "./ManagedIdentityErrorCodes.js";
export { ManagedIdentityErrorCodes };
/**
* ManagedIdentityErrorMessage class containing string constants used by error codes and messages.
*/
export declare const ManagedIdentityErrorMessages: {
invalid_file_extension: string;
invalid_file_path: string;
invalid_managed_identity_id_type: string;
invalid_secret: string;
platform_not_supported: string;
missing_client_id: string;
azure_pod_identity_authority_host_url_malformed: string;
identity_endpoint_url_malformed: string;
imds_endpoint_url_malformed: string;
msi_endpoint_url_malformed: string;
network_unavailable: string;
unable_to_create_azure_arc: string;
unable_to_create_cloud_shell: string;
unable_to_create_source: string;
unable_to_read_secret_file: string;
user_assigned_not_available_at_runtime: string;
www_authenticate_header_missing: string;
www_authenticate_header_unsupported_format: string;
};
export declare class ManagedIdentityError extends AuthError {
constructor(errorCode: string);
}
export declare function createManagedIdentityError(errorCode: string): ManagedIdentityError;
//# sourceMappingURL=ManagedIdentityError.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"ManagedIdentityError.d.ts","sourceRoot":"","sources":["../../src/error/ManagedIdentityError.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACpD,OAAO,KAAK,yBAAyB,MAAM,gCAAgC,CAAC;AAE5E,OAAO,EAAE,yBAAyB,EAAE,CAAC;AAErC;;GAEG;AACH,eAAO,MAAM,4BAA4B;;;;;;;;;;;;;;;;;;;CAqCxC,CAAC;AAEF,qBAAa,oBAAqB,SAAQ,SAAS;gBACnC,SAAS,EAAE,MAAM;CAKhC;AAED,wBAAgB,0BAA0B,CACtC,SAAS,EAAE,MAAM,GAClB,oBAAoB,CAEtB"}

View File

@@ -0,0 +1,50 @@
/*! @azure/msal-node v2.16.2 2024-11-19 */
'use strict';
import { AuthError } from '@azure/msal-common/node';
import { invalidFileExtension, invalidFilePath, invalidManagedIdentityIdType, invalidSecret, platformNotSupported, missingId, MsiEnvironmentVariableUrlMalformedErrorCodes, networkUnavailable, unableToCreateAzureArc, unableToCreateCloudShell, unableToCreateSource, unableToReadSecretFile, userAssignedNotAvailableAtRuntime, wwwAuthenticateHeaderMissing, wwwAuthenticateHeaderUnsupportedFormat } from './ManagedIdentityErrorCodes.mjs';
import { ManagedIdentityEnvironmentVariableNames } from '../utils/Constants.mjs';
/*
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License.
*/
/**
* ManagedIdentityErrorMessage class containing string constants used by error codes and messages.
*/
const ManagedIdentityErrorMessages = {
[invalidFileExtension]: "The file path in the WWW-Authenticate header does not contain a .key file.",
[invalidFilePath]: "The file path in the WWW-Authenticate header is not in a valid Windows or Linux Format.",
[invalidManagedIdentityIdType]: "More than one ManagedIdentityIdType was provided.",
[invalidSecret]: "The secret in the file on the file path in the WWW-Authenticate header is greater than 4096 bytes.",
[platformNotSupported]: "The platform is not supported by Azure Arc. Azure Arc only supports Windows and Linux.",
[missingId]: "A ManagedIdentityId id was not provided.",
[MsiEnvironmentVariableUrlMalformedErrorCodes
.AZURE_POD_IDENTITY_AUTHORITY_HOST]: `The Managed Identity's '${ManagedIdentityEnvironmentVariableNames.AZURE_POD_IDENTITY_AUTHORITY_HOST}' environment variable is malformed.`,
[MsiEnvironmentVariableUrlMalformedErrorCodes
.IDENTITY_ENDPOINT]: `The Managed Identity's '${ManagedIdentityEnvironmentVariableNames.IDENTITY_ENDPOINT}' environment variable is malformed.`,
[MsiEnvironmentVariableUrlMalformedErrorCodes
.IMDS_ENDPOINT]: `The Managed Identity's '${ManagedIdentityEnvironmentVariableNames.IMDS_ENDPOINT}' environment variable is malformed.`,
[MsiEnvironmentVariableUrlMalformedErrorCodes
.MSI_ENDPOINT]: `The Managed Identity's '${ManagedIdentityEnvironmentVariableNames.MSI_ENDPOINT}' environment variable is malformed.`,
[networkUnavailable]: "Authentication unavailable. The request to the managed identity endpoint timed out.",
[unableToCreateAzureArc]: "Azure Arc Managed Identities can only be system assigned.",
[unableToCreateCloudShell]: "Cloud Shell Managed Identities can only be system assigned.",
[unableToCreateSource]: "Unable to create a Managed Identity source based on environment variables.",
[unableToReadSecretFile]: "Unable to read the secret file.",
[userAssignedNotAvailableAtRuntime]: "Service Fabric user assigned managed identity ClientId or ResourceId is not configurable at runtime.",
[wwwAuthenticateHeaderMissing]: "A 401 response was received form the Azure Arc Managed Identity, but the www-authenticate header is missing.",
[wwwAuthenticateHeaderUnsupportedFormat]: "A 401 response was received form the Azure Arc Managed Identity, but the www-authenticate header is in an unsupported format.",
};
class ManagedIdentityError extends AuthError {
constructor(errorCode) {
super(errorCode, ManagedIdentityErrorMessages[errorCode]);
this.name = "ManagedIdentityError";
Object.setPrototypeOf(this, ManagedIdentityError.prototype);
}
}
function createManagedIdentityError(errorCode) {
return new ManagedIdentityError(errorCode);
}
export { ManagedIdentityError, ManagedIdentityErrorMessages, createManagedIdentityError };
//# sourceMappingURL=ManagedIdentityError.mjs.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"ManagedIdentityError.mjs","sources":["../../src/error/ManagedIdentityError.ts"],"sourcesContent":[null],"names":["ManagedIdentityErrorCodes.invalidFileExtension","ManagedIdentityErrorCodes.invalidFilePath","ManagedIdentityErrorCodes.invalidManagedIdentityIdType","ManagedIdentityErrorCodes.invalidSecret","ManagedIdentityErrorCodes.platformNotSupported","ManagedIdentityErrorCodes.missingId","ManagedIdentityErrorCodes.MsiEnvironmentVariableUrlMalformedErrorCodes","ManagedIdentityErrorCodes.networkUnavailable","ManagedIdentityErrorCodes.unableToCreateAzureArc","ManagedIdentityErrorCodes.unableToCreateCloudShell","ManagedIdentityErrorCodes.unableToCreateSource","ManagedIdentityErrorCodes.unableToReadSecretFile","ManagedIdentityErrorCodes.userAssignedNotAvailableAtRuntime","ManagedIdentityErrorCodes.wwwAuthenticateHeaderMissing","Man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SAAS,EAAE,4BAA4B,CAAC,SAAS,CAAC,CAAC,CAAC;AAC1D,QAAA,IAAI,CAAC,IAAI,GAAG,sBAAsB,CAAC;QACnC,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,oBAAoB,CAAC,SAAS,CAAC,CAAC;KAC/D;AACJ,CAAA;AAEK,SAAU,0BAA0B,CACtC,SAAiB,EAAA;AAEjB,IAAA,OAAO,IAAI,oBAAoB,CAAC,SAAS,CAAC,CAAC;AAC/C;;;;"}

View File

@@ -0,0 +1,23 @@
export declare const invalidFileExtension = "invalid_file_extension";
export declare const invalidFilePath = "invalid_file_path";
export declare const invalidManagedIdentityIdType = "invalid_managed_identity_id_type";
export declare const invalidSecret = "invalid_secret";
export declare const missingId = "missing_client_id";
export declare const networkUnavailable = "network_unavailable";
export declare const platformNotSupported = "platform_not_supported";
export declare const unableToCreateAzureArc = "unable_to_create_azure_arc";
export declare const unableToCreateCloudShell = "unable_to_create_cloud_shell";
export declare const unableToCreateSource = "unable_to_create_source";
export declare const unableToReadSecretFile = "unable_to_read_secret_file";
export declare const urlParseError = "url_parse_error";
export declare const userAssignedNotAvailableAtRuntime = "user_assigned_not_available_at_runtime";
export declare const wwwAuthenticateHeaderMissing = "www_authenticate_header_missing";
export declare const wwwAuthenticateHeaderUnsupportedFormat = "www_authenticate_header_unsupported_format";
export declare const MsiEnvironmentVariableUrlMalformedErrorCodes: {
readonly AZURE_POD_IDENTITY_AUTHORITY_HOST: "azure_pod_identity_authority_host_url_malformed";
readonly IDENTITY_ENDPOINT: "identity_endpoint_url_malformed";
readonly IMDS_ENDPOINT: "imds_endpoint_url_malformed";
readonly MSI_ENDPOINT: "msi_endpoint_url_malformed";
};
export type MsiEnvironmentVariableErrorCodes = (typeof MsiEnvironmentVariableUrlMalformedErrorCodes)[keyof typeof MsiEnvironmentVariableUrlMalformedErrorCodes];
//# sourceMappingURL=ManagedIdentityErrorCodes.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"ManagedIdentityErrorCodes.d.ts","sourceRoot":"","sources":["../../src/error/ManagedIdentityErrorCodes.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,oBAAoB,2BAA2B,CAAC;AAC7D,eAAO,MAAM,eAAe,sBAAsB,CAAC;AACnD,eAAO,MAAM,4BAA4B,qCAAqC,CAAC;AAC/E,eAAO,MAAM,aAAa,mBAAmB,CAAC;AAC9C,eAAO,MAAM,SAAS,sBAAsB,CAAC;AAC7C,eAAO,MAAM,kBAAkB,wBAAwB,CAAC;AACxD,eAAO,MAAM,oBAAoB,2BAA2B,CAAC;AAC7D,eAAO,MAAM,sBAAsB,+BAA+B,CAAC;AACnE,eAAO,MAAM,wBAAwB,iCAAiC,CAAC;AACvE,eAAO,MAAM,oBAAoB,4BAA4B,CAAC;AAC9D,eAAO,MAAM,sBAAsB,+BAA+B,CAAC;AACnE,eAAO,MAAM,aAAa,oBAAoB,CAAC;AAC/C,eAAO,MAAM,iCAAiC,2CACF,CAAC;AAC7C,eAAO,MAAM,4BAA4B,oCAAoC,CAAC;AAC9E,eAAO,MAAM,sCAAsC,+CACH,CAAC;AAEjD,eAAO,MAAM,4CAA4C;;;;;CAS/C,CAAC;AACX,MAAM,MAAM,gCAAgC,GACxC,CAAC,OAAO,4CAA4C,CAAC,CAAC,MAAM,OAAO,4CAA4C,CAAC,CAAC"}

View File

@@ -0,0 +1,31 @@
/*! @azure/msal-node v2.16.2 2024-11-19 */
'use strict';
import { ManagedIdentityEnvironmentVariableNames } from '../utils/Constants.mjs';
/*
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License.
*/
const invalidFileExtension = "invalid_file_extension";
const invalidFilePath = "invalid_file_path";
const invalidManagedIdentityIdType = "invalid_managed_identity_id_type";
const invalidSecret = "invalid_secret";
const missingId = "missing_client_id";
const networkUnavailable = "network_unavailable";
const platformNotSupported = "platform_not_supported";
const unableToCreateAzureArc = "unable_to_create_azure_arc";
const unableToCreateCloudShell = "unable_to_create_cloud_shell";
const unableToCreateSource = "unable_to_create_source";
const unableToReadSecretFile = "unable_to_read_secret_file";
const userAssignedNotAvailableAtRuntime = "user_assigned_not_available_at_runtime";
const wwwAuthenticateHeaderMissing = "www_authenticate_header_missing";
const wwwAuthenticateHeaderUnsupportedFormat = "www_authenticate_header_unsupported_format";
const MsiEnvironmentVariableUrlMalformedErrorCodes = {
[ManagedIdentityEnvironmentVariableNames.AZURE_POD_IDENTITY_AUTHORITY_HOST]: "azure_pod_identity_authority_host_url_malformed",
[ManagedIdentityEnvironmentVariableNames.IDENTITY_ENDPOINT]: "identity_endpoint_url_malformed",
[ManagedIdentityEnvironmentVariableNames.IMDS_ENDPOINT]: "imds_endpoint_url_malformed",
[ManagedIdentityEnvironmentVariableNames.MSI_ENDPOINT]: "msi_endpoint_url_malformed",
};
export { MsiEnvironmentVariableUrlMalformedErrorCodes, invalidFileExtension, invalidFilePath, invalidManagedIdentityIdType, invalidSecret, missingId, networkUnavailable, platformNotSupported, unableToCreateAzureArc, unableToCreateCloudShell, unableToCreateSource, unableToReadSecretFile, userAssignedNotAvailableAtRuntime, wwwAuthenticateHeaderMissing, wwwAuthenticateHeaderUnsupportedFormat };
//# sourceMappingURL=ManagedIdentityErrorCodes.mjs.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"ManagedIdentityErrorCodes.mjs","sources":["../../src/error/ManagedIdentityErrorCodes.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;AAAA;;;AAGG;AAII,MAAM,oBAAoB,GAAG,yBAAyB;AACtD,MAAM,eAAe,GAAG,oBAAoB;AAC5C,MAAM,4BAA4B,GAAG,mCAAmC;AACxE,MAAM,aAAa,GAAG,iBAAiB;AACvC,MAAM,SAAS,GAAG,oBAAoB;AACtC,MAAM,kBAAkB,GAAG,sBAAsB;AACjD,MAAM,oBAAoB,GAAG,yBAAyB;AACtD,MAAM,sBAAsB,GAAG,6BAA6B;AAC5D,MAAM,wBAAwB,GAAG,+BAA+B;AAChE,MAAM,oBAAoB,GAAG,0BAA0B;AACvD,MAAM,sBAAsB,GAAG,6BAA6B;AAE5D,MAAM,iCAAiC,GAC1C,yCAAyC;AACtC,MAAM,4BAA4B,GAAG,kCAAkC;AACvE,MAAM,sCAAsC,GAC/C,6CAA6C;AAEpC,MAAA,4CAA4C,GAAG;AACxD,IAAA,CAAC,uCAAuC,CAAC,iCAAiC,GACtE,iDAAiD;AACrD,IAAA,CAAC,uCAAuC,CAAC,iBAAiB,GACtD,iCAAiC;AACrC,IAAA,CAAC,uCAAuC,CAAC,aAAa,GAClD,6BAA6B;AACjC,IAAA,CAAC,uCAAuC,CAAC,YAAY,GACjD,4BAA4B;;;;;"}

View File

@@ -0,0 +1,74 @@
import { AuthError } from "@azure/msal-common/node";
/**
* NodeAuthErrorMessage class containing string constants used by error codes and messages.
*/
export declare const NodeAuthErrorMessage: {
invalidLoopbackAddressType: {
code: string;
desc: string;
};
unableToLoadRedirectUri: {
code: string;
desc: string;
};
noAuthCodeInResponse: {
code: string;
desc: string;
};
noLoopbackServerExists: {
code: string;
desc: string;
};
loopbackServerAlreadyExists: {
code: string;
desc: string;
};
loopbackServerTimeout: {
code: string;
desc: string;
};
stateNotFoundError: {
code: string;
desc: string;
};
thumbprintMissing: {
code: string;
desc: string;
};
};
export declare class NodeAuthError extends AuthError {
constructor(errorCode: string, errorMessage?: string);
/**
* Creates an error thrown if loopback server address is of type string.
*/
static createInvalidLoopbackAddressTypeError(): NodeAuthError;
/**
* Creates an error thrown if the loopback server is unable to get a url.
*/
static createUnableToLoadRedirectUrlError(): NodeAuthError;
/**
* Creates an error thrown if the server response does not contain an auth code.
*/
static createNoAuthCodeInResponseError(): NodeAuthError;
/**
* Creates an error thrown if the loopback server has not been spun up yet.
*/
static createNoLoopbackServerExistsError(): NodeAuthError;
/**
* Creates an error thrown if a loopback server already exists when attempting to create another one.
*/
static createLoopbackServerAlreadyExistsError(): NodeAuthError;
/**
* Creates an error thrown if the loopback server times out registering the auth code listener.
*/
static createLoopbackServerTimeoutError(): NodeAuthError;
/**
* Creates an error thrown when the state is not present.
*/
static createStateNotFoundError(): NodeAuthError;
/**
* Creates an error thrown when client certificate was provided, but neither the SHA-1 or SHA-256 thumbprints were provided
*/
static createThumbprintMissingError(): NodeAuthError;
}
//# sourceMappingURL=NodeAuthError.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"NodeAuthError.d.ts","sourceRoot":"","sources":["../../src/error/NodeAuthError.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAEpD;;GAEG;AACH,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiChC,CAAC;AAEF,qBAAa,aAAc,SAAQ,SAAS;gBAC5B,SAAS,EAAE,MAAM,EAAE,YAAY,CAAC,EAAE,MAAM;IAKpD;;OAEG;IACH,MAAM,CAAC,qCAAqC,IAAI,aAAa;IAO7D;;OAEG;IACH,MAAM,CAAC,kCAAkC,IAAI,aAAa;IAO1D;;OAEG;IACH,MAAM,CAAC,+BAA+B,IAAI,aAAa;IAOvD;;OAEG;IACH,MAAM,CAAC,iCAAiC,IAAI,aAAa;IAOzD;;OAEG;IACH,MAAM,CAAC,sCAAsC,IAAI,aAAa;IAO9D;;OAEG;IACH,MAAM,CAAC,gCAAgC,IAAI,aAAa;IAOxD;;OAEG;IACH,MAAM,CAAC,wBAAwB,IAAI,aAAa;IAOhD;;OAEG;IACH,MAAM,CAAC,4BAA4B,IAAI,aAAa;CAMvD"}

View File

@@ -0,0 +1,102 @@
/*! @azure/msal-node v2.16.2 2024-11-19 */
'use strict';
import { AuthError } from '@azure/msal-common/node';
/*
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License.
*/
/**
* NodeAuthErrorMessage class containing string constants used by error codes and messages.
*/
const NodeAuthErrorMessage = {
invalidLoopbackAddressType: {
code: "invalid_loopback_server_address_type",
desc: "Loopback server address is not type string. This is unexpected.",
},
unableToLoadRedirectUri: {
code: "unable_to_load_redirectUrl",
desc: "Loopback server callback was invoked without a url. This is unexpected.",
},
noAuthCodeInResponse: {
code: "no_auth_code_in_response",
desc: "No auth code found in the server response. Please check your network trace to determine what happened.",
},
noLoopbackServerExists: {
code: "no_loopback_server_exists",
desc: "No loopback server exists yet.",
},
loopbackServerAlreadyExists: {
code: "loopback_server_already_exists",
desc: "Loopback server already exists. Cannot create another.",
},
loopbackServerTimeout: {
code: "loopback_server_timeout",
desc: "Timed out waiting for auth code listener to be registered.",
},
stateNotFoundError: {
code: "state_not_found",
desc: "State not found. Please verify that the request originated from msal.",
},
thumbprintMissing: {
code: "thumbprint_missing_from_client_certificate",
desc: "Client certificate does not contain a SHA-1 or SHA-256 thumbprint.",
},
};
class NodeAuthError extends AuthError {
constructor(errorCode, errorMessage) {
super(errorCode, errorMessage);
this.name = "NodeAuthError";
}
/**
* Creates an error thrown if loopback server address is of type string.
*/
static createInvalidLoopbackAddressTypeError() {
return new NodeAuthError(NodeAuthErrorMessage.invalidLoopbackAddressType.code, `${NodeAuthErrorMessage.invalidLoopbackAddressType.desc}`);
}
/**
* Creates an error thrown if the loopback server is unable to get a url.
*/
static createUnableToLoadRedirectUrlError() {
return new NodeAuthError(NodeAuthErrorMessage.unableToLoadRedirectUri.code, `${NodeAuthErrorMessage.unableToLoadRedirectUri.desc}`);
}
/**
* Creates an error thrown if the server response does not contain an auth code.
*/
static createNoAuthCodeInResponseError() {
return new NodeAuthError(NodeAuthErrorMessage.noAuthCodeInResponse.code, `${NodeAuthErrorMessage.noAuthCodeInResponse.desc}`);
}
/**
* Creates an error thrown if the loopback server has not been spun up yet.
*/
static createNoLoopbackServerExistsError() {
return new NodeAuthError(NodeAuthErrorMessage.noLoopbackServerExists.code, `${NodeAuthErrorMessage.noLoopbackServerExists.desc}`);
}
/**
* Creates an error thrown if a loopback server already exists when attempting to create another one.
*/
static createLoopbackServerAlreadyExistsError() {
return new NodeAuthError(NodeAuthErrorMessage.loopbackServerAlreadyExists.code, `${NodeAuthErrorMessage.loopbackServerAlreadyExists.desc}`);
}
/**
* Creates an error thrown if the loopback server times out registering the auth code listener.
*/
static createLoopbackServerTimeoutError() {
return new NodeAuthError(NodeAuthErrorMessage.loopbackServerTimeout.code, `${NodeAuthErrorMessage.loopbackServerTimeout.desc}`);
}
/**
* Creates an error thrown when the state is not present.
*/
static createStateNotFoundError() {
return new NodeAuthError(NodeAuthErrorMessage.stateNotFoundError.code, NodeAuthErrorMessage.stateNotFoundError.desc);
}
/**
* Creates an error thrown when client certificate was provided, but neither the SHA-1 or SHA-256 thumbprints were provided
*/
static createThumbprintMissingError() {
return new NodeAuthError(NodeAuthErrorMessage.thumbprintMissing.code, NodeAuthErrorMessage.thumbprintMissing.desc);
}
}
export { NodeAuthError, NodeAuthErrorMessage };
//# sourceMappingURL=NodeAuthError.mjs.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"NodeAuthError.mjs","sources":["../../src/error/NodeAuthError.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;AAAA;;;AAGG;AAIH;;AAEG;AACU,MAAA,oBAAoB,GAAG;AAChC,IAAA,0BAA0B,EAAE;AACxB,QAAA,IAAI,EAAE,sCAAsC;AAC5C,QAAA,IAAI,EAAE,iEAAiE;AAC1E,KAAA;AACD,IAAA,uBAAuB,EAAE;AACrB,QAAA,IAAI,EAAE,4BAA4B;AAClC,QAAA,IAAI,EAAE,yEAAyE;AAClF,KAAA;AACD,IAAA,oBAAoB,EAAE;AAClB,QAAA,IAAI,EAAE,0BAA0B;AAChC,QAAA,IAAI,EAAE,wGAAwG;AACjH,KAAA;AACD,IAAA,sBAAsB,EAAE;AACpB,QAAA,IAAI,EAAE,2BAA2B;AACjC,QAAA,IAAI,EAAE,gCAAgC;AACzC,KAAA;AACD,IAAA,2BAA2B,EAAE;AACzB,QAAA,IAAI,EAAE,gCAAgC;AACtC,QAAA,IAAI,EAAE,wDAAwD;AACjE,KAAA;AACD,IAAA,qBAAqB,EAAE;AACnB,QAAA,IAAI,EAAE,y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