@ember-data-mirror/serializer 4.13.0-alpha.1

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 (52) hide show
  1. package/LICENSE.md +11 -0
  2. package/README.md +107 -0
  3. package/addon-main.cjs +5 -0
  4. package/blueprints/serializer/files/__root__/__path__/__name__.js +4 -0
  5. package/blueprints/serializer/index.js +80 -0
  6. package/blueprints/serializer/native-files/__root__/__path__/__name__.js +4 -0
  7. package/blueprints/serializer-test/index.js +35 -0
  8. package/blueprints/serializer-test/qunit-files/__root__/__path__/__test__.js +23 -0
  9. package/blueprints/transform/files/__root__/__path__/__name__.js +13 -0
  10. package/blueprints/transform/index.js +17 -0
  11. package/blueprints/transform/native-files/__root__/__path__/__name__.js +13 -0
  12. package/blueprints/transform-test/index.js +35 -0
  13. package/blueprints/transform-test/qunit-files/__root__/__path__/__test__.js +12 -0
  14. package/dist/index.js +304 -0
  15. package/dist/index.js.map +1 -0
  16. package/dist/json-BwMH6O_R.js +1396 -0
  17. package/dist/json-BwMH6O_R.js.map +1 -0
  18. package/dist/json-api.js +529 -0
  19. package/dist/json-api.js.map +1 -0
  20. package/dist/json.js +6 -0
  21. package/dist/json.js.map +1 -0
  22. package/dist/rest.js +1270 -0
  23. package/dist/rest.js.map +1 -0
  24. package/dist/transform.js +336 -0
  25. package/dist/transform.js.map +1 -0
  26. package/package.json +116 -0
  27. package/unstable-preview-types/-private/embedded-records-mixin.d.ts +102 -0
  28. package/unstable-preview-types/-private/embedded-records-mixin.d.ts.map +1 -0
  29. package/unstable-preview-types/-private/transforms/boolean.d.ts +52 -0
  30. package/unstable-preview-types/-private/transforms/boolean.d.ts.map +1 -0
  31. package/unstable-preview-types/-private/transforms/boolean.type-test.d.ts +4 -0
  32. package/unstable-preview-types/-private/transforms/boolean.type-test.d.ts.map +1 -0
  33. package/unstable-preview-types/-private/transforms/date.d.ts +33 -0
  34. package/unstable-preview-types/-private/transforms/date.d.ts.map +1 -0
  35. package/unstable-preview-types/-private/transforms/number.d.ts +34 -0
  36. package/unstable-preview-types/-private/transforms/number.d.ts.map +1 -0
  37. package/unstable-preview-types/-private/transforms/string.d.ts +34 -0
  38. package/unstable-preview-types/-private/transforms/string.d.ts.map +1 -0
  39. package/unstable-preview-types/-private/transforms/transform.d.ts +126 -0
  40. package/unstable-preview-types/-private/transforms/transform.d.ts.map +1 -0
  41. package/unstable-preview-types/-private/utils.d.ts +6 -0
  42. package/unstable-preview-types/-private/utils.d.ts.map +1 -0
  43. package/unstable-preview-types/index.d.ts +277 -0
  44. package/unstable-preview-types/index.d.ts.map +1 -0
  45. package/unstable-preview-types/json-api.d.ts +527 -0
  46. package/unstable-preview-types/json-api.d.ts.map +1 -0
  47. package/unstable-preview-types/json.d.ts +1093 -0
  48. package/unstable-preview-types/json.d.ts.map +1 -0
  49. package/unstable-preview-types/rest.d.ts +570 -0
  50. package/unstable-preview-types/rest.d.ts.map +1 -0
  51. package/unstable-preview-types/transform.d.ts +11 -0
  52. package/unstable-preview-types/transform.d.ts.map +1 -0
