@tricoteuses/assemblee
Version:
Retrieve, clean up & handle French Assemblée nationale's open data
683 lines (682 loc) • 20.2 kB
JavaScript
var L = /* @__PURE__ */ ((e) => (e.Accord = "Accord", e.SansObjet = "Sans objet", e))(L || {}), b = /* @__PURE__ */ ((e) => (e.Création = "création", e.Modification = "modification", e.Suppression = "suppression", e))(b || {}), C = /* @__PURE__ */ ((e) => (e.AC = "AC", e.At = "AT", e.Di = "DI", e.Effacé = "effacé", e.Er = "ER", e.Et = "ET", e.IR = "IR", e.Irr127 = "IRR127", e.Irr20 = "IRR20", e.Irr37 = "IRR37", e.Irr38 = "IRR38", e.Irr41 = "IRR41", e.Irr42 = "IRR42", e.Irr45 = "IRR45", e.Irr48 = "IRR48", e.Irr53 = "IRR53", e.Irrai = "IRRAI", e.Irraif = "IRRAIF", e.Irrd = "IRRD", e.Irrhc = "IRRHC", e.Irrhd = "IRRHD", e.Irrsa = "IRRSA", e.R = "R", e.Rt = "RT", e.T = "T", e))(C || {}), O = /* @__PURE__ */ ((e) => (e.ADiscuter = "A discuter", e.ADéposer = "A déposer", e.Discuté = "Discuté", e.Effacé = "effacé", e.EnRecevabilité = "En recevabilité", e.EnTraitement = "En traitement", e.Irrecevable = "Irrecevable", e.Irrecevable40 = "Irrecevable 40", e.Retiré = "Retiré", e))(O || {}), E = /* @__PURE__ */ ((e) => (e.Adopté = "Adopté", e.AutreIrrecevabilité = "Autre irrecevabilité", e.AutreIrrecevabilité40 = "Autre irrecevabilité 40", e.AutresIrrLOLF = "Autres irr LOLF", e.AutresIrrLOLFSS = "Autres irr LOLFSS", e.Cavalier45 = "Cavalier (45)", e.CavalierBudgétaire = "Cavalier budgétaire", e.CavalierSocial = "Cavalier social", e.ChampDeLHabilitation38 = "Champ de l'habilitation (38)", e.Charge = "Charge", e.Cmp45 = "CMP (45)", e.Crédits = "Crédits", e.DispositionRéglementaire37 = "Disposition réglementaire (37)", e.DomaineDeLaLoi41 = "Domaine de la loi (41)", e.DomaineLoiOrganique127 = "Domaine loi organique (127)", e.Doublon = "Doublon", e.Entonnoir45 = "Entonnoir (45)", e.Gage = "Gage", e.HorsChamp = "Hors champ", e.HorsDélais = "Hors-délais", e.Injonction20 = "Injonction (20)", e.IrrEnPremièrePartie = "Irr en première partie", e.IrrEnSecondePartie = "Irr en seconde partie", e.Lolf = "LOLF", e.Lolfss = "LOLFSS", e.NonSoutenu = "Non soutenu", e.OrdreDuJour48 = "Ordre du jour (48)", e.R = "R", e.RatificationTraité53 = "Ratification traité (53)", e.Rejeté = "Rejeté", e.Retiré = "Retiré", e.RetiréAprèsPublication = "Retiré après publication", e.RetiréAvantPublication = "Retiré avant publication", e.SatisfaitOuInopérant42 = "Satisfait ou inopérant (42)", e.SousAmendement98 = "Sous-amendement (98)", e.Tombé = "Tombé", e))(E || {}), F = /* @__PURE__ */ ((e) => (e.Dernier = "Dernier", e.Milieu = "Milieu", e.Premier = "Premier", e))(F || {}), h = /* @__PURE__ */ ((e) => (e.A = "A", e.Apres = "Apres", e.Avant = "Avant", e))(h || {}), x = /* @__PURE__ */ ((e) => (e.Annexe = "ANNEXE", e.Article = "ARTICLE", e.Chapitre = "CHAPITRE", e.Titre = "TITRE", e))(x || {}), M = /* @__PURE__ */ ((e) => (e.B = "B", e.C = "C", e.D = "D", e))(M || {}), N = /* @__PURE__ */ ((e) => (e.Pdf = "PDF", e))(N || {}), S = /* @__PURE__ */ ((e) => (e.Application = "application", e))(S || {}), J = /* @__PURE__ */ ((e) => (e.Député = "Député", e.Gouvernement = "Gouvernement", e.Rapporteur = "Rapporteur", e))(J || {});
class q {
static toAmendement(s) {
return y(JSON.parse(s), i("Amendement"));
}
static amendementToJson(s) {
return JSON.stringify(R(s, i("Amendement")), null, 2);
}
static toAmendements(s) {
return y(JSON.parse(s), i("Amendements"));
}
static amendementsToJson(s) {
return JSON.stringify(R(s, i("Amendements")), null, 2);
}
static toTexteLegislatif(s) {
return y(JSON.parse(s), i("TexteLegislatif"));
}
static texteLegislatifToJson(s) {
return JSON.stringify(R(s, i("TexteLegislatif")), null, 2);
}
}
function u(e, s, a = "") {
throw Error(
a ? `Invalid value for key "${a}". Expected type ${JSON.stringify(
e
)} but got ${JSON.stringify(s)}` : `Invalid value ${JSON.stringify(s)} for type ${JSON.stringify(e)}`
);
}
function H(e) {
if (e.jsonToJS === void 0) {
const s = {};
e.props.forEach((a) => s[a.json] = { key: a.js, typ: a.typ }), e.jsonToJS = s;
}
return e.jsonToJS;
}
function w(e) {
if (e.jsToJSON === void 0) {
const s = {};
e.props.forEach((a) => s[a.js] = { key: a.json, typ: a.typ }), e.jsToJSON = s;
}
return e.jsToJSON;
}
function f(e, s, a, m = "") {
function v(r, o) {
return typeof r == typeof o ? o : u(r, o, m);
}
function g(r, o) {
const p = r.length;
for (let l = 0; l < p; l++) {
const j = r[l];
try {
return f(o, j, a);
} catch {
}
}
return u(r, o);
}
function A(r, o) {
return r.indexOf(o) !== -1 ? o : u(r, o);
}
function I(r, o) {
return Array.isArray(o) ? o.map((p) => f(p, r, a)) : u("array", o);
}
function D(r) {
if (r === null)
return null;
const o = new Date(r);
return isNaN(o.valueOf()) ? u("Date", r) : o;
}
function P(r, o, p) {
if (p === null || typeof p != "object" || Array.isArray(p))
return u("object", p);
const l = {};
return Object.getOwnPropertyNames(r).forEach((j) => {
const d = r[j], T = Object.prototype.hasOwnProperty.call(p, j) ? p[j] : void 0;
l[d.key] = f(T, d.typ, a, d.key);
}), Object.getOwnPropertyNames(p).forEach((j) => {
Object.prototype.hasOwnProperty.call(r, j) || (l[j] = f(p[j], o, a, j));
}), l;
}
if (s === "any") return e;
if (s === null)
return e === null ? e : u(s, e);
for (; typeof s == "object" && s.ref !== void 0; )
s = V[s.ref];
return Array.isArray(s) ? A(s, e) : typeof s == "object" ? s.hasOwnProperty("unionMembers") ? g(s.unionMembers, e) : s.hasOwnProperty("arrayItems") ? I(s.arrayItems, e) : s.hasOwnProperty("props") ? P(a(s), s.additional, e) : u(s, e) : s === Date && typeof e != "number" ? D(e) : v(s, e);
}
function y(e, s) {
return f(e, s, H);
}
function R(e, s) {
return f(e, s, w);
}
function c(e) {
return { arrayItems: e };
}
function t(...e) {
return { unionMembers: e };
}
function n(e, s) {
return { props: e, additional: s };
}
function i(e) {
return { ref: e };
}
const V = {
Amendements: n(
[
{
json: "textesLegislatifs",
js: "textesLegislatifs",
typ: c(i("TexteLegislatif"))
}
],
!1
),
TexteLegislatif: n(
[
{ json: "refTexteLegislatif", js: "refTexteLegislatif", typ: "" },
{ json: "amendements", js: "amendements", typ: i("AmendementsClass") }
],
!1
),
AmendementsClass: n(
[{ json: "amendement", js: "amendement", typ: c(i("Amendement")) }],
!1
),
AmendementWrapper: n(
[{ json: "amendement", js: "amendement", typ: i("Amendement") }],
!1
),
Amendement: n(
[
{ json: "uid", js: "uid", typ: "" },
{ json: "chronotag", js: "chronotag", typ: "" },
{ json: "legislature", js: "legislature", typ: "" },
{
json: "identification",
js: "identification",
typ: i("Identification")
},
{ json: "examenRef", js: "examenRef", typ: "" },
{ json: "texteLegislatifRef", js: "texteLegislatifRef", typ: "" },
{ json: "triAmendement", js: "triAmendement", typ: t(void 0, "") },
{
json: "cardinaliteAmdtMultiples",
js: "cardinaliteAmdtMultiples",
typ: t(void 0, "")
},
{
json: "amendementParentRef",
js: "amendementParentRef",
typ: t(void 0, "")
},
{ json: "signataires", js: "signataires", typ: i("Signataires") },
{
json: "pointeurFragmentTexte",
js: "pointeurFragmentTexte",
typ: i("PointeurFragmentTexte")
},
{ json: "corps", js: "corps", typ: t(void 0, i("CorpsAmendement")) },
{ json: "cycleDeVie", js: "cycleDeVie", typ: i("CycleDeVie") },
{
json: "representation",
js: "representation",
typ: t(void 0, i("Representation"))
},
{
json: "seanceDiscussionRef",
js: "seanceDiscussionRef",
typ: t(void 0, "")
},
{ json: "article99", js: "article99", typ: "" },
{
json: "loiReference",
js: "loiReference",
typ: t(void 0, i("LoiReference"))
},
{
json: "discussionCommune",
js: "discussionCommune",
typ: t(void 0, i("Discussion"))
},
{
json: "discussionIdentique",
js: "discussionIdentique",
typ: t(void 0, i("Discussion"))
},
{
json: "accordGouvernementDepotHorsDelai",
js: "accordGouvernementDepotHorsDelai",
typ: i("AccordGouvernementDepotHorsDelai")
}
],
!1
),
CorpsAmendement: n(
[
{
json: "cartoucheInformatif",
js: "cartoucheInformatif",
typ: t(void 0, "")
},
{
json: "contenuAuteur",
js: "contenuAuteur",
typ: t(void 0, i("ContenuAuteur"))
}
],
!1
),
ContenuAuteur: n(
[
{ json: "dispositif", js: "dispositif", typ: t(void 0, "") },
{
json: "avantAppel",
js: "avantAppel",
typ: t(void 0, i("AvantAppel"))
},
{ json: "exposeSommaire", js: "exposeSommaire", typ: t(void 0, "") },
{
json: "dispositifAmdtCreditPLF",
js: "dispositifAmdtCreditPLF",
typ: t(void 0, i("DispositifAmdtCreditPLF"))
},
{
json: "dispositifAmdtCreditPLFR",
js: "dispositifAmdtCreditPLFR",
typ: t(void 0, i("DispositifAmdtCreditPLFR"))
}
],
!1
),
AvantAppel: n(
[
{ json: "dispositif", js: "dispositif", typ: t(void 0, "") },
{
json: "dispositifAmdtCreditPLF",
js: "dispositifAmdtCreditPLF",
typ: t(void 0, i("DispositifAmdtCreditPLF"))
},
{
json: "dispositifAmdtCreditPLFR",
js: "dispositifAmdtCreditPLFR",
typ: t(void 0, i("DispositifAmdtCreditPLFR"))
}
],
!1
),
DispositifAmdtCreditPLF: n(
[
{
json: "listeProgrammes",
js: "listeProgrammes",
typ: t(void 0, c(i("ProgrammePlf")))
},
{ json: "soldeAE", js: "soldeAE", typ: t(void 0, "") },
{ json: "soldeCP", js: "soldeCP", typ: t(void 0, "") },
{ json: "cpEgalAe", js: "cpEgalAe", typ: "" }
],
!1
),
ProgrammePlf: n(
[
{ json: "libelle", js: "libelle", typ: "" },
{ json: "programmeRef", js: "programmeRef", typ: "" },
{ json: "autorisationEngagement", js: "autorisationEngagement", typ: "" },
{ json: "creditPaiement", js: "creditPaiement", typ: "" },
{ json: "action", js: "action", typ: i("Action") },
{
json: "lignesCredits",
js: "lignesCredits",
typ: t(void 0, c(i("LigneCreditPLF")))
}
],
!1
),
LigneCreditPLF: n(
[
{ json: "id", js: "id", typ: "" },
{ json: "libelle", js: "libelle", typ: "" },
{ json: "autorisationEngagement", js: "autorisationEngagement", typ: "" },
{ json: "creditPaiement", js: "creditPaiement", typ: "" },
{ json: "action", js: "action", typ: i("Action") }
],
!1
),
DispositifAmdtCreditPLFR: n(
[
{
json: "listeProgrammes",
js: "listeProgrammes",
typ: t(void 0, c(i("LigneCreditPLFR")))
},
{ json: "totalAE", js: "totalAE", typ: t(void 0, i("Total")) },
{ json: "totalCP", js: "totalCP", typ: t(void 0, i("Total")) },
{ json: "cpEgalAe", js: "cpEgalAe", typ: "" }
],
!1
),
LigneCreditPLFR: n(
[
{ json: "libelle", js: "libelle", typ: "" },
{ json: "programmeRef", js: "programmeRef", typ: t(void 0, "") },
{
json: "autorisationEngagementSupplementaire",
js: "autorisationEngagementSupplementaire",
typ: ""
},
{
json: "creditPaiementSupplementaire",
js: "creditPaiementSupplementaire",
typ: ""
},
{
json: "autorisationEngagementAnnule",
js: "autorisationEngagementAnnule",
typ: ""
},
{ json: "creditPaiementAnnule", js: "creditPaiementAnnule", typ: "" },
{ json: "action", js: "action", typ: i("Action") },
{
json: "lignesCredits",
js: "lignesCredits",
typ: t(void 0, c(i("LigneCreditPLFR")))
},
{ json: "id", js: "id", typ: t(void 0, "") }
],
!1
),
Total: n(
[
{ json: "supplementaire", js: "supplementaire", typ: "" },
{ json: "annule", js: "annule", typ: "" },
{ json: "solde", js: "solde", typ: "" }
],
!1
),
CycleDeVie: n(
[
{ json: "dateDepot", js: "dateDepot", typ: t(void 0, Date) },
{
json: "datePublication",
js: "datePublication",
typ: t(void 0, Date)
},
{ json: "soumisArticle40", js: "soumisArticle40", typ: "" },
{
json: "etatDesTraitements",
js: "etatDesTraitements",
typ: i("EtatDesTraitements")
},
{
json: "dateSort",
js: "dateSort",
typ: t(void 0, Date)
},
{
json: "sort",
js: "sort",
typ: t(void 0, i("SortAmendement"))
}
],
!1
),
EtatDesTraitements: n(
[
{ json: "etat", js: "etat", typ: i("EtatAmendement") },
{
json: "sousEtat",
js: "sousEtat",
typ: t(void 0, i("SousEtatAmendement"))
}
],
!1
),
EtatAmendement: n(
[
{ json: "code", js: "code", typ: i("EtatAmendementCode") },
{ json: "libelle", js: "libelle", typ: i("EtatAmendementLibelle") }
],
!1
),
SousEtatAmendement: n(
[
{ json: "code", js: "code", typ: i("EtatAmendementCode") },
{ json: "libelle", js: "libelle", typ: i("SortAmendement") }
],
!1
),
Discussion: n(
[
{ json: "idDiscussion", js: "idDiscussion", typ: t(void 0, "") },
{
json: "typePosition",
js: "typePosition",
typ: t(void 0, i("TypePosition"))
}
],
!1
),
Identification: n(
[
{ json: "numeroLong", js: "numeroLong", typ: "" },
{ json: "numeroOrdreDepot", js: "numeroOrdreDepot", typ: "" },
{ json: "prefixeOrganeExamen", js: "prefixeOrganeExamen", typ: "" },
{ json: "numeroRect", js: "numeroRect", typ: "" }
],
!1
),
LoiReference: n(
[
{
json: "codeLoi",
js: "codeLoi",
typ: t(void 0, "")
},
{
json: "divisionCodeLoi",
js: "divisionCodeLoi",
typ: t(void 0, "")
}
],
!1
),
PointeurFragmentTexte: n(
[
{
json: "division",
js: "division",
typ: t(void 0, i("PointeurFragmentTexteDivision"))
},
{
json: "alinea",
js: "alinea",
typ: t(void 0, i("Alinea"))
},
{
json: "missionVisee",
js: "missionVisee",
typ: t(void 0, i("MissionVisee"))
}
],
!1
),
Alinea: n(
[
{
json: "avantAApres",
js: "avantAApres",
typ: t(void 0, i("AvantAApres"))
},
{ json: "numero", js: "numero", typ: t(void 0, "") },
{
json: "alineaDesignation",
js: "alineaDesignation",
typ: t(void 0, "")
}
],
!1
),
PointeurFragmentTexteDivision: n(
[
{ json: "titre", js: "titre", typ: t(void 0, "") },
{
json: "articleDesignationCourte",
js: "articleDesignationCourte",
typ: t(void 0, "")
},
{
json: "articleDesignation",
js: "articleDesignation",
typ: t(void 0, "")
},
{ json: "type", js: "type", typ: i("DivisionType") },
{
json: "avantAApres",
js: "avantAApres",
typ: i("AvantAApres")
},
{
json: "divisionRattachee",
js: "divisionRattachee",
typ: t(void 0, "")
},
{ json: "articleAdditionnel", js: "articleAdditionnel", typ: "" },
{ json: "chapitreAdditionnel", js: "chapitreAdditionnel", typ: "" },
{
json: "urlDivisionTexteVise",
js: "urlDivisionTexteVise",
typ: t(void 0, "")
}
],
!1
),
MissionVisee: n(
[
{ json: "codeEtat", js: "codeEtat", typ: i("CodeEtat") },
{ json: "codeMissionMinefi", js: "codeMissionMinefi", typ: "" },
{ json: "libelleMission", js: "libelleMission", typ: "" },
{ json: "missionRef", js: "missionRef", typ: "" }
],
!1
),
Representation: n(
[
{ json: "nom", js: "nom", typ: i("TypeMimeNom") },
{ json: "typeMime", js: "typeMime", typ: i("TypeMime") },
{
json: "statutRepresentation",
js: "statutRepresentation",
typ: i("StatutRepresentation")
},
{ json: "contenu", js: "contenu", typ: i("ContenuAmendement") }
],
!1
),
ContenuAmendement: n(
[{ json: "documentURI", js: "documentURI", typ: "" }],
!1
),
StatutRepresentation: n(
[
{ json: "verbatim", js: "verbatim", typ: !1 },
{ json: "canonique", js: "canonique", typ: !1 },
{ json: "officielle", js: "officielle", typ: !1 },
{ json: "transcription", js: "transcription", typ: !1 },
{ json: "enregistrement", js: "enregistrement", typ: !1 }
],
!1
),
TypeMime: n(
[
{ json: "type", js: "type", typ: i("TypeMimeType") },
{ json: "subType", js: "subType", typ: i("TypeMimeNom") }
],
!1
),
Signataires: n(
[
{ json: "auteur", js: "auteur", typ: i("AuteurAmendement") },
{
json: "cosignatairesRefs",
js: "cosignatairesRefs",
typ: t(void 0, c(""))
},
{
json: "suffixe",
js: "suffixe",
typ: t(void 0, "")
},
{ json: "libelle", js: "libelle", typ: t(void 0, "") }
],
!1
),
AuteurAmendement: n(
[
{ json: "typeAuteur", js: "typeAuteur", typ: i("TypeAuteur") },
{
json: "gouvernementRef",
js: "gouvernementRef",
typ: t(void 0, "")
},
{
json: "acteurRef",
js: "acteurRef",
typ: t(void 0, "")
},
{
json: "groupePolitiqueRef",
js: "groupePolitiqueRef",
typ: t(void 0, "")
},
{
json: "auteurRapporteurOrganeRef",
js: "auteurRapporteurOrganeRef",
typ: t(void 0, "")
}
],
!1
),
AccordGouvernementDepotHorsDelai: ["Accord", "Sans objet"],
Action: ["création", "modification", "suppression"],
EtatAmendementCode: [
"AC",
"AT",
"DI",
"effacé",
"ER",
"ET",
"IR",
"IRR127",
"IRR20",
"IRR37",
"IRR38",
"IRR41",
"IRR42",
"IRR45",
"IRR48",
"IRR53",
"IRRAI",
"IRRAIF",
"IRRD",
"IRRHC",
"IRRHD",
"IRRSA",
"R",
"RT",
"T"
],
EtatAmendementLibelle: [
"A discuter",
"A déposer",
"Discuté",
"effacé",
"En recevabilité",
"En traitement",
"Irrecevable",
"Irrecevable 40",
"Retiré"
],
SortAmendement: [
"Adopté",
"Autre irrecevabilité",
"Autre irrecevabilité 40",
"Autres irr LOLF",
"Autres irr LOLFSS",
"Cavalier (45)",
"Cavalier budgétaire",
"Cavalier social",
"Champ de l'habilitation (38)",
"Charge",
"CMP (45)",
"Crédits",
"Disposition réglementaire (37)",
"Domaine de la loi (41)",
"Domaine loi organique (127)",
"Doublon",
"Entonnoir (45)",
"Gage",
"Hors champ",
"Hors-délais",
"Injonction (20)",
"Irr en première partie",
"Irr en seconde partie",
"LOLF",
"LOLFSS",
"Non soutenu",
"Ordre du jour (48)",
"R",
"Ratification traité (53)",
"Rejeté",
"Retiré",
"Retiré après publication",
"Retiré avant publication",
"Satisfait ou inopérant (42)",
"Sous-amendement (98)",
"Tombé"
],
TypePosition: ["Dernier", "Milieu", "Premier"],
AvantAApres: ["A", "Apres", "Avant"],
DivisionType: ["ANNEXE", "ARTICLE", "CHAPITRE", "TITRE"],
CodeEtat: ["B", "C", "D"],
TypeMimeNom: ["PDF"],
TypeMimeType: ["application"],
TypeAuteur: ["Député", "Gouvernement", "Rapporteur"]
};
export {
L as A,
q as C,
x as D,
C as E,
E as S,
J as T,
b as a,
h as b,
M as c,
O as d,
N as e,
S as f,
F as g
};