@tricoteuses/assemblee 1.10.5 → 2.0.2

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 (400) hide show
  1. package/README.md +8 -1
  2. package/lib/amendements-CN7bRFdP.js +259 -0
  3. package/lib/amendements-CN7bRFdP.js.map +1 -0
  4. package/lib/amendements-Cg1lyCBp.js +735 -0
  5. package/lib/amendements-Cg1lyCBp.js.map +1 -0
  6. package/lib/api.d.ts +1 -0
  7. package/lib/api.d.ts.map +1 -0
  8. package/lib/cleaners/actes_legislatifs.d.ts +1 -0
  9. package/lib/cleaners/actes_legislatifs.d.ts.map +1 -0
  10. package/lib/cleaners/acteurs.d.ts +1 -0
  11. package/lib/cleaners/acteurs.d.ts.map +1 -0
  12. package/lib/cleaners/amendements.d.ts +1 -0
  13. package/lib/cleaners/amendements.d.ts.map +1 -0
  14. package/lib/cleaners/debats.d.ts +1 -0
  15. package/lib/cleaners/debats.d.ts.map +1 -0
  16. package/lib/cleaners/documents.d.ts +1 -0
  17. package/lib/cleaners/documents.d.ts.map +1 -0
  18. package/lib/cleaners/dossiers_legislatifs.d.ts +1 -0
  19. package/lib/cleaners/dossiers_legislatifs.d.ts.map +1 -0
  20. package/lib/cleaners/index.d.ts +10 -9
  21. package/lib/cleaners/index.d.ts.map +1 -0
  22. package/lib/cleaners/organes.d.ts +1 -0
  23. package/lib/cleaners/organes.d.ts.map +1 -0
  24. package/lib/cleaners/questions.d.ts +1 -0
  25. package/lib/cleaners/questions.d.ts.map +1 -0
  26. package/lib/cleaners/reunions.d.ts +1 -0
  27. package/lib/cleaners/reunions.d.ts.map +1 -0
  28. package/lib/cleaners/scrutins.d.ts +1 -0
  29. package/lib/cleaners/scrutins.d.ts.map +1 -0
  30. package/lib/cleaners/xml.d.ts +1 -0
  31. package/lib/cleaners/xml.d.ts.map +1 -0
  32. package/lib/cleaners.js +1138 -0
  33. package/lib/cleaners.js.map +1 -0
  34. package/lib/datasets.d.ts +4 -3
  35. package/lib/datasets.d.ts.map +1 -0
  36. package/lib/dates.d.ts +1 -0
  37. package/lib/dates.d.ts.map +1 -0
  38. package/lib/debats-BwZYgzXe.js +3978 -0
  39. package/lib/debats-BwZYgzXe.js.map +1 -0
  40. package/lib/dossiers_legislatifs.d.ts +3 -2
  41. package/lib/dossiers_legislatifs.d.ts.map +1 -0
  42. package/lib/file_systems.d.ts +1 -0
  43. package/lib/file_systems.d.ts.map +1 -0
  44. package/lib/git.d.ts +1 -0
  45. package/lib/git.d.ts.map +1 -0
  46. package/lib/index.d.ts +18 -22
  47. package/lib/index.d.ts.map +1 -0
  48. package/lib/index.js +1916 -285
  49. package/lib/index.js.map +1 -0
  50. package/lib/inserters.d.ts +6 -5
  51. package/lib/inserters.d.ts.map +1 -0
  52. package/lib/loaders.d.ts +13 -12
  53. package/lib/loaders.d.ts.map +1 -0
  54. package/lib/loaders.js +812 -1516
  55. package/lib/loaders.js.map +1 -0
  56. package/lib/logger.d.ts +1 -0
  57. package/lib/logger.d.ts.map +1 -0
  58. package/lib/organes.d.ts +2 -1
  59. package/lib/organes.d.ts.map +1 -0
  60. package/lib/parse-CzW8NHW5.js +2850 -0
  61. package/lib/parse-CzW8NHW5.js.map +1 -0
  62. package/lib/parsers/index.d.ts +3 -3
  63. package/lib/parsers/index.d.ts.map +1 -0
  64. package/lib/parsers/plf.d.ts +2 -0
  65. package/lib/parsers/plf.d.ts.map +1 -0
  66. package/lib/parsers/recherche_amendements.d.ts +3 -2
  67. package/lib/parsers/recherche_amendements.d.ts.map +1 -0
  68. package/lib/parsers/textes_lois.d.ts +2 -23
  69. package/lib/parsers/textes_lois.d.ts.map +1 -0
  70. package/lib/parsers.js +393 -0
  71. package/lib/parsers.js.map +1 -0
  72. package/lib/raw_types/acteurs_et_organes.d.ts +1 -0
  73. package/lib/raw_types/acteurs_et_organes.d.ts.map +1 -0
  74. package/lib/raw_types/agendas.d.ts +1 -0
  75. package/lib/raw_types/agendas.d.ts.map +1 -0
  76. package/lib/raw_types/amendements.d.ts +1 -0
  77. package/lib/raw_types/amendements.d.ts.map +1 -0
  78. package/lib/raw_types/debats.d.ts +3 -2
  79. package/lib/raw_types/debats.d.ts.map +1 -0
  80. package/lib/raw_types/dossiers_legislatifs.d.ts +2 -1
  81. package/lib/raw_types/dossiers_legislatifs.d.ts.map +1 -0
  82. package/lib/raw_types/questions.d.ts +1 -0
  83. package/lib/raw_types/questions.d.ts.map +1 -0
  84. package/lib/raw_types/scrutins.d.ts +1 -0
  85. package/lib/raw_types/scrutins.d.ts.map +1 -0
  86. package/lib/schemas/acteurs_et_organes.d.json +982 -0
  87. package/lib/schemas/acteurs_et_organes.json +1166 -0
  88. package/lib/schemas/agendas.d.json +1561 -0
  89. package/lib/schemas/agendas.json +1745 -0
  90. package/lib/schemas/amendements.d.json +1901 -0
  91. package/lib/schemas/amendements.json +2085 -0
  92. package/lib/schemas/debats.d.json +623 -0
  93. package/lib/schemas/debats.json +842 -0
  94. package/lib/schemas/dossiers_legislatifs.d.json +3690 -0
  95. package/lib/schemas/dossiers_legislatifs.json +3874 -0
  96. package/lib/schemas/legislatures.d.json +17 -0
  97. package/lib/schemas/legislatures.json +17 -0
  98. package/lib/schemas/questions.d.json +520 -0
  99. package/lib/schemas/questions.json +704 -0
  100. package/lib/schemas/scrutins.d.json +517 -0
  101. package/lib/schemas/scrutins.json +701 -0
  102. package/lib/scripts/add_links_to_documents.d.ts +2 -0
  103. package/lib/scripts/add_links_to_documents.d.ts.map +1 -0
  104. package/lib/scripts/clean_reorganized_data.d.ts +1 -0
  105. package/lib/scripts/clean_reorganized_data.d.ts.map +1 -0
  106. package/lib/scripts/copy-schemas.d.ts +2 -0
  107. package/lib/scripts/copy-schemas.d.ts.map +1 -0
  108. package/lib/scripts/diff_amendements.d.ts +1 -0
  109. package/lib/scripts/diff_amendements.d.ts.map +1 -0
  110. package/lib/scripts/document_dossiers_legislatifs.d.ts +1 -0
  111. package/lib/scripts/document_dossiers_legislatifs.d.ts.map +1 -0
  112. package/lib/scripts/generate-json-schemas.d.ts +2 -0
  113. package/lib/scripts/generate-json-schemas.d.ts.map +1 -0
  114. package/lib/scripts/get_today_reunions.d.ts +1 -0
  115. package/lib/scripts/get_today_reunions.d.ts.map +1 -0
  116. package/lib/scripts/merge_scrutins.d.ts +1 -0
  117. package/lib/scripts/merge_scrutins.d.ts.map +1 -0
  118. package/lib/scripts/process_open_dataset.d.ts +1 -0
  119. package/lib/scripts/process_open_dataset.d.ts.map +1 -0
  120. package/lib/scripts/raw_types_from_amendements.d.ts +1 -0
  121. package/lib/scripts/raw_types_from_amendements.d.ts.map +1 -0
  122. package/lib/scripts/reorganize_data.d.ts +1 -0
  123. package/lib/scripts/reorganize_data.d.ts.map +1 -0
  124. package/lib/scripts/retrieve_deputes_photos.d.ts +2 -1
  125. package/lib/scripts/retrieve_deputes_photos.d.ts.map +1 -0
  126. package/lib/scripts/retrieve_documents.d.ts +1 -0
  127. package/lib/scripts/retrieve_documents.d.ts.map +1 -0
  128. package/lib/scripts/retrieve_open_data.d.ts +1 -0
  129. package/lib/scripts/retrieve_open_data.d.ts.map +1 -0
  130. package/lib/scripts/retrieve_pending_amendments.d.ts +1 -0
  131. package/lib/scripts/retrieve_pending_amendments.d.ts.map +1 -0
  132. package/lib/scripts/retrieve_senateurs_photos.d.ts +1 -0
  133. package/lib/scripts/retrieve_senateurs_photos.d.ts.map +1 -0
  134. package/lib/scripts/shared/cli_helpers.d.ts +1 -0
  135. package/lib/scripts/shared/cli_helpers.d.ts.map +1 -0
  136. package/lib/scripts/test_iter_load.d.ts +1 -0
  137. package/lib/scripts/test_iter_load.d.ts.map +1 -0
  138. package/lib/scripts/test_load.d.ts +1 -0
  139. package/lib/scripts/test_load.d.ts.map +1 -0
  140. package/lib/scripts/test_load_big_files.d.ts +1 -0
  141. package/lib/scripts/test_load_big_files.d.ts.map +1 -0
  142. package/lib/scripts/validate_json.d.ts +1 -0
  143. package/lib/scripts/validate_json.d.ts.map +1 -0
  144. package/lib/shared_types/codes_actes.d.ts +1 -0
  145. package/lib/shared_types/codes_actes.d.ts.map +1 -0
  146. package/lib/strings.d.ts +1 -0
  147. package/lib/strings.d.ts.map +1 -0
  148. package/lib/types/acteurs_et_organes.d.ts +341 -0
  149. package/lib/types/acteurs_et_organes.d.ts.map +1 -0
  150. package/lib/types/agendas.d.ts +237 -10
  151. package/lib/types/agendas.d.ts.map +1 -0
  152. package/lib/types/amendements.d.ts +277 -1
  153. package/lib/types/amendements.d.ts.map +1 -0
  154. package/lib/types/debats.d.ts +53 -2
  155. package/lib/types/debats.d.ts.map +1 -0
  156. package/lib/types/dossiers_legislatifs.d.ts +404 -9
  157. package/lib/types/dossiers_legislatifs.d.ts.map +1 -0
  158. package/lib/types/legislatures.d.ts +1 -0
  159. package/lib/types/legislatures.d.ts.map +1 -0
  160. package/lib/types/questions.d.ts +100 -2
  161. package/lib/types/questions.d.ts.map +1 -0
  162. package/lib/types/scrutins.d.ts +102 -0
  163. package/lib/types/scrutins.d.ts.map +1 -0
  164. package/lib/urls.d.ts +3 -2
  165. package/lib/urls.d.ts.map +1 -0
  166. package/package.json +31 -95
  167. package/lib/api.js +0 -52
  168. package/lib/api.mjs +0 -45
  169. package/lib/bugs/acteur-00010/plugin.test.d.ts +0 -1
  170. package/lib/bugs/acteur-00010/plugin.test.js +0 -90
  171. package/lib/bugs/acteur-00010/plugin.test.mjs +0 -33
  172. package/lib/bugs/acteur-00010.d.ts +0 -7
  173. package/lib/bugs/acteur-00010.js +0 -116
  174. package/lib/bugs/acteur-00010.mjs +0 -26
  175. package/lib/bugs/agenda-00002/plugin.test.d.ts +0 -1
  176. package/lib/bugs/agenda-00002/plugin.test.js +0 -124
  177. package/lib/bugs/agenda-00002/plugin.test.mjs +0 -50
  178. package/lib/bugs/agenda-00002.d.ts +0 -15
  179. package/lib/bugs/agenda-00002.js +0 -406
  180. package/lib/bugs/agenda-00002.mjs +0 -172
  181. package/lib/bugs/agenda-00008/plugin.test.d.ts +0 -1
  182. package/lib/bugs/agenda-00008/plugin.test.js +0 -92
  183. package/lib/bugs/agenda-00008/plugin.test.mjs +0 -31
  184. package/lib/bugs/agenda-00008.d.ts +0 -7
  185. package/lib/bugs/agenda-00008.js +0 -123
  186. package/lib/bugs/agenda-00008.mjs +0 -26
  187. package/lib/bugs/agenda-00011/plugin.test.d.ts +0 -1
  188. package/lib/bugs/agenda-00011/plugin.test.js +0 -263
  189. package/lib/bugs/agenda-00011/plugin.test.mjs +0 -152
  190. package/lib/bugs/agenda-00011.d.ts +0 -16
  191. package/lib/bugs/agenda-00011.js +0 -333
  192. package/lib/bugs/agenda-00011.mjs +0 -125
  193. package/lib/bugs.d.ts +0 -21
  194. package/lib/bugs.js +0 -452
  195. package/lib/bugs.mjs +0 -70
  196. package/lib/cleaners/actes_legislatifs.js +0 -315
  197. package/lib/cleaners/actes_legislatifs.mjs +0 -253
  198. package/lib/cleaners/acteurs.js +0 -265
  199. package/lib/cleaners/acteurs.mjs +0 -180
  200. package/lib/cleaners/amendements.js +0 -294
  201. package/lib/cleaners/amendements.mjs +0 -227
  202. package/lib/cleaners/debats.js +0 -12
  203. package/lib/cleaners/debats.mjs +0 -5
  204. package/lib/cleaners/documents.js +0 -205
  205. package/lib/cleaners/documents.mjs +0 -133
  206. package/lib/cleaners/dossiers_legislatifs.js +0 -131
  207. package/lib/cleaners/dossiers_legislatifs.mjs +0 -70
  208. package/lib/cleaners/index.js +0 -70
  209. package/lib/cleaners/index.mjs +0 -10
  210. package/lib/cleaners/organes.js +0 -65
  211. package/lib/cleaners/organes.mjs +0 -48
  212. package/lib/cleaners/questions.js +0 -12
  213. package/lib/cleaners/questions.mjs +0 -5
  214. package/lib/cleaners/reunions.js +0 -312
  215. package/lib/cleaners/reunions.mjs +0 -255
  216. package/lib/cleaners/scrutins.js +0 -340
  217. package/lib/cleaners/scrutins.mjs +0 -221
  218. package/lib/cleaners/xml.js +0 -74
  219. package/lib/cleaners/xml.mjs +0 -59
  220. package/lib/datasets.js +0 -837
  221. package/lib/datasets.mjs +0 -755
  222. package/lib/dates.js +0 -124
  223. package/lib/dates.mjs +0 -100
  224. package/lib/dossiers_legislatifs.js +0 -346
  225. package/lib/dossiers_legislatifs.mjs +0 -208
  226. package/lib/file_systems.js +0 -162
  227. package/lib/file_systems.mjs +0 -62
  228. package/lib/git.js +0 -223
  229. package/lib/git.mjs +0 -151
  230. package/lib/index.mjs +0 -17
  231. package/lib/inserters.js +0 -521
  232. package/lib/inserters.mjs +0 -337
  233. package/lib/loaders.mjs +0 -886
  234. package/lib/logger.js +0 -35
  235. package/lib/logger.mjs +0 -26
  236. package/lib/organes.js +0 -22
  237. package/lib/organes.mjs +0 -15
  238. package/lib/parsers/documents.d.ts +0 -62
  239. package/lib/parsers/documents.js +0 -453
  240. package/lib/parsers/documents.mjs +0 -370
  241. package/lib/parsers/index.js +0 -40
  242. package/lib/parsers/index.mjs +0 -4
  243. package/lib/parsers/recherche_amendements.js +0 -403
  244. package/lib/parsers/recherche_amendements.mjs +0 -167
  245. package/lib/parsers/textes_lois.js +0 -307
  246. package/lib/parsers/textes_lois.mjs +0 -264
  247. package/lib/raw_types/acteurs_et_organes.js +0 -1215
  248. package/lib/raw_types/acteurs_et_organes.mjs +0 -1148
  249. package/lib/raw_types/agendas.js +0 -777
  250. package/lib/raw_types/agendas.mjs +0 -724
  251. package/lib/raw_types/amendements.js +0 -1052
  252. package/lib/raw_types/amendements.mjs +0 -993
  253. package/lib/raw_types/debats.js +0 -630
  254. package/lib/raw_types/debats.mjs +0 -573
  255. package/lib/raw_types/dossiers_legislatifs.js +0 -1529
  256. package/lib/raw_types/dossiers_legislatifs.mjs +0 -1471
  257. package/lib/raw_types/questions.js +0 -469
  258. package/lib/raw_types/questions.mjs +0 -416
  259. package/lib/raw_types/scrutins.js +0 -651
  260. package/lib/raw_types/scrutins.mjs +0 -598
  261. package/lib/schemas/acteur/Acteur.json +0 -56
  262. package/lib/schemas/acteur/AdresseElectronique.json +0 -52
  263. package/lib/schemas/acteur/AdressePostale.json +0 -75
  264. package/lib/schemas/acteur/Civ.json +0 -14
  265. package/lib/schemas/acteur/Collaborateur.json +0 -29
  266. package/lib/schemas/acteur/EtatCivil.json +0 -51
  267. package/lib/schemas/acteur/Ident.json +0 -40
  268. package/lib/schemas/acteur/Lieu.json +0 -66
  269. package/lib/schemas/acteur/Mandat.json +0 -192
  270. package/lib/schemas/acteur/Profession.json +0 -46
  271. package/lib/schemas/agenda/Agenda.json +0 -318
  272. package/lib/schemas/agenda/CycleDeVie.json +0 -45
  273. package/lib/schemas/agenda/PointOdj.json +0 -82
  274. package/lib/schemas/amendement/Amendement.json +0 -246
  275. package/lib/schemas/amendement/Diff.json +0 -25
  276. package/lib/schemas/amendement/DispositifAmdtCredit.json +0 -85
  277. package/lib/schemas/amendement/Identifiant.json +0 -62
  278. package/lib/schemas/amendement/PointeurFragmentTexte.json +0 -127
  279. package/lib/schemas/amendement/Representation.json +0 -67
  280. package/lib/schemas/amendement/Total.json +0 -26
  281. package/lib/schemas/converted_from_type/acteurs_et_organes.json +0 -666
  282. package/lib/schemas/converted_from_type/agendas.json +0 -1100
  283. package/lib/schemas/converted_from_type/amendements.json +0 -3191
  284. package/lib/schemas/converted_from_type/debats.json +0 -682
  285. package/lib/schemas/converted_from_type/deputes.json +0 -26
  286. package/lib/schemas/converted_from_type/dossiers_legislatifs.json +0 -2918
  287. package/lib/schemas/converted_from_type/legislatures.json +0 -16
  288. package/lib/schemas/converted_from_type/questions.json +0 -328
  289. package/lib/schemas/converted_from_type/scrutins.json +0 -393
  290. package/lib/schemas/debat/Contenu.json +0 -75
  291. package/lib/schemas/debat/Debat.json +0 -40
  292. package/lib/schemas/debat/Metadonnees.json +0 -75
  293. package/lib/schemas/debat/Orateur.json +0 -60
  294. package/lib/schemas/debat/Point.json +0 -169
  295. package/lib/schemas/debat/Sommaire.json +0 -71
  296. package/lib/schemas/debat/SommaireElement.json +0 -108
  297. package/lib/schemas/debat/Texte.json +0 -34
  298. package/lib/schemas/document/CodeLibelle.json +0 -25
  299. package/lib/schemas/document/Document.json +0 -385
  300. package/lib/schemas/document/Indexation.json +0 -38
  301. package/lib/schemas/dossier/ActeLegislatif.json +0 -211
  302. package/lib/schemas/dossier/ActeLegislatifBase.json +0 -62
  303. package/lib/schemas/dossier/Agenda.json +0 -23
  304. package/lib/schemas/dossier/ConseilConstitutionnel.json +0 -35
  305. package/lib/schemas/dossier/Decision.json +0 -25
  306. package/lib/schemas/dossier/Dossier.json +0 -124
  307. package/lib/schemas/dossier/EtudeImpact.json +0 -29
  308. package/lib/schemas/dossier/EtudePlf.json +0 -105
  309. package/lib/schemas/dossier/Europe.json +0 -42
  310. package/lib/schemas/dossier/FamCodeLibelle.json +0 -25
  311. package/lib/schemas/dossier/InfoJO.json +0 -23
  312. package/lib/schemas/dossier/Initiateur.json +0 -36
  313. package/lib/schemas/dossier/Motion.json +0 -27
  314. package/lib/schemas/dossier/Promulgation.json +0 -62
  315. package/lib/schemas/dossier/Rapporteur.json +0 -36
  316. package/lib/schemas/dossier/Texte.json +0 -47
  317. package/lib/schemas/organe/CodeTypeOrgane.json +0 -43
  318. package/lib/schemas/organe/Organe.json +0 -136
  319. package/lib/schemas/organe/ViMoDe.json +0 -28
  320. package/lib/schemas/question/Auteur.json +0 -58
  321. package/lib/schemas/question/Cloture.json +0 -28
  322. package/lib/schemas/question/InfoJO.json +0 -40
  323. package/lib/schemas/question/MinAttribElement.json +0 -30
  324. package/lib/schemas/question/Question.json +0 -172
  325. package/lib/schemas/question/Renouvellement.json +0 -17
  326. package/lib/schemas/question/Signalement.json +0 -21
  327. package/lib/schemas/question/Texte.json +0 -24
  328. package/lib/schemas/scrutin/DecompteVoix.json +0 -35
  329. package/lib/schemas/scrutin/Dysfonctionnement.json +0 -50
  330. package/lib/schemas/scrutin/MiseAuPoint.json +0 -53
  331. package/lib/schemas/scrutin/OrganeVotant.json +0 -88
  332. package/lib/schemas/scrutin/Scrutin.json +0 -187
  333. package/lib/schemas/scrutin/Votant.json +0 -37
  334. package/lib/scripts/bugs_helper.d.ts +0 -13
  335. package/lib/scripts/bugs_helper.js +0 -595
  336. package/lib/scripts/bugs_helper.mjs +0 -251
  337. package/lib/scripts/clean_reorganized_data.js +0 -613
  338. package/lib/scripts/clean_reorganized_data.mjs +0 -276
  339. package/lib/scripts/diff_amendements.js +0 -249
  340. package/lib/scripts/diff_amendements.mjs +0 -202
  341. package/lib/scripts/document_dossiers_legislatifs.js +0 -655
  342. package/lib/scripts/document_dossiers_legislatifs.mjs +0 -414
  343. package/lib/scripts/get_today_reunions.js +0 -37
  344. package/lib/scripts/get_today_reunions.mjs +0 -31
  345. package/lib/scripts/merge_scrutins.js +0 -97
  346. package/lib/scripts/merge_scrutins.mjs +0 -47
  347. package/lib/scripts/parse_textes_lois.d.ts +0 -1
  348. package/lib/scripts/parse_textes_lois.js +0 -171
  349. package/lib/scripts/parse_textes_lois.mjs +0 -140
  350. package/lib/scripts/process_open_dataset.js +0 -301
  351. package/lib/scripts/process_open_dataset.mjs +0 -134
  352. package/lib/scripts/raw_types_from_amendements.js +0 -135
  353. package/lib/scripts/raw_types_from_amendements.mjs +0 -134
  354. package/lib/scripts/reorganize_data.js +0 -805
  355. package/lib/scripts/reorganize_data.mjs +0 -517
  356. package/lib/scripts/retrieve_deputes_photos.js +0 -310
  357. package/lib/scripts/retrieve_deputes_photos.mjs +0 -158
  358. package/lib/scripts/retrieve_documents.js +0 -547
  359. package/lib/scripts/retrieve_documents.mjs +0 -242
  360. package/lib/scripts/retrieve_open_data.js +0 -107
  361. package/lib/scripts/retrieve_open_data.mjs +0 -26
  362. package/lib/scripts/retrieve_pending_amendments.js +0 -206
  363. package/lib/scripts/retrieve_pending_amendments.mjs +0 -57
  364. package/lib/scripts/retrieve_senateurs_photos.js +0 -234
  365. package/lib/scripts/retrieve_senateurs_photos.mjs +0 -116
  366. package/lib/scripts/retrieve_textes_lois.d.ts +0 -1
  367. package/lib/scripts/retrieve_textes_lois.js +0 -240
  368. package/lib/scripts/retrieve_textes_lois.mjs +0 -85
  369. package/lib/scripts/shared/cli_helpers.js +0 -89
  370. package/lib/scripts/shared/cli_helpers.mjs +0 -81
  371. package/lib/scripts/test_iter_load.js +0 -155
  372. package/lib/scripts/test_iter_load.mjs +0 -72
  373. package/lib/scripts/test_load.js +0 -26
  374. package/lib/scripts/test_load.mjs +0 -16
  375. package/lib/scripts/test_load_big_files.js +0 -26
  376. package/lib/scripts/test_load_big_files.mjs +0 -16
  377. package/lib/scripts/validate_json.js +0 -353
  378. package/lib/scripts/validate_json.mjs +0 -184
  379. package/lib/shared_types/codes_actes.js +0 -231
  380. package/lib/shared_types/codes_actes.mjs +0 -224
  381. package/lib/strings.js +0 -16
  382. package/lib/strings.mjs +0 -7
  383. package/lib/types/acteurs_et_organes.js +0 -965
  384. package/lib/types/acteurs_et_organes.mjs +0 -906
  385. package/lib/types/agendas.js +0 -628
  386. package/lib/types/agendas.mjs +0 -575
  387. package/lib/types/amendements.js +0 -899
  388. package/lib/types/amendements.mjs +0 -842
  389. package/lib/types/debats.js +0 -619
  390. package/lib/types/debats.mjs +0 -562
  391. package/lib/types/dossiers_legislatifs.js +0 -1188
  392. package/lib/types/dossiers_legislatifs.mjs +0 -1130
  393. package/lib/types/legislatures.js +0 -17
  394. package/lib/types/legislatures.mjs +0 -10
  395. package/lib/types/questions.js +0 -454
  396. package/lib/types/questions.mjs +0 -401
  397. package/lib/types/scrutins.js +0 -556
  398. package/lib/types/scrutins.mjs +0 -503
  399. package/lib/urls.js +0 -325
  400. package/lib/urls.mjs +0 -258
