generaltranslation 8.2.6 → 8.2.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (162) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/dist/ApiError-4zIP-twr.cjs +24 -0
  3. package/dist/ApiError-4zIP-twr.cjs.map +1 -0
  4. package/dist/ApiError-Bv7vlzyQ.mjs +19 -0
  5. package/dist/ApiError-Bv7vlzyQ.mjs.map +1 -0
  6. package/dist/errors.cjs +3 -0
  7. package/dist/errors.d.cts +11 -0
  8. package/dist/errors.d.mts +11 -0
  9. package/dist/errors.mjs +2 -0
  10. package/dist/id-CPbVYREY.mjs +74 -0
  11. package/dist/id-CPbVYREY.mjs.map +1 -0
  12. package/dist/id-VXBgyXu2.cjs +89 -0
  13. package/dist/id-VXBgyXu2.cjs.map +1 -0
  14. package/dist/id.cjs +5 -0
  15. package/dist/{id/hashSource.d.ts → id.d.cts} +20 -5
  16. package/dist/id.d.mts +40 -0
  17. package/dist/id.mjs +2 -0
  18. package/dist/index.cjs +3491 -0
  19. package/dist/index.cjs.map +1 -0
  20. package/dist/index.d.cts +1219 -0
  21. package/dist/index.d.mts +1219 -0
  22. package/dist/index.mjs +3441 -0
  23. package/dist/index.mjs.map +1 -0
  24. package/dist/internal-B3QbyI_5.mjs +820 -0
  25. package/dist/internal-B3QbyI_5.mjs.map +1 -0
  26. package/dist/internal-DIHQF9gs.cjs +1070 -0
  27. package/dist/internal-DIHQF9gs.cjs.map +1 -0
  28. package/dist/internal.cjs +45 -0
  29. package/dist/{internal.d.ts → internal.d.cts} +82 -113
  30. package/dist/internal.d.mts +263 -0
  31. package/dist/internal.mjs +3 -0
  32. package/dist/sha2-DKowBr6H.cjs +747 -0
  33. package/dist/sha2-DKowBr6H.cjs.map +1 -0
  34. package/dist/stableStringify-DgDlE_pD.mjs +53 -0
  35. package/dist/stableStringify-DgDlE_pD.mjs.map +1 -0
  36. package/dist/types-BJdoI1d1.d.cts +741 -0
  37. package/dist/types-DazaDJbs.d.mts +741 -0
  38. package/dist/types.cjs +17 -0
  39. package/dist/types.cjs.map +1 -0
  40. package/dist/types.d.cts +2 -0
  41. package/dist/types.d.mts +2 -0
  42. package/dist/types.mjs +16 -0
  43. package/dist/types.mjs.map +1 -0
  44. package/package.json +52 -32
  45. package/dist/backwards-compatability/dataConversion.d.ts +0 -23
  46. package/dist/backwards-compatability/oldHashJsxChildren.d.ts +0 -23
  47. package/dist/backwards-compatability/oldTypes.d.ts +0 -21
  48. package/dist/backwards-compatability/typeChecking.d.ts +0 -21
  49. package/dist/cache/IntlCache.d.ts +0 -26
  50. package/dist/cache/types.d.ts +0 -32
  51. package/dist/derive/condenseVars.d.ts +0 -7
  52. package/dist/derive/declareVar.d.ts +0 -26
  53. package/dist/derive/decodeVars.d.ts +0 -9
  54. package/dist/derive/derive.d.ts +0 -38
  55. package/dist/derive/extractVars.d.ts +0 -9
  56. package/dist/derive/index.d.ts +0 -7
  57. package/dist/derive/indexVars.d.ts +0 -6
  58. package/dist/derive/utils/constants.d.ts +0 -2
  59. package/dist/derive/utils/regex.d.ts +0 -2
  60. package/dist/derive/utils/sanitizeVar.d.ts +0 -12
  61. package/dist/derive/utils/traverseHelpers.d.ts +0 -4
  62. package/dist/derive/utils/traverseIcu.d.ts +0 -20
  63. package/dist/derive/utils/types.d.ts +0 -23
  64. package/dist/errors/ApiError.d.ts +0 -7
  65. package/dist/errors/formattingErrors.d.ts +0 -1
  66. package/dist/errors.cjs.min.cjs +0 -2
  67. package/dist/errors.cjs.min.cjs.map +0 -1
  68. package/dist/errors.d.ts +0 -9
  69. package/dist/errors.esm.min.mjs +0 -2
  70. package/dist/errors.esm.min.mjs.map +0 -1
  71. package/dist/formatting/custom-formats/CutoffFormat/CutoffFormat.d.ts +0 -59
  72. package/dist/formatting/custom-formats/CutoffFormat/constants.d.ts +0 -4
  73. package/dist/formatting/custom-formats/CutoffFormat/types.d.ts +0 -48
  74. package/dist/formatting/format.d.ts +0 -1
  75. package/dist/id/hashTemplate.d.ts +0 -4
  76. package/dist/id/types.d.ts +0 -7
  77. package/dist/id.cjs.min.cjs +0 -2
  78. package/dist/id.cjs.min.cjs.map +0 -1
  79. package/dist/id.d.ts +0 -86
  80. package/dist/id.esm.min.mjs +0 -2
  81. package/dist/id.esm.min.mjs.map +0 -1
  82. package/dist/index.cjs.min.cjs +0 -2
  83. package/dist/index.cjs.min.cjs.map +0 -1
  84. package/dist/index.d.ts +0 -1627
  85. package/dist/index.esm.min.mjs +0 -2
  86. package/dist/index.esm.min.mjs.map +0 -1
  87. package/dist/internal.cjs.min.cjs +0 -2
  88. package/dist/internal.cjs.min.cjs.map +0 -1
  89. package/dist/internal.esm.min.mjs +0 -2
  90. package/dist/internal.esm.min.mjs.map +0 -1
  91. package/dist/locales/customLocaleMapping.d.ts +0 -11
  92. package/dist/locales/determineLocale.d.ts +0 -1
  93. package/dist/locales/getLocaleDirection.d.ts +0 -1
  94. package/dist/locales/getLocaleEmoji.d.ts +0 -2
  95. package/dist/locales/getLocaleName.d.ts +0 -1
  96. package/dist/locales/getLocaleProperties.d.ts +0 -32
  97. package/dist/locales/getPluralForm.d.ts +0 -9
  98. package/dist/locales/getRegionProperties.d.ts +0 -7
  99. package/dist/locales/isSameDialect.d.ts +0 -1
  100. package/dist/locales/isSameLanguage.d.ts +0 -1
  101. package/dist/locales/isSupersetLocale.d.ts +0 -1
  102. package/dist/locales/isValidLocale.d.ts +0 -1
  103. package/dist/locales/requiresTranslation.d.ts +0 -1
  104. package/dist/locales/resolveAliasLocale.d.ts +0 -8
  105. package/dist/locales/resolveCanonicalLocale.d.ts +0 -8
  106. package/dist/logging/errors.d.ts +0 -10
  107. package/dist/logging/logger.d.ts +0 -117
  108. package/dist/logging/warnings.d.ts +0 -2
  109. package/dist/projects/getProjectData.d.ts +0 -1
  110. package/dist/settings/plurals.d.ts +0 -3
  111. package/dist/settings/settings.d.ts +0 -2
  112. package/dist/settings/settingsUrls.d.ts +0 -3
  113. package/dist/translate/api.d.ts +0 -1
  114. package/dist/translate/awaitJobs.d.ts +0 -19
  115. package/dist/translate/checkJobStatus.d.ts +0 -8
  116. package/dist/translate/createBranch.d.ts +0 -10
  117. package/dist/translate/createTag.d.ts +0 -19
  118. package/dist/translate/downloadFileBatch.d.ts +0 -1
  119. package/dist/translate/enqueueFiles.d.ts +0 -8
  120. package/dist/translate/getOrphanedFiles.d.ts +0 -8
  121. package/dist/translate/processFileMoves.d.ts +0 -25
  122. package/dist/translate/publishFiles.d.ts +0 -17
  123. package/dist/translate/queryBranchData.d.ts +0 -3
  124. package/dist/translate/queryFileData.d.ts +0 -42
  125. package/dist/translate/querySourceFile.d.ts +0 -1
  126. package/dist/translate/setupProject.d.ts +0 -11
  127. package/dist/translate/submitUserEditDiffs.d.ts +0 -12
  128. package/dist/translate/translateMany.d.ts +0 -1
  129. package/dist/translate/uploadSourceFiles.d.ts +0 -1
  130. package/dist/translate/uploadTranslations.d.ts +0 -1
  131. package/dist/translate/utils/apiRequest.d.ts +0 -1
  132. package/dist/translate/utils/batch.d.ts +0 -52
  133. package/dist/translate/utils/fetchWithTimeout.d.ts +0 -1
  134. package/dist/translate/utils/generateRequestHeaders.d.ts +0 -2
  135. package/dist/translate/utils/handleFetchError.d.ts +0 -1
  136. package/dist/translate/utils/validateResponse.d.ts +0 -1
  137. package/dist/types-dir/api/branch.d.ts +0 -10
  138. package/dist/types-dir/api/checkFileTranslations.d.ts +0 -37
  139. package/dist/types-dir/api/downloadFile.d.ts +0 -3
  140. package/dist/types-dir/api/downloadFileBatch.d.ts +0 -34
  141. package/dist/types-dir/api/enqueueEntries.d.ts +0 -21
  142. package/dist/types-dir/api/enqueueFiles.d.ts +0 -56
  143. package/dist/types-dir/api/entry.d.ts +0 -36
  144. package/dist/types-dir/api/fetchTranslations.d.ts +0 -11
  145. package/dist/types-dir/api/file.d.ts +0 -54
  146. package/dist/types-dir/api/project.d.ts +0 -7
  147. package/dist/types-dir/api/translate.d.ts +0 -34
  148. package/dist/types-dir/api/translateMany.d.ts +0 -5
  149. package/dist/types-dir/api/translationStatus.d.ts +0 -9
  150. package/dist/types-dir/api/uploadFiles.d.ts +0 -43
  151. package/dist/types-dir/jsx/content.d.ts +0 -61
  152. package/dist/types-dir/jsx/variables.d.ts +0 -9
  153. package/dist/types-dir/transformations.d.ts +0 -8
  154. package/dist/types.cjs.min.cjs +0 -2
  155. package/dist/types.cjs.min.cjs.map +0 -1
  156. package/dist/types.d.ts +0 -652
  157. package/dist/types.esm.min.mjs +0 -2
  158. package/dist/types.esm.min.mjs.map +0 -1
  159. package/dist/utils/base64.d.ts +0 -2
  160. package/dist/utils/isVariable.d.ts +0 -2
  161. package/dist/utils/minify.d.ts +0 -2
  162. package/dist/utils/stableStringify.d.ts +0 -1
