ldco-contract 0.1.15 → 0.1.16

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 (85) hide show
  1. package/dist/index.d.ts +34 -0
  2. package/dist/ldco-contract.cjs.development.js +327 -0
  3. package/dist/ldco-contract.cjs.development.js.map +1 -1
  4. package/dist/ldco-contract.cjs.production.min.js +1 -1
  5. package/dist/ldco-contract.cjs.production.min.js.map +1 -1
  6. package/dist/ldco-contract.esm.js +311 -1
  7. package/dist/ldco-contract.esm.js.map +1 -1
  8. package/dist/lib/converters/toChoreographerDTO.d.ts +3 -0
  9. package/dist/lib/converters/toChoreographerModel.d.ts +3 -0
  10. package/dist/lib/converters/toCollectionsModel.d.ts +6 -0
  11. package/dist/lib/converters/toDanceDTO.d.ts +3 -0
  12. package/dist/lib/converters/toDanceModel.d.ts +5 -0
  13. package/dist/lib/converters/toInstructorDTO.d.ts +3 -0
  14. package/dist/lib/converters/toInstructorModel.d.ts +3 -0
  15. package/dist/lib/converters/toLessonDTO.d.ts +3 -0
  16. package/dist/lib/converters/toLessonModel.d.ts +4 -0
  17. package/dist/lib/converters/toTrackDTO.d.ts +3 -0
  18. package/dist/lib/converters/toTrackModel.d.ts +3 -0
  19. package/dist/lib/converters/toUserAcquaintanceDTO.d.ts +14 -0
  20. package/dist/lib/converters/toUserAcquaintanceModel.d.ts +7 -0
  21. package/dist/lib/converters/toUserDTO.d.ts +9 -0
  22. package/dist/lib/converters/toUserModel.d.ts +7 -0
  23. package/dist/lib/converters/toVenueDTO.d.ts +3 -0
  24. package/dist/lib/converters/toVenueModel.d.ts +5 -0
  25. package/dist/types/dto/lesson.dto.d.ts +1 -0
  26. package/dist/types/entities/appeal_choreographer_user.entity.d.ts +8 -0
  27. package/dist/types/entities/appeal_instructor_user.entity.d.ts +8 -0
  28. package/dist/types/entities/cancelled_lesson.entity.d.ts +6 -0
  29. package/dist/types/entities/choreographer.entity.d.ts +5 -0
  30. package/dist/types/entities/dance.entity.d.ts +9 -0
  31. package/dist/types/entities/dance_collection.entity.d.ts +8 -0
  32. package/dist/types/entities/friend_request.entity.d.ts +7 -0
  33. package/dist/types/entities/instructor.entity.d.ts +5 -0
  34. package/dist/types/entities/lesson.entity.d.ts +13 -0
  35. package/dist/types/entities/track.entity.d.ts +9 -0
  36. package/dist/types/entities/user.entity.d.ts +9 -0
  37. package/dist/types/entities/user_collection.entity.d.ts +8 -0
  38. package/dist/types/entities/user_favorite_venue.entity.d.ts +5 -0
  39. package/dist/types/entities/user_follow.entity.d.ts +6 -0
  40. package/dist/types/entities/user_friend.entity.d.ts +6 -0
  41. package/dist/types/entities/user_marked_dance.entity.d.ts +6 -0
  42. package/dist/types/entities/venue.entity.d.ts +14 -0
  43. package/dist/types/model/collection.model.d.ts +1 -0
  44. package/dist/types/model/lesson.model.d.ts +1 -0
  45. package/package.json +1 -1
  46. package/src/index.ts +39 -1
  47. package/src/lib/converters/toChoreographerDTO.ts +14 -0
  48. package/src/lib/converters/toChoreographerModel.ts +13 -0
  49. package/src/lib/converters/toCollectionsModel.ts +26 -0
  50. package/src/lib/converters/toDanceDTO.ts +19 -0
  51. package/src/lib/converters/toDanceModel.ts +28 -0
  52. package/src/lib/converters/toInstructorDTO.ts +15 -0
  53. package/src/lib/converters/toInstructorModel.ts +14 -0
  54. package/src/lib/converters/toLessonDTO.ts +20 -0
  55. package/src/lib/converters/toLessonModel.ts +20 -0
  56. package/src/lib/converters/toTrackDTO.ts +15 -0
  57. package/src/lib/converters/toTrackModel.ts +15 -0
  58. package/src/lib/converters/toUserAcquaintanceDTO.ts +42 -0
  59. package/src/lib/converters/toUserAcquaintanceModel.ts +36 -0
  60. package/src/lib/converters/toUserDTO.ts +41 -0
  61. package/src/lib/converters/toUserModel.ts +43 -0
  62. package/src/lib/converters/toVenueDTO.ts +26 -0
  63. package/src/lib/converters/toVenueModel.ts +20 -0
  64. package/src/types/dto/lesson.dto.ts +1 -0
  65. package/src/types/entities/appeal_choreographer_user.entity.ts +8 -0
  66. package/src/types/entities/appeal_instructor_user.entity.ts +8 -0
  67. package/src/types/entities/cancelled_lesson.entity.ts +6 -0
  68. package/src/types/entities/choreographer.entity.ts +5 -0
  69. package/src/types/entities/dance.entity.ts +9 -0
  70. package/src/types/entities/dance_collection.entity.ts +8 -0
  71. package/src/types/entities/friend_request.entity.ts +7 -0
  72. package/src/types/entities/instructor.entity.ts +5 -0
  73. package/src/types/entities/lesson.entity.ts +13 -0
  74. package/src/types/entities/track.entity.ts +9 -0
  75. package/src/types/entities/user.entity.ts +9 -0
  76. package/src/types/entities/user_collection.entity.ts +8 -0
  77. package/src/types/entities/user_favorite_venue.entity.ts +5 -0
  78. package/src/types/entities/user_follow.entity.ts +6 -0
  79. package/src/types/entities/user_friend.entity.ts +6 -0
  80. package/src/types/entities/user_marked_dance.entity.ts +6 -0
  81. package/src/types/entities/venue.entity.ts +14 -0
  82. package/src/types/model/collection.model.ts +1 -0
  83. package/src/types/model/lesson.model.ts +1 -0
  84. package/dist/converter/userEntityToUser.d.ts +0 -10
  85. package/src/converter/userEntityToUser.ts +0 -76
package/dist/index.d.ts CHANGED
@@ -1,3 +1,20 @@
1
+ export { AppealChoreographerUser } from './types/entities/appeal_choreographer_user.entity';
2
+ export { AppealInstructorUser } from './types/entities/appeal_instructor_user.entity';
3
+ export { CancelledLessonEntity } from './types/entities/cancelled_lesson.entity';
4
+ export { ChoreographerEntity } from './types/entities/choreographer.entity';
5
+ export { DanceCollectionEntity } from './types/entities/dance_collection.entity';
6
+ export { DanceEntity } from './types/entities/dance.entity';
7
+ export { FriendRequestEntity } from './types/entities/friend_request.entity';
8
+ export { InstructorEntity } from './types/entities/instructor.entity';
9
+ export { LessonEntity } from './types/entities/lesson.entity';
10
+ export { TrackEntity } from './types/entities/track.entity';
11
+ export { UserCollectionEntity } from './types/entities/user_collection.entity';
12
+ export { UserFavoriteVenueEntity } from './types/entities/user_favorite_venue.entity';
13
+ export { UserFollowEntity } from './types/entities/user_follow.entity';
14
+ export { UserFriendEntity } from './types/entities/user_friend.entity';
15
+ export { UserMarkedDanceEntity } from './types/entities/user_marked_dance.entity';
16
+ export { UserEntity } from './types/entities/user.entity';
17
+ export { VenueEntity } from './types/entities/venue.entity';
1
18
  export { ChoreographerDTO } from './types/dto/choreographer.dto';
2
19
  export { CollectionDTO } from './types/dto/collection.dto';
3
20
  export { DanceDTO } from './types/dto/dance.dto';
@@ -23,3 +40,20 @@ export { SocialMediaLinks } from './types/model/userTypes/socialMediaLinks';
23
40
  export { UserDances } from './types/model/userTypes/userDances';
24
41
  export { getAllUserDanceIds } from './lib/getAllUserDanceIds';
25
42
  export { UserInfoUpdateRequest } from './types/requests/userInfoUpdate.request';
43
+ export { toChoreographerDTO } from './lib/converters/toChoreographerDTO';
44
+ export { toChoreographerModel } from './lib/converters/toChoreographerModel';
45
+ export { toCollectionModel } from './lib/converters/toCollectionsModel';
46
+ export { toDanceDTO } from './lib/converters/toDanceDTO';
47
+ export { toDanceModel } from './lib/converters/toDanceModel';
48
+ export { toInstructorDTO } from './lib/converters/toInstructorDTO';
49
+ export { toInstructorModel } from './lib/converters/toInstructorModel';
50
+ export { toLessonDTO } from './lib/converters/toLessonDTO';
51
+ export { toLessonModel } from './lib/converters/toLessonModel';
52
+ export { toTrackDTO } from './lib/converters/toTrackDTO';
53
+ export { toTrackModel } from './lib/converters/toTrackModel';
54
+ export { toUserAcquaintanceDTO } from './lib/converters/toUserAcquaintanceDTO';
55
+ export { toUserAcquaintanceModel } from './lib/converters/toUserAcquaintanceModel';
56
+ export { toUserDTO } from './lib/converters/toUserDTO';
57
+ export { toUserModel } from './lib/converters/toUserModel';
58
+ export { toVenueDTO } from './lib/converters/toVenueDTO';
59
+ export { toVenueModel } from './lib/converters/toVenueModel';
@@ -18,5 +18,332 @@ function getAllUserDanceIds(userDances) {
18
18
  });
