@payloadcms/db-postgres 0.8.7 → 0.8.9

Sign up to get free protection for your applications and to get access to all the features.
Files changed (58) hide show
  1. package/dist/connect.d.ts.map +1 -1
  2. package/dist/connect.js +5 -52
  3. package/dist/count.d.ts.map +1 -1
  4. package/dist/count.js +3 -3
  5. package/dist/createMigration.d.ts.map +1 -1
  6. package/dist/createMigration.js +13 -4
  7. package/dist/find/findMany.d.ts.map +1 -1
  8. package/dist/find/findMany.js +3 -3
  9. package/dist/init.js +3 -2
  10. package/dist/migrate.js +3 -3
  11. package/dist/migrateDown.js +2 -2
  12. package/dist/migrateRefresh.js +2 -2
  13. package/dist/migrateReset.js +3 -3
  14. package/dist/migrateStatus.js +2 -2
  15. package/dist/queries/parseParams.d.ts.map +1 -1
  16. package/dist/queries/parseParams.js +3 -1
  17. package/dist/queries/sanitizeQueryValue.d.ts +2 -1
  18. package/dist/queries/sanitizeQueryValue.d.ts.map +1 -1
  19. package/dist/queries/sanitizeQueryValue.js +11 -2
  20. package/dist/schema/build.d.ts +10 -2
  21. package/dist/schema/build.d.ts.map +1 -1
  22. package/dist/schema/build.js +23 -6
  23. package/dist/schema/traverseFields.d.ts +6 -1
  24. package/dist/schema/traverseFields.d.ts.map +1 -1
  25. package/dist/schema/traverseFields.js +46 -17
  26. package/dist/transform/read/hasManyNumber.d.ts +2 -1
  27. package/dist/transform/read/hasManyNumber.d.ts.map +1 -1
  28. package/dist/transform/read/hasManyNumber.js +14 -4
  29. package/dist/transform/read/hasManyText.d.ts +2 -1
  30. package/dist/transform/read/hasManyText.d.ts.map +1 -1
  31. package/dist/transform/read/hasManyText.js +14 -4
  32. package/dist/transform/read/relationship.d.ts +2 -1
  33. package/dist/transform/read/relationship.d.ts.map +1 -1
  34. package/dist/transform/read/relationship.js +16 -7
  35. package/dist/transform/read/traverseFields.d.ts +5 -1
  36. package/dist/transform/read/traverseFields.d.ts.map +1 -1
  37. package/dist/transform/read/traverseFields.js +118 -85
  38. package/dist/transform/write/array.d.ts +6 -1
  39. package/dist/transform/write/array.d.ts.map +1 -1
  40. package/dist/transform/write/array.js +7 -3
  41. package/dist/transform/write/blocks.d.ts +6 -1
  42. package/dist/transform/write/blocks.d.ts.map +1 -1
  43. package/dist/transform/write/blocks.js +5 -3
  44. package/dist/transform/write/traverseFields.d.ts +6 -1
  45. package/dist/transform/write/traverseFields.d.ts.map +1 -1
  46. package/dist/transform/write/traverseFields.js +40 -15
  47. package/dist/types.d.ts +9 -5
  48. package/dist/types.d.ts.map +1 -1
  49. package/dist/utilities/migrationTableExists.d.ts +2 -2
  50. package/dist/utilities/migrationTableExists.d.ts.map +1 -1
  51. package/dist/utilities/migrationTableExists.js +10 -6
  52. package/dist/utilities/pushDevSchema.d.ts +9 -0
  53. package/dist/utilities/pushDevSchema.d.ts.map +1 -0
  54. package/dist/utilities/pushDevSchema.js +59 -0
  55. package/dist/utilities/requireDrizzleKit.d.ts +14 -0
  56. package/dist/utilities/requireDrizzleKit.d.ts.map +1 -0
  57. package/dist/utilities/requireDrizzleKit.js +13 -0
  58. package/package.json +5 -5
@@ -8,20 +8,25 @@ Object.defineProperty(exports, "transformRelationship", {
8
8
  return transformRelationship;
9
9
  }
10
10
  });
