@payloadcms/db-postgres 0.7.0 → 3.0.0-alpha.19

Sign up to get free protection for your applications and to get access to all the features.
Files changed (89) hide show
  1. package/dist/connect.d.ts.map +1 -1
  2. package/dist/connect.js +30 -40
  3. package/dist/create.js +6 -21
  4. package/dist/createGlobal.js +6 -21
  5. package/dist/createGlobalVersion.js +10 -25
  6. package/dist/createMigration.js +11 -26
  7. package/dist/createVersion.js +10 -25
  8. package/dist/deleteMany.js +8 -23
  9. package/dist/deleteOne.js +10 -25
  10. package/dist/deleteVersions.js +10 -25
  11. package/dist/destroy.js +2 -12
  12. package/dist/find/buildFindManyArgs.js +6 -14
  13. package/dist/find/chainMethods.js +2 -11
  14. package/dist/find/findMany.js +14 -29
  15. package/dist/find/traverseFields.js +8 -23
  16. package/dist/find.js +6 -21
  17. package/dist/findGlobal.js +6 -21
  18. package/dist/findGlobalVersions.js +8 -23
  19. package/dist/findOne.js +6 -21
  20. package/dist/findVersions.js +8 -23
  21. package/dist/index.d.ts +3 -2
  22. package/dist/index.d.ts.map +1 -1
  23. package/dist/index.js +76 -88
  24. package/dist/init.js +17 -32
  25. package/dist/migrate.d.ts.map +1 -1
  26. package/dist/migrate.js +15 -33
  27. package/dist/migrateDown.d.ts.map +1 -1
  28. package/dist/migrateDown.js +12 -25
  29. package/dist/migrateFresh.d.ts.map +1 -1
  30. package/dist/migrateFresh.js +15 -31
  31. package/dist/migrateRefresh.d.ts.map +1 -1
  32. package/dist/migrateRefresh.js +18 -29
  33. package/dist/migrateReset.d.ts.map +1 -1
  34. package/dist/migrateReset.js +13 -24
  35. package/dist/migrateStatus.js +9 -19
  36. package/dist/queries/buildAndOrConditions.js +4 -14
  37. package/dist/queries/buildQuery.js +10 -20
  38. package/dist/queries/createJSONQuery/convertPathToJSONTraversal.js +4 -14
  39. package/dist/queries/createJSONQuery/formatJSONPathSegment.js +2 -12
  40. package/dist/queries/createJSONQuery/index.js +6 -16
  41. package/dist/queries/getTableColumnFromPath.js +38 -49
  42. package/dist/queries/operatorMap.js +17 -27
  43. package/dist/queries/parseParams.js +32 -42
  44. package/dist/queries/sanitizeQueryValue.js +8 -18
  45. package/dist/queryDrafts.js +10 -25
  46. package/dist/schema/build.js +49 -64
  47. package/dist/schema/createIndex.js +5 -15
  48. package/dist/schema/idToUUID.js +2 -12
  49. package/dist/schema/parentIDColumnMap.js +7 -17
  50. package/dist/schema/setColumnID.js +10 -20
  51. package/dist/schema/traverseFields.js +62 -77
  52. package/dist/schema/validateExistingBlockIsIdentical.js +9 -19
  53. package/dist/transactions/beginTransaction.js +4 -14
  54. package/dist/transactions/commitTransaction.js +2 -12
  55. package/dist/transactions/rollbackTransaction.js +2 -12
  56. package/dist/transform/read/hasManyNumber.js +2 -12
  57. package/dist/transform/read/hasManyText.js +2 -12
  58. package/dist/transform/read/index.js +12 -20
  59. package/dist/transform/read/relationship.js +2 -12
  60. package/dist/transform/read/traverseFields.js +15 -23
  61. package/dist/transform/write/array.js +6 -16
  62. package/dist/transform/write/blocks.js +6 -21
  63. package/dist/transform/write/index.js +4 -14
  64. package/dist/transform/write/numbers.js +2 -12
  65. package/dist/transform/write/relationships.js +4 -14
  66. package/dist/transform/write/selects.js +4 -14
  67. package/dist/transform/write/texts.js +2 -12
  68. package/dist/transform/write/traverseFields.js +30 -45
  69. package/dist/transform/write/types.js +2 -5
  70. package/dist/types.js +2 -5
  71. package/dist/update.js +11 -26
  72. package/dist/updateGlobal.js +6 -21
  73. package/dist/updateGlobalVersion.js +10 -25
  74. package/dist/updateVersion.js +10 -25
  75. package/dist/upsertRow/deleteExistingArrayRows.js +5 -15
  76. package/dist/upsertRow/deleteExistingRowsByPath.js +9 -19
  77. package/dist/upsertRow/index.d.ts.map +1 -1
  78. package/dist/upsertRow/index.js +25 -36
  79. package/dist/upsertRow/insertArrays.js +2 -12
  80. package/dist/upsertRow/types.js +2 -5
  81. package/dist/utilities/appendPrefixToKeys.js +2 -12
  82. package/dist/utilities/createBlocksMap.js +2 -12
  83. package/dist/utilities/createMigrationTable.js +4 -14
  84. package/dist/utilities/createRelationshipMap.js +2 -12
  85. package/dist/utilities/hasLocalesTable.js +5 -15
  86. package/dist/utilities/isArrayOfRows.js +2 -12
  87. package/dist/utilities/migrationTableExists.js +4 -14
  88. package/dist/utilities/parseError.js +6 -14
  89. package/package.json +6 -6