@@ -0,0 +1,1138 @@
1
+ import assert from "node:assert";
2
+ import { c as cleanXmlArtefacts, a as cleanBooleanAttribute, b as cleanIntegerAttribute } from "./amendements-CN7bRFdP.js";
3
+ import { d } from "./amendements-CN7bRFdP.js";
4
+ function cleanActeur(acteur) {
5
+ cleanXmlArtefacts(acteur);
6
+ assert.strictEqual(acteur.uid["@xsi:type"], "IdActeur_type");
7
+ acteur.uid = acteur.uid["#text"];
8
+ assert(acteur.uid);
9
+ const etatCivil = acteur.etatCivil;
10
+ {
11
+ cleanXmlArtefacts(etatCivil);
12
+ const ident = etatCivil.ident;
13
+ {
14
+ cleanXmlArtefacts(ident);
15
+ const infoNaissance = etatCivil.infoNaissance;
16
+ {
17
+ cleanXmlArtefacts(infoNaissance);
18
+ }
19
+ }
20
+ }
21
+ const profession = acteur.profession;
22
+ if (profession !== void 0) {
23
+ cleanXmlArtefacts(profession);
24
+ const socProcInsee = profession.socProcINSEE;
25
+ assert(socProcInsee);
26
+ cleanXmlArtefacts(socProcInsee);
27
+ delete profession.socProcINSEE;
28
+ profession.socProcInsee = socProcInsee;
29
+ }
30
+ const uriHatvp = acteur.uri_hatvp;
31
+ if (uriHatvp !== void 0) {
32
+ acteur.uriHatvp = uriHatvp;
33
+ delete acteur.uri_hatvp;
34
+ }
35
+ let adresses = acteur.adresses;
36
+ if (adresses !== void 0) {
37
+ adresses = adresses.adresse;
38
+ if (adresses === void 0) {
39
+ delete acteur.adresses;
40
+ adresses = void 0;
41
+ } else if (Array.isArray(adresses)) {
42
+ acteur.adresses = adresses;
43
+ } else {
44
+ assert.notStrictEqual(adresses, null);
45
+ assert.strictEqual(typeof adresses, "object");
46
+ acteur.adresses = adresses = [adresses];
47
+ }
48
+ if (adresses !== void 0) {
49
+ for (const adresse of adresses) {
50
+ cleanXmlArtefacts(adresse);
51
+ const xsiType = adresse["@xsi:type"];
52
+ assert([
53
+ "AdresseMail_Type",
54
+ "AdressePostale_Type",
55
+ "AdresseSiteWeb_Type",
56
+ "AdresseTelephonique_Type"
57
+ ].includes(xsiType), `Unexpected "@xsi:type": ${xsiType}`);
58
+ adresse.xsiType = xsiType;
59
+ delete adresse["@xsi:type"];
60
+ assert.notStrictEqual(adresse.uid, void 0);
61
+ assert.notStrictEqual(adresse.type, void 0);
62
+ assert.notStrictEqual(adresse.typeLibelle, void 0);
63
+ if (xsiType === "AdressePostale_Type") {
64
+ assert.strictEqual(adresse.adresseDeRattachement, void 0);
65
+ }
66
+ }
67
+ }
68
+ }
69
+ let mandats = acteur.mandats;
70
+ if (mandats !== void 0) {
71
+ let mandat = mandats.mandat;
72
+ if (Array.isArray(mandat)) {
73
+ mandats = acteur.mandats = mandat;
74
+ } else if (typeof mandat === "object") {
75
+ mandats = acteur.mandats = [mandat];
76
+ }
77
+ for (const mandat2 of mandats) {
78
+ cleanXmlArtefacts(mandat2);
79
+ const xsiType = mandat2["@xsi:type"];
80
+ if (xsiType !== void 0) {
81
+ mandat2.xsiType = xsiType;
82
+ delete mandat2["@xsi:type"];
83
+ }
84
+ const infosQualite = mandat2.infosQualite;
85
+ {
86
+ cleanXmlArtefacts(infosQualite);
87
+ }
88
+ const organes = mandat2.organes;
89
+ delete mandat2.organes;
90
+ let organesRefs = organes.organeRef;
91
+ assert(organesRefs);
92
+ if (!Array.isArray(organesRefs)) {
93
+ organesRefs = [organesRefs];
94
+ }
95
+ mandat2.organesRefs = organesRefs;
96
+ let suppleant = mandat2.suppleants;
97
+ delete mandat2.suppleants;
98
+ if (suppleant) {
99
+ suppleant = suppleant.suppleant;
100
+ assert(suppleant);
101
+ mandat2.suppleant = suppleant;
102
+ cleanXmlArtefacts(suppleant);
103
+ }
104
+ const election = mandat2.election;
105
+ if (election !== void 0) {
106
+ cleanXmlArtefacts(election);
107
+ const lieu = election.lieu;
108
+ cleanXmlArtefacts(lieu);
109
+ }
110
+ const mandature = mandat2.mandature;
111
+ if (mandature !== void 0) {
112
+ cleanXmlArtefacts(mandature);
113
+ }
114
+ assert.strictEqual(mandat2.chambre, void 0);
115
+ let collaborateurs = mandat2.collaborateurs;
116
+ if (collaborateurs !== void 0) {
117
+ const collaborateursArray = Array.isArray(collaborateurs) ? collaborateurs.filter((collaborateur) => collaborateur !== null) : [collaborateurs];
118
+ collaborateurs = [];
119
+ collaborateursArray.map(({ collaborateur }) => {
120
+ if (Array.isArray(collaborateur)) {
121
+ for (const collaborateurItem of collaborateur) {
122
+ if (collaborateurItem !== null) {
123
+ collaborateurs.push(collaborateurItem);
124
+ }
125
+ }
126
+ } else if (collaborateur) {
127
+ collaborateurs.push(collaborateur);
128
+ }
129
+ });
130
+ if (collaborateurs.length === 0) {
131
+ delete mandat2.collaborateurs;
132
+ collaborateurs = void 0;
133
+ } else {
134
+ mandat2.collaborateurs = collaborateurs;
135
+ }
136
+ for (const collaborateur of collaborateurs || []) {
137
+ cleanXmlArtefacts(collaborateur);
138
+ assert.strictEqual(collaborateur.dateDebut, void 0);
139
+ assert.strictEqual(collaborateur.dateFin, void 0);
140
+ }
141
+ }
142
+ const infosHorsSian = mandat2.InfosHorsSIAN;
143
+ if (infosHorsSian !== void 0) {
144
+ cleanXmlArtefacts(infosHorsSian);
145
+ assert.strictEqual(infosHorsSian.HATVP_URI, void 0);
146
+ assert.strictEqual(Object.keys(infosHorsSian).length, 0);
147
+ delete mandat2.InfosHorsSIAN;
148
+ }
149
+ }
150
+ mandats.sort((a, b) => a.uid.length === b.uid.length ? a.uid.localeCompare(b.uid) : a.uid.length - b.uid.length);
151
+ }
152
+ let deports = acteur.deports;
153
+ if (deports !== void 0) {
154
+ let deport = deports.deport;
155
+ if (Array.isArray(deport)) {
156
+ deports = acteur.deports = deport;
157
+ } else if (typeof deport === "object") {
158
+ deports = acteur.deports = [deport];
159
+ }
160
+ for (const deport2 of deports) {
161
+ cleanXmlArtefacts(deport2);
162
+ const cible = deport2.cible;
163
+ {
164
+ cleanXmlArtefacts(cible);
165
+ assert.strictEqual(cible.references, void 0);
166
+ }
167
+ }
168
+ deports.sort((a, b) => a.uid.length === b.uid.length ? a.uid.localeCompare(b.uid) : a.uid.length - b.uid.length);
169
+ }
170
+ }
171
+ function cleanRapporteur(rapporteur) {
172
+ const etudePlfRef = rapporteur.etudePLFRef;
173
+ if (rapporteur.etudePLFRef !== void 0) {
174
+ delete rapporteur.etudePLFRef;
175
+ rapporteur.etudePlfRef = etudePlfRef;
176
+ }
177
+ }
178
+ function cleanDocumentOrDivision(d2) {
179
+ cleanXmlArtefacts(d2);
180
+ if (d2.metadatas?.dateSuppression !== void 0) {
181
+ for (const key of Object.getOwnPropertyNames(d2)) {
182
+ delete d2[key];
183
+ }
184
+ return;
185
+ }
186
+ const xsiType = d2["@xsi:type"];
187
+ if (xsiType !== void 0) {
188
+ d2.xsiType = xsiType;
189
+ delete d2["@xsi:type"];
190
+ }
191
+ const cycleDeVie = d2.cycleDeVie;
192
+ assert(cycleDeVie);
193
+ {
194
+ const chrono = cycleDeVie.chrono;
195
+ assert(chrono);
196
+ cleanXmlArtefacts(chrono);
197
+ }
198
+ let divisions = d2.divisions;
199
+ if (divisions !== void 0) {
200
+ divisions = divisions.division;
201
+ if (!Array.isArray(divisions)) {
202
+ assert(divisions);
203
+ divisions = [divisions];
204
+ }
205
+ d2.divisions = divisions;
206
+ for (const division of divisions) {
207
+ cleanDocumentOrDivision(division);
208
+ }
209
+ }
210
+ assert.strictEqual(d2.redacteur, void 0);
211
+ const classification = d2.classification;
212
+ assert(classification);
213
+ cleanXmlArtefacts(classification);
214
+ let auteurs = d2.auteurs;
215
+ if (auteurs !== void 0) {
216
+ auteurs = auteurs.auteur;
217
+ if (!Array.isArray(auteurs)) {
218
+ assert(auteurs);
219
+ auteurs = [auteurs];
220
+ }
221
+ d2.auteurs = auteurs;
222
+ for (const auteur of auteurs) {
223
+ let organeRef = auteur.organe;
224
+ if (organeRef !== void 0) {
225
+ auteur.organeRef = organeRef.organeRef;
226
+ delete auteur.organe;
227
+ }
228
+ }
229
+ }
230
+ const notice = d2.notice;
231
+ {
232
+ cleanBooleanAttribute(notice, "adoptionConforme");
233
+ }
234
+ let coSignataires = d2.coSignataires;
235
+ if (coSignataires !== void 0) {
236
+ coSignataires = coSignataires.coSignataire;
237
+ if (!Array.isArray(coSignataires)) {
238
+ assert(coSignataires);
239
+ coSignataires = [coSignataires];
240
+ }
241
+ d2.coSignataires = coSignataires;
242
+ for (const coSignataire of coSignataires) {
243
+ cleanXmlArtefacts(coSignataire);
244
+ cleanBooleanAttribute(coSignataire, "edite");
245
+ let acteurRef = coSignataire.acteur;
246
+ if (acteurRef !== void 0) {
247
+ acteurRef = acteurRef.acteurRef;
248
+ assert(acteurRef);
249
+ delete coSignataire.acteur;
250
+ coSignataire.acteurRef = acteurRef;
251
+ }
252
+ const organe = coSignataire.organe;
253
+ if (organe !== void 0) {
254
+ cleanBooleanAttribute(organe, "etApparentes");
255
+ }
256
+ }
257
+ }
258
+ const depotAmendements = d2.depotAmendements;
259
+ if (depotAmendements !== void 0) {
260
+ cleanXmlArtefacts(depotAmendements);
261
+ const amendementsSeance = depotAmendements.amendementsSeance;
262
+ {
263
+ cleanXmlArtefacts(amendementsSeance);
264
+ cleanBooleanAttribute(amendementsSeance, "amendable");
265
+ }
266
+ let amendementsCommission = depotAmendements.amendementsCommission;
267
+ if (amendementsCommission !== void 0) {
268
+ amendementsCommission = amendementsCommission.commission;
269
+ if (!Array.isArray(amendementsCommission)) {
270
+ assert(amendementsCommission);
271
+ amendementsCommission = [amendementsCommission];
272
+ }
273
+ depotAmendements.amendementsCommission = amendementsCommission;
274
+ for (const commision of amendementsCommission) {
275
+ cleanXmlArtefacts(commision);
276
+ cleanBooleanAttribute(commision, "amendable");
277
+ assert.strictEqual(commision.dateLimiteDepot, void 0);
278
+ }
279
+ }
280
+ }
281
+ const imprimerie = d2.imprimerie;
282
+ if (imprimerie !== void 0) {
283
+ cleanXmlArtefacts(imprimerie);
284
+ const dian = imprimerie.DIAN;
285
+ if (dian !== void 0) {
286
+ delete imprimerie.DIAN;
287
+ imprimerie.dian = dian;
288
+ }
289
+ const isbn = imprimerie.ISBN;
290
+ if (isbn !== void 0) {
291
+ delete imprimerie.ISBN;
292
+ imprimerie.isbn = isbn;
293
+ }
294
+ assert.strictEqual(imprimerie.ISSN, void 0);
295
+ }
296
+ cleanBooleanAttribute(d2, "rapportPublie");
297
+ let organesReferents = d2.organesReferents;
298
+ if (organesReferents !== void 0) {
299
+ organesReferents = organesReferents.organeRef;
300
+ if (!Array.isArray(organesReferents)) {
301
+ assert(organesReferents);
302
+ organesReferents = [organesReferents];
303
+ }
304
+ d2.organesReferents = organesReferents;
305
+ }
306
+ }
307
+ function cleanActeLegislatif(acteLegislatif) {
308
+ cleanXmlArtefacts(acteLegislatif);
309
+ const xsiType = acteLegislatif["@xsi:type"];
310
+ if (xsiType !== void 0) {
311
+ acteLegislatif.xsiType = xsiType;
312
+ delete acteLegislatif["@xsi:type"];
313
+ }
314
+ let auteursRefs = acteLegislatif.auteurs;
315
+ if (auteursRefs !== void 0) {
316
+ auteursRefs = auteursRefs.acteurRef;
317
+ if (!Array.isArray(auteursRefs)) {
318
+ assert(auteursRefs);
319
+ auteursRefs = [auteursRefs];
320
+ }
321
+ acteLegislatif.auteursRefs = auteursRefs;
322
+ delete acteLegislatif.auteurs;
323
+ }
324
+ const casSaisine = acteLegislatif.casSaisine;
325
+ if (casSaisine !== void 0) {
326
+ cleanTypeDeclaration(casSaisine);
327
+ }
328
+ const contributionInternaute = acteLegislatif.contributionInternaute;
329
+ if (contributionInternaute !== void 0) {
330
+ cleanXmlArtefacts(contributionInternaute);
331
+ }
332
+ assert.strictEqual(acteLegislatif.dateRetrait, void 0);
333
+ const decision = acteLegislatif.decision;
334
+ if (decision !== void 0) {
335
+ cleanTypeDeclaration(decision);
336
+ }
337
+ const infoJo = acteLegislatif.infoJO;
338
+ if (infoJo !== void 0) {
339
+ cleanInfoJo(infoJo);
340
+ acteLegislatif.infoJo = infoJo;
341
+ delete acteLegislatif.infoJO;
342
+ }
343
+ const infoJoce = acteLegislatif.infoJOCE;
344
+ if (infoJoce !== void 0) {
345
+ acteLegislatif.infoJoce = infoJoce;
346
+ delete acteLegislatif.infoJOCE;
347
+ const refJoce = infoJoce.refJOCE;
348
+ if (refJoce !== void 0) {
349
+ infoJoce.refJoce = refJoce;
350
+ delete infoJoce.refJOCE;
351
+ }
352
+ const dateJoce = infoJoce.dateJOCE;
353
+ if (dateJoce !== void 0) {
354
+ infoJoce.dateJoce = dateJoce;
355
+ delete infoJoce.dateJOCE;
356
+ }
357
+ }
358
+ let infoJoRect = acteLegislatif.infoJORect;
359
+ if (infoJoRect !== void 0) {
360
+ if (!Array.isArray(infoJoRect)) {
361
+ infoJoRect = [infoJoRect];
362
+ }
363
+ acteLegislatif.infoJoRect = infoJoRect;
364
+ delete acteLegislatif.infoJORect;
365
+ for (const infoJoRectItem of infoJoRect) {
366
+ cleanInfoJo(infoJoRectItem);
367
+ }
368
+ }
369
+ cleanActeOuDossierInitiateur(acteLegislatif);
370
+ let initiateur = acteLegislatif.initiateurs;
371
+ if (initiateur !== void 0) {
372
+ assert.strictEqual(acteLegislatif.initiateur, void 0);
373
+ if (initiateur.acteurRef === void 0) {
374
+ assert.notStrictEqual(initiateur.organeRef, void 0);
375
+ } else {
376
+ if (!Array.isArray(initiateur)) {
377
+ assert(initiateur);
378
+ initiateur = [initiateur];
379
+ }
380
+ initiateur = {
381
+ acteurs: initiateur
382
+ };
383
+ }
384
+ acteLegislatif.initiateur = initiateur;
385
+ delete acteLegislatif.initiateurs;
386
+ }
387
+ assert.strictEqual(acteLegislatif.odSeancejRef, void 0);
388
+ const provenanceRef = acteLegislatif.provenance;
389
+ if (provenanceRef !== void 0) {
390
+ delete acteLegislatif.provenance;
391
+ acteLegislatif.provenanceRef = provenanceRef;
392
+ }
393
+ let rapporteurs = acteLegislatif.rapporteurs;
394
+ if (rapporteurs !== void 0) {
395
+ rapporteurs = rapporteurs.rapporteur;
396
+ if (!Array.isArray(rapporteurs)) {
397
+ assert(rapporteurs);
398
+ rapporteurs = [rapporteurs];
399
+ }
400
+ acteLegislatif.rapporteurs = rapporteurs;
401
+ for (const rapporteur of rapporteurs) {
402
+ cleanRapporteur(rapporteur);
403
+ }
404
+ }
405
+ const referenceNor = acteLegislatif.referenceNOR;
406
+ if (referenceNor !== void 0) {
407
+ acteLegislatif.referenceNor = referenceNor;
408
+ delete acteLegislatif.referenceNOR;
409
+ }
410
+ assert.strictEqual(acteLegislatif.reunion, void 0);
411
+ const statutAdoption = acteLegislatif.statutAdoption;
412
+ if (statutAdoption !== void 0) {
413
+ cleanTypeDeclaration(statutAdoption);
414
+ }
415
+ const statutConclusion = acteLegislatif.statutConclusion;
416
+ if (statutConclusion !== void 0) {
417
+ cleanTypeDeclaration(statutConclusion);
418
+ if (statutConclusion.famCode === "TSORTFnull") {
419
+ delete acteLegislatif.statutConclusion;
420
+ }
421
+ }
422
+ const texteAdopteRef = acteLegislatif.texteAdopte;
423
+ if (texteAdopteRef !== void 0) {
424
+ delete acteLegislatif.texteAdopte;
425
+ acteLegislatif.texteAdopteRef = texteAdopteRef;
426
+ }
427
+ const texteAssocieRef = acteLegislatif.texteAssocie;
428
+ if (texteAssocieRef !== void 0) {
429
+ delete acteLegislatif.texteAssocie;
430
+ acteLegislatif.texteAssocieRef = texteAssocieRef;
431
+ }
432
+ let textesAssocies = acteLegislatif.textesAssocies;
433
+ if (textesAssocies !== void 0) {
434
+ textesAssocies = textesAssocies.texteAssocie;
435
+ if (!Array.isArray(textesAssocies)) {
436
+ assert(textesAssocies);
437
+ textesAssocies = [textesAssocies];
438
+ }
439
+ acteLegislatif.textesAssocies = textesAssocies;
440
+ for (const texteAssocie of textesAssocies) {
441
+ const texteAssocieRef2 = texteAssocie.refTexteAssocie;
442
+ if (texteAssocieRef2 !== void 0) {
443
+ delete texteAssocie.refTexteAssocie;
444
+ texteAssocie.texteAssocieRef = texteAssocieRef2;
445
+ }
446
+ }
447
+ }
448
+ const typeDeclaration = acteLegislatif.typeDeclaration;
449
+ if (typeDeclaration !== void 0) {
450
+ cleanTypeDeclaration(typeDeclaration);
451
+ }
452
+ const typeMotion = acteLegislatif.typeMotion;
453
+ if (typeMotion !== void 0) {
454
+ cleanTypeDeclaration(typeMotion);
455
+ }
456
+ const typeMotionCensure = acteLegislatif.typeMotionCensure;
457
+ if (typeMotionCensure !== void 0) {
458
+ cleanTypeDeclaration(typeMotionCensure);
459
+ }
460
+ let voteRefs = acteLegislatif.voteRefs;
461
+ if (voteRefs !== void 0) {
462
+ voteRefs = voteRefs.voteRef;
463
+ if (!Array.isArray(voteRefs)) {
464
+ assert(voteRefs);
465
+ voteRefs = [voteRefs];
466
+ }
467
+ acteLegislatif.voteRefs = voteRefs;
468
+ }
469
+ let actesLegislatifs = acteLegislatif.actesLegislatifs;
470
+ if (actesLegislatifs !== void 0) {
471
+ actesLegislatifs = actesLegislatifs.acteLegislatif;
472
+ if (!Array.isArray(actesLegislatifs)) {
473
+ assert(actesLegislatifs);
474
+ actesLegislatifs = [actesLegislatifs];
475
+ }
476
+ acteLegislatif.actesLegislatifs = actesLegislatifs;
477
+ for (const acteLegislatif2 of actesLegislatifs) {
478
+ cleanActeLegislatif(acteLegislatif2);
479
+ }
480
+ }
481
+ }
482
+ function cleanActeOuDossierInitiateur(acteOuDossier) {
483
+ const initiateur = acteOuDossier.initiateur;
484
+ if (initiateur !== void 0) {
485
+ let acteurs = initiateur.acteurs;
486
+ if (acteurs !== void 0) {
487
+ acteurs = acteurs.acteur;
488
+ if (!Array.isArray(acteurs)) {
489
+ assert(acteurs);
490
+ acteurs = [acteurs];
491
+ }
492
+ if (acteurs.length > 0) {
493
+ initiateur.acteurs = acteurs;
494
+ } else {
495
+ delete initiateur.acteurs;
496
+ }
497
+ }
498
+ let organeRef = initiateur.organes;
499
+ if (organeRef !== void 0) {
500
+ organeRef = organeRef.organe.organeRef.uid;
501
+ assert.notStrictEqual(organeRef, void 0);
502
+ initiateur.organeRef = organeRef;
503
+ delete initiateur.organes;
504
+ }
505
+ if (initiateur.acteurs === void 0 && initiateur.organeRef === void 0) {
506
+ delete acteOuDossier.initiateur;
507
+ }
508
+ }
509
+ }
510
+ function cleanInfoJo(infoJo) {
511
+ cleanXmlArtefacts(infoJo);
512
+ const typeJo = infoJo.typeJO;
513
+ if (typeJo !== void 0) {
514
+ infoJo.typeJo = typeJo;
515
+ delete infoJo.typeJO;
516
+ }
517
+ const dateJo = infoJo.dateJO;
518
+ if (dateJo !== void 0) {
519
+ infoJo.dateJo = dateJo;
520
+ delete infoJo.dateJO;
521
+ }
522
+ assert.strictEqual(infoJo.pageJO, void 0);
523
+ const numJo = infoJo.numJO;
524
+ if (numJo !== void 0) {
525
+ infoJo.numJo = numJo;
526
+ delete infoJo.numJO;
527
+ }
528
+ const referenceNor = infoJo.referenceNOR;
529
+ if (referenceNor !== void 0) {
530
+ infoJo.referenceNor = referenceNor;
531
+ delete infoJo.referenceNOR;
532
+ }
533
+ }
534
+ function cleanTypeDeclaration(typeDeclaration) {
535
+ typeDeclaration.famCode = typeDeclaration.fam_code;
536
+ delete typeDeclaration.fam_code;
537
+ assert(typeDeclaration.famCode);
538
+ if (!typeDeclaration.libelle) {
539
+ typeDeclaration.libelle = typeDeclaration.famCode;
540
+ }
541
+ }
542
+ function cleanDossierParlementaire(dossierParlementaire) {
543
+ cleanXmlArtefacts(dossierParlementaire);
544
+ const xsiType = dossierParlementaire["@xsi:type"];
545
+ if (xsiType !== void 0) {
546
+ dossierParlementaire.xsiType = xsiType;
547
+ delete dossierParlementaire["@xsi:type"];
548
+ }
549
+ const titreDossier = dossierParlementaire.titreDossier;
550
+ cleanXmlArtefacts(titreDossier);
551
+ cleanActeOuDossierInitiateur(dossierParlementaire);
552
+ let actesLegislatifs = dossierParlementaire.actesLegislatifs;
553
+ if (actesLegislatifs !== void 0) {
554
+ actesLegislatifs = actesLegislatifs.acteLegislatif;
555
+ if (!Array.isArray(actesLegislatifs)) {
556
+ assert(actesLegislatifs);
557
+ actesLegislatifs = [actesLegislatifs];
558
+ }
559
+ dossierParlementaire.actesLegislatifs = actesLegislatifs;
560
+ for (const acteLegislatif of actesLegislatifs) {
561
+ cleanActeLegislatif(acteLegislatif);
562
+ }
563
+ }
564
+ let plf = dossierParlementaire.PLF;
565
+ if (plf !== void 0) {
566
+ plf = plf.EtudePLF;
567
+ assert(Array.isArray(plf));
568
+ delete dossierParlementaire.PLF;
569
+ dossierParlementaire.plf = plf;
570
+ for (const etudePlf of plf) {
571
+ let rapporteurs = etudePlf.rapporteur;
572
+ if (rapporteurs !== void 0) {
573
+ if (!Array.isArray(rapporteurs)) {
574
+ assert(rapporteurs);
575
+ rapporteurs = [rapporteurs];
576
+ }
577
+ delete etudePlf.rapporteur;
578
+ etudePlf.rapporteurs = rapporteurs;
579
+ for (const rapporteur of rapporteurs) {
580
+ cleanRapporteur(rapporteur);
581
+ }
582
+ }
583
+ let missionMinefi = etudePlf.missionMinefi;
584
+ if (missionMinefi !== void 0) {
585
+ cleanMission(missionMinefi);
586
+ }
587
+ etudePlf.ordreDiqs = etudePlf.ordreDIQS;
588
+ delete etudePlf.ordreDIQS;
589
+ assert(etudePlf.ordreDiqs);
590
+ }
591
+ }
592
+ }
593
+ function cleanMission(mission) {
594
+ let missions = mission.missions;
595
+ if (missions !== void 0) {
596
+ missions = missions.mission;
597
+ if (!Array.isArray(missions)) {
598
+ assert(missions);
599
+ missions = [missions];
600
+ }
601
+ mission.missions = missions;
602
+ for (const missionItem of missions) {
603
+ cleanMission(missionItem);
604
+ }
605
+ }
606
+ }
607
+ function cleanOrgane(organe) {
608
+ cleanXmlArtefacts(organe);
609
+ const xsiType = organe["@xsi:type"];
610
+ if (xsiType !== void 0) {
611
+ organe.xsiType = xsiType;
612
+ delete organe["@xsi:type"];
613
+ }
614
+ const viMoDe = organe.viMoDe;
615
+ cleanXmlArtefacts(viMoDe);
616
+ const organeParentRef = organe.organeParent;
617
+ if (organeParentRef !== void 0) {
618
+ delete organe.organeParent;
619
+ organe.organeParentRef = organeParentRef;
620
+ }
621
+ assert.strictEqual(organe.chambre, void 0);
622
+ const secretariat = organe.secretariat;
623
+ if (secretariat !== void 0) {
624
+ cleanXmlArtefacts(secretariat);
625
+ }
626
+ const lieu = organe.lieu;
627
+ if (lieu !== void 0) {
628
+ cleanXmlArtefacts(lieu);
629
+ const region = lieu.region;
630
+ if (region !== void 0) {
631
+ cleanXmlArtefacts(region);
632
+ }
633
+ const departement = lieu.departement;
634
+ if (departement !== void 0) {
635
+ cleanXmlArtefacts(departement);
636
+ }
637
+ }
638
+ const couleurAssociee = organe.couleurAssociee;
639
+ if (couleurAssociee === null) {
640
+ delete organe.couleurAssociee;
641
+ }
642
+ let listePays = organe.listePays;
643
+ if (listePays !== void 0) {
644
+ listePays = listePays.paysRef;
645
+ if (!Array.isArray(listePays)) {
646
+ assert.strictEqual(typeof listePays, "string");
647
+ listePays = [listePays];
648
+ }
649
+ organe.listePays = listePays;
650
+ }
651
+ }
652
+ function cleanCycleDeVie(cycleDeVie) {
653
+ cleanXmlArtefacts(cycleDeVie);
654
+ const chrono = cycleDeVie.chrono;
655
+ assert(chrono);
656
+ {
657
+ cleanXmlArtefacts(chrono);
658
+ let creation = chrono.creation;
659
+ assert.strictEqual(typeof creation, "string");
660
+ creation = new Date(creation);
661
+ chrono.creation = creation;
662
+ let cloture = chrono.cloture;
663
+ if (cloture !== void 0) {
664
+ assert.strictEqual(typeof cloture, "string");
665
+ cloture = new Date(cloture);
666
+ chrono.cloture = cloture;
667
+ }
668
+ }
669
+ }
670
+ function cleanReunion(reunion) {
671
+ cleanXmlArtefacts(reunion);
672
+ cleanBooleanAttribute(reunion, "captationVideo");
673
+ cleanBooleanAttribute(reunion, "comiteSecret");
674
+ cleanBooleanAttribute(reunion, "ouverturePresse");
675
+ const xsiType = reunion["@xsi:type"];
676
+ if (xsiType !== void 0) {
677
+ reunion.xsiType = xsiType;
678
+ delete reunion["@xsi:type"];
679
+ }
680
+ const timestampDebut = reunion.timeStampDebut;
681
+ assert.notStrictEqual(timestampDebut, void 0);
682
+ reunion.timestampDebut = timestampDebut;
683
+ delete reunion.timeStampDebut;
684
+ let timestampFin = reunion.timeStampFin;
685
+ if (timestampFin !== void 0) {
686
+ assert.strictEqual(typeof timestampFin, "string");
687
+ timestampFin = new Date(timestampFin);
688
+ reunion.timestampFin = timestampFin;
689
+ delete reunion.timeStampFin;
690
+ }
691
+ const lieu = reunion.lieu;
692
+ if (lieu !== void 0) {
693
+ cleanXmlArtefacts(lieu);
694
+ }
695
+ const cycleDeVie = reunion.cycleDeVie;
696
+ assert.notStrictEqual(cycleDeVie, void 0);
697
+ cleanCycleDeVie(cycleDeVie);
698
+ const demandeurs = reunion.demandeurs;
699
+ if (demandeurs !== void 0) {
700
+ let acteurs = demandeurs.acteur;
701
+ if (acteurs !== void 0) {
702
+ if (!Array.isArray(acteurs)) {
703
+ assert.notStrictEqual(acteurs, null);
704
+ assert.strictEqual(typeof acteurs, "object");
705
+ acteurs = [acteurs];
706
+ }
707
+ demandeurs.acteurs = acteurs;
708
+ delete demandeurs.acteur;
709
+ for (const acteur of acteurs) {
710
+ cleanXmlArtefacts(acteur);
711
+ }
712
+ }
713
+ const organe = demandeurs.organe;
714
+ if (organe !== void 0) {
715
+ cleanXmlArtefacts(organe);
716
+ }
717
+ }
718
+ const demandeur = reunion.demandeur;
719
+ if (demandeur !== void 0) {
720
+ assert.strictEqual(reunion.demandeurs, void 0);
721
+ delete reunion.demandeur;
722
+ let acteur = demandeur.acteur;
723
+ if (acteur !== void 0) {
724
+ assert.notStrictEqual(acteur, null);
725
+ assert.strictEqual(typeof acteur, "object");
726
+ const acteurs = [acteur];
727
+ demandeur.acteurs = acteurs;
728
+ delete demandeur.acteur;
729
+ reunion.demandeurs = demandeur;
730
+ for (const acteur2 of acteurs) {
731
+ cleanXmlArtefacts(acteur2);
732
+ }
733
+ }
734
+ const organe = demandeur.organe;
735
+ if (organe !== void 0) {
736
+ cleanXmlArtefacts(organe);
737
+ }
738
+ }
739
+ const participants = reunion.participants;
740
+ if (participants !== void 0) {
741
+ cleanXmlArtefacts(participants);
742
+ let participantsInternes = participants.participantsInternes;
743
+ if (participantsInternes !== void 0) {
744
+ participantsInternes = participantsInternes.participantInterne;
745
+ if (!Array.isArray(participantsInternes)) {
746
+ assert.notStrictEqual(participantsInternes, null);
747
+ assert.strictEqual(typeof participantsInternes, "object");
748
+ participantsInternes = [participantsInternes];
749
+ }
750
+ participants.participantsInternes = participantsInternes;
751
+ }
752
+ let personnesAuditionnees = participants.personnesAuditionnees;
753
+ if (personnesAuditionnees !== void 0) {
754
+ personnesAuditionnees = personnesAuditionnees.personneAuditionnee;
755
+ if (personnesAuditionnees === null) {
756
+ delete participants.personnesAuditionnees;
757
+ } else {
758
+ if (!Array.isArray(personnesAuditionnees)) {
759
+ assert.strictEqual(typeof personnesAuditionnees, "object");
760
+ personnesAuditionnees = [personnesAuditionnees];
761
+ }
762
+ personnesAuditionnees = personnesAuditionnees.filter((personneAudionnee) => personneAudionnee !== null);
763
+ if (personnesAuditionnees.length > 0) {
764
+ participants.personnesAuditionnees = personnesAuditionnees;
765
+ } else {
766
+ delete participants.personnesAuditionnees;
767
+ }
768
+ for (const personneAudionnee of personnesAuditionnees) {
769
+ const xsiType2 = personneAudionnee.uid["@xsi:type"];
770
+ assert(xsiType2);
771
+ personneAudionnee.xsiType = xsiType2;
772
+ const uid = personneAudionnee.uid["#text"];
773
+ assert(uid);
774
+ personneAudionnee.uid = uid;
775
+ const ident = personneAudionnee.ident;
776
+ assert(ident);
777
+ {
778
+ cleanXmlArtefacts(ident);
779
+ }
780
+ }
781
+ }
782
+ }
783
+ }
784
+ if (reunion.ODJ !== void 0) {
785
+ const odj = reunion.ODJ;
786
+ reunion.odj = odj;
787
+ delete reunion.ODJ;
788
+ {
789
+ cleanXmlArtefacts(odj);
790
+ let convocationOdj = odj.convocationODJ;
791
+ if (convocationOdj !== void 0) {
792
+ if (Array.isArray(convocationOdj.item)) {
793
+ convocationOdj = convocationOdj.item;
794
+ } else {
795
+ assert(convocationOdj.item);
796
+ convocationOdj = [convocationOdj.item];
797
+ }
798
+ odj.convocationOdj = convocationOdj;
799
+ delete odj.convocationODJ;
800
+ }
801
+ let resumeOdj = odj.resumeODJ;
802
+ if (resumeOdj !== void 0) {
803
+ if (Array.isArray(resumeOdj.item)) {
804
+ resumeOdj = resumeOdj.item;
805
+ } else {
806
+ assert(resumeOdj.item);
807
+ resumeOdj = [resumeOdj.item];
808
+ }
809
+ odj.resumeOdj = resumeOdj;
810
+ delete odj.resumeODJ;
811
+ }
812
+ let pointsOdj = odj.pointsODJ;
813
+ if (pointsOdj !== void 0) {
814
+ let pointOdj = pointsOdj.pointODJ;
815
+ if (Array.isArray(pointOdj)) {
816
+ pointsOdj = pointOdj;
817
+ } else {
818
+ assert(pointOdj);
819
+ pointsOdj = [pointOdj];
820
+ }
821
+ odj.pointsOdj = pointsOdj;
822
+ for (const pointOdj2 of pointsOdj) {
823
+ cleanXmlArtefacts(pointOdj2);
824
+ cleanBooleanAttribute(pointOdj2, "comiteSecret");
825
+ const xsiType2 = pointOdj2["@xsi:type"];
826
+ if (xsiType2 !== void 0) {
827
+ pointOdj2.xsiType = xsiType2;
828
+ delete pointOdj2["@xsi:type"];
829
+ }
830
+ const cycleDeVie2 = pointOdj2.cycleDeVie;
831
+ assert.notStrictEqual(cycleDeVie2, void 0);
832
+ cleanCycleDeVie(cycleDeVie2);
833
+ assert.strictEqual(pointOdj2.demandeurPoint, void 0);
834
+ let dossiersLegislatifsRefs = pointOdj2.dossiersLegislatifsRefs;
835
+ if (dossiersLegislatifsRefs !== void 0) {
836
+ if (Array.isArray(dossiersLegislatifsRefs.dossierRef)) {
837
+ dossiersLegislatifsRefs = dossiersLegislatifsRefs.dossierRef;
838
+ } else {
839
+ assert(dossiersLegislatifsRefs.dossierRef);
840
+ dossiersLegislatifsRefs = [dossiersLegislatifsRefs.dossierRef];
841
+ }
842
+ pointOdj2.dossiersLegislatifsRefs = dossiersLegislatifsRefs;
843
+ }
844
+ pointOdj2.typePointOdj = pointOdj2.typePointODJ;
845
+ delete pointOdj2.typePointODJ;
846
+ assert.strictEqual(pointOdj2.textesAssocies, void 0);
847
+ pointOdj2.natureTravauxOdj = pointOdj2.natureTravauxODJ;
848
+ delete pointOdj2.natureTravauxODJ;
849
+ let dateConfPres = pointOdj2.dateConfPres;
850
+ if (dateConfPres !== void 0) {
851
+ assert.strictEqual(typeof dateConfPres, "string");
852
+ assert(/^\d{4}-\d{2}-\d{2}\+\d{2}:00$/.test(dateConfPres));
853
+ dateConfPres = new Date(dateConfPres.split("+")[0]);
854
+ pointOdj2.dateConfPres = dateConfPres;
855
+ }
856
+ let dateLettreMinistre = pointOdj2.dateLettreMinistre;
857
+ if (dateLettreMinistre !== void 0) {
858
+ assert.strictEqual(typeof dateLettreMinistre, "string");
859
+ assert(/^\d{4}-\d{2}-\d{2}\+\d{2}:00$/.test(dateLettreMinistre));
860
+ dateLettreMinistre = new Date(dateLettreMinistre.split("+")[0]);
861
+ pointOdj2.dateLettreMinistre = dateLettreMinistre;
862
+ }
863
+ }
864
+ delete odj.pointsODJ;
865
+ }
866
+ }
867
+ }
868
+ const identifiants = reunion.identifiants;
869
+ if (identifiants !== void 0) {
870
+ cleanXmlArtefacts(identifiants);
871
+ const numSeanceJo = identifiants.numSeanceJO;
872
+ if (numSeanceJo !== void 0) {
873
+ identifiants.numSeanceJo = numSeanceJo;
874
+ delete identifiants.numSeanceJO;
875
+ }
876
+ const idJo = identifiants.idJO;
877
+ if (idJo !== void 0) {
878
+ identifiants.idJo = idJo;
879
+ delete identifiants.idJO;
880
+ }
881
+ let dateSeance = identifiants.DateSeance;
882
+ assert.strictEqual(typeof dateSeance, "string");
883
+ assert(/^\d{4}-\d{2}-\d{2}\+\d{2}:00$/.test(dateSeance));
884
+ dateSeance = new Date(dateSeance.split("+")[0]);
885
+ identifiants.dateSeance = dateSeance;
886
+ delete identifiants.DateSeance;
887
+ }
888
+ const infosReunionsInternationale = reunion.infosReunionsInternationale;
889
+ if (infosReunionsInternationale !== void 0) {
890
+ cleanXmlArtefacts(infosReunionsInternationale);
891
+ cleanBooleanAttribute(infosReunionsInternationale, "estReunionInternationale");
892
+ let listePays = infosReunionsInternationale.listePays;
893
+ if (listePays !== void 0) {
894
+ listePays = listePays.paysRef;
895
+ if (!Array.isArray(listePays)) {
896
+ assert.strictEqual(typeof listePays, "string");
897
+ listePays = [listePays];
898
+ }
899
+ infosReunionsInternationale.listePays = listePays;
900
+ }
901
+ }
902
+ }
903
+ function cleanDecompteNominatif(decompteNominatif) {
904
+ cleanXmlArtefacts(decompteNominatif);
905
+ let nonVotants = decompteNominatif.nonVotants;
906
+ if (nonVotants === void 0) {
907
+ nonVotants = decompteNominatif.nonVotant;
908
+ delete decompteNominatif.nonVotant;
909
+ } else {
910
+ assert.strictEqual(decompteNominatif.nonVotant, void 0);
911
+ }
912
+ if (nonVotants !== void 0) {
913
+ if (typeof nonVotants === "string") {
914
+ assert.strictEqual(nonVotants, "0");
915
+ nonVotants = [];
916
+ } else if (!Array.isArray(nonVotants)) {
917
+ assert(nonVotants);
918
+ nonVotants = [nonVotants];
919
+ }
920
+ const nonVotantsArray = nonVotants;
921
+ nonVotants = [];
922
+ for (let nonVotant of nonVotantsArray) {
923
+ if (nonVotant === null) {
924
+ continue;
925
+ }
926
+ nonVotant = nonVotant.votant;
927
+ if (Array.isArray(nonVotant)) {
928
+ nonVotants.push(...nonVotant);
929
+ } else {
930
+ assert(nonVotant);
931
+ nonVotants.push(nonVotant);
932
+ }
933
+ }
934
+ if (nonVotants.length === 0) {
935
+ delete decompteNominatif.nonVotants;
936
+ } else {
937
+ decompteNominatif.nonVotants = nonVotants;
938
+ for (const votant of nonVotants) {
939
+ cleanVotant(votant);
940
+ }
941
+ }
942
+ }
943
+ let pour = decompteNominatif.pour;
944
+ if (pour === void 0) {
945
+ pour = decompteNominatif.pours;
946
+ delete decompteNominatif.pours;
947
+ } else {
948
+ assert.strictEqual(decompteNominatif.pours, void 0);
949
+ }
950
+ if (pour !== void 0) {
951
+ pour = pour.votant;
952
+ if (!Array.isArray(pour)) {
953
+ assert(pour);
954
+ pour = [pour];
955
+ }
956
+ if (pour.length === 0) {
957
+ delete decompteNominatif.pour;
958
+ } else {
959
+ decompteNominatif.pour = pour;
960
+ for (const votant of pour) {
961
+ cleanVotant(votant);
962
+ }
963
+ }
964
+ }
965
+ let contre = decompteNominatif.contre;
966
+ if (contre === void 0) {
967
+ contre = decompteNominatif.contres;
968
+ delete decompteNominatif.contres;
969
+ } else {
970
+ assert.strictEqual(decompteNominatif.contres, void 0);
971
+ }
972
+ if (contre !== void 0) {
973
+ contre = contre.votant;
974
+ if (!Array.isArray(contre)) {
975
+ assert(contre);
976
+ contre = [contre];
977
+ }
978
+ if (contre.length === 0) {
979
+ delete decompteNominatif.contre;
980
+ } else {
981
+ decompteNominatif.contre = contre;
982
+ for (const votant of contre) {
983
+ cleanVotant(votant);
984
+ }
985
+ }
986
+ }
987
+ let abstentions = decompteNominatif.abstentions;
988
+ if (abstentions === void 0) {
989
+ abstentions = decompteNominatif.abstention;
990
+ delete decompteNominatif.abstention;
991
+ } else {
992
+ assert.strictEqual(decompteNominatif.abstention, void 0);
993
+ }
994
+ if (abstentions !== void 0) {
995
+ if (!Array.isArray(abstentions)) {
996
+ assert(abstentions);
997
+ abstentions = [abstentions];
998
+ }
999
+ const abstentionsArray = abstentions;
1000
+ abstentions = [];
1001
+ for (let absentionsItem of abstentionsArray) {
1002
+ if (absentionsItem === null) {
1003
+ continue;
1004
+ }
1005
+ absentionsItem = absentionsItem.votant;
1006
+ if (Array.isArray(absentionsItem)) {
1007
+ abstentions.push(...absentionsItem);
1008
+ } else {
1009
+ assert(absentionsItem);
1010
+ abstentions.push(absentionsItem);
1011
+ }
1012
+ }
1013
+ if (abstentions.length === 0) {
1014
+ delete decompteNominatif.abstentions;
1015
+ } else {
1016
+ decompteNominatif.abstentions = abstentions;
1017
+ for (const votant of abstentions) {
1018
+ cleanVotant(votant);
1019
+ }
1020
+ }
1021
+ }
1022
+ let nonVotantsVolontaires = decompteNominatif.nonVotantsVolontaires;
1023
+ if (nonVotantsVolontaires !== void 0) {
1024
+ if (!Array.isArray(nonVotantsVolontaires)) {
1025
+ nonVotantsVolontaires = [nonVotantsVolontaires];
1026
+ }
1027
+ const nonVotantsVolontairesArray = nonVotantsVolontaires;
1028
+ nonVotantsVolontaires = [];
1029
+ for (let absentionsItem of nonVotantsVolontairesArray) {
1030
+ if (absentionsItem === null) {
1031
+ continue;
1032
+ }
1033
+ absentionsItem = absentionsItem.votant;
1034
+ if (Array.isArray(absentionsItem)) {
1035
+ nonVotantsVolontaires.push(...absentionsItem);
1036
+ } else {
1037
+ assert(absentionsItem);
1038
+ nonVotantsVolontaires.push(absentionsItem);
1039
+ }
1040
+ }
1041
+ if (nonVotantsVolontaires.length === 0) {
1042
+ delete decompteNominatif.nonVotantsVolontaires;
1043
+ } else {
1044
+ decompteNominatif.nonVotantsVolontaires = nonVotantsVolontaires;
1045
+ for (const votant of nonVotantsVolontaires) {
1046
+ cleanVotant(votant);
1047
+ }
1048
+ }
1049
+ }
1050
+ }
1051
+ function cleanScrutin(scrutin) {
1052
+ cleanXmlArtefacts(scrutin);
1053
+ const demandeur = scrutin.demandeur;
1054
+ assert(demandeur);
1055
+ {
1056
+ cleanXmlArtefacts(demandeur);
1057
+ assert.strictEqual(demandeur.referenceLegislative, void 0);
1058
+ }
1059
+ const objet = scrutin.objet;
1060
+ assert(objet);
1061
+ {
1062
+ cleanXmlArtefacts(objet);
1063
+ assert.strictEqual(objet.referenceLegislative, void 0);
1064
+ }
1065
+ let ventilationVotes = scrutin.ventilationVotes;
1066
+ assert(ventilationVotes);
1067
+ {
1068
+ ventilationVotes = ventilationVotes.organe;
1069
+ assert(ventilationVotes);
1070
+ let groupes = ventilationVotes.groupes;
1071
+ assert(groupes);
1072
+ {
1073
+ groupes = groupes.groupe;
1074
+ assert(Array.isArray(groupes));
1075
+ for (const groupe of groupes) {
1076
+ const vote = groupe.vote;
1077
+ assert(vote);
1078
+ {
1079
+ const decompteVoix = vote.decompteVoix;
1080
+ assert(decompteVoix);
1081
+ {
1082
+ if (decompteVoix.abstention !== void 0) {
1083
+ assert.strictEqual(decompteVoix.abstentions, void 0);
1084
+ decompteVoix.abstentions = decompteVoix.abstention;
1085
+ delete decompteVoix.abstention;
1086
+ }
1087
+ if (decompteVoix.nonVotant !== void 0) {
1088
+ assert.strictEqual(decompteVoix.nonVotants, void 0);
1089
+ decompteVoix.nonVotants = decompteVoix.nonVotant;
1090
+ delete decompteVoix.nonVotant;
1091
+ }
1092
+ }
1093
+ const decompteNominatif = vote.decompteNominatif;
1094
+ assert(decompteNominatif);
1095
+ cleanDecompteNominatif(decompteNominatif);
1096
+ }
1097
+ }
1098
+ ventilationVotes.groupes = groupes;
1099
+ }
1100
+ scrutin.ventilationVotes = ventilationVotes;
1101
+ }
1102
+ const miseAuPoint = scrutin.miseAuPoint;
1103
+ if (miseAuPoint !== void 0) {
1104
+ cleanDecompteNominatif(miseAuPoint);
1105
+ let dysfonctionnement = miseAuPoint.dysfonctionnement;
1106
+ if (dysfonctionnement !== void 0) {
1107
+ cleanDecompteNominatif(dysfonctionnement);
1108
+ if (Object.values(dysfonctionnement).filter((value) => value !== void 0).length === 0) {
1109
+ delete miseAuPoint.dysfonctionnement;
1110
+ }
1111
+ }
1112
+ if (Object.values(miseAuPoint).filter((value) => value !== void 0).length === 0) {
1113
+ delete scrutin.miseAuPoint;
1114
+ }
1115
+ }
1116
+ }
1117
+ function cleanVotant(votant) {
1118
+ cleanBooleanAttribute(votant, "parDelegation");
1119
+ cleanIntegerAttribute(votant, "numPlace");
1120
+ }
1121
+ function cleanQuestion(question) {
1122
+ cleanXmlArtefacts(question);
1123
+ }
1124
+ function cleanCompteRendu(compteRendu) {
1125
+ cleanXmlArtefacts(compteRendu);
1126
+ }
1127
+ export {
1128
+ cleanActeur,
1129
+ d as cleanAmendement,
1130
+ cleanCompteRendu,
1131
+ cleanDocumentOrDivision,
1132
+ cleanDossierParlementaire,
1133
+ cleanOrgane,
1134
+ cleanQuestion,
1135
+ cleanReunion,
1136
+ cleanScrutin
1137
+ };
1138
+ //# sourceMappingURL=cleaners.js.map