{"version":3,"file":"localize.mjs","sources":["../../../../../../packages/localize/src/utils/src/constants.ts","../../../../../../packages/localize/src/utils/src/messages.ts","../../../../../../packages/localize/src/utils/src/translations.ts","../../../../../../packages/localize/src/utils/index.ts","../../../../../../packages/localize/src/translate.ts","../../../../../../packages/localize/src/localize/src/global.ts","../../../../../../packages/localize/src/localize/src/localize.ts","../../../../../../packages/localize/src/localize/index.ts","../../../../../../packages/localize/private.ts","../../../../../../packages/localize/localize.ts","../../../../../../packages/localize/index.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * The character used to mark the start and end of a \"block\" in a `$localize` tagged string.\n * A block can indicate metadata about the message or specify a name of a placeholder for a\n * substitution expressions.\n *\n * For example:\n *\n * ```ts\n * $localize`Hello, ${title}:title:!`;\n * $localize`:meaning|description@@id:source message text`;\n * ```\n */\nexport const BLOCK_MARKER = ':';\n\n/**\n * The marker used to separate a message's \"meaning\" from its \"description\" in a metadata block.\n *\n * For example:\n *\n * ```ts\n * $localize `:correct|Indicates that the user got the answer correct: Right!`;\n * $localize `:movement|Button label for moving to the right: Right!`;\n * ```\n */\nexport const MEANING_SEPARATOR = '|';\n\n/**\n * The marker used to separate a message's custom \"id\" from its \"description\" in a metadata block.\n *\n * For example:\n *\n * ```ts\n * $localize `:A welcome message on the home page@@myApp-homepage-welcome: Welcome!`;\n * ```\n */\nexport const ID_SEPARATOR = '@@';\n\n/**\n * The marker used to separate legacy message ids from the rest of a metadata block.\n *\n * For example:\n *\n * ```ts\n * $localize `:@@custom-id␟2df64767cd895a8fabe3e18b94b5b6b6f9e2e3f0: Welcome!`;\n * ```\n *\n * Note that this character is the \"symbol for the unit separator\" (␟) not the \"unit separator\n * character\" itself, since that has no visual representation. See https://graphemica.com/%E2%90%9F.\n *\n * Here is some background for the original \"unit separator character\":\n * https://stackoverflow.com/questions/8695118/whats-the-file-group-record-unit-separator-control-characters-and-its-usage\n */\nexport const LEGACY_ID_INDICATOR = '\\u241F';\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport {computeMsgId} from '@angular/compiler';\n\nimport {BLOCK_MARKER, ID_SEPARATOR, LEGACY_ID_INDICATOR, MEANING_SEPARATOR} from './constants';\n\n/**\n * Re-export this helper function so that users of `@angular/localize` don't need to actively import\n * from `@angular/compiler`.\n */\nexport {computeMsgId} from '@angular/compiler';\n\n/**\n * A string containing a translation source message.\n *\n * I.E. the message that indicates what will be translated from.\n *\n * Uses `{$placeholder-name}` to indicate a placeholder.\n */\nexport type SourceMessage = string;\n\n/**\n * A string containing a translation target message.\n *\n * I.E. the message that indicates what will be translated to.\n *\n * Uses `{$placeholder-name}` to indicate a placeholder.\n */\nexport type TargetMessage = string;\n\n/**\n * A string that uniquely identifies a message, to be used for matching translations.\n */\nexport type MessageId = string;\n\n/**\n * Declares a copy of the `AbsoluteFsPath` branded type in `@angular/compiler-cli` to avoid an\n * import into `@angular/compiler-cli`. The compiler-cli's declaration files are not necessarily\n * compatible with web environments that use `@angular/localize`, and would inadvertently include\n * `typescript` declaration files in any compilation unit that uses `@angular/localize` (which\n * increases parsing time and memory usage during builds) using a default import that only\n * type-checks when `allowSyntheticDefaultImports` is enabled.\n *\n * @see https://github.com/angular/angular/issues/45179\n */\ntype AbsoluteFsPathLocalizeCopy = string&{_brand: 'AbsoluteFsPath'};\n\n/**\n * The location of the message in the source file.\n *\n * The `line` and `column` values for the `start` and `end` properties are zero-based.\n */\nexport interface SourceLocation {\n start: {line: number, column: number};\n end: {line: number, column: number};\n file: AbsoluteFsPathLocalizeCopy;\n text?: string;\n}\n\n/**\n * Additional information that can be associated with a message.\n */\nexport interface MessageMetadata {\n /**\n * A human readable rendering of the message\n */\n text: string;\n /**\n * Legacy message ids, if provided.\n *\n * In legacy message formats the message id can only be computed directly from the original\n * template source.\n *\n * Since this information is not available in `$localize` calls, the legacy message ids may be\n * attached by the compiler to the `$localize` metablock so it can be used if needed at the point\n * of translation if the translations are encoded using the legacy message id.\n */\n legacyIds?: string[];\n /**\n * The id of the `message` if a custom one was specified explicitly.\n *\n * This id overrides any computed or legacy ids.\n */\n customId?: string;\n /**\n * The meaning of the `message`, used to distinguish identical `messageString`s.\n */\n meaning?: string;\n /**\n * The description of the `message`, used to aid translation.\n */\n description?: string;\n /**\n * The location of the message in the source.\n */\n location?: SourceLocation;\n}\n\n/**\n * Information parsed from a `$localize` tagged string that is used to translate it.\n *\n * For example:\n *\n * ```\n * const name = 'Jo Bloggs';\n * $localize`Hello ${name}:title@@ID:!`;\n * ```\n *\n * May be parsed into:\n *\n * ```\n * {\n * id: '6998194507597730591',\n * substitutions: { title: 'Jo Bloggs' },\n * messageString: 'Hello {$title}!',\n * placeholderNames: ['title'],\n * associatedMessageIds: { title: 'ID' },\n * }\n * ```\n */\nexport interface ParsedMessage extends MessageMetadata {\n /**\n * The key used to look up the appropriate translation target.\n */\n id: MessageId;\n /**\n * A mapping of placeholder names to substitution values.\n */\n substitutions: Record;\n /**\n * An optional mapping of placeholder names to associated MessageIds.\n * This can be used to match ICU placeholders to the message that contains the ICU.\n */\n associatedMessageIds?: Record;\n /**\n * An optional mapping of placeholder names to source locations\n */\n substitutionLocations?: Record;\n /**\n * The static parts of the message.\n */\n messageParts: string[];\n /**\n * An optional mapping of message parts to source locations\n */\n messagePartLocations?: (SourceLocation|undefined)[];\n /**\n * The names of the placeholders that will be replaced with substitutions.\n */\n placeholderNames: string[];\n}\n\n/**\n * Parse a `$localize` tagged string into a structure that can be used for translation or\n * extraction.\n *\n * See `ParsedMessage` for an example.\n */\nexport function parseMessage(\n messageParts: TemplateStringsArray, expressions?: readonly any[], location?: SourceLocation,\n messagePartLocations?: (SourceLocation|undefined)[],\n expressionLocations: (SourceLocation|undefined)[] = []): ParsedMessage {\n const substitutions: {[placeholderName: string]: any} = {};\n const substitutionLocations: {[placeholderName: string]: SourceLocation|undefined} = {};\n const associatedMessageIds: {[placeholderName: string]: MessageId} = {};\n const metadata = parseMetadata(messageParts[0], messageParts.raw[0]);\n const cleanedMessageParts: string[] = [metadata.text];\n const placeholderNames: string[] = [];\n let messageString = metadata.text;\n for (let i = 1; i < messageParts.length; i++) {\n const {messagePart, placeholderName = computePlaceholderName(i), associatedMessageId} =\n parsePlaceholder(messageParts[i], messageParts.raw[i]);\n messageString += `{$${placeholderName}}${messagePart}`;\n if (expressions !== undefined) {\n substitutions[placeholderName] = expressions[i - 1];\n substitutionLocations[placeholderName] = expressionLocations[i - 1];\n }\n placeholderNames.push(placeholderName);\n if (associatedMessageId !== undefined) {\n associatedMessageIds[placeholderName] = associatedMessageId;\n }\n cleanedMessageParts.push(messagePart);\n }\n const messageId = metadata.customId || computeMsgId(messageString, metadata.meaning || '');\n const legacyIds = metadata.legacyIds ? metadata.legacyIds.filter(id => id !== messageId) : [];\n return {\n id: messageId,\n legacyIds,\n substitutions,\n substitutionLocations,\n text: messageString,\n customId: metadata.customId,\n meaning: metadata.meaning || '',\n description: metadata.description || '',\n messageParts: cleanedMessageParts,\n messagePartLocations,\n placeholderNames,\n associatedMessageIds,\n location,\n };\n}\n\n/**\n * Parse the given message part (`cooked` + `raw`) to extract the message metadata from the text.\n *\n * If the message part has a metadata block this function will extract the `meaning`,\n * `description`, `customId` and `legacyId` (if provided) from the block. These metadata properties\n * are serialized in the string delimited by `|`, `@@` and `␟` respectively.\n *\n * (Note that `␟` is the `LEGACY_ID_INDICATOR` - see `constants.ts`.)\n *\n * For example:\n *\n * ```ts\n * `:meaning|description@@custom-id:`\n * `:meaning|@@custom-id:`\n * `:meaning|description:`\n * `:description@@custom-id:`\n * `:meaning|:`\n * `:description:`\n * `:@@custom-id:`\n * `:meaning|description@@custom-id␟legacy-id-1␟legacy-id-2:`\n * ```\n *\n * @param cooked The cooked version of the message part to parse.\n * @param raw The raw version of the message part to parse.\n * @returns A object containing any metadata that was parsed from the message part.\n */\nexport function parseMetadata(cooked: string, raw: string): MessageMetadata {\n const {text: messageString, block} = splitBlock(cooked, raw);\n if (block === undefined) {\n return {text: messageString};\n } else {\n const [meaningDescAndId, ...legacyIds] = block.split(LEGACY_ID_INDICATOR);\n const [meaningAndDesc, customId] = meaningDescAndId.split(ID_SEPARATOR, 2);\n let [meaning, description]: (string|undefined)[] = meaningAndDesc.split(MEANING_SEPARATOR, 2);\n if (description === undefined) {\n description = meaning;\n meaning = undefined;\n }\n if (description === '') {\n description = undefined;\n }\n return {text: messageString, meaning, description, customId, legacyIds};\n }\n}\n\n/**\n * Parse the given message part (`cooked` + `raw`) to extract any placeholder metadata from the\n * text.\n *\n * If the message part has a metadata block this function will extract the `placeholderName` and\n * `associatedMessageId` (if provided) from the block.\n *\n * These metadata properties are serialized in the string delimited by `@@`.\n *\n * For example:\n *\n * ```ts\n * `:placeholder-name@@associated-id:`\n * ```\n *\n * @param cooked The cooked version of the message part to parse.\n * @param raw The raw version of the message part to parse.\n * @returns A object containing the metadata (`placeholderName` and `associatedMessageId`) of the\n * preceding placeholder, along with the static text that follows.\n */\nexport function parsePlaceholder(cooked: string, raw: string):\n {messagePart: string; placeholderName?: string; associatedMessageId?: string;} {\n const {text: messagePart, block} = splitBlock(cooked, raw);\n if (block === undefined) {\n return {messagePart};\n } else {\n const [placeholderName, associatedMessageId] = block.split(ID_SEPARATOR);\n return {messagePart, placeholderName, associatedMessageId};\n }\n}\n\n/**\n * Split a message part (`cooked` + `raw`) into an optional delimited \"block\" off the front and the\n * rest of the text of the message part.\n *\n * Blocks appear at the start of message parts. They are delimited by a colon `:` character at the\n * start and end of the block.\n *\n * If the block is in the first message part then it will be metadata about the whole message:\n * meaning, description, id. Otherwise it will be metadata about the immediately preceding\n * substitution: placeholder name.\n *\n * Since blocks are optional, it is possible that the content of a message block actually starts\n * with a block marker. In this case the marker must be escaped `\\:`.\n *\n * @param cooked The cooked version of the message part to parse.\n * @param raw The raw version of the message part to parse.\n * @returns An object containing the `text` of the message part and the text of the `block`, if it\n * exists.\n * @throws an error if the `block` is unterminated\n */\nexport function splitBlock(cooked: string, raw: string): {text: string, block?: string} {\n if (raw.charAt(0) !== BLOCK_MARKER) {\n return {text: cooked};\n } else {\n const endOfBlock = findEndOfBlock(cooked, raw);\n return {\n block: cooked.substring(1, endOfBlock),\n text: cooked.substring(endOfBlock + 1),\n };\n }\n}\n\n\nfunction computePlaceholderName(index: number) {\n return index === 1 ? 'PH' : `PH_${index - 1}`;\n}\n\n/**\n * Find the end of a \"marked block\" indicated by the first non-escaped colon.\n *\n * @param cooked The cooked string (where escaped chars have been processed)\n * @param raw The raw string (where escape sequences are still in place)\n *\n * @returns the index of the end of block marker\n * @throws an error if the block is unterminated\n */\nexport function findEndOfBlock(cooked: string, raw: string): number {\n for (let cookedIndex = 1, rawIndex = 1; cookedIndex < cooked.length; cookedIndex++, rawIndex++) {\n if (raw[rawIndex] === '\\\\') {\n rawIndex++;\n } else if (cooked[cookedIndex] === BLOCK_MARKER) {\n return cookedIndex;\n }\n }\n throw new Error(`Unterminated $localize metadata block in \"${raw}\".`);\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport {BLOCK_MARKER} from './constants';\nimport {MessageId, MessageMetadata, ParsedMessage, parseMessage, TargetMessage} from './messages';\n\n\n/**\n * A translation message that has been processed to extract the message parts and placeholders.\n */\nexport interface ParsedTranslation extends MessageMetadata {\n messageParts: TemplateStringsArray;\n placeholderNames: string[];\n}\n\n/**\n * The internal structure used by the runtime localization to translate messages.\n */\nexport type ParsedTranslations = Record;\n\nexport class MissingTranslationError extends Error {\n private readonly type = 'MissingTranslationError';\n constructor(readonly parsedMessage: ParsedMessage) {\n super(`No translation found for ${describeMessage(parsedMessage)}.`);\n }\n}\n\nexport function isMissingTranslationError(e: any): e is MissingTranslationError {\n return e.type === 'MissingTranslationError';\n}\n\n/**\n * Translate the text of the `$localize` tagged-string (i.e. `messageParts` and\n * `substitutions`) using the given `translations`.\n *\n * The tagged-string is parsed to extract its `messageId` which is used to find an appropriate\n * `ParsedTranslation`. If this doesn't match and there are legacy ids then try matching a\n * translation using those.\n *\n * If one is found then it is used to translate the message into a new set of `messageParts` and\n * `substitutions`.\n * The translation may reorder (or remove) substitutions as appropriate.\n *\n * If there is no translation with a matching message id then an error is thrown.\n * If a translation contains a placeholder that is not found in the message being translated then an\n * error is thrown.\n */\nexport function translate(\n translations: Record, messageParts: TemplateStringsArray,\n substitutions: readonly any[]): [TemplateStringsArray, readonly any[]] {\n const message = parseMessage(messageParts, substitutions);\n // Look up the translation using the messageId, and then the legacyId if available.\n let translation = translations[message.id];\n // If the messageId did not match a translation, try matching the legacy ids instead\n if (message.legacyIds !== undefined) {\n for (let i = 0; i < message.legacyIds.length && translation === undefined; i++) {\n translation = translations[message.legacyIds[i]];\n }\n }\n if (translation === undefined) {\n throw new MissingTranslationError(message);\n }\n return [\n translation.messageParts, translation.placeholderNames.map(placeholder => {\n if (message.substitutions.hasOwnProperty(placeholder)) {\n return message.substitutions[placeholder];\n } else {\n throw new Error(\n `There is a placeholder name mismatch with the translation provided for the message ${\n describeMessage(message)}.\\n` +\n `The translation contains a placeholder with name ${\n placeholder}, which does not exist in the message.`);\n }\n })\n ];\n}\n\n/**\n * Parse the `messageParts` and `placeholderNames` out of a target `message`.\n *\n * Used by `loadTranslations()` to convert target message strings into a structure that is more\n * appropriate for doing translation.\n *\n * @param message the message to be parsed.\n */\nexport function parseTranslation(messageString: TargetMessage): ParsedTranslation {\n const parts = messageString.split(/{\\$([^}]*)}/);\n const messageParts = [parts[0]];\n const placeholderNames: string[] = [];\n for (let i = 1; i < parts.length - 1; i += 2) {\n placeholderNames.push(parts[i]);\n messageParts.push(`${parts[i + 1]}`);\n }\n const rawMessageParts =\n messageParts.map(part => part.charAt(0) === BLOCK_MARKER ? '\\\\' + part : part);\n return {\n text: messageString,\n messageParts: makeTemplateObject(messageParts, rawMessageParts),\n placeholderNames,\n };\n}\n\n/**\n * Create a `ParsedTranslation` from a set of `messageParts` and `placeholderNames`.\n *\n * @param messageParts The message parts to appear in the ParsedTranslation.\n * @param placeholderNames The names of the placeholders to intersperse between the `messageParts`.\n */\nexport function makeParsedTranslation(\n messageParts: string[], placeholderNames: string[] = []): ParsedTranslation {\n let messageString = messageParts[0];\n for (let i = 0; i < placeholderNames.length; i++) {\n messageString += `{$${placeholderNames[i]}}${messageParts[i + 1]}`;\n }\n return {\n text: messageString,\n messageParts: makeTemplateObject(messageParts, messageParts),\n placeholderNames\n };\n}\n\n/**\n * Create the specialized array that is passed to tagged-string tag functions.\n *\n * @param cooked The message parts with their escape codes processed.\n * @param raw The message parts with their escaped codes as-is.\n */\nexport function makeTemplateObject(cooked: string[], raw: string[]): TemplateStringsArray {\n Object.defineProperty(cooked, 'raw', {value: raw});\n return cooked as any;\n}\n\n\nfunction describeMessage(message: ParsedMessage): string {\n const meaningString = message.meaning && ` - \"${message.meaning}\"`;\n const legacy = message.legacyIds && message.legacyIds.length > 0 ?\n ` [${message.legacyIds.map(l => `\"${l}\"`).join(', ')}]` :\n '';\n return `\"${message.id}\"${legacy} (\"${message.text}\"${meaningString})`;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nexport * from './src/constants';\nexport * from './src/messages';\nexport * from './src/translations';\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport {LocalizeFn} from './localize';\nimport {MessageId, ParsedTranslation, parseTranslation, TargetMessage, translate as _translate} from './utils';\n\n/**\n * We augment the `$localize` object to also store the translations.\n *\n * Note that because the TRANSLATIONS are attached to a global object, they will be shared between\n * all applications that are running in a single page of the browser.\n */\ndeclare const $localize: LocalizeFn&{TRANSLATIONS: Record};\n\n/**\n * Load translations for use by `$localize`, if doing runtime translation.\n *\n * If the `$localize` tagged strings are not going to be replaced at compiled time, it is possible\n * to load a set of translations that will be applied to the `$localize` tagged strings at runtime,\n * in the browser.\n *\n * Loading a new translation will overwrite a previous translation if it has the same `MessageId`.\n *\n * Note that `$localize` messages are only processed once, when the tagged string is first\n * encountered, and does not provide dynamic language changing without refreshing the browser.\n * Loading new translations later in the application life-cycle will not change the translated text\n * of messages that have already been translated.\n *\n * The message IDs and translations are in the same format as that rendered to \"simple JSON\"\n * translation files when extracting messages. In particular, placeholders in messages are rendered\n * using the `{$PLACEHOLDER_NAME}` syntax. For example the message from the following template:\n *\n * ```html\n *
preinner-preboldinner-postpost
\n * ```\n *\n * would have the following form in the `translations` map:\n *\n * ```ts\n * {\n * \"2932901491976224757\":\n * \"pre{$START_TAG_SPAN}inner-pre{$START_BOLD_TEXT}bold{$CLOSE_BOLD_TEXT}inner-post{$CLOSE_TAG_SPAN}post\"\n * }\n * ```\n *\n * @param translations A map from message ID to translated message.\n *\n * These messages are processed and added to a lookup based on their `MessageId`.\n *\n * @see `clearTranslations()` for removing translations loaded using this function.\n * @see `$localize` for tagging messages as needing to be translated.\n * @publicApi\n */\nexport function loadTranslations(translations: Record) {\n // Ensure the translate function exists\n if (!$localize.translate) {\n $localize.translate = translate;\n }\n if (!$localize.TRANSLATIONS) {\n $localize.TRANSLATIONS = {};\n }\n Object.keys(translations).forEach(key => {\n $localize.TRANSLATIONS[key] = parseTranslation(translations[key]);\n });\n}\n\n/**\n * Remove all translations for `$localize`, if doing runtime translation.\n *\n * All translations that had been loading into memory using `loadTranslations()` will be removed.\n *\n * @see `loadTranslations()` for loading translations at runtime.\n * @see `$localize` for tagging messages as needing to be translated.\n *\n * @publicApi\n */\nexport function clearTranslations() {\n $localize.translate = undefined;\n $localize.TRANSLATIONS = {};\n}\n\n/**\n * Translate the text of the given message, using the loaded translations.\n *\n * This function may reorder (or remove) substitutions as indicated in the matching translation.\n */\nexport function translate(messageParts: TemplateStringsArray, substitutions: readonly any[]):\n [TemplateStringsArray, readonly any[]] {\n try {\n return _translate($localize.TRANSLATIONS, messageParts, substitutions);\n } catch (e) {\n console.warn((e as Error).message);\n return [messageParts, substitutions];\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n// **********************************************************************************************\n// This code to access the global object is mostly copied from `packages/core/src/util/global.ts`\n\ndeclare global {\n // The definition of `WorkerGlobalScope` must be compatible with the one in `lib.webworker.d.ts`,\n // because all files under `packages/` are compiled together as part of the\n // [legacy-unit-tests-saucelabs][1] CI job, including the `lib.webworker.d.ts` typings brought in\n // by [service-worker/worker/src/service-worker.d.ts][2].\n //\n // [1]:\n // https://github.com/angular/angular/blob/ffeea63f43e6a7fd46be4a8cd5a5d254c98dea08/.circleci/config.yml#L681\n // [2]:\n // https://github.com/angular/angular/blob/316dc2f12ce8931f5ff66fa5f8da21c0d251a337/packages/service-worker/worker/src/service-worker.d.ts#L9\n interface WorkerGlobalScope extends EventTarget, WindowOrWorkerGlobalScope {}\n\n var WorkerGlobalScope: {prototype: WorkerGlobalScope; new (): WorkerGlobalScope;};\n}\n\n// Always use __globalThis if available, which is the spec-defined global variable across all\n// environments, then fallback to __global first, because in Node tests both __global and\n// __window may be defined and _global should be __global in that case. Note: Typeof/Instanceof\n// checks are considered side-effects in Terser. We explicitly mark this as side-effect free:\n// https://github.com/terser/terser/issues/250.\nexport const _global: any = (/* @__PURE__ */ (\n () => (typeof globalThis !== 'undefined' && globalThis) ||\n (typeof global !== 'undefined' && global) || (typeof window !== 'undefined' && window) ||\n (typeof self !== 'undefined' && typeof WorkerGlobalScope !== 'undefined' &&\n self instanceof WorkerGlobalScope && self))());\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {findEndOfBlock} from '../../utils';\n\n/** @nodoc */\nexport interface LocalizeFn {\n (messageParts: TemplateStringsArray, ...expressions: readonly any[]): string;\n\n /**\n * A function that converts an input \"message with expressions\" into a translated \"message with\n * expressions\".\n *\n * The conversion may be done in place, modifying the array passed to the function, so\n * don't assume that this has no side-effects.\n *\n * The expressions must be passed in since it might be they need to be reordered for\n * different translations.\n */\n translate?: TranslateFn;\n /**\n * The current locale of the translated messages.\n *\n * The compile-time translation inliner is able to replace the following code:\n *\n * ```\n * typeof $localize !== \"undefined\" && $localize.locale\n * ```\n *\n * with a string literal of the current locale. E.g.\n *\n * ```\n * \"fr\"\n * ```\n */\n locale?: string;\n}\n\n/** @nodoc */\nexport interface TranslateFn {\n (messageParts: TemplateStringsArray,\n expressions: readonly any[]): [TemplateStringsArray, readonly any[]];\n}\n\n/**\n * Tag a template literal string for localization.\n *\n * For example:\n *\n * ```ts\n * $localize `some string to localize`\n * ```\n *\n * **Providing meaning, description and id**\n *\n * You can optionally specify one or more of `meaning`, `description` and `id` for a localized\n * string by pre-pending it with a colon delimited block of the form:\n *\n * ```ts\n * $localize`:meaning|description@@id:source message text`;\n *\n * $localize`:meaning|:source message text`;\n * $localize`:description:source message text`;\n * $localize`:@@id:source message text`;\n * ```\n *\n * This format is the same as that used for `i18n` markers in Angular templates. See the\n * [Angular i18n guide](guide/i18n-common-prepare#mark-text-in-component-template).\n *\n * **Naming placeholders**\n *\n * If the template literal string contains expressions, then the expressions will be automatically\n * associated with placeholder names for you.\n *\n * For example:\n *\n * ```ts\n * $localize `Hi ${name}! There are ${items.length} items.`;\n * ```\n *\n * will generate a message-source of `Hi {$PH}! There are {$PH_1} items`.\n *\n * The recommended practice is to name the placeholder associated with each expression though.\n *\n * Do this by providing the placeholder name wrapped in `:` characters directly after the\n * expression. These placeholder names are stripped out of the rendered localized string.\n *\n * For example, to name the `items.length` expression placeholder `itemCount` you write:\n *\n * ```ts\n * $localize `There are ${items.length}:itemCount: items`;\n * ```\n *\n * **Escaping colon markers**\n *\n * If you need to use a `:` character directly at the start of a tagged string that has no\n * metadata block, or directly after a substitution expression that has no name you must escape\n * the `:` by preceding it with a backslash:\n *\n * For example:\n *\n * ```ts\n * // message has a metadata block so no need to escape colon\n * $localize `:some description::this message starts with a colon (:)`;\n * // no metadata block so the colon must be escaped\n * $localize `\\:this message starts with a colon (:)`;\n * ```\n *\n * ```ts\n * // named substitution so no need to escape colon\n * $localize `${label}:label:: ${}`\n * // anonymous substitution so colon must be escaped\n * $localize `${label}\\: ${}`\n * ```\n *\n * **Processing localized strings:**\n *\n * There are three scenarios:\n *\n * * **compile-time inlining**: the `$localize` tag is transformed at compile time by a\n * transpiler, removing the tag and replacing the template literal string with a translated\n * literal string from a collection of translations provided to the transpilation tool.\n *\n * * **run-time evaluation**: the `$localize` tag is a run-time function that replaces and\n * reorders the parts (static strings and expressions) of the template literal string with strings\n * from a collection of translations loaded at run-time.\n *\n * * **pass-through evaluation**: the `$localize` tag is a run-time function that simply evaluates\n * the original template literal string without applying any translations to the parts. This\n * version is used during development or where there is no need to translate the localized\n * template literals.\n *\n * @param messageParts a collection of the static parts of the template string.\n * @param expressions a collection of the values of each placeholder in the template string.\n * @returns the translated string, with the `messageParts` and `expressions` interleaved together.\n *\n * @globalApi\n * @publicApi\n */\nexport const $localize: LocalizeFn = function(\n messageParts: TemplateStringsArray, ...expressions: readonly any[]) {\n if ($localize.translate) {\n // Don't use array expansion here to avoid the compiler adding `__read()` helper unnecessarily.\n const translation = $localize.translate(messageParts, expressions);\n messageParts = translation[0];\n expressions = translation[1];\n }\n let message = stripBlock(messageParts[0], messageParts.raw[0]);\n for (let i = 1; i < messageParts.length; i++) {\n message += expressions[i - 1] + stripBlock(messageParts[i], messageParts.raw[i]);\n }\n return message;\n};\n\nconst BLOCK_MARKER = ':';\n\n/**\n * Strip a delimited \"block\" from the start of the `messagePart`, if it is found.\n *\n * If a marker character (:) actually appears in the content at the start of a tagged string or\n * after a substitution expression, where a block has not been provided the character must be\n * escaped with a backslash, `\\:`. This function checks for this by looking at the `raw`\n * messagePart, which should still contain the backslash.\n *\n * @param messagePart The cooked message part to process.\n * @param rawMessagePart The raw message part to check.\n * @returns the message part with the placeholder name stripped, if found.\n * @throws an error if the block is unterminated\n */\nfunction stripBlock(messagePart: string, rawMessagePart: string) {\n return rawMessagePart.charAt(0) === BLOCK_MARKER ?\n messagePart.substring(findEndOfBlock(messagePart, rawMessagePart) + 1) :\n messagePart;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nexport {_global} from './src/global';\nexport {$localize, LocalizeFn, TranslateFn} from './src/localize';\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n// This file exports all the `utils` as private exports so that other parts of `@angular/localize`\n// can make use of them.\nexport {$localize as ɵ$localize, _global as ɵ_global, LocalizeFn as ɵLocalizeFn, TranslateFn as ɵTranslateFn} from './src/localize';\nexport {computeMsgId as ɵcomputeMsgId, findEndOfBlock as ɵfindEndOfBlock, isMissingTranslationError as ɵisMissingTranslationError, makeParsedTranslation as ɵmakeParsedTranslation, makeTemplateObject as ɵmakeTemplateObject, MissingTranslationError as ɵMissingTranslationError, ParsedMessage as ɵParsedMessage, ParsedTranslation as ɵParsedTranslation, ParsedTranslations as ɵParsedTranslations, parseMessage as ɵparseMessage, parseMetadata as ɵparseMetadata, parseTranslation as ɵparseTranslation, SourceLocation as ɵSourceLocation, SourceMessage as ɵSourceMessage, splitBlock as ɵsplitBlock, translate as ɵtranslate} from './src/utils';\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n// This file contains the public API of the `@angular/localize` entry-point\n\nexport {clearTranslations, loadTranslations} from './src/translate';\nexport {MessageId, TargetMessage} from './src/utils';\n\n// Exports that are not part of the public API\nexport * from './private';\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n// DO NOT ADD public exports to this file.\n// The public API exports are specified in the `./localize` module, which is checked by the\n// public_api_guard rules\n\nexport * from './localize';\n"],"names":["BLOCK_MARKER","translate","_translate","$localize"],"mappings":";;;;;;;;;AAAA;;;;;;AAMG;AAEH;;;;;;;;;;;AAWG;AACI,MAAMA,cAAY,GAAG,GAAG,CAAC;AAEhC;;;;;;;;;AASG;AACI,MAAM,iBAAiB,GAAG,GAAG,CAAC;AAErC;;;;;;;;AAQG;AACI,MAAM,YAAY,GAAG,IAAI,CAAC;AAEjC;;;;;;;;;;;;;;AAcG;AACI,MAAM,mBAAmB,GAAG,QAAQ;;AC5D3C;;;;;;AAMG;AAuJH;;;;;AAKG;AACa,SAAA,YAAY,CACxB,YAAkC,EAAE,WAA4B,EAAE,QAAyB,EAC3F,oBAAmD,EACnD,mBAAA,GAAoD,EAAE,EAAA;IACxD,MAAM,aAAa,GAAqC,EAAE,CAAC;IAC3D,MAAM,qBAAqB,GAA0D,EAAE,CAAC;IACxF,MAAM,oBAAoB,GAA2C,EAAE,CAAC;AACxE,IAAA,MAAM,QAAQ,GAAG,aAAa,CAAC,YAAY,CAAC,CAAC,CAAC,EAAE,YAAY,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;AACrE,IAAA,MAAM,mBAAmB,GAAa,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;IACtD,MAAM,gBAAgB,GAAa,EAAE,CAAC;AACtC,IAAA,IAAI,aAAa,GAAG,QAAQ,CAAC,IAAI,CAAC;AAClC,IAAA,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,YAAY,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;QAC5C,MAAM,EAAC,WAAW,EAAE,eAAe,GAAG,sBAAsB,CAAC,CAAC,CAAC,EAAE,mBAAmB,EAA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