@@ -1,19 +1,9 @@
1
- /* eslint-disable no-param-reassign */ "use strict";
2
- Object.defineProperty(exports, "__esModule", {
3
- value: true
4
- });
5
- Object.defineProperty(exports, "transformArray", {
6
- enumerable: true,
7
- get: function() {
8
- return transformArray;
9
- }
10
- });
11
- const _isArrayOfRows = require("../../utilities/isArrayOfRows");
12
- const _traverseFields = require("./traverseFields");
13
- const transformArray = ({ adapter, arrayTableName, baseTableName, blocks, blocksToDelete, data, field, locale, texts, numbers, path, relationships, relationshipsToDelete, selects })=>{
1
+ /* eslint-disable no-param-reassign */ import { isArrayOfRows } from '../../utilities/isArrayOfRows';
2
+ import { traverseFields } from './traverseFields';
3
+ export const transformArray = ({ adapter, arrayTableName, baseTableName, blocks, blocksToDelete, data, field, locale, texts, numbers, path, relationships, relationshipsToDelete, selects })=>{
14
4
  const newRows = [];
15
5
  const hasUUID = adapter.tables[arrayTableName]._uuid;
16
- if ((0, _isArrayOfRows.isArrayOfRows)(data)) {
6
+ if (isArrayOfRows(data)) {
17
7
  data.forEach((arrayRow, i)=>{
18
8
  const newRow = {
19
9
  arrays: {},
@@ -39,7 +29,7 @@ const transformArray = ({ adapter, arrayTableName, baseTableName, blocks, blocks
39
29
  if (field.localized) {
40
30
  newRow.row._locale = locale;
41
31
  }
42
- (0, _traverseFields.traverseFields)({
32
+ traverseFields({
43
33
  adapter,
44
34
  arrays: newRow.arrays,
45
35
  baseTableName,
@@ -65,4 +55,4 @@ const transformArray = ({ adapter, arrayTableName, baseTableName, blocks, blocks
65
55
  return newRows;
66
56
  };
67
57
 
68
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3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1g7WUFDRjtZQUVBLElBQUlELE1BQU1zQixTQUFTLEVBQUU7Z0JBQ25CUCxPQUFPRyxHQUFHLENBQUNHLE9BQU8sR0FBR3BCO1lBQ3ZCO1lBRUFULGVBQWU7Z0JBQ2JFO2dCQUNBc0IsUUFBUUQsT0FBT0MsTUFBTTtnQkFDckJwQjtnQkFDQUM7Z0JBQ0FDO2dCQUNBeUIsY0FBYztnQkFDZHhCLE1BQU1jO2dCQUNOVyxhQUFhO2dCQUNiQyxRQUFRekIsTUFBTXlCLE1BQU07Z0JBQ3BCUixTQUFTRixPQUFPRSxPQUFPO2dCQUN2QmY7Z0JBQ0FDO2dCQUNBdUIsaUJBQWlCL0I7Z0JBQ2pCUyxNQUFNLENBQUMsRUFBRUEsUUFBUSxHQUFHLEVBQUVKLE1BQU0yQixJQUFJLENBQUMsQ0FBQyxFQUFFYixFQUFFLENBQUMsQ0FBQztnQkFDeENUO2dCQUNBQztnQkFDQVksS0FBS0gsT0FBT0csR0FBRztnQkFDZlg7WUFDRjtZQUVBQyxRQUFRb0IsSUFBSSxDQUFDYjtRQUNmO0lBQ0Y7SUFFQSxPQUFPUDtBQUNULEVBQUMifQ==
@@ -1,26 +1,11 @@
1
- /* eslint-disable no-param-reassign */ "use strict";
2
- Object.defineProperty(exports, "__esModule", {
3
- value: true
4
- });
5
- Object.defineProperty(exports, "transformBlocks", {
6
- enumerable: true,
7
- get: function() {
8
- return transformBlocks;
9
- }
10
- });
11
- const _tosnakecase = /*#__PURE__*/ _interop_require_default(require("to-snake-case"));
12
- const _traverseFields = require("./traverseFields");
13
- function _interop_require_default(obj) {
14
- return obj && obj.__esModule ? obj : {
15
- default: obj
16
- };
17
- }
18
- const transformBlocks = ({ adapter, baseTableName, blocks, blocksToDelete, data, field, locale, texts, numbers, path, relationships, relationshipsToDelete, selects })=>{
1
+ /* eslint-disable no-param-reassign */ import toSnakeCase from 'to-snake-case';
2
+ import { traverseFields } from './traverseFields';
3
+ export const transformBlocks = ({ adapter, baseTableName, blocks, blocksToDelete, data, field, locale, texts, numbers, path, relationships, relationshipsToDelete, selects })=>{
19
4
  data.forEach((blockRow, i)=>{
20
5
  if (typeof blockRow.blockType !== 'string') return;
21
6
  const matchedBlock = field.blocks.find(({ slug })=>slug === blockRow.blockType);
22
7
  if (!matchedBlock) return;
23
- const blockType = (0, _tosnakecase.default)(blockRow.blockType);
8
+ const blockType = toSnakeCase(blockRow.blockType);
24
9
  if (!blocks[blockType]) blocks[blockType] = [];
25
10
  const newRow = {
26
11
  arrays: {},
@@ -42,7 +27,7 @@ const transformBlocks = ({ adapter, baseTableName, blocks, blocksToDelete, data,
42
27
  newRow.row._uuid = blockRow.id;
43
28
  delete blockRow.id;
44
29
  }
45
- (0, _traverseFields.traverseFields)({
30
+ traverseFields({
46
31
  adapter,
47
32
  arrays: newRow.arrays,
48
33
  baseTableName,
@@ -66,4 +51,4 @@ const transformBlocks = ({ adapter, baseTableName, blocks, blocksToDelete, data,
66
51
  });
67
52
  };
68
53
 
69
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy90cmFuc2Zvcm0vd3JpdGUvYmxvY2tzLnRzIl0sInNvdXJjZXNDb250ZW50IjpbIi8qIGVzbGludC1kaXNhYmxlIG5vLXBhcmFtLXJlYXNzaWduICovXG5pbXBvcnQgdHlwZSB7IEJsb2NrRmllbGQgfSBmcm9tICdwYXlsb2FkL3R5cGVzJ1xuXG5pbXBvcnQgdG9TbmFrZUNhc2UgZnJvbSAndG8tc25ha2UtY2FzZSdcblxuaW1wb3J0IHR5cGUgeyBQb3N0Z3Jlc0FkYXB0ZXIgfSBmcm9tICcuLi8uLi90eXBlcydcbmltcG9ydCB0eXBlIHsgQmxvY2tSb3dUb0luc2VydCwgUmVsYXRpb25zaGlwVG9EZWxldGUgfSBmcm9tICcuL3R5cGVzJ1xuXG5pbXBvcnQgeyB0cmF2ZXJzZUZpZWxkcyB9IGZyb20gJy4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ign */ "use strict";
2
- Object.defineProperty(exports, "__esModule", {
3
- value: true
4
- });
5
- Object.defineProperty(exports, "transformForWrite", {
6
- enumerable: true,
7
- get: function() {
8
- return transformForWrite;
9
- }
10
- });
11
- const _traverseFields = require("./traverseFields");
12
- const transformForWrite = ({ adapter, data, fields, path = '', tableName })=>{
1
+ /* eslint-disable no-param-reassign */ import { traverseFields } from './traverseFields';
2
+ export const transformForWrite = ({ adapter, data, fields, path = '', tableName })=>{
13
3
  // Split out the incoming data into rows to insert / delete
14
4
  const rowToInsert = {
15
5
  arrays: {},
@@ -25,7 +15,7 @@ const transformForWrite = ({ adapter, data, fields, path = '', tableName })=>{
25
15
  };
26
16
  // This function is responsible for building up the
27
17
  // above rowToInsert
28
- (0, _traverseFields.traverseFields)({
18
+ traverseFields({
29
19
  adapter,
30
20
  arrays: rowToInsert.arrays,
31
21
  baseTableName: tableName,
@@ -48,4 +38,4 @@ const transformForWrite = ({ adapter, data, fields, path = '', tableName })=>{
48
38
  return rowToInsert;
49
39
  };
50
40
 
51
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy90cmFuc2Zvcm0vd3JpdGUvaW5kZXgudHMiXSwic291cmNlc0NvbnRlbnQiOlsiLyogZXNsaW50LWRpc2FibGUgbm8tcGFyYW0tcmVhc3NpZ24gKi9cbmltcG9ydCB0eXBlIHsgRmllbGQgfSBmcm9tICdwYXlsb2FkL3R5cGVzJ1xuXG5pbXBvcnQgdHlwZSB7IFBvc3RncmVzQWRhcHRlciB9IGZyb20gJy4uLy4uL3R5cGVzJ1xuaW1wb3J0IHR5cGUgeyBSb3dUb0luc2VydCB9IGZyb20gJy4vdHlwZXMnXG5cbmltcG9ydCB7IHRyYXZlcnNlRmllbGRzIH0gZnJvbSAnLi90cmF2ZXJzZUZpZWxkcydcblxudHlwZSBBcmdzID0ge1xuICBhZGFwdGVyOiBQb3N0Z3Jlc0FkYXB0ZXJcb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ULFlBQVlTLHFCQUFxQjtRQUN4REMsS0FBS1YsWUFBWVUsR0FBRztRQUNwQkMsU0FBU1gsWUFBWVcsT0FBTztJQUM5QjtJQUVBLE9BQU9YO0FBQ1QsRUFBQyJ9
@@ -1,14 +1,4 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", {
3
- value: true
4
- });
5
- Object.defineProperty(exports, "transformNumbers", {
6
- enumerable: true,
7
- get: function() {
8
- return transformNumbers;
9
- }
10
- });
11
- const transformNumbers = ({ baseRow, data, numbers })=>{
1
+ export const transformNumbers = ({ baseRow, data, numbers })=>{
12
2
  data.forEach((val, i)=>{
13
3
  numbers.push({
14
4
  ...baseRow,
@@ -18,4 +8,4 @@ const transformNumbers = ({ baseRow, data, numbers })=>{
18
8
  });
19
9
  };
20
10
 
21
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy90cmFuc2Zvcm0vd3JpdGUvbnVtYmVycy50cyJdLCJzb3VyY2VzQ29udGVudCI6WyJ0eXBlIEFyZ3MgPSB7XG4gIGJhc2VSb3c6IFJlY29yZDxzdHJpbmcsIHVua25vd24+XG4gIGRhdGE6IHVua25vd25bXVxuICBudW1iZXJzOiBSZWNvcmQ8c3RyaW5nLCB1bmtub3duPltdXG59XG5cbmV4cG9ydCBjb25zdCB0cmFuc2Zvcm1OdW1iZXJzID0gKHsgYmFzZVJvdywgZGF0YSwgbnVtYmVycyB9OiBBcmdzKSA9PiB7XG4gIGRhdGEuZm9yRWFjaCgodmFsLCBpKSA9PiB7XG4gICAgbnVtYmVycy5wdXNoKHtcbiAgICAgIC4uLmJhc2VSb3csXG4gICAgICBudW1iZXI6IHZhbCxcbiAgICAgIG9yZGVyOiBpICsgMSxcbiAgICB9KVxuICB9KVxufVxuIl0sIm5hbWVzIjpbInRyYW5zZm9ybU51bWJlcnMiLCJiYXNlUm93IiwiZGF0YSIsIm51bWJlcnMiLCJmb3JFYWNoI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kFBbUIsQ0FBQyxFQUFFQyxPQUFPLEVBQUVDLElBQUksRUFBRUMsT0FBTyxFQUFRO0lBQy9ERCxLQUFLRSxPQUFPLENBQUMsQ0FBQ0MsS0FBS0M7UUFDakJILFFBQVFJLElBQUksQ0FBQztZQUNYLEdBQUdOLE9BQU87WUFDVk8sUUFBUUg7WUFDUkksT0FBT0gsSUFBSTtRQUNiO0lBQ0Y7QUFDRixFQUFDIn0=
@@ -1,15 +1,5 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", {
3
- value: true
4
- });
5
- Object.defineProperty(exports, "transformRelationship", {
6
- enumerable: true,
7
- get: function() {
8
- return transformRelationship;
9
- }
10
- });
11
- const _types = require("payload/types");
12
- const transformRelationship = ({ baseRow, data, field, relationships })=>{
1
+ import { valueIsValueWithRelation } from 'payload/types';
2
+ export const transformRelationship = ({ baseRow, data, field, relationships })=>{
13
3
  const relations = Array.isArray(data) ? data : [
14
4
  data
15
5
  ];
@@ -19,7 +9,7 @@ const transformRelationship = ({ baseRow, data, field, relationships })=>{
19
9
  ...baseRow
20
10
  };
21
11
  if ('hasMany' in field && field.hasMany) relationRow.order = i + 1;
22
- if (Array.isArray(field.relationTo) && (0, _types.valueIsValueWithRelation)(relation)) {
12
+ if (Array.isArray(field.relationTo) && valueIsValueWithRelation(relation)) {
23
13
  relationRow[`${relation.relationTo}ID`] = relation.value;
24
14
  relationships.push(relationRow);
25
15
  } else {
@@ -30,4 +20,4 @@ const transformRelationship = ({ baseRow, data, field, relationships })=>{
30
20
  });
31
21
  };
32
22
 
33
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy90cmFuc2Zvcm0vd3JpdGUvcmVsYXRpb25zaGlwcy50cyJdLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgdHlwZSB7IFJlbGF0aW9uc2hpcEZpZWxkLCBVcGxvYWRGaWVsZCB9IGZyb20gJ3BheWxvYW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BVUcsT0FBTyxDQUFDLENBQUNDLFVBQVVDO1FBQzNCLElBQUlELFVBQVU7WUFDWixNQUFNRSxjQUFjO2dCQUFFLEdBQUdWLE9BQU87WUFBQztZQUNqQyxJQUFJLGFBQWFFLFNBQVNBLE1BQU1TLE9BQU8sRUFBRUQsWUFBWUUsS0FBSyxHQUFHSCxJQUFJO1lBRWpFLElBQUlKLE1BQU1DLE9BQU8sQ0FBQ0osTUFBTVcsVUFBVSxLQUFLZix5QkFBeUJVLFdBQVc7Z0JBQ3pFRSxXQUFXLENBQUMsQ0FBQyxFQUFFRixTQUFTSyxVQUFVLENBQUMsRUFBRSxDQUFDLENBQUMsR0FBR0wsU0FBU00sS0FBSztnQkFDeERYLGNBQWNZLElBQUksQ0FBQ0w7WUFDckIsT0FBTztnQkFDTEEsV0FBVyxDQUFDLENBQUMsRUFBRVIsTUFBTVcsVUFBVSxDQUFDLEVBQUUsQ0FBQyxDQUFDLEdBQUdMO2dCQUN2QyxJQUFJQSxVQUFVTCxjQUFjWSxJQUFJLENBQUNMO1lBQ25DO1FBQ0Y7SUFDRjtBQUNGLEVBQUMifQ==
@@ -1,17 +1,7 @@
1
- /* eslint-disable no-param-reassign */ "use strict";
2
- Object.defineProperty(exports, "__esModule", {
3
- value: true
4
- });
5
- Object.defineProperty(exports, "transformSelects", {
6
- enumerable: true,
7
- get: function() {
8
- return transformSelects;
9
- }
10
- });
11
- const _isArrayOfRows = require("../../utilities/isArrayOfRows");
12
- const transformSelects = ({ id, data, locale })=>{
1
+ /* eslint-disable no-param-reassign */ import { isArrayOfRows } from '../../utilities/isArrayOfRows';
2
+ export const transformSelects = ({ id, data, locale })=>{
13
3
  const newRows = [];
14
- if ((0, _isArrayOfRows.isArrayOfRows)(data)) {
4
+ if (isArrayOfRows(data)) {
15
5
  data.forEach((value, i)=>{
16
6
  const newRow = {
17
7
  order: i + 1,
@@ -27,4 +17,4 @@ const transformSelects = ({ id, data, locale })=>{
27
17
  return newRows;
28
18
  };
29
19
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@ -1,14 +1,4 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", {
3
- value: true
4
- });
5
- Object.defineProperty(exports, "transformTexts", {
6
- enumerable: true,
7
- get: function() {
8
- return transformTexts;
9
- }
10
- });
11
- const transformTexts = ({ baseRow, data, texts })=>{
1
+ export const transformTexts = ({ baseRow, data, texts })=>{
12
2
  data.forEach((val, i)=>{
13
3
  texts.push({
14
4
  ...baseRow,
@@ -18,4 +8,4 @@ const transformTexts = ({ baseRow, data, texts })=>{
18
8
  });
19
9
  };
20
10
 
21
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy90cmFuc2Zvcm0vd3JpdGUvdGV4dHMudHMiXSwic291cmNlc0NvbnRlbnQiOlsidHlwZSBBcmdzID0ge1xuICBiYXNlUm93OiBSZWNvcmQ8c3RyaW5nLCB1bmtub3duPlxuICBkYXRhOiB1bmtub3duW11cbiAgdGV4dHM6IFJlY29yZDxzdHJpbmcsIHVua25vd24+W11cbn1cblxuZXhwb3J0IGNvbnN0IHRyYW5zZm9ybVRleHRzID0gKHsgYmFzZVJvdywgZGF0YSwgdGV4dHMgfTogQXJncykgPT4ge1xuICBkYXRhLmZvckVhY2goKHZhbCwgaSkgPT4ge1xuICAgIHRleHRzLnB1c2goe1xuICAgICAgLi4uYmFzZVJvdyxcbiAgICAgIHRleHQ6IHZhbCxcbiAgICAgIG9yZGVyOiBpICsgMSxcbiAgICB9KVxuICB9KVxufVxuIl0sIm5hbWVzIjpbInRyYW5zZm9ybVRleHRzIiwiYmFzZVJvdyIsImRhdGEiLCJ0ZXh0cyIsImZvckVhY2giLCJ2YWwiLCJpIiwicHVzaCIsInRleHQiLCJvcmRlciJdLCJtYXBwaW5ncyI6Ijs7OzsrQkFNYUE7OztlQUFBQTs7O0FBQU4sTUFBTUEsaUJBQWlCLENBQUMsRUFBRUMsT0FBTyxFQUFFQyxJQUFJLEVBQUVDLEtBQUssR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