@@ -0,0 +1,1070 @@
1
+ const require_sha2 = require("./sha2-DKowBr6H.cjs");
2
+ require("./index.cjs");
3
+ let _formatjs_icu_messageformat_parser = require("@formatjs/icu-messageformat-parser");
4
+ let _formatjs_icu_messageformat_parser_types_js = require("@formatjs/icu-messageformat-parser/types.js");
5
+ let _formatjs_icu_messageformat_parser_printer_js = require("@formatjs/icu-messageformat-parser/printer.js");
6
+ //#region src/settings/settings.ts
7
+ const libraryDefaultLocale = "en";
8
+ const defaultTimeout = 6e4;
9
+ //#endregion
10
+ //#region src/errors/formattingErrors.ts
11
+ const createInvalidCutoffStyleError = (style) => `generaltranslation Formatting Error: Invalid cutoff style: ${style}.`;
12
+ const DEFAULT_TERMINATOR_KEY = "DEFAULT_TERMINATOR_KEY";
13
+ const TERMINATOR_MAP = {
14
+ ellipsis: {
15
+ fr: {
16
+ terminator: "…",
17
+ separator: " "
18
+ },
19
+ zh: {
20
+ terminator: "……",
21
+ separator: void 0
22
+ },
23
+ ja: {
24
+ terminator: "……",
25
+ separator: void 0
26
+ },
27
+ [DEFAULT_TERMINATOR_KEY]: {
28
+ terminator: "…",
29
+ separator: void 0
30
+ }
31
+ },
32
+ none: { [DEFAULT_TERMINATOR_KEY]: {
33
+ terminator: void 0,
34
+ separator: void 0
35
+ } }
36
+ };
37
+ //#endregion
38
+ //#region src/formatting/custom-formats/CutoffFormat/CutoffFormat.ts
39
+ var CutoffFormatConstructor = class {
40
+ /**
41
+ * Constructor
42
+ * @param {string | string[]} locales - The locales to use for formatting.
43
+ * @param {CutoffFormatOptions} options - The options for formatting.
44
+ * @param {number} [option.maxChars] - The maximum number of characters to display.
45
+ * - Undefined values are treated as no cutoff.
46
+ * - Negative values follow .slice() behavior and terminator will be added before the value.
47
+ * - 0 will result in an empty string.
48
+ * - If cutoff results in an empty string, no terminator is added.
49
+ * @param {CutoffFormatStyle} [option.style='ellipsis'] - The style of the terminator.
50
+ * @param {string} [option.terminator] - Optional override the terminator to use.
51
+ * @param {string} [option.separator] - Optional override the separator to use between the terminator and the value.
52
+ * - If no terminator is provided, then separator is ignored.
53
+ *
54
+ * @example
55
+ * const format = new CutoffFormat('en', { maxChars: 5 });
56
+ * format.format('Hello, world!'); // 'Hello...'
57
+ *
58
+ * const format = new CutoffFormat('en', { maxChars: -3 });
59
+ * format.format('Hello, world!'); // '...ld!'
60
+ */
61
+ constructor(locales, options = {}) {
62
+ try {
63
+ const localesList = !locales ? ["en"] : Array.isArray(locales) ? locales.map((l) => String(l)) : [String(locales)];
64
+ const canonicalLocales = Intl.getCanonicalLocales(localesList);
65
+ this.locale = canonicalLocales.length ? canonicalLocales[0] : "en";
66
+ } catch {
67
+ this.locale = "en";
68
+ }
69
+ if (!TERMINATOR_MAP[options.style ?? "ellipsis"]) throw new Error(createInvalidCutoffStyleError(options.style ?? "ellipsis"));
70
+ let style;
71
+ let presetTerminatorOptions;
72
+ if (options.maxChars !== void 0) {
73
+ style = options.style ?? "ellipsis";
74
+ const languageCode = new Intl.Locale(this.locale).language;
75
+ presetTerminatorOptions = TERMINATOR_MAP[style][languageCode] || TERMINATOR_MAP[style]["DEFAULT_TERMINATOR_KEY"];
76
+ }
77
+ let terminator = options.terminator ?? presetTerminatorOptions?.terminator;
78
+ let separator = terminator != null ? options.separator ?? presetTerminatorOptions?.separator : void 0;
79
+ this.additionLength = (terminator?.length ?? 0) + (separator?.length ?? 0);
80
+ if (options.maxChars !== void 0 && Math.abs(options.maxChars) < this.additionLength) {
81
+ terminator = void 0;
82
+ separator = void 0;
83
+ }
84
+ this.options = {
85
+ maxChars: options.maxChars,
86
+ style,
87
+ terminator,
88
+ separator
89
+ };
90
+ }
91
+ /**
92
+ * Format a value according to the cutoff options, returning a formatted string.
93
+ *
94
+ * @param {string} value - The string value to format with cutoff behavior.
95
+ * @returns {string} The formatted string with terminator applied if cutoff occurs.
96
+ *
97
+ * @example
98
+ * const formatter = new CutoffFormatConstructor('en', { maxChars: 8, style: 'ellipsis' });
99
+ * formatter.format('Hello, world!'); // Returns 'Hello, w...'
100
+ */
101
+ format(value) {
102
+ return this.formatToParts(value).join("");
103
+ }
104
+ /**
105
+ * Format a value to parts according to the cutoff options, returning an array of string parts.
106
+ * This method breaks down the formatted result into individual components for more granular control.
107
+ *
108
+ * @param {string} value - The string value to format with cutoff behavior.
109
+ * @returns {PrependedCutoffParts | PostpendedCutoffParts} An array of string parts representing the formatted result.
110
+ * - For positive maxChars: [cutoffValue, separator?, terminator?]
111
+ * - For negative maxChars: [terminator?, separator?, cutoffValue]
112
+ * - For no cutoff: [originalValue]
113
+ *
114
+ * @example
115
+ * const formatter = new CutoffFormatConstructor('en', { maxChars: 5, style: 'ellipsis' });
116
+ * formatter.formatToParts('Hello, world!'); // Returns ['Hello', '...']
117
+ */
118
+ formatToParts(value) {
119
+ const { maxChars, terminator, separator } = this.options;
120
+ const adjustedChars = maxChars === void 0 || Math.abs(maxChars) >= value.length ? maxChars : maxChars >= 0 ? Math.max(0, maxChars - this.additionLength) : Math.min(0, maxChars + this.additionLength);
121
+ const slicedValue = adjustedChars !== void 0 && adjustedChars > -1 ? value.slice(0, adjustedChars) : value.slice(adjustedChars);
122
+ if (maxChars == null || adjustedChars == null || adjustedChars === 0 || terminator == null || value.length <= Math.abs(maxChars)) return [slicedValue];
123
+ if (adjustedChars > 0) return separator != null ? [
124
+ slicedValue,
125
+ separator,
126
+ terminator
127
+ ] : [slicedValue, terminator];
128
+ else return separator != null ? [
129
+ terminator,
130
+ separator,
131
+ slicedValue
132
+ ] : [terminator, slicedValue];
133
+ }
134
+ /**
135
+ * Get the resolved options
136
+ * @returns {ResolvedCutoffFormatOptions} The resolved options.
137
+ */
138
+ resolvedOptions() {
139
+ return this.options;
140
+ }
141
+ };
142
+ //#endregion
143
+ //#region src/cache/IntlCache.ts
144
+ /**
145
+ * Object mapping constructor names to their respective constructor functions
146
+ * Includes all native Intl constructors plus custom ones like CutoffFormat
147
+ */
148
+ const CustomIntl = {
149
+ Collator: Intl.Collator,
150
+ DateTimeFormat: Intl.DateTimeFormat,
151
+ DisplayNames: Intl.DisplayNames,
152
+ ListFormat: Intl.ListFormat,
153
+ Locale: Intl.Locale,
154
+ NumberFormat: Intl.NumberFormat,
155
+ PluralRules: Intl.PluralRules,
156
+ RelativeTimeFormat: Intl.RelativeTimeFormat,
157
+ Segmenter: Intl.Segmenter,
158
+ CutoffFormat: CutoffFormatConstructor
159
+ };
160
+ /**
161
+ * Cache for Intl and custom format instances to avoid repeated instantiation
162
+ * Uses a two-level structure: constructor name -> cache key -> instance
163
+ */
164
+ var IntlCache = class {
165
+ constructor() {
166
+ this.cache = {};
167
+ }
168
+ /**
169
+ * Generates a consistent cache key from locales and options
170
+ * Handles all LocalesArgument types (string, Locale, array, undefined)
171
+ */
172
+ _generateKey(locales, options = {}) {
173
+ return `${!locales ? "undefined" : Array.isArray(locales) ? locales.map((l) => String(l)).join(",") : String(locales)}:${options ? JSON.stringify(options, Object.keys(options).sort()) : "{}"}`;
174
+ }
175
+ /**
176
+ * Gets a cached Intl instance or creates a new one if not found
177
+ * @param constructor The name of the Intl constructor to use
178
+ * @param args Constructor arguments (locales, options)
179
+ * @returns Cached or newly created Intl instance
180
+ */
181
+ get(constructor, ...args) {
182
+ const [locales = "en", options = {}] = args;
183
+ const key = this._generateKey(locales, options);
184
+ let intlObject = this.cache[constructor]?.[key];
185
+ if (intlObject === void 0) {
186
+ intlObject = new CustomIntl[constructor](...args);
187
+ if (!this.cache[constructor]) this.cache[constructor] = {};
188
+ this.cache[constructor][key] = intlObject;
189
+ }
190
+ return intlObject;
191
+ }
192
+ };
193
+ /**
194
+ * Global instance of the Intl cache for use throughout the application
195
+ */
196
+ const intlCache = new IntlCache();
197
+ //#endregion
198
+ //#region src/settings/settingsUrls.ts
199
+ const defaultCacheUrl = "https://cdn.gtx.dev";
200
+ const defaultBaseUrl = "https://api2.gtx.dev";
201
+ const defaultRuntimeApiUrl = "https://runtime2.gtx.dev";
202
+ //#endregion
203
+ //#region src/settings/plurals.ts
204
+ const pluralForms = [
205
+ "singular",
206
+ "plural",
207
+ "dual",
208
+ "zero",
209
+ "one",
210
+ "two",
211
+ "few",
212
+ "many",
213
+ "other"
214
+ ];
215
+ function isAcceptedPluralForm(form) {
216
+ return pluralForms.includes(form);
217
+ }
218
+ //#endregion
219
+ //#region src/locales/getPluralForm.ts
220
+ /**
221
+ * Given a number and a list of allowed plural forms, return the plural form that best fits the number.
222
+ *
223
+ * @param {number} n - The number to determine the plural form for.
224
+ * @param {locales[]} forms - The allowed plural forms.
225
+ * @returns {PluralType} The determined plural form, or an empty string if none fit.
226
+ */
227
+ function _getPluralForm(n, forms = pluralForms, locales = ["en"]) {
228
+ const provisionalBranchName = intlCache.get("PluralRules", locales).select(n);
229
+ const absN = Math.abs(n);
230
+ if (absN === 0 && forms.includes("zero")) return "zero";
231
+ if (absN === 1) {
232
+ if (forms.includes("singular")) return "singular";
233
+ if (forms.includes("one")) return "one";
234
+ }
235
+ if (provisionalBranchName === "one" && forms.includes("singular")) return "singular";
236
+ if (absN === 2) {
237
+ if (forms.includes("dual")) return "dual";
238
+ if (forms.includes("two")) return "two";
239
+ }
240
+ if (provisionalBranchName === "two" && forms.includes("dual")) return "dual";
241
+ if (forms.includes(provisionalBranchName)) return provisionalBranchName;
242
+ if (provisionalBranchName === "two" && forms.includes("dual")) return "dual";
243
+ if (provisionalBranchName === "two" && forms.includes("plural")) return "plural";
244
+ if (provisionalBranchName === "two" && forms.includes("other")) return "other";
245
+ if (provisionalBranchName === "few" && forms.includes("plural")) return "plural";
246
+ if (provisionalBranchName === "few" && forms.includes("other")) return "other";
247
+ if (provisionalBranchName === "many" && forms.includes("plural")) return "plural";
248
+ if (provisionalBranchName === "many" && forms.includes("other")) return "other";
249
+ if (provisionalBranchName === "other" && forms.includes("plural")) return "plural";
250
+ return "";
251
+ }
252
+ //#endregion
253
+ //#region src/utils/minify.ts
254
+ const VARIABLE_TRANSFORMATION_SUFFIXES_TO_MINIFIED_NAMES = {
255
+ variable: "v",
256
+ number: "n",
257
+ datetime: "d",
258
+ currency: "c",
259
+ "relative-time": "rt"
260
+ };
261
+ function minifyVariableType(variableType) {
262
+ return VARIABLE_TRANSFORMATION_SUFFIXES_TO_MINIFIED_NAMES[variableType];
263
+ }
264
+ //#endregion
265
+ //#region src/utils/base64.ts
266
+ function encode(data) {
267
+ if (typeof Buffer !== "undefined") return Buffer.from(data, "utf8").toString("base64");
268
+ const bytes = new TextEncoder().encode(data);
269
+ let binary = "";
270
+ for (let i = 0; i < bytes.length; i++) binary += String.fromCharCode(bytes[i]);
271
+ return btoa(binary);
272
+ }
273
+ function decode(base64) {
274
+ if (typeof Buffer !== "undefined") return Buffer.from(base64, "base64").toString("utf8");
275
+ const binary = atob(base64);
276
+ const bytes = new Uint8Array(binary.length);
277
+ for (let i = 0; i < binary.length; i++) bytes[i] = binary.charCodeAt(i);
278
+ return new TextDecoder().decode(bytes);
279
+ }
280
+ //#endregion
281
+ //#region src/utils/isSupportedFileFormatTransform.ts
282
+ const SUPPORTED_TRANSFORMATIONS = {
283
+ GTJSON: ["GTJSON"],
284
+ JSON: ["JSON"],
285
+ PO: ["PO"],
286
+ POT: ["POT", "PO"],
287
+ YAML: ["YAML"],
288
+ MDX: ["MDX"],
289
+ MD: ["MD"],
290
+ TS: ["TS"],
291
+ JS: ["JS"],
292
+ HTML: ["HTML"],
293
+ TXT: ["TXT"],
294
+ TWILIO_CONTENT_JSON: ["TWILIO_CONTENT_JSON"]
295
+ };
296
+ /**
297
+ * This function checks if a file format transformation is supported during translation
298
+ * @param from - The source file format
299
+ * @param to - The target file format
300
+ * @returns True if the transformation is supported, false otherwise
301
+ */
302
+ function isSupportedFileFormatTransform(from, to) {
303
+ return SUPPORTED_TRANSFORMATIONS[from]?.includes(to) ?? false;
304
+ }
305
+ //#endregion
306
+ //#region src/translate/utils/validateFileFormatTransform.ts
307
+ /**
308
+ * Returns a user-facing validation error when a requested file format transform
309
+ * is missing source format context or is not currently supported.
310
+ */
311
+ function getFileFormatTransformError(file) {
312
+ if (!file.transformFormat) return void 0;
313
+ const fileLabel = file.fileName ?? file.fileId ?? "unknown file";
314
+ if (!file.fileFormat) return `fileFormat is required when transformFormat is provided for ${fileLabel}`;
315
+ if (!isSupportedFileFormatTransform(file.fileFormat, file.transformFormat)) return `Unsupported file format transform: ${file.fileFormat} -> ${file.transformFormat}`;
316
+ }
317
+ /**
318
+ * Validates file format transforms before sending upload/enqueue requests.
319
+ */
320
+ function validateFileFormatTransforms(files) {
321
+ for (const file of files) {
322
+ const error = getFileFormatTransformError(file);
323
+ if (error) throw new Error(error);
324
+ }
325
+ }
326
+ //#endregion
327
+ //#region src/derive/utils/traverseIcu.ts
328
+ /**
329
+ * Given an ICU string, traverse the AST and call the visitor function for each element that matches the type T
330
+ * @param icu - The ICU string to traverse
331
+ * @param shouldVisit - A function that returns true if the element should be visited
332
+ * @param visitor - A function that is called for each element that matches the type T
333
+ * @returns The modified AST of the ICU string
334
+ *
335
+ * @note This function is a heavy operation, use sparingly
336
+ */
337
+ function traverseIcu({ icuString, shouldVisit, visitor, options: { recurseIntoVisited = true, ...otherOptions } }) {
338
+ const ast = (0, _formatjs_icu_messageformat_parser.parse)(icuString, otherOptions);
339
+ handleChildren(ast);
340
+ return ast;
341
+ function handleChildren(children) {
342
+ children.map(handleChild);
343
+ }
344
+ function handleChild(child) {
345
+ let visited = false;
346
+ if (shouldVisit(child)) {
347
+ visitor(child);
348
+ visited = true;
349
+ }
350
+ if (!visited || recurseIntoVisited) {
351
+ if (child.type === _formatjs_icu_messageformat_parser.TYPE.select || child.type === _formatjs_icu_messageformat_parser.TYPE.plural) Object.values(child.options).map((option) => option.value).map(handleChildren);
352
+ else if (child.type === _formatjs_icu_messageformat_parser.TYPE.tag) handleChildren(child.children);
353
+ }
354
+ }
355
+ }
356
+ //#endregion
357
+ //#region src/derive/utils/constants.ts
358
+ const VAR_IDENTIFIER = "_gt_";
359
+ const VAR_NAME_IDENTIFIER = "_gt_var_name";
360
+ //#endregion
361
+ //#region src/derive/utils/regex.ts
362
+ const GT_INDEXED_IDENTIFIER_REGEX = new RegExp(`^${VAR_IDENTIFIER}\\d+$`);
363
+ const GT_UNINDEXED_IDENTIFIER_REGEX = new RegExp(`^${VAR_IDENTIFIER}$`);
364
+ //#endregion
365
+ //#region src/derive/utils/traverseHelpers.ts
366
+ function isGTIndexedSelectElement(child) {
367
+ return child.type === _formatjs_icu_messageformat_parser_types_js.TYPE.select && GT_INDEXED_IDENTIFIER_REGEX.test(child.value) && !!child.options.other && (child.options.other.value.length === 0 || child.options.other.value.length > 0 && child.options.other.value[0]?.type === _formatjs_icu_messageformat_parser_types_js.TYPE.literal);
368
+ }
369
+ function isGTUnindexedSelectElement(child) {
370
+ return child.type === _formatjs_icu_messageformat_parser_types_js.TYPE.select && GT_UNINDEXED_IDENTIFIER_REGEX.test(child.value) && !!child.options.other && (child.options.other.value.length === 0 || child.options.other.value.length > 0 && child.options.other.value[0]?.type === _formatjs_icu_messageformat_parser_types_js.TYPE.literal);
371
+ }
372
+ //#endregion
373
+ //#region src/derive/decodeVars.ts
374
+ /**
375
+ * Given an encoded ICU string, interpolate only _gt_ variables that have been marked with declareVar()
376
+ * @example
377
+ * const encodedIcu = "Hi" + declareVar("Brian") + ", my name is {name}"
378
+ * // 'Hi {_gt_, select, other {Brian}}, my name is {name}'
379
+ * decodeVars(encodedIcu)
380
+ * // 'Hi Brian, my name is {name}'
381
+ */
382
+ function decodeVars(icuString) {
383
+ if (!icuString.includes("_gt_")) return icuString;
384
+ const variableLocations = [];
385
+ function visitor(child) {
386
+ variableLocations.push({
387
+ start: child.location?.start.offset ?? 0,
388
+ end: child.location?.end.offset ?? 0,
389
+ value: child.options.other.value.length > 0 ? child.options.other.value[0].value : ""
390
+ });
391
+ }
392
+ traverseIcu({
393
+ icuString,
394
+ shouldVisit: isGTUnindexedSelectElement,
395
+ visitor,
396
+ options: {
397
+ recurseIntoVisited: false,
398
+ captureLocation: true
399
+ }
400
+ });
401
+ let previousIndex = 0;
402
+ const outputList = [];
403
+ for (let i = 0; i < variableLocations.length; i++) {
404
+ outputList.push(icuString.slice(previousIndex, variableLocations[i].start));
405
+ outputList.push(variableLocations[i].value);
406
+ previousIndex = variableLocations[i].end;
407
+ }
408
+ if (previousIndex < icuString.length) outputList.push(icuString.slice(previousIndex));
409
+ return outputList.join("");
410
+ }
411
+ //#endregion
412
+ //#region src/derive/utils/sanitizeVar.ts
413
+ /**
414
+ * Sanitizes string by escaping ICU syntax
415
+ *
416
+ * Sanitize arbitrary string so it does not break the following ICU message syntax:
417
+ * {_gt_, select, other {string_here}}
418
+ *
419
+ * Escapes ICU special characters by:
420
+ * 1. Doubling all single quotes (U+0027 ')
421
+ * 2. Adding a single quote before the first special character ({}<>)
422
+ * 3. Adding a single quote after the last special character ({}<>)
423
+ */
424
+ function sanitizeVar(string) {
425
+ let result = string.replace(/['\']/g, "''");
426
+ const specialChars = /[{}<>]/;
427
+ const firstSpecialIndex = result.search(specialChars);
428
+ if (firstSpecialIndex === -1) return result;
429
+ let lastSpecialIndex = -1;
430
+ for (let i = result.length - 1; i >= 0; i--) if (specialChars.test(result[i])) {
431
+ lastSpecialIndex = i;
432
+ break;
433
+ }
434
+ result = result.slice(0, firstSpecialIndex) + "'" + result.slice(firstSpecialIndex, lastSpecialIndex + 1) + "'" + result.slice(lastSpecialIndex + 1);
435
+ return result;
436
+ }
437
+ //#endregion
438
+ //#region src/derive/declareVar.ts
439
+ /**
440
+ * Mark as a non-translatable string. Use within a derive() call to mark content as not derivable (e.g., not possible to statically analyze).
441
+ *
442
+ * @example
443
+ * function nonDerivableFunction() {
444
+ * return Math.random();
445
+ * }
446
+ *
447
+ * function derivableFunction() {
448
+ * if (condition) {
449
+ * return declareVar(nonDerivableFunction())
450
+ * }
451
+ * return 'John Doe';
452
+ * }
453
+ *
454
+ * const gt = useGT();
455
+ * gt(`My name is ${derive(derivableFunction())}`);
456
+ *
457
+ * @param {string | number | boolean | null | undefined} variable - The variable to sanitize.
458
+ * @param {Object} [options] - The options for the sanitization.
459
+ * @param {string} [options.$name] - The name of the variable.
460
+ * @returns {string} The sanitized value.
461
+ */
462
+ function declareVar(variable, options) {
463
+ const variableSection = ` other {${sanitizeVar(String(variable ?? ""))}}`;
464
+ let nameSection = "";
465
+ if (options?.$name) nameSection = ` ${VAR_NAME_IDENTIFIER} {${sanitizeVar(options.$name)}}`;
466
+ return `{${VAR_IDENTIFIER}, select,${variableSection}${nameSection}}`;
467
+ }
468
+ //#endregion
469
+ //#region src/derive/derive.ts
470
+ /**
471
+ * derive() is a powerful but dangerous function which marks its argument as derivable (statically analyzable) for the compiler and CLI tool.
472
+ *
473
+ * This function is dangerous because it can cause the compiler and CLI tool to throw an error if the argument is not derivable.
474
+ *
475
+ * @example
476
+ * ```jsx
477
+ * function getSubject() {
478
+ * return (Math.random() > 0.5) ? "Alice" : "Brian";
479
+ * }
480
+ * ...
481
+ * gt(`My name is ${derive(getSubject())}`);
482
+ * ```
483
+ *
484
+ * @param {T extends string | boolean | number | null | undefined} content - Content to mark as derivable.
485
+ * @returns content
486
+ */
487
+ function derive(content) {
488
+ return content;
489
+ }
490
+ /**
491
+ * @deprecated Use derive() instead.
492
+ *
493
+ * declareStatic() is a powerful but dangerous function which marks its argument as derivable (statically analyzable) for the compiler and CLI tool.
494
+ *
495
+ * This function is dangerous because it can cause the compiler and CLI tool to throw an error if the argument is not derivable.
496
+ *
497
+ * @example
498
+ * ```jsx
499
+ * function getSubject() {
500
+ * return (Math.random() > 0.5) ? "Alice" : "Brian";
501
+ * }
502
+ * ...
503
+ * gt(`My name is ${declareStatic(getSubject())}`);
504
+ * ```
505
+ *
506
+ * @param {T extends string | boolean | number | null | undefined} content - Content to mark as derivable.
507
+ * @returns content
508
+ */
509
+ const declareStatic = derive;
510
+ //#endregion
511
+ //#region src/derive/indexVars.ts
512
+ /**
513
+ * Given an ICU string adds identifiers to each _gt_ placeholder
514
+ * indexVars('Hello {_gt_} {_gt_} World') => 'Hello {_gt_1_} {_gt_2_} World'
515
+ */
516
+ function indexVars(icuString) {
517
+ if (!icuString.includes("_gt_")) return icuString;
518
+ const variableLocations = [];
519
+ function visitor(child) {
520
+ variableLocations.push({
521
+ start: child.location?.start.offset ?? 0,
522
+ end: child.location?.end.offset ?? 0,
523
+ otherStart: child.options.other.location?.start.offset ?? 0,
524
+ otherEnd: child.options.other.location?.end.offset ?? 0
525
+ });
526
+ }
527
+ traverseIcu({
528
+ icuString,
529
+ shouldVisit: isGTUnindexedSelectElement,
530
+ visitor,
531
+ options: {
532
+ recurseIntoVisited: false,
533
+ captureLocation: true
534
+ }
535
+ });
536
+ const result = [];
537
+ let current = 0;
538
+ for (let i = 0; i < variableLocations.length; i++) {
539
+ const { start, end, otherStart, otherEnd } = variableLocations[i];
540
+ result.push(icuString.slice(current, start));
541
+ result.push(icuString.slice(start, start + 4 + 1));
542
+ result.push(String(i + 1));
543
+ result.push(icuString.slice(start + 4 + 1, otherStart));
544
+ result.push("{}");
545
+ result.push(icuString.slice(otherEnd, end));
546
+ current = end;
547
+ }
548
+ result.push(icuString.slice(current, icuString.length));
549
+ return result.join("");
550
+ }
551
+ //#endregion
552
+ //#region src/derive/extractVars.ts
553
+ /**
554
+ * Given an unindexed ICU string, extracts all the _gt_ variables and an indexed mapping of the variable to the values
555
+ *
556
+ * extractVars('Hello {_gt_, select, other {World}}') => { _gt_1: 'World' }
557
+ *
558
+ * @param {string} icuString - The ICU string to extract variables from.
559
+ * @returns {Record<string, string>} A mapping of the variable to the value.
560
+ */
561
+ function extractVars(icuString) {
562
+ if (!icuString.includes("_gt_")) return {};
563
+ let index = 1;
564
+ const variables = {};
565
+ function visitor(child) {
566
+ variables[child.value + index] = child.options.other.value.length ? child.options.other.value[0]?.value : "";
567
+ index += 1;
568
+ }
569
+ traverseIcu({
570
+ icuString,
571
+ shouldVisit: isGTUnindexedSelectElement,
572
+ visitor,
573
+ options: { recurseIntoVisited: false }
574
+ });
575
+ return variables;
576
+ }
577
+ //#endregion
578
+ //#region src/derive/condenseVars.ts
579
+ /**
580
+ * Given an indexed ICU string, condenses any select to an argument
581
+ * indexVars('Hello {_gt_1, select, other {World}}') => 'Hello {_gt_1}'
582
+ * @param {string} icuString - The ICU string to condense.
583
+ * @returns {string} The condensed ICU string.
584
+ */
585
+ function condenseVars(icuString) {
586
+ if (!icuString.includes("_gt_")) return icuString;
587
+ function visitor(child) {
588
+ child.type = _formatjs_icu_messageformat_parser_types_js.TYPE.argument;
589
+ delete child.options;
590
+ }
591
+ return (0, _formatjs_icu_messageformat_parser_printer_js.printAST)(traverseIcu({
592
+ icuString,
593
+ shouldVisit: isGTIndexedSelectElement,
594
+ visitor,
595
+ options: { recurseIntoVisited: false }
596
+ }));
597
+ }
598
+ //#endregion
599
+ //#region src/backwards-compatability/typeChecking.ts
600
+ /**
601
+ * Checks if a JSX child is an old variable object format
602
+ * @param child - The JSX child to check
603
+ * @returns True if the child is an old variable object (has 'key' property)
604
+ */
605
+ function isOldVariableObject(child) {
606
+ return typeof child === "object" && child != null && "key" in child;
607
+ }
608
+ /**
609
+ * Checks if a JSX child is a new variable object format
610
+ * @param child - The JSX child to check
611
+ * @returns True if the child is a new variable object (has 'k' property)
612
+ */
613
+ function isNewVariableObject(child) {
614
+ return typeof child === "object" && child != null && "k" in child;
615
+ }
616
+ /**
617
+ * Checks if a JSX child is an old JSX element format
618
+ * @param child - The JSX child to check
619
+ * @returns True if the child is an old JSX element (has 'type' and 'props' properties)
620
+ */
621
+ function isOldJsxElement(child) {
622
+ return typeof child === "object" && child != null && "type" in child && "props" in child;
623
+ }
624
+ /**
625
+ * Checks if a JSX child follows the old format (string, old variable object, or old JSX element)
626
+ * @param child - The JSX child to check
627
+ * @returns True if the child is in the old format
628
+ */
629
+ function isOldJsxChild(child) {
630
+ if (typeof child === "string") return true;
631
+ if (isOldVariableObject(child)) return true;
632
+ return isOldJsxElement(child);
633
+ }
634
+ /**
635
+ * Checks if JSX children follow the old format
636
+ * @param children - The JSX children to check (can be string, array, or single child)
637
+ * @returns True if all children are in the old format
638
+ */
639
+ function isOldJsxChildren(children) {
640
+ if (typeof children === "string") return true;
641
+ if (Array.isArray(children)) return !children.some((child) => !isOldJsxChild(child));
642
+ return isOldJsxChild(children);
643
+ }
644
+ //#endregion
645
+ //#region src/backwards-compatability/dataConversion.ts
646
+ /**
647
+ * Convert request data from old format to new format
648
+ */
649
+ function getNewJsxChild(child) {
650
+ if (typeof child === "string") return child;
651
+ if (isOldVariableObject(child)) return getNewVariableObject(child);
652
+ return getNewJsxElement(child);
653
+ }
654
+ function getNewJsxChildren(children) {
655
+ if (typeof children === "string") return children;
656
+ if (Array.isArray(children)) return children.map(getNewJsxChild);
657
+ return getNewJsxChild(children);
658
+ }
659
+ function getNewJsxElement(element) {
660
+ if (typeof element === "string") return element;
661
+ let t = void 0;
662
+ if (element.type != null) t = element.type;
663
+ let c = void 0;
664
+ if (element.props?.children != null) c = getNewJsxChildren(element.props.children);
665
+ return {
666
+ ...t && { t },
667
+ ...c && { c },
668
+ d: getNewGTProp(element.props["data-_gt"]),
669
+ i: element.props["data-_gt"].id
670
+ };
671
+ }
672
+ function getNewBranchType(branch) {
673
+ if (branch === "branch") return "b";
674
+ return "p";
675
+ }
676
+ function getNewVariableType(variable) {
677
+ switch (variable) {
678
+ case "number": return "n";
679
+ case "variable": return "v";
680
+ case "datetime": return "d";
681
+ case "currency": return "c";
682
+ default: return "v";
683
+ }
684
+ }
685
+ function getNewVariableObject(variable) {
686
+ let v = void 0;
687
+ if (variable.variable != null) v = getNewVariableType(variable.variable);
688
+ let i = void 0;
689
+ if (variable.id != null) i = variable.id;
690
+ return {
691
+ k: variable.key,
692
+ ...v && { v },
693
+ ...i && { i }
694
+ };
695
+ }
696
+ function getNewGTProp(dataGT) {
697
+ let b = void 0;
698
+ if (dataGT.branches) b = Object.fromEntries(Object.entries(dataGT.branches).map(([key, value]) => [key, getNewJsxChildren(value)]));
699
+ let t;
700
+ if (dataGT.transformation) t = getNewBranchType(dataGT.transformation);
701
+ return {
702
+ ...b && { b },
703
+ ...t && { t }
704
+ };
705
+ }
706
+ /**
707
+ * Convert response data from old format to new format
708
+ */
709
+ function getOldJsxChild(child) {
710
+ if (typeof child === "string") return child;
711
+ if (isNewVariableObject(child)) return getOldVariableObject(child);
712
+ return getOldJsxElement(child);
713
+ }
714
+ function getOldJsxChildren(children) {
715
+ if (isOldJsxChildren(children)) return children;
716
+ if (typeof children === "string") return children;
717
+ if (Array.isArray(children)) return children.map(getOldJsxChild);
718
+ return getOldJsxChild(children);
719
+ }
720
+ function getOldJsxElement(element) {
721
+ const type = element.t;
722
+ let children = void 0;
723
+ if (element.c != null) children = getOldJsxChildren(element.c);
724
+ const dataGT = getOldGTProp(element.d || {}, element.i);
725
+ return {
726
+ type,
727
+ props: {
728
+ children,
729
+ "data-_gt": dataGT
730
+ }
731
+ };
732
+ }
733
+ function getOldBranchType(branch) {
734
+ if (branch === "b") return "branch";
735
+ return "plural";
736
+ }
737
+ function getOldVariableType(variable) {
738
+ switch (variable) {
739
+ case "n": return "number";
740
+ case "v": return "variable";
741
+ case "d": return "datetime";
742
+ case "c": return "currency";
743
+ default: return "variable";
744
+ }
745
+ }
746
+ function getOldVariableObject(variable) {
747
+ let v = void 0;
748
+ if (variable.v != null) v = getOldVariableType(variable.v);
749
+ let i = void 0;
750
+ if (variable.i != null) i = variable.i;
751
+ return {
752
+ key: variable.k,
753
+ ...v && { variable: v },
754
+ ...i && { id: i }
755
+ };
756
+ }
757
+ function getOldGTProp(dataGT, i) {
758
+ let transformation = void 0;
759
+ if (dataGT.t != null) transformation = getOldBranchType(dataGT.t);
760
+ let branches = void 0;
761
+ if (dataGT.b != null) branches = Object.fromEntries(Object.entries(dataGT.b).map(([key, value]) => [key, getOldJsxChildren(value)]));
762
+ return {
763
+ id: i,
764
+ ...transformation && { transformation },
765
+ ...branches && { branches }
766
+ };
767
+ }
768
+ //#endregion
769
+ //#region src/backwards-compatability/oldHashJsxChildren.ts
770
+ /**
771
+ * Calculates a unique hash for a given string using sha256.
772
+ *
773
+ * @param {string} string - The string to be hashed.
774
+ * @returns {string} - The resulting hash as a hexadecimal string.
775
+ */
776
+ function oldHashString(string) {
777
+ return require_sha2.bytesToHex(require_sha2.sha256(require_sha2.utf8ToBytes(string)));
778
+ }
779
+ /**
780
+ * Calculates a unique ID for the given children objects by hashing their sanitized JSON string representation.
781
+ *
782
+ * @param {any} childrenAsObjects - The children objects to be hashed.
783
+ * @param {string} context - The context for the children
784
+ * @param {string} id - The id for the JSX Children object
785
+ * @param {function} hashFunction custom hash function
786
+ * @returns {string} - The unique has of the children.
787
+ */
788
+ function oldHashJsxChildren({ source, context, id, dataFormat }, hashFunction = oldHashString) {
789
+ return hashFunction(require_sha2.stableStringify({
790
+ source: sanitizeJsxChildren(source),
791
+ ...id && { id },
792
+ ...context && { context },
793
+ ...dataFormat && { dataFormat }
794
+ }));
795
+ }
796
+ const sanitizeChild = (child) => {
797
+ if (child && typeof child === "object") {
798
+ if ("props" in child) {
799
+ const newChild = {};
800
+ const dataGt = child?.props?.["data-_gt"];
801
+ if (dataGt?.branches) newChild.branches = Object.fromEntries(Object.entries(dataGt.branches).map(([key, value]) => [key, sanitizeJsxChildren(value)]));
802
+ if (child?.props?.children) newChild.children = sanitizeJsxChildren(child.props.children);
803
+ if (child?.props?.["data-_gt"]?.transformation) newChild.transformation = child.props["data-_gt"].transformation;
804
+ return newChild;
805
+ }
806
+ if ("key" in child) return {
807
+ key: child.key,
808
+ ...child.variable && { variable: child.variable }
809
+ };
810
+ }
811
+ return child;
812
+ };
813
+ function sanitizeJsxChildren(childrenAsObjects) {
814
+ return Array.isArray(childrenAsObjects) ? childrenAsObjects.map(sanitizeChild) : sanitizeChild(childrenAsObjects);
815
+ }
816
+ //#endregion
817
+ Object.defineProperty(exports, "VAR_IDENTIFIER", {
818
+ enumerable: true,
819
+ get: function() {
820
+ return VAR_IDENTIFIER;
821
+ }
822
+ });
823
+ Object.defineProperty(exports, "VAR_NAME_IDENTIFIER", {
824
+ enumerable: true,
825
+ get: function() {
826
+ return VAR_NAME_IDENTIFIER;
827
+ }
828
+ });
829
+ Object.defineProperty(exports, "_getPluralForm", {
830
+ enumerable: true,
831
+ get: function() {
832
+ return _getPluralForm;
833
+ }
834
+ });
835
+ Object.defineProperty(exports, "condenseVars", {
836
+ enumerable: true,
837
+ get: function() {
838
+ return condenseVars;
839
+ }
840
+ });
841
+ Object.defineProperty(exports, "declareStatic", {
842
+ enumerable: true,
843
+ get: function() {
844
+ return declareStatic;
845
+ }
846
+ });
847
+ Object.defineProperty(exports, "declareVar", {
848
+ enumerable: true,
849
+ get: function() {
850
+ return declareVar;
851
+ }
852
+ });
853
+ Object.defineProperty(exports, "decode", {
854
+ enumerable: true,
855
+ get: function() {
856
+ return decode;
857
+ }
858
+ });
859
+ Object.defineProperty(exports, "decodeVars", {
860
+ enumerable: true,
861
+ get: function() {
862
+ return decodeVars;
863
+ }
864
+ });
865
+ Object.defineProperty(exports, "defaultBaseUrl", {
866
+ enumerable: true,
867
+ get: function() {
868
+ return defaultBaseUrl;
869
+ }
870
+ });
871
+ Object.defineProperty(exports, "defaultCacheUrl", {
872
+ enumerable: true,
873
+ get: function() {
874
+ return defaultCacheUrl;
875
+ }
876
+ });
877
+ Object.defineProperty(exports, "defaultRuntimeApiUrl", {
878
+ enumerable: true,
879
+ get: function() {
880
+ return defaultRuntimeApiUrl;
881
+ }
882
+ });
883
+ Object.defineProperty(exports, "defaultTimeout", {
884
+ enumerable: true,
885
+ get: function() {
886
+ return defaultTimeout;
887
+ }
888
+ });
889
+ Object.defineProperty(exports, "derive", {
890
+ enumerable: true,
891
+ get: function() {
892
+ return derive;
893
+ }
894
+ });
895
+ Object.defineProperty(exports, "encode", {
896
+ enumerable: true,
897
+ get: function() {
898
+ return encode;
899
+ }
900
+ });
901
+ Object.defineProperty(exports, "extractVars", {
902
+ enumerable: true,
903
+ get: function() {
904
+ return extractVars;
905
+ }
906
+ });
907
+ Object.defineProperty(exports, "getNewBranchType", {
908
+ enumerable: true,
909
+ get: function() {
910
+ return getNewBranchType;
911
+ }
912
+ });
913
+ Object.defineProperty(exports, "getNewGTProp", {
914
+ enumerable: true,
915
+ get: function() {
916
+ return getNewGTProp;
917
+ }
918
+ });
919
+ Object.defineProperty(exports, "getNewJsxChild", {
920
+ enumerable: true,
921
+ get: function() {
922
+ return getNewJsxChild;
923
+ }
924
+ });
925
+ Object.defineProperty(exports, "getNewJsxChildren", {
926
+ enumerable: true,
927
+ get: function() {
928
+ return getNewJsxChildren;
929
+ }
930
+ });
931
+ Object.defineProperty(exports, "getNewJsxElement", {
932
+ enumerable: true,
933
+ get: function() {
934
+ return getNewJsxElement;
935
+ }
936
+ });
937
+ Object.defineProperty(exports, "getNewVariableObject", {
938
+ enumerable: true,
939
+ get: function() {
940
+ return getNewVariableObject;
941
+ }
942
+ });
943
+ Object.defineProperty(exports, "getNewVariableType", {
944
+ enumerable: true,
945
+ get: function() {
946
+ return getNewVariableType;
947
+ }
948
+ });
949
+ Object.defineProperty(exports, "getOldBranchType", {
950
+ enumerable: true,
951
+ get: function() {
952
+ return getOldBranchType;
953
+ }
954
+ });
955
+ Object.defineProperty(exports, "getOldGTProp", {
956
+ enumerable: true,
957
+ get: function() {
958
+ return getOldGTProp;
959
+ }
960
+ });
961
+ Object.defineProperty(exports, "getOldJsxChild", {
962
+ enumerable: true,
963
+ get: function() {
964
+ return getOldJsxChild;
965
+ }
966
+ });
967
+ Object.defineProperty(exports, "getOldJsxChildren", {
968
+ enumerable: true,
969
+ get: function() {
970
+ return getOldJsxChildren;
971
+ }
972
+ });
973
+ Object.defineProperty(exports, "getOldJsxElement", {
974
+ enumerable: true,
975
+ get: function() {
976
+ return getOldJsxElement;
977
+ }
978
+ });
979
+ Object.defineProperty(exports, "getOldVariableObject", {
980
+ enumerable: true,
981
+ get: function() {
982
+ return getOldVariableObject;
983
+ }
984
+ });
985
+ Object.defineProperty(exports, "getOldVariableType", {
986
+ enumerable: true,
987
+ get: function() {
988
+ return getOldVariableType;
989
+ }
990
+ });
991
+ Object.defineProperty(exports, "indexVars", {
992
+ enumerable: true,
993
+ get: function() {
994
+ return indexVars;
995
+ }
996
+ });
997
+ Object.defineProperty(exports, "intlCache", {
998
+ enumerable: true,
999
+ get: function() {
1000
+ return intlCache;
1001
+ }
1002
+ });
1003
+ Object.defineProperty(exports, "isAcceptedPluralForm", {
1004
+ enumerable: true,
1005
+ get: function() {
1006
+ return isAcceptedPluralForm;
1007
+ }
1008
+ });
1009
+ Object.defineProperty(exports, "isNewVariableObject", {
1010
+ enumerable: true,
1011
+ get: function() {
1012
+ return isNewVariableObject;
1013
+ }
1014
+ });
1015
+ Object.defineProperty(exports, "isOldJsxChildren", {
1016
+ enumerable: true,
1017
+ get: function() {
1018
+ return isOldJsxChildren;
1019
+ }
1020
+ });
1021
+ Object.defineProperty(exports, "isOldVariableObject", {
1022
+ enumerable: true,
1023
+ get: function() {
1024
+ return isOldVariableObject;
1025
+ }
1026
+ });
1027
+ Object.defineProperty(exports, "isSupportedFileFormatTransform", {
1028
+ enumerable: true,
1029
+ get: function() {
1030
+ return isSupportedFileFormatTransform;
1031
+ }
1032
+ });
1033
+ Object.defineProperty(exports, "libraryDefaultLocale", {
1034
+ enumerable: true,
1035
+ get: function() {
1036
+ return libraryDefaultLocale;
1037
+ }
1038
+ });
1039
+ Object.defineProperty(exports, "minifyVariableType", {
1040
+ enumerable: true,
1041
+ get: function() {
1042
+ return minifyVariableType;
1043
+ }
1044
+ });
1045
+ Object.defineProperty(exports, "oldHashJsxChildren", {
1046
+ enumerable: true,
1047
+ get: function() {
1048
+ return oldHashJsxChildren;
1049
+ }
1050
+ });
1051
+ Object.defineProperty(exports, "oldHashString", {
1052
+ enumerable: true,
1053
+ get: function() {
1054
+ return oldHashString;
1055
+ }
1056
+ });
1057
+ Object.defineProperty(exports, "pluralForms", {
1058
+ enumerable: true,
1059
+ get: function() {
1060
+ return pluralForms;
1061
+ }
1062
+ });
1063
+ Object.defineProperty(exports, "validateFileFormatTransforms", {
1064
+ enumerable: true,
1065
+ get: function() {
1066
+ return validateFileFormatTransforms;
1067
+ }
1068
+ });
1069
+
1070
+ //# sourceMappingURL=internal-DIHQF9gs.cjs.map