@royalschedule/maps 3.0.8 → 3.0.10

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 (167) hide show
  1. package/dist/RS/v2/to/course-events/groups.js +3 -3
  2. package/dist/RS/v2/to/course-events/groups.js.map +1 -1
  3. package/dist/RS/v2/to/destructure.js +4 -4
  4. package/dist/RS/v2/to/destructure.js.map +1 -1
  5. package/dist/RS/v3/from/available-dependencies.d.ts +3 -0
  6. package/dist/RS/v3/from/available-dependencies.js +97 -0
  7. package/dist/RS/v3/from/available-dependencies.js.map +1 -0
  8. package/dist/RS/v3/from/break-lengths.d.ts +3 -0
  9. package/dist/RS/v3/from/break-lengths.js +20 -0
  10. package/dist/RS/v3/from/break-lengths.js.map +1 -0
  11. package/dist/RS/v3/from/collections.d.ts +4 -0
  12. package/dist/RS/v3/from/collections.js +12 -0
  13. package/dist/RS/v3/from/collections.js.map +1 -0
  14. package/dist/RS/v3/from/course-events.d.ts +5 -0
  15. package/dist/RS/v3/from/course-events.js +14 -0
  16. package/dist/RS/v3/from/course-events.js.map +1 -0
  17. package/dist/RS/v3/from/days.d.ts +4 -0
  18. package/dist/RS/v3/from/days.js +22 -0
  19. package/dist/RS/v3/from/days.js.map +1 -0
  20. package/dist/RS/v3/from/dependencies.d.ts +6 -0
  21. package/dist/RS/v3/from/dependencies.js +97 -0
  22. package/dist/RS/v3/from/dependencies.js.map +1 -0
  23. package/dist/RS/v3/from/groups.d.ts +5 -0
  24. package/dist/RS/v3/from/groups.js +103 -0
  25. package/dist/RS/v3/from/groups.js.map +1 -0
  26. package/dist/RS/v3/from/index.d.ts +25 -0
  27. package/dist/RS/v3/from/index.js +66 -0
  28. package/dist/RS/v3/from/index.js.map +1 -0
  29. package/dist/RS/v3/from/individuals.d.ts +4 -0
  30. package/dist/RS/v3/from/individuals.js +12 -0
  31. package/dist/RS/v3/from/individuals.js.map +1 -0
  32. package/dist/RS/v3/from/intervals.d.ts +4 -0
  33. package/dist/RS/v3/from/intervals.js +28 -0
  34. package/dist/RS/v3/from/intervals.js.map +1 -0
  35. package/dist/RS/v3/from/locked-times.d.ts +4 -0
  36. package/dist/RS/v3/from/locked-times.js +28 -0
  37. package/dist/RS/v3/from/locked-times.js.map +1 -0
  38. package/dist/RS/v3/from/placements.d.ts +7 -0
  39. package/dist/RS/v3/from/placements.js +39 -0
  40. package/dist/RS/v3/from/placements.js.map +1 -0
  41. package/dist/RS/v3/from/schedules.d.ts +13 -0
  42. package/dist/RS/v3/from/schedules.js +162 -0
  43. package/dist/RS/v3/from/schedules.js.map +1 -0
  44. package/dist/RS/v3/from/settings.d.ts +6 -0
  45. package/dist/RS/v3/from/settings.js +39 -0
  46. package/dist/RS/v3/from/settings.js.map +1 -0
  47. package/dist/RS/v3/from/teachers.d.ts +5 -0
  48. package/dist/RS/v3/from/teachers.js +101 -0
  49. package/dist/RS/v3/from/teachers.js.map +1 -0
  50. package/dist/core/from/courses.js +15 -0
  51. package/dist/core/from/courses.js.map +1 -1
  52. package/dist/core/from/events.js +15 -0
  53. package/dist/core/from/events.js.map +1 -1
  54. package/dist/core/from/groups.js +15 -0
  55. package/dist/core/from/groups.js.map +1 -1
  56. package/dist/core/from/locations.js +15 -0
  57. package/dist/core/from/locations.js.map +1 -1
  58. package/dist/core/from/locked-times.js +15 -0
  59. package/dist/core/from/locked-times.js.map +1 -1
  60. package/dist/core/from/overlap-groups.js +15 -0
  61. package/dist/core/from/overlap-groups.js.map +1 -1
  62. package/dist/core/from/persons.js +15 -0
  63. package/dist/core/from/persons.js.map +1 -1
  64. package/dist/core/from/schedules.js +15 -0
  65. package/dist/core/from/schedules.js.map +1 -1
  66. package/dist/core/from/teachers.js +15 -0
  67. package/dist/core/from/teachers.js.map +1 -1
  68. package/dist/core/to/available-locations.js +15 -0
  69. package/dist/core/to/available-locations.js.map +1 -1
  70. package/dist/core/to/courses.d.ts +37 -1
  71. package/dist/core/to/courses.js +43 -10
  72. package/dist/core/to/courses.js.map +1 -1
  73. package/dist/core/to/days.d.ts +4 -1
  74. package/dist/core/to/days.js +15 -0
  75. package/dist/core/to/days.js.map +1 -1
  76. package/dist/core/to/events.d.ts +41 -1
  77. package/dist/core/to/events.js +43 -10
  78. package/dist/core/to/events.js.map +1 -1
  79. package/dist/core/to/groups.d.ts +15 -1
  80. package/dist/core/to/groups.js +15 -0
  81. package/dist/core/to/groups.js.map +1 -1
  82. package/dist/core/to/intervals.d.ts +4 -1
  83. package/dist/core/to/intervals.js.map +1 -1
  84. package/dist/core/to/locations.js +15 -0
  85. package/dist/core/to/locations.js.map +1 -1
  86. package/dist/core/to/locked-times.d.ts +2 -2
  87. package/dist/core/to/locked-times.js +16 -1
  88. package/dist/core/to/locked-times.js.map +1 -1
  89. package/dist/core/to/overlap-groups.js +15 -0
  90. package/dist/core/to/overlap-groups.js.map +1 -1
  91. package/dist/core/to/persons.js +15 -0
  92. package/dist/core/to/persons.js.map +1 -1
  93. package/dist/core/to/schedules.js +16 -1
  94. package/dist/core/to/schedules.js.map +1 -1
  95. package/dist/core/to/settings.js +15 -0
  96. package/dist/core/to/settings.js.map +1 -1
  97. package/dist/core/to/teachers.js +15 -0
  98. package/dist/core/to/teachers.js.map +1 -1
  99. package/dist/core/types/available-locations.d.ts +1 -1
  100. package/dist/core/types/common/index.d.ts +2 -2
  101. package/dist/core/types/common/index.js +0 -1
  102. package/dist/core/types/common/index.js.map +1 -1
  103. package/dist/core/types/common.d.ts +26 -0
  104. package/dist/{PlanDigital/types/period.js → core/types/common.js} +1 -1
  105. package/dist/core/types/common.js.map +1 -0
  106. package/dist/core/types/course-events.d.ts +14 -4
  107. package/dist/core/types/courses.d.ts +15 -4
  108. package/dist/core/types/division-settings.d.ts +1 -1
  109. package/dist/core/types/divisions.d.ts +1 -1
  110. package/dist/core/types/groups.d.ts +1 -1
  111. package/dist/core/types/locations.d.ts +1 -1
  112. package/dist/core/types/locked-times.d.ts +1 -1
  113. package/dist/core/types/meta.d.ts +1 -1
  114. package/dist/core/types/overlap-groups.d.ts +1 -1
  115. package/dist/core/types/periods.d.ts +1 -1
  116. package/dist/core/types/persons.d.ts +1 -1
  117. package/dist/core/types/teachers.d.ts +1 -3
  118. package/dist/core/v2/from/calendar-exceptions.d.ts +3 -2
  119. package/dist/core/v2/from/calendar-exceptions.js +15 -15
  120. package/dist/core/v2/to/calendar-exceptions.js +15 -15
  121. package/dist/core/v2/to/calendar-exceptions.js.map +1 -1
  122. package/dist/core/v2/types/common/index.d.ts +26 -0
  123. package/package.json +1 -1
  124. package/dist/PlanDigital/types/course.d.ts +0 -15
  125. package/dist/PlanDigital/types/course.js +0 -6
  126. package/dist/PlanDigital/types/course.js.map +0 -1
  127. package/dist/PlanDigital/types/period.d.ts +0 -3
  128. package/dist/PlanDigital/types/period.js.map +0 -1
  129. package/dist/SchoolSoft/file/old_to/index.d.ts +0 -9
  130. package/dist/SchoolSoft/file/old_to/index.js +0 -17
  131. package/dist/SchoolSoft/file/old_to/index.js.map +0 -1
  132. package/dist/SchoolSoft/file/old_to/schedules.d.ts +0 -10
  133. package/dist/SchoolSoft/file/old_to/schedules.js +0 -109
  134. package/dist/SchoolSoft/file/old_to/schedules.js.map +0 -1
  135. package/dist/SchoolSoft/from/index.d.ts +0 -8
  136. package/dist/SchoolSoft/from/index.js +0 -16
  137. package/dist/SchoolSoft/from/index.js.map +0 -1
  138. package/dist/SchoolSoft/from/schedules.d.ts +0 -9
  139. package/dist/SchoolSoft/from/schedules.js +0 -221
  140. package/dist/SchoolSoft/from/schedules.js.map +0 -1
  141. package/dist/SchoolSoft/to/index.d.ts +0 -3
  142. package/dist/SchoolSoft/to/index.js +0 -16
  143. package/dist/SchoolSoft/to/index.js.map +0 -1
  144. package/dist/SchoolSoft/to/schedules.d.ts +0 -4
  145. package/dist/SchoolSoft/to/schedules.js +0 -36
  146. package/dist/SchoolSoft/to/schedules.js.map +0 -1
  147. package/dist/SchoolSoft/types/events.d.ts +0 -19
  148. package/dist/SchoolSoft/types/events.js +0 -6
  149. package/dist/SchoolSoft/types/events.js.map +0 -1
  150. package/dist/SchoolSoft/types/index.d.ts +0 -4
  151. package/dist/Skola24/types/Meta.d.ts +0 -7
  152. package/dist/Skola24/types/Meta.js +0 -6
  153. package/dist/Skola24/types/Meta.js.map +0 -1
  154. package/dist/core/constants/index.d.ts +0 -71
  155. package/dist/core/constants/index.js +0 -136
  156. package/dist/core/constants/index.js.map +0 -1
  157. package/dist/core/identify/index.d.ts +0 -2
  158. package/dist/core/identify/index.js +0 -65
  159. package/dist/core/identify/index.js.map +0 -1
  160. package/dist/core/types/identify.d.ts +0 -10
  161. package/dist/core/types/identify.js +0 -6
  162. package/dist/core/types/identify.js.map +0 -1
  163. package/dist/core/types/students.d.ts +0 -8
  164. package/dist/core/types/students.js +0 -6
  165. package/dist/core/types/students.js.map +0 -1
  166. /package/dist/{SchoolSoft/types → core/v2/types/common}/index.js +0 -0
  167. /package/dist/{SchoolSoft/types → core/v2/types/common}/index.js.map +0 -0