19
19
  }
20
20
 
21
+ function toChoreographerDTO(choreographer, isVerified) {
22
+ return {
23
+ id: choreographer._id,
24
+ name: choreographer.name,
25
+ isVerified: isVerified
26
+ };
27
+ }
28
+
29
+ function toChoreographerModel(dto) {
30
+ return {
31
+ id: dto.id,
32
+ name: dto.name,
33
+ isVerified: dto.isVerified
34
+ };
35
+ }
36
+
37
+ function toTrackModel(dto) {
38
+ return {
39
+ id: dto.id,
40
+ name: dto.name,
41
+ artists: dto.artists,
42
+ isrc: dto.isrc,
43
+ uri: dto.uri,
44
+ duration_ms: dto.duration_ms,
45
+ explicit: dto.explicit,
46
+ isVerified: dto.isVerified
47
+ };
48
+ }
49
+
50
+ function toDanceModel(dto, trackMap, choreographerMap) {
51
+ var tracks = dto.tracks.map(function (id) {
52
+ return trackMap[id];
53
+ }).filter(Boolean);
54
+ return {
55
+ id: dto.id,
56
+ danceName: dto.danceName,
57
+ choreographers: dto.choreographers.map(function (id) {
58
+ return toChoreographerModel(choreographerMap[id]);
59
+ }),
60
+ stepsheet: dto.stepsheet,
61
+ difficulty: dto.difficulty,
62
+ primaryTrack: toTrackModel(trackMap[dto.primaryTrack]),
63
+ tracks: tracks.map(toTrackModel),
64
+ isVerified: dto.isVerified
65
+ };
66
+ }
67
+
68
+ function toCollectionModel(dto, danceMap, trackMap, choreographerMap) {
69
+ var dances = dto.dances.map(function (id) {
70
+ return danceMap[id];
71
+ }).filter(Boolean);
72
+ return {
73
+ id: dto._id,
74
+ name: dto.name,
75
+ dances: dances.map(function (d) {
76
+ return toDanceModel(d, trackMap, choreographerMap);
77
+ }),
78
+ isVerified: dto.isVerified,
79
+ createdAt: dto.createdAt,
80
+ updatedAt: dto.updatedAt,
81
+ createdBy: dto.createdBy,
82
+ isCopyable: dto.isCopyable
83
+ };
84
+ }
85
+
86
+ function toDanceDTO(dance, isVerified) {
87
+ var _dance$choreographers, _dance$choreographers2, _dance$primaryTrack, _dance$tracks$map, _dance$tracks;
88
+ return {
89
+ id: dance._id,
90
+ danceName: dance.danceName,
91
+ choreographers: (_dance$choreographers = (_dance$choreographers2 = dance.choreographers) == null ? void 0 : _dance$choreographers2.map(function (id) {
92
+ return id;
93
+ })) != null ? _dance$choreographers : [],
94
+ stepsheet: dance.stepsheet,
95
+ difficulty: dance.difficulty,
96
+ primaryTrack: (_dance$primaryTrack = dance.primaryTrack) != null ? _dance$primaryTrack : '',
97
+ tracks: (_dance$tracks$map = (_dance$tracks = dance.tracks) == null ? void 0 : _dance$tracks.map(function (id) {
98
+ return id;
99
+ })) != null ? _dance$tracks$map : [],
100
+ isVerified: isVerified
101
+ };
102
+ }
103
+
104
+ function toInstructorDTO(instructor, isVerified) {
105
+ return {
106
+ id: instructor._id,
107
+ name: instructor.name,
108
+ userid: "leave this this empty for now and figure it out later...",
109
+ isVerified: isVerified
110
+ };
111
+ }
112
+
113
+ function toInstructorModel(dto) {
114
+ return {
115
+ id: dto.id,
116
+ name: dto.name,
117
+ userid: "leave this this empty for now and figure it out later...",
118
+ isVerified: dto.isVerified
119
+ };
120
+ }
121
+
122
+ function toLessonDTO(LessonEntity, isVerified) {
123
+ return {
124
+ id: LessonEntity._id,
125
+ lessonday: LessonEntity.lessonday,
126
+ lessonstart: LessonEntity.lessonstart,
127
+ instructors: LessonEntity.instructors,
128
+ duration: LessonEntity.duration,
129
+ lessoncost: LessonEntity.lessoncost,
130
+ notes: LessonEntity.notes,
131
+ difficulty: LessonEntity.difficulty,
132
+ isVerified: isVerified
133
+ };
134
+ }
135
+
136
+ function toLessonModel(lessonDTO, instructorMap) {
137
+ return {
138
+ id: lessonDTO.id,
139
+ lessonday: lessonDTO.lessonday,
140
+ lessonstart: lessonDTO.lessonstart,
141
+ instructors: lessonDTO.instructors.map(function (id) {
142
+ return instructorMap[id];
143
+ }).filter(Boolean),
144
+ duration: lessonDTO.duration,
145
+ lessoncost: lessonDTO.lessoncost,
146
+ notes: lessonDTO.notes,
147
+ difficulty: lessonDTO.difficulty
148
+ };
149
+ }
150
+
151
+ function toTrackDTO(dto, isVerified) {
152
+ return {
153
+ id: dto._id,
154
+ name: dto.name,
155
+ artists: dto.artists,
156
+ isrc: dto.isrc,
157
+ uri: dto.uri,
158
+ duration_ms: dto.duration_ms,
159
+ explicit: dto.explicit,
160
+ isVerified: isVerified
161
+ };
162
+ }
163
+
164
+ function toUserAcquaintanceDTO(user, isVerified, userProfile) {
165
+ var _user$links;
166
+ return {
167
+ id: user._id,
168
+ username: user.username || user.name || '',
169
+ image: user.image || '',
170
+ bio: user.bio || '',
171
+ isVerified: isVerified,
172
+ profile: {
173
+ dances: {
174
+ favorites: userProfile.favorites,
175
+ flagged: userProfile.flagged,
176
+ known: userProfile.known,
177
+ refresh: userProfile.refresh
178
+ },
179
+ collections: userProfile.collections,
180
+ venues: userProfile.venues,
181
+ friendsCount: userProfile.friendsCount,
182
+ followingCount: userProfile.followingCount,
183
+ followersCount: userProfile.followersCount,
184
+ mutualFriendsCount: userProfile.mutualFriendsCount,
185
+ links: (_user$links = user.links) != null ? _user$links : {}
186
+ }
187
+ };
188
+ }
189
+
190
+ function toUserAcquaintanceModel(dto, danceMap, trackMap, collectionMap, choreographerMap) {
191
+ return {
192
+ id: dto.id,
193
+ username: dto.username,
194
+ image: dto.image,
195
+ bio: dto.bio,
196
+ isVerified: dto.isVerified,
197
+ friendsCount: dto.profile.friendsCount,
198
+ followersCount: dto.profile.followersCount,
199
+ mutualFriendsCount: dto.profile.mutualFriendsCount,
200
+ links: dto.profile.links,
201
+ dances: {
202
+ favorites: dto.profile.dances.favorites.map(function (id) {
203
+ return toDanceModel(danceMap[id], trackMap, choreographerMap);
204
+ }),
205
+ flagged: dto.profile.dances.flagged.map(function (id) {
206
+ return toDanceModel(danceMap[id], trackMap, choreographerMap);
207
+ }),
208
+ known: dto.profile.dances.known.map(function (id) {
209
+ return toDanceModel(danceMap[id], trackMap, choreographerMap);
210
+ }),
211
+ refresh: dto.profile.dances.refresh.map(function (id) {
212
+ return toDanceModel(danceMap[id], trackMap, choreographerMap);
213
+ })
214
+ },
215
+ collections: dto.profile.collections.map(function (id) {
216
+ return toCollectionModel(collectionMap[id], danceMap, trackMap, choreographerMap);
217
+ })
218
+ };
219
+ }
220
+
221
+ function toUserDTO(user, isVerified, danceIds, collections, venues, friends, following, friendsRequested, friendRequests) {
222
+ var _user$email, _user$name, _user$username, _user$image, _user$bio, _user$links;
223
+ if (venues === void 0) {
224
+ venues = [];
225
+ }
226
+ if (friends === void 0) {
227
+ friends = [];
228
+ }
229
+ if (following === void 0) {
230
+ following = [];
231
+ }
232
+ if (friendsRequested === void 0) {
233
+ friendsRequested = [];
234
+ }
235
+ if (friendRequests === void 0) {
236
+ friendRequests = [];
237
+ }
238
+ return {
239
+ _id: user._id.toString(),
240
+ email: (_user$email = user.email) != null ? _user$email : '',
241
+ name: (_user$name = user.name) != null ? _user$name : '',
242
+ username: (_user$username = user.username) != null ? _user$username : '',
243
+ image: (_user$image = user.image) != null ? _user$image : '',
244
+ bio: (_user$bio = user.bio) != null ? _user$bio : '',
245
+ isVerified: isVerified,
246
+ profile: {
247
+ danceIds: danceIds,
248
+ collections: collections,
249
+ venues: venues,
250
+ friends: friends,
251
+ following: following,
252
+ links: (_user$links = user.links) != null ? _user$links : {},
253
+ friendsRequested: friendsRequested,
254
+ friendRequests: friendRequests
255
+ }
256
+ };
257
+ }
258
+
259
+ function toUserModel(userDTO, danceMap, collectionMap, venueMap, friendsMap, followingMap) {
260
+ var expand = function expand(ids, map) {
261
+ return ids.map(function (id) {
262
+ return map[id];
263
+ }).filter(Boolean);
264
+ };
265
+ return {
266
+ _id: userDTO._id,
267
+ email: userDTO.email,
268
+ name: userDTO.name,
269
+ username: userDTO.username,
270
+ image: userDTO.image,
271
+ bio: userDTO.bio,
272
+ isVerified: userDTO.isVerified,
273
+ profile: {
274
+ dances: {
275
+ favorites: expand(userDTO.profile.danceIds.favorites, danceMap),
276
+ flagged: expand(userDTO.profile.danceIds.flagged, danceMap),
277
+ known: expand(userDTO.profile.danceIds.known, danceMap),
278
+ refresh: expand(userDTO.profile.danceIds.refresh, danceMap)
279
+ },
280
+ collections: expand(userDTO.profile.collections, collectionMap),
281
+ venues: expand(userDTO.profile.venues, venueMap),
282
+ friends: expand(userDTO.profile.friends, friendsMap),
283
+ following: expand(userDTO.profile.following, followingMap),
284
+ friendsRequested: expand(userDTO.profile.friendsRequested, friendsMap),
285
+ friendRequests: expand(userDTO.profile.friendRequests, friendsMap),
286
+ followersCount: userDTO.profile.followersCount || 0,
287
+ links: userDTO.profile.links
288
+ }
289
+ };
290
+ }
291
+
292
+ function toVenueDTO(venue, lessonIds, isVerified) {
293
+ var _venue$isDeleted, _venue$deletedAt, _venue$createdAt;
294
+ return {
295
+ id: venue._id,
296
+ venuename: venue.venuename,
297
+ venueaddress: venue.venueaddress,
298
+ geolocation: venue.geolocation,
299
+ phone: venue.phone,
300
+ website: venue.website,
301
+ contactEmail: venue.contactEmail,
302
+ contactName: venue.contactName,
303
+ contactPhone: venue.contactPhone,
304
+ lessonsIds: lessonIds,
305
+ isVerified: isVerified,
306
+ isDeleted: (_venue$isDeleted = venue.isDeleted) != null ? _venue$isDeleted : false,
307
+ deletedAt: (_venue$deletedAt = venue.deletedAt) != null ? _venue$deletedAt : null,
308
+ createdAt: (_venue$createdAt = venue.createdAt) != null ? _venue$createdAt : null
309
+ };
310
+ }
311
+
312
+ function _extends() {
313
+ return _extends = Object.assign ? Object.assign.bind() : function (n) {
314
+ for (var e = 1; e < arguments.length; e++) {
315
+ var t = arguments[e];
316
+ for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
317
+ }
318
+ return n;
319
+ }, _extends.apply(null, arguments);
320
+ }
321
+
322
+ function toVenueModel(venueDTO, lessonMap, instructorMap) {
323
+ var expandedLessons = venueDTO.lessonsIds.map(function (id) {
324
+ return toLessonModel(lessonMap[id], instructorMap);
325
+ }).filter(Boolean);
326
+ return _extends({}, venueDTO, {
327
+ lessons: expandedLessons
328
+ });
329
+ }
330
+
21
331
  exports.getAllUserDanceIds = getAllUserDanceIds;