11
- const transformRelationship = ({ field, locale, ref, relations })=>{
11
+ const transformRelationship = ({ field, locale, ref, relations, withinArrayOrBlockLocale })=>{
12
12
  let result;
13
13
  if (!('hasMany' in field) || field.hasMany === false) {
14
- const relation = relations[0];
14
+ let relation = relations[0];
15
+ if (withinArrayOrBlockLocale) {
16
+ relation = relations.find((rel)=>rel.locale === withinArrayOrBlockLocale);
17
+ }
15
18
  if (relation) {
16
19
  // Handle hasOne Poly
17
20
  if (Array.isArray(field.relationTo)) {
18
- const matchedRelation = Object.entries(relation).find(([key, val])=>val !== null && ![
21
+ const matchedRelation = Object.entries(relation).find(([key, val])=>{
22
+ return val !== null && ![
19
23
  'id',
20
24
  'locale',
21
25
  'order',
22
26
  'parent',
23
27
  'path'
24
- ].includes(key));
28
+ ].includes(key);
29
+ });
25
30
  if (matchedRelation) {
26
31
  const relationTo = matchedRelation[0].replace('ID', '');
27
32
  result = {
@@ -38,10 +43,14 @@ const transformRelationship = ({ field, locale, ref, relations })=>{
38
43
  } else {
39
44
  const transformedRelations = [];
40
45
  relations.forEach((relation)=>{
46
+ let matchedLocale = true;
47
+ if (withinArrayOrBlockLocale) {
48
+ matchedLocale = relation.locale === withinArrayOrBlockLocale;
49
+ }
41
50
  // Handle hasMany
42
51
  if (!Array.isArray(field.relationTo)) {
43
52
  const relatedData = relation[`${field.relationTo}ID`];
44
- if (relatedData) {
53
+ if (relatedData && matchedLocale) {
45
54
  transformedRelations.push(relatedData);
46
55
  }
47
56
  } else {
@@ -52,7 +61,7 @@ const transformRelationship = ({ field, locale, ref, relations })=>{
52
61
  'order',
53
62
  'parent',
54
63
  'path'
55
- ].includes(key));
64
+ ].includes(key) && matchedLocale);
56
65
  if (matchedRelation) {
57
66
  const relationTo = matchedRelation[0].replace('ID', '');
58
67
  transformedRelations.push({
@@ -71,4 +80,4 @@ const transformRelationship = ({ field, locale, ref, relations })=>{
71
80
  }
72
81
  };
73
82
 
74
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy90cmFuc2Zvcm0vcmVhZC9yZWxhdGlvbnNoaXAudHMiXSwic291cmNlc0NvbnRlbnQiOlsiLyogZXNsaW50LWRpc2FibGUgbm8tcGFyYW0tcmVhc3NpZ24gKi9cbmltcG9ydCB0eXBlIHsgUmVsYXRpb25zaGlwRmllbGQsIFVwbG9hZEZpZWxkIH0gZnJvbSAncGF5bG9hZC90eXBlcydcblxudHlwZSBBcmdzID0ge1xuICBmaWVsZDogUmVsYXRpb25zaGlwRmllbGQgfCBVcGxvYWRGaWVsZFxuICBsb2NhbGU/OiBzdHJpbmdcbiAgcmVmOiBSZWNvcmQ8c3RyaW5nLCB1bmtub3duPlxuICByZWxhdGlvbnM6IFJlY29yZDxzdHJpbmcsIHVua25vd24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NNLE9BQU8sQ0FBQyxNQUFNO29CQUVwREcscUJBQXFCRyxJQUFJLENBQUM7d0JBQ3hCYjt3QkFDQVEsT0FBT1AsZUFBZSxDQUFDLEVBQUU7b0JBQzNCO2dCQUNGO1lBQ0Y7UUFDRjtRQUVBUixTQUFTaUI7SUFDWDtJQUVBLElBQUlyQixRQUFRO1FBQ1ZDLEdBQUcsQ0FBQ0YsTUFBTTBCLElBQUksQ0FBQyxDQUFDekIsT0FBTyxHQUFHSTtJQUM1QixPQUFPO1FBQ0xILEdBQUcsQ0FBQ0YsTUFBTTBCLElBQUksQ0FBQyxHQUFHckI7SUFDcEI7QUFDRiJ9
@@ -46,7 +46,11 @@ type TraverseFieldsArgs = {
46
46
  * All hasMany text fields, as returned by Drizzle, keyed on an object by field path
47
47
  */
48
48
  texts: Record<string, Record<string, unknown>[]>;
49
+ /**
50
+ * Set to a locale if this group of fields is within a localized array or block.
51
+ */
52
+ withinArrayOrBlockLocale?: string;
49
53
  };
50
- export declare const traverseFields: <T extends Record<string, unknown>>({ blocks, config, dataRef, deletions, fieldPrefix, fields, numbers, path, relationships, table, texts, }: TraverseFieldsArgs) => T;
54
+ export declare const traverseFields: <T extends Record<string, unknown>>({ blocks, config, dataRef, deletions, fieldPrefix, fields, numbers, path, relationships, table, texts, withinArrayOrBlockLocale, }: TraverseFieldsArgs) => T;
51
55
  export {};
52
56
  //# sourceMappingURL=traverseFields.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"traverseFields.d.ts","sourceRoot":"","sources":["../../../src/transform/read/traverseFields.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAA;AACrD,OAAO,KAAK,EAAE,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AAItD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAA;AAMhE,KAAK,kBAAkB,GAAG;IACxB;;OAEG;IACH,MAAM,EAAE,SAAS,CAAA;IACjB;;OAEG;IACH,MAAM,EAAE,eAAe,CAAA;IACvB;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IAChC;;OAEG;IACH,SAAS,EAAE,CAAC,MAAM,IAAI,CAAC,EAAE,CAAA;IACzB;;OAEG;IACH,WAAW,EAAE,MAAM,CAAA;IACnB;;OAEG;IACH,MAAM,EAAE,CAAC,KAAK,GAAG,UAAU,CAAC,EAAE,CAAA;IAC9B;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,CAAC,CAAA;IAClD;;OAEG;IACH,IAAI,EAAE,MAAM,CAAA;IACZ;;OAEG;IACH,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,CAAC,CAAA;IACxD;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IAC9B;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,CAAC,CAAA;CACjD,CAAA;AAID,eAAO,MAAM,cAAc,gJAYxB,kBAAkB,MAsdpB,CAAA"}
1
+ {"version":3,"file":"traverseFields.d.ts","sourceRoot":"","sources":["../../../src/transform/read/traverseFields.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAA;AACrD,OAAO,KAAK,EAAE,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AAItD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAA;AAMhE,KAAK,kBAAkB,GAAG;IACxB;;OAEG;IACH,MAAM,EAAE,SAAS,CAAA;IACjB;;OAEG;IACH,MAAM,EAAE,eAAe,CAAA;IACvB;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IAChC;;OAEG;IACH,SAAS,EAAE,CAAC,MAAM,IAAI,CAAC,EAAE,CAAA;IACzB;;OAEG;IACH,WAAW,EAAE,MAAM,CAAA;IACnB;;OAEG;IACH,MAAM,EAAE,CAAC,KAAK,GAAG,UAAU,CAAC,EAAE,CAAA;IAC9B;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,CAAC,CAAA;IAClD;;OAEG;IACH,IAAI,EAAE,MAAM,CAAA;IACZ;;OAEG;IACH,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,CAAC,CAAA;IACxD;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IAC9B;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,CAAC,CAAA;IAChD;;OAEG;IACH,wBAAwB,CAAC,EAAE,MAAM,CAAA;CAClC,CAAA;AAID,eAAO,MAAM,cAAc,0KAaxB,kBAAkB,MAygBpB,CAAA"}
@@ -12,7 +12,7 @@ const _types = require("payload/types");
12
12
  const _hasManyNumber = require("./hasManyNumber");
13
13
  const _hasManyText = require("./hasManyText");
14
14
  const _relationship = require("./relationship");
15
- const traverseFields = ({ blocks, config, dataRef, deletions, fieldPrefix, fields, numbers, path, relationships, table, texts })=>{
15
+ const traverseFields = ({ blocks, config, dataRef, deletions, fieldPrefix, fields, numbers, path, relationships, table, texts, withinArrayOrBlockLocale })=>{
16
16
  const sanitizedPath = path ? `${path}.` : path;
17
17
  const formatted = fields.reduce((result, field)=>{
18
18
  if (field.type === 'tabs') {
@@ -30,7 +30,8 @@ const traverseFields = ({ blocks, config, dataRef, deletions, fieldPrefix, field
30
30
  path,
31
31
  relationships,
32
32
  table,
33
- texts
33
+ texts,
34
+ withinArrayOrBlockLocale
34
35
  });
35
36
  }
36
37
  if (field.type === 'collapsible' || field.type === 'row' || field.type === 'tab' && !('name' in field)) {
@@ -45,7 +46,8 @@ const traverseFields = ({ blocks, config, dataRef, deletions, fieldPrefix, field
45
46
  path,
46
47
  relationships,
47
48
  table,
48
- texts
49
+ texts,
50
+ withinArrayOrBlockLocale
49
51
  });
50
52
  }
51
53
  if ((0, _types.fieldAffectsData)(field)) {
@@ -78,7 +80,8 @@ const traverseFields = ({ blocks, config, dataRef, deletions, fieldPrefix, field
78
80
  path: `${sanitizedPath}${field.name}.${row._order - 1}`,
79
81
  relationships,
80
82
  table: row,
81
- texts
83
+ texts,
84
+ withinArrayOrBlockLocale: locale
82
85
  });
83
86
  if ('_order' in rowResult) {
84
87
  delete rowResult._order;
@@ -88,7 +91,7 @@ const traverseFields = ({ blocks, config, dataRef, deletions, fieldPrefix, field
88
91
  return arrayResult;
89
92
  }, {});
90
93
  } else {
91
- result[field.name] = fieldData.map((row, i)=>{
94
+ result[field.name] = fieldData.reduce((acc, row, i)=>{
92
95
  if (row._uuid) {
93
96
  row.id = row._uuid;
94
97
  delete row._uuid;
@@ -96,30 +99,38 @@ const traverseFields = ({ blocks, config, dataRef, deletions, fieldPrefix, field
96
99
  if ('_order' in row) {
97
100
  delete row._order;
98
101
  }
99
- return traverseFields({
100
- blocks,
101
- config,
102
- dataRef: row,
103
- deletions,
104
- fieldPrefix: '',
105
- fields: field.fields,
106
- numbers,
107
- path: `${sanitizedPath}${field.name}.${i}`,
108
- relationships,
109
- table: row,
110
- texts
111
- });
112
- });
102
+ if (!withinArrayOrBlockLocale || withinArrayOrBlockLocale && withinArrayOrBlockLocale === row._locale) {
103
+ if (row._locale) {
104
+ delete row._locale;
105
+ }
106
+ acc.push(traverseFields({
107
+ blocks,
108
+ config,
109
+ dataRef: row,
110
+ deletions,
111
+ fieldPrefix: '',
112
+ fields: field.fields,
113
+ numbers,
114
+ path: `${sanitizedPath}${field.name}.${i}`,
115
+ relationships,
116
+ table: row,
117
+ texts,
118
+ withinArrayOrBlockLocale
119
+ }));
120
+ }
121
+ return acc;
122
+ }, []);
113
123
  }
114
124
  }
115
125
  return result;
116
126
  }
117
127
  if (field.type === 'blocks') {
118
128
  const blockFieldPath = `${sanitizedPath}${field.name}`;
119
- if (Array.isArray(blocks[blockFieldPath])) {
129
+ const blocksByPath = blocks[blockFieldPath];
130
+ if (Array.isArray(blocksByPath)) {
120
131
  if (field.localized) {
121
132
  result[field.name] = {};
122
- blocks[blockFieldPath].forEach((row)=>{
133
+ blocksByPath.forEach((row)=>{
123
134
  if (row._uuid) {
124
135
  row.id = row._uuid;
125
136
  delete row._uuid;
@@ -145,7 +156,8 @@ const traverseFields = ({ blocks, config, dataRef, deletions, fieldPrefix, field
145
156
  path: `${blockFieldPath}.${row._order - 1}`,
146
157
  relationships,
147
158
  table: row,
148
- texts
159
+ texts,
160
+ withinArrayOrBlockLocale: locale
149
161
  });
150
162
  delete blockResult._order;
151
163
  return blockResult;
@@ -154,7 +166,21 @@ const traverseFields = ({ blocks, config, dataRef, deletions, fieldPrefix, field
154
166
  });
155
167
  });
156
168
  } else {
157
- result[field.name] = blocks[blockFieldPath].map((row, i)=>{
169
+ // Add locale-specific index to have a proper blockFieldPath for current locale
170
+ // because blocks can be in the same array for different locales!
171
+ if (withinArrayOrBlockLocale && config.localization) {
172
+ for (const locale of config.localization.localeCodes){
173
+ let localeIndex = 0;
174
+ for(let i = 0; i < blocksByPath.length; i++){
175
+ const row = blocksByPath[i];
176
+ if (row._locale === locale) {
177
+ row._index = localeIndex;
178
+ localeIndex++;
179
+ }
180
+ }
181
+ }
182
+ }
183
+ result[field.name] = blocksByPath.reduce((acc, row, i)=>{
158
184
  delete row._order;
159
185
  if (row._uuid) {
160
186
  row.id = row._uuid;
@@ -162,22 +188,35 @@ const traverseFields = ({ blocks, config, dataRef, deletions, fieldPrefix, field
162
188
  }
163
189
  const block = field.blocks.find(({ slug })=>slug === row.blockType);
164
190
  if (block) {
165
- return traverseFields({
166
- blocks,
167
- config,
168
- dataRef: row,
169
- deletions,
170
- fieldPrefix: '',
171
- fields: block.fields,
172
- numbers,
173
- path: `${blockFieldPath}.${i}`,
174
- relationships,
175
- table: row,
176
- texts
177
- });
191
+ if (!withinArrayOrBlockLocale || withinArrayOrBlockLocale && withinArrayOrBlockLocale === row._locale) {
192
+ if (row._locale) {
193
+ delete row._locale;
194
+ }
195
+ if (typeof row._index === 'number') {
196
+ i = row._index;
197
+ delete row._index;
198
+ }
199
+ acc.push(traverseFields({
200
+ blocks,
201
+ config,
202
+ dataRef: row,
203
+ deletions,
204
+ fieldPrefix: '',
205
+ fields: block.fields,
206
+ numbers,
207
+ path: `${blockFieldPath}.${i}`,
208
+ relationships,
209
+ table: row,
210
+ texts,
211
+ withinArrayOrBlockLocale
212
+ }));
213
+ return acc;
214
+ }
215
+ } else {
216
+ acc.push({});
178
217
  }
179
- return {};
180
- });
218
+ return acc;
219
+ }, []);
181
220
  }
182
221
  }
183
222
  return result;
@@ -217,7 +256,8 @@ const traverseFields = ({ blocks, config, dataRef, deletions, fieldPrefix, field
217
256
  (0, _relationship.transformRelationship)({
218
257
  field,
219
258
  ref: result,
220
- relations: relationPathMatch
259
+ relations: relationPathMatch,
260
+ withinArrayOrBlockLocale
221
261
  });
222
262
  }
223
263
  return result;
@@ -246,7 +286,8 @@ const traverseFields = ({ blocks, config, dataRef, deletions, fieldPrefix, field
246
286
  (0, _hasManyText.transformHasManyText)({
247
287
  field,
248
288
  ref: result,
249
- textRows: textPathMatch
289
+ textRows: textPathMatch,
290
+ withinArrayOrBlockLocale
250
291
  });
251
292
  }
252
293
  return result;
@@ -275,7 +316,8 @@ const traverseFields = ({ blocks, config, dataRef, deletions, fieldPrefix, field
275
316
  (0, _hasManyNumber.transformHasManyNumber)({
276
317
  field,
277
318
  numberRows: numberPathMatch,
278
- ref: result
319
+ ref: result,
320
+ withinArrayOrBlockLocale
279
321
  });
280
322
  }
281
323
  return result;
@@ -291,7 +333,11 @@ const traverseFields = ({ blocks, config, dataRef, deletions, fieldPrefix, field
291
333
  return selectResult;
292
334
  }, {});
293
335
  } else {
294
- result[field.name] = fieldData.map(({ value })=>value);
336
+ let selectData = fieldData;
337
+ if (withinArrayOrBlockLocale) {
338
+ selectData = selectData.filter(({ locale })=>locale === withinArrayOrBlockLocale);
339
+ }
340
+ result[field.name] = selectData.map(({ value })=>value);
295
341
  }
296
342
  }
297
343
  return result;
@@ -299,10 +345,18 @@ const traverseFields = ({ blocks, config, dataRef, deletions, fieldPrefix, field
299
345
  const localizedFieldData = {};
300
346
  const valuesToTransform = [];
301
347
  if (field.localized && Array.isArray(table._locales)) {
348
+ if (!table._locales.length && config.localization) {
349
+ config.localization.localeCodes.forEach((_locale)=>table._locales.push({
350
+ _locale
351
+ }));
352
+ }
302
353
  table._locales.forEach((localeRow)=>{
303
354
  valuesToTransform.push({
304
355
  ref: localizedFieldData,
305
- table: localeRow
356
+ table: {
357
+ ...table,
358
+ ...localeRow
359
+ }
306
360
  });
307
361
  });
308
362
  } else {
@@ -319,47 +373,26 @@ const traverseFields = ({ blocks, config, dataRef, deletions, fieldPrefix, field
319
373
  case 'group':
320
374
  {
321
375
  const groupFieldPrefix = `${fieldPrefix || ''}${field.name}_`;
322
- if (field.localized) {
323
- if (typeof locale === 'string' && !ref[locale]) {
324
- ref[locale] = {};
325
- delete table._locale;
326
- }
327
- Object.entries(ref).forEach(([groupLocale, groupLocaleData])=>{
328
- ref[groupLocale] = traverseFields({
329
- blocks,
330
- config,
331
- dataRef: groupLocaleData,
332
- deletions,
333
- fieldPrefix: groupFieldPrefix,
334
- fields: field.fields,
335
- numbers,
336
- path: `${sanitizedPath}${field.name}`,
337
- relationships,
338
- table,
339
- texts
340
- });
341
- });
342
- if ('_order' in ref) {
343
- delete ref._order;
344
- }
345
- } else {
346
- const groupData = {};
347
- ref[field.name] = traverseFields({
348
- blocks,
349
- config,
350
- dataRef: groupData,
351
- deletions,
352
- fieldPrefix: groupFieldPrefix,
353
- fields: field.fields,
354
- numbers,
355
- path: `${sanitizedPath}${field.name}`,
356
- relationships,
357
- table,
358
- texts
359
- });
360
- if ('_order' in ref) {
361
- delete ref._order;
362
- }
376
+ const groupData = {};
377
+ const locale = table._locale;
378
+ const refKey = field.localized && locale ? locale : field.name;
379
+ if (field.localized && locale) delete table._locale;
380
+ ref[refKey] = traverseFields({
381
+ blocks,
382
+ config,
383
+ dataRef: groupData,
384
+ deletions,
385
+ fieldPrefix: groupFieldPrefix,
386
+ fields: field.fields,
387
+ numbers,
388
+ path: `${sanitizedPath}${field.name}`,
389
+ relationships,
390
+ table,
391
+ texts,
392
+ withinArrayOrBlockLocale: locale || withinArrayOrBlockLocale
393
+ });
394
+ if ('_order' in ref) {
395
+ delete ref._order;
363
396
  }
364
397
  break;
365
398
  }
@@ -426,4 +459,4 @@ const traverseFields = ({ blocks, config, dataRef, deletions, fieldPrefix, field
426
459
  return formatted;
427
460
  };
428
461
 
429
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy90cmFuc2Zvcm0vcmVhZC90cmF2ZXJzZUZpZWxkcy50cyJdLCJzb3VyY2VzQ29udGVudCI6WyIvKiBlc2xpbnQtZGlzYWJsZSBuby1wYXJhbS1yZWFzc2lnbiAqL1xuaW1wb3J0IHR5cGUgeyBTYW5pdGl6ZWRDb25maWcgfSBmcm9tICdwYXlsb2FkL2NvbmZpZydcbmltcG9ydCB0eXBlIHsgRmllbGQsIFRhYkFzRmllbGQgfSBmcm9tICdwYXlsb2FkL3R5cGVzJ1xuXG5pbXBvcnQgeyBmaWVsZEFmZmVjdHNEYXRhIH0gZnJvbSAncGF5bG9hZC90eXBlcydcblxuaW1wb3J0IHR5cGUgeyBCbG9ja3NNYXAgfSBmcm9tICcuLi8uLi91dGlsaXRpZXMvY3JlYXRlQmxvY2tzTWFwJ1xuXG5pbXBvcnQgeyB0cmFuc2Zvcm1IYXNNYW55T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zLFxuICAgICAgICBmaWVsZFByZWZpeCxcbiAgICAgICAgZmllbGRzOiBmaWVsZC5maWVsZHMsXG4gICAgICAgIG51bWJlcnMsXG4gICAgICAgIHBhdGgsXG4gICAgICAgIHJlbGF0aW9uc2hpcHMsXG4gICAgICAgIHRhYmxlLFxuICAgICAgICB0ZXh0cyxcbiAgICAgIH0pXG4gICAgfVxuXG4gICAgaWYgKGZpZWxkQWZmZWN0c0RhdGEoZmllbGQpKSB7XG4gICAgICBjb25zdCBmaWVsZE5hbWUgPSBgJHtmaWVsZFByZWZpeCB8fCAnJ30ke2ZpZWxkLm5hbWV9YFxuICAgICAgY29uc3QgZmllbGREYXRhID0gdGFibGVbZmllbGROYW1lXVxuXG4gICAgICBpZiAoZmllbGRQcmVmaXgpIHtcbiAgICAgICAgZGVsZXRpb25zLnB1c2goKCkgPT4gZGVsZXRlIHRhYmxlW2ZpZWxkTmFtZV0pXG4gICAgICB9XG5cbiAgICAgIGlmIChmaWVsZC50eXBlID09PSAnYXJyYXknKSB7XG4gICAgICAgIGlmIChBcnJheS5pc0FycmF5KGZpZWxkRGF0YSkpIHtcbiAgICAgICAgICBpZiAoZmllbGQubG9jYWxpemVkKSB7XG4gICAgICAgICAgICByZXN1bHRbZmllbGQubmFtZV0gPSBmaWVsZERhdGEucmVkdWNlKChhcnJheVJlc3VsdCwgcm93KSA9PiB7XG4gICAgICAgICAgICAgIGlmICh0eXBlb2Ygcm93Ll9sb2NhbGUgPT09ICdzdHJpbmcnKSB7XG4gICAgICAgICAgICAgICAgaWYgKCFhcnJheVJlc3VsdFtyb3cuX2xvY2FsZV0pIGFycmF5UmVzdWx0W3Jvdy5fbG9jYWxlXSA9IFtdXG4gICAgICAgICAgICAgICAgY29uc3QgbG9jYWxlID0gcm93Ll9sb2NhbGVcbiAgICAgICAgICAgICAgICBjb25zdCBkYXRhID0ge31cbiAgICAgICAgICAgICAgICBkZWxldGUgcm93Ll9sb2NhbGVcbiAgICAgICAgICAgICAgICBpZiAocm93Ll91dWlkKSB7XG4gICAgICAgICAgICAgICAgICByb3cuaWQgPSByb3cuX3V1aWRcbiAgICAgICAgICAgICAgICAgIGRlbGV0ZSByb3cuX3V1aWRcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICBjb25zdCByb3dSZXN1bHQgPSB0cmF2ZXJzZUZpZWxkczxUPih7XG4gICAgICAgICAgICAgICAgICBibG9ja3MsXG4gICAgICAgICAgICAgICAgICBjb25maWcsXG4gICAgICAgICAgICAgICAgICBkYXRhUmVmOiBkYXRhLFxuICAgICAgICAgICAgICAgICAgZGVsZXRpb25zLFxuICAgICAgICAgICAgICAgICAgZmllbGRQcmVmaXg6ICcnLFxuICAgICAgICAgICAgICAgICAgZmllbGRzOiBmaWVsZC5maWVsZHMsXG4gICAgICAgICAgICAgICAgICBudW1iZXJzLFxuICAgICAgICAgICAgICAgICAgcGF0aDogYCR7c2FuaXRpemVkUGF0aH0ke2ZpZWxkLm5hbWV9LiR7cm93Ll9vcmRlciAtIDF9YCxcbiAgICAgICAgICAgICAgICAgIHJlbGF0aW9uc2hpcHMsXG4gICAgICAgICAgICAgICAgICB0YWJsZTogcm93LFxuICAgICAgICAgICAgICAgICAgdGV4dHMsXG4gICAgICAgICAgICAgICAgfSlcblxuICAgICAgICAgICAgICAgIGlmICgnX29yZGVyJyBpbiByb3dSZXN1bHQpIHtcbiAgICAgICAgICAgICAgICAgIGRlbGV0ZSByb3dSZXN1bHQuX29yZGVyXG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgYXJyYXlSZXN1bHRbbG9jYWxlXS5wdXNoKHJvd1Jlc3VsdClcbiAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgIHJldHVybiBhcnJheVJlc3VsdFxuICAgICAgICAgICAgfSwge30pXG4gICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIHJlc3VsdFtmaWVsZC5uYW1lXSA9IGZpZWxkRGF0YS5tYXAoKHJvdywgaSkgPT4ge1xuICAgICAgICAgICAgICBpZiAocm93Ll91dWlkKSB7XG4gICAgICAgICAgICAgICAgcm93LmlkID0gcm93Ll91dWlkXG4gICAgICAgICAgICAgICAgZGVsZXRlIHJvdy5fdXVpZFxuICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgaWYgKCdfb3JkZXInIGluIHJvdykge1xuICAgICAgICAgICAgICAgIGRlbGV0ZSByb3cuX29yZGVyXG4gICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICByZXR1cm4gdHJhdmVyc2VGaWVsZHM8VD4oe1xuICAgICAgICAgICAgICAgIGJsb2NrcyxcbiAgICAgICAgICAgICAgICBjb25maWcsXG4gICAgICAgICAgICAgICAgZGF0YVJlZjogcm93LFxuICAgICAgICAgICAgICAgIGRlbGV0aW9ucyxcbiAgICAgICAgICAgICAgICBmaWVsZFByZWZpeDogJycsXG4gICAgICAgICAgICAgICAgZmllbGRzOiBmaWVsZC5maWVsZHMsXG4gICAgICAgICAgICAgICAgbnVtYmVycyxcbiAgICAgICAgICAgICAgICBwYXRoOiBgJHtzYW5pdGl6ZWRQYXRofSR7ZmllbGQubmFtZX0uJHtpfWAsXG4gICAgICAgICAgICAgICAgcmVsYXRpb25zaGlwcyxcbiAgICAgICAgICAgICAgICB0YWJsZTogcm93LFxuICAgICAgICAgICAgICAgIHRleHRzLFxuICAgICAgICAgICAgICB9KVxuICAgICAgICAgICAgfSlcbiAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICByZXR1cm4gcmVzdWx0XG4gICAgICB9XG5cbiAgICAgIGlmIChmaWVsZC50eXBlID09PSAnYmxvY2tzJykge1xuICAgICAgICBjb25zdCBibG9ja0ZpZWxkUGF0aCA9IGAke3Nhbml0aXplZFBhdGh9JHtmaWVsZC5uYW1lfWBcblxuICAgICAgICBpZiAoQXJyYXkuaXNBcnJheShibG9ja3NbYmxvY2tGaWVsZFBhdGhdKSkge1xuICAgICAgICAgIGlmIChmaWVsZC5sb2Nhb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tcbiAgICAgICAgICAgICAgICAgICAgYmxvY2tzLFxuICAgICAgICAgICAgICAgICAgICBjb25maWcsXG4gICAgICAgICAgICAgICAgICAgIGRhdGFSZWY6IHJvdyxcbiAgICAgICAgICAgICAgICAgICAgZGVsZXRpb25zLFxuICAgICAgICAgICAgICAgICAgICBmaWVsZFByZWZpeDogJycsXG4gICAgICAgICAgICAgICAgICAgIGZpZWxkczogYmxvY2suZmllbGRzLFxuICAgICAgICAgICAgICAgICAgICBudW1iZXJzLFxuICAgICAgICAgICAgICAgICAgICBwYXRoOiBgJHtibG9ja0ZpZWxkUGF0aH0uJHtyb3cuX29yZGVyIC0gMX1gLFxuICAgICAgICAgICAgICAgICAgICByZWxhdGlvbnNoaXBzLFxuICAgICAgICAgICAgICAgICAgICB0YWJsZTogcm93LFxuICAgICAgICAgICAgICAgICAgICB0ZXh0cyxcbiAgICAgICAgICAgICAgICAgIH0pXG5cbiAgICAgICAgICAgICAgICAgIGRlbGV0ZSBibG9ja1Jlc3VsdC5fb3JkZXJcbiAgICAgICAgICAgICAgICAgIHJldHVybiBibG9ja1Jlc3VsdFxuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIHJldHVybiB7fVxuICAgICAgICAgICAgICB9KVxuICAgICAgICAgICAgfSlcbiAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgcmVzdWx0W2ZpZWxkLm5hbWVdID0gYmxvY2tzW2Jsb2NrRmllbGRQYXRoXS5tYXAoKHJvdywgaSkgPT4ge1xuICAgICAgICAgICAgICBkZWxldGUgcm93Ll9vcmRlclxuICAgICAgICAgICAgICBpZiAocm93Ll91dWlkKSB7XG4gICAgICAgICAgICAgICAgcm93LmlkID0gcm93Ll91dWlkXG4gICAgICAgICAgICAgICAgZGVsZXRlIHJvdy5fdXVpZFxuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIGNvbnN0IGJsb2NrID0gZmllbGQuYmxvY2tzLmZpbmQoKHsgc2x1ZyB9KSA9PiBzbHVnID09PSByb3cuYmxvY2tUeXBlKVxuXG4gICAgICAgICAgICAgIGlmIChibG9jaykge1xuICAgICAgICAgICAgICAgIHJldHVybiB0cmF2ZXJzZUZpZWxkczxUPih7XG4gICAgICAgICAgICAgICAgICBibG9ja3MsXG4gICAgICAgICAgICAgICAgICBjb25maWcsXG4gICAgICAgICAgICAgICAgICBkYXRhUmVmOiByb3csXG4gICAgICAgICAgICAgICAgICBkZWxldGlvbnMsXG4gICAgICAgICAgICAgICAgICBmaWVsZFByZWZpeDogJycsXG4gICAgICAgICAgICAgICAgICBmaWVsZHM6IGJsb2NrLmZpZWxkcyxcbiAgICAgICAgICAgICAgICAgIG51bWJlcnMsXG4gICAgICAgICAgICAgICAgICBwYXRoOiBgJHtibG9ja0ZpZWxkUGF0aH0uJHtpfWAsXG4gICAgICAgICAgICAgICAgICByZWxhdGlvbnNoaXBzLFxuICAgICAgICAgICAgICAgICAgdGFibGU6IHJvdyxcbiAgICAgICAgICAgICAgICAgIHRleHRzLFxuICAgICAgICAgICAgICAgIH0pXG4gICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICByZXR1cm4ge31cbiAgICAgICAgICAgIH0pXG4gICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgcmV0dXJuIHJlc3VsdFxuICAgICAgfVxuXG4gICAgICBpZiAoZmllbGQudHlwZSA9PT0gJ3JlbGF0aW9uc2hpcCcgfHwgZmllbGQudHlwZSA9PT0gJ3VwbG9hZCcpIHtcbiAgICAgICAgY29uc3QgcmVsYXRpb25QYXRoTWF0Y2ggPSByZWxhdGlvbnNoaXBzW2Ake3Nhbml0aXplZFBhdGh9JHtmaWVsZC5uYW1lfWBdXG4gICAgICAgIGlmICghcmVsYXRpb25QYXRoTWF0Y2gpIHtcbiAgICAgICAgICBpZiAoJ2hhc01hbnknIGluIGZpZWxkICYmIGZpZWxkLmhhc01hbnkpIHtcbiAgICAgICAgICAgIGlmIChmaWVsZC5sb2NhbGl6ZWQgJiYgY29uZmlnLmxvY2FsaXphdGlvbiAmJiBjb25maWcubG9jYWxpemF0aW9uLmxvY2FsZXMpIHtcbiAgICAgICAgICAgICAgcmVzdWx0W2ZpZWxkLm5hbWVdID0ge1xuICAgICAgICAgICAgICAgIFtjb25maWcubG9jYWxpemF0aW9uLmRlZmF1bHRMb2NhbGVdOiBbXSxcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgcmVzdWx0W2ZpZWxkLm5hbWVdID0gW11cbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9XG5cbiAgICAgICAgICByZXR1cm4gcmVzdWx0XG4gICAgICAgIH1cblxuICAgICAgICBpZiAoZmllbGQubG9jYWxpemVkKSB7XG4gICAgICAgICAgcmVzdWx0W2ZpZWxkLm5hbWVdID0ge31cbiAgICAgICAgICBjb25zdCByZWxhdGlvbnNCeUxvY2FsZTogUmVjb3JkPHN0cmluZywgUmVjb3JkPHN0cmluZywgdW5rbm93bj5bXT4gPSB7fVxuXG4gICAgICAgICAgcmVsYXRpb25QYXRoTWF0Y2guZm9yRWFjaCgocm93KSA9PiB7XG4gICAgICAgICAgICBpZiAodHlwZW9mIHJvdy5sb2NhbGUgPT09ICdzdHJpbmcnKSB7XG4gICAgICAgICAgICAgIGlmICghcmVsYXRpb25zQnlMb2NhbGVbcm93LmxvY2FsZV0pIHJlbGF0aW9uc0J5TG9jYWxlW3Jvdy5sb2NhbGVdID0gW11cbiAgICAgICAgICAgICAgcmVsYXRpb25zQnlMb2NhbGVbcm93LmxvY2FsZV0ucHVzaChyb3cpXG4gICAgICAgICAgICB9XG4gICAgICAgICAgfSlcblxuICAgICAgICAgIE9iamVjdC5lbnRyaWVzKHJlbGF0aW9uc0J5TG9jYWxlKS5mb3JFYWNoKChbbG9jYWxlLCByZWxhdGlvbnNdKSA9PiB7XG4gICAgICAgICAgICB0cmFuc2Zvcm1SZWxhdGlvbnNoaXAoe1xuICAgICAgICAgICAgICBmaWVsZCxcbiAgICAgICAgICAgICAgbG9jYWxlLFxuICAgICAgICAgICAgICByZWY6IHJlc3VsdCxcbiAgICAgICAgICAgICAgcmVsYXRpb25zLFxuICAgICAgICAgICAgfSlcbiAgICAgICAgICB9KVxuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgIHRyYW5zZm9ybVJlbGF0aW9uc2hpcCh7XG4gICAgICAgICAgICBmaWVsZCxcbiAgICAgICAgICAgIHJlZjogcmVzdWx0LFxuICAgICAgICAgICAgcmVsYXRpb25zOiByZWxhdGlvblBhdGhNYXRjaCxcbiAgICAgICAgICB9KVxuICAgICAgICB9XG5cbiAgICAgICAgcmV0dXJuIHJlc3VsdFxuICAgICAgfVxuXG4gICAgICBpZiAoZmllbGQudHlwZSA9PT0gJ3RleHQnICYmIGZpZWxkPy5oYXNNYW55KSB7XG4gICAgICAgIGNvbnN0IHRleHRQYXRoTWF0Y2ggPSB0ZXh0c1tgJHtzYW5pdGl6ZWRQYXRofSR7ZmllbGQubmFtZX1gXVxuICAgICAgICBpZiAoIXRleHRQYXRoTWF0Y2gpIHJldHVybiByZXN1bHRcblxuICAgICAgICBpZiAoZmllbGQubG9jYWxpemVkKSB7XG4gICAgICAgICAgcmVzdWx0W2ZpZWxkLm5hbWVdID0ge31cbiAgICAgICAgICBjb25zdCB0ZXh0c0J5TG9jYWxlOiBSZWNvcmQ8c3RyaW5nLCBSZWNvcmQ8c3RyaW5nLCB1bmtub3duPltdPiA9IHt9XG5cbiAgICAgICAgICB0ZXh0UGF0aE1hdGNoLmZvckVhY2goKHJvdykgPT4ge1xuICAgICAgICAgICAgaWYgKHR5cGVvZiByb3cubG9jYWxlID09PSAnc3RyaW5nJykge1xuICAgICAgICAgICAgICBpZiAoIXRleHRzQnlMb2NhbGVbcm93LmxvY2FsZV0pIHRleHRzQnlMb2NhbGVbcm93LmxvY2FsZV0gPSBbXVxuICAgICAgICAgICAgICB0ZXh0c0J5TG9jYWxlW3Jvdy5sb2NhbGVdLnB1c2gocm93KVxuICAgICAgICAgICAgfVxuICAgICAgICAgIH0pXG5cbiAgICAgICAgICBPYmplY3QuZW50cmllcyh0ZXh0c0J5TG9jYWxlKS5mb3JFYWNoKChbbG9jYWxlLCB0ZXh0c10pID0+IHtcbiAgICAgICAgICAgIHRyYW5zZm9ybUhhc01hbnlUZXh0KHtcbiAgICAgICAgICAgICAgZmllbGQsXG4gICAgICAgICAgICAgIGxvY2FsZSxcbiAgICAgICAgICAgICAgcmVmOiByZXN1bHQsXG4gICAgICAgICAgICAgIHRleHRSb3dzOiB0ZXh0cyxcbiAgICAgICAgICAgIH0pXG4gICAgICAgICAgfSlcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICB0cmFuc2Zvcm1IYXNNYW55VGV4dCh7XG4gICAgICAgICAgICBmaWVsZCxcbiAgICAgICAgICAgIHJlZjogcmVzdWx0LFxuICAgICAgICAgICAgdGV4dFJvd3M6IHRleHRQYXRoTWF0Y2gsXG4gICAgICAgICAgfSlcbiAgICAgICAgfVxuXG4gICAgICAgIHJldHVybiByZXN1bHRcbiAgICAgIH1cblxuICAgICAgaWYgKGZpZWxkLnR5cGUgPT09ICdudW1iZXInICYmIGZpZWxkLmhhc01hbnkpIHtcbiAgICAgICAgY29uc3QgbnVtYmVyUGF0aE1hdGNoID0gbnVtYmVyc1tgJHtzYW5pdGl6ZWRQYXRofSR7ZmllbGQubmFtZX1gXVxuICAgICAgICBpZiAoIW51bWJlclBhdGhNYXRjaCkgcmV0dXJuIHJlc3VsdFxuXG4gICAgICAgIGlmIChmaWVsZC5sb2NhbGl6ZWQpIHtcbiAgICAgICAgICByZXN1bHRbZmllbGQubmFtZV0gPSB7fVxuICAgICAgICAgIGNvbnN0IG51bWJlcnNCeUxvY2FsZTogUmVjb3JkPHN0cmluZywgUmVjb3JkPHN0cmluZywgdW5rbm93bj5bXT4gPSB7fVxuXG4gICAgICAgICAgbnVtYmVyUGF0aE1hdGNoLmZvckVhY2goKHJvdykgPT4ge1xuICAgICAgICAgICAgaWYgKHR5cGVvZiByb3cubG9jYWxlID09PSAnc3RyaW5nJykge1xuICAgICAgICAgICAgICBpZiAoIW51bWJlcnNCeUxvY2FsZVtyb3cubG9jYWxlXSkgbnVtYmVyc0J5TG9jYWxlW3Jvdy5sb2NhbGVdID0gW11cbiAgICAgICAgICAgICAgbnVtYmVyc0J5TG9jYWxlW3Jvdy5sb2NhbGVdLnB1c2gocm93KVxuICAgICAgICAgICAgfVxuICAgICAgICAgIH0pXG5cbiAgICAgICAgICBPYmplY3QuZW50cmllcyhudW1iZXJzQnlMb2NhbGUpLmZvckVhY2goKFtsb2NhbGUsIG51bWJlcnNdKSA9PiB7XG4gICAgICAgICAgICB0cmFuc2Zvcm1IYXNNYW55TnVtYmVyKHtcbiAgICAgICAgICAgICAgZmllbGQsXG4gICAgICAgICAgICAgIGxvY2FsZSxcbiAgICAgICAgICAgICAgbnVtYmVyUm93czogbnVtYmVycyxcbiAgICAgICAgICAgICAgcmVmOiByZXN1bHQsXG4gICAgICAgICAgICB9KVxuICAgICAgICAgIH0pXG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgdHJhbnNmb3JtSGFzTWFueU51bWJlcih7XG4gICAgICAgICAgICBmaWVsZCxcbiAgICAgICAgICAgIG51bWJlclJvd3M6IG51bWJlclBhdGhNYXRjaCxcbiAgICAgICAgICAgIHJlZjogcmVzdWx0LFxuICAgICAgICAgIH0pXG4gICAgICAgIH1cblxuICAgICAgICByZXR1cm4gcmVzdWx0XG4gICAgICB9XG5cbiAgICAgIGlmIChmaWVsZC50eXBlID09PSAnc2VsZWN0JyAmJiBmaWVsZC5oYXNNYW55KSB7XG4gICAgICAgIGlmIChBcnJheS5pc0FycmF5KGZpZWxkRGF0YSkpIHtcbiAgICAgICAgICBpZiAoZmllbGQubG9jYWxpemVkKSB7XG4gICAgICAgICAgICByZXN1bHRbZmllbGQubmFtZV0gPSBmaWVsZERhdGEucmVkdWNlKChzZWxlY3RSZXN1bHQsIHJvdykgPT4ge1xuICAgICAgICAgICAgICBpZiAodHlwZW9mIHJvdy5sb2NhbGUgPT09ICdzdHJpbmcnKSB7XG4gICAgICAgICAgICAgICAgaWYgKCFzZWxlY3RSZXN1bHRbcm93LmxvY2FsZV0pIHNlbGVjdFJlc3VsdFtyb3cubG9jYWxlXSA9IFtdXG4gICAgICAgICAgICAgICAgc2VsZWN0UmVzdWx0W3Jvdy5sb2NhbGVdLnB1c2gocm93LnZhbHVlKVxuICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgcmV0dXJuIHNlbGVjdFJlc3VsdFxuICAgICAgICAgICAgfSwge30pXG4gICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIHJlc3VsdFtmaWVsZC5uYW1lXSA9IGZpZWxkRGF0YS5tYXAoKHsgdmFsdWUgfSkgPT4gdmFsdWUpXG4gICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIHJldHVybiByZXN1bHRcbiAgICAgIH1cblxuICAgICAgY29uc3QgbG9jYWxpemVkRmllbGREYXRhID0ge31cbiAgICAgIGNvbnN0IHZhbHVlc1RvVHJhbnNmb3JtOiB7XG4gICAgICAgIHJlZjogUmVjb3JkPHN0cmluZywgdW5rbm93bj5cbiAgICAgICAgdGFibGU6IFJlY29yZDxzdHJpbmcsIHVua25vd24+XG4gICAgICB9W10gPSBbXVxuXG4gICAgICBpZiAoZmllbGQubG9jYWxpemVkICYmIEFycmF5LmlzQXJyYXkodGFibGUuX2xvY2FsZXMpKSB7XG4gICAgICAgIHRhYmxlLl9sb2NhbGVzLmZvckVhY2goKGxvY2FsZVJvdykgPT4ge1xuICAgICAgICAgIHZhbHVlc1RvVHJhbnNmb3JtLnB1c2goeyByZWY6IGxvY2FsaXplZEZpZWxkRGF0YSwgdGFibGU6IGxvY2FsZVJvdyB9KVxuICAgICAgICB9KVxuICAgICAgfSBlbHNlIHtcbiAgICAgICAgdmFsdWVzVG9UcmFuc2Zvcm0ucHVzaCh7IHJlZjogcmVzdWx0LCB0YWJsZSB9KVxuICAgICAgfVxuXG4gICAgICB2YWx1ZXNUb1RyYW5zZm9ybS5mb3JFYWNoKCh7IHJlZiwgdGFibGUgfSkgPT4ge1xuICAgICAgICBjb25zdCBmaWVsZERhdGEgPSB0YWJsZVtgJHtmaWVsZFByZWZpeCB8fCAnJ30ke2ZpZWxkLm5hbWV9YF1cbiAgICAgICAgY29uc3QgbG9jYWxlID0gdGFibGU/Ll9sb2NhbGVcblxuICAgICAgICBzd2l0Y2ggKGZpZWxkLnR5cGUpIHtcbiAgICAgICAgICBjYXNlICd0YWInOlxuICAgICAgICAgIGNhc2UgJ2dyb3VwJzoge1xuICAgICAgICAgICAgY29uc3QgZ3JvdXBGaWVsZFByZWZpeCA9IGAke2ZpZWxkUHJlZml4IHx8ICcnfSR7ZmllbGQubmFtZX1fYFxuXG4gICAgICAgICAgICBpZiAoZmllbGQubG9jYWxpemVkKSB7XG4gICAgICAgICAgICAgIGlmICh0eXBlb2YgbG9jYWxlID09PSAnc3RyaW5nJyAmJiAhcmVmW2xvY2FsZV0pIHtcbiAgICAgICAgICAgICAgICByZWZbbG9jYWxlXSA9IHt9XG4gICAgICAgICAgICAgICAgZGVsZXRlIHRhYmxlLl9sb2NhbGVcbiAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgIE9iamVjdC5lbnRyaWVzKHJlZikuZm9yRWFjaCgoW2dyb3VwTG9jYWxlLCBncm91cExvY2FsZURhdGFdKSA9PiB7XG4gICAgICAgICAgICAgICAgcmVmW2dyb3VwTG9jYWxlXSA9IHRyYXZlcnNlRmllbGRzPFJlY29yZDxzdHJpbmcsIHVua25vd24+Pih7XG4gICAgICAgICAgICAgICAgICBibG9ja3MsXG4gICAgICAgICAgICAgICAgICBjb25maWcsXG4gICAgICAgICAgICAgICAgICBkYXRhUmVmOiBncm91cExvY2FsZURhdGEgYXMgUmVjb3JkPHN0cmluZywgdW5rbm93bj4sXG4gICAgICAgICAgICAgICAgICBkZWxldGlvbnMsXG4gICAgICAgICAgICAgICAgICBmaWVsZFByZWZpeDogZ3JvdXBGaWVsZFByZWZpeCxcbiAgICAgICAgICAgICAgICAgIGZpZWxkczogZmllbGQuZmllbGRzLFxuICAgICAgICAgICAgICAgICAgbnVtYmVycyxcbiAgICAgICAgICAgICAgICAgIHBhdGg6IGAke3Nhbml0aXplZFBhdGh9JHtmaWVsZC5uYW1lfWAsXG4gICAgICAgICAgICAgICAgICByZWxhdGlvbnNoaXBzLFxuICAgICAgICAgICAgICAgICAgdGFibGUsXG4gICAgICAgICAgICAgICAgICB0ZXh0cyxcbiAgICAgICAgICAgICAgICB9KVxuICAgICAgICAgICAgICB9KVxuICAgICAgICAgICAgICBpZiAoJ19vcmRlcicgaW4gcmVmKSB7XG4gICAgICAgICAgICAgICAgZGVsZXRlIHJlZi5fb3JkZXJcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgY29uc3QgZ3JvdXBEYXRhID0ge31cblxuICAgICAgICAgICAgICByZWZbZmllbGQubmFtZV0gPSB0cmF2ZXJzZUZpZWxkczxSZWNvcmQ8c3RyaW5nLCB1bmtub3duPj4oe1xuICAgICAgICAgICAgICAgIGJsb2NrcyxcbiAgICAgICAgICAgICAgICBjb25maWcsXG4gICAgICAgICAgICAgICAgZGF0YVJlZjogZ3JvdXBEYXRhIGFzIFJlY29yZDxzdHJpbmcsIHVua25vd24+LFxuICAgICAgICAgICAgICAgIGRlbGV0aW9ucyxcbiAgICAgICAgICAgICAgICBmaWVsZFByZWZpeDogZ3JvdXBGaWVsZFByZWZpeCxcbiAgICAgICAgICAgICAgICBmaWVsZHM6IGZpZWxkLmZpZWxkcyxcbiAgICAgICAgICAgICAgICBudW1iZXJzLFxuICAgICAgICAgICAgICAgIHBhdGg6IGAke3Nhbml0aXplZFBhdGh9JHtmaWVsZC5uYW1lfWAsXG4gICAgICAgICAgICAgICAgcmVsYXRpb25zaGlwcyxcbiAgICAgICAgICAgICAgICB0YWJsZSxcbiAgICAgICAgICAgICAgICB0ZXh0cyxcbiAgICAgICAgICAgICAgfSlcbiAgICAgICAgICAgICAgaWYgKCdfb3JkZXInIGluIHJlZikge1xuICAgICAgICAgICAgICAgIGRlbGV0ZSByZWYuX29yZGVyXG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgYnJlYWtcbiAgICAgICAgICB9XG5cbiAgICAgICAgICBjYXNlICd0ZXh0Jzoge1xuICAgICAgICAgICAgbGV0IHZhbCA9IGZpZWxkRGF0YVxuICAgICAgICAgICAgaWYgKHR5cGVvZiBmaWVsZERhdGEgPT09ICdzdHJpbmcnKSB7XG4gICAgICAgICAgICAgIHZhbCA9IFN0cmluZyhmaWVsZERhdGEpXG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIGlmICh0eXBlb2YgbG9jYWxlID09PSAnc3RyaW5nJykge1xuICAgICAgICAgICAgICByZWZbbG9jYWxlXSA9IHZhbFxuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgcmVzdWx0W2ZpZWxkLm5hbWVdID0gdmFsXG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIGJyZWFrXG4gICAgICAgICAgfVxuXG4gICAgICAgICAgY2FzZSAnbnVtYmVyJzoge1xuICAgICAgICAgICAgbGV0IHZhbCA9IGZpZWxkRGF0YVxuICAgICAgICAgICAgaWYgKHR5cGVvZiBmaWVsZERhdGEgPT09ICdzdHJpbmcnKSB7XG4gICAgICAgICAgICAgIHZhbCA9IE51bWJlci5wYXJzZUZsb2F0KGZpZWxkRGF0YSlcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgaWYgKHR5cGVvZiBsb2NhbGUgPT09ICdzdHJpbmcnKSB7XG4gICAgICAgICAgICAgIHJlZltsb2NhbGVdID0gdmFsXG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICByZXN1bHRbZmllbGQubmFtZV0gPSB2YWxcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgYnJlYWtcbiAgICAgICAgICB9XG5cbiAgICAgICAgICBjYXNlICdkYXRlJzoge1xuICAgICAgICAgICAgbGV0IHZhbCA9IGZpZWxkRGF0YVxuXG4gICAgICAgICAgICBpZiAodHlwZW9mIGZpZWxkRGF0YSA9PT0gJ3N0cmluZycpIHtcbiAgICAgICAgICAgICAgdmFsID0gbmV3IERhdGUoZmllbGREYXRhKS50b0lTT1N0cmluZygpXG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIGlmICh0eXBlb2YgbG9jYWxlID09PSAnc3RyaW5nJykge1xuICAgICAgICAgICAgICByZWZbbG9jYWxlXSA9IHZhbFxuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgcmVzdWx0W2ZpZWxkLm5hbWVdID0gdmFsXG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIGJyZWFrXG4gICAgICAgICAgfVxuXG4gICAgICAgICAgZGVmYXVsdDoge1xuICAgICAgICAgICAgaWYgKHR5cGVvZiBsb2NhbGUgPT09ICdzdHJpbmcnKSB7XG4gICAgICAgICAgICAgIHJlZltsb2NhbGVdID0gZmllbGREYXRhXG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICByZXN1bHRbZmllbGQubmFtZV0gPSBmaWVsZERhdGFcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgYnJlYWtcbiAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgIH0pXG5cbiAgICAgIGlmIChPYmplY3Qua2V5cyhsb2NhbGl6ZWRGaWVsZERhdGEpLmxlbmd0aCA+IDApIHtcbiAgICAgICAgcmVzdWx0W2ZpZWxkLm5hbWVdID0gbG9jYWxpemVkRmllbGREYXRhXG4gICAgICB9XG5cbiAgICAgIHJldHVybiByZXN1bHRcbiAgICB9XG5cbiAgICByZXR1cm4gcmVzdWx0XG4gIH0sIGRhdGFSZWYpXG5cbiAgaWYgKEFycmF5LmlzQX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aW9uc2hpcHMsXG4gICAgICAgIHRhYmxlLFxuICAgICAgICB0ZXh0cyxcbiAgICAgICAgd2l0aGluQXJyYXlPckJsb2NrTG9jYWxlLFxuICAgICAgfSlcbiAgICB9XG5cbiAgICBpZiAoXG4gICAgICBmaWVsZC50eXBlID09PSAnY29sbGFwc2libGUnIHx8XG4gICAgICBmaWVsZC50eXBlID09PSAncm93JyB8fFxuICAgICAgKGZpZWxkLnR5cGUgPT09ICd0YWInICYmICEoJ25hbWUnIGluIGZpZWxkKSlcbiAgICApIHtcbiAgICAgIHRyYXZlcnNlRmllbGRzKHtcbiAgICAgICAgYmxvY2tzLFxuICAgICAgICBjb25maWcsXG4gICAgICAgIGRhdGFSZWYsXG4gICAgICAgIGRlbGV0aW9ucyxcbiAgICAgICAgZmllbGRQcmVmaXgsXG4gICAgICAgIGZpZWxkczogZmllbGQuZmllbGRzLFxuICAgICAgICBudW1iZXJzLFxuICAgICAgICBwYXRoLFxuICAgICAgICByZWxhdGlvbnNoaXBzLFxuICAgICAgICB0YWJsZSxcbiAgICAgICAgdGV4dHMsXG4gICAgICAgIHdpdGhpbkFycmF5T3JCbG9ja0xvY2FsZSxcbiAgICAgIH0pXG4gICAgfVxuXG4gICAgaWYgKGZpZWxkQWZmZWN0c0RhdGEoZmllbGQpKSB7XG4gICAgICBjb25zdCBmaWVsZE5hbWUgPSBgJHtmaWVsZFByZWZpeCB8fCAnJ30ke2ZpZWxkLm5hbWV9YFxuICAgICAgY29uc3QgZmllbGREYXRhID0gdGFibGVbZmllbGROYW1lXVxuXG4gICAgICBpZiAoZmllbGRQcmVmaXgpIHtcbiAgICAgICAgZGVsZXRpb25zLnB1c2goKCkgPT4gZGVsZXRlIHRhYmxlW2ZpZWxkTmFtZV0pXG4gICAgICB9XG5cbiAgICAgIGlmIChmaWVsZC50eXBlID09PSAnYXJyYXknKSB7XG4gICAgICAgIGlmIChBcnJheS5pc0FycmF5KGZpZWxkRGF0YSkpIHtcbiAgICAgICAgICBpZiAoZmllbGQubG9jYWxpemVkKSB7XG4gICAgICAgICAgICByZXN1bHRbZmllbGQubmFtZV0gPSBmaWVsZERhdGEucmVkdWNlKChhcnJheVJlc3VsdCwgcm93KSA9PiB7XG4gICAgICAgICAgICAgIGlmICh0eXBlb2Ygcm93Ll9sb2NhbGUgPT09ICdzdHJpbmcnKSB7XG4gICAgICAgICAgICAgICAgaWYgKCFhcnJheVJlc3VsdFtyb3cuX2xvY2FsZV0pIGFycmF5UmVzdWx0W3Jvdy5fbG9jYWxlXSA9IFtdXG4gICAgICAgICAgICAgICAgY29uc3QgbG9jYWxlID0gcm93Ll9sb2NhbGVcbiAgICAgICAgICAgICAgICBjb25zdCBkYXRhID0ge31cbiAgICAgICAgICAgICAgICBkZWxldGUgcm93Ll9sb2NhbGVcbiAgICAgICAgICAgICAgICBpZiAocm93Ll91dWlkKSB7XG4gICAgICAgICAgICAgICAgICByb3cuaWQgPSByb3cuX3V1aWRcbiAgICAgICAgICAgICAgICAgIGRlbGV0ZSByb3cuX3V1aWRcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICBjb25zdCByb3dSZXN1bHQgPSB0cmF2ZXJzZUZpZWxkczxUPih7XG4gICAgICAgICAgICAgICAgICBibG9ja3MsXG4gICAgICAgICAgICAgICAgICBjb25maWcsXG4gICAgICAgICAgICAgICAgICBkYXRhUmVmOiBkYXRhLFxuICAgICAgICAgICAgICAgICAgZGVsZXRpb25zLFxuICAgICAgICAgICAgICAgICAgZmllbGRQcmVmaXg6ICcnLFxuICAgICAgICAgICAgICAgICAgZmllbGRzOiBmaWVsZC5maWVsZHMsXG4gICAgICAgICAgICAgICAgICBudW1iZXJzLFxuICAgICAgICAgICAgICAgICAgcGF0aDogYCR7c2FuaXRpemVkUGF0aH0ke2ZpZWxkLm5hbWV9LiR7cm93Ll9vcmRlciAtIDF9YCxcbiAgICAgICAgICAgICAgICAgIHJlbGF0aW9uc2hpcHMsXG4gICAgICAgICAgICAgICAgICB0YWJsZTogcm93LFxuICAgICAgICAgICAgICAgICAgdGV4dHMsXG4gICAgICAgICAgICAgICAgICB3aXRoaW5BcnJheU9yQmxvY2tMb2NhbGU6IGxvY2FsZSxcbiAgICAgICAgICAgICAgICB9KVxuXG4gICAgICAgICAgICAgICAgaWYgKCdfb3JkZXInIGluIHJvd1Jlc3VsdCkge1xuICAgICAgICAgICAgICAgICAgZGVsZXRlIHJvd1Jlc3VsdC5fb3JkZXJcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICBhcnJheVJlc3VsdFtsb2NhbGVdLnB1c2gocm93UmVzdWx0KVxuICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgcmV0dXJuIGFycmF5UmVzdWx0XG4gICAgICAgICAgICB9LCB7fSlcbiAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgcmVzdWx0W2ZpZWxkLm5hbWVdID0gZmllbGREYXRhLnJlZHVjZSgoYWNjLCByb3csIGkpID0+IHtcbiAgICAgICAgICAgICAgaWYgKHJvdy5fdXVpZCkge1xuICAgICAgICAgICAgICAgIHJvdy5pZCA9IHJvdy5fdXVpZFxuICAgICAgICAgICAgICAgIGRlbGV0ZSByb3cuX3V1aWRcbiAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgIGlmICgnX29yZGVyJyBpbiByb3cpIHtcbiAgICAgICAgICAgICAgICBkZWxldGUgcm93Ll9vcmRlclxuICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgaWYgKFxuICAgICAgICAgICAgICAgICF3aXRoaW5BcnJheU9yQmxvY2tMb2NhbGUgfHxcbiAgICAgICAgICAgICAgICAod2l0aGluQXJyYXlPckJsb2NrTG9jYWxlICYmIHdpdGhpbkFycmF5T3JCbG9ja0xvY2FsZSA9PT0gcm93Ll9sb2NhbGUpXG4gICAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgIGlmIChyb3cuX2xvY2FsZSkge1xuICAgICAgICAgICAgICAgICAgZGVsZXRlIHJvdy5fbG9jYWxlXG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgYWNjLnB1c2goXG4gICAgICAgICAgICAgICAgICB0cmF2ZXJzZUZpZWxkczxUPih7XG4gICAgICAgICAgICAgICAgICAgIGJsb2NrcyxcbiAgICAgICAgICAgICAgICAgICAgY29uZmlnLFxuICAgICAgICAgICAgICAgICAgICBkYXRhUmVmOiByb3csXG4gICAgICAgICAgICAgICAgICAgIGRlbGV0aW9ucyxcbiAgICAgICAgICAgICAgICAgICAgZmllbGRQcmVmaXg6ICcnLFxuICAgICAgICAgICAgICAgICAgICBmaWVsZHM6IGZpZWxkLmZpZWxkcyxcbiAgICAgICAgICAgICAgICAgICAgbnVtYmVycyxcbiAgICAgICAgICAgICAgICAgICAgcGF0aDogYCR7c2FuaXRpemVkUGF0aH0ke2ZpZWxkLm5hbWV9LiR7aX1gLFxuICAgICAgICAgICAgICAgICAgICByZWxhdGlvbnNoaXBzLFxuICAgICAgICAgICAgICAgICAgICB0YWJsZTogcm93LFxuICAgICAgICAgICAgICAgICAgICB0ZXh0cyxcbiAgICAgICAgICAgICAgICAgICAgd2l0aGluQXJyYXlPckJsb2NrTG9jYWxlLFxuICAgICAgICAgICAgICAgICAgfSksXG4gICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgcmV0dXJuIGFjY1xuICAgICAgICAgICAgfSwgW10pXG4gICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgcmV0dXJuIHJlc3VsdFxuICAgICAgfVxuICAgICAgaWYgKGZpZWxkLnR5cGUgPT09ICdibG9ja3MnKSB7XG4gICAgICAgIGNvbnN0IGJsb2NrRmllbGRQYXRoID0gYCR7c2FuaXRpemVkUGF0aH0ke2ZpZWxkLm5hbWV9YFxuICAgICAgICBjb25zdCBibG9ja3NCeVBhdGggPSBibG9ja3NbYmxvY2tGaWVsZFBhdGhdXG5cbiAgICAgICAgaWYgKEFycmF5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gIGNvbnN0IGJsb2NrUmVzdWx0ID0gdHJhdmVyc2VGaWVsZHM8VD4oe1xuICAgICAgICAgICAgICAgICAgICBibG9ja3MsXG4gICAgICAgICAgICAgICAgICAgIGNvbmZpZyxcbiAgICAgICAgICAgICAgICAgICAgZGF0YVJlZjogcm93LFxuICAgICAgICAgICAgICAgICAgICBkZWxldGlvbnMsXG4gICAgICAgICAgICAgICAgICAgIGZpZWxkUHJlZml4OiAnJyxcbiAgICAgICAgICAgICAgICAgICAgZmllbGRzOiBibG9jay5maWVsZHMsXG4gICAgICAgICAgICAgICAgICAgIG51bWJlcnMsXG4gICAgICAgICAgICAgICAgICAgIHBhdGg6IGAke2Jsb2NrRmllbGRQYXRofS4ke3Jvdy5fb3JkZXIgLSAxfWAsXG4gICAgICAgICAgICAgICAgICAgIHJlbGF0aW9uc2hpcHMsXG4gICAgICAgICAgICAgICAgICAgIHRhYmxlOiByb3csXG4gICAgICAgICAgICAgICAgICAgIHRleHRzLFxuICAgICAgICAgICAgICAgICAgICB3aXRoaW5BcnJheU9yQmxvY2tMb2NhbGU6IGxvY2FsZSxcbiAgICAgICAgICAgICAgICAgIH0pXG5cbiAgICAgICAgICAgICAgICAgIGRlbGV0ZSBibG9ja1Jlc3VsdC5fb3JkZXJcbiAgICAgICAgICAgICAgICAgIHJldHVybiBibG9ja1Jlc3VsdFxuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIHJldHVybiB7fVxuICAgICAgICAgICAgICB9KVxuICAgICAgICAgICAgfSlcbiAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgLy8gQWRkIGxvY2FsZS1zcGVjaWZpYyBpbmRleCB0byBoYXZlIGEgcHJvcGVyIGJsb2NrRmllbGRQYXRoIGZvciBjdXJyZW50IGxvY2FsZVxuICAgICAgICAgICAgLy8gYmVjYXVzZSBibG9ja3MgY2FuIGJlIGluIHRoZSBzYW1lIGFycmF5IGZvciBkaWZmZXJlbnQgbG9jYWxlcyFcbiAgICAgICAgICAgIGlmICh3aXRoaW5BcnJheU9yQmxvY2tMb2NhbGUgJiYgY29uZmlnLmxvY2FsaXphdGlvbikge1xuICAgICAgICAgICAgICBmb3IgKGNvbnN0IGxvY2FsZSBvZiBjb25maWcubG9jYWxpemF0aW9uLmxvY2FsZUNvZGVzKSB7XG4gICAgICAgICAgICAgICAgbGV0IGxvY2FsZUluZGV4ID0gMFxuXG4gICAgICAgICAgICAgICAgZm9yIChsZXQgaSA9IDA7IGkgPCBibG9ja3NCeVBhdGgubGVuZ3RoOyBpKyspIHtcbiAgICAgICAgICAgICAgICAgIGNvbnN0IHJvdyA9IGJsb2Nrc0J5UGF0aFtpXVxuICAgICAgICAgICAgICAgICAgaWYgKHJvdy5fbG9jYWxlID09PSBsb2NhbGUpIHtcbiAgICAgICAgICAgICAgICAgICAgcm93Ll9pbmRleCA9IGxvY2FsZUluZGV4XG4gICAgICAgICAgICAgICAgICAgIGxvY2FsZUluZGV4KytcbiAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgcmVzdWx0W2ZpZWxkLm5hbWVdID0gYmxvY2tzQnlQYXRoLnJlZHVjZSgoYWNjLCByb3csIGkpID0+IHtcbiAgICAgICAgICAgICAgZGVsZXRlIHJvdy5fb3JkZXJcbiAgICAgICAgICAgICAgaWYgKHJvdy5fdXVpZCkge1xuICAgICAgICAgICAgICAgIHJvdy5pZCA9IHJvdy5fdXVpZFxuICAgICAgICAgICAgICAgIGRlbGV0ZSByb3cuX3V1aWRcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICBjb25zdCBibG9jayA9IGZpZWxkLmJsb2Nrcy5maW5kKCh7IHNsdWcgfSkgPT4gc2x1ZyA9PT0gcm93LmJsb2NrVHlwZSlcblxuICAgICAgICAgICAgICBpZiAoYmxvY2spIHtcbiAgICAgICAgICAgICAgICBpZiAoXG4gICAgICAgICAgICAgICAgICAhd2l0aGluQXJyYXlPckJsb2NrTG9jYWxlIHx8XG4gICAgICAgICAgICAgICAgICAod2l0aGluQXJyYXlPckJsb2NrTG9jYWxlICYmIHdpdGhpbkFycmF5T3JCbG9ja0xvY2FsZSA9PT0gcm93Ll9sb2NhbGUpXG4gICAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgICBpZiAocm93Ll9sb2NhbGUpIHtcbiAgICAgICAgICAgICAgICAgICAgZGVsZXRlIHJvdy5fbG9jYWxlXG4gICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICBpZiAodHlwZW9mIHJvdy5faW5kZXggPT09ICdudW1iZXInKSB7XG4gICAgICAgICAgICAgICAgICAgIGkgPSByb3cuX2luZGV4XG4gICAgICAgICAgICAgICAgICAgIGRlbGV0ZSByb3cuX2luZGV4XG4gICAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICAgIGFjYy5wdXNoKFxuICAgICAgICAgICAgICAgICAgICB0cmF2ZXJzZUZpZWxkczxUPih7XG4gICAgICAgICAgICAgICAgICAgICAgYmxvY2tzLFxuICAgICAgICAgICAgICAgICAgICAgIGNvbmZpZyxcbiAgICAgICAgICAgICAgICAgICAgICBkYXRhUmVmOiByb3csXG4gICAgICAgICAgICAgICAgICAgICAgZGVsZXRpb25zLFxuICAgICAgICAgICAgICAgICAgICAgIGZpZWxkUHJlZml4OiAnJyxcbiAgICAgICAgICAgICAgICAgICAgICBmaWVsZHM6IGJsb2NrLmZpZWxkcyxcbiAgICAgICAgICAgICAgICAgICAgICBudW1iZXJzLFxuICAgICAgICAgICAgICAgICAgICAgIHBhdGg6IGAke2Jsb2NrRmllbGRQYXRofS4ke2l9YCxcbiAgICAgICAgICAgICAgICAgICAgICByZWxhdGlvbnNoaXBzLFxuICAgICAgICAgICAgICAgICAgICAgIHRhYmxlOiByb3csXG4gICAgICAgICAgICAgICAgICAgICAgdGV4dHMsXG4gICAgICAgICAgICAgICAgICAgICAgd2l0aGluQXJyYXlPckJsb2NrTG9jYWxlLFxuICAgICAgICAgICAgICAgICAgICB9KSxcbiAgICAgICAgICAgICAgICAgIClcblxuICAgICAgICAgICAgICAgICAgcmV0dXJuIGFjY1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICBhY2MucHVzaCh7fSlcbiAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgIHJldHVybiBhY2NcbiAgICAgICAgICAgIH0sIFtdKVxuICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIHJldHVybiByZXN1bHRcbiAgICAgIH1cblxuICAgICAgaWYgKGZpZWxkLnR5cGUgPT09ICdyZWxhdGlvbnNoaXAnIHx8IGZpZWxkLnR5cGUgPT09ICd1cGxvYWQnKSB7XG4gICAgICAgIGNvbnN0IHJlbGF0aW9uUGF0aE1hdGNoID0gcmVsYXRpb25zaGlwc1tgJHtzYW5pdGl6ZWRQYXRofSR7ZmllbGQubmFtZX1gXVxuICAgICAgICBpZiAoIXJlbGF0aW9uUGF0aE1hdGNoKSB7XG4gICAgICAgICAgaWYgKCdoYXNNYW55JyBpbiBmaWVsZCAmJiBmaWVsZC5oYXNNYW55KSB7XG4gICAgICAgICAgICBpZiAoZmllbGQubG9jYWxpemVkICYmIGNvbmZpZy5sb2NhbGl6YXRpb24gJiYgY29uZmlnLmxvY2FsaXphdGlvbi5sb2NhbGVzKSB7XG4gICAgICAgICAgICAgIHJlc3VsdFtmaWVsZC5uYW1lXSA9IHtcbiAgICAgICAgICAgICAgICBbY29uZmlnLmxvY2FsaXphdGlvbi5kZWZhdWx0TG9jYWxlXTogW10sXG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgIHJlc3VsdFtmaWVsZC5uYW1lXSA9IFtdXG4gICAgICAgICAgICB9XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgcmV0dXJuIHJlc3VsdFxuICAgICAgICB9XG5cbiAgICAgICAgaWYgKGZpZWxkLmxvY2FsaXplZCkge1xuICAgICAgICAgIHJlc3VsdFtmaWVsZC5uYW1lXSA9IHt9XG4gICAgICAgICAgY29uc3QgcmVsYXRpb25zQnlMb2NhbGU6IFJlY29yZDxzdHJpbmcsIFJlY29yZDxzdHJpbmcsIHVua25vd24+W10+ID0ge31cblxuICAgICAgICAgIHJlbGF0aW9uUGF0aE1hdGNoLmZvckVhY2goKHJvdykgPT4ge1xuICAgICAgICAgICAgaWYgKHR5cGVvZiByb3cubG9jYWxlID09PSAnc3RyaW5nJykge1xuICAgICAgICAgICAgICBpZiAoIXJlbGF0aW9uc0J5TG9jYWxlW3Jvdy5sb2NhbGVdKSByZWxhdGlvbnNCeUxvY2FsZVtyb3cubG9jYWxlXSA9IFtdXG4gICAgICAgICAgICAgIHJlbGF0aW9uc0J5TG9jYWxlW3Jvdy5sb2NhbGVdLnB1c2gocm93KVxuICAgICAgICAgICAgfVxuICAgICAgICAgIH0pXG5cbiAgICAgICAgICBPYmplY3QuZW50cmllcyhyZWxhdGlvbnNCeUxvY2FsZSkuZm9yRWFjaCgoW2xvY2FsZSwgcmVsYXRpb25zXSkgPT4ge1xuICAgICAgICAgICAgdHJhbnNmb3JtUmVsYXRpb25zaGlwKHtcbiAgICAgICAgICAgICAgZmllbGQsXG4gICAgICAgICAgICAgIGxvY2FsZSxcbiAgICAgICAgICAgICAgcmVmOiByZXN1bHQsXG4gICAgICAgICAgICAgIHJlbGF0aW9ucyxcbiAgICAgICAgICAgIH0pXG4gICAgICAgICAgfSlcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICB0cmFuc2Zvcm1SZWxhdGlvbnNoaXAoe1xuICAgICAgICAgICAgZmllbGQsXG4gICAgICAgICAgICByZWY6IHJlc3VsdCxcbiAgICAgICAgICAgIHJlbGF0aW9uczogcmVsYXRpb25QYXRoTWF0Y2gsXG4gICAgICAgICAgICB3aXRoaW5BcnJheU9yQmxvY2t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0ZXh0Um93czogdGV4dHMsXG4gICAgICAgICAgICB9KVxuICAgICAgICAgIH0pXG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgdHJhbnNmb3JtSGFzTWFueVRleHQoe1xuICAgICAgICAgICAgZmllbGQsXG4gICAgICAgICAgICByZWY6IHJlc3VsdCxcbiAgICAgICAgICAgIHRleHRSb3dzOiB0ZXh0UGF0aE1hdGNoLFxuICAgICAgICAgICAgd2l0aGluQXJyYXlPckJsb2NrTG9jYWxlLFxuICAgICAgICAgIH0pXG4gICAgICAgIH1cblxuICAgICAgICByZXR1cm4gcmVzdWx0XG4gICAgICB9XG5cbiAgICAgIGlmIChmaWVsZC50eXBlID09PSAnbnVtYmVyJyAmJiBmaWVsZC5oYXNNYW55KSB7XG4gICAgICAgIGNvbnN0IG51bWJlclBhdGhNYXRjaCA9IG51bWJlcnNbYCR7c2FuaXRpemVkUGF0aH0ke2ZpZWxkLm5hbWV9YF1cbiAgICAgICAgaWYgKCFudW1iZXJQYXRoTWF0Y2gpIHJldHVybiByZXN1bHRcblxuICAgICAgICBpZiAoZmllbGQubG9jYWxpemVkKSB7XG4gICAgICAgICAgcmVzdWx0W2ZpZWxkLm5hbWVdID0ge31cbiAgICAgICAgICBjb25zdCBudW1iZXJzQnlMb2NhbGU6IFJlY29yZDxzdHJpbmcsIFJlY29yZDxzdHJpbmcsIHVua25vd24+W10+ID0ge31cblxuICAgICAgICAgIG51bWJlclBhdGhNYXRjaC5mb3JFYWNoKChyb3cpID0+IHtcbiAgICAgICAgICAgIGlmICh0eXBlb2Ygcm93LmxvY2FsZSA9PT0gJ3N0cmluZycpIHtcbiAgICAgICAgICAgICAgaWYgKCFudW1iZXJzQnlMb2NhbGVbcm93LmxvY2FsZV0pIG51bWJlcnNCeUxvY2FsZVtyb3cubG9jYWxlXSA9IFtdXG4gICAgICAgICAgICAgIG51bWJlcnNCeUxvY2FsZVtyb3cubG9jYWxlXS5wdXNoKHJvdylcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9KVxuXG4gICAgICAgICAgT2JqZWN0LmVudHJpZXMobnVtYmVyc0J5TG9jYWxlKS5mb3JFYWNoKChbbG9jYWxlLCBudW1iZXJzXSkgPT4ge1xuICAgICAgICAgICAgdHJhbnNmb3JtSGFzTWFueU51bWJlcih7XG4gICAgICAgICAgICAgIGZpZWxkLFxuICAgICAgICAgICAgICBsb2NhbGUsXG4gICAgICAgICAgICAgIG51bWJlclJvd3M6IG51bWJlcnMsXG4gICAgICAgICAgICAgIHJlZjogcmVzdWx0LFxuICAgICAgICAgICAgfSlcbiAgICAgICAgICB9KVxuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgIHRyYW5zZm9ybUhhc01hbnlOdW1iZXIoe1xuICAgICAgICAgICAgZmllbGQsXG4gICAgICAgICAgICBudW1iZXJSb3dzOiBudW1iZXJQYXRoTWF0Y2gsXG4gICAgICAgICAgICByZWY6IHJlc3VsdCxcbiAgICAgICAgICAgIHdpdGhpbkFycmF5T3JCbG9ja0xvY2FsZSxcbiAgICAgICAgICB9KVxuICAgICAgICB9XG5cbiAgICAgICAgcmV0dXJuIHJlc3VsdFxuICAgICAgfVxuXG4gICAgICBpZiAoZmllbGQudHlwZSA9PT0gJ3NlbGVjdCcgJiYgZmllbGQuaGFzTWFueSkge1xuICAgICAgICBpZiAoQXJyYXkuaXNBcnJheShmaWVsZERhdGEpKSB7XG4gICAgICAgICAgaWYgKGZpZWxkLmxvY2FsaXplZCkge1xuICAgICAgICAgICAgcmVzdWx0W2ZpZWxkLm5hbWVdID0gZmllbGREYXRhLnJlZHVjZSgoc2VsZWN0UmVzdWx0LCByb3cpID0+IHtcbiAgICAgICAgICAgICAgaWYgKHR5cGVvZiByb3cubG9jYWxlID09PSAnc3RyaW5nJykge1xuICAgICAgICAgICAgICAgIGlmICghc2VsZWN0UmVzdWx0W3Jvdy5sb2NhbGVdKSBzZWxlY3RSZXN1bHRbcm93LmxvY2FsZV0gPSBbXVxuICAgICAgICAgICAgICAgIHNlbGVjdFJlc3VsdFtyb3cubG9jYWxlXS5wdXNoKHJvdy52YWx1ZSlcbiAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgIHJldHVybiBzZWxlY3RSZXN1bHRcbiAgICAgICAgICAgIH0sIHt9KVxuICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICBsZXQgc2VsZWN0RGF0YSA9IGZpZWxkRGF0YVxuICAgICAgICAgICAgaWYgKHdpdGhpbkFycmF5T3JCbG9ja0xvY2FsZSkge1xuICAgICAgICAgICAgICBzZWxlY3REYXRhID0gc2VsZWN0RGF0YS5maWx0ZXIoKHsgbG9jYWxlIH0pID0+IGxvY2FsZSA9PT0gd2l0aGluQXJyYXlPckJsb2NrTG9jYWxlKVxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmVzdWx0W2ZpZWxkLm5hbWVdID0gc2VsZWN0RGF0YS5tYXAoKHsgdmFsdWUgfSkgPT4gdmFsdWUpXG4gICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIHJldHVybiByZXN1bHRcbiAgICAgIH1cblxuICAgICAgY29uc3QgbG9jYWxpemVkRmllbGREYXRhID0ge31cbiAgICAgIGNvbnN0IHZhbHVlc1RvVHJhbnNmb3JtOiB7XG4gICAgICAgIHJlZjogUmVjb3JkPHN0cmluZywgdW5rbm93bj5cbiAgICAgICAgdGFibGU6IFJlY29yZDxzdHJpbmcsIHVua25vd24+XG4gICAgICB9W10gPSBbXVxuXG4gICAgICBpZiAoZmllbGQubG9jYWxpemVkICYmIEFycmF5LmlzQXJyYXkodGFibGUuX2xvY2FsZXMpKSB7XG4gICAgICAgIGlmICghdGFibGUuX2xvY2FsZXMubGVuZ3RoICYmIGNvbmZpZy5sb2NhbGl6YXRpb24pIHtcbiAgICAgICAgICBjb25maWcubG9jYWxpemF0aW9uLmxvY2FsZUNvZGVzLmZvckVhY2goKF9sb2NhbGUpID0+XG4gICAgICAgICAgICAodGFibGUuX2xvY2FsZXMgYXMgdW5rbm93bltdKS5wdXNoKHsgX2xvY2FsZSB9KSxcbiAgICAgICAgICApXG4gICAgICAgIH1cblxuICAgICAgICB0YWJsZS5fbG9jYWxlcy5mb3JFYWNoKChsb2NhbGVSb3cpID0+IHtcbiAgICAgICAgICB2YWx1ZXNUb1RyYW5zZm9ybS5wdXNoKHtcbiAgICAgICAgICAgIHJlZjogbG9jYWxpemVkRmllbGREYXRhLFxuICAgICAgICAgICAgdGFibGU6IHtcbiAgICAgICAgICAgICAgLi4udGFibGUsXG4gICAgICAgICAgICAgIC4uLmxvY2FsZVJvdyxcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgfSlcbiAgICAgICAgfSlcbiAgICAgIH0gZWxzZSB7XG4gICAgICAgIHZhbHVlc1RvVHJhbnNmb3JtLnB1c2goeyByZWY6IHJlc3VsdCwgdGFibGUgfSlcbiAgICAgIH1cblxuICAgICAgdmFsdWVzVG9UcmFuc2Zvcm0uZm9yRWFjaCgoeyByZWYsIHRhYmxlIH0pID0+IHtcbiAgICAgICAgY29uc3QgZmllbGREYXRhID0gdGFibGVbYCR7ZmllbGRQcmVmaXggfHwgJyd9JHtmaWVsZC5uYW1lfWBdXG4gICAgICAgIGNvbnN0IGxvY2FsZSA9IHRhYmxlPy5fbG9jYWxlXG5cbiAgICAgICAgc3dpdGNoIChmaWVsZC50eXBlKSB7XG4gICAgICAgICAgY2FzZSAndGFiJzpcbiAgICAgICAgICBjYXNlICdncm91cCc6IHtcbiAgICAgICAgICAgIGNvbnN0IGdyb3VwRmllbGRQcmVmaXggPSBgJHtmaWVsZFByZWZpeCB8fCAnJ30ke2ZpZWxkLm5hbWV9X2BcbiAgICAgICAgICAgIGNvbnN0IGdyb3VwRGF0YSA9IHt9XG4gICAgICAgICAgICBjb25zdCBsb2NhbGUgPSB0YWJsZS5fbG9jYWxlIGFzIHN0cmluZ1xuICAgICAgICAgICAgY29uc3QgcmVmS2V5ID0gZmllbGQubG9jYWxpemVkICYmIGxvY2FsZSA/IGxvY2FsZSA6IGZpZWxkLm5hbWVcblxuICAgICAgICAgICAgaWYgKGZpZWxkLmxvY2FsaXplZCAmJiBsb2NhbGUpIGRlbGV0ZSB0YWJsZS5fbG9jYWxlXG4gICAgICAgICAgICByZWZbcmVmS2V5XSA9IHRyYXZlcnNlRmllbGRzPFJlY29yZDxzdHJpbmcsIHVua25vd24+Pih7XG4gICAgICAgICAgICAgIGJsb2NrcyxcbiAgICAgICAgICAgICAgY29uZmlnLFxuICAgICAgICAgICAgICBkYXRhUmVmOiBncm91cERhdGEgYXMgUmVjb3JkPHN0cmluZywgdW5rbm93bj4sXG4gICAgICAgICAgICAgIGRlbGV0aW9ucyxcbiAgICAgICAgICAgICAgZmllbGRQcmVmaXg6IGdyb3VwRmllbGRQcmVmaXgsXG4gICAgICAgICAgICAgIGZpZWxkczogZmllbGQuZmllbGRzLFxuICAgICAgICAgICAgICBudW1iZXJzLFxuICAgICAgICAgICAgICBwYXRoOiBgJHtzYW5pdGl6ZWRQYXRofSR7ZmllbGQubmFtZX1gLFxuICAgICAgICAgICAgICByZWxhdGlvbnNoaXBzLFxuICAgICAgICAgICAgICB0YWJsZSxcbiAgICAgICAgICAgICAgdGV4dHMsXG4gICAgICAgICAgICAgIHdpdGhpbkFycmF5T3JCbG9ja0xvY2FsZTogbG9jYWxlIHx8IHdpdGhpbkFycmF5T3JCbG9ja0xvY2FsZSxcbiAgICAgICAgICAgIH0pXG5cbiAgICAgICAgICAgIGlmICgnX29yZGVyJyBpbiByZWYpIHtcbiAgICAgICAgICAgICAgZGVsZXRlIHJlZi5fb3JkZXJcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgYnJlYWtcbiAgICAgICAgICB9XG5cbiAgICAgICAgICBjYXNlICd0ZXh0Jzoge1xuICAgICAgICAgICAgbGV0IHZhbCA9IGZpZWxkRGF0YVxuICAgICAgICAgICAgaWYgKHR5cGVvZiBmaWVsZERhdGEgPT09ICdzdHJpbmcnKSB7XG4gICAgICAgICAgICAgIHZhbCA9IFN0cmluZyhmaWVsZERhdGEpXG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIGlmICh0eXBlb2YgbG9jYWxlID09PSAnc3RyaW5nJykge1xuICAgICAgICAgICAgICByZWZbbG9jYWxlXSA9IHZhbFxuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgcmVzdWx0W2ZpZWxkLm5hbWVdID0gdmFsXG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIGJyZWFrXG4gICAgICAgICAgfVxuXG4gICAgICAgICAgY2FzZSAnbnVtYmVyJzoge1xuICAgICAgICAgICAgbGV0IHZhbCA9IGZpZWxkRGF0YVxuICAgICAgICAgICAgaWYgKHR5cGVvZiBmaWVsZERhdGEgPT09ICdzdHJpbmcnKSB7XG4gICAgICAgICAgICAgIHZhbCA9IE51bWJlci5wYXJzZUZsb2F0KGZpZWxkRGF0YSlcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgaWYgKHR5cGVvZiBsb2NhbGUgPT09ICdzdHJpbmcnKSB7XG4gICAgICAgICAgICAgIHJlZltsb2NhbGVdID0gdmFsXG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICByZXN1bHRbZmllbGQubmFtZV0gPSB2YWxcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgYnJlYWtcbiAgICAgICAgICB9XG5cbiAgICAgICAgICBjYXNlICdkYXRlJzoge1xuICAgICAgICAgICAgbGV0IHZhbCA9IGZpZWxkRGF0YVxuXG4gICAgICAgICAgICBpZiAodHlwZW9mIGZpZWxkRGF0YSA9PT0gJ3N0cmluZycpIHtcbiAgICAgICAgICAgICAgdmFsID0gbmV3IERhdGUoZmllbGREYXRhKS50b0lTT1N0cmluZygpXG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIGlmICh0eXBlb2YgbG9jYWxlID09PSAnc3RyaW5nJykge1xuICAgICAgICAgICAgICByZWZbbG9jYWxlXSA9IHZhbFxuICAgICAgICAgIC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VU7Z0NBQzlCK0IsR0FBRyxDQUFDL0IsT0FBTyxHQUFHUjs0QkFDaEIsT0FBTztnQ0FDTFQsTUFBTSxDQUFDQyxNQUFNTyxJQUFJLENBQUMsR0FBR0M7NEJBQ3ZCOzRCQUVBO3dCQUNGO2dCQUNGO1lBQ0Y7WUFFQSxJQUFJbUIsT0FBTzhDLElBQUksQ0FBQ2Isb0JBQW9CdEIsTUFBTSxHQUFHLEdBQUc7Z0JBQzlDdkMsTUFBTSxDQUFDQyxNQUFNTyxJQUFJLENBQUMsR0FBR3FEO1lBQ3ZCO1lBRUEsT0FBTzdEO1FBQ1Q7UUFFQSxPQUFPQTtJQUNULEdBQUdiO0lBRUgsSUFBSXdCLE1BQU1DLE9BQU8sQ0FBQ2xCLE1BQU1xRSxRQUFRLEdBQUc7UUFDakMzRSxVQUFVc0IsSUFBSSxDQUFDLElBQU0sT0FBT2hCLE1BQU1xRSxRQUFRO0lBQzVDO0lBRUEsT0FBT2pFO0FBQ1QifQ==
@@ -20,7 +20,12 @@ type Args = {
20
20
  [tableName: string]: Record<string, unknown>[];
21
21
  };
22
22
  texts: Record<string, unknown>[];
23
+ /**
24
+ * Set to a locale code if this set of fields is traversed within a
25
+ * localized array or block field
26
+ */
27
+ withinArrayOrBlockLocale?: string;
23
28
  };
24
- export declare const transformArray: ({ adapter, arrayTableName, baseTableName, blocks, blocksToDelete, data, field, locale, numbers, path, relationships, relationshipsToDelete, selects, texts, }: Args) => ArrayRowToInsert[];
29
+ export declare const transformArray: ({ adapter, arrayTableName, baseTableName, blocks, blocksToDelete, data, field, locale, numbers, path, relationships, relationshipsToDelete, selects, texts, withinArrayOrBlockLocale, }: Args) => ArrayRowToInsert[];
25
30
  export {};
26
31
  //# sourceMappingURL=array.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"array.d.ts","sourceRoot":"","sources":["../../../src/transform/write/array.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA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