@@ -32,20 +32,20 @@ function mapGroupReferences(source, options, destructMap) {
32
32
  var {
33
33
  to
34
34
  } = _ref4;
35
- return to[idKey];
35
+ return to === null || to === void 0 ? void 0 : to[idKey];
36
36
  }).filter(x => !!x).map(x => 'teachers.' + x.toString());
37
37
  var groupIds = groups.map(_ref5 => {
38
38
  var _to$parentGroups;
39
39
  var {
40
40
  to
41
41
  } = _ref5;
42
- return (_to$parentGroups = to.parentGroups) !== null && _to$parentGroups !== void 0 && _to$parentGroups.length ? to.parentGroups.map(x => x[idKey]) : to[idKey];
42
+ return to !== null && to !== void 0 && (_to$parentGroups = to.parentGroups) !== null && _to$parentGroups !== void 0 && _to$parentGroups.length ? to.parentGroups.map(x => x === null || x === void 0 ? void 0 : x[idKey]).filter(Boolean) : to === null || to === void 0 ? void 0 : to[idKey];
43
43
  }).flat().filter(x => !!x).map(x => 'groups.' + x.toString());
44
44
  var participantIds = participants.map(_ref6 => {
45
45
  var {
46
46
  to
47
47
  } = _ref6;
48
- return to[idKey];
48
+ return to === null || to === void 0 ? void 0 : to[idKey];
49
49
  }).filter(x => !!x).map(x => 'persons.' + x.toString());
50
50
  deconstructGroups(groups, participantIds, destructMap, options);
51
51
  var out = [...new Set(teacherIds), ...new Set(groupIds), ...new Set(participantIds)].map(x => [x]);