@@ -0,0 +1,527 @@
1
+ declare module '@ember-data-mirror/serializer/json-api' {
2
+ export default JSONAPISerializer;
3
+ /**
4
+ * <blockquote style="margin: 1em; padding: .1em 1em .1em 1em; border-left: solid 1em #E34C32; background: #e0e0e0;">
5
+ <p>
6
+ ⚠️ <strong>This is LEGACY documentation</strong> for a feature that is no longer encouraged to be used.
7
+ If starting a new app or thinking of implementing a new adapter, consider writing a
8
+ <a href="/ember-data/release/classes/%3CInterface%3E%20Handler">Handler</a> instead to be used with the <a href="https://github.com/emberjs/data/tree/main/packages/request#readme">RequestManager</a>
9
+ </p>
10
+ </blockquote>
11
+
12
+ In EmberData a Serializer is used to serialize and deserialize
13
+ records when they are transferred in and out of an external source.
14
+ This process involves normalizing property names, transforming
15
+ attribute values and serializing relationships.
16
+
17
+ `JSONAPISerializer` supports the http://jsonapi.org/ spec and is the
18
+ serializer recommended by Ember Data.
19
+
20
+ This serializer normalizes a JSON API payload that looks like:
21
+
22
+ ```app/models/player.js
23
+ import Model, { attr, belongsTo } from '@ember-data-mirror/model';
24
+
25
+ export default class Player extends Model {
26
+ @attr('string') name;
27
+ @attr('string') skill;
28
+ @attr('number') gamesPlayed;
29
+ @belongsTo('club') club;
30
+ }
31
+ ```
32
+
33
+ ```app/models/club.js
34
+ import Model, { attr, hasMany } from '@ember-data-mirror/model';
35
+
36
+ export default class Club extends Model {
37
+ @attr('string') name;
38
+ @attr('string') location;
39
+ @hasMany('player') players;
40
+ }
41
+ ```
42
+
43
+ ```js
44
+ {
45
+ "data": [
46
+ {
47
+ "attributes": {
48
+ "name": "Benfica",
49
+ "location": "Portugal"
50
+ },
51
+ "id": "1",
52
+ "relationships": {
53
+ "players": {
54
+ "data": [
55
+ {
56
+ "id": "3",
57
+ "type": "players"
58
+ }
59
+ ]
60
+ }
61
+ },
62
+ "type": "clubs"
63
+ }
64
+ ],
65
+ "included": [
66
+ {
67
+ "attributes": {
68
+ "name": "Eusebio Silva Ferreira",
69
+ "skill": "Rocket shot",
70
+ "games-played": 431
71
+ },
72
+ "id": "3",
73
+ "relationships": {
74
+ "club": {
75
+ "data": {
76
+ "id": "1",
77
+ "type": "clubs"
78
+ }
79
+ }
80
+ },
81
+ "type": "players"
82
+ }
83
+ ]
84
+ }
85
+ ```
86
+
87
+ to the format that the Ember Data store expects.
88
+
89
+ ### Customizing meta
90
+
91
+ Since a JSON API Document can have meta defined in multiple locations you can
92
+ use the specific serializer hooks if you need to customize the meta.
93
+
94
+ One scenario would be to camelCase the meta keys of your payload. The example
95
+ below shows how this could be done using `normalizeArrayResponse` and
96
+ `extractRelationship`.
97
+
98
+ ```app/serializers/application.js
99
+ import JSONAPISerializer from '@ember-data-mirror/serializer/json-api';
100
+
101
+ export default class ApplicationSerializer extends JSONAPISerializer {
102
+ normalizeArrayResponse(store, primaryModelClass, payload, id, requestType) {
103
+ let normalizedDocument = super.normalizeArrayResponse(...arguments);
104
+
105
+ // Customize document meta
106
+ normalizedDocument.meta = camelCaseKeys(normalizedDocument.meta);
107
+
108
+ return normalizedDocument;
109
+ }
110
+
111
+ extractRelationship(relationshipHash) {
112
+ let normalizedRelationship = super.extractRelationship(...arguments);
113
+
114
+ // Customize relationship meta
115
+ normalizedRelationship.meta = camelCaseKeys(normalizedRelationship.meta);
116
+
117
+ return normalizedRelationship;
118
+ }
119
+ }
120
+ ```
121
+
122
+ @main @ember-data-mirror/serializer/json-api
123
+ @since 1.13.0
124
+ @class JSONAPISerializer
125
+ @public
126
+ @extends JSONSerializer
127
+ */
128
+ const JSONAPISerializer: Readonly<Readonly<typeof import("@ember-data-mirror/serializer").default> & (new (owner?: import("@ember/-internals/owner").default) => import(".").default) & {
129
+ primaryKey: string;
130
+ mergedProperties: Object;
131
+ applyTransforms(typeClass: Model, data: Object): Object;
132
+ normalizeResponse(store: Store, primaryModelClass: Model, payload: Object, id: string | number, requestType: string, ...args: any[]): Object;
133
+ normalizeFindRecordResponse(store: Store, primaryModelClass: Model, payload: Object, id: string | number, requestType: string, ...args: any[]): Object;
134
+ normalizeQueryRecordResponse(store: Store, primaryModelClass: Model, payload: Object, id: string | number, requestType: string, ...args: any[]): Object;
135
+ normalizeFindAllResponse(store: Store, primaryModelClass: Model, payload: Object, id: string | number, requestType: string, ...args: any[]): Object;
136
+ normalizeFindBelongsToResponse(store: Store, primaryModelClass:
137
+ /**
138
+ Dasherizes and singularizes the model name in the payload to match
139
+ the format Ember Data uses internally for the model name.
140
+
141
+ For example the key `posts` would be converted to `post` and the
142
+ key `studentAssesments` would be converted to `student-assesment`.
143
+
144
+ @method modelNameFromPayloadKey
145
+ @public
146
+ @param {String} key
147
+ @return {String} the model's modelName
148
+ */
149
+ Model, payload: Object, id: string | number, requestType: string, ...args: any[]): Object;
150
+ normalizeFindHasManyResponse(store: Store, primaryModelClass: Model, payload: Object, id: string | number, requestType: string, ...args: any[]): Object;
151
+ normalizeFindManyResponse(store: Store, primaryModelClass: Model, payload: Object, id: string | number, requestType: string, ...args: any[]): Object;
152
+ normalizeQueryResponse(store: Store, primaryModelClass: Model, payload: Object, id: string | number, requestType: string, ...args: any[]): Object;
153
+ normalizeCreateRecordResponse(store: Store, primaryModelClass: Model, payload: Object, id: string | number, requestType: string, ...args: any[]): Object;
154
+ normalizeDeleteRecordResponse(store: Store, primaryModelClass: Model, payload: Object, id: string | number, requestType: string, ...args: any[]): Object;
155
+ normalizeUpdateRecordResponse(store: Store, primaryModelClass: Model, payload: Object, id: string | number, requestType: string, ...args: any[]): Object;
156
+ normalizeSaveResponse(store: Store, primaryModelClass: Model, payload: Object, id: string | number, requestType: string, ...args: any[]): Object;
157
+ normalizeSingleResponse(store: Store, primaryModelClass: Model, payload: Object, id: string | number, requestType: string): Object;
158
+ normalizeArrayResponse(store: Store, primaryModelClass: Model, payload: Object, id: string | number, requestType: string): Object;
159
+ _normalizeResponse(store: Store, primaryModelClass: Model, payload: Object, id: string | number, requestType: string, isSingle: boolean): Object;
160
+ normalize(modelClass: any, resourceHash: any): Object;
161
+ extractId(modelClass: Object, resourceHash: Object): string;
162
+ extractAttributes(modelClass: Object, resourceHash: Object): Object;
163
+ extractRelationship(relationshipModelName: Object, relationshipHash: Object): Object;
164
+ extractPolymorphicRelationship(relationshipModelName: Object, relationshipHash: Object, relationshipOptions: Object): Object;
165
+ extractRelationships(modelClass: Object, resourceHash: Object): Object;
166
+ modelNameFromPayloadKey(key: string): string;
167
+ normalizeRelationships(typeClass: any, hash: any): void;
168
+ normalizeUsingDeclaredMapping(modelClass: any, hash: any): void;
169
+ _getMappedKey(key: string, modelClass: any): string;
170
+ _canSerialize(key: string): boolean;
171
+ _mustSerialize(key: string): boolean;
172
+ shouldSerializeHasMany(snapshot: Snapshot, key: string, relationship: RelationshipSchema): boolean;
173
+ serialize(snapshot: Snapshot, options: Object): Object;
174
+ serializeIntoHash(hash: Object, typeClass: Model, snapshot: Snapshot, options: Object): void;
175
+ serializeAttribute(snapshot: Snapshot, json: Object, key: string, attribute: Object): void;
176
+ serializeBelongsTo(snapshot: Snapshot, json: Object, relationship: Object): void;
177
+ serializeHasMany(snapshot: Snapshot, json: Object, relationship: Object): void;
178
+ serializePolymorphicType(): void;
179
+ extractMeta(store: Store, modelClass: Model, payload: Object): any;
180
+ extractErrors(store: Store, typeClass: Model, payload: Object, id: (string | number)): Object;
181
+ keyForAttribute(key: string, method: string): string;
182
+ keyForRelationship(key: string, typeClass: string, method: string): string;
183
+ keyForLink(key: string, kind: string): string;
184
+ transformFor(attributeType: string, skipAssertion: boolean): Transform;
185
+ }> & (new (owner?: import("@ember-data-mirror/serializer/@ember/-internals/owner").default) => import(".").default) & {
186
+ /**
187
+ @method _normalizeDocumentHelper
188
+ @param {Object} documentHash
189
+ @return {Object}
190
+ @private
191
+ */
192
+ _normalizeDocumentHelper(documentHash: Object): Object;
193
+ /**
194
+ @method _normalizeRelationshipDataHelper
195
+ @param {Object} relationshipDataHash
196
+ @return {Object}
197
+ @private
198
+ */
199
+ _normalizeRelationshipDataHelper(relationshipDataHash: Object): Object;
200
+ /**
201
+ @method _normalizeResourceHelper
202
+ @param {Object} resourceHash
203
+ @return {Object}
204
+ @private
205
+ */
206
+ _normalizeResourceHelper(resourceHash: Object): Object;
207
+ /**
208
+ Normalize some data and push it into the store.
209
+
210
+ @method pushPayload
211
+ @public
212
+ @param {Store} store
213
+ @param {Object} payload
214
+ */
215
+ pushPayload(store: Store, payload: Object): void;
216
+ /**
217
+ @method _normalizeResponse
218
+ @param {Store} store
219
+ @param {Model} primaryModelClass
220
+ @param {Object} payload
221
+ @param {String|Number} id
222
+ @param {String} requestType
223
+ @param {Boolean} isSingle
224
+ @return {Object} JSON-API Document
225
+ @private
226
+ */
227
+ _normalizeResponse(store: Store, primaryModelClass: Model, payload: Object, id: string | number, requestType: string, isSingle: boolean): Object;
228
+ normalizeQueryRecordResponse(...args: any[]): any;
229
+ extractAttributes(modelClass: any, resourceHash: any): {};
230
+ /**
231
+ Returns a relationship formatted as a JSON-API "relationship object".
232
+
233
+ http://jsonapi.org/format/#document-resource-object-relationships
234
+
235
+ @method extractRelationship
236
+ @public
237
+ @param {Object} relationshipHash
238
+ @return {Object}
239
+ */
240
+ extractRelationship(relationshipHash: Object): Object;
241
+ /**
242
+ Returns the resource's relationships formatted as a JSON-API "relationships object".
243
+
244
+ http://jsonapi.org/format/#document-resource-object-relationships
245
+
246
+ @method extractRelationships
247
+ @public
248
+ @param {Object} modelClass
249
+ @param {Object} resourceHash
250
+ @return {Object}
251
+ */
252
+ extractRelationships(modelClass: Object, resourceHash: Object): Object;
253
+ /**
254
+ @method _extractType
255
+ @param {Model} modelClass
256
+ @param {Object} resourceHash
257
+ @return {String}
258
+ @private
259
+ */
260
+ _extractType(modelClass: Model, resourceHash: Object): string;
261
+ /**
262
+ Dasherizes and singularizes the model name in the payload to match
263
+ the format Ember Data uses internally for the model name.
264
+
265
+ For example the key `posts` would be converted to `post` and the
266
+ key `studentAssesments` would be converted to `student-assesment`.
267
+
268
+ @method modelNameFromPayloadKey
269
+ @public
270
+ @param {String} key
271
+ @return {String} the model's modelName
272
+ */
273
+ modelNameFromPayloadKey(key: string): string;
274
+ /**
275
+ Converts the model name to a pluralized version of the model name.
276
+
277
+ For example `post` would be converted to `posts` and
278
+ `student-assesment` would be converted to `student-assesments`.
279
+
280
+ @method payloadKeyFromModelName
281
+ @public
282
+ @param {String} modelName
283
+ @return {String}
284
+ */
285
+ payloadKeyFromModelName(modelName: string): string;
286
+ normalize(modelClass: any, resourceHash: any): {
287
+ data: {
288
+ id: any;
289
+ type: string;
290
+ attributes: {};
291
+ relationships: Object;
292
+ };
293
+ };
294
+ /**
295
+ `keyForAttribute` can be used to define rules for how to convert an
296
+ attribute name in your model to a key in your JSON.
297
+ By default `JSONAPISerializer` follows the format used on the examples of
298
+ http://jsonapi.org/format and uses dashes as the word separator in the JSON
299
+ attribute keys.
300
+
301
+ This behaviour can be easily customized by extending this method.
302
+
303
+ Example
304
+
305
+ ```app/serializers/application.js
306
+ import JSONAPISerializer from '@ember-data-mirror/serializer/json-api';
307
+ import { dasherize } from '<app-name>/utils/string-utils';
308
+
309
+ export default class ApplicationSerializer extends JSONAPISerializer {
310
+ keyForAttribute(attr, method) {
311
+ return dasherize(attr).toUpperCase();
312
+ }
313
+ }
314
+ ```
315
+
316
+ @method keyForAttribute
317
+ @public
318
+ @param {String} key
319
+ @param {String} method
320
+ @return {String} normalized key
321
+ */
322
+ keyForAttribute(key: string, method: string): string;
323
+ /**
324
+ `keyForRelationship` can be used to define a custom key when
325
+ serializing and deserializing relationship properties.
326
+ By default `JSONAPISerializer` follows the format used on the examples of
327
+ http://jsonapi.org/format and uses dashes as word separators in
328
+ relationship properties.
329
+
330
+ This behaviour can be easily customized by extending this method.
331
+
332
+ Example
333
+
334
+ ```app/serializers/post.js
335
+ import JSONAPISerializer from '@ember-data-mirror/serializer/json-api';
336
+ import { underscore } from '<app-name>/utils/string-utils';
337
+
338
+ export default class ApplicationSerializer extends JSONAPISerializer {
339
+ keyForRelationship(key, relationship, method) {
340
+ return underscore(key);
341
+ }
342
+ }
343
+ ```
344
+ @method keyForRelationship
345
+ @public
346
+ @param {String} key
347
+ @param {String} typeClass
348
+ @param {String} method
349
+ @return {String} normalized key
350
+ */
351
+ keyForRelationship(key: string, typeClass: string, method: string): string;
352
+ /**
353
+ Called when a record is saved in order to convert the
354
+ record into JSON.
355
+
356
+ For example, consider this model:
357
+
358
+ ```app/models/comment.js
359
+ import Model, { attr, belongsTo } from '@ember-data-mirror/model';
360
+
361
+ export default class CommentModel extends Model {
362
+ @attr title;
363
+ @attr body;
364
+
365
+ @belongsTo('user', { async: false, inverse: null })
366
+ author;
367
+ }
368
+ ```
369
+
370
+ The default serialization would create a JSON-API resource object like:
371
+
372
+ ```javascript
373
+ {
374
+ "data": {
375
+ "type": "comments",
376
+ "attributes": {
377
+ "title": "Rails is unagi",
378
+ "body": "Rails? Omakase? O_O",
379
+ },
380
+ "relationships": {
381
+ "author": {
382
+ "data": {
383
+ "id": "12",
384
+ "type": "users"
385
+ }
386
+ }
387
+ }
388
+ }
389
+ }
390
+ ```
391
+
392
+ By default, attributes are passed through as-is, unless
393
+ you specified an attribute type (`attr('date')`). If
394
+ you specify a transform, the JavaScript value will be
395
+ serialized when inserted into the attributes hash.
396
+
397
+ Belongs-to relationships are converted into JSON-API
398
+ resource identifier objects.
399
+
400
+ ## IDs
401
+
402
+ `serialize` takes an options hash with a single option:
403
+ `includeId`. If this option is `true`, `serialize` will,
404
+ by default include the ID in the JSON object it builds.
405
+
406
+ The JSONAPIAdapter passes in `includeId: true` when serializing a record
407
+ for `createRecord` or `updateRecord`.
408
+
409
+ ## Customization
410
+
411
+ Your server may expect data in a different format than the
412
+ built-in serialization format.
413
+
414
+ In that case, you can implement `serialize` yourself and
415
+ return data formatted to match your API's expectations, or override
416
+ the invoked adapter method and do the serialization in the adapter directly
417
+ by using the provided snapshot.
418
+
419
+ If your API's format differs greatly from the JSON:API spec, you should
420
+ consider authoring your own adapter and serializer instead of extending
421
+ this class.
422
+
423
+ ```app/serializers/post.js
424
+ import JSONAPISerializer from '@ember-data-mirror/serializer/json-api';
425
+
426
+ export default class PostSerializer extends JSONAPISerializer {
427
+ serialize(snapshot, options) {
428
+ let json = {
429
+ POST_TTL: snapshot.attr('title'),
430
+ POST_BDY: snapshot.attr('body'),
431
+ POST_CMS: snapshot.hasMany('comments', { ids: true })
432
+ };
433
+
434
+ if (options.includeId) {
435
+ json.POST_ID_ = snapshot.id;
436
+ }
437
+
438
+ return json;
439
+ }
440
+ }
441
+ ```
442
+
443
+ ## Customizing an App-Wide Serializer
444
+
445
+ If you want to define a serializer for your entire
446
+ application, you'll probably want to use `eachAttribute`
447
+ and `eachRelationship` on the record.
448
+
449
+ ```app/serializers/application.js
450
+ import JSONAPISerializer from '@ember-data-mirror/serializer/json-api';
451
+ import { underscore, singularize } from '<app-name>/utils/string-utils';
452
+
453
+ export default class ApplicationSerializer extends JSONAPISerializer {
454
+ serialize(snapshot, options) {
455
+ let json = {};
456
+
457
+ snapshot.eachAttribute((name) => {
458
+ json[serverAttributeName(name)] = snapshot.attr(name);
459
+ });
460
+
461
+ snapshot.eachRelationship((name, relationship) => {
462
+ if (relationship.kind === 'hasMany') {
463
+ json[serverHasManyName(name)] = snapshot.hasMany(name, { ids: true });
464
+ }
465
+ });
466
+
467
+ if (options.includeId) {
468
+ json.ID_ = snapshot.id;
469
+ }
470
+
471
+ return json;
472
+ }
473
+ }
474
+
475
+ function serverAttributeName(attribute) {
476
+ return underscore(attribute).toUpperCase();
477
+ }
478
+
479
+ function serverHasManyName(name) {
480
+ return serverAttributeName(singularize(name)) + '_IDS';
481
+ }
482
+ ```
483
+
484
+ This serializer will generate JSON that looks like this:
485
+
486
+ ```javascript
487
+ {
488
+ "TITLE": "Rails is omakase",
489
+ "BODY": "Yep. Omakase.",
490
+ "COMMENT_IDS": [ "1", "2", "3" ]
491
+ }
492
+ ```
493
+
494
+ ## Tweaking the Default Formatting
495
+
496
+ If you just want to do some small tweaks on the default JSON:API formatted response,
497
+ you can call `super.serialize` first and make the tweaks
498
+ on the returned object.
499
+
500
+ ```app/serializers/post.js
501
+ import JSONAPISerializer from '@ember-data-mirror/serializer/json-api';
502
+
503
+ export default class PostSerializer extends JSONAPISerializer {
504
+ serialize(snapshot, options) {
505
+ let json = super.serialize(...arguments);
506
+
507
+ json.data.attributes.subject = json.data.attributes.title;
508
+ delete json.data.attributes.title;
509
+
510
+ return json;
511
+ }
512
+ }
513
+ ```
514
+
515
+ @method serialize
516
+ @public
517
+ @param {Snapshot} snapshot
518
+ @param {Object} options
519
+ @return {Object} json
520
+ */
521
+ serialize(snapshot: Snapshot, options: Object, ...args: any[]): Object;
522
+ serializeAttribute(snapshot: any, json: any, key: any, attribute: any): void;
523
+ serializeBelongsTo(snapshot: any, json: any, relationship: any): void;
524
+ serializeHasMany(snapshot: any, json: any, relationship: any): void;
525
+ };
526
+ }
527
+ //# sourceMappingURL=json-api.d.ts.map
@@ -0,0 +1 @@
1
+ {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