332
+ exports.toChoreographerDTO = toChoreographerDTO;
333
+ exports.toChoreographerModel = toChoreographerModel;
334
+ exports.toCollectionModel = toCollectionModel;
335
+ exports.toDanceDTO = toDanceDTO;
336
+ exports.toDanceModel = toDanceModel;
337
+ exports.toInstructorDTO = toInstructorDTO;
338
+ exports.toInstructorModel = toInstructorModel;
339
+ exports.toLessonDTO = toLessonDTO;
340
+ exports.toLessonModel = toLessonModel;
341
+ exports.toTrackDTO = toTrackDTO;
342
+ exports.toTrackModel = toTrackModel;
343
+ exports.toUserAcquaintanceDTO = toUserAcquaintanceDTO;
344
+ exports.toUserAcquaintanceModel = toUserAcquaintanceModel;
345
+ exports.toUserDTO = toUserDTO;
346
+ exports.toUserModel = toUserModel;
347
+ exports.toVenueDTO = toVenueDTO;
348
+ exports.toVenueModel = toVenueModel;
22
349
  //# sourceMappingURL=ldco-contract.cjs.development.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ldco-contract.cjs.development.js","sources":["../src/lib/getAllUserDanceIds.ts"],"sourcesContent":["import { DanceModel } from \"../types/model/dance.model\";\nimport { UserDances } from \"../types/model/userTypes/userDances\";\n\nexport function getAllUserDanceIds(userDances: UserDances): DanceModel[] {\n const { favorites = [], flagged = [], known = [], refresh = [] } = userDances ?? {};\n\n const all = [\n ...favorites,\n ...flagged,\n ...known,\n ...refresh,\n ];\n\n return all.filter((item, index) => all.indexOf(item) === index);\n}"],"names":["getAllUserDanceIds","userDances","_ref","_ref$favorites","favorites","_ref$flagged","flagged","_ref$known","known","_ref$refresh","refresh","all","concat","filter","item","index","indexOf"],"mappings":";;;;SAGgBA,kBAAkBA,CAACC,UAAsB;EACrD,IAAAC,IAAA,GAAmED,UAAU,WAAVA,UAAU,GAAI,EAAE;IAAAE,cAAA,GAAAD,IAAA,CAA3EE,SAAS;IAATA,SAAS,GAAAD,cAAA,cAAG,EAAE,GAAAA,cAAA;IAAAE,YAAA,GAAAH,IAAA,CAAEI,OAAO;IAAPA,OAAO,GAAAD,YAAA,cAAG,EAAE,GAAAA,YAAA;IAAAE,UAAA,GAAAL,IAAA,CAAEM,KAAK;IAALA,KAAK,GAAAD,UAAA,cAAG,EAAE,GAAAA,UAAA;IAAAE,YAAA,GAAAP,IAAA,CAAEQ,OAAO;IAAPA,OAAO,GAAAD,YAAA,cAAG,EAAE,GAAAA,YAAA;EAE9D,IAAME,GAAG,MAAAC,MAAA,CACFR,SAAS,EACTE,OAAO,EACPE,KAAK,EACLE,OAAO,CACb;EAED,OAAOC,GAAG,CAACE,MAAM,CAAC,UAACC,IAAI,EAAEC,KAAK;IAAA,OAAKJ,GAAG,CAACK,OAAO,CAACF,IAAI,CAAC,KAAKC,KAAK;IAAC;AACnE;;;;"}
1
+ {"version":3,"file":"ldco-contract.cjs.development.js","sources":["../src/lib/getAllUserDanceIds.ts","../src/lib/converters/toChoreographerDTO.ts","../src/lib/converters/toChoreographerModel.ts","../src/lib/converters/toTrackModel.ts","../src/lib/converters/toDanceModel.ts","../src/lib/converters/toCollectionsModel.ts","../src/lib/converters/toDanceDTO.ts","../src/lib/converters/toInstructorDTO.ts","../src/lib/converters/toInstructorModel.ts","../src/lib/converters/toLessonDTO.ts","../src/lib/converters/toLessonModel.ts","../src/lib/converters/toTrackDTO.ts","../src/lib/converters/toUserAcquaintanceDTO.ts","../src/lib/converters/toUserAcquaintanceModel.ts","../src/lib/converters/toUserDTO.ts","../src/lib/converters/toUserModel.ts","../src/lib/converters/toVenueDTO.ts","../src/lib/converters/toVenueModel.ts"],"sourcesContent":["import { DanceModel } from \"../types/model/dance.model\";\nimport { UserDances } from \"../types/model/userTypes/userDances\";\n\nexport function getAllUserDanceIds(userDances: UserDances): DanceModel[] {\n const { favorites = [], flagged = [], known = [], refresh = [] } = userDances ?? {};\n\n const all = [\n ...favorites,\n ...flagged,\n ...known,\n ...refresh,\n ];\n\n return all.filter((item, index) => all.indexOf(item) === index);\n}","import { ChoreographerDTO } from '../../types/dto/choreographer.dto';\nimport { ChoreographerEntity } from '../../types/entities/choreographer.entity';\n\nexport function toChoreographerDTO(\n choreographer: ChoreographerEntity,\n isVerified: boolean\n): ChoreographerDTO {\n\n return {\n id: choreographer._id,\n name: choreographer.name,\n isVerified: isVerified\n };\n}\n","import { ChoreographerDTO } from \"../../types/dto/choreographer.dto\";\nimport { ChoreographerModel } from \"../../types/model/choreographer.model\";\n\nexport function toChoreographerModel(\n dto: ChoreographerDTO\n): ChoreographerModel {\n\n return {\n id: dto.id,\n name: dto.name,\n isVerified: dto.isVerified\n };\n}\n","import { TrackDTO } from \"../../types/dto/track.dto\";\nimport { TrackModel } from \"../../types/model/track.model\";\n\nexport function toTrackModel(dto: TrackDTO): TrackModel {\n return {\n id: dto.id,\n name: dto.name,\n artists: dto.artists,\n isrc: dto.isrc,\n uri: dto.uri,\n duration_ms: dto.duration_ms,\n explicit: dto.explicit,\n isVerified: dto.isVerified,\n };\n}\n","import { ChoreographerDTO } from '../../types/dto/choreographer.dto';\nimport { DanceDTO } from '../../types/dto/dance.dto';\nimport { TrackDTO } from '../../types/dto/track.dto';\nimport { DanceModel } from '../../types/model/dance.model';\nimport { toChoreographerModel } from './toChoreographerModel';\nimport { toTrackModel } from './toTrackModel';\n\nexport function toDanceModel(\n dto: DanceDTO,\n trackMap: Record<string, TrackDTO>,\n choreographerMap: Record<string, ChoreographerDTO>\n): DanceModel {\n\n const tracks = dto.tracks\n .map(id => trackMap[id])\n .filter(Boolean);\n\n return {\n id: dto.id,\n danceName: dto.danceName,\n choreographers: dto.choreographers.map(id => toChoreographerModel(choreographerMap[id])),\n stepsheet: dto.stepsheet,\n difficulty: dto.difficulty,\n primaryTrack: toTrackModel(trackMap[dto.primaryTrack]),\n tracks: tracks.map(toTrackModel),\n isVerified: dto.isVerified,\n };\n}\n","import { ChoreographerDTO } from '../../types/dto/choreographer.dto';\nimport { CollectionDTO } from '../../types/dto/collection.dto';\nimport { DanceDTO } from '../../types/dto/dance.dto';\nimport { TrackDTO } from '../../types/dto/track.dto';\nimport { CollectionModel } from '../../types/model/collection.model';\nimport { toDanceModel } from './toDanceModel';\n\nexport function toCollectionModel(\n dto: CollectionDTO,\n danceMap: Record<string, DanceDTO>,\n trackMap: Record<string, TrackDTO>,\n choreographerMap: Record<string, ChoreographerDTO>\n): CollectionModel {\n const dances = dto.dances.map(id => danceMap[id]).filter(Boolean);\n\n return {\n id: dto._id,\n name: dto.name,\n dances: dances.map(d => toDanceModel(d, trackMap, choreographerMap)),\n isVerified: dto.isVerified,\n createdAt: dto.createdAt,\n updatedAt: dto.updatedAt,\n createdBy: dto.createdBy,\n isCopyable: dto.isCopyable,\n };\n}\n","import { DanceDTO } from \"../../types/dto/dance.dto\";\nimport { DanceEntity } from \"../../types/entities/dance.entity\";\n\nexport function toDanceDTO(\n dance: DanceEntity,\n isVerified: boolean\n): DanceDTO {\n\n return {\n id: dance._id,\n danceName: dance.danceName,\n choreographers: dance.choreographers?.map((id: string) => id) ?? [],\n stepsheet: dance.stepsheet,\n difficulty: dance.difficulty,\n primaryTrack: dance.primaryTrack ?? '',\n tracks: dance.tracks?.map((id: string) => id) ?? [],\n isVerified: isVerified\n };\n};\n","import { InstructorDTO } from \"../../types/dto/instructor.dto\";\nimport { InstructorEntity } from \"../../types/entities/instructor.entity\";\n\nexport function toInstructorDTO(\n instructor: InstructorEntity,\n isVerified: boolean\n): InstructorDTO {\n\n return {\n id: instructor._id,\n name: instructor.name,\n userid: \"leave this this empty for now and figure it out later...\",\n isVerified: isVerified\n };\n}\n","import { InstructorDTO } from \"../../types/dto/instructor.dto\";\nimport { InstructorModel } from \"../../types/model/instructor.model\";\n\nexport function toInstructorModel(\n dto: InstructorDTO, \n): InstructorModel {\n\n return {\n id: dto.id,\n name: dto.name,\n userid: \"leave this this empty for now and figure it out later...\",\n isVerified: dto.isVerified\n };\n}\n","import { LessonDTO } from \"../../types/dto/lesson.dto\";\nimport { LessonEntity } from \"../../types/entities/lesson.entity\";\n\nexport function toLessonDTO(\n LessonEntity: LessonEntity,\n isVerified: boolean\n): LessonDTO {\n\n return {\n id: LessonEntity._id,\n lessonday: LessonEntity.lessonday,\n lessonstart: LessonEntity.lessonstart,\n instructors: LessonEntity.instructors,\n duration: LessonEntity.duration,\n lessoncost: LessonEntity.lessoncost,\n notes: LessonEntity.notes,\n difficulty: LessonEntity.difficulty,\n isVerified: isVerified\n };\n}\n","import { InstructorDTO } from \"../../types/dto/instructor.dto\";\nimport { LessonDTO } from \"../../types/dto/lesson.dto\";\nimport { LessonModel } from \"../../types/model/lesson.model\";\n\nexport function toLessonModel(\n lessonDTO: LessonDTO,\n instructorMap: Record<string, InstructorDTO>\n): LessonModel {\n\n return {\n id: lessonDTO.id,\n lessonday: lessonDTO.lessonday,\n lessonstart: lessonDTO.lessonstart,\n instructors: lessonDTO.instructors.map(id => instructorMap[id]).filter(Boolean), // TODO: Do I need the converter?\n duration: lessonDTO.duration,\n lessoncost: lessonDTO.lessoncost,\n notes: lessonDTO.notes,\n difficulty: lessonDTO.difficulty,\n };\n}\n","import { TrackDTO } from \"../../types/dto/track.dto\";\nimport { TrackEntity } from \"../../types/entities/track.entity\";\n\nexport function toTrackDTO(dto: TrackEntity, isVerified: boolean): TrackDTO {\n return {\n id: dto._id,\n name: dto.name,\n artists: dto.artists,\n isrc: dto.isrc,\n uri: dto.uri,\n duration_ms: dto.duration_ms,\n explicit: dto.explicit,\n isVerified: isVerified,\n };\n}\n","import { UserAcquaintanceDTO } from \"../../types/dto/userAcquaintance.dto\";\nimport { UserEntity } from \"../../types/entities/user.entity\";\n\nexport function toUserAcquaintanceDTO(\n user: UserEntity,\n isVerified: boolean,\n userProfile: {\n favorites: string[];\n flagged: string[];\n known: string[];\n refresh: string[];\n collections: string[];\n venues: string[];\n friendsCount: number;\n followingCount: number;\n followersCount: number;\n mutualFriendsCount: number;\n }\n): UserAcquaintanceDTO {\n return {\n id: user._id,\n username: user.username || user.name || '',\n image: user.image || '',\n bio: user.bio || '',\n isVerified,\n profile: {\n dances: {\n favorites: userProfile.favorites,\n flagged: userProfile.flagged,\n known: userProfile.known,\n refresh: userProfile.refresh,\n },\n collections: userProfile.collections,\n venues: userProfile.venues,\n friendsCount: userProfile.friendsCount,\n followingCount: userProfile.followingCount,\n followersCount: userProfile.followersCount,\n mutualFriendsCount: userProfile.mutualFriendsCount,\n links: user.links ?? {},\n },\n };\n}\n","import { ChoreographerDTO } from \"../../types/dto/choreographer.dto\";\nimport { CollectionDTO } from \"../../types/dto/collection.dto\";\nimport { DanceDTO } from \"../../types/dto/dance.dto\";\nimport { TrackDTO } from \"../../types/dto/track.dto\";\nimport { UserAcquaintanceDTO } from \"../../types/dto/userAcquaintance.dto\";\nimport { UserAcquaintanceModel } from \"../../types/model/userAcquaintance.model\";\nimport { toCollectionModel } from \"./toCollectionsModel\";\nimport { toDanceModel } from \"./toDanceModel\";\n\nexport function toUserAcquaintanceModel(\n dto: UserAcquaintanceDTO,\n danceMap: Record<string, DanceDTO>,\n trackMap: Record<string, TrackDTO>,\n collectionMap: Record<string, CollectionDTO>,\n choreographerMap: Record<string, ChoreographerDTO>\n): UserAcquaintanceModel {\n\n return {\n id: dto.id,\n username: dto.username,\n image: dto.image,\n bio: dto.bio,\n isVerified: dto.isVerified,\n friendsCount: dto.profile.friendsCount,\n followersCount: dto.profile.followersCount,\n mutualFriendsCount: dto.profile.mutualFriendsCount,\n links: dto.profile.links,\n dances: {\n favorites: dto.profile.dances.favorites.map(id => toDanceModel(danceMap[id], trackMap, choreographerMap)),\n flagged: dto.profile.dances.flagged.map(id => toDanceModel(danceMap[id], trackMap, choreographerMap)),\n known: dto.profile.dances.known.map(id => toDanceModel(danceMap[id], trackMap, choreographerMap)),\n refresh: dto.profile.dances.refresh.map(id => toDanceModel(danceMap[id], trackMap, choreographerMap))\n },\n collections: dto.profile.collections.map(id => toCollectionModel(collectionMap[id], danceMap, trackMap, choreographerMap)),\n };\n}\n","import { UserDTO } from \"../../types/dto/user.dto\";\nimport { UserEntity } from \"../../types/entities/user.entity\";\n\nexport function toUserDTO(\n user: UserEntity,\n isVerified: boolean,\n danceIds: {\n favorites: string[];\n flagged: string[];\n known: string[];\n refresh: string[];\n },\n collections: string[],\n venues: string[] = [],\n friends: string[] = [],\n following: string[] = [],\n friendsRequested: string[] = [],\n friendRequests: string[] = []\n): UserDTO {\n return {\n _id: user._id.toString(),\n email: user.email ?? '',\n name: user.name ?? '',\n username: user.username ?? '',\n image: user.image ?? '',\n bio: user.bio ?? '',\n isVerified,\n profile: {\n danceIds,\n collections,\n venues,\n friends,\n following,\n links: user.links ?? {},\n friendsRequested,\n friendRequests\n },\n };\n};\n\nexport default toUserDTO;\n","import { UserDTO } from \"../../types/dto/user.dto\";\nimport { CollectionModel } from \"../../types/model/collection.model\";\nimport { DanceModel } from \"../../types/model/dance.model\";\nimport { UserModel } from \"../../types/model/user.model\";\nimport { UserAcquaintanceModel } from \"../../types/model/userAcquaintance.model\";\nimport { VenueModel } from \"../../types/model/venue.model\";\n\nexport function toUserModel(\n userDTO: UserDTO,\n danceMap: Record<string, DanceModel>,\n collectionMap: Record<string, CollectionModel>,\n venueMap: Record<string, VenueModel>,\n friendsMap: Record<string, UserAcquaintanceModel>,\n followingMap: Record<string, UserAcquaintanceModel>\n): UserModel {\n const expand = <T>(ids: string[], map: Record<string, T>): T[] => ids.map(id => map[id]).filter(Boolean);\n\n return {\n _id: userDTO._id,\n email: userDTO.email,\n name: userDTO.name,\n username: userDTO.username,\n image: userDTO.image,\n bio: userDTO.bio,\n isVerified: userDTO.isVerified,\n profile: {\n dances: {\n favorites: expand(userDTO.profile.danceIds.favorites, danceMap),\n flagged: expand(userDTO.profile.danceIds.flagged, danceMap),\n known: expand(userDTO.profile.danceIds.known, danceMap),\n refresh: expand(userDTO.profile.danceIds.refresh, danceMap),\n },\n collections: expand(userDTO.profile.collections, collectionMap),\n venues: expand(userDTO.profile.venues, venueMap),\n friends: expand(userDTO.profile.friends, friendsMap),\n following: expand(userDTO.profile.following, followingMap),\n friendsRequested: expand(userDTO.profile.friendsRequested, friendsMap),\n friendRequests: expand(userDTO.profile.friendRequests, friendsMap),\n followersCount: userDTO.profile.followersCount || 0,\n links: userDTO.profile.links,\n },\n };\n}\n","import { VenueDTO } from \"../../types/dto/venue.dto\";\nimport { VenueEntity } from \"../../types/entities/venue.entity\";\n\nexport function toVenueDTO(\n venue: VenueEntity,\n lessonIds: string[],\n isVerified: boolean\n): VenueDTO {\n\n return {\n id: venue._id,\n venuename: venue.venuename,\n venueaddress: venue.venueaddress,\n geolocation: venue.geolocation,\n phone: venue.phone,\n website: venue.website,\n contactEmail: venue.contactEmail,\n contactName: venue.contactName,\n contactPhone: venue.contactPhone,\n lessonsIds: lessonIds,\n isVerified: isVerified,\n isDeleted: venue.isDeleted ?? false,\n deletedAt: venue.deletedAt ?? null,\n createdAt: venue.createdAt ?? null,\n };\n}","import { InstructorDTO } from \"../../types/dto/instructor.dto\";\nimport { LessonDTO } from \"../../types/dto/lesson.dto\";\nimport { VenueDTO } from \"../../types/dto/venue.dto\";\nimport { VenueModel } from \"../../types/model/venue.model\";\nimport { toLessonModel } from \"./toLessonModel\";\n\nexport function toVenueModel(\n venueDTO: VenueDTO,\n lessonMap: Record<string, LessonDTO>,\n instructorMap: Record<string, InstructorDTO>\n): VenueModel {\n const expandedLessons = venueDTO.lessonsIds\n .map(id => toLessonModel(lessonMap[id], instructorMap))\n .filter(Boolean);\n\n return {\n ...venueDTO,\n lessons: expandedLessons,\n };\n}\n"],"names":["getAllUserDanceIds","userDances","_ref","_ref$favorites","favorites","_ref$flagged","flagged","_ref$known","known","_ref$refresh","refresh","all","concat","filter","item","index","indexOf","toChoreographerDTO","choreographer","isVerified","id","_id","name","toChoreographerModel","dto","toTrackModel","artists","isrc","uri","duration_ms","explicit","toDanceModel","trackMap","choreographerMap","tracks","map","Boolean","danceName","choreographers","stepsheet","difficulty","primaryTrack","toCollectionModel","danceMap","dances","d","createdAt","updatedAt","createdBy","isCopyable","toDanceDTO","dance","_dance$choreographers","_dance$choreographers2","_dance$primaryTrack","_dance$tracks$map","_dance$tracks","toInstructorDTO","instructor","userid","toInstructorModel","toLessonDTO","LessonEntity","lessonday","lessonstart","instructors","duration","lessoncost","notes","toLessonModel","lessonDTO","instructorMap","toTrackDTO","toUserAcquaintanceDTO","user","userProfile","username","image","bio","profile","collections","venues","friendsCount","followingCount","followersCount","mutualFriendsCount","links","_user$links","toUserAcquaintanceModel","collectionMap","toUserDTO","danceIds","friends","following","friendsRequested","friendRequests","toString","email","_user$email","_user$name","_user$username","_user$image","_user$bio","toUserModel","userDTO","venueMap","friendsMap","followingMap","expand","ids","toVenueDTO","venue","lessonIds","venuename","venueaddress","geolocation","phone","website","contactEmail","contactName","contactPhone","lessonsIds","isDeleted","_venue$isDeleted","deletedAt","_venue$deletedAt","_venue$createdAt","toVenueModel","venueDTO","lessonMap","expandedLessons","_extends","lessons"],"mappings":";;;;SAGgBA,kBAAkBA,CAACC,UAAsB;EACrD,IAAAC,IAAA,GAAmED,UAAU,WAAVA,UAAU,GAAI,EAAE;IAAAE,cAAA,GAAAD,IAAA,CAA3EE,SAAS;IAATA,SAAS,GAAAD,cAAA,cAAG,EAAE,GAAAA,cAAA;IAAAE,YAAA,GAAAH,IAAA,CAAEI,OAAO;IAAPA,OAAO,GAAAD,YAAA,cAAG,EAAE,GAAAA,YAAA;IAAAE,UAAA,GAAAL,IAAA,CAAEM,KAAK;IAALA,KAAK,GAAAD,UAAA,cAAG,EAAE,GAAAA,UAAA;IAAAE,YAAA,GAAAP,IAAA,CAAEQ,OAAO;IAAPA,OAAO,GAAAD,YAAA,cAAG,EAAE,GAAAA,YAAA;EAE9D,IAAME,GAAG,MAAAC,MAAA,CACFR,SAAS,EACTE,OAAO,EACPE,KAAK,EACLE,OAAO,CACb;EAED,OAAOC,GAAG,CAACE,MAAM,CAAC,UAACC,IAAI,EAAEC,KAAK;IAAA,OAAKJ,GAAG,CAACK,OAAO,CAACF,IAAI,CAAC,KAAKC,KAAK;IAAC;AACnE;;SCXgBE,kBAAkBA,CAC9BC,aAAkC,EAClCC,UAAmB;EAGrB,OAAO;IACLC,EAAE,EAAEF,aAAa,CAACG,GAA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;IAChCC,WAAW,EAAER,KAAK,CAACQ,WAAW;IAC9BC,YAAY,EAAET,KAAK,CAACS,YAAY;IAChCC,UAAU,EAAET,SAAS;IACrB7F,UAAU,EAAEA,UAAU;IACtBuG,SAAS,GAAAC,gBAAA,GAAEZ,KAAK,CAACW,SAAS,YAAAC,gBAAA,GAAI,KAAK;IACnCC,SAAS,GAAAC,gBAAA,GAAEd,KAAK,CAACa,SAAS,YAAAC,gBAAA,GAAI,IAAI;IAClC/E,SAAS,GAAAgF,gBAAA,GAAEf,KAAK,CAACjE,SAAS,YAAAgF,gBAAA,GAAI;GACjC;AACL;;;;;;;;;;;;SCnBgBC,YAAYA,CACxBC,QAAkB,EAClBC,SAAoC,EACpC1D,aAA4C;EAE5C,IAAM2D,eAAe,GAAGF,QAAQ,CAACP,UAAU,CACtCtF,GAAG,CAAC,UAAAf,EAAE;IAAA,OAAIiD,aAAa,CAAC4D,SAAS,CAAC7G,EAAE,CAAC,EAAEmD,aAAa,CAAC;IAAC,CACtD1D,MAAM,CAACuB,OAAO,CAAC;EAEpB,OAAA+F,QAAA,KACOH,QAAQ;IACXI,OAAO,EAAEF;;AAEjB;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.getAllUserDanceIds=function(e){var r=null!=e?e:{},t=r.favorites,n=r.flagged,o=r.known,i=r.refresh,d=[].concat(void 0===t?[]:t,void 0===n?[]:n,void 0===o?[]:o,void 0===i?[]:i);return d.filter((function(e,r){return d.indexOf(e)===r}))};
1
+ "use strict";function e(e){return{id:e.id,name:e.name,isVerified:e.isVerified}}function n(e){return{id:e.id,name:e.name,artists:e.artists,isrc:e.isrc,uri:e.uri,duration_ms:e.duration_ms,explicit:e.explicit,isVerified:e.isVerified}}function i(i,r,t){var o=i.tracks.map((function(e){return r[e]})).filter(Boolean);return{id:i.id,danceName:i.danceName,choreographers:i.choreographers.map((function(n){return e(t[n])})),stepsheet:i.stepsheet,difficulty:i.difficulty,primaryTrack:n(r[i.primaryTrack]),tracks:o.map(n),isVerified:i.isVerified}}function r(e,n,r,t){var o=e.dances.map((function(e){return n[e]})).filter(Boolean);return{id:e._id,name:e.name,dances:o.map((function(e){return i(e,r,t)})),isVerified:e.isVerified,createdAt:e.createdAt,updatedAt:e.updatedAt,createdBy:e.createdBy,isCopyable:e.isCopyable}}function t(e,n){return{id:e.id,lessonday:e.lessonday,lessonstart:e.lessonstart,instructors:e.instructors.map((function(e){return n[e]})).filter(Boolean),duration:e.duration,lessoncost:e.lessoncost,notes:e.notes,difficulty:e.difficulty}}function o(){return(o=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var i=arguments[n];for(var r in i)({}).hasOwnProperty.call(i,r)&&(e[r]=i[r])}return e}).apply(null,arguments)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.getAllUserDanceIds=function(e){var n=null!=e?e:{},i=n.favorites,r=n.flagged,t=n.known,o=n.refresh,s=[].concat(void 0===i?[]:i,void 0===r?[]:r,void 0===t?[]:t,void 0===o?[]:o);return s.filter((function(e,n){return s.indexOf(e)===n}))},exports.toChoreographerDTO=function(e,n){return{id:e._id,name:e.name,isVerified:n}},exports.toChoreographerModel=e,exports.toCollectionModel=r,exports.toDanceDTO=function(e,n){var i,r,t,o,s;return{id:e._id,danceName:e.danceName,choreographers:null!=(i=null==(r=e.choreographers)?void 0:r.map((function(e){return e})))?i:[],stepsheet:e.stepsheet,difficulty:e.difficulty,primaryTrack:null!=(t=e.primaryTrack)?t:"",tracks:null!=(o=null==(s=e.tracks)?void 0:s.map((function(e){return e})))?o:[],isVerified:n}},exports.toDanceModel=i,exports.toInstructorDTO=function(e,n){return{id:e._id,name:e.name,userid:"leave this this empty for now and figure it out later...",isVerified:n}},exports.toInstructorModel=function(e){return{id:e.id,name:e.name,userid:"leave this this empty for now and figure it out later...",isVerified:e.isVerified}},exports.toLessonDTO=function(e,n){return{id:e._id,lessonday:e.lessonday,lessonstart:e.lessonstart,instructors:e.instructors,duration:e.duration,lessoncost:e.lessoncost,notes:e.notes,difficulty:e.difficulty,isVerified:n}},exports.toLessonModel=t,exports.toTrackDTO=function(e,n){return{id:e._id,name:e.name,artists:e.artists,isrc:e.isrc,uri:e.uri,duration_ms:e.duration_ms,explicit:e.explicit,isVerified:n}},exports.toTrackModel=n,exports.toUserAcquaintanceDTO=function(e,n,i){var r;return{id:e._id,username:e.username||e.name||"",image:e.image||"",bio:e.bio||"",isVerified:n,profile:{dances:{favorites:i.favorites,flagged:i.flagged,known:i.known,refresh:i.refresh},collections:i.collections,venues:i.venues,friendsCount:i.friendsCount,followingCount:i.followingCount,followersCount:i.followersCount,mutualFriendsCount:i.mutualFriendsCount,links:null!=(r=e.links)?r:{}}}},exports.toUserAcquaintanceModel=function(e,n,t,o,s){return{id:e.id,username:e.username,image:e.image,bio:e.bio,isVerified:e.isVerified,friendsCount:e.profile.friendsCount,followersCount:e.profile.followersCount,mutualFriendsCount:e.profile.mutualFriendsCount,links:e.profile.links,dances:{favorites:e.profile.dances.favorites.map((function(e){return i(n[e],t,s)})),flagged:e.profile.dances.flagged.map((function(e){return i(n[e],t,s)})),known:e.profile.dances.known.map((function(e){return i(n[e],t,s)})),refresh:e.profile.dances.refresh.map((function(e){return i(n[e],t,s)}))},collections:e.profile.collections.map((function(e){return r(o[e],n,t,s)}))}},exports.toUserDTO=function(e,n,i,r,t,o,s,a,l){var u,d,f,c,p,m;return void 0===t&&(t=[]),void 0===o&&(o=[]),void 0===s&&(s=[]),void 0===a&&(a=[]),void 0===l&&(l=[]),{_id:e._id.toString(),email:null!=(u=e.email)?u:"",name:null!=(d=e.name)?d:"",username:null!=(f=e.username)?f:"",image:null!=(c=e.image)?c:"",bio:null!=(p=e.bio)?p:"",isVerified:n,profile:{danceIds:i,collections:r,venues:t,friends:o,following:s,links:null!=(m=e.links)?m:{},friendsRequested:a,friendRequests:l}}},exports.toUserModel=function(e,n,i,r,t,o){var s=function(e,n){return e.map((function(e){return n[e]})).filter(Boolean)};return{_id:e._id,email:e.email,name:e.name,username:e.username,image:e.image,bio:e.bio,isVerified:e.isVerified,profile:{dances:{favorites:s(e.profile.danceIds.favorites,n),flagged:s(e.profile.danceIds.flagged,n),known:s(e.profile.danceIds.known,n),refresh:s(e.profile.danceIds.refresh,n)},collections:s(e.profile.collections,i),venues:s(e.profile.venues,r),friends:s(e.profile.friends,t),following:s(e.profile.following,o),friendsRequested:s(e.profile.friendsRequested,t),friendRequests:s(e.profile.friendRequests,t),followersCount:e.profile.followersCount||0,links:e.profile.links}}},exports.toVenueDTO=function(e,n,i){var r,t,o;return{id:e._id,venuename:e.venuename,venueaddress:e.venueaddress,geolocation:e.geolocation,phone:e.phone,website:e.website,contactEmail:e.contactEmail,contactName:e.contactName,contactPhone:e.contactPhone,lessonsIds:n,isVerified:i,isDeleted:null!=(r=e.isDeleted)&&r,deletedAt:null!=(t=e.deletedAt)?t:null,createdAt:null!=(o=e.createdAt)?o:null}},exports.toVenueModel=function(e,n,i){var r=e.lessonsIds.map((function(e){return t(n[e],i)})).filter(Boolean);return o({},e,{lessons:r})};
2
2
  //# sourceMappingURL=ldco-contract.cjs.production.min.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ldco-contract.cjs.production.min.js","sources":["../src/lib/getAllUserDanceIds.ts"],"sourcesContent":["import { DanceModel } from \"../types/model/dance.model\";\nimport { UserDances } from \"../types/model/userTypes/userDances\";\n\nexport function getAllUserDanceIds(userDances: UserDances): DanceModel[] {\n const { favorites = [], flagged = [], known = [], refresh = [] } = userDances ?? {};\n\n const all = [\n ...favorites,\n ...flagged,\n ...known,\n ...refresh,\n ];\n\n return all.filter((item, index) => all.indexOf(item) === index);\n}"],"names":["userDances","_ref","_ref$favorites","favorites","_ref$flagged","flagged","_ref$known","known","_ref$refresh","refresh","all","concat","filter","item","index","indexOf"],"mappings":"wGAGmCA,GAC/B,IAAAC,QAAmED,EAAAA,EAAc,GAAEE,EAAAD,EAA3EE,UAAcC,EAAAH,EAAEI,QAAYC,EAAAL,EAAEM,MAAUC,EAAAP,EAAEQ,QAE5CC,KAAGC,gBAFQT,EAAG,GAAEA,WAASE,EAAG,GAAEA,WAAOE,EAAG,GAAEA,WAASE,EAAG,GAAEA,GAS9D,OAAOE,EAAIE,QAAO,SAACC,EAAMC,GAAK,OAAKJ,EAAIK,QAAQF,KAAUC"}