@@ -1 +1 @@
1
- {"version":3,"file":"groups.js","names":["deconstructGroups","groups","participantIds","destructMap","options","idKey","size","forEach","group","_group$to$idKey","id","to","toString","destructed","get","remaining","Array","from","filter","pId","_group$exclude","exclude","some","x","map","concat","push","includes","mapGroupReferences","source","_ref","_source$teachers","_source$course","_ref2","_source$groups","_source$course2","_ref3","_source$participants","_source$course3","teachers","course","participants","teacherIds","_ref4","groupIds","_ref5","_to$parentGroups","parentGroups","length","flat","_ref6","out","Set"],"sources":["../../../../../src/RS/v2/to/course-events/groups.ts"],"sourcesContent":[null],"mappings":";;;;;;;AAQM,SAAUA,iBAAiBA,CAC/BC,MAAoE,EACpEC,cAAwB,EACxBC,WAA+C,EAC/CC,OAA0B;EAE1B,IAAMC,KAAK,GAAGD,OAAO,CAACC,KAAK,IAAI,IAAI;EAEnC,IAAIF,WAAW,CAACG,IAAI,EAAE;IACpBL,MAAM,CAACM,OAAO,CAACC,KAAK,IAAG;MAAA,IAAAC,eAAA;MACrB,IAAMC,EAAE,IAAAD,eAAA,GAAGD,KAAK,CAACG,EAAE,CAACN,KAAK,CAAC,cAAAI,eAAA,uBAAfA,eAAA,CAAiBG,QAAQ,EAAE;MACtC,IAAK,CAAEF,EAAE,EAAE;MAEX,IAAMG,UAAU,GAAGV,WAAW,CAACW,GAAG,CAACJ,EAAE,CAAC;MACtC,IAAK,CAAEG,UAAU,EAAE;MAGnB,IAAME,SAAS,GAAGC,KAAK,CAACC,IAAI,CAACJ,UAAU,CAAC,CACrCK,MAAM,CAACC,GAAG;QAAA,IAAAC,cAAA;QAAA,OAAI,GAAAA,cAAA,GAAEZ,KAAK,CAACa,OAAO,cAAAD,cAAA,eAAbA,cAAA,CA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AAIC,GAAG,CAACV,UAAU,CAAC,EAAE,GAAG,IAAIU,GAAG,CAACR,QAAQ,CAAC,EAAE,GAAG,IAAIQ,GAAG,CAAClD,cAAc,CAAC,CAAC,CAACsB,GAAG,CAACD,CAAC,IAAI,CAACA,CAAC,CAAC,CAAC;EACpG,OAAO4B,GAAG;AACZ"}
1
+ {"version":3,"file":"groups.js","names":["deconstructGroups","groups","participantIds","destructMap","options","idKey","size","forEach","group","_group$to$idKey","id","to","toString","destructed","get","remaining","Array","from","filter","pId","_group$exclude","exclude","some","x","map","concat","push","includes","mapGroupReferences","source","_ref","_source$teachers","_source$course","_ref2","_source$groups","_source$course2","_ref3","_source$participants","_source$course3","teachers","course","participants","teacherIds","_ref4","groupIds","_ref5","_to$parentGroups","parentGroups","length","Boolean","flat","_ref6","out","Set"],"sources":["../../../../../src/RS/v2/to/course-events/groups.ts"],"sourcesContent":[null],"mappings":";;;;;;;AAQM,SAAUA,iBAAiBA,CAC/BC,MAAoE,EACpEC,cAAwB,EACxBC,WAA+C,EAC/CC,OAA0B;EAE1B,IAAMC,KAAK,GAAGD,OAAO,CAACC,KAAK,IAAI,IAAI;EAEnC,IAAIF,WAAW,CAACG,IAAI,EAAE;IACpBL,MAAM,CAACM,OAAO,CAACC,KAAK,IAAG;MAAA,IAAAC,eAAA;MACrB,IAAMC,EAAE,IAAAD,eAAA,GAAGD,KAAK,CAACG,EAAE,CAACN,KAAK,CAAC,cAAAI,eAAA,uBAAfA,eAAA,CAAiBG,QAAQ,EAAE;MACtC,IAAK,CAAEF,EAAE,EAAE;MAEX,IAAMG,UAAU,GAAGV,WAAW,CAACW,GAAG,CAACJ,EAAE,CAAC;MACtC,IAAK,CAAEG,UAAU,EAAE;MAGnB,IAAME,SAAS,GAAGC,KAAK,CAACC,IAAI,CAACJ,UAAU,CAAC,CACrCK,MAAM,CAACC,GAAG;QAAA,IAAAC,cAAA;QAAA,OAAI,GAAAA,cAAA,GAAEZ,KAAK,CAACa,OAAO,cAAAD,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C,CAACC,GAAG,CAACD,CAAC,IAAI,UAAU,GAAIA,CAAC,CAACX,QAAQ,EAAE,CAAC;EAErJZ,iBAAiB,CAACC,MAAM,EAAEC,cAAc,EAAEC,WAAW,EAAEC,OAAO,CAAC;EAE/D,IAAMgD,GAAG,GAAG,CAAC,GAAG,IAAIC,GAAG,CAACX,UAAU,CAAC,EAAE,GAAG,IAAIW,GAAG,CAACT,QAAQ,CAAC,EAAE,GAAG,IAAIS,GAAG,CAACnD,cAAc,CAAC,CAAC,CAACsB,GAAG,CAACD,CAAC,IAAI,CAACA,CAAC,CAAC,CAAC;EACpG,OAAO6B,GAAG;AACZ"}
@@ -16,8 +16,8 @@ var _default = exports.default = function _default(courses) {
16
16
  if (source.groups || source.participants) {
17
17
  var _source$groups, _source$participants;
18
18
  (_source$groups = source.groups) === null || _source$groups === void 0 || _source$groups.forEach(x => {
19
- var _x$to$idKey, _x$exclude;
20
- var id = (_x$to$idKey = x.to[idKey]) === null || _x$to$idKey === void 0 ? void 0 : _x$to$idKey.toString();
19
+ var _x$to, _x$exclude;
20
+ var id = x === null || x === void 0 || (_x$to = x.to) === null || _x$to === void 0 || (_x$to = _x$to[idKey]) === null || _x$to === void 0 ? void 0 : _x$to.toString();
21
21
  if (!id) return;
22
22
  if (!destructMap.has(id)) destructMap.set(id, new Set());
23
23
  (_x$exclude = x.exclude) === null || _x$exclude === void 0 || _x$exclude.forEach(y => {
@@ -26,8 +26,8 @@ var _default = exports.default = function _default(courses) {
26
26
  });
27
27
  });
28
28
  (_source$participants = source.participants) === null || _source$participants === void 0 || _source$participants.forEach(x => {
29
- var _x$to$idKey2, _x$to$group, _destructMap$get3;
30
- var id = (_x$to$idKey2 = x.to[idKey]) === null || _x$to$idKey2 === void 0 ? void 0 : _x$to$idKey2.toString();
29
+ var _x$to2, _x$to$group, _destructMap$get3;
30
+ var id = x === null || x === void 0 || (_x$to2 = x.to) === null || _x$to2 === void 0 || (_x$to2 = _x$to2[idKey]) === null || _x$to2 === void 0 ? void 0 : _x$to2.toString();
31
31
  if (!id) return;
32
32
  var groupId = (_x$to$group = x.to.group) === null || _x$to$group === void 0 || (_x$to$group = _x$to$group[idKey]) === null || _x$to$group === void 0 ? void 0 : _x$to$group.toString();
33
33
  if (!groupId) {
@@ -1 +1 @@
1
- {"version":3,"file":"destructure.js","names":["_default","courses","events","arguments","length","undefined","options","destructMap","Map","idKey","Array","isArray","concat","forEach","source","Error","groups","participants","_source$groups","_source$participants","x","_x$to$idKey","_x$exclude","id","to","toString","has","set","Set","exclude","y","_destructMap$get","_y$idKey","get","add","_x$to$idKey2","_x$to$group","_destructMap$get3","groupId","group","_destructMap$get2"],"sources":["../../../../src/RS/v2/to/destructure.ts"],"sourcesContent":[null],"mappings":";;;;;;iCAMe,SAAAA,SAACC,OAAgF,EAEnD;EAAA,IAD7BC,MAAA,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAiF,EAAE;EAAA,IACnFG,OAAyB,GAAAH,SAAA,CAAAC,MAAA,OAAAD,SAAA,MAAAE,SAAA;EACvC,IAAME,WAAW,GAAG,IAAIC,GAAG,EAA8B;EAEzD,IAAMC,KAAK,GAA2BH,OAAO,CAACG,KAAK,IAAI,IAAI;EAE3DR,OAAO,GAAGS,KAAK,CAACC,OAAO,CAACV,OAAO,CAAC,GAAGA,OAAO,GAAG,CAACA,OAAO,CAAC;EACtDC,MAAM,GAAIQ,KAAK,CAACC,OAAO,CAACT,MAAM,CAAC,GAAIA,MAAM,GAAI,CAACA,MAAM,CAAC;EAMrDD,OAAO,CAACW,MAAM,CAACV,MAAM,CAAC,CAACW,OAAO,CAACC,MAAM,IAAG;IAEtC,IAAI,CAAEA,MAAM,CAACL,KAAK,CAAC,EACjB,MAAM,IAAIM,KAAK,CAAC,+DAA+D,CAAC;IAElF,IAAID,MAAM,CAACE,MAAM,IAAIF,MAAM,CAACG,YAAY,EAAE;MAAA,IAAAC,cAAA,EAAAC,oBAAA;MAI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A,CAAa3B,KAAK,CAAC,cAAA2B,WAAA,uBAAnBA,WAAA,CAAqBX,QAAQ,EAAE;QAC/C,IAAK,CAAEa,OAAO,EAAE;UAAA,IAAAE,iBAAA;UACd,IAAK,CAAEjC,WAAW,CAACmB,GAAG,CAAC,IAAI,CAAC,EAAEnB,WAAW,CAACoB,GAAG,CAAC,IAAI,EAAE,IAAIC,GAAG,CAAH,CAAG,CAAC;UAC5D,CAAAY,iBAAA,GAAAjC,WAAW,CAAC0B,GAAG,CAAC,IAAI,CAAC,cAAAO,iBAAA,eAArBA,iBAAA,CAAuBN,GAAG,CAACX,EAAE,CAAC;UAC9B;;QAGF,IAAK,CAAEhB,WAAW,CAACmB,GAAG,CAACY,OAAO,CAAC,EAAE/B,WAAW,CAACoB,GAAG,CAACW,OAAO,EAAE,IAAIV,GAAG,CAAH,CAAG,CAAC;QAClE,CAAAS,iBAAA,GAAA9B,WAAW,CAAC0B,GAAG,CAACK,OAAO,CAAC,cAAAD,iBAAA,eAAxBA,iBAAA,CAA0BH,GAAG,CAACX,EAAE,CAAC;MACnC,CAAC,CAAC;;EAEN,CAAC,CAAC;EAEF,OAAOhB,WAAW;AACpB,CAAC"}
1
+ {"version":3,"file":"destructure.js","names":["_default","courses","events","arguments","length","undefined","options","destructMap","Map","idKey","Array","isArray","concat","forEach","source","Error","groups","participants","_source$groups","_source$participants","x","_x$to","_x$exclude","id","to","toString","has","set","Set","exclude","y","_destructMap$get","_y$idKey","get","add","_x$to2","_x$to$group","_destructMap$get3","groupId","group","_destructMap$get2"],"sources":["../../../../src/RS/v2/to/destructure.ts"],"sourcesContent":[null],"mappings":";;;;;;iCAMe,SAAAA,SAACC,OAAgF,EAEnD;EAAA,IAD7BC,MAAA,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAiF,EAAE;EAAA,IACnFG,OAAyB,GAAAH,SAAA,CAAAC,MAAA,OAAAD,SAAA,MAAAE,SAAA;EACvC,IA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AAS,iBAAA,GAAA9B,WAAW,CAAC0B,GAAG,CAACK,OAAO,CAAC,cAAAD,iBAAA,eAAxBA,iBAAA,CAA0BH,GAAG,CAACX,EAAE,CAAC;MACnC,CAAC,CAAC;;EAEN,CAAC,CAAC;EAEF,OAAOhB,WAAW;AACpB,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { Settings } from '../types/settings';
2
+ declare const _default: (data: any, settings: Settings) => any;
3
+ export default _default;
@@ -0,0 +1,97 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+ function ownKeys(e, r) {
8
+ var t = Object.keys(e);
9
+ if (Object.getOwnPropertySymbols) {
10
+ var o = Object.getOwnPropertySymbols(e);
11
+ r && (o = o.filter(function (r) {
12
+ return Object.getOwnPropertyDescriptor(e, r).enumerable;
13
+ })), t.push.apply(t, o);
14
+ }
15
+ return t;
16
+ }
17
+ function _objectSpread(e) {
18
+ for (var r = 1; r < arguments.length; r++) {
19
+ var t = null != arguments[r] ? arguments[r] : {};
20
+ r % 2 ? ownKeys(Object(t), !0).forEach(function (r) {
21
+ _defineProperty(e, r, t[r]);
22
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) {
23
+ Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));
24
+ });
25
+ }
26
+ return e;
27
+ }
28
+ function _defineProperty(obj, key, value) {
29
+ key = _toPropertyKey(key);
30
+ if (key in obj) {
31
+ Object.defineProperty(obj, key, {
32
+ value: value,
33
+ enumerable: true,
34
+ configurable: true,
35
+ writable: true
36
+ });
37
+ } else {
38
+ obj[key] = value;
39
+ }
40
+ return obj;
41
+ }
42
+ function _toPropertyKey(arg) {
43
+ var key = _toPrimitive(arg, "string");
44
+ return typeof key === "symbol" ? key : String(key);
45
+ }
46
+ function _toPrimitive(input, hint) {
47
+ if (typeof input !== "object" || input === null) return input;
48
+ var prim = input[Symbol.toPrimitive];
49
+ if (prim !== undefined) {
50
+ var res = prim.call(input, hint || "default");
51
+ if (typeof res !== "object") return res;
52
+ throw new TypeError("@@toPrimitive must return a primitive value.");
53
+ }
54
+ return (hint === "string" ? String : Number)(input);
55
+ }
56
+ var _default = (data, settings) => {
57
+ var index = -1;
58
+ return (data ? data : []).reduce((acc, dependency) => {
59
+ switch (typeof dependency) {
60
+ case 'string':
61
+ return acc.concat({
62
+ groupIndex: 0,
63
+ locations: [dependency]
64
+ });
65
+ case 'object':
66
+ if (Array.isArray(dependency)) {
67
+ index++;
68
+ var dependencies = dependency.map(val => {
69
+ switch (typeof val) {
70
+ case 'string':
71
+ return {
72
+ groupIndex: index,
73
+ locations: [val]
74
+ };
75
+ case 'object':
76
+ return _objectSpread(_objectSpread({}, val.hasOwnProperty('rank') && {
77
+ rank: val.rank
78
+ }), {}, {
79
+ groupIndex: index,
80
+ locations: [val.dependency]
81
+ });
82
+ }
83
+ });
84
+ return acc.concat(...dependencies);
85
+ } else return acc.concat(_objectSpread({
86
+ groupIndex: 0,
87
+ locations: [dependency.dependency]
88
+ }, dependency.hasOwnProperty('rank') && {
89
+ rank: dependency.rank
90
+ }));
91
+ default:
92
+ throw new Error('(RS::V3::From::AvailableDependencies) course dependency is neither string nor object');
93
+ }
94
+ }, []);
95
+ };
96
+ exports.default = _default;
97
+ //# sourceMappingURL=available-dependencies.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"available-dependencies.js","names":["_default","data","settings","index","reduce","acc","dependency","concat","groupIndex","locations","Array","isArray","dependencies","map","val","_objectSpread","hasOwnProperty","rank","Error","exports","default"],"sources":["../../../../src/RS/v3/from/available-dependencies.ts"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;eAEeA,CAACC,IAAa,EACbC,QAAkB,KAAS;EACzC,IAAIC,KAAK,GAAG,CAAC,CAAC;EACd,OAAO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ths';
2
+ declare const _default: (breakLength: BreakLength | null | undefined) => any;
3
+ export default _default;
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+ var _default = breakLength => {
8
+ if (breakLength == null) return null;
9
+ switch (typeof breakLength) {
10
+ case 'boolean':
11
+ case 'number':
12
+ return breakLength;
13
+ case 'object':
14
+ if (Array.isArray(breakLength) && breakLength.length == 2) return breakLength;else if ((breakLength === null || breakLength === void 0 ? void 0 : breakLength.bef) != null && (breakLength === null || breakLength === void 0 ? void 0 : breakLength.aft) != null) return [breakLength.bef, breakLength.aft];
15
+ default:
16
+ throw new Error('(RS::V3::From::BreakLengths) Day is neither number, boolean, array or object of type { bef, aft }');
17
+ }
18
+ };
19
+ exports.default = _default;
20
+ //# sourceMappingURL=break-lengths.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"break-lengths.js","names":["breakLength","Array","isArray","length","bef","aft","Error","exports","default","_default"],"sources":["../../../../src/RS/v3/from/break-lengths.ts"],"sourcesContent":[null],"mappings":";;;;;;eAEgBA,WAA2C,IAAS;EAElE,IAAIA,WAAW,IAAI,IAAI,EAAE,OAAO,IAAI;EAEpC,QAAO,OAAOA,WAAW;IACvB,KAAK,SAAS;IACd,KAAK,QAAQ;MACX,OAAOA,WAAW;IACpB,KAAK,QAAQ;MACX,IAAIC,KAAK,CAACC,OAAO,CAACF,WAAW,CAAC,IAAIA,WAAW,CAACG,MAAM,IAAI,CAAC,EACvD,OAAOH,WAAW,CAAC,KAChB,IAAI,CAAAA,WAAW,aAAXA,WAAW,uBAAXA,WAAW,CAAEI,GAAG,KAAI,IAAI,IAAI,CAAAJ,WAAW,aAAXA,WAAW,uBAAXA,WAAW,CAAEK,GAAG,KAAI,IAAI,EAC3D,OAAO,CAACL,WAAW,CAACI,GAAG,EAAEJ,WAAW,CAACK,GAAG,CAAC;IAC7C;MACE,MAAM,IAAIC,KAAK,CAAC,mGAAmG,CAAC;;AAE1H,CAAC;AAAAC,OAAA,CAAAC,OAAA,GAAAC,QAAA"}
@@ -0,0 +1,4 @@
1
+ import { Constraint } from '../types/constraints';
2
+ import { Settings } from '../types/settings';
3
+ declare const reduceCourses: (courses: NonNullable<Constraint['events']>, teachersList: string[], groupsList: string[], settings: Settings, overlapGroup?: number) => never[];
4
+ export default reduceCourses;
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+ var reduceCourses = function reduceCourses(courses, teachersList, groupsList, settings) {
8
+ var overlapGroup = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 0;
9
+ return [];
10
+ };
11
+ var _default = exports.default = reduceCourses;
12
+ //# sourceMappingURL=collections.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"collections.js","names":["reduceCourses","courses","teachersList","groupsList","settings","overlapGroup","arguments","length","undefined","_default","exports","default"],"sources":["../../../../src/RS/v3/from/collections.ts"],"sourcesContent":[null],"mappings":";;;;;;AAqBA,IAAMA,aAAa,GAAG,SAAhBA,aAAaA,CAAIC,OAA+C,EAC/CC,YAAsB,EACtBC,UAAsB,EACtBC,QAAsB,EACM;EAAA,IAA5BC,YAAA,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAuB,CAAC;EAC7C,OAAO,EAAE;AACX,CAAC;AAAA,IAAAG,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEcX,aAAa"}
@@ -0,0 +1,5 @@
1
+ import { Settings } from '../types/settings';
2
+ import { CourseEvent } from '../types/course-events';
3
+ import { Collection } from '../types/collections';
4
+ declare const _default: (courseEvents: (CourseEvent | number)[], course: Collection, teachersList: string[], groupsList: string[], settings: Settings, overlapGroup?: number | null) => never[];
5
+ export default _default;
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+ var _default = exports.default = function _default(courseEvents, course, teachersList, groupsList, settings) {
8
+ var overlapGroup = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : null;
9
+ var collectionIdKey = settings.collectionIdKey;
10
+ var eventIdKey = settings.eventIdKey;
11
+ if (!collectionIdKey) throw new Error('(RS::V3::From::CourseEvents) Property "collectionIdKey" in settings is undefined');
12
+ return [];
13
+ };
14
+ //# sourceMappingURL=course-events.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"course-events.js","names":["_default","courseEvents","course","teachersList","groupsList","settings","overlapGroup","arguments","length","undefined","collectionIdKey","eventIdKey","Error"],"sources":["../../../../src/RS/v3/from/course-events.ts"],"sourcesContent":[null],"mappings":";;;;;;iCAoBe,SAAAA,SAACC,YAAsC,EACtCC,MAAwB,EACxBC,YAAsB,EACtBC,UAAsB,EACtBC,QAAsB,EACgB;EAAA,IAAtCC,YAAA,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAA8B,IAAI;EAChD,IAAMG,eAAe,GAAIL,QAAQ,CAACK,eAAe;EACjD,IAAMC,UAAU,GAASN,QAAQ,CAACM,UAAU;EAE5C,IAAI,CAAED,eAAe,EACnB,MAAM,IAAIE,KAAK,CAAC,kFAAkF,CAAC;EAErG,OAAO,EAAE;AACX,CAAC"}
@@ -0,0 +1,4 @@
1
+ import { Settings } from '../types/settings';
2
+ import { Day } from '../types/days';
3
+ declare const _default: (days: (Day | number)[], settings: Settings) => import("../../../core/v2/types/days").Day[];
4
+ export default _default;
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+ var _default = (days, settings) => {
8
+ return days.map(day => {
9
+ switch (typeof day) {
10
+ case 'number':
11
+ return {
12
+ day
13
+ };
14
+ case 'object':
15
+ return day;
16
+ default:
17
+ throw new Error('(RS::V3::From::Days) day is neither number or object');
18
+ }
19
+ });
20
+ };
21
+ exports.default = _default;
22
+ //# sourceMappingURL=days.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"days.js","names":["_default","days","settings","map","day","Error","exports","default"],"sources":["../../../../src/RS/v3/from/days.ts"],"sourcesContent":[null],"mappings":";;;;;;eAKeA,CAACC,IAA0B,EAC1BC,QAAkB,KAAI;EAEpC,OAAOD,IAAI,CAACE,GAAG,CAAEC,GAAG,IAAmB;IACrC,QAAO,OAAOA,GAAG;MACf,KAAK,QAAQ;QACX,OAAO;UAAEA;QAAG,CAAE;MAChB,KAAK,QAAQ;QACX,OAAOA,GAAG;MACZ;QACE,MAAM,IAAIC,KAAK,CAAC,sDAAsD,CAAC;;EAE7E,CAAC,CAAC;AACJ,CAAC;AAAAC,OAAA,CAAAC,OAAA,GAAAP,QAAA"}
@@ -0,0 +1,6 @@
1
+ import { Dependency } from '../types/dependencies';
2
+ import { Settings } from '../types/settings';
3
+ import { Types as CoreTypes } from '../../../core/types';
4
+ import { Deserialized } from '../../../core/types';
5
+ declare const _default: (dependencies: (Dependency | string)[], settings: Settings) => Deserialized<CoreTypes.location>[];
6
+ export default _default;
@@ -0,0 +1,97 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+ var _breakLengths = _interopRequireDefault(require("./break-lengths"));
8
+ var _days = _interopRequireDefault(require("./days"));
9
+ var _lockedTimes = _interopRequireDefault(require("./locked-times"));
10
+ var _intervals = _interopRequireDefault(require("./intervals"));
11
+ function _interopRequireDefault(obj) {
12
+ return obj && obj.__esModule ? obj : {
13
+ default: obj
14
+ };
15
+ }
16
+ function ownKeys(e, r) {
17
+ var t = Object.keys(e);
18
+ if (Object.getOwnPropertySymbols) {
19
+ var o = Object.getOwnPropertySymbols(e);
20
+ r && (o = o.filter(function (r) {
21
+ return Object.getOwnPropertyDescriptor(e, r).enumerable;
22
+ })), t.push.apply(t, o);
23
+ }
24
+ return t;
25
+ }
26
+ function _objectSpread(e) {
27
+ for (var r = 1; r < arguments.length; r++) {
28
+ var t = null != arguments[r] ? arguments[r] : {};
29
+ r % 2 ? ownKeys(Object(t), !0).forEach(function (r) {
30
+ _defineProperty(e, r, t[r]);
31
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) {
32
+ Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));
33
+ });
34
+ }
35
+ return e;
36
+ }
37
+ function _defineProperty(obj, key, value) {
38
+ key = _toPropertyKey(key);
39
+ if (key in obj) {
40
+ Object.defineProperty(obj, key, {
41
+ value: value,
42
+ enumerable: true,
43
+ configurable: true,
44
+ writable: true
45
+ });
46
+ } else {
47
+ obj[key] = value;
48
+ }
49
+ return obj;
50
+ }
51
+ function _toPropertyKey(arg) {
52
+ var key = _toPrimitive(arg, "string");
53
+ return typeof key === "symbol" ? key : String(key);
54
+ }
55
+ function _toPrimitive(input, hint) {
56
+ if (typeof input !== "object" || input === null) return input;
57
+ var prim = input[Symbol.toPrimitive];
58
+ if (prim !== undefined) {
59
+ var res = prim.call(input, hint || "default");
60
+ if (typeof res !== "object") return res;
61
+ throw new TypeError("@@toPrimitive must return a primitive value.");
62
+ }
63
+ return (hint === "string" ? String : Number)(input);
64
+ }
65
+ var _default = (dependencies, settings) => {
66
+ var idKey = settings.dependencyIdKey;
67
+ if (!idKey) throw new Error('(RS::V3::From::Dependencies) Property "dependencyIdKey" in settings is undefined');
68
+ return dependencies.map(dependency => {
69
+ switch (typeof dependency) {
70
+ case 'string':
71
+ return {
72
+ ids: dependency
73
+ };
74
+ case 'object':
75
+ if (!dependency[idKey]) throw new Error('(RS::V3::From::Dependencies) A dependency does not have a unique key');
76
+ return _objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread({
77
+ ids: dependency[idKey]
78
+ }, 'minBreakLength' in dependency && {
79
+ minBreakLength: (0, _breakLengths.default)(dependency.minBreakLength)
80
+ }), dependency.name && {
81
+ displayName: dependency.name
82
+ }), dependency.area && {
83
+ area: dependency.area
84
+ }), dependency.days && {
85
+ days: (0, _days.default)(dependency.days, settings)
86
+ }), dependency.intervals && {
87
+ intervals: (0, _intervals.default)(dependency.intervals)
88
+ }), dependency.lockedTimes && {
89
+ lockedTimes: (0, _lockedTimes.default)(dependency.lockedTimes)
90
+ });
91
+ default:
92
+ throw new Error('(RS::V3::From::Dependencies) Dependency is neither string nor object');
93
+ }
94
+ }, []);
95
+ };
96
+ exports.default = _default;
97
+ //# sourceMappingURL=dependencies.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dependencies.js","names":["_breakLengths","_interopRequireDefault","require","_days","_lockedTimes","_intervals","obj","__esModule","default","ownKeys","e","r","t","Object","keys","getOwnPropertySymbols","o","filter","getOwnPropertyDescriptor","enumerable","push","apply","_objectSpread","arguments","length","forEach","_defineProperty","getOwnPropertyDescriptors","defineProperties","defineProperty","key","value","_toPropertyKey","configurable","writable","arg","_toPrimitive","String","input","hint","prim","Symbol","toPrimitive","undefined","res","call","TypeError","Number","_default","dependencies","settings","idKey","dependencyIdKey","Error","map","dependency","ids","minBreakLength","name","displayName","area","days","intervals","lockedTimes","exports"],"sources":["../../../../src/RS/v3/from/dependencies.ts"],"sourcesContent":[null],"mappings":";;;;;;AAAA,IAAAA,aAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,KAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAAAE,YAAA,GAAAH,sBAAA,CAAAC,OAAA;AACA,IAAAG,UAAA,GAAAJ,sBAAA,CAAAC,OAAA;AAA8D,SAAAD,uBAAAK,GAAA;EAAA,OAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA;IAAAE,OAAA,EAAAF;EAAA;AAAA;AAAA,SAAAG,QAAAC,CAAA,EAAAC,CAAA;EAAA,IAAAC,CAAA,GAAAC,MA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AI;UAAEE,cAAc,EAAE,IAAAzD,aAAA,CAAAQ,OAAW,EAAC+C,UAAU,CAACE,cAAc;QAAC,CAAE,GAC5FF,UAAU,CAACG,IAAI,IAAmB;UAAEC,WAAW,EAAKJ,UAAU,CAACG;QAAI,CAAE,GACrEH,UAAU,CAACK,IAAI,IAAmB;UAAEA,IAAI,EAAYL,UAAU,CAACK;QAAI,CAAE,GACrEL,UAAU,CAACM,IAAI,IAAmB;UAAEA,IAAI,EAAY,IAAA1D,KAAA,CAAAK,OAAI,EAAC+C,UAAU,CAACM,IAAI,EAAEX,QAAQ;QAAC,CAAE,GACrFK,UAAU,CAACO,SAAS,IAAc;UAAEA,SAAS,EAAO,IAAAzD,UAAA,CAAAG,OAAS,EAAC+C,UAAU,CAACO,SAAS;QAAC,CAAE,GACrFP,UAAU,CAACQ,WAAW,IAAY;UAAEA,WAAW,EAAK,IAAA3D,YAAA,CAAAI,OAAU,EAAC+C,UAAU,CAACQ,WAAW;QAAC,CAAE;MAE/F;QACE,MAAM,IAAIV,KAAK,CAAC,sEAAsE,CAAC;;EAG7F,CAAC,EAAE,EAAE,CAAC;AAER,CAAC;AAAAW,OAAA,CAAAxD,OAAA,GAAAwC,QAAA"}
@@ -0,0 +1,5 @@
1
+ import { Group } from '../types/groups';
2
+ import { Settings } from '../types/settings';
3
+ import { Deserialized } from '../../../core/types';
4
+ declare const _default: (groups: Group[], settings: Settings) => Deserialized<import("../../../core/v2/types/groups").Group>[];
5
+ export default _default;
@@ -0,0 +1,103 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+ var _breakLengths = _interopRequireDefault(require("./break-lengths"));
8
+ var _days = _interopRequireDefault(require("./days"));
9
+ var _lockedTimes = _interopRequireDefault(require("./locked-times"));
10
+ var _intervals = _interopRequireDefault(require("./intervals"));
11
+ function _interopRequireDefault(obj) {
12
+ return obj && obj.__esModule ? obj : {
13
+ default: obj
14
+ };
15
+ }
16
+ function ownKeys(e, r) {
17
+ var t = Object.keys(e);
18
+ if (Object.getOwnPropertySymbols) {
19
+ var o = Object.getOwnPropertySymbols(e);
20
+ r && (o = o.filter(function (r) {
21
+ return Object.getOwnPropertyDescriptor(e, r).enumerable;
22
+ })), t.push.apply(t, o);
23
+ }
24
+ return t;
25
+ }
26
+ function _objectSpread(e) {
27
+ for (var r = 1; r < arguments.length; r++) {
28
+ var t = null != arguments[r] ? arguments[r] : {};
29
+ r % 2 ? ownKeys(Object(t), !0).forEach(function (r) {
30
+ _defineProperty(e, r, t[r]);
31
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) {
32
+ Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));
33
+ });
34
+ }
35
+ return e;
36
+ }
37
+ function _defineProperty(obj, key, value) {
38
+ key = _toPropertyKey(key);
39
+ if (key in obj) {
40
+ Object.defineProperty(obj, key, {
41
+ value: value,
42
+ enumerable: true,
43
+ configurable: true,
44
+ writable: true
45
+ });
46
+ } else {
47
+ obj[key] = value;
48
+ }
49
+ return obj;
50
+ }
51
+ function _toPropertyKey(arg) {
52
+ var key = _toPrimitive(arg, "string");
53
+ return typeof key === "symbol" ? key : String(key);
54
+ }
55
+ function _toPrimitive(input, hint) {
56
+ if (typeof input !== "object" || input === null) return input;
57
+ var prim = input[Symbol.toPrimitive];
58
+ if (prim !== undefined) {
59
+ var res = prim.call(input, hint || "default");
60
+ if (typeof res !== "object") return res;
61
+ throw new TypeError("@@toPrimitive must return a primitive value.");
62
+ }
63
+ return (hint === "string" ? String : Number)(input);
64
+ }
65
+ var _default = (groups, settings) => {
66
+ var idKey = settings.groupIdKey;
67
+ if (!idKey) throw new Error('(RS::V3::From::Groups) Property "groupIdKey" in settings is undefined');
68
+ return groups.reduce((acc, group) => {
69
+ var _group$days, _group$intervals, _group$lockedTimes;
70
+ if (!group.group_type) throw new Error('(RS::V3::From::Groups) Property "group_type" must exist on all entries in "groups" array');
71
+ if (!['personal', 'classes'].includes(group.group_type)) throw new Error('(RS::V3::From::Groups) Allowed values of "group_type" are "personal" and "classes"');
72
+ if (!group[idKey]) throw new Error('(RS::V3::From::Groups) A group does not have a unique key');
73
+ if (group.group_type != 'classes') return acc;
74
+ return acc.concat(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread({
75
+ species: 'class',
76
+ ids: group[idKey]
77
+ }, group.name && {
78
+ displayName: group.name
79
+ }), 'forbidOverlappingEvents' in group && {
80
+ forbidOverlappingEvents: group.forbidOverlappingEvents
81
+ }), 'maxNumWorkingHours' in group && {
82
+ maxNumWorkingHours: group.maxNumWorkingHours
83
+ }), 'maxNumDailyWorkingHours' in group && {
84
+ maxNumDailyWorkingHours: group.maxNumDailyWorkingHours
85
+ }), 'minBreakLength' in group && {
86
+ minBreakLength: (0, _breakLengths.default)(group.minBreakLength)
87
+ }), 'disableDayLengthPunishment' in group && {
88
+ disableDayLengthPunishment: group.disableDayLengthPunishment
89
+ }), 'weight' in group && {
90
+ weight: group.weight
91
+ }), 'rank' in group && {
92
+ rank: group.rank
93
+ }), ((_group$days = group.days) === null || _group$days === void 0 ? void 0 : _group$days.length) && {
94
+ days: (0, _days.default)(group.days, settings)
95
+ }), ((_group$intervals = group.intervals) === null || _group$intervals === void 0 ? void 0 : _group$intervals.length) && {
96
+ intervals: (0, _intervals.default)(group.intervals)
97
+ }), ((_group$lockedTimes = group.lockedTimes) === null || _group$lockedTimes === void 0 ? void 0 : _group$lockedTimes.length) && {
98
+ lockedTimes: (0, _lockedTimes.default)(group.lockedTimes)
99
+ }));
100
+ }, []);
101
+ };
102
+ exports.default = _default;
103
+ //# sourceMappingURL=groups.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"groups.js","names":["_breakLengths","_interopRequireDefault","require","_days","_lockedTimes","_intervals","obj","__esModule","default","ownKeys","e","r","t","Object","keys","getOwnPropertySymbols","o","filter","getOwnPropertyDescriptor","enumerable","push","apply","_objectSpread","arguments","length","forEach","_defineProperty","getOwnPropertyDescriptors","defineProperties","defineProperty","key","value","_toPropertyKey","configurable","writable","arg","_toPrimitive","String","input","hint","prim","Symbol","toPrimitive","undefined","res","call","TypeError","Number","_default","groups","settings","idKey","groupIdKey","Error","reduce","acc","group","_group$days","_group$intervals","_group$lockedTimes","group_type","includes","concat","species","ids","name","displayName","forbidOverlappingEvents","maxNumWorkingHours","maxNumDailyWorkingHours","minBreakLength","disableDayLengthPunishment","weight","rank","days","intervals","lockedTimes","exports"],"sources":["../../../../src/RS/v3/from/groups.ts"],"sourcesContent":[null],"mappings":";;;;;;AAAA,IAAAA,aAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,KAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAAAE,YAAA,GAAAH,sBAAA,CAAAC,OAAA;AACA,IAAAG,UAAA,GAAAJ,sBAAA,CAAAC,OAAA;AAA8D,SAAAD,uBAAAK,GAAA;EAAA,OAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA;IAAAE,OAAA,EAAAF;EAAA;AAAA;AAAA,SAAAG,QAAAC,CAAA,EAAAC,CAAA;EAAA,IAAAC,CAAA,GAAAC,MAAA,CAAAC,IAAA,CAAAJ,CAAA;EAAA,IAAAG,MAAA,CAAAE,qBAAA;IAAA,IAAAC,CAAA,GAAAH,MAAA,CAAAE,qBAAA,CAAAL,CAAA;IAAAC,CAAA,KAAAK,CAAA,GAAAA,CAAA,CAAAC,MAAA,WAAAN,CAAA;MAAA,OAAAE,MAAA,CAAAK,wBAAA,CAAAR,CAAA,EAAAC,CAAA,EAAAQ,UAAA;IAAA,KAAAP,CAAA,CAAAQ,IAAA,CAAAC,KAAA,CAAAT,CAAA,EAAAI,CAAA;EAAA;EAAA,OAAAJ,CAAA;AAAA;AAAA,SAAAU,cAAAZ,CAAA;E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J,CAAC,EAAE,EAAE,CAAC;AACR,CAAC;AAAAC,OAAA,CAAArE,OAAA,GAAAwC,QAAA"}
@@ -0,0 +1,25 @@
1
+ export default class {
2
+ static availableDependency: (data: any, settings: import("../types/settings").Settings) => any;
3
+ static courseEvent: (courseEvents: (number | import("../types/course-events").CourseEvent)[], course: import("../types/collections").Collection, teachersList: string[], groupsList: string[], settings: import("../types/settings").Settings, overlapGroup?: number | null) => never[];
4
+ static collection: (courses: (import("../types/course-events").CourseEvent | import("../types/collections").Collection | (import("../types/course-events").CourseEvent | import("../types/collections").Collection)[])[], teachersList: string[], groupsList: string[], settings: import("../types/settings").Settings, overlapGroup?: number) => never[];
5
+ static day: (days: (number | import("../types/days").Day)[], settings: import("../types/settings").Settings) => import("../../../core/v2/types/days").Day[];
6
+ static dependency: (dependencies: (string | import("../types/dependencies").Dependency)[], settings: import("../types/settings").Settings) => import("../../../core/types").Deserialized<import("../../../core/v2/types/locations").Location>[];
7
+ static group: (groups: import("../types/groups").Group[], settings: import("../types/settings").Settings) => import("../../../core/types").Deserialized<import("../../../core/v2/types/groups").Group>[];
8
+ static interval: (intervals: import("../types/intervals").Interval[][]) => import("../../../core/v2/types/intervals").Interval[];
9
+ static lockedTime: (lockedTimes: import("../types/locked-times").LockedTime[]) => import("../../../core/types").Deserialized<import("../../../core/v2/types/locked-times").LockedTime>[];
10
+ static placement: (configuration: import("../types/configurations").Configuration, options?: {
11
+ idKey?: "id" | "_id" | "ids" | undefined;
12
+ }) => [Omit<import("../../../core/v2/types/events").Event, "preferredDuration">[], import("../../../core/v2/types/locked-times").LockedTime[]];
13
+ static schedules: (schedule: import("../types/schedules").Schedule) => {
14
+ overlapGroups: any;
15
+ settings: any;
16
+ area?: import("../types/areas").Area | undefined;
17
+ courses?: never[] | undefined;
18
+ groups?: import("../../../core/types").Deserialized<import("../../../core/v2/types/groups").Group>[] | undefined;
19
+ teachers?: import("../../../core/types").Deserialized<import("../../../core/v2/types/teachers").Teacher>[] | undefined;
20
+ locations?: import("../../../core/types").Deserialized<import("../../../core/v2/types/locations").Location>[] | undefined;
21
+ periods?: import("../../../core/types").Deserialized<import("../../../core/v2/types/periods").Period>[] | undefined;
22
+ };
23
+ static setting: (settings: import("../types/settings").Settings, _default: import("../types/default").Default) => import("../../../core/types").Deserialized<Omit<import("../../../core/v2/types/division-settings").DivisionSettings, "belongsTo" | "period" | "defaultLunch">> & import("../../../core/types").Serialized<Pick<import("../../../core/v2/types/division-settings").DivisionSettings, "period">>;
24
+ static teacher: (teachers: import("../types/groups").Group[], settings: import("../types/settings").Settings) => import("../../../core/types").Deserialized<import("../../../core/v2/types/teachers").Teacher>[];
25
+ }