1
+ {"version":3,"file":"ldco-contract.cjs.production.min.js","sources":["../src/lib/converters/toChoreographerModel.ts","../src/lib/converters/toTrackModel.ts","../src/lib/converters/toDanceModel.ts","../src/lib/converters/toCollectionsModel.ts","../src/lib/converters/toLessonModel.ts","../src/lib/getAllUserDanceIds.ts","../src/lib/converters/toChoreographerDTO.ts","../src/lib/converters/toDanceDTO.ts","../src/lib/converters/toInstructorDTO.ts","../src/lib/converters/toInstructorModel.ts","../src/lib/converters/toLessonDTO.ts","../src/lib/converters/toTrackDTO.ts","../src/lib/converters/toUserAcquaintanceDTO.ts","../src/lib/converters/toUserAcquaintanceModel.ts","../src/lib/converters/toUserDTO.ts","../src/lib/converters/toUserModel.ts","../src/lib/converters/toVenueDTO.ts","../src/lib/converters/toVenueModel.ts"],"sourcesContent":["import { ChoreographerDTO } from \"../../types/dto/choreographer.dto\";\nimport { ChoreographerModel } from \"../../types/model/choreographer.model\";\n\nexport function toChoreographerModel(\n dto: ChoreographerDTO\n): ChoreographerModel {\n\n return {\n id: dto.id,\n name: dto.name,\n isVerified: dto.isVerified\n };\n}\n","import { TrackDTO } from \"../../types/dto/track.dto\";\nimport { TrackModel } from \"../../types/model/track.model\";\n\nexport function toTrackModel(dto: TrackDTO): TrackModel {\n return {\n id: dto.id,\n name: dto.name,\n artists: dto.artists,\n isrc: dto.isrc,\n uri: dto.uri,\n duration_ms: dto.duration_ms,\n explicit: dto.explicit,\n isVerified: dto.isVerified,\n };\n}\n","import { ChoreographerDTO } from '../../types/dto/choreographer.dto';\nimport { DanceDTO } from '../../types/dto/dance.dto';\nimport { TrackDTO } from '../../types/dto/track.dto';\nimport { DanceModel } from '../../types/model/dance.model';\nimport { toChoreographerModel } from './toChoreographerModel';\nimport { toTrackModel } from './toTrackModel';\n\nexport function toDanceModel(\n dto: DanceDTO,\n trackMap: Record<string, TrackDTO>,\n choreographerMap: Record<string, ChoreographerDTO>\n): DanceModel {\n\n const tracks = dto.tracks\n .map(id => trackMap[id])\n .filter(Boolean);\n\n return {\n id: dto.id,\n danceName: dto.danceName,\n choreographers: dto.choreographers.map(id => toChoreographerModel(choreographerMap[id])),\n stepsheet: dto.stepsheet,\n difficulty: dto.difficulty,\n primaryTrack: toTrackModel(trackMap[dto.primaryTrack]),\n tracks: tracks.map(toTrackModel),\n isVerified: dto.isVerified,\n };\n}\n","import { ChoreographerDTO } from '../../types/dto/choreographer.dto';\nimport { CollectionDTO } from '../../types/dto/collection.dto';\nimport { DanceDTO } from '../../types/dto/dance.dto';\nimport { TrackDTO } from '../../types/dto/track.dto';\nimport { CollectionModel } from '../../types/model/collection.model';\nimport { toDanceModel } from './toDanceModel';\n\nexport function toCollectionModel(\n dto: CollectionDTO,\n danceMap: Record<string, DanceDTO>,\n trackMap: Record<string, TrackDTO>,\n choreographerMap: Record<string, ChoreographerDTO>\n): CollectionModel {\n const dances = dto.dances.map(id => danceMap[id]).filter(Boolean);\n\n return {\n id: dto._id,\n name: dto.name,\n dances: dances.map(d => toDanceModel(d, trackMap, choreographerMap)),\n isVerified: dto.isVerified,\n createdAt: dto.createdAt,\n updatedAt: dto.updatedAt,\n createdBy: dto.createdBy,\n isCopyable: dto.isCopyable,\n };\n}\n","import { InstructorDTO } from \"../../types/dto/instructor.dto\";\nimport { LessonDTO } from \"../../types/dto/lesson.dto\";\nimport { LessonModel } from \"../../types/model/lesson.model\";\n\nexport function toLessonModel(\n lessonDTO: LessonDTO,\n instructorMap: Record<string, InstructorDTO>\n): LessonModel {\n\n return {\n id: lessonDTO.id,\n lessonday: lessonDTO.lessonday,\n lessonstart: lessonDTO.lessonstart,\n instructors: lessonDTO.instructors.map(id => instructorMap[id]).filter(Boolean), // TODO: Do I need the converter?\n duration: lessonDTO.duration,\n lessoncost: lessonDTO.lessoncost,\n notes: lessonDTO.notes,\n difficulty: lessonDTO.difficulty,\n };\n}\n","import { DanceModel } from \"../types/model/dance.model\";\nimport { UserDances } from \"../types/model/userTypes/userDances\";\n\nexport function getAllUserDanceIds(userDances: UserDances): DanceModel[] {\n const { favorites = [], flagged = [], known = [], refresh = [] } = userDances ?? {};\n\n const all = [\n ...favorites,\n ...flagged,\n ...known,\n ...refresh,\n ];\n\n return all.filter((item, index) => all.indexOf(item) === index);\n}","import { ChoreographerDTO } from '../../types/dto/choreographer.dto';\nimport { ChoreographerEntity } from '../../types/entities/choreographer.entity';\n\nexport function toChoreographerDTO(\n choreographer: ChoreographerEntity,\n isVerified: boolean\n): ChoreographerDTO {\n\n return {\n id: choreographer._id,\n name: choreographer.name,\n isVerified: isVerified\n };\n}\n","import { DanceDTO } from \"../../types/dto/dance.dto\";\nimport { DanceEntity } from \"../../types/entities/dance.entity\";\n\nexport function toDanceDTO(\n dance: DanceEntity,\n isVerified: boolean\n): DanceDTO {\n\n return {\n id: dance._id,\n danceName: dance.danceName,\n choreographers: dance.choreographers?.map((id: string) => id) ?? [],\n stepsheet: dance.stepsheet,\n difficulty: dance.difficulty,\n primaryTrack: dance.primaryTrack ?? '',\n tracks: dance.tracks?.map((id: string) => id) ?? [],\n isVerified: isVerified\n };\n};\n","import { InstructorDTO } from \"../../types/dto/instructor.dto\";\nimport { InstructorEntity } from \"../../types/entities/instructor.entity\";\n\nexport function toInstructorDTO(\n instructor: InstructorEntity,\n isVerified: boolean\n): InstructorDTO {\n\n return {\n id: instructor._id,\n name: instructor.name,\n userid: \"leave this this empty for now and figure it out later...\",\n isVerified: isVerified\n };\n}\n","import { InstructorDTO } from \"../../types/dto/instructor.dto\";\nimport { InstructorModel } from \"../../types/model/instructor.model\";\n\nexport function toInstructorModel(\n dto: InstructorDTO, \n): InstructorModel {\n\n return {\n id: dto.id,\n name: dto.name,\n userid: \"leave this this empty for now and figure it out later...\",\n isVerified: dto.isVerified\n };\n}\n","import { LessonDTO } from \"../../types/dto/lesson.dto\";\nimport { LessonEntity } from \"../../types/entities/lesson.entity\";\n\nexport function toLessonDTO(\n LessonEntity: LessonEntity,\n isVerified: boolean\n): LessonDTO {\n\n return {\n id: LessonEntity._id,\n lessonday: LessonEntity.lessonday,\n lessonstart: LessonEntity.lessonstart,\n instructors: LessonEntity.instructors,\n duration: LessonEntity.duration,\n lessoncost: LessonEntity.lessoncost,\n notes: LessonEntity.notes,\n difficulty: LessonEntity.difficulty,\n isVerified: isVerified\n };\n}\n","import { TrackDTO } from \"../../types/dto/track.dto\";\nimport { TrackEntity } from \"../../types/entities/track.entity\";\n\nexport function toTrackDTO(dto: TrackEntity, isVerified: boolean): TrackDTO {\n return {\n id: dto._id,\n name: dto.name,\n artists: dto.artists,\n isrc: dto.isrc,\n uri: dto.uri,\n duration_ms: dto.duration_ms,\n explicit: dto.explicit,\n isVerified: isVerified,\n };\n}\n","import { UserAcquaintanceDTO } from \"../../types/dto/userAcquaintance.dto\";\nimport { UserEntity } from \"../../types/entities/user.entity\";\n\nexport function toUserAcquaintanceDTO(\n user: UserEntity,\n isVerified: boolean,\n userProfile: {\n favorites: string[];\n flagged: string[];\n known: string[];\n refresh: string[];\n collections: string[];\n venues: string[];\n friendsCount: number;\n followingCount: number;\n followersCount: number;\n mutualFriendsCount: number;\n }\n): UserAcquaintanceDTO {\n return {\n id: user._id,\n username: user.username || user.name || '',\n image: user.image || '',\n bio: user.bio || '',\n isVerified,\n profile: {\n dances: {\n favorites: userProfile.favorites,\n flagged: userProfile.flagged,\n known: userProfile.known,\n refresh: userProfile.refresh,\n },\n collections: userProfile.collections,\n venues: userProfile.venues,\n friendsCount: userProfile.friendsCount,\n followingCount: userProfile.followingCount,\n followersCount: userProfile.followersCount,\n mutualFriendsCount: userProfile.mutualFriendsCount,\n links: user.links ?? {},\n },\n };\n}\n","import { ChoreographerDTO } from \"../../types/dto/choreographer.dto\";\nimport { CollectionDTO } from \"../../types/dto/collection.dto\";\nimport { DanceDTO } from \"../../types/dto/dance.dto\";\nimport { TrackDTO } from \"../../types/dto/track.dto\";\nimport { UserAcquaintanceDTO } from \"../../types/dto/userAcquaintance.dto\";\nimport { UserAcquaintanceModel } from \"../../types/model/userAcquaintance.model\";\nimport { toCollectionModel } from \"./toCollectionsModel\";\nimport { toDanceModel } from \"./toDanceModel\";\n\nexport function toUserAcquaintanceModel(\n dto: UserAcquaintanceDTO,\n danceMap: Record<string, DanceDTO>,\n trackMap: Record<string, TrackDTO>,\n collectionMap: Record<string, CollectionDTO>,\n choreographerMap: Record<string, ChoreographerDTO>\n): UserAcquaintanceModel {\n\n return {\n id: dto.id,\n username: dto.username,\n image: dto.image,\n bio: dto.bio,\n isVerified: dto.isVerified,\n friendsCount: dto.profile.friendsCount,\n followersCount: dto.profile.followersCount,\n mutualFriendsCount: dto.profile.mutualFriendsCount,\n links: dto.profile.links,\n dances: {\n favorites: dto.profile.dances.favorites.map(id => toDanceModel(danceMap[id], trackMap, choreographerMap)),\n flagged: dto.profile.dances.flagged.map(id => toDanceModel(danceMap[id], trackMap, choreographerMap)),\n known: dto.profile.dances.known.map(id => toDanceModel(danceMap[id], trackMap, choreographerMap)),\n refresh: dto.profile.dances.refresh.map(id => toDanceModel(danceMap[id], trackMap, choreographerMap))\n },\n collections: dto.profile.collections.map(id => toCollectionModel(collectionMap[id], danceMap, trackMap, choreographerMap)),\n };\n}\n","import { UserDTO } from \"../../types/dto/user.dto\";\nimport { UserEntity } from \"../../types/entities/user.entity\";\n\nexport function toUserDTO(\n user: UserEntity,\n isVerified: boolean,\n danceIds: {\n favorites: string[];\n flagged: string[];\n known: string[];\n refresh: string[];\n },\n collections: string[],\n venues: string[] = [],\n friends: string[] = [],\n following: string[] = [],\n friendsRequested: string[] = [],\n friendRequests: string[] = []\n): UserDTO {\n return {\n _id: user._id.toString(),\n email: user.email ?? '',\n name: user.name ?? '',\n username: user.username ?? '',\n image: user.image ?? '',\n bio: user.bio ?? '',\n isVerified,\n profile: {\n danceIds,\n collections,\n venues,\n friends,\n following,\n links: user.links ?? {},\n friendsRequested,\n friendRequests\n },\n };\n};\n\nexport default toUserDTO;\n","import { UserDTO } from \"../../types/dto/user.dto\";\nimport { CollectionModel } from \"../../types/model/collection.model\";\nimport { DanceModel } from \"../../types/model/dance.model\";\nimport { UserModel } from \"../../types/model/user.model\";\nimport { UserAcquaintanceModel } from \"../../types/model/userAcquaintance.model\";\nimport { VenueModel } from \"../../types/model/venue.model\";\n\nexport function toUserModel(\n userDTO: UserDTO,\n danceMap: Record<string, DanceModel>,\n collectionMap: Record<string, CollectionModel>,\n venueMap: Record<string, VenueModel>,\n friendsMap: Record<string, UserAcquaintanceModel>,\n followingMap: Record<string, UserAcquaintanceModel>\n): UserModel {\n const expand = <T>(ids: string[], map: Record<string, T>): T[] => ids.map(id => map[id]).filter(Boolean);\n\n return {\n _id: userDTO._id,\n email: userDTO.email,\n name: userDTO.name,\n username: userDTO.username,\n image: userDTO.image,\n bio: userDTO.bio,\n isVerified: userDTO.isVerified,\n profile: {\n dances: {\n favorites: expand(userDTO.profile.danceIds.favorites, danceMap),\n flagged: expand(userDTO.profile.danceIds.flagged, danceMap),\n known: expand(userDTO.profile.danceIds.known, danceMap),\n refresh: expand(userDTO.profile.danceIds.refresh, danceMap),\n },\n collections: expand(userDTO.profile.collections, collectionMap),\n venues: expand(userDTO.profile.venues, venueMap),\n friends: expand(userDTO.profile.friends, friendsMap),\n following: expand(userDTO.profile.following, followingMap),\n friendsRequested: expand(userDTO.profile.friendsRequested, friendsMap),\n friendRequests: expand(userDTO.profile.friendRequests, friendsMap),\n followersCount: userDTO.profile.followersCount || 0,\n links: userDTO.profile.links,\n },\n };\n}\n","import { VenueDTO } from \"../../types/dto/venue.dto\";\nimport { VenueEntity } from \"../../types/entities/venue.entity\";\n\nexport function toVenueDTO(\n venue: VenueEntity,\n lessonIds: string[],\n isVerified: boolean\n): VenueDTO {\n\n return {\n id: venue._id,\n venuename: venue.venuename,\n venueaddress: venue.venueaddress,\n geolocation: venue.geolocation,\n phone: venue.phone,\n website: venue.website,\n contactEmail: venue.contactEmail,\n contactName: venue.contactName,\n contactPhone: venue.contactPhone,\n lessonsIds: lessonIds,\n isVerified: isVerified,\n isDeleted: venue.isDeleted ?? false,\n deletedAt: venue.deletedAt ?? null,\n createdAt: venue.createdAt ?? null,\n };\n}","import { InstructorDTO } from \"../../types/dto/instructor.dto\";\nimport { LessonDTO } from \"../../types/dto/lesson.dto\";\nimport { VenueDTO } from \"../../types/dto/venue.dto\";\nimport { VenueModel } from \"../../types/model/venue.model\";\nimport { toLessonModel } from \"./toLessonModel\";\n\nexport function toVenueModel(\n venueDTO: VenueDTO,\n lessonMap: Record<string, LessonDTO>,\n instructorMap: Record<string, InstructorDTO>\n): VenueModel {\n const expandedLessons = venueDTO.lessonsIds\n .map(id => toLessonModel(lessonMap[id], instructorMap))\n .filter(Boolean);\n\n return {\n ...venueDTO,\n lessons: expandedLessons,\n };\n}\n"],"names":["toChoreographerModel","dto","id","name","isVerified","toTrackModel","artists","isrc","uri","duration_ms","explicit","toDanceModel","trackMap","choreographerMap","tracks","map","filter","Boolean","danceName","choreographers","stepsheet","difficulty","primaryTrack","toCollectionModel","danceMap","dances","_id","d","createdAt","updatedAt","createdBy","isCopyable","toLessonModel","lessonDTO","instructorMap","lessonday","lessonstart","instructors","duration","lessoncost","notes","userDances","_ref","_ref$favorites","favorites","_ref$flagged","flagged","_ref$known","known","_ref$refresh","refresh","all","concat","item","index","indexOf","choreographer","dance","_dance$choreographers","_dance$choreographers2","_dance$primaryTrack","_dance$tracks$map","_dance$tracks","instructor","userid","LessonEntity","user","userProfile","username","image","bio","profile","collections","venues","friendsCount","followingCount","followersCount","mutualFriendsCount","links","_user$links","collectionMap","danceIds","friends","following","friendsRequested","friendRequests","toString","email","_user$email","_user$name","_user$username","_user$image","_user$bio","userDTO","venueMap","friendsMap","followingMap","expand","ids","venue","lessonIds","venuename","venueaddress","geolocation","phone","website","contactEmail","contactName","contactPhone","lessonsIds","isDeleted","_venue$isDeleted","deletedAt","_venue$deletedAt","_venue$createdAt","venueDTO","lessonMap","expandedLessons","_extends","lessons"],"mappings":"sBAGgBA,EACZC,GAGF,MAAO,CACLC,GAAID,EAAIC,GACRC,KAAMF,EAAIE,KACVC,WAAYH,EAAIG,qBCPJC,EAAaJ,GAC3B,MAAO,CACLC,GAAID,EAAIC,GACRC,KAAMF,EAAIE,KACVG,QAASL,EAAIK,QACbC,KAAMN,EAAIM,KACVC,IAAKP,EAAIO,IACTC,YAAaR,EAAIQ,YACjBC,SAAUT,EAAIS,SACdN,WAAYH,EAAIG,qBCLJO,EACdV,EACAW,EACAC,GAGA,IAAMC,EAASb,EAAIa,OAChBC,KAAI,SAAAb,GAAE,OAAIU,EAASV,MACnBc,OAAOC,SAEV,MAAO,CACLf,GAAID,EAAIC,GACRgB,UAAWjB,EAAIiB,UACfC,eAAgBlB,EAAIkB,eAAeJ,KAAI,SAAAb,GAAE,OAAIF,EAAqBa,EAAiBX,OACnFkB,UAAWnB,EAAImB,UACfC,WAAYpB,EAAIoB,WAChBC,aAAcjB,EAAaO,EAASX,EAAIqB,eACxCR,OAAQA,EAAOC,IAAIV,GACnBD,WAAYH,EAAIG,qBClBJmB,EACZtB,EACAuB,EACAZ,EACAC,GAEA,IAAMY,EAASxB,EAAIwB,OAAOV,KAAI,SAAAb,GAAE,OAAIsB,EAAStB,MAAKc,OAAOC,SAEzD,MAAO,CACHf,GAAID,EAAIyB,IACRvB,KAAMF,EAAIE,KACVsB,OAAQA,EAAOV,KAAI,SAAAY,GAAC,OAAIhB,EAAagB,EAAGf,EAAUC,MAClDT,WAAYH,EAAIG,WAChBwB,UAAW3B,EAAI2B,UACfC,UAAW5B,EAAI4B,UACfC,UAAW7B,EAAI6B,UACfC,WAAY9B,EAAI8B,qBCnBRC,EACdC,EACAC,GAGA,MAAO,CACLhC